@knpkv/codecommit-web 0.1.2 → 0.2.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/dist/client/assets/index-9fIdCzWC.css +1 -0
- package/dist/client/assets/index-CR6OSddv.js +263 -0
- package/dist/client/index.html +3 -3
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/server/Api.d.ts +10 -1
- package/dist/server/Api.d.ts.map +1 -1
- package/dist/server/Api.js +9 -1
- package/dist/server/Api.js.map +1 -1
- package/dist/server/handlers/prs-live.d.ts.map +1 -1
- package/dist/server/handlers/prs-live.js +9 -2
- package/dist/server/handlers/prs-live.js.map +1 -1
- package/package.json +2 -2
- package/dist/client/assets/index-CdJp2tFb.js +0 -253
- package/dist/client/assets/index-D-_sDJhr.css +0 -1
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
var R8=Object.defineProperty;var $T=e=>{throw TypeError(e)};var M8=(e,t,n)=>t in e?R8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var g=(e,t,n)=>M8(e,typeof t!="symbol"?t+"":t,n),LT=(e,t,n)=>t.has(e)||$T("Cannot "+n);var Lm=(e,t,n)=>(LT(e,t,"read from private field"),n?n.call(e):t.get(e)),uS=(e,t,n)=>t.has(e)?$T("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),jm=(e,t,n,r)=>(LT(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function N8(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var pg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rz={exports:{}},lb={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var D8=Symbol.for("react.transitional.element"),z8=Symbol.for("react.fragment");function iz(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:D8,type:e,key:r,ref:t!==void 0?t:null,props:n}}lb.Fragment=z8;lb.jsx=iz;lb.jsxs=iz;rz.exports=lb;var w=rz.exports,sz={exports:{}},ke={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var p1=Symbol.for("react.transitional.element"),I8=Symbol.for("react.portal"),$8=Symbol.for("react.fragment"),L8=Symbol.for("react.strict_mode"),j8=Symbol.for("react.profiler"),F8=Symbol.for("react.consumer"),P8=Symbol.for("react.context"),U8=Symbol.for("react.forward_ref"),B8=Symbol.for("react.suspense"),H8=Symbol.for("react.memo"),az=Symbol.for("react.lazy"),q8=Symbol.for("react.activity"),jT=Symbol.iterator;function V8(e){return e===null||typeof e!="object"?null:(e=jT&&e[jT]||e["@@iterator"],typeof e=="function"?e:null)}var oz={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lz=Object.assign,cz={};function Pu(e,t,n){this.props=e,this.context=t,this.refs=cz,this.updater=n||oz}Pu.prototype.isReactComponent={};Pu.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")};Pu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function uz(){}uz.prototype=Pu.prototype;function g1(e,t,n){this.props=e,this.context=t,this.refs=cz,this.updater=n||oz}var y1=g1.prototype=new uz;y1.constructor=g1;lz(y1,Pu.prototype);y1.isPureReactComponent=!0;var FT=Array.isArray;function cw(){}var bt={H:null,A:null,T:null,S:null},fz=Object.prototype.hasOwnProperty;function b1(e,t,n){var r=n.ref;return{$$typeof:p1,type:e,key:t,ref:r!==void 0?r:null,props:n}}function K8(e,t){return b1(e.type,t,e.props)}function v1(e){return typeof e=="object"&&e!==null&&e.$$typeof===p1}function G8(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var PT=/\/+/g;function fS(e,t){return typeof e=="object"&&e!==null&&e.key!=null?G8(""+e.key):t.toString(36)}function Y8(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(cw,cw):(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 cc(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case p1:case I8:a=!0;break;case az:return a=e._init,cc(a(e._payload),t,n,r,i)}}if(a)return i=i(e),a=r===""?"."+fS(e,0):r,FT(i)?(n="",a!=null&&(n=a.replace(PT,"$&/")+"/"),cc(i,t,n,"",function(c){return c})):i!=null&&(v1(i)&&(i=K8(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(PT,"$&/")+"/")+a)),t.push(i)),1;a=0;var o=r===""?".":r+":";if(FT(e))for(var l=0;l<e.length;l++)r=e[l],s=o+fS(r,l),a+=cc(r,t,n,s,i);else if(l=V8(e),typeof l=="function")for(e=l.call(e),l=0;!(r=e.next()).done;)r=r.value,s=o+fS(r,l++),a+=cc(r,t,n,s,i);else if(s==="object"){if(typeof e.then=="function")return cc(Y8(e),t,n,r,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function Fm(e,t,n){if(e==null)return e;var r=[],i=0;return cc(e,r,"","",function(s){return t.call(n,s,i++)}),r}function J8(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var UT=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!==null&&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)},Q8={map:Fm,forEach:function(e,t,n){Fm(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Fm(e,function(){t++}),t},toArray:function(e){return Fm(e,function(t){return t})||[]},only:function(e){if(!v1(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ke.Activity=q8;ke.Children=Q8;ke.Component=Pu;ke.Fragment=$8;ke.Profiler=j8;ke.PureComponent=g1;ke.StrictMode=L8;ke.Suspense=B8;ke.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=bt;ke.__COMPILER_RUNTIME={__proto__:null,c:function(e){return bt.H.useMemoCache(e)}};ke.cache=function(e){return function(){return e.apply(null,arguments)}};ke.cacheSignal=function(){return null};ke.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=lz({},e.props),i=e.key;if(t!=null)for(s in t.key!==void 0&&(i=""+t.key),t)!fz.call(t,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&t.ref===void 0||(r[s]=t[s]);var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){for(var a=Array(s),o=0;o<s;o++)a[o]=arguments[o+2];r.children=a}return b1(e.type,i,r)};ke.createContext=function(e){return e={$$typeof:P8,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:F8,_context:e},e};ke.createElement=function(e,t,n){var r,i={},s=null;if(t!=null)for(r in t.key!==void 0&&(s=""+t.key),t)fz.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var o=Array(a),l=0;l<a;l++)o[l]=arguments[l+2];i.children=o}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return b1(e,s,i)};ke.createRef=function(){return{current:null}};ke.forwardRef=function(e){return{$$typeof:U8,render:e}};ke.isValidElement=v1;ke.lazy=function(e){return{$$typeof:az,_payload:{_status:-1,_result:e},_init:J8}};ke.memo=function(e,t){return{$$typeof:H8,type:e,compare:t===void 0?null:t}};ke.startTransition=function(e){var t=bt.T,n={};bt.T=n;try{var r=e(),i=bt.S;i!==null&&i(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(cw,UT)}catch(s){UT(s)}finally{t!==null&&n.types!==null&&(t.types=n.types),bt.T=t}};ke.unstable_useCacheRefresh=function(){return bt.H.useCacheRefresh()};ke.use=function(e){return bt.H.use(e)};ke.useActionState=function(e,t,n){return bt.H.useActionState(e,t,n)};ke.useCallback=function(e,t){return bt.H.useCallback(e,t)};ke.useContext=function(e){return bt.H.useContext(e)};ke.useDebugValue=function(){};ke.useDeferredValue=function(e,t){return bt.H.useDeferredValue(e,t)};ke.useEffect=function(e,t){return bt.H.useEffect(e,t)};ke.useEffectEvent=function(e){return bt.H.useEffectEvent(e)};ke.useId=function(){return bt.H.useId()};ke.useImperativeHandle=function(e,t,n){return bt.H.useImperativeHandle(e,t,n)};ke.useInsertionEffect=function(e,t){return bt.H.useInsertionEffect(e,t)};ke.useLayoutEffect=function(e,t){return bt.H.useLayoutEffect(e,t)};ke.useMemo=function(e,t){return bt.H.useMemo(e,t)};ke.useOptimistic=function(e,t){return bt.H.useOptimistic(e,t)};ke.useReducer=function(e,t,n){return bt.H.useReducer(e,t,n)};ke.useRef=function(e){return bt.H.useRef(e)};ke.useState=function(e){return bt.H.useState(e)};ke.useSyncExternalStore=function(e,t,n){return bt.H.useSyncExternalStore(e,t,n)};ke.useTransition=function(){return bt.H.useTransition()};ke.version="19.2.4";sz.exports=ke;var x=sz.exports;const Pt=Lh(x),S1=N8({__proto__:null,default:Pt},[x]);var dz={exports:{}},cb={},hz={exports:{}},mz={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(z,j){var I=z.length;z.push(j);e:for(;0<I;){var te=I-1>>>1,R=z[te];if(0<i(R,j))z[te]=j,z[I]=R,I=te;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var j=z[0],I=z.pop();if(I!==j){z[0]=I;e:for(var te=0,R=z.length,Re=R>>>1;te<Re;){var U=2*(te+1)-1,T=z[U],W=U+1,Z=z[W];if(0>i(T,I))W<R&&0>i(Z,T)?(z[te]=Z,z[W]=I,te=W):(z[te]=T,z[U]=I,te=U);else if(W<R&&0>i(Z,I))z[te]=Z,z[W]=I,te=W;else break e}}return j}function i(z,j){var I=z.sortIndex-j.sortIndex;return I!==0?I:z.id-j.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var l=[],c=[],f=1,u=null,d=3,h=!1,p=!1,b=!1,S=!1,m=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;function _(z){for(var j=n(c);j!==null;){if(j.callback===null)r(c);else if(j.startTime<=z)r(c),j.sortIndex=j.expirationTime,t(l,j);else break;j=n(c)}}function C(z){if(b=!1,_(z),!p)if(n(l)!==null)p=!0,k||(k=!0,L());else{var j=n(c);j!==null&&G(C,j.startTime-z)}}var k=!1,A=-1,N=5,D=-1;function M(){return S?!0:!(e.unstable_now()-D<N)}function $(){if(S=!1,k){var z=e.unstable_now();D=z;var j=!0;try{e:{p=!1,b&&(b=!1,y(A),A=-1),h=!0;var I=d;try{t:{for(_(z),u=n(l);u!==null&&!(u.expirationTime>z&&M());){var te=u.callback;if(typeof te=="function"){u.callback=null,d=u.priorityLevel;var R=te(u.expirationTime<=z);if(z=e.unstable_now(),typeof R=="function"){u.callback=R,_(z),j=!0;break t}u===n(l)&&r(l),_(z)}else r(l);u=n(l)}if(u!==null)j=!0;else{var Re=n(c);Re!==null&&G(C,Re.startTime-z),j=!1}}break e}finally{u=null,d=I,h=!1}j=void 0}}finally{j?L():k=!1}}}var L;if(typeof v=="function")L=function(){v($)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,Y=J.port2;J.port1.onmessage=$,L=function(){Y.postMessage(null)}}else L=function(){m($,0)};function G(z,j){A=m(function(){z(e.unstable_now())},j)}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(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_next=function(z){switch(d){case 1:case 2:case 3:var j=3;break;default:j=d}var I=d;d=j;try{return z()}finally{d=I}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(z,j){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var I=d;d=z;try{return j()}finally{d=I}},e.unstable_scheduleCallback=function(z,j,I){var te=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?te+I:te):I=te,z){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=I+R,z={id:f++,callback:j,priorityLevel:z,startTime:I,expirationTime:R,sortIndex:-1},I>te?(z.sortIndex=I,t(c,z),n(l)===null&&z===n(c)&&(b?(y(A),A=-1):b=!0,G(C,I-te))):(z.sortIndex=R,t(l,z),p||h||(p=!0,k||(k=!0,L()))),z},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(z){var j=d;return function(){var I=d;d=j;try{return z.apply(this,arguments)}finally{d=I}}}})(mz);hz.exports=mz;var uw=hz.exports,pz={exports:{}},Kn={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var X8=x;function gz(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 aa(){}var Un={d:{f:aa,r:function(){throw Error(gz(522))},D:aa,C:aa,L:aa,m:aa,X:aa,S:aa,M:aa},p:0,findDOMNode:null},W8=Symbol.for("react.portal");function Z8(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:W8,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}var hd=X8.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function ub(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Kn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Un;Kn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(gz(299));return Z8(e,t,null,n)};Kn.flushSync=function(e){var t=hd.T,n=Un.p;try{if(hd.T=null,Un.p=2,e)return e()}finally{hd.T=t,Un.p=n,Un.d.f()}};Kn.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Un.d.C(e,t))};Kn.prefetchDNS=function(e){typeof e=="string"&&Un.d.D(e)};Kn.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,r=ub(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,s=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Un.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:s}):n==="script"&&Un.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:s,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Kn.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=ub(t.as,t.crossOrigin);Un.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Un.d.M(e)};Kn.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,r=ub(n,t.crossOrigin);Un.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})}};Kn.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=ub(t.as,t.crossOrigin);Un.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})}else Un.d.m(e)};Kn.requestFormReset=function(e){Un.d.r(e)};Kn.unstable_batchedUpdates=function(e,t){return e(t)};Kn.useFormState=function(e,t,n){return hd.H.useFormState(e,t,n)};Kn.useFormStatus=function(){return hd.H.useHostTransitionStatus()};Kn.version="19.2.4";function yz(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yz)}catch(e){console.error(e)}}yz(),pz.exports=Kn;var Uu=pz.exports;const e9=Lh(Uu);/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Zt=uw,bz=x,t9=Uu;function P(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 vz(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function jh(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Sz(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 wz(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 BT(e){if(jh(e)!==e)throw Error(P(188))}function n9(e){var t=e.alternate;if(!t){if(t=jh(e),t===null)throw Error(P(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return BT(i),e;if(s===r)return BT(i),t;s=s.sibling}throw Error(P(188))}if(n.return!==r.return)n=i,r=s;else{for(var a=!1,o=i.child;o;){if(o===n){a=!0,n=i,r=s;break}if(o===r){a=!0,r=i,n=s;break}o=o.sibling}if(!a){for(o=s.child;o;){if(o===n){a=!0,n=s,r=i;break}if(o===r){a=!0,r=s,n=i;break}o=o.sibling}if(!a)throw Error(P(189))}}if(n.alternate!==r)throw Error(P(190))}if(n.tag!==3)throw Error(P(188));return n.stateNode.current===n?e:t}function xz(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=xz(e),t!==null)return t;e=e.sibling}return null}var vt=Object.assign,r9=Symbol.for("react.element"),Pm=Symbol.for("react.transitional.element"),Wf=Symbol.for("react.portal"),vc=Symbol.for("react.fragment"),_z=Symbol.for("react.strict_mode"),fw=Symbol.for("react.profiler"),kz=Symbol.for("react.consumer"),Cs=Symbol.for("react.context"),w1=Symbol.for("react.forward_ref"),dw=Symbol.for("react.suspense"),hw=Symbol.for("react.suspense_list"),x1=Symbol.for("react.memo"),da=Symbol.for("react.lazy"),mw=Symbol.for("react.activity"),i9=Symbol.for("react.memo_cache_sentinel"),HT=Symbol.iterator;function Rf(e){return e===null||typeof e!="object"?null:(e=HT&&e[HT]||e["@@iterator"],typeof e=="function"?e:null)}var s9=Symbol.for("react.client.reference");function pw(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===s9?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case vc:return"Fragment";case fw:return"Profiler";case _z:return"StrictMode";case dw:return"Suspense";case hw:return"SuspenseList";case mw:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Wf:return"Portal";case Cs:return e.displayName||"Context";case kz:return(e._context.displayName||"Context")+".Consumer";case w1:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case x1:return t=e.displayName||null,t!==null?t:pw(e.type)||"Memo";case da:t=e._payload,e=e._init;try{return pw(e(t))}catch{}}return null}var Zf=Array.isArray,ye=bz.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ge=t9.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Jo={pending:!1,data:null,method:null,action:null},gw=[],Sc=-1;function ts(e){return{current:e}}function cn(e){0>Sc||(e.current=gw[Sc],gw[Sc]=null,Sc--)}function ft(e,t){Sc++,gw[Sc]=e.current,e.current=t}var Vi=ts(null),Gd=ts(null),Aa=ts(null),gg=ts(null);function yg(e,t){switch(ft(Aa,t),ft(Gd,e),ft(Vi,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?JA(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=JA(t),e=q$(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}cn(Vi),ft(Vi,e)}function iu(){cn(Vi),cn(Gd),cn(Aa)}function yw(e){e.memoizedState!==null&&ft(gg,e);var t=Vi.current,n=q$(t,e.type);t!==n&&(ft(Gd,e),ft(Vi,n))}function bg(e){Gd.current===e&&(cn(Vi),cn(Gd)),gg.current===e&&(cn(gg),ih._currentValue=Jo)}var dS,qT;function zo(e){if(dS===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);dS=t&&t[1]||"",qT=-1<n.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+dS+e+qT}var hS=!1;function mS(e,t){if(!e||hS)return"";hS=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(h){var d=h}Reflect.construct(e,[],u)}else{try{u.call()}catch(h){d=h}e.call(u.prototype)}}else{try{throw Error()}catch(h){d=h}(u=e())&&typeof u.catch=="function"&&u.catch(function(){})}}catch(h){if(h&&d&&typeof h.stack=="string")return[h.stack,d.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 s=r.DetermineComponentFrameRoot(),a=s[0],o=s[1];if(a&&o){var l=a.split(`
|
|
44
|
+
`),c=o.split(`
|
|
45
|
+
`);for(i=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;i<c.length&&!c[i].includes("DetermineComponentFrameRoot");)i++;if(r===l.length||i===c.length)for(r=l.length-1,i=c.length-1;1<=r&&0<=i&&l[r]!==c[i];)i--;for(;1<=r&&0<=i;r--,i--)if(l[r]!==c[i]){if(r!==1||i!==1)do if(r--,i--,0>i||l[r]!==c[i]){var f=`
|
|
46
|
+
`+l[r].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=r&&0<=i);break}}}finally{hS=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?zo(n):""}function a9(e,t){switch(e.tag){case 26:case 27:case 5:return zo(e.type);case 16:return zo("Lazy");case 13:return e.child!==t&&t!==null?zo("Suspense Fallback"):zo("Suspense");case 19:return zo("SuspenseList");case 0:case 15:return mS(e.type,!1);case 11:return mS(e.type.render,!1);case 1:return mS(e.type,!0);case 31:return zo("Activity");default:return""}}function VT(e){try{var t="",n=null;do t+=a9(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
|
|
47
|
+
Error generating stack: `+r.message+`
|
|
48
|
+
`+r.stack}}var bw=Object.prototype.hasOwnProperty,_1=Zt.unstable_scheduleCallback,pS=Zt.unstable_cancelCallback,o9=Zt.unstable_shouldYield,l9=Zt.unstable_requestPaint,wr=Zt.unstable_now,c9=Zt.unstable_getCurrentPriorityLevel,Ez=Zt.unstable_ImmediatePriority,Cz=Zt.unstable_UserBlockingPriority,vg=Zt.unstable_NormalPriority,u9=Zt.unstable_LowPriority,Tz=Zt.unstable_IdlePriority,f9=Zt.log,d9=Zt.unstable_setDisableYieldValue,Fh=null,xr=null;function va(e){if(typeof f9=="function"&&d9(e),xr&&typeof xr.setStrictMode=="function")try{xr.setStrictMode(Fh,e)}catch{}}var _r=Math.clz32?Math.clz32:p9,h9=Math.log,m9=Math.LN2;function p9(e){return e>>>=0,e===0?32:31-(h9(e)/m9|0)|0}var Um=256,Bm=262144,Hm=4194304;function Io(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&261888;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 fb(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,s=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var o=r&134217727;return o!==0?(r=o&~s,r!==0?i=Io(r):(a&=o,a!==0?i=Io(a):n||(n=o&~e,n!==0&&(i=Io(n))))):(o=r&~s,o!==0?i=Io(o):a!==0?i=Io(a):n||(n=r&~e,n!==0&&(i=Io(n)))),i===0?0:t!==0&&t!==i&&!(t&s)&&(s=i&-i,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:i}function Ph(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function g9(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 Az(){var e=Hm;return Hm<<=1,!(Hm&62914560)&&(Hm=4194304),e}function gS(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Uh(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function y9(e,t,n,r,i,s){var a=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 o=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=a&~n;0<n;){var f=31-_r(n),u=1<<f;o[f]=0,l[f]=-1;var d=c[f];if(d!==null)for(c[f]=null,f=0;f<d.length;f++){var h=d[f];h!==null&&(h.lane&=-536870913)}n&=~u}r!==0&&Oz(e,r,0),s!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=s&~(a&~t))}function Oz(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-_r(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Rz(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-_r(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Mz(e,t){var n=t&-t;return n=n&42?1:k1(n),n&(e.suspendedLanes|t)?0:n}function k1(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 E1(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Nz(){var e=Ge.p;return e!==0?e:(e=window.event,e===void 0?32:tL(e.type))}function KT(e,t){var n=Ge.p;try{return Ge.p=e,t()}finally{Ge.p=n}}var fo=Math.random().toString(36).slice(2),bn="__reactFiber$"+fo,ir="__reactProps$"+fo,Bu="__reactContainer$"+fo,vw="__reactEvents$"+fo,b9="__reactListeners$"+fo,v9="__reactHandles$"+fo,GT="__reactResources$"+fo,Bh="__reactMarker$"+fo;function C1(e){delete e[bn],delete e[ir],delete e[vw],delete e[b9],delete e[v9]}function wc(e){var t=e[bn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Bu]||n[bn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=eO(e);e!==null;){if(n=e[bn])return n;e=eO(e)}return t}e=n,n=e.parentNode}return null}function Hu(e){if(e=e[bn]||e[Bu]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ed(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(P(33))}function Lc(e){var t=e[GT];return t||(t=e[GT]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ln(e){e[Bh]=!0}var Dz=new Set,zz={};function Nl(e,t){su(e,t),su(e+"Capture",t)}function su(e,t){for(zz[e]=t,e=0;e<t.length;e++)Dz.add(t[e])}var S9=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]*$"),YT={},JT={};function w9(e){return bw.call(JT,e)?!0:bw.call(YT,e)?!1:S9.test(e)?JT[e]=!0:(YT[e]=!0,!1)}function Tp(e,t,n){if(w9(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 qm(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 us(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 jr(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Iz(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function x9(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Sw(e){if(!e._valueTracker){var t=Iz(e)?"checked":"value";e._valueTracker=x9(e,t,""+e[t])}}function $z(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Iz(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Sg(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var _9=/[\n"\\]/g;function qr(e){return e.replace(_9,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ww(e,t,n,r,i,s,a,o){e.name="",a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.type=a:e.removeAttribute("type"),t!=null?a==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jr(t)):e.value!==""+jr(t)&&(e.value=""+jr(t)):a!=="submit"&&a!=="reset"||e.removeAttribute("value"),t!=null?xw(e,a,jr(t)):n!=null?xw(e,a,jr(n)):r!=null&&e.removeAttribute("value"),i==null&&s!=null&&(e.defaultChecked=!!s),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+jr(o):e.removeAttribute("name")}function Lz(e,t,n,r,i,s,a,o){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){Sw(e);return}n=n!=null?""+jr(n):"",t=t!=null?""+jr(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r=r??i,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.name=a),Sw(e)}function xw(e,t,n){t==="number"&&Sg(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function jc(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=""+jr(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 jz(e,t,n){if(t!=null&&(t=""+jr(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+jr(n):""}function Fz(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(P(92));if(Zf(r)){if(1<r.length)throw Error(P(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=jr(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),Sw(e)}function au(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var k9=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 QT(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||k9.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Pz(e,t,n){if(t!=null&&typeof t!="object")throw Error(P(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]="");for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&QT(e,i,r)}else for(var s in t)t.hasOwnProperty(s)&&QT(e,s,t[s])}function T1(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 E9=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),C9=/^[\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 Ap(e){return C9.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ts(){}var _w=null;function A1(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xc=null,Fc=null;function XT(e){var t=Hu(e);if(t&&(e=t.stateNode)){var n=e[ir]||null;e:switch(e=t.stateNode,t.type){case"input":if(ww(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="'+qr(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[ir]||null;if(!i)throw Error(P(90));ww(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&$z(r)}break e;case"textarea":jz(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&jc(e,!!n.multiple,t,!1)}}}var yS=!1;function Uz(e,t,n){if(yS)return e(t,n);yS=!0;try{var r=e(t);return r}finally{if(yS=!1,(xc!==null||Fc!==null)&&(_b(),xc&&(t=xc,e=Fc,Fc=xc=null,XT(t),e)))for(t=0;t<e.length;t++)XT(e[t])}}function Yd(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ir]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(P(231,t,typeof n));return n}var js=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kw=!1;if(js)try{var Mf={};Object.defineProperty(Mf,"passive",{get:function(){kw=!0}}),window.addEventListener("test",Mf,Mf),window.removeEventListener("test",Mf,Mf)}catch{kw=!1}var Sa=null,O1=null,Op=null;function Bz(){if(Op)return Op;var e,t=O1,n=t.length,r,i="value"in Sa?Sa.value:Sa.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[s-r];r++);return Op=i.slice(e,1<r?1-r:void 0)}function Rp(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 Vm(){return!0}function WT(){return!1}function ar(e){function t(n,r,i,s,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Vm:WT,this.isPropagationStopped=WT,this}return vt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Vm)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Vm)},persist:function(){},isPersistent:Vm}),t}var Dl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},db=ar(Dl),Hh=vt({},Dl,{view:0,detail:0}),T9=ar(Hh),bS,vS,Nf,hb=vt({},Hh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:R1,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!==Nf&&(Nf&&e.type==="mousemove"?(bS=e.screenX-Nf.screenX,vS=e.screenY-Nf.screenY):vS=bS=0,Nf=e),bS)},movementY:function(e){return"movementY"in e?e.movementY:vS}}),ZT=ar(hb),A9=vt({},hb,{dataTransfer:0}),O9=ar(A9),R9=vt({},Hh,{relatedTarget:0}),SS=ar(R9),M9=vt({},Dl,{animationName:0,elapsedTime:0,pseudoElement:0}),N9=ar(M9),D9=vt({},Dl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),z9=ar(D9),I9=vt({},Dl,{data:0}),eA=ar(I9),$9={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},L9={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"},j9={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function F9(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=j9[e])?!!t[e]:!1}function R1(){return F9}var P9=vt({},Hh,{key:function(e){if(e.key){var t=$9[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Rp(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?L9[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:R1,charCode:function(e){return e.type==="keypress"?Rp(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Rp(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),U9=ar(P9),B9=vt({},hb,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tA=ar(B9),H9=vt({},Hh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:R1}),q9=ar(H9),V9=vt({},Dl,{propertyName:0,elapsedTime:0,pseudoElement:0}),K9=ar(V9),G9=vt({},hb,{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}),Y9=ar(G9),J9=vt({},Dl,{newState:0,oldState:0}),Q9=ar(J9),X9=[9,13,27,32],M1=js&&"CompositionEvent"in window,md=null;js&&"documentMode"in document&&(md=document.documentMode);var W9=js&&"TextEvent"in window&&!md,Hz=js&&(!M1||md&&8<md&&11>=md),nA=" ",rA=!1;function qz(e,t){switch(e){case"keyup":return X9.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vz(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _c=!1;function Z9(e,t){switch(e){case"compositionend":return Vz(t);case"keypress":return t.which!==32?null:(rA=!0,nA);case"textInput":return e=t.data,e===nA&&rA?null:e;default:return null}}function eq(e,t){if(_c)return e==="compositionend"||!M1&&qz(e,t)?(e=Bz(),Op=O1=Sa=null,_c=!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 Hz&&t.locale!=="ko"?null:t.data;default:return null}}var tq={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 iA(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!tq[e.type]:t==="textarea"}function Kz(e,t,n,r){xc?Fc?Fc.push(r):Fc=[r]:xc=r,t=jg(t,"onChange"),0<t.length&&(n=new db("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var pd=null,Jd=null;function nq(e){U$(e,0)}function mb(e){var t=ed(e);if($z(t))return e}function sA(e,t){if(e==="change")return t}var Gz=!1;if(js){var wS;if(js){var xS="oninput"in document;if(!xS){var aA=document.createElement("div");aA.setAttribute("oninput","return;"),xS=typeof aA.oninput=="function"}wS=xS}else wS=!1;Gz=wS&&(!document.documentMode||9<document.documentMode)}function oA(){pd&&(pd.detachEvent("onpropertychange",Yz),Jd=pd=null)}function Yz(e){if(e.propertyName==="value"&&mb(Jd)){var t=[];Kz(t,Jd,e,A1(e)),Uz(nq,t)}}function rq(e,t,n){e==="focusin"?(oA(),pd=t,Jd=n,pd.attachEvent("onpropertychange",Yz)):e==="focusout"&&oA()}function iq(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return mb(Jd)}function sq(e,t){if(e==="click")return mb(t)}function aq(e,t){if(e==="input"||e==="change")return mb(t)}function oq(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rr=typeof Object.is=="function"?Object.is:oq;function Qd(e,t){if(Rr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!bw.call(t,i)||!Rr(e[i],t[i]))return!1}return!0}function lA(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cA(e,t){var n=lA(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=lA(n)}}function Jz(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Jz(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qz(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Sg(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=Sg(e.document)}return t}function N1(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 lq=js&&"documentMode"in document&&11>=document.documentMode,kc=null,Ew=null,gd=null,Cw=!1;function uA(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cw||kc==null||kc!==Sg(r)||(r=kc,"selectionStart"in r&&N1(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}),gd&&Qd(gd,r)||(gd=r,r=jg(Ew,"onSelect"),0<r.length&&(t=new db("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=kc)))}function Ao(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ec={animationend:Ao("Animation","AnimationEnd"),animationiteration:Ao("Animation","AnimationIteration"),animationstart:Ao("Animation","AnimationStart"),transitionrun:Ao("Transition","TransitionRun"),transitionstart:Ao("Transition","TransitionStart"),transitioncancel:Ao("Transition","TransitionCancel"),transitionend:Ao("Transition","TransitionEnd")},_S={},Xz={};js&&(Xz=document.createElement("div").style,"AnimationEvent"in window||(delete Ec.animationend.animation,delete Ec.animationiteration.animation,delete Ec.animationstart.animation),"TransitionEvent"in window||delete Ec.transitionend.transition);function zl(e){if(_S[e])return _S[e];if(!Ec[e])return e;var t=Ec[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Xz)return _S[e]=t[n];return e}var Wz=zl("animationend"),Zz=zl("animationiteration"),eI=zl("animationstart"),cq=zl("transitionrun"),uq=zl("transitionstart"),fq=zl("transitioncancel"),tI=zl("transitionend"),nI=new Map,Tw="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Tw.push("scrollEnd");function Ai(e,t){nI.set(e,t),Nl(t,[e])}var wg=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!==null&&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)},Lr=[],Cc=0,D1=0;function pb(){for(var e=Cc,t=D1=Cc=0;t<e;){var n=Lr[t];Lr[t++]=null;var r=Lr[t];Lr[t++]=null;var i=Lr[t];Lr[t++]=null;var s=Lr[t];if(Lr[t++]=null,r!==null&&i!==null){var a=r.pending;a===null?i.next=i:(i.next=a.next,a.next=i),r.pending=i}s!==0&&rI(n,i,s)}}function gb(e,t,n,r){Lr[Cc++]=e,Lr[Cc++]=t,Lr[Cc++]=n,Lr[Cc++]=r,D1|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function z1(e,t,n,r){return gb(e,t,n,r),xg(e)}function Il(e,t){return gb(e,null,null,t),xg(e)}function rI(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,s=e.return;s!==null;)s.childLanes|=n,r=s.alternate,r!==null&&(r.childLanes|=n),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(i=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,i&&t!==null&&(i=31-_r(n),e=s.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),s):null}function xg(e){if(50<Ed)throw Ed=0,Yw=null,Error(P(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Tc={};function dq(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 yr(e,t,n,r){return new dq(e,t,n,r)}function I1(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ds(e,t){var n=e.alternate;return n===null?(n=yr(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&65011712,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 iI(e,t){e.flags&=65011714;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 Mp(e,t,n,r,i,s){var a=0;if(r=e,typeof e=="function")I1(e)&&(a=1);else if(typeof e=="string")a=yV(e,n,Vi.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case mw:return e=yr(31,n,t,i),e.elementType=mw,e.lanes=s,e;case vc:return Qo(n.children,i,s,t);case _z:a=8,i|=24;break;case fw:return e=yr(12,n,t,i|2),e.elementType=fw,e.lanes=s,e;case dw:return e=yr(13,n,t,i),e.elementType=dw,e.lanes=s,e;case hw:return e=yr(19,n,t,i),e.elementType=hw,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Cs:a=10;break e;case kz:a=9;break e;case w1:a=11;break e;case x1:a=14;break e;case da:a=16,r=null;break e}a=29,n=Error(P(130,e===null?"null":typeof e,"")),r=null}return t=yr(a,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Qo(e,t,n,r){return e=yr(7,e,r,t),e.lanes=n,e}function kS(e,t,n){return e=yr(6,e,null,t),e.lanes=n,e}function sI(e){var t=yr(18,null,null,0);return t.stateNode=e,t}function ES(e,t,n){return t=yr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var fA=new WeakMap;function Vr(e,t){if(typeof e=="object"&&e!==null){var n=fA.get(e);return n!==void 0?n:(t={value:e,source:t,stack:VT(t)},fA.set(e,t),t)}return{value:e,source:t,stack:VT(t)}}var Ac=[],Oc=0,_g=null,Xd=0,Fr=[],Pr=0,Ya=null,$i=1,Li="";function ws(e,t){Ac[Oc++]=Xd,Ac[Oc++]=_g,_g=e,Xd=t}function aI(e,t,n){Fr[Pr++]=$i,Fr[Pr++]=Li,Fr[Pr++]=Ya,Ya=e;var r=$i;e=Li;var i=32-_r(r)-1;r&=~(1<<i),n+=1;var s=32-_r(t)+i;if(30<s){var a=i-i%5;s=(r&(1<<a)-1).toString(32),r>>=a,i-=a,$i=1<<32-_r(t)+i|n<<i|r,Li=s+e}else $i=1<<s|n<<i|r,Li=e}function $1(e){e.return!==null&&(ws(e,1),aI(e,1,0))}function L1(e){for(;e===_g;)_g=Ac[--Oc],Ac[Oc]=null,Xd=Ac[--Oc],Ac[Oc]=null;for(;e===Ya;)Ya=Fr[--Pr],Fr[Pr]=null,Li=Fr[--Pr],Fr[Pr]=null,$i=Fr[--Pr],Fr[Pr]=null}function oI(e,t){Fr[Pr++]=$i,Fr[Pr++]=Li,Fr[Pr++]=Ya,$i=t.id,Li=t.overflow,Ya=e}var vn=null,pt=null,Fe=!1,Oa=null,Kr=!1,Aw=Error(P(519));function Ja(e){var t=Error(P(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wd(Vr(t,e)),Aw}function dA(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[bn]=e,t[ir]=r,n){case"dialog":Ne("cancel",t),Ne("close",t);break;case"iframe":case"object":case"embed":Ne("load",t);break;case"video":case"audio":for(n=0;n<nh.length;n++)Ne(nh[n],t);break;case"source":Ne("error",t);break;case"img":case"image":case"link":Ne("error",t),Ne("load",t);break;case"details":Ne("toggle",t);break;case"input":Ne("invalid",t),Lz(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Ne("invalid",t);break;case"textarea":Ne("invalid",t),Fz(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||H$(t.textContent,n)?(r.popover!=null&&(Ne("beforetoggle",t),Ne("toggle",t)),r.onScroll!=null&&Ne("scroll",t),r.onScrollEnd!=null&&Ne("scrollend",t),r.onClick!=null&&(t.onclick=Ts),t=!0):t=!1,t||Ja(e,!0)}function hA(e){for(vn=e.return;vn;)switch(vn.tag){case 5:case 31:case 13:Kr=!1;return;case 27:case 3:Kr=!0;return;default:vn=vn.return}}function Ql(e){if(e!==vn)return!1;if(!Fe)return hA(e),Fe=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Zw(e.type,e.memoizedProps)),n=!n),n&&pt&&Ja(e),hA(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));pt=ZA(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));pt=ZA(e)}else t===27?(t=pt,ho(e.type)?(e=rx,rx=null,pt=e):pt=t):pt=vn?Qr(e.stateNode.nextSibling):null;return!0}function al(){pt=vn=null,Fe=!1}function CS(){var e=Oa;return e!==null&&(Zn===null?Zn=e:Zn.push.apply(Zn,e),Oa=null),e}function Wd(e){Oa===null?Oa=[e]:Oa.push(e)}var Ow=ts(null),$l=null,As=null;function pa(e,t,n){ft(Ow,t._currentValue),t._currentValue=n}function zs(e){e._currentValue=Ow.current,cn(Ow)}function Rw(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Mw(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var s=i.dependencies;if(s!==null){var a=i.child;s=s.firstContext;e:for(;s!==null;){var o=s;s=i;for(var l=0;l<t.length;l++)if(o.context===t[l]){s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Rw(s.return,n,e),r||(a=null);break e}s=o.next}}else if(i.tag===18){if(a=i.return,a===null)throw Error(P(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Rw(a,n,e),a=null}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===e){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}}function qu(e,t,n,r){e=null;for(var i=t,s=!1;i!==null;){if(!s){if(i.flags&524288)s=!0;else if(i.flags&262144)break}if(i.tag===10){var a=i.alternate;if(a===null)throw Error(P(387));if(a=a.memoizedProps,a!==null){var o=i.type;Rr(i.pendingProps.value,a.value)||(e!==null?e.push(o):e=[o])}}else if(i===gg.current){if(a=i.alternate,a===null)throw Error(P(387));a.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(ih):e=[ih])}i=i.return}e!==null&&Mw(t,e,n,r),t.flags|=262144}function kg(e){for(e=e.firstContext;e!==null;){if(!Rr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ol(e){$l=e,As=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xn(e){return lI($l,e)}function Km(e,t){return $l===null&&ol(e),lI(e,t)}function lI(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},As===null){if(e===null)throw Error(P(308));As=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else As=As.next=t;return n}var hq=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},mq=Zt.unstable_scheduleCallback,pq=Zt.unstable_NormalPriority,Ut={$$typeof:Cs,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function j1(){return{controller:new hq,data:new Map,refCount:0}}function qh(e){e.refCount--,e.refCount===0&&mq(pq,function(){e.controller.abort()})}var yd=null,Nw=0,ou=0,Pc=null;function gq(e,t){if(yd===null){var n=yd=[];Nw=0,ou=ck(),Pc={status:"pending",value:void 0,then:function(r){n.push(r)}}}return Nw++,t.then(mA,mA),t}function mA(){if(--Nw===0&&yd!==null){Pc!==null&&(Pc.status="fulfilled");var e=yd;yd=null,ou=0,Pc=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function yq(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(r.status="rejected",r.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),r}var pA=ye.S;ye.S=function(e,t){x$=wr(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&gq(e,t),pA!==null&&pA(e,t)};var Xo=ts(null);function F1(){var e=Xo.current;return e!==null?e:ot.pooledCache}function Np(e,t){t===null?ft(Xo,Xo.current):ft(Xo,t.pool)}function cI(){var e=F1();return e===null?null:{parent:Ut._currentValue,pool:e}}var Vu=Error(P(460)),P1=Error(P(474)),yb=Error(P(542)),Eg={then:function(){}};function gA(e){return e=e.status,e==="fulfilled"||e==="rejected"}function uI(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Ts,Ts),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,bA(e),e;default:if(typeof t.status=="string")t.then(Ts,Ts);else{if(e=ot,e!==null&&100<e.shellSuspendCounter)throw Error(P(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=r}},function(r){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,bA(e),e}throw Wo=t,Vu}}function $o(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Wo=n,Vu):n}}var Wo=null;function yA(){if(Wo===null)throw Error(P(459));var e=Wo;return Wo=null,e}function bA(e){if(e===Vu||e===yb)throw Error(P(483))}var Uc=null,Zd=0;function Gm(e){var t=Zd;return Zd+=1,Uc===null&&(Uc=[]),uI(Uc,e,t)}function Df(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ym(e,t){throw t.$$typeof===r9?Error(P(525)):(e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function fI(e){function t(m,y){if(e){var v=m.deletions;v===null?(m.deletions=[y],m.flags|=16):v.push(y)}}function n(m,y){if(!e)return null;for(;y!==null;)t(m,y),y=y.sibling;return null}function r(m){for(var y=new Map;m!==null;)m.key!==null?y.set(m.key,m):y.set(m.index,m),m=m.sibling;return y}function i(m,y){return m=Ds(m,y),m.index=0,m.sibling=null,m}function s(m,y,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<y?(m.flags|=67108866,y):v):(m.flags|=67108866,y)):(m.flags|=1048576,y)}function a(m){return e&&m.alternate===null&&(m.flags|=67108866),m}function o(m,y,v,_){return y===null||y.tag!==6?(y=kS(v,m.mode,_),y.return=m,y):(y=i(y,v),y.return=m,y)}function l(m,y,v,_){var C=v.type;return C===vc?f(m,y,v.props.children,_,v.key):y!==null&&(y.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===da&&$o(C)===y.type)?(y=i(y,v.props),Df(y,v),y.return=m,y):(y=Mp(v.type,v.key,v.props,null,m.mode,_),Df(y,v),y.return=m,y)}function c(m,y,v,_){return y===null||y.tag!==4||y.stateNode.containerInfo!==v.containerInfo||y.stateNode.implementation!==v.implementation?(y=ES(v,m.mode,_),y.return=m,y):(y=i(y,v.children||[]),y.return=m,y)}function f(m,y,v,_,C){return y===null||y.tag!==7?(y=Qo(v,m.mode,_,C),y.return=m,y):(y=i(y,v),y.return=m,y)}function u(m,y,v){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=kS(""+y,m.mode,v),y.return=m,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Pm:return v=Mp(y.type,y.key,y.props,null,m.mode,v),Df(v,y),v.return=m,v;case Wf:return y=ES(y,m.mode,v),y.return=m,y;case da:return y=$o(y),u(m,y,v)}if(Zf(y)||Rf(y))return y=Qo(y,m.mode,v,null),y.return=m,y;if(typeof y.then=="function")return u(m,Gm(y),v);if(y.$$typeof===Cs)return u(m,Km(m,y),v);Ym(m,y)}return null}function d(m,y,v,_){var C=y!==null?y.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return C!==null?null:o(m,y,""+v,_);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Pm:return v.key===C?l(m,y,v,_):null;case Wf:return v.key===C?c(m,y,v,_):null;case da:return v=$o(v),d(m,y,v,_)}if(Zf(v)||Rf(v))return C!==null?null:f(m,y,v,_,null);if(typeof v.then=="function")return d(m,y,Gm(v),_);if(v.$$typeof===Cs)return d(m,y,Km(m,v),_);Ym(m,v)}return null}function h(m,y,v,_,C){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return m=m.get(v)||null,o(y,m,""+_,C);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Pm:return m=m.get(_.key===null?v:_.key)||null,l(y,m,_,C);case Wf:return m=m.get(_.key===null?v:_.key)||null,c(y,m,_,C);case da:return _=$o(_),h(m,y,v,_,C)}if(Zf(_)||Rf(_))return m=m.get(v)||null,f(y,m,_,C,null);if(typeof _.then=="function")return h(m,y,v,Gm(_),C);if(_.$$typeof===Cs)return h(m,y,v,Km(y,_),C);Ym(y,_)}return null}function p(m,y,v,_){for(var C=null,k=null,A=y,N=y=0,D=null;A!==null&&N<v.length;N++){A.index>N?(D=A,A=null):D=A.sibling;var M=d(m,A,v[N],_);if(M===null){A===null&&(A=D);break}e&&A&&M.alternate===null&&t(m,A),y=s(M,y,N),k===null?C=M:k.sibling=M,k=M,A=D}if(N===v.length)return n(m,A),Fe&&ws(m,N),C;if(A===null){for(;N<v.length;N++)A=u(m,v[N],_),A!==null&&(y=s(A,y,N),k===null?C=A:k.sibling=A,k=A);return Fe&&ws(m,N),C}for(A=r(A);N<v.length;N++)D=h(A,m,N,v[N],_),D!==null&&(e&&D.alternate!==null&&A.delete(D.key===null?N:D.key),y=s(D,y,N),k===null?C=D:k.sibling=D,k=D);return e&&A.forEach(function($){return t(m,$)}),Fe&&ws(m,N),C}function b(m,y,v,_){if(v==null)throw Error(P(151));for(var C=null,k=null,A=y,N=y=0,D=null,M=v.next();A!==null&&!M.done;N++,M=v.next()){A.index>N?(D=A,A=null):D=A.sibling;var $=d(m,A,M.value,_);if($===null){A===null&&(A=D);break}e&&A&&$.alternate===null&&t(m,A),y=s($,y,N),k===null?C=$:k.sibling=$,k=$,A=D}if(M.done)return n(m,A),Fe&&ws(m,N),C;if(A===null){for(;!M.done;N++,M=v.next())M=u(m,M.value,_),M!==null&&(y=s(M,y,N),k===null?C=M:k.sibling=M,k=M);return Fe&&ws(m,N),C}for(A=r(A);!M.done;N++,M=v.next())M=h(A,m,N,M.value,_),M!==null&&(e&&M.alternate!==null&&A.delete(M.key===null?N:M.key),y=s(M,y,N),k===null?C=M:k.sibling=M,k=M);return e&&A.forEach(function(L){return t(m,L)}),Fe&&ws(m,N),C}function S(m,y,v,_){if(typeof v=="object"&&v!==null&&v.type===vc&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Pm:e:{for(var C=v.key;y!==null;){if(y.key===C){if(C=v.type,C===vc){if(y.tag===7){n(m,y.sibling),_=i(y,v.props.children),_.return=m,m=_;break e}}else if(y.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===da&&$o(C)===y.type){n(m,y.sibling),_=i(y,v.props),Df(_,v),_.return=m,m=_;break e}n(m,y);break}else t(m,y);y=y.sibling}v.type===vc?(_=Qo(v.props.children,m.mode,_,v.key),_.return=m,m=_):(_=Mp(v.type,v.key,v.props,null,m.mode,_),Df(_,v),_.return=m,m=_)}return a(m);case Wf:e:{for(C=v.key;y!==null;){if(y.key===C)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){n(m,y.sibling),_=i(y,v.children||[]),_.return=m,m=_;break e}else{n(m,y);break}else t(m,y);y=y.sibling}_=ES(v,m.mode,_),_.return=m,m=_}return a(m);case da:return v=$o(v),S(m,y,v,_)}if(Zf(v))return p(m,y,v,_);if(Rf(v)){if(C=Rf(v),typeof C!="function")throw Error(P(150));return v=C.call(v),b(m,y,v,_)}if(typeof v.then=="function")return S(m,y,Gm(v),_);if(v.$$typeof===Cs)return S(m,y,Km(m,v),_);Ym(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,y!==null&&y.tag===6?(n(m,y.sibling),_=i(y,v),_.return=m,m=_):(n(m,y),_=kS(v,m.mode,_),_.return=m,m=_),a(m)):n(m,y)}return function(m,y,v,_){try{Zd=0;var C=S(m,y,v,_);return Uc=null,C}catch(A){if(A===Vu||A===yb)throw A;var k=yr(29,A,null,m.mode);return k.lanes=_,k.return=m,k}finally{}}}var ll=fI(!0),dI=fI(!1),ha=!1;function U1(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Dw(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 Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ma(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ke&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=xg(e),rI(e,null,n),t}return gb(e,r,t,n),xg(e)}function bd(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Rz(e,n)}}function TS(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?i=s=a:s=s.next=a,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var zw=!1;function vd(){if(zw){var e=Pc;if(e!==null)throw e}}function Sd(e,t,n,r){zw=!1;var i=e.updateQueue;ha=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var l=o,c=l.next;l.next=null,a===null?s=c:a.next=c,a=l;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==a&&(o===null?f.firstBaseUpdate=c:o.next=c,f.lastBaseUpdate=l))}if(s!==null){var u=i.baseState;a=0,f=c=l=null,o=s;do{var d=o.lane&-536870913,h=d!==o.lane;if(h?(Ie&d)===d:(r&d)===d){d!==0&&d===ou&&(zw=!0),f!==null&&(f=f.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var p=e,b=o;d=t;var S=n;switch(b.tag){case 1:if(p=b.payload,typeof p=="function"){u=p.call(S,u,d);break e}u=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=b.payload,d=typeof p=="function"?p.call(S,u,d):p,d==null)break e;u=vt({},u,d);break e;case 2:ha=!0}}d=o.callback,d!==null&&(e.flags|=64,h&&(e.flags|=8192),h=i.callbacks,h===null?i.callbacks=[d]:h.push(d))}else h={lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(c=f=h,l=u):f=f.next=h,a|=d;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;h=o,o=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);f===null&&(l=u),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=f,s===null&&(i.shared.lanes=0),Xa|=a,e.lanes=a,e.memoizedState=u}}function hI(e,t){if(typeof e!="function")throw Error(P(191,e));e.call(t)}function mI(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)hI(n[e],t)}var lu=ts(null),Cg=ts(0);function vA(e,t){e=Bs,ft(Cg,e),ft(lu,t),Bs=e|t.baseLanes}function Iw(){ft(Cg,Bs),ft(lu,lu.current)}function B1(){Bs=Cg.current,cn(lu),cn(Cg)}var Mr=ts(null),Jr=null;function ga(e){var t=e.alternate;ft(Mt,Mt.current&1),ft(Mr,e),Jr===null&&(t===null||lu.current!==null||t.memoizedState!==null)&&(Jr=e)}function $w(e){ft(Mt,Mt.current),ft(Mr,e),Jr===null&&(Jr=e)}function pI(e){e.tag===22?(ft(Mt,Mt.current),ft(Mr,e),Jr===null&&(Jr=e)):ya()}function ya(){ft(Mt,Mt.current),ft(Mr,Mr.current)}function mr(e){cn(Mr),Jr===e&&(Jr=null),cn(Mt)}var Mt=ts(0);function Tg(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||tx(n)||nx(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){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 Fs=0,Ee=null,rt=null,jt=null,Ag=!1,Bc=!1,cl=!1,Og=0,eh=0,Hc=null,bq=0;function xt(){throw Error(P(321))}function H1(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Rr(e[n],t[n]))return!1;return!0}function q1(e,t,n,r,i,s){return Fs=s,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ye.H=e===null||e.memoizedState===null?KI:tk,cl=!1,s=n(r,i),cl=!1,Bc&&(s=yI(t,n,r,i)),gI(e),s}function gI(e){ye.H=th;var t=rt!==null&&rt.next!==null;if(Fs=0,jt=rt=Ee=null,Ag=!1,eh=0,Hc=null,t)throw Error(P(300));e===null||qt||(e=e.dependencies,e!==null&&kg(e)&&(qt=!0))}function yI(e,t,n,r){Ee=e;var i=0;do{if(Bc&&(Hc=null),eh=0,Bc=!1,25<=i)throw Error(P(301));if(i+=1,jt=rt=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}ye.H=GI,s=t(n,r)}while(Bc);return s}function vq(){var e=ye.H,t=e.useState()[0];return t=typeof t.then=="function"?Vh(t):t,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(Ee.flags|=1024),t}function V1(){var e=Og!==0;return Og=0,e}function K1(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function G1(e){if(Ag){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ag=!1}Fs=0,jt=rt=Ee=null,Bc=!1,eh=Og=0,Hc=null}function $n(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?Ee.memoizedState=jt=e:jt=jt.next=e,jt}function Nt(){if(rt===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=jt===null?Ee.memoizedState:jt.next;if(t!==null)jt=t,rt=e;else{if(e===null)throw Ee.alternate===null?Error(P(467)):Error(P(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},jt===null?Ee.memoizedState=jt=e:jt=jt.next=e}return jt}function bb(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Vh(e){var t=eh;return eh+=1,Hc===null&&(Hc=[]),e=uI(Hc,e,t),t=Ee,(jt===null?t.memoizedState:jt.next)===null&&(t=t.alternate,ye.H=t===null||t.memoizedState===null?KI:tk),e}function vb(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Vh(e);if(e.$$typeof===Cs)return xn(e)}throw Error(P(438,String(e)))}function Y1(e){var t=null,n=Ee.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Ee.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=bb(),Ee.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]=i9;return t.index++,n}function Ps(e,t){return typeof t=="function"?t(e):t}function Dp(e){var t=Nt();return J1(t,rt,e)}function J1(e,t,n){var r=e.queue;if(r===null)throw Error(P(311));r.lastRenderedReducer=n;var i=e.baseQueue,s=r.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}t.baseQueue=i=s,r.pending=null}if(s=e.baseState,i===null)e.memoizedState=s;else{t=i.next;var o=a=null,l=null,c=t,f=!1;do{var u=c.lane&-536870913;if(u!==c.lane?(Ie&u)===u:(Fs&u)===u){var d=c.revertLane;if(d===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),u===ou&&(f=!0);else if((Fs&d)===d){c=c.next,d===ou&&(f=!0);continue}else u={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(o=l=u,a=s):l=l.next=u,Ee.lanes|=d,Xa|=d;u=c.action,cl&&n(s,u),s=c.hasEagerState?c.eagerState:n(s,u)}else d={lane:u,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(o=l=d,a=s):l=l.next=d,Ee.lanes|=u,Xa|=u;c=c.next}while(c!==null&&c!==t);if(l===null?a=s:l.next=o,!Rr(s,e.memoizedState)&&(qt=!0,f&&(n=Pc,n!==null)))throw n;e.memoizedState=s,e.baseState=a,e.baseQueue=l,r.lastRenderedState=s}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function AS(e){var t=Nt(),n=t.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do s=e(s,a.action),a=a.next;while(a!==i);Rr(s,t.memoizedState)||(qt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function bI(e,t,n){var r=Ee,i=Nt(),s=Fe;if(s){if(n===void 0)throw Error(P(407));n=n()}else n=t();var a=!Rr((rt||i).memoizedState,n);if(a&&(i.memoizedState=n,qt=!0),i=i.queue,Q1(wI.bind(null,r,i,e),[e]),i.getSnapshot!==t||a||jt!==null&&jt.memoizedState.tag&1){if(r.flags|=2048,cu(9,{destroy:void 0},SI.bind(null,r,i,n,t),null),ot===null)throw Error(P(349));s||Fs&127||vI(r,t,n)}return n}function vI(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ee.updateQueue,t===null?(t=bb(),Ee.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function SI(e,t,n,r){t.value=n,t.getSnapshot=r,xI(t)&&_I(e)}function wI(e,t,n){return n(function(){xI(t)&&_I(e)})}function xI(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rr(e,n)}catch{return!0}}function _I(e){var t=Il(e,2);t!==null&&rr(t,e,2)}function Lw(e){var t=$n();if(typeof e=="function"){var n=e;if(e=n(),cl){va(!0);try{n()}finally{va(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ps,lastRenderedState:e},t}function kI(e,t,n,r){return e.baseState=n,J1(e,rt,typeof r=="function"?r:Ps)}function Sq(e,t,n,r,i){if(wb(e))throw Error(P(485));if(e=t.action,e!==null){var s={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(a){s.listeners.push(a)}};ye.T!==null?n(!0):s.isTransition=!1,r(s),n=t.pending,n===null?(s.next=t.pending=s,EI(t,s)):(s.next=n.next,t.pending=n.next=s)}}function EI(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var s=ye.T,a={};ye.T=a;try{var o=n(i,r),l=ye.S;l!==null&&l(a,o),SA(e,t,o)}catch(c){jw(e,t,c)}finally{s!==null&&a.types!==null&&(s.types=a.types),ye.T=s}}else try{s=n(i,r),SA(e,t,s)}catch(c){jw(e,t,c)}}function SA(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){wA(e,t,r)},function(r){return jw(e,t,r)}):wA(e,t,n)}function wA(e,t,n){t.status="fulfilled",t.value=n,CI(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,EI(e,n)))}function jw(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,CI(t),t=t.next;while(t!==r)}e.action=null}function CI(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function TI(e,t){return t}function xA(e,t){if(Fe){var n=ot.formState;if(n!==null){e:{var r=Ee;if(Fe){if(pt){t:{for(var i=pt,s=Kr;i.nodeType!==8;){if(!s){i=null;break t}if(i=Qr(i.nextSibling),i===null){i=null;break t}}s=i.data,i=s==="F!"||s==="F"?i:null}if(i){pt=Qr(i.nextSibling),r=i.data==="F!";break e}}Ja(r)}r=!1}r&&(t=n[0])}}return n=$n(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:TI,lastRenderedState:t},n.queue=r,n=HI.bind(null,Ee,r),r.dispatch=n,r=Lw(!1),s=ek.bind(null,Ee,!1,r.queue),r=$n(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Sq.bind(null,Ee,i,s,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function _A(e){var t=Nt();return AI(t,rt,e)}function AI(e,t,n){if(t=J1(e,t,TI)[0],e=Dp(Ps)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=Vh(t)}catch(a){throw a===Vu?yb:a}else r=t;t=Nt();var i=t.queue,s=i.dispatch;return n!==t.memoizedState&&(Ee.flags|=2048,cu(9,{destroy:void 0},wq.bind(null,i,n),null)),[r,s,e]}function wq(e,t){e.action=t}function kA(e){var t=Nt(),n=rt;if(n!==null)return AI(t,n,e);Nt(),t=t.memoizedState,n=Nt();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function cu(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=bb(),Ee.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 OI(){return Nt().memoizedState}function zp(e,t,n,r){var i=$n();Ee.flags|=e,i.memoizedState=cu(1|t,{destroy:void 0},n,r===void 0?null:r)}function Sb(e,t,n,r){var i=Nt();r=r===void 0?null:r;var s=i.memoizedState.inst;rt!==null&&r!==null&&H1(r,rt.memoizedState.deps)?i.memoizedState=cu(t,s,n,r):(Ee.flags|=e,i.memoizedState=cu(1|t,s,n,r))}function EA(e,t){zp(8390656,8,e,t)}function Q1(e,t){Sb(2048,8,e,t)}function xq(e){Ee.flags|=4;var t=Ee.updateQueue;if(t===null)t=bb(),Ee.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function RI(e){var t=Nt().memoizedState;return xq({ref:t,nextImpl:e}),function(){if(Ke&2)throw Error(P(440));return t.impl.apply(void 0,arguments)}}function MI(e,t){return Sb(4,2,e,t)}function NI(e,t){return Sb(4,4,e,t)}function DI(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 zI(e,t,n){n=n!=null?n.concat([e]):null,Sb(4,4,DI.bind(null,t,e),n)}function X1(){}function II(e,t){var n=Nt();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&H1(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function $I(e,t){var n=Nt();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&H1(t,r[1]))return r[0];if(r=e(),cl){va(!0);try{e()}finally{va(!1)}}return n.memoizedState=[r,t],r}function W1(e,t,n){return n===void 0||Fs&1073741824&&!(Ie&261930)?e.memoizedState=t:(e.memoizedState=n,e=k$(),Ee.lanes|=e,Xa|=e,n)}function LI(e,t,n,r){return Rr(n,t)?n:lu.current!==null?(e=W1(e,n,r),Rr(e,t)||(qt=!0),e):!(Fs&42)||Fs&1073741824&&!(Ie&261930)?(qt=!0,e.memoizedState=n):(e=k$(),Ee.lanes|=e,Xa|=e,t)}function jI(e,t,n,r,i){var s=Ge.p;Ge.p=s!==0&&8>s?s:8;var a=ye.T,o={};ye.T=o,ek(e,!1,t,n);try{var l=i(),c=ye.S;if(c!==null&&c(o,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var f=yq(l,r);wd(e,t,f,kr(e))}else wd(e,t,r,kr(e))}catch(u){wd(e,t,{then:function(){},status:"rejected",reason:u},kr())}finally{Ge.p=s,a!==null&&o.types!==null&&(a.types=o.types),ye.T=a}}function _q(){}function Fw(e,t,n,r){if(e.tag!==5)throw Error(P(476));var i=FI(e).queue;jI(e,i,t,Jo,n===null?_q:function(){return PI(e),n(r)})}function FI(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Jo,baseState:Jo,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ps,lastRenderedState:Jo},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ps,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function PI(e){var t=FI(e);t.next===null&&(t=e.alternate.memoizedState),wd(e,t.next.queue,{},kr())}function Z1(){return xn(ih)}function UI(){return Nt().memoizedState}function BI(){return Nt().memoizedState}function kq(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=kr();e=Ra(n);var r=Ma(t,e,n);r!==null&&(rr(r,t,n),bd(r,t,n)),t={cache:j1()},e.payload=t;return}t=t.return}}function Eq(e,t,n){var r=kr();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},wb(e)?qI(t,n):(n=z1(e,t,n,r),n!==null&&(rr(n,e,r),VI(n,t,r)))}function HI(e,t,n){var r=kr();wd(e,t,n,r)}function wd(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(wb(e))qI(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,o=s(a,n);if(i.hasEagerState=!0,i.eagerState=o,Rr(o,a))return gb(e,t,i,0),ot===null&&pb(),!1}catch{}finally{}if(n=z1(e,t,i,r),n!==null)return rr(n,e,r),VI(n,t,r),!0}return!1}function ek(e,t,n,r){if(r={lane:2,revertLane:ck(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},wb(e)){if(t)throw Error(P(479))}else t=z1(e,n,r,2),t!==null&&rr(t,e,2)}function wb(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function qI(e,t){Bc=Ag=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function VI(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Rz(e,n)}}var th={readContext:xn,use:vb,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useLayoutEffect:xt,useInsertionEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useSyncExternalStore:xt,useId:xt,useHostTransitionStatus:xt,useFormState:xt,useActionState:xt,useOptimistic:xt,useMemoCache:xt,useCacheRefresh:xt};th.useEffectEvent=xt;var KI={readContext:xn,use:vb,useCallback:function(e,t){return $n().memoizedState=[e,t===void 0?null:t],e},useContext:xn,useEffect:EA,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,zp(4194308,4,DI.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zp(4194308,4,e,t)},useInsertionEffect:function(e,t){zp(4,2,e,t)},useMemo:function(e,t){var n=$n();t=t===void 0?null:t;var r=e();if(cl){va(!0);try{e()}finally{va(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=$n();if(n!==void 0){var i=n(t);if(cl){va(!0);try{n(t)}finally{va(!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=Eq.bind(null,Ee,e),[r.memoizedState,e]},useRef:function(e){var t=$n();return e={current:e},t.memoizedState=e},useState:function(e){e=Lw(e);var t=e.queue,n=HI.bind(null,Ee,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:X1,useDeferredValue:function(e,t){var n=$n();return W1(n,e,t)},useTransition:function(){var e=Lw(!1);return e=jI.bind(null,Ee,e.queue,!0,!1),$n().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Ee,i=$n();if(Fe){if(n===void 0)throw Error(P(407));n=n()}else{if(n=t(),ot===null)throw Error(P(349));Ie&127||vI(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,EA(wI.bind(null,r,s,e),[e]),r.flags|=2048,cu(9,{destroy:void 0},SI.bind(null,r,s,n,t),null),n},useId:function(){var e=$n(),t=ot.identifierPrefix;if(Fe){var n=Li,r=$i;n=(r&~(1<<32-_r(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Og++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=bq++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Z1,useFormState:xA,useActionState:xA,useOptimistic:function(e){var t=$n();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ek.bind(null,Ee,!0,n),n.dispatch=t,[e,t]},useMemoCache:Y1,useCacheRefresh:function(){return $n().memoizedState=kq.bind(null,Ee)},useEffectEvent:function(e){var t=$n(),n={impl:e};return t.memoizedState=n,function(){if(Ke&2)throw Error(P(440));return n.impl.apply(void 0,arguments)}}},tk={readContext:xn,use:vb,useCallback:II,useContext:xn,useEffect:Q1,useImperativeHandle:zI,useInsertionEffect:MI,useLayoutEffect:NI,useMemo:$I,useReducer:Dp,useRef:OI,useState:function(){return Dp(Ps)},useDebugValue:X1,useDeferredValue:function(e,t){var n=Nt();return LI(n,rt.memoizedState,e,t)},useTransition:function(){var e=Dp(Ps)[0],t=Nt().memoizedState;return[typeof e=="boolean"?e:Vh(e),t]},useSyncExternalStore:bI,useId:UI,useHostTransitionStatus:Z1,useFormState:_A,useActionState:_A,useOptimistic:function(e,t){var n=Nt();return kI(n,rt,e,t)},useMemoCache:Y1,useCacheRefresh:BI};tk.useEffectEvent=RI;var GI={readContext:xn,use:vb,useCallback:II,useContext:xn,useEffect:Q1,useImperativeHandle:zI,useInsertionEffect:MI,useLayoutEffect:NI,useMemo:$I,useReducer:AS,useRef:OI,useState:function(){return AS(Ps)},useDebugValue:X1,useDeferredValue:function(e,t){var n=Nt();return rt===null?W1(n,e,t):LI(n,rt.memoizedState,e,t)},useTransition:function(){var e=AS(Ps)[0],t=Nt().memoizedState;return[typeof e=="boolean"?e:Vh(e),t]},useSyncExternalStore:bI,useId:UI,useHostTransitionStatus:Z1,useFormState:kA,useActionState:kA,useOptimistic:function(e,t){var n=Nt();return rt!==null?kI(n,rt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Y1,useCacheRefresh:BI};GI.useEffectEvent=RI;function OS(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:vt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Pw={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=kr(),i=Ra(r);i.payload=t,n!=null&&(i.callback=n),t=Ma(e,i,r),t!==null&&(rr(t,e,r),bd(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=kr(),i=Ra(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ma(e,i,r),t!==null&&(rr(t,e,r),bd(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=kr(),r=Ra(n);r.tag=2,t!=null&&(r.callback=t),t=Ma(e,r,n),t!==null&&(rr(t,e,n),bd(t,e,n))}};function CA(e,t,n,r,i,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,a):t.prototype&&t.prototype.isPureReactComponent?!Qd(n,r)||!Qd(i,s):!0}function TA(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&&Pw.enqueueReplaceState(t,t.state,null)}function ul(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=vt({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function YI(e){wg(e)}function JI(e){console.error(e)}function QI(e){wg(e)}function Rg(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function AA(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function Uw(e,t,n){return n=Ra(n),n.tag=3,n.payload={element:null},n.callback=function(){Rg(e,t)},n}function XI(e){return e=Ra(e),e.tag=3,e}function WI(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var s=r.value;e.payload=function(){return i(s)},e.callback=function(){AA(t,n,r)}}var a=n.stateNode;a!==null&&typeof a.componentDidCatch=="function"&&(e.callback=function(){AA(t,n,r),typeof i!="function"&&(Na===null?Na=new Set([this]):Na.add(this));var o=r.stack;this.componentDidCatch(r.value,{componentStack:o!==null?o:""})})}function Cq(e,t,n,r,i){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&qu(t,n,i,!0),n=Mr.current,n!==null){switch(n.tag){case 31:case 13:return Jr===null?Ig():n.alternate===null&&kt===0&&(kt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Eg?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),PS(e,r,i)),!1;case 22:return n.flags|=65536,r===Eg?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)),PS(e,r,i)),!1}throw Error(P(435,n.tag))}return PS(e,r,i),Ig(),!1}if(Fe)return t=Mr.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Aw&&(e=Error(P(422),{cause:r}),Wd(Vr(e,n)))):(r!==Aw&&(t=Error(P(423),{cause:r}),Wd(Vr(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Vr(r,n),i=Uw(e.stateNode,r,i),TS(e,i),kt!==4&&(kt=2)),!1;var s=Error(P(520),{cause:r});if(s=Vr(s,n),kd===null?kd=[s]:kd.push(s),kt!==4&&(kt=2),t===null)return!0;r=Vr(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Uw(n.stateNode,r,e),TS(n,e),!1;case 1:if(t=n.type,s=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(Na===null||!Na.has(s))))return n.flags|=65536,i&=-i,n.lanes|=i,i=XI(i),WI(i,e,n,r),TS(n,i),!1}n=n.return}while(n!==null);return!1}var nk=Error(P(461)),qt=!1;function hn(e,t,n,r){t.child=e===null?dI(t,null,n,r):ll(t,e.child,n,r)}function OA(e,t,n,r,i){n=n.render;var s=t.ref;if("ref"in r){var a={};for(var o in r)o!=="ref"&&(a[o]=r[o])}else a=r;return ol(t),r=q1(e,t,n,a,s,i),o=V1(),e!==null&&!qt?(K1(e,t,i),Us(e,t,i)):(Fe&&o&&$1(t),t.flags|=1,hn(e,t,r,i),t.child)}function RA(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!I1(s)&&s.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=s,ZI(e,t,s,r,i)):(e=Mp(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!rk(e,i)){var a=s.memoizedProps;if(n=n.compare,n=n!==null?n:Qd,n(a,r)&&e.ref===t.ref)return Us(e,t,i)}return t.flags|=1,e=Ds(s,r),e.ref=t.ref,e.return=t,t.child=e}function ZI(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Qd(s,r)&&e.ref===t.ref)if(qt=!1,t.pendingProps=r=s,rk(e,i))e.flags&131072&&(qt=!0);else return t.lanes=e.lanes,Us(e,t,i)}return Bw(e,t,n,r,i)}function e$(e,t,n,r){var i=r.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if(t.flags&128){if(s=s!==null?s.baseLanes|n:n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~s}else r=0,t.child=null;return MA(e,t,s,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Np(t,s!==null?s.cachePool:null),s!==null?vA(t,s):Iw(),pI(t);else return r=t.lanes=536870912,MA(e,t,s!==null?s.baseLanes|n:n,n,r)}else s!==null?(Np(t,s.cachePool),vA(t,s),ya(),t.memoizedState=null):(e!==null&&Np(t,null),Iw(),ya());return hn(e,t,i,n),t.child}function td(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function MA(e,t,n,r,i){var s=F1();return s=s===null?null:{parent:Ut._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&Np(t,null),Iw(),pI(t),e!==null&&qu(e,t,r,!0),t.childLanes=i,null}function Ip(e,t){return t=Mg({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function NA(e,t,n){return ll(t,e.child,null,n),e=Ip(t,t.pendingProps),e.flags|=2,mr(t),t.memoizedState=null,e}function Tq(e,t,n){var r=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Fe){if(r.mode==="hidden")return e=Ip(t,r),t.lanes=536870912,td(null,e);if($w(t),(e=pt)?(e=K$(e,Kr),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ya!==null?{id:$i,overflow:Li}:null,retryLane:536870912,hydrationErrors:null},n=sI(e),n.return=t,t.child=n,vn=t,pt=null)):e=null,e===null)throw Ja(t);return t.lanes=536870912,null}return Ip(t,r)}var s=e.memoizedState;if(s!==null){var a=s.dehydrated;if($w(t),i)if(t.flags&256)t.flags&=-257,t=NA(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(P(558));else if(qt||qu(e,t,n,!1),i=(n&e.childLanes)!==0,qt||i){if(r=ot,r!==null&&(a=Mz(r,n),a!==0&&a!==s.retryLane))throw s.retryLane=a,Il(e,a),rr(r,e,a),nk;Ig(),t=NA(e,t,n)}else e=s.treeContext,pt=Qr(a.nextSibling),vn=t,Fe=!0,Oa=null,Kr=!1,e!==null&&oI(t,e),t=Ip(t,r),t.flags|=4096;return t}return e=Ds(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function $p(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(P(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Bw(e,t,n,r,i){return ol(t),n=q1(e,t,n,r,void 0,i),r=V1(),e!==null&&!qt?(K1(e,t,i),Us(e,t,i)):(Fe&&r&&$1(t),t.flags|=1,hn(e,t,n,i),t.child)}function DA(e,t,n,r,i,s){return ol(t),t.updateQueue=null,n=yI(t,r,n,i),gI(e),r=V1(),e!==null&&!qt?(K1(e,t,s),Us(e,t,s)):(Fe&&r&&$1(t),t.flags|=1,hn(e,t,n,s),t.child)}function zA(e,t,n,r,i){if(ol(t),t.stateNode===null){var s=Tc,a=n.contextType;typeof a=="object"&&a!==null&&(s=xn(a)),s=new n(r,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Pw,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=r,s.state=t.memoizedState,s.refs={},U1(t),a=n.contextType,s.context=typeof a=="object"&&a!==null?xn(a):Tc,s.state=t.memoizedState,a=n.getDerivedStateFromProps,typeof a=="function"&&(OS(t,n,a,r),s.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(a=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),a!==s.state&&Pw.enqueueReplaceState(s,s.state,null),Sd(t,r,s,i),vd(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){s=t.stateNode;var o=t.memoizedProps,l=ul(n,o);s.props=l;var c=s.context,f=n.contextType;a=Tc,typeof f=="object"&&f!==null&&(a=xn(f));var u=n.getDerivedStateFromProps;f=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o||c!==a)&&TA(t,s,r,a),ha=!1;var d=t.memoizedState;s.state=d,Sd(t,r,s,i),vd(),c=t.memoizedState,o||d!==c||ha?(typeof u=="function"&&(OS(t,n,u,r),c=t.memoizedState),(l=ha||CA(t,n,l,r,d,c,a))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=a,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Dw(e,t),a=t.memoizedProps,f=ul(n,a),s.props=f,u=t.pendingProps,d=s.context,c=n.contextType,l=Tc,typeof c=="object"&&c!==null&&(l=xn(c)),o=n.getDerivedStateFromProps,(c=typeof o=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==u||d!==l)&&TA(t,s,r,l),ha=!1,d=t.memoizedState,s.state=d,Sd(t,r,s,i),vd();var h=t.memoizedState;a!==u||d!==h||ha||e!==null&&e.dependencies!==null&&kg(e.dependencies)?(typeof o=="function"&&(OS(t,n,o,r),h=t.memoizedState),(f=ha||CA(t,n,f,r,d,h,l)||e!==null&&e.dependencies!==null&&kg(e.dependencies))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,h,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,h,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),s.props=r,s.state=h,s.context=l,r=f):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return s=r,$p(e,t),r=(t.flags&128)!==0,s||r?(s=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&r?(t.child=ll(t,e.child,null,i),t.child=ll(t,null,n,i)):hn(e,t,n,i),t.memoizedState=s.state,e=t.child):e=Us(e,t,i),e}function IA(e,t,n,r){return al(),t.flags|=256,hn(e,t,n,r),t.child}var RS={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function MS(e){return{baseLanes:e,cachePool:cI()}}function NS(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=vr),e}function t$(e,t,n){var r=t.pendingProps,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(Mt.current&2)!==0),a&&(i=!0,t.flags&=-129),a=(t.flags&32)!==0,t.flags&=-33,e===null){if(Fe){if(i?ga(t):ya(),(e=pt)?(e=K$(e,Kr),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ya!==null?{id:$i,overflow:Li}:null,retryLane:536870912,hydrationErrors:null},n=sI(e),n.return=t,t.child=n,vn=t,pt=null)):e=null,e===null)throw Ja(t);return nx(e)?t.lanes=32:t.lanes=536870912,null}var o=r.children;return r=r.fallback,i?(ya(),i=t.mode,o=Mg({mode:"hidden",children:o},i),r=Qo(r,i,n,null),o.return=t,r.return=t,o.sibling=r,t.child=o,r=t.child,r.memoizedState=MS(n),r.childLanes=NS(e,a,n),t.memoizedState=RS,td(null,r)):(ga(t),Hw(t,o))}var l=e.memoizedState;if(l!==null&&(o=l.dehydrated,o!==null)){if(s)t.flags&256?(ga(t),t.flags&=-257,t=DS(e,t,n)):t.memoizedState!==null?(ya(),t.child=e.child,t.flags|=128,t=null):(ya(),o=r.fallback,i=t.mode,r=Mg({mode:"visible",children:r.children},i),o=Qo(o,i,n,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,ll(t,e.child,null,n),r=t.child,r.memoizedState=MS(n),r.childLanes=NS(e,a,n),t.memoizedState=RS,t=td(null,r));else if(ga(t),nx(o)){if(a=o.nextSibling&&o.nextSibling.dataset,a)var c=a.dgst;a=c,r=Error(P(419)),r.stack="",r.digest=a,Wd({value:r,source:null,stack:null}),t=DS(e,t,n)}else if(qt||qu(e,t,n,!1),a=(n&e.childLanes)!==0,qt||a){if(a=ot,a!==null&&(r=Mz(a,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Il(e,r),rr(a,e,r),nk;tx(o)||Ig(),t=DS(e,t,n)}else tx(o)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,pt=Qr(o.nextSibling),vn=t,Fe=!0,Oa=null,Kr=!1,e!==null&&oI(t,e),t=Hw(t,r.children),t.flags|=4096);return t}return i?(ya(),o=r.fallback,i=t.mode,l=e.child,c=l.sibling,r=Ds(l,{mode:"hidden",children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,c!==null?o=Ds(c,o):(o=Qo(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,td(null,r),r=t.child,o=e.child.memoizedState,o===null?o=MS(n):(i=o.cachePool,i!==null?(l=Ut._currentValue,i=i.parent!==l?{parent:l,pool:l}:i):i=cI(),o={baseLanes:o.baseLanes|n,cachePool:i}),r.memoizedState=o,r.childLanes=NS(e,a,n),t.memoizedState=RS,td(e.child,r)):(ga(t),n=e.child,e=n.sibling,n=Ds(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(a=t.deletions,a===null?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=n,t.memoizedState=null,n)}function Hw(e,t){return t=Mg({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Mg(e,t){return e=yr(22,e,null,t),e.lanes=0,e}function DS(e,t,n){return ll(t,e.child,null,n),e=Hw(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $A(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Rw(e.return,t,n)}function zS(e,t,n,r,i,s){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:s}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.treeForkCount=s)}function n$(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;r=r.children;var a=Mt.current,o=(a&2)!==0;if(o?(a=a&1|2,t.flags|=128):a&=1,ft(Mt,a),hn(e,t,r,n),r=Fe?Xd:0,!o&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$A(e,n,t);else if(e.tag===19)$A(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Tg(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),zS(t,!1,i,n,s,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Tg(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}zS(t,!0,n,null,s,r);break;case"together":zS(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Us(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xa|=t.lanes,!(n&t.childLanes))if(e!==null){if(qu(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,n=Ds(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ds(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function rk(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&kg(e)))}function Aq(e,t,n){switch(t.tag){case 3:yg(t,t.stateNode.containerInfo),pa(t,Ut,e.memoizedState.cache),al();break;case 27:case 5:yw(t);break;case 4:yg(t,t.stateNode.containerInfo);break;case 10:pa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,$w(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(ga(t),t.flags|=128,null):n&t.child.childLanes?t$(e,t,n):(ga(t),e=Us(e,t,n),e!==null?e.sibling:null);ga(t);break;case 19:var i=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(qu(e,t,n,!1),r=(n&t.childLanes)!==0),i){if(r)return n$(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ft(Mt,Mt.current),r)break;return null;case 22:return t.lanes=0,e$(e,t,n,t.pendingProps);case 24:pa(t,Ut,e.memoizedState.cache)}return Us(e,t,n)}function r$(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)qt=!0;else{if(!rk(e,n)&&!(t.flags&128))return qt=!1,Aq(e,t,n);qt=!!(e.flags&131072)}else qt=!1,Fe&&t.flags&1048576&&aI(t,Xd,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=$o(t.elementType),t.type=e,typeof e=="function")I1(e)?(r=ul(e,r),t.tag=1,t=zA(null,t,e,r,n)):(t.tag=0,t=Bw(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===w1){t.tag=11,t=OA(null,t,e,r,n);break e}else if(i===x1){t.tag=14,t=RA(null,t,e,r,n);break e}}throw t=pw(e)||e,Error(P(306,t,""))}}return t;case 0:return Bw(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=ul(r,t.pendingProps),zA(e,t,r,i,n);case 3:e:{if(yg(t,t.stateNode.containerInfo),e===null)throw Error(P(387));r=t.pendingProps;var s=t.memoizedState;i=s.element,Dw(e,t),Sd(t,r,null,n);var a=t.memoizedState;if(r=a.cache,pa(t,Ut,r),r!==s.cache&&Mw(t,[Ut],n,!0),vd(),r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=IA(e,t,r,n);break e}else if(r!==i){i=Vr(Error(P(424)),t),Wd(i),t=IA(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(pt=Qr(e.firstChild),vn=t,Fe=!0,Oa=null,Kr=!0,n=dI(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(al(),r===i){t=Us(e,t,n);break e}hn(e,t,r,n)}t=t.child}return t;case 26:return $p(e,t),e===null?(n=nO(t.type,null,t.pendingProps,null))?t.memoizedState=n:Fe||(n=t.type,e=t.pendingProps,r=Fg(Aa.current).createElement(n),r[bn]=t,r[ir]=e,kn(r,n,e),ln(r),t.stateNode=r):t.memoizedState=nO(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return yw(t),e===null&&Fe&&(r=t.stateNode=G$(t.type,t.pendingProps,Aa.current),vn=t,Kr=!0,i=pt,ho(t.type)?(rx=i,pt=Qr(r.firstChild)):pt=i),hn(e,t,t.pendingProps.children,n),$p(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Fe&&((i=r=pt)&&(r=iV(r,t.type,t.pendingProps,Kr),r!==null?(t.stateNode=r,vn=t,pt=Qr(r.firstChild),Kr=!1,i=!0):i=!1),i||Ja(t)),yw(t),i=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,r=s.children,Zw(i,s)?r=null:a!==null&&Zw(i,a)&&(t.flags|=32),t.memoizedState!==null&&(i=q1(e,t,vq,null,null,n),ih._currentValue=i),$p(e,t),hn(e,t,r,n),t.child;case 6:return e===null&&Fe&&((e=n=pt)&&(n=sV(n,t.pendingProps,Kr),n!==null?(t.stateNode=n,vn=t,pt=null,e=!0):e=!1),e||Ja(t)),null;case 13:return t$(e,t,n);case 4:return yg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ll(t,null,r,n):hn(e,t,r,n),t.child;case 11:return OA(e,t,t.type,t.pendingProps,n);case 7:return hn(e,t,t.pendingProps,n),t.child;case 8:return hn(e,t,t.pendingProps.children,n),t.child;case 12:return hn(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,pa(t,t.type,r.value),hn(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,ol(t),i=xn(i),r=r(i),t.flags|=1,hn(e,t,r,n),t.child;case 14:return RA(e,t,t.type,t.pendingProps,n);case 15:return ZI(e,t,t.type,t.pendingProps,n);case 19:return n$(e,t,n);case 31:return Tq(e,t,n);case 22:return e$(e,t,n,t.pendingProps);case 24:return ol(t),r=xn(Ut),e===null?(i=F1(),i===null&&(i=ot,s=j1(),i.pooledCache=s,s.refCount++,s!==null&&(i.pooledCacheLanes|=n),i=s),t.memoizedState={parent:r,cache:i},U1(t),pa(t,Ut,i)):(e.lanes&n&&(Dw(e,t),Sd(t,null,null,n),vd()),i=e.memoizedState,s=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),pa(t,Ut,r)):(r=s.cache,pa(t,Ut,r),r!==i.cache&&Mw(t,[Ut],n,!0))),hn(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(P(156,t.tag))}function fs(e){e.flags|=4}function IS(e,t,n,r,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(T$())e.flags|=8192;else throw Wo=Eg,P1}else e.flags&=-16777217}function LA(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Q$(t))if(T$())e.flags|=8192;else throw Wo=Eg,P1}function Jm(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Az():536870912,e.lanes|=t,uu|=t)}function zf(e,t){if(!Fe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function mt(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&65011712,r|=i.flags&65011712,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 Oq(e,t,n){var r=t.pendingProps;switch(L1(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(t),null;case 1:return mt(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),zs(Ut),iu(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ql(t)?fs(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,CS())),mt(t),null;case 26:var i=t.type,s=t.memoizedState;return e===null?(fs(t),s!==null?(mt(t),LA(t,s)):(mt(t),IS(t,i,null,r,n))):s?s!==e.memoizedState?(fs(t),mt(t),LA(t,s)):(mt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&fs(t),mt(t),IS(t,i,e,r,n)),null;case 27:if(bg(t),n=Aa.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&fs(t);else{if(!r){if(t.stateNode===null)throw Error(P(166));return mt(t),null}e=Vi.current,Ql(t)?dA(t):(e=G$(i,r,n),t.stateNode=e,fs(t))}return mt(t),null;case 5:if(bg(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&fs(t);else{if(!r){if(t.stateNode===null)throw Error(P(166));return mt(t),null}if(s=Vi.current,Ql(t))dA(t);else{var a=Fg(Aa.current);switch(s){case 1:s=a.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:s=a.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":s=a.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":s=a.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":s=a.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof r.is=="string"?a.createElement("select",{is:r.is}):a.createElement("select"),r.multiple?s.multiple=!0:r.size&&(s.size=r.size);break;default:s=typeof r.is=="string"?a.createElement(i,{is:r.is}):a.createElement(i)}}s[bn]=t,s[ir]=r;e:for(a=t.child;a!==null;){if(a.tag===5||a.tag===6)s.appendChild(a.stateNode);else if(a.tag!==4&&a.tag!==27&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=s;e:switch(kn(s,i,r),i){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&fs(t)}}return mt(t),IS(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&fs(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(P(166));if(e=Aa.current,Ql(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=vn,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[bn]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||H$(e.nodeValue,n)),e||Ja(t,!0)}else e=Fg(e).createTextNode(r),e[bn]=t,t.stateNode=e}return mt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ql(t),n!==null){if(e===null){if(!r)throw Error(P(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(557));e[bn]=t}else al(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;mt(t),e=!1}else n=CS(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(mr(t),t):(mr(t),null);if(t.flags&128)throw Error(P(558))}return mt(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ql(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(P(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(P(317));i[bn]=t}else al(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;mt(t),i=!1}else i=CS(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(mr(t),t):(mr(t),null)}return mr(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),s=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),s!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Jm(t,t.updateQueue),mt(t),null);case 4:return iu(),e===null&&uk(t.stateNode.containerInfo),mt(t),null;case 10:return zs(t.type),mt(t),null;case 19:if(cn(Mt),r=t.memoizedState,r===null)return mt(t),null;if(i=(t.flags&128)!==0,s=r.rendering,s===null)if(i)zf(r,!1);else{if(kt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Tg(e),s!==null){for(t.flags|=128,zf(r,!1),e=s.updateQueue,t.updateQueue=e,Jm(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)iI(n,e),n=n.sibling;return ft(Mt,Mt.current&1|2),Fe&&ws(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&wr()>Dg&&(t.flags|=128,i=!0,zf(r,!1),t.lanes=4194304)}else{if(!i)if(e=Tg(s),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Jm(t,e),zf(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!Fe)return mt(t),null}else 2*wr()-r.renderingStartTime>Dg&&n!==536870912&&(t.flags|=128,i=!0,zf(r,!1),t.lanes=4194304);r.isBackwards?(s.sibling=t.child,t.child=s):(e=r.last,e!==null?e.sibling=s:t.child=s,r.last=s)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=wr(),e.sibling=null,n=Mt.current,ft(Mt,i?n&1|2:n&1),Fe&&ws(t,r.treeForkCount),e):(mt(t),null);case 22:case 23:return mr(t),B1(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(mt(t),t.subtreeFlags&6&&(t.flags|=8192)):mt(t),n=t.updateQueue,n!==null&&Jm(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&&cn(Xo),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),zs(Ut),mt(t),null;case 25:return null;case 30:return null}throw Error(P(156,t.tag))}function Rq(e,t){switch(L1(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zs(Ut),iu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return bg(t),null;case 31:if(t.memoizedState!==null){if(mr(t),t.alternate===null)throw Error(P(340));al()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mr(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));al()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return cn(Mt),null;case 4:return iu(),null;case 10:return zs(t.type),null;case 22:case 23:return mr(t),B1(),e!==null&&cn(Xo),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return zs(Ut),null;case 25:return null;default:return null}}function i$(e,t){switch(L1(t),t.tag){case 3:zs(Ut),iu();break;case 26:case 27:case 5:bg(t);break;case 4:iu();break;case 31:t.memoizedState!==null&&mr(t);break;case 13:mr(t);break;case 19:cn(Mt);break;case 10:zs(t.type);break;case 22:case 23:mr(t),B1(),e!==null&&cn(Xo);break;case 24:zs(Ut)}}function Kh(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var s=n.create,a=n.inst;r=s(),a.destroy=r}n=n.next}while(n!==i)}}catch(o){We(t,t.return,o)}}function Qa(e,t,n){try{var r=t.updateQueue,i=r!==null?r.lastEffect:null;if(i!==null){var s=i.next;r=s;do{if((r.tag&e)===e){var a=r.inst,o=a.destroy;if(o!==void 0){a.destroy=void 0,i=t;var l=n,c=o;try{c()}catch(f){We(i,l,f)}}}r=r.next}while(r!==s)}}catch(f){We(t,t.return,f)}}function s$(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{mI(t,n)}catch(r){We(e,e.return,r)}}}function a$(e,t,n){n.props=ul(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){We(e,t,r)}}function xd(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:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(i){We(e,t,i)}}function ji(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(i){We(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){We(e,t,i)}else n.current=null}function o$(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(i){We(e,e.return,i)}}function $S(e,t,n){try{var r=e.stateNode;Wq(r,e.type,n,t),r[ir]=t}catch(i){We(e,e.return,i)}}function l$(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ho(e.type)||e.tag===4}function LS(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||l$(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&&ho(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ts));else if(r!==4&&(r===27&&ho(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(qw(e,t,n),e=e.sibling;e!==null;)qw(e,t,n),e=e.sibling}function Ng(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ho(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Ng(e,t,n),e=e.sibling;e!==null;)Ng(e,t,n),e=e.sibling}function c$(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);kn(t,r,n),t[bn]=e,t[ir]=n}catch(s){We(e,e.return,s)}}var _s=!1,Ft=!1,jS=!1,jA=typeof WeakSet=="function"?WeakSet:Set,on=null;function Mq(e,t){if(e=e.containerInfo,Xw=Hg,e=Qz(e),N1(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,o=-1,l=-1,c=0,f=0,u=e,d=null;t:for(;;){for(var h;u!==n||i!==0&&u.nodeType!==3||(o=a+i),u!==s||r!==0&&u.nodeType!==3||(l=a+r),u.nodeType===3&&(a+=u.nodeValue.length),(h=u.firstChild)!==null;)d=u,u=h;for(;;){if(u===e)break t;if(d===n&&++c===i&&(o=a),d===s&&++f===r&&(l=a),(h=u.nextSibling)!==null)break;u=d,d=u.parentNode}u=h}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ww={focusedElem:e,selectionRange:n},Hg=!1,on=t;on!==null;)if(t=on,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,on=e;else for(;on!==null;){switch(t=on,s=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&s!==null){e=void 0,n=t,i=s.memoizedProps,s=s.memoizedState,r=n.stateNode;try{var p=ul(n.type,i);e=r.getSnapshotBeforeUpdate(p,s),r.__reactInternalSnapshotBeforeUpdate=e}catch(b){We(n,n.return,b)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ex(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ex(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(P(163))}if(e=t.sibling,e!==null){e.return=t.return,on=e;break}on=t.return}}function u$(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:hs(e,n),r&4&&Kh(5,n);break;case 1:if(hs(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(a){We(n,n.return,a)}else{var i=ul(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(a){We(n,n.return,a)}}r&64&&s$(n),r&512&&xd(n,n.return);break;case 3:if(hs(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{mI(e,t)}catch(a){We(n,n.return,a)}}break;case 27:t===null&&r&4&&c$(n);case 26:case 5:hs(e,n),t===null&&r&4&&o$(n),r&512&&xd(n,n.return);break;case 12:hs(e,n);break;case 31:hs(e,n),r&4&&h$(e,n);break;case 13:hs(e,n),r&4&&m$(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Pq.bind(null,n),aV(e,n))));break;case 22:if(r=n.memoizedState!==null||_s,!r){t=t!==null&&t.memoizedState!==null||Ft,i=_s;var s=Ft;_s=r,(Ft=t)&&!s?ys(e,n,(n.subtreeFlags&8772)!==0):hs(e,n),_s=i,Ft=s}break;case 30:break;default:hs(e,n)}}function f$(e){var t=e.alternate;t!==null&&(e.alternate=null,f$(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&C1(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 St=null,Wn=!1;function ds(e,t,n){for(n=n.child;n!==null;)d$(e,t,n),n=n.sibling}function d$(e,t,n){if(xr&&typeof xr.onCommitFiberUnmount=="function")try{xr.onCommitFiberUnmount(Fh,n)}catch{}switch(n.tag){case 26:Ft||ji(n,t),ds(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ft||ji(n,t);var r=St,i=Wn;ho(n.type)&&(St=n.stateNode,Wn=!1),ds(e,t,n),Cd(n.stateNode),St=r,Wn=i;break;case 5:Ft||ji(n,t);case 6:if(r=St,i=Wn,St=null,ds(e,t,n),St=r,Wn=i,St!==null)if(Wn)try{(St.nodeType===9?St.body:St.nodeName==="HTML"?St.ownerDocument.body:St).removeChild(n.stateNode)}catch(s){We(n,t,s)}else try{St.removeChild(n.stateNode)}catch(s){We(n,t,s)}break;case 18:St!==null&&(Wn?(e=St,XA(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),mu(e)):XA(St,n.stateNode));break;case 4:r=St,i=Wn,St=n.stateNode.containerInfo,Wn=!0,ds(e,t,n),St=r,Wn=i;break;case 0:case 11:case 14:case 15:Qa(2,n,t),Ft||Qa(4,n,t),ds(e,t,n);break;case 1:Ft||(ji(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&a$(n,t,r)),ds(e,t,n);break;case 21:ds(e,t,n);break;case 22:Ft=(r=Ft)||n.memoizedState!==null,ds(e,t,n),Ft=r;break;default:ds(e,t,n)}}function h$(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{mu(e)}catch(n){We(t,t.return,n)}}}function m$(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{mu(e)}catch(n){We(t,t.return,n)}}function Nq(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new jA),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new jA),t;default:throw Error(P(435,e.tag))}}function Qm(e,t){var n=Nq(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var i=Uq.bind(null,e,r);r.then(i,i)}})}function Jn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],s=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 27:if(ho(o.type)){St=o.stateNode,Wn=!1;break e}break;case 5:St=o.stateNode,Wn=!1;break e;case 3:case 4:St=o.stateNode.containerInfo,Wn=!0;break e}o=o.return}if(St===null)throw Error(P(160));d$(s,a,i),St=null,Wn=!1,s=i.alternate,s!==null&&(s.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)p$(t,e),t=t.sibling}var ci=null;function p$(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Jn(t,e),Qn(e),r&4&&(Qa(3,e,e.return),Kh(3,e),Qa(5,e,e.return));break;case 1:Jn(t,e),Qn(e),r&512&&(Ft||n===null||ji(n,n.return)),r&64&&_s&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=ci;if(Jn(t,e),Qn(e),r&512&&(Ft||n===null||ji(n,n.return)),r&4){var s=n!==null?n.memoizedState:null;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){e:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(r){case"title":s=i.getElementsByTagName("title")[0],(!s||s[Bh]||s[bn]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=i.createElement(r),i.head.insertBefore(s,i.querySelector("head > title"))),kn(s,r,n),s[bn]=e,ln(s),r=s;break e;case"link":var a=iO("link","href",i).get(r+(n.href||""));if(a){for(var o=0;o<a.length;o++)if(s=a[o],s.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(o,1);break t}}s=i.createElement(r),kn(s,r,n),i.head.appendChild(s);break;case"meta":if(a=iO("meta","content",i).get(r+(n.content||""))){for(o=0;o<a.length;o++)if(s=a[o],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){a.splice(o,1);break t}}s=i.createElement(r),kn(s,r,n),i.head.appendChild(s);break;default:throw Error(P(468,r))}s[bn]=e,ln(s),r=s}e.stateNode=r}else sO(i,e.type,e.stateNode);else e.stateNode=rO(i,r,e.memoizedProps);else s!==r?(s===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):s.count--,r===null?sO(i,e.type,e.stateNode):rO(i,r,e.memoizedProps)):r===null&&e.stateNode!==null&&$S(e,e.memoizedProps,n.memoizedProps)}break;case 27:Jn(t,e),Qn(e),r&512&&(Ft||n===null||ji(n,n.return)),n!==null&&r&4&&$S(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Jn(t,e),Qn(e),r&512&&(Ft||n===null||ji(n,n.return)),e.flags&32){i=e.stateNode;try{au(i,"")}catch(p){We(e,e.return,p)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,$S(e,i,n!==null?n.memoizedProps:i)),r&1024&&(jS=!0);break;case 6:if(Jn(t,e),Qn(e),r&4){if(e.stateNode===null)throw Error(P(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(p){We(e,e.return,p)}}break;case 3:if(Fp=null,i=ci,ci=Pg(t.containerInfo),Jn(t,e),ci=i,Qn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{mu(t.containerInfo)}catch(p){We(e,e.return,p)}jS&&(jS=!1,g$(e));break;case 4:r=ci,ci=Pg(e.stateNode.containerInfo),Jn(t,e),Qn(e),ci=r;break;case 12:Jn(t,e),Qn(e);break;case 31:Jn(t,e),Qn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Qm(e,r)));break;case 13:Jn(t,e),Qn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(xb=wr()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Qm(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,c=_s,f=Ft;if(_s=c||i,Ft=f||l,Jn(t,e),Ft=f,_s=c,Qn(e),r&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||_s||Ft||Lo(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(s=l.stateNode,i)a=s.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none";else{o=l.stateNode;var u=l.memoizedProps.style,d=u!=null&&u.hasOwnProperty("display")?u.display:null;o.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(p){We(l,l.return,p)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?"":l.memoizedProps}catch(p){We(l,l.return,p)}}}else if(t.tag===18){if(n===null){l=t;try{var h=l.stateNode;i?WA(h,!0):WA(l.stateNode,!1)}catch(p){We(l,l.return,p)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,Qm(e,n))));break;case 19:Jn(t,e),Qn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Qm(e,r)));break;case 30:break;case 21:break;default:Jn(t,e),Qn(e)}}function Qn(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(l$(r)){n=r;break}r=r.return}if(n==null)throw Error(P(160));switch(n.tag){case 27:var i=n.stateNode,s=LS(e);Ng(e,s,i);break;case 5:var a=n.stateNode;n.flags&32&&(au(a,""),n.flags&=-33);var o=LS(e);Ng(e,o,a);break;case 3:case 4:var l=n.stateNode.containerInfo,c=LS(e);qw(e,c,l);break;default:throw Error(P(161))}}catch(f){We(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function g$(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;g$(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function hs(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)u$(e,t.alternate,t),t=t.sibling}function Lo(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Qa(4,t,t.return),Lo(t);break;case 1:ji(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&a$(t,t.return,n),Lo(t);break;case 27:Cd(t.stateNode);case 26:case 5:ji(t,t.return),Lo(t);break;case 22:t.memoizedState===null&&Lo(t);break;case 30:Lo(t);break;default:Lo(t)}e=e.sibling}}function ys(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,i=e,s=t,a=s.flags;switch(s.tag){case 0:case 11:case 15:ys(i,s,n),Kh(4,s);break;case 1:if(ys(i,s,n),r=s,i=r.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(c){We(r,r.return,c)}if(r=s,i=r.updateQueue,i!==null){var o=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)hI(l[i],o)}catch(c){We(r,r.return,c)}}n&&a&64&&s$(s),xd(s,s.return);break;case 27:c$(s);case 26:case 5:ys(i,s,n),n&&r===null&&a&4&&o$(s),xd(s,s.return);break;case 12:ys(i,s,n);break;case 31:ys(i,s,n),n&&a&4&&h$(i,s);break;case 13:ys(i,s,n),n&&a&4&&m$(i,s);break;case 22:s.memoizedState===null&&ys(i,s,n),xd(s,s.return);break;case 30:break;default:ys(i,s,n)}t=t.sibling}}function ik(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&&qh(n))}function sk(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&qh(e))}function ai(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)y$(e,t,n,r),t=t.sibling}function y$(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:ai(e,t,n,r),i&2048&&Kh(9,t);break;case 1:ai(e,t,n,r);break;case 3:ai(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&qh(e)));break;case 12:if(i&2048){ai(e,t,n,r),e=t.stateNode;try{var s=t.memoizedProps,a=s.id,o=s.onPostCommit;typeof o=="function"&&o(a,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(l){We(t,t.return,l)}}else ai(e,t,n,r);break;case 31:ai(e,t,n,r);break;case 13:ai(e,t,n,r);break;case 23:break;case 22:s=t.stateNode,a=t.alternate,t.memoizedState!==null?s._visibility&2?ai(e,t,n,r):_d(e,t):s._visibility&2?ai(e,t,n,r):(s._visibility|=2,uc(e,t,n,r,(t.subtreeFlags&10256)!==0||!1)),i&2048&&ik(a,t);break;case 24:ai(e,t,n,r),i&2048&&sk(t.alternate,t);break;default:ai(e,t,n,r)}}function uc(e,t,n,r,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,a=t,o=n,l=r,c=a.flags;switch(a.tag){case 0:case 11:case 15:uc(s,a,o,l,i),Kh(8,a);break;case 23:break;case 22:var f=a.stateNode;a.memoizedState!==null?f._visibility&2?uc(s,a,o,l,i):_d(s,a):(f._visibility|=2,uc(s,a,o,l,i)),i&&c&2048&&ik(a.alternate,a);break;case 24:uc(s,a,o,l,i),i&&c&2048&&sk(a.alternate,a);break;default:uc(s,a,o,l,i)}t=t.sibling}}function _d(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:_d(n,r),i&2048&&ik(r.alternate,r);break;case 24:_d(n,r),i&2048&&sk(r.alternate,r);break;default:_d(n,r)}t=t.sibling}}var nd=8192;function Xl(e,t,n){if(e.subtreeFlags&nd)for(e=e.child;e!==null;)b$(e,t,n),e=e.sibling}function b$(e,t,n){switch(e.tag){case 26:Xl(e,t,n),e.flags&nd&&e.memoizedState!==null&&bV(n,ci,e.memoizedState,e.memoizedProps);break;case 5:Xl(e,t,n);break;case 3:case 4:var r=ci;ci=Pg(e.stateNode.containerInfo),Xl(e,t,n),ci=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=nd,nd=16777216,Xl(e,t,n),nd=r):Xl(e,t,n));break;default:Xl(e,t,n)}}function v$(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 If(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];on=r,w$(r,e)}v$(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)S$(e),e=e.sibling}function S$(e){switch(e.tag){case 0:case 11:case 15:If(e),e.flags&2048&&Qa(9,e,e.return);break;case 3:If(e);break;case 12:If(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Lp(e)):If(e);break;default:If(e)}}function Lp(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];on=r,w$(r,e)}v$(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Qa(8,t,t.return),Lp(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Lp(t));break;default:Lp(t)}e=e.sibling}}function w$(e,t){for(;on!==null;){var n=on;switch(n.tag){case 0:case 11:case 15:Qa(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:qh(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,on=r;else e:for(n=e;on!==null;){r=on;var i=r.sibling,s=r.return;if(f$(r),r===n){on=null;break e}if(i!==null){i.return=s,on=i;break e}on=s}}}var Dq={getCacheForType:function(e){var t=xn(Ut),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return xn(Ut).controller.signal}},zq=typeof WeakMap=="function"?WeakMap:Map,Ke=0,ot=null,De=null,Ie=0,Qe=0,dr=null,wa=!1,Ku=!1,ak=!1,Bs=0,kt=0,Xa=0,Zo=0,ok=0,vr=0,uu=0,kd=null,Zn=null,Vw=!1,xb=0,x$=0,Dg=1/0,zg=null,Na=null,Xt=0,Da=null,fu=null,Is=0,Kw=0,Gw=null,_$=null,Ed=0,Yw=null;function kr(){return Ke&2&&Ie!==0?Ie&-Ie:ye.T!==null?ck():Nz()}function k$(){if(vr===0)if(!(Ie&536870912)||Fe){var e=Bm;Bm<<=1,!(Bm&3932160)&&(Bm=262144),vr=e}else vr=536870912;return e=Mr.current,e!==null&&(e.flags|=32),vr}function rr(e,t,n){(e===ot&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)&&(du(e,0),xa(e,Ie,vr,!1)),Uh(e,n),(!(Ke&2)||e!==ot)&&(e===ot&&(!(Ke&2)&&(Zo|=n),kt===4&&xa(e,Ie,vr,!1)),ns(e))}function E$(e,t,n){if(Ke&6)throw Error(P(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Ph(e,t),i=r?Lq(e,t):FS(e,t,!0),s=r;do{if(i===0){Ku&&!r&&xa(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!Iq(n)){i=FS(e,t,!1),s=!1;continue}if(i===2){if(s=t,e.errorRecoveryDisabledLanes&s)var a=0;else a=e.pendingLanes&-536870913,a=a!==0?a:a&536870912?536870912:0;if(a!==0){t=a;e:{var o=e;i=kd;var l=o.current.memoizedState.isDehydrated;if(l&&(du(o,a).flags|=256),a=FS(o,a,!1),a!==2){if(ak&&!l){o.errorRecoveryDisabledLanes|=s,Zo|=s,i=4;break e}s=Zn,Zn=i,s!==null&&(Zn===null?Zn=s:Zn.push.apply(Zn,s))}i=a}if(s=!1,i!==2)continue}}if(i===1){du(e,0),xa(e,t,0,!0);break}e:{switch(r=e,s=i,s){case 0:case 1:throw Error(P(345));case 4:if((t&4194048)!==t)break;case 6:xa(r,t,vr,!wa);break e;case 2:Zn=null;break;case 3:case 5:break;default:throw Error(P(329))}if((t&62914560)===t&&(i=xb+300-wr(),10<i)){if(xa(r,t,vr,!wa),fb(r,0,!0)!==0)break e;Is=t,r.timeoutHandle=V$(FA.bind(null,r,n,Zn,zg,Vw,t,vr,Zo,uu,wa,s,"Throttled",-0,0),i);break e}FA(r,n,Zn,zg,Vw,t,vr,Zo,uu,wa,s,null,-0,0)}}break}while(!0);ns(e)}function FA(e,t,n,r,i,s,a,o,l,c,f,u,d,h){if(e.timeoutHandle=-1,u=t.subtreeFlags,u&8192||(u&16785408)===16785408){u={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ts},b$(t,s,u);var p=(s&62914560)===s?xb-wr():(s&4194048)===s?x$-wr():0;if(p=vV(u,p),p!==null){Is=s,e.cancelPendingCommit=p(UA.bind(null,e,t,s,n,r,i,a,o,l,f,u,null,d,h)),xa(e,s,a,!c);return}}UA(e,t,s,n,r,i,a,o,l)}function Iq(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],s=i.getSnapshot;i=i.value;try{if(!Rr(s(),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 xa(e,t,n,r){t&=~ok,t&=~Zo,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var s=31-_r(i),a=1<<s;r[s]=-1,i&=~a}n!==0&&Oz(e,n,t)}function _b(){return Ke&6?!0:(Gh(0),!1)}function lk(){if(De!==null){if(Qe===0)var e=De.return;else e=De,As=$l=null,G1(e),Uc=null,Zd=0,e=De;for(;e!==null;)i$(e.alternate,e),e=e.return;De=null}}function du(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,tV(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Is=0,lk(),ot=e,De=n=Ds(e.current,null),Ie=t,Qe=0,dr=null,wa=!1,Ku=Ph(e,t),ak=!1,uu=vr=ok=Zo=Xa=kt=0,Zn=kd=null,Vw=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-_r(r),s=1<<i;t|=e[i],r&=~s}return Bs=t,pb(),n}function C$(e,t){Ee=null,ye.H=th,t===Vu||t===yb?(t=yA(),Qe=3):t===P1?(t=yA(),Qe=4):Qe=t===nk?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,dr=t,De===null&&(kt=1,Rg(e,Vr(t,e.current)))}function T$(){var e=Mr.current;return e===null?!0:(Ie&4194048)===Ie?Jr===null:(Ie&62914560)===Ie||Ie&536870912?e===Jr:!1}function A$(){var e=ye.H;return ye.H=th,e===null?th:e}function O$(){var e=ye.A;return ye.A=Dq,e}function Ig(){kt=4,wa||(Ie&4194048)!==Ie&&Mr.current!==null||(Ku=!0),!(Xa&134217727)&&!(Zo&134217727)||ot===null||xa(ot,Ie,vr,!1)}function FS(e,t,n){var r=Ke;Ke|=2;var i=A$(),s=O$();(ot!==e||Ie!==t)&&(zg=null,du(e,t)),t=!1;var a=kt;e:do try{if(Qe!==0&&De!==null){var o=De,l=dr;switch(Qe){case 8:lk(),a=6;break e;case 3:case 2:case 9:case 6:Mr.current===null&&(t=!0);var c=Qe;if(Qe=0,dr=null,Rc(e,o,l,c),n&&Ku){a=0;break e}break;default:c=Qe,Qe=0,dr=null,Rc(e,o,l,c)}}$q(),a=kt;break}catch(f){C$(e,f)}while(!0);return t&&e.shellSuspendCounter++,As=$l=null,Ke=r,ye.H=i,ye.A=s,De===null&&(ot=null,Ie=0,pb()),a}function $q(){for(;De!==null;)R$(De)}function Lq(e,t){var n=Ke;Ke|=2;var r=A$(),i=O$();ot!==e||Ie!==t?(zg=null,Dg=wr()+500,du(e,t)):Ku=Ph(e,t);e:do try{if(Qe!==0&&De!==null){t=De;var s=dr;t:switch(Qe){case 1:Qe=0,dr=null,Rc(e,t,s,1);break;case 2:case 9:if(gA(s)){Qe=0,dr=null,PA(t);break}t=function(){Qe!==2&&Qe!==9||ot!==e||(Qe=7),ns(e)},s.then(t,t);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:gA(s)?(Qe=0,dr=null,PA(t)):(Qe=0,dr=null,Rc(e,t,s,7));break;case 5:var a=null;switch(De.tag){case 26:a=De.memoizedState;case 5:case 27:var o=De;if(a?Q$(a):o.stateNode.complete){Qe=0,dr=null;var l=o.sibling;if(l!==null)De=l;else{var c=o.return;c!==null?(De=c,kb(c)):De=null}break t}}Qe=0,dr=null,Rc(e,t,s,5);break;case 6:Qe=0,dr=null,Rc(e,t,s,6);break;case 8:lk(),kt=6;break e;default:throw Error(P(462))}}jq();break}catch(f){C$(e,f)}while(!0);return As=$l=null,ye.H=r,ye.A=i,Ke=n,De!==null?0:(ot=null,Ie=0,pb(),kt)}function jq(){for(;De!==null&&!o9();)R$(De)}function R$(e){var t=r$(e.alternate,e,Bs);e.memoizedProps=e.pendingProps,t===null?kb(e):De=t}function PA(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=DA(n,t,t.pendingProps,t.type,void 0,Ie);break;case 11:t=DA(n,t,t.pendingProps,t.type.render,t.ref,Ie);break;case 5:G1(t);default:i$(n,t),t=De=iI(t,Bs),t=r$(n,t,Bs)}e.memoizedProps=e.pendingProps,t===null?kb(e):De=t}function Rc(e,t,n,r){As=$l=null,G1(t),Uc=null,Zd=0;var i=t.return;try{if(Cq(e,i,t,n,Ie)){kt=1,Rg(e,Vr(n,e.current)),De=null;return}}catch(s){if(i!==null)throw De=i,s;kt=1,Rg(e,Vr(n,e.current)),De=null;return}t.flags&32768?(Fe||r===1?e=!0:Ku||Ie&536870912?e=!1:(wa=e=!0,(r===2||r===9||r===3||r===6)&&(r=Mr.current,r!==null&&r.tag===13&&(r.flags|=16384))),M$(t,e)):kb(t)}function kb(e){var t=e;do{if(t.flags&32768){M$(t,wa);return}e=t.return;var n=Oq(t.alternate,t,Bs);if(n!==null){De=n;return}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);kt===0&&(kt=5)}function M$(e,t){do{var n=Rq(e.alternate,e);if(n!==null){n.flags&=32767,De=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){De=e;return}De=e=n}while(e!==null);kt=6,De=null}function UA(e,t,n,r,i,s,a,o,l){e.cancelPendingCommit=null;do Eb();while(Xt!==0);if(Ke&6)throw Error(P(327));if(t!==null){if(t===e.current)throw Error(P(177));if(s=t.lanes|t.childLanes,s|=D1,y9(e,n,s,a,o,l),e===ot&&(De=ot=null,Ie=0),fu=t,Da=e,Is=n,Kw=s,Gw=i,_$=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Bq(vg,function(){return $$(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,t.subtreeFlags&13878||r){r=ye.T,ye.T=null,i=Ge.p,Ge.p=2,a=Ke,Ke|=4;try{Mq(e,t,n)}finally{Ke=a,Ge.p=i,ye.T=r}}Xt=1,N$(),D$(),z$()}}function N$(){if(Xt===1){Xt=0;var e=Da,t=fu,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=ye.T,ye.T=null;var r=Ge.p;Ge.p=2;var i=Ke;Ke|=4;try{p$(t,e);var s=Ww,a=Qz(e.containerInfo),o=s.focusedElem,l=s.selectionRange;if(a!==o&&o&&o.ownerDocument&&Jz(o.ownerDocument.documentElement,o)){if(l!==null&&N1(o)){var c=l.start,f=l.end;if(f===void 0&&(f=c),"selectionStart"in o)o.selectionStart=c,o.selectionEnd=Math.min(f,o.value.length);else{var u=o.ownerDocument||document,d=u&&u.defaultView||window;if(d.getSelection){var h=d.getSelection(),p=o.textContent.length,b=Math.min(l.start,p),S=l.end===void 0?b:Math.min(l.end,p);!h.extend&&b>S&&(a=S,S=b,b=a);var m=cA(o,b),y=cA(o,S);if(m&&y&&(h.rangeCount!==1||h.anchorNode!==m.node||h.anchorOffset!==m.offset||h.focusNode!==y.node||h.focusOffset!==y.offset)){var v=u.createRange();v.setStart(m.node,m.offset),h.removeAllRanges(),b>S?(h.addRange(v),h.extend(y.node,y.offset)):(v.setEnd(y.node,y.offset),h.addRange(v))}}}}for(u=[],h=o;h=h.parentNode;)h.nodeType===1&&u.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<u.length;o++){var _=u[o];_.element.scrollLeft=_.left,_.element.scrollTop=_.top}}Hg=!!Xw,Ww=Xw=null}finally{Ke=i,Ge.p=r,ye.T=n}}e.current=t,Xt=2}}function D$(){if(Xt===2){Xt=0;var e=Da,t=fu,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=ye.T,ye.T=null;var r=Ge.p;Ge.p=2;var i=Ke;Ke|=4;try{u$(e,t.alternate,t)}finally{Ke=i,Ge.p=r,ye.T=n}}Xt=3}}function z$(){if(Xt===4||Xt===3){Xt=0,l9();var e=Da,t=fu,n=Is,r=_$;t.subtreeFlags&10256||t.flags&10256?Xt=5:(Xt=0,fu=Da=null,I$(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Na=null),E1(n),t=t.stateNode,xr&&typeof xr.onCommitFiberRoot=="function")try{xr.onCommitFiberRoot(Fh,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=ye.T,i=Ge.p,Ge.p=2,ye.T=null;try{for(var s=e.onRecoverableError,a=0;a<r.length;a++){var o=r[a];s(o.value,{componentStack:o.stack})}}finally{ye.T=t,Ge.p=i}}Is&3&&Eb(),ns(e),i=e.pendingLanes,n&261930&&i&42?e===Yw?Ed++:(Ed=0,Yw=e):Ed=0,Gh(0)}}function I$(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,qh(t)))}function Eb(){return N$(),D$(),z$(),$$()}function $$(){if(Xt!==5)return!1;var e=Da,t=Kw;Kw=0;var n=E1(Is),r=ye.T,i=Ge.p;try{Ge.p=32>n?32:n,ye.T=null,n=Gw,Gw=null;var s=Da,a=Is;if(Xt=0,fu=Da=null,Is=0,Ke&6)throw Error(P(331));var o=Ke;if(Ke|=4,S$(s.current),y$(s,s.current,a,n),Ke=o,Gh(0,!1),xr&&typeof xr.onPostCommitFiberRoot=="function")try{xr.onPostCommitFiberRoot(Fh,s)}catch{}return!0}finally{Ge.p=i,ye.T=r,I$(e,t)}}function BA(e,t,n){t=Vr(n,t),t=Uw(e.stateNode,t,2),e=Ma(e,t,2),e!==null&&(Uh(e,2),ns(e))}function We(e,t,n){if(e.tag===3)BA(e,e,n);else for(;t!==null;){if(t.tag===3){BA(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Na===null||!Na.has(r))){e=Vr(n,e),n=XI(2),r=Ma(t,n,2),r!==null&&(WI(n,r,t,e),Uh(r,2),ns(r));break}}t=t.return}}function PS(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zq;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)||(ak=!0,i.add(n),e=Fq.bind(null,e,t,n),t.then(e,e))}function Fq(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ot===e&&(Ie&n)===n&&(kt===4||kt===3&&(Ie&62914560)===Ie&&300>wr()-xb?!(Ke&2)&&du(e,0):ok|=n,uu===Ie&&(uu=0)),ns(e)}function L$(e,t){t===0&&(t=Az()),e=Il(e,t),e!==null&&(Uh(e,t),ns(e))}function Pq(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),L$(e,n)}function Uq(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(P(314))}r!==null&&r.delete(t),L$(e,n)}function Bq(e,t){return _1(e,t)}var $g=null,fc=null,Jw=!1,Lg=!1,US=!1,_a=0;function ns(e){e!==fc&&e.next===null&&(fc===null?$g=fc=e:fc=fc.next=e),Lg=!0,Jw||(Jw=!0,qq())}function Gh(e,t){if(!US&&Lg){US=!0;do for(var n=!1,r=$g;r!==null;){if(e!==0){var i=r.pendingLanes;if(i===0)var s=0;else{var a=r.suspendedLanes,o=r.pingedLanes;s=(1<<31-_r(42|e)+1)-1,s&=i&~(a&~o),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,HA(r,s))}else s=Ie,s=fb(r,r===ot?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(s&3)||Ph(r,s)||(n=!0,HA(r,s));r=r.next}while(n);US=!1}}function Hq(){j$()}function j$(){Lg=Jw=!1;var e=0;_a!==0&&eV()&&(e=_a);for(var t=wr(),n=null,r=$g;r!==null;){var i=r.next,s=F$(r,t);s===0?(r.next=null,n===null?$g=i:n.next=i,i===null&&(fc=n)):(n=r,(e!==0||s&3)&&(Lg=!0)),r=i}Xt!==0&&Xt!==5||Gh(e),_a!==0&&(_a=0)}function F$(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var a=31-_r(s),o=1<<a,l=i[a];l===-1?(!(o&n)||o&r)&&(i[a]=g9(o,t)):l<=t&&(e.expiredLanes|=o),s&=~o}if(t=ot,n=Ie,n=fb(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&pS(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ph(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&pS(r),E1(n)){case 2:case 8:n=Cz;break;case 32:n=vg;break;case 268435456:n=Tz;break;default:n=vg}return r=P$.bind(null,e),n=_1(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&pS(r),e.callbackPriority=2,e.callbackNode=null,2}function P$(e,t){if(Xt!==0&&Xt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Eb()&&e.callbackNode!==n)return null;var r=Ie;return r=fb(e,e===ot?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(E$(e,r,t),F$(e,wr()),e.callbackNode!=null&&e.callbackNode===n?P$.bind(null,e):null)}function HA(e,t){if(Eb())return null;E$(e,t,!0)}function qq(){nV(function(){Ke&6?_1(Ez,Hq):j$()})}function ck(){if(_a===0){var e=ou;e===0&&(e=Um,Um<<=1,!(Um&261888)&&(Um=256)),_a=e}return _a}function qA(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ap(""+e)}function VA(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Vq(e,t,n,r,i){if(t==="submit"&&n&&n.stateNode===i){var s=qA((i[ir]||null).action),a=r.submitter;a&&(t=(t=a[ir]||null)?qA(t.formAction):a.getAttribute("formAction"),t!==null&&(s=t,a=null));var o=new db("action","action",null,r,i);e.push({event:o,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(_a!==0){var l=a?VA(i,a):new FormData(i);Fw(n,{pending:!0,data:l,method:i.method,action:s},null,l)}}else typeof s=="function"&&(o.preventDefault(),l=a?VA(i,a):new FormData(i),Fw(n,{pending:!0,data:l,method:i.method,action:s},s,l))},currentTarget:i}]})}}for(var BS=0;BS<Tw.length;BS++){var HS=Tw[BS],Kq=HS.toLowerCase(),Gq=HS[0].toUpperCase()+HS.slice(1);Ai(Kq,"on"+Gq)}Ai(Wz,"onAnimationEnd");Ai(Zz,"onAnimationIteration");Ai(eI,"onAnimationStart");Ai("dblclick","onDoubleClick");Ai("focusin","onFocus");Ai("focusout","onBlur");Ai(cq,"onTransitionRun");Ai(uq,"onTransitionStart");Ai(fq,"onTransitionCancel");Ai(tI,"onTransitionEnd");su("onMouseEnter",["mouseout","mouseover"]);su("onMouseLeave",["mouseout","mouseover"]);su("onPointerEnter",["pointerout","pointerover"]);su("onPointerLeave",["pointerout","pointerover"]);Nl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Nl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Nl("onBeforeInput",["compositionend","keypress","textInput","paste"]);Nl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Nl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Nl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var nh="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(" "),Yq=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(nh));function U$(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var a=r.length-1;0<=a;a--){var o=r[a],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==s&&i.isPropagationStopped())break e;s=o,i.currentTarget=c;try{s(i)}catch(f){wg(f)}i.currentTarget=null,s=l}else for(a=0;a<r.length;a++){if(o=r[a],l=o.instance,c=o.currentTarget,o=o.listener,l!==s&&i.isPropagationStopped())break e;s=o,i.currentTarget=c;try{s(i)}catch(f){wg(f)}i.currentTarget=null,s=l}}}}function Ne(e,t){var n=t[vw];n===void 0&&(n=t[vw]=new Set);var r=e+"__bubble";n.has(r)||(B$(t,e,2,!1),n.add(r))}function qS(e,t,n){var r=0;t&&(r|=4),B$(n,e,r,t)}var Xm="_reactListening"+Math.random().toString(36).slice(2);function uk(e){if(!e[Xm]){e[Xm]=!0,Dz.forEach(function(n){n!=="selectionchange"&&(Yq.has(n)||qS(n,!1,e),qS(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xm]||(t[Xm]=!0,qS("selectionchange",!1,t))}}function B$(e,t,n,r){switch(tL(t)){case 2:var i=xV;break;case 8:i=_V;break;default:i=mk}n=i.bind(null,t,n,e),i=void 0,!kw||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function VS(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var o=r.stateNode.containerInfo;if(o===i)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&a.stateNode.containerInfo===i)return;a=a.return}for(;o!==null;){if(a=wc(o),a===null)return;if(l=a.tag,l===5||l===6||l===26||l===27){r=s=a;continue e}o=o.parentNode}}r=r.return}Uz(function(){var c=s,f=A1(n),u=[];e:{var d=nI.get(e);if(d!==void 0){var h=db,p=e;switch(e){case"keypress":if(Rp(n)===0)break e;case"keydown":case"keyup":h=U9;break;case"focusin":p="focus",h=SS;break;case"focusout":p="blur",h=SS;break;case"beforeblur":case"afterblur":h=SS;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=ZT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=O9;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=q9;break;case Wz:case Zz:case eI:h=N9;break;case tI:h=K9;break;case"scroll":case"scrollend":h=T9;break;case"wheel":h=Y9;break;case"copy":case"cut":case"paste":h=z9;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=tA;break;case"toggle":case"beforetoggle":h=Q9}var b=(t&4)!==0,S=!b&&(e==="scroll"||e==="scrollend"),m=b?d!==null?d+"Capture":null:d;b=[];for(var y=c,v;y!==null;){var _=y;if(v=_.stateNode,_=_.tag,_!==5&&_!==26&&_!==27||v===null||m===null||(_=Yd(y,m),_!=null&&b.push(rh(y,_,v))),S)break;y=y.return}0<b.length&&(d=new h(d,p,null,n,f),u.push({event:d,listeners:b}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==_w&&(p=n.relatedTarget||n.fromElement)&&(wc(p)||p[Bu]))break e;if((h||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=c,p=p?wc(p):null,p!==null&&(S=jh(p),b=p.tag,p!==S||b!==5&&b!==27&&b!==6)&&(p=null)):(h=null,p=c),h!==p)){if(b=ZT,_="onMouseLeave",m="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(b=tA,_="onPointerLeave",m="onPointerEnter",y="pointer"),S=h==null?d:ed(h),v=p==null?d:ed(p),d=new b(_,y+"leave",h,n,f),d.target=S,d.relatedTarget=v,_=null,wc(f)===c&&(b=new b(m,y+"enter",p,n,f),b.target=v,b.relatedTarget=S,_=b),S=_,h&&p)t:{for(b=Jq,m=h,y=p,v=0,_=m;_;_=b(_))v++;_=0;for(var C=y;C;C=b(C))_++;for(;0<v-_;)m=b(m),v--;for(;0<_-v;)y=b(y),_--;for(;v--;){if(m===y||y!==null&&m===y.alternate){b=m;break t}m=b(m),y=b(y)}b=null}else b=null;h!==null&&KA(u,d,h,b,!1),p!==null&&S!==null&&KA(u,S,p,b,!0)}}e:{if(d=c?ed(c):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var k=sA;else if(iA(d))if(Gz)k=aq;else{k=iq;var A=rq}else h=d.nodeName,!h||h.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?c&&T1(c.elementType)&&(k=sA):k=sq;if(k&&(k=k(e,c))){Kz(u,k,n,f);break e}A&&A(e,d,c),e==="focusout"&&c&&d.type==="number"&&c.memoizedProps.value!=null&&xw(d,"number",d.value)}switch(A=c?ed(c):window,e){case"focusin":(iA(A)||A.contentEditable==="true")&&(kc=A,Ew=c,gd=null);break;case"focusout":gd=Ew=kc=null;break;case"mousedown":Cw=!0;break;case"contextmenu":case"mouseup":case"dragend":Cw=!1,uA(u,n,f);break;case"selectionchange":if(lq)break;case"keydown":case"keyup":uA(u,n,f)}var N;if(M1)e:{switch(e){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else _c?qz(e,n)&&(D="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(D="onCompositionStart");D&&(Hz&&n.locale!=="ko"&&(_c||D!=="onCompositionStart"?D==="onCompositionEnd"&&_c&&(N=Bz()):(Sa=f,O1="value"in Sa?Sa.value:Sa.textContent,_c=!0)),A=jg(c,D),0<A.length&&(D=new eA(D,e,null,n,f),u.push({event:D,listeners:A}),N?D.data=N:(N=Vz(n),N!==null&&(D.data=N)))),(N=W9?Z9(e,n):eq(e,n))&&(D=jg(c,"onBeforeInput"),0<D.length&&(A=new eA("onBeforeInput","beforeinput",null,n,f),u.push({event:A,listeners:D}),A.data=N)),Vq(u,e,c,n,f)}U$(u,t)})}function rh(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jg(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||s===null||(i=Yd(e,n),i!=null&&r.unshift(rh(e,i,s)),i=Yd(e,t),i!=null&&r.push(rh(e,i,s))),e.tag===3)return r;e=e.return}return[]}function Jq(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function KA(e,t,n,r,i){for(var s=t._reactName,a=[];n!==null&&n!==r;){var o=n,l=o.alternate,c=o.stateNode;if(o=o.tag,l!==null&&l===r)break;o!==5&&o!==26&&o!==27||c===null||(l=c,i?(c=Yd(n,s),c!=null&&a.unshift(rh(n,c,l))):i||(c=Yd(n,s),c!=null&&a.push(rh(n,c,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var Qq=/\r\n?/g,Xq=/\u0000|\uFFFD/g;function GA(e){return(typeof e=="string"?e:""+e).replace(Qq,`
|
|
49
|
+
`).replace(Xq,"")}function H$(e,t){return t=GA(t),GA(e)===t}function nt(e,t,n,r,i,s){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||au(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&au(e,""+r);break;case"className":qm(e,"class",r);break;case"tabIndex":qm(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":qm(e,n,r);break;case"style":Pz(e,r,s);break;case"data":if(t!=="object"){qm(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=Ap(""+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}else typeof s=="function"&&(n==="formAction"?(t!=="input"&&nt(e,t,"name",i.name,i,null),nt(e,t,"formEncType",i.formEncType,i,null),nt(e,t,"formMethod",i.formMethod,i,null),nt(e,t,"formTarget",i.formTarget,i,null)):(nt(e,t,"encType",i.encType,i,null),nt(e,t,"method",i.method,i,null),nt(e,t,"target",i.target,i,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=Ap(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=Ts);break;case"onScroll":r!=null&&Ne("scroll",e);break;case"onScrollEnd":r!=null&&Ne("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(P(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(P(60));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=Ap(""+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"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":r===!0?e.setAttribute(n,""):r!==!1&&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":Ne("beforetoggle",e),Ne("toggle",e),Tp(e,"popover",r);break;case"xlinkActuate":us(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":us(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":us(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":us(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":us(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":us(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":us(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":us(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":us(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Tp(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=E9.get(n)||n,Tp(e,n,r))}}function Qw(e,t,n,r,i,s){switch(n){case"style":Pz(e,r,s);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(P(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(P(60));e.innerHTML=n}}break;case"children":typeof r=="string"?au(e,r):(typeof r=="number"||typeof r=="bigint")&&au(e,""+r);break;case"onScroll":r!=null&&Ne("scroll",e);break;case"onScrollEnd":r!=null&&Ne("scrollend",e);break;case"onClick":r!=null&&(e.onclick=Ts);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!zz.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),s=e[ir]||null,s=s!=null?s[n]:null,typeof s=="function"&&e.removeEventListener(t,s,i),typeof r=="function")){typeof s!="function"&&s!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):Tp(e,n,r)}}}function kn(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",e),Ne("load",e);var r=!1,i=!1,s;for(s in n)if(n.hasOwnProperty(s)){var a=n[s];if(a!=null)switch(s){case"src":r=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(P(137,t));default:nt(e,t,s,a,n,null)}}i&&nt(e,t,"srcSet",n.srcSet,n,null),r&&nt(e,t,"src",n.src,n,null);return;case"input":Ne("invalid",e);var o=s=a=i=null,l=null,c=null;for(r in n)if(n.hasOwnProperty(r)){var f=n[r];if(f!=null)switch(r){case"name":i=f;break;case"type":a=f;break;case"checked":l=f;break;case"defaultChecked":c=f;break;case"value":s=f;break;case"defaultValue":o=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(P(137,t));break;default:nt(e,t,r,f,n,null)}}Lz(e,s,o,l,c,a,i,!1);return;case"select":Ne("invalid",e),r=a=s=null;for(i in n)if(n.hasOwnProperty(i)&&(o=n[i],o!=null))switch(i){case"value":s=o;break;case"defaultValue":a=o;break;case"multiple":r=o;default:nt(e,t,i,o,n,null)}t=s,n=a,e.multiple=!!r,t!=null?jc(e,!!r,t,!1):n!=null&&jc(e,!!r,n,!0);return;case"textarea":Ne("invalid",e),s=i=r=null;for(a in n)if(n.hasOwnProperty(a)&&(o=n[a],o!=null))switch(a){case"value":r=o;break;case"defaultValue":i=o;break;case"children":s=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(P(91));break;default:nt(e,t,a,o,n,null)}Fz(e,r,i,s);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:nt(e,t,l,r,n,null)}return;case"dialog":Ne("beforetoggle",e),Ne("toggle",e),Ne("cancel",e),Ne("close",e);break;case"iframe":case"object":Ne("load",e);break;case"video":case"audio":for(r=0;r<nh.length;r++)Ne(nh[r],e);break;case"image":Ne("error",e),Ne("load",e);break;case"details":Ne("toggle",e);break;case"embed":case"source":case"link":Ne("error",e),Ne("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(c in n)if(n.hasOwnProperty(c)&&(r=n[c],r!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(P(137,t));default:nt(e,t,c,r,n,null)}return;default:if(T1(t)){for(f in n)n.hasOwnProperty(f)&&(r=n[f],r!==void 0&&Qw(e,t,f,r,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(r=n[o],r!=null&&nt(e,t,o,r,n,null))}function Wq(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 i=null,s=null,a=null,o=null,l=null,c=null,f=null;for(h in n){var u=n[h];if(n.hasOwnProperty(h)&&u!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":l=u;default:r.hasOwnProperty(h)||nt(e,t,h,null,r,u)}}for(var d in r){var h=r[d];if(u=n[d],r.hasOwnProperty(d)&&(h!=null||u!=null))switch(d){case"type":s=h;break;case"name":i=h;break;case"checked":c=h;break;case"defaultChecked":f=h;break;case"value":a=h;break;case"defaultValue":o=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(P(137,t));break;default:h!==u&&nt(e,t,d,h,r,u)}}ww(e,a,o,l,c,f,s,i);return;case"select":h=a=o=d=null;for(s in n)if(l=n[s],n.hasOwnProperty(s)&&l!=null)switch(s){case"value":break;case"multiple":h=l;default:r.hasOwnProperty(s)||nt(e,t,s,null,r,l)}for(i in r)if(s=r[i],l=n[i],r.hasOwnProperty(i)&&(s!=null||l!=null))switch(i){case"value":d=s;break;case"defaultValue":o=s;break;case"multiple":a=s;default:s!==l&&nt(e,t,i,s,r,l)}t=o,n=a,r=h,d!=null?jc(e,!!n,d,!1):!!r!=!!n&&(t!=null?jc(e,!!n,t,!0):jc(e,!!n,n?[]:"",!1));return;case"textarea":h=d=null;for(o in n)if(i=n[o],n.hasOwnProperty(o)&&i!=null&&!r.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:nt(e,t,o,null,r,i)}for(a in r)if(i=r[a],s=n[a],r.hasOwnProperty(a)&&(i!=null||s!=null))switch(a){case"value":d=i;break;case"defaultValue":h=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(P(91));break;default:i!==s&&nt(e,t,a,i,r,s)}jz(e,d,h);return;case"option":for(var p in n)if(d=n[p],n.hasOwnProperty(p)&&d!=null&&!r.hasOwnProperty(p))switch(p){case"selected":e.selected=!1;break;default:nt(e,t,p,null,r,d)}for(l in r)if(d=r[l],h=n[l],r.hasOwnProperty(l)&&d!==h&&(d!=null||h!=null))switch(l){case"selected":e.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:nt(e,t,l,d,r,h)}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 b in n)d=n[b],n.hasOwnProperty(b)&&d!=null&&!r.hasOwnProperty(b)&&nt(e,t,b,null,r,d);for(c in r)if(d=r[c],h=n[c],r.hasOwnProperty(c)&&d!==h&&(d!=null||h!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(P(137,t));break;default:nt(e,t,c,d,r,h)}return;default:if(T1(t)){for(var S in n)d=n[S],n.hasOwnProperty(S)&&d!==void 0&&!r.hasOwnProperty(S)&&Qw(e,t,S,void 0,r,d);for(f in r)d=r[f],h=n[f],!r.hasOwnProperty(f)||d===h||d===void 0&&h===void 0||Qw(e,t,f,d,r,h);return}}for(var m in n)d=n[m],n.hasOwnProperty(m)&&d!=null&&!r.hasOwnProperty(m)&&nt(e,t,m,null,r,d);for(u in r)d=r[u],h=n[u],!r.hasOwnProperty(u)||d===h||d==null&&h==null||nt(e,t,u,d,r,h)}function YA(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Zq(){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],s=i.transferSize,a=i.initiatorType,o=i.duration;if(s&&o&&YA(a)){for(a=0,o=i.responseEnd,r+=1;r<n.length;r++){var l=n[r],c=l.startTime;if(c>o)break;var f=l.transferSize,u=l.initiatorType;f&&YA(u)&&(l=l.responseEnd,a+=f*(l<o?1:(o-c)/(l-c)))}if(--r,t+=8*(s+a)/(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 Xw=null,Ww=null;function Fg(e){return e.nodeType===9?e:e.ownerDocument}function JA(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 q$(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 Zw(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 KS=null;function eV(){var e=window.event;return e&&e.type==="popstate"?e===KS?!1:(KS=e,!0):(KS=null,!1)}var V$=typeof setTimeout=="function"?setTimeout:void 0,tV=typeof clearTimeout=="function"?clearTimeout:void 0,QA=typeof Promise=="function"?Promise:void 0,nV=typeof queueMicrotask=="function"?queueMicrotask:typeof QA<"u"?function(e){return QA.resolve(null).then(e).catch(rV)}:V$;function rV(e){setTimeout(function(){throw e})}function ho(e){return e==="head"}function XA(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),mu(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")Cd(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Cd(n);for(var s=n.firstChild;s;){var a=s.nextSibling,o=s.nodeName;s[Bh]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=a}}else n==="body"&&Cd(e.ownerDocument.body);n=i}while(n);mu(t)}function WA(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 ex(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":ex(n),C1(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function iV(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(!e[Bh])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==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(s=e.getAttribute("src"),(s!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=Qr(e.nextSibling),e===null)break}return null}function sV(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Qr(e.nextSibling),e===null))return null;return e}function K$(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Qr(e.nextSibling),e===null))return null;return e}function tx(e){return e.data==="$?"||e.data==="$~"}function nx(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function aV(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 Qr(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 rx=null;function ZA(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Qr(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function eO(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 G$(e,t,n){switch(t=Fg(n),e){case"html":if(e=t.documentElement,!e)throw Error(P(452));return e;case"head":if(e=t.head,!e)throw Error(P(453));return e;case"body":if(e=t.body,!e)throw Error(P(454));return e;default:throw Error(P(451))}}function Cd(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);C1(e)}var ei=new Map,tO=new Set;function Pg(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Qs=Ge.d;Ge.d={f:oV,r:lV,D:cV,C:uV,L:fV,m:dV,X:mV,S:hV,M:pV};function oV(){var e=Qs.f(),t=_b();return e||t}function lV(e){var t=Hu(e);t!==null&&t.tag===5&&t.type==="form"?PI(t):Qs.r(e)}var Gu=typeof document>"u"?null:document;function Y$(e,t,n){var r=Gu;if(r&&typeof t=="string"&&t){var i=qr(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),tO.has(i)||(tO.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement("link"),kn(t,"link",e),ln(t),r.head.appendChild(t)))}}function cV(e){Qs.D(e),Y$("dns-prefetch",e,null)}function uV(e,t){Qs.C(e,t),Y$("preconnect",e,t)}function fV(e,t,n){Qs.L(e,t,n);var r=Gu;if(r&&e&&t){var i='link[rel="preload"][as="'+qr(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+qr(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+qr(n.imageSizes)+'"]')):i+='[href="'+qr(e)+'"]';var s=i;switch(t){case"style":s=hu(e);break;case"script":s=Yu(e)}ei.has(s)||(e=vt({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),ei.set(s,e),r.querySelector(i)!==null||t==="style"&&r.querySelector(Yh(s))||t==="script"&&r.querySelector(Jh(s))||(t=r.createElement("link"),kn(t,"link",e),ln(t),r.head.appendChild(t)))}}function dV(e,t){Qs.m(e,t);var n=Gu;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+qr(r)+'"][href="'+qr(e)+'"]',s=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Yu(e)}if(!ei.has(s)&&(e=vt({rel:"modulepreload",href:e},t),ei.set(s,e),n.querySelector(i)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Jh(s)))return}r=n.createElement("link"),kn(r,"link",e),ln(r),n.head.appendChild(r)}}}function hV(e,t,n){Qs.S(e,t,n);var r=Gu;if(r&&e){var i=Lc(r).hoistableStyles,s=hu(e);t=t||"default";var a=i.get(s);if(!a){var o={loading:0,preload:null};if(a=r.querySelector(Yh(s)))o.loading=5;else{e=vt({rel:"stylesheet",href:e,"data-precedence":t},n),(n=ei.get(s))&&fk(e,n);var l=a=r.createElement("link");ln(l),kn(l,"link",e),l._p=new Promise(function(c,f){l.onload=c,l.onerror=f}),l.addEventListener("load",function(){o.loading|=1}),l.addEventListener("error",function(){o.loading|=2}),o.loading|=4,jp(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:o},i.set(s,a)}}}function mV(e,t){Qs.X(e,t);var n=Gu;if(n&&e){var r=Lc(n).hoistableScripts,i=Yu(e),s=r.get(i);s||(s=n.querySelector(Jh(i)),s||(e=vt({src:e,async:!0},t),(t=ei.get(i))&&dk(e,t),s=n.createElement("script"),ln(s),kn(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},r.set(i,s))}}function pV(e,t){Qs.M(e,t);var n=Gu;if(n&&e){var r=Lc(n).hoistableScripts,i=Yu(e),s=r.get(i);s||(s=n.querySelector(Jh(i)),s||(e=vt({src:e,async:!0,type:"module"},t),(t=ei.get(i))&&dk(e,t),s=n.createElement("script"),ln(s),kn(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},r.set(i,s))}}function nO(e,t,n,r){var i=(i=Aa.current)?Pg(i):null;if(!i)throw Error(P(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=hu(n.href),n=Lc(i).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,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=hu(n.href);var s=Lc(i).hoistableStyles,a=s.get(e);if(a||(i=i.ownerDocument||i,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,a),(s=i.querySelector(Yh(e)))&&!s._p&&(a.instance=s,a.state.loading=5),ei.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},ei.set(e,n),s||gV(i,e,n,a.state))),t&&r===null)throw Error(P(528,""));return a}if(t&&r!==null)throw Error(P(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Yu(n),n=Lc(i).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(P(444,e))}}function hu(e){return'href="'+qr(e)+'"'}function Yh(e){return'link[rel="stylesheet"]['+e+"]"}function J$(e){return vt({},e,{"data-precedence":e.precedence,precedence:null})}function gV(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),kn(t,"link",n),ln(t),e.head.appendChild(t))}function Yu(e){return'[src="'+qr(e)+'"]'}function Jh(e){return"script[async]"+e}function rO(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+qr(n.href)+'"]');if(r)return t.instance=r,ln(r),r;var i=vt({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),ln(r),kn(r,"style",i),jp(r,n.precedence,e),t.instance=r;case"stylesheet":i=hu(n.href);var s=e.querySelector(Yh(i));if(s)return t.state.loading|=4,t.instance=s,ln(s),s;r=J$(n),(i=ei.get(i))&&fk(r,i),s=(e.ownerDocument||e).createElement("link"),ln(s);var a=s;return a._p=new Promise(function(o,l){a.onload=o,a.onerror=l}),kn(s,"link",r),t.state.loading|=4,jp(s,n.precedence,e),t.instance=s;case"script":return s=Yu(n.src),(i=e.querySelector(Jh(s)))?(t.instance=i,ln(i),i):(r=n,(i=ei.get(s))&&(r=vt({},n),dk(r,i)),e=e.ownerDocument||e,i=e.createElement("script"),ln(i),kn(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(P(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,jp(r,n.precedence,e));return t.instance}function jp(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,s=i,a=0;a<r.length;a++){var o=r[a];if(o.dataset.precedence===t)s=o;else if(s!==i)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function fk(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function dk(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Fp=null;function iO(e,t,n){if(Fp===null){var r=new Map,i=Fp=new Map;i.set(n,r)}else i=Fp,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 s=n[i];if(!(s[Bh]||s[bn]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var a=s.getAttribute(t)||"";a=e+a;var o=r.get(a);o?o.push(s):r.set(a,[s])}}return r}function sO(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function yV(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 Q$(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function bV(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var i=hu(r.href),s=t.querySelector(Yh(i));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ug.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,ln(s);return}s=t.ownerDocument||t,r=J$(r),(i=ei.get(i))&&fk(r,i),s=s.createElement("link"),ln(s);var a=s;a._p=new Promise(function(o,l){a.onload=o,a.onerror=l}),kn(s,"link",r),n.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Ug.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var GS=0;function vV(e,t){return e.stylesheets&&e.count===0&&Pp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Pp(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&GS===0&&(GS=62500*Zq());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Pp(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>GS?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Ug(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Pp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Bg=null;function Pp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Bg=new Map,t.forEach(SV,e),Bg=null,Ug.call(e))}function SV(e,t){if(!(t.state.loading&4)){var n=Bg.get(e);if(n)var r=n.get(null);else{n=new Map,Bg.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<i.length;s++){var a=i[s];(a.nodeName==="LINK"||a.getAttribute("media")!=="not all")&&(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}i=t.instance,a=i.getAttribute("data-precedence"),s=n.get(a)||r,s===r&&n.set(null,i),n.set(a,i),this.count++,r=Ug.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),s?s.parentNode.insertBefore(i,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ih={$$typeof:Cs,Provider:null,Consumer:null,_currentValue:Jo,_currentValue2:Jo,_threadCount:0};function wV(e,t,n,r,i,s,a,o,l){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=gS(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gS(0),this.hiddenUpdates=gS(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=s,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function X$(e,t,n,r,i,s,a,o,l,c,f,u){return e=new wV(e,t,n,a,l,c,f,u,o),t=1,s===!0&&(t|=24),s=yr(3,null,null,t),e.current=s,s.stateNode=e,t=j1(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:r,isDehydrated:n,cache:t},U1(s),e}function W$(e){return e?(e=Tc,e):Tc}function Z$(e,t,n,r,i,s){i=W$(i),r.context===null?r.context=i:r.pendingContext=i,r=Ra(t),r.payload={element:n},s=s===void 0?null:s,s!==null&&(r.callback=s),n=Ma(e,r,t),n!==null&&(rr(n,e,t),bd(n,e,t))}function aO(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hk(e,t){aO(e,t),(e=e.alternate)&&aO(e,t)}function eL(e){if(e.tag===13||e.tag===31){var t=Il(e,67108864);t!==null&&rr(t,e,67108864),hk(e,67108864)}}function oO(e){if(e.tag===13||e.tag===31){var t=kr();t=k1(t);var n=Il(e,t);n!==null&&rr(n,e,t),hk(e,t)}}var Hg=!0;function xV(e,t,n,r){var i=ye.T;ye.T=null;var s=Ge.p;try{Ge.p=2,mk(e,t,n,r)}finally{Ge.p=s,ye.T=i}}function _V(e,t,n,r){var i=ye.T;ye.T=null;var s=Ge.p;try{Ge.p=8,mk(e,t,n,r)}finally{Ge.p=s,ye.T=i}}function mk(e,t,n,r){if(Hg){var i=ix(r);if(i===null)VS(e,t,r,qg,n),lO(e,r);else if(EV(i,e,t,n,r))r.stopPropagation();else if(lO(e,r),t&4&&-1<kV.indexOf(e)){for(;i!==null;){var s=Hu(i);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var a=Io(s.pendingLanes);if(a!==0){var o=s;for(o.pendingLanes|=2,o.entangledLanes|=2;a;){var l=1<<31-_r(a);o.entanglements[1]|=l,a&=~l}ns(s),!(Ke&6)&&(Dg=wr()+500,Gh(0))}}break;case 31:case 13:o=Il(s,2),o!==null&&rr(o,s,2),_b(),hk(s,2)}if(s=ix(r),s===null&&VS(e,t,r,qg,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else VS(e,t,r,null,n)}}function ix(e){return e=A1(e),pk(e)}var qg=null;function pk(e){if(qg=null,e=wc(e),e!==null){var t=jh(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Sz(t),e!==null)return e;e=null}else if(n===31){if(e=wz(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 qg=e,null}function tL(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"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(c9()){case Ez:return 2;case Cz:return 8;case vg:case u9:return 32;case Tz:return 268435456;default:return 32}default:return 32}}var sx=!1,za=null,Ia=null,$a=null,sh=new Map,ah=new Map,ba=[],kV="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 lO(e,t){switch(e){case"focusin":case"focusout":za=null;break;case"dragenter":case"dragleave":Ia=null;break;case"mouseover":case"mouseout":$a=null;break;case"pointerover":case"pointerout":sh.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ah.delete(t.pointerId)}}function $f(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Hu(t),t!==null&&eL(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function EV(e,t,n,r,i){switch(t){case"focusin":return za=$f(za,e,t,n,r,i),!0;case"dragenter":return Ia=$f(Ia,e,t,n,r,i),!0;case"mouseover":return $a=$f($a,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return sh.set(s,$f(sh.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,ah.set(s,$f(ah.get(s)||null,e,t,n,r,i)),!0}return!1}function nL(e){var t=wc(e.target);if(t!==null){var n=jh(t);if(n!==null){if(t=n.tag,t===13){if(t=Sz(n),t!==null){e.blockedOn=t,KT(e.priority,function(){oO(n)});return}}else if(t===31){if(t=wz(n),t!==null){e.blockedOn=t,KT(e.priority,function(){oO(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 Up(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ix(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);_w=r,n.target.dispatchEvent(r),_w=null}else return t=Hu(n),t!==null&&eL(t),e.blockedOn=n,!1;t.shift()}return!0}function cO(e,t,n){Up(e)&&n.delete(t)}function CV(){sx=!1,za!==null&&Up(za)&&(za=null),Ia!==null&&Up(Ia)&&(Ia=null),$a!==null&&Up($a)&&($a=null),sh.forEach(cO),ah.forEach(cO)}function Wm(e,t){e.blockedOn===t&&(e.blockedOn=null,sx||(sx=!0,Zt.unstable_scheduleCallback(Zt.unstable_NormalPriority,CV)))}var Zm=null;function uO(e){Zm!==e&&(Zm=e,Zt.unstable_scheduleCallback(Zt.unstable_NormalPriority,function(){Zm===e&&(Zm=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(pk(r||n)===null)continue;break}var s=Hu(n);s!==null&&(e.splice(t,3),t-=3,Fw(s,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function mu(e){function t(l){return Wm(l,e)}za!==null&&Wm(za,e),Ia!==null&&Wm(Ia,e),$a!==null&&Wm($a,e),sh.forEach(t),ah.forEach(t);for(var n=0;n<ba.length;n++){var r=ba[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<ba.length&&(n=ba[0],n.blockedOn===null);)nL(n),n.blockedOn===null&&ba.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],s=n[r+1],a=i[ir]||null;if(typeof s=="function")a||uO(n);else if(a){var o=null;if(s&&s.hasAttribute("formAction")){if(i=s,a=s[ir]||null)o=a.formAction;else if(pk(i)!==null)continue}else o=a.action;typeof o=="function"?n[r+1]=o:(n.splice(r,3),r-=3),uO(n)}}}function rL(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(a){return i=a})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.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 gk(e){this._internalRoot=e}Cb.prototype.render=gk.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));var n=t.current,r=kr();Z$(n,r,e,t,null,null)};Cb.prototype.unmount=gk.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Z$(e.current,2,null,e,null,null),_b(),t[Bu]=null}};function Cb(e){this._internalRoot=e}Cb.prototype.unstable_scheduleHydration=function(e){if(e){var t=Nz();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ba.length&&t!==0&&t<ba[n].priority;n++);ba.splice(n,0,e),n===0&&nL(e)}};var fO=bz.version;if(fO!=="19.2.4")throw Error(P(527,fO,"19.2.4"));Ge.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=n9(t),e=e!==null?xz(e):null,e=e===null?null:e.stateNode,e};var TV={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:ye,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ep=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ep.isDisabled&&ep.supportsFiber)try{Fh=ep.inject(TV),xr=ep}catch{}}cb.createRoot=function(e,t){if(!vz(e))throw Error(P(299));var n=!1,r="",i=YI,s=JI,a=QI;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=X$(e,1,!1,null,null,n,r,null,i,s,a,rL),e[Bu]=t.current,uk(e),new gk(t)};cb.hydrateRoot=function(e,t,n){if(!vz(e))throw Error(P(299));var r=!1,i="",s=YI,a=JI,o=QI,l=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(a=n.onCaughtError),n.onRecoverableError!==void 0&&(o=n.onRecoverableError),n.formState!==void 0&&(l=n.formState)),t=X$(e,1,!0,t,n??null,r,i,l,s,a,o,rL),t.context=W$(null),n=t.current,r=kr(),r=k1(r),i=Ra(r),i.callback=null,Ma(n,i,r),n=r,t.current.lanes=n,Uh(t,n),ns(t),e[Bu]=t.current,uk(e),new Cb(t)};cb.version="19.2.4";function iL(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(iL)}catch(e){console.error(e)}}iL(),dz.exports=cb;var AV=dz.exports;const OV=Lh(AV),RV=e=>typeof e=="function",E=function(e,t){if(typeof e=="function")return function(){return e(arguments)?t.apply(this,arguments):n=>t(n,...arguments)};switch(e){case 0:case 1:throw new RangeError(`Invalid arity ${e}`);case 2:return function(n,r){return arguments.length>=2?t(n,r):function(i){return t(i,n)}};case 3:return function(n,r,i){return arguments.length>=3?t(n,r,i):function(s){return t(s,n,r)}};case 4:return function(n,r,i,s){return arguments.length>=4?t(n,r,i,s):function(a){return t(a,n,r,i)}};case 5:return function(n,r,i,s,a){return arguments.length>=5?t(n,r,i,s,a):function(o){return t(o,n,r,i,s)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);const n=arguments;return function(r){return t(r,...n)}}}},ge=e=>e,Qh=e=>()=>e,ax=Qh(!0),La=Qh(!1),MV=Qh(null),sL=Qh(void 0),pu=sL;function O(e,t,n,r,i,s,a,o,l){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return i(r(n(t(e))));case 6:return s(i(r(n(t(e)))));case 7:return a(s(i(r(n(t(e))))));case 8:return o(a(s(i(r(n(t(e)))))));case 9:return l(o(a(s(i(r(n(t(e))))))));default:{let c=arguments[0];for(let f=1;f<arguments.length;f++)c=arguments[f](c);return c}}}const tp="effect/GlobalValue";let Lf;const pe=(e,t)=>(Lf||(globalThis[tp]??(globalThis[tp]=new Map),Lf=globalThis[tp]),Lf.has(e)||Lf.set(e,t()),Lf.get(e)),ti=e=>typeof e=="string",Hs=e=>typeof e=="number",oh=e=>typeof e=="boolean",Tb=e=>typeof e=="bigint",ox=e=>typeof e=="symbol",Ju=RV,NV=e=>e===void 0,DV=e=>!1,yk=e=>typeof e=="object"&&e!==null,wi=e=>yk(e)||Ju(e),ue=E(2,(e,t)=>wi(e)&&t in e),aL=E(2,(e,t)=>ue(e,"_tag")&&e._tag===t),Wl=e=>e==null,zV=e=>e!=null,IV=e=>e instanceof Uint8Array,oL=e=>e instanceof Date,lL=e=>typeof e=="string"||ue(e,Symbol.iterator),$V=e=>yk(e)&&!Array.isArray(e),LV=e=>ue(e,"then")&&Ju(e.then),Ab=e=>`BUG: ${e} - please report an issue at https://github.com/Effect-TS/effect/issues`;let cL=class uL{constructor(t){g(this,"self");g(this,"called",!1);this.self=t}next(t){return this.called?{value:t,done:!0}:(this.called=!0,{value:this.self,done:!1})}return(t){return{value:t,done:!0}}throw(t){throw t}[Symbol.iterator](){return new uL(this.self)}};const jV=335903614,FV=4150755663,PV=1481765933,UV=1284865837,BV=9007199254740992,HV=134217728;class qV{constructor(t,n,r,i){g(this,"_state");return Wl(n)&&Wl(t)?(n=Math.random()*4294967295>>>0,t=0):Wl(n)&&(n=t,t=0),Wl(i)&&Wl(r)?(i=this._state?this._state[3]:FV,r=this._state?this._state[2]:jV):Wl(i)&&(i=r,r=0),this._state=new Int32Array([0,0,r>>>0,((i||0)|1)>>>0]),this._next(),dO(this._state,this._state[0],this._state[1],t>>>0,n>>>0),this._next(),this}getState(){return[this._state[0],this._state[1],this._state[2],this._state[3]]}setState(t){this._state[0]=t[0],this._state[1]=t[1],this._state[2]=t[2],this._state[3]=t[3]|1}integer(t){return Math.round(this.number()*Number.MAX_SAFE_INTEGER)%t}number(){const t=(this._next()&67108863)*1,n=(this._next()&134217727)*1;return(t*HV+n)/BV}_next(){const t=this._state[0]>>>0,n=this._state[1]>>>0;VV(this._state,t,n,PV,UV),dO(this._state,this._state[0],this._state[1],this._state[2],this._state[3]);let r=t>>>18,i=(n>>>18|t<<14)>>>0;r=(r^t)>>>0,i=(i^n)>>>0;const s=(i>>>27|r<<5)>>>0,a=t>>>27,o=(-a>>>0&31)>>>0;return(s>>>a|s<<o)>>>0}}function VV(e,t,n,r,i){let s=(n>>>16)*(i&65535)>>>0,a=(n&65535)*(i>>>16)>>>0,o=(n&65535)*(i&65535)>>>0,l=(n>>>16)*(i>>>16)+((a>>>16)+(s>>>16))>>>0;a=a<<16>>>0,o=o+a>>>0,o>>>0<a>>>0&&(l=l+1>>>0),s=s<<16>>>0,o=o+s>>>0,o>>>0<s>>>0&&(l=l+1>>>0),l=l+Math.imul(n,r)>>>0,l=l+Math.imul(t,i)>>>0,e[0]=l,e[1]=o}function dO(e,t,n,r,i){let s=t+r>>>0;const a=n+i>>>0;a>>>0<n>>>0&&(s=s+1|0),e[0]=s,e[1]=a}const lx=Symbol.for("effect/Utils/YieldWrap");var $h;class Xh{constructor(t){uS(this,$h);jm(this,$h,t)}[lx](){return Lm(this,$h)}}$h=new WeakMap;function KV(e){if(typeof e=="object"&&e!==null&&lx in e)return e[lx]();throw new Error(Ab("yieldWrapGet"))}const zr=pe("effect/Utils/isStructuralRegion",()=>({enabled:!1,tester:void 0})),fL={effect_internal_function:e=>e()},GV={effect_internal_function:e=>{try{return e()}finally{}}};var zN;const YV=((zN=fL.effect_internal_function(()=>new Error().stack))==null?void 0:zN.includes("effect_internal_function"))===!0,gn=YV?fL.effect_internal_function:GV.effect_internal_function,YS=pe(Symbol.for("effect/Hash/randomHashCache"),()=>new WeakMap),be=Symbol.for("effect/Hash"),re=e=>{if(zr.enabled===!0)return 0;switch(typeof e){case"number":return vk(e);case"bigint":return gt(e.toString(10));case"boolean":return gt(String(e));case"symbol":return gt(String(e));case"string":return gt(e);case"undefined":return gt("undefined");case"function":case"object":return e===null?gt("null"):e instanceof Date?Number.isNaN(e.getTime())?gt("Invalid Date"):re(e.toISOString()):e instanceof URL?re(e.href):JV(e)?e[be]():bk(e);default:throw new Error(`BUG: unhandled typeof ${typeof e} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},bk=e=>(YS.has(e)||YS.set(e,vk(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))),YS.get(e)),Se=e=>t=>t*53^e,Ob=e=>e&3221225471|e>>>1&1073741824,JV=e=>ue(e,be),vk=e=>{if(e!==e||e===1/0)return 0;let t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)t^=e/=4294967295;return Ob(t)},gt=e=>{let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return Ob(t)},QV=(e,t)=>{let n=12289;for(let r=0;r<t.length;r++)n^=O(gt(t[r]),Se(re(e[t[r]])));return Ob(n)},dL=e=>QV(e,Object.keys(e)),Qu=e=>{let t=6151;for(let n=0;n<e.length;n++)t=O(t,Se(re(e[n])));return Ob(t)},tt=function(){if(arguments.length===1){const n=arguments[0];return function(r){return Object.defineProperty(n,be,{value(){return r},enumerable:!1}),r}}const e=arguments[0],t=arguments[1];return Object.defineProperty(e,be,{value(){return t},enumerable:!1}),t},ve=Symbol.for("effect/Equal");function oe(){return arguments.length===1?e=>Vg(e,arguments[0]):Vg(arguments[0],arguments[1])}function Vg(e,t){if(e===t)return!0;const n=typeof e;if(n!==typeof t)return!1;if(n==="object"||n==="function"){if(e!==null&&t!==null){if(lh(e)&&lh(t))return re(e)===re(t)&&e[ve](t)?!0:zr.enabled&&zr.tester?zr.tester(e,t):!1;if(e instanceof Date&&t instanceof Date){const r=e.getTime(),i=t.getTime();return r===i||Number.isNaN(r)&&Number.isNaN(i)}else if(e instanceof URL&&t instanceof URL)return e.href===t.href}if(zr.enabled){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((r,i)=>Vg(r,t[i]));if(Object.getPrototypeOf(e)===Object.prototype&&Object.getPrototypeOf(t)===Object.prototype){const r=Object.keys(e),i=Object.keys(t);if(r.length===i.length){for(const s of r)if(!(s in t&&Vg(e[s],t[s])))return zr.tester?zr.tester(e,t):!1;return!0}}return zr.tester?zr.tester(e,t):!1}}return zr.enabled&&zr.tester?zr.tester(e,t):!1}const lh=e=>ue(e,ve),Sk=()=>oe,Pe=Symbol.for("nodejs.util.inspect.custom"),wt=e=>{try{if(ue(e,"toJSON")&&Ju(e.toJSON)&&e.toJSON.length===0)return e.toJSON();if(Array.isArray(e))return e.map(wt)}catch{return{}}return wk(e)},JS="[Circular]";function hL(e){try{return e.toISOString()}catch{return"Invalid Date"}}function XV(e){try{const t=e.toString();return typeof t=="string"?t:String(t)}catch{return"[toString threw]"}}function Rb(e){return ti(e)?JSON.stringify(e):String(e)}function Xs(e,t){const n=new WeakSet,r=(a,o)=>{const l=a==null?void 0:a.constructor;return l&&l!==Object.prototype.constructor&&l.name?`${l.name}(${o})`:o},i=a=>{try{return Reflect.ownKeys(a)}catch{return["[ownKeys threw]"]}};function s(a,o=0){if(Array.isArray(a))return n.has(a)?JS:(n.add(a),`[${a.map(l=>s(l,o)).join(",")}]`);if(oL(a))return hL(a);if(ue(a,"toString")&&Ju(a.toString)&&a.toString!==Object.prototype.toString&&a.toString!==Array.prototype.toString){const l=XV(a);return a instanceof Error&&a.cause?`${l} (cause: ${s(a.cause,o)})`:l}if(ti(a))return JSON.stringify(a);if(Hs(a)||a==null||oh(a)||ox(a))return String(a);if(Tb(a))return String(a)+"n";if(a instanceof Set||a instanceof Map)return n.has(a)?JS:(n.add(a),`${a.constructor.name}(${s(Array.from(a),o)})`);if(wi(a)){if(n.has(a))return JS;n.add(a);const l=i(a);{const c=`{${l.map(f=>`${Rb(f)}:${s(a[f],o)}`).join(",")}}`;return r(a,c)}}return String(a)}return s(e,0)}const it=e=>JSON.stringify(e,null,2),Mb={toJSON(){return wt(this)},[Pe](){return this.toJSON()},toString(){return it(this.toJSON())}};let WV=class{[Pe](){return this.toJSON()}toString(){return it(this.toJSON())}};const gu=(e,t=2)=>{if(typeof e=="string")return e;try{return typeof e=="object"?mL(e,t):String(e)}catch{return String(e)}},mL=(e,t)=>{let n=[];const r=JSON.stringify(e,(i,s)=>typeof s=="object"&&s!==null?n.includes(s)?void 0:n.push(s)&&(el.fiberRefs!==void 0&&pL(s)?s[Nb](el.fiberRefs):s):s,t);return n=void 0,r},Nb=Symbol.for("effect/Inspectable/Redactable"),pL=e=>typeof e=="object"&&e!==null&&Nb in e,el=pe("effect/Inspectable/redactableState",()=>({fiberRefs:void 0})),ZV=(e,t)=>{const n=el.fiberRefs;el.fiberRefs=e;try{return t()}finally{el.fiberRefs=n}},wk=e=>pL(e)&&el.fiberRefs!==void 0?e[Nb](el.fiberRefs):e,ie=(e,t)=>{switch(t.length){case 0:return e;case 1:return t[0](e);case 2:return t[1](t[0](e));case 3:return t[2](t[1](t[0](e)));case 4:return t[3](t[2](t[1](t[0](e))));case 5:return t[4](t[3](t[2](t[1](t[0](e)))));case 6:return t[5](t[4](t[3](t[2](t[1](t[0](e))))));case 7:return t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))));case 8:return t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e))))))));case 9:return t[8](t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))))));default:{let n=e;for(let r=0,i=t.length;r<i;r++)n=t[r](n);return n}}},Td="Async",Db="Commit",un="Failure",Bp="OnFailure",Kg="OnSuccess",Gg="OnSuccessAndFailure",fn="Success",gL="Sync",e7="Tag",Xu="UpdateRuntimeFlags",Yg="While",Ad="Iterator",yL="WithRuntime",Hp="Yield",xk="RevertFlags";let t7="3.19.16";const _k=()=>t7,n7=Symbol.for("effect/Effect"),r7=Symbol.for("effect/Stream"),i7=Symbol.for("effect/Sink"),s7=Symbol.for("effect/Channel"),yu={_R:e=>e,_E:e=>e,_A:e=>e,_V:_k()},a7={_A:e=>e,_In:e=>e,_L:e=>e,_E:e=>e,_R:e=>e},o7={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutElem:e=>e,_OutDone:e=>e},Wh={[n7]:yu,[r7]:yu,[i7]:a7,[s7]:o7,[ve](e){return this===e},[be](){return tt(this,bk(this))},[Symbol.iterator](){return new cL(new Xh(this))},pipe(){return ie(this,arguments)}},zb={[be](){return tt(this,dL(this))},[ve](e){const t=Object.keys(this),n=Object.keys(e);if(t.length!==n.length)return!1;for(const r of t)if(!(r in e&&oe(this[r],e[r])))return!1;return!0}},Zh={...Wh,_op:Db},l7={...Zh,...zb},c7=function(){function e(){}return e.prototype=Zh,e}(),bL=Symbol.for("effect/Option"),vL={...Wh,[bL]:{_A:e=>e},[Pe](){return this.toJSON()},toString(){return it(this.toJSON())}},u7=Object.assign(Object.create(vL),{_tag:"Some",_op:"Some",[ve](e){return SL(e)&&xL(e)&&oe(this.value,e.value)},[be](){return tt(this,Se(re(this._tag))(re(this.value)))},toJSON(){return{_id:"Option",_tag:this._tag,value:wt(this.value)}}}),f7=re("None"),d7=Object.assign(Object.create(vL),{_tag:"None",_op:"None",[ve](e){return SL(e)&&wL(e)},[be](){return f7},toJSON(){return{_id:"Option",_tag:this._tag}}}),SL=e=>ue(e,bL),wL=e=>e._tag==="None",xL=e=>e._tag==="Some",kk=Object.create(d7),Jg=e=>{const t=Object.create(u7);return t.value=e,t},_L=Symbol.for("effect/Context/Tag"),Qg=Symbol.for("effect/Context/Reference"),h7="effect/STM",m7=Symbol.for(h7),Ek={...Wh,_op:"Tag",[m7]:yu,[_L]:{_Service:e=>e,_Identifier:e=>e},toString(){return it(this.toJSON())},toJSON(){return{_id:"Tag",key:this.key,stack:this.stack}},[Pe](){return this.toJSON()},of(e){return e},context(e){return CL(this,e)}},p7={...Ek,[Qg]:Qg},g7=e=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=2;const n=new Error;Error.stackTraceLimit=t;const r=Object.create(Ek);return Object.defineProperty(r,"stack",{get(){return n.stack}}),r.key=e,r},y7=e=>()=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=2;const n=new Error;Error.stackTraceLimit=t;function r(){}return Object.setPrototypeOf(r,Ek),r.key=e,Object.defineProperty(r,"stack",{get(){return n.stack}}),r},b7=()=>(e,t)=>{const n=Error.stackTraceLimit;Error.stackTraceLimit=2;const r=new Error;Error.stackTraceLimit=n;function i(){}return Object.setPrototypeOf(i,p7),i.key=e,i.defaultValue=t.defaultValue,Object.defineProperty(i,"stack",{get(){return r.stack}}),i},kL=Symbol.for("effect/Context"),v7={[kL]:{_Services:e=>e},[ve](e){if(EL(e)&&this.unsafeMap.size===e.unsafeMap.size){for(const t of this.unsafeMap.keys())if(!e.unsafeMap.has(t)||!oe(this.unsafeMap.get(t),e.unsafeMap.get(t)))return!1;return!0}return!1},[be](){return tt(this,vk(this.unsafeMap.size))},pipe(){return ie(this,arguments)},toString(){return it(this.toJSON())},toJSON(){return{_id:"Context",services:Array.from(this.unsafeMap).map(wt)}},[Pe](){return this.toJSON()}},Wa=e=>{const t=Object.create(v7);return t.unsafeMap=e,t},S7=e=>{const t=new Error(`Service not found${e.key?`: ${String(e.key)}`:""}`);if(e.stack){const n=e.stack.split(`
|
|
50
|
+
`);if(n.length>2){const r=n[2].match(/at (.*)/);r&&(t.message=t.message+` (defined at ${r[1]})`)}}if(t.stack){const n=t.stack.split(`
|
|
51
|
+
`);n.splice(1,3),t.stack=n.join(`
|
|
52
|
+
`)}return t},EL=e=>ue(e,kL),w7=e=>ue(e,_L),x7=e=>ue(e,Qg),_7=Wa(new Map),k7=()=>_7,CL=(e,t)=>Wa(new Map([[e.key,t]])),E7=E(3,(e,t,n)=>{const r=new Map(e.unsafeMap);return r.set(t.key,n),Wa(r)}),QS=pe("effect/Context/defaultValueCache",()=>new Map),Ck=e=>{if(QS.has(e.key))return QS.get(e.key);const t=e.defaultValue();return QS.set(e.key,t),t},C7=(e,t)=>e.unsafeMap.has(t.key)?e.unsafeMap.get(t.key):Ck(t),TL=E(2,(e,t)=>{if(!e.unsafeMap.has(t.key)){if(Qg in t)return Ck(t);throw S7(t)}return e.unsafeMap.get(t.key)}),T7=TL,A7=E(2,(e,t)=>e.unsafeMap.has(t.key)?Jg(e.unsafeMap.get(t.key)):x7(t)?Jg(Ck(t)):kk),O7=E(2,(e,t)=>{const n=new Map(e.unsafeMap);for(const[r,i]of t.unsafeMap)n.set(r,i);return Wa(n)}),R7=(...e)=>{const t=new Map;for(let n=0;n<e.length;n++)e[n].unsafeMap.forEach((r,i)=>{t.set(i,r)});return Wa(t)},mo=g7,M7=Wa,N7=EL,AL=w7,Xi=k7,Tk=CL,Gr=E7,$s=T7,OL=TL,Wu=A7,sr=O7,D7=R7,Ak=y7,Zu=b7,Ok=e=>(t,n)=>t===n||e(t,n),z7=(e,t)=>e===t,I7=()=>z7,$7=I7(),RL=E(2,(e,t)=>Ok((n,r)=>e(t(n),t(r)))),L7=RL($7,e=>e.getTime()),j7=e=>Ok((t,n)=>{if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1;return!0}),Rk=Symbol.for("effect/Either"),ML={...Wh,[Rk]:{_R:e=>e},[Pe](){return this.toJSON()},toString(){return it(this.toJSON())}},F7=Object.assign(Object.create(ML),{_tag:"Right",_op:"Right",[ve](e){return Mk(e)&&DL(e)&&oe(this.right,e.right)},[be](){return Se(re(this._tag))(re(this.right))},toJSON(){return{_id:"Either",_tag:this._tag,right:wt(this.right)}}}),P7=Object.assign(Object.create(ML),{_tag:"Left",_op:"Left",[ve](e){return Mk(e)&&NL(e)&&oe(this.left,e.left)},[be](){return Se(re(this._tag))(re(this.left))},toJSON(){return{_id:"Either",_tag:this._tag,left:wt(this.left)}}}),Mk=e=>ue(e,Rk),NL=e=>e._tag==="Left",DL=e=>e._tag==="Right",U7=e=>{const t=Object.create(P7);return t.left=e,t},B7=e=>{const t=Object.create(F7);return t.right=e,t},H7=Rk,de=B7,me=U7,q7=e=>{if(Ju(e))try{return de(e())}catch(t){return me(t)}else try{return de(e.try())}catch(t){return me(e.catch(t))}},zL=Mk,an=NL,Fi=DL,V7=E(2,(e,{onLeft:t,onRight:n})=>an(e)?me(t(e.left)):de(n(e.right))),K7=E(2,(e,t)=>an(e)?me(t(e.left)):de(e.right)),G7=E(2,(e,t)=>Fi(e)?de(t(e.right)):me(e.left)),tr=E(2,(e,{onLeft:t,onRight:n})=>an(e)?t(e.left):n(e.right)),Y7=tr({onLeft:ge,onRight:ge}),IL=E(2,(e,t)=>{if(Fi(e))return e.right;throw t(e.left)}),$L=IL(()=>new Error("getOrThrow called on a Left")),LL=e=>e.length>0,jL=e=>(t,n)=>t===n?0:e(t,n),J7=jL((e,t)=>e<t?-1:1),FL=E(2,(e,t)=>jL((n,r)=>e(t(n),t(r)))),Q7=e=>E(2,(t,n)=>e(t,n)===1),X7=Symbol.for("effect/Option"),V=()=>kk,X=Jg,Vt=wL,dt=xL,Dt=E(2,(e,{onNone:t,onSome:n})=>Vt(e)?t():n(e.value)),lt=E(2,(e,t)=>Vt(e)?t():e.value),Ki=E(2,(e,t)=>Vt(e)?t():e),W7=E(2,(e,t)=>Vt(e)?X(t()):e),ef=e=>e==null?V():X(e),Z7=lt(MV),Ur=lt(sL),eK=e=>(...t)=>{try{return X(e(...t))}catch{return V()}},PL=E(2,(e,t)=>{if(dt(e))return e.value;throw t()}),tK=PL(()=>new Error("getOrThrow called on a None")),Bn=E(2,(e,t)=>Vt(e)?V():X(t(e.value))),po=E(2,(e,t)=>Vt(e)?V():t(e.value)),UL=E(2,(e,t)=>Vt(e)?V():ef(t(e.value))),nK=po,rK=E(2,(e,t)=>nK(e,n=>t(n)?Jg(n):kk)),iK=e=>E(2,(t,n)=>Vt(t)?!1:e(t.value,n)),sK=Sk(),aK=iK(sK),BL=E(2,(e,t)=>Vt(e)?!1:t(e.value)),oK=(...e)=>e,lK=()=>({}),cK=e=>HL(e).length===0,Mc=E(2,(e,t)=>{const n={...e};for(const r of HL(e))n[r]=t(e[r],r);return n}),HL=e=>Object.keys(e),uK=E(3,(e,t,n)=>({...e,[t]:n})),Ib=e=>new Array(e),fK=E(2,(e,t)=>{const n=Math.max(1,Math.floor(e)),r=new Array(n);for(let i=0;i<n;i++)r[i]=t(i);return r}),Ye=e=>Array.isArray(e)?e:Array.from(e),dK=e=>Array.isArray(e)?e:[e],hK=E(2,(e,{onEmpty:t,onNonEmpty:n})=>en(e)?n(Hn(e),fl(e)):t()),Xg=E(2,(e,t)=>[t,...e]),mK=E(2,(e,t)=>[...e,t]),Nk=E(2,(e,t)=>Ye(e).concat(Ye(t))),pK=Array.isArray,gK=e=>e.length===0,yK=gK,qc=LL,en=LL,qL=(e,t)=>e<0||e>=t.length,bK=(e,t)=>Math.floor(Math.min(Math.max(0,e),t.length)),vK=E(2,(e,t)=>{const n=Math.floor(t);return qL(n,e)?V():X(e[n])}),VL=E(2,(e,t)=>{const n=Math.floor(t);if(qL(n,e))throw new Error(`Index ${n} out of bounds`);return e[n]}),Od=vK(0),Hn=VL(0),SK=e=>en(e)?X(KL(e)):V(),KL=e=>e[e.length-1],fl=e=>e.slice(1),wK=(e,t)=>{let n=0;for(const r of e){if(!t(r,n))break;n++}return n},xK=E(2,(e,t)=>GL(e,wK(e,t))),_K=E(2,(e,t)=>{const n=Ye(e);return n.slice(bK(t,n),n.length)}),hO=e=>Array.from(e).reverse(),ch=E(2,(e,t)=>{const n=Array.from(e);return n.sort(t),n}),mO=E(2,(e,t)=>kK(e,t,oK)),kK=E(3,(e,t,n)=>{const r=Ye(e),i=Ye(t);if(en(r)&&en(i)){const s=[n(Hn(r),Hn(i))],a=Math.min(r.length,i.length);for(let o=1;o<a;o++)s[o]=n(r[o],i[o]);return s}return[]}),EK=Sk(),GL=E(2,(e,t)=>{const n=Array.from(e),r=Math.floor(t);return en(n)?r>=1?CK(n,r):[[],n]:[n,[]]}),CK=E(2,(e,t)=>{const n=Math.max(1,Math.floor(t));return n>=e.length?[rd(e),[]]:[Xg(e.slice(1,n),Hn(e)),e.slice(n)]}),rd=e=>e.slice(),TK=E(3,(e,t,n)=>{const r=Ye(e),i=Ye(t);return en(r)?en(i)?JL(n)(Nk(r,i)):r:i}),qp=E(2,(e,t)=>TK(e,t,EK)),Za=()=>[],ui=e=>[e],tl=E(2,(e,t)=>e.map(t)),Wg=E(2,(e,t)=>{if(yK(e))return[];const n=[];for(let r=0;r<e.length;r++){const i=t(e[r],r);for(let s=0;s<i.length;s++)n.push(i[s])}return n}),YL=Wg(ge),AK=E(2,(e,t)=>{const n=Ye(e),r=[];for(let i=0;i<n.length;i++)t(n[i],i)&&r.push(n[i]);return r}),Dk=E(3,(e,t,n)=>Ye(e).reduce((r,i,s)=>n(r,i,s),t)),pO=(e,t)=>{const n=[];let r=e,i;for(;dt(i=t(r));){const[s,a]=i.value;n.push(s),r=a}return n},$b=j7,JL=E(2,(e,t)=>{const n=Ye(e);if(en(n)){const r=[Hn(n)],i=fl(n);for(const s of i)r.every(a=>!t(s,a))&&r.push(s);return r}return[]}),OK=e=>JL(e,Sk()),tf=E(2,(e,t)=>Ye(e).join(t)),QL=Symbol.for("effect/Chunk");function RK(e,t,n,r,i){for(let s=t;s<Math.min(e.length,t+i);s++)n[r+s-t]=e[s];return n}const XL=[],WL=e=>Ok((t,n)=>t.length===n.length&&qn(t).every((r,i)=>e(r,ja(n,i)))),MK=WL(oe),NK={[QL]:{_A:e=>e},toString(){return it(this.toJSON())},toJSON(){return{_id:"Chunk",values:qn(this).map(wt)}},[Pe](){return this.toJSON()},[ve](e){return Lb(e)&&MK(this,e)},[be](){return tt(this,Qu(qn(this)))},[Symbol.iterator](){switch(this.backing._tag){case"IArray":return this.backing.array[Symbol.iterator]();case"IEmpty":return XL[Symbol.iterator]();default:return qn(this)[Symbol.iterator]()}},pipe(){return ie(this,arguments)}},_t=e=>{const t=Object.create(NK);switch(t.backing=e,e._tag){case"IEmpty":{t.length=0,t.depth=0,t.left=t,t.right=t;break}case"IConcat":{t.length=e.left.length+e.right.length,t.depth=1+Math.max(e.left.depth,e.right.depth),t.left=e.left,t.right=e.right;break}case"IArray":{t.length=e.array.length,t.depth=0,t.left=fi,t.right=fi;break}case"ISingleton":{t.length=1,t.depth=0,t.left=fi,t.right=fi;break}case"ISlice":{t.length=e.length,t.depth=e.chunk.depth+1,t.left=fi,t.right=fi;break}}return t},Lb=e=>ue(e,QL),fi=_t({_tag:"IEmpty"}),tn=()=>fi,XS=(...e)=>IK(e),Kt=e=>_t({_tag:"ISingleton",a:e}),qs=e=>Lb(e)?e:Ln(Ye(e)),cx=(e,t,n)=>{switch(e.backing._tag){case"IArray":{RK(e.backing.array,0,t,n,e.length);break}case"IConcat":{cx(e.left,t,n),cx(e.right,t,n+e.left.length);break}case"ISingleton":{t[n]=e.backing.a;break}case"ISlice":{let r=0,i=n;for(;r<e.length;)t[i]=ja(e,r),r+=1,i+=1;break}}},DK=e=>{switch(e.backing._tag){case"IEmpty":return XL;case"IArray":return e.backing.array;default:{const t=new Array(e.length);return cx(e,t,0),e.backing={_tag:"IArray",array:t},e.left=fi,e.right=fi,e.depth=0,t}}},qn=DK,zK=e=>{switch(e.backing._tag){case"IEmpty":case"ISingleton":return e;case"IArray":return _t({_tag:"IArray",array:hO(e.backing.array)});case"IConcat":return _t({_tag:"IConcat",left:Vs(e.backing.right),right:Vs(e.backing.left)});case"ISlice":return Ln(hO(qn(e)))}},Vs=zK,ZL=E(2,(e,t)=>t<0||t>=e.length?V():X(ja(e,t))),Ln=e=>e.length===0?tn():e.length===1?Kt(e[0]):_t({_tag:"IArray",array:e}),IK=e=>Ln(e),ja=E(2,(e,t)=>{switch(e.backing._tag){case"IEmpty":throw new Error("Index out of bounds");case"ISingleton":{if(t!==0)throw new Error("Index out of bounds");return e.backing.a}case"IArray":{if(t>=e.length||t<0)throw new Error("Index out of bounds");return e.backing.array[t]}case"IConcat":return t<e.left.length?ja(e.left,t):ja(e.right,t-e.left.length);case"ISlice":return ja(e.backing.chunk,t+e.backing.offset)}}),ux=E(2,(e,t)=>Bt(e,Kt(t))),Mn=E(2,(e,t)=>Bt(Kt(t),e)),Zg=E(2,(e,t)=>{if(t<=0)return fi;if(t>=e.length)return e;switch(e.backing._tag){case"ISlice":return _t({_tag:"ISlice",chunk:e.backing.chunk,length:t,offset:e.backing.offset});case"IConcat":return t>e.left.length?_t({_tag:"IConcat",left:e.left,right:Zg(e.right,t-e.left.length)}):Zg(e.left,t);default:return _t({_tag:"ISlice",chunk:e,offset:0,length:t})}}),ka=E(2,(e,t)=>{if(t<=0)return e;if(t>=e.length)return fi;switch(e.backing._tag){case"ISlice":return _t({_tag:"ISlice",chunk:e.backing.chunk,offset:e.backing.offset+t,length:e.backing.length-t});case"IConcat":return t>e.left.length?ka(e.right,t-e.left.length):_t({_tag:"IConcat",left:ka(e.left,t),right:e.right});default:return _t({_tag:"ISlice",chunk:e,offset:t,length:e.length-t})}}),Bt=E(2,(e,t)=>{if(e.backing._tag==="IEmpty")return t;if(t.backing._tag==="IEmpty")return e;const n=t.depth-e.depth;if(Math.abs(n)<=1)return _t({_tag:"IConcat",left:e,right:t});if(n<-1)if(e.left.depth>=e.right.depth){const r=Bt(e.right,t);return _t({_tag:"IConcat",left:e.left,right:r})}else{const r=Bt(e.right.right,t);if(r.depth===e.depth-3){const i=_t({_tag:"IConcat",left:e.right.left,right:r});return _t({_tag:"IConcat",left:e.left,right:i})}else{const i=_t({_tag:"IConcat",left:e.left,right:e.right.left});return _t({_tag:"IConcat",left:i,right:r})}}else if(t.right.depth>=t.left.depth){const r=Bt(e,t.left);return _t({_tag:"IConcat",left:r,right:t.right})}else{const r=Bt(e,t.left.left);if(r.depth===t.depth-3){const i=_t({_tag:"IConcat",left:r,right:t.left.right});return _t({_tag:"IConcat",left:i,right:t.right})}else{const i=_t({_tag:"IConcat",left:t.left.right,right:t.right});return _t({_tag:"IConcat",left:r,right:i})}}}),zk=E(2,(e,t)=>Ln(AK(e,t))),jb=e=>e.length===0,Ks=e=>e.length>0,Ik=ZL(0),$k=e=>ja(e,0),Pi=$k,$K=e=>ZL(e,e.length-1),LK=E(2,(e,t)=>e.backing._tag==="ISingleton"?Kt(t(e.backing.a,0)):Ln(O(qn(e),tl((n,r)=>t(n,r))))),Os=e=>ka(e,1),jK=E(2,(e,t)=>ka(e,e.length-t)),FK=Dk,dl=5,Lk=Math.pow(2,dl),PK=Lk-1,UK=Lk/2,BK=Lk/4;function HK(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,e&127}function bu(e,t){return t>>>e&PK}function Nc(e){return 1<<e}function ej(e,t){return HK(e&t-1)}const qK=(e,t)=>({value:e,previous:t});function Vc(e,t,n,r){let i=r;if(!e){const s=r.length;i=new Array(s);for(let a=0;a<s;++a)i[a]=r[a]}return i[t]=n,i}function tj(e,t,n){const r=n.length-1;let i=0,s=0,a=n;if(e)i=s=t;else for(a=new Array(r);i<t;)a[s++]=n[i++];for(++i;i<=r;)a[s++]=n[i++];return e&&(a.length=r),a}function VK(e,t,n,r){const i=r.length;if(e){let l=i;for(;l>=t;)r[l--]=r[l];return r[t]=n,r}let s=0,a=0;const o=new Array(i+1);for(;s<t;)o[a++]=r[s++];for(o[t]=n;s<i;)o[++a]=r[s++];return o}class eo{constructor(){g(this,"_tag","EmptyNode")}modify(t,n,r,i,s,a){const o=r(V());return Vt(o)?new eo:(++a.value,new nl(t,i,s,o))}}function gi(e){return aL(e,"EmptyNode")}function KK(e){return gi(e)||e._tag==="LeafNode"||e._tag==="CollisionNode"}function Fb(e,t){return gi(e)?!1:t===e.edit}class nl{constructor(t,n,r,i){g(this,"edit");g(this,"hash");g(this,"key");g(this,"value");g(this,"_tag","LeafNode");this.edit=t,this.hash=n,this.key=r,this.value=i}modify(t,n,r,i,s,a){if(oe(s,this.key)){const l=r(this.value);return l===this.value?this:Vt(l)?(--a.value,new eo):Fb(this,t)?(this.value=l,this):new nl(t,i,s,l)}const o=r(V());return Vt(o)?this:(++a.value,nj(t,n,this.hash,this,i,new nl(t,i,s,o)))}}class jk{constructor(t,n,r){g(this,"edit");g(this,"hash");g(this,"children");g(this,"_tag","CollisionNode");this.edit=t,this.hash=n,this.children=r}modify(t,n,r,i,s,a){if(i===this.hash){const l=Fb(this,t),c=this.updateCollisionList(l,t,this.hash,this.children,r,s,a);return c===this.children?this:c.length>1?new jk(t,this.hash,c):c[0]}const o=r(V());return Vt(o)?this:(++a.value,nj(t,n,this.hash,this,i,new nl(t,i,s,o)))}updateCollisionList(t,n,r,i,s,a,o){const l=i.length;for(let f=0;f<l;++f){const u=i[f];if("key"in u&&oe(a,u.key)){const d=u.value,h=s(d);return h===d?i:Vt(h)?(--o.value,tj(t,f,i)):Vc(t,f,new nl(n,r,a,h),i)}}const c=s(V());return Vt(c)?i:(++o.value,Vc(t,l,new nl(n,r,a,c),i))}}class vu{constructor(t,n,r){g(this,"edit");g(this,"mask");g(this,"children");g(this,"_tag","IndexedNode");this.edit=t,this.mask=n,this.children=r}modify(t,n,r,i,s,a){const o=this.mask,l=this.children,c=bu(n,i),f=Nc(c),u=ej(o,f),d=o&f,h=Fb(this,t);if(!d){const y=new eo().modify(t,n+dl,r,i,s,a);return y?l.length>=UK?YK(t,c,y,o,l):new vu(t,o|f,VK(h,u,y,l)):this}const p=l[u],b=p.modify(t,n+dl,r,i,s,a);if(p===b)return this;let S=o,m;if(gi(b)){if(S&=~f,!S)return new eo;if(l.length<=2&&KK(l[u^1]))return l[u^1];m=tj(h,u,l)}else m=Vc(h,u,b,l);return h?(this.mask=S,this.children=m,this):new vu(t,S,m)}}class Fk{constructor(t,n,r){g(this,"edit");g(this,"size");g(this,"children");g(this,"_tag","ArrayNode");this.edit=t,this.size=n,this.children=r}modify(t,n,r,i,s,a){let o=this.size;const l=this.children,c=bu(n,i),f=l[c],u=(f||new eo).modify(t,n+dl,r,i,s,a);if(f===u)return this;const d=Fb(this,t);let h;if(gi(f)&&!gi(u))++o,h=Vc(d,c,u,l);else if(!gi(f)&&gi(u)){if(--o,o<=BK)return GK(t,o,c,l);h=Vc(d,c,new eo,l)}else h=Vc(d,c,u,l);return d?(this.size=o,this.children=h,this):new Fk(t,o,h)}}function GK(e,t,n,r){const i=new Array(t-1);let s=0,a=0;for(let o=0,l=r.length;o<l;++o)if(o!==n){const c=r[o];c&&!gi(c)&&(i[s++]=c,a|=1<<o)}return new vu(e,a,i)}function YK(e,t,n,r,i){const s=[];let a=r,o=0;for(let l=0;a;++l)a&1&&(s[l]=i[o++]),a>>>=1;return s[t]=n,new Fk(e,o+1,s)}function JK(e,t,n,r,i,s){if(n===i)return new jk(e,n,[s,r]);const a=bu(t,n),o=bu(t,i);if(a===o)return l=>new vu(e,Nc(a)|Nc(o),[l]);{const l=a<o?[r,s]:[s,r];return new vu(e,Nc(a)|Nc(o),l)}}function nj(e,t,n,r,i,s){let a,o=t;for(;;){const l=JK(e,o,n,r,i,s);if(typeof l=="function")a=qK(l,a),o=o+dl;else{let c=l;for(;a!=null;)c=a.value(c),a=a.previous;return c}}}const rj="effect/HashMap",fx=Symbol.for(rj),QK={[fx]:fx,[Symbol.iterator](){return new Pb(this,(e,t)=>[e,t])},[be](){let e=re(rj);for(const t of this)e^=O(re(t[0]),Se(re(t[1])));return tt(this,e)},[ve](e){if(ZK(e)){if(e._size!==this._size)return!1;for(const t of this){const n=O(e,Uk(t[0],re(t[0])));if(Vt(n))return!1;if(!oe(t[1],n.value))return!1}return!0}return!1},toString(){return it(this.toJSON())},toJSON(){return{_id:"HashMap",values:Array.from(this).map(wt)}},[Pe](){return this.toJSON()},pipe(){return ie(this,arguments)}},Pk=(e,t,n,r)=>{const i=Object.create(QK);return i._editable=e,i._edit=t,i._root=n,i._size=r,i};class Pb{constructor(t,n){g(this,"map");g(this,"f");g(this,"v");this.map=t,this.f=n,this.v=ij(this.map._root,this.f,void 0)}next(){if(Vt(this.v))return{done:!0,value:void 0};const t=this.v.value;return this.v=ey(t.cont),{done:!1,value:t.value}}[Symbol.iterator](){return new Pb(this.map,this.f)}}const ey=e=>e?sj(e[0],e[1],e[2],e[3],e[4]):V(),ij=(e,t,n=void 0)=>{switch(e._tag){case"LeafNode":return dt(e.value)?X({value:t(e.key,e.value.value),cont:n}):ey(n);case"CollisionNode":case"ArrayNode":case"IndexedNode":{const r=e.children;return sj(r.length,r,0,t,n)}default:return ey(n)}},sj=(e,t,n,r,i)=>{for(;n<e;){const s=t[n++];if(s&&!gi(s))return ij(s,r,[e,t,n,r,i])}return ey(i)},XK=Pk(!1,0,new eo,0),Ub=()=>XK,WK=e=>{const t=oj(Ub());for(const n of e)uh(t,n[0],n[1]);return iG(t)},ZK=e=>ue(e,fx),eG=e=>e&&gi(e._root),tG=E(2,(e,t)=>Uk(e,t,re(t))),Uk=E(3,(e,t,n)=>{let r=e._root,i=0;for(;;)switch(r._tag){case"LeafNode":return oe(t,r.key)?r.value:V();case"CollisionNode":{if(n===r.hash){const s=r.children;for(let a=0,o=s.length;a<o;++a){const l=s[a];if("key"in l&&oe(t,l.key))return l.value}}return V()}case"IndexedNode":{const s=bu(i,n),a=Nc(s);if(r.mask&a){r=r.children[ej(r.mask,a)],i+=dl;break}return V()}case"ArrayNode":{if(r=r.children[bu(i,n)],r){i+=dl;break}return V()}default:return V()}}),nG=E(2,(e,t)=>dt(Uk(e,t,re(t)))),uh=E(3,(e,t,n)=>Bk(e,t,()=>X(n))),rG=E(3,(e,t,n)=>e._editable?(e._root=t,e._size=n,e):t===e._root?e:Pk(e._editable,e._edit,t,n)),aj=e=>new Pb(e,t=>t),dx=e=>e._size,oj=e=>Pk(!0,e._edit+1,e._root,e._size),iG=e=>(e._editable=!1,e),Bk=E(3,(e,t,n)=>sG(e,t,re(t),n)),sG=E(4,(e,t,n,r)=>{const i={value:e._size},s=e._root.modify(e._editable?e._edit:NaN,0,r,n,t,i);return O(e,rG(s,i.value))}),gO=E(2,(e,t)=>Bk(e,t,V)),aG=E(2,(e,t)=>Bb(e,Ub(),(n,r,i)=>uh(n,i,t(r,i)))),lj=E(2,(e,t)=>Bb(e,void 0,(n,r,i)=>t(r,i))),Bb=E(3,(e,t,n)=>{const r=e._root;if(r._tag==="LeafNode")return dt(r.value)?n(t,r.value.value,r.key):t;if(r._tag==="EmptyNode")return t;const i=[r.children];let s;for(;s=i.pop();)for(let a=0,o=s.length;a<o;){const l=s[a++];l&&!gi(l)&&(l._tag==="LeafNode"?dt(l.value)&&(t=n(t,l.value.value,l.key)):i.push(l.children))}return t}),cj="effect/HashSet",hx=Symbol.for(cj),oG={[hx]:hx,[Symbol.iterator](){return aj(this._keyMap)},[be](){return tt(this,Se(re(this._keyMap))(re(cj)))},[ve](e){return lG(e)?dx(this._keyMap)===dx(e._keyMap)&&oe(this._keyMap,e._keyMap):!1},toString(){return it(this.toJSON())},toJSON(){return{_id:"HashSet",values:Array.from(this).map(wt)}},[Pe](){return this.toJSON()},pipe(){return ie(this,arguments)}},Hb=e=>{const t=Object.create(oG);return t._keyMap=e,t},lG=e=>ue(e,hx),cG=Hb(Ub()),qb=()=>cG,uG=e=>{const t=Hk(qb());for(const n of e)fh(t,n);return qk(t)},fG=(...e)=>{const t=Hk(qb());for(const n of e)fh(t,n);return qk(t)},dG=E(2,(e,t)=>nG(e._keyMap,t)),hG=e=>dx(e._keyMap),Hk=e=>Hb(oj(e._keyMap)),qk=e=>(e._keyMap._editable=!1,e),uj=E(2,(e,t)=>{const n=Hk(e);return t(n),qk(n)}),fh=E(2,(e,t)=>e._keyMap._editable?(uh(t,!0)(e._keyMap),e):Hb(uh(t,!0)(e._keyMap))),fj=E(2,(e,t)=>e._keyMap._editable?(gO(t)(e._keyMap),e):Hb(gO(t)(e._keyMap))),mG=E(2,(e,t)=>uj(e,n=>{for(const r of t)fj(n,r)})),pG=E(2,(e,t)=>uj(qb(),n=>{gG(e,r=>fh(n,r));for(const r of t)fh(n,r)})),gG=E(2,(e,t)=>lj(e._keyMap,(n,r)=>t(r))),yG=E(3,(e,t,n)=>Bb(e._keyMap,t,(r,i,s)=>n(r,s))),hl=qb,bG=uG,Vk=fG,dj=dG,Kk=hG,Rd=fh,hj=fj,yO=mG,dh=pG,hh=yG,Ll="Die",ml="Empty",jl="Fail",nf="Interrupt",Su="Parallel",wu="Sequential",mj="effect/Cause",pj=Symbol.for(mj),vG={_E:e=>e},rf={[pj]:vG,[be](){return O(re(mj),Se(re(MG(this))),tt(this))},[ve](e){return SG(e)&&RG(this,e)},pipe(){return ie(this,arguments)},toJSON(){switch(this._tag){case"Empty":return{_id:"Cause",_tag:this._tag};case"Die":return{_id:"Cause",_tag:this._tag,defect:wt(this.defect)};case"Interrupt":return{_id:"Cause",_tag:this._tag,fiberId:this.fiberId.toJSON()};case"Fail":return{_id:"Cause",_tag:this._tag,failure:wt(this.error)};case"Sequential":case"Parallel":return{_id:"Cause",_tag:this._tag,left:wt(this.left),right:wt(this.right)}}},toString(){return sf(this)},[Pe](){return this.toJSON()}},to=(()=>{const e=Object.create(rf);return e._tag=ml,e})(),pl=e=>{const t=Object.create(rf);return t._tag=jl,t.error=e,t},Xr=e=>{const t=Object.create(rf);return t._tag=Ll,t.defect=e,t},hi=e=>{const t=Object.create(rf);return t._tag=nf,t.fiberId=e,t},no=(e,t)=>{const n=Object.create(rf);return n._tag=Su,n.left=e,n.right=t,n},Tn=(e,t)=>{const n=Object.create(rf);return n._tag=wu,n.left=e,n.right=t,n},SG=e=>ue(e,pj),wG=e=>e._tag===ml,xG=e=>e._tag===jl,gj=e=>e._tag===Ll,_G=e=>e._tag===ml?!0:xu(e,!0,(t,n)=>{switch(n._tag){case ml:return X(t);case Ll:case jl:case nf:return X(!1);default:return V()}}),yj=e=>dt(CG(e)),Vb=e=>Gb(void 0,DG)(e),kG=e=>Vs(xu(e,tn(),(t,n)=>n._tag===jl?X(O(t,Mn(n.error))):V())),bj=e=>Vs(xu(e,tn(),(t,n)=>n._tag===Ll?X(O(t,Mn(n.defect))):V())),Gk=e=>xu(e,hl(),(t,n)=>n._tag===nf?X(O(t,Rd(n.fiberId))):V()),Yk=e=>Kb(e,t=>t._tag===jl?X(t.error):V()),vj=e=>{const t=Yk(e);switch(t._tag){case"None":return de(e);case"Some":return me(t.value)}},EG=e=>Kb(e,t=>t._tag===Ll?X(t.defect):V()),CG=e=>Kb(e,t=>t._tag===nf?X(t.fiberId):V()),bO=e=>Jk(e,{onEmpty:to,onFail:()=>to,onDie:Xr,onInterrupt:hi,onSequential:Tn,onParallel:no}),TG=e=>Jk(e,{onEmpty:to,onFail:Xr,onDie:Xr,onInterrupt:hi,onSequential:Tn,onParallel:no}),AG=E(2,(e,t)=>OG(e,n=>pl(t(n)))),OG=E(2,(e,t)=>Jk(e,{onEmpty:to,onFail:n=>t(n),onDie:n=>Xr(n),onInterrupt:n=>hi(n),onSequential:(n,r)=>Tn(n,r),onParallel:(n,r)=>no(n,r)})),RG=(e,t)=>{let n=Kt(e),r=Kt(t);for(;Ks(n)&&Ks(r);){const[i,s]=O(Pi(n),xu([hl(),tn()],([l,c],f)=>{const[u,d]=mx(f);return X([O(l,dh(u)),O(c,Bt(d))])})),[a,o]=O(Pi(r),xu([hl(),tn()],([l,c],f)=>{const[u,d]=mx(f);return X([O(l,dh(u)),O(c,Bt(d))])}));if(!oe(i,a))return!1;n=s,r=o}return!0},MG=e=>NG(Kt(e),tn()),NG=(e,t)=>{for(;;){const[n,r]=O(e,Dk([hl(),tn()],([s,a],o)=>{const[l,c]=mx(o);return[O(s,dh(l)),O(a,Bt(c))]})),i=Kk(n)>0?O(t,Mn(n)):t;if(jb(r))return Vs(i);e=r,t=i}throw new Error(Ab("Cause.flattenCauseLoop"))},Kb=E(2,(e,t)=>{const n=[e];for(;n.length>0;){const r=n.pop(),i=t(r);switch(i._tag){case"None":{switch(r._tag){case wu:case Su:{n.push(r.right),n.push(r.left);break}}break}case"Some":return i}}return V()}),mx=e=>{let t=e;const n=[];let r=hl(),i=tn();for(;t!==void 0;)switch(t._tag){case ml:{if(n.length===0)return[r,i];t=n.pop();break}case jl:{if(r=Rd(r,XS(t._tag,t.error)),n.length===0)return[r,i];t=n.pop();break}case Ll:{if(r=Rd(r,XS(t._tag,t.defect)),n.length===0)return[r,i];t=n.pop();break}case nf:{if(r=Rd(r,XS(t._tag,t.fiberId)),n.length===0)return[r,i];t=n.pop();break}case wu:{switch(t.left._tag){case ml:{t=t.right;break}case wu:{t=Tn(t.left.left,Tn(t.left.right,t.right));break}case Su:{t=no(Tn(t.left.left,t.right),Tn(t.left.right,t.right));break}default:{i=Mn(i,t.right),t=t.left;break}}break}case Su:{n.push(t.right),t=t.left;break}}throw new Error(Ab("Cause.evaluateCauseLoop"))},DG={emptyCase:ax,failCase:La,dieCase:La,interruptCase:ax,sequentialCase:(e,t,n)=>t&&n,parallelCase:(e,t,n)=>t&&n},vO="SequentialCase",SO="ParallelCase",Jk=E(2,(e,{onDie:t,onEmpty:n,onFail:r,onInterrupt:i,onParallel:s,onSequential:a})=>Gb(e,void 0,{emptyCase:()=>n,failCase:(o,l)=>r(l),dieCase:(o,l)=>t(l),interruptCase:(o,l)=>i(l),sequentialCase:(o,l,c)=>a(l,c),parallelCase:(o,l,c)=>s(l,c)})),xu=E(3,(e,t,n)=>{let r=t,i=e;const s=[];for(;i!==void 0;){const a=n(r,i);switch(r=dt(a)?a.value:r,i._tag){case wu:{s.push(i.right),i=i.left;break}case Su:{s.push(i.right),i=i.left;break}default:{i=void 0;break}}i===void 0&&s.length>0&&(i=s.pop())}return r}),Gb=E(3,(e,t,n)=>{const r=[e],i=[];for(;r.length>0;){const a=r.pop();switch(a._tag){case ml:{i.push(de(n.emptyCase(t)));break}case jl:{i.push(de(n.failCase(t,a.error)));break}case Ll:{i.push(de(n.dieCase(t,a.defect)));break}case nf:{i.push(de(n.interruptCase(t,a.fiberId)));break}case wu:{r.push(a.right),r.push(a.left),i.push(me({_tag:vO}));break}case Su:{r.push(a.right),r.push(a.left),i.push(me({_tag:SO}));break}}}const s=[];for(;i.length>0;){const a=i.pop();switch(a._tag){case"Left":{switch(a.left._tag){case vO:{const o=s.pop(),l=s.pop(),c=n.sequentialCase(t,o,l);s.push(c);break}case SO:{const o=s.pop(),l=s.pop(),c=n.parallelCase(t,o,l);s.push(c);break}}break}case"Right":{s.push(a.right);break}}}if(s.length===0)throw new Error("BUG: Cause.reduceWithContext - please report an issue at https://github.com/Effect-TS/effect/issues");return s.pop()}),sf=(e,t)=>Vb(e)?"All fibers interrupted without errors.":wj(e).map(function(n){return(t==null?void 0:t.renderErrorCause)!==!0||n.cause===void 0?n.stack:`${n.stack} {
|
|
53
|
+
${Sj(n.cause," ")}
|
|
54
|
+
}`}).join(`
|
|
55
|
+
`),Sj=(e,t)=>{const n=e.stack.split(`
|
|
56
|
+
`);let r=`${t}[cause]: ${n[0]}`;for(let i=1,s=n.length;i<s;i++)r+=`
|
|
57
|
+
${t}${n[i]}`;return e.cause&&(r+=` {
|
|
58
|
+
${Sj(e.cause,`${t} `)}
|
|
59
|
+
${t}}`),r};class ty extends globalThis.Error{constructor(n){const r=typeof n=="object"&&n!==null,i=Error.stackTraceLimit;Error.stackTraceLimit=1;super(zG(n),r&&"cause"in n&&typeof n.cause<"u"?{cause:new ty(n.cause)}:void 0);g(this,"span");this.message===""&&(this.message="An error has occurred"),Error.stackTraceLimit=i,this.name=n instanceof Error?n.name:"Error",r&&(_u in n&&(this.span=n[_u]),Object.keys(n).forEach(s=>{s in this||(this[s]=n[s])})),this.stack=$G(`${this.name}: ${this.message}`,n instanceof Error&&n.stack?n.stack:"",this.span)}}const zG=e=>{if(typeof e=="string")return e;if(typeof e=="object"&&e!==null&&e instanceof Error)return e.message;try{if(ue(e,"toString")&&Ju(e.toString)&&e.toString!==Object.prototype.toString&&e.toString!==globalThis.Array.prototype.toString)return e.toString()}catch{}return mL(e)},IG=/\((.*)\)/g,ny=pe("effect/Tracer/spanToTrace",()=>new WeakMap),$G=(e,t,n)=>{const r=[e],i=t.startsWith(e)?t.slice(e.length).split(`
|
|
60
|
+
`):t.split(`
|
|
61
|
+
`);for(let s=1;s<i.length;s++){if(i[s].includes(" at new BaseEffectError")||i[s].includes(" at new YieldableError")){s++;continue}if(i[s].includes("Generator.next")||i[s].includes("effect_internal_function"))break;r.push(i[s].replace(/at .*effect_instruction_i.*\((.*)\)/,"at $1").replace(/EffectPrimitive\.\w+/,"<anonymous>"))}if(n){let s=n,a=0;for(;s&&s._tag==="Span"&&a<10;){const o=ny.get(s);if(typeof o=="function"){const l=o();if(typeof l=="string"){const c=l.matchAll(IG);let f=!1;for(const[,u]of c)f=!0,r.push(` at ${s.name} (${u})`);f||r.push(` at ${s.name} (${l.replace(/^at /,"")})`)}else r.push(` at ${s.name}`)}else r.push(` at ${s.name}`);s=Ur(s.parent),a++}}return r.join(`
|
|
62
|
+
`)},_u=Symbol.for("effect/SpanAnnotation"),wj=e=>Gb(e,void 0,{emptyCase:()=>[],dieCase:(t,n)=>[new ty(n)],failCase:(t,n)=>[new ty(n)],interruptCase:()=>[],parallelCase:(t,n,r)=>[...n,...r],sequentialCase:(t,n,r)=>[...n,...r]}),px=Symbol.for("effect/Duration"),xj=BigInt(0),wO=BigInt(24),np=BigInt(60),gx=BigInt(1e3),xO=BigInt(1e6),_O=BigInt(1e9),LG=/^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/,ni=e=>{if(_j(e))return e;if(Hs(e))return Eu(e);if(Tb(e))return WS(e);if(Array.isArray(e)&&e.length===2&&e.every(Hs))return e[0]===-1/0||e[1]===-1/0||Number.isNaN(e[0])||Number.isNaN(e[1])?ku:e[0]===1/0||e[1]===1/0?UG:WS(BigInt(Math.round(e[0]*1e9))+BigInt(Math.round(e[1])));if(ti(e)){const t=LG.exec(e);if(t){const[n,r,i]=t,s=Number(r);switch(i){case"nano":case"nanos":return WS(BigInt(r));case"micro":case"micros":return BG(BigInt(r));case"milli":case"millis":return Eu(s);case"second":case"seconds":return Ej(s);case"minute":case"minutes":return HG(s);case"hour":case"hours":return qG(s);case"day":case"days":return VG(s);case"week":case"weeks":return KG(s)}}}throw new Error("Invalid DurationInput")},kO={_tag:"Millis",millis:0},jG={_tag:"Infinity"},FG={[px]:px,[be](){return tt(this,dL(this.value))},[ve](e){return _j(e)&&ZG(this,e)},toString(){return`Duration(${tY(this)})`},toJSON(){switch(this.value._tag){case"Millis":return{_id:"Duration",_tag:"Millis",millis:this.value.millis};case"Nanos":return{_id:"Duration",_tag:"Nanos",hrtime:YG(this)};case"Infinity":return{_id:"Duration",_tag:"Infinity"}}},[Pe](){return this.toJSON()},pipe(){return ie(this,arguments)}},rs=e=>{const t=Object.create(FG);return Hs(e)?isNaN(e)||e<=0?t.value=kO:Number.isFinite(e)?Number.isInteger(e)?t.value={_tag:"Millis",millis:e}:t.value={_tag:"Nanos",nanos:BigInt(Math.round(e*1e6))}:t.value=jG:e<=xj?t.value=kO:t.value={_tag:"Nanos",nanos:e},t},_j=e=>ue(e,px),kj=e=>e.value._tag!=="Infinity",PG=e=>{switch(e.value._tag){case"Millis":return e.value.millis===0;case"Nanos":return e.value.nanos===xj;case"Infinity":return!1}},ku=rs(0),UG=rs(1/0),WS=e=>rs(e),BG=e=>rs(e*gx),Eu=e=>rs(e),Ej=e=>rs(e*1e3),HG=e=>rs(e*6e4),qG=e=>rs(e*36e5),VG=e=>rs(e*864e5),KG=e=>rs(e*6048e5),ry=e=>JG(e,{onMillis:t=>t,onNanos:t=>Number(t)/1e6}),GG=e=>{const t=ni(e);switch(t.value._tag){case"Infinity":throw new Error("Cannot convert infinite duration to nanos");case"Nanos":return t.value.nanos;case"Millis":return BigInt(Math.round(t.value.millis*1e6))}},YG=e=>{const t=ni(e);switch(t.value._tag){case"Infinity":return[1/0,0];case"Nanos":return[Number(t.value.nanos/_O),Number(t.value.nanos%_O)];case"Millis":return[Math.floor(t.value.millis/1e3),Math.round(t.value.millis%1e3*1e6)]}},JG=E(2,(e,t)=>{const n=ni(e);switch(n.value._tag){case"Nanos":return t.onNanos(n.value.nanos);case"Infinity":return t.onMillis(1/0);case"Millis":return t.onMillis(n.value.millis)}}),Qk=E(3,(e,t,n)=>{const r=ni(e),i=ni(t);if(r.value._tag==="Infinity"||i.value._tag==="Infinity")return n.onMillis(ry(r),ry(i));if(r.value._tag==="Nanos"||i.value._tag==="Nanos"){const s=r.value._tag==="Nanos"?r.value.nanos:BigInt(Math.round(r.value.millis*1e6)),a=i.value._tag==="Nanos"?i.value.nanos:BigInt(Math.round(i.value.millis*1e6));return n.onNanos(s,a)}return n.onMillis(r.value.millis,i.value.millis)}),QG=(e,t)=>Qk(e,t,{onMillis:(n,r)=>n===r,onNanos:(n,r)=>n===r}),XG=E(2,(e,t)=>Qk(e,t,{onMillis:(n,r)=>n<=r,onNanos:(n,r)=>n<=r})),WG=E(2,(e,t)=>Qk(e,t,{onMillis:(n,r)=>n>=r,onNanos:(n,r)=>n>=r})),ZG=E(2,(e,t)=>QG(ni(e),ni(t))),eY=e=>{const t=ni(e);if(t.value._tag==="Infinity")return{days:1/0,hours:1/0,minutes:1/0,seconds:1/0,millis:1/0,nanos:1/0};const n=GG(t),r=n/xO,i=r/gx,s=i/np,a=s/np,o=a/wO;return{days:Number(o),hours:Number(a%wO),minutes:Number(s%np),seconds:Number(i%np),millis:Number(r%gx),nanos:Number(n%xO)}},tY=e=>{const t=ni(e);if(t.value._tag==="Infinity")return"Infinity";if(PG(t))return"0";const n=eY(t),r=[];return n.days!==0&&r.push(`${n.days}d`),n.hours!==0&&r.push(`${n.hours}h`),n.minutes!==0&&r.push(`${n.minutes}m`),n.seconds!==0&&r.push(`${n.seconds}s`),n.millis!==0&&r.push(`${n.millis}ms`),n.nanos!==0&&r.push(`${n.nanos}ns`),r.join(" ")},EO=Symbol.for("effect/MutableRef"),nY={[EO]:EO,toString(){return it(this.toJSON())},toJSON(){return{_id:"MutableRef",current:wt(this.current)}},[Pe](){return this.toJSON()},pipe(){return ie(this,arguments)}},em=e=>{const t=Object.create(nY);return t.current=e,t},rY=E(3,(e,t,n)=>oe(t,e.current)?(e.current=n,!0):!1),Jt=e=>e.current,tm=E(2,(e,t)=>(e.current=t,e)),Yb="effect/FiberId",gl=Symbol.for(Yb),Cu="None",yx="Runtime",bx="Composite",iY=gt(`${Yb}-${Cu}`);var IN;let sY=class{constructor(){g(this,IN,gl);g(this,"_tag",Cu);g(this,"id",-1);g(this,"startTimeMillis",-1)}[(IN=gl,be)](){return iY}[ve](t){return Xk(t)&&t._tag===Cu}toString(){return it(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag}}[Pe](){return this.toJSON()}};var $N;class Cj{constructor(t,n){g(this,"id");g(this,"startTimeMillis");g(this,$N,gl);g(this,"_tag",yx);this.id=t,this.startTimeMillis=n}[($N=gl,be)](){return tt(this,gt(`${Yb}-${this._tag}-${this.id}-${this.startTimeMillis}`))}[ve](t){return Xk(t)&&t._tag===yx&&this.id===t.id&&this.startTimeMillis===t.startTimeMillis}toString(){return it(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag,id:this.id,startTimeMillis:this.startTimeMillis}}[Pe](){return this.toJSON()}}var LN;let aY=class{constructor(t,n){g(this,"left");g(this,"right");g(this,LN,gl);g(this,"_tag",bx);g(this,"_hash");this.left=t,this.right=n}[(LN=gl,be)](){return O(gt(`${Yb}-${this._tag}`),Se(re(this.left)),Se(re(this.right)),tt(this))}[ve](t){return Xk(t)&&t._tag===bx&&oe(this.left,t.left)&&oe(this.right,t.right)}toString(){return it(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag,left:wt(this.left),right:wt(this.right)}}[Pe](){return this.toJSON()}};const Tj=new sY,Xk=e=>ue(e,gl),Aj=E(2,(e,t)=>e._tag===Cu?t:t._tag===Cu?e:new aY(e,t)),oY=e=>O(e,hh(Tj,(t,n)=>Aj(n)(t))),iy=e=>{switch(e._tag){case Cu:return hl();case yx:return Vk(e.id);case bx:return O(iy(e.left),dh(iy(e.right)))}},CO=pe(Symbol.for("effect/Fiber/Id/_fiberCounter"),()=>em(0)),lY=(e,t)=>new Cj(e,t),Oj=e=>Array.from(iy(e)).map(n=>`#${n}`).join(","),cY=()=>{const e=Jt(CO);return O(CO,tm(e+1)),new Cj(e,Date.now())},Er=Tj,Md=Aj,uY=oY,Rj=iy,fY=lY,dY=Oj,Mj=cY,Jb=Ub,hY=WK,mY=eG,Nj=tG,Dj=uh,zj=aj,pY=Bk,gY=aG,yY=lj,Ij=Bb,mh=Symbol.for("effect/List"),vx=e=>Ye(e),bY=e=>RL($b(e),vx),vY=bY(oe),SY={[mh]:mh,_tag:"Cons",toString(){return it(this.toJSON())},toJSON(){return{_id:"List",_tag:"Cons",values:vx(this).map(wt)}},[Pe](){return this.toJSON()},[ve](e){return Lj(e)&&this._tag===e._tag&&vY(this,e)},[be](){return tt(this,Qu(vx(this)))},[Symbol.iterator](){let e=!1,t=this;return{next(){if(e)return this.return();if(t._tag==="Nil")return e=!0,this.return();const n=t.head;return t=t.tail,{done:e,value:n}},return(n){return e||(e=!0),{done:!0,value:n}}}},pipe(){return ie(this,arguments)}},sy=(e,t)=>{const n=Object.create(SY);return n.head=e,n.tail=t,n},wY=gt("Nil"),xY={[mh]:mh,_tag:"Nil",toString(){return it(this.toJSON())},toJSON(){return{_id:"List",_tag:"Nil"}},[Pe](){return this.toJSON()},[be](){return wY},[ve](e){return Lj(e)&&this._tag===e._tag},[Symbol.iterator](){return{next(){return{done:!0,value:void 0}}}},pipe(){return ie(this,arguments)}},$j=Object.create(xY),Lj=e=>ue(e,mh),Ls=e=>e._tag==="Nil",_Y=e=>e._tag==="Cons",kY=()=>$j,yl=(e,t)=>sy(e,t),Tu=kY,Wk=e=>sy(e,$j),EY=E(2,(e,t)=>TY(t,e)),CY=E(2,(e,t)=>yl(t,e)),TY=E(2,(e,t)=>{if(Ls(e))return t;if(Ls(t))return e;{const n=sy(t.head,e);let r=n,i=t.tail;for(;!Ls(i);){const s=sy(i.head,e);r.tail=s,r=s,i=i.tail}return n}}),AY=E(3,(e,t,n)=>{let r=t,i=e;for(;!Ls(i);)r=n(r,i.head),i=i.tail;return r}),OY=e=>{let t=Tu(),n=e;for(;!Ls(n);)t=CY(t,n.head),n=n.tail;return t},RY=Object.assign(Object.create(Array.prototype),{[be](){return tt(this,Qu(this))},[ve](e){return Array.isArray(e)&&this.length===e.length?this.every((t,n)=>oe(t,e[n])):!1}}),nm=function(){function e(t){t&&Object.assign(this,t)}return e.prototype=zb,e}(),MY=e=>Object.assign(Object.create(zb),e),NY=Symbol.for("effect/DifferContextPatch");function TO(e){return e}const rm={...nm.prototype,[NY]:{_Value:TO,_Patch:TO}},DY=Object.assign(Object.create(rm),{_tag:"Empty"}),zY=Object.create(DY),jj=()=>zY,IY=Object.assign(Object.create(rm),{_tag:"AndThen"}),$Y=(e,t)=>{const n=Object.create(IY);return n.first=e,n.second=t,n},LY=Object.assign(Object.create(rm),{_tag:"AddService"}),jY=(e,t)=>{const n=Object.create(LY);return n.key=e,n.service=t,n},FY=Object.assign(Object.create(rm),{_tag:"RemoveService"}),PY=e=>{const t=Object.create(FY);return t.key=e,t},UY=Object.assign(Object.create(rm),{_tag:"UpdateService"}),BY=(e,t)=>{const n=Object.create(UY);return n.key=e,n.update=t,n},HY=(e,t)=>{const n=new Map(e.unsafeMap);let r=jj();for(const[i,s]of t.unsafeMap.entries())if(n.has(i)){const a=n.get(i);n.delete(i),oe(a,s)||(r=Vp(BY(i,()=>s))(r))}else n.delete(i),r=Vp(jY(i,s))(r);for(const[i]of n.entries())r=Vp(PY(i))(r);return r},Vp=E(2,(e,t)=>$Y(e,t)),qY=E(2,(e,t)=>{if(e._tag==="Empty")return t;let n=!1,r=Kt(e);const i=new Map(t.unsafeMap);for(;Ks(r);){const a=Pi(r),o=Os(r);switch(a._tag){case"Empty":{r=o;break}case"AddService":{i.set(a.key,a.service),r=o;break}case"AndThen":{r=Mn(Mn(o,a.second),a.first);break}case"RemoveService":{i.delete(a.key),r=o;break}case"UpdateService":{i.set(a.key,a.update(i.get(a.key))),n=!0,r=o;break}}}if(!n)return Wa(i);const s=new Map;for(const[a]of t.unsafeMap)i.has(a)&&(s.set(a,i.get(a)),i.delete(a));for(const[a,o]of i)s.set(a,o);return Wa(s)}),VY=Symbol.for("effect/DifferHashSetPatch");function ZS(e){return e}const Qb={...nm.prototype,[VY]:{_Value:ZS,_Key:ZS,_Patch:ZS}},KY=Object.assign(Object.create(Qb),{_tag:"Empty"}),GY=Object.create(KY),Fj=()=>GY,YY=Object.assign(Object.create(Qb),{_tag:"AndThen"}),JY=(e,t)=>{const n=Object.create(YY);return n.first=e,n.second=t,n},QY=Object.assign(Object.create(Qb),{_tag:"Add"}),XY=e=>{const t=Object.create(QY);return t.value=e,t},WY=Object.assign(Object.create(Qb),{_tag:"Remove"}),ZY=e=>{const t=Object.create(WY);return t.value=e,t},eJ=(e,t)=>{const[n,r]=hh([e,Fj()],([i,s],a)=>dj(a)(i)?[hj(a)(i),s]:[i,Sx(XY(a))(s)])(t);return hh(r,(i,s)=>Sx(ZY(s))(i))(n)},Sx=E(2,(e,t)=>JY(e,t)),tJ=E(2,(e,t)=>{if(e._tag==="Empty")return t;let n=t,r=Kt(e);for(;Ks(r);){const i=Pi(r),s=Os(r);switch(i._tag){case"Empty":{r=s;break}case"AndThen":{r=Mn(i.first)(Mn(i.second)(s));break}case"Add":{n=Rd(i.value)(n),r=s;break}case"Remove":n=hj(i.value)(n),r=s}}return n}),nJ=Symbol.for("effect/DifferReadonlyArrayPatch");function AO(e){return e}const im={...nm.prototype,[nJ]:{_Value:AO,_Patch:AO}},rJ=Object.assign(Object.create(im),{_tag:"Empty"}),iJ=Object.create(rJ),Pj=()=>iJ,sJ=Object.assign(Object.create(im),{_tag:"AndThen"}),aJ=(e,t)=>{const n=Object.create(sJ);return n.first=e,n.second=t,n},oJ=Object.assign(Object.create(im),{_tag:"Append"}),lJ=e=>{const t=Object.create(oJ);return t.values=e,t},cJ=Object.assign(Object.create(im),{_tag:"Slice"}),uJ=(e,t)=>{const n=Object.create(cJ);return n.from=e,n.until=t,n},fJ=Object.assign(Object.create(im),{_tag:"Update"}),dJ=(e,t)=>{const n=Object.create(fJ);return n.index=e,n.patch=t,n},hJ=e=>{let t=0,n=Pj();for(;t<e.oldValue.length&&t<e.newValue.length;){const r=e.oldValue[t],i=e.newValue[t],s=e.differ.diff(r,i);oe(s,e.differ.empty)||(n=Kp(n,dJ(t,s))),t=t+1}return t<e.oldValue.length&&(n=Kp(n,uJ(0,t))),t<e.newValue.length&&(n=Kp(n,lJ(_K(t)(e.newValue)))),n},Kp=E(2,(e,t)=>aJ(e,t)),mJ=E(3,(e,t,n)=>{if(e._tag==="Empty")return t;let r=t.slice(),i=ui(e);for(;qc(i);){const s=Hn(i),a=fl(i);switch(s._tag){case"Empty":{i=a;break}case"AndThen":{a.unshift(s.first,s.second),i=a;break}case"Append":{for(const o of s.values)r.push(o);i=a;break}case"Slice":{r=r.slice(s.from,s.until),i=a;break}case"Update":{r[s.index]=n.patch(s.patch,r[s.index]),i=a;break}}}return r}),pJ=Symbol.for("effect/Differ"),gJ={[pJ]:{_P:ge,_V:ge},pipe(){return ie(this,arguments)}},af=e=>{const t=Object.create(gJ);return t.empty=e.empty,t.diff=e.diff,t.combine=e.combine,t.patch=e.patch,t},yJ=()=>af({empty:jj(),combine:(e,t)=>Vp(t)(e),diff:(e,t)=>HY(e,t),patch:(e,t)=>qY(t)(e)}),bJ=()=>af({empty:Fj(),combine:(e,t)=>Sx(t)(e),diff:(e,t)=>eJ(e,t),patch:(e,t)=>tJ(t)(e)}),vJ=e=>af({empty:Pj(),combine:(t,n)=>Kp(t,n),diff:(t,n)=>hJ({oldValue:t,newValue:n,differ:e}),patch:(t,n)=>mJ(t,n,e)}),Uj=()=>SJ((e,t)=>t),SJ=e=>af({empty:ge,combine:(t,n)=>t===ge?n:n===ge?t:r=>n(t(r)),diff:(t,n)=>oe(t,n)?ge:Qh(n),patch:(t,n)=>e(n,t(n))}),ph=255,Bj=8,wx=e=>e&ph,xx=e=>e>>Bj&ph,sm=(e,t)=>(e&ph)+((t&e&ph)<<Bj),wJ=sm(0,0),xJ=e=>sm(e,e),_J=e=>sm(e,0),kJ=E(2,(e,t)=>sm(wx(e)&~t,xx(e))),EJ=E(2,(e,t)=>e|t),CJ=e=>~e>>>0&ph,TJ=0,Fl=1,AJ=2,Hj=4,_x=16,qj=32,OJ=e=>Xb(e,qj),RJ=E(2,(e,t)=>e&~t),MJ=E(2,(e,t)=>e|t),ma=e=>Vj(e)&&!DJ(e),Vj=e=>Xb(e,Fl),Xb=E(2,(e,t)=>(e&t)!==0),Kj=(...e)=>e.reduce((t,n)=>t|n,0),NJ=Kj(TJ),OO=e=>Xb(e,Hj),DJ=e=>Xb(e,_x),Fa=E(2,(e,t)=>sm(e^t,t)),Kc=E(2,(e,t)=>e&(CJ(wx(t))|xx(t))|wx(t)&xx(t)),RO=af({empty:wJ,diff:(e,t)=>Fa(e,t),combine:(e,t)=>EJ(t)(e),patch:(e,t)=>Kc(t,e)}),zJ=xJ,Gj=_J,MO=kJ,Yj=(e,t)=>({_tag:"Par",left:e,right:t}),rp=(e,t)=>({_tag:"Seq",left:e,right:t}),IJ=e=>{let t=Wk(e),n=Tu();for(;;){const[r,i]=AY(t,[Jj(),Tu()],([s,a],o)=>{const[l,c]=$J(o);return[UJ(s,l),EY(a,c)]});if(n=LJ(n,r),Ls(i))return OY(n);t=i}throw new Error("BUG: BlockedRequests.flatten - please report an issue at https://github.com/Effect-TS/effect/issues")},$J=e=>{let t=e,n=Jj(),r=Tu(),i=Tu();for(;;)switch(t._tag){case"Empty":{if(Ls(r))return[n,i];t=r.head,r=r.tail;break}case"Par":{r=yl(t.right,r),t=t.left;break}case"Seq":{const s=t.left,a=t.right;switch(s._tag){case"Empty":{t=a;break}case"Par":{const o=s.left,l=s.right;t=Yj(rp(o,a),rp(l,a));break}case"Seq":{const o=s.left,l=s.right;t=rp(o,rp(l,a));break}case"Single":{t=s,i=yl(a,i);break}}break}case"Single":{if(n=PJ(n,t),Ls(r))return[n,i];t=r.head,r=r.tail;break}}throw new Error("BUG: BlockedRequests.step - please report an issue at https://github.com/Effect-TS/effect/issues")},LJ=(e,t)=>{if(Ls(e))return Wk(e0(t));if(BJ(t))return e;const n=YJ(e.head),r=HJ(t);return n.length===1&&r.length===1&&oe(n[0],r[0])?yl(GJ(e.head,e0(t)),e.tail):yl(e0(t),e)},jJ=Symbol.for("effect/RequestBlock/RequestBlockParallel"),FJ={_R:e=>e};var jN;jN=jJ;class Zk{constructor(t){g(this,"map");g(this,jN,FJ);this.map=t}}const Jj=()=>new Zk(Jb()),PJ=(e,t)=>new Zk(pY(e.map,t.dataSource,n=>W7(Bn(n,ux(t.blockedRequest)),()=>Kt(t.blockedRequest)))),UJ=(e,t)=>new Zk(Ij(e.map,t.map,(n,r,i)=>Dj(n,i,Dt(Nj(n,i),{onNone:()=>r,onSome:s=>Bt(r,s)})))),BJ=e=>mY(e.map),HJ=e=>Array.from(zj(e.map)),e0=e=>KJ(gY(e.map,t=>Kt(t))),qJ=Symbol.for("effect/RequestBlock/RequestBlockSequential"),VJ={_R:e=>e};var FN;FN=qJ;class Qj{constructor(t){g(this,"map");g(this,FN,VJ);this.map=t}}const KJ=e=>new Qj(e),GJ=(e,t)=>new Qj(Ij(t.map,e.map,(n,r,i)=>Dj(n,i,Dt(Nj(n,i),{onNone:()=>tn(),onSome:s=>Bt(s,r)})))),YJ=e=>Array.from(zj(e.map)),JJ=e=>Array.from(e.map),am="Pending",Wb="Done",QJ="effect/Deferred",XJ=Symbol.for(QJ),WJ={_E:e=>e,_A:e=>e},ZJ=e=>({_tag:am,joiners:e}),Xj=e=>({_tag:Wb,effect:e});class om{constructor(t){g(this,"self");g(this,"called",!1);this.self=t}next(t){return this.called?{value:t,done:!0}:(this.called=!0,{value:this.self,done:!1})}return(t){return{value:t,done:!0}}throw(t){throw t}[Symbol.iterator](){return new om(this.self)}}const Wj=(e,t)=>{const n=new Gt("Blocked");return n.effect_instruction_i0=e,n.effect_instruction_i1=t,n},eQ=e=>{const t=new Gt("RunBlocked");return t.effect_instruction_i0=e,t},bl=Symbol.for("effect/Effect");class tQ{constructor(t,n){g(this,"patch");g(this,"op");g(this,"_op",xk);this.patch=t,this.op=n}}var PN;class Gt{constructor(t){g(this,"_op");g(this,"effect_instruction_i0");g(this,"effect_instruction_i1");g(this,"effect_instruction_i2");g(this,"trace");g(this,PN,yu);this._op=t}[(PN=bl,ve)](t){return this===t}[be](){return tt(this,bk(this))}pipe(){return ie(this,arguments)}toJSON(){return{_id:"Effect",_op:this._op,effect_instruction_i0:wt(this.effect_instruction_i0),effect_instruction_i1:wt(this.effect_instruction_i1),effect_instruction_i2:wt(this.effect_instruction_i2)}}toString(){return it(this.toJSON())}[Pe](){return this.toJSON()}[Symbol.iterator](){return new om(new Xh(this))}}var UN;class Zj{constructor(t){g(this,"_op");g(this,"effect_instruction_i0");g(this,"effect_instruction_i1");g(this,"effect_instruction_i2");g(this,"trace");g(this,UN,yu);this._op=t,this._tag=t}[(UN=bl,ve)](t){return lv(t)&&t._op==="Failure"&&oe(this.effect_instruction_i0,t.effect_instruction_i0)}[be](){return O(gt(this._tag),Se(re(this.effect_instruction_i0)),tt(this))}get cause(){return this.effect_instruction_i0}pipe(){return ie(this,arguments)}toJSON(){return{_id:"Exit",_tag:this._op,cause:this.cause.toJSON()}}toString(){return it(this.toJSON())}[Pe](){return this.toJSON()}[Symbol.iterator](){return new om(new Xh(this))}}var BN;class eF{constructor(t){g(this,"_op");g(this,"effect_instruction_i0");g(this,"effect_instruction_i1");g(this,"effect_instruction_i2");g(this,"trace");g(this,BN,yu);this._op=t,this._tag=t}[(BN=bl,ve)](t){return lv(t)&&t._op==="Success"&&oe(this.effect_instruction_i0,t.effect_instruction_i0)}[be](){return O(gt(this._tag),Se(re(this.effect_instruction_i0)),tt(this))}get value(){return this.effect_instruction_i0}pipe(){return ie(this,arguments)}toJSON(){return{_id:"Exit",_tag:this._op,value:wt(this.value)}}toString(){return it(this.toJSON())}[Pe](){return this.toJSON()}[Symbol.iterator](){return new om(new Xh(this))}}const Ws=e=>ue(e,bl),Be=e=>{const t=new Gt(yL);return t.effect_instruction_i0=e,t},tF=E(3,(e,t,n)=>_i(r=>B(e,i=>B(Pa(Te(()=>r(t(i)))),s=>Te(()=>n(i,s)).pipe(ri({onFailure:a=>{switch(s._tag){case un:return nn(Tn(s.effect_instruction_i0,a));case fn:return nn(a)}},onSuccess:()=>s})))))),Vn=E(2,(e,t)=>B(e,()=>ee(t))),ii=e=>Vn(e,void 0),nF=function(){const e=new Gt(Db);switch(arguments.length){case 2:{e.effect_instruction_i0=arguments[0],e.commit=arguments[1];break}case 3:{e.effect_instruction_i0=arguments[0],e.effect_instruction_i1=arguments[1],e.commit=arguments[2];break}case 4:{e.effect_instruction_i0=arguments[0],e.effect_instruction_i1=arguments[1],e.effect_instruction_i2=arguments[2],e.commit=arguments[3];break}default:throw new Error(Ab("you're not supposed to end up here"))}return e},ay=(e,t=Er)=>{const n=new Gt(Td);let r;return n.effect_instruction_i0=i=>{r=e(i)},n.effect_instruction_i1=t,cm(n,i=>Ws(r)?r:et)},Ea=(e,t=Er)=>Te(()=>ay(e,t)),xi=(e,t=Er)=>nF(e,function(){let n,r;function i(l){n?n(l):r===void 0&&(r=l)}const s=new Gt(Td);s.effect_instruction_i0=l=>{n=l,r&&l(r)},s.effect_instruction_i1=t;let a,o;return this.effect_instruction_i0.length!==1?(o=new AbortController,a=gn(()=>this.effect_instruction_i0(i,o.signal))):a=gn(()=>this.effect_instruction_i0(i)),a||o?cm(s,l=>(o&&o.abort(),a??et)):s}),rF=E(2,(e,t)=>{const n=new Gt(Bp);return n.effect_instruction_i0=e,n.effect_instruction_i1=t,n}),gh=E(2,(e,t)=>ro(e,{onFailure:t,onSuccess:ee})),NO=Symbol.for("effect/OriginalAnnotation"),eE=(e,t)=>dt(t)?new Proxy(e,{has(n,r){return r===_u||r===NO||r in n},get(n,r){return r===_u?t.value:r===NO?e:n[r]}}):e,Ca=e=>wi(e)&&!(_u in e)?Be(t=>nn(Xr(eE(e,gE(t))))):nn(Xr(e)),iF=e=>sF(()=>Xr(new zQ(e))),Au=e=>ro(e,{onFailure:t=>ee(me(t)),onSuccess:t=>ee(de(t))}),Pa=e=>aF(e,{onFailure:Xe,onSuccess:Ze}),Ot=e=>wi(e)&&!(_u in e)?Be(t=>nn(pl(eE(e,gE(t))))):nn(pl(e)),Zb=e=>B(K(e),Ot),nn=e=>{const t=new Zj(un);return t.effect_instruction_i0=e,t},sF=e=>B(K(e),nn),ev=Be(e=>ee(e.id())),lm=e=>Be(t=>e(t.id())),B=E(2,(e,t)=>{const n=new Gt(Kg);return n.effect_instruction_i0=e,n.effect_instruction_i1=t,n}),nQ=e=>{const t=new Gt("OnStep");return t.effect_instruction_i0=e,t},tv=e=>B(e,ge),aF=E(2,(e,t)=>ri(e,{onFailure:n=>ee(t.onFailure(n)),onSuccess:n=>ee(t.onSuccess(n))})),ri=E(2,(e,t)=>{const n=new Gt(Gg);return n.effect_instruction_i0=e,n.effect_instruction_i1=t.onFailure,n.effect_instruction_i2=t.onSuccess,n}),ro=E(2,(e,t)=>ri(e,{onFailure:n=>{if(bj(n).length>0)return nn(TG(n));const i=kG(n);return i.length>0?t.onFailure($k(i)):nn(n)},onSuccess:t.onSuccess})),Rs=E(2,(e,t)=>Te(()=>{const n=Ye(e),r=Ib(n.length);let i=0;return Vn(sE({while:()=>i<n.length,body:()=>t(n[i],i),step:s=>{r[i++]=s}}),r)})),nv=E(2,(e,t)=>Te(()=>{const n=Ye(e);let r=0;return sE({while:()=>r<n.length,body:()=>t(n[r],r),step:()=>{r++}})})),vs=B(ev,e=>oF(e)),oF=e=>nn(hi(e)),tE=e=>{const t=new Gt(Xu);return t.effect_instruction_i0=zJ(Fl),t.effect_instruction_i1=()=>e,t},lF=E(2,(e,t)=>_i(n=>B(Pa(n(e)),r=>kF(t,r)))),Ae=E(2,(e,t)=>B(e,n=>K(()=>t(n)))),nE=E(2,(e,t)=>ro(e,{onFailure:n=>Zb(()=>t.onFailure(n)),onSuccess:n=>K(()=>t.onSuccess(n))})),rv=E(2,(e,t)=>ri(e,{onFailure:n=>{const r=vj(n);switch(r._tag){case"Left":return Zb(()=>t(r.left));case"Right":return nn(r.right)}},onSuccess:ee})),vl=E(2,(e,t)=>_i(n=>ri(n(e),{onFailure:r=>{const i=Xe(r);return ri(t(i),{onFailure:s=>Xe(Tn(r,s)),onSuccess:()=>i})},onSuccess:r=>{const i=Ze(r);return Et(t(i),i)}}))),cm=E(2,(e,t)=>vl(e,cv({onFailure:n=>Vb(n)?ii(t(Gk(n))):et,onSuccess:()=>et}))),rQ=e=>iQ(e,ge),iQ=E(2,(e,t)=>ro(e,{onFailure:n=>Ca(t(n)),onSuccess:ee})),sQ=Be((e,t)=>ee(t.runtimeFlags)),ee=e=>{const t=new eF(fn);return t.effect_instruction_i0=e,t},Te=e=>{const t=new Gt(Db);return t.commit=e,t},K=e=>{const t=new Gt(gL);return t.effect_instruction_i0=e,t},rE=E(e=>e.length===3||e.length===2&&!(wi(e[1])&&"onlyEffect"in e[1]),(e,t)=>B(e,n=>{const r=typeof t=="function"?t(n):t;return Ws(r)?Vn(r,n):LV(r)?ay(i=>{r.then(s=>i(ee(n)),s=>i(Ot(new fE(s,"An unknown error occurred in Effect.tap"))))}):ee(n)})),aQ=e=>Be(t=>{const n=t.getFiberRef(Cx),r=O(n,lt(()=>t.scope()));return e(of(Cx,X(r)))}),um=e=>{const t=new Gt(Xu);return t.effect_instruction_i0=Gj(Fl),t.effect_instruction_i1=()=>e,t},_i=e=>nF(e,function(){const t=new Gt(Xu);return t.effect_instruction_i0=Gj(Fl),t.effect_instruction_i1=n=>Vj(n)?gn(()=>this.effect_instruction_i0(tE)):gn(()=>this.effect_instruction_i0(um)),t}),et=ee(void 0),cF=e=>{const t=new Gt(Xu);return t.effect_instruction_i0=e,t.effect_instruction_i1=void 0,t},iE=E(2,(e,t)=>B(t,n=>n?O(e,Ae(X)):ee(V()))),sE=e=>{const t=new Gt(Yg);return t.effect_instruction_i0=e.while,t.effect_instruction_i1=e.body,t.effect_instruction_i2=e.step,t},kx=e=>Te(()=>{const t=new Gt(Ad);return t.effect_instruction_i0=e(),t}),uF=function(){const e=arguments.length===1?arguments[0]:arguments[1].bind(arguments[0]);return kx(()=>e(O))},fF=(e,...t)=>Object.defineProperty(t.length===0?function(...n){return kx(()=>e.apply(this,n))}:function(...n){let r=kx(()=>e.apply(this,n));for(const i of t)r=i(r,...n);return r},"length",{value:e.length,configurable:!0}),oQ=E(2,(e,t)=>{const n=new Gt(Xu);return n.effect_instruction_i0=t,n.effect_instruction_i1=()=>e,n}),aE=e=>{const t=new Gt(Hp);return typeof(e==null?void 0:e.priority)<"u"?EQ(t,e.priority):t},iv=E(2,(e,t)=>B(e,n=>Ae(t,r=>[n,r]))),sv=E(2,(e,t)=>B(e,n=>Vn(t,n))),Et=E(2,(e,t)=>B(e,()=>t)),dF=E(3,(e,t,n)=>B(e,r=>Ae(t,i=>n(r,i)))),lQ=Ea(()=>{const e=setInterval(()=>{},2147483647);return K(()=>clearInterval(e))}),oE=e=>B(ev,t=>O(e,yh(t))),yh=E(2,(e,t)=>B(e.interruptAsFork(t),()=>e.await)),cQ={_tag:"All",syslog:0,label:"ALL",ordinal:Number.MIN_SAFE_INTEGER,pipe(){return ie(this,arguments)}},uQ={_tag:"Fatal",syslog:2,label:"FATAL",ordinal:5e4,pipe(){return ie(this,arguments)}},fQ={_tag:"Error",syslog:3,label:"ERROR",ordinal:4e4,pipe(){return ie(this,arguments)}},hF={_tag:"Warning",syslog:4,label:"WARN",ordinal:3e4,pipe(){return ie(this,arguments)}},mF={_tag:"Info",syslog:6,label:"INFO",ordinal:2e4,pipe(){return ie(this,arguments)}},pF={_tag:"Debug",syslog:7,label:"DEBUG",ordinal:1e4,pipe(){return ie(this,arguments)}},dQ={_tag:"Trace",syslog:7,label:"TRACE",ordinal:0,pipe(){return ie(this,arguments)}},hQ={_tag:"None",syslog:7,label:"OFF",ordinal:Number.MAX_SAFE_INTEGER,pipe(){return ie(this,arguments)}},mQ="effect/FiberRef",pQ=Symbol.for(mQ),gQ={_A:e=>e},lE=e=>Be(t=>Ze(t.getFiberRef(e))),av=E(2,(e,t)=>B(lE(e),t)),DO=E(2,(e,t)=>yQ(e,()=>[void 0,t])),yQ=E(2,(e,t)=>Be(n=>{const[r,i]=t(n.getFiberRef(e));return n.setFiberRef(e,i),ee(r)})),of=E(3,(e,t,n)=>tF(sv(lE(t),DO(t,n)),()=>e,r=>DO(t,r))),bQ=E(3,(e,t,n)=>av(t,r=>of(e,t,n(r)))),rn=(e,t)=>lf(e,{differ:Uj(),fork:(t==null?void 0:t.fork)??ge,join:t==null?void 0:t.join}),vQ=e=>{const t=bJ();return lf(e,{differ:t,fork:t.empty})},SQ=e=>{const t=vJ(Uj());return lf(e,{differ:t,fork:t.empty})},gF=e=>{const t=yJ();return lf(e,{differ:t,fork:t.empty})},lf=(e,t)=>({...Zh,[pQ]:gQ,initial:e,commit(){return lE(this)},diff:(r,i)=>t.differ.diff(r,i),combine:(r,i)=>t.differ.combine(r,i),patch:r=>i=>t.differ.patch(r,i),fork:t.fork,join:t.join??((r,i)=>i)}),wQ=e=>lf(e,{differ:RO,fork:RO.empty}),is=pe(Symbol.for("effect/FiberRef/currentContext"),()=>gF(Xi())),cf=pe(Symbol.for("effect/FiberRef/currentSchedulingPriority"),()=>rn(0)),yF=pe(Symbol.for("effect/FiberRef/currentMaxOpsBeforeYield"),()=>rn(2048)),xQ=pe(Symbol.for("effect/FiberRef/currentLogAnnotation"),()=>rn(Jb())),_Q=pe(Symbol.for("effect/FiberRef/currentLogLevel"),()=>rn(mF)),kQ=pe(Symbol.for("effect/FiberRef/currentLogSpan"),()=>rn(Tu())),EQ=E(2,(e,t)=>of(e,cf,t)),CQ=pe(Symbol.for("effect/FiberRef/currentConcurrency"),()=>rn("unbounded")),TQ=pe(Symbol.for("effect/FiberRef/currentRequestBatching"),()=>rn(!0)),AQ=pe(Symbol.for("effect/FiberRef/currentUnhandledErrorLogLevel"),()=>rn(X(pF))),OQ=pe(Symbol.for("effect/FiberRef/versionMismatchErrorLogLevel"),()=>rn(X(hF))),Ex=pe(Symbol.for("effect/FiberRef/currentMetricLabels"),()=>SQ(Za())),Cx=pe(Symbol.for("effect/FiberRef/currentForkScopeOverride"),()=>rn(V(),{fork:()=>V(),join:(e,t)=>e})),ip=pe(Symbol.for("effect/FiberRef/currentInterruptedCause"),()=>rn(to,{fork:()=>to,join:(e,t)=>e})),bF=pe(Symbol.for("effect/FiberRef/currentTracerEnabled"),()=>rn(!0)),vF=pe(Symbol.for("effect/FiberRef/currentTracerTiming"),()=>rn(!0)),RQ=pe(Symbol.for("effect/FiberRef/currentTracerSpanAnnotations"),()=>rn(Jb())),MQ=pe(Symbol.for("effect/FiberRef/currentTracerSpanLinks"),()=>rn(tn())),zO=Symbol.for("effect/Scope"),IO=Symbol.for("effect/CloseableScope"),SF=(e,t)=>e.addFinalizer(()=>ii(t)),oy=(e,t)=>e.addFinalizer(t),Tx=(e,t)=>e.close(t),ks=(e,t)=>e.fork(t),NQ=e=>DQ(ge)(e),DQ=E(2,(e,t)=>{const n=O(e,Yk,Bn(t));switch(n._tag){case"None":return O(bj(e),Ik,Dt({onNone:()=>{const r=Ye(Gk(e)).flatMap(i=>Ye(Rj(i)).map(s=>`#${s}`));return new IQ(r?`Interrupted by fibers: ${r.join(", ")}`:void 0)},onSome:ge}));case"Some":return n.value}}),cE=function(){class e extends globalThis.Error{commit(){return Ot(this)}toJSON(){const n={...this};return this.message&&(n.message=this.message),this.cause&&(n.cause=this.cause),n}[Pe](){return this.toString!==globalThis.Error.prototype.toString?this.stack?`${this.toString()}
|
|
63
|
+
${this.stack.split(`
|
|
64
|
+
`).slice(1).join(`
|
|
65
|
+
`)}`:this.toString():"Bun"in globalThis?sf(pl(this),{renderErrorCause:!0}):this}}return Object.assign(e.prototype,l7),e}(),uE=(e,t)=>{class n extends cE{constructor(){super(...arguments);g(this,"_tag",t)}}return Object.assign(n.prototype,e),n.prototype.name=t,n},$O=Symbol.for("effect/Cause/errors/RuntimeException"),zQ=uE({[$O]:$O},"RuntimeException"),Ax=Symbol.for("effect/Cause/errors/InterruptedException"),IQ=uE({[Ax]:Ax},"InterruptedException"),$Q=e=>ue(e,Ax),LO=Symbol.for("effect/Cause/errors/NoSuchElement"),ov=uE({[LO]:LO},"NoSuchElementException"),jO=Symbol.for("effect/Cause/errors/UnknownException"),fE=function(){class e extends cE{constructor(r,i){super(i??"An unknown error occurred",{cause:r});g(this,"_tag","UnknownException");g(this,"error");this.error=r}}return Object.assign(e.prototype,{[jO]:jO,name:"UnknownException"}),e}(),lv=e=>Ws(e)&&"_tag"in e&&(e._tag==="Success"||e._tag==="Failure"),wF=e=>e._tag==="Failure",LQ=e=>e._tag==="Success",Gp=E(2,(e,t)=>{switch(e._tag){case un:return Xe(e.effect_instruction_i0);case fn:return Ze(t)}}),t0=e=>Gp(e,void 0),Gc=(e,t)=>BQ(e,t!=null&&t.parallel?no:Tn),xF=e=>Xe(Xr(e)),bh=e=>Xe(pl(e)),Xe=e=>{const t=new Zj(un);return t.effect_instruction_i0=e,t},jQ=E(2,(e,t)=>{switch(e._tag){case un:return Xe(e.effect_instruction_i0);case fn:return t(e.effect_instruction_i0)}}),FQ=e=>O(e,jQ(ge)),PQ=e=>Xe(hi(e)),Yp=E(2,(e,t)=>{switch(e._tag){case un:return Xe(e.effect_instruction_i0);case fn:return Ze(t(e.effect_instruction_i0))}}),cv=E(2,(e,{onFailure:t,onSuccess:n})=>{switch(e._tag){case un:return t(e.effect_instruction_i0);case fn:return n(e.effect_instruction_i0)}}),Ox=E(2,(e,{onFailure:t,onSuccess:n})=>{switch(e._tag){case un:return t(e.effect_instruction_i0);case fn:return n(e.effect_instruction_i0)}}),Ze=e=>{const t=new eF(fn);return t.effect_instruction_i0=e,t},An=Ze(void 0),UQ=E(2,(e,t)=>dE(e,t,{onSuccess:(n,r)=>[n,r],onFailure:Tn})),_F=E(2,(e,t)=>dE(e,t,{onSuccess:(n,r)=>r,onFailure:Tn})),dE=E(3,(e,t,{onFailure:n,onSuccess:r})=>{switch(e._tag){case un:switch(t._tag){case fn:return Xe(e.effect_instruction_i0);case un:return Xe(n(e.effect_instruction_i0,t.effect_instruction_i0))}case fn:switch(t._tag){case fn:return Ze(r(e.effect_instruction_i0,t.effect_instruction_i0));case un:return Xe(t.effect_instruction_i0)}}}),BQ=(e,t)=>{const n=qs(e);return Ks(n)?O(Os(n),Dk(O(Pi(n),Yp(Kt)),(r,i)=>O(r,dE(i,{onSuccess:(s,a)=>O(s,Mn(a)),onFailure:t}))),Yp(Vs),Yp(r=>qn(r)),X):V()},uv=e=>({...Zh,[XJ]:WJ,state:em(ZJ([])),commit(){return io(this)},blockingOn:e}),fv=()=>B(ev,e=>HQ(e)),HQ=e=>K(()=>uv(e)),io=e=>Ea(t=>{const n=Jt(e.state);switch(n._tag){case Wb:return t(n.effect);case am:return n.joiners.push(t),VQ(e,t)}},e.blockingOn),dv=E(2,(e,t)=>K(()=>{const n=Jt(e.state);switch(n._tag){case Wb:return!1;case am:{tm(e.state,Xj(t));for(let r=0,i=n.joiners.length;r<i;r++)n.joiners[r](t);return!0}}})),kF=E(2,(e,t)=>dv(e,t)),EF=E(2,(e,t)=>dv(e,nn(t))),CF=E(2,(e,t)=>dv(e,oF(t))),qQ=e=>K(()=>Jt(e.state)._tag===Wb),hE=E(2,(e,t)=>dv(e,ee(t))),hv=(e,t)=>{const n=Jt(e.state);if(n._tag===am){tm(e.state,Xj(t));for(let r=0,i=n.joiners.length;r<i;r++)n.joiners[r](t)}},VQ=(e,t)=>K(()=>{const n=Jt(e.state);if(n._tag===am){const r=n.joiners.indexOf(t);r>=0&&n.joiners.splice(r,1)}}),KQ=Be(e=>Ze(e.currentContext)),mE=()=>KQ,Pl=e=>B(mE(),e),mv=E(2,(e,t)=>of(is,t)(e)),pE=E(2,(e,t)=>bQ(is,n=>sr(n,t))(e)),TF=E(2,(e,t)=>Pl(n=>mv(e,t(n)))),gE=e=>{const t=e.currentSpan;return t!==void 0&&t._tag==="Span"?X(t):V()},GQ={_tag:"Span",spanId:"noop",traceId:"noop",sampled:!1,status:{_tag:"Ended",startTime:BigInt(0),endTime:BigInt(0),exit:An},attributes:new Map,links:[],kind:"internal",attribute(){},event(){},end(){},addLinks(){}},YQ=e=>Object.assign(Object.create(GQ),e),JQ="effect/Clock",FO=Symbol.for(JQ),uf=mo("effect/Clock"),QQ=2**31-1,PO={unsafeSchedule(e,t){const n=ry(t);if(n>QQ)return La;let r=!1;const i=setTimeout(()=>{r=!0,e()},n);return()=>(clearTimeout(i),!r)}},UO=function(){const e=BigInt(1e6);if(typeof performance>"u"||typeof performance.now!="function")return()=>BigInt(Date.now())*e;let t;return()=>(t===void 0&&(t=BigInt(Date.now())*e-BigInt(Math.round(performance.now()*1e6))),t+BigInt(Math.round(performance.now()*1e6)))}(),XQ=function(){const e=typeof process=="object"&&"hrtime"in process&&typeof process.hrtime.bigint=="function"?process.hrtime:void 0;if(!e)return UO;const t=UO()-e.bigint();return()=>t+e.bigint()}();var HN;HN=FO;class WQ{constructor(){g(this,HN,FO);g(this,"currentTimeMillis",K(()=>this.unsafeCurrentTimeMillis()));g(this,"currentTimeNanos",K(()=>this.unsafeCurrentTimeNanos()))}unsafeCurrentTimeMillis(){return Date.now()}unsafeCurrentTimeNanos(){return XQ()}scheduler(){return ee(PO)}sleep(t){return xi(n=>{const r=PO.unsafeSchedule(()=>n(et),t);return ii(K(r))})}}const ZQ=()=>new WQ,Ou=J7,ly=e=>e.replace(/[/\\^$*+?.()|[\]{}]/g,"\\$&"),AF="And",OF="Or",RF="InvalidData",MF="MissingData",NF="SourceUnavailable",DF="Unsupported",eX="effect/ConfigError",BO=Symbol.for(eX),ff={_tag:"ConfigError",[BO]:BO},zF=(e,t)=>{const n=Object.create(ff);return n._op=AF,n.left=e,n.right=t,Object.defineProperty(n,"toString",{enumerable:!1,value(){return`${this.left} and ${this.right}`}}),Object.defineProperty(n,"message",{enumerable:!1,get(){return this.toString()}}),n},IF=(e,t)=>{const n=Object.create(ff);return n._op=OF,n.left=e,n.right=t,Object.defineProperty(n,"toString",{enumerable:!1,value(){return`${this.left} or ${this.right}`}}),Object.defineProperty(n,"message",{enumerable:!1,get(){return this.toString()}}),n},tX=(e,t,n={pathDelim:"."})=>{const r=Object.create(ff);return r._op=RF,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Invalid data at ${O(this.path,tf(n.pathDelim))}: "${this.message}")`}}),r},Sl=(e,t,n={pathDelim:"."})=>{const r=Object.create(ff);return r._op=MF,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Missing data at ${O(this.path,tf(n.pathDelim))}: "${this.message}")`}}),r},nX=(e,t,n,r={pathDelim:"."})=>{const i=Object.create(ff);return i._op=NF,i.path=e,i.message=t,i.cause=n,Object.defineProperty(i,"toString",{enumerable:!1,value(){return`(Source unavailable at ${O(this.path,tf(r.pathDelim))}: "${this.message}")`}}),i},rX=(e,t,n={pathDelim:"."})=>{const r=Object.create(ff);return r._op=DF,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Unsupported operation at ${O(this.path,tf(n.pathDelim))}: "${this.message}")`}}),r},Ho=E(2,(e,t)=>{switch(e._op){case AF:return zF(Ho(e.left,t),Ho(e.right,t));case OF:return IF(Ho(e.left,t),Ho(e.right,t));case RF:return tX([...t,...e.path],e.message);case MF:return Sl([...t,...e.path],e.message);case NF:return nX([...t,...e.path],e.message,e.cause);case DF:return rX([...t,...e.path],e.message)}}),iX={_tag:"Empty"},n0=E(2,(e,t)=>{let n=Wk(t),r=e;for(;_Y(n);){const i=n.head;switch(i._tag){case"Empty":{n=n.tail;break}case"AndThen":{n=yl(i.first,yl(i.second,n.tail));break}case"MapName":{r=tl(r,i.f),n=n.tail;break}case"Nested":{r=Xg(r,i.name),n=n.tail;break}case"Unnested":{if(O(Od(r),aK(i.name)))r=fl(r),n=n.tail;else return me(Sl(r,`Expected ${i.name} to be in path in ConfigProvider#unnested`));break}}}return de(r)}),sX="Constant",aX="Fail",oX="Fallback",lX="Described",cX="Lazy",uX="MapOrFail",fX="Nested",dX="Primitive",hX="Sequence",mX="HashMap",pX="ZipWith";var HO={};const cy=(e,t)=>[...e,...t],gX="effect/ConfigProvider",qO=Symbol.for(gX),yX=mo("effect/ConfigProvider"),bX="effect/ConfigProviderFlat",VO=Symbol.for(bX),vX=e=>({[qO]:qO,pipe(){return ie(this,arguments)},...e}),SX=e=>({[VO]:VO,patch:e.patch,load:(t,n,r=!0)=>e.load(t,n,r),enumerateChildren:e.enumerateChildren}),wX=e=>vX({load:t=>B(Ir(e,Za(),t,!1),n=>Dt(Od(n),{onNone:()=>Ot(Sl(Za(),`Expected a single value having structure: ${t}`)),onSome:ee})),flattened:e}),xX=e=>{const{pathDelim:t,seqDelim:n}=Object.assign({},{pathDelim:"_",seqDelim:","},e),r=l=>O(l,tf(t)),i=l=>l.split(t),s=()=>typeof process<"u"&&"env"in process&&typeof HO=="object"?HO:{};return wX(SX({load:(l,c,f=!0)=>{const u=r(l),d=s(),h=u in d?X(d[u]):V();return O(h,rv(()=>Sl(l,`Expected ${u} to exist in the process context`)),B(p=>TX(p,l,c,n,f)))},enumerateChildren:l=>K(()=>{const c=s(),d=Object.keys(c).map(h=>i(h.toUpperCase())).filter(h=>{for(let p=0;p<l.length;p++){const b=O(l,VL(p)),S=h[p];if(S===void 0||b!==S)return!1}return!0}).flatMap(h=>h.slice(l.length,l.length+1));return bG(d)}),patch:iX}))},_X=(e,t,n,r)=>{const i=pO(n.length,l=>l>=r.length?V():X([e(l),l+1])),s=pO(r.length,l=>l>=n.length?V():X([t(l),l+1])),a=cy(n,i),o=cy(r,s);return[a,o]},kX=(e,t)=>{let n=t;if(n._tag==="Nested"){const r=e.slice();for(;n._tag==="Nested";)r.push(n.name),n=n.config;return r}return e},Ir=(e,t,n,r)=>{const i=n;switch(i._tag){case sX:return ee(ui(i.value));case lX:return Te(()=>Ir(e,t,i.config,r));case aX:return Ot(Sl(t,i.message));case oX:return O(Te(()=>Ir(e,t,i.first,r)),gh(s=>i.condition(s)?O(Ir(e,t,i.second,r),gh(a=>Ot(IF(s,a)))):Ot(s)));case cX:return Te(()=>Ir(e,t,i.config(),r));case uX:return Te(()=>O(Ir(e,t,i.original,r),B(Rs(s=>O(i.mapOrFail(s),rv(Ho(kX(t,i.original))))))));case fX:return Te(()=>Ir(e,cy(t,ui(i.name)),i.config,r));case dX:return O(n0(t,e.patch),B(s=>O(e.load(s,i,r),B(a=>{if(a.length===0){const o=O(SK(s),lt(()=>"<n/a>"));return Ot(Sl([],`Expected ${i.description} with name ${o}`))}return ee(a)}))));case hX:return O(n0(t,e.patch),B(s=>O(e.enumerateChildren(s),B(OX),B(a=>a.length===0?Te(()=>Ae(Ir(e,t,i.config,!0),ui)):O(Rs(a,o=>Ir(e,mK(t,`[${o}]`),i.config,!0)),Ae(o=>{const l=YL(o);return l.length===0?ui(Za()):ui(l)}))))));case mX:return Te(()=>O(n0(t,e.patch),B(s=>O(e.enumerateChildren(s),B(a=>O(a,Rs(o=>Ir(e,cy(s,ui(o)),i.valueConfig,r)),Ae(o=>o.length===0?ui(Jb()):O(AX(o),tl(l=>hY(mO(Ye(a),l)))))))))));case pX:return Te(()=>O(Ir(e,t,i.left,r),Au,B(s=>O(Ir(e,t,i.right,r),Au,B(a=>{if(an(s)&&an(a))return Ot(zF(s.left,a.left));if(an(s)&&Fi(a))return Ot(s.left);if(Fi(s)&&an(a))return Ot(a.left);if(Fi(s)&&Fi(a)){const o=O(t,tf(".")),l=EX(t,o),[c,f]=_X(l,l,O(s.right,tl(de)),O(a.right,tl(de)));return O(c,mO(f),Rs(([u,d])=>O(iv(u,d),Ae(([h,p])=>i.zip(h,p)))))}throw new Error("BUG: ConfigProvider.fromFlatLoop - please report an issue at https://github.com/Effect-TS/effect/issues")})))))}},EX=(e,t)=>n=>me(Sl(e,`The element at index ${n} in a sequence at path "${t}" was missing`)),CX=(e,t)=>e.split(new RegExp(`\\s*${ly(t)}\\s*`)),TX=(e,t,n,r,i)=>i?O(CX(e,r),Rs(s=>n.parse(s.trim())),rv(Ho(t))):O(n.parse(e),nE({onFailure:Ho(t),onSuccess:ui})),AX=e=>Object.keys(e[0]).map(t=>e.map(n=>n[t])),OX=e=>O(Rs(e,MX),nE({onFailure:()=>Za(),onSuccess:ch(Ou)}),Au,Ae(Y7)),RX=/^(\[(\d+)\])$/,MX=e=>{const t=e.match(RX);if(t!==null){const n=t[2];return O(n!==void 0&&n.length>0?X(n):V(),po(NX))}return V()},NX=e=>{const t=Number.parseInt(e);return Number.isNaN(t)?V():X(t)},KO=Symbol.for("effect/Console"),$F=mo("effect/Console"),DX={[KO]:KO,assert(e,...t){return K(()=>{console.assert(e,...t)})},clear:K(()=>{console.clear()}),count(e){return K(()=>{console.count(e)})},countReset(e){return K(()=>{console.countReset(e)})},debug(...e){return K(()=>{console.debug(...e)})},dir(e,t){return K(()=>{console.dir(e,t)})},dirxml(...e){return K(()=>{console.dirxml(...e)})},error(...e){return K(()=>{console.error(...e)})},group(e){return e!=null&&e.collapsed?K(()=>console.groupCollapsed(e==null?void 0:e.label)):K(()=>console.group(e==null?void 0:e.label))},groupEnd:K(()=>{console.groupEnd()}),info(...e){return K(()=>{console.info(...e)})},log(...e){return K(()=>{console.log(...e)})},table(e,t){return K(()=>{console.table(e,t)})},time(e){return K(()=>console.time(e))},timeEnd(e){return K(()=>console.timeEnd(e))},timeLog(e,...t){return K(()=>{console.timeLog(e,...t)})},trace(...e){return K(()=>{console.trace(...e)})},warn(...e){return K(()=>{console.warn(...e)})},unsafe:console},zX="effect/Random",GO=Symbol.for(zX),IX=mo("effect/Random");var qN;qN=GO;class $X{constructor(t){g(this,"seed");g(this,qN,GO);g(this,"PRNG");this.seed=t,this.PRNG=new qV(t)}get next(){return K(()=>this.PRNG.number())}get nextBoolean(){return Ae(this.next,t=>t>.5)}get nextInt(){return K(()=>this.PRNG.integer(Number.MAX_SAFE_INTEGER))}nextRange(t,n){return Ae(this.next,r=>(n-t)*r+t)}nextIntBetween(t,n){return K(()=>this.PRNG.integer(n-t)+t)}shuffle(t){return LX(t,n=>this.nextIntBetween(0,n))}}const LX=(e,t)=>Te(()=>O(K(()=>Array.from(e)),B(n=>{const r=[];for(let i=n.length;i>=2;i=i-1)r.push(i);return O(r,nv(i=>O(t(i),Ae(s=>jX(n,i-1,s)))),Vn(qs(n)))}))),jX=(e,t,n)=>{const r=e[t];return e[t]=e[n],e[n]=r,e},FX=e=>new $X(re(e)),YO=Symbol.for("effect/Tracer"),PX=e=>({[YO]:YO,...e}),yE=mo("effect/Tracer"),pv=mo("effect/ParentSpan"),JO=function(){const e="abcdef0123456789",t=e.length;return function(n){let r="";for(let i=0;i<n;i++)r+=e.charAt(Math.floor(Math.random()*t));return r}}();class UX{constructor(t,n,r,i,s,a){g(this,"name");g(this,"parent");g(this,"context");g(this,"startTime");g(this,"kind");g(this,"_tag","Span");g(this,"spanId");g(this,"traceId","native");g(this,"sampled",!0);g(this,"status");g(this,"attributes");g(this,"events",[]);g(this,"links");this.name=t,this.parent=n,this.context=r,this.startTime=s,this.kind=a,this.status={_tag:"Started",startTime:s},this.attributes=new Map,this.traceId=n._tag==="Some"?n.value.traceId:JO(32),this.spanId=JO(16),this.links=Array.from(i)}end(t,n){this.status={_tag:"Ended",endTime:t,exit:n,startTime:this.status.startTime}}attribute(t,n){this.attributes.set(t,n)}event(t,n,r){this.events.push([t,n,r??{}])}addLinks(t){this.links.push(...t)}}const BX=PX({span:(e,t,n,r,i,s)=>new UX(e,t,n,r,i,s),context:e=>e()}),HX=e=>{if((e==null?void 0:e.captureStackTrace)===!1)return e;if((e==null?void 0:e.captureStackTrace)!==void 0&&typeof e.captureStackTrace!="boolean")return e;const t=Error.stackTraceLimit;Error.stackTraceLimit=3;const n=new Error;Error.stackTraceLimit=t;let r=!1;return{...e,captureStackTrace:()=>{if(r!==!1)return r;if(n.stack!==void 0){const i=n.stack.split(`
|
|
66
|
+
`);if(i[3]!==void 0)return r=i[3].trim(),r}}}},Rx=Zu()("effect/Tracer/DisablePropagation",{defaultValue:La}),qX=O(Xi(),Gr(uf,ZQ()),Gr($F,DX),Gr(IX,FX(Math.random())),Gr(yX,xX()),Gr(yE,BX)),Ru=pe(Symbol.for("effect/DefaultServices/currentServices"),()=>gF(qX)),VX=e=>{const t=ni(e);return LF(n=>n.sleep(t))},KX=e=>Be(t=>e(t.currentDefaultServices)),LF=e=>KX(t=>e(t.unsafeMap.get(uf.key))),GX=LF(e=>e.currentTimeMillis),YX=Wh,JX=c7;let df=class extends JX{};const jF="Sequential",FF="Parallel",QX="ParallelN",rl={_tag:jF},Mx={_tag:FF},XX=e=>({_tag:QX,parallelism:e}),WX=e=>e._tag===jF,ZX=e=>e._tag===FF,uy=rl,Nx=Mx,Dx=XX;function eW(e){return new so(e)}function tW(){return eW(new Map)}const QO=Symbol.for("effect/FiberRefs");var VN;VN=QO;class so{constructor(t){g(this,"locals");g(this,VN,QO);this.locals=t}pipe(){return ie(this,arguments)}}const nW=(e,t,n,r=!1)=>{const i=e;let s=t,a=n,o=r,l;for(;l===void 0;)if(en(s)&&en(a)){const c=Hn(s)[0],f=fl(s),u=Hn(a)[0],d=Hn(a)[1],h=fl(a);c.startTimeMillis<u.startTimeMillis?(a=h,o=!0):c.startTimeMillis>u.startTimeMillis?s=f:c.id<u.id?(a=h,o=!0):c.id>u.id?s=f:l=[d,o]}else l=[i.initial,!0];return l},rW=E(3,(e,t,n)=>{const r=new Map(e.locals);return n.locals.forEach((i,s)=>{const a=i[0][1];if(!i[0][0][ve](t)){if(!r.has(s)){if(oe(a,s.initial))return;r.set(s,[[t,s.join(s.initial,a)]]);return}const o=r.get(s),[l,c]=nW(s,o,i);if(c){const f=s.diff(l,a),u=o[0][1],d=s.join(u,s.patch(f)(u));if(!oe(u,d)){let h;const p=o[0][0];p[ve](t)?h=[[p,d],...o.slice(1)]:h=[[t,d],...o],r.set(s,h)}}}}),new so(r)}),iW=E(2,(e,t)=>{const n=new Map;return PF(e,n,t),new so(n)}),PF=(e,t,n)=>{e.locals.forEach((r,i)=>{const s=r[0][1],a=i.patch(i.fork)(s);oe(s,a)?t.set(i,r):t.set(i,[[n,a],...r])})},UF=E(2,(e,t)=>{const n=new Map(e.locals);return n.delete(t),new so(n)}),BF=E(2,(e,t)=>e.locals.has(t)?X(Hn(e.locals.get(t))[1]):V()),vh=E(2,(e,t)=>O(BF(e,t),lt(()=>t.initial))),zx=E(2,(e,{fiberId:t,fiberRef:n,value:r})=>{if(e.locals.size===0)return new so(new Map([[n,[[t,r]]]]));const i=new Map(e.locals);return Ix(i,t,n,r),new so(i)}),Ix=(e,t,n,r)=>{const i=e.get(n)??[];let s;if(en(i)){const[a,o]=Hn(i);if(a[ve](t)){if(oe(o,r))return;s=[[t,r],...i.slice(1)]}else s=[[t,r],...i]}else s=[[t,r]];e.set(n,s)},sW=E(2,(e,{entries:t,forkAs:n})=>{if(e.locals.size===0)return new so(new Map(t));const r=new Map(e.locals);return n!==void 0&&PF(e,r,n),t.forEach(([i,s])=>{s.length===1?Ix(r,s[0][0],i,s[0][1]):s.forEach(([a,o])=>{Ix(r,a,i,o)})}),new so(r)}),XO=BF,HF=vh,aW=sW,oW=tW,qF="Empty",VF="Add",KF="Remove",GF="Update",YF="AndThen",lW={_tag:qF},bE=(e,t)=>{const n=new Map(e.locals);let r=lW;for(const[i,s]of t.locals.entries()){const a=Hn(s)[1],o=n.get(i);if(o!==void 0){const l=Hn(o)[1];oe(l,a)||(r=r0({_tag:GF,fiberRef:i,patch:i.diff(l,a)})(r))}else r=r0({_tag:VF,fiberRef:i,value:a})(r);n.delete(i)}for(const[i]of n.entries())r=r0({_tag:KF,fiberRef:i})(r);return r},r0=E(2,(e,t)=>({_tag:YF,first:e,second:t})),JF=E(3,(e,t,n)=>{let r=n,i=ui(e);for(;en(i);){const s=Hn(i),a=fl(i);switch(s._tag){case qF:{i=a;break}case VF:{r=zx(r,{fiberId:t,fiberRef:s.fiberRef,value:s.value}),i=a;break}case KF:{r=UF(r,s.fiberRef),i=a;break}case GF:{const o=vh(r,s.fiberRef);r=zx(r,{fiberId:t,fiberRef:s.fiberRef,value:s.fiberRef.patch(s.patch)(o)}),i=a;break}case YF:{i=Xg(s.first)(Xg(s.second)(a));break}}}return r}),Sh=bE,wh=JF,gv="effect/FiberStatus",wl=Symbol.for(gv),fy="Done",WO="Running",ZO="Suspended",cW=gt(`${gv}-${fy}`);var KN;let uW=class{constructor(){g(this,KN,wl);g(this,"_tag",fy)}[(KN=wl,be)](){return cW}[ve](t){return vE(t)&&t._tag===fy}};var GN;class fW{constructor(t){g(this,"runtimeFlags");g(this,GN,wl);g(this,"_tag",WO);this.runtimeFlags=t}[(GN=wl,be)](){return O(re(gv),Se(re(this._tag)),Se(re(this.runtimeFlags)),tt(this))}[ve](t){return vE(t)&&t._tag===WO&&this.runtimeFlags===t.runtimeFlags}}var YN;class dW{constructor(t,n){g(this,"runtimeFlags");g(this,"blockingOn");g(this,YN,wl);g(this,"_tag",ZO);this.runtimeFlags=t,this.blockingOn=n}[(YN=wl,be)](){return O(re(gv),Se(re(this._tag)),Se(re(this.runtimeFlags)),Se(re(this.blockingOn)),tt(this))}[ve](t){return vE(t)&&t._tag===ZO&&this.runtimeFlags===t.runtimeFlags&&oe(this.blockingOn,t.blockingOn)}}const hW=new uW,mW=e=>new fW(e),pW=(e,t)=>new dW(e,t),vE=e=>ue(e,wl),gW=e=>e._tag===fy,yW=hW,QF=mW,bW=pW,vW=gW,SW=cQ,wW=uQ,xW=fQ,_W=hF,kW=mF,EW=pF,CW=dQ,TW=hQ,AW=O(Ou,FL(e=>e.ordinal)),OW=Q7(AW),RW=e=>{switch(e){case"All":return SW;case"Debug":return EW;case"Error":return xW;case"Fatal":return wW;case"Info":return kW;case"Trace":return CW;case"None":return TW;case"Warning":return _W}},MW=Symbol.for("effect/Micro"),dy=Symbol.for("effect/Micro/MicroExit"),eR=Symbol.for("effect/Micro/MicroCause"),NW={_E:ge};var JN;class XF extends globalThis.Error{constructor(n,r,i){const s=`MicroCause.${n}`;let a,o,l;if(r instanceof globalThis.Error){a=`(${s}) ${r.name}`,o=r.message;const c=o.split(`
|
|
67
|
+
`).length;l=r.stack?`(${s}) ${r.stack.split(`
|
|
68
|
+
`).slice(0,c+3).join(`
|
|
69
|
+
`)}`:`${a}: ${o}`}else a=s,o=gu(r,0),l=`${a}: ${o}`;i.length>0&&(l+=`
|
|
70
|
+
${i.join(`
|
|
71
|
+
`)}`);super(o);g(this,"_tag");g(this,"traces");g(this,JN);this._tag=n,this.traces=i,this[eR]=NW,this.name=a,this.stack=l}pipe(){return ie(this,arguments)}toString(){return this.stack}[(JN=eR,Pe)](){return this.stack}}class DW extends XF{constructor(n,r=[]){super("Die",n,r);g(this,"defect");this.defect=n}}const zW=(e,t=[])=>new DW(e,t);let IW=class extends XF{constructor(t=[]){super("Interrupt","interrupted",t)}};const $W=(e=[])=>new IW(e),LW=e=>e._tag==="Interrupt",tR=Symbol.for("effect/Micro/MicroFiber"),jW={_A:ge,_E:ge};var QN;QN=tR;class FW{constructor(t,n=!0){g(this,"context");g(this,"interruptible");g(this,QN);g(this,"_stack",[]);g(this,"_observers",[]);g(this,"_exit");g(this,"_children");g(this,"currentOpCount",0);g(this,"_interrupted",!1);g(this,"_yielded");this.context=t,this.interruptible=n,this[tR]=jW}getRef(t){return C7(this.context,t)}addObserver(t){return this._exit?(t(this._exit),pu):(this._observers.push(t),()=>{const n=this._observers.indexOf(t);n>=0&&this._observers.splice(n,1)})}unsafeInterrupt(){this._exit||(this._interrupted=!0,this.interruptible&&this.evaluate(kE))}unsafePoll(){return this._exit}evaluate(t){if(this._exit)return;if(this._yielded!==void 0){const i=this._yielded;this._yielded=void 0,i()}const n=this.runLoop(t);if(n===sp)return;const r=nR.interruptChildren&&nR.interruptChildren(this);if(r!==void 0)return this.evaluate(my(r,()=>n));this._exit=n;for(let i=0;i<this._observers.length;i++)this._observers[i](n);this._observers.length=0}runLoop(t){let n=!1,r=t;this.currentOpCount=0;try{for(;;){if(this.currentOpCount++,!n&&this.getRef(EE).shouldYield(this)){n=!0;const i=r;r=my(qW,()=>i)}if(r=r[$x](this),r===sp){const i=this._yielded;return dy in i?(this._yielded=void 0,i):sp}}}catch(i){return ue(r,$x)?Lx(i):Lx(`MicroFiber.runLoop: Not a valid effect: ${String(r)}`)}}getCont(t){for(;;){const n=this._stack.pop();if(!n)return;const r=n[hy]&&n[hy](this);if(r)return{[t]:r};if(n[t])return n}}yieldWith(t){return this._yielded=t,sp}children(){return this._children??(this._children=new Set)}}const nR=pe("effect/Micro/fiberMiddleware",()=>({interruptChildren:void 0})),WF=Symbol.for("effect/Micro/identifier"),Qt=Symbol.for("effect/Micro/args"),$x=Symbol.for("effect/Micro/evaluate"),Mu=Symbol.for("effect/Micro/successCont"),Yc=Symbol.for("effect/Micro/failureCont"),hy=Symbol.for("effect/Micro/ensureCont"),sp=Symbol.for("effect/Micro/Yield"),PW={_A:ge,_E:ge,_R:ge},UW={...YX,_op:"Micro",[MW]:PW,pipe(){return ie(this,arguments)},[Symbol.iterator](){return new cL(new Xh(this))},toJSON(){return{_id:"Micro",op:this[WF],...Qt in this?{args:this[Qt]}:void 0}},toString(){return it(this)},[Pe](){return it(this)}};function BW(e){return Lx("Micro.evaluate: Not implemented")}const yv=e=>({...UW,[WF]:e.op,[$x]:e.eval??BW,[Mu]:e.contA,[Yc]:e.contE,[hy]:e.ensure}),SE=e=>{const t=yv(e);return function(){const n=Object.create(t);return n[Qt]=e.single===!1?arguments:arguments[0],n}},ZF=e=>{const t={...yv(e),[dy]:dy,_tag:e.op,get[e.prop](){return this[Qt]},toJSON(){return{_id:"MicroExit",_tag:e.op,[e.prop]:this[Qt]}},[ve](n){return GW(n)&&n._tag===e.op&&oe(this[Qt],n[Qt])},[be](){return tt(this,Se(gt(e.op))(re(this[Qt])))}};return function(n){const r=Object.create(t);return r[Qt]=n,r[Mu]=void 0,r[Yc]=void 0,r[hy]=void 0,r}},wE=ZF({op:"Success",prop:"value",eval(e){const t=e.getCont(Mu);return t?t[Mu](this[Qt],e):e.yieldWith(this)}}),e3=ZF({op:"Failure",prop:"cause",eval(e){let t=e.getCont(Yc);for(;LW(this[Qt])&&t&&e.interruptible;)t=e.getCont(Yc);return t?t[Yc](this[Qt],e):e.yieldWith(this)}}),HW=SE({op:"Yield",eval(e){let t=!1;return e.getRef(EE).scheduleTask(()=>{t||e.evaluate(YW)},this[Qt]??0),e.yieldWith(()=>{t=!0})}}),qW=HW(0),VW=wE(void 0),xE=SE({op:"WithMicroFiber",eval(e){return this[Qt](e)}}),my=E(2,(e,t)=>{const n=Object.create(KW);return n[Qt]=e,n[Mu]=t,n}),KW=yv({op:"OnSuccess",eval(e){return e._stack.push(this),this[Qt]}}),GW=e=>ue(e,dy),t3=wE,_E=e3,kE=_E($W()),Lx=e=>_E(zW(e)),YW=t3(void 0),JW="setImmediate"in globalThis?globalThis.setImmediate:e=>setTimeout(e,0);class n3{constructor(){g(this,"tasks",[]);g(this,"running",!1);g(this,"afterScheduled",()=>{this.running=!1,this.runTasks()})}scheduleTask(t,n){this.tasks.push(t),this.running||(this.running=!0,JW(this.afterScheduled))}runTasks(){const t=this.tasks;this.tasks=[];for(let n=0,r=t.length;n<r;n++)t[n]()}shouldYield(t){return t.currentOpCount>=t.getRef(WW)}flush(){for(;this.tasks.length>0;)this.runTasks()}}const QW=E(2,(e,t)=>xE(n=>{const r=n.context;return n.context=t(r),tZ(e,()=>(n.context=r,VW))})),XW=E(2,(e,t)=>QW(e,sr(t)));class WW extends Zu()("effect/Micro/currentMaxOpsBeforeYield",{defaultValue:()=>2048}){}class EE extends Zu()("effect/Micro/currentScheduler",{defaultValue:()=>new n3}){}const ZW=E(2,(e,t)=>{const n=Object.create(eZ);return n[Qt]=e,n[Mu]=t.onSuccess,n[Yc]=t.onFailure,n}),eZ=yv({op:"OnSuccessAndFailure",eval(e){return e._stack.push(this),this[Qt]}}),tZ=E(2,(e,t)=>rZ(n=>ZW(n(e),{onFailure:r=>my(t(_E(r)),()=>e3(r)),onSuccess:r=>my(t(t3(r)),()=>wE(r))}))),r3=SE({op:"SetInterruptible",ensure(e){if(e.interruptible=this[Qt],e._interrupted&&e.interruptible)return()=>kE}}),nZ=e=>xE(t=>t.interruptible?e:(t.interruptible=!0,t._stack.push(r3(!1)),t._interrupted?kE:e)),rZ=e=>xE(t=>t.interruptible?(t.interruptible=!1,t._stack.push(r3(!0)),e(nZ)):e(ge)),iZ=(e,t)=>{const n=new FW(EE.context(new n3));return n.evaluate(e),n},py=Symbol.for("effect/Readable"),i3=Symbol.for("effect/Ref"),s3={_A:e=>e};var XN,WN,ZN;class sZ extends(ZN=df,WN=i3,XN=py,ZN){constructor(n){super();g(this,"ref");g(this,WN,s3);g(this,XN,py);g(this,"get");this.ref=n,this.get=K(()=>Jt(this.ref))}commit(){return this.get}modify(n){return K(()=>{const r=Jt(this.ref),[i,s]=n(r);return r!==s&&tm(s)(this.ref),i})}}const CE=e=>new sZ(em(e)),gy=e=>K(()=>CE(e)),Gi=e=>e.get,Jc=E(2,(e,t)=>e.modify(()=>[void 0,t])),aZ=E(2,(e,t)=>e.modify(n=>[n,t])),a3=E(2,(e,t)=>e.modify(t)),yy=E(2,(e,t)=>e.modify(n=>[void 0,t(n)])),TE=gy,oZ=Gi,lZ=aZ,jf=a3,cZ=Jc,uZ=yy;class o3{constructor(){g(this,"buckets",[])}scheduleTask(t,n){const r=this.buckets.length;let i,s=0;for(;s<r&&this.buckets[s][0]<=n;s++)i=this.buckets[s];i&&i[0]===n?i[1].push(t):s===r?this.buckets.push([n,[t]]):this.buckets.splice(s,0,[n,[t]])}}class fZ{constructor(t){g(this,"maxNextTickBeforeTimer");g(this,"running",!1);g(this,"tasks",new o3);this.maxNextTickBeforeTimer=t}starveInternal(t){const n=this.tasks.buckets;this.tasks.buckets=[];for(const[r,i]of n)for(let s=0;s<i.length;s++)i[s]();this.tasks.buckets.length===0?this.running=!1:this.starve(t)}starve(t=0){t>=this.maxNextTickBeforeTimer?setTimeout(()=>this.starveInternal(0),0):Promise.resolve(void 0).then(()=>this.starveInternal(t+1))}shouldYield(t){return t.currentOpCount>t.getFiberRef(yF)?t.getFiberRef(cf):!1}scheduleTask(t,n){this.tasks.scheduleTask(t,n),this.running||(this.running=!0,this.starve())}}const l3=pe(Symbol.for("effect/Scheduler/defaultScheduler"),()=>new fZ(2048));class AE{constructor(){g(this,"tasks",new o3);g(this,"deferred",!1)}scheduleTask(t,n){this.deferred?l3.scheduleTask(t,n):this.tasks.scheduleTask(t,n)}shouldYield(t){return t.currentOpCount>t.getFiberRef(yF)?t.getFiberRef(cf):!1}flush(){for(;this.tasks.buckets.length>0;){const t=this.tasks.buckets;this.tasks.buckets=[];for(const[n,r]of t)for(let i=0;i<r.length;i++)r[i]()}this.deferred=!0}}const OE=pe(Symbol.for("effect/FiberRef/currentScheduler"),()=>rn(l3)),c3=pe(Symbol.for("effect/FiberRef/currentRequestMap"),()=>rn(new Map)),rR=(e,t,n,r)=>{switch(e){case void 0:return t();case"unbounded":return n();case"inherit":return av(CQ,i=>i==="unbounded"?n():i>1?r(i):t());default:return e>1?r(e):t()}},dZ=VX,hZ=GX,mZ=uf,u3=e=>e.replace(/[\s="]/g,"_"),pZ=e=>t=>`${u3(t.label)}=${e-t.startTime}ms`,f3="effect/MetricLabel",jx=Symbol.for(f3);var eD;class gZ{constructor(t,n){g(this,"key");g(this,"value");g(this,eD,jx);g(this,"_hash");this.key=t,this.value=n,this._hash=gt(f3+this.key+this.value)}[(eD=jx,be)](){return this._hash}[ve](t){return bZ(t)&&this.key===t.key&&this.value===t.value}pipe(){return ie(this,arguments)}}const yZ=(e,t)=>new gZ(e,t),bZ=e=>ue(e,jx),vZ=e=>Ae(e,X),d3=e=>{let t,n;return typeof e=="function"?t=e:(t=e.try,n=e.catch),Te(()=>{try{return ee(gn(t))}catch(r){return Ot(n?gn(()=>n(r)):new fE(r,"An unknown error occurred in Effect.try"))}})},SZ=e=>y3(e,m3,bE),wZ=e=>y3(e,iv(m3,sQ),([t,n],[r,i])=>[bE(t,r),Fa(n,i)]),h3=E(2,(e,t)=>ro(e,{onFailure:n=>ee(t.onFailure(n)),onSuccess:n=>ee(t.onSuccess(n))})),m3=Be(e=>ee(e.getFiberRefs())),xZ=e=>h3(e,{onFailure:pu,onSuccess:pu}),iR=E(2,(e,t)=>ri(e,{onFailure:n=>sF(()=>t(n)),onSuccess:ee})),_Z=e=>O(fv(),B(t=>O(wZ(e),lF(t),EZ,Ae(n=>Et(n,O(io(t),B(([r,i])=>Vn(iv(p3(r[0]),cF(r[1])),i)))))))),kZ=e=>Ae(e,t=>!t),EZ=e=>Ae(TE(!0),t=>ii(iE(e,lZ(t,!1)))),p3=e=>NZ((t,n)=>O(e,JF(t,n))),CZ=e=>e.length>=1?xi((t,n)=>{try{e(n).then(r=>t(ee(r)),r=>t(Ca(r)))}catch(r){t(Ca(r))}}):xi(t=>{try{e().then(n=>t(ee(n)),n=>t(Ca(n)))}catch(n){t(Ca(n))}}),g3=E(3,(e,t,n)=>Pl(r=>mv(e,Gr(r,t,n)))),sR=E(3,(e,t,n)=>Pl(r=>B(n,i=>mv(e,O(r,Gr(t,i)))))),TZ=dZ,AZ=ee(V()),y3=E(3,(e,t,n)=>B(t,r=>B(e,i=>Ae(t,s=>[n(r,s),i])))),OZ=E(2,(e,t)=>ri(e,{onFailure:n=>Et(t(n),nn(n)),onSuccess:ee})),RZ=e=>{let t,n;typeof e=="function"?t=e:(t=e.try,n=e.catch);const r=i=>n?Zb(()=>n(i)):Ot(new fE(i,"An unknown error occurred in Effect.tryPromise"));return t.length>=1?xi((i,s)=>{try{t(s).then(a=>i(ee(a)),a=>i(r(a)))}catch(a){i(r(a))}}):xi(i=>{try{t().then(s=>i(ee(s)),s=>i(r(s)))}catch(s){i(r(s))}})},MZ=E(2,(e,t)=>B(e,n=>d3({try:()=>t.try(n),catch:t.catch}))),NZ=e=>Be(t=>(t.setFiberRefs(e(t.id(),t.getFiberRefs())),et)),DZ=E(2,(e,t)=>Te(()=>t()?Ae(e,X):ee(V()))),zZ=e=>new Proxy({},{get(t,n,r){return(...i)=>B(e,s=>s[n](...i))}}),b3=BigInt(0),v3=po(e=>$s(e.context,Rx)?e._tag==="Span"?v3(e.parent):V():X(e)),IZ=(e,t,n)=>{const r=!e.getFiberRef(bF)||n.context&&$s(n.context,Rx),i=e.getFiberRef(is),s=n.parent?X(n.parent):n.root?V():v3(Wu(i,pv));let a;if(r)a=YQ({name:t,parent:s,context:Gr(n.context??Xi(),Rx,!0)});else{const o=e.getFiberRef(Ru),l=$s(o,yE),c=$s(o,mZ),f=e.getFiberRef(vF),u=e.getFiberRefs(),d=XO(u,RQ),h=XO(u,MQ),p=h._tag==="Some"?n.links!==void 0?[...qn(h.value),...n.links??[]]:qn(h.value):n.links??Za();a=l.span(t,s,n.context??Xi(),p,f?c.unsafeCurrentTimeNanos():b3,n.kind??"internal",n),d._tag==="Some"&&yY(d.value,(b,S)=>a.attribute(S,b)),n.attributes!==void 0&&Object.entries(n.attributes).forEach(([b,S])=>a.attribute(b,S))}return typeof n.captureStackTrace=="function"&&ny.set(a,n.captureStackTrace),a},$Z=(e,t,n,r)=>K(()=>{e.status._tag!=="Ended"&&(wF(t)&&ny.has(e)&&e.attribute("code.stacktrace",ny.get(e)()),e.end(r?n.unsafeCurrentTimeNanos():b3,t))}),LZ=(e,...t)=>{const n=HX(t.length===1?void 0:t[0]),r=t[t.length-1];return Be(i=>{const s=IZ(i,e,n),a=i.getFiberRef(vF),o=$s(i.getFiberRef(Ru),uf);return vl(r(s),l=>$Z(s,l,o,a))})},jZ=E(2,(e,t)=>g3(e,pv,t)),RE=wF,FZ=LQ,PZ=Gc,UZ=xF,by=bh,On=Xe,BZ=FQ,HZ=Yp,Ms=cv,br=Ze,ME=An,aR=UQ,xh=_F,NE="InterruptSignal",DE="Stateful",zE="Resume",IE="YieldNow",i0=e=>({_tag:NE,cause:e}),Jp=e=>({_tag:DE,onFiber:e}),Zl=e=>({_tag:zE,effect:e}),qZ=()=>({_tag:IE}),VZ="effect/FiberScope",vy=Symbol.for(VZ);var tD;tD=vy;class KZ{constructor(){g(this,tD,vy);g(this,"fiberId",Er);g(this,"roots",new Set)}add(t,n){this.roots.add(n),n.addObserver(()=>{this.roots.delete(n)})}}var nD;nD=vy;class GZ{constructor(t,n){g(this,"fiberId");g(this,"parent");g(this,nD,vy);this.fiberId=t,this.parent=n}add(t,n){this.parent.tell(Jp(r=>{r.addChild(n),n.addObserver(()=>{r.removeChild(n)})}))}}const YZ=e=>new GZ(e.id(),e),bv=pe(Symbol.for("effect/FiberScope/Global"),()=>new KZ),JZ="effect/Fiber",QZ=Symbol.for(JZ),XZ={_E:e=>e,_A:e=>e},WZ="effect/Fiber",ZZ=Symbol.for(WZ),eee=e=>e.await,tee=e=>e.inheritAll,_h=e=>sv(tv(e.await),e.inheritAll);({...Zh});const ca="effect/FiberCurrent",nee=()=>ef(globalThis[ca]),ree="effect/Logger",iee=Symbol.for(ree),see={_Message:e=>e,_Output:e=>e},$E=e=>({[iee]:see,log:e,pipe(){return ie(this,arguments)}}),aee=/^[^\s"=]*$/,oee=(e,t)=>({annotations:n,cause:r,date:i,fiberId:s,logLevel:a,message:o,spans:l})=>{const c=p=>p.match(aee)?p:e(p),f=(p,b)=>`${u3(p)}=${c(b)}`,u=(p,b)=>" "+f(p,b);let d=f("timestamp",i.toISOString());d+=u("level",a.label),d+=u("fiber",Oj(s));const h=dK(o);for(let p=0;p<h.length;p++)d+=u("message",gu(h[p],t));wG(r)||(d+=u("cause",sf(r,{renderErrorCause:!0})));for(const p of l)d+=" "+pZ(i.getTime())(p);for(const[p,b]of n)d+=u(p,gu(b,t));return d},lee=e=>`"${e.replace(/\\([\s\S])|(")/g,"\\$1$2")}"`,cee=$E(oee(lee)),uee=typeof process=="object"&&process!==null&&typeof process.stdout=="object"&&process.stdout!==null;uee&&process.stdout.isTTY;const S3="effect/MetricBoundaries",Fx=Symbol.for(S3);var rD;class fee{constructor(t){g(this,"values");g(this,rD,Fx);g(this,"_hash");this.values=t,this._hash=O(gt(S3),Se(Qu(this.values)))}[(rD=Fx,be)](){return this._hash}[ve](t){return dee(t)&&oe(this.values,t.values)}pipe(){return ie(this,arguments)}}const dee=e=>ue(e,Fx),hee=e=>{const t=O(e,Nk(Kt(Number.POSITIVE_INFINITY)),OK);return new fee(t)},mee=e=>O(fK(e.count-1,t=>e.start*Math.pow(e.factor,t)),Ln,hee),pee="effect/MetricKeyType",w3=Symbol.for(pee),x3="effect/MetricKeyType/Counter",Px=Symbol.for(x3),gee="effect/MetricKeyType/Frequency",yee=Symbol.for(gee),bee="effect/MetricKeyType/Gauge",vee=Symbol.for(bee),_3="effect/MetricKeyType/Histogram",Ux=Symbol.for(_3),See="effect/MetricKeyType/Summary",wee=Symbol.for(See),k3={_In:e=>e,_Out:e=>e};var iD,sD;class xee{constructor(t,n){g(this,"incremental");g(this,"bigint");g(this,sD,k3);g(this,iD,Px);g(this,"_hash");this.incremental=t,this.bigint=n,this._hash=gt(x3)}[(sD=w3,iD=Px,be)](){return this._hash}[ve](t){return E3(t)}pipe(){return ie(this,arguments)}}var aD,oD;class _ee{constructor(t){g(this,"boundaries");g(this,oD,k3);g(this,aD,Ux);g(this,"_hash");this.boundaries=t,this._hash=O(gt(_3),Se(re(this.boundaries)))}[(oD=w3,aD=Ux,be)](){return this._hash}[ve](t){return C3(t)&&oe(this.boundaries,t.boundaries)}pipe(){return ie(this,arguments)}}const kee=e=>new xee((e==null?void 0:e.incremental)??!1,(e==null?void 0:e.bigint)??!1),Eee=e=>new _ee(e),E3=e=>ue(e,Px),Cee=e=>ue(e,yee),Tee=e=>ue(e,vee),C3=e=>ue(e,Ux),Aee=e=>ue(e,wee),Oee="effect/MetricKey",T3=Symbol.for(Oee),Ree={_Type:e=>e},Mee=$b(oe);var lD;class LE{constructor(t,n,r,i=[]){g(this,"name");g(this,"keyType");g(this,"description");g(this,"tags");g(this,lD,Ree);g(this,"_hash");this.name=t,this.keyType=n,this.description=r,this.tags=i,this._hash=O(gt(this.name+this.description),Se(re(this.keyType)),Se(Qu(this.tags)))}[(lD=T3,be)](){return this._hash}[ve](t){return Nee(t)&&this.name===t.name&&oe(this.keyType,t.keyType)&&oe(this.description,t.description)&&Mee(this.tags,t.tags)}pipe(){return ie(this,arguments)}}const Nee=e=>ue(e,T3),Dee=(e,t)=>new LE(e,kee(t),ef(t==null?void 0:t.description)),zee=(e,t,n)=>new LE(e,Eee(t),ef(n)),Iee=E(2,(e,t)=>t.length===0?e:new LE(e.name,e.keyType,e.description,qp(e.tags,t))),oR=Symbol.for("effect/MutableHashMap"),$ee={[oR]:oR,[Symbol.iterator](){return new jE(this)},toString(){return it(this.toJSON())},toJSON(){return{_id:"MutableHashMap",values:Array.from(this).map(wt)}},[Pe](){return this.toJSON()},pipe(){return ie(this,arguments)}};class jE{constructor(t){g(this,"self");g(this,"referentialIterator");g(this,"bucketIterator");this.self=t,this.referentialIterator=t.referential[Symbol.iterator]()}next(){if(this.bucketIterator!==void 0)return this.bucketIterator.next();const t=this.referentialIterator.next();return t.done?(this.bucketIterator=new Lee(this.self.buckets.values()),this.next()):t}[Symbol.iterator](){return new jE(this.self)}}class Lee{constructor(t){g(this,"backing");g(this,"currentBucket");this.backing=t}next(){if(this.currentBucket===void 0){const n=this.backing.next();if(n.done)return n;this.currentBucket=n.value[Symbol.iterator]()}const t=this.currentBucket.next();return t.done?(this.currentBucket=void 0,this.next()):t}}const Bx=()=>{const e=Object.create($ee);return e.referential=new Map,e.buckets=new Map,e.bucketsSize=0,e},xs=E(2,(e,t)=>{if(lh(t)===!1)return e.referential.has(t)?X(e.referential.get(t)):V();const n=t[be](),r=e.buckets.get(n);return r===void 0?V():jee(e,r,t)}),jee=(e,t,n,r=!1)=>{for(let i=0,s=t.length;i<s;i++)if(n[ve](t[i][0])){const a=t[i][1];return r&&(t.splice(i,1),e.bucketsSize--),X(a)}return V()},Ff=E(2,(e,t)=>dt(xs(e,t))),Fo=E(3,(e,t,n)=>{if(lh(t)===!1)return e.referential.set(t,n),e;const r=t[be](),i=e.buckets.get(r);return i===void 0?(e.buckets.set(r,[[t,n]]),e.bucketsSize++,e):(A3(e,i,t),i.push([t,n]),e.bucketsSize++,e)}),A3=(e,t,n)=>{for(let r=0,i=t.length;r<i;r++)if(n[ve](t[r][0])){t.splice(r,1),e.bucketsSize--;return}},Fee=E(2,(e,t)=>{if(lh(t)===!1)return e.referential.delete(t),e;const n=t[be](),r=e.buckets.get(n);return r===void 0||(A3(e,r,t),r.length===0&&e.buckets.delete(n)),e}),Pee="effect/MetricState",fm=Symbol.for(Pee),O3="effect/MetricState/Counter",Hx=Symbol.for(O3),R3="effect/MetricState/Frequency",qx=Symbol.for(R3),M3="effect/MetricState/Gauge",Vx=Symbol.for(M3),N3="effect/MetricState/Histogram",Kx=Symbol.for(N3),D3="effect/MetricState/Summary",Gx=Symbol.for(D3),dm={_A:e=>e};var cD,uD;class Uee{constructor(t){g(this,"count");g(this,uD,dm);g(this,cD,Hx);this.count=t}[(uD=fm,cD=Hx,be)](){return O(re(O3),Se(re(this.count)),tt(this))}[ve](t){return Wee(t)&&this.count===t.count}pipe(){return ie(this,arguments)}}const Bee=$b(oe);var fD,dD;class Hee{constructor(t){g(this,"occurrences");g(this,dD,dm);g(this,fD,qx);g(this,"_hash");this.occurrences=t}[(dD=fm,fD=qx,be)](){return O(gt(R3),Se(Qu(Ye(this.occurrences.entries()))),tt(this))}[ve](t){return Zee(t)&&Bee(Ye(this.occurrences.entries()),Ye(t.occurrences.entries()))}pipe(){return ie(this,arguments)}}var hD,mD;class qee{constructor(t){g(this,"value");g(this,mD,dm);g(this,hD,Vx);this.value=t}[(mD=fm,hD=Vx,be)](){return O(re(M3),Se(re(this.value)),tt(this))}[ve](t){return ete(t)&&this.value===t.value}pipe(){return ie(this,arguments)}}var pD,gD;class Vee{constructor(t,n,r,i,s){g(this,"buckets");g(this,"count");g(this,"min");g(this,"max");g(this,"sum");g(this,gD,dm);g(this,pD,Kx);this.buckets=t,this.count=n,this.min=r,this.max=i,this.sum=s}[(gD=fm,pD=Kx,be)](){return O(re(N3),Se(re(this.buckets)),Se(re(this.count)),Se(re(this.min)),Se(re(this.max)),Se(re(this.sum)),tt(this))}[ve](t){return tte(t)&&oe(this.buckets,t.buckets)&&this.count===t.count&&this.min===t.min&&this.max===t.max&&this.sum===t.sum}pipe(){return ie(this,arguments)}}var yD,bD;class Kee{constructor(t,n,r,i,s,a){g(this,"error");g(this,"quantiles");g(this,"count");g(this,"min");g(this,"max");g(this,"sum");g(this,bD,dm);g(this,yD,Gx);this.error=t,this.quantiles=n,this.count=r,this.min=i,this.max=s,this.sum=a}[(bD=fm,yD=Gx,be)](){return O(re(D3),Se(re(this.error)),Se(re(this.quantiles)),Se(re(this.count)),Se(re(this.min)),Se(re(this.max)),Se(re(this.sum)),tt(this))}[ve](t){return nte(t)&&this.error===t.error&&oe(this.quantiles,t.quantiles)&&this.count===t.count&&this.min===t.min&&this.max===t.max&&this.sum===t.sum}pipe(){return ie(this,arguments)}}const Gee=e=>new Uee(e),Yee=e=>new Hee(e),Jee=e=>new qee(e),Qee=e=>new Vee(e.buckets,e.count,e.min,e.max,e.sum),Xee=e=>new Kee(e.error,e.quantiles,e.count,e.min,e.max,e.sum),Wee=e=>ue(e,Hx),Zee=e=>ue(e,qx),ete=e=>ue(e,Vx),tte=e=>ue(e,Kx),nte=e=>ue(e,Gx),rte="effect/MetricHook",ite=Symbol.for(rte),ste={_In:e=>e,_Out:e=>e},hm=e=>({[ite]:ste,pipe(){return ie(this,arguments)},...e}),lR=BigInt(0),ate=e=>{let t=e.keyType.bigint?lR:0;const n=e.keyType.incremental?e.keyType.bigint?i=>i>=lR:i=>i>=0:i=>!0,r=i=>{n(i)&&(t=t+i)};return hm({get:()=>Gee(t),update:r,modify:r})},ote=e=>{const t=new Map;for(const r of e.keyType.preregisteredWords)t.set(r,0);const n=r=>{const i=t.get(r)??0;t.set(r,i+1)};return hm({get:()=>Yee(t),update:n,modify:n})},lte=(e,t)=>{let n=t;return hm({get:()=>Jee(n),update:r=>{n=r},modify:r=>{n=n+r}})},cte=e=>{const t=e.keyType.boundaries.values,n=t.length,r=new Uint32Array(n+1),i=new Float64Array(n);let s=0,a=0,o=Number.MAX_VALUE,l=Number.MIN_VALUE;O(t,ch(Ou),tl((u,d)=>{i[d]=u}));const c=u=>{let d=0,h=n;for(;d!==h;){const p=Math.floor(d+(h-d)/2),b=i[p];u<=b?h=p:d=p,h===d+1&&(u<=i[d]?h=d:d=h)}r[d]=r[d]+1,s=s+1,a=a+u,u<o&&(o=u),u>l&&(l=u)},f=()=>{const u=Ib(n);let d=0;for(let h=0;h<n;h++){const p=i[h],b=r[h];d=d+b,u[h]=[p,d]}return u};return hm({get:()=>Qee({buckets:f(),count:s,min:o,max:l,sum:a}),update:c,modify:c})},ute=e=>{const{error:t,maxAge:n,maxSize:r,quantiles:i}=e.keyType,s=O(i,ch(Ou)),a=Ib(r);let o=0,l=0,c=0,f=0,u=0;const d=p=>{const b=[];let S=0;for(;S!==r-1;){const m=a[S];if(m!=null){const[y,v]=m,_=Eu(p-y);WG(_,ku)&&XG(_,n)&&b.push(v)}S=S+1}return fte(t,s,ch(b,Ou))},h=(p,b)=>{if(r>0){o=o+1;const S=o%r;a[S]=[b,p]}f=l===0?p:Math.min(f,p),u=l===0?p:Math.max(u,p),l=l+1,c=c+p};return hm({get:()=>Xee({error:t,quantiles:d(Date.now()),count:l,min:f,max:u,sum:c}),update:([p,b])=>h(p,b),modify:([p,b])=>h(p,b)})},fte=(e,t,n)=>{const r=n.length;if(!en(t))return Za();const i=t[0],s=t.slice(1),a=cR(e,r,V(),0,i,n),o=ui(a);return s.forEach(l=>{o.push(cR(e,r,a.value,a.consumed,l,a.rest))}),tl(o,l=>[l.quantile,l.value])},cR=(e,t,n,r,i,s)=>{let a=e,o=t,l=n,c=r,f=i,u=s,d=e,h=t,p=n,b=r,S=i,m=s;for(;;){if(!en(u))return{quantile:f,value:V(),consumed:c,rest:[]};if(f===1)return{quantile:f,value:X(KL(u)),consumed:c+u.length,rest:[]};const y=Hn(u),v=xK(u,N=>N===y),_=f*o,C=a/2*_,k=c+v[0].length,A=Math.abs(k-_);if(k<_-C){d=a,h=o,p=Od(u),b=k,S=f,m=v[1],a=d,o=h,l=p,c=b,f=S,u=m;continue}if(k>_+C){const N=Vt(l)?X(y):l;return{quantile:f,value:N,consumed:c,rest:u}}switch(l._tag){case"None":{d=a,h=o,p=Od(u),b=k,S=f,m=v[1],a=d,o=h,l=p,c=b,f=S,u=m;continue}case"Some":{const N=Math.abs(_-l.value);if(A<N){d=a,h=o,p=Od(u),b=k,S=f,m=v[1],a=d,o=h,l=p,c=b,f=S,u=m;continue}return{quantile:f,value:X(l.value),consumed:c,rest:u}}}}throw new Error("BUG: MetricHook.resolveQuantiles - please report an issue at https://github.com/Effect-TS/effect/issues")},dte="effect/MetricPair",hte=Symbol.for(dte),mte={_Type:e=>e},pte=(e,t)=>({[hte]:mte,metricKey:e,metricState:t,pipe(){return ie(this,arguments)}}),gte="effect/MetricRegistry",uR=Symbol.for(gte);var vD;vD=uR;class yte{constructor(){g(this,vD,uR);g(this,"map",Bx())}snapshot(){const t=[];for(const[n,r]of this.map)t.push(pte(n,r.get()));return t}get(t){const n=O(this.map,xs(t),Ur);if(n==null){if(E3(t.keyType))return this.getCounter(t);if(Tee(t.keyType))return this.getGauge(t);if(Cee(t.keyType))return this.getFrequency(t);if(C3(t.keyType))return this.getHistogram(t);if(Aee(t.keyType))return this.getSummary(t);throw new Error("BUG: MetricRegistry.get - unknown MetricKeyType - please report an issue at https://github.com/Effect-TS/effect/issues")}else return n}getCounter(t){let n=O(this.map,xs(t),Ur);if(n==null){const r=ate(t);O(this.map,Ff(t))||O(this.map,Fo(t,r)),n=r}return n}getFrequency(t){let n=O(this.map,xs(t),Ur);if(n==null){const r=ote(t);O(this.map,Ff(t))||O(this.map,Fo(t,r)),n=r}return n}getGauge(t){let n=O(this.map,xs(t),Ur);if(n==null){const r=lte(t,t.keyType.bigint?BigInt(0):0);O(this.map,Ff(t))||O(this.map,Fo(t,r)),n=r}return n}getHistogram(t){let n=O(this.map,xs(t),Ur);if(n==null){const r=cte(t);O(this.map,Ff(t))||O(this.map,Fo(t,r)),n=r}return n}getSummary(t){let n=O(this.map,xs(t),Ur);if(n==null){const r=ute(t);O(this.map,Ff(t))||O(this.map,Fo(t,r)),n=r}return n}}const bte=()=>new yte,vte="effect/Metric",Ste=Symbol.for(vte),wte={_Type:e=>e,_In:e=>e,_Out:e=>e},fR=pe(Symbol.for("effect/Metric/globalMetricRegistry"),()=>bte()),z3=function(e,t,n,r){const i=Object.assign(s=>rE(s,a=>Ete(i,a)),{[Ste]:wte,keyType:e,unsafeUpdate:t,unsafeValue:n,unsafeModify:r,register(){return this.unsafeValue([]),this},pipe(){return ie(this,arguments)}});return i},vv=(e,t)=>I3(Dee(e,t)),I3=e=>{let t;const n=new WeakMap,r=i=>{if(i.length===0)return t!==void 0||(t=fR.get(e)),t;let s=n.get(i);return s!==void 0||(s=fR.get(Iee(e,i)),n.set(i,s)),s};return z3(e.keyType,(i,s)=>r(s).update(i),i=>r(i).get(),(i,s)=>r(s).modify(i))},xte=(e,t,n)=>I3(zee(e,t,n)),_te=E(3,(e,t,n)=>kte(e,[yZ(t,n)])),kte=E(2,(e,t)=>z3(e.keyType,(n,r)=>e.unsafeUpdate(n,qp(t,r)),n=>e.unsafeValue(qp(t,n)),(n,r)=>e.unsafeModify(n,qp(t,r)))),Ete=E(2,(e,t)=>av(Ex,n=>K(()=>e.unsafeUpdate(t,n))));({...zb});const Cte=E(2,(e,t)=>av(c3,n=>K(()=>{if(n.has(e)){const r=n.get(e);r.state.completed||(r.state.completed=!0,hv(r.result,t))}}))),Tte="effect/Supervisor",Sv=Symbol.for(Tte),FE={_T:e=>e};var SD;SD=Sv;const NT=class NT{constructor(t,n){g(this,"underlying");g(this,"value0");g(this,SD,FE);this.underlying=t,this.value0=n}get value(){return this.value0}onStart(t,n,r,i){this.underlying.onStart(t,n,r,i)}onEnd(t,n){this.underlying.onEnd(t,n)}onEffect(t,n){this.underlying.onEffect(t,n)}onSuspend(t){this.underlying.onSuspend(t)}onResume(t){this.underlying.onResume(t)}map(t){return new NT(this,O(this.value,Ae(t)))}zip(t){return new wy(this,t)}};let Sy=NT;var wD;wD=Sv;const DT=class DT{constructor(t,n){g(this,"left");g(this,"right");g(this,"_tag","Zip");g(this,wD,FE);this.left=t,this.right=n}get value(){return iv(this.left.value,this.right.value)}onStart(t,n,r,i){this.left.onStart(t,n,r,i),this.right.onStart(t,n,r,i)}onEnd(t,n){this.left.onEnd(t,n),this.right.onEnd(t,n)}onEffect(t,n){this.left.onEffect(t,n),this.right.onEffect(t,n)}onSuspend(t){this.left.onSuspend(t),this.right.onSuspend(t)}onResume(t){this.left.onResume(t),this.right.onResume(t)}map(t){return new Sy(this,O(this.value,Ae(t)))}zip(t){return new DT(this,t)}};let wy=DT;const $3=e=>ue(e,Sv)&&aL(e,"Zip");var xD;xD=Sv;class Ate{constructor(t){g(this,"effect");g(this,xD,FE);this.effect=t}get value(){return this.effect}onStart(t,n,r,i){}onEnd(t,n){}onEffect(t,n){}onSuspend(t){}onResume(t){}map(t){return new Sy(this,O(this.value,Ae(t)))}zip(t){return new wy(this,t)}onRun(t,n){return t()}}const Ote=e=>new Ate(e),wv=pe("effect/Supervisor/none",()=>Ote(et)),Rte=af,L3="Empty",j3="AddSupervisor",F3="RemoveSupervisor",P3="AndThen",Nd={_tag:L3},Qp=(e,t)=>({_tag:P3,first:e,second:t}),Mte=(e,t)=>Nte(t,Kt(e)),Nte=(e,t)=>{let n=e,r=t;for(;Ks(r);){const i=Pi(r);switch(i._tag){case L3:{r=Os(r);break}case j3:{n=n.zip(i.supervisor),r=Os(r);break}case F3:{n=Yx(n,i.supervisor),r=Os(r);break}case P3:{r=Mn(i.first)(Mn(i.second)(Os(r)));break}}}return n},Yx=(e,t)=>oe(e,t)?wv:$3(e)?Yx(e.left,t).zip(Yx(e.right,t)):e,xy=e=>oe(e,wv)?hl():$3(e)?O(xy(e.left),dh(xy(e.right))):Vk(e),Dte=(e,t)=>{if(oe(e,t))return Nd;const n=xy(e),r=xy(t),i=O(r,yO(n),hh(Nd,(a,o)=>Qp(a,{_tag:j3,supervisor:o}))),s=O(n,yO(r),hh(Nd,(a,o)=>Qp(a,{_tag:F3,supervisor:o})));return Qp(i,s)},zte=Rte({empty:Nd,patch:Mte,combine:Qp,diff:Dte}),Ite=vv("effect_fiber_started",{incremental:!0}),dR=vv("effect_fiber_active"),$te=vv("effect_fiber_successes",{incremental:!0}),Lte=vv("effect_fiber_failures",{incremental:!0}),jte=_te(xte("effect_fiber_lifetimes",mee({start:.5,factor:2,count:35})),"time_unit","milliseconds"),Pf="Continue",Fte="Done",hR="Yield",Pte={_E:e=>e,_A:e=>e},ap=e=>{throw new Error(`BUG: FiberRuntime - ${gu(e)} - please report an issue at https://github.com/Effect-TS/effect/issues`)},ms=Symbol.for("effect/internal/fiberRuntime/YieldedOp"),ps=pe("effect/internal/fiberRuntime/yieldedOpChannel",()=>({currentOp:null})),Uf={[Kg]:(e,t,n)=>gn(()=>t.effect_instruction_i1(n)),OnStep:(e,t,n)=>Ze(Ze(n)),[Gg]:(e,t,n)=>gn(()=>t.effect_instruction_i2(n)),[xk]:(e,t,n)=>(e.patchRuntimeFlags(e.currentRuntimeFlags,t.patch),ma(e.currentRuntimeFlags)&&e.isInterrupted()?Xe(e.getInterruptedCause()):Ze(n)),[Yg]:(e,t,n)=>(gn(()=>t.effect_instruction_i2(n)),gn(()=>t.effect_instruction_i0())?(e.pushStack(t),gn(()=>t.effect_instruction_i1())):et),[Ad]:(e,t,n)=>{for(;;){const r=gn(()=>t.effect_instruction_i0.next(n));if(r.done)return Ze(r.value);const i=KV(r.value);if(lv(i)){if(i._tag==="Failure")return i}else return e.pushStack(t),i;n=i.value}}},Ute={[NE]:(e,t,n,r)=>(e.processNewInterruptSignal(r.cause),ma(t)?Xe(r.cause):n),[zE]:(e,t,n,r)=>{throw new Error("It is illegal to have multiple concurrent run loops in a single fiber")},[DE]:(e,t,n,r)=>(r.onFiber(e,QF(t)),n),[IE]:(e,t,n,r)=>B(aE(),()=>n)},Bte=e=>nv(IJ(e),t=>Yi(JJ(t),([n,r])=>{const i=new Map,s=[];for(const o of r){s.push(qn(o));for(const l of o)i.set(l.request,l)}const a=s.flat();return of(fne(n.runAll(s),a,()=>a.forEach(o=>{o.listeners.interrupted=!0})),c3,i)},!1,!1)),Hte=_k();var _D,kD;class U3 extends df{constructor(n,r,i){super();g(this,kD,XZ);g(this,_D,Pte);g(this,"_fiberRefs");g(this,"_fiberId");g(this,"_queue",new Array);g(this,"_children",null);g(this,"_observers",new Array);g(this,"_running",!1);g(this,"_stack",[]);g(this,"_asyncInterruptor",null);g(this,"_asyncBlockingOn",null);g(this,"_exitValue",null);g(this,"_steps",[]);g(this,"_isYielding",!1);g(this,"currentRuntimeFlags");g(this,"currentOpCount",0);g(this,"currentSupervisor");g(this,"currentScheduler");g(this,"currentTracer");g(this,"currentSpan");g(this,"currentContext");g(this,"currentDefaultServices");g(this,"run",()=>{this.drainQueueOnCurrentThread()});if(this.currentRuntimeFlags=i,this._fiberId=n,this._fiberRefs=r,OO(i)){const s=this.getFiberRef(Ex);Ite.unsafeUpdate(1,s),dR.unsafeUpdate(1,s)}this.refreshRefCache()}commit(){return _h(this)}id(){return this._fiberId}resume(n){this.tell(Zl(n))}get status(){return this.ask((n,r)=>r)}get runtimeFlags(){return this.ask((n,r)=>vW(r)?n.currentRuntimeFlags:r.runtimeFlags)}scope(){return YZ(this)}get children(){return this.ask(n=>Array.from(n.getChildren()))}getChildren(){return this._children===null&&(this._children=new Set),this._children}getInterruptedCause(){return this.getFiberRef(ip)}fiberRefs(){return this.ask(n=>n.getFiberRefs())}ask(n){return Te(()=>{const r=uv(this._fiberId);return this.tell(Jp((i,s)=>{hv(r,K(()=>n(i,s)))})),io(r)})}tell(n){this._queue.push(n),this._running||(this._running=!0,this.drainQueueLaterOnExecutor())}get await(){return xi(n=>{const r=i=>n(ee(i));return this.tell(Jp((i,s)=>{i._exitValue!==null?r(this._exitValue):i.addObserver(r)})),K(()=>this.tell(Jp((i,s)=>{i.removeObserver(r)})))},this.id())}get inheritAll(){return Be((n,r)=>{const i=n.id(),s=n.getFiberRefs(),a=r.runtimeFlags,o=this.getFiberRefs(),l=rW(s,i,o);n.setFiberRefs(l);const c=n.getFiberRef(yR),f=O(Fa(a,c),MO(Fl),MO(_x));return cF(f)})}get poll(){return K(()=>ef(this._exitValue))}unsafePoll(){return this._exitValue}interruptAsFork(n){return K(()=>this.tell(i0(hi(n))))}unsafeInterruptAsFork(n){this.tell(i0(hi(n)))}addObserver(n){this._exitValue!==null?n(this._exitValue):this._observers.push(n)}removeObserver(n){this._observers=this._observers.filter(r=>r!==n)}getFiberRefs(){return this.setFiberRef(yR,this.currentRuntimeFlags),this._fiberRefs}unsafeDeleteFiberRef(n){this._fiberRefs=UF(this._fiberRefs,n)}getFiberRef(n){return this._fiberRefs.locals.has(n)?this._fiberRefs.locals.get(n)[0][1]:n.initial}setFiberRef(n,r){this._fiberRefs=zx(this._fiberRefs,{fiberId:this._fiberId,fiberRef:n,value:r}),this.refreshRefCache()}refreshRefCache(){this.currentDefaultServices=this.getFiberRef(Ru),this.currentTracer=this.currentDefaultServices.unsafeMap.get(yE.key),this.currentSupervisor=this.getFiberRef(lne),this.currentScheduler=this.getFiberRef(OE),this.currentContext=this.getFiberRef(is),this.currentSpan=this.currentContext.unsafeMap.get(pv.key)}setFiberRefs(n){this._fiberRefs=n,this.refreshRefCache()}addChild(n){this.getChildren().add(n)}removeChild(n){this.getChildren().delete(n)}transferChildren(n){const r=this._children;if(this._children=null,r!==null&&r.size>0)for(const i of r)i._exitValue===null&&n.add(this.currentRuntimeFlags,i)}drainQueueOnCurrentThread(){let n=!0;for(;n;){let r=Pf;const i=globalThis[ca];globalThis[ca]=this;try{for(;r===Pf;)r=this._queue.length===0?Fte:this.evaluateMessageWhileSuspended(this._queue.splice(0,1)[0])}finally{this._running=!1,globalThis[ca]=i}this._queue.length>0&&!this._running?(this._running=!0,r===hR?(this.drainQueueLaterOnExecutor(),n=!1):n=!0):n=!1}}drainQueueLaterOnExecutor(){this.currentScheduler.scheduleTask(this.run,this.getFiberRef(cf))}drainQueueWhileRunning(n,r){let i=r;for(;this._queue.length>0;){const s=this._queue.splice(0,1)[0];i=Ute[s._tag](this,n,i,s)}return i}isInterrupted(){return!_G(this.getFiberRef(ip))}addInterruptedCause(n){const r=this.getFiberRef(ip);this.setFiberRef(ip,Tn(r,n))}processNewInterruptSignal(n){this.addInterruptedCause(n),this.sendInterruptSignalToAllChildren()}sendInterruptSignalToAllChildren(){if(this._children===null||this._children.size===0)return!1;let n=!1;for(const r of this._children)r.tell(i0(hi(this.id()))),n=!0;return n}interruptAllChildren(){if(this.sendInterruptSignalToAllChildren()){const n=this._children.values();this._children=null;let r=!1;return sE({while:()=>!r,body:()=>{const s=n.next();return s.done?K(()=>{r=!0}):ii(s.value.await)},step:()=>{}})}return null}reportExitValue(n){if(OO(this.currentRuntimeFlags)){const r=this.getFiberRef(Ex),i=this.id().startTimeMillis,s=Date.now();switch(jte.unsafeUpdate(s-i,r),dR.unsafeUpdate(-1,r),n._tag){case fn:{$te.unsafeUpdate(1,r);break}case un:{Lte.unsafeUpdate(1,r);break}}}if(n._tag==="Failure"){const r=this.getFiberRef(AQ);!Vb(n.cause)&&r._tag==="Some"&&this.log("Fiber terminated with an unhandled error",n.cause,r)}}setExitValue(n){this._exitValue=n,this.reportExitValue(n);for(let r=this._observers.length-1;r>=0;r--)this._observers[r](n);this._observers=[]}getLoggers(){return this.getFiberRef(Yte)}log(n,r,i){const s=dt(i)?i.value:this.getFiberRef(_Q),a=this.getFiberRef(qte);if(OW(a,s))return;const o=this.getFiberRef(kQ),l=this.getFiberRef(xQ),c=this.getLoggers(),f=this.getFiberRefs();if(Kk(c)>0){const u=$s(this.getFiberRef(Ru),uf),d=new Date(u.unsafeCurrentTimeMillis());ZV(f,()=>{for(const h of c)h.log({fiberId:this.id(),logLevel:s,message:n,cause:r,context:f,spans:o,annotations:l,date:d})})}}evaluateMessageWhileSuspended(n){switch(n._tag){case IE:return hR;case NE:return this.processNewInterruptSignal(n.cause),this._asyncInterruptor!==null&&(this._asyncInterruptor(Xe(n.cause)),this._asyncInterruptor=null),Pf;case zE:return this._asyncInterruptor=null,this._asyncBlockingOn=null,this.evaluateEffect(n.effect),Pf;case DE:return n.onFiber(this,this._exitValue!==null?yW:bW(this.currentRuntimeFlags,this._asyncBlockingOn)),Pf;default:return ap(n)}}evaluateEffect(n){this.currentSupervisor.onResume(this);try{let r=ma(this.currentRuntimeFlags)&&this.isInterrupted()?Xe(this.getInterruptedCause()):n;for(;r!==null;){const i=r,s=this.runLoop(i);if(s===ms){const a=ps.currentOp;ps.currentOp=null,a._op===Hp?OJ(this.currentRuntimeFlags)?(this.tell(qZ()),this.tell(Zl(An)),r=null):r=An:a._op===Td&&(r=null)}else{this.currentRuntimeFlags=O(this.currentRuntimeFlags,MJ(_x));const a=this.interruptAllChildren();a!==null?r=B(a,()=>s):(this._queue.length===0?this.setExitValue(s):this.tell(Zl(s)),r=null)}}}finally{this.currentSupervisor.onSuspend(this)}}start(n){if(this._running)this.tell(Zl(n));else{this._running=!0;const r=globalThis[ca];globalThis[ca]=this;try{this.evaluateEffect(n)}finally{this._running=!1,globalThis[ca]=r,this._queue.length>0&&this.drainQueueLaterOnExecutor()}}}startFork(n){this.tell(Zl(n))}patchRuntimeFlags(n,r){const i=Kc(n,r);return globalThis[ca]=this,this.currentRuntimeFlags=i,i}initiateAsync(n,r){let i=!1;const s=a=>{i||(i=!0,this.tell(Zl(a)))};ma(n)&&(this._asyncInterruptor=s);try{r(s)}catch(a){s(nn(Xr(a)))}}pushStack(n){this._stack.push(n),n._op==="OnStep"&&this._steps.push({refs:this.getFiberRefs(),flags:this.currentRuntimeFlags})}popStack(){const n=this._stack.pop();if(n)return n._op==="OnStep"&&this._steps.pop(),n}getNextSuccessCont(){let n=this.popStack();for(;n;){if(n._op!==Bp)return n;n=this.popStack()}}getNextFailCont(){let n=this.popStack();for(;n;){if(n._op!==Kg&&n._op!==Yg&&n._op!==Ad)return n;n=this.popStack()}}[(kD=QZ,_D=ZZ,e7)](n){return K(()=>OL(this.currentContext,n))}Left(n){return Ot(n.left)}None(n){return Ot(new ov)}Right(n){return Ze(n.right)}Some(n){return Ze(n.value)}Micro(n){return ay(r=>{let i=r;const s=iZ(XW(n,this.currentContext));return s.addObserver(a=>{if(a._tag==="Success")return i(Ze(a.value));switch(a.cause._tag){case"Interrupt":return i(Xe(hi(Er)));case"Fail":return i(Ot(a.cause.error));case"Die":return i(Ca(a.cause.defect))}}),ay(a=>{i=o=>{a(et)},s.unsafeInterrupt()})})}[gL](n){const r=gn(()=>n.effect_instruction_i0()),i=this.getNextSuccessCont();return i!==void 0?(i._op in Uf||ap(i),Uf[i._op](this,i,r)):(ps.currentOp=Ze(r),ms)}[fn](n){const r=n,i=this.getNextSuccessCont();return i!==void 0?(i._op in Uf||ap(i),Uf[i._op](this,i,r.effect_instruction_i0)):(ps.currentOp=r,ms)}[un](n){const r=n.effect_instruction_i0,i=this.getNextFailCont();if(i!==void 0)switch(i._op){case Bp:case Gg:return ma(this.currentRuntimeFlags)&&this.isInterrupted()?Xe(bO(r)):gn(()=>i.effect_instruction_i1(r));case"OnStep":return ma(this.currentRuntimeFlags)&&this.isInterrupted()?Xe(bO(r)):Ze(Xe(r));case xk:return this.patchRuntimeFlags(this.currentRuntimeFlags,i.patch),ma(this.currentRuntimeFlags)&&this.isInterrupted()?Xe(Tn(r,this.getInterruptedCause())):Xe(r);default:ap(i)}else return ps.currentOp=Xe(r),ms}[yL](n){return gn(()=>n.effect_instruction_i0(this,QF(this.currentRuntimeFlags)))}Blocked(n){const r=this.getFiberRefs(),i=this.currentRuntimeFlags;if(this._steps.length>0){const s=[],a=this._steps[this._steps.length-1];let o=this.popStack();for(;o&&o._op!=="OnStep";)s.push(o),o=this.popStack();this.setFiberRefs(a.refs),this.currentRuntimeFlags=a.flags;const l=Sh(a.refs,r),c=Fa(a.flags,i);return Ze(Wj(n.effect_instruction_i0,Be(f=>{for(;s.length>0;)f.pushStack(s.pop());return f.setFiberRefs(wh(f.id(),f.getFiberRefs())(l)),f.currentRuntimeFlags=Kc(c)(f.currentRuntimeFlags),n.effect_instruction_i1})))}return _i(s=>B(PE(eQ(n.effect_instruction_i0)),()=>s(n.effect_instruction_i1)))}RunBlocked(n){return Bte(n.effect_instruction_i0)}[Xu](n){const r=n.effect_instruction_i0,i=this.currentRuntimeFlags,s=Kc(i,r);if(ma(s)&&this.isInterrupted())return Xe(this.getInterruptedCause());if(this.patchRuntimeFlags(this.currentRuntimeFlags,r),n.effect_instruction_i1){const a=Fa(s,i);return this.pushStack(new tQ(a,n)),gn(()=>n.effect_instruction_i1(i))}else return An}[Kg](n){return this.pushStack(n),n.effect_instruction_i0}OnStep(n){return this.pushStack(n),n.effect_instruction_i0}[Bp](n){return this.pushStack(n),n.effect_instruction_i0}[Gg](n){return this.pushStack(n),n.effect_instruction_i0}[Td](n){return this._asyncBlockingOn=n.effect_instruction_i1,this.initiateAsync(this.currentRuntimeFlags,n.effect_instruction_i0),ps.currentOp=n,ms}[Hp](n){return this._isYielding=!1,ps.currentOp=n,ms}[Yg](n){const r=n.effect_instruction_i0,i=n.effect_instruction_i1;return r()?(this.pushStack(n),i()):An}[Ad](n){return Uf[Ad](this,n,void 0)}[Db](n){return gn(()=>n.commit())}runLoop(n){let r=n;for(this.currentOpCount=0;;){if(this.currentRuntimeFlags&AJ&&this.currentSupervisor.onEffect(this,r),this._queue.length>0&&(r=this.drainQueueWhileRunning(this.currentRuntimeFlags,r)),!this._isYielding){this.currentOpCount+=1;const i=this.currentScheduler.shouldYield(this);if(i!==!1){this._isYielding=!0,this.currentOpCount=0;const s=r;r=B(aE({priority:i}),()=>s)}}try{if(r=this.currentTracer.context(()=>{if(Hte!==r[bl]._V){const i=this.getFiberRef(OQ);if(i._tag==="Some"){const s=r[bl]._V;this.log(`Executing an Effect versioned ${s} with a Runtime of version ${_k()}, you may want to dedupe the effect dependencies, you can use the language service plugin to detect this at compile time: https://github.com/Effect-TS/language-service`,to,i)}}return this[r._op](r)},this),r===ms){const i=ps.currentOp;return i._op===Hp||i._op===Td?ms:(ps.currentOp=null,i._op===fn||i._op===un?i:Xe(Xr(i)))}}catch(i){r!==ms&&!ue(r,"_op")||!(r._op in this)?r=iF(`Not a valid effect: ${gu(r)}`):$Q(i)?r=Xe(Tn(Xr(i),hi(Er))):r=Ca(i)}}}}const qte=pe("effect/FiberRef/currentMinimumLogLevel",()=>rn(RW("Info"))),Vte=e=>$E(t=>{const n=HF(t.context,Ru);$s(n,$F).unsafe.log(e.log(t))}),Kte=pe(Symbol.for("effect/Logger/defaultLogger"),()=>Vte(cee)),Gte=pe(Symbol.for("effect/Logger/tracerLogger"),()=>$E(({annotations:e,cause:t,context:n,fiberId:r,logLevel:i,message:s})=>{const a=Wu(vh(n,is),pv);if(a._tag==="None"||a.value._tag==="ExternalSpan")return;const o=OL(vh(n,Ru),uf),l={};for(const[c,f]of e)l[c]=f;l["effect.fiberId"]=dY(r),l["effect.logLevel"]=i.label,t!==null&&t._tag!=="Empty"&&(l["effect.cause"]=sf(t,{renderErrorCause:!0})),a.value.event(gu(Array.isArray(s)&&s.length===1?s[0]:s),o.unsafeCurrentTimeNanos(),l)})),Yte=pe(Symbol.for("effect/FiberRef/currentLoggers"),()=>vQ(Vk(Kte,Gte))),Jte=E(e=>Ws(e[0]),(e,t)=>um(rE(e,n=>Qte(r=>t(n,r))))),Qte=e=>Be(t=>{const n=t.getFiberRefs(),r=RJ(t.currentRuntimeFlags,Fl);return B(G3,i=>oy(i,s=>Be(a=>{const o=a.getFiberRefs(),l=a.currentRuntimeFlags,c=Sh(o,n),f=Fa(l,r),u=Sh(n,o);return a.setFiberRefs(wh(c,a.id(),n)),kh(oQ(e(s),f),K(()=>{a.setFiberRefs(wh(u,a.id(),a.getFiberRefs()))}))})))}),Xte=e=>{if(Array.isArray(e)||lL(e))return[e,V()];const t=Object.keys(e),n=t.length;return[t.map(r=>e[r]),X(r=>{const i={};for(let s=0;s<n;s++)i[t[s]]=r[s];return i})]},Wte=(e,t,n)=>{const r=[];for(const i of e)r.push(Au(i));return B(Nu(r,ge,{concurrency:n==null?void 0:n.concurrency,batching:n==null?void 0:n.batching,concurrentFinalizers:n==null?void 0:n.concurrentFinalizers}),i=>{const s=V(),a=i.length,o=new Array(a),l=new Array(a);let c=!1;for(let f=0;f<a;f++){const u=i[f];u._tag==="Left"?(o[f]=X(u.left),c=!0):(l[f]=u.right,o[f]=s)}return c?t._tag==="Some"?Ot(t.value(o)):Ot(o):n!=null&&n.discard?et:t._tag==="Some"?ee(t.value(l)):ee(l)})},Zte=(e,t,n)=>{const r=[];for(const i of e)r.push(Au(i));return n!=null&&n.discard?Nu(r,ge,{concurrency:n==null?void 0:n.concurrency,batching:n==null?void 0:n.batching,discard:!0,concurrentFinalizers:n==null?void 0:n.concurrentFinalizers}):Ae(Nu(r,ge,{concurrency:n==null?void 0:n.concurrency,batching:n==null?void 0:n.batching,concurrentFinalizers:n==null?void 0:n.concurrentFinalizers}),i=>t._tag==="Some"?t.value(i):i)},B3=(e,t)=>{const[n,r]=Xte(e);return(t==null?void 0:t.mode)==="validate"?Wte(n,r,t):(t==null?void 0:t.mode)==="either"?Zte(n,r,t):(t==null?void 0:t.discard)!==!0&&r._tag==="Some"?Ae(Nu(n,ge,t),r.value):Nu(n,ge,t)},Nu=E(e=>lL(e[0]),(e,t,n)=>Be(r=>{const i=(n==null?void 0:n.batching)===!0||(n==null?void 0:n.batching)==="inherit"&&r.getFiberRef(TQ);return n!=null&&n.discard?rR(n.concurrency,()=>ec(uy,n==null?void 0:n.concurrentFinalizers)(s=>i?Yi(e,(a,o)=>s(t(a,o)),!0,!1,1):nv(e,(a,o)=>s(t(a,o)))),()=>ec(Nx,n==null?void 0:n.concurrentFinalizers)(s=>Yi(e,(a,o)=>s(t(a,o)),i,!1)),s=>ec(Dx(s),n==null?void 0:n.concurrentFinalizers)(a=>Yi(e,(o,l)=>a(t(o,l)),i,!1,s))):rR(n==null?void 0:n.concurrency,()=>ec(uy,n==null?void 0:n.concurrentFinalizers)(s=>i?Jx(e,1,(a,o)=>s(t(a,o)),!0):Rs(e,(a,o)=>s(t(a,o)))),()=>ec(Nx,n==null?void 0:n.concurrentFinalizers)(s=>H3(e,(a,o)=>s(t(a,o)),i)),s=>ec(Dx(s),n==null?void 0:n.concurrentFinalizers)(a=>Jx(e,s,(o,l)=>a(t(o,l)),i)))})),H3=(e,t,n)=>Te(()=>{const r=Ye(e),i=new Array(r.length);return Et(Yi(r,(a,o)=>B(t(a,o),l=>K(()=>i[o]=l)),n,!1),ee(i))}),Yi=(e,t,n,r,i)=>_i(s=>aQ(a=>Be(o=>{let l=Array.from(e).reverse(),c=l.length;if(c===0)return et;let f=0,u=!1;const d=i?Math.min(l.length,i):l.length,h=new Set,p=new Array,b=()=>h.forEach(N=>{N.currentScheduler.scheduleTask(()=>{N.unsafeInterruptAsFork(o.id())},0)}),S=new Array,m=new Array,y=new Array,v=()=>{const N=p.filter(({exit:D})=>D._tag==="Failure").sort((D,M)=>D.index<M.index?-1:D.index===M.index?0:1).map(({exit:D})=>D);return N.length===0&&N.push(An),N},_=(N,D=!1)=>{const M=um(a(N)),$=ene(M,o,o.currentRuntimeFlags,bv);return o.currentScheduler.scheduleTask(()=>{D&&$.unsafeInterruptAsFork(o.id()),$.resume(M)},0),$},C=()=>{r||(c-=l.length,l=[]),u=!0,b()},k=n?nQ:Pa,A=_(xi(N=>{const D=($,L)=>{$._op==="Blocked"?y.push($):(p.push({index:L,exit:$}),$._op==="Failure"&&!u&&C())},M=()=>{if(l.length>0){const $=l.pop();let L=f++;const J=()=>{const j=l.pop();return L=f++,B(aE(),()=>B(k(s(t(j,L))),Y))},Y=j=>l.length>0&&(D(j,L),l.length>0)?J():ee(j),G=B(k(s(t($,L))),Y),z=_(G);S.push(z),h.add(z),u&&z.currentScheduler.scheduleTask(()=>{z.unsafeInterruptAsFork(o.id())},0),z.addObserver(j=>{let I;if(j._op==="Failure"?I=j:I=j.effect_instruction_i0,m.push(z),h.delete(z),D(I,L),p.length===c)N(ee(lt(Gc(v(),{parallel:!0}),()=>An)));else if(y.length+p.length===c){const te=v(),R=y.map(Re=>Re.effect_instruction_i0).reduce(Yj);N(ee(Wj(R,Yi([lt(Gc(te,{parallel:!0}),()=>An),...y.map(Re=>Re.effect_instruction_i1)],Re=>Re,n,!0,i))))}else M()})}};for(let $=0;$<d;$++)M()}));return ii(vl(tv(s(_h(A))),cv({onFailure:N=>{C();const D=y.length+1,M=Math.min(typeof i=="number"?i:y.length,y.length),$=Array.from(y);return xi(L=>{let J=0,Y=0;const G=(j,I)=>te=>{J++,J===D&&L(Ze(Xe(N))),$.length>0&&I&&z()},z=()=>{_($.pop(),!0).addObserver(G(Y,!0)),Y++};A.addObserver(G(Y,!1)),Y++;for(let j=0;j<M;j++)z()})},onSuccess:()=>Rs(m,N=>N.inheritAll)})))}))),Jx=(e,t,n,r)=>Te(()=>{const i=Ye(e),s=new Array(i.length);return Et(Yi(i,(o,l)=>Ae(n(o,l),c=>s[l]=c),r,!1,t),ee(s))}),PE=e=>tne(e,bv),q3=(e,t,n,r=null)=>{const i=_y(e,t,n,r);return i.resume(e),i},ene=(e,t,n,r=null)=>_y(e,t,n,r),_y=(e,t,n,r=null)=>{const i=Mj(),s=t.getFiberRefs(),a=iW(s,i),o=new U3(i,a,n),l=vh(a,is),c=o.currentSupervisor;return c.onStart(l,e,X(t),o),o.addObserver(u=>c.onEnd(u,o)),(r!==null?r:O(t.getFiberRef(Cx),lt(()=>t.scope()))).add(n,o),o},tne=(e,t)=>Be((n,r)=>ee(q3(e,n,r.runtimeFlags,t))),mR=e=>Pl(t=>Dt(Wu(t,go),{onNone:()=>e,onSome:n=>{switch(n.strategy._tag){case"Parallel":return e;case"Sequential":case"ParallelN":return B(ks(n,Nx),r=>pm(e,r))}}})),pR=e=>t=>Pl(n=>Dt(Wu(n,go),{onNone:()=>t,onSome:r=>r.strategy._tag==="ParallelN"&&r.strategy.parallelism===e?t:B(ks(r,Dx(e)),i=>pm(t,i))})),ec=(e,t)=>n=>Pl(r=>Dt(Wu(r,go),{onNone:()=>n(ge),onSome:i=>{if(t===!0){const s=e._tag==="Parallel"?mR:e._tag==="Sequential"?gR:pR(e.parallelism);switch(i.strategy._tag){case"Parallel":return s(n(mR));case"Sequential":return s(n(gR));case"ParallelN":return s(n(pR(i.strategy.parallelism)))}}else return n(ge)}})),V3=e=>B(go,e),K3=e=>B(UE(),t=>vl(e(t),n=>t.close(n))),gR=e=>Pl(t=>Dt(Wu(t,go),{onNone:()=>e,onSome:n=>{switch(n.strategy._tag){case"Sequential":return e;case"Parallel":case"ParallelN":return B(ks(n,uy),r=>pm(e,r))}}})),nne=E(e=>Ws(e[1]),(e,t,n)=>mm(e,t,(r,i)=>[r,i],n)),rne=E(e=>Ws(e[1]),(e,t,n)=>(n==null?void 0:n.concurrent)!==!0&&((n==null?void 0:n.batching)===void 0||n.batching===!1)?sv(e,t):mm(e,t,(r,i)=>r,n)),ine=E(e=>Ws(e[1]),(e,t,n)=>(n==null?void 0:n.concurrent)!==!0&&((n==null?void 0:n.batching)===void 0||n.batching===!1)?Et(e,t):mm(e,t,(r,i)=>i,n)),mm=E(e=>Ws(e[1]),(e,t,n,r)=>Ae(B3([e,t],{concurrency:r!=null&&r.concurrent?2:1,batching:r==null?void 0:r.batching,concurrentFinalizers:r==null?void 0:r.concurrentFinalizers}),([i,s])=>n(i,s))),go=mo("effect/Scope"),G3=go,sne=(e,t)=>{e.state._tag==="Open"&&e.state.finalizers.set({},t)},ane={[zO]:zO,[IO]:IO,pipe(){return ie(this,arguments)},fork(e){return K(()=>{const t=Y3(e);if(this.state._tag==="Closed")return t.state=this.state,t;const n={},r=i=>t.close(i);return this.state.finalizers.set(n,r),sne(t,i=>K(()=>{this.state._tag==="Open"&&this.state.finalizers.delete(n)})),t})},close(e){return Te(()=>{if(this.state._tag==="Closed")return et;const t=Array.from(this.state.finalizers.values()).reverse();return this.state={_tag:"Closed",exit:e},t.length===0?et:WX(this.strategy)?O(Rs(t,n=>Pa(n(e))),B(n=>O(Gc(n),Bn(t0),lt(()=>An)))):ZX(this.strategy)?O(H3(t,n=>Pa(n(e)),!1),B(n=>O(Gc(n,{parallel:!0}),Bn(t0),lt(()=>An)))):O(Jx(t,this.strategy.parallelism,n=>Pa(n(e)),!1),B(n=>O(Gc(n,{parallel:!0}),Bn(t0),lt(()=>An))))})},addFinalizer(e){return Te(()=>this.state._tag==="Closed"?e(this.state.exit):(this.state.finalizers.set({},e),et))}},Y3=(e=rl)=>{const t=Object.create(ane);return t.strategy=e,t.state={_tag:"Open",finalizers:new Map},t},UE=(e=rl)=>K(()=>Y3(e)),pm=E(2,(e,t)=>TF(e,sr(Tk(go,t)))),one=e=>lf(e,{differ:zte,fork:Nd}),yR=wQ(NJ),lne=one(wv),J3=E(3,(e,t,n)=>une(e,t,{onSelfWin:(r,i)=>B(r.await,s=>{switch(s._tag){case fn:return B(r.inheritAll,()=>n.onSelfDone(s,i));case un:return n.onSelfDone(s,i)}}),onOtherWin:(r,i)=>B(r.await,s=>{switch(s._tag){case fn:return B(r.inheritAll,()=>n.onOtherDone(s,i));case un:return n.onOtherDone(s,i)}})})),cne=E(2,(e,t)=>lm(n=>J3(e,t,{onSelfDone:(r,i)=>Ox(r,{onFailure:s=>O(_h(i),iR(a=>no(s,a))),onSuccess:s=>O(i,yh(n),Vn(s))}),onOtherDone:(r,i)=>Ox(r,{onFailure:s=>O(_h(i),iR(a=>no(a,s))),onSuccess:s=>O(i,yh(n),Vn(s))})}))),une=E(3,(e,t,n)=>Be((r,i)=>{const s=i.runtimeFlags,a=em(!0),o=_y(e,r,s,n.selfScope),l=_y(t,r,s,n.otherScope);return xi(c=>{o.addObserver(()=>bR(o,l,n.onSelfWin,a,c)),l.addObserver(()=>bR(l,o,n.onOtherWin,a,c)),o.startFork(e),l.startFork(t)},Md(o.id(),l.id()))})),bR=(e,t,n,r,i)=>{rY(!0,!1)(r)&&i(n(e,t))},kh=E(2,(e,t)=>_i(n=>ri(n(e),{onFailure:r=>ri(t,{onFailure:i=>nn(Tn(r,i)),onSuccess:()=>nn(r)}),onSuccess:r=>Vn(t,r)}))),fne=(e,t,n)=>lm(r=>B(B(PE(tE(e)),i=>xi(s=>{const a=t.map(c=>c.listeners.count),o=()=>{a.every(c=>c===0)&&t.every(c=>c.result.state.current._tag==="Pending"?!0:!!(c.result.state.current._tag==="Done"&&lv(c.result.state.current.effect)&&c.result.state.current.effect._tag==="Failure"&&yj(c.result.state.current.effect.cause)))&&(l.forEach(c=>c()),n==null||n(),s(oE(i)))};i.addObserver(c=>{l.forEach(f=>f()),s(c)});const l=t.map((c,f)=>{const u=d=>{a[f]=d,o()};return c.listeners.addObserver(u),()=>c.listeners.removeObserver(u)});return o(),K(()=>{l.forEach(c=>c())})})),()=>Te(()=>{const i=t.flatMap(s=>s.state.completed?[]:[s]);return nv(i,s=>Cte(s.request,PQ(r)))}))),dne=to,Q3=pl,Qx=Xr,X3=hi,hne=no,mne=xG,pne=gj,ky=yj,gne=Vb,yne=Gk,bne=Yk,vne=vj,Sne=EG,wne=AG,W3=NQ,xne=Gb,hf=ov,_ne=sf,kne="effect/ScheduleInterval",Ey=Symbol.for(kne),Z3={[Ey]:Ey,startMillis:0,endMillis:0},eP=(e,t)=>e>t?Z3:{[Ey]:Ey,startMillis:e,endMillis:t},Ene=E(2,(e,t)=>Cne(e,t)===e),Cne=E(2,(e,t)=>e.endMillis<=t.startMillis?e:t.endMillis<=e.startMillis?t:e.startMillis<t.startMillis?e:t.startMillis<e.startMillis?t:e.endMillis<=t.endMillis?e:t),Tne=e=>e.startMillis>=e.endMillis,Ane=E(2,(e,t)=>{const n=Math.max(e.startMillis,t.startMillis),r=Math.min(e.endMillis,t.endMillis);return eP(n,r)}),One=e=>eP(e,Number.POSITIVE_INFINITY),tP=Z3,Rne=Ene,Mne=Tne,Nne=Ane,Dne=One,zne="effect/ScheduleIntervals",vR=Symbol.for(zne),nP=e=>({[vR]:vR,intervals:e}),Ine=E(2,(e,t)=>$ne(e.intervals,t.intervals,tn())),$ne=(e,t,n)=>{let r=e,i=t,s=n;for(;Ks(r)&&Ks(i);){const a=O(Pi(r),Nne(Pi(i))),o=Mne(a)?s:O(s,Mn(a));O(Pi(r),Rne(Pi(i)))?r=Os(r):i=Os(i),s=o}return nP(Vs(s))},Xx=e=>O(e.intervals,Ik,lt(()=>tP)).startMillis,Lne=e=>O(e.intervals,Ik,lt(()=>tP)).endMillis,jne=E(2,(e,t)=>Xx(e)<Xx(t)),Fne=e=>Ks(e.intervals),Pne=nP,Une=Ine,Bne=Xx,SR=Lne,Hne=jne,qne=Fne,BE="Continue",rP="Done",Vne=e=>({_tag:BE,intervals:e}),Kne=e=>({_tag:BE,intervals:Pne(Kt(e))}),Gne={_tag:rP},Yne=e=>e._tag===BE,Jne=e=>e._tag===rP,Qne=Vne,Xne=Kne,Eh=Gne,wR=Yne,Cy=Jne,Wne=go,Ty=SF,Zne=oy,Ay=Tx,ere=pm,iP=ks,sP=UE;class tre{constructor(t){g(this,"permits");g(this,"waiters",new Set);g(this,"taken",0);g(this,"take",t=>Ea(n=>{if(this.free<t){const r=()=>{this.free<t||(this.waiters.delete(r),this.taken+=t,n(ee(t)))};return this.waiters.add(r),K(()=>{this.waiters.delete(r)})}return this.taken+=t,n(ee(t))}));g(this,"resize",t=>ii(Be(n=>(this.permits=t,this.free<0?et:this.updateTakenUnsafe(n,r=>r)))));g(this,"release",t=>this.updateTaken(n=>n-t));g(this,"releaseAll",this.updateTaken(t=>0));g(this,"withPermits",t=>n=>_i(r=>B(r(this.take(t)),i=>kh(r(n),this.release(i)))));g(this,"withPermitsIfAvailable",t=>n=>_i(r=>Te(()=>this.free<t?AZ:(this.taken+=t,kh(r(vZ(n)),this.release(t))))));this.permits=t}get free(){return this.permits-this.taken}updateTakenUnsafe(t,n){return this.taken=n(this.taken),this.waiters.size>0&&t.getFiberRef(OE).scheduleTask(()=>{const r=this.waiters.values();let i=r.next();for(;i.done===!1&&this.free>0;)i.value(),i=r.next()},t.getFiberRef(cf)),ee(this.free)}updateTaken(t){return Be(n=>this.updateTakenUnsafe(n,t))}}const HE=e=>new tre(e),nre=e=>K(()=>HE(e));class rre extends df{constructor(n){super();g(this,"isOpen");g(this,"waiters",[]);g(this,"scheduled",!1);g(this,"flushWaiters",()=>{this.scheduled=!1;const n=this.waiters;this.waiters=[];for(let r=0;r<n.length;r++)n[r](An)});g(this,"open",Be(n=>this.isOpen?et:(this.isOpen=!0,this.unsafeSchedule(n))));g(this,"release",Be(n=>this.isOpen?et:this.unsafeSchedule(n)));g(this,"await",Ea(n=>this.isOpen?n(et):(this.waiters.push(n),K(()=>{const r=this.waiters.indexOf(n);r!==-1&&this.waiters.splice(r,1)}))));g(this,"close",K(()=>{this.isOpen=!1}));g(this,"whenOpen",n=>Et(this.await,n));this.isOpen=n}commit(){return this.await}unsafeSchedule(n){return this.scheduled||this.waiters.length===0||(this.scheduled=!0,n.currentScheduler.scheduleTask(this.flushWaiters,n.getFiberRef(cf))),et}unsafeOpen(){this.isOpen||(this.isOpen=!0,this.flushWaiters())}unsafeClose(){this.isOpen=!1}}const ire=e=>new rre(e??!1),sre=E(2,(e,t)=>Be((n,r)=>{const i=t,s=q3(e,n,r.runtimeFlags,bv);if(i.state._tag==="Open"){const a=()=>lm(l=>oe(l,s.id())?et:ii(oE(s))),o={};i.state.finalizers.set(o,a),s.addObserver(()=>{i.state._tag!=="Closed"&&i.state.finalizers.delete(o)})}else s.unsafeInterruptAsFork(n.id());return ee(s)})),are="effect/Ref/SynchronizedRef",ore=Symbol.for(are),lre={_A:e=>e};var ED,CD,TD,AD;class cre extends(AD=df,TD=ore,CD=i3,ED=py,AD){constructor(n,r){super();g(this,"ref");g(this,"withLock");g(this,TD,lre);g(this,CD,s3);g(this,ED,py);g(this,"get");this.ref=n,this.withLock=r,this.get=Gi(this.ref)}commit(){return this.get}modify(n){return this.modifyEffect(r=>ee(n(r)))}modifyEffect(n){return this.withLock(O(B(Gi(this.ref),n),B(([r,i])=>Vn(Jc(this.ref,i),r))))}}const ure=e=>K(()=>aP(e)),aP=e=>{const t=CE(e),n=HE(1);return new cre(t,n.withPermits(1))},fre=Symbol.for("effect/ManagedRuntime"),dre="Fresh",hre="FromEffect",mre="Scoped",pre="Suspend",gre="Provide",oP="ProvideMerge",yre="MergeAll",lP=eee,bre=nee,xR=tee,Ua=oE,qE=yh,_R=_h,mf=e=>function(){if(arguments.length===1){const t=arguments[0];return(n,...r)=>e(t,n,...r)}return e.apply(this,arguments)},gm=mf((e,t,n)=>{const r=Mj(),i=[[is,[[r,e.context]]]];n!=null&&n.scheduler&&i.push([OE,[[r,n.scheduler]]]);let s=aW(e.fiberRefs,{entries:i,forkAs:r});n!=null&&n.updateRefs&&(s=n.updateRefs(s,r));const a=new U3(r,s,e.runtimeFlags);let o=t;n!=null&&n.scope&&(o=B(iP(n.scope,rl),c=>Et(SF(c,lm(f=>oe(f,a.id())?et:yh(a,f))),vl(t,f=>Ay(c,f)))));const l=a.currentSupervisor;return l!==wv&&(l.onStart(e.context,o,V(),a),a.addObserver(c=>l.onEnd(c,a))),bv.add(e.runtimeFlags,a),(n==null?void 0:n.immediate)===!1?a.resume(o):a.start(o),a}),cP=mf((e,t,n={})=>{const r=gm(e,t,n);return n.onExit&&r.addObserver(i=>{n.onExit(i)}),(i,s)=>cP(e)(O(r,qE(i??Er)),{...s,onExit:s!=null&&s.onExit?a=>s.onExit(BZ(a)):void 0})}),uP=mf((e,t)=>{const n=xre(e)(t);if(n._tag==="Failure")throw fP(n.effect_instruction_i0);return n.effect_instruction_i0});class vre extends Error{constructor(n){super(`Fiber #${n.id().id} cannot be resolved synchronously. This is caused by using runSync on an effect that performs async work`);g(this,"fiber");g(this,"_tag","AsyncFiberException");this.fiber=n,this.name=this._tag,this.stack=this.message}}const Sre=e=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new vre(e);return Error.stackTraceLimit=t,n},s0=Symbol.for("effect/Runtime/FiberFailure"),op=Symbol.for("effect/Runtime/FiberFailure/Cause");var OD,RD;class wre extends Error{constructor(n){const r=wj(n)[0];super((r==null?void 0:r.message)||"An error has occurred");g(this,RD);g(this,OD);this[s0]=s0,this[op]=n,this.name=r?`(FiberFailure) ${r.name}`:"FiberFailure",r!=null&&r.stack&&(this.stack=r.stack)}toJSON(){return{_id:"FiberFailure",cause:this[op].toJSON()}}toString(){return"(FiberFailure) "+sf(this[op],{renderErrorCause:!0})}[(RD=s0,OD=op,Pe)](){return this.toString()}}const fP=e=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new wre(e);return Error.stackTraceLimit=t,n},dP=e=>{const t=e;switch(t._op){case"Failure":case"Success":return t;case"Left":return bh(t.left);case"Right":return Ze(t.right);case"Some":return Ze(t.value);case"None":return bh(new ov)}},xre=mf((e,t)=>{const n=dP(t);if(n)return n;const r=new AE,i=gm(e)(t,{scheduler:r});r.flush();const s=i.unsafePoll();return s||xF(eE(Sre(i),gE(i)))}),_re=mf((e,t,n)=>kre(e,t,n).then(r=>{switch(r._tag){case fn:return r.effect_instruction_i0;case un:throw fP(r.effect_instruction_i0)}})),kre=mf((e,t,n)=>new Promise(r=>{const i=dP(t);i&&r(i);const s=gm(e)(t);s.addObserver(a=>{r(a)}),(n==null?void 0:n.signal)!==void 0&&(n.signal.aborted?s.unsafeInterruptAsFork(s.id()):n.signal.addEventListener("abort",()=>{s.unsafeInterruptAsFork(s.id())},{once:!0}))}));class hP{constructor(t,n,r){g(this,"context");g(this,"runtimeFlags");g(this,"fiberRefs");this.context=t,this.runtimeFlags=n,this.fiberRefs=r}pipe(){return ie(this,arguments)}}const mP=e=>new hP(e.context,e.runtimeFlags,e.fiberRefs),Ere=()=>Be((e,t)=>ee(new hP(e.getFiberRef(is),t.runtimeFlags,e.getFiberRefs()))),Cre=Kj(Fl,qj,Hj),Du=mP({context:Xi(),runtimeFlags:Cre,fiberRefs:oW()}),Tre=gm(Du),Are=_re(Du),Ore=uP(Du),Rre=E(2,(e,t)=>e.modifyEffect(t)),Mre="effect/Layer",pP=Symbol.for(Mre),Nre={_RIn:e=>e,_E:e=>e,_ROut:e=>e},xl={[pP]:Nre,pipe(){return ie(this,arguments)}},Dre="effect/Layer/MemoMap",a0=Symbol.for(Dre),zre=Zu()("effect/Layer/CurrentMemoMap",{defaultValue:()=>Lre()}),Ire=e=>ue(e,pP),$re=e=>e._op_layer===dre;var MD;MD=a0;class gP{constructor(t){g(this,"ref");g(this,MD);this.ref=t,this[a0]=a0}getOrElseMemoize(t,n){return O(Rre(this.ref,r=>{const i=r.get(t);if(i!==void 0){const[s,a]=i,o=O(s,B(([l,c])=>O(p3(l),Vn(c))),vl(cv({onFailure:()=>et,onSuccess:()=>oy(n,a)})));return ee([o,r])}return O(gy(0),B(s=>O(fv(),B(a=>O(gy(()=>et),Ae(o=>{const l=_i(f=>O(UE(),B(u=>O(f(B(SP(t,u,!0),d=>SZ(d(this)))),Pa,B(d=>{switch(d._tag){case un:return O(EF(a,d.effect_instruction_i0),Et(Tx(u,d)),Et(nn(d.effect_instruction_i0)));case fn:return O(Jc(o,h=>O(Tx(u,h),iE(a3(s,p=>[p===1,p-1])),ii)),Et(yy(s,h=>h+1)),Et(oy(n,h=>O(K(()=>r.delete(t)),Et(Gi(o)),B(p=>p(h))))),Et(hE(a,d.effect_instruction_i0)),Vn(d.effect_instruction_i0[1]))}}))))),c=[O(io(a),vl(Ox({onFailure:()=>et,onSuccess:()=>yy(s,f=>f+1)}))),f=>O(Gi(o),B(u=>u(f)))];return[l,$re(t)?r:r.set(t,c)]}))))))}),tv)}}const yP=Te(()=>Ae(ure(new Map),e=>new gP(e))),Lre=()=>new gP(aP(new Map)),bP=E(2,(e,t)=>B(yP,n=>vP(e,n,t))),vP=E(3,(e,t,n)=>B(SP(e,n),r=>g3(r(t),zre,t))),SP=(e,t,n=!1)=>{const r=e;switch(r._op_layer){case"Locally":return K(()=>i=>r.f(i.getOrElseMemoize(r.self,t)));case"ExtendScope":return K(()=>i=>V3(s=>i.getOrElseMemoize(r.layer,s)));case"Fold":return K(()=>i=>O(i.getOrElseMemoize(r.layer,t),ri({onFailure:s=>i.getOrElseMemoize(r.failureK(s),t),onSuccess:s=>i.getOrElseMemoize(r.successK(s),t)})));case"Fresh":return K(()=>i=>O(r.layer,bP(t)));case"FromEffect":return K(n?()=>i=>r.effect:()=>i=>i.getOrElseMemoize(e,t));case"Provide":return K(()=>i=>O(i.getOrElseMemoize(r.first,t),B(s=>O(i.getOrElseMemoize(r.second,t),mv(s)))));case"Scoped":return K(n?()=>i=>pm(r.effect,t):()=>i=>i.getOrElseMemoize(e,t));case"Suspend":return K(()=>i=>i.getOrElseMemoize(r.evaluate(),t));case"ProvideMerge":return K(()=>i=>O(i.getOrElseMemoize(r.first,t),dF(i.getOrElseMemoize(r.second,t),r.zipK)));case"ZipWith":return uF(function*(){const i=yield*ks(t,Mx),s=yield*ks(i,rl),a=yield*ks(i,rl);return o=>O(o.getOrElseMemoize(r.first,s),mm(o.getOrElseMemoize(r.second,a),r.zipK,{concurrent:!0}))});case"MergeAll":{const i=r.layers;return Ae(ks(t,Mx),s=>a=>{const o=new Array(i.length);return Ae(Yi(i,fF(function*(l,c){const f=yield*ks(s,rl),u=yield*a.getOrElseMemoize(l,f);o[c]=u}),!1,!1),()=>D7(...o))})}}},jre=()=>wP(mE()),Fre=E(2,(e,t)=>{const n=AL(e),r=n?e:t;return wP(Ae(n?t:e,s=>Tk(r,s)))});function wP(e){const t=Object.create(xl);return t._op_layer=hre,t.effect=e,t}const xP=(...e)=>{const t=Object.create(xl);return t._op_layer=yre,t.layers=e,t},Pre=E(2,(e,t)=>{const n=AL(e),r=n?e:t;return Ure(Ae(n?t:e,s=>Tk(r,s)))}),Ure=e=>{const t=Object.create(xl);return t._op_layer=mre,t.effect=e,t},Bre=e=>{const t=Object.create(xl);return t._op_layer=pre,t.evaluate=e,t},_P=E(2,(e,t)=>Bre(()=>{const n=Object.create(xl);return n._op_layer=gre,n.first=Object.create(xl,{_op_layer:{value:oP,enumerable:!0},first:{value:jre(),enumerable:!0},second:{value:Array.isArray(t)?xP(...t):t},zipK:{value:(r,i)=>O(r,sr(i))}}),n.second=e,n})),Hre=E(2,(e,t)=>{const n=Object.create(xl);return n._op_layer=oP,n.first=t,n.second=_P(e,t),n.zipK=(r,i)=>O(r,sr(i)),n}),kR=E(2,(e,t)=>K3(n=>B(bP(t,n),r=>pE(e,r)))),ER=E(2,(e,t)=>{const n=Sh(Du.fiberRefs,t.fiberRefs),r=Fa(Du.runtimeFlags,t.runtimeFlags);return _i(i=>Be(s=>{const a=s.getFiberRef(is),o=s.getFiberRefs(),l=wh(s.id(),o)(n),c=s.currentRuntimeFlags,f=Kc(r)(c),u=Sh(l,o),d=Fa(f,c);return s.setFiberRefs(l),s.currentRuntimeFlags=f,kh(pE(i(e),sr(a,t.context)),Be(h=>(h.setFiberRefs(wh(h.id(),h.getFiberRefs())(u)),h.currentRuntimeFlags=Kc(d)(h.currentRuntimeFlags),et)))}))}),qre=E(2,(e,t)=>Array.isArray(t)?kR(e,xP(...t)):Ire(t)?kR(e,t):N7(t)?pE(e,t):fre in t?B(t.runtimeEffect,n=>ER(e,n)):ER(e,t)),lp=MY,CR=e=>Vre(e.slice(0)),Vre=e=>Object.setPrototypeOf(e,RY),VE=nm,Kre=nm,KE=function(){const e=Symbol.for("effect/Data/Error/plainArgs");return{BaseEffectError:class extends cE{constructor(n){super(n==null?void 0:n.message,n!=null&&n.cause?{cause:n.cause}:void 0),n&&(Object.assign(this,n),Object.defineProperty(this,e,{value:n,enumerable:!1}))}toJSON(){return{...this[e],...this}}}}.BaseEffectError}(),Gre=e=>{const t={BaseEffectError:class extends KE{constructor(){super(...arguments);g(this,"_tag",e)}}};return t.BaseEffectError.prototype.name=e,t.BaseEffectError},Yre="effect/Schedule",kP=Symbol.for(Yre),Jre=e=>ue(e,kP),Qre="effect/ScheduleDriver",Xre=Symbol.for(Qre),Wx={start:0,now:0,input:void 0,output:void 0,elapsed:ku,elapsedSincePrevious:ku,recurrence:0},TR=Zu()("effect/Schedule/CurrentIterationMetadata",{defaultValue:()=>Wx}),Wre={_Out:e=>e,_In:e=>e,_R:e=>e},Zre={_Out:e=>e,_In:e=>e,_R:e=>e};var ND;ND=kP;class eie{constructor(t,n){g(this,"initial");g(this,"step");g(this,ND,Wre);this.initial=t,this.step=n}pipe(){return ie(this,arguments)}}const AR=(e,t,n,r)=>yy(e,i=>i.recurrence===0?{now:t,input:n,output:r,recurrence:i.recurrence+1,elapsed:ku,elapsedSincePrevious:ku,start:t}:{now:t,input:n,output:r,recurrence:i.recurrence+1,elapsed:Eu(t-i.start),elapsedSincePrevious:Eu(t-i.now),start:i.start});var DD;DD=Xre;class tie{constructor(t,n){g(this,"schedule");g(this,"ref");g(this,DD,Zre);g(this,"iterationMeta",CE(Wx));this.schedule=t,this.ref=n}get state(){return Ae(Gi(this.ref),t=>t[1])}get last(){return B(Gi(this.ref),([t,n])=>{switch(t._tag){case"None":return Zb(()=>new ov);case"Some":return ee(t.value)}})}get reset(){return Jc(this.ref,[V(),this.schedule.initial]).pipe(sv(Jc(this.iterationMeta,Wx)))}next(t){return O(Ae(Gi(this.ref),n=>n[1]),B(n=>O(hZ,B(r=>O(Te(()=>this.schedule.step(r,t,n)),B(([i,s,a])=>{const o=Jc(this.ref,[X(s),i]);if(Cy(a))return o.pipe(Et(Ot(V())));const l=Bne(a.intervals)-r;if(l<=0)return o.pipe(Et(AR(this.iterationMeta,r,t,s)),Vn(s));const c=Eu(l);return O(o,Et(AR(this.iterationMeta,r,t,s)),Et(TZ(c)),Vn(s))}))))))}}const ym=(e,t)=>new eie(e,t),nie=E(2,(e,t)=>GE(e,(n,r)=>K(()=>t(n,r)))),GE=E(2,(e,t)=>ym(e.initial,(n,r,i)=>B(e.step(n,r,i),([s,a,o])=>Cy(o)?ee([s,a,Eh]):Ae(t(r,a),l=>l?[s,a,o]:[s,a,Eh])))),rie=e=>O(gy([V(),e.initial]),Ae(t=>new tie(e,t))),iie=E(2,(e,t)=>sie(e,t,Une)),sie=E(3,(e,t,n)=>ym([e.initial,t.initial],(r,i,s)=>O(dF(e.step(r,i,s[0]),t.step(r,i,s[1]),(a,o)=>[a,o]),B(([[a,o,l],[c,f,u]])=>wR(l)&&wR(u)?Zx(e,t,i,a,o,l.intervals,c,f,u.intervals,n):ee([[a,c],[o,f],Eh]))))),Zx=(e,t,n,r,i,s,a,o,l,c)=>{const f=c(s,l);return qne(f)?ee([[r,a],[i,o],Qne(f)]):O(s,Hne(l))?B(e.step(SR(s),n,r),([u,d,h])=>Cy(h)?ee([[u,a],[d,o],Eh]):Zx(e,t,n,u,d,h.intervals,a,o,l,c)):B(t.step(SR(l),n,a),([u,d,h])=>Cy(h)?ee([[r,u],[i,d],Eh]):Zx(e,t,n,r,i,s,u,d,h.intervals,c))},aie=E(2,(e,t)=>oie(e,n=>K(()=>t(n)))),oie=E(2,(e,t)=>ym(e.initial,(n,r,i)=>B(e.step(n,r,i),([s,a,o])=>Ae(t(a),l=>[s,l,o])))),lie=e=>ym(e.initial,(t,n,r)=>O(e.step(t,n,r),Ae(([i,s,a])=>[i,n,a]))),cie=e=>hie(CP,t=>t<e),uie=(e,t)=>ym(e,(n,r,i)=>K(()=>[t(i),i,Xne(Dne(n))])),fie=E(2,(e,t)=>GE(e,(n,r)=>kZ(t(n)))),die=E(2,(e,t)=>GE(e,(n,r)=>t(n))),hie=E(2,(e,t)=>nie(e,(n,r)=>t(r))),Xp=Symbol.for("effect/Schedule/ScheduleDefect");var zD;zD=Xp;class mie{constructor(t){g(this,"error");g(this,zD);this.error=t,this[Xp]=Xp}}const pie=e=>ue(e,Xp),OR=e=>gh(e,t=>Ca(new mie(t))),gie=e=>Dt(Kb(e,t=>gj(t)&&pie(t.defect)?X(t.defect):V()),{onNone:()=>e,onSome:t=>pl(t.error)}),yie=e=>rF(e,t=>nn(gie(t))),RR=E(2,(e,t)=>vie(e,t,(n,r)=>Ot(n))),bie=E(2,(e,t)=>{if(Jre(t))return RR(e,t);const n=t.schedule??lie(CP),r=t.while?die(n,a=>{const o=t.while(a);return typeof o=="boolean"?ee(o):OR(o)}):n,i=t.until?fie(r,a=>{const o=t.until(a);return typeof o=="boolean"?ee(o):OR(o)}):r,s=t.times?iie(i,cie(t.times)).pipe(aie(a=>a[0])):i;return yie(RR(e,s))}),vie=E(3,(e,t,n)=>B(rie(t),r=>ro(e,{onFailure:i=>n(i,V()),onSuccess:i=>EP(sR(e,TR,Gi(r.iterationMeta)),r,(s,a)=>sR(n(s,a),TR,Gi(r.iterationMeta)),i)}))),EP=(e,t,n,r)=>ro(t.next(r),{onFailure:()=>rQ(t.last),onSuccess:i=>ro(e,{onFailure:s=>n(s,X(i)),onSuccess:s=>EP(e,t,n,s)})}),CP=uie(0,e=>e+1),Ui=fv,Fn=io,Sie=kF,wie=EF,e_=qQ,Ns=hE,xie=hv,MR=Symbol.for("effect/MutableList"),_ie={[MR]:MR,[Symbol.iterator](){let e=!1,t=this.head;return{next(){if(e)return this.return();if(t==null)return e=!0,this.return();const n=t.value;return t=t.next,{done:e,value:n}},return(n){return e||(e=!0),{done:!0,value:n}}}},toString(){return it(this.toJSON())},toJSON(){return{_id:"MutableList",values:Array.from(this).map(wt)}},[Pe](){return this.toJSON()},pipe(){return ie(this,arguments)}},kie=e=>({value:e,removed:!1,prev:void 0,next:void 0}),Eie=()=>{const e=Object.create(_ie);return e.head=void 0,e.tail=void 0,e._length=0,e},TP=e=>YE(e)===0,YE=e=>e._length,Cie=E(2,(e,t)=>{const n=kie(t);return e.head===void 0&&(e.head=n),e.tail===void 0||(e.tail.next=n,n.prev=e.tail),e.tail=n,e._length+=1,e}),Tie=e=>{const t=e.head;if(t!==void 0)return Aie(e,t),t.value},Aie=(e,t)=>{t.removed||(t.removed=!0,t.prev!==void 0&&t.next!==void 0?(t.prev.next=t.next,t.next.prev=t.prev):t.prev!==void 0?(e.tail=t.prev,t.prev.next=void 0):t.next!==void 0?(e.head=t.next,t.next.prev=void 0):(e.tail=void 0,e.head=void 0),e._length>0&&(e._length-=1))},NR=Symbol.for("effect/MutableQueue"),er=Symbol.for("effect/mutable/MutableQueue/Empty"),Oie={[NR]:NR,[Symbol.iterator](){return Array.from(this.queue)[Symbol.iterator]()},toString(){return it(this.toJSON())},toJSON(){return{_id:"MutableQueue",values:Array.from(this).map(wt)}},[Pe](){return this.toJSON()},pipe(){return ie(this,arguments)}},AP=e=>{const t=Object.create(Oie);return t.queue=Eie(),t.capacity=e,t},Rie=e=>AP(e),JE=()=>AP(void 0),QE=e=>YE(e.queue),t_=e=>TP(e.queue),Mie=e=>e.capacity===void 0?1/0:e.capacity,Ch=E(2,(e,t)=>{const n=YE(e.queue);return e.capacity!==void 0&&n===e.capacity?!1:(Cie(t)(e.queue),!0)}),OP=E(2,(e,t)=>{const n=t[Symbol.iterator]();let r,i=tn(),s=!0;for(;s&&(r=n.next())&&!r.done;)s=Ch(r.value)(e);for(;r!=null&&!r.done;)i=Mn(r.value)(i),r=n.next();return Vs(i)}),Ba=E(2,(e,t)=>TP(e.queue)?t:Tie(e.queue)),XE=E(2,(e,t)=>{let n=tn(),r=0;for(;r<t;){const i=Ba(er)(e);if(i===er)break;n=Mn(i)(n),r+=1}return Vs(n)}),n_=bl,yo=Ws,o0=_Z,Nie=B3,Ji=Nu,r_=xi,Oy=Be,ss=Ot,bi=nn,Die=iF,Qc=uF,l0=lQ,zie=CZ,yt=ee,Rt=Te,at=K,je=et,RP=gh,WE=rF,Iie=xZ,$ie=d3,Lie=MZ,Dd=RZ,jo=vs,mi=tE,jie=cm,id=um,Ry=_i,c0=Vn,ZE=ii,Je=Ae,Fie=nE,eC=rv,My=Jte,Pie=tF,Dc=kh,xv=G3,Uie=V3,i_=K3,Bie=lm,Hie=PE,il=sre,MP=mE,NP=TF,Ny=qre,qie=zZ,tc=Au,Sn=Pa,DP=lF,Vie=DZ,ce=B,dc=tv,u0=cne,zP=J3,IP=rE,$P=OZ,DR=bie,Kie=of,Gie=h3,s_=aF,pi=ri,bm=Ere,Yie=HE,Jie=nre,Qie=ire,tC=Tre,Xie=Are,Wr=Ore,Dy=nne,nC=rne,yn=ine,_v=mm,Wie=LZ,Zie=jZ,LP=fF,kv=gm,ese=uP,tse=cP,Ev=Du,rC=mP,a_=Symbol.for("effect/FiberHandle"),nse=e=>ue(e,a_),rse={[a_]:a_,toString(){return it(this.toJSON())},toJSON(){return{_id:"FiberHandle",state:this.state}},[Pe](){return this.toJSON()},pipe(){return ie(this,arguments)}},ise=e=>{const t=Object.create(rse);return t.state={_tag:"Open",fiber:void 0},t.deferred=e,t},sse=()=>My(Je(Ui(),e=>ise(e)),e=>Oy(t=>{const n=e.state;return n._tag==="Closed"?je:(e.state={_tag:"Closed"},n.fiber?DP(ZE(qE(n.fiber,Md(t.id(),Wp))),e.deferred):Sie(e.deferred,ME))})),ase=()=>ce(sse(),e=>cse(e)()),jP=-1,Wp=fY(jP,0),ose=xne(void 0,{emptyCase:La,failCase:La,dieCase:La,interruptCase:(e,t)=>dj(Rj(t),jP),sequentialCase:(e,t,n)=>t||n,parallelCase:(e,t,n)=>t||n}),lse=E(e=>nse(e[0]),(e,t,n)=>{if(e.state._tag==="Closed"){t.unsafeInterruptAsFork(Md((n==null?void 0:n.interruptAs)??Er,Wp));return}else if(e.state.fiber!==void 0){if((n==null?void 0:n.onlyIfMissing)===!0){t.unsafeInterruptAsFork(Md((n==null?void 0:n.interruptAs)??Er,Wp));return}else if(e.state.fiber===t)return;e.state.fiber.unsafeInterruptAsFork(Md((n==null?void 0:n.interruptAs)??Er,Wp)),e.state.fiber=void 0}e.state.fiber=t,t.addObserver(r=>{e.state._tag==="Open"&&t===e.state.fiber&&(e.state.fiber=void 0),RE(r)&&((n==null?void 0:n.propagateInterruption)===!0?!ose(r.cause):!gne(r.cause))&&xie(e.deferred,r)})}),zR=function(){let e;return()=>(e===void 0&&(e=tC(jo)),e)}(),cse=e=>()=>Je(bm(),t=>{const n=kv(t);return(r,i)=>{if(e.state._tag==="Closed")return zR();if(e.state.fiber!==void 0&&(i==null?void 0:i.onlyIfMissing)===!0)return zR();const s=n(r,i);return lse(e,s,i),s}}),use=Fre,FP=Pre,PP=_P,f0=Hre,fse=yP,IR=vP,iC=rn,UP=is,dse=bF,hse="effect/QueueEnqueue",mse=Symbol.for(hse),pse="effect/QueueDequeue",gse=Symbol.for(pse),yse="effect/QueueStrategy",BP=Symbol.for(yse),bse="effect/BackingQueue",vse=Symbol.for(bse),HP={_A:e=>e},Sse={_A:e=>e},wse={_In:e=>e},xse={_Out:e=>e};var ID,$D,LD;class _se extends(LD=df,$D=mse,ID=gse,LD){constructor(n,r,i,s,a){super();g(this,"queue");g(this,"takers");g(this,"shutdownHook");g(this,"shutdownFlag");g(this,"strategy");g(this,$D,wse);g(this,ID,xse);this.queue=n,this.takers=r,this.shutdownHook=i,this.shutdownFlag=s,this.strategy=a}pipe(){return ie(this,arguments)}commit(){return this.take}capacity(){return this.queue.capacity()}get size(){return Te(()=>gh(this.unsafeSize(),()=>vs))}unsafeSize(){return Jt(this.shutdownFlag)?V():X(this.queue.length()-QE(this.takers)+this.strategy.surplusSize())}get isEmpty(){return Ae(this.size,n=>n<=0)}get isFull(){return Ae(this.size,n=>n>=this.capacity())}get shutdown(){return um(Be(n=>(O(this.shutdownFlag,tm(!0)),O(Yi(Xc(this.takers),r=>CF(r,n.id()),!1,!1),Et(this.strategy.shutdown),iE(hE(this.shutdownHook,void 0)),ii))))}get isShutdown(){return K(()=>Jt(this.shutdownFlag))}get awaitShutdown(){return io(this.shutdownHook)}isActive(){return!Jt(this.shutdownFlag)}unsafeOffer(n){if(Jt(this.shutdownFlag))return!1;let r;if(this.queue.length()===0){const s=O(this.takers,Ba(er));s!==er?(sl(s,n),r=!0):r=!1}else r=!1;if(r)return!0;const i=this.queue.offer(n);return zc(this.strategy,this.queue,this.takers),i}offer(n){return Te(()=>{if(Jt(this.shutdownFlag))return vs;let r;if(this.queue.length()===0){const s=O(this.takers,Ba(er));s!==er?(sl(s,n),r=!0):r=!1}else r=!1;if(r)return ee(!0);const i=this.queue.offer(n);return zc(this.strategy,this.queue,this.takers),i?ee(!0):this.strategy.handleSurplus([n],this.queue,this.takers,this.shutdownFlag)})}offerAll(n){return Te(()=>{if(Jt(this.shutdownFlag))return vs;const r=Ye(n),i=this.queue.length()===0?Ye(Fse(this.takers,r.length)):Za,[s,a]=O(r,GL(i.length));for(let l=0;l<i.length;l++){const c=i[l],f=s[l];sl(c,f)}if(a.length===0)return ee(!0);const o=this.queue.offerAll(a);return zc(this.strategy,this.queue,this.takers),jb(o)?ee(!0):this.strategy.handleSurplus(o,this.queue,this.takers,this.shutdownFlag)})}get take(){return Be(n=>{if(Jt(this.shutdownFlag))return vs;const r=this.queue.poll(er);if(r!==er)return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),ee(r);{const i=uv(n.id());return O(Te(()=>(O(this.takers,Ch(i)),zc(this.strategy,this.queue,this.takers),Jt(this.shutdownFlag)?vs:io(i))),cm(()=>K(()=>Pse(this.takers,i))))}})}get takeAll(){return Te(()=>Jt(this.shutdownFlag)?vs:K(()=>{const n=this.queue.pollUpTo(Number.POSITIVE_INFINITY);return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),qs(n)}))}takeUpTo(n){return Te(()=>Jt(this.shutdownFlag)?vs:K(()=>{const r=this.queue.pollUpTo(n);return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),qs(r)}))}takeBetween(n,r){return Te(()=>qP(this,n,r,tn()))}}const qP=(e,t,n,r)=>n<t?ee(r):O(Dse(e,n),B(i=>{const s=t-i.length;return s===1?O(o_(e),Ae(a=>O(r,Bt(i),ux(a)))):s>1?O(o_(e),B(a=>qP(e,s-1,n-i.length-1,O(r,Bt(i),ux(a))))):ee(O(r,Bt(i)))})),kse=e=>O(K(()=>Rie(e)),B(t=>VP(KP(t),Ise()))),Ese=()=>O(K(()=>JE()),B(e=>VP(KP(e),$se()))),Cse=(e,t,n,r,i)=>new _se(e,t,n,r,i),VP=(e,t)=>O(fv(),Ae(n=>Cse(e,JE(),n,em(!1),t)));var jD;jD=vse;class Tse{constructor(t){g(this,"mutable");g(this,jD,Sse);this.mutable=t}poll(t){return Ba(this.mutable,t)}pollUpTo(t){return XE(this.mutable,t)}offerAll(t){return OP(this.mutable,t)}offer(t){return Ch(this.mutable,t)}capacity(){return Mie(this.mutable)}length(){return QE(this.mutable)}}const KP=e=>new Tse(e),Ase=e=>e.size,Ose=e=>e.isShutdown,Rse=e=>e.shutdown,Mse=E(2,(e,t)=>e.offer(t)),Nse=E(2,(e,t)=>e.unsafeOffer(t)),o_=e=>e.take,Dse=E(2,(e,t)=>e.takeUpTo(t)),zse=E(3,(e,t,n)=>e.takeBetween(t,n)),Ise=()=>new Lse,$se=()=>new jse;var FD;FD=BP;class Lse{constructor(){g(this,FD,HP);g(this,"putters",JE())}surplusSize(){return QE(this.putters)}onCompleteTakersWithEmptyQueue(t){for(;!t_(this.putters)&&!t_(t);){const n=Ba(t,void 0),r=Ba(this.putters,void 0);r[2]&&sl(r[1],!0),sl(n,r[0])}}get shutdown(){return O(ev,B(t=>O(K(()=>Xc(this.putters)),B(n=>Yi(n,([r,i,s])=>s?O(CF(i,t),ii):et,!1,!1)))))}handleSurplus(t,n,r,i){return Be(s=>{const a=uv(s.id());return O(Te(()=>(this.unsafeOffer(t,a),this.unsafeOnQueueEmptySpace(n,r),zc(this,n,r),Jt(i)?vs:io(a))),cm(()=>K(()=>this.unsafeRemove(a))))})}unsafeOnQueueEmptySpace(t,n){let r=!0;for(;r&&(t.capacity()===Number.POSITIVE_INFINITY||t.length()<t.capacity());){const i=O(this.putters,Ba(er));if(i===er)r=!1;else{const s=t.offer(i[0]);s&&i[2]?sl(i[1],!0):s||zy(this.putters,O(Xc(this.putters),Mn(i))),zc(this,t,n)}}}unsafeOffer(t,n){const r=Ye(t);for(let i=0;i<r.length;i++){const s=r[i];i===r.length-1?O(this.putters,Ch([s,n,!0])):O(this.putters,Ch([s,n,!1]))}}unsafeRemove(t){zy(this.putters,O(Xc(this.putters),zk(([,n])=>n!==t)))}}var PD;PD=BP;class jse{constructor(){g(this,PD,HP)}surplusSize(){return 0}get shutdown(){return et}onCompleteTakersWithEmptyQueue(){}handleSurplus(t,n,r,i){return ee(!1)}unsafeOnQueueEmptySpace(t,n){}}const sl=(e,t)=>hv(e,ee(t)),zy=(e,t)=>O(e,OP(t)),Xc=e=>O(e,XE(Number.POSITIVE_INFINITY)),Fse=(e,t)=>O(e,XE(t)),Pse=(e,t)=>{zy(e,O(Xc(e),zk(n=>t!==n)))},zc=(e,t,n)=>{let r=!0;for(;r&&t.length()!==0;){const i=O(n,Ba(er));if(i!==er){const s=t.poll(er);s!==er?(sl(i,s),e.unsafeOnQueueEmptySpace(t,n)):zy(n,O(Xc(n),Mn(i))),r=!0}else r=!1}r&&t.length()===0&&!t_(n)&&e.onCompleteTakersWithEmptyQueue(n)},Use=E(2,(e,t)=>e.publish(t)),Bse=Use,GP=kse,Hse=Ese,qse=Ase,Vse=Ose,Iy=Rse,nc=Mse,Kse=Nse,$R=o_,Gse=zse,YP="Continue",Yse="Close",Jse="Yield",Qse="effect/ChannelChildExecutorDecision",LR=Symbol.for(Qse),Xse={[LR]:LR},JP=e=>{const t=Object.create(Xse);return t._tag=YP,t},Zp="ContinuationK",Wse="ContinuationFinalizer",QP=Symbol.for("effect/ChannelContinuation"),XP={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutDone:e=>e,_OutErr2:e=>e,_OutElem:e=>e,_OutDone2:e=>e};var UD;UD=QP;class WP{constructor(t,n){g(this,"onSuccess");g(this,"onHalt");g(this,"_tag",Zp);g(this,UD,XP);this.onSuccess=t,this.onHalt=n}onExit(t){return RE(t)?this.onHalt(t.cause):this.onSuccess(t.value)}}var BD;BD=QP;class Zse{constructor(t){g(this,"finalizer");g(this,"_tag",Wse);g(this,BD,XP);this.finalizer=t}}const ZP="PullAfterNext",eae="PullAfterAllEnqueued",tae="effect/ChannelUpstreamPullStrategy",nae=Symbol.for(tae),rae={_A:e=>e},iae={[nae]:rae},e4=e=>{const t=Object.create(iae);return t._tag=ZP,t.emitSeparator=e,t},t4="BracketOut",n4="Bridge",sC="ConcatAll",r4="Emit",i4="Ensuring",s4="Fail",a4="Fold",o4="FromEffect",l4="PipeTo",sae="Provide",c4="Read",u4="Succeed",f4="SucceedNow",d4="Suspend",aae="effect/Channel",h4=Symbol.for(aae),oae={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutElem:e=>e,_OutDone:e=>e},or={[h4]:oae,pipe(){return ie(this,arguments)}},m4=e=>ue(e,h4)||yo(e),lae=E(2,(e,t)=>{const n=Object.create(or);return n._tag=t4,n.acquire=()=>e,n.finalizer=t,n}),p4=(e,t,n)=>{const r=Object.create(or);return r._tag=sC,r.combineInners=t,r.combineAll=n,r.onPull=()=>e4(V()),r.onEmit=()=>JP,r.value=()=>e,r.k=ge,r},cae=E(4,(e,t,n,r)=>{const i=Object.create(or);return i._tag=sC,i.combineInners=n,i.combineAll=r,i.onPull=()=>e4(V()),i.onEmit=()=>JP,i.value=()=>e,i.k=t,i}),g4=E(2,(e,t)=>{const n=Object.create(or);return n._tag=n4,n.input=t,n.channel=e,n}),uae=E(2,(e,t)=>{const n=Object.create(or);return n._tag=i4,n.channel=e,n.finalizer=t,n}),aC=e=>Cr(Q3(e)),Cr=e=>fae(()=>e),fae=e=>{const t=Object.create(or);return t._tag=s4,t.error=e,t},Ht=E(2,(e,t)=>{const n=Object.create(or);return n._tag=a4,n.channel=e,n.k=new WP(t,Cr),n}),jn=e=>{const t=Object.create(or);return t._tag=o4,t.effect=()=>e,t},vi=E(2,(e,t)=>{const n=Object.create(or);return n._tag=l4,n.left=()=>e,n.right=()=>t,n}),y4=e=>pf({onInput:e.onInput,onFailure:t=>tr(vne(t),{onLeft:e.onFailure,onRight:Cr}),onDone:e.onDone}),pf=e=>{const t=Object.create(or);return t._tag=c4,t.more=e.onInput,t.done=new WP(e.onDone,e.onFailure),t},b4=e=>lC(()=>e),Th=e=>{const t=Object.create(or);return t._tag=f4,t.terminal=e,t},oC=e=>{const t=Object.create(or);return t._tag=d4,t.channel=e,t},lC=e=>{const t=Object.create(or);return t._tag=u4,t.evaluate=e,t},Zs=Th(void 0),_n=e=>{const t=Object.create(or);return t._tag=r4,t.out=e,t},vm="Done",Sm="Emit",gf="FromEffect",wm="Read",dae=Symbol.for("effect/ChannelState"),hae={_E:e=>e,_R:e=>e},Cv={[dae]:hae},rc=()=>{const e=Object.create(Cv);return e._tag=vm,e},d0=()=>{const e=Object.create(Cv);return e._tag=Sm,e},Bf=e=>{const t=Object.create(Cv);return t._tag=gf,t.effect=e,t},h0=(e,t,n,r)=>{const i=Object.create(Cv);return i._tag=wm,i.upstream=e,i.onEffect=t,i.onEmit=n,i.onDone=r,i},$y=e=>e._tag===gf,mae=e=>$y(e)?e.effect:je,jR=e=>$y(e)?Iie(e.effect):void 0,v4="PullFromChild",l_="PullFromUpstream",c_="DrainChildExecutors",S4="Emit";class cp{constructor(t,n,r){g(this,"childExecutor");g(this,"parentSubexecutor");g(this,"onEmit");g(this,"_tag",v4);this.childExecutor=t,this.parentSubexecutor=n,this.onEmit=r}close(t){const n=this.childExecutor.close(t),r=this.parentSubexecutor.close(t);return n!==void 0&&r!==void 0?_v(Sn(n),Sn(r),(i,s)=>O(i,xh(s))):n!==void 0?n:r!==void 0?r:void 0}enqueuePullFromChild(t){return this}}class Po{constructor(t,n,r,i,s,a,o,l){g(this,"upstreamExecutor");g(this,"createChild");g(this,"lastDone");g(this,"activeChildExecutors");g(this,"combineChildResults");g(this,"combineWithChildResult");g(this,"onPull");g(this,"onEmit");g(this,"_tag",l_);this.upstreamExecutor=t,this.createChild=n,this.lastDone=r,this.activeChildExecutors=i,this.combineChildResults=s,this.combineWithChildResult=a,this.onPull=o,this.onEmit=l}close(t){const n=this.upstreamExecutor.close(t),i=[...this.activeChildExecutors.map(s=>s!==void 0?s.childExecutor.close(t):void 0),n].reduce((s,a)=>s!==void 0&&a!==void 0?_v(s,Sn(a),(o,l)=>xh(o,l)):s!==void 0?s:a!==void 0?Sn(a):void 0,void 0);return i}enqueuePullFromChild(t){return new Po(this.upstreamExecutor,this.createChild,this.lastDone,[...this.activeChildExecutors,t],this.combineChildResults,this.combineWithChildResult,this.onPull,this.onEmit)}}class Ic{constructor(t,n,r,i,s,a,o){g(this,"upstreamExecutor");g(this,"lastDone");g(this,"activeChildExecutors");g(this,"upstreamDone");g(this,"combineChildResults");g(this,"combineWithChildResult");g(this,"onPull");g(this,"_tag",c_);this.upstreamExecutor=t,this.lastDone=n,this.activeChildExecutors=r,this.upstreamDone=i,this.combineChildResults=s,this.combineWithChildResult=a,this.onPull=o}close(t){const n=this.upstreamExecutor.close(t),i=[...this.activeChildExecutors.map(s=>s!==void 0?s.childExecutor.close(t):void 0),n].reduce((s,a)=>s!==void 0&&a!==void 0?_v(s,Sn(a),(o,l)=>xh(o,l)):s!==void 0?s:a!==void 0?Sn(a):void 0,void 0);return i}enqueuePullFromChild(t){return new Ic(this.upstreamExecutor,this.lastDone,[...this.activeChildExecutors,t],this.upstreamDone,this.combineChildResults,this.combineWithChildResult,this.onPull)}}class m0{constructor(t,n){g(this,"value");g(this,"next");g(this,"_tag",S4);this.value=t,this.next=n}close(t){const n=this.next.close(t);return n}enqueuePullFromChild(t){return this}}const pae="Pulled",gae="NoUpstream",yae="effect/ChannelUpstreamPullRequest",bae=Symbol.for(yae),vae={_A:e=>e},w4={[bae]:vae},FR=e=>{const t=Object.create(w4);return t._tag=pae,t.value=e,t},Sae=e=>{const t=Object.create(w4);return t._tag=gae,t.activeDownstreamCount=e,t};class qo{constructor(t,n,r){g(this,"_activeSubexecutor");g(this,"_cancelled");g(this,"_closeLastSubstream");g(this,"_currentChannel");g(this,"_done");g(this,"_doneStack",[]);g(this,"_emitted");g(this,"_executeCloseLastSubstream");g(this,"_input");g(this,"_inProgressFinalizer");g(this,"_providedEnv");this._currentChannel=t,this._executeCloseLastSubstream=r,this._providedEnv=n}run(){let t;for(;t===void 0;)if(this._cancelled!==void 0)t=this.processCancellation();else if(this._activeSubexecutor!==void 0)t=this.runSubexecutor();else try{if(this._currentChannel===void 0)t=rc();else switch(yo(this._currentChannel)&&(this._currentChannel=jn(this._currentChannel)),this._currentChannel._tag){case t4:{t=this.runBracketOut(this._currentChannel);break}case n4:{const n=this._currentChannel.input;if(this._currentChannel=this._currentChannel.channel,this._input!==void 0){const r=this._input;this._input=void 0;const i=()=>ce(n.awaitRead(),()=>Rt(()=>{const s=r.run();switch(s._tag){case vm:return Ms(r.getDone(),{onFailure:a=>n.error(a),onSuccess:a=>n.done(a)});case Sm:return ce(n.emit(r.getEmit()),()=>i());case gf:return pi(s.effect,{onFailure:a=>n.error(a),onSuccess:()=>i()});case wm:return cC(s,()=>i(),a=>n.error(a))}}));t=Bf(ce(Hie(mi(i())),s=>at(()=>this.addFinalizer(a=>ce(Ua(s),()=>Rt(()=>{const o=this.restorePipe(a,r);return o!==void 0?o:je}))))))}break}case sC:{const n=new qo(this._currentChannel.value(),this._providedEnv,i=>at(()=>{const s=this._closeLastSubstream===void 0?je:this._closeLastSubstream;this._closeLastSubstream=O(s,yn(i))}));n._input=this._input;const r=this._currentChannel;this._activeSubexecutor=new Po(n,i=>r.k(i),void 0,[],(i,s)=>r.combineInners(i,s),(i,s)=>r.combineAll(i,s),i=>r.onPull(i),i=>r.onEmit(i)),this._closeLastSubstream=void 0,this._currentChannel=void 0;break}case r4:{this._emitted=this._currentChannel.out,this._currentChannel=this._activeSubexecutor!==void 0?void 0:Zs,t=d0();break}case i4:{this.runEnsuring(this._currentChannel);break}case s4:{t=this.doneHalt(this._currentChannel.error());break}case a4:{this._doneStack.push(this._currentChannel.k),this._currentChannel=this._currentChannel.channel;break}case o4:{const n=this._providedEnv===void 0?this._currentChannel.effect():O(this._currentChannel.effect(),Ny(this._providedEnv));t=Bf(pi(n,{onFailure:r=>{const i=this.doneHalt(r);return i!==void 0&&$y(i)?i.effect:je},onSuccess:r=>{const i=this.doneSucceed(r);return i!==void 0&&$y(i)?i.effect:je}}));break}case l4:{const n=this._input,r=new qo(this._currentChannel.left(),this._providedEnv,i=>this._executeCloseLastSubstream(i));r._input=n,this._input=r,this.addFinalizer(i=>{const s=this.restorePipe(i,n);return s!==void 0?s:je}),this._currentChannel=this._currentChannel.right();break}case sae:{const n=this._providedEnv;this._providedEnv=this._currentChannel.context(),this._currentChannel=this._currentChannel.inner,this.addFinalizer(()=>at(()=>{this._providedEnv=n}));break}case c4:{const n=this._currentChannel;t=h0(this._input,ge,r=>{try{this._currentChannel=n.more(r)}catch(i){this._currentChannel=n.done.onExit(UZ(i))}},r=>{const i=s=>n.done.onExit(s);this._currentChannel=i(r)});break}case u4:{t=this.doneSucceed(this._currentChannel.evaluate());break}case f4:{t=this.doneSucceed(this._currentChannel.terminal);break}case d4:{this._currentChannel=this._currentChannel.channel();break}}}catch(n){this._currentChannel=Cr(Qx(n))}return t}getDone(){return this._done}getEmit(){return this._emitted}cancelWith(t){this._cancelled=t}clearInProgressFinalizer(){this._inProgressFinalizer=void 0}storeInProgressFinalizer(t){this._inProgressFinalizer=t}popAllFinalizers(t){const n=[];let r=this._doneStack.pop();for(;r;)r._tag==="ContinuationFinalizer"&&n.push(r.finalizer),r=this._doneStack.pop();const i=n.length===0?je:g0(n,t);return this.storeInProgressFinalizer(i),i}popNextFinalizers(){const t=[];for(;this._doneStack.length!==0;){const n=this._doneStack[this._doneStack.length-1];if(n._tag===Zp)return t;t.push(n),this._doneStack.pop()}return t}restorePipe(t,n){const r=this._input;return this._input=n,r!==void 0?r.close(t):je}close(t){let n;const r=this._inProgressFinalizer;r!==void 0&&(n=O(r,Dc(at(()=>this.clearInProgressFinalizer()))));let i;const s=this.popAllFinalizers(t);s!==void 0&&(i=O(s,Dc(at(()=>this.clearInProgressFinalizer()))));const a=this._activeSubexecutor===void 0?void 0:this._activeSubexecutor.close(t);if(!(a===void 0&&n===void 0&&i===void 0))return O(Sn(p0(a)),Dy(Sn(p0(n))),Dy(Sn(p0(i))),Je(([[o,l],c])=>O(o,xh(l),xh(c))),id,ce(o=>Rt(()=>o)))}doneSucceed(t){if(this._doneStack.length===0)return this._done=br(t),this._currentChannel=void 0,rc();const n=this._doneStack[this._doneStack.length-1];if(n._tag===Zp){this._doneStack.pop(),this._currentChannel=n.onSuccess(t);return}const r=this.popNextFinalizers();if(this._doneStack.length===0)return this._doneStack=r.reverse(),this._done=br(t),this._currentChannel=void 0,rc();const i=g0(r.map(a=>a.finalizer),br(t));this.storeInProgressFinalizer(i);const s=O(i,Dc(at(()=>this.clearInProgressFinalizer())),id,ce(()=>at(()=>this.doneSucceed(t))));return Bf(s)}doneHalt(t){if(this._doneStack.length===0)return this._done=On(t),this._currentChannel=void 0,rc();const n=this._doneStack[this._doneStack.length-1];if(n._tag===Zp){this._doneStack.pop();try{this._currentChannel=n.onHalt(t)}catch(a){this._currentChannel=Cr(Qx(a))}return}const r=this.popNextFinalizers();if(this._doneStack.length===0)return this._doneStack=r.reverse(),this._done=On(t),this._currentChannel=void 0,rc();const i=g0(r.map(a=>a.finalizer),On(t));this.storeInProgressFinalizer(i);const s=O(i,Dc(at(()=>this.clearInProgressFinalizer())),id,ce(()=>at(()=>this.doneHalt(t))));return Bf(s)}processCancellation(){return this._currentChannel=void 0,this._done=this._cancelled,this._cancelled=void 0,rc()}runBracketOut(t){const n=id(pi(this.provide(t.acquire()),{onFailure:r=>at(()=>{this._currentChannel=Cr(r)}),onSuccess:r=>at(()=>{this.addFinalizer(i=>this.provide(t.finalizer(r,i))),this._currentChannel=_n(r)})}));return Bf(n)}provide(t){return this._providedEnv===void 0?t:O(t,Ny(this._providedEnv))}runEnsuring(t){this.addFinalizer(t.finalizer),this._currentChannel=t.channel}addFinalizer(t){this._doneStack.push(new Zse(t))}runSubexecutor(){const t=this._activeSubexecutor;switch(t._tag){case v4:return this.pullFromChild(t.childExecutor,t.parentSubexecutor,t.onEmit,t);case l_:return this.pullFromUpstream(t);case c_:return this.drainChildExecutors(t);case S4:return this._emitted=t.value,this._activeSubexecutor=t.next,d0()}}replaceSubexecutor(t){this._currentChannel=void 0,this._activeSubexecutor=t}finishWithExit(t){const n=Ms(t,{onFailure:r=>this.doneHalt(r),onSuccess:r=>this.doneSucceed(r)});return this._activeSubexecutor=void 0,n===void 0?je:mae(n)}finishSubexecutorWithCloseEffect(t,...n){this.addFinalizer(()=>O(n,Ji(i=>O(at(()=>i(t)),ce(s=>s!==void 0?s:je)),{discard:!0})));const r=O(t,Ms({onFailure:i=>this.doneHalt(i),onSuccess:i=>this.doneSucceed(i)}));return this._activeSubexecutor=void 0,r}applyUpstreamPullStrategy(t,n,r){switch(r._tag){case ZP:{const i=!t||n.some(s=>s!==void 0);return[r.emitSeparator,i?[void 0,...n]:n]}case eae:{const i=!t||n.some(s=>s!==void 0);return[r.emitSeparator,i?[...n,void 0]:n]}}}pullFromChild(t,n,r,i){return h0(t,ge,s=>{const a=r(s);switch(a._tag){case YP:break;case Yse:{this.finishWithDoneValue(t,n,a.value);break}case Jse:{const o=n.enqueuePullFromChild(i);this.replaceSubexecutor(o);break}}this._activeSubexecutor=new m0(s,this._activeSubexecutor)},Ms({onFailure:s=>{const a=this.handleSubexecutorFailure(t,n,s);return a===void 0?void 0:jR(a)},onSuccess:s=>{this.finishWithDoneValue(t,n,s)}}))}finishWithDoneValue(t,n,r){const i=n;switch(i._tag){case l_:{const s=new Po(i.upstreamExecutor,i.createChild,i.lastDone!==void 0?i.combineChildResults(i.lastDone,r):r,i.activeChildExecutors,i.combineChildResults,i.combineWithChildResult,i.onPull,i.onEmit);this._closeLastSubstream=t.close(br(r)),this.replaceSubexecutor(s);break}case c_:{const s=new Ic(i.upstreamExecutor,i.lastDone!==void 0?i.combineChildResults(i.lastDone,r):r,i.activeChildExecutors,i.upstreamDone,i.combineChildResults,i.combineWithChildResult,i.onPull);this._closeLastSubstream=t.close(br(r)),this.replaceSubexecutor(s);break}}}handleSubexecutorFailure(t,n,r){return this.finishSubexecutorWithCloseEffect(On(r),i=>n.close(i),i=>t.close(i))}pullFromUpstream(t){if(t.activeChildExecutors.length===0)return this.performPullFromUpstream(t);const n=t.activeChildExecutors[0],r=new Po(t.upstreamExecutor,t.createChild,t.lastDone,t.activeChildExecutors.slice(1),t.combineChildResults,t.combineWithChildResult,t.onPull,t.onEmit);if(n===void 0)return this.performPullFromUpstream(r);this.replaceSubexecutor(new cp(n.childExecutor,r,n.onEmit))}performPullFromUpstream(t){return h0(t.upstreamExecutor,n=>{const r=this._closeLastSubstream===void 0?je:this._closeLastSubstream;return this._closeLastSubstream=void 0,O(this._executeCloseLastSubstream(r),yn(n))},n=>{if(this._closeLastSubstream!==void 0){const a=this._closeLastSubstream;return this._closeLastSubstream=void 0,O(this._executeCloseLastSubstream(a),Je(()=>{const o=new qo(t.createChild(n),this._providedEnv,this._executeCloseLastSubstream);o._input=this._input;const[l,c]=this.applyUpstreamPullStrategy(!1,t.activeChildExecutors,t.onPull(FR(n)));this._activeSubexecutor=new cp(o,new Po(t.upstreamExecutor,t.createChild,t.lastDone,c,t.combineChildResults,t.combineWithChildResult,t.onPull,t.onEmit),t.onEmit),dt(l)&&(this._activeSubexecutor=new m0(l.value,this._activeSubexecutor))}))}const r=new qo(t.createChild(n),this._providedEnv,this._executeCloseLastSubstream);r._input=this._input;const[i,s]=this.applyUpstreamPullStrategy(!1,t.activeChildExecutors,t.onPull(FR(n)));this._activeSubexecutor=new cp(r,new Po(t.upstreamExecutor,t.createChild,t.lastDone,s,t.combineChildResults,t.combineWithChildResult,t.onPull,t.onEmit),t.onEmit),dt(i)&&(this._activeSubexecutor=new m0(i.value,this._activeSubexecutor))},n=>{if(t.activeChildExecutors.some(s=>s!==void 0)){const s=new Ic(t.upstreamExecutor,t.lastDone,[void 0,...t.activeChildExecutors],t.upstreamExecutor.getDone(),t.combineChildResults,t.combineWithChildResult,t.onPull);if(this._closeLastSubstream!==void 0){const a=this._closeLastSubstream;return this._closeLastSubstream=void 0,O(this._executeCloseLastSubstream(a),Je(()=>this.replaceSubexecutor(s)))}this.replaceSubexecutor(s);return}const r=this._closeLastSubstream,i=this.finishSubexecutorWithCloseEffect(O(n,HZ(s=>t.combineWithChildResult(t.lastDone,s))),()=>r,s=>t.upstreamExecutor.close(s));return i===void 0?void 0:jR(i)})}drainChildExecutors(t){if(t.activeChildExecutors.length===0){const s=this._closeLastSubstream;return s!==void 0&&this.addFinalizer(()=>yt(s)),this.finishSubexecutorWithCloseEffect(t.upstreamDone,()=>s,a=>t.upstreamExecutor.close(a))}const n=t.activeChildExecutors[0],r=t.activeChildExecutors.slice(1);if(n===void 0){const[s,a]=this.applyUpstreamPullStrategy(!0,r,t.onPull(Sae(r.reduce((o,l)=>l!==void 0?o+1:o,0))));return this.replaceSubexecutor(new Ic(t.upstreamExecutor,t.lastDone,a,t.upstreamDone,t.combineChildResults,t.combineWithChildResult,t.onPull)),dt(s)?(this._emitted=s.value,d0()):void 0}const i=new Ic(t.upstreamExecutor,t.lastDone,r,t.upstreamDone,t.combineChildResults,t.combineWithChildResult,t.onPull);this.replaceSubexecutor(new cp(n.childExecutor,i,n.onEmit))}}const p0=e=>e!==void 0?e:je,g0=(e,t)=>O(Ji(e,n=>Sn(n(t))),Je(n=>O(PZ(n),lt(()=>ME))),ce(n=>Rt(()=>n))),cC=(e,t,n)=>{const r=[e],i=()=>{const s=r.pop();if(s===void 0||s.upstream===void 0)return Die("Unexpected end of input for channel execution");const a=s.upstream.run();switch(a._tag){case Sm:{const o=s.onEmit(s.upstream.getEmit());return r.length===0?o===void 0?Rt(t):O(o,pi({onFailure:n,onSuccess:t})):o===void 0?Rt(()=>i()):O(o,pi({onFailure:n,onSuccess:()=>i()}))}case vm:{const o=s.onDone(s.upstream.getDone());return r.length===0?o===void 0?Rt(t):O(o,pi({onFailure:n,onSuccess:t})):o===void 0?Rt(()=>i()):O(o,pi({onFailure:n,onSuccess:()=>i()}))}case gf:return r.push(s),O(s.onEffect(a.effect),WE(o=>Rt(()=>{const l=s.onDone(On(o));return l===void 0?je:l})),pi({onFailure:n,onSuccess:()=>i()}));case wm:return r.push(s),r.push(a),Rt(()=>i())}};return i()},wae=E(2,(e,t)=>{const n=(r,i,s)=>Pie(at(()=>new qo(e,void 0,ge)),a=>Rt(()=>eg(a.run(),a).pipe(DP(r),yn(Fn(r)),nC(Fn(i)))),(a,o)=>{const l=a.close(o);return l===void 0?je:$P(l,c=>Ty(s,bi(c)))});return Ry(r=>Nie([iP(t,uy),Ui(),Ui()]).pipe(ce(([i,s,a])=>r(n(s,a,i)).pipe(il(t),ce(o=>t.addFinalizer(l=>{const c=RE(l)?yne(l.cause):void 0;return e_(s).pipe(ce(f=>f?Ns(a,void 0).pipe(yn(lP(o)),yn(xR(o))):Ns(a,void 0).pipe(yn(c&&Kk(c)>0?qE(o,uY(c)):Ua(o)),yn(xR(o)))))}).pipe(yn(r(Fn(s)))))))))}),eg=(e,t)=>{const n=e;switch(n._tag){case gf:return O(n.effect,ce(()=>eg(t.run(),t)));case Sm:return eg(t.run(),t);case vm:return Rt(()=>t.getDone());case wm:return cC(n,()=>eg(t.run(),t),bi)}},xae="Done",_ae="Await",kae="effect/ChannelMergeDecision",Eae=Symbol.for(kae),Cae={[Eae]:{_R:e=>e,_E0:e=>e,_Z0:e=>e,_E:e=>e,_Z:e=>e}},PR=e=>{const t=Object.create(Cae);return t._tag=_ae,t.f=e,t},x4="BothRunning",_4="LeftDone",k4="RightDone",Tae="effect/ChannelMergeState",UR=Symbol.for(Tae),uC={[UR]:UR},y0=(e,t)=>{const n=Object.create(uC);return n._tag=x4,n.left=e,n.right=t,n},BR=e=>{const t=Object.create(uC);return t._tag=_4,t.f=e,t},HR=e=>{const t=Object.create(uC);return t._tag=k4,t.f=e,t},E4="BackPressure",C4="BufferSliding",Aae="effect/ChannelMergeStrategy",qR=Symbol.for(Aae),T4={[qR]:qR},Oae=e=>{const t=Object.create(T4);return t._tag=E4,t},Rae=e=>{const t=Object.create(T4);return t._tag=C4,t},Mae=E(2,(e,{onBackPressure:t,onBufferSliding:n})=>{switch(e._tag){case E4:return t();case C4:return n()}}),hc="Empty",sd="Emit",ad="Error",od="Done",A4=e=>({_tag:hc,notifyProducer:e}),b0=e=>({_tag:sd,notifyConsumers:e}),Nae=e=>({_tag:ad,cause:e}),Dae=e=>({_tag:od,done:e});class zae{constructor(t){g(this,"ref");this.ref=t}awaitRead(){return dc(jf(this.ref,t=>t._tag===hc?[Fn(t.notifyProducer),t]:[je,t]))}get close(){return Bie(t=>this.error(X3(t)))}done(t){return dc(jf(this.ref,n=>{switch(n._tag){case hc:return[Fn(n.notifyProducer),n];case sd:return[Ji(n.notifyConsumers,r=>Ns(r,me(t)),{discard:!0}),Dae(t)];case ad:return[jo,n];case od:return[jo,n]}}))}emit(t){return ce(Ui(),n=>dc(jf(this.ref,r=>{switch(r._tag){case hc:return[Fn(r.notifyProducer),r];case sd:{const i=r.notifyConsumers[0],s=r.notifyConsumers.slice(1);if(i!==void 0)return[Ns(i,de(t)),s.length===0?A4(n):b0(s)];throw new Error("Bug: Channel.SingleProducerAsyncInput.emit - Queue was empty! please report an issue at https://github.com/Effect-TS/effect/issues")}case ad:return[jo,r];case od:return[jo,r]}})))}error(t){return dc(jf(this.ref,n=>{switch(n._tag){case hc:return[Fn(n.notifyProducer),n];case sd:return[Ji(n.notifyConsumers,r=>wie(r,t),{discard:!0}),Nae(t)];case ad:return[jo,n];case od:return[jo,n]}}))}get take(){return this.takeWith(t=>On(wne(t,me)),t=>br(t),t=>by(de(t)))}takeWith(t,n,r){return ce(Ui(),i=>dc(jf(this.ref,s=>{switch(s._tag){case hc:return[yn(Ns(s.notifyProducer,void 0),s_(Fn(i),{onFailure:t,onSuccess:tr({onLeft:r,onRight:n})})),b0([i])];case sd:return[s_(Fn(i),{onFailure:t,onSuccess:tr({onLeft:r,onRight:n})}),b0([...s.notifyConsumers,i])];case ad:return[yt(t(s.cause)),s];case od:return[yt(r(s.done)),s]}})))}}const O4=()=>O(Ui(),ce(e=>TE(A4(e))),Je(e=>new zae(e))),u_=E(2,(e,t)=>cae(e,t,()=>{},()=>{})),Iae=e=>{const t=pf({onInput:()=>t,onFailure:Cr,onDone:b4});return vi(e,t)},R4=E(2,(e,t)=>uae(e,()=>t)),$ae=e=>Ht(e,ge),fC=e=>Ha(e.takeWith(Cr,t=>Ht(_n(t),()=>fC(e)),b4)),M4=E(2,(e,t)=>Ht(e,n=>lC(()=>t(n)))),N4=E(2,(e,t)=>{const n=y4({onInput:r=>Ht(_n(t(r)),()=>n),onFailure:aC,onDone:Th});return vi(e,n)}),Lae=e=>t=>jae(e)(t,pu),jae=({bufferSize:e=16,concurrency:t,mergeStrategy:n=Oae()})=>(r,i)=>$4(s=>Qc(function*(){const a=t==="unbounded"?Number.MAX_SAFE_INTEGER:t,o=yield*O4(),l=fC(o),c=yield*GP(e);yield*Ty(s,Iy(c));const f=yield*Hse();yield*Ty(s,Iy(f));const u=yield*TE(V()),d=yield*Ui(),h=(yield*Jie(a)).withPermits,p=yield*Wc(vi(l,r),s);function b(m){return m.pipe(ce(tr({onLeft:y=>yt(X(y)),onRight:y=>c0(nc(c,yt(de(y))),V())})),DR({until:y=>dt(y)}),ce(y=>uZ(u,Dt({onNone:()=>X(y.value),onSome:v=>X(i(v,y.value))}))),WE(y=>ky(y)?bi(y):nc(c,bi(y)).pipe(yn(Ns(d,void 0)),ZE)))}yield*p.pipe(pi({onFailure:m=>nc(c,bi(m)).pipe(yn(yt(!1))),onSuccess:tr({onLeft:m=>zP(mi(Fn(d)),mi(h(a)(je)),{onSelfDone:(y,v)=>c0(Ua(v),!1),onOtherDone:(y,v)=>yn(Ua(v),oZ(u).pipe(ce(Dt({onNone:()=>nc(c,yt(me(m))),onSome:_=>nc(c,yt(me(i(_,m))))})),c0(!1)))}),onRight:m=>Mae(n,{onBackPressure:()=>Qc(function*(){const y=yield*Ui(),v=i_(C=>Wc(vi(l,m),C).pipe(ce(k=>u0(Sn(b(k)),Sn(mi(Fn(d))))),ce(ge)));return yield*Ns(y,void 0).pipe(yn(v),h(1),il(s)),yield*Fn(y),!(yield*e_(d))}),onBufferSliding:()=>Qc(function*(){const y=yield*Ui(),v=yield*Ui(),_=yield*qse(f);yield*$R(f).pipe(ce(A=>Ns(A,void 0)),Vie(()=>_>=a)),yield*nc(f,y);const C=i_(A=>Wc(vi(l,m),A).pipe(ce(N=>Sn(b(N)).pipe(u0(Sn(mi(Fn(d)))),u0(Sn(mi(Fn(y)))))),ce(ge)));return yield*Ns(v,void 0).pipe(yn(C),h(1),il(s)),yield*Fn(v),!(yield*e_(d))})})})}),DR({while:m=>m}),il(s));const S=O($R(c),dc,s_({onFailure:Cr,onSuccess:tr({onLeft:Th,onRight:m=>Ht(_n(m),()=>S)})}),Ha);return g4(S,o)})),D4=E(3,(e,t,n)=>Lae(n)(N4(e,t))),Fae=E(2,(e,t)=>{function n(r){return Qc(function*(){const i=yield*O4(),s=fC(i),a=yield*Wc(vi(s,e),r),o=yield*Wc(vi(s,t.other),r);function l(f,u,d){return(h,p,b)=>{function S(m){const y=m;return y._tag===xae?yt(jn(yn(Ua(u),y.effect))):Je(lP(u),Ms({onFailure:v=>jn(y.f(On(v))),onSuccess:tr({onLeft:v=>jn(y.f(br(v))),onRight:v=>dC(_n(v),c(b(y.f)))})}))}return Ms(f,{onFailure:m=>S(h(On(m))),onSuccess:tr({onLeft:m=>S(h(br(m))),onRight:m=>yt(Ht(_n(m),()=>Ht(jn(il(mi(d),r)),y=>c(p(y,u)))))})})}}function c(f){switch(f._tag){case x4:{const u=mi(_R(f.left)),d=mi(_R(f.right));return Ha(zP(u,d,{onSelfDone:(h,p)=>yn(Ua(p),l(h,f.right,a)(t.onSelfDone,y0,b=>BR(b))),onOtherDone:(h,p)=>yn(Ua(p),l(h,f.left,o)(t.onOtherDone,(b,S)=>y0(S,b),b=>HR(b)))}))}case _4:return Ha(Je(Sn(o),Ms({onFailure:u=>jn(f.f(On(u))),onSuccess:tr({onLeft:u=>jn(f.f(br(u))),onRight:u=>Ht(_n(u),()=>c(BR(f.f)))})})));case k4:return Ha(Je(Sn(a),Ms({onFailure:u=>jn(f.f(On(u))),onSuccess:tr({onLeft:u=>jn(f.f(br(u))),onRight:u=>Ht(_n(u),()=>c(HR(f.f)))})})))}}return jn(Oy(f=>{const u=Oy(p=>(p.transferChildren(f.scope()),je)),d=mi(a).pipe(Dc(u),il(r)),h=mi(o).pipe(Dc(u),il(r));return _v(d,h,(p,b)=>y0(p,b))})).pipe(Ht(c),g4(i))})}return $4(n)}),Pae=E(2,(e,t)=>oC(()=>{let n;const r=y4({onInput:s=>Ht(_n(s),()=>r),onFailure:s=>(n=Kae(s),Cr(Qx(n))),onDone:Th}),i=pf({onInput:s=>O(_n(s),Ht(()=>i)),onFailure:s=>pne(s)&&Gae(s.defect)&&oe(s.defect,n)?aC(s.defect.error):Cr(s),onDone:Th});return vi(vi(vi(e,r),t),i)})),Uae=e=>i_(t=>wae(e,t)),z4=e=>Uae(Iae(e)),I4=e=>Ha(Ry(t=>Je(sP(),n=>lae($P(t(ere(e,n)),r=>Ay(n,On(r))),(r,i)=>Ay(n,i))))),Bae=e=>qae(Je(xv,t=>Ht(jn(e(t)),_n))),Hae=e=>ce(xv,t=>Wc(e,t)),Wc=E(2,(e,t)=>Dy(at(()=>new qo(e,void 0,ge)),bm()).pipe(IP(([n,r])=>Zne(t,i=>{const s=n.close(i);return s!==void 0?Ny(s,r):je})),id,Je(([n])=>Rt(()=>f_(n.run(),n))))),f_=(e,t)=>{const n=e;switch(n._tag){case vm:return Ms(t.getDone(),{onFailure:bi,onSuccess:r=>yt(me(r))});case Sm:return yt(de(t.getEmit()));case gf:return O(n.effect,ce(()=>f_(t.run(),t)));case wm:return cC(n,()=>f_(t.run(),t),r=>bi(r))}},Ha=e=>$ae(jn(e)),qae=e=>p4(I4(e),(t,n)=>t,(t,n)=>t),$4=e=>p4(Bae(e),(t,n)=>t,(t,n)=>t),L4=e=>j4(0,e.length,e),j4=(e,t,n)=>e===t?Zs:O(_n(O(n,ja(e))),Ht(()=>j4(e+1,t,n))),Vae=E(e=>m4(e[1]),(e,t,n)=>n!=null&&n.concurrent?Fae(e,{other:t,onSelfDone:r=>PR(i=>Rt(()=>aR(r,i))),onOtherDone:r=>PR(i=>Rt(()=>aR(i,r)))}):Ht(e,r=>M4(t,i=>[r,i]))),dC=E(e=>m4(e[1]),(e,t,n)=>n!=null&&n.concurrent?M4(Vae(e,t,{concurrent:!0}),r=>r[1]):Ht(e,()=>t)),d_=Symbol.for("effect/Channel/ChannelException"),Kae=e=>({_tag:"ChannelException",[d_]:d_,error:e}),Gae=e=>ue(e,d_),Yae=Symbol.for("effect/Sink"),Jae={_A:e=>e,_In:e=>e,_L:e=>e,_E:e=>e,_R:e=>e};var HD;HD=Yae;class hC{constructor(t){g(this,"channel");g(this,HD,Jae);this.channel=t}pipe(){return ie(this,arguments)}}const Qae=e=>{const t=pf({onInput:n=>O(jn(Ji(n,r=>e(r),{discard:!0})),Ht(()=>t)),onFailure:Cr,onDone:()=>Zs});return new hC(t)},Xae=e=>{const t=pf({onInput:n=>O(jn(e(n)),Ht(()=>t)),onFailure:Cr,onDone:()=>Zs});return new hC(t)},Wae=e=>new hC(jn(e)),F4=e=>yo(e)?F4(Wae(e)):e.channel,Zae=()=>ss(V()),eoe=e=>eC(bi(e),X),toe="effect/Stream",mC=Symbol.for(toe),noe={_R:e=>e,_E:e=>e,_A:e=>e};var qD;qD=mC;class ki{constructor(t){g(this,"channel");g(this,qD,noe);this.channel=t}pipe(){return ie(this,arguments)}}const Tv=e=>ue(e,mC)||yo(e),roe=4096,P4=E(2,(e,t)=>new ki(O(Yr(e),R4(t)))),ioe=e=>H4(ss(X(e))),soe=e=>B4(bi(e)),aoe=E(2,(e,t)=>doe(e,zk(t))),U4=E(e=>Tv(e[0]),(e,t,n)=>{const r=(n==null?void 0:n.bufferSize)??16;return n!=null&&n.switch?VR(n==null?void 0:n.concurrency,()=>KR(e,1,r,t),i=>KR(e,i,r,t)):VR(n==null?void 0:n.concurrency,()=>new ki(u_(Yr(e),i=>O(i,LK(s=>Yr(t(s))),FK(Zs,(s,a)=>O(s,dC(a)))))),i=>new ki(O(Yr(e),u_(L4),D4(s=>Yr(t(s)),n))))}),VR=(e,t,n)=>{switch(e){case void 0:return t();case"unbounded":return n(Number.MAX_SAFE_INTEGER);default:return e>1?n(e):t()}},KR=E(4,(e,t,n,r)=>new ki(O(Yr(e),u_(L4),D4(i=>Yr(r(i)),{concurrency:t,mergeStrategy:Rae(),bufferSize:n})))),ooe=E(e=>Tv(e[0]),(e,t)=>U4(e,ge,t)),loe=e=>new ki(e),Yr=e=>{if("channel"in e)return e.channel;if(yo(e))return Yr(B4(e));throw new TypeError("Expected a Stream.")},coe=e=>new ki(jb(e)?Zs:_n(e)),B4=e=>O(e,eC(X),H4),H4=e=>new ki(Ha(Gie(e,{onFailure:Dt({onNone:()=>Zs,onSome:aC}),onSuccess:t=>_n(Kt(t))}))),uoe=(e,t)=>O(Gse(e,1,(t==null?void 0:t.maxChunkSize)??roe),WE(n=>O(Vse(e),ce(r=>r&&ky(n)?Zae():eoe(n)))),q4,t!=null&&t.shutdown?P4(Iy(e)):ge),foe=(...e)=>{const t=e.length===1?e[0].evaluate:e[0],n=e.length===1?e[0].onError:e[1],r=e.length===1?e[0].releaseLockOnEnd===!0:!1;return G4(Je(My(at(()=>t().getReader()),i=>r?at(()=>i.releaseLock()):zie(()=>i.cancel())),i=>hoe(ce(Dd({try:()=>i.read(),catch:s=>X(n(s))}),({done:s,value:a})=>s?ss(V()):yt(a)))))},doe=E(2,(e,t)=>new ki(O(Yr(e),N4(t)))),q4=e=>Soe(e,t=>O(Je(t,n=>X([n,t])),RP(Dt({onNone:()=>yt(V()),onSome:ss})))),hoe=e=>q4(O(e,Je(Kt))),V4=E(2,(e,t)=>Yr(e).pipe(Pae(F4(t)),z4)),moe=E(2,(e,t)=>V4(e,Qae(t))),poe=E(2,(e,t)=>V4(e,Xae(t))),goe=e=>new ki(R4(I4(O(e,Je(Kt))),je)),yoe=e=>coe(Kt(e)),K4=e=>new ki(oC(()=>Yr(e()))),boe=E(e=>Tv(e[0]),(e,t)=>Je(bm(),n=>voe(e,n,t))),voe=E(e=>Tv(e[0]),(e,t,n)=>{const r=kv(t);let i,s;const a=Qie(!1);return new ReadableStream({start(o){s=r(poe(e,l=>l.length===0?je:a.whenOpen(at(()=>{a.unsafeClose();for(const c of l)o.enqueue(c);i(),i=void 0})))),s.addObserver(l=>{try{l._tag==="Failure"?o.error(W3(l.cause)):o.close()}catch{}})},pull(){return new Promise(o=>{i=o,Wr(a.open)})},cancel(){if(s)return Xie(ZE(Ua(s)))}},n==null?void 0:n.strategy)}),Soe=(e,t)=>K4(()=>{const n=r=>Ha(Je(t(r),Dt({onNone:()=>Zs,onSome:([i,s])=>Ht(_n(i),()=>n(s))})));return new ki(n(e))}),G4=e=>ooe(goe(e)),GR=Symbol.for("effect/Mailbox"),YR=Symbol.for("effect/Mailbox/ReadonlyMailbox"),Uo=tn(),JR=Ze(Uo),up=Ze(!1),fp=Ze(!0),QR=[Uo,!0];var VD,KD;class woe extends df{constructor(n,r,i){super();g(this,"scheduler");g(this,"capacity");g(this,"strategy");g(this,KD,GR);g(this,VD,YR);g(this,"state",{_tag:"Open",takers:new Set,offers:new Set,awaiters:new Set});g(this,"messages",[]);g(this,"messagesChunk",tn());g(this,"shutdown",K(()=>{if(this.state._tag==="Done")return!0;this.messages=[],this.messagesChunk=Uo;const n=this.state.offers;if(this.finalize(this.state._tag==="Open"?An:this.state.exit),n.size>0){for(const r of n)r._tag==="Single"?r.resume(up):r.resume(Ze(Ln(r.remaining.slice(r.offset))));n.clear()}return!0}));g(this,"end",this.done(An));g(this,"clear",Te(()=>{if(this.state._tag==="Done")return Gp(this.state.exit,Uo);const n=this.unsafeTakeAll();return this.releaseCapacity(),ee(n)}));g(this,"takeAll",Te(()=>{if(this.state._tag==="Done")return Gp(this.state.exit,QR);const n=this.unsafeTakeAll();return n.length===0?Et(this.awaitTake,this.takeAll):ee([n,this.releaseCapacity()])}));g(this,"take",Te(()=>this.unsafeTake()??Et(this.awaitTake,this.take)));g(this,"await",Ea(n=>this.state._tag==="Done"?n(this.state.exit):(this.state.awaiters.add(n),K(()=>{this.state._tag!=="Done"&&this.state.awaiters.delete(n)}))));g(this,"size",K(()=>this.unsafeSize()));g(this,"awaitTake",Ea(n=>this.state._tag==="Done"?n(this.state.exit):(this.state.takers.add(n),K(()=>{this.state._tag!=="Done"&&this.state.takers.delete(n)}))));g(this,"scheduleRunning",!1);g(this,"releaseTaker",()=>{if(this.scheduleRunning=!1,this.state._tag!=="Done"&&this.state.takers.size!==0){for(const n of this.state.takers)if(this.state.takers.delete(n),n(An),this.messages.length+this.messagesChunk.length===0)break}});this.scheduler=n,this.capacity=r,this.strategy=i}offer(n){return Te(()=>{if(this.state._tag!=="Open")return up;if(this.messages.length+this.messagesChunk.length>=this.capacity)switch(this.strategy){case"dropping":return up;case"suspend":return this.capacity<=0&&this.state.takers.size>0?(this.messages.push(n),this.releaseTaker(),fp):this.offerRemainingSingle(n);case"sliding":return this.unsafeTake(),this.messages.push(n),fp}return this.messages.push(n),this.scheduleReleaseTaker(),fp})}unsafeOffer(n){return this.state._tag!=="Open"?!1:this.messages.length+this.messagesChunk.length>=this.capacity?this.strategy==="sliding"?(this.unsafeTake(),this.messages.push(n),!0):this.capacity<=0&&this.state.takers.size>0?(this.messages.push(n),this.releaseTaker(),!0):!1:(this.messages.push(n),this.scheduleReleaseTaker(),!0)}offerAll(n){return Te(()=>{if(this.state._tag!=="Open")return ee(qs(n));const r=this.unsafeOfferAllArray(n);return r.length===0?JR:this.strategy==="dropping"?ee(Ln(r)):this.offerRemainingArray(r)})}unsafeOfferAll(n){return Ln(this.unsafeOfferAllArray(n))}unsafeOfferAllArray(n){if(this.state._tag!=="Open")return Ye(n);if(this.capacity===Number.POSITIVE_INFINITY||this.strategy==="sliding")return this.messages.length>0&&(this.messagesChunk=Bt(this.messagesChunk,Ln(this.messages))),this.strategy==="sliding"?this.messagesChunk=this.messagesChunk.pipe(Bt(qs(n)),jK(this.capacity)):Lb(n)?this.messagesChunk=Bt(this.messagesChunk,n):this.messages=Ye(n),this.scheduleReleaseTaker(),[];const r=this.capacity<=0?this.state.takers.size:this.capacity-this.messages.length-this.messagesChunk.length;if(r===0)return Ye(n);const i=[];let s=0;for(const a of n)s<r?this.messages.push(a):i.push(a),s++;return this.scheduleReleaseTaker(),i}fail(n){return this.done(bh(n))}failCause(n){return this.done(Xe(n))}unsafeDone(n){return this.state._tag!=="Open"?!1:this.state.offers.size===0&&this.messages.length===0&&this.messagesChunk.length===0?(this.finalize(n),!0):(this.state={...this.state,_tag:"Closing",exit:n},!0)}done(n){return K(()=>this.unsafeDone(n))}takeN(n){return Te(()=>{if(this.state._tag==="Done")return Gp(this.state.exit,QR);if(n<=0)return ee([Uo,!1]);n=Math.min(n,this.capacity);let r;if(n<=this.messagesChunk.length)r=Zg(this.messagesChunk,n),this.messagesChunk=ka(this.messagesChunk,n);else if(n<=this.messages.length+this.messagesChunk.length)this.messagesChunk=Bt(this.messagesChunk,Ln(this.messages)),this.messages=[],r=Zg(this.messagesChunk,n),this.messagesChunk=ka(this.messagesChunk,n);else return Et(this.awaitTake,this.takeN(n));return ee([r,this.releaseCapacity()])})}unsafeTake(){if(this.state._tag==="Done")return _F(this.state.exit,bh(new hf));let n;if(this.messagesChunk.length>0)n=$k(this.messagesChunk),this.messagesChunk=ka(this.messagesChunk,1);else if(this.messages.length>0)n=this.messages[0],this.messagesChunk=ka(Ln(this.messages),1),this.messages=[];else return this.capacity<=0&&this.state.offers.size>0?(this.capacity=1,this.releaseCapacity(),this.capacity=0,this.messages.length>0?Ze(this.messages.pop()):void 0):void 0;return this.releaseCapacity(),Ze(n)}unsafeSize(){const n=this.messages.length+this.messagesChunk.length;return this.state._tag==="Done"?V():X(n)}commit(){return this.takeAll}pipe(){return ie(this,arguments)}toJSON(){return{_id:"effect/Mailbox",state:this.state._tag,size:this.unsafeSize().toJSON()}}toString(){return it(this)}[(KD=GR,VD=YR,Pe)](){return it(this)}offerRemainingSingle(n){return Ea(r=>{if(this.state._tag!=="Open")return r(up);const i={_tag:"Single",message:n,resume:r};return this.state.offers.add(i),K(()=>{this.state._tag==="Open"&&this.state.offers.delete(i)})})}offerRemainingArray(n){return Ea(r=>{if(this.state._tag!=="Open")return r(Ze(Ln(n)));const i={_tag:"Array",remaining:n,offset:0,resume:r};return this.state.offers.add(i),K(()=>{this.state._tag==="Open"&&this.state.offers.delete(i)})})}releaseCapacity(){if(this.state._tag==="Done")return this.state.exit._tag==="Success";if(this.state.offers.size===0)return this.state._tag==="Closing"&&this.messages.length===0&&this.messagesChunk.length===0?(this.finalize(this.state.exit),this.state.exit._tag==="Success"):!1;let n=this.capacity-this.messages.length-this.messagesChunk.length;for(const r of this.state.offers){if(n===0)return!1;if(r._tag==="Single")this.messages.push(r.message),n--,r.resume(fp),this.state.offers.delete(r);else{for(;r.offset<r.remaining.length;r.offset++){if(n===0)return!1;this.messages.push(r.remaining[r.offset]),n--}r.resume(JR),this.state.offers.delete(r)}}return!1}scheduleReleaseTaker(){this.scheduleRunning||(this.scheduleRunning=!0,this.scheduler.scheduleTask(this.releaseTaker,0))}unsafeTakeAll(){if(this.messagesChunk.length>0){const n=this.messages.length>0?Bt(this.messagesChunk,Ln(this.messages)):this.messagesChunk;return this.messagesChunk=Uo,this.messages=[],n}else if(this.messages.length>0){const n=Ln(this.messages);return this.messages=[],n}else if(this.state._tag!=="Done"&&this.state.offers.size>0)return this.capacity=1,this.releaseCapacity(),this.capacity=0,Kt(this.messages.pop());return Uo}finalize(n){if(this.state._tag==="Done")return;const r=this.state;this.state={_tag:"Done",exit:n};for(const i of r.takers)i(n);r.takers.clear();for(const i of r.awaiters)i(n);r.awaiters.clear()}}const xoe=e=>Be(t=>ee(new woe(t.currentScheduler,typeof e=="number"?e:(e==null?void 0:e.capacity)??Number.POSITIVE_INFINITY,typeof e=="number"?"suspend":(e==null?void 0:e.strategy)??"suspend"))),_oe=e=>{const t=Ht(e.takeAll,([n,r])=>r?n.length===0?Zs:_n(n):dC(_n(n),t));return t},koe=e=>loe(_oe(e)),Eoe=xoe,Coe=koe,v0=mC,Y4=P4,Toe=ioe,Aoe=soe,Ooe=aoe,Roe=U4,J4=Yr,Moe=uoe,Noe=foe,Doe=moe,zoe=yoe,Ioe=K4,$oe=boe,Q4=G4;class xm extends Ak("@effect/experimental/Reactivity")(){}const Loe=at(()=>{const e=new Map,t=o=>{if(Array.isArray(o))for(let l=0;l<o.length;l++){const c=e.get(h_(o[l]));if(c!==void 0)for(const f of c)f()}else{const l=o;for(const c in l){const f=W4(c,l[c]);for(let d=0;d<f.length;d++){const h=e.get(f[d]);if(h!==void 0)for(const p of h)p()}const u=e.get(c);if(u!==void 0)for(const d of u)d()}}},n=o=>at(()=>t(o)),r=(o,l)=>nC(l,n(o)),i=(o,l)=>{const c=Array.isArray(o)?o.map(h_):Foe(o);for(let f=0;f<c.length;f++){let u=e.get(c[f]);u===void 0&&(u=new Set,e.set(c[f],u)),u.add(l)}return()=>{for(let f=0;f<c.length;f++){const u=e.get(c[f]);u.delete(l),u.size===0&&e.delete(c[f])}}},s=(o,l)=>Qc(function*(){const c=yield*xv,f=yield*Eoe(),u=yield*ase();let d=!1,h=!1;const p=m=>{m._tag==="Failure"?f.unsafeDone(On(m.cause)):f.unsafeOffer(m.value),h?(h=!1,u(l).addObserver(p)):d=!1};function b(){if(d){h=!0;return}d=!0,u(l).addObserver(p)}const S=i(o,b);return yield*Ty(c,at(S)),b(),f}),a=(o,l)=>s(o,l).pipe(Je(Coe),Q4);return xm.of({mutation:r,query:s,stream:a,unsafeInvalidate:t,invalidate:n,unsafeRegister:i})}),X4=E(2,(e,t)=>ce(xm,n=>n.mutation(t,e))),joe=e=>ce(xm,t=>t.invalidate(e)),S0=FP(xm,Loe);function h_(e){return typeof e=="string"?e:re(e)}const W4=(e,t)=>{const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=`${e}:${h_(t[r])}`;return n},Foe=e=>{const t=[];for(const n in e){t.push(n);for(const r of W4(n,e[n]))t.push(r)}return t},Z4="effect/Redacted",tg=pe("effect/Redacted/redactedRegistry",()=>new WeakMap),eU=Symbol.for(Z4),Poe={[eU]:{_A:e=>e},pipe(){return ie(this,arguments)},toString(){return"<redacted>"},toJSON(){return"<redacted>"},[Pe](){return"<redacted>"},[be](){return O(re(Z4),Se(re(tg.get(this))),tt(this))},[ve](e){return Uoe(e)&&oe(tg.get(this),tg.get(e))}},Uoe=e=>ue(e,eU),Boe=e=>{const t=Object.create(Poe);return tg.set(t,e),t},tU=(e,t)=>{switch(t._tag){case"StringKeyword":case"TemplateLiteral":return Object.keys(e);case"SymbolKeyword":return Object.getOwnPropertySymbols(e);case"Refinement":return tU(e,t.from)}},nU=e=>{let t=!1,n;return()=>(t||(n=e(),t=!0),n)},pC=e=>Array.isArray(e),XR=e=>`[${Rb(e)}]`,rU=e=>pC(e)?e.map(XR).join(""):XR(e),bo=(e,t,n,r)=>{let i=e;return n&&en(n)&&(i+=`
|
|
72
|
+
at path: ${rU(n)}`),t!==void 0&&(i+=`
|
|
73
|
+
details: ${t}`),r&&(i+=`
|
|
74
|
+
schema (${r._tag}): ${r}`),i},iU=(e,t,n)=>bo("Unsupported schema or overlapping types",`cannot extend ${e} with ${t}`,n),Hoe=e=>bo("Unsupported key schema",void 0,void 0,e),qoe=e=>bo("Unsupported literal",`literal value: ${Xs(e)}`),WR=e=>bo("Duplicate index signature",`${e} index signature`),Voe=bo("Unsupported index signature parameter","An index signature parameter type must be `string`, `symbol`, a template literal type or a refinement of the previous types"),Koe=bo("Invalid element","A required element cannot follow an optional element. ts(1257)"),ZR=e=>bo("Duplicate property signature transformation",`Duplicate key ${Xs(e)}`),sU=e=>bo("Duplicate property signature",`Duplicate key ${Xs(e)}`),Goe=Symbol.for("effect/SchemaId/DateFromSelf"),Yoe=Symbol.for("effect/annotation/TypeConstructor"),aU=Symbol.for("effect/annotation/Brand"),Joe=Symbol.for("effect/annotation/SchemaId"),oU=Symbol.for("effect/annotation/Message"),gC=Symbol.for("effect/annotation/MissingMessage"),_m=Symbol.for("effect/annotation/Identifier"),Oi=Symbol.for("effect/annotation/Title"),Zc=Symbol.for("effect/annotation/AutoTitle"),Ul=Symbol.for("effect/annotation/Description"),lU=Symbol.for("effect/annotation/Examples"),cU=Symbol.for("effect/annotation/Default"),uU=Symbol.for("effect/annotation/JSONSchema"),fU=Symbol.for("effect/annotation/Arbitrary"),dU=Symbol.for("effect/annotation/Pretty"),hU=Symbol.for("effect/annotation/Equivalence"),Qoe=Symbol.for("effect/annotation/Documentation"),mU=Symbol.for("effect/annotation/Concurrency"),pU=Symbol.for("effect/annotation/Batching"),gU=Symbol.for("effect/annotation/ParseIssueTitle"),yU=Symbol.for("effect/annotation/ParseOptions"),bU=Symbol.for("effect/annotation/DecodingFallback"),Ly=Symbol.for("effect/annotation/Surrogate"),Xoe=Symbol.for("effect/annotation/StableFilter"),Gn=E(2,(e,t)=>Object.prototype.hasOwnProperty.call(e.annotations,t)?X(e.annotations[t]):V()),vU=Gn(aU),Woe=Gn(oU),Zoe=Gn(gC),SU=Gn(Oi),wU=Gn(Zc),Av=Gn(_m),xU=Gn(Ul),ele=Gn(mU),tle=Gn(pU),nle=Gn(gU),rle=Gn(yU),ile=Gn(bU),_U=Gn(Ly),sle=Gn(Xoe),ale=e=>BL(sle(e),t=>t===!0),kU=Symbol.for("effect/annotation/JSONIdentifier"),ole=Gn(kU),lle=e=>Ki(ole(e),()=>Av(e)),cle=Symbol.for("effect/schema/ParseJson");class Ov{constructor(t,n,r,i={}){g(this,"typeParameters");g(this,"decodeUnknown");g(this,"encodeUnknown");g(this,"annotations");g(this,"_tag","Declaration");this.typeParameters=t,this.decodeUnknown=n,this.encodeUnknown=r,this.annotations=i}toString(){return lt(Wi(this),()=>"<declaration schema>")}toJSON(){return{_tag:this._tag,typeParameters:this.typeParameters.map(t=>t.toJSON()),annotations:zt(this.annotations)}}}const Ri=e=>t=>t._tag===e;let m_=class{constructor(t,n={}){g(this,"literal");g(this,"annotations");g(this,"_tag","Literal");this.literal=t,this.annotations=n}toString(){return lt(Wi(this),()=>Xs(this.literal))}toJSON(){return{_tag:this._tag,literal:Tb(this.literal)?String(this.literal):this.literal,annotations:zt(this.annotations)}}};const zd=Ri("Literal");class ule{constructor(t,n={}){g(this,"symbol");g(this,"annotations");g(this,"_tag","UniqueSymbol");this.symbol=t,this.annotations=n}toString(){return lt(Wi(this),()=>Xs(this.symbol))}toJSON(){return{_tag:this._tag,symbol:String(this.symbol),annotations:zt(this.annotations)}}}class fle{constructor(t={}){g(this,"annotations");g(this,"_tag","UndefinedKeyword");this.annotations=t}toString(){return ea(this)}toJSON(){return{_tag:this._tag,annotations:zt(this.annotations)}}}const p_=new fle({[Oi]:"undefined"});class dle{constructor(t={}){g(this,"annotations");g(this,"_tag","VoidKeyword");this.annotations=t}toString(){return ea(this)}toJSON(){return{_tag:this._tag,annotations:zt(this.annotations)}}}const hle=new dle({[Oi]:"void"}),mle=Ri("VoidKeyword");class ple{constructor(t={}){g(this,"annotations");g(this,"_tag","NeverKeyword");this.annotations=t}toString(){return ea(this)}toJSON(){return{_tag:this._tag,annotations:zt(this.annotations)}}}const yC=new ple({[Oi]:"never"}),gle=Ri("NeverKeyword");class yle{constructor(t={}){g(this,"annotations");g(this,"_tag","UnknownKeyword");this.annotations=t}toString(){return ea(this)}toJSON(){return{_tag:this._tag,annotations:zt(this.annotations)}}}const EU=new yle({[Oi]:"unknown"});class ble{constructor(t={}){g(this,"annotations");g(this,"_tag","AnyKeyword");this.annotations=t}toString(){return ea(this)}toJSON(){return{_tag:this._tag,annotations:zt(this.annotations)}}}const vle=new ble({[Oi]:"any"});class Sle{constructor(t={}){g(this,"annotations");g(this,"_tag","StringKeyword");this.annotations=t}toString(){return ea(this)}toJSON(){return{_tag:this._tag,annotations:zt(this.annotations)}}}const g_=new Sle({[Oi]:"string",[Ul]:"a string"}),y_=Ri("StringKeyword");class wle{constructor(t={}){g(this,"annotations");g(this,"_tag","NumberKeyword");this.annotations=t}toString(){return ea(this)}toJSON(){return{_tag:this._tag,annotations:zt(this.annotations)}}}const b_=new wle({[Oi]:"number",[Ul]:"a number"}),e2=Ri("NumberKeyword");class xle{constructor(t={}){g(this,"annotations");g(this,"_tag","BooleanKeyword");this.annotations=t}toString(){return ea(this)}toJSON(){return{_tag:this._tag,annotations:zt(this.annotations)}}}const v_=new xle({[Oi]:"boolean",[Ul]:"a boolean"}),t2=Ri("BooleanKeyword");class _le{constructor(t={}){g(this,"annotations");g(this,"_tag","SymbolKeyword");this.annotations=t}toString(){return ea(this)}toJSON(){return{_tag:this._tag,annotations:zt(this.annotations)}}}const kle=new _le({[Oi]:"symbol",[Ul]:"a symbol"}),Ele=Ri("SymbolKeyword");let Rv=class{constructor(t,n={}){g(this,"type");g(this,"annotations");this.type=t,this.annotations=n}toJSON(){return{type:this.type.toJSON(),annotations:zt(this.annotations)}}toString(){return String(this.type)}};class yf extends Rv{constructor(n,r,i={}){super(n,i);g(this,"isOptional");this.isOptional=r}toJSON(){return{type:this.type.toJSON(),isOptional:this.isOptional,annotations:zt(this.annotations)}}toString(){return String(this.type)+(this.isOptional?"?":"")}}const CU=e=>e.map(t=>t.type);class bC{constructor(t,n,r,i={}){g(this,"elements");g(this,"rest");g(this,"isReadonly");g(this,"annotations");g(this,"_tag","TupleType");this.elements=t,this.rest=n,this.isReadonly=r,this.annotations=i;let s=!1,a=!1;for(const o of t)if(o.isOptional)s=!0;else if(s){a=!0;break}if(a||s&&n.length>1)throw new Error(Koe)}toString(){return lt(Wi(this),()=>Cle(this))}toJSON(){return{_tag:this._tag,elements:this.elements.map(t=>t.toJSON()),rest:this.rest.map(t=>t.toJSON()),isReadonly:this.isReadonly,annotations:zt(this.annotations)}}}const Cle=e=>{const t=e.elements.map(String).join(", ");return hK(e.rest,{onEmpty:()=>`readonly [${t}]`,onNonEmpty:(n,r)=>{const i=String(n),s=i.includes(" | ")?`(${i})`:i;if(r.length>0){const a=r.map(String).join(", ");return e.elements.length>0?`readonly [${t}, ...${s}[], ${a}]`:`readonly [...${s}[], ${a}]`}else return e.elements.length>0?`readonly [${t}, ...${s}[]]`:`ReadonlyArray<${i}>`}})};class mn extends yf{constructor(n,r,i,s,a){super(r,i,a);g(this,"name");g(this,"isReadonly");this.name=n,this.isReadonly=s}toString(){return(this.isReadonly?"readonly ":"")+String(this.name)+(this.isOptional?"?":"")+": "+this.type}toJSON(){return{name:String(this.name),type:this.type.toJSON(),isOptional:this.isOptional,isReadonly:this.isReadonly,annotations:zt(this.annotations)}}}const TU=e=>{switch(e._tag){case"StringKeyword":case"SymbolKeyword":case"TemplateLiteral":return!0;case"Refinement":return TU(e.from)}return!1};class Mv{constructor(t,n,r){g(this,"type");g(this,"isReadonly");g(this,"parameter");if(this.type=n,this.isReadonly=r,TU(t))this.parameter=t;else throw new Error(Voe)}toString(){return(this.isReadonly?"readonly ":"")+`[x: ${this.parameter}]: ${this.type}`}toJSON(){return{parameter:this.parameter.toJSON(),type:this.type.toJSON(),isReadonly:this.isReadonly}}}class qa{constructor(t,n,r={}){g(this,"annotations");g(this,"_tag","TypeLiteral");g(this,"propertySignatures");g(this,"indexSignatures");this.annotations=r;const i={};for(let a=0;a<t.length;a++){const o=t[a].name;if(Object.prototype.hasOwnProperty.call(i,o))throw new Error(sU(o));i[o]=null}const s={string:!1,symbol:!1};for(let a=0;a<n.length;a++){const o=IU(n[a].parameter);if(y_(o)){if(s.string)throw new Error(WR("string"));s.string=!0}else if(Ele(o)){if(s.symbol)throw new Error(WR("symbol"));s.symbol=!0}}this.propertySignatures=t,this.indexSignatures=n}toString(){return lt(Wi(this),()=>Tle(this))}toJSON(){return{_tag:this._tag,propertySignatures:this.propertySignatures.map(t=>t.toJSON()),indexSignatures:this.indexSignatures.map(t=>t.toJSON()),annotations:zt(this.annotations)}}}const n2=e=>e.map(String).join("; "),Tle=e=>{if(e.propertySignatures.length>0){const t=e.propertySignatures.map(String).join("; ");return e.indexSignatures.length>0?`{ ${t}; ${n2(e.indexSignatures)} }`:`{ ${t} }`}else return e.indexSignatures.length>0?`{ ${n2(e.indexSignatures)} }`:"{}"},r2=Ri("TypeLiteral"),Ale=ch(FL(Ou,e=>{switch(e._tag){case"AnyKeyword":return 0;case"UnknownKeyword":return 1;case"ObjectKeyword":return 2;case"StringKeyword":case"NumberKeyword":case"BooleanKeyword":case"BigIntKeyword":case"SymbolKeyword":return 3}return 4})),Ole={string:"StringKeyword",number:"NumberKeyword",boolean:"BooleanKeyword",bigint:"BigIntKeyword"},AU=e=>Wg(e,t=>Nv(t)?AU(t.types):[t]),Rle=e=>{const t=Ale(e),n=[],r={},i=[];for(const s of t)switch(s._tag){case"NeverKeyword":break;case"AnyKeyword":return[vle];case"UnknownKeyword":return[EU];case"ObjectKeyword":case"UndefinedKeyword":case"VoidKeyword":case"StringKeyword":case"NumberKeyword":case"BooleanKeyword":case"BigIntKeyword":case"SymbolKeyword":{r[s._tag]||(r[s._tag]=s,n.push(s));break}case"Literal":{const a=typeof s.literal;switch(a){case"string":case"number":case"bigint":case"boolean":{const o=Ole[a];!r[o]&&!i.includes(s.literal)&&(i.push(s.literal),n.push(s));break}case"object":{i.includes(s.literal)||(i.push(s.literal),n.push(s));break}}break}case"UniqueSymbol":{!r.SymbolKeyword&&!i.includes(s.symbol)&&(i.push(s.symbol),n.push(s));break}case"TupleType":{r.ObjectKeyword||n.push(s);break}case"TypeLiteral":{s.propertySignatures.length===0&&s.indexSignatures.length===0?r["{}"]||(r["{}"]=s,n.push(s)):r.ObjectKeyword||n.push(s);break}default:n.push(s)}return n};var Es;let pr=(Es=class{constructor(t,n={}){g(this,"types");g(this,"annotations");g(this,"_tag","Union");this.types=t,this.annotations=n}toString(){return lt(Wi(this),()=>this.types.map(String).join(" | "))}toJSON(){return{_tag:this._tag,types:this.types.map(t=>t.toJSON()),annotations:zt(this.annotations)}}},g(Es,"make",(t,n)=>vC(t)?new Es(t,n):t.length===1?t[0]:yC),g(Es,"unify",(t,n)=>Es.make(Rle(AU(t)),n)),Es);const Mle=(e,t)=>e.map(t),vC=e=>e.length>1,Nv=Ri("Union"),w0=pe(Symbol.for("effect/Schema/AST/toJSONMemoMap"),()=>new WeakMap);class Ah{constructor(t,n={}){g(this,"f");g(this,"annotations");g(this,"_tag","Suspend");this.f=t,this.annotations=n,this.f=nU(t)}toString(){return Wi(this).pipe(Ki(()=>po(eK(this.f)(),t=>Wi(t))),lt(()=>"<suspended schema>"))}toJSON(){const t=this.f();let n=w0.get(t);return n||(w0.set(t,{_tag:this._tag}),n={_tag:this._tag,ast:t.toJSON(),annotations:zt(this.annotations)},w0.set(t,n),n)}}let OU=class{constructor(t,n,r={}){g(this,"from");g(this,"filter");g(this,"annotations");g(this,"_tag","Refinement");this.from=t,this.filter=n,this.annotations=r}toString(){return Av(this).pipe(lt(()=>Dt($U(this),{onNone:()=>`{ ${this.from} | filter }`,onSome:t=>eu(this.from)?String(this.from)+" & "+t:t})))}toJSON(){return{_tag:this._tag,from:this.from.toJSON(),annotations:zt(this.annotations)}}};const eu=Ri("Refinement"),x0={};let Vo=class{constructor(t,n,r,i={}){g(this,"from");g(this,"to");g(this,"transformation");g(this,"annotations");g(this,"_tag","Transformation");this.from=t,this.to=n,this.transformation=r,this.annotations=i}toString(){return lt(Wi(this),()=>`(${String(this.from)} <-> ${String(this.to)})`)}toJSON(){return{_tag:this._tag,from:this.from.toJSON(),to:this.to.toJSON(),annotations:zt(this.annotations)}}};const Nle=Ri("Transformation");class RU{constructor(t,n){g(this,"decode");g(this,"encode");g(this,"_tag","FinalTransformation");this.decode=t,this.encode=n}}const Dle=e=>t=>t._tag===e;class zle{constructor(){g(this,"_tag","ComposeTransformation")}}const MU=new zle;let Ile=class{constructor(t,n,r,i){g(this,"from");g(this,"to");g(this,"decode");g(this,"encode");this.from=t,this.to=n,this.decode=r,this.encode=i}};class S_{constructor(t){g(this,"propertySignatureTransformations");g(this,"_tag","TypeLiteralTransformation");this.propertySignatureTransformations=t;const n={},r={};for(const i of t){const s=i.from;if(n[s])throw new Error(ZR(s));n[s]=!0;const a=i.to;if(r[a])throw new Error(ZR(a));r[a]=!0}}}const i2=Dle("TypeLiteralTransformation"),bf=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={...e.annotations};delete r[_m];const i={...r,...t},s=_U(e);return dt(s)&&(i[Ly]=bf(s.value,t)),n.annotations.value=i,Object.create(Object.getPrototypeOf(e),n)},$le="[\\s\\S]*?",Lle="[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?",NU=(e,t)=>{switch(e._tag){case"Literal":return ly(String(e.literal));case"StringKeyword":return $le;case"NumberKeyword":return Lle;case"TemplateLiteral":return DU(e);case"Union":return e.types.map(n=>NU(n)).join("|")}},jle=(e,t,n,r)=>Nv(e)?`(${t})`:t,DU=(e,t,n)=>{let r="";if(e.head!==""){const i=ly(e.head);r+=i}for(const i of e.spans){const s=NU(i.type);if(r+=jle(i.type,s),i.literal!==""){const a=ly(i.literal);r+=a}}return r},Fle=e=>new RegExp(`^${DU(e)}$`),s2=(e,t)=>{const n=[],r=[],i=s=>{switch(s._tag){case"NeverKeyword":break;case"StringKeyword":case"SymbolKeyword":case"TemplateLiteral":case"Refinement":r.push(new Mv(s,t,!0));break;case"Literal":if(ti(s.literal)||Hs(s.literal))n.push(new mn(s.literal,t,!1,!0));else throw new Error(qoe(s.literal));break;case"Enums":{for(const[a,o]of s.enums)n.push(new mn(o,t,!1,!0));break}case"UniqueSymbol":n.push(new mn(s.symbol,t,!1,!0));break;case"Union":s.types.forEach(i);break;default:throw new Error(Hoe(s))}};return i(e),{propertySignatures:n,indexSignatures:r}},zU=e=>t=>{let n;for(const r of e)Object.prototype.hasOwnProperty.call(t.annotations,r)&&(n===void 0&&(n={}),n[r]=t.annotations[r]);return n},Ple=e=>t=>{const n={...t.annotations};for(const r of e)delete n[r];return n},Ule=zU([lU,cU,uU,fU,dU,hU]),Lt=e=>{switch(e._tag){case"Declaration":{const t=Br(e.typeParameters,Lt);return t===e.typeParameters?e:new Ov(t,e.decodeUnknown,e.encodeUnknown,e.annotations)}case"TupleType":{const t=Br(e.elements,i=>{const s=Lt(i.type);return s===i.type?i:new yf(s,i.isOptional)}),n=CU(e.rest),r=Br(n,Lt);return t===e.elements&&r===n?e:new bC(t,r.map(i=>new Rv(i)),e.isReadonly,e.annotations)}case"TypeLiteral":{const t=Br(e.propertySignatures,r=>{const i=Lt(r.type);return i===r.type?r:new mn(r.name,i,r.isOptional,r.isReadonly)}),n=Br(e.indexSignatures,r=>{const i=Lt(r.type);return i===r.type?r:new Mv(r.parameter,i,r.isReadonly)});return t===e.propertySignatures&&n===e.indexSignatures?e:new qa(t,n,e.annotations)}case"Union":{const t=Br(e.types,Lt);return t===e.types?e:pr.make(t,e.annotations)}case"Suspend":return new Ah(()=>Lt(e.f()),e.annotations);case"Refinement":{const t=Lt(e.from);return t===e.from?e:new OU(t,e.filter,e.annotations)}case"Transformation":{const t=Ule(e);return Lt(t!==void 0?bf(e.to,t):e.to)}}return e};function Br(e,t){let n=!1;const r=Ib(e.length);for(let i=0;i<e.length;i++){const s=e[i],a=t(s);a!==s&&(n=!0),r[i]=a}return n?r:e}const Ni=(e,t)=>{switch(e._tag){case"Declaration":{const n=Br(e.typeParameters,r=>Ni(r));return n===e.typeParameters?e:new Ov(n,e.decodeUnknown,e.encodeUnknown)}case"TupleType":{const n=Br(e.elements,s=>{const a=Ni(s.type);return a===s.type?s:new yf(a,s.isOptional)}),r=CU(e.rest),i=Br(r,s=>Ni(s));return n===e.elements&&i===r?e:new bC(n,i.map(s=>new Rv(s)),e.isReadonly)}case"TypeLiteral":{const n=Br(e.propertySignatures,i=>{const s=Ni(i.type);return s===i.type?i:new mn(i.name,s,i.isOptional,i.isReadonly)}),r=Br(e.indexSignatures,i=>{const s=Ni(i.type);return s===i.type?i:new Mv(i.parameter,s,i.isReadonly)});return n===e.propertySignatures&&r===e.indexSignatures?e:new qa(n,r)}case"Union":{const n=Br(e.types,r=>Ni(r));return n===e.types?e:pr.make(n)}case"Suspend":{let n;const r=lle(e);if(dt(r)){const i="";n={[kU]:`${r.value}Encoded${i}`}}return new Ah(()=>Ni(e.f()),n)}case"Refinement":return Ni(e.from);case"Transformation":return Ni(e.from)}return e},jy=e=>Ni(e),zt=e=>{const t={};for(const n of Object.getOwnPropertySymbols(e))t[String(n)]=e[n];return t},IU=e=>{switch(e._tag){case"StringKeyword":case"SymbolKeyword":case"TemplateLiteral":return e;case"Refinement":return IU(e.from)}},Ble=(e,t)=>new Vo(e,t,MU),ea=e=>lt(Wi(e),()=>e._tag);function Hle(e){return Dt(vU(e),{onNone:()=>"",onSome:t=>t.map(n=>` & Brand<${Xs(n)}>`).join("")})}const $U=e=>SU(e).pipe(Ki(()=>xU(e)),Ki(()=>wU(e)),Bn(t=>t+Hle(e))),Wi=e=>Ki(Av(e),()=>$U(e));class En{constructor(t,n,r){g(this,"path");g(this,"actual");g(this,"issue");g(this,"_tag","Pointer");this.path=t,this.actual=n,this.issue=r}}class a2{constructor(t,n){g(this,"actual");g(this,"message");g(this,"_tag","Unexpected");this.actual=t,this.message=n}}class Hf{constructor(t,n){g(this,"ast");g(this,"message");g(this,"_tag","Missing");g(this,"actual");this.ast=t,this.message=n}}class At{constructor(t,n,r,i){g(this,"ast");g(this,"actual");g(this,"issues");g(this,"output");g(this,"_tag","Composite");this.ast=t,this.actual=n,this.issues=r,this.output=i}}class _0{constructor(t,n,r,i){g(this,"ast");g(this,"actual");g(this,"kind");g(this,"issue");g(this,"_tag","Refinement");this.ast=t,this.actual=n,this.kind=r,this.issue=i}}class k0{constructor(t,n,r,i){g(this,"ast");g(this,"actual");g(this,"kind");g(this,"issue");g(this,"_tag","Transformation");this.ast=t,this.actual=n,this.kind=r,this.issue=i}}class wn{constructor(t,n,r){g(this,"ast");g(this,"actual");g(this,"message");g(this,"_tag","Type");this.ast=t,this.actual=n,this.message=r}}class w_{constructor(t,n,r){g(this,"ast");g(this,"actual");g(this,"message");g(this,"_tag","Forbidden");this.ast=t,this.actual=n,this.message=r}}const o2=Symbol.for("effect/Schema/ParseErrorTypeId");var GD;class qle extends Gre("ParseError"){constructor(){super(...arguments);g(this,GD,o2)}get message(){return this.toString()}toString(){return $d.formatIssueSync(this.issue)}toJSON(){return{_id:"ParseError",message:this.toString()}}[(GD=o2,Pe)](){return this.toJSON()}}const SC=e=>new qle({issue:e}),nr=de,Ta=me,Fy=q7,Cn=zL,yi=E(2,(e,t)=>Cn(e)?tr(e,{onLeft:me,onRight:t}):ce(e,t)),pn=E(2,(e,t)=>Cn(e)?G7(e,t):Je(e,t)),Id=E(2,(e,t)=>Cn(e)?K7(e,t):eC(e,t)),Vle=E(2,(e,t)=>Cn(e)?V7(e,{onLeft:t.onFailure,onRight:t.onSuccess}):Fie(e,t)),LU=E(2,(e,t)=>Cn(e)?tr(e,{onLeft:t,onRight:de}):RP(e,t)),Dv=(e,t)=>t===void 0||Hs(t)?e:e===void 0?t:{...e,...t},Kle=(e,t,n)=>{const r=sn(e,t);return(i,s)=>r(i,Dv(n,s))},jU=(e,t,n)=>{const r=Kle(e,t,n);return(i,s)=>IL(r(i,s),SC)},FU=(e,t,n)=>{const r=sn(e,t);return(i,s)=>r(i,{...Dv(n,s),isEffectAllowed:!0})},Gle=(e,t)=>jU(e.ast,!0,t),PU=(e,t)=>FU(e.ast,!0,t),wC=(e,t)=>FU(e.ast,!1,t),xC=(e,t)=>jU(Lt(e.ast),!0,t),Yle=(e,t)=>{const n=sn(Lt(e.ast),!0);return(r,i)=>Fi(n(r,{exact:!0,...Dv(t,i)}))},Jle=pe(Symbol.for("effect/ParseResult/decodeMemoMap"),()=>new WeakMap),Qle=pe(Symbol.for("effect/ParseResult/encodeMemoMap"),()=>new WeakMap),sn=(e,t)=>{const n=t?Jle:Qle,r=n.get(e);if(r)return r;const i=Xle(e,t),s=rle(e),a=dt(s)?(c,f)=>i(c,Dv(f,s.value)):i,o=ile(e),l=t&&dt(o)?(c,f)=>cd(LU(a(c,f),o.value),e,c,f):a;return n.set(e,l),l},E0=e=>Ur(ele(e)),C0=e=>Ur(tle(e)),Xle=(e,t)=>{switch(e._tag){case"Refinement":if(t){const n=sn(e.from,!0);return(r,i)=>{i=i??x0;const s=(i==null?void 0:i.errors)==="all",a=yi(LU(n(r,i),o=>{const l=new _0(e,r,"From",o);return s&&ale(e)&&qU(o)?Dt(e.filter(r,i,e),{onNone:()=>me(l),onSome:c=>me(new At(e,r,[l,new _0(e,r,"Predicate",c)]))}):me(l)}),o=>Dt(e.filter(o,i,e),{onNone:()=>de(o),onSome:l=>me(new _0(e,r,"Predicate",l))}));return cd(a,e,r,i)}}else{const n=sn(Lt(e),!0),r=sn(UU(e.from),!1);return(i,s)=>cd(yi(n(i,s),a=>r(a,s)),e,i,s)}case"Transformation":{const n=ece(e.transformation,t),r=t?sn(e.from,!0):sn(e.to,!1),i=t?sn(e.to,!0):sn(e.from,!1);return(s,a)=>cd(yi(Id(r(s,a),o=>new k0(e,s,t?"Encoded":"Type",o)),o=>yi(Id(n(o,a??x0,e,s),l=>new k0(e,s,"Transformation",l)),l=>Id(i(l,a),c=>new k0(e,s,t?"Type":"Encoded",c)))),e,s,a)}case"Declaration":{const n=t?e.decodeUnknown(...e.typeParameters):e.encodeUnknown(...e.typeParameters);return(r,i)=>cd(n(r,i??x0,e),e,r,i)}case"Literal":return ur(e,n=>n===e.literal);case"UniqueSymbol":return ur(e,n=>n===e.symbol);case"UndefinedKeyword":return ur(e,NV);case"NeverKeyword":return ur(e,DV);case"UnknownKeyword":case"AnyKeyword":case"VoidKeyword":return de;case"StringKeyword":return ur(e,ti);case"NumberKeyword":return ur(e,Hs);case"BooleanKeyword":return ur(e,oh);case"BigIntKeyword":return ur(e,Tb);case"SymbolKeyword":return ur(e,ox);case"ObjectKeyword":return ur(e,wi);case"Enums":return ur(e,n=>e.enums.some(([r,i])=>i===n));case"TemplateLiteral":{const n=Fle(e);return ur(e,r=>ti(r)&&n.test(r))}case"TupleType":{const n=e.elements.map(c=>sn(c.type,t)),r=e.rest.map(c=>sn(c.type,t));let i=e.elements.filter(c=>!c.isOptional);e.rest.length>0&&(i=i.concat(e.rest.slice(1)));const s=i.length,a=e.elements.length>0?e.elements.map((c,f)=>f).join(" | "):"never",o=E0(e),l=C0(e);return(c,f)=>{if(!pK(c))return me(new wn(e,c));const u=(f==null?void 0:f.errors)==="all",d=[];let h=0;const p=[],b=c.length;for(let v=b;v<=s-1;v++){const _=new En(v,c,new Hf(i[v-b]));if(u){d.push([h++,_]);continue}else return me(new At(e,c,_,p))}if(e.rest.length===0)for(let v=e.elements.length;v<=b-1;v++){const _=new En(v,c,new a2(c[v],`is unexpected, expected: ${a}`));if(u){d.push([h++,_]);continue}else return me(new At(e,c,_,p))}let S=0,m;for(;S<n.length;S++)if(b<S+1){if(e.elements[S].isOptional)continue}else{const v=n[S],_=v(c[S],f);if(Cn(_)){if(an(_)){const C=new En(S,c,_.left);if(u){d.push([h++,C]);continue}else return me(new At(e,c,C,oi(p)))}p.push([h++,_.right])}else{const C=h++,k=S;m||(m=[]),m.push(({es:A,output:N})=>ce(tc(_),D=>{if(an(D)){const M=new En(k,c,D.left);return u?(A.push([C,M]),je):me(new At(e,c,M,oi(N)))}return N.push([C,D.right]),je}))}}if(en(r)){const[v,..._]=r;for(;S<b-_.length;S++){const C=v(c[S],f);if(Cn(C))if(an(C)){const k=new En(S,c,C.left);if(u){d.push([h++,k]);continue}else return me(new At(e,c,k,oi(p)))}else p.push([h++,C.right]);else{const k=h++,A=S;m||(m=[]),m.push(({es:N,output:D})=>ce(tc(C),M=>{if(an(M)){const $=new En(A,c,M.left);return u?(N.push([k,$]),je):me(new At(e,c,$,oi(D)))}else return D.push([k,M.right]),je}))}}for(let C=0;C<_.length;C++)if(S+=C,!(b<S+1)){const k=_[C](c[S],f);if(Cn(k)){if(an(k)){const A=new En(S,c,k.left);if(u){d.push([h++,A]);continue}else return me(new At(e,c,A,oi(p)))}p.push([h++,k.right])}else{const A=h++,N=S;m||(m=[]),m.push(({es:D,output:M})=>ce(tc(k),$=>{if(an($)){const L=new En(N,c,$.left);return u?(D.push([A,L]),je):me(new At(e,c,L,oi(M)))}return M.push([A,$.right]),je}))}}}const y=({es:v,output:_})=>qc(v)?me(new At(e,c,oi(v),oi(_))):de(oi(_));if(m&&m.length>0){const v=m;return Rt(()=>{const _={es:rd(d),output:rd(p)};return ce(Ji(v,C=>C(_),{concurrency:o,batching:l,discard:!0}),()=>y(_))})}return y({output:p,es:d})}}case"TypeLiteral":{if(e.propertySignatures.length===0&&e.indexSignatures.length===0)return ur(e,zV);const n=[],r={},i=[];for(const f of e.propertySignatures)n.push([sn(f.type,t),f]),r[f.name]=null,i.push(f.name);const s=e.indexSignatures.map(f=>[sn(f.parameter,t),sn(f.type,t),f.parameter]),a=pr.make(e.indexSignatures.map(f=>f.parameter).concat(i.map(f=>ox(f)?new ule(f):new m_(f)))),o=sn(a,t),l=E0(e),c=C0(e);return(f,u)=>{if(!$V(f))return me(new wn(e,f));const d=(u==null?void 0:u.errors)==="all",h=[];let p=0;const b=(u==null?void 0:u.onExcessProperty)==="error",S=(u==null?void 0:u.onExcessProperty)==="preserve",m={};let y;if(b||S){y=Reflect.ownKeys(f);for(const k of y){const A=o(k,u);if(Cn(A)&&an(A))if(b){const N=new En(k,f,new a2(f[k],`is unexpected, expected: ${String(a)}`));if(d){h.push([p++,N]);continue}else return me(new At(e,f,N,m))}else m[k]=f[k]}}let v;const _=(u==null?void 0:u.exact)===!0;for(let k=0;k<n.length;k++){const A=n[k][1],N=A.name,D=Object.prototype.hasOwnProperty.call(f,N);if(!D){if(A.isOptional)continue;if(_){const L=new En(N,f,new Hf(A));if(d){h.push([p++,L]);continue}else return me(new At(e,f,L,m))}}const M=n[k][0],$=M(f[N],u);if(Cn($)){if(an($)){const L=new En(N,f,D?$.left:new Hf(A));if(d){h.push([p++,L]);continue}else return me(new At(e,f,L,m))}m[N]=$.right}else{const L=p++,J=N;v||(v=[]),v.push(({es:Y,output:G})=>ce(tc($),z=>{if(an(z)){const j=new En(J,f,D?z.left:new Hf(A));return d?(Y.push([L,j]),je):me(new At(e,f,j,G))}return G[J]=z.right,je}))}}for(let k=0;k<s.length;k++){const A=s[k],N=A[0],D=A[1],M=tU(f,A[2]);for(const $ of M){const L=N($,u);if(Cn(L)&&Fi(L)){const J=D(f[$],u);if(Cn(J))if(an(J)){const Y=new En($,f,J.left);if(d){h.push([p++,Y]);continue}else return me(new At(e,f,Y,m))}else Object.prototype.hasOwnProperty.call(r,$)||(m[$]=J.right);else{const Y=p++,G=$;v||(v=[]),v.push(({es:z,output:j})=>ce(tc(J),I=>{if(an(I)){const te=new En(G,f,I.left);return d?(z.push([Y,te]),je):me(new At(e,f,te,j))}else return Object.prototype.hasOwnProperty.call(r,$)||(j[$]=I.right),je}))}}}}const C=({es:k,output:A})=>{if(qc(k))return me(new At(e,f,oi(k),A));if((u==null?void 0:u.propertyOrder)==="original"){const N=y||Reflect.ownKeys(f);for(const M of i)N.indexOf(M)===-1&&N.push(M);const D={};for(const M of N)Object.prototype.hasOwnProperty.call(A,M)&&(D[M]=A[M]);return de(D)}return de(A)};if(v&&v.length>0){const k=v;return Rt(()=>{const A={es:rd(h),output:Object.assign({},m)};return ce(Ji(k,N=>N(A),{concurrency:l,batching:c,discard:!0}),()=>C(A))})}return C({es:h,output:m})}}case"Union":{const n=Wle(e.types,t),r=Reflect.ownKeys(n.keys),i=r.length,s=e.types.length,a=new Map;for(let c=0;c<s;c++)a.set(e.types[c],sn(e.types[c],t));const o=E0(e)??1,l=C0(e);return(c,f)=>{const u=[];let d=0,h=[];if(i>0)if(yk(c))for(let S=0;S<i;S++){const m=r[S],y=n.keys[m].buckets;if(Object.prototype.hasOwnProperty.call(c,m)){const v=String(c[m]);if(Object.prototype.hasOwnProperty.call(y,v))h=h.concat(y[v]);else{const{candidates:_,literals:C}=n.keys[m],k=pr.make(C),A=_.length===s?new qa([new mn(m,k,!1,!0)],[]):pr.make(_);u.push([d++,new At(A,c,new En(m,c,new wn(k,c[m])))])}}else{const{candidates:v,literals:_}=n.keys[m],C=new mn(m,pr.make(_),!1,!0),k=v.length===s?new qa([C],[]):pr.make(v);u.push([d++,new At(k,c,new En(m,c,new Hf(C)))])}}else{const S=n.candidates.length===s?e:pr.make(n.candidates);u.push([d++,new wn(S,c)])}n.otherwise.length>0&&(h=h.concat(n.otherwise));let p;for(let S=0;S<h.length;S++){const m=h[S],y=a.get(m)(c,f);if(Cn(y)&&(!p||p.length===0)){if(Fi(y))return y;u.push([d++,y.left])}else{const v=d++;p||(p=[]),p.push(_=>Rt(()=>"finalResult"in _?je:ce(tc(y),C=>(Fi(C)?_.finalResult=C:_.es.push([v,C.left]),je))))}}const b=S=>qc(S)?S.length===1&&S[0][1]._tag==="Type"?me(S[0][1]):me(new At(e,c,oi(S))):me(new wn(e,c));if(p&&p.length>0){const S=p;return Rt(()=>{const m={es:rd(u)};return ce(Ji(S,y=>y(m),{concurrency:o,batching:l,discard:!0}),()=>"finalResult"in m?m.finalResult:b(m.es))})}return b(u)}}case"Suspend":{const n=nU(()=>sn(e.f(),t));return(r,i)=>n()(r,i)}}},ur=(e,t)=>n=>t(n)?de(n):me(new wn(e,n)),ld=(e,t)=>{switch(e._tag){case"Declaration":{const n=_U(e);if(dt(n))return ld(n.value,t);break}case"TypeLiteral":{const n=[];for(let r=0;r<e.propertySignatures.length;r++){const i=e.propertySignatures[r],s=t?jy(i.type):Lt(i.type);zd(s)&&!i.isOptional&&n.push([i.name,s])}return n}case"TupleType":{const n=[];for(let r=0;r<e.elements.length;r++){const i=e.elements[r],s=t?jy(i.type):Lt(i.type);zd(s)&&!i.isOptional&&n.push([r,s])}return n}case"Refinement":return ld(e.from,t);case"Suspend":return ld(e.f(),t);case"Transformation":return ld(t?e.from:e.to,t)}return[]},Wle=(e,t)=>{const n={},r=[],i=[];for(let s=0;s<e.length;s++){const a=e[s],o=ld(a,t);if(o.length>0){i.push(a);for(let l=0;l<o.length;l++){const[c,f]=o[l],u=String(f.literal);n[c]=n[c]||{buckets:{},literals:[],candidates:[]};const d=n[c].buckets;if(Object.prototype.hasOwnProperty.call(d,u)){if(l<o.length-1)continue;d[u].push(a),n[c].literals.push(f),n[c].candidates.push(a)}else{d[u]=[a],n[c].literals.push(f),n[c].candidates.push(a);break}}}else r.push(a)}return{keys:n,otherwise:r,candidates:i}},UU=e=>eu(e)?UU(e.from):e,cd=(e,t,n,r)=>{if((r==null?void 0:r.isEffectAllowed)===!0||Cn(e))return e;const i=new AE,s=tC(e,{scheduler:i});i.flush();const a=s.unsafePoll();if(a){if(FZ(a))return de(a.value);const o=a.cause;return mne(o)?me(o.error):me(new w_(t,n,_ne(o)))}return me(new w_(t,n,"cannot be be resolved synchronously, this is caused by using runSync on an effect that performs async work"))},Zle=([e],[t])=>e>t?1:e<t?-1:0;function oi(e){return e.sort(Zle).map(t=>t[1])}const ece=(e,t)=>{switch(e._tag){case"FinalTransformation":return t?e.decode:e.encode;case"ComposeTransformation":return de;case"TypeLiteralTransformation":return n=>{let r=de(n);for(const i of e.propertySignatureTransformations){const[s,a]=t?[i.from,i.to]:[i.to,i.from],o=t?i.decode:i.encode;r=pn(r,c=>{const f=o(Object.prototype.hasOwnProperty.call(c,s)?X(c[s]):V());return delete c[s],dt(f)&&(c[a]=f.value),c})}return r}}},In=(e,t=[])=>({value:e,forest:t}),$d={formatIssue:e=>pn(mc(e),tce),formatIssueSync:e=>{const t=$d.formatIssue(e);return Cn(t)?$L(t):Wr(t)},formatError:e=>$d.formatIssue(e.issue),formatErrorSync:e=>$d.formatIssueSync(e.issue)},tce=e=>e.value+BU(`
|
|
75
|
+
`,e.forest),BU=(e,t)=>{let n="";const r=t.length;let i;for(let s=0;s<r;s++){i=t[s];const a=s===r-1;n+=e+(a?"└":"├")+"─ "+i.value,n+=BU(e+(r>1&&!a?"│ ":" "),i.forest)}return n},nce=e=>{switch(e){case"Encoded":return"Encoded side transformation failure";case"Transformation":return"Transformation process failure";case"Type":return"Type side transformation failure"}},rce=e=>{switch(e){case"From":return"From side refinement failure";case"Predicate":return"Predicate refinement failure"}},HU=e=>"ast"in e?X(e.ast):V(),x_=de(void 0),ice=e=>HU(e).pipe(po(Woe),Dt({onNone:()=>x_,onSome:t=>{const n=t(e);return ti(n)?de({message:n,override:!1}):yo(n)?Je(n,r=>({message:r,override:!1})):ti(n.message)?de({message:n.message,override:n.override}):Je(n.message,r=>({message:r,override:n.override}))}})),_C=e=>t=>t._tag===e,qU=_C("Composite"),l2=_C("Refinement"),c2=_C("Transformation"),Va=e=>yi(ice(e),t=>t!==void 0?!t.override&&(qU(e)||l2(e)&&e.kind==="From"||c2(e)&&e.kind!=="Transformation")?c2(e)||l2(e)?Va(e.issue):x_:de(t.message):x_),VU=e=>HU(e).pipe(po(nle),UL(t=>t(e)),Ur);function sce(e){return xU(e).pipe(Ki(()=>SU(e)),Ki(()=>wU(e)),Ki(()=>Av(e)),lt(()=>`{ ${e.from} | filter }`))}function ace(e){return e.message!==void 0?e.message:`Expected ${eu(e.ast)?sce(e.ast):String(e.ast)}, actual ${Xs(e.actual)}`}const KU=e=>pn(Va(e),t=>t??VU(e)??ace(e)),dp=e=>VU(e)??String(e.ast),GU=e=>e.message??"is forbidden",YU=e=>e.message??"is unexpected",JU=e=>{const t=Zoe(e.ast);if(dt(t)){const n=t.value();return ti(n)?de(n):n}return de(e.message??"is missing")},mc=e=>{switch(e._tag){case"Type":return pn(KU(e),In);case"Forbidden":return de(In(dp(e),[In(GU(e))]));case"Unexpected":return de(In(YU(e)));case"Missing":return pn(JU(e),In);case"Transformation":return yi(Va(e),t=>t!==void 0?de(In(t)):pn(mc(e.issue),n=>In(dp(e),[In(nce(e.kind),[n])])));case"Refinement":return yi(Va(e),t=>t!==void 0?de(In(t)):pn(mc(e.issue),n=>In(dp(e),[In(rce(e.kind),[n])])));case"Pointer":return pn(mc(e.issue),t=>In(rU(e.path),[t]));case"Composite":return yi(Va(e),t=>{if(t!==void 0)return de(In(t));const n=dp(e);return pC(e.issues)?pn(Ji(e.issues,mc),r=>In(n,r)):pn(mc(e.issues),r=>In(n,[r]))})}},Oo=(e,t,n)=>({_tag:e,path:t,message:n}),ng={formatIssue:e=>pc(e,void 0,[]),formatIssueSync:e=>{const t=ng.formatIssue(e);return Cn(t)?$L(t):Wr(t)},formatError:e=>ng.formatIssue(e.issue),formatErrorSync:e=>ng.formatIssueSync(e.issue)},pc=(e,t,n)=>{const r=e._tag;switch(r){case"Type":return pn(KU(e),i=>[Oo(t??r,n,i)]);case"Forbidden":return de([Oo(r,n,GU(e))]);case"Unexpected":return de([Oo(r,n,YU(e))]);case"Missing":return pn(JU(e),i=>[Oo(r,n,i)]);case"Pointer":return pc(e.issue,void 0,n.concat(e.path));case"Composite":return yi(Va(e),i=>i!==void 0?de([Oo(r,n,i)]):pC(e.issues)?pn(Ji(e.issues,s=>pc(s,void 0,n)),YL):pc(e.issues,void 0,n));case"Refinement":return yi(Va(e),i=>i!==void 0?de([Oo(r,n,i)]):pc(e.issue,e.kind==="Predicate"?r:void 0,n));case"Transformation":return yi(Va(e),i=>i!==void 0?de([Oo(r,n,i)]):pc(e.issue,e.kind==="Transformation"?r:void 0,n))}},u2=Boe,oce=E(e=>wi(e[0]),(e,...t)=>{const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}),QU=E(e=>wi(e[0]),(e,...t)=>{const n={...e};for(const r of t)delete n[r];return n}),zu=Symbol.for("effect/Schema");function ht(e){var t,n,r;return n=zu,t=zu,r=class{constructor(){g(this,n,__)}static annotations(s){return ht(ta(this.ast,s))}static pipe(){return ie(this,arguments)}static toString(){return String(e)}},g(r,"ast",e),g(r,"Type"),g(r,"Encoded"),g(r,"Context"),g(r,t,__),r}const __={_A:e=>e,_I:e=>e,_R:e=>e},f2={typeConstructor:Yoe,schemaId:Joe,message:oU,missingMessage:gC,identifier:_m,title:Oi,description:Ul,examples:lU,default:cU,documentation:Qoe,jsonSchema:uU,arbitrary:fU,pretty:dU,equivalence:hU,concurrency:mU,batching:pU,parseIssueTitle:gU,parseOptions:yU,decodingFallback:bU},vf=e=>{if(!e)return{};const t={...e};for(const n in f2)if(n in e){const r=f2[n];t[r]=e[n],delete t[n]}return t},ta=(e,t)=>bf(e,vf(t));const lce=e=>String(e.ast),cce=e=>ht(jy(e.ast)),k_=e=>ht(Lt(e.ast)),qf=(e,t)=>{const n=wC(e,t);return(r,i)=>Id(n(r,i),SC)},uce=(e,t)=>{const n=PU(e,t);return(r,i)=>Id(n(r,i),SC)},fce=uce,Zi=e=>ue(e,zu)&&wi(e[zu]);function dce(e){return vC(e)?pr.make(Mle(e,t=>new m_(t))):new m_(e[0])}function XU(e,t=dce(e)){var n;return n=class extends ht(t){static annotations(i){return XU(this.literals,ta(this.ast,i))}},g(n,"literals",[...e]),n}function Bl(...e){return en(e)?XU(e):Oh}const hce=(e,t,n)=>kC(e,new Ov(e.map(r=>r.ast),(...r)=>t.decode(...r.map(ht)),(...r)=>t.encode(...r.map(ht)),vf(n))),mce=(e,t)=>{const n=()=>(i,s,a)=>e(i)?nr(i):Ta(new wn(a,i)),r=n;return kC([],new Ov([],n,r,vf(t)))};function kC(e,t){var n;return n=class extends ht(t){static annotations(i){return kC(this.typeParameters,ta(this.ast,i))}},g(n,"typeParameters",[...e]),n}const km=function(){if(Array.isArray(arguments[0])){const n=arguments[0],r=arguments[1],i=arguments[2];return hce(n,r,i)}const e=arguments[0],t=arguments[1];return mce(e,t)};class pce extends ht(p_){}class gce extends ht(hle){}class Oh extends ht(yC){}class zv extends ht(EU){}class yce extends ht(kle){}class ne extends ht(g_){}class Em extends ht(b_){}class Gs extends ht(v_){}const bce=e=>pr.make(e.map(t=>t.ast));function WU(e,t=bce(e)){var n;return n=class extends ht(t){static annotations(i){return WU(this.members,ta(this.ast,i))}},g(n,"members",[...e]),n}function Iv(...e){return vC(e)?WU(e):en(e)?e[0]:Oh}const vce=e=>Iv(e,pce),Sce=(e,t)=>new bC(e.map(n=>Zi(n)?new yf(n.ast,!1):n.ast),t.map(n=>Zi(n)?new Rv(n.ast):n.ast),!0);function Py(e,t,n=Sce(e,t)){var r;return r=class extends ht(n){static annotations(s){return Py(this.elements,this.rest,ta(this.ast,s))}},g(r,"elements",[...e]),g(r,"rest",[...t]),r}function wce(...e){return Array.isArray(e[0])?Py(e[0],e.slice(1)):Py(e,[])}function ZU(e,t){var n;return n=class extends Py([],[e],t){static annotations(i){return ZU(this.value,ta(this.ast,i))}},g(n,"value",e),n}const Nr=e=>ZU(e),E_=e=>e?'"?:"':'":"';class $v extends yf{constructor(n,r,i,s,a){super(n,r,s);g(this,"isReadonly");g(this,"defaultValue");g(this,"_tag","PropertySignatureDeclaration");this.isReadonly=i,this.defaultValue=a}toString(){const n=E_(this.isOptional),r=String(this.type);return`PropertySignature<${n}, ${r}, never, ${n}, ${r}>`}}class eB extends yf{constructor(n,r,i,s,a){super(n,r,s);g(this,"isReadonly");g(this,"defaultValue");this.isReadonly=i,this.defaultValue=a}}const xce=e=>e===void 0?"never":ti(e)?JSON.stringify(e):String(e);class tB{constructor(t,n,r,i){g(this,"from");g(this,"to");g(this,"decode");g(this,"encode");g(this,"_tag","PropertySignatureTransformation");this.from=t,this.to=n,this.decode=r,this.encode=i}toString(){return`PropertySignature<${E_(this.to.isOptional)}, ${this.to.type}, ${xce(this.from.fromKey)}, ${E_(this.from.isOptional)}, ${this.from.type}>`}}const nB=(e,t)=>{switch(e._tag){case"PropertySignatureDeclaration":return new $v(e.type,e.isOptional,e.isReadonly,{...e.annotations,...t},e.defaultValue);case"PropertySignatureTransformation":return new tB(e.from,new eB(e.to.type,e.to.isOptional,e.to.isReadonly,{...e.to.annotations,...t},e.to.defaultValue),e.decode,e.encode)}},rB=Symbol.for("effect/PropertySignature"),EC=e=>ue(e,rB);var YD,JD;JD=zu,YD=rB;const zT=class zT{constructor(t){g(this,"ast");g(this,JD);g(this,YD,null);g(this,"_TypeToken");g(this,"_Key");g(this,"_EncodedToken");g(this,"_HasDefault");this.ast=t}pipe(){return ie(this,arguments)}annotations(t){return new zT(nB(this.ast,vf(t)))}toString(){return String(this.ast)}};let Uy=zT;const d2=e=>new Uy(e);class Lv extends Uy{constructor(n,r){super(n);g(this,"from");this.from=r}annotations(n){return new Lv(nB(this.ast,vf(n)),this.from)}}const Ld=e=>new Lv(new $v(e.ast,!1,!0,{},void 0),e),iB=E(2,(e,t)=>{const n=e.ast;switch(n._tag){case"PropertySignatureDeclaration":return d2(new $v(n.type,n.isOptional,n.isReadonly,n.annotations,t));case"PropertySignatureTransformation":return d2(new tB(n.from,new eB(n.to.type,n.to.isOptional,n.to.isReadonly,n.to.annotations,t),n.decode,n.encode))}}),Wt=e=>{const t=e.ast===p_||e.ast===yC?p_:vce(e).ast;return new Lv(new $v(t,!0,!0,{},void 0),e)},_ce=zU([gC]),kce=(e,t)=>{const n=Reflect.ownKeys(e),r=[];if(n.length>0){const s=[],a=[],o=[];for(let l=0;l<n.length;l++){const c=n[l],f=e[c];if(EC(f)){const u=f.ast;switch(u._tag){case"PropertySignatureDeclaration":{const d=u.type,h=u.isOptional,p=u.annotations;s.push(new mn(c,d,h,!0,_ce(u))),a.push(new mn(c,Lt(d),h,!0,p)),r.push(new mn(c,d,h,!0,p));break}case"PropertySignatureTransformation":{const d=u.from.fromKey??c;s.push(new mn(d,u.from.type,u.from.isOptional,!0,u.from.annotations)),a.push(new mn(c,u.to.type,u.to.isOptional,!0,u.to.annotations)),o.push(new Ile(d,c,u.decode,u.encode));break}}}else s.push(new mn(c,f.ast,!1,!0)),a.push(new mn(c,Lt(f.ast),!1,!0)),r.push(new mn(c,f.ast,!1,!0))}if(en(o)){const l=[],c=[];for(const f of t){const{indexSignatures:u,propertySignatures:d}=s2(f.key.ast,f.value.ast);d.forEach(h=>{s.push(h),a.push(new mn(h.name,Lt(h.type),h.isOptional,h.isReadonly,h.annotations))}),u.forEach(h=>{l.push(h),c.push(new Mv(h.parameter,Lt(h.type),h.isReadonly))})}return new Vo(new qa(s,l,{[Zc]:"Struct (Encoded side)"}),new qa(a,c,{[Zc]:"Struct (Type side)"}),new S_(o))}}const i=[];for(const s of t){const{indexSignatures:a,propertySignatures:o}=s2(s.key.ast,s.value.ast);o.forEach(l=>r.push(l)),a.forEach(l=>i.push(l))}return new qa(r,i)},sB=(e,t)=>{const n=Reflect.ownKeys(e);for(const r of n){const i=e[r];if(t[r]===void 0&&EC(i)){const s=i.ast,a=s._tag==="PropertySignatureDeclaration"?s.defaultValue:s.to.defaultValue;a!==void 0&&(t[r]=a())}}return t};function aB(e,t,n=kce(e,t)){var r;return r=class extends ht(n){static annotations(s){return aB(this.fields,this.records,ta(this.ast,s))}static pick(...s){return Ct(oce(e,...s))}static omit(...s){return Ct(QU(e,...s))}},g(r,"fields",{...e}),g(r,"records",[...t]),g(r,"make",(s,a)=>{const o=sB(e,{...s});return RC(a)?o:xC(r)(o)}),r}function Ct(e,...t){return aB(e,t)}const Ece=e=>Bl(e).pipe(Ld,iB(()=>e)),Cce=(e,t)=>Ct({_tag:Ece(e),...t});function oB(e,t){var n;return n=class extends ht(t){static annotations(i){return oB(this.from,ta(this.ast,i))}},g(n,"make",(i,s)=>RC(s)?i:xC(n)(i)),g(n,"from",e),n}const Cm=(e,t)=>n=>{const r=Dt(vU(n.ast),{onNone:()=>[e],onSome:s=>[...s,e]}),i=bf(n.ast,vf({[aU]:r,...t}));return oB(n,i)},Vf=(e,t,n)=>{if(r2(e)&&r2(t)){const r=[...e.propertySignatures];for(const i of t.propertySignatures){const s=i.name,a=r.findIndex(o=>o.name===s);if(a===-1)r.push(i);else{const{isOptional:o,type:l}=r[a];r[a]=new mn(s,By(l,i.type,n.concat(s)),o,!0)}}return new qa(r,e.indexSignatures.concat(t.indexSignatures))}throw new Error(iU(e,t,n))},Tce=Ple([_m]),Kf=(e,t)=>t.map(n=>new OU(n,e.filter,Tce(e))),By=(e,t,n)=>pr.make(bs([e],[t],n)),Ro=e=>Nv(e)?e.types:[e],bs=(e,t,n)=>Wg(e,r=>Wg(t,i=>{switch(i._tag){case"Literal":{if(ti(i.literal)&&y_(r)||Hs(i.literal)&&e2(r)||oh(i.literal)&&t2(r))return[i];break}case"StringKeyword":{if(i===g_){if(y_(r)||zd(r)&&ti(r.literal))return[r];if(eu(r))return Kf(r,bs(Ro(r.from),[i],n))}else if(r===g_)return[i];break}case"NumberKeyword":{if(i===b_){if(e2(r)||zd(r)&&Hs(r.literal))return[r];if(eu(r))return Kf(r,bs(Ro(r.from),[i],n))}else if(r===b_)return[i];break}case"BooleanKeyword":{if(i===v_){if(t2(r)||zd(r)&&oh(r.literal))return[r];if(eu(r))return Kf(r,bs(Ro(r.from),[i],n))}else if(r===v_)return[i];break}case"Union":return bs(Ro(r),i.types,n);case"Suspend":return[new Ah(()=>By(r,i.f(),n))];case"Refinement":return Kf(i,bs(Ro(r),Ro(i.from),n));case"TypeLiteral":{switch(r._tag){case"Union":return bs(r.types,[i],n);case"Suspend":return[new Ah(()=>By(r.f(),i,n))];case"Refinement":return Kf(r,bs(Ro(r.from),[i],n));case"TypeLiteral":return[Vf(r,i,n)];case"Transformation":{const s=r.transformation,a=Vf(r.from,i,n),o=Vf(r.to,Lt(i),n);switch(s._tag){case"TypeLiteralTransformation":return[new Vo(a,o,new S_(s.propertySignatureTransformations))];case"ComposeTransformation":return[new Vo(a,o,MU)];case"FinalTransformation":return[new Vo(a,o,new RU((l,c,f,u)=>pn(s.decode(l,c,f,u),d=>({...l,...d})),(l,c,f,u)=>pn(s.encode(l,c,f,u),d=>({...l,...d}))))]}}}break}case"Transformation":{if(Nle(r)){if(i2(i.transformation)&&i2(r.transformation))return[new Vo(Vf(r.from,i.from,n),Vf(r.to,i.to,n),new S_(i.transformation.propertySignatureTransformations.concat(r.transformation.propertySignatureTransformations)))]}else return bs([i],[r],n);break}}throw new Error(iU(r,i,n))})),lB=E(2,(e,t)=>ht(By(e.ast,t.ast,[]))),Ko=E(e=>Zi(e[1]),(e,t)=>CC(e,t,Ble(e.ast,t.ast))),Ace=e=>ht(new Ah(()=>e().ast)),Oce=Symbol.for("effect/SchemaId/Refine");function CC(e,t,n){var r;return r=class extends ht(n){static annotations(s){return CC(this.from,this.to,ta(this.ast,s))}},g(r,"from",e),g(r,"to",t),r}const _l=E(e=>Zi(e[0])&&Zi(e[1]),(e,t,n)=>CC(e,t,new Vo(e.ast,t.ast,new RU(n.decode,n.encode)))),Hl=E(e=>Zi(e[0])&&Zi(e[1]),(e,t,n)=>_l(e,t,{strict:!0,decode:(r,i,s,a)=>nr(n.decode(r,a)),encode:(r,i,s,a)=>nr(n.encode(r,a))})),h2=e=>e instanceof Error?e.message:String(e),Rce=e=>_l(ne.annotations({description:"a string to be decoded into JSON"}),zv,{strict:!0,decode:(t,n,r)=>Fy({try:()=>JSON.parse(t,e==null?void 0:e.reviver),catch:i=>new wn(r,t,h2(i))}),encode:(t,n,r)=>Fy({try:()=>JSON.stringify(t,e==null?void 0:e.replacer,e==null?void 0:e.space),catch:i=>new wn(r,t,h2(i))})}).annotations({title:"parseJson",schemaId:cle}),cB=(e,t)=>Zi(e)?Ko(cB(t),e):Rce(e),Mce=(e,t)=>{const n=Symbol.keyFor(e);return n===void 0?Ta(new wn(t,e,`Unable to encode a unique symbol ${String(e)} into a string`)):nr(n)},Nce=e=>nr(Symbol.for(e)),Dce=(e,t,n,r)=>Vle(e,{onFailure:i=>new At(n,r,i),onSuccess:t});class zce extends km(IV,{typeConstructor:{_tag:"Uint8Array"},identifier:"Uint8ArrayFromSelf",pretty:()=>t=>`new Uint8Array(${JSON.stringify(Array.from(t))})`,arbitrary:()=>t=>t.uint8Array(),equivalence:()=>$b(oe)}){}const m2=Goe;class Rh extends km(oL,{typeConstructor:{_tag:"Date"},identifier:"DateFromSelf",schemaId:m2,[m2]:{noInvalidDate:!1},description:"a potentially invalid Date instance",pretty:()=>t=>`new Date(${JSON.stringify(t)})`,arbitrary:()=>t=>t.date({noInvalidDate:!1}),equivalence:()=>L7}){}class C_ extends Hl(ne.annotations({description:"a string to be decoded into a Date"}),Rh,{strict:!0,decode:t=>new Date(t),encode:t=>hL(t)}).annotations({identifier:"DateFromString"}){}const Ice=(e,t)=>n=>{const r=n.array(e(n));return(t.depthIdentifier!==void 0?n.oneof(t,n.constant([]),r):r).map(qs)},$ce=e=>t=>`Chunk(${qn(t).map(e).join(", ")})`,p2=e=>(t,n,r)=>Lb(t)?jb(t)?nr(tn()):Dce(e(qn(t),n),qs,r,t):Ta(new wn(r,t)),Lce=e=>km([e],{decode:t=>p2(PU(Nr(t))),encode:t=>p2(wC(Nr(t)))},{typeConstructor:{_tag:"effect/Chunk"},description:`Chunk<${lce(e)}>`,pretty:$ce,arbitrary:Ice,equivalence:WL});function uB(e){return Hl(Nr(e),Lce(k_(e)),{strict:!0,decode:t=>t.length===0?tn():qs(t),encode:t=>qn(t)})}const jce=e=>Zi(e)||EC(e),fB=e=>Reflect.ownKeys(e).every(t=>jce(e[t])),TC=e=>"fields"in e?e.fields:TC(e[Oce]),AC=e=>fB(e)?Ct(e):Zi(e)?e:Ct(TC(e)),OC=e=>fB(e)?e:TC(e),jv=e=>(t,n)=>jd({kind:"Class",identifier:e,schema:AC(t),fields:OC(t),Base:VE,annotations:n}),Fce=e=>iB(Ld(Bl(e)),()=>e),dB=e=>(t,n,r)=>{class i extends KE{}i.prototype.name=t;const s=OC(n),a=AC(n),o={_tag:Fce(t)},l=rg(o,s),c="message"in l;class f extends jd({kind:"TaggedError",identifier:t,schema:lB(a,Ct(o)),fields:l,Base:i,annotations:r,disableToString:!0}){}return g(f,"_tag",t),c||Object.defineProperty(f.prototype,"message",{get(){return`{ ${Reflect.ownKeys(s).map(u=>`${Rb(u)}: ${Xs(this[u])}`).join(", ")} }`},enumerable:!1,configurable:!0}),f},rg=(e,t)=>{const n={...e};for(const r of Reflect.ownKeys(t)){if(r in e)throw new Error(sU(r));n[r]=t[r]}return n};function RC(e){return oh(e)?e:(e==null?void 0:e.disableValidation)??!1}const g2=pe("effect/Schema/astCache",()=>new WeakMap),Pce=e=>e===void 0?[]:Array.isArray(e)?e:[e],jd=({Base:e,annotations:t,disableToString:n,fields:r,identifier:i,kind:s,schema:a})=>{var v,_;const o=Symbol.for(`effect/Schema/${s}/${i}`),[l,c,f]=Pce(t),u=k_(a),d=u.annotations({identifier:i,...l}),h=u.annotations({[Zc]:`${i} (Type side)`,...l}),p=a.annotations({[Zc]:`${i} (Constructor)`,...l}),b=a.annotations({[Zc]:`${i} (Encoded side)`,...f}),S=a.annotations({...f,...l,...c}),m=C=>ue(C,o)&&Yle(h)(C),y=(_=class extends e{constructor(C={},k=!1){C={...C},s!=="Class"&&delete C._tag,C=sB(r,C),RC(k)||(C=xC(p)(C)),super(C,!0)}static get ast(){let C=g2.get(this);if(C)return C;const k=km([a],{decode:()=>(A,N,D)=>A instanceof this||m(A)?nr(A):Ta(new wn(D,A)),encode:()=>(A,N)=>A instanceof this?nr(A):pn(wC(h)(A,N),D=>new this(D,!0))},{identifier:i,pretty:A=>N=>`${i}(${A(N)})`,arbitrary:A=>N=>A(N).map(D=>new this(D)),equivalence:ge,[Ly]:d.ast,...l});return C=Hl(b,k,{strict:!0,decode:A=>new this(A,!0),encode:ge}).annotations({[Ly]:S.ast,...c}).ast,g2.set(this,C),C}static pipe(){return ie(this,arguments)}static annotations(C){return ht(this.ast).annotations(C)}static toString(){return`(${String(b)} <-> ${i})`}static make(...C){return new this(...C)}static extend(C){return(k,A)=>{const N=OC(k),D=AC(k),M=rg(r,N);return jd({kind:s,identifier:C,schema:lB(a,D),fields:M,Base:this,annotations:A})}}static transformOrFail(C){return(k,A,N)=>{const D=rg(r,k);return jd({kind:s,identifier:C,schema:_l(a,k_(Ct(D)),A),fields:D,Base:this,annotations:N})}}static transformOrFailFrom(C){return(k,A,N)=>{const D=rg(r,k);return jd({kind:s,identifier:C,schema:_l(cce(a),Ct(D),A),fields:D,Base:this,annotations:N})}}get[(v=zu,o)](){return o}},g(_,v,__),g(_,"fields",{...r}),g(_,"identifier",i),_);return n!==!0&&Object.defineProperty(y.prototype,"toString",{value(){return`${i}({ ${Reflect.ownKeys(r).map(C=>`${Rb(C)}: ${Xs(this[C])}`).join(", ")} })`},configurable:!0,writable:!0}),y},y2=Cce("symbol",{key:ne}).annotations({description:"an object to be decoded into a globally shared symbol"}),Uce=_l(y2,yce,{strict:!0,decode:e=>Nce(e.key),encode:(e,t,n)=>pn(Mce(e,n),r=>y2.make({key:r}))});class Bce extends Iv(ne,Em,Uce).annotations({identifier:"PropertyKey"}){}class Hce extends Ct({_tag:Ld(Bl("Pointer","Unexpected","Missing","Composite","Refinement","Transformation","Type","Forbidden")).annotations({description:"The tag identifying the type of parse issue"}),path:Ld(Nr(Bce)).annotations({description:"The path to the property where the issue occurred"}),message:Ld(ne).annotations({description:"A descriptive message explaining the issue"})}).annotations({identifier:"ArrayFormatterIssue",description:"Represents an issue returned by the ArrayFormatter formatter"}){}const hB=(e,t)=>{class n extends KE{constructor(){super(...arguments);g(this,"_tag",t)}}return n.prototype[e]=e,n.prototype.name=t,n},qce=vi,Vce=pf,Kce=z4,Gce=oC,b2=lC,Yce=Hae,mB=Symbol.for("effect/Subscribable"),pB=e=>ue(e,mB),Jce="effect/SubscriptionRef",Qce=Symbol.for(Jce),Xce=E(2,(e,t)=>O(cZ(e.ref,t),nC(Bse(e.pubsub,t)),e.semaphore.withPermits(1))),T_=Qce,v2=Xce,Wce="~effect-atom/atom/Result",Fv={[Wce]:{E:ge,A:ge},pipe(){return ie(this,arguments)},[ve](e){if(this._tag!==e._tag||this.waiting!==e.waiting)return!1;switch(this._tag){case"Initial":return!0;case"Success":return oe(this.value,e.value);case"Failure":return oe(this.cause,e.cause)}},[be](){const e=gt(`${this._tag}:${this.waiting}`);return this._tag==="Initial"?tt(this,e):tt(this,Se(e)(this._tag==="Success"?re(this.value):re(this.cause)))}},gB=(e,t)=>e._tag==="Success"?kl(e.value):Tm(e.cause,{previous:t}),MC=e=>e._tag==="None"?Ka(!0):Pv(e.value),S2=e=>e._tag==="Initial",Zce=e=>e._tag!=="Initial",Ka=(e=!1)=>{const t=Object.create(Fv);return t._tag="Initial",t.waiting=e,t},Iu=e=>e._tag==="Success",kl=(e,t)=>{const n=Object.create(Fv);return n._tag="Success",n.value=e,n.waiting=(t==null?void 0:t.waiting)??!1,n.timestamp=(t==null?void 0:t.timestamp)??Date.now(),n},ud=e=>e._tag==="Failure",eue=(e,t)=>{const n=Object.create(Fv);return n._tag="Failure",n.cause=e,n.previousSuccess=(t==null?void 0:t.previousSuccess)??V(),n.waiting=(t==null?void 0:t.waiting)??!1,n},Tm=(e,t)=>eue(e,{previousSuccess:po(t.previous,n=>Iu(n)?X(n):ud(n)?n.previousSuccess:V()),waiting:t.waiting}),tue=(e,t)=>Tm(Q3(e),t),Pv=(e,t)=>{if(e.waiting)return t!=null&&t.touch?nue(e):e;const n=Object.assign(Object.create(Fv),e);return n.waiting=!0,n},nue=e=>Iu(e)?kl(e.value,{waiting:e.waiting}):e,fd=(e,t)=>e._tag==="Failure"?Tm(e.cause,{previous:t,waiting:e.waiting}):e,yB=e=>e._tag==="Success"?X(e.value):e._tag==="Failure"?Bn(e.previousSuccess,t=>t.value):V(),A_=e=>PL(yB(e),()=>new hf("Result.getOrThrow: no value found")),w2=e=>{switch(e._tag){case"Success":return br(e.value);case"Failure":return On(e.cause);default:return by(new hf)}},rue=e=>new iue(e);class iue{constructor(t){g(this,"result");g(this,"output",V());this.result=t}when(t,n){if(Vt(this.output)&&t(this.result)){const r=n(this.result);dt(r)&&(this.output=r)}return this}pipe(){return ie(this,arguments)}onWaiting(t){return this.when(n=>n.waiting,n=>X(t(n)))}onInitialOrWaiting(t){return this.when(n=>S2(n)||n.waiting,n=>X(t(n)))}onInitial(t){return this.when(S2,n=>X(t(n)))}onSuccess(t){return this.when(Iu,n=>X(t(n.value,n)))}onFailure(t){return this.when(ud,n=>X(t(n.cause,n)))}onError(t){return this.onErrorIf(ax,t)}onErrorIf(t,n){return this.when(ud,r=>bne(r.cause).pipe(rK(t),Bn(i=>n(i,r))))}onErrorTag(t,n){return this.onErrorIf(r=>ue(r,"_tag")&&(Array.isArray(t)?t.includes(r._tag):r._tag===t),n)}onDefect(t){return this.when(ud,n=>Sne(n.cause).pipe(Bn(r=>t(r,n))))}orElse(t){return lt(this.output,t)}orNull(){return Z7(this.output)}render(){if(dt(this.output))return this.output.value;if(ud(this.result))throw W3(this.result.cause);return null}}const sue={immediate:!0},T0="~effect-atom/atom/Registry",aue=e=>new oue(e==null?void 0:e.initialValues,e==null?void 0:e.scheduleTask,e==null?void 0:e.timeoutResolution,e==null?void 0:e.defaultIdleTTL),O_="~effect-atom/atom/Atom/Serializable",Gf=e=>O_ in e?e[O_].key:e;var QD,Yo;QD=T0;class oue{constructor(t,n=s=>queueMicrotask(s),r,i){g(this,"scheduleTask");g(this,"defaultIdleTTL");g(this,QD);g(this,"timeoutResolution");g(this,"nodes",new Map);g(this,"preloadedSerializable",new Map);g(this,"timeoutBuckets",new Map);g(this,"nodeTimeoutBucket",new Map);g(this,"disposed",!1);g(this,"refresh",t=>{t.refresh!==void 0?t.refresh(this.refresh):this.invalidateAtom(t)});g(this,"invalidateAtom",t=>{this.ensureNode(t).invalidate()});uS(this,Yo,null);if(this.scheduleTask=n,this.defaultIdleTTL=i,this[T0]=T0,r===void 0&&i!==void 0?this.timeoutResolution=Math.round(i/2):this.timeoutResolution=r??1e3,t!==void 0)for(const[s,a]of t)this.ensureNode(s).setValue(a)}getNodes(){return this.nodes}get(t){return this.ensureNode(t).value()}set(t,n){t.write(this.ensureNode(t).writeContext,n)}setSerializable(t,n){this.preloadedSerializable.set(t,n)}modify(t,n){const r=this.ensureNode(t),i=n(r.value());return t.write(r.writeContext,i[1]),i[0]}update(t,n){const r=this.ensureNode(t);t.write(r.writeContext,n(r.value()))}subscribe(t,n,r){const i=this.ensureNode(t);r!=null&&r.immediate&&n(i.value());const s=i.subscribe(function(){n(i._value)});return()=>{s(),i.canBeRemoved&&this.scheduleNodeRemoval(i)}}mount(t){return this.subscribe(t,pu,sue)}atomHasTtl(t){return!t.keepAlive&&t.idleTTL!==0&&(t.idleTTL!==void 0||this.defaultIdleTTL!==void 0)}ensureNode(t){const n=Gf(t);let r=this.nodes.get(n);if(r===void 0?(r=this.createNode(t),this.nodes.set(n,r)):this.atomHasTtl(t)&&this.removeNodeTimeout(r),typeof n=="string"&&this.preloadedSerializable.has(n)){const i=this.preloadedSerializable.get(n);this.preloadedSerializable.delete(n);const s=t[O_].decode(i);r.setValue(s)}return r}createNode(t){if(this.disposed)throw new Error(`Cannot access Atom ${t}: registry is disposed`);return t.keepAlive||this.scheduleAtomRemoval(t),new lue(this,t)}scheduleAtomRemoval(t){this.scheduleTask(()=>{const n=this.nodes.get(Gf(t));n!==void 0&&n.canBeRemoved&&this.removeNode(n)})}scheduleNodeRemoval(t){this.scheduleTask(()=>{t.canBeRemoved&&this.removeNode(t)})}removeNode(t){this.atomHasTtl(t.atom)?this.setNodeTimeout(t):(this.nodes.delete(Gf(t.atom)),t.remove())}setNodeTimeout(t){if(this.nodeTimeoutBucket.has(t))return;let n=t.atom.idleTTL??this.defaultIdleTTL;if(Lm(this,Yo)!==null&&(n-=Lm(this,Yo),n<=0)){this.nodes.delete(Gf(t.atom)),t.remove();return}const r=Math.ceil(n/this.timeoutResolution)*this.timeoutResolution,i=Date.now()+r,s=i-i%this.timeoutResolution+this.timeoutResolution;let a=this.timeoutBuckets.get(s);a===void 0&&(a=[new Set,setTimeout(()=>this.sweepBucket(s),s-Date.now())],this.timeoutBuckets.set(s,a)),a[0].add(t),this.nodeTimeoutBucket.set(t,s)}removeNodeTimeout(t){const n=this.nodeTimeoutBucket.get(t);if(n===void 0)return;this.nodeTimeoutBucket.delete(t),this.scheduleNodeRemoval(t);const[r,i]=this.timeoutBuckets.get(n);r.delete(t),r.size===0&&(clearTimeout(i),this.timeoutBuckets.delete(n))}sweepBucket(t){const n=this.timeoutBuckets.get(t)[0];this.timeoutBuckets.delete(t),n.forEach(r=>{r.canBeRemoved&&(this.nodeTimeoutBucket.delete(r),this.nodes.delete(Gf(r.atom)),jm(this,Yo,r.atom.idleTTL??this.defaultIdleTTL),r.remove(),jm(this,Yo,null))})}reset(){this.timeoutBuckets.forEach(([,t])=>clearTimeout(t)),this.timeoutBuckets.clear(),this.nodeTimeoutBucket.clear(),this.nodes.forEach(t=>t.remove()),this.nodes.clear()}dispose(){this.disposed=!0,this.reset()}}Yo=new WeakMap;var $c;(function(e){e[e.alive=1]="alive",e[e.initialized=2]="initialized",e[e.waitingForValue=4]="waitingForValue"})($c||($c={}));var di;(function(e){e[e.uninitialized=5]="uninitialized",e[e.stale=7]="stale",e[e.valid=3]="valid",e[e.removed=0]="removed"})(di||(di={}));let lue=class{constructor(t,n){g(this,"registry");g(this,"atom");g(this,"state",di.uninitialized);g(this,"lifetime");g(this,"writeContext");g(this,"parents",[]);g(this,"previousParents");g(this,"children",[]);g(this,"listeners",[]);g(this,"skipInvalidation",!1);g(this,"_value");this.registry=t,this.atom=n,this.writeContext=new due(t,this)}get canBeRemoved(){return!this.atom.keepAlive&&this.listeners.length===0&&this.children.length===0&&this.state!==0}value(){if(this.state&$c.waitingForValue){this.lifetime=fue(this);const t=this.atom.read(this.lifetime);if(this.state&$c.waitingForValue&&this.setValue(t),this.previousParents){const n=this.previousParents;this.previousParents=void 0;for(let r=0;r<n.length;r++)n[r].removeChild(this),n[r].canBeRemoved&&this.registry.scheduleNodeRemoval(n[r])}}return this._value}valueOption(){return this.state&$c.initialized?X(this._value):V()}setValue(t){if(!(this.state&$c.initialized)){this.state=di.valid,this._value=t,$t.phase===Bi.collect?$t.notify.add(this):this.notify();return}this.state=di.valid,!oe(this._value,t)&&(this._value=t,this.skipInvalidation?this.skipInvalidation=!1:this.invalidateChildren(),this.listeners.length>0&&($t.phase===Bi.collect?$t.notify.add(this):this.notify()))}addParent(t){if(this.parents.push(t),this.previousParents!==void 0){const n=this.previousParents.indexOf(t);n!==-1&&(this.previousParents[n]=this.previousParents[this.previousParents.length-1],this.previousParents.pop()===void 0&&(this.previousParents=void 0))}t.children.indexOf(this)===-1&&(t.children.push(this),t.skipInvalidation&&(t.skipInvalidation=!1))}removeChild(t){const n=this.children.indexOf(t);n!==-1&&(this.children[n]=this.children[this.children.length-1],this.children.pop())}invalidate(){this.state===di.valid&&(this.state=di.stale,this.disposeLifetime()),$t.phase===Bi.collect?$t.stale.push(this):this.atom.lazy&&this.listeners.length===0&&!cue(this.children)?(this.invalidateChildren(),this.skipInvalidation=!0):this.value()}invalidateChildren(){if(this.children.length===0)return;const t=this.children;this.children=[];for(let n=0;n<t.length;n++)t[n].invalidate()}notify(){for(let t=0;t<this.listeners.length;t++)this.listeners[t]();$t.phase===Bi.commit&&$t.notify.delete(this)}disposeLifetime(){this.lifetime!==void 0&&(this.lifetime.dispose(),this.lifetime=void 0),this.parents.length!==0&&(this.previousParents=this.parents,this.parents=[])}remove(){if(this.state=di.removed,this.listeners=[],this.lifetime===void 0||(this.disposeLifetime(),this.previousParents===void 0))return;const t=this.previousParents;this.previousParents=void 0;for(let n=0;n<t.length;n++)t[n].removeChild(this),t[n].canBeRemoved&&this.registry.removeNode(t[n])}subscribe(t){return this.listeners.push(t),()=>{const n=this.listeners.indexOf(t);n!==-1&&(this.listeners[n]=this.listeners[this.listeners.length-1],this.listeners.pop())}}};function cue(e){if(e.length===0)return!1;let t=e,n,r=0;for(;t!==void 0;){for(let i=0,s=t.length;i<s;i++){const a=t[i];if(!a.atom.lazy||a.listeners.length>0)return!0;a.children.length>0&&(n===void 0?n=[a.children]:n.push(a.children))}t=n==null?void 0:n[r++]}return!1}const dn=e=>new Error(`Cannot use context of disposed Atom: ${e}`),uue={get registry(){return this.node.registry},addFinalizer(e){if(this.disposed)throw dn(this.node.atom);this.finalizers??(this.finalizers=[]),this.finalizers.push(e)},get(e){if(this.disposed)throw dn(this.node.atom);const t=this.node.registry.ensureNode(e);return this.node.addParent(t),t.value()},result(e,t){if(this.disposed)throw dn(this.node.atom);if(this.isFn)return this.resultOnce(e,t);const n=this.get(e);if(t!=null&&t.suspendOnWaiting&&n.waiting)return l0;switch(n._tag){case"Initial":return l0;case"Failure":return On(n.cause);case"Success":return yt(n.value)}},resultOnce(e,t){if(this.disposed)throw dn(this.node.atom);return r_(n=>{const r=this.once(e);if(r._tag!=="Initial"&&!(t!=null&&t.suspendOnWaiting&&r.waiting))return n(w2(r));const i=this.node.registry.subscribe(e,s=>{s._tag==="Initial"||t!=null&&t.suspendOnWaiting&&s.waiting||(i(),n(w2(s)))},{immediate:!1});return at(i)})},setResult(e,t){if(this.disposed)throw dn(this.node.atom);return this.node.registry.set(e,t),this.resultOnce(e,{suspendOnWaiting:!0})},some(e){if(this.disposed)throw dn(this.node.atom);if(this.isFn)return this.someOnce(e);const t=this.get(e);return t._tag==="None"?l0:yt(t.value)},someOnce(e){if(this.disposed)throw dn(this.node.atom);return r_(t=>{const n=this.once(e);if(dt(n))return t(yt(n.value));const r=this.node.registry.subscribe(e,i=>{Vt(i)||(r(),t(yt(i.value)))},{immediate:!1});return at(r)})},once(e){if(this.disposed)throw dn(this.node.atom);return this.node.registry.get(e)},self(){if(this.disposed)throw dn(this.node.atom);return this.node.valueOption()},refresh(e){if(this.disposed)throw dn(this.node.atom);this.node.registry.refresh(e)},refreshSelf(){if(this.disposed)throw dn(this.node.atom);this.node.invalidate()},mount(e){if(this.disposed)throw dn(this.node.atom);this.addFinalizer(this.node.registry.mount(e))},subscribe(e,t,n){if(this.disposed)throw dn(this.node.atom);this.addFinalizer(this.node.registry.subscribe(e,t,n))},setSelf(e){if(this.disposed)throw dn(this.node.atom);this.node.setValue(e)},set(e,t){if(this.disposed)throw dn(this.node.atom);this.node.registry.set(e,t)},stream(e,t){if(this.disposed)throw dn(this.node.atom);return O(My(GP((t==null?void 0:t.bufferSize)??16),Iy),IP(n=>My(at(()=>this.node.registry.subscribe(e,r=>{Kse(n,r)},{immediate:(t==null?void 0:t.withoutInitialValue)!==!0})),r=>at(r))),Je(n=>Moe(n)),Q4)},streamResult(e,t){return O(this.stream(e,t),Ooe(Zce),Roe(n=>n._tag==="Success"?zoe(n.value):Aoe(n.cause)))},dispose(){if(this.disposed=!0,this.finalizers===void 0)return;const e=this.finalizers;this.finalizers=void 0;for(let t=e.length-1;t>=0;t--)e[t]()}},fue=e=>{function t(n){if(t.disposed)throw dn(n);if(t.isFn)return e.registry.get(n);const r=e.registry.ensureNode(n),i=r.value();return e.addParent(r),i}return Object.setPrototypeOf(t,uue),t.isFn=!1,t.disposed=!1,t.finalizers=void 0,t.node=e,t};class due{constructor(t,n){g(this,"registry");g(this,"node");this.registry=t,this.node=n}get(t){return this.registry.get(t)}set(t,n){return this.registry.set(t,n)}setSelf(t){return this.node.setValue(t)}refreshSelf(){return this.node.invalidate()}}var Bi;(function(e){e[e.disabled=0]="disabled",e[e.collect=1]="collect",e[e.commit=2]="commit"})(Bi||(Bi={}));const $t=pe("@effect-atom/atom/Registry/batchState",()=>({phase:Bi.disabled,depth:0,stale:[],notify:new Set}));function hue(e){$t.phase=Bi.collect,$t.depth++;try{if(e(),$t.depth===1){for(let t=0;t<$t.stale.length;t++)bB($t.stale[t]);$t.phase=Bi.commit;for(const t of $t.notify)t.notify();$t.notify.clear()}}finally{$t.depth--,$t.depth===0&&($t.phase=Bi.disabled,$t.stale=[])}}function bB(e){if(e.state!==di.valid){for(let t=0;t<e.parents.length;t++){const n=e.parents[t];n.state!==di.valid&&bB(n)}e.state!==di.valid&&e.value()}}const mue=e=>{const t=e;switch(t._tag){case"Failure":case"Success":return t;case"Left":return by(t.left);case"Right":return br(t.right);case"Some":return br(t.value);case"None":return by(new hf)}},NC=e=>{const t=kv(e);return(n,r,i=!1)=>{const s=mue(n);if(s){r(s);return}const a=new AE,o=t(n,{scheduler:a});a.flush();const l=o.unsafePoll();if(l){r(l);return}o.addObserver(r);function c(){o.removeObserver(r),i||o.unsafeInterruptAsFork(Er)}return c}},pue=aue;class vB extends Ak("@effect/atom/Registry/CurrentRegistry")(){}const R_="~effect-atom/atom/Atom",M_="~effect-atom/atom/Atom/Writable",SB=E(2,(e,t)=>{const n=ni(t),r=kj(n);return Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!r,idleTTL:r?ry(n):void 0})}),Mh=SB(0),DC={[R_]:R_,pipe(){return ie(this,arguments)},toJSON(){return{_id:"Atom",keepAlive:this.keepAlive,lazy:this.lazy,label:this.label}},toString(){return it(this)},[Pe](){return this.toJSON()}},gue={...DC,atom(e,t){const n=wB(e,t);return Hi(r=>{const i=r.self(),s=r(this);return s._tag!=="Success"?fd(s,i):n(r,s.value)})},fn(e,t){return arguments.length===0?(n,r)=>x2(this,n,r):x2(this,e,t)},pull(e,t){const n=Mh(Hy(0)),r=Hi(i=>{const s=i.self(),a=i(this);return a._tag!=="Success"?fd(a,s):Fd(i,Tue(i,n,e,t),Ka(!0),a.value)});return Aue(n,r)},subscriptionRef(e){return xue(Mh(Hi(t=>{const n=t.self(),r=t(this);if(r._tag!=="Success")return fd(r,n);const i=typeof e=="function"?e(t):e;return T_ in i?i:Fd(t,i,Ka(!0),r.value)})),(t,n)=>{const r=A_(t(this));return E2(t,n,r)})},subscribable(e){return _ue(Hi(t=>{const n=t.self(),r=t(this);if(r._tag!=="Success")return fd(r,n);const i=typeof e=="function"?e(t):e;return pB(i)?i:Fd(t,i,Ka(!0),r.value)}),(t,n)=>{const r=A_(t(this));return E2(t,n,r)})}},x2=(e,t,n)=>{const[r,i,s]=Eue(n!=null&&n.reactivityKeys?(a,o)=>{const l=t(a,o);return yo(l)?X4(l,n.reactivityKeys):Y4(l,joe(n.reactivityKeys))}:t,n);return Am(a=>{a.get(s);const o=a.self(),l=a.get(e);return l._tag!=="Success"?fd(l,o):r(a,l.value)},i)},yue={...DC,[M_]:M_},bue=e=>M_ in e,Hi=(e,t)=>{const n=Object.create(DC);return n.keepAlive=!1,n.lazy=!0,n.read=e,n.refresh=t,n},Am=(e,t,n)=>{const r=Object.create(yue);return r.keepAlive=!1,r.lazy=!0,r.read=e,r.write=t,r.refresh=n,r};function vue(e,t){e.setSelf(t)}const ql=(e,t)=>{const n=wB(e,t);return R_ in n?n:Hi(n)},_2=e=>X7 in e||H7 in e,wB=(e,t)=>{if(typeof e=="function"&&!yo(e)&&!(v0 in e)){const n=e;return function(r,i){const s=n(r);if(wi(s)){if(_2(s))return s;if(n_ in s)return N_(r,s,t,i);if(v0 in s)return k2(r,s,t,i)}return s}}else if(wi(e)){if(_2(e))return Hy(e);if(n_ in e)return function(n,r){return N_(n,e,t,r)};if(v0 in e)return function(n,r){return k2(n,e,t,r)}}return Hy(e)},Hy=e=>Am(function(t){return e},vue),N_=(e,t,n,r)=>{const i=(n==null?void 0:n.initialValue)!==void 0?kl(n.initialValue):Ka();return Fd(e,t,i,r,n==null?void 0:n.uninterruptible)};function Fd(e,t,n,r=Ev,i=!1){const s=e.self(),a=Wr(sP());e.addFinalizer(()=>{tC(Ay(a,ME))});const o=new Map(r.context.unsafeMap);o.set(Wne.key,a),o.set(vB.key,e.registry);const l=rC({context:M7(o),fiberRefs:r.fiberRefs,runtimeFlags:r.runtimeFlags});let c,f=!1;const u=NC(l)(t,function(d){c=gB(d,s),f&&e.setSelf(c)},i);return f=!0,u!==void 0&&e.addFinalizer(u),c!==void 0?c:s._tag==="Some"?MC(s):Pv(n)}const Sue=e=>{let t=S0;function n(i){const s=Object.create(gue);s.keepAlive=!1,s.lazy=!0,s.refresh=void 0,s.factory=n;const a=vo(Hi(typeof i=="function"?o=>f0(i(o),t):()=>f0(i,t)));return s.layer=a,s.read=function(l){const c=l(a),f=ce(ce(xv,u=>IR(c,e.memoMap,u)),u=>Ny(bm(),u));return N_(l,f,{uninterruptible:!0})},s}n.memoMap=e.memoMap,n.addGlobalLayer=i=>{t=f0(t,PP(i,S0))};const r=Mh(ql(Uie(i=>IR(S0,e.memoMap,i)).pipe(Je($s(xm)))));return n.withReactivity=i=>s=>Oue(s,a=>{const o=A_(a(r));return a.addFinalizer(o.unsafeRegister(i,()=>{a.refresh(s)})),a.subscribe(s,l=>a.setSelf(l)),a.once(s)}),n},wue=pe("@effect-atom/atom/Atom/defaultMemoMap",()=>Wr(fse)),zC=pe("@effect-atom/atom/Atom/defaultContext",()=>Sue({memoMap:wue}));zC.withReactivity;const k2=(e,t,n,r)=>{const i=(n==null?void 0:n.initialValue)!==void 0?kl(n.initialValue):Ka();return IC(e,t,i,r)};function IC(e,t,n,r=Ev){const i=e.self(),s=Vce({onInput(l){return Gce(()=>{const c=$K(l);return c._tag==="Some"&&e.setSelf(kl(c.value,{waiting:!0})),s})},onFailure(l){return b2(()=>{e.setSelf(Tm(l,{previous:e.self()}))})},onDone(l){return b2(()=>{O(e.self(),po(yB),Dt({onNone:()=>e.setSelf(tue(new hf,{previous:e.self()})),onSome:c=>e.setSelf(kl(c))}))})}}),a=rC({context:Gr(r.context,vB,e.registry),fiberRefs:r.fiberRefs,runtimeFlags:r.runtimeFlags}),o=NC(a)(Kce(qce(J4(t),s)),pu,!1);return o!==void 0&&e.addFinalizer(o),i._tag==="Some"?MC(i):Pv(n)}const E2=(e,t,n=Ev)=>mB in t?(e.addFinalizer(t.changes.pipe(Doe(r=>(e.setSelf(r),je)),tse(n))),ese(n)(t.get)):t._tag!=="Success"?t:IC(e,t.value.changes,Ka(!0),n),xue=(e,t)=>{function n(r,i){const s=r.get(e);T_ in s?Wr(v2(s,i)):Iu(s)&&Wr(v2(s.value,i))}return Am(r=>{const i=r(e);return T_ in i||Iu(i)?t(r,i):i},n)},_ue=(e,t)=>Hi(n=>{const r=n(e);return pB(r)||Iu(r)?t(n,r):r}),kue=Symbol.for("@effect-atom/atom/Atom/Reset"),A0=Symbol.for("@effect-atom/atom/Atom/Interrupt");function Eue(e,t){const n=Mh(Hy([0,void 0])),r=(t==null?void 0:t.initialValue)!==void 0?kl(t.initialValue):Ka(),i=t!=null&&t.concurrent?Mh(Hi(o=>{const l=new Set;return o.addFinalizer(()=>l.forEach(c=>c.unsafeInterruptAsFork(Er))),l})):void 0;function s(o,l){const c=i?o(i):void 0;o.isFn=!0;const[f,u]=o.get(n);if(f===0)return r;if(u===A0)return Tm(X3(Er),{previous:o.self()});let d=e(u,o);if(n_ in d){if(c){const h=d;d=ce(bm(),p=>{const b=kv(p,h);c.add(b);const S=Array.from(c);return b.addObserver(()=>c.delete(b)),Cue(S)})}return Fd(o,d,r,l,!1)}return IC(o,d,r,l)}function a(o,l){Rue(()=>{l===kue?o.set(n,[0,void 0]):l===A0?o.set(n,[o.get(n)[0]+1,A0]):o.set(n,[o.get(n)[0]+1,l]),o.refreshSelf()})}return[s,a,n]}const Cue=e=>r_(t=>{let n=0,r,i;function s(o,l=!1){o._tag==="Failure"?r=r?hne(o.cause,r):o.cause:r||(i=o),n++,l||a()}function a(){for(;n<e.length;){const o=e[n],l=o.unsafePoll();if(!l)return o.addObserver(s);s(l,!0)}t(r?On(r):i||On(dne))}return a(),at(()=>{n<e.length&&e[n].removeObserver(s)})}),Tue=(e,t,n,r)=>ce(Yce(J4(typeof n=="function"?n(e):n)),i=>{const s=Yie(1),a=tK(bre()),o=a.currentContext;let l=tn();const c=ce(Kie(Rt(()=>i),UP,o),tr({onLeft:()=>{const h=qn(l);return qc(h)?yt({done:!0,items:h}):ss(new hf("Atom.pull: no items"))},onRight(h){let p;r!=null&&r.disableAccumulation?p=h:(p=Bt(l,h),l=p);const b=qn(p);return qc(b)?yt({done:!1,items:b}):c}})),f=s.withPermits(1)(c),u=NC(rC({context:o,fiberRefs:a.getFiberRefs(),runtimeFlags:Ev.runtimeFlags})),d=new Set;return e.addFinalizer(()=>{for(const h of d)h()}),e.once(t),e.subscribe(t,()=>{e.setSelf(MC(e.self()));let h;h=u(f,p=>{h&&d.delete(h);const b=gB(p,e.self()),S=d.size>0;e.setSelf(S?Pv(b):b)}),h&&d.add(h)}),c}),Aue=(e,t)=>Am(t.read,function(n,r){n.set(e,n.get(e)+1)}),C2=typeof WeakRef>"u"||typeof FinalizationRegistry>"u"?e=>{const t=Bx();return function(n){const r=xs(t,n);if(r._tag==="Some")return r.value;const i=e(n);return Fo(t,n,i),i}}:e=>{const t=Bx(),n=new FinalizationRegistry(r=>{Fee(t,r)});return function(r){const i=xs(t,r).pipe(UL(a=>a.deref()));if(i._tag==="Some")return i.value;const s=e(r);return Fo(t,r,new WeakRef(s)),n.register(s,r),s}},vo=e=>Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!0}),Oue=E(2,(e,t)=>bue(e)?Am(t,function(n,r){n.set(e,r)},e.refresh??function(n){n(e)}):Hi(t,e.refresh??function(n){n(e)})),Rue=hue,T2="~effect-atom/atom/Atom/ServerValue",Mue=E(2,(e,t)=>T2 in e?e[T2](n=>t.get(n)):t.get(e)),ig=Symbol.for("@effect/platform/HttpApiSchema/AnnotationMultipart"),sg=Symbol.for("@effect/platform/HttpApiSchema/AnnotationMultipartStream"),Pd=Symbol.for("@effect/platform/HttpApiSchema/AnnotationStatus"),ag=Symbol.for("@effect/platform/HttpApiSchema/AnnotationEmptyDecodeable"),og=Symbol.for("@effect/platform/HttpApiSchema/AnnotationEncoding"),lg=Symbol.for("@effect/platform/HttpApiSchema/AnnotationParam"),xB=e=>{const t={};return Pd in e&&(t[Pd]=e[Pd]),ag in e&&(t[ag]=e[ag]),og in e&&(t[og]=e[og]),lg in e&&(t[lg]=e[lg]),ig in e&&(t[ig]=e[ig]),sg in e&&(t[sg]=e[sg]),t},Nue=e=>e._tag==="Transformation"?{...e.to.annotations,...e.annotations}:e.annotations,Om=(e,t)=>Nue(e)[t],_B=(e,t)=>Om(e,Pd)??t,Due=e=>Om(e,ag)??!1,zue=e=>Om(e,ig),Iue=e=>Om(e,sg),$ue={kind:"Json",contentType:"application/json"},Uv=(e,t=$ue)=>Om(e,og)??t,Lue=e=>{var n;return(n=(e._tag==="PropertySignatureTransformation"?e.to.annotations:e.annotations)[lg])==null?void 0:n.name},$u=e=>{const t=QU(e,"status");return e.status!==void 0&&(t[Pd]=e.status),t},D_=e=>{switch(e._tag){case"VoidKeyword":return!0;case"Transformation":return D_(e.from);case"Suspend":return D_(e.f());default:return!1}},jue=e=>_B(e,D_(e)?204:200),O0=e=>_B(e,500),z_=e=>{function t(r){if(Nv(r))for(const i of r.types)t(i);else n.push(r)}const n=[];return t(e),n},kB=(e,t)=>pr.make(Array.from(new Set([...z_(e),...z_(t)]))),Ga=(e,t)=>ht(kB(e.ast,t.ast)),Fue=e=>gce.annotations($u({status:e})),I_=Fue(204);class Pue extends Hce.annotations({identifier:"Issue",description:"Represents an error encountered while parsing a value to match the schema"}){}class qy extends dB()("HttpApiDecodeError",{issues:Nr(Pue),message:ne},$u({status:400,description:"The request did not match the expected schema"})){static fromParseError(t){return ng.formatError(t).pipe(Dy($d.formatError(t)),Je(([n,r])=>new qy({issues:n,message:r})))}static refailParseError(t){return ce(qy.fromParseError(t),ss)}}const A2=Symbol.for("@effect/platform/HttpApi"),Uue={[A2]:A2,pipe(){return ie(this,arguments)},add(e){return ua({identifier:this.identifier,groups:uK(this.groups,e.identifier,e),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},addHttpApi(e){const t={...this.groups};for(const n in e.groups){const r=e.groups[n].annotateContext(Xi());r.annotations=sr(e.annotations,r.annotations),r.middlewares=new Set([...e.middlewares,...r.middlewares]),t[n]=r}return ua({identifier:this.identifier,groups:t,errorSchema:Ga(this.errorSchema,e.errorSchema),annotations:this.annotations,middlewares:this.middlewares})},addError(e,t){return ua({identifier:this.identifier,groups:this.groups,errorSchema:Ga(this.errorSchema,t!=null&&t.status?e.annotations($u({status:t.status})):e),annotations:this.annotations,middlewares:this.middlewares})},prefix(e){return ua({identifier:this.identifier,groups:Mc(this.groups,t=>t.prefix(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},middleware(e){return ua({identifier:this.identifier,groups:this.groups,errorSchema:Ga(this.errorSchema,e.failure),annotations:this.annotations,middlewares:new Set([...this.middlewares,e])})},annotate(e,t){return ua({identifier:this.identifier,groups:this.groups,errorSchema:this.errorSchema,annotations:Gr(this.annotations,e,t),middlewares:this.middlewares})},annotateContext(e){return ua({identifier:this.identifier,groups:this.groups,errorSchema:this.errorSchema,annotations:sr(this.annotations,e),middlewares:this.middlewares})}},ua=e=>{function t(){}return Object.setPrototypeOf(t,Uue),t.groups=e.groups,t.errorSchema=e.errorSchema,t.annotations=e.annotations,t.middlewares=e.middlewares,t},Bue=e=>ua({groups:new Map,errorSchema:qy,annotations:Xi(),middlewares:new Set}),Hue=(e,t)=>{const n=hp(e.errorSchema.ast,new Map,O0),r=Object.values(e.groups);for(const i of r){const s=hp(i.errorSchema.ast,n,O0),a=sr(e.annotations,i.annotations);t.onGroup({group:i,mergedAnnotations:a});const o=Object.values(i.endpoints);for(const l of o){if(t.predicate&&!t.predicate({endpoint:l,group:i}))continue;const c=hp(l.errorSchema.ast,s,O0);t.onEndpoint({group:i,endpoint:l,middleware:new Set([...i.middlewares,...l.middlewares]),mergedAnnotations:sr(a,l.annotations),payloads:l.payloadSchema._tag==="Some"?Vue(l.payloadSchema.value.ast):que,successes:hp(l.successSchema.ast,new Map,jue),errors:c})}}},que=new Map,hp=(e,t,n)=>{const r=new Map(t);function i(s){if(gle(s))return;const a=xB(e.annotations);cK(a)||(s=bf(s,{...a,...s.annotations}));const o=n(s),l=Due(s),c=r.get(o);r.set(o,{description:(c?c.description:V()).pipe(Ki(()=>Kue(s))),ast:(c?c.ast:V()).pipe(Bn(f=>kB(f,s)),Ki(()=>!l&&mle(jy(s))?V():X(s)))})}return z_(e).forEach(i),r},Vue=e=>{const t=new Map;function n(r){if(r._tag==="NeverKeyword")return;r=bf(r,{...xB(e.annotations),...r.annotations});const i=Uv(r),s=zue(r)||Iue(r)?"multipart/form-data":i.contentType,a=t.get(s);a===void 0?t.set(s,{encoding:i,ast:r}):a.ast=pr.make([a.ast,r])}if(e._tag==="Union")for(const r of e.types)n(r);else n(e);return t},Kue=e=>{const t="to"in e?{...e.to.annotations,...e.annotations}:e.annotations;return ef(t[Ul]??t[_m])},Vl=e=>{const t=EB(e),n=[];for(let r=0;r<t.length;r++)if(Array.isArray(t[r][0])){const[i,s]=t[r];n.push([`${i[0]}[${i.slice(1).join("][")}]`,s])}else n.push(t[r]);return n},EB=e=>{const t=Symbol.iterator in e?Ye(e):Object.entries(e),n=[];for(const[r,i]of t)if(Array.isArray(i))for(let s=0;s<i.length;s++)i[s]!==void 0&&n.push([r,String(i[s])]);else if(typeof i=="object"){const s=EB(i);for(const[a,o]of s)n.push([[r,...typeof a=="string"?[a]:a],o])}else i!==void 0&&n.push([r,String(i)]);return n},CB=Nr(wce(ne,ne)).annotations({identifier:"UrlParams"}),Gue=[],Yue=E(2,(e,t)=>{const n=Vl(t),r=new Set;for(let i=0;i<n.length;i++)r.add(n[i][0]);for(let i=0;i<e.length;i++)r.has(e[i][0])||n.push(e[i]);return n}),Jue=E(2,(e,t)=>Nk(e,Vl(t))),Que=(e,t,n)=>{try{const r=new URL(e,Xue());for(let i=0;i<t.length;i++){const[s,a]=t[i];a!==void 0&&r.searchParams.append(s,a)}return n._tag==="Some"&&(r.hash=n.value),de(r)}catch(r){return me(r)}},TB=e=>new URLSearchParams(e).toString(),Xue=()=>{if("location"in globalThis&&globalThis.location!==void 0&&globalThis.location.origin!==void 0&&globalThis.location.pathname!==void 0)return location.origin+location.pathname},Wue=e=>{const t=Object.create(null);for(const[n,r]of e){const i=t[n];i===void 0?t[n]=r:typeof i=="string"?t[n]=[i,r]:i.push(r)}return{...t}},Zue=Hl(ne,CB,{decode(e){return Vl(new URLSearchParams(e))},encode(e){return TB(e)}}),efe=e=>Hl(CB,e,{decode(t){return Wue(t)},encode(t){return Vl(t)}}),tfe=e=>Ko(Zue,efe(e)),cg=Symbol.for("@effect/platform/HttpBody");var XD;class $C{constructor(){g(this,XD);this[cg]=cg}[(XD=cg,Pe)](){return this.toJSON()}toString(){return it(this)}}class nfe extends $C{constructor(){super(...arguments);g(this,"_tag","Empty")}toJSON(){return{_id:"@effect/platform/HttpBody",_tag:"Empty"}}}const rfe=new nfe;class ife extends $C{constructor(n,r){super();g(this,"body");g(this,"contentType");g(this,"_tag","Uint8Array");this.body=n,this.contentType=r}get contentLength(){return this.body.length}toJSON(){return{_id:"@effect/platform/HttpBody",_tag:"Uint8Array",body:this.contentType.startsWith("text/")||this.contentType.endsWith("json")?new TextDecoder().decode(this.body):`Uint8Array(${this.body.length})`,contentType:this.contentType,contentLength:this.contentLength}}}const AB=(e,t)=>new ife(e,t??"application/octet-stream"),sfe=new TextEncoder,OB=(e,t)=>AB(sfe.encode(e),t??"text/plain"),afe=e=>OB(TB(e),"application/x-www-form-urlencoded");class ofe extends $C{constructor(n){super();g(this,"formData");g(this,"_tag","FormData");this.formData=n}toJSON(){return{_id:"@effect/platform/HttpBody",_tag:"FormData",formData:this.formData}}}const lfe=e=>new ofe(e),cfe=cg,ufe=e=>ue(e,cfe),ffe=AB,O2=OB,dfe=afe,R2=Symbol.for("@effect/platform/Cookies"),M2=Symbol.for("@effect/platform/Cookies/Cookie"),hfe={[R2]:R2,...Mb,toJSON(){return{_id:"@effect/platform/Cookies",cookies:Mc(this.cookies,e=>e.toJSON())}},pipe(){return ie(this,arguments)}},mfe=e=>{const t=Object.create(hfe);return t.cookies=e,t},pfe=e=>{const t={};for(const n of e)t[n.name]=n;return mfe(t)},gfe=e=>{const t=typeof e=="string"?[e]:e,n=[];for(const r of t){const i=yfe(r.trim());dt(i)&&n.push(i.value)}return pfe(n)};function yfe(e){const t=e.split(";").map(o=>o.trim()).filter(o=>o!=="");if(t.length===0)return V();const n=t[0].indexOf("=");if(n===-1)return V();const r=t[0].slice(0,n);if(!bfe.test(r))return V();const i=t[0].slice(n+1),s=vfe(i);if(t.length===1)return X(Object.assign(Object.create(N2),{name:r,value:s,valueEncoded:i}));const a={};for(let o=1;o<t.length;o++){const l=t[o],c=l.indexOf("="),f=c===-1?l:l.slice(0,c).trim(),u=c===-1?void 0:l.slice(c+1).trim();switch(f.toLowerCase()){case"domain":{if(u===void 0)break;const d=u.trim().replace(/^\./,"");d&&(a.domain=d);break}case"expires":{if(u===void 0)break;const d=new Date(u);isNaN(d.getTime())||(a.expires=d);break}case"max-age":{if(u===void 0)break;const d=parseInt(u,10);isNaN(d)||(a.maxAge=Ej(d));break}case"path":{if(u===void 0)break;u[0]==="/"&&(a.path=u);break}case"priority":{if(u===void 0)break;switch(u.toLowerCase()){case"low":a.priority="low";break;case"medium":a.priority="medium";break;case"high":a.priority="high";break}break}case"httponly":{a.httpOnly=!0;break}case"secure":{a.secure=!0;break}case"partitioned":{a.partitioned=!0;break}case"samesite":{if(u===void 0)break;switch(u.toLowerCase()){case"lax":a.sameSite="lax";break;case"strict":a.sameSite="strict";break;case"none":a.sameSite="none";break}break}}}return X(Object.assign(Object.create(N2),{name:r,value:s,valueEncoded:i,options:Object.keys(a).length>0?a:void 0}))}const bfe=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,N2={[M2]:M2,...Mb,toJSON(){return{_id:"@effect/platform/Cookies/Cookie",name:this.name,value:this.value,options:this.options}}},vfe=e=>{try{return decodeURIComponent(e)}catch{return e}},D2=Symbol.for("@effect/platform/Headers"),Nh=Object.assign(Object.create(null),{[D2]:D2,[Nb](e){return L_(this,HF(e,MB))}}),Bv=e=>Object.assign(Object.create(Nh),e),RB=Object.create(Nh),LC=e=>{if(e===void 0)return RB;if(Symbol.iterator in e){const n=Object.create(Nh);for(const[r,i]of e)n[r.toLowerCase()]=i;return n}const t=Object.create(Nh);for(const[n,r]of Object.entries(e))Array.isArray(r)?t[n.toLowerCase()]=r.join(", "):r!==void 0&&(t[n.toLowerCase()]=r);return t},Sfe=e=>Object.setPrototypeOf(e,Nh),$_=E(3,(e,t,n)=>{const r=Bv(e);return r[t.toLowerCase()]=n,r}),wfe=E(2,(e,t)=>Bv({...e,...LC(t)})),xfe=E(2,(e,t)=>{const n=Bv(e);return Object.assign(n,t),n}),_fe=E(2,(e,t)=>{const n=Bv(e),r=i=>{if(typeof i=="string"){const s=i.toLowerCase();s in e&&delete n[s]}else for(const s in e)i.test(s)&&delete n[s]};if(Array.isArray(t))for(let i=0;i<t.length;i++)r(t[i]);else r(t);return n}),L_=E(2,(e,t)=>{const n={...e},r=i=>{if(typeof i=="string"){const s=i.toLowerCase();s in e&&(n[s]=u2(e[s]))}else for(const s in e)i.test(s)&&(n[s]=u2(e[s]))};if(Array.isArray(t))for(let i=0;i<t.length;i++)r(t[i]);else r(t);return n}),MB=pe("@effect/platform/Headers/currentRedactedNames",()=>iC(["authorization","cookie","set-cookie","x-api-key"])),kfe=Symbol.for("@effect/platform/HttpClientError"),NB=kfe;class DB extends hB(NB,"RequestError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return this.description?`${this.reason}: ${this.description} (${this.methodAndUrl})`:`${this.reason} error (${this.methodAndUrl})`}}class Ss extends hB(NB,"ResponseError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){const t=`${this.response.status} ${this.methodAndUrl}`;return this.description?`${this.reason}: ${this.description} (${t})`:`${this.reason} error (${t})`}}const Ud=Symbol.for("@effect/platform/HttpIncomingMessage"),Efe=(e,t)=>{const n=e.headers["content-type"]??"";let r;if(n.includes("application/json"))try{r=Wr(e.json)}catch{}else if(n.includes("text/")||n.includes("urlencoded"))try{r=Wr(e.text)}catch{}const i={...t,headers:wk(e.headers),remoteAddress:e.remoteAddress.toJSON()};return r!==void 0&&(i.body=r),i},Cfe=e=>Sfe({b3:`${e.traceId}-${e.spanId}-${e.sampled?"1":"0"}${e.parent._tag==="Some"?`-${e.parent.value.spanId}`:""}`,traceparent:`00-${e.traceId}-${e.spanId}-${e.sampled?"01":"00"}`}),z2=Symbol.for("@effect/platform/HttpClientRequest"),Tfe={[z2]:z2,...Mb,toJSON(){return{_id:"@effect/platform/HttpClientRequest",method:this.method,url:this.url,urlParams:this.urlParams,hash:this.hash,headers:wk(this.headers),body:this.body.toJSON()}},pipe(){return ie(this,arguments)}};function Ei(e,t,n,r,i,s){const a=Object.create(Tfe);return a.method=e,a.url=t,a.urlParams=n,a.hash=r,a.headers=i,a.body=s,a}const Afe=Ei("GET","",Gue,V(),RB,rfe),So=e=>(t,n)=>$fe(Afe,{method:e,url:t,...n??void 0}),Ofe=So("GET"),Rfe=So("POST"),Mfe=So("PUT"),Nfe=So("PATCH"),Dfe=So("DELETE"),zfe=So("HEAD"),Ife=So("OPTIONS"),$fe=E(2,(e,t)=>{let n=e;return t.method&&(n=Ffe(n,t.method)),t.url&&(n=IB(n,t.url)),t.headers&&(n=jC(n,t.headers)),t.urlParams&&(n=$B(n,t.urlParams)),t.hash&&(n=Bfe(n,t.hash)),t.body&&(n=FC(n,t.body)),t.accept&&(n=zB(n,t.accept)),t.acceptJson&&(n=jfe(n)),n}),Lfe=E(3,(e,t,n)=>Ei(e.method,e.url,e.urlParams,e.hash,$_(e.headers,t,n),e.body)),jC=E(2,(e,t)=>Ei(e.method,e.url,e.urlParams,e.hash,wfe(e.headers,t),e.body)),zB=E(2,(e,t)=>Lfe(e,"Accept",t)),jfe=zB("application/json"),Ffe=E(2,(e,t)=>Ei(t,e.url,e.urlParams,e.hash,e.headers,e.body)),IB=E(2,(e,t)=>{if(typeof t=="string")return Ei(e.method,t,e.urlParams,e.hash,e.headers,e.body);const n=new URL(t.toString()),r=Vl(n.searchParams),i=n.hash?X(n.hash.slice(1)):V();return n.search="",n.hash="",Ei(e.method,n.toString(),r,i,e.headers,e.body)}),Pfe=E(2,(e,t)=>Ei(e.method,t.endsWith("/")&&e.url.startsWith("/")?t+e.url.slice(1):t+e.url,e.urlParams,e.hash,e.headers,e.body)),Ufe=E(2,(e,t)=>Ei(e.method,e.url,Jue(e.urlParams,t),e.hash,e.headers,e.body)),$B=E(2,(e,t)=>Ei(e.method,e.url,Yue(e.urlParams,t),e.hash,e.headers,e.body)),Bfe=E(2,(e,t)=>Ei(e.method,e.url,e.urlParams,X(t),e.headers,e.body)),FC=E(2,(e,t)=>{let n=e.headers;if(t._tag==="Empty"||t._tag==="FormData")n=_fe(n,["Content-type","Content-length"]);else{const r=t.contentType;r&&(n=$_(n,"content-type",r));const i=t.contentLength;i&&(n=$_(n,"content-length",i.toString()))}return Ei(e.method,e.url,e.urlParams,e.hash,n,t)}),Hfe=E(2,(e,t)=>FC(e,lfe(t))),Bd=Symbol.for("@effect/platform/HttpClientResponse"),qfe=(e,t)=>new Vfe(e,t);var WD,ZD,ez;class Vfe extends(ez=WV,ZD=Ud,WD=Bd,ez){constructor(n,r){super();g(this,"request");g(this,"source");g(this,ZD);g(this,WD);g(this,"cachedCookies");g(this,"textBody");g(this,"formDataBody");g(this,"arrayBufferBody");this.request=n,this.source=r,this[Ud]=Ud,this[Bd]=Bd}toJSON(){return Efe(this,{_id:"@effect/platform/HttpClientResponse",request:this.request.toJSON(),status:this.status})}get status(){return this.source.status}get headers(){return LC(this.source.headers)}get cookies(){return this.cachedCookies?this.cachedCookies:this.cachedCookies=gfe(this.source.headers.getSetCookie())}get remoteAddress(){return V()}get stream(){return this.source.body?Noe(()=>this.source.body,n=>new Ss({request:this.request,response:this,reason:"Decode",cause:n})):Toe(new Ss({request:this.request,response:this,reason:"EmptyBody",description:"can not create stream from empty body"}))}get json(){return Lie(this.text,{try:n=>n===""?null:JSON.parse(n),catch:n=>new Ss({request:this.request,response:this,reason:"Decode",cause:n})})}get text(){return this.textBody??(this.textBody=Dd({try:()=>this.source.text(),catch:n=>new Ss({request:this.request,response:this,reason:"Decode",cause:n})}).pipe(o0,Wr))}get urlParamsBody(){return ce(this.text,n=>$ie({try:()=>Vl(new URLSearchParams(n)),catch:r=>new Ss({request:this.request,response:this,reason:"Decode",cause:r})}))}get formData(){return this.formDataBody??(this.formDataBody=Dd({try:()=>this.source.formData(),catch:n=>new Ss({request:this.request,response:this,reason:"Decode",cause:n})}).pipe(o0,Wr))}get arrayBuffer(){return this.arrayBufferBody??(this.arrayBufferBody=Dd({try:()=>this.source.arrayBuffer(),catch:n=>new Ss({request:this.request,response:this,reason:"Decode",cause:n})}).pipe(o0,Wr))}}const Kfe=E(2,(e,t)=>{const n=e.status;return t[n]?t[n](e):n>=200&&n<300&&t["2xx"]?t["2xx"](e):n>=300&&n<400&&t["3xx"]?t["3xx"](e):n>=400&&n<500&&t["4xx"]?t["4xx"](e):n>=500&&n<600&&t["5xx"]?t["5xx"](e):t.orElse(e)}),Gfe=e=>`http.request.header.${e}`,Yfe="http.request.method",Jfe=e=>`http.response.header.${e}`,Qfe="http.response.status_code",Xfe="server.address",Wfe="server.port",Zfe="url.full",ede="url.path",tde="url.scheme",nde="url.query",I2=Symbol.for("@effect/platform/HttpClient"),PC=mo("@effect/platform/HttpClient"),rde=pe(Symbol.for("@effect/platform/HttpClient/tracerDisabledWhen"),()=>iC(La)),ide=pe(Symbol.for("@effect/platform/HttpClient/currentTracerPropagation"),()=>iC(!0)),sde=Zu()("@effect/platform/HttpClient/SpanNameGenerator",{defaultValue:()=>e=>`http.client ${e.method}`}),ade={[I2]:I2,pipe(){return ie(this,arguments)},...Mb,toJSON(){return{_id:"@effect/platform/HttpClient"}},get(e,t){return this.execute(Ofe(e,t))},head(e,t){return this.execute(zfe(e,t))},post(e,t){return this.execute(Rfe(e,t))},put(e,t){return this.execute(Mfe(e,t))},patch(e,t){return this.execute(Nfe(e,t))},del(e,t){return this.execute(Dfe(e,t))},options(e,t){return this.execute(Ife(e,t))}},UC=(e,t)=>{const n=Object.create(ade);return n.preprocess=t,n.postprocess=e,n.execute=function(r){return e(t(r))},n},Vy=pe("@effect/platform/HttpClient/responseRegistry",()=>{if("FinalizationRegistry"in globalThis&&globalThis.FinalizationRegistry){const t=new FinalizationRegistry(n=>{n.abort()});return{register(n,r){t.register(n,r,n)},unregister(n){t.unregister(n)}}}const e=new Map;return{register(t,n){e.set(t,setTimeout(()=>n.abort(),5e3))},unregister(t){const n=e.get(t);n!==void 0&&(clearTimeout(n),e.delete(t))}}}),ode=pe("@effect/platform/HttpClient/scopedRequests",()=>new WeakMap),lde=e=>UC(t=>ce(t,n=>Oy(r=>{const i=ode.get(n),s=i??new AbortController,a=Que(n.url,n.urlParams,n.hash);if(a._tag==="Left")return ss(new DB({request:n,reason:"InvalidUrl",cause:a.left}));const o=a.right;if(!r.getFiberRef(dse)||r.getFiberRef(rde)(n)){const f=e(n,o,s.signal,r);return i?f:Ry(u=>pi(u(f),{onSuccess(d){return Vy.register(d,s),yt(new $2(d,s))},onFailure(d){return ky(d)&&s.abort(),bi(d)}}))}const c=$s(r.currentContext,sde);return Wie(c(n),{kind:"client",captureStackTrace:!1},f=>{f.attribute(Yfe,n.method),f.attribute(Xfe,o.origin),o.port!==""&&f.attribute(Wfe,+o.port),f.attribute(Zfe,o.toString()),f.attribute(ede,o.pathname),f.attribute(tde,o.protocol.slice(0,-1));const u=o.search.slice(1);u!==""&&f.attribute(nde,u);const d=r.getFiberRef(MB),h=L_(n.headers,d);for(const p in h)f.attribute(Gfe(p),String(h[p]));return n=r.getFiberRef(ide)?jC(n,Cfe(f)):n,Ry(p=>p(e(n,o,s.signal,r)).pipe(Zie(f),pi({onSuccess:b=>{f.attribute(Qfe,b.status);const S=L_(b.headers,d);for(const m in S)f.attribute(Jfe(m),String(S[m]));return i?yt(b):(Vy.register(b,s),yt(new $2(b,s)))},onFailure(b){return!i&&ky(b)&&s.abort(),bi(b)}})))})})),yt);var tz,nz;class $2{constructor(t,n){g(this,"original");g(this,"controller");g(this,nz,Bd);g(this,tz,Ud);this.original=t,this.controller=n}applyInterrupt(t){return Rt(()=>(Vy.unregister(this.original),jie(t,()=>at(()=>{this.controller.abort()}))))}get request(){return this.original.request}get status(){return this.original.status}get headers(){return this.original.headers}get cookies(){return this.original.cookies}get remoteAddress(){return this.original.remoteAddress}get formData(){return this.applyInterrupt(this.original.formData)}get text(){return this.applyInterrupt(this.original.text)}get json(){return this.applyInterrupt(this.original.json)}get urlParamsBody(){return this.applyInterrupt(this.original.urlParamsBody)}get arrayBuffer(){return this.applyInterrupt(this.original.arrayBuffer)}get stream(){return Ioe(()=>(Vy.unregister(this.original),Y4(this.original.stream,at(()=>{this.controller.abort()}))))}toJSON(){return this.original.toJSON()}[(nz=Bd,tz=Ud,Pe)](){return this.original[Pe]()}}const{del:PEe,execute:UEe,get:BEe,head:HEe,options:qEe,patch:VEe,post:KEe,put:GEe}=qie(PC),cde=E(2,(e,t)=>{const n=e;return UC(r=>t(n.postprocess(r)),n.preprocess)}),ude=E(2,(e,t)=>{const n=e;return UC(n.postprocess,r=>Je(n.preprocess(r),t))}),fde=e=>use(PC,ce(MP(),t=>Je(e,n=>cde(n,NP(r=>sr(t,r)))))),dde=PC,hde=ude,mde=So,pde=jC,gde=IB,yde=Pfe,bde=$B,vde=Ufe,Sde=FC,wde=Hfe,xde=Kfe,L2=e=>e!=="GET"&&e!=="HEAD"&&e!=="OPTIONS",_de=(e,t)=>Qc(function*(){const n=yield*MP(),r=t.httpClient.pipe((t==null?void 0:t.baseUrl)===void 0?ge:hde(yde(t.baseUrl.toString())));Hue(e,{predicate:t==null?void 0:t.predicate,onGroup(i){var s;(s=t.onGroup)==null||s.call(t,i)},onEndpoint(i){const{endpoint:s,errors:a,successes:o}=i,l=Tde(s.path),c={orElse:Mde},f=xde(c);a.forEach(({ast:S},m)=>{if(S._tag==="None"){c[m]=Nde;return}const y=j2(S.value);c[m]=v=>ce(y(v),ss)}),o.forEach(({ast:S},m)=>{c[m]=S._tag==="None"?Dde:j2(S.value)});const u=s.pathSchema.pipe(Bn(qf)),d=s.payloadSchema.pipe(Bn(S=>L2(s.method)?qf(Ide(S)):qf(S))),h=s.headersSchema.pipe(Bn(qf)),p=s.urlParamsSchema.pipe(Bn(qf)),b=LP(function*(S){let m=mde(s.method)(s.path);if(S&&S.path){const _=u._tag==="Some"?yield*u.value(S.path):S.path;m=gde(m,l(_))}if(S&&S.payload instanceof FormData)m=wde(m,S.payload);else if(d._tag==="Some")if(L2(s.method)){const _=yield*d.value(S.payload);m=Sde(m,_)}else{const _=yield*d.value(S.payload);m=bde(m,_)}h._tag==="Some"&&(m=pde(m,yield*h.value(S.headers))),p._tag==="Some"&&(m=vde(m,yield*p.value(S.urlParams)));const y=yield*r.execute(m),v=yield*t.transformResponse===void 0?f(y):t.transformResponse(f(y));return(S==null?void 0:S.withResponse)===!0?[v,y]:v},NP(S=>sr(n,S)));t.onEndpoint({...i,endpointFn:b})}})}),kde=(e,t)=>ce(dde,n=>Ede(e,{...t,httpClient:t!=null&&t.transformClient?t.transformClient(n):n})),Ede=(e,t)=>{const n={};return _de(e,{...t,onGroup({group:r}){r.topLevel||(n[r.identifier]={})},onEndpoint({endpoint:r,endpointFn:i,group:s}){(s.topLevel?n:n[s.identifier])[r.name]=i}}).pipe(Je(()=>n))},Cde=/:(\w+)\??/g,Tde=e=>{const t=e.split(Cde),n=t.length;return n===1?r=>e:r=>{let i=t[0];for(let s=1;s<n;s++)s%2===0?i+=t[s]:i+=r[t[s]];return i}},j2=e=>{const t=Uv(e),n=fce(LB(e,t));return r=>ce(r.arrayBuffer,n)},Ade=Hl(zv,zce,{decode(e){return new Uint8Array(e)},encode(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}}),j_=Hl(zv,ne,{decode(e){return new TextDecoder().decode(e)},encode(e){const t=new TextEncoder().encode(e);return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}}),Ode=_l(ne,zv,{strict:!0,decode:(e,t,n)=>e===""?nr(void 0):Fy({try:()=>JSON.parse(e),catch:()=>new wn(n,e,"Could not parse JSON")}),encode:(e,t,n)=>e===void 0?nr(""):Fy({try:()=>JSON.stringify(e),catch:()=>new wn(n,e,"Could not encode as JSON")})}),Rde=Ko(j_,Ode),LB=(e,t)=>{if(e._tag==="Union")return Iv(...e.types.map(r=>LB(r,Uv(r,t))));const n=ht(e);switch(t.kind){case"Json":return Ko(Rde,n);case"UrlParams":return Ko(j_,tfe(n));case"Uint8Array":return Ko(Ade,n);case"Text":return Ko(j_,n)}},Mde=e=>ss(new Ss({reason:"Decode",request:e.request,response:e})),Nde=e=>ss(new Ss({reason:"StatusCode",request:e.request,response:e})),Dde=e=>je,zde=km(ufe),Ide=e=>{const t=e.ast._tag==="Union"?e.ast.types:[e.ast];return Iv(...t.map($de))},R0=pe("@effect/platform/HttpApiClient/bodyFromPayloadCache",()=>new WeakMap),$de=e=>{if(R0.has(e))return R0.get(e);const t=ht(e),n=Uv(e),r=_l(zde,t,{decode(i,s,a){return Ta(new w_(a,i,"encode only schema"))},encode(i,s,a){switch(n.kind){case"Json":try{return nr(O2(JSON.stringify(i),n.contentType))}catch{return Ta(new wn(a,i,"Could not encode as JSON"))}case"Text":return typeof i!="string"?Ta(new wn(a,i,"Expected a string")):nr(O2(i,n.contentType));case"UrlParams":return nr(dfe(Vl(i)));case"Uint8Array":return i instanceof Uint8Array?nr(ffe(i,n.contentType)):Ta(new wn(a,i,"Expected a Uint8Array"))}}});return R0.set(e,r),r},Lde=e=>{if(Array.isArray(e))return CR(e);const t=Object.create(Kre.prototype);for(const n in e){const r=e[n];Array.isArray(r)&&(t[n]=CR(r))}return t},jde=()=>(e,t)=>{const n=Ak(e)();n.layer=FP(n,kde(t.api,t)).pipe(PP(t.httpClient)),n.runtime=zC(n.layer);const r=C2(({endpoint:s,group:a,withResponse:o})=>n.runtime.fn()(LP(function*(l){const f=(yield*n)[a][s]({...l,withResponse:o});return yield*l.reactivityKeys?X4(f,l.reactivityKeys):f})));n.mutation=(s,a,o)=>r(new Fde({group:s,endpoint:a,withResponse:(o==null?void 0:o.withResponse)??!1}));const i=C2(s=>{let a=n.runtime.atom(ce(n,o=>o[s.group][s.endpoint](s)));return s.timeToLive&&(a=kj(s.timeToLive)?SB(a,s.timeToLive):vo(a)),s.reactivityKeys?n.runtime.factory.withReactivity(s.reactivityKeys)(a):a});return n.query=(s,a,o)=>i(new Pde({group:s,endpoint:a,path:o.path&&lp(o.path),urlParams:o.urlParams&&lp(o.urlParams),payload:o.payload&&lp(o.payload),headers:o.headers&&lp(o.headers),withResponse:o.withResponse??!1,reactivityKeys:o.reactivityKeys?Lde(o.reactivityKeys):void 0,timeToLive:o.timeToLive?ni(o.timeToLive):void 0})),n};class Fde extends VE{[ve](t){return this.group===t.group&&this.endpoint===t.endpoint&&this.withResponse===t.withResponse}[be](){return O(gt(`${this.group}/${this.endpoint}/${this.withResponse}`),tt(this))}}class Pde extends VE{[ve](t){return this.group===t.group&&this.endpoint===t.endpoint&&oe(this.path,t.path)&&oe(this.urlParams,t.urlParams)&&oe(this.payload,t.payload)&&oe(this.headers,t.headers)&&oe(this.withResponse,t.withResponse)&&oe(this.reactivityKeys,t.reactivityKeys)&&oe(this.timeToLive,t.timeToLive)}[be](){return O(gt(`${this.group}/${this.endpoint}`),Se(re(this.path)),Se(re(this.urlParams)),Se(re(this.payload)),Se(re(this.headers)),Se(re(this.withResponse)),Se(re(this.reactivityKeys)),Se(re(this.timeToLive)),tt(this))}}const Ude=Symbol.for("@effect/matcher/Matcher"),Bde={[Ude]:{_input:ge,_filters:ge,_remaining:ge,_result:ge,_provided:ge,_return:ge},_tag:"ValueMatcher",add(e){return this.value._tag==="Right"?this:e._tag==="When"&&e.guard(this.provided)===!0?F_(this.provided,de(e.evaluate(this.provided))):e._tag==="Not"&&e.guard(this.provided)===!1?F_(this.provided,de(e.evaluate(this.provided))):this},pipe(){return ie(this,arguments)}};function F_(e,t){const n=Object.create(Bde);return n.provided=e,n.value=t,n}const Hde=(e,t)=>({_tag:"When",guard:e,evaluate:t}),P_=e=>{if(typeof e=="function")return e;if(Array.isArray(e)){const t=e.map(P_),n=t.length;return r=>{if(!Array.isArray(r))return!1;for(let i=0;i<n;i++)if(t[i](r[i])===!1)return!1;return!0}}else if(e!==null&&typeof e=="object"){const t=Object.entries(e).map(([r,i])=>[r,P_(i)]),n=t.length;return r=>{if(typeof r!="object"||r===null)return!1;for(let i=0;i<n;i++){const[s,a]=t[i];if(!(s in r)||a(r[s])===!1)return!1}return!0}}return t=>t===e},qde=e=>F_(e,me(e)),Vde=(e,t)=>n=>n.add(Hde(P_(e),t)),Kde=e=>t=>{const n=Gde(t);return zL(n)?n._tag==="Right"?n.right:e(n.left):r=>{const i=n(r);return i._tag==="Right"?i.right:e(i.left)}},Gde=e=>{if(e._tag==="ValueMatcher")return e.value;const t=e.cases.length;if(t===1){const n=e.cases[0];return r=>n._tag==="When"&&n.guard(r)===!0||n._tag==="Not"&&n.guard(r)===!1?de(n.evaluate(r)):me(r)}return n=>{for(let r=0;r<t;r++){const i=e.cases[r];if(i._tag==="When"&&i.guard(n)===!0)return de(i.evaluate(n));if(i._tag==="Not"&&i.guard(n)===!1)return de(i.evaluate(n))}return me(n)}},jB=qde,Hd=Vde,FB=Kde;function Yde(e){uw.unstable_scheduleCallback(uw.unstable_LowPriority,e)}const PB=x.createContext(pue({scheduleTask:Yde,defaultIdleTTL:400})),F2=pe("@effect-atom/atom-react/storeRegistry",()=>new WeakMap);function Jde(e,t){let n=F2.get(e);n===void 0&&(n=new WeakMap,F2.set(e,n));const r=n.get(t);if(r!==void 0)return r;const i={subscribe(s){return e.subscribe(t,s)},snapshot(){return e.get(t)},getServerSnapshot(){return Mue(t,e)}};return n.set(t,i),i}function Qde(e,t){const n=Jde(e,t);return x.useSyncExternalStore(n.subscribe,n.snapshot,n.getServerSnapshot)}const Zr=(e,t)=>{const n=x.useContext(PB);return Qde(n,e)};function Xde(e,t){x.useEffect(()=>e.mount(t),[t,e])}function Wde(e,t,n){return x.useCallback(r=>{e.set(t,typeof r=="function"?r(e.get(t)):r)},[e,t])}const Sr=(e,t)=>{const n=x.useContext(PB);return Xde(n,e),Wde(n,e)},Zde="@effect/platform/FetchHttpClient/Fetch",ehe="@effect/platform/FetchHttpClient/FetchOptions",the=lde((e,t,n,r)=>{const i=r.getFiberRef(UP),s=i.unsafeMap.get(Zde)??globalThis.fetch,a=i.unsafeMap.get(ehe)??{},o=a.headers?xfe(LC(a.headers),e.headers):e.headers,l=c=>Je(Dd({try:()=>s(t,{...a,method:e.method,headers:o,body:c,duplex:e.body._tag==="Stream"?"half":void 0,signal:n}),catch:f=>new DB({request:e,reason:"Transport",cause:f})}),f=>qfe(e,f));switch(e.body._tag){case"Raw":case"Uint8Array":return l(e.body.body);case"FormData":return l(e.body.formData);case"Stream":return ce($oe(e.body.stream),l)}return l(void 0)}),nhe=fde(yt(the)),rhe=nhe,ihe=e=>e.endsWith("/")?e.slice(0,-1):e,she=E(2,(e,t)=>(t=ihe(t),e==="/"?t:t+e)),ahe=she,P2=Symbol.for("@effect/platform/HttpApiEndpoint"),ohe={[P2]:P2,pipe(){return ie(this,arguments)},addSuccess(e,t){return e=t!=null&&t.status?e.annotations($u({status:t.status})):e,$r({...this,successSchema:this.successSchema===I_?e:Ga(this.successSchema,e)})},addError(e,t){return $r({...this,errorSchema:Ga(this.errorSchema,t!=null&&t.status?e.annotations($u({status:t.status})):e)})},setPayload(e){return $r({...this,payloadSchema:X(e)})},setPath(e){return $r({...this,pathSchema:X(e)})},setUrlParams(e){return $r({...this,urlParamsSchema:X(e)})},setHeaders(e){return $r({...this,headersSchema:X(e)})},prefix(e){return $r({...this,path:ahe(this.path,e)})},middleware(e){return $r({...this,errorSchema:Ga(this.errorSchema,e.failure),middlewares:new Set([...this.middlewares,e])})},annotate(e,t){return $r({...this,annotations:Gr(this.annotations,e,t)})},annotateContext(e){return $r({...this,annotations:sr(this.annotations,e)})}},$r=e=>Object.assign(Object.create(ohe),e),UB=e=>(t,...n)=>n.length===1?$r({name:t,path:n[0],method:e,pathSchema:V(),urlParamsSchema:V(),payloadSchema:V(),headersSchema:V(),successSchema:I_,errorSchema:Oh,annotations:Xi(),middlewares:new Set}):(r,...i)=>{let s=r[0].replace(":","::"),a=V();if(i.length>0){const o={};for(let l=0;l<i.length;l++){const c=i[l],f=Lue(c.ast)??String(l),u=c.ast._tag==="PropertySignatureTransformation"&&c.ast.from.isOptional||c.ast._tag==="PropertySignatureDeclaration"&&c.ast.isOptional;o[f]=c,s+=`:${f}${u?"?":""}${r[l+1].replace(":","::")}`}a=X(Ct(o))}return $r({name:t,path:s,method:e,pathSchema:a,urlParamsSchema:V(),payloadSchema:V(),headersSchema:V(),successSchema:I_,errorSchema:Oh,annotations:Xi(),middlewares:new Set})},Hv=UB("GET"),mp=UB("POST"),U2=Symbol.for("@effect/platform/HttpApiGroup"),lhe={[U2]:U2,add(e){return Di({identifier:this.identifier,topLevel:this.topLevel,endpoints:{...this.endpoints,[e.name]:e},errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},addError(e,t){return Di({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:Ga(this.errorSchema,t!=null&&t.status?e.annotations($u({status:t.status})):e),annotations:this.annotations,middlewares:this.middlewares})},prefix(e){return Di({identifier:this.identifier,topLevel:this.topLevel,endpoints:Mc(this.endpoints,t=>t.prefix(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},middleware(e){return Di({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:Ga(this.errorSchema,e.failure),annotations:this.annotations,middlewares:new Set([...this.middlewares,e])})},middlewareEndpoints(e){return Di({identifier:this.identifier,topLevel:this.topLevel,endpoints:Mc(this.endpoints,t=>t.middleware(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},annotateContext(e){return Di({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:this.errorSchema,annotations:sr(this.annotations,e),middlewares:this.middlewares})},annotate(e,t){return Di({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:this.errorSchema,annotations:Gr(this.annotations,e,t),middlewares:this.middlewares})},annotateEndpointsContext(e){return Di({identifier:this.identifier,topLevel:this.topLevel,endpoints:Mc(this.endpoints,t=>t.annotateContext(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},annotateEndpoints(e,t){return Di({identifier:this.identifier,topLevel:this.topLevel,endpoints:Mc(this.endpoints,n=>n.annotate(e,t)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},pipe(){return ie(this,arguments)}},Di=e=>{function t(){}return Object.setPrototypeOf(t,lhe),Object.assign(t,e)},qv=(e,t)=>Di({identifier:e,topLevel:!1,endpoints:lK(),errorSchema:Oh,annotations:Xi(),middlewares:new Set}),che=ne.pipe(Cm("PullRequestId")),uhe=ne.pipe(Cm("RepositoryName")),fhe=ne.pipe(Cm("AwsProfileName")),dhe=ne.pipe(Cm("AwsRegion")),B2=ne.pipe(Cm("CommentId")),hhe=Bl("OPEN","CLOSED"),mhe=Bl("error","info","warning","success"),phe=Bl("idle","loading","error");class Ky extends jv("Account")({id:fhe,region:dhe}){}class ghe extends jv("PullRequest")({id:che,title:ne,description:Wt(ne),author:ne,repositoryName:uhe,creationDate:Rh,lastModifiedDate:Rh,link:ne,account:Ky,status:hhe,sourceBranch:ne,destinationBranch:ne,isMergeable:Gs,isApproved:Gs,commentCount:Wt(Em)}){get consoleUrl(){return`https://${this.account.region}.console.aws.amazon.com/codesuite/codecommit/repositories/${this.repositoryName}/pull-requests/${this.id}?region=${this.account.region}`}}class YEe extends jv("PRComment")({id:B2,content:ne,author:ne,creationDate:Rh,inReplyTo:Wt(B2),deleted:Gs,filePath:Wt(ne),lineNumber:Wt(Em)}){}const yhe=Ct({id:ne,content:ne,author:ne,creationDate:ne,inReplyTo:Wt(ne),deleted:Gs,filePath:Wt(ne),lineNumber:Wt(Em)}),BB=Ct({root:yhe,replies:Nr(Ace(()=>BB))}),bhe=Ct({filePath:Wt(ne),beforeCommitId:Wt(ne),afterCommitId:Wt(ne),comments:Nr(BB)});class JEe extends jv("NotificationItem")({type:mhe,title:ne,message:ne,timestamp:Rh}){}class M0 extends dB()("ApiError",{message:ne}){}class vhe extends qv("prs").add(Hv("list","/").addSuccess(uB(ghe))).add(mp("refresh","/refresh").addSuccess(ne)).add(mp("create","/").setPayload(Ct({repositoryName:ne,title:ne,description:Wt(ne),sourceBranch:ne,destinationBranch:ne,account:Ky})).addSuccess(ne).addError(M0)).add(mp("open","/open").setPayload(Ct({profile:ne,link:ne})).addSuccess(ne).addError(M0)).add(mp("comments","/comments").setPayload(Ct({pullRequestId:ne,repositoryName:ne,account:Ky})).addSuccess(Nr(bhe)).addError(M0)).prefix("/api/prs"){}class She extends qv("events").add(Hv("stream","/").addSuccess(ne)).prefix("/api/events"){}const whe=Ct({accounts:Nr(Ct({profile:ne,regions:Nr(ne),enabled:Gs})),autoDetect:Gs,currentUser:Wt(ne)});class xhe extends qv("config").add(Hv("list","/").addSuccess(whe)).prefix("/api/config"){}class _he extends qv("accounts").add(Hv("list","/").addSuccess(uB(Ky))).prefix("/api/accounts"){}class khe extends Bue().add(vhe).add(She).add(xhe).add(_he){}class Kl extends jde()("ApiClient",{api:khe,baseUrl:"/",httpClient:rhe}){}zC(Kl.layer);const Ehe={pullRequests:[],accounts:[],status:"idle"};Kl.query("prs","list",{reactivityKeys:["prs"],timeToLive:"30 seconds"});Kl.query("config","list",{reactivityKeys:["config"],timeToLive:"60 seconds"});Kl.query("accounts","list",{reactivityKeys:["accounts"],timeToLive:"60 seconds"});const HB=Kl.mutation("prs","refresh"),Che=Kl.mutation("prs","open"),H2=Kl.mutation("prs","comments"),Rm=ql(Ehe).pipe(vo),Vv=ql("prs").pipe(vo),U_=ql("").pipe(vo),qB=ql(null).pipe(vo),Gy=ql({type:"all"}).pipe(vo),q2=ql(!1).pipe(vo),The=Ct({id:ne,title:ne,description:Wt(ne),author:ne,repositoryName:ne,creationDate:C_,lastModifiedDate:C_,link:ne,account:Ct({id:ne,region:ne}),status:Bl("OPEN","CLOSED"),sourceBranch:ne,destinationBranch:ne,isMergeable:Gs,isApproved:Gs,commentCount:Wt(Em)}),Ahe=Ct({pullRequests:Nr(The),accounts:Nr(Ct({profile:ne,region:ne,enabled:Gs})),status:phe,statusDetail:Wt(ne),error:Wt(ne),lastUpdated:Wt(C_),currentUser:Wt(ne)}),Ohe=Gle(cB(Ahe));function Rhe(e){const t=x.useRef(e);t.current=e,x.useEffect(()=>{const n=new EventSource("/api/events/");return n.onmessage=r=>{try{t.current(Ohe(r.data))}catch{}},()=>n.close()},[])}/**
|
|
76
|
+
* @license lucide-react v0.563.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const VB=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
81
|
+
* @license lucide-react v0.563.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const Mhe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
86
|
+
* @license lucide-react v0.563.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const Nhe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
|
91
|
+
* @license lucide-react v0.563.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const V2=e=>{const t=Nhe(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
96
|
+
* @license lucide-react v0.563.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/var Dhe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
101
|
+
* @license lucide-react v0.563.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const zhe=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
|
106
|
+
* @license lucide-react v0.563.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const Ihe=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:a,...o},l)=>x.createElement("svg",{ref:l,...Dhe,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:VB("lucide",i),...!s&&!zhe(o)&&{"aria-hidden":"true"},...o},[...a.map(([c,f])=>x.createElement(c,f)),...Array.isArray(s)?s:[s]]));/**
|
|
111
|
+
* @license lucide-react v0.563.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const Yn=(e,t)=>{const n=x.forwardRef(({className:r,...i},s)=>x.createElement(Ihe,{ref:s,iconNode:t,className:VB(`lucide-${Mhe(V2(e))}`,`lucide-${e}`,r),...i}));return n.displayName=V2(e),n};/**
|
|
116
|
+
* @license lucide-react v0.563.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const $he=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Lhe=Yn("arrow-left",$he);/**
|
|
121
|
+
* @license lucide-react v0.563.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const jhe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Fhe=Yn("arrow-right",jhe);/**
|
|
126
|
+
* @license lucide-react v0.563.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const Phe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Uhe=Yn("check",Phe);/**
|
|
131
|
+
* @license lucide-react v0.563.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const Bhe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],BC=Yn("chevron-down",Bhe);/**
|
|
136
|
+
* @license lucide-react v0.563.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const Hhe=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],qhe=Yn("chevron-up",Hhe);/**
|
|
141
|
+
* @license lucide-react v0.563.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const Vhe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Khe=Yn("external-link",Vhe);/**
|
|
146
|
+
* @license lucide-react v0.563.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const Ghe=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],Yhe=Yn("flame",Ghe);/**
|
|
151
|
+
* @license lucide-react v0.563.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const Jhe=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],K2=Yn("funnel",Jhe);/**
|
|
156
|
+
* @license lucide-react v0.563.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const Qhe=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],G2=Yn("loader",Qhe);/**
|
|
161
|
+
* @license lucide-react v0.563.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const Xhe=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Whe=Yn("message-square",Xhe);/**
|
|
166
|
+
* @license lucide-react v0.563.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const Zhe=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],eme=Yn("moon",Zhe);/**
|
|
171
|
+
* @license lucide-react v0.563.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const tme=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],KB=Yn("refresh-cw",tme);/**
|
|
176
|
+
* @license lucide-react v0.563.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const nme=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],GB=Yn("search",nme);/**
|
|
181
|
+
* @license lucide-react v0.563.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const rme=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],ime=Yn("sun",rme);/**
|
|
186
|
+
* @license lucide-react v0.563.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const sme=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],YB=Yn("x",sme);var Y2=1,ame=.9,ome=.8,lme=.17,N0=.1,D0=.999,cme=.9999,ume=.99,fme=/[\\\/_+.#"@\[\(\{&]/,dme=/[\\\/_+.#"@\[\(\{&]/g,hme=/[\s-]/,JB=/[\s-]/g;function B_(e,t,n,r,i,s,a){if(s===t.length)return i===e.length?Y2:ume;var o=`${i},${s}`;if(a[o]!==void 0)return a[o];for(var l=r.charAt(s),c=n.indexOf(l,i),f=0,u,d,h,p;c>=0;)u=B_(e,t,n,r,c+1,s+1,a),u>f&&(c===i?u*=Y2:fme.test(e.charAt(c-1))?(u*=ome,h=e.slice(i,c-1).match(dme),h&&i>0&&(u*=Math.pow(D0,h.length))):hme.test(e.charAt(c-1))?(u*=ame,p=e.slice(i,c-1).match(JB),p&&i>0&&(u*=Math.pow(D0,p.length))):(u*=lme,i>0&&(u*=Math.pow(D0,c-i))),e.charAt(c)!==t.charAt(s)&&(u*=cme)),(u<N0&&n.charAt(c-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(c-1)!==r.charAt(s))&&(d=B_(e,t,n,r,c+1,s+2,a),d*N0>u&&(u=d*N0)),u>f&&(f=u),c=n.indexOf(l,c+1);return a[o]=f,f}function J2(e){return e.toLowerCase().replace(JB," ")}function mme(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,B_(e,t,J2(e),J2(t),0,0,{})}function He(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Q2(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ao(...e){return t=>{let n=!1;const r=e.map(i=>{const s=Q2(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():Q2(e[i],null)}}}}function Tt(...e){return x.useCallback(ao(...e),e)}function pme(e,t){const n=x.createContext(t),r=s=>{const{children:a,...o}=s,l=x.useMemo(()=>o,Object.values(o));return w.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function i(s){const a=x.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,i]}function Sf(e,t=[]){let n=[];function r(s,a){const o=x.createContext(a),l=n.length;n=[...n,a];const c=u=>{var m;const{scope:d,children:h,...p}=u,b=((m=d==null?void 0:d[e])==null?void 0:m[l])||o,S=x.useMemo(()=>p,Object.values(p));return w.jsx(b.Provider,{value:S,children:h})};c.displayName=s+"Provider";function f(u,d){var b;const h=((b=d==null?void 0:d[e])==null?void 0:b[l])||o,p=x.useContext(h);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${s}\``)}return[c,f]}const i=()=>{const s=n.map(a=>x.createContext(a));return function(o){const l=(o==null?void 0:o[e])||s;return x.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return i.scopeName=e,[r,gme(i,...t)]}function gme(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=r.reduce((o,{useScope:l,scopeName:c})=>{const u=l(s)[`__scope${c}`];return{...o,...u}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Nn=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},yme=S1[" useId ".trim().toString()]||(()=>{}),bme=0;function Tr(e){const[t,n]=x.useState(yme());return Nn(()=>{n(r=>r??String(bme++))},[e]),e||(t?`radix-${t}`:"")}var vme=S1[" useInsertionEffect ".trim().toString()]||Nn;function El({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,a]=Sme({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:i;{const f=x.useRef(e!==void 0);x.useEffect(()=>{const u=f.current;u!==o&&console.warn(`${r} is changing from ${u?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=o},[o,r])}const c=x.useCallback(f=>{var u;if(o){const d=wme(f)?f(e):f;d!==e&&((u=a.current)==null||u.call(a,d))}else s(f)},[o,e,s,a]);return[l,c]}function Sme({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),s=x.useRef(t);return vme(()=>{s.current=t},[t]),x.useEffect(()=>{var a;i.current!==n&&((a=s.current)==null||a.call(s,n),i.current=n)},[n,i]),[n,r,s]}function wme(e){return typeof e=="function"}function Lu(e){const t=xme(e),n=x.forwardRef((r,i)=>{const{children:s,...a}=r,o=x.Children.toArray(s),l=o.find(kme);if(l){const c=l.props.children,f=o.map(u=>u===l?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:u);return w.jsx(t,{...a,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,f):null})}return w.jsx(t,{...a,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var QB=Lu("Slot");function xme(e){const t=x.forwardRef((n,r)=>{const{children:i,...s}=n;if(x.isValidElement(i)){const a=Cme(i),o=Eme(s,i.props);return i.type!==x.Fragment&&(o.ref=r?ao(r,a):a),x.cloneElement(i,o)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _me=Symbol("radix.slottable");function kme(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_me}function Eme(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{const l=s(...o);return i(...o),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function Cme(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Tme=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qe=Tme.reduce((e,t)=>{const n=Lu(`Primitive.${t}`),r=x.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(l,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ame(e,t){e&&Uu.flushSync(()=>e.dispatchEvent(t))}function oo(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ome(e,t=globalThis==null?void 0:globalThis.document){const n=oo(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Rme="DismissableLayer",H_="dismissableLayer.update",Mme="dismissableLayer.pointerDownOutside",Nme="dismissableLayer.focusOutside",X2,XB=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),HC=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...l}=e,c=x.useContext(XB),[f,u]=x.useState(null),d=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=x.useState({}),p=Tt(t,A=>u(A)),b=Array.from(c.layers),[S]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),m=b.indexOf(S),y=f?b.indexOf(f):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,_=y>=m,C=Ime(A=>{const N=A.target,D=[...c.branches].some(M=>M.contains(N));!_||D||(i==null||i(A),a==null||a(A),A.defaultPrevented||o==null||o())},d),k=$me(A=>{const N=A.target;[...c.branches].some(M=>M.contains(N))||(s==null||s(A),a==null||a(A),A.defaultPrevented||o==null||o())},d);return Ome(A=>{y===c.layers.size-1&&(r==null||r(A),!A.defaultPrevented&&o&&(A.preventDefault(),o()))},d),x.useEffect(()=>{if(f)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(X2=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),W2(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=X2)}},[f,d,n,c]),x.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),W2())},[f,c]),x.useEffect(()=>{const A=()=>h({});return document.addEventListener(H_,A),()=>document.removeEventListener(H_,A)},[]),w.jsx(qe.div,{...l,ref:p,style:{pointerEvents:v?_?"auto":"none":void 0,...e.style},onFocusCapture:He(e.onFocusCapture,k.onFocusCapture),onBlurCapture:He(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:He(e.onPointerDownCapture,C.onPointerDownCapture)})});HC.displayName=Rme;var Dme="DismissableLayerBranch",zme=x.forwardRef((e,t)=>{const n=x.useContext(XB),r=x.useRef(null),i=Tt(t,r);return x.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),w.jsx(qe.div,{...e,ref:i})});zme.displayName=Dme;function Ime(e,t=globalThis==null?void 0:globalThis.document){const n=oo(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const s=o=>{if(o.target&&!r.current){let l=function(){WB(Mme,n,c,{discrete:!0})};const c={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function $me(e,t=globalThis==null?void 0:globalThis.document){const n=oo(e),r=x.useRef(!1);return x.useEffect(()=>{const i=s=>{s.target&&!r.current&&WB(Nme,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function W2(){const e=new CustomEvent(H_);document.dispatchEvent(e)}function WB(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Ame(i,s):i.dispatchEvent(s)}var z0="focusScope.autoFocusOnMount",I0="focusScope.autoFocusOnUnmount",Z2={bubbles:!1,cancelable:!0},Lme="FocusScope",qC=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[o,l]=x.useState(null),c=oo(i),f=oo(s),u=x.useRef(null),d=Tt(t,b=>l(b)),h=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let b=function(v){if(h.paused||!o)return;const _=v.target;o.contains(_)?u.current=_:fa(u.current,{select:!0})},S=function(v){if(h.paused||!o)return;const _=v.relatedTarget;_!==null&&(o.contains(_)||fa(u.current,{select:!0}))},m=function(v){if(document.activeElement===document.body)for(const C of v)C.removedNodes.length>0&&fa(o)};document.addEventListener("focusin",b),document.addEventListener("focusout",S);const y=new MutationObserver(m);return o&&y.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",S),y.disconnect()}}},[r,o,h.paused]),x.useEffect(()=>{if(o){tM.add(h);const b=document.activeElement;if(!o.contains(b)){const m=new CustomEvent(z0,Z2);o.addEventListener(z0,c),o.dispatchEvent(m),m.defaultPrevented||(jme(Hme(ZB(o)),{select:!0}),document.activeElement===b&&fa(o))}return()=>{o.removeEventListener(z0,c),setTimeout(()=>{const m=new CustomEvent(I0,Z2);o.addEventListener(I0,f),o.dispatchEvent(m),m.defaultPrevented||fa(b??document.body,{select:!0}),o.removeEventListener(I0,f),tM.remove(h)},0)}}},[o,c,f,h]);const p=x.useCallback(b=>{if(!n&&!r||h.paused)return;const S=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,m=document.activeElement;if(S&&m){const y=b.currentTarget,[v,_]=Fme(y);v&&_?!b.shiftKey&&m===_?(b.preventDefault(),n&&fa(v,{select:!0})):b.shiftKey&&m===v&&(b.preventDefault(),n&&fa(_,{select:!0})):m===y&&b.preventDefault()}},[n,r,h.paused]);return w.jsx(qe.div,{tabIndex:-1,...a,ref:d,onKeyDown:p})});qC.displayName=Lme;function jme(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(fa(r,{select:t}),document.activeElement!==n)return}function Fme(e){const t=ZB(e),n=eM(t,e),r=eM(t.reverse(),e);return[n,r]}function ZB(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function eM(e,t){for(const n of e)if(!Pme(n,{upTo:t}))return n}function Pme(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ume(e){return e instanceof HTMLInputElement&&"select"in e}function fa(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ume(e)&&t&&e.select()}}var tM=Bme();function Bme(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=nM(e,t),e.unshift(t)},remove(t){var n;e=nM(e,t),(n=e[0])==null||n.resume()}}}function nM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Hme(e){return e.filter(t=>t.tagName!=="A")}var qme="Portal",VC=x.forwardRef((e,t)=>{var o;const{container:n,...r}=e,[i,s]=x.useState(!1);Nn(()=>s(!0),[]);const a=n||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?e9.createPortal(w.jsx(qe.div,{...r,ref:t}),a):null});VC.displayName=qme;function Vme(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Kv=e=>{const{present:t,children:n}=e,r=Kme(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),s=Tt(r.ref,Gme(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:s}):null};Kv.displayName="Presence";function Kme(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),s=x.useRef("none"),a=e?"mounted":"unmounted",[o,l]=Vme(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const c=pp(r.current);s.current=o==="mounted"?c:"none"},[o]),Nn(()=>{const c=r.current,f=i.current;if(f!==e){const d=s.current,h=pp(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Nn(()=>{if(t){let c;const f=t.ownerDocument.defaultView??window,u=h=>{const b=pp(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&b&&(l("ANIMATION_END"),!i.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",c=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},d=h=>{h.target===t&&(s.current=pp(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{f.clearTimeout(c),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:x.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function pp(e){return(e==null?void 0:e.animationName)||"none"}function Gme(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $0=0;function e5(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??rM()),document.body.insertAdjacentElement("beforeend",e[1]??rM()),$0++,()=>{$0===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),$0--}},[])}function rM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ii=function(){return Ii=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ii.apply(this,arguments)};function t5(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Yme(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var ug="right-scroll-bar-position",fg="width-before-scroll-bar",Jme="with-scroll-bars-hidden",Qme="--removed-body-scroll-bar-size";function L0(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Xme(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Wme=typeof window<"u"?x.useLayoutEffect:x.useEffect,iM=new WeakMap;function Zme(e,t){var n=Xme(null,function(r){return e.forEach(function(i){return L0(i,r)})});return Wme(function(){var r=iM.get(n);if(r){var i=new Set(r),s=new Set(e),a=n.current;i.forEach(function(o){s.has(o)||L0(o,null)}),s.forEach(function(o){i.has(o)||L0(o,a)})}iM.set(n,e)},[e]),n}function epe(e){return e}function tpe(e,t){t===void 0&&(t=epe);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(o){return o!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(o){return s(o)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var o=n;n=[],o.forEach(s),a=n}var l=function(){var f=a;a=[],f.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(f){a.push(f),c()},filter:function(f){return a=a.filter(f),n}}}};return i}function npe(e){e===void 0&&(e={});var t=tpe(null);return t.options=Ii({async:!0,ssr:!1},e),t}var n5=function(e){var t=e.sideCar,n=t5(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x.createElement(r,Ii({},n))};n5.isSideCarExport=!0;function rpe(e,t){return e.useMedium(t),n5}var r5=npe(),j0=function(){},Gv=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:j0,onWheelCapture:j0,onTouchMoveCapture:j0}),i=r[0],s=r[1],a=e.forwardProps,o=e.children,l=e.className,c=e.removeScrollBar,f=e.enabled,u=e.shards,d=e.sideCar,h=e.noRelative,p=e.noIsolation,b=e.inert,S=e.allowPinchZoom,m=e.as,y=m===void 0?"div":m,v=e.gapMode,_=t5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=d,k=Zme([n,t]),A=Ii(Ii({},_),i);return x.createElement(x.Fragment,null,f&&x.createElement(C,{sideCar:r5,removeScrollBar:c,shards:u,noRelative:h,noIsolation:p,inert:b,setCallbacks:s,allowPinchZoom:!!S,lockRef:n,gapMode:v}),a?x.cloneElement(x.Children.only(o),Ii(Ii({},A),{ref:k})):x.createElement(y,Ii({},A,{className:l,ref:k}),o))});Gv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Gv.classNames={fullWidth:fg,zeroRight:ug};var ipe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function spe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ipe();return t&&e.setAttribute("nonce",t),e}function ape(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ope(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var lpe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=spe())&&(ape(t,n),ope(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},cpe=function(){var e=lpe();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},i5=function(){var e=cpe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},upe={left:0,top:0,right:0,gap:0},F0=function(e){return parseInt(e||"",10)||0},fpe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[F0(n),F0(r),F0(i)]},dpe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return upe;var t=fpe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},hpe=i5(),tu="data-scroll-locked",mpe=function(e,t,n,r){var i=e.left,s=e.top,a=e.right,o=e.gap;return n===void 0&&(n="margin"),`
|
|
191
|
+
.`.concat(Jme,` {
|
|
192
|
+
overflow: hidden `).concat(r,`;
|
|
193
|
+
padding-right: `).concat(o,"px ").concat(r,`;
|
|
194
|
+
}
|
|
195
|
+
body[`).concat(tu,`] {
|
|
196
|
+
overflow: hidden `).concat(r,`;
|
|
197
|
+
overscroll-behavior: contain;
|
|
198
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
199
|
+
padding-left: `.concat(i,`px;
|
|
200
|
+
padding-top: `).concat(s,`px;
|
|
201
|
+
padding-right: `).concat(a,`px;
|
|
202
|
+
margin-left:0;
|
|
203
|
+
margin-top:0;
|
|
204
|
+
margin-right: `).concat(o,"px ").concat(r,`;
|
|
205
|
+
`),n==="padding"&&"padding-right: ".concat(o,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.`).concat(ug,` {
|
|
209
|
+
right: `).concat(o,"px ").concat(r,`;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.`).concat(fg,` {
|
|
213
|
+
margin-right: `).concat(o,"px ").concat(r,`;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.`).concat(ug," .").concat(ug,` {
|
|
217
|
+
right: 0 `).concat(r,`;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.`).concat(fg," .").concat(fg,` {
|
|
221
|
+
margin-right: 0 `).concat(r,`;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
body[`).concat(tu,`] {
|
|
225
|
+
`).concat(Qme,": ").concat(o,`px;
|
|
226
|
+
}
|
|
227
|
+
`)},sM=function(){var e=parseInt(document.body.getAttribute(tu)||"0",10);return isFinite(e)?e:0},ppe=function(){x.useEffect(function(){return document.body.setAttribute(tu,(sM()+1).toString()),function(){var e=sM()-1;e<=0?document.body.removeAttribute(tu):document.body.setAttribute(tu,e.toString())}},[])},gpe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;ppe();var s=x.useMemo(function(){return dpe(i)},[i]);return x.createElement(hpe,{styles:mpe(s,!t,i,n?"":"!important")})},q_=!1;if(typeof window<"u")try{var gp=Object.defineProperty({},"passive",{get:function(){return q_=!0,!0}});window.addEventListener("test",gp,gp),window.removeEventListener("test",gp,gp)}catch{q_=!1}var ic=q_?{passive:!1}:!1,ype=function(e){return e.tagName==="TEXTAREA"},s5=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ype(e)&&n[t]==="visible")},bpe=function(e){return s5(e,"overflowY")},vpe=function(e){return s5(e,"overflowX")},aM=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=a5(e,r);if(i){var s=o5(e,r),a=s[1],o=s[2];if(a>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Spe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},wpe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},a5=function(e,t){return e==="v"?bpe(t):vpe(t)},o5=function(e,t){return e==="v"?Spe(t):wpe(t)},xpe=function(e,t){return e==="h"&&t==="rtl"?-1:1},_pe=function(e,t,n,r,i){var s=xpe(e,window.getComputedStyle(t).direction),a=s*r,o=n.target,l=t.contains(o),c=!1,f=a>0,u=0,d=0;do{if(!o)break;var h=o5(e,o),p=h[0],b=h[1],S=h[2],m=b-S-s*p;(p||m)&&a5(e,o)&&(u+=m,d+=p);var y=o.parentNode;o=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&o!==document.body||l&&(t.contains(o)||t===o));return(f&&Math.abs(u)<1||!f&&Math.abs(d)<1)&&(c=!0),c},yp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oM=function(e){return[e.deltaX,e.deltaY]},lM=function(e){return e&&"current"in e?e.current:e},kpe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Epe=function(e){return`
|
|
228
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
229
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
230
|
+
`)},Cpe=0,sc=[];function Tpe(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(Cpe++)[0],s=x.useState(i5)[0],a=x.useRef(e);x.useEffect(function(){a.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var b=Yme([e.lockRef.current],(e.shards||[]).map(lM),!0).filter(Boolean);return b.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),b.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var o=x.useCallback(function(b,S){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!a.current.allowPinchZoom;var m=yp(b),y=n.current,v="deltaX"in b?b.deltaX:y[0]-m[0],_="deltaY"in b?b.deltaY:y[1]-m[1],C,k=b.target,A=Math.abs(v)>Math.abs(_)?"h":"v";if("touches"in b&&A==="h"&&k.type==="range")return!1;var N=window.getSelection(),D=N&&N.anchorNode,M=D?D===k||D.contains(k):!1;if(M)return!1;var $=aM(A,k);if(!$)return!0;if($?C=A:(C=A==="v"?"h":"v",$=aM(A,k)),!$)return!1;if(!r.current&&"changedTouches"in b&&(v||_)&&(r.current=C),!C)return!0;var L=r.current||C;return _pe(L,S,b,L==="h"?v:_)},[]),l=x.useCallback(function(b){var S=b;if(!(!sc.length||sc[sc.length-1]!==s)){var m="deltaY"in S?oM(S):yp(S),y=t.current.filter(function(C){return C.name===S.type&&(C.target===S.target||S.target===C.shadowParent)&&kpe(C.delta,m)})[0];if(y&&y.should){S.cancelable&&S.preventDefault();return}if(!y){var v=(a.current.shards||[]).map(lM).filter(Boolean).filter(function(C){return C.contains(S.target)}),_=v.length>0?o(S,v[0]):!a.current.noIsolation;_&&S.cancelable&&S.preventDefault()}}},[]),c=x.useCallback(function(b,S,m,y){var v={name:b,delta:S,target:m,should:y,shadowParent:Ape(m)};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(_){return _!==v})},1)},[]),f=x.useCallback(function(b){n.current=yp(b),r.current=void 0},[]),u=x.useCallback(function(b){c(b.type,oM(b),b.target,o(b,e.lockRef.current))},[]),d=x.useCallback(function(b){c(b.type,yp(b),b.target,o(b,e.lockRef.current))},[]);x.useEffect(function(){return sc.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,ic),document.addEventListener("touchmove",l,ic),document.addEventListener("touchstart",f,ic),function(){sc=sc.filter(function(b){return b!==s}),document.removeEventListener("wheel",l,ic),document.removeEventListener("touchmove",l,ic),document.removeEventListener("touchstart",f,ic)}},[]);var h=e.removeScrollBar,p=e.inert;return x.createElement(x.Fragment,null,p?x.createElement(s,{styles:Epe(i)}):null,h?x.createElement(gpe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ape(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ope=rpe(r5,Tpe);var KC=x.forwardRef(function(e,t){return x.createElement(Gv,Ii({},e,{ref:t,sideCar:Ope}))});KC.classNames=Gv.classNames;var Rpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ac=new WeakMap,bp=new WeakMap,vp={},P0=0,l5=function(e){return e&&(e.host||l5(e.parentNode))},Mpe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=l5(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Npe=function(e,t,n,r){var i=Mpe(t,Array.isArray(e)?e:[e]);vp[n]||(vp[n]=new WeakMap);var s=vp[n],a=[],o=new Set,l=new Set(i),c=function(u){!u||o.has(u)||(o.add(u),c(u.parentNode))};i.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(o.has(d))f(d);else try{var h=d.getAttribute(r),p=h!==null&&h!=="false",b=(ac.get(d)||0)+1,S=(s.get(d)||0)+1;ac.set(d,b),s.set(d,S),a.push(d),b===1&&p&&bp.set(d,!0),S===1&&d.setAttribute(n,"true"),p||d.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",d,m)}})};return f(t),o.clear(),P0++,function(){a.forEach(function(u){var d=ac.get(u)-1,h=s.get(u)-1;ac.set(u,d),s.set(u,h),d||(bp.has(u)||u.removeAttribute(r),bp.delete(u)),h||u.removeAttribute(n)}),P0--,P0||(ac=new WeakMap,ac=new WeakMap,bp=new WeakMap,vp={})}},c5=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Rpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),Npe(r,i,n,"aria-hidden")):function(){return null}},Yv="Dialog",[u5]=Sf(Yv),[Dpe,Mi]=u5(Yv),f5=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,o=x.useRef(null),l=x.useRef(null),[c,f]=El({prop:r,defaultProp:i??!1,onChange:s,caller:Yv});return w.jsx(Dpe,{scope:t,triggerRef:o,contentRef:l,contentId:Tr(),titleId:Tr(),descriptionId:Tr(),open:c,onOpenChange:f,onOpenToggle:x.useCallback(()=>f(u=>!u),[f]),modal:a,children:n})};f5.displayName=Yv;var d5="DialogTrigger",zpe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Mi(d5,n),s=Tt(t,i.triggerRef);return w.jsx(qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":JC(i.open),...r,ref:s,onClick:He(e.onClick,i.onOpenToggle)})});zpe.displayName=d5;var GC="DialogPortal",[Ipe,h5]=u5(GC,{forceMount:void 0}),m5=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,s=Mi(GC,t);return w.jsx(Ipe,{scope:t,forceMount:n,children:x.Children.map(r,a=>w.jsx(Kv,{present:n||s.open,children:w.jsx(VC,{asChild:!0,container:i,children:a})}))})};m5.displayName=GC;var Yy="DialogOverlay",p5=x.forwardRef((e,t)=>{const n=h5(Yy,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=Mi(Yy,e.__scopeDialog);return s.modal?w.jsx(Kv,{present:r||s.open,children:w.jsx(Lpe,{...i,ref:t})}):null});p5.displayName=Yy;var $pe=Lu("DialogOverlay.RemoveScroll"),Lpe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Mi(Yy,n);return w.jsx(KC,{as:$pe,allowPinchZoom:!0,shards:[i.contentRef],children:w.jsx(qe.div,{"data-state":JC(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Cl="DialogContent",g5=x.forwardRef((e,t)=>{const n=h5(Cl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=Mi(Cl,e.__scopeDialog);return w.jsx(Kv,{present:r||s.open,children:s.modal?w.jsx(jpe,{...i,ref:t}):w.jsx(Fpe,{...i,ref:t})})});g5.displayName=Cl;var jpe=x.forwardRef((e,t)=>{const n=Mi(Cl,e.__scopeDialog),r=x.useRef(null),i=Tt(t,n.contentRef,r);return x.useEffect(()=>{const s=r.current;if(s)return c5(s)},[]),w.jsx(y5,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:He(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:He(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&s.preventDefault()}),onFocusOutside:He(e.onFocusOutside,s=>s.preventDefault())})}),Fpe=x.forwardRef((e,t)=>{const n=Mi(Cl,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return w.jsx(y5,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,o;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),y5=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=e,o=Mi(Cl,n),l=x.useRef(null),c=Tt(t,l);return e5(),w.jsxs(w.Fragment,{children:[w.jsx(qC,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:w.jsx(HC,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":JC(o.open),...a,ref:c,onDismiss:()=>o.onOpenChange(!1)})}),w.jsxs(w.Fragment,{children:[w.jsx(Ppe,{titleId:o.titleId}),w.jsx(Bpe,{contentRef:l,descriptionId:o.descriptionId})]})]})}),YC="DialogTitle",b5=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Mi(YC,n);return w.jsx(qe.h2,{id:i.titleId,...r,ref:t})});b5.displayName=YC;var v5="DialogDescription",S5=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Mi(v5,n);return w.jsx(qe.p,{id:i.descriptionId,...r,ref:t})});S5.displayName=v5;var w5="DialogClose",x5=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Mi(w5,n);return w.jsx(qe.button,{type:"button",...r,ref:t,onClick:He(e.onClick,()=>i.onOpenChange(!1))})});x5.displayName=w5;function JC(e){return e?"open":"closed"}var _5="DialogTitleWarning",[QEe,k5]=pme(_5,{contentName:Cl,titleName:YC,docsSlug:"dialog"}),Ppe=({titleId:e})=>{const t=k5(_5),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
231
|
+
|
|
232
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
233
|
+
|
|
234
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Upe="DialogDescriptionWarning",Bpe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${k5(Upe).contentName}}.`;return x.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},E5=f5,C5=m5,T5=p5,A5=g5,Hpe=b5,qpe=S5,Vpe=x5,Kpe=Symbol.for("react.lazy"),Jy=S1[" use ".trim().toString()];function Gpe(e){return typeof e=="object"&&e!==null&&"then"in e}function O5(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Kpe&&"_payload"in e&&Gpe(e._payload)}function Ype(e){const t=Jpe(e),n=x.forwardRef((r,i)=>{let{children:s,...a}=r;O5(s)&&typeof Jy=="function"&&(s=Jy(s._payload));const o=x.Children.toArray(s),l=o.find(Xpe);if(l){const c=l.props.children,f=o.map(u=>u===l?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:u);return w.jsx(t,{...a,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,f):null})}return w.jsx(t,{...a,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}function Jpe(e){const t=x.forwardRef((n,r)=>{let{children:i,...s}=n;if(O5(i)&&typeof Jy=="function"&&(i=Jy(i._payload)),x.isValidElement(i)){const a=Zpe(i),o=Wpe(s,i.props);return i.type!==x.Fragment&&(o.ref=r?ao(r,a):a),x.cloneElement(i,o)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qpe=Symbol("radix.slottable");function Xpe(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qpe}function Wpe(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{const l=s(...o);return i(...o),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function Zpe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ege=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],wo=ege.reduce((e,t)=>{const n=Ype(`Primitive.${t}`),r=x.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(l,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Yf='[cmdk-group=""]',U0='[cmdk-group-items=""]',tge='[cmdk-group-heading=""]',R5='[cmdk-item=""]',cM=`${R5}:not([aria-disabled="true"])`,V_="cmdk-item-select",gc="data-value",nge=(e,t,n)=>mme(e,t,n),M5=x.createContext(void 0),Mm=()=>x.useContext(M5),N5=x.createContext(void 0),QC=()=>x.useContext(N5),D5=x.createContext(void 0),z5=x.forwardRef((e,t)=>{let n=yc(()=>{var U,T;return{search:"",value:(T=(U=e.value)!=null?U:e.defaultValue)!=null?T:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=yc(()=>new Set),i=yc(()=>new Map),s=yc(()=>new Map),a=yc(()=>new Set),o=I5(e),{label:l,children:c,value:f,onValueChange:u,filter:d,shouldFilter:h,loop:p,disablePointerSelection:b=!1,vimBindings:S=!0,...m}=e,y=Tr(),v=Tr(),_=Tr(),C=x.useRef(null),k=hge();Tl(()=>{if(f!==void 0){let U=f.trim();n.current.value=U,A.emit()}},[f]),Tl(()=>{k(6,J)},[]);let A=x.useMemo(()=>({subscribe:U=>(a.current.add(U),()=>a.current.delete(U)),snapshot:()=>n.current,setState:(U,T,W)=>{var Z,le,H,he;if(!Object.is(n.current[U],T)){if(n.current[U]=T,U==="search")L(),M(),k(1,$);else if(U==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let we=document.getElementById(_);we?we.focus():(Z=document.getElementById(y))==null||Z.focus()}if(k(7,()=>{var we;n.current.selectedItemId=(we=Y())==null?void 0:we.id,A.emit()}),W||k(5,J),((le=o.current)==null?void 0:le.value)!==void 0){let we=T??"";(he=(H=o.current).onValueChange)==null||he.call(H,we);return}}A.emit()}},emit:()=>{a.current.forEach(U=>U())}}),[]),N=x.useMemo(()=>({value:(U,T,W)=>{var Z;T!==((Z=s.current.get(U))==null?void 0:Z.value)&&(s.current.set(U,{value:T,keywords:W}),n.current.filtered.items.set(U,D(T,W)),k(2,()=>{M(),A.emit()}))},item:(U,T)=>(r.current.add(U),T&&(i.current.has(T)?i.current.get(T).add(U):i.current.set(T,new Set([U]))),k(3,()=>{L(),M(),n.current.value||$(),A.emit()}),()=>{s.current.delete(U),r.current.delete(U),n.current.filtered.items.delete(U);let W=Y();k(4,()=>{L(),(W==null?void 0:W.getAttribute("id"))===U&&$(),A.emit()})}),group:U=>(i.current.has(U)||i.current.set(U,new Set),()=>{s.current.delete(U),i.current.delete(U)}),filter:()=>o.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>o.current.disablePointerSelection,listId:y,inputId:_,labelId:v,listInnerRef:C}),[]);function D(U,T){var W,Z;let le=(Z=(W=o.current)==null?void 0:W.filter)!=null?Z:nge;return U?le(U,n.current.search,T):0}function M(){if(!n.current.search||o.current.shouldFilter===!1)return;let U=n.current.filtered.items,T=[];n.current.filtered.groups.forEach(Z=>{let le=i.current.get(Z),H=0;le.forEach(he=>{let we=U.get(he);H=Math.max(we,H)}),T.push([Z,H])});let W=C.current;G().sort((Z,le)=>{var H,he;let we=Z.getAttribute("id"),xe=le.getAttribute("id");return((H=U.get(xe))!=null?H:0)-((he=U.get(we))!=null?he:0)}).forEach(Z=>{let le=Z.closest(U0);le?le.appendChild(Z.parentElement===le?Z:Z.closest(`${U0} > *`)):W.appendChild(Z.parentElement===W?Z:Z.closest(`${U0} > *`))}),T.sort((Z,le)=>le[1]-Z[1]).forEach(Z=>{var le;let H=(le=C.current)==null?void 0:le.querySelector(`${Yf}[${gc}="${encodeURIComponent(Z[0])}"]`);H==null||H.parentElement.appendChild(H)})}function $(){let U=G().find(W=>W.getAttribute("aria-disabled")!=="true"),T=U==null?void 0:U.getAttribute(gc);A.setState("value",T||void 0)}function L(){var U,T,W,Z;if(!n.current.search||o.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let le=0;for(let H of r.current){let he=(T=(U=s.current.get(H))==null?void 0:U.value)!=null?T:"",we=(Z=(W=s.current.get(H))==null?void 0:W.keywords)!=null?Z:[],xe=D(he,we);n.current.filtered.items.set(H,xe),xe>0&&le++}for(let[H,he]of i.current)for(let we of he)if(n.current.filtered.items.get(we)>0){n.current.filtered.groups.add(H);break}n.current.filtered.count=le}function J(){var U,T,W;let Z=Y();Z&&(((U=Z.parentElement)==null?void 0:U.firstChild)===Z&&((W=(T=Z.closest(Yf))==null?void 0:T.querySelector(tge))==null||W.scrollIntoView({block:"nearest"})),Z.scrollIntoView({block:"nearest"}))}function Y(){var U;return(U=C.current)==null?void 0:U.querySelector(`${R5}[aria-selected="true"]`)}function G(){var U;return Array.from(((U=C.current)==null?void 0:U.querySelectorAll(cM))||[])}function z(U){let T=G()[U];T&&A.setState("value",T.getAttribute(gc))}function j(U){var T;let W=Y(),Z=G(),le=Z.findIndex(he=>he===W),H=Z[le+U];(T=o.current)!=null&&T.loop&&(H=le+U<0?Z[Z.length-1]:le+U===Z.length?Z[0]:Z[le+U]),H&&A.setState("value",H.getAttribute(gc))}function I(U){let T=Y(),W=T==null?void 0:T.closest(Yf),Z;for(;W&&!Z;)W=U>0?fge(W,Yf):dge(W,Yf),Z=W==null?void 0:W.querySelector(cM);Z?A.setState("value",Z.getAttribute(gc)):j(U)}let te=()=>z(G().length-1),R=U=>{U.preventDefault(),U.metaKey?te():U.altKey?I(1):j(1)},Re=U=>{U.preventDefault(),U.metaKey?z(0):U.altKey?I(-1):j(-1)};return x.createElement(wo.div,{ref:t,tabIndex:-1,...m,"cmdk-root":"",onKeyDown:U=>{var T;(T=m.onKeyDown)==null||T.call(m,U);let W=U.nativeEvent.isComposing||U.keyCode===229;if(!(U.defaultPrevented||W))switch(U.key){case"n":case"j":{S&&U.ctrlKey&&R(U);break}case"ArrowDown":{R(U);break}case"p":case"k":{S&&U.ctrlKey&&Re(U);break}case"ArrowUp":{Re(U);break}case"Home":{U.preventDefault(),z(0);break}case"End":{U.preventDefault(),te();break}case"Enter":{U.preventDefault();let Z=Y();if(Z){let le=new Event(V_);Z.dispatchEvent(le)}}}}},x.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:pge},l),Jv(e,U=>x.createElement(N5.Provider,{value:A},x.createElement(M5.Provider,{value:N},U))))}),rge=x.forwardRef((e,t)=>{var n,r;let i=Tr(),s=x.useRef(null),a=x.useContext(D5),o=Mm(),l=I5(e),c=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:a==null?void 0:a.forceMount;Tl(()=>{if(!c)return o.item(i,a==null?void 0:a.id)},[c]);let f=$5(i,s,[e.value,e.children,s],e.keywords),u=QC(),d=lo(k=>k.value&&k.value===f.current),h=lo(k=>c||o.filter()===!1?!0:k.search?k.filtered.items.get(i)>0:!0);x.useEffect(()=>{let k=s.current;if(!(!k||e.disabled))return k.addEventListener(V_,p),()=>k.removeEventListener(V_,p)},[h,e.onSelect,e.disabled]);function p(){var k,A;b(),(A=(k=l.current).onSelect)==null||A.call(k,f.current)}function b(){u.setState("value",f.current,!0)}if(!h)return null;let{disabled:S,value:m,onSelect:y,forceMount:v,keywords:_,...C}=e;return x.createElement(wo.div,{ref:ao(s,t),...C,id:i,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!d,"data-disabled":!!S,"data-selected":!!d,onPointerMove:S||o.getDisablePointerSelection()?void 0:b,onClick:S?void 0:p},e.children)}),ige=x.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...s}=e,a=Tr(),o=x.useRef(null),l=x.useRef(null),c=Tr(),f=Mm(),u=lo(h=>i||f.filter()===!1?!0:h.search?h.filtered.groups.has(a):!0);Tl(()=>f.group(a),[]),$5(a,o,[e.value,e.heading,l]);let d=x.useMemo(()=>({id:a,forceMount:i}),[i]);return x.createElement(wo.div,{ref:ao(o,t),...s,"cmdk-group":"",role:"presentation",hidden:u?void 0:!0},n&&x.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),Jv(e,h=>x.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},x.createElement(D5.Provider,{value:d},h))))}),sge=x.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=x.useRef(null),s=lo(a=>!a.search);return!n&&!s?null:x.createElement(wo.div,{ref:ao(i,t),...r,"cmdk-separator":"",role:"separator"})}),age=x.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,s=QC(),a=lo(c=>c.search),o=lo(c=>c.selectedItemId),l=Mm();return x.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),x.createElement(wo.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":o,id:l.inputId,type:"text",value:i?e.value:a,onChange:c=>{i||s.setState("search",c.target.value),n==null||n(c.target.value)}})}),oge=x.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,s=x.useRef(null),a=x.useRef(null),o=lo(c=>c.selectedItemId),l=Mm();return x.useEffect(()=>{if(a.current&&s.current){let c=a.current,f=s.current,u,d=new ResizeObserver(()=>{u=requestAnimationFrame(()=>{let h=c.offsetHeight;f.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return d.observe(c),()=>{cancelAnimationFrame(u),d.unobserve(c)}}},[]),x.createElement(wo.div,{ref:ao(s,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":o,"aria-label":r,id:l.listId},Jv(e,c=>x.createElement("div",{ref:ao(a,l.listInnerRef),"cmdk-list-sizer":""},c)))}),lge=x.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:s,container:a,...o}=e;return x.createElement(E5,{open:n,onOpenChange:r},x.createElement(C5,{container:a},x.createElement(T5,{"cmdk-overlay":"",className:i}),x.createElement(A5,{"aria-label":e.label,"cmdk-dialog":"",className:s},x.createElement(z5,{ref:t,...o}))))}),cge=x.forwardRef((e,t)=>lo(n=>n.filtered.count===0)?x.createElement(wo.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),uge=x.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...s}=e;return x.createElement(wo.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Jv(e,a=>x.createElement("div",{"aria-hidden":!0},a)))}),Gl=Object.assign(z5,{List:oge,Item:rge,Input:age,Group:ige,Separator:sge,Dialog:lge,Empty:cge,Loading:uge});function fge(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function dge(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function I5(e){let t=x.useRef(e);return Tl(()=>{t.current=e}),t}var Tl=typeof window>"u"?x.useEffect:x.useLayoutEffect;function yc(e){let t=x.useRef();return t.current===void 0&&(t.current=e()),t}function lo(e){let t=QC(),n=()=>e(t.snapshot());return x.useSyncExternalStore(t.subscribe,n,n)}function $5(e,t,n,r=[]){let i=x.useRef(),s=Mm();return Tl(()=>{var a;let o=(()=>{var c;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(c=f.current.textContent)==null?void 0:c.trim():i.current}})(),l=r.map(c=>c.trim());s.value(e,o,l),(a=t.current)==null||a.setAttribute(gc,o),i.current=o}),i}var hge=()=>{let[e,t]=x.useState(),n=yc(()=>new Map);return Tl(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function mge(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Jv({asChild:e,children:t},n){return e&&x.isValidElement(t)?x.cloneElement(mge(t),{ref:t.ref},n(t.props.children)):n(t)}var pge={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},L5=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),gge="VisuallyHidden",yge=x.forwardRef((e,t)=>w.jsx(qe.span,{...e,ref:t,style:{...L5,...e.style}}));yge.displayName=gge;function j5(e){const t=e+"CollectionProvider",[n,r]=Sf(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=b=>{const{scope:S,children:m}=b,y=Pt.useRef(null),v=Pt.useRef(new Map).current;return w.jsx(i,{scope:S,itemMap:v,collectionRef:y,children:m})};a.displayName=t;const o=e+"CollectionSlot",l=Lu(o),c=Pt.forwardRef((b,S)=>{const{scope:m,children:y}=b,v=s(o,m),_=Tt(S,v.collectionRef);return w.jsx(l,{ref:_,children:y})});c.displayName=o;const f=e+"CollectionItemSlot",u="data-radix-collection-item",d=Lu(f),h=Pt.forwardRef((b,S)=>{const{scope:m,children:y,...v}=b,_=Pt.useRef(null),C=Tt(S,_),k=s(f,m);return Pt.useEffect(()=>(k.itemMap.set(_,{ref:_,...v}),()=>void k.itemMap.delete(_))),w.jsx(d,{[u]:"",ref:C,children:y})});h.displayName=f;function p(b){const S=s(e+"CollectionConsumer",b);return Pt.useCallback(()=>{const y=S.collectionRef.current;if(!y)return[];const v=Array.from(y.querySelectorAll(`[${u}]`));return Array.from(S.itemMap.values()).sort((k,A)=>v.indexOf(k.ref.current)-v.indexOf(A.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:c,ItemSlot:h},p,r]}var bge=x.createContext(void 0);function XC(e){const t=x.useContext(bge);return e||t||"ltr"}function vge(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Sge(e){const[t,n]=x.useState(void 0);return Nn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,o;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,o=c.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const wge=["top","right","bottom","left"],co=Math.min,gr=Math.max,Qy=Math.round,Sp=Math.floor,Qi=e=>({x:e,y:e}),xge={left:"right",right:"left",bottom:"top",top:"bottom"},_ge={start:"end",end:"start"};function K_(e,t,n){return gr(e,co(t,n))}function Ys(e,t){return typeof e=="function"?e(t):e}function Js(e){return e.split("-")[0]}function wf(e){return e.split("-")[1]}function WC(e){return e==="x"?"y":"x"}function ZC(e){return e==="y"?"height":"width"}const kge=new Set(["top","bottom"]);function qi(e){return kge.has(Js(e))?"y":"x"}function eT(e){return WC(qi(e))}function Ege(e,t,n){n===void 0&&(n=!1);const r=wf(e),i=eT(e),s=ZC(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Xy(a)),[a,Xy(a)]}function Cge(e){const t=Xy(e);return[G_(e),t,G_(t)]}function G_(e){return e.replace(/start|end/g,t=>_ge[t])}const uM=["left","right"],fM=["right","left"],Tge=["top","bottom"],Age=["bottom","top"];function Oge(e,t,n){switch(e){case"top":case"bottom":return n?t?fM:uM:t?uM:fM;case"left":case"right":return t?Tge:Age;default:return[]}}function Rge(e,t,n,r){const i=wf(e);let s=Oge(Js(e),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(G_)))),s}function Xy(e){return e.replace(/left|right|bottom|top/g,t=>xge[t])}function Mge(e){return{top:0,right:0,bottom:0,left:0,...e}}function F5(e){return typeof e!="number"?Mge(e):{top:e,right:e,bottom:e,left:e}}function Wy(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function dM(e,t,n){let{reference:r,floating:i}=e;const s=qi(t),a=eT(t),o=ZC(a),l=Js(t),c=s==="y",f=r.x+r.width/2-i.width/2,u=r.y+r.height/2-i.height/2,d=r[o]/2-i[o]/2;let h;switch(l){case"top":h={x:f,y:r.y-i.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:u};break;case"left":h={x:r.x-i.width,y:u};break;default:h={x:r.x,y:r.y}}switch(wf(t)){case"start":h[a]-=d*(n&&c?-1:1);break;case"end":h[a]+=d*(n&&c?-1:1);break}return h}async function Nge(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:a,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=!1,padding:h=0}=Ys(t,e),p=F5(h),S=o[d?u==="floating"?"reference":"floating":u],m=Wy(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(S)))==null||n?S:S.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:c,rootBoundary:f,strategy:l})),y=u==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),_=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},C=Wy(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:v,strategy:l}):y);return{top:(m.top-C.top+p.top)/_.y,bottom:(C.bottom-m.bottom+p.bottom)/_.y,left:(m.left-C.left+p.left)/_.x,right:(C.right-m.right+p.right)/_.x}}const Dge=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,o=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:u}=dM(c,r,l),d=r,h={},p=0;for(let S=0;S<o.length;S++){var b;const{name:m,fn:y}=o[S],{x:v,y:_,data:C,reset:k}=await y({x:f,y:u,initialPlacement:r,placement:d,strategy:i,middlewareData:h,rects:c,platform:{...a,detectOverflow:(b=a.detectOverflow)!=null?b:Nge},elements:{reference:e,floating:t}});f=v??f,u=_??u,h={...h,[m]:{...h[m],...C}},k&&p<=50&&(p++,typeof k=="object"&&(k.placement&&(d=k.placement),k.rects&&(c=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:f,y:u}=dM(c,d,l)),S=-1)}return{x:f,y:u,placement:d,strategy:i,middlewareData:h}},zge=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:a,elements:o,middlewareData:l}=t,{element:c,padding:f=0}=Ys(e,t)||{};if(c==null)return{};const u=F5(f),d={x:n,y:r},h=eT(i),p=ZC(h),b=await a.getDimensions(c),S=h==="y",m=S?"top":"left",y=S?"bottom":"right",v=S?"clientHeight":"clientWidth",_=s.reference[p]+s.reference[h]-d[h]-s.floating[p],C=d[h]-s.reference[h],k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let A=k?k[v]:0;(!A||!await(a.isElement==null?void 0:a.isElement(k)))&&(A=o.floating[v]||s.floating[p]);const N=_/2-C/2,D=A/2-b[p]/2-1,M=co(u[m],D),$=co(u[y],D),L=M,J=A-b[p]-$,Y=A/2-b[p]/2+N,G=K_(L,Y,J),z=!l.arrow&&wf(i)!=null&&Y!==G&&s.reference[p]/2-(Y<L?M:$)-b[p]/2<0,j=z?Y<L?Y-L:Y-J:0;return{[h]:d[h]+j,data:{[h]:G,centerOffset:Y-G-j,...z&&{alignmentOffset:j}},reset:z}}}),Ige=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:o,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...S}=Ys(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const m=Js(i),y=qi(o),v=Js(o)===o,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=d||(v||!b?[Xy(o)]:Cge(o)),k=p!=="none";!d&&k&&C.push(...Rge(o,b,p,_));const A=[o,...C],N=await l.detectOverflow(t,S),D=[];let M=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&D.push(N[m]),u){const Y=Ege(i,a,_);D.push(N[Y[0]],N[Y[1]])}if(M=[...M,{placement:i,overflows:D}],!D.every(Y=>Y<=0)){var $,L;const Y=((($=s.flip)==null?void 0:$.index)||0)+1,G=A[Y];if(G&&(!(u==="alignment"?y!==qi(G):!1)||M.every(I=>qi(I.placement)===y?I.overflows[0]>0:!0)))return{data:{index:Y,overflows:M},reset:{placement:G}};let z=(L=M.filter(j=>j.overflows[0]<=0).sort((j,I)=>j.overflows[1]-I.overflows[1])[0])==null?void 0:L.placement;if(!z)switch(h){case"bestFit":{var J;const j=(J=M.filter(I=>{if(k){const te=qi(I.placement);return te===y||te==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(te=>te>0).reduce((te,R)=>te+R,0)]).sort((I,te)=>I[1]-te[1])[0])==null?void 0:J[0];j&&(z=j);break}case"initialPlacement":z=o;break}if(i!==z)return{reset:{placement:z}}}return{}}}};function hM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function mM(e){return wge.some(t=>e[t]>=0)}const $ge=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...s}=Ys(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...s,elementContext:"reference"}),o=hM(a,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:mM(o)}}}case"escaped":{const a=await r.detectOverflow(t,{...s,altBoundary:!0}),o=hM(a,n.floating);return{data:{escapedOffsets:o,escaped:mM(o)}}}default:return{}}}}},P5=new Set(["left","top"]);async function Lge(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Js(n),o=wf(n),l=qi(n)==="y",c=P5.has(a)?-1:1,f=s&&l?-1:1,u=Ys(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return o&&typeof p=="number"&&(h=o==="end"?p*-1:p),l?{x:h*f,y:d*c}:{x:d*c,y:h*f}}const jge=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:a,middlewareData:o}=t,l=await Lge(t,e);return a===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:a}}}}},Fge=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:s}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:m=>{let{x:y,y:v}=m;return{x:y,y:v}}},...c}=Ys(e,t),f={x:n,y:r},u=await s.detectOverflow(t,c),d=qi(Js(i)),h=WC(d);let p=f[h],b=f[d];if(a){const m=h==="y"?"top":"left",y=h==="y"?"bottom":"right",v=p+u[m],_=p-u[y];p=K_(v,p,_)}if(o){const m=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=b+u[m],_=b-u[y];b=K_(v,b,_)}const S=l.fn({...t,[h]:p,[d]:b});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[h]:a,[d]:o}}}}}},Pge=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=Ys(e,t),f={x:n,y:r},u=qi(i),d=WC(u);let h=f[d],p=f[u];const b=Ys(o,t),S=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){const v=d==="y"?"height":"width",_=s.reference[d]-s.floating[v]+S.mainAxis,C=s.reference[d]+s.reference[v]-S.mainAxis;h<_?h=_:h>C&&(h=C)}if(c){var m,y;const v=d==="y"?"width":"height",_=P5.has(Js(i)),C=s.reference[u]-s.floating[v]+(_&&((m=a.offset)==null?void 0:m[u])||0)+(_?0:S.crossAxis),k=s.reference[u]+s.reference[v]+(_?0:((y=a.offset)==null?void 0:y[u])||0)-(_?S.crossAxis:0);p<C?p=C:p>k&&(p=k)}return{[d]:h,[u]:p}}}},Uge=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:a,elements:o}=t,{apply:l=()=>{},...c}=Ys(e,t),f=await a.detectOverflow(t,c),u=Js(i),d=wf(i),h=qi(i)==="y",{width:p,height:b}=s.floating;let S,m;u==="top"||u==="bottom"?(S=u,m=d===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(m=u,S=d==="end"?"top":"bottom");const y=b-f.top-f.bottom,v=p-f.left-f.right,_=co(b-f[S],y),C=co(p-f[m],v),k=!t.middlewareData.shift;let A=_,N=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=y),k&&!d){const M=gr(f.left,0),$=gr(f.right,0),L=gr(f.top,0),J=gr(f.bottom,0);h?N=p-2*(M!==0||$!==0?M+$:gr(f.left,f.right)):A=b-2*(L!==0||J!==0?L+J:gr(f.top,f.bottom))}await l({...t,availableWidth:N,availableHeight:A});const D=await a.getDimensions(o.floating);return p!==D.width||b!==D.height?{reset:{rects:!0}}:{}}}};function Qv(){return typeof window<"u"}function xf(e){return U5(e)?(e.nodeName||"").toLowerCase():"#document"}function Ar(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function as(e){var t;return(t=(U5(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function U5(e){return Qv()?e instanceof Node||e instanceof Ar(e).Node:!1}function Ci(e){return Qv()?e instanceof Element||e instanceof Ar(e).Element:!1}function es(e){return Qv()?e instanceof HTMLElement||e instanceof Ar(e).HTMLElement:!1}function pM(e){return!Qv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ar(e).ShadowRoot}const Bge=new Set(["inline","contents"]);function Nm(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ti(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Bge.has(i)}const Hge=new Set(["table","td","th"]);function qge(e){return Hge.has(xf(e))}const Vge=[":popover-open",":modal"];function Xv(e){return Vge.some(t=>{try{return e.matches(t)}catch{return!1}})}const Kge=["transform","translate","scale","rotate","perspective"],Gge=["transform","translate","scale","rotate","perspective","filter"],Yge=["paint","layout","strict","content"];function tT(e){const t=nT(),n=Ci(e)?Ti(e):e;return Kge.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Gge.some(r=>(n.willChange||"").includes(r))||Yge.some(r=>(n.contain||"").includes(r))}function Jge(e){let t=uo(e);for(;es(t)&&!ju(t);){if(tT(t))return t;if(Xv(t))return null;t=uo(t)}return null}function nT(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Qge=new Set(["html","body","#document"]);function ju(e){return Qge.has(xf(e))}function Ti(e){return Ar(e).getComputedStyle(e)}function Wv(e){return Ci(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function uo(e){if(xf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||pM(e)&&e.host||as(e);return pM(t)?t.host:t}function B5(e){const t=uo(e);return ju(t)?e.ownerDocument?e.ownerDocument.body:e.body:es(t)&&Nm(t)?t:B5(t)}function Dh(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=B5(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),a=Ar(i);if(s){const o=Y_(a);return t.concat(a,a.visualViewport||[],Nm(i)?i:[],o&&n?Dh(o):[])}return t.concat(i,Dh(i,[],n))}function Y_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function H5(e){const t=Ti(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=es(e),s=i?e.offsetWidth:n,a=i?e.offsetHeight:r,o=Qy(n)!==s||Qy(r)!==a;return o&&(n=s,r=a),{width:n,height:r,$:o}}function rT(e){return Ci(e)?e:e.contextElement}function nu(e){const t=rT(e);if(!es(t))return Qi(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=H5(t);let a=(s?Qy(n.width):n.width)/r,o=(s?Qy(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const Xge=Qi(0);function q5(e){const t=Ar(e);return!nT()||!t.visualViewport?Xge:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Wge(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ar(e)?!1:t}function Al(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=rT(e);let a=Qi(1);t&&(r?Ci(r)&&(a=nu(r)):a=nu(e));const o=Wge(s,n,r)?q5(s):Qi(0);let l=(i.left+o.x)/a.x,c=(i.top+o.y)/a.y,f=i.width/a.x,u=i.height/a.y;if(s){const d=Ar(s),h=r&&Ci(r)?Ar(r):r;let p=d,b=Y_(p);for(;b&&r&&h!==p;){const S=nu(b),m=b.getBoundingClientRect(),y=Ti(b),v=m.left+(b.clientLeft+parseFloat(y.paddingLeft))*S.x,_=m.top+(b.clientTop+parseFloat(y.paddingTop))*S.y;l*=S.x,c*=S.y,f*=S.x,u*=S.y,l+=v,c+=_,p=Ar(b),b=Y_(p)}}return Wy({width:f,height:u,x:l,y:c})}function Zv(e,t){const n=Wv(e).scrollLeft;return t?t.left+n:Al(as(e)).left+n}function V5(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Zv(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Zge(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",a=as(r),o=t?Xv(t.floating):!1;if(r===a||o&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Qi(1);const f=Qi(0),u=es(r);if((u||!u&&!s)&&((xf(r)!=="body"||Nm(a))&&(l=Wv(r)),es(r))){const h=Al(r);c=nu(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const d=a&&!u&&!s?V5(a,l):Qi(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+f.x+d.x,y:n.y*c.y-l.scrollTop*c.y+f.y+d.y}}function eye(e){return Array.from(e.getClientRects())}function tye(e){const t=as(e),n=Wv(e),r=e.ownerDocument.body,i=gr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=gr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Zv(e);const o=-n.scrollTop;return Ti(r).direction==="rtl"&&(a+=gr(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:o}}const gM=25;function nye(e,t){const n=Ar(e),r=as(e),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;const f=nT();(!f||f&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}const c=Zv(r);if(c<=0){const f=r.ownerDocument,u=f.body,d=getComputedStyle(u),h=f.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,p=Math.abs(r.clientWidth-u.clientWidth-h);p<=gM&&(s-=p)}else c<=gM&&(s+=c);return{width:s,height:a,x:o,y:l}}const rye=new Set(["absolute","fixed"]);function iye(e,t){const n=Al(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=es(e)?nu(e):Qi(1),a=e.clientWidth*s.x,o=e.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:a,height:o,x:l,y:c}}function yM(e,t,n){let r;if(t==="viewport")r=nye(e,n);else if(t==="document")r=tye(as(e));else if(Ci(t))r=iye(t,n);else{const i=q5(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Wy(r)}function K5(e,t){const n=uo(e);return n===t||!Ci(n)||ju(n)?!1:Ti(n).position==="fixed"||K5(n,t)}function sye(e,t){const n=t.get(e);if(n)return n;let r=Dh(e,[],!1).filter(o=>Ci(o)&&xf(o)!=="body"),i=null;const s=Ti(e).position==="fixed";let a=s?uo(e):e;for(;Ci(a)&&!ju(a);){const o=Ti(a),l=tT(a);!l&&o.position==="fixed"&&(i=null),(s?!l&&!i:!l&&o.position==="static"&&!!i&&rye.has(i.position)||Nm(a)&&!l&&K5(e,a))?r=r.filter(f=>f!==a):i=o,a=uo(a)}return t.set(e,r),r}function aye(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Xv(t)?[]:sye(t,this._c):[].concat(n),r],o=a[0],l=a.reduce((c,f)=>{const u=yM(t,f,i);return c.top=gr(u.top,c.top),c.right=co(u.right,c.right),c.bottom=co(u.bottom,c.bottom),c.left=gr(u.left,c.left),c},yM(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function oye(e){const{width:t,height:n}=H5(e);return{width:t,height:n}}function lye(e,t,n){const r=es(t),i=as(t),s=n==="fixed",a=Al(e,!0,s,t);let o={scrollLeft:0,scrollTop:0};const l=Qi(0);function c(){l.x=Zv(i)}if(r||!r&&!s)if((xf(t)!=="body"||Nm(i))&&(o=Wv(t)),r){const h=Al(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&c();s&&!r&&i&&c();const f=i&&!r&&!s?V5(i,o):Qi(0),u=a.left+o.scrollLeft-l.x-f.x,d=a.top+o.scrollTop-l.y-f.y;return{x:u,y:d,width:a.width,height:a.height}}function B0(e){return Ti(e).position==="static"}function bM(e,t){if(!es(e)||Ti(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return as(e)===n&&(n=n.ownerDocument.body),n}function G5(e,t){const n=Ar(e);if(Xv(e))return n;if(!es(e)){let i=uo(e);for(;i&&!ju(i);){if(Ci(i)&&!B0(i))return i;i=uo(i)}return n}let r=bM(e,t);for(;r&&qge(r)&&B0(r);)r=bM(r,t);return r&&ju(r)&&B0(r)&&!tT(r)?n:r||Jge(e)||n}const cye=async function(e){const t=this.getOffsetParent||G5,n=this.getDimensions,r=await n(e.floating);return{reference:lye(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function uye(e){return Ti(e).direction==="rtl"}const fye={convertOffsetParentRelativeRectToViewportRelativeRect:Zge,getDocumentElement:as,getClippingRect:aye,getOffsetParent:G5,getElementRects:cye,getClientRects:eye,getDimensions:oye,getScale:nu,isElement:Ci,isRTL:uye};function Y5(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dye(e,t){let n=null,r;const i=as(e);function s(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:f,top:u,width:d,height:h}=c;if(o||t(),!d||!h)return;const p=Sp(u),b=Sp(i.clientWidth-(f+d)),S=Sp(i.clientHeight-(u+h)),m=Sp(f),v={rootMargin:-p+"px "+-b+"px "+-S+"px "+-m+"px",threshold:gr(0,co(1,l))||1};let _=!0;function C(k){const A=k[0].intersectionRatio;if(A!==l){if(!_)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}A===1&&!Y5(c,e.getBoundingClientRect())&&a(),_=!1}try{n=new IntersectionObserver(C,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,v)}n.observe(e)}return a(!0),s}function hye(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=rT(e),f=i||s?[...c?Dh(c):[],...Dh(t)]:[];f.forEach(m=>{i&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const u=c&&o?dye(c,n):null;let d=-1,h=null;a&&(h=new ResizeObserver(m=>{let[y]=m;y&&y.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,b=l?Al(e):null;l&&S();function S(){const m=Al(e);b&&!Y5(b,m)&&n(),b=m,p=requestAnimationFrame(S)}return n(),()=>{var m;f.forEach(y=>{i&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),u==null||u(),(m=h)==null||m.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const mye=jge,pye=Fge,gye=Ige,yye=Uge,bye=$ge,vM=zge,vye=Pge,Sye=(e,t,n)=>{const r=new Map,i={platform:fye,...n},s={...i.platform,_c:r};return Dge(e,t,{...i,platform:s})};var wye=typeof document<"u",xye=function(){},dg=wye?x.useLayoutEffect:xye;function Zy(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Zy(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!Zy(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function J5(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function SM(e,t){const n=J5(e);return Math.round(t*n)/n}function H0(e){const t=x.useRef(e);return dg(()=>{t.current=e}),t}function _ye(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:a}={},transform:o=!0,whileElementsMounted:l,open:c}=e,[f,u]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=x.useState(r);Zy(d,r)||h(r);const[p,b]=x.useState(null),[S,m]=x.useState(null),y=x.useCallback(I=>{I!==k.current&&(k.current=I,b(I))},[]),v=x.useCallback(I=>{I!==A.current&&(A.current=I,m(I))},[]),_=s||p,C=a||S,k=x.useRef(null),A=x.useRef(null),N=x.useRef(f),D=l!=null,M=H0(l),$=H0(i),L=H0(c),J=x.useCallback(()=>{if(!k.current||!A.current)return;const I={placement:t,strategy:n,middleware:d};$.current&&(I.platform=$.current),Sye(k.current,A.current,I).then(te=>{const R={...te,isPositioned:L.current!==!1};Y.current&&!Zy(N.current,R)&&(N.current=R,Uu.flushSync(()=>{u(R)}))})},[d,t,n,$,L]);dg(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,u(I=>({...I,isPositioned:!1})))},[c]);const Y=x.useRef(!1);dg(()=>(Y.current=!0,()=>{Y.current=!1}),[]),dg(()=>{if(_&&(k.current=_),C&&(A.current=C),_&&C){if(M.current)return M.current(_,C,J);J()}},[_,C,J,M,D]);const G=x.useMemo(()=>({reference:k,floating:A,setReference:y,setFloating:v}),[y,v]),z=x.useMemo(()=>({reference:_,floating:C}),[_,C]),j=x.useMemo(()=>{const I={position:n,left:0,top:0};if(!z.floating)return I;const te=SM(z.floating,f.x),R=SM(z.floating,f.y);return o?{...I,transform:"translate("+te+"px, "+R+"px)",...J5(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:R}},[n,o,z.floating,f.x,f.y]);return x.useMemo(()=>({...f,update:J,refs:G,elements:z,floatingStyles:j}),[f,J,G,z,j])}const kye=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?vM({element:r.current,padding:i}).fn(n):{}:r?vM({element:r,padding:i}).fn(n):{}}}},Eye=(e,t)=>({...mye(e),options:[e,t]}),Cye=(e,t)=>({...pye(e),options:[e,t]}),Tye=(e,t)=>({...vye(e),options:[e,t]}),Aye=(e,t)=>({...gye(e),options:[e,t]}),Oye=(e,t)=>({...yye(e),options:[e,t]}),Rye=(e,t)=>({...bye(e),options:[e,t]}),Mye=(e,t)=>({...kye(e),options:[e,t]});var Nye="Arrow",Q5=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return w.jsx(qe.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:w.jsx("polygon",{points:"0,0 30,0 15,10"})})});Q5.displayName=Nye;var Dye=Q5,iT="Popper",[X5,W5]=Sf(iT),[zye,Z5]=X5(iT),e6=e=>{const{__scopePopper:t,children:n}=e,[r,i]=x.useState(null);return w.jsx(zye,{scope:t,anchor:r,onAnchorChange:i,children:n})};e6.displayName=iT;var t6="PopperAnchor",n6=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=Z5(t6,n),a=x.useRef(null),o=Tt(t,a),l=x.useRef(null);return x.useEffect(()=>{const c=l.current;l.current=(r==null?void 0:r.current)||a.current,c!==l.current&&s.onAnchorChange(l.current)}),r?null:w.jsx(qe.div,{...i,ref:o})});n6.displayName=t6;var sT="PopperContent",[Iye,$ye]=X5(sT),r6=x.forwardRef((e,t)=>{var H,he,we,xe,Me,$e;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:p,...b}=e,S=Z5(sT,n),[m,y]=x.useState(null),v=Tt(t,zn=>y(zn)),[_,C]=x.useState(null),k=Sge(_),A=(k==null?void 0:k.width)??0,N=(k==null?void 0:k.height)??0,D=r+(s!=="center"?"-"+s:""),M=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},$=Array.isArray(c)?c:[c],L=$.length>0,J={padding:M,boundary:$.filter(jye),altBoundary:L},{refs:Y,floatingStyles:G,placement:z,isPositioned:j,middlewareData:I}=_ye({strategy:"fixed",placement:D,whileElementsMounted:(...zn)=>hye(...zn,{animationFrame:h==="always"}),elements:{reference:S.anchor},middleware:[Eye({mainAxis:i+N,alignmentAxis:a}),l&&Cye({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Tye():void 0,...J}),l&&Aye({...J}),Oye({...J,apply:({elements:zn,rects:Dr,availableWidth:ra,availableHeight:ia})=>{const{width:sa,height:cS}=Dr.reference,Co=zn.floating.style;Co.setProperty("--radix-popper-available-width",`${ra}px`),Co.setProperty("--radix-popper-available-height",`${ia}px`),Co.setProperty("--radix-popper-anchor-width",`${sa}px`),Co.setProperty("--radix-popper-anchor-height",`${cS}px`)}}),_&&Mye({element:_,padding:o}),Fye({arrowWidth:A,arrowHeight:N}),d&&Rye({strategy:"referenceHidden",...J})]}),[te,R]=a6(z),Re=oo(p);Nn(()=>{j&&(Re==null||Re())},[j,Re]);const U=(H=I.arrow)==null?void 0:H.x,T=(he=I.arrow)==null?void 0:he.y,W=((we=I.arrow)==null?void 0:we.centerOffset)!==0,[Z,le]=x.useState();return Nn(()=>{m&&le(window.getComputedStyle(m).zIndex)},[m]),w.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:j?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Z,"--radix-popper-transform-origin":[(xe=I.transformOrigin)==null?void 0:xe.x,(Me=I.transformOrigin)==null?void 0:Me.y].join(" "),...(($e=I.hide)==null?void 0:$e.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:w.jsx(Iye,{scope:n,placedSide:te,onArrowChange:C,arrowX:U,arrowY:T,shouldHideArrow:W,children:w.jsx(qe.div,{"data-side":te,"data-align":R,...b,ref:v,style:{...b.style,animation:j?void 0:"none"}})})})});r6.displayName=sT;var i6="PopperArrow",Lye={top:"bottom",right:"left",bottom:"top",left:"right"},s6=x.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=$ye(i6,r),a=Lye[s.placedSide];return w.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:w.jsx(Dye,{...i,ref:n,style:{...i.style,display:"block"}})})});s6.displayName=i6;function jye(e){return e!==null}var Fye=e=>({name:"transformOrigin",options:e,fn(t){var S,m,y;const{placement:n,rects:r,middlewareData:i}=t,a=((S=i.arrow)==null?void 0:S.centerOffset)!==0,o=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[c,f]=a6(n),u={start:"0%",center:"50%",end:"100%"}[f],d=(((m=i.arrow)==null?void 0:m.x)??0)+o/2,h=(((y=i.arrow)==null?void 0:y.y)??0)+l/2;let p="",b="";return c==="bottom"?(p=a?u:`${d}px`,b=`${-l}px`):c==="top"?(p=a?u:`${d}px`,b=`${r.floating.height+l}px`):c==="right"?(p=`${-l}px`,b=a?u:`${h}px`):c==="left"&&(p=`${r.floating.width+l}px`,b=a?u:`${h}px`),{data:{x:p,y:b}}}});function a6(e){const[t,n="center"]=e.split("-");return[t,n]}var Pye=e6,Uye=n6,Bye=r6,Hye=s6,q0="rovingFocusGroup.onEntryFocus",qye={bubbles:!1,cancelable:!0},Dm="RovingFocusGroup",[J_,o6,Vye]=j5(Dm),[Kye,l6]=Sf(Dm,[Vye]),[Gye,Yye]=Kye(Dm),c6=x.forwardRef((e,t)=>w.jsx(J_.Provider,{scope:e.__scopeRovingFocusGroup,children:w.jsx(J_.Slot,{scope:e.__scopeRovingFocusGroup,children:w.jsx(Jye,{...e,ref:t})})}));c6.displayName=Dm;var Jye=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:f=!1,...u}=e,d=x.useRef(null),h=Tt(t,d),p=XC(s),[b,S]=El({prop:a,defaultProp:o??null,onChange:l,caller:Dm}),[m,y]=x.useState(!1),v=oo(c),_=o6(n),C=x.useRef(!1),[k,A]=x.useState(0);return x.useEffect(()=>{const N=d.current;if(N)return N.addEventListener(q0,v),()=>N.removeEventListener(q0,v)},[v]),w.jsx(Gye,{scope:n,orientation:r,dir:p,loop:i,currentTabStopId:b,onItemFocus:x.useCallback(N=>S(N),[S]),onItemShiftTab:x.useCallback(()=>y(!0),[]),onFocusableItemAdd:x.useCallback(()=>A(N=>N+1),[]),onFocusableItemRemove:x.useCallback(()=>A(N=>N-1),[]),children:w.jsx(qe.div,{tabIndex:m||k===0?-1:0,"data-orientation":r,...u,ref:h,style:{outline:"none",...e.style},onMouseDown:He(e.onMouseDown,()=>{C.current=!0}),onFocus:He(e.onFocus,N=>{const D=!C.current;if(N.target===N.currentTarget&&D&&!m){const M=new CustomEvent(q0,qye);if(N.currentTarget.dispatchEvent(M),!M.defaultPrevented){const $=_().filter(z=>z.focusable),L=$.find(z=>z.active),J=$.find(z=>z.id===b),G=[L,J,...$].filter(Boolean).map(z=>z.ref.current);d6(G,f)}}C.current=!1}),onBlur:He(e.onBlur,()=>y(!1))})})}),u6="RovingFocusGroupItem",f6=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:a,...o}=e,l=Tr(),c=s||l,f=Yye(u6,n),u=f.currentTabStopId===c,d=o6(n),{onFocusableItemAdd:h,onFocusableItemRemove:p,currentTabStopId:b}=f;return x.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),w.jsx(J_.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:w.jsx(qe.span,{tabIndex:u?0:-1,"data-orientation":f.orientation,...o,ref:t,onMouseDown:He(e.onMouseDown,S=>{r?f.onItemFocus(c):S.preventDefault()}),onFocus:He(e.onFocus,()=>f.onItemFocus(c)),onKeyDown:He(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){f.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const m=Wye(S,f.orientation,f.dir);if(m!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let v=d().filter(_=>_.focusable).map(_=>_.ref.current);if(m==="last")v.reverse();else if(m==="prev"||m==="next"){m==="prev"&&v.reverse();const _=v.indexOf(S.currentTarget);v=f.loop?Zye(v,_+1):v.slice(_+1)}setTimeout(()=>d6(v))}}),children:typeof a=="function"?a({isCurrentTabStop:u,hasTabStop:b!=null}):a})})});f6.displayName=u6;var Qye={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Xye(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Wye(e,t,n){const r=Xye(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Qye[r]}function d6(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Zye(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ebe=c6,tbe=f6;function wM(e,[t,n]){return Math.min(n,Math.max(t,e))}var nbe=[" ","Enter","ArrowUp","ArrowDown"],rbe=[" ","Enter"],Ol="Select",[eS,tS,ibe]=j5(Ol),[_f]=Sf(Ol,[ibe,W5]),nS=W5(),[sbe,xo]=_f(Ol),[abe,obe]=_f(Ol),h6=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:s,value:a,defaultValue:o,onValueChange:l,dir:c,name:f,autoComplete:u,disabled:d,required:h,form:p}=e,b=nS(t),[S,m]=x.useState(null),[y,v]=x.useState(null),[_,C]=x.useState(!1),k=XC(c),[A,N]=El({prop:r,defaultProp:i??!1,onChange:s,caller:Ol}),[D,M]=El({prop:a,defaultProp:o,onChange:l,caller:Ol}),$=x.useRef(null),L=S?p||!!S.closest("form"):!0,[J,Y]=x.useState(new Set),G=Array.from(J).map(z=>z.props.value).join(";");return w.jsx(Pye,{...b,children:w.jsxs(sbe,{required:h,scope:t,trigger:S,onTriggerChange:m,valueNode:y,onValueNodeChange:v,valueNodeHasChildren:_,onValueNodeHasChildrenChange:C,contentId:Tr(),value:D,onValueChange:M,open:A,onOpenChange:N,dir:k,triggerPointerDownPosRef:$,disabled:d,children:[w.jsx(eS.Provider,{scope:t,children:w.jsx(abe,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(z=>{Y(j=>new Set(j).add(z))},[]),onNativeOptionRemove:x.useCallback(z=>{Y(j=>{const I=new Set(j);return I.delete(z),I})},[]),children:n})}),L?w.jsxs(I6,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:u,value:D,onChange:z=>M(z.target.value),disabled:d,form:p,children:[D===void 0?w.jsx("option",{value:""}):null,Array.from(J)]},G):null]})})};h6.displayName=Ol;var m6="SelectTrigger",p6=x.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,s=nS(n),a=xo(m6,n),o=a.disabled||r,l=Tt(t,a.onTriggerChange),c=tS(n),f=x.useRef("touch"),[u,d,h]=L6(b=>{const S=c().filter(v=>!v.disabled),m=S.find(v=>v.value===a.value),y=j6(S,b,m);y!==void 0&&a.onValueChange(y.value)}),p=b=>{o||(a.onOpenChange(!0),h()),b&&(a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return w.jsx(Uye,{asChild:!0,...s,children:w.jsx(qe.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":$6(a.value)?"":void 0,...i,ref:l,onClick:He(i.onClick,b=>{b.currentTarget.focus(),f.current!=="mouse"&&p(b)}),onPointerDown:He(i.onPointerDown,b=>{f.current=b.pointerType;const S=b.target;S.hasPointerCapture(b.pointerId)&&S.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(p(b),b.preventDefault())}),onKeyDown:He(i.onKeyDown,b=>{const S=u.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&d(b.key),!(S&&b.key===" ")&&nbe.includes(b.key)&&(p(),b.preventDefault())})})})});p6.displayName=m6;var g6="SelectValue",y6=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:s,placeholder:a="",...o}=e,l=xo(g6,n),{onValueNodeHasChildrenChange:c}=l,f=s!==void 0,u=Tt(t,l.onValueNodeChange);return Nn(()=>{c(f)},[c,f]),w.jsx(qe.span,{...o,ref:u,style:{pointerEvents:"none"},children:$6(l.value)?w.jsx(w.Fragment,{children:a}):s})});y6.displayName=g6;var lbe="SelectIcon",b6=x.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return w.jsx(qe.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});b6.displayName=lbe;var cbe="SelectPortal",v6=e=>w.jsx(VC,{asChild:!0,...e});v6.displayName=cbe;var Rl="SelectContent",S6=x.forwardRef((e,t)=>{const n=xo(Rl,e.__scopeSelect),[r,i]=x.useState();if(Nn(()=>{i(new DocumentFragment)},[]),!n.open){const s=r;return s?Uu.createPortal(w.jsx(w6,{scope:e.__scopeSelect,children:w.jsx(eS.Slot,{scope:e.__scopeSelect,children:w.jsx("div",{children:e.children})})}),s):null}return w.jsx(x6,{...e,ref:t})});S6.displayName=Rl;var li=10,[w6,_o]=_f(Rl),ube="SelectContentImpl",fbe=Lu("SelectContent.RemoveScroll"),x6=x.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:a,side:o,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:b,avoidCollisions:S,...m}=e,y=xo(Rl,n),[v,_]=x.useState(null),[C,k]=x.useState(null),A=Tt(t,H=>_(H)),[N,D]=x.useState(null),[M,$]=x.useState(null),L=tS(n),[J,Y]=x.useState(!1),G=x.useRef(!1);x.useEffect(()=>{if(v)return c5(v)},[v]),e5();const z=x.useCallback(H=>{const[he,...we]=L().map($e=>$e.ref.current),[xe]=we.slice(-1),Me=document.activeElement;for(const $e of H)if($e===Me||($e==null||$e.scrollIntoView({block:"nearest"}),$e===he&&C&&(C.scrollTop=0),$e===xe&&C&&(C.scrollTop=C.scrollHeight),$e==null||$e.focus(),document.activeElement!==Me))return},[L,C]),j=x.useCallback(()=>z([N,v]),[z,N,v]);x.useEffect(()=>{J&&j()},[J,j]);const{onOpenChange:I,triggerPointerDownPosRef:te}=y;x.useEffect(()=>{if(v){let H={x:0,y:0};const he=xe=>{var Me,$e;H={x:Math.abs(Math.round(xe.pageX)-(((Me=te.current)==null?void 0:Me.x)??0)),y:Math.abs(Math.round(xe.pageY)-((($e=te.current)==null?void 0:$e.y)??0))}},we=xe=>{H.x<=10&&H.y<=10?xe.preventDefault():v.contains(xe.target)||I(!1),document.removeEventListener("pointermove",he),te.current=null};return te.current!==null&&(document.addEventListener("pointermove",he),document.addEventListener("pointerup",we,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",he),document.removeEventListener("pointerup",we,{capture:!0})}}},[v,I,te]),x.useEffect(()=>{const H=()=>I(!1);return window.addEventListener("blur",H),window.addEventListener("resize",H),()=>{window.removeEventListener("blur",H),window.removeEventListener("resize",H)}},[I]);const[R,Re]=L6(H=>{const he=L().filter(Me=>!Me.disabled),we=he.find(Me=>Me.ref.current===document.activeElement),xe=j6(he,H,we);xe&&setTimeout(()=>xe.ref.current.focus())}),U=x.useCallback((H,he,we)=>{const xe=!G.current&&!we;(y.value!==void 0&&y.value===he||xe)&&(D(H),xe&&(G.current=!0))},[y.value]),T=x.useCallback(()=>v==null?void 0:v.focus(),[v]),W=x.useCallback((H,he,we)=>{const xe=!G.current&&!we;(y.value!==void 0&&y.value===he||xe)&&$(H)},[y.value]),Z=r==="popper"?Q_:_6,le=Z===Q_?{side:o,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:b,avoidCollisions:S}:{};return w.jsx(w6,{scope:n,content:v,viewport:C,onViewportChange:k,itemRefCallback:U,selectedItem:N,onItemLeave:T,itemTextRefCallback:W,focusSelectedItem:j,selectedItemText:M,position:r,isPositioned:J,searchRef:R,children:w.jsx(KC,{as:fbe,allowPinchZoom:!0,children:w.jsx(qC,{asChild:!0,trapped:y.open,onMountAutoFocus:H=>{H.preventDefault()},onUnmountAutoFocus:He(i,H=>{var he;(he=y.trigger)==null||he.focus({preventScroll:!0}),H.preventDefault()}),children:w.jsx(HC,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:H=>H.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:w.jsx(Z,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:H=>H.preventDefault(),...m,...le,onPlaced:()=>Y(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:He(m.onKeyDown,H=>{const he=H.ctrlKey||H.altKey||H.metaKey;if(H.key==="Tab"&&H.preventDefault(),!he&&H.key.length===1&&Re(H.key),["ArrowUp","ArrowDown","Home","End"].includes(H.key)){let xe=L().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);if(["ArrowUp","End"].includes(H.key)&&(xe=xe.slice().reverse()),["ArrowUp","ArrowDown"].includes(H.key)){const Me=H.target,$e=xe.indexOf(Me);xe=xe.slice($e+1)}setTimeout(()=>z(xe)),H.preventDefault()}})})})})})})});x6.displayName=ube;var dbe="SelectItemAlignedPosition",_6=x.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,s=xo(Rl,n),a=_o(Rl,n),[o,l]=x.useState(null),[c,f]=x.useState(null),u=Tt(t,A=>f(A)),d=tS(n),h=x.useRef(!1),p=x.useRef(!0),{viewport:b,selectedItem:S,selectedItemText:m,focusSelectedItem:y}=a,v=x.useCallback(()=>{if(s.trigger&&s.valueNode&&o&&c&&b&&S&&m){const A=s.trigger.getBoundingClientRect(),N=c.getBoundingClientRect(),D=s.valueNode.getBoundingClientRect(),M=m.getBoundingClientRect();if(s.dir!=="rtl"){const Me=M.left-N.left,$e=D.left-Me,zn=A.left-$e,Dr=A.width+zn,ra=Math.max(Dr,N.width),ia=window.innerWidth-li,sa=wM($e,[li,Math.max(li,ia-ra)]);o.style.minWidth=Dr+"px",o.style.left=sa+"px"}else{const Me=N.right-M.right,$e=window.innerWidth-D.right-Me,zn=window.innerWidth-A.right-$e,Dr=A.width+zn,ra=Math.max(Dr,N.width),ia=window.innerWidth-li,sa=wM($e,[li,Math.max(li,ia-ra)]);o.style.minWidth=Dr+"px",o.style.right=sa+"px"}const $=d(),L=window.innerHeight-li*2,J=b.scrollHeight,Y=window.getComputedStyle(c),G=parseInt(Y.borderTopWidth,10),z=parseInt(Y.paddingTop,10),j=parseInt(Y.borderBottomWidth,10),I=parseInt(Y.paddingBottom,10),te=G+z+J+I+j,R=Math.min(S.offsetHeight*5,te),Re=window.getComputedStyle(b),U=parseInt(Re.paddingTop,10),T=parseInt(Re.paddingBottom,10),W=A.top+A.height/2-li,Z=L-W,le=S.offsetHeight/2,H=S.offsetTop+le,he=G+z+H,we=te-he;if(he<=W){const Me=$.length>0&&S===$[$.length-1].ref.current;o.style.bottom="0px";const $e=c.clientHeight-b.offsetTop-b.offsetHeight,zn=Math.max(Z,le+(Me?T:0)+$e+j),Dr=he+zn;o.style.height=Dr+"px"}else{const Me=$.length>0&&S===$[0].ref.current;o.style.top="0px";const zn=Math.max(W,G+b.offsetTop+(Me?U:0)+le)+we;o.style.height=zn+"px",b.scrollTop=he-W+b.offsetTop}o.style.margin=`${li}px 0`,o.style.minHeight=R+"px",o.style.maxHeight=L+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[d,s.trigger,s.valueNode,o,c,b,S,m,s.dir,r]);Nn(()=>v(),[v]);const[_,C]=x.useState();Nn(()=>{c&&C(window.getComputedStyle(c).zIndex)},[c]);const k=x.useCallback(A=>{A&&p.current===!0&&(v(),y==null||y(),p.current=!1)},[v,y]);return w.jsx(mbe,{scope:n,contentWrapper:o,shouldExpandOnScrollRef:h,onScrollButtonChange:k,children:w.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:w.jsx(qe.div,{...i,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});_6.displayName=dbe;var hbe="SelectPopperPosition",Q_=x.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=li,...s}=e,a=nS(n);return w.jsx(Bye,{...a,...s,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Q_.displayName=hbe;var[mbe,aT]=_f(Rl,{}),X_="SelectViewport",k6=x.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,s=_o(X_,n),a=aT(X_,n),o=Tt(t,s.onViewportChange),l=x.useRef(0);return w.jsxs(w.Fragment,{children:[w.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),w.jsx(eS.Slot,{scope:n,children:w.jsx(qe.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:He(i.onScroll,c=>{const f=c.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:d}=a;if(d!=null&&d.current&&u){const h=Math.abs(l.current-f.scrollTop);if(h>0){const p=window.innerHeight-li*2,b=parseFloat(u.style.minHeight),S=parseFloat(u.style.height),m=Math.max(b,S);if(m<p){const y=m+h,v=Math.min(p,y),_=y-v;u.style.height=v+"px",u.style.bottom==="0px"&&(f.scrollTop=_>0?_:0,u.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});k6.displayName=X_;var E6="SelectGroup",[pbe,gbe]=_f(E6),ybe=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Tr();return w.jsx(pbe,{scope:n,id:i,children:w.jsx(qe.div,{role:"group","aria-labelledby":i,...r,ref:t})})});ybe.displayName=E6;var C6="SelectLabel",bbe=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=gbe(C6,n);return w.jsx(qe.div,{id:i.id,...r,ref:t})});bbe.displayName=C6;var eb="SelectItem",[vbe,T6]=_f(eb),A6=x.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:s,...a}=e,o=xo(eb,n),l=_o(eb,n),c=o.value===r,[f,u]=x.useState(s??""),[d,h]=x.useState(!1),p=Tt(t,y=>{var v;return(v=l.itemRefCallback)==null?void 0:v.call(l,y,r,i)}),b=Tr(),S=x.useRef("touch"),m=()=>{i||(o.onValueChange(r),o.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return w.jsx(vbe,{scope:n,value:r,disabled:i,textId:b,isSelected:c,onItemTextChange:x.useCallback(y=>{u(v=>v||((y==null?void 0:y.textContent)??"").trim())},[]),children:w.jsx(eS.ItemSlot,{scope:n,value:r,disabled:i,textValue:f,children:w.jsx(qe.div,{role:"option","aria-labelledby":b,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:p,onFocus:He(a.onFocus,()=>h(!0)),onBlur:He(a.onBlur,()=>h(!1)),onClick:He(a.onClick,()=>{S.current!=="mouse"&&m()}),onPointerUp:He(a.onPointerUp,()=>{S.current==="mouse"&&m()}),onPointerDown:He(a.onPointerDown,y=>{S.current=y.pointerType}),onPointerMove:He(a.onPointerMove,y=>{var v;S.current=y.pointerType,i?(v=l.onItemLeave)==null||v.call(l):S.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:He(a.onPointerLeave,y=>{var v;y.currentTarget===document.activeElement&&((v=l.onItemLeave)==null||v.call(l))}),onKeyDown:He(a.onKeyDown,y=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&y.key===" "||(rbe.includes(y.key)&&m(),y.key===" "&&y.preventDefault())})})})})});A6.displayName=eb;var dd="SelectItemText",O6=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...s}=e,a=xo(dd,n),o=_o(dd,n),l=T6(dd,n),c=obe(dd,n),[f,u]=x.useState(null),d=Tt(t,m=>u(m),l.onItemTextChange,m=>{var y;return(y=o.itemTextRefCallback)==null?void 0:y.call(o,m,l.value,l.disabled)}),h=f==null?void 0:f.textContent,p=x.useMemo(()=>w.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:b,onNativeOptionRemove:S}=c;return Nn(()=>(b(p),()=>S(p)),[b,S,p]),w.jsxs(w.Fragment,{children:[w.jsx(qe.span,{id:l.textId,...s,ref:d}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Uu.createPortal(s.children,a.valueNode):null]})});O6.displayName=dd;var R6="SelectItemIndicator",M6=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return T6(R6,n).isSelected?w.jsx(qe.span,{"aria-hidden":!0,...r,ref:t}):null});M6.displayName=R6;var W_="SelectScrollUpButton",N6=x.forwardRef((e,t)=>{const n=_o(W_,e.__scopeSelect),r=aT(W_,e.__scopeSelect),[i,s]=x.useState(!1),a=Tt(t,r.onScrollButtonChange);return Nn(()=>{if(n.viewport&&n.isPositioned){let o=function(){const c=l.scrollTop>0;s(c)};const l=n.viewport;return o(),l.addEventListener("scroll",o),()=>l.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),i?w.jsx(z6,{...e,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:l}=n;o&&l&&(o.scrollTop=o.scrollTop-l.offsetHeight)}}):null});N6.displayName=W_;var Z_="SelectScrollDownButton",D6=x.forwardRef((e,t)=>{const n=_o(Z_,e.__scopeSelect),r=aT(Z_,e.__scopeSelect),[i,s]=x.useState(!1),a=Tt(t,r.onScrollButtonChange);return Nn(()=>{if(n.viewport&&n.isPositioned){let o=function(){const c=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<c;s(f)};const l=n.viewport;return o(),l.addEventListener("scroll",o),()=>l.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),i?w.jsx(z6,{...e,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:l}=n;o&&l&&(o.scrollTop=o.scrollTop+l.offsetHeight)}}):null});D6.displayName=Z_;var z6=x.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,s=_o("SelectScrollButton",n),a=x.useRef(null),o=tS(n),l=x.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return x.useEffect(()=>()=>l(),[l]),Nn(()=>{var f;const c=o().find(u=>u.ref.current===document.activeElement);(f=c==null?void 0:c.ref.current)==null||f.scrollIntoView({block:"nearest"})},[o]),w.jsx(qe.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:He(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:He(i.onPointerMove,()=>{var c;(c=s.onItemLeave)==null||c.call(s),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:He(i.onPointerLeave,()=>{l()})})}),Sbe="SelectSeparator",wbe=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return w.jsx(qe.div,{"aria-hidden":!0,...r,ref:t})});wbe.displayName=Sbe;var e1="SelectArrow",xbe=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=nS(n),s=xo(e1,n),a=_o(e1,n);return s.open&&a.position==="popper"?w.jsx(Hye,{...i,...r,ref:t}):null});xbe.displayName=e1;var _be="SelectBubbleInput",I6=x.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=x.useRef(null),s=Tt(r,i),a=vge(t);return x.useEffect(()=>{const o=i.current;if(!o)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&f){const u=new Event("change",{bubbles:!0});f.call(o,t),o.dispatchEvent(u)}},[a,t]),w.jsx(qe.select,{...n,style:{...L5,...n.style},ref:s,defaultValue:t})});I6.displayName=_be;function $6(e){return e===""||e===void 0}function L6(e){const t=oo(e),n=x.useRef(""),r=x.useRef(0),i=x.useCallback(a=>{const o=n.current+a;t(o),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(o)},[t]),s=x.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,s]}function j6(e,t,n){const i=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=kbe(e,Math.max(s,0));i.length===1&&(a=a.filter(c=>c!==n));const l=a.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function kbe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ebe=h6,Cbe=p6,Tbe=y6,Abe=b6,Obe=v6,Rbe=S6,Mbe=k6,Nbe=A6,Dbe=O6,zbe=M6,Ibe=N6,$be=D6,Lbe="Separator",xM="horizontal",jbe=["horizontal","vertical"],F6=x.forwardRef((e,t)=>{const{decorative:n,orientation:r=xM,...i}=e,s=Fbe(r)?r:xM,o=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return w.jsx(qe.div,{"data-orientation":s,...o,...i,ref:t})});F6.displayName=Lbe;function Fbe(e){return jbe.includes(e)}var Pbe=F6,P6="Toggle",U6=x.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:i,...s}=e,[a,o]=El({prop:n,onChange:i,defaultProp:r??!1,caller:P6});return w.jsx(qe.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:He(e.onClick,()=>{e.disabled||o(!a)})})});U6.displayName=P6;var ko="ToggleGroup",[B6]=Sf(ko,[l6]),H6=l6(),oT=Pt.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const i=r;return w.jsx(Ube,{...i,ref:t})}if(n==="multiple"){const i=r;return w.jsx(Bbe,{...i,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${ko}\``)});oT.displayName=ko;var[q6,V6]=B6(ko),Ube=Pt.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...s}=e,[a,o]=El({prop:n,defaultProp:r??"",onChange:i,caller:ko});return w.jsx(q6,{scope:e.__scopeToggleGroup,type:"single",value:Pt.useMemo(()=>a?[a]:[],[a]),onItemActivate:o,onItemDeactivate:Pt.useCallback(()=>o(""),[o]),children:w.jsx(K6,{...s,ref:t})})}),Bbe=Pt.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...s}=e,[a,o]=El({prop:n,defaultProp:r??[],onChange:i,caller:ko}),l=Pt.useCallback(f=>o((u=[])=>[...u,f]),[o]),c=Pt.useCallback(f=>o((u=[])=>u.filter(d=>d!==f)),[o]);return w.jsx(q6,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:l,onItemDeactivate:c,children:w.jsx(K6,{...s,ref:t})})});oT.displayName=ko;var[Hbe,qbe]=B6(ko),K6=Pt.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:s,dir:a,loop:o=!0,...l}=e,c=H6(n),f=XC(a),u={role:"group",dir:f,...l};return w.jsx(Hbe,{scope:n,rovingFocus:i,disabled:r,children:i?w.jsx(ebe,{asChild:!0,...c,orientation:s,dir:f,loop:o,children:w.jsx(qe.div,{...u,ref:t})}):w.jsx(qe.div,{...u,ref:t})})}),tb="ToggleGroupItem",G6=Pt.forwardRef((e,t)=>{const n=V6(tb,e.__scopeToggleGroup),r=qbe(tb,e.__scopeToggleGroup),i=H6(e.__scopeToggleGroup),s=n.value.includes(e.value),a=r.disabled||e.disabled,o={...e,pressed:s,disabled:a},l=Pt.useRef(null);return r.rovingFocus?w.jsx(tbe,{asChild:!0,...i,focusable:!a,active:s,ref:l,children:w.jsx(_M,{...o,ref:t})}):w.jsx(_M,{...o,ref:t})});G6.displayName=tb;var _M=Pt.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...i}=e,s=V6(tb,n),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},o=s.type==="single"?a:void 0;return w.jsx(U6,{...o,...i,ref:t,onPressedChange:l=>{l?s.onItemActivate(r):s.onItemDeactivate(r)}})}),Vbe=oT,Kbe=G6;function Y6(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Y6(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function J6(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Y6(e))&&(r&&(r+=" "),r+=t);return r}const Gbe=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Ybe=(e,t)=>({classGroupId:e,validator:t}),Q6=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),nb="-",kM=[],Jbe="arbitrary..",Qbe=e=>{const t=Wbe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Xbe(a);const o=a.split(nb),l=o[0]===""&&o.length>1?1:0;return X6(o,l,t)},getConflictingClassGroupIds:(a,o)=>{if(o){const l=r[a],c=n[a];return l?c?Gbe(c,l):l:c||kM}return n[a]||kM}}},X6=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],s=n.nextPart.get(i);if(s){const c=X6(e,t+1,s);if(c)return c}const a=n.validators;if(a===null)return;const o=t===0?e.join(nb):e.slice(t).join(nb),l=a.length;for(let c=0;c<l;c++){const f=a[c];if(f.validator(o))return f.classGroupId}},Xbe=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Jbe+r:void 0})(),Wbe=e=>{const{theme:t,classGroups:n}=e;return Zbe(n,t)},Zbe=(e,t)=>{const n=Q6();for(const r in e){const i=e[r];lT(i,n,r,t)}return n},lT=(e,t,n,r)=>{const i=e.length;for(let s=0;s<i;s++){const a=e[s];eve(a,t,n,r)}},eve=(e,t,n,r)=>{if(typeof e=="string"){tve(e,t,n);return}if(typeof e=="function"){nve(e,t,n,r);return}rve(e,t,n,r)},tve=(e,t,n)=>{const r=e===""?t:W6(t,e);r.classGroupId=n},nve=(e,t,n,r)=>{if(ive(e)){lT(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Ybe(n,e))},rve=(e,t,n,r)=>{const i=Object.entries(e),s=i.length;for(let a=0;a<s;a++){const[o,l]=i[a];lT(l,W6(t,o),n,r)}},W6=(e,t)=>{let n=e;const r=t.split(nb),i=r.length;for(let s=0;s<i;s++){const a=r[s];let o=n.nextPart.get(a);o||(o=Q6(),n.nextPart.set(a,o)),n=o}return n},ive=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,sve=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(s,a)=>{n[s]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=r[s])!==void 0)return i(s,a),a},set(s,a){s in n?n[s]=a:i(s,a)}}},t1="!",EM=":",ave=[],CM=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),ove=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let a=0,o=0,l=0,c;const f=i.length;for(let b=0;b<f;b++){const S=i[b];if(a===0&&o===0){if(S===EM){s.push(i.slice(l,b)),l=b+1;continue}if(S==="/"){c=b;continue}}S==="["?a++:S==="]"?a--:S==="("?o++:S===")"&&o--}const u=s.length===0?i:i.slice(l);let d=u,h=!1;u.endsWith(t1)?(d=u.slice(0,-1),h=!0):u.startsWith(t1)&&(d=u.slice(1),h=!0);const p=c&&c>l?c-l:void 0;return CM(s,h,d,p)};if(t){const i=t+EM,s=r;r=a=>a.startsWith(i)?s(a.slice(i.length)):CM(ave,!1,a,void 0,!0)}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},lve=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let s=0;s<n.length;s++){const a=n[s],o=a[0]==="[",l=t.has(a);o||l?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(a)):i.push(a)}return i.length>0&&(i.sort(),r.push(...i)),r}},cve=e=>({cache:sve(e.cacheSize),parseClassName:ove(e),sortModifiers:lve(e),...Qbe(e)}),uve=/\s+/,fve=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,a=[],o=e.trim().split(uve);let l="";for(let c=o.length-1;c>=0;c-=1){const f=o[c],{isExternal:u,modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:b}=n(f);if(u){l=f+(l.length>0?" "+l:l);continue}let S=!!b,m=r(S?p.substring(0,b):p);if(!m){if(!S){l=f+(l.length>0?" "+l:l);continue}if(m=r(p),!m){l=f+(l.length>0?" "+l:l);continue}S=!1}const y=d.length===0?"":d.length===1?d[0]:s(d).join(":"),v=h?y+t1:y,_=v+m;if(a.indexOf(_)>-1)continue;a.push(_);const C=i(m,S);for(let k=0;k<C.length;++k){const A=C[k];a.push(v+A)}l=f+(l.length>0?" "+l:l)}return l},dve=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=Z6(n))&&(i&&(i+=" "),i+=r);return i},Z6=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Z6(e[r]))&&(n&&(n+=" "),n+=t);return n},hve=(e,...t)=>{let n,r,i,s;const a=l=>{const c=t.reduce((f,u)=>u(f),e());return n=cve(c),r=n.cache.get,i=n.cache.set,s=o,o(l)},o=l=>{const c=r(l);if(c)return c;const f=fve(l,n);return i(l,f),f};return s=a,(...l)=>s(dve(...l))},mve=[],Yt=e=>{const t=n=>n[e]||mve;return t.isThemeGetter=!0,t},eH=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,tH=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pve=/^\d+\/\d+$/,gve=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yve=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,bve=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vve=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oc=e=>pve.test(e),Oe=e=>!!e&&!Number.isNaN(Number(e)),oa=e=>!!e&&Number.isInteger(Number(e)),V0=e=>e.endsWith("%")&&Oe(e.slice(0,-1)),gs=e=>gve.test(e),wve=()=>!0,xve=e=>yve.test(e)&&!bve.test(e),nH=()=>!1,_ve=e=>vve.test(e),kve=e=>Sve.test(e),Eve=e=>!se(e)&&!ae(e),Cve=e=>kf(e,sH,nH),se=e=>eH.test(e),Mo=e=>kf(e,aH,xve),K0=e=>kf(e,Mve,Oe),TM=e=>kf(e,rH,nH),Tve=e=>kf(e,iH,kve),wp=e=>kf(e,oH,_ve),ae=e=>tH.test(e),Jf=e=>Ef(e,aH),Ave=e=>Ef(e,Nve),AM=e=>Ef(e,rH),Ove=e=>Ef(e,sH),Rve=e=>Ef(e,iH),xp=e=>Ef(e,oH,!0),kf=(e,t,n)=>{const r=eH.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ef=(e,t,n=!1)=>{const r=tH.exec(e);return r?r[1]?t(r[1]):n:!1},rH=e=>e==="position"||e==="percentage",iH=e=>e==="image"||e==="url",sH=e=>e==="length"||e==="size"||e==="bg-size",aH=e=>e==="length",Mve=e=>e==="number",Nve=e=>e==="family-name",oH=e=>e==="shadow",Dve=()=>{const e=Yt("color"),t=Yt("font"),n=Yt("text"),r=Yt("font-weight"),i=Yt("tracking"),s=Yt("leading"),a=Yt("breakpoint"),o=Yt("container"),l=Yt("spacing"),c=Yt("radius"),f=Yt("shadow"),u=Yt("inset-shadow"),d=Yt("text-shadow"),h=Yt("drop-shadow"),p=Yt("blur"),b=Yt("perspective"),S=Yt("aspect"),m=Yt("ease"),y=Yt("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[..._(),ae,se],k=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],N=()=>[ae,se,l],D=()=>[oc,"full","auto",...N()],M=()=>[oa,"none","subgrid",ae,se],$=()=>["auto",{span:["full",oa,ae,se]},oa,ae,se],L=()=>[oa,"auto",ae,se],J=()=>["auto","min","max","fr",ae,se],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...N()],j=()=>[oc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],I=()=>[e,ae,se],te=()=>[..._(),AM,TM,{position:[ae,se]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Re=()=>["auto","cover","contain",Ove,Cve,{size:[ae,se]}],U=()=>[V0,Jf,Mo],T=()=>["","none","full",c,ae,se],W=()=>["",Oe,Jf,Mo],Z=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>[Oe,V0,AM,TM],he=()=>["","none",p,ae,se],we=()=>["none",Oe,ae,se],xe=()=>["none",Oe,ae,se],Me=()=>[Oe,ae,se],$e=()=>[oc,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[gs],breakpoint:[gs],color:[wve],container:[gs],"drop-shadow":[gs],ease:["in","out","in-out"],font:[Eve],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[gs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[gs],shadow:[gs],spacing:["px",Oe],text:[gs],"text-shadow":[gs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",oc,se,ae,S]}],container:["container"],columns:[{columns:[Oe,se,ae,o]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{start:D()}],end:[{end:D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[oa,"auto",ae,se]}],basis:[{basis:[oc,"full","auto",o,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Oe,oc,"auto","initial","none",se]}],grow:[{grow:["",Oe,ae,se]}],shrink:[{shrink:["",Oe,ae,se]}],order:[{order:[oa,"first","last","none",ae,se]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],w:[{w:[o,"screen",...j()]}],"min-w":[{"min-w":[o,"screen","none",...j()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",n,Jf,Mo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ae,K0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",V0,se]}],"font-family":[{font:[Ave,se,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ae,se]}],"line-clamp":[{"line-clamp":[Oe,"none",ae,K0]}],leading:[{leading:[s,...N()]}],"list-image":[{"list-image":["none",ae,se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[Oe,"from-font","auto",ae,Mo]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Oe,"auto",ae,se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae,se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:Re()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},oa,ae,se],radial:["",ae,se],conic:[oa,ae,se]},Rve,Tve]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:T()}],"rounded-s":[{"rounded-s":T()}],"rounded-e":[{"rounded-e":T()}],"rounded-t":[{"rounded-t":T()}],"rounded-r":[{"rounded-r":T()}],"rounded-b":[{"rounded-b":T()}],"rounded-l":[{"rounded-l":T()}],"rounded-ss":[{"rounded-ss":T()}],"rounded-se":[{"rounded-se":T()}],"rounded-ee":[{"rounded-ee":T()}],"rounded-es":[{"rounded-es":T()}],"rounded-tl":[{"rounded-tl":T()}],"rounded-tr":[{"rounded-tr":T()}],"rounded-br":[{"rounded-br":T()}],"rounded-bl":[{"rounded-bl":T()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Oe,ae,se]}],"outline-w":[{outline:["",Oe,Jf,Mo]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",f,xp,wp]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",u,xp,wp]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Oe,Mo]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",d,xp,wp]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Oe,ae,se]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Oe]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[ae,se]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":_()}],"mask-image-conic-pos":[{"mask-conic":[Oe]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:Re()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,se]}],filter:[{filter:["","none",ae,se]}],blur:[{blur:he()}],brightness:[{brightness:[Oe,ae,se]}],contrast:[{contrast:[Oe,ae,se]}],"drop-shadow":[{"drop-shadow":["","none",h,xp,wp]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",Oe,ae,se]}],"hue-rotate":[{"hue-rotate":[Oe,ae,se]}],invert:[{invert:["",Oe,ae,se]}],saturate:[{saturate:[Oe,ae,se]}],sepia:[{sepia:["",Oe,ae,se]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,se]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[Oe,ae,se]}],"backdrop-contrast":[{"backdrop-contrast":[Oe,ae,se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Oe,ae,se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Oe,ae,se]}],"backdrop-invert":[{"backdrop-invert":["",Oe,ae,se]}],"backdrop-opacity":[{"backdrop-opacity":[Oe,ae,se]}],"backdrop-saturate":[{"backdrop-saturate":[Oe,ae,se]}],"backdrop-sepia":[{"backdrop-sepia":["",Oe,ae,se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ae,se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Oe,"initial",ae,se]}],ease:[{ease:["linear","initial",m,ae,se]}],delay:[{delay:[Oe,ae,se]}],animate:[{animate:["none",y,ae,se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ae,se]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:we()}],"rotate-x":[{"rotate-x":we()}],"rotate-y":[{"rotate-y":we()}],"rotate-z":[{"rotate-z":we()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":["scale-3d"],skew:[{skew:Me()}],"skew-x":[{"skew-x":Me()}],"skew-y":[{"skew-y":Me()}],transform:[{transform:[ae,se,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$e()}],"translate-x":[{"translate-x":$e()}],"translate-y":[{"translate-y":$e()}],"translate-z":[{"translate-z":$e()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,se]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[Oe,Jf,Mo,K0]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},zve=hve(Dve);function Ve(...e){return zve(J6(e))}function lH({...e}){return w.jsx(E5,{"data-slot":"dialog",...e})}function Ive({...e}){return w.jsx(C5,{"data-slot":"dialog-portal",...e})}function $ve({className:e,...t}){return w.jsx(T5,{"data-slot":"dialog-overlay",className:Ve("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function cH({children:e,className:t,showCloseButton:n=!0,...r}){return w.jsxs(Ive,{"data-slot":"dialog-portal",children:[w.jsx($ve,{}),w.jsxs(A5,{"data-slot":"dialog-content",className:Ve("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",t),...r,children:[e,n&&w.jsxs(Vpe,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[w.jsx(YB,{}),w.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function uH({className:e,...t}){return w.jsx("div",{"data-slot":"dialog-header",className:Ve("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Lve({className:e,...t}){return w.jsx("div",{"data-slot":"dialog-footer",className:Ve("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function fH({className:e,...t}){return w.jsx(Hpe,{"data-slot":"dialog-title",className:Ve("text-lg leading-none font-semibold",e),...t})}function dH({className:e,...t}){return w.jsx(qpe,{"data-slot":"dialog-description",className:Ve("text-muted-foreground text-sm",e),...t})}function jve({className:e,...t}){return w.jsx(Gl,{"data-slot":"command",className:Ve("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function Fve({children:e,className:t,description:n="Search for a command to run...",showCloseButton:r=!0,title:i="Command Palette",...s}){return w.jsxs(lH,{...s,children:[w.jsxs(uH,{className:"sr-only",children:[w.jsx(fH,{children:i}),w.jsx(dH,{children:n})]}),w.jsx(cH,{className:Ve("overflow-hidden p-0",t),showCloseButton:r,children:w.jsx(jve,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})]})}function Pve({className:e,...t}){return w.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[w.jsx(GB,{className:"size-4 shrink-0 opacity-50"}),w.jsx(Gl.Input,{"data-slot":"command-input",className:Ve("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function Uve({className:e,...t}){return w.jsx(Gl.List,{"data-slot":"command-list",className:Ve("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function Bve({...e}){return w.jsx(Gl.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function OM({className:e,...t}){return w.jsx(Gl.Group,{"data-slot":"command-group",className:Ve("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function Hve({className:e,...t}){return w.jsx(Gl.Separator,{"data-slot":"command-separator",className:Ve("bg-border -mx-1 h-px",e),...t})}function G0({className:e,...t}){return w.jsx(Gl.Item,{"data-slot":"command-item",className:Ve("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function RM({className:e,...t}){return w.jsx("span",{"data-slot":"command-shortcut",className:Ve("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}const qve=[{key:"all",label:"All",shortcut:"1"},{key:"mine",label:"Mine",shortcut:"2"},{key:"account",label:"Account",shortcut:"3"},{key:"author",label:"Author",shortcut:"4"},{key:"scope",label:"Scope",shortcut:"5"},{key:"repo",label:"Repo",shortcut:"6"},{key:"status",label:"Status",shortcut:"7"}];function Vve(){const e=Zr(q2),t=Sr(q2),n=Sr(Vv),r=Sr(Gy),i=Sr(HB);return x.useEffect(()=>{const s=a=>{a.key==="p"&&(a.metaKey||a.ctrlKey)&&(a.preventDefault(),t(o=>!o))};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[t]),w.jsxs(Fve,{open:e,onOpenChange:t,showCloseButton:!1,children:[w.jsx(Pve,{placeholder:"Type a command..."}),w.jsxs(Uve,{children:[w.jsx(Bve,{children:"No results found."}),w.jsxs(OM,{heading:"Actions",children:[w.jsxs(G0,{onSelect:()=>{i({}),t(!1)},children:[w.jsx(KB,{}),"Refresh PRs",w.jsx(RM,{children:"R"})]}),w.jsxs(G0,{onSelect:()=>{n("prs"),t(!1)},children:[w.jsx(K2,{}),"View: PR List"]})]}),w.jsx(Hve,{}),w.jsx(OM,{heading:"Filters",children:qve.map(s=>w.jsxs(G0,{onSelect:()=>{s.key==="all"?r({type:"all"}):r({type:s.key}),t(!1)},children:[w.jsx(K2,{}),"Filter: ",s.label,w.jsx(RM,{children:s.shortcut})]},s.key))})]})]})}const n1=e=>{const t=e.match(/^\w+\(([^)]+)\):/);if(t!=null&&t[1])return t[1];const n=e.match(/^([A-Z]+-\d+):/);return n!=null&&n[1]?n[1]:null},MM=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,NM=J6,cT=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return NM(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,a=Object.keys(i).map(c=>{const f=n==null?void 0:n[c],u=s==null?void 0:s[c];if(f===null)return null;const d=MM(f)||MM(u);return i[c][d]}),o=n&&Object.entries(n).reduce((c,f)=>{let[u,d]=f;return d===void 0||(c[u]=d),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,f)=>{let{class:u,className:d,...h}=f;return Object.entries(h).every(p=>{let[b,S]=p;return Array.isArray(S)?S.includes({...s,...o}[b]):{...s,...o}[b]===S})?[...c,u,d]:c},[]);return NM(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)},Kve=cT("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Go({asChild:e=!1,className:t,size:n="default",variant:r="default",...i}){const s=e?QB:"button";return w.jsx(s,{"data-slot":"button","data-variant":r,"data-size":n,className:Ve(Kve({variant:r,size:n,className:t})),...i})}function Gve({className:e,type:t,...n}){return w.jsx("input",{type:t,"data-slot":"input",className:Ve("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function Yve({...e}){return w.jsx(Ebe,{"data-slot":"select",...e})}function Jve({...e}){return w.jsx(Tbe,{"data-slot":"select-value",...e})}function Qve({children:e,className:t,size:n="default",...r}){return w.jsxs(Cbe,{"data-slot":"select-trigger","data-size":n,className:Ve("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...r,children:[e,w.jsx(Abe,{asChild:!0,children:w.jsx(BC,{className:"size-4 opacity-50"})})]})}function Xve({align:e="center",children:t,className:n,position:r="item-aligned",...i}){return w.jsx(Obe,{children:w.jsxs(Rbe,{"data-slot":"select-content",className:Ve("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:r,align:e,...i,children:[w.jsx(Zve,{}),w.jsx(Mbe,{className:Ve("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),w.jsx(eSe,{})]})})}function Wve({children:e,className:t,...n}){return w.jsxs(Nbe,{"data-slot":"select-item",className:Ve("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...n,children:[w.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:w.jsx(zbe,{children:w.jsx(Uhe,{className:"size-4"})})}),w.jsx(Dbe,{children:e})]})}function Zve({className:e,...t}){return w.jsx(Ibe,{"data-slot":"select-scroll-up-button",className:Ve("flex cursor-default items-center justify-center py-1",e),...t,children:w.jsx(qhe,{className:"size-4"})})}function eSe({className:e,...t}){return w.jsx($be,{"data-slot":"select-scroll-down-button",className:Ve("flex cursor-default items-center justify-center py-1",e),...t,children:w.jsx(BC,{className:"size-4"})})}const tSe=cT("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),hH=x.createContext({size:"default",variant:"default",spacing:0});function nSe({children:e,className:t,size:n,spacing:r=0,variant:i,...s}){return w.jsx(Vbe,{"data-slot":"toggle-group","data-variant":i,"data-size":n,"data-spacing":r,className:Ve("group/toggle-group flex w-fit items-center rounded-md",t),...s,children:w.jsx(hH,{value:{variant:i,size:n,spacing:r},children:e})})}function rSe({children:e,className:t,size:n,variant:r,...i}){const s=x.useContext(hH);return w.jsx(Kbe,{"data-slot":"toggle-group-item","data-variant":s.variant||r,"data-size":s.size||n,"data-spacing":s.spacing,className:Ve(tSe({variant:s.variant||r,size:s.size||n}),"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10","data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",t),...i,children:e})}const iSe=[{key:"all",label:"All"},{key:"hot",label:"Hot",icon:!0},{key:"mine",label:"Mine"},{key:"account",label:"Account"},{key:"author",label:"Author"},{key:"scope",label:"Scope"},{key:"repo",label:"Repo"},{key:"status",label:"Status"}];function sSe(){const e=Zr(Rm),t=Zr(Gy),n=Sr(Gy),r=Zr(U_),i=Sr(U_),s=e.pullRequests,a=e.currentUser,o=x.useMemo(()=>{var S;const u=new Set,d=new Set,h=new Set,p=new Set,b=new Set;for(const m of s){u.add(m.author),d.add(((S=m.account)==null?void 0:S.id)??"unknown"),b.add(m.repositoryName);const y=n1(m.title);y&&(h.add(y),a&&m.author===a&&p.add(y))}return{authors:Array.from(u).sort(),accounts:Array.from(d).sort(),scopes:Array.from(h).sort(),myScopes:Array.from(p).sort(),repos:Array.from(b).sort()}},[s,a]),l=u=>{const d=u;if(!d||d==="all"){n({type:"all"});return}if(d==="hot"){n({type:"hot"});return}const h=d==="mine"?o.myScopes:d==="author"?o.authors:d==="account"?o.accounts:d==="scope"?o.scopes:d==="repo"?o.repos:d==="status"?["approved","pending","mergeable","conflicts"]:[];h.length>0&&h[0]!==void 0&&n({type:d,value:h[0]})},c=u=>{t.type!=="all"&&n({type:t.type,value:u})},f=t.type==="mine"?o.myScopes:t.type==="author"?o.authors:t.type==="account"?o.accounts:t.type==="scope"?o.scopes:t.type==="repo"?o.repos:t.type==="status"?["approved","pending","mergeable","conflicts"]:[];return w.jsx("div",{className:"border-b bg-background",children:w.jsxs("div",{className:"mx-auto flex max-w-5xl items-center gap-3 px-4 py-2",children:[w.jsx(nSe,{type:"single",variant:"outline",size:"sm",value:t.type,onValueChange:l,children:iSe.map(u=>w.jsxs(rSe,{value:u.key,className:u.icon?"gap-1":void 0,children:[u.icon&&w.jsx(Yhe,{className:"size-3.5"}),u.label]},u.key))}),f.length>0&&t.type!=="all"&&t.type!=="hot"&&t.value&&w.jsxs(Yve,{value:t.value,onValueChange:c,children:[w.jsx(Qve,{size:"sm",className:"w-[180px]",children:w.jsx(Jve,{})}),w.jsx(Xve,{children:f.map(u=>w.jsx(Wve,{value:u,children:u},u))})]}),w.jsxs("div",{className:"relative ml-auto w-64",children:[w.jsx(GB,{className:"absolute left-2.5 top-2.5 size-4 text-muted-foreground"}),w.jsx(Gve,{placeholder:"Search...",className:"h-8 pl-8",value:r,onChange:u=>i(u.target.value)}),r&&w.jsx(Go,{variant:"ghost",size:"icon-xs",className:"absolute right-1 top-1",onClick:()=>i(""),children:w.jsx(YB,{className:"size-3"})})]})]})})}const uT=e=>{const t=e.getDate().toString().padStart(2,"0"),n=(e.getMonth()+1).toString().padStart(2,"0"),r=e.getFullYear();return`${t}.${n}.${r}`},aSe=(e,t)=>{const n=Math.max(0,Math.floor((t.getTime()-e.getTime())/1e3));return jB(n).pipe(Hd(r=>r<60,r=>`Updated ${r}s ago`),Hd(r=>r<3600,r=>`Updated ${Math.floor(r/60)}m ago`),Hd(r=>r<86400,r=>`Updated ${Math.floor(r/3600)}h ago`),FB(()=>`Updated on ${uT(e)}`))},mH=x.createContext({theme:"system",setTheme:()=>{}});function oSe({children:e}){const[t,n]=x.useState("system");return x.useEffect(()=>{const r=document.documentElement,i=t==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t;r.classList.remove("dark","light"),r.classList.add(i)},[t]),x.useEffect(()=>{if(t!=="system")return;const r=window.matchMedia("(prefers-color-scheme: dark)"),i=()=>{const s=document.documentElement;s.classList.remove("dark","light"),s.classList.add(r.matches?"dark":"light")};return r.addEventListener("change",i),()=>r.removeEventListener("change",i)},[t]),w.jsx(mH,{value:{theme:t,setTheme:n},children:e})}function lSe(){return x.useContext(mH)}function cSe({className:e,...t}){return w.jsx("kbd",{"data-slot":"kbd",className:Ve("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none","[&_svg:not([class*='size-'])]:size-3",e),...t})}function fT({className:e,decorative:t=!0,orientation:n="horizontal",...r}){return w.jsx(Pbe,{"data-slot":"separator",decorative:t,orientation:n,className:Ve("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function uSe(){const e=Zr(Rm),t=Sr(HB),{setTheme:n,theme:r}=lSe(),i=e.status==="loading",s=e.status==="error";return w.jsx("header",{className:"sticky top-0 z-40 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:w.jsxs("div",{className:"mx-auto flex h-14 max-w-5xl items-center gap-4 px-4",children:[w.jsx("span",{className:"text-sm font-semibold tracking-tight",children:"codecommit"}),w.jsx(fT,{orientation:"vertical",className:"h-4"}),w.jsxs("span",{className:"text-sm text-muted-foreground",children:[e.pullRequests.length," PRs"]}),s&&w.jsx("span",{className:"text-sm text-destructive",children:e.error??"Error loading PRs"}),e.lastUpdated&&!s&&w.jsx("span",{className:"text-xs text-muted-foreground",children:aSe(e.lastUpdated,new Date)}),w.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[w.jsx(Go,{variant:"ghost",size:"icon-sm",onClick:()=>t({}),disabled:i,children:w.jsx(KB,{className:Ve("size-4",i&&"animate-spin")})}),w.jsx(cSe,{children:"⌘P"}),w.jsxs(Go,{variant:"ghost",size:"icon-sm",onClick:()=>n(r==="dark"?"light":r==="light"?"system":"dark"),children:[w.jsx(ime,{className:"size-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),w.jsx(eme,{className:"absolute size-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),w.jsx("span",{className:"sr-only",children:"Toggle theme"})]})]})]})})}const fSe=864e5,No=e=>Math.round(e*10)/10,dSe=(e,t,n)=>Math.min(t,Math.max(e,n)),DM=(e,t)=>Math.max(0,(t.getTime()-e.getTime())/fSe),hSe=e=>/^\w+(\([^)]+\))?:/.test(e)||/^[A-Z]+-\d+:/.test(e),rb=(e,t)=>{if(e.commentCount===void 0)return V();const n=DM(e.lastModifiedDate,t),r=DM(e.creationDate,t),i=e.commentCount,s=hSe(e.title),a=!!e.description&&e.description.trim().length>0,o=-(n*1),l=-(r*.5),c=i*1,f=e.isApproved?2:0,u=e.isMergeable?0:-3,d=s?.5:0,h=a?.5:0,p=10+o+l+c+f+u+d+h,b=No(dSe(0,10,p)),S=[{label:"Base",value:10},{label:"Time decay",value:No(o)},{label:"Age",value:No(l)},{label:"Comments",value:No(c)},{label:"Approval",value:f},{label:"Conflicts",value:u},{label:"Scope",value:d},{label:"Description",value:h}],m=[{label:"Activity",description:`-1 per day since last update (${Math.round(n)}d ago)`,value:No(o),...n<2?{status:"positive",statusLabel:"ACTIVE"}:n<=7?{status:"neutral",statusLabel:"SLOWING"}:{status:"negative",statusLabel:"STALE"}},{label:"Age",description:`-0.5 per day since creation (${Math.round(r)}d old)`,value:No(l),...r<3?{status:"positive",statusLabel:"FRESH"}:r<=14?{status:"neutral",statusLabel:"AGING"}:{status:"negative",statusLabel:"OLD"}},{label:"Engagement",description:`+1 per comment (${i} comments)`,value:No(c),...i>=3?{status:"positive",statusLabel:"ACTIVE"}:i>=1?{status:"neutral",statusLabel:"QUIET"}:{status:"negative",statusLabel:"SILENT"}},{label:"Approval",description:e.isApproved?"+2 bonus for approval":"No approval yet (+2 when approved)",value:f,...e.isApproved?{status:"positive",statusLabel:"APPROVED"}:{status:"neutral",statusLabel:"PENDING"}},{label:"Mergeable",description:e.isMergeable?"No merge conflicts":"-3 penalty for merge conflicts",value:u,...e.isMergeable?{status:"positive",statusLabel:"CLEAN"}:{status:"negative",statusLabel:"CONFLICT"}},{label:"Scope",description:s?"+0.5 bonus — conventional commit or ticket prefix detected":"No scope prefix found (e.g. feat(auth): or JIRA-123:)",value:d,...s?{status:"positive",statusLabel:"DETECTED"}:{status:"negative",statusLabel:"MISSING"}},{label:"Description",description:a?"+0.5 bonus — PR description provided":"No PR description provided",value:h,...a?{status:"positive",statusLabel:"PROVIDED"}:{status:"negative",statusLabel:"MISSING"}}];return X({total:b,breakdown:S,categories:m})},dT=e=>jB(e).pipe(Hd(t=>t>=7,()=>"green"),Hd(t=>t>=4,()=>"yellow"),FB(()=>"red"));function mSe(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const pSe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gSe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ySe={};function zM(e,t){return(ySe.jsx?gSe:pSe).test(e)}const bSe=/[ \t\n\f\r]/g;function vSe(e){return typeof e=="object"?e.type==="text"?IM(e.value):!1:IM(e)}function IM(e){return e.replace(bSe,"")===""}class zm{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}zm.prototype.normal={};zm.prototype.property={};zm.prototype.space=void 0;function pH(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new zm(n,r,t)}function r1(e){return e.toLowerCase()}class lr{constructor(t,n){this.attribute=n,this.property=t}}lr.prototype.attribute="";lr.prototype.booleanish=!1;lr.prototype.boolean=!1;lr.prototype.commaOrSpaceSeparated=!1;lr.prototype.commaSeparated=!1;lr.prototype.defined=!1;lr.prototype.mustUseProperty=!1;lr.prototype.number=!1;lr.prototype.overloadedBoolean=!1;lr.prototype.property="";lr.prototype.spaceSeparated=!1;lr.prototype.space=void 0;let SSe=0;const Ce=Yl(),It=Yl(),i1=Yl(),q=Yl(),ut=Yl(),ru=Yl(),fr=Yl();function Yl(){return 2**++SSe}const s1=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ce,booleanish:It,commaOrSpaceSeparated:fr,commaSeparated:ru,number:q,overloadedBoolean:i1,spaceSeparated:ut},Symbol.toStringTag,{value:"Module"})),Y0=Object.keys(s1);class hT extends lr{constructor(t,n,r,i){let s=-1;if(super(t,n),$M(this,"space",i),typeof r=="number")for(;++s<Y0.length;){const a=Y0[s];$M(this,Y0[s],(r&s1[a])===s1[a])}}}hT.prototype.defined=!0;function $M(e,t,n){n&&(e[t]=n)}function Cf(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new hT(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[r1(r)]=r,n[r1(s.attribute)]=r}return new zm(t,n,e.space)}const gH=Cf({properties:{ariaActiveDescendant:null,ariaAtomic:It,ariaAutoComplete:null,ariaBusy:It,ariaChecked:It,ariaColCount:q,ariaColIndex:q,ariaColSpan:q,ariaControls:ut,ariaCurrent:null,ariaDescribedBy:ut,ariaDetails:null,ariaDisabled:It,ariaDropEffect:ut,ariaErrorMessage:null,ariaExpanded:It,ariaFlowTo:ut,ariaGrabbed:It,ariaHasPopup:null,ariaHidden:It,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ut,ariaLevel:q,ariaLive:null,ariaModal:It,ariaMultiLine:It,ariaMultiSelectable:It,ariaOrientation:null,ariaOwns:ut,ariaPlaceholder:null,ariaPosInSet:q,ariaPressed:It,ariaReadOnly:It,ariaRelevant:null,ariaRequired:It,ariaRoleDescription:ut,ariaRowCount:q,ariaRowIndex:q,ariaRowSpan:q,ariaSelected:It,ariaSetSize:q,ariaSort:null,ariaValueMax:q,ariaValueMin:q,ariaValueNow:q,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function yH(e,t){return t in e?e[t]:t}function bH(e,t){return yH(e,t.toLowerCase())}const wSe=Cf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ru,acceptCharset:ut,accessKey:ut,action:null,allow:null,allowFullScreen:Ce,allowPaymentRequest:Ce,allowUserMedia:Ce,alt:null,as:null,async:Ce,autoCapitalize:null,autoComplete:ut,autoFocus:Ce,autoPlay:Ce,blocking:ut,capture:null,charSet:null,checked:Ce,cite:null,className:ut,cols:q,colSpan:null,content:null,contentEditable:It,controls:Ce,controlsList:ut,coords:q|ru,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ce,defer:Ce,dir:null,dirName:null,disabled:Ce,download:i1,draggable:It,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ce,formTarget:null,headers:ut,height:q,hidden:i1,high:q,href:null,hrefLang:null,htmlFor:ut,httpEquiv:ut,id:null,imageSizes:null,imageSrcSet:null,inert:Ce,inputMode:null,integrity:null,is:null,isMap:Ce,itemId:null,itemProp:ut,itemRef:ut,itemScope:Ce,itemType:ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ce,low:q,manifest:null,max:null,maxLength:q,media:null,method:null,min:null,minLength:q,multiple:Ce,muted:Ce,name:null,nonce:null,noModule:Ce,noValidate:Ce,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ce,optimum:q,pattern:null,ping:ut,placeholder:null,playsInline:Ce,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ce,referrerPolicy:null,rel:ut,required:Ce,reversed:Ce,rows:q,rowSpan:q,sandbox:ut,scope:null,scoped:Ce,seamless:Ce,selected:Ce,shadowRootClonable:Ce,shadowRootDelegatesFocus:Ce,shadowRootMode:null,shape:null,size:q,sizes:null,slot:null,span:q,spellCheck:It,src:null,srcDoc:null,srcLang:null,srcSet:null,start:q,step:null,style:null,tabIndex:q,target:null,title:null,translate:null,type:null,typeMustMatch:Ce,useMap:null,value:It,width:q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ut,axis:null,background:null,bgColor:null,border:q,borderColor:null,bottomMargin:q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ce,declare:Ce,event:null,face:null,frame:null,frameBorder:null,hSpace:q,leftMargin:q,link:null,longDesc:null,lowSrc:null,marginHeight:q,marginWidth:q,noResize:Ce,noHref:Ce,noShade:Ce,noWrap:Ce,object:null,profile:null,prompt:null,rev:null,rightMargin:q,rules:null,scheme:null,scrolling:It,standby:null,summary:null,text:null,topMargin:q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ce,disableRemotePlayback:Ce,prefix:null,property:null,results:q,security:null,unselectable:null},space:"html",transform:bH}),xSe=Cf({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:fr,accentHeight:q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:q,amplitude:q,arabicForm:null,ascent:q,attributeName:null,attributeType:null,azimuth:q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:q,by:null,calcMode:null,capHeight:q,className:ut,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:q,diffuseConstant:q,direction:null,display:null,dur:null,divisor:q,dominantBaseline:null,download:Ce,dx:null,dy:null,edgeMode:null,editable:null,elevation:q,enableBackground:null,end:null,event:null,exponent:q,externalResourcesRequired:null,fill:null,fillOpacity:q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ru,g2:ru,glyphName:ru,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:q,horizOriginX:q,horizOriginY:q,id:null,ideographic:q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:q,k:q,k1:q,k2:q,k3:q,k4:q,kernelMatrix:fr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:q,overlineThickness:q,paintOrder:null,panose1:null,path:null,pathLength:q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ut,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:q,pointsAtY:q,pointsAtZ:q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:fr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:fr,rev:fr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:fr,requiredFeatures:fr,requiredFonts:fr,requiredFormats:fr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:q,specularExponent:q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:q,strikethroughThickness:q,string:null,stroke:null,strokeDashArray:fr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:q,strokeOpacity:q,strokeWidth:null,style:null,surfaceScale:q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:fr,tabIndex:q,tableValues:null,target:null,targetX:q,targetY:q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:fr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:q,underlineThickness:q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:q,values:null,vAlphabetic:q,vMathematical:q,vectorEffect:null,vHanging:q,vIdeographic:q,version:null,vertAdvY:q,vertOriginX:q,vertOriginY:q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:yH}),vH=Cf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),SH=Cf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:bH}),wH=Cf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),_Se={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},kSe=/[A-Z]/g,LM=/-[a-z]/g,ESe=/^data[-\w.:]+$/i;function CSe(e,t){const n=r1(t);let r=t,i=lr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ESe.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(LM,ASe);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!LM.test(s)){let a=s.replace(kSe,TSe);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=hT}return new i(r,t)}function TSe(e){return"-"+e.toLowerCase()}function ASe(e){return e.charAt(1).toUpperCase()}const OSe=pH([gH,wSe,vH,SH,wH],"html"),mT=pH([gH,xSe,vH,SH,wH],"svg");function RSe(e){return e.join(" ").trim()}var pT={},jM=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,MSe=/\n/g,NSe=/^\s*/,DSe=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,zSe=/^:\s*/,ISe=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,$Se=/^[;\s]*/,LSe=/^\s+|\s+$/g,jSe=`
|
|
235
|
+
`,FM="/",PM="*",Bo="",FSe="comment",PSe="declaration";function USe(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(p){var b=p.match(MSe);b&&(n+=b.length);var S=p.lastIndexOf(jSe);r=~S?p.length-S:r+p.length}function s(){var p={line:n,column:r};return function(b){return b.position=new a(p),c(),b}}function a(p){this.start=p,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function o(p){var b=new Error(t.source+":"+n+":"+r+": "+p);if(b.reason=p,b.filename=t.source,b.line=n,b.column=r,b.source=e,!t.silent)throw b}function l(p){var b=p.exec(e);if(b){var S=b[0];return i(S),e=e.slice(S.length),b}}function c(){l(NSe)}function f(p){var b;for(p=p||[];b=u();)b!==!1&&p.push(b);return p}function u(){var p=s();if(!(FM!=e.charAt(0)||PM!=e.charAt(1))){for(var b=2;Bo!=e.charAt(b)&&(PM!=e.charAt(b)||FM!=e.charAt(b+1));)++b;if(b+=2,Bo===e.charAt(b-1))return o("End of comment missing");var S=e.slice(2,b-2);return r+=2,i(S),e=e.slice(b),r+=2,p({type:FSe,comment:S})}}function d(){var p=s(),b=l(DSe);if(b){if(u(),!l(zSe))return o("property missing ':'");var S=l(ISe),m=p({type:PSe,property:UM(b[0].replace(jM,Bo)),value:S?UM(S[0].replace(jM,Bo)):Bo});return l($Se),m}}function h(){var p=[];f(p);for(var b;b=d();)b!==!1&&(p.push(b),f(p));return p}return c(),h()}function UM(e){return e?e.replace(LSe,Bo):Bo}var BSe=USe,HSe=pg&&pg.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pT,"__esModule",{value:!0});pT.default=VSe;const qSe=HSe(BSe);function VSe(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,qSe.default)(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:o}=s;i?t(a,o,s):o&&(n=n||{},n[a]=o)}),n}var rS={};Object.defineProperty(rS,"__esModule",{value:!0});rS.camelCase=void 0;var KSe=/^--[a-zA-Z0-9_-]+$/,GSe=/-([a-z])/g,YSe=/^[^-]+$/,JSe=/^-(webkit|moz|ms|o|khtml)-/,QSe=/^-(ms)-/,XSe=function(e){return!e||YSe.test(e)||KSe.test(e)},WSe=function(e,t){return t.toUpperCase()},BM=function(e,t){return"".concat(t,"-")},ZSe=function(e,t){return t===void 0&&(t={}),XSe(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(QSe,BM):e=e.replace(JSe,BM),e.replace(GSe,WSe))};rS.camelCase=ZSe;var e0e=pg&&pg.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},t0e=e0e(pT),n0e=rS;function a1(e,t){var n={};return!e||typeof e!="string"||(0,t0e.default)(e,function(r,i){r&&i&&(n[(0,n0e.camelCase)(r,t)]=i)}),n}a1.default=a1;var r0e=a1;const i0e=Lh(r0e),xH=_H("end"),gT=_H("start");function _H(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function s0e(e){const t=gT(e),n=xH(e);if(t&&n)return{start:t,end:n}}function qd(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?HM(e.position):"start"in e||"end"in e?HM(e):"line"in e||"column"in e?o1(e):""}function o1(e){return qM(e&&e.line)+":"+qM(e&&e.column)}function HM(e){return o1(e&&e.start)+"-"+o1(e&&e.end)}function qM(e){return e&&typeof e=="number"?e:1}class Dn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=qd(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Dn.prototype.file="";Dn.prototype.name="";Dn.prototype.reason="";Dn.prototype.message="";Dn.prototype.stack="";Dn.prototype.column=void 0;Dn.prototype.line=void 0;Dn.prototype.ancestors=void 0;Dn.prototype.cause=void 0;Dn.prototype.fatal=void 0;Dn.prototype.place=void 0;Dn.prototype.ruleId=void 0;Dn.prototype.source=void 0;const yT={}.hasOwnProperty,a0e=new Map,o0e=/[A-Z]/g,l0e=new Set(["table","tbody","thead","tfoot","tr"]),c0e=new Set(["td","th"]),kH="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function u0e(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=b0e(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=y0e(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?mT:OSe,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=EH(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function EH(e,t,n){if(t.type==="element")return f0e(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return d0e(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return m0e(e,t,n);if(t.type==="mdxjsEsm")return h0e(e,t);if(t.type==="root")return p0e(e,t,n);if(t.type==="text")return g0e(e,t)}function f0e(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=mT,e.schema=i),e.ancestors.push(t);const s=TH(e,t.tagName,!1),a=v0e(e,t);let o=vT(e,t);return l0e.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!vSe(l):!0})),CH(e,a,s,t),bT(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function d0e(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}zh(e,t.position)}function h0e(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);zh(e,t.position)}function m0e(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=mT,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:TH(e,t.name,!0),a=S0e(e,t),o=vT(e,t);return CH(e,a,s,t),bT(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function p0e(e,t,n){const r={};return bT(r,vT(e,t)),e.create(t,e.Fragment,r,n)}function g0e(e,t){return t.value}function CH(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function bT(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function y0e(e,t,n){return r;function r(i,s,a,o){const c=Array.isArray(a.children)?n:t;return o?c(s,a,o):c(s,a)}}function b0e(e,t){return n;function n(r,i,s,a){const o=Array.isArray(s.children),l=gT(r);return t(i,s,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function v0e(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&yT.call(t.properties,i)){const s=w0e(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&c0e.has(t.tagName)?r=o:n[a]=o}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function S0e(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else zh(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,s=e.evaluater.evaluateExpression(o.expression)}else zh(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function vT(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:a0e;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const c=i.get(l)||0;a=l+"-"+c,i.set(l,c+1)}}const o=EH(e,s,a);o!==void 0&&n.push(o)}return n}function w0e(e,t,n){const r=CSe(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?mSe(n):RSe(n)),r.property==="style"){let i=typeof n=="object"?n:x0e(e,String(n));return e.stylePropertyNameCase==="css"&&(i=_0e(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?_Se[r.property]||r.property:r.attribute,n]}}function x0e(e,t){try{return i0e(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Dn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=kH+"#cannot-parse-style-attribute",i}}function TH(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const o=zM(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=a}else r=zM(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return yT.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);zh(e)}function zh(e,t){const n=new Dn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=kH+"#cannot-handle-mdx-estrees-without-createevaluater",n}function _0e(e){const t={};let n;for(n in e)yT.call(e,n)&&(t[k0e(n)]=e[n]);return t}function k0e(e){let t=e.replace(o0e,E0e);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function E0e(e){return"-"+e.toLowerCase()}const J0={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},C0e={};function ST(e,t){const n=C0e,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return AH(e,r,i)}function AH(e,t,n){if(T0e(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return VM(e.children,t,n)}return Array.isArray(e)?VM(e,t,n):""}function VM(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=AH(e[i],t,n);return r.join("")}function T0e(e){return!!(e&&typeof e=="object")}const KM=document.createElement("i");function wT(e){const t="&"+e+";";KM.innerHTML=t;const n=KM.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Or(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function Hr(e,t){return e.length>0?(Or(e,e.length,0,t),e):t}const GM={}.hasOwnProperty;function OH(e){const t={};let n=-1;for(;++n<e.length;)A0e(t,e[n]);return t}function A0e(e,t){let n;for(n in t){const i=(GM.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){GM.call(i,a)||(i[a]=[]);const o=s[a];O0e(i[a],Array.isArray(o)?o:o?[o]:[])}}}function O0e(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Or(e,0,0,r)}function RH(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Si(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Pn=Eo(/[A-Za-z]/),Rn=Eo(/[\dA-Za-z]/),R0e=Eo(/[#-'*+\--9=?A-Z^-~]/);function ib(e){return e!==null&&(e<32||e===127)}const l1=Eo(/\d/),M0e=Eo(/[\dA-Fa-f]/),N0e=Eo(/[!-/:-@[-`{-~]/);function fe(e){return e!==null&&e<-2}function ct(e){return e!==null&&(e<0||e===32)}function ze(e){return e===-2||e===-1||e===32}const iS=Eo(new RegExp("\\p{P}|\\p{S}","u")),Ml=Eo(/\s/);function Eo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Tf(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&Rn(e.charCodeAt(n+1))&&Rn(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ue(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return ze(l)?(e.enter(n),o(l)):t(l)}function o(l){return ze(l)&&s++<i?(e.consume(l),o):(e.exit(n),t(l))}}const D0e={tokenize:z0e};function z0e(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ue(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return fe(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const I0e={tokenize:$0e},YM={tokenize:L0e};function $0e(e){const t=this,n=[];let r=0,i,s,a;return o;function o(v){if(r<n.length){const _=n[r];return t.containerState=_[1],e.attempt(_[0].continuation,l,c)(v)}return c(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const _=t.events.length;let C=_,k;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){k=t.events[C][1].end;break}m(r);let A=_;for(;A<t.events.length;)t.events[A][1].end={...k},A++;return Or(t.events,C+1,0,t.events.slice(_)),t.events.length=A,c(v)}return o(v)}function c(v){if(r===n.length){if(!i)return d(v);if(i.currentConstruct&&i.currentConstruct.concrete)return p(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(YM,f,u)(v)}function f(v){return i&&y(),m(r),d(v)}function u(v){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,p(v)}function d(v){return t.containerState={},e.attempt(YM,h,p)(v)}function h(v){return r++,n.push([t.currentConstruct,t.containerState]),d(v)}function p(v){if(v===null){i&&y(),m(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),b(v)}function b(v){if(v===null){S(e.exit("chunkFlow"),!0),m(0),e.consume(v);return}return fe(v)?(e.consume(v),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(v),b)}function S(v,_){const C=t.sliceStream(v);if(_&&C.push(null),v.previous=s,s&&(s.next=v),s=v,i.defineSkip(v.start),i.write(C),t.parser.lazy[v.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<a&&(!i.events[k][1].end||i.events[k][1].end.offset>a))return;const A=t.events.length;let N=A,D,M;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(D){M=t.events[N][1].end;break}D=!0}for(m(r),k=A;k<t.events.length;)t.events[k][1].end={...M},k++;Or(t.events,N+1,0,t.events.slice(A)),t.events.length=k}}function m(v){let _=n.length;for(;_-- >v;){const C=n[_];t.containerState=C[1],C[0].exit.call(t,e)}n.length=v}function y(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function L0e(e,t,n){return Ue(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fu(e){if(e===null||ct(e)||Ml(e))return 1;if(iS(e))return 2}function sS(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const c1={name:"attention",resolveAll:j0e,tokenize:F0e};function j0e(e,t){let n=-1,r,i,s,a,o,l,c,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const u={...e[r][1].end},d={...e[n][1].start};JM(u,-l),JM(d,l),a={type:l>1?"strongSequence":"emphasisSequence",start:u,end:{...e[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:d},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[n][1].start={...o.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Hr(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Hr(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),c=Hr(c,sS(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Hr(c,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=Hr(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Or(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function F0e(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Fu(r);let s;return a;function a(l){return s=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===s)return e.consume(l),o;const c=e.exit("attentionSequence"),f=Fu(l),u=!f||f===2&&i||n.includes(l),d=!i||i===2&&f||n.includes(r);return c._open=!!(s===42?u:u&&(i||!d)),c._close=!!(s===42?d:d&&(f||!u)),t(l)}}function JM(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const P0e={name:"autolink",tokenize:U0e};function U0e(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(h){return Pn(h)?(e.consume(h),a):h===64?n(h):c(h)}function a(h){return h===43||h===45||h===46||Rn(h)?(r=1,o(h)):c(h)}function o(h){return h===58?(e.consume(h),r=0,l):(h===43||h===45||h===46||Rn(h))&&r++<32?(e.consume(h),o):(r=0,c(h))}function l(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||ib(h)?n(h):(e.consume(h),l)}function c(h){return h===64?(e.consume(h),f):R0e(h)?(e.consume(h),c):n(h)}function f(h){return Rn(h)?u(h):n(h)}function u(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):d(h)}function d(h){if((h===45||Rn(h))&&r++<63){const p=h===45?d:u;return e.consume(h),p}return n(h)}}const Im={partial:!0,tokenize:B0e};function B0e(e,t,n){return r;function r(s){return ze(s)?Ue(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||fe(s)?t(s):n(s)}}const MH={continuation:{tokenize:q0e},exit:V0e,name:"blockQuote",tokenize:H0e};function H0e(e,t,n){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return ze(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function q0e(e,t,n){const r=this;return i;function i(a){return ze(a)?Ue(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(MH,t,n)(a)}}function V0e(e){e.exit("blockQuote")}const NH={name:"characterEscape",tokenize:K0e};function K0e(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return N0e(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const DH={name:"characterReference",tokenize:G0e};function G0e(e,t,n){const r=this;let i=0,s,a;return o;function o(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),l}function l(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,a=Rn,f(u))}function c(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=M0e,f):(e.enter("characterReferenceValue"),s=7,a=l1,f(u))}function f(u){if(u===59&&i){const d=e.exit("characterReferenceValue");return a===Rn&&!wT(r.sliceSerialize(d))?n(u):(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(u)&&i++<s?(e.consume(u),f):n(u)}}const QM={partial:!0,tokenize:J0e},XM={concrete:!0,name:"codeFenced",tokenize:Y0e};function Y0e(e,t,n){const r=this,i={partial:!0,tokenize:C};let s=0,a=0,o;return l;function l(k){return c(k)}function c(k){const A=r.events[r.events.length-1];return s=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,o=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(k)}function f(k){return k===o?(a++,e.consume(k),f):a<3?n(k):(e.exit("codeFencedFenceSequence"),ze(k)?Ue(e,u,"whitespace")(k):u(k))}function u(k){return k===null||fe(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(QM,b,_)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(k))}function d(k){return k===null||fe(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(k)):ze(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ue(e,h,"whitespace")(k)):k===96&&k===o?n(k):(e.consume(k),d)}function h(k){return k===null||fe(k)?u(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===null||fe(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(k)):k===96&&k===o?n(k):(e.consume(k),p)}function b(k){return e.attempt(i,_,S)(k)}function S(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),m}function m(k){return s>0&&ze(k)?Ue(e,y,"linePrefix",s+1)(k):y(k)}function y(k){return k===null||fe(k)?e.check(QM,b,_)(k):(e.enter("codeFlowValue"),v(k))}function v(k){return k===null||fe(k)?(e.exit("codeFlowValue"),y(k)):(e.consume(k),v)}function _(k){return e.exit("codeFenced"),t(k)}function C(k,A,N){let D=0;return M;function M(G){return k.enter("lineEnding"),k.consume(G),k.exit("lineEnding"),$}function $(G){return k.enter("codeFencedFence"),ze(G)?Ue(k,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):L(G)}function L(G){return G===o?(k.enter("codeFencedFenceSequence"),J(G)):N(G)}function J(G){return G===o?(D++,k.consume(G),J):D>=a?(k.exit("codeFencedFenceSequence"),ze(G)?Ue(k,Y,"whitespace")(G):Y(G)):N(G)}function Y(G){return G===null||fe(G)?(k.exit("codeFencedFence"),A(G)):N(G)}}}function J0e(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Q0={name:"codeIndented",tokenize:X0e},Q0e={partial:!0,tokenize:W0e};function X0e(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Ue(e,s,"linePrefix",5)(c)}function s(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):fe(c)?e.attempt(Q0e,a,l)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||fe(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),o)}function l(c){return e.exit("codeIndented"),t(c)}}function W0e(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):fe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Ue(e,s,"linePrefix",5)(a)}function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):fe(a)?i(a):n(a)}}const Z0e={name:"codeText",previous:twe,resolve:ewe,tokenize:nwe};function ewe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function twe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function nwe(e,t,n){let r=0,i,s;return a;function a(u){return e.enter("codeText"),e.enter("codeTextSequence"),o(u)}function o(u){return u===96?(e.consume(u),r++,o):(e.exit("codeTextSequence"),l(u))}function l(u){return u===null?n(u):u===32?(e.enter("space"),e.consume(u),e.exit("space"),l):u===96?(s=e.enter("codeTextSequence"),i=0,f(u)):fe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(u))}function c(u){return u===null||u===32||u===96||fe(u)?(e.exit("codeTextData"),l(u)):(e.consume(u),c)}function f(u){return u===96?(e.consume(u),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(u)):(s.type="codeTextData",c(u))}}class rwe{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Qf(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Qf(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Qf(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Qf(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Qf(this.left,n.reverse())}}}function Qf(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function zH(e){const t={};let n=-1,r,i,s,a,o,l,c;const f=new rwe(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,iwe(f,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=f.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},o=f.slice(i,n),o.unshift(r),f.splice(i,n-i+1,o))}}return Or(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function iwe(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,l=[],c={};let f,u,d=-1,h=n,p=0,b=0;const S=[b];for(;h;){for(;e.get(++i)[1]!==h;);s.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),u&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(f),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),u=h,h=h.next}for(h=n;++d<o.length;)o[d][0]==="exit"&&o[d-1][0]==="enter"&&o[d][1].type===o[d-1][1].type&&o[d][1].start.line!==o[d][1].end.line&&(b=d+1,S.push(b),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):S.pop(),d=S.length;d--;){const m=o.slice(S[d],S[d+1]),y=s.pop();l.push([y,y+m.length-1]),e.splice(y,2,m)}for(l.reverse(),d=-1;++d<l.length;)c[p+l[d][0]]=p+l[d][1],p+=l[d][1]-l[d][0]-1;return c}const swe={resolve:owe,tokenize:lwe},awe={partial:!0,tokenize:cwe};function owe(e){return zH(e),e}function lwe(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):fe(o)?e.check(awe,a,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function cwe(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ue(e,s,"linePrefix")}function s(a){if(a===null||fe(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function IH(e,t,n,r,i,s,a,o,l){const c=l||Number.POSITIVE_INFINITY;let f=0;return u;function u(m){return m===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(m),e.exit(s),d):m===null||m===32||m===41||ib(m)?n(m):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),b(m))}function d(m){return m===62?(e.enter(s),e.consume(m),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===62?(e.exit("chunkString"),e.exit(o),d(m)):m===null||m===60||fe(m)?n(m):(e.consume(m),m===92?p:h)}function p(m){return m===60||m===62||m===92?(e.consume(m),h):h(m)}function b(m){return!f&&(m===null||m===41||ct(m))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(m)):f<c&&m===40?(e.consume(m),f++,b):m===41?(e.consume(m),f--,b):m===null||m===32||m===40||ib(m)?n(m):(e.consume(m),m===92?S:b)}function S(m){return m===40||m===41||m===92?(e.consume(m),b):b(m)}}function $H(e,t,n,r,i,s){const a=this;let o=0,l;return c;function c(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(s),f}function f(h){return o>999||h===null||h===91||h===93&&!l||h===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):h===93?(e.exit(s),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):fe(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===null||h===91||h===93||fe(h)||o++>999?(e.exit("chunkString"),f(h)):(e.consume(h),l||(l=!ze(h)),h===92?d:u)}function d(h){return h===91||h===92||h===93?(e.consume(h),o++,u):u(h)}}function LH(e,t,n,r,i,s){let a;return o;function o(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),a=d===40?41:d,l):n(d)}function l(d){return d===a?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(s),c(d))}function c(d){return d===a?(e.exit(s),l(a)):d===null?n(d):fe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ue(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===a||d===null||fe(d)?(e.exit("chunkString"),c(d)):(e.consume(d),d===92?u:f)}function u(d){return d===a||d===92?(e.consume(d),f):f(d)}}function Vd(e,t){let n;return r;function r(i){return fe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ze(i)?Ue(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const uwe={name:"definition",tokenize:dwe},fwe={partial:!0,tokenize:hwe};function dwe(e,t,n){const r=this;let i;return s;function s(h){return e.enter("definition"),a(h)}function a(h){return $H.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=Si(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):n(h)}function l(h){return ct(h)?Vd(e,c)(h):c(h)}function c(h){return IH(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(fwe,u,u)(h)}function u(h){return ze(h)?Ue(e,d,"whitespace")(h):d(h)}function d(h){return h===null||fe(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function hwe(e,t,n){return r;function r(o){return ct(o)?Vd(e,i)(o):n(o)}function i(o){return LH(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return ze(o)?Ue(e,a,"whitespace")(o):a(o)}function a(o){return o===null||fe(o)?t(o):n(o)}}const mwe={name:"hardBreakEscape",tokenize:pwe};function pwe(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return fe(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const gwe={name:"headingAtx",resolve:ywe,tokenize:bwe};function ywe(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Or(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function bwe(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),s(f)}function s(f){return e.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&r++<6?(e.consume(f),a):f===null||ct(f)?(e.exit("atxHeadingSequence"),o(f)):n(f)}function o(f){return f===35?(e.enter("atxHeadingSequence"),l(f)):f===null||fe(f)?(e.exit("atxHeading"),t(f)):ze(f)?Ue(e,o,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function l(f){return f===35?(e.consume(f),l):(e.exit("atxHeadingSequence"),o(f))}function c(f){return f===null||f===35||ct(f)?(e.exit("atxHeadingText"),o(f)):(e.consume(f),c)}}const vwe=["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","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],WM=["pre","script","style","textarea"],Swe={concrete:!0,name:"htmlFlow",resolveTo:_we,tokenize:kwe},wwe={partial:!0,tokenize:Cwe},xwe={partial:!0,tokenize:Ewe};function _we(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function kwe(e,t,n){const r=this;let i,s,a,o,l;return c;function c(T){return f(T)}function f(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),u}function u(T){return T===33?(e.consume(T),d):T===47?(e.consume(T),s=!0,b):T===63?(e.consume(T),i=3,r.interrupt?t:R):Pn(T)?(e.consume(T),a=String.fromCharCode(T),S):n(T)}function d(T){return T===45?(e.consume(T),i=2,h):T===91?(e.consume(T),i=5,o=0,p):Pn(T)?(e.consume(T),i=4,r.interrupt?t:R):n(T)}function h(T){return T===45?(e.consume(T),r.interrupt?t:R):n(T)}function p(T){const W="CDATA[";return T===W.charCodeAt(o++)?(e.consume(T),o===W.length?r.interrupt?t:L:p):n(T)}function b(T){return Pn(T)?(e.consume(T),a=String.fromCharCode(T),S):n(T)}function S(T){if(T===null||T===47||T===62||ct(T)){const W=T===47,Z=a.toLowerCase();return!W&&!s&&WM.includes(Z)?(i=1,r.interrupt?t(T):L(T)):vwe.includes(a.toLowerCase())?(i=6,W?(e.consume(T),m):r.interrupt?t(T):L(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):s?y(T):v(T))}return T===45||Rn(T)?(e.consume(T),a+=String.fromCharCode(T),S):n(T)}function m(T){return T===62?(e.consume(T),r.interrupt?t:L):n(T)}function y(T){return ze(T)?(e.consume(T),y):M(T)}function v(T){return T===47?(e.consume(T),M):T===58||T===95||Pn(T)?(e.consume(T),_):ze(T)?(e.consume(T),v):M(T)}function _(T){return T===45||T===46||T===58||T===95||Rn(T)?(e.consume(T),_):C(T)}function C(T){return T===61?(e.consume(T),k):ze(T)?(e.consume(T),C):v(T)}function k(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),l=T,A):ze(T)?(e.consume(T),k):N(T)}function A(T){return T===l?(e.consume(T),l=null,D):T===null||fe(T)?n(T):(e.consume(T),A)}function N(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||ct(T)?C(T):(e.consume(T),N)}function D(T){return T===47||T===62||ze(T)?v(T):n(T)}function M(T){return T===62?(e.consume(T),$):n(T)}function $(T){return T===null||fe(T)?L(T):ze(T)?(e.consume(T),$):n(T)}function L(T){return T===45&&i===2?(e.consume(T),z):T===60&&i===1?(e.consume(T),j):T===62&&i===4?(e.consume(T),Re):T===63&&i===3?(e.consume(T),R):T===93&&i===5?(e.consume(T),te):fe(T)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(wwe,U,J)(T)):T===null||fe(T)?(e.exit("htmlFlowData"),J(T)):(e.consume(T),L)}function J(T){return e.check(xwe,Y,U)(T)}function Y(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),G}function G(T){return T===null||fe(T)?J(T):(e.enter("htmlFlowData"),L(T))}function z(T){return T===45?(e.consume(T),R):L(T)}function j(T){return T===47?(e.consume(T),a="",I):L(T)}function I(T){if(T===62){const W=a.toLowerCase();return WM.includes(W)?(e.consume(T),Re):L(T)}return Pn(T)&&a.length<8?(e.consume(T),a+=String.fromCharCode(T),I):L(T)}function te(T){return T===93?(e.consume(T),R):L(T)}function R(T){return T===62?(e.consume(T),Re):T===45&&i===2?(e.consume(T),R):L(T)}function Re(T){return T===null||fe(T)?(e.exit("htmlFlowData"),U(T)):(e.consume(T),Re)}function U(T){return e.exit("htmlFlow"),t(T)}}function Ewe(e,t,n){const r=this;return i;function i(a){return fe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function Cwe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Im,t,n)}}const Twe={name:"htmlText",tokenize:Awe};function Awe(e,t,n){const r=this;let i,s,a;return o;function o(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),l}function l(R){return R===33?(e.consume(R),c):R===47?(e.consume(R),C):R===63?(e.consume(R),v):Pn(R)?(e.consume(R),N):n(R)}function c(R){return R===45?(e.consume(R),f):R===91?(e.consume(R),s=0,p):Pn(R)?(e.consume(R),y):n(R)}function f(R){return R===45?(e.consume(R),h):n(R)}function u(R){return R===null?n(R):R===45?(e.consume(R),d):fe(R)?(a=u,j(R)):(e.consume(R),u)}function d(R){return R===45?(e.consume(R),h):u(R)}function h(R){return R===62?z(R):R===45?d(R):u(R)}function p(R){const Re="CDATA[";return R===Re.charCodeAt(s++)?(e.consume(R),s===Re.length?b:p):n(R)}function b(R){return R===null?n(R):R===93?(e.consume(R),S):fe(R)?(a=b,j(R)):(e.consume(R),b)}function S(R){return R===93?(e.consume(R),m):b(R)}function m(R){return R===62?z(R):R===93?(e.consume(R),m):b(R)}function y(R){return R===null||R===62?z(R):fe(R)?(a=y,j(R)):(e.consume(R),y)}function v(R){return R===null?n(R):R===63?(e.consume(R),_):fe(R)?(a=v,j(R)):(e.consume(R),v)}function _(R){return R===62?z(R):v(R)}function C(R){return Pn(R)?(e.consume(R),k):n(R)}function k(R){return R===45||Rn(R)?(e.consume(R),k):A(R)}function A(R){return fe(R)?(a=A,j(R)):ze(R)?(e.consume(R),A):z(R)}function N(R){return R===45||Rn(R)?(e.consume(R),N):R===47||R===62||ct(R)?D(R):n(R)}function D(R){return R===47?(e.consume(R),z):R===58||R===95||Pn(R)?(e.consume(R),M):fe(R)?(a=D,j(R)):ze(R)?(e.consume(R),D):z(R)}function M(R){return R===45||R===46||R===58||R===95||Rn(R)?(e.consume(R),M):$(R)}function $(R){return R===61?(e.consume(R),L):fe(R)?(a=$,j(R)):ze(R)?(e.consume(R),$):D(R)}function L(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),i=R,J):fe(R)?(a=L,j(R)):ze(R)?(e.consume(R),L):(e.consume(R),Y)}function J(R){return R===i?(e.consume(R),i=void 0,G):R===null?n(R):fe(R)?(a=J,j(R)):(e.consume(R),J)}function Y(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||ct(R)?D(R):(e.consume(R),Y)}function G(R){return R===47||R===62||ct(R)?D(R):n(R)}function z(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function j(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),I}function I(R){return ze(R)?Ue(e,te,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):te(R)}function te(R){return e.enter("htmlTextData"),a(R)}}const xT={name:"labelEnd",resolveAll:Nwe,resolveTo:Dwe,tokenize:zwe},Owe={tokenize:Iwe},Rwe={tokenize:$we},Mwe={tokenize:Lwe};function Nwe(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Or(e,0,e.length,n),e}function Dwe(e,t){let n=e.length,r=0,i,s,a,o;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},f={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=Hr(o,e.slice(s+1,s+r+3)),o=Hr(o,[["enter",f,t]]),o=Hr(o,sS(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),o=Hr(o,[["exit",f,t],e[a-2],e[a-1],["exit",c,t]]),o=Hr(o,e.slice(a+1)),o=Hr(o,[["exit",l,t]]),Or(e,s,e.length,o),e}function zwe(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return o;function o(d){return s?s._inactive?u(d):(a=r.parser.defined.includes(Si(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),l):n(d)}function l(d){return d===40?e.attempt(Owe,f,a?f:u)(d):d===91?e.attempt(Rwe,f,a?c:u)(d):a?f(d):u(d)}function c(d){return e.attempt(Mwe,f,u)(d)}function f(d){return t(d)}function u(d){return s._balanced=!0,n(d)}}function Iwe(e,t,n){return r;function r(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),i}function i(u){return ct(u)?Vd(e,s)(u):s(u)}function s(u){return u===41?f(u):IH(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function a(u){return ct(u)?Vd(e,l)(u):f(u)}function o(u){return n(u)}function l(u){return u===34||u===39||u===40?LH(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):f(u)}function c(u){return ct(u)?Vd(e,f)(u):f(u)}function f(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):n(u)}}function $we(e,t,n){const r=this;return i;function i(o){return $H.call(r,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(Si(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function Lwe(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const jwe={name:"labelStartImage",resolveAll:xT.resolveAll,tokenize:Fwe};function Fwe(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Pwe={name:"labelStartLink",resolveAll:xT.resolveAll,tokenize:Uwe};function Uwe(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const X0={name:"lineEnding",tokenize:Bwe};function Bwe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ue(e,t,"linePrefix")}}const hg={name:"thematicBreak",tokenize:Hwe};function Hwe(e,t,n){let r=0,i;return s;function s(c){return e.enter("thematicBreak"),a(c)}function a(c){return i=c,o(c)}function o(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||fe(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),ze(c)?Ue(e,o,"whitespace")(c):o(c))}}const Xn={continuation:{tokenize:Gwe},exit:Jwe,name:"list",tokenize:Kwe},qwe={partial:!0,tokenize:Qwe},Vwe={partial:!0,tokenize:Ywe};function Kwe(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(h){const p=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:l1(h)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(hg,n,c)(h):c(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return n(h)}function l(h){return l1(h)&&++a<10?(e.consume(h),l):(!r.interrupt||a<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Im,r.interrupt?n:f,e.attempt(qwe,d,u))}function f(h){return r.containerState.initialBlankLine=!0,s++,d(h)}function u(h){return ze(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),d):n(h)}function d(h){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function Gwe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Im,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ue(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!ze(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Vwe,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ue(e,e.attempt(Xn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Ywe(e,t,n){const r=this;return Ue(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function Jwe(e){e.exit(this.containerState.type)}function Qwe(e,t,n){const r=this;return Ue(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!ze(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const ZM={name:"setextUnderline",resolveTo:Xwe,tokenize:Wwe};function Xwe(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function Wwe(e,t,n){const r=this;let i;return s;function s(c){let f=r.events.length,u;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){u=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||u)?(e.enter("setextHeadingLine"),i=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),ze(c)?Ue(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||fe(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Zwe={tokenize:exe};function exe(e){const t=this,n=e.attempt(Im,r,e.attempt(this.parser.constructs.flowInitial,i,Ue(e,e.attempt(this.parser.constructs.flow,i,e.attempt(swe,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const txe={resolveAll:FH()},nxe=jH("string"),rxe=jH("text");function jH(e){return{resolveAll:FH(e==="text"?ixe:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,o);return a;function a(f){return c(f)?s(f):o(f)}function o(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),l}function l(f){return c(f)?(n.exit("data"),s(f)):(n.consume(f),l)}function c(f){if(f===null)return!0;const u=i[f];let d=-1;if(u)for(;++d<u.length;){const h=u[d];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function FH(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function ixe(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,a=-1,o=0,l;for(;s--;){const c=i[s];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(c===-2)l=!0,o++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const c={type:n===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const sxe={42:Xn,43:Xn,45:Xn,48:Xn,49:Xn,50:Xn,51:Xn,52:Xn,53:Xn,54:Xn,55:Xn,56:Xn,57:Xn,62:MH},axe={91:uwe},oxe={[-2]:Q0,[-1]:Q0,32:Q0},lxe={35:gwe,42:hg,45:[ZM,hg],60:Swe,61:ZM,95:hg,96:XM,126:XM},cxe={38:DH,92:NH},uxe={[-5]:X0,[-4]:X0,[-3]:X0,33:jwe,38:DH,42:c1,60:[P0e,Twe],91:Pwe,92:[mwe,NH],93:xT,95:c1,96:Z0e},fxe={null:[c1,txe]},dxe={null:[42,95]},hxe={null:[]},mxe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:dxe,contentInitial:axe,disable:hxe,document:sxe,flow:lxe,flowInitial:oxe,insideSpan:fxe,string:cxe,text:uxe},Symbol.toStringTag,{value:"Module"}));function pxe(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let a=[],o=[];const l={attempt:A(C),check:A(k),consume:y,enter:v,exit:_,interrupt:A(k,{interrupt:!0})},c={code:null,containerState:{},defineSkip:b,events:[],now:p,parser:e,previous:null,sliceSerialize:d,sliceStream:h,write:u};let f=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function u($){return a=Hr(a,$),S(),a[a.length-1]!==null?[]:(N(t,0),c.events=sS(s,c.events,c),c.events)}function d($,L){return yxe(h($),L)}function h($){return gxe(a,$)}function p(){const{_bufferIndex:$,_index:L,line:J,column:Y,offset:G}=r;return{_bufferIndex:$,_index:L,line:J,column:Y,offset:G}}function b($){i[$.line]=$.column,M()}function S(){let $;for(;r._index<a.length;){const L=a[r._index];if(typeof L=="string")for($=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===$&&r._bufferIndex<L.length;)m(L.charCodeAt(r._bufferIndex));else m(L)}}function m($){f=f($)}function y($){fe($)?(r.line++,r.column=1,r.offset+=$===-3?2:1,M()):$!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=$}function v($,L){const J=L||{};return J.type=$,J.start=p(),c.events.push(["enter",J,c]),o.push(J),J}function _($){const L=o.pop();return L.end=p(),c.events.push(["exit",L,c]),L}function C($,L){N($,L.from)}function k($,L){L.restore()}function A($,L){return J;function J(Y,G,z){let j,I,te,R;return Array.isArray(Y)?U(Y):"tokenize"in Y?U([Y]):Re(Y);function Re(le){return H;function H(he){const we=he!==null&&le[he],xe=he!==null&&le.null,Me=[...Array.isArray(we)?we:we?[we]:[],...Array.isArray(xe)?xe:xe?[xe]:[]];return U(Me)(he)}}function U(le){return j=le,I=0,le.length===0?z:T(le[I])}function T(le){return H;function H(he){return R=D(),te=le,le.partial||(c.currentConstruct=le),le.name&&c.parser.constructs.disable.null.includes(le.name)?Z():le.tokenize.call(L?Object.assign(Object.create(c),L):c,l,W,Z)(he)}}function W(le){return $(te,R),G}function Z(le){return R.restore(),++I<j.length?T(j[I]):z}}}function N($,L){$.resolveAll&&!s.includes($)&&s.push($),$.resolve&&Or(c.events,L,c.events.length-L,$.resolve(c.events.slice(L),c)),$.resolveTo&&(c.events=$.resolveTo(c.events,c))}function D(){const $=p(),L=c.previous,J=c.currentConstruct,Y=c.events.length,G=Array.from(o);return{from:Y,restore:z};function z(){r=$,c.previous=L,c.currentConstruct=J,c.events.length=Y,o=G,M()}}function M(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function gxe(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function yxe(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
|
|
236
|
+
`;break}case-3:{a=`\r
|
|
237
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function bxe(e){const r={constructs:OH([mxe,...(e||{}).extensions||[]]),content:i(D0e),defined:[],document:i(I0e),flow:i(Zwe),lazy:{},string:i(nxe),text:i(rxe)};return r;function i(s){return a;function a(o){return pxe(r,s,o)}}}function vxe(e){for(;!zH(e););return e}const eN=/[\0\t\n\r]/g;function Sxe(){let e=1,t="",n=!0,r;return i;function i(s,a,o){const l=[];let c,f,u,d,h;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),u=0,t="",n&&(s.charCodeAt(0)===65279&&u++,n=void 0);u<s.length;){if(eN.lastIndex=u,c=eN.exec(s),d=c&&c.index!==void 0?c.index:s.length,h=s.charCodeAt(d),!c){t=s.slice(u);break}if(h===10&&u===d&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),u<d&&(l.push(s.slice(u,d)),e+=d-u),h){case 0:{l.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,l.push(-2);e++<f;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}u=d+1}return o&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const wxe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function xxe(e){return e.replace(wxe,_xe)}function _xe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return RH(n.slice(s?2:1),s?16:10)}return wT(n)||e}const PH={}.hasOwnProperty;function kxe(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Exe(n)(vxe(bxe(n).document().write(Sxe()(e,t,!0))))}function Exe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Co),autolinkProtocol:D,autolinkEmail:D,atxHeading:s(ra),blockQuote:s(xe),characterEscape:D,characterReference:D,codeFenced:s(Me),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(Me,a),codeText:s($e,a),codeTextData:D,data:D,codeFlowValue:D,definition:s(zn),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Dr),hardBreakEscape:s(ia),hardBreakTrailing:s(ia),htmlFlow:s(sa,a),htmlFlowData:D,htmlText:s(sa,a),htmlTextData:D,image:s(cS),label:a,link:s(Co),listItem:s(E8),listItemValue:d,listOrdered:s(IT,u),listUnordered:s(IT),paragraph:s(C8),reference:T,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(ra),strong:s(T8),thematicBreak:s(O8)},exit:{atxHeading:l(),atxHeadingSequence:C,autolink:l(),autolinkEmail:we,autolinkProtocol:he,blockQuote:l(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:Z,characterReferenceMarkerNumeric:Z,characterReferenceValue:le,characterReference:H,codeFenced:l(S),codeFencedFence:b,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:M,codeIndented:l(m),codeText:l(G),codeTextData:M,data:M,definition:l(),definitionDestinationString:_,definitionLabelString:y,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(L),hardBreakTrailing:l(L),htmlFlow:l(J),htmlFlowData:M,htmlText:l(Y),htmlTextData:M,image:l(j),label:te,labelText:I,lineEnding:$,link:l(z),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:W,resourceDestinationString:R,resourceTitleString:Re,resource:U,setextHeading:l(N),setextHeadingLineSequence:A,setextHeadingText:k,strong:l(),thematicBreak:l()}};UH(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(F){let Q={type:"root",children:[]};const _e={stack:[Q],tokenStack:[],config:t,enter:o,exit:c,buffer:a,resume:f,data:n},Le=[];let st=-1;for(;++st<F.length;)if(F[st][1].type==="listOrdered"||F[st][1].type==="listUnordered")if(F[st][0]==="enter")Le.push(st);else{const si=Le.pop();st=i(F,si,st)}for(st=-1;++st<F.length;){const si=t[F[st][0]];PH.call(si,F[st][1].type)&&si[F[st][1].type].call(Object.assign({sliceSerialize:F[st][2].sliceSerialize},_e),F[st][1])}if(_e.tokenStack.length>0){const si=_e.tokenStack[_e.tokenStack.length-1];(si[1]||tN).call(_e,void 0,si[0])}for(Q.position={start:la(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:la(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},st=-1;++st<t.transforms.length;)Q=t.transforms[st](Q)||Q;return Q}function i(F,Q,_e){let Le=Q-1,st=-1,si=!1,To,ls,Af,Of;for(;++Le<=_e;){const cr=F[Le];switch(cr[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{cr[0]==="enter"?st++:st--,Of=void 0;break}case"lineEndingBlank":{cr[0]==="enter"&&(To&&!Of&&!st&&!Af&&(Af=Le),Of=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Of=void 0}if(!st&&cr[0]==="enter"&&cr[1].type==="listItemPrefix"||st===-1&&cr[0]==="exit"&&(cr[1].type==="listUnordered"||cr[1].type==="listOrdered")){if(To){let Jl=Le;for(ls=void 0;Jl--;){const cs=F[Jl];if(cs[1].type==="lineEnding"||cs[1].type==="lineEndingBlank"){if(cs[0]==="exit")continue;ls&&(F[ls][1].type="lineEndingBlank",si=!0),cs[1].type="lineEnding",ls=Jl}else if(!(cs[1].type==="linePrefix"||cs[1].type==="blockQuotePrefix"||cs[1].type==="blockQuotePrefixWhitespace"||cs[1].type==="blockQuoteMarker"||cs[1].type==="listItemIndent"))break}Af&&(!ls||Af<ls)&&(To._spread=!0),To.end=Object.assign({},ls?F[ls][1].start:cr[1].end),F.splice(ls||Le,0,["exit",To,cr[2]]),Le++,_e++}if(cr[1].type==="listItemPrefix"){const Jl={type:"listItem",_spread:!1,start:Object.assign({},cr[1].start),end:void 0};To=Jl,F.splice(Le,0,["enter",Jl,cr[2]]),Le++,_e++,Af=void 0,Of=!0}}}return F[Q][1]._spread=si,_e}function s(F,Q){return _e;function _e(Le){o.call(this,F(Le),Le),Q&&Q.call(this,Le)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(F,Q,_e){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([Q,_e||void 0]),F.position={start:la(Q.start),end:void 0}}function l(F){return Q;function Q(_e){F&&F.call(this,_e),c.call(this,_e)}}function c(F,Q){const _e=this.stack.pop(),Le=this.tokenStack.pop();if(Le)Le[0].type!==F.type&&(Q?Q.call(this,F,Le[0]):(Le[1]||tN).call(this,F,Le[0]));else throw new Error("Cannot close `"+F.type+"` ("+qd({start:F.start,end:F.end})+"): it’s not open");_e.position.end=la(F.end)}function f(){return ST(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function d(F){if(this.data.expectingFirstListItemValue){const Q=this.stack[this.stack.length-2];Q.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function h(){const F=this.resume(),Q=this.stack[this.stack.length-1];Q.lang=F}function p(){const F=this.resume(),Q=this.stack[this.stack.length-1];Q.meta=F}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const F=this.resume(),Q=this.stack[this.stack.length-1];Q.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const F=this.resume(),Q=this.stack[this.stack.length-1];Q.value=F.replace(/(\r?\n|\r)$/g,"")}function y(F){const Q=this.resume(),_e=this.stack[this.stack.length-1];_e.label=Q,_e.identifier=Si(this.sliceSerialize(F)).toLowerCase()}function v(){const F=this.resume(),Q=this.stack[this.stack.length-1];Q.title=F}function _(){const F=this.resume(),Q=this.stack[this.stack.length-1];Q.url=F}function C(F){const Q=this.stack[this.stack.length-1];if(!Q.depth){const _e=this.sliceSerialize(F).length;Q.depth=_e}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function A(F){const Q=this.stack[this.stack.length-1];Q.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function D(F){const _e=this.stack[this.stack.length-1].children;let Le=_e[_e.length-1];(!Le||Le.type!=="text")&&(Le=A8(),Le.position={start:la(F.start),end:void 0},_e.push(Le)),this.stack.push(Le)}function M(F){const Q=this.stack.pop();Q.value+=this.sliceSerialize(F),Q.position.end=la(F.end)}function $(F){const Q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const _e=Q.children[Q.children.length-1];_e.position.end=la(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Q.type)&&(D.call(this,F),M.call(this,F))}function L(){this.data.atHardBreak=!0}function J(){const F=this.resume(),Q=this.stack[this.stack.length-1];Q.value=F}function Y(){const F=this.resume(),Q=this.stack[this.stack.length-1];Q.value=F}function G(){const F=this.resume(),Q=this.stack[this.stack.length-1];Q.value=F}function z(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=Q,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function j(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=Q,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function I(F){const Q=this.sliceSerialize(F),_e=this.stack[this.stack.length-2];_e.label=xxe(Q),_e.identifier=Si(Q).toLowerCase()}function te(){const F=this.stack[this.stack.length-1],Q=this.resume(),_e=this.stack[this.stack.length-1];if(this.data.inReference=!0,_e.type==="link"){const Le=F.children;_e.children=Le}else _e.alt=Q}function R(){const F=this.resume(),Q=this.stack[this.stack.length-1];Q.url=F}function Re(){const F=this.resume(),Q=this.stack[this.stack.length-1];Q.title=F}function U(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function W(F){const Q=this.resume(),_e=this.stack[this.stack.length-1];_e.label=Q,_e.identifier=Si(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function Z(F){this.data.characterReferenceType=F.type}function le(F){const Q=this.sliceSerialize(F),_e=this.data.characterReferenceType;let Le;_e?(Le=RH(Q,_e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Le=wT(Q);const st=this.stack[this.stack.length-1];st.value+=Le}function H(F){const Q=this.stack.pop();Q.position.end=la(F.end)}function he(F){M.call(this,F);const Q=this.stack[this.stack.length-1];Q.url=this.sliceSerialize(F)}function we(F){M.call(this,F);const Q=this.stack[this.stack.length-1];Q.url="mailto:"+this.sliceSerialize(F)}function xe(){return{type:"blockquote",children:[]}}function Me(){return{type:"code",lang:null,meta:null,value:""}}function $e(){return{type:"inlineCode",value:""}}function zn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Dr(){return{type:"emphasis",children:[]}}function ra(){return{type:"heading",depth:0,children:[]}}function ia(){return{type:"break"}}function sa(){return{type:"html",value:""}}function cS(){return{type:"image",title:null,url:"",alt:null}}function Co(){return{type:"link",title:null,url:"",children:[]}}function IT(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function E8(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function C8(){return{type:"paragraph",children:[]}}function T8(){return{type:"strong",children:[]}}function A8(){return{type:"text",value:""}}function O8(){return{type:"thematicBreak"}}}function la(e){return{line:e.line,column:e.column,offset:e.offset}}function UH(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?UH(e,r):Cxe(e,r)}}function Cxe(e,t){let n;for(n in t)if(PH.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function tN(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qd({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qd({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qd({start:t.start,end:t.end})+") is still open")}function Txe(e){const t=this;t.parser=n;function n(r){return kxe(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Axe(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Oxe(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
238
|
+
`}]}function Rxe(e,t){const n=t.value?t.value+`
|
|
239
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function Mxe(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Nxe(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Dxe(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Tf(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(r,o);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function zxe(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ixe(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function BH(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function $xe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return BH(e,t);const i={src:Tf(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function Lxe(e,t){const n={src:Tf(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function jxe(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Fxe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return BH(e,t);const i={href:Tf(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Pxe(e,t){const n={href:Tf(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Uxe(e,t,n){const r=e.all(t),i=n?Bxe(n):HH(t),s={},a=[];if(typeof t.checked=="boolean"){const f=r[0];let u;f&&f.type==="element"&&f.tagName==="p"?u=f:(u={type:"element",tagName:"p",properties:{},children:[]},r.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const f=r[o];(i||o!==0||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
|
|
240
|
+
`}),f.type==="element"&&f.tagName==="p"&&!i?a.push(...f.children):a.push(f)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
|
|
241
|
+
`});const c={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,c),e.applyData(t,c)}function Bxe(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=HH(n[r])}return t}function HH(e){const t=e.spread;return t??e.children.length>1}function Hxe(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function qxe(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Vxe(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Kxe(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Gxe(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=gT(t.children[1]),l=xH(t.children[t.children.length-1]);o&&l&&(a.position={start:o,end:l}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function Yxe(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:t.children.length;let l=-1;const c=[];for(;++l<o;){const u=t.children[l],d={},h=a?a[l]:void 0;h&&(d.align=h);let p={type:"element",tagName:s,properties:d,children:[]};u&&(p.children=e.all(u),e.patch(u,p),p=e.applyData(u,p)),c.push(p)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function Jxe(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const nN=9,rN=32;function Qxe(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(iN(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(iN(t.slice(i),i>0,!1)),s.join("")}function iN(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===nN||s===rN;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===nN||s===rN;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Xxe(e,t){const n={type:"text",value:Qxe(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Wxe(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Zxe={blockquote:Axe,break:Oxe,code:Rxe,delete:Mxe,emphasis:Nxe,footnoteReference:Dxe,heading:zxe,html:Ixe,imageReference:$xe,image:Lxe,inlineCode:jxe,linkReference:Fxe,link:Pxe,listItem:Uxe,list:Hxe,paragraph:qxe,root:Vxe,strong:Kxe,table:Gxe,tableCell:Jxe,tableRow:Yxe,text:Xxe,thematicBreak:Wxe,toml:_p,yaml:_p,definition:_p,footnoteDefinition:_p};function _p(){}const qH=-1,aS=0,Kd=1,sb=2,_T=3,kT=4,ET=5,CT=6,VH=7,KH=8,sN=typeof self=="object"?self:globalThis,e_e=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case aS:case qH:return n(a,i);case Kd:{const o=n([],i);for(const l of a)o.push(r(l));return o}case sb:{const o=n({},i);for(const[l,c]of a)o[r(l)]=r(c);return o}case _T:return n(new Date(a),i);case kT:{const{source:o,flags:l}=a;return n(new RegExp(o,l),i)}case ET:{const o=n(new Map,i);for(const[l,c]of a)o.set(r(l),r(c));return o}case CT:{const o=n(new Set,i);for(const l of a)o.add(r(l));return o}case VH:{const{name:o,message:l}=a;return n(new sN[o](l),i)}case KH:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new sN[s](a),i)};return r},aN=e=>e_e(new Map,e)(0),lc="",{toString:t_e}={},{keys:n_e}=Object,Xf=e=>{const t=typeof e;if(t!=="object"||!e)return[aS,t];const n=t_e.call(e).slice(8,-1);switch(n){case"Array":return[Kd,lc];case"Object":return[sb,lc];case"Date":return[_T,lc];case"RegExp":return[kT,lc];case"Map":return[ET,lc];case"Set":return[CT,lc];case"DataView":return[Kd,n]}return n.includes("Array")?[Kd,n]:n.includes("Error")?[VH,n]:[sb,n]},kp=([e,t])=>e===aS&&(t==="function"||t==="symbol"),r_e=(e,t,n,r)=>{const i=(a,o)=>{const l=r.push(a)-1;return n.set(o,l),l},s=a=>{if(n.has(a))return n.get(a);let[o,l]=Xf(a);switch(o){case aS:{let f=a;switch(l){case"bigint":o=KH,f=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);f=null;break;case"undefined":return i([qH],a)}return i([o,f],a)}case Kd:{if(l){let d=a;return l==="DataView"?d=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(d=new Uint8Array(a)),i([l,[...d]],a)}const f=[],u=i([o,f],a);for(const d of a)f.push(s(d));return u}case sb:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const f=[],u=i([o,f],a);for(const d of n_e(a))(e||!kp(Xf(a[d])))&&f.push([s(d),s(a[d])]);return u}case _T:return i([o,a.toISOString()],a);case kT:{const{source:f,flags:u}=a;return i([o,{source:f,flags:u}],a)}case ET:{const f=[],u=i([o,f],a);for(const[d,h]of a)(e||!(kp(Xf(d))||kp(Xf(h))))&&f.push([s(d),s(h)]);return u}case CT:{const f=[],u=i([o,f],a);for(const d of a)(e||!kp(Xf(d)))&&f.push(s(d));return u}}const{message:c}=a;return i([o,{name:l,message:c}],a)};return s},oN=(e,{json:t,lossy:n}={})=>{const r=[];return r_e(!(t||n),!!t,new Map,r)(e),r},ab=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?aN(oN(e,t)):structuredClone(e):(e,t)=>aN(oN(e,t));function i_e(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function s_e(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function a_e(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||i_e,r=e.options.footnoteBackLabel||s_e,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const f=e.all(c),u=String(c.identifier).toUpperCase(),d=Tf(u.toLowerCase());let h=0;const p=[],b=e.footnoteCounts.get(u);for(;b!==void 0&&++h<=b;){p.length>0&&p.push({type:"text",value:" "});let y=typeof n=="string"?n:n(l,h);typeof y=="string"&&(y={type:"text",value:y}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,h),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const S=f[f.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const y=S.children[S.children.length-1];y&&y.type==="text"?y.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...p)}else f.push(...p);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(f,!0)};e.patch(c,m),o.push(m)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...ab(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
242
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
|
|
243
|
+
`}]}}const oS=function(e){if(e==null)return u_e;if(typeof e=="function")return lS(e);if(typeof e=="object")return Array.isArray(e)?o_e(e):l_e(e);if(typeof e=="string")return c_e(e);throw new Error("Expected function, string, or object as test")};function o_e(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=oS(e[n]);return lS(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function l_e(e){const t=e;return lS(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function c_e(e){return lS(t);function t(n){return n&&n.type===e}}function lS(e){return t;function t(n,r,i){return!!(f_e(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function u_e(){return!0}function f_e(e){return e!==null&&typeof e=="object"&&"type"in e}const GH=[],d_e=!0,u1=!1,h_e="skip";function YH(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=oS(i),a=r?-1:1;o(e,void 0,[])();function o(l,c,f){const u=l&&typeof l=="object"?l:{};if(typeof u.type=="string"){const h=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return d;function d(){let h=GH,p,b,S;if((!t||s(l,c,f[f.length-1]||void 0))&&(h=m_e(n(l,f)),h[0]===u1))return h;if("children"in l&&l.children){const m=l;if(m.children&&h[0]!==h_e)for(b=(r?m.children.length:-1)+a,S=f.concat(m);b>-1&&b<m.children.length;){const y=m.children[b];if(p=o(y,b,S)(),p[0]===u1)return p;b=typeof p[1]=="number"?p[1]:b+a}}return h}}}function m_e(e){return Array.isArray(e)?e:typeof e=="number"?[d_e,e]:e==null?GH:[e]}function TT(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),YH(e,s,o,i);function o(l,c){const f=c[c.length-1],u=f?f.children.indexOf(l):void 0;return a(l,u,f)}}const f1={}.hasOwnProperty,p_e={};function g_e(e,t){const n=t||p_e,r=new Map,i=new Map,s=new Map,a={...Zxe,...n.handlers},o={all:c,applyData:b_e,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:l,options:n,patch:y_e,wrap:S_e};return TT(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const u=f.type==="definition"?r:i,d=String(f.identifier).toUpperCase();u.has(d)||u.set(d,f)}}),o;function l(f,u){const d=f.type,h=o.handlers[d];if(f1.call(o.handlers,d)&&h)return h(o,f,u);if(o.options.passThrough&&o.options.passThrough.includes(d)){if("children"in f){const{children:b,...S}=f,m=ab(S);return m.children=o.all(f),m}return ab(f)}return(o.options.unknownHandler||v_e)(o,f,u)}function c(f){const u=[];if("children"in f){const d=f.children;let h=-1;for(;++h<d.length;){const p=o.one(d[h],f);if(p){if(h&&d[h-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=lN(p.value)),!Array.isArray(p)&&p.type==="element")){const b=p.children[0];b&&b.type==="text"&&(b.value=lN(b.value))}Array.isArray(p)?u.push(...p):u.push(p)}}}return u}}function y_e(e,t){e.position&&(t.position=s0e(e))}function b_e(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,ab(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function v_e(e,t){const n=t.data||{},r="value"in t&&!(f1.call(n,"hProperties")||f1.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function S_e(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
244
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
245
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
246
|
+
`}),n}function lN(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function cN(e,t){const n=g_e(e,t),r=n.one(e,void 0),i=a_e(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
|
|
247
|
+
`},i),s}function w_e(e,t){return e&&"run"in e?async function(n,r){const i=cN(n,{file:r,...t});await e.run(i,r)}:function(n,r){return cN(n,{file:r,...e||t})}}function uN(e){if(e)throw e}var mg=Object.prototype.hasOwnProperty,JH=Object.prototype.toString,fN=Object.defineProperty,dN=Object.getOwnPropertyDescriptor,hN=function(t){return typeof Array.isArray=="function"?Array.isArray(t):JH.call(t)==="[object Array]"},mN=function(t){if(!t||JH.call(t)!=="[object Object]")return!1;var n=mg.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&mg.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||mg.call(t,i)},pN=function(t,n){fN&&n.name==="__proto__"?fN(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},gN=function(t,n){if(n==="__proto__")if(mg.call(t,n)){if(dN)return dN(t,n).value}else return;return t[n]},x_e=function e(){var t,n,r,i,s,a,o=arguments[0],l=1,c=arguments.length,f=!1;for(typeof o=="boolean"&&(f=o,o=arguments[1]||{},l=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=gN(o,n),i=gN(t,n),o!==i&&(f&&i&&(mN(i)||(s=hN(i)))?(s?(s=!1,a=r&&hN(r)?r:[]):a=r&&mN(r)?r:{},pN(o,{name:n,newValue:e(f,a,i)})):typeof i<"u"&&pN(o,{name:n,newValue:i}));return o};const W0=Lh(x_e);function d1(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function __e(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(l,...c){const f=e[++s];let u=-1;if(l){a(l);return}for(;++u<i.length;)(c[u]===null||c[u]===void 0)&&(c[u]=i[u]);i=c,f?k_e(f,o)(...c):a(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function k_e(e,t){let n;return r;function r(...a){const o=e.length>a.length;let l;o&&a.push(i);try{l=e.apply(this,a)}catch(c){const f=c;if(o&&n)throw f;return i(f)}o||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(a,...o){n||(n=!0,t(a,...o))}function s(a){i(null,a)}}const zi={basename:E_e,dirname:C_e,extname:T_e,join:A_e,sep:"/"};function E_e(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');$m(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function C_e(e){if($m(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function T_e(e){$m(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function A_e(...e){let t=-1,n;for(;++t<e.length;)$m(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":O_e(n)}function O_e(e){$m(e);const t=e.codePointAt(0)===47;let n=R_e(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function R_e(e,t){let n="",r=0,i=-1,s=0,a=-1,o,l;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function $m(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const M_e={cwd:N_e};function N_e(){return"/"}function h1(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function D_e(e){if(typeof e=="string")e=new URL(e);else if(!h1(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return z_e(e)}function z_e(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Z0=["history","path","basename","stem","extname","dirname"];class QH{constructor(t){let n;t?h1(t)?n={path:t}:typeof t=="string"||I_e(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":M_e.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Z0.length;){const s=Z0[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)Z0.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?zi.basename(this.path):void 0}set basename(t){tw(t,"basename"),ew(t,"basename"),this.path=zi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?zi.dirname(this.path):void 0}set dirname(t){yN(this.basename,"dirname"),this.path=zi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?zi.extname(this.path):void 0}set extname(t){if(ew(t,"extname"),yN(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=zi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){h1(t)&&(t=D_e(t)),tw(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?zi.basename(this.path,this.extname):void 0}set stem(t){tw(t,"stem"),ew(t,"stem"),this.path=zi.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Dn(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ew(e,t){if(e&&e.includes(zi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+zi.sep+"`")}function tw(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function yN(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function I_e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $_e=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},L_e={}.hasOwnProperty;class AT extends $_e{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=__e()}copy(){const t=new AT;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(W0(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(iw("data",this.frozen),this.namespace[t]=n,this):L_e.call(this.namespace,t)&&this.namespace[t]||void 0:t?(iw("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ep(t),r=this.parser||this.Parser;return nw("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),nw("process",this.parser||this.Parser),rw("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const o=Ep(t),l=r.parse(o);r.run(l,o,function(f,u,d){if(f||!u||!d)return c(f);const h=u,p=r.stringify(h,d);P_e(p)?d.value=p:d.result=p,c(f,d)});function c(f,u){f||!u?a(f):s?s(u):n(void 0,u)}}}processSync(t){let n=!1,r;return this.freeze(),nw("processSync",this.parser||this.Parser),rw("processSync",this.compiler||this.Compiler),this.process(t,i),vN("processSync","process",n),r;function i(s,a){n=!0,uN(s),r=a}}run(t,n,r){bN(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,o){const l=Ep(n);i.run(t,l,c);function c(f,u,d){const h=u||t;f?o(f):a?a(h):r(void 0,h,d)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),vN("runSync","run",r),i;function s(a,o){uN(a),i=o,r=!0}}stringify(t,n){this.freeze();const r=Ep(n),i=this.compiler||this.Compiler;return rw("stringify",i),bN(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(iw("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...u]=c;l(f,u)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(c.plugins),c.settings&&(i.settings=W0(!0,i.settings,c.settings))}function o(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const u=c[f];s(u)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,f){let u=-1,d=-1;for(;++u<r.length;)if(r[u][0]===c){d=u;break}if(d===-1)r.push([c,...f]);else if(f.length>0){let[h,...p]=f;const b=r[d][1];d1(b)&&d1(h)&&(h=W0(!0,b,h)),r[d]=[c,h,...p]}}}}const j_e=new AT().freeze();function nw(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function rw(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function iw(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function bN(e){if(!d1(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function vN(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ep(e){return F_e(e)?e:new QH(e)}function F_e(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function P_e(e){return typeof e=="string"||U_e(e)}function U_e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const B_e="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",SN=[],wN={allowDangerousHtml:!0},H_e=/^(https?|ircs?|mailto|xmpp)$/i,q_e=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function XH(e){const t=V_e(e),n=K_e(e);return G_e(t.runSync(t.parse(n),n),e)}function V_e(e){const t=e.rehypePlugins||SN,n=e.remarkPlugins||SN,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...wN}:wN;return j_e().use(Txe).use(n).use(w_e,r).use(t)}function K_e(e){const t=e.children||"",n=new QH;return typeof t=="string"&&(n.value=t),n}function G_e(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,a=t.skipHtml,o=t.unwrapDisallowed,l=t.urlTransform||Y_e;for(const f of q_e)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+B_e+f.id,void 0);return TT(e,c),u0e(e,{Fragment:w.Fragment,components:i,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.jsxs,passKeys:!0,passNode:!0});function c(f,u,d){if(f.type==="raw"&&d&&typeof u=="number")return a?d.children.splice(u,1):d.children[u]={type:"text",value:f.value},u;if(f.type==="element"){let h;for(h in J0)if(Object.hasOwn(J0,h)&&Object.hasOwn(f.properties,h)){const p=f.properties[h],b=J0[h];(b===null||b.includes(f.tagName))&&(f.properties[h]=l(String(p||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):s?s.includes(f.tagName):!1;if(!h&&r&&typeof u=="number"&&(h=!r(f,u,d)),h&&d&&typeof u=="number")return o&&f.children?d.children.splice(u,1,...f.children):d.children.splice(u,1),u}}}function Y_e(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||H_e.test(e.slice(0,t))?e:""}function xN(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function J_e(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Q_e(e,t,n){const i=oS((n||{}).ignore||[]),s=X_e(t);let a=-1;for(;++a<s.length;)YH(e,"text",o);function o(c,f){let u=-1,d;for(;++u<f.length;){const h=f[u],p=d?d.children:void 0;if(i(h,p?p.indexOf(h):void 0,d))return;d=h}if(d)return l(c,f)}function l(c,f){const u=f[f.length-1],d=s[a][0],h=s[a][1];let p=0;const S=u.children.indexOf(c);let m=!1,y=[];d.lastIndex=0;let v=d.exec(c.value);for(;v;){const _=v.index,C={index:v.index,input:v.input,stack:[...f,c]};let k=h(...v,C);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1?d.lastIndex=_+1:(p!==_&&y.push({type:"text",value:c.value.slice(p,_)}),Array.isArray(k)?y.push(...k):k&&y.push(k),p=_+v[0].length,m=!0),!d.global)break;v=d.exec(c.value)}return m?(p<c.value.length&&y.push({type:"text",value:c.value.slice(p)}),u.children.splice(S,1,...y)):y=[c],S+y.length}}function X_e(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([W_e(i[0]),Z_e(i[1])])}return t}function W_e(e){return typeof e=="string"?new RegExp(J_e(e),"g"):e}function Z_e(e){return typeof e=="function"?e:function(){return e}}const sw="phrasing",aw=["autolink","link","image","label"];function e1e(){return{transforms:[o1e],enter:{literalAutolink:n1e,literalAutolinkEmail:ow,literalAutolinkHttp:ow,literalAutolinkWww:ow},exit:{literalAutolink:a1e,literalAutolinkEmail:s1e,literalAutolinkHttp:r1e,literalAutolinkWww:i1e}}}function t1e(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:sw,notInConstruct:aw},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:sw,notInConstruct:aw},{character:":",before:"[ps]",after:"\\/",inConstruct:sw,notInConstruct:aw}]}}function n1e(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ow(e){this.config.enter.autolinkProtocol.call(this,e)}function r1e(e){this.config.exit.autolinkProtocol.call(this,e)}function i1e(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function s1e(e){this.config.exit.autolinkEmail.call(this,e)}function a1e(e){this.exit(e)}function o1e(e){Q_e(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,l1e],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),c1e]],{ignore:["link","linkReference"]})}function l1e(e,t,n,r,i){let s="";if(!WH(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!u1e(n)))return!1;const a=f1e(n+r);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function c1e(e,t,n,r){return!WH(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function u1e(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function f1e(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=xN(e,"(");let s=xN(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function WH(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ml(n)||iS(n))&&(!t||n!==47)}ZH.peek=S1e;function d1e(){this.buffer()}function h1e(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function m1e(){this.buffer()}function p1e(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function g1e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Si(this.sliceSerialize(e)).toLowerCase(),n.label=t}function y1e(e){this.exit(e)}function b1e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Si(this.sliceSerialize(e)).toLowerCase(),n.label=t}function v1e(e){this.exit(e)}function S1e(){return"["}function ZH(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function w1e(){return{enter:{gfmFootnoteCallString:d1e,gfmFootnoteCall:h1e,gfmFootnoteDefinitionLabelString:m1e,gfmFootnoteDefinition:p1e},exit:{gfmFootnoteCallString:g1e,gfmFootnoteCall:y1e,gfmFootnoteDefinitionLabelString:b1e,gfmFootnoteDefinition:v1e}}}function x1e(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ZH},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const o=s.createTracker(a);let l=o.move("[^");const c=s.enter("footnoteDefinition"),f=s.enter("label");return l+=o.move(s.safe(s.associationId(r),{before:l,after:"]"})),f(),l+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),l+=o.move((t?`
|
|
248
|
+
`:" ")+s.indentLines(s.containerFlow(r,o.current()),t?e8:_1e))),c(),l}}function _1e(e,t,n){return t===0?e:e8(e,t,n)}function e8(e,t,n){return(n?"":" ")+e}const k1e=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];t8.peek=O1e;function E1e(){return{canContainEols:["delete"],enter:{strikethrough:T1e},exit:{strikethrough:A1e}}}function C1e(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:k1e}],handlers:{delete:t8}}}function T1e(e){this.enter({type:"delete",children:[]},e)}function A1e(e){this.exit(e)}function t8(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function O1e(){return"~"}function R1e(e){return e.length}function M1e(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||R1e,s=[],a=[],o=[],l=[];let c=0,f=-1;for(;++f<e.length;){const b=[],S=[];let m=-1;for(e[f].length>c&&(c=e[f].length);++m<e[f].length;){const y=N1e(e[f][m]);if(n.alignDelimiters!==!1){const v=i(y);S[m]=v,(l[m]===void 0||v>l[m])&&(l[m]=v)}b.push(y)}a[f]=b,o[f]=S}let u=-1;if(typeof r=="object"&&"length"in r)for(;++u<c;)s[u]=_N(r[u]);else{const b=_N(r);for(;++u<c;)s[u]=b}u=-1;const d=[],h=[];for(;++u<c;){const b=s[u];let S="",m="";b===99?(S=":",m=":"):b===108?S=":":b===114&&(m=":");let y=n.alignDelimiters===!1?1:Math.max(1,l[u]-S.length-m.length);const v=S+"-".repeat(y)+m;n.alignDelimiters!==!1&&(y=S.length+y+m.length,y>l[u]&&(l[u]=y),h[u]=y),d[u]=v}a.splice(1,0,d),o.splice(1,0,h),f=-1;const p=[];for(;++f<a.length;){const b=a[f],S=o[f];u=-1;const m=[];for(;++u<c;){const y=b[u]||"";let v="",_="";if(n.alignDelimiters!==!1){const C=l[u]-(S[u]||0),k=s[u];k===114?v=" ".repeat(C):k===99?C%2?(v=" ".repeat(C/2+.5),_=" ".repeat(C/2-.5)):(v=" ".repeat(C/2),_=v):_=" ".repeat(C)}n.delimiterStart!==!1&&!u&&m.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&y==="")&&(n.delimiterStart!==!1||u)&&m.push(" "),n.alignDelimiters!==!1&&m.push(v),m.push(y),n.alignDelimiters!==!1&&m.push(_),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||u!==c-1)&&m.push("|")}p.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return p.join(`
|
|
249
|
+
`)}function N1e(e){return e==null?"":String(e)}function _N(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function D1e(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),z1e);return i(),a}function z1e(e,t,n){return">"+(n?"":" ")+e}function I1e(e,t){return kN(e,t.inConstruct,!0)&&!kN(e,t.notInConstruct,!1)}function kN(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function EN(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
250
|
+
`&&I1e(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
251
|
+
`}function $1e(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function L1e(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function j1e(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function F1e(e,t,n,r){const i=j1e(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(L1e(e,n)){const u=n.enter("codeIndented"),d=n.indentLines(s,P1e);return u(),d}const o=n.createTracker(r),l=i.repeat(Math.max($1e(s,i)+1,3)),c=n.enter("codeFenced");let f=o.move(l);if(e.lang){const u=n.enter(`codeFencedLang${a}`);f+=o.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...o.current()})),u()}if(e.lang&&e.meta){const u=n.enter(`codeFencedMeta${a}`);f+=o.move(" "),f+=o.move(n.safe(e.meta,{before:f,after:`
|
|
252
|
+
`,encode:["`"],...o.current()})),u()}return f+=o.move(`
|
|
253
|
+
`),s&&(f+=o.move(s+`
|
|
254
|
+
`)),f+=o.move(l),c(),f}function P1e(e,t,n){return(n?"":" ")+e}function OT(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function U1e(e,t,n,r){const i=OT(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
255
|
+
`,...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),o()),a(),c}function B1e(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ih(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ob(e,t,n){const r=Fu(e),i=Fu(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}n8.peek=H1e;function n8(e,t,n,r){const i=B1e(n),s=n.enter("emphasis"),a=n.createTracker(r),o=a.move(i);let l=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const c=l.charCodeAt(0),f=ob(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(l=Ih(c)+l.slice(1));const u=l.charCodeAt(l.length-1),d=ob(r.after.charCodeAt(0),u,i);d.inside&&(l=l.slice(0,-1)+Ih(u));const h=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},o+l+h}function H1e(e,t,n){return n.options.emphasis||"*"}function q1e(e,t){let n=!1;return TT(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,u1}),!!((!e.depth||e.depth<3)&&ST(e)&&(t.options.setext||n))}function V1e(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(q1e(e,n)){const f=n.enter("headingSetext"),u=n.enter("phrasing"),d=n.containerPhrasing(e,{...s.current(),before:`
|
|
256
|
+
`,after:`
|
|
257
|
+
`});return u(),f(),d+`
|
|
258
|
+
`+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
|
|
259
|
+
`))+1))}const a="#".repeat(i),o=n.enter("headingAtx"),l=n.enter("phrasing");s.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
260
|
+
`,...s.current()});return/^[\t ]/.test(c)&&(c=Ih(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),o(),c}r8.peek=K1e;function r8(e){return e.value||""}function K1e(){return"<"}i8.peek=G1e;function i8(e,t,n,r){const i=OT(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),o()),c+=l.move(")"),a(),c}function G1e(){return"!"}s8.peek=Y1e;function s8(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("![");const c=n.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const u=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=f,s(),i==="full"||!c||c!==u?l+=o.move(u+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function Y1e(){return"!"}a8.peek=J1e;function a8(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const a=n.unsafe[s],o=n.compilePattern(a);let l;if(a.atBreak)for(;l=o.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function J1e(){return"`"}function o8(e,t){const n=ST(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}l8.peek=Q1e;function l8(e,t,n,r){const i=OT(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let o,l;if(o8(e,n)){const f=n.stack;n.stack=[],o=n.enter("autolink");let u=a.move("<");return u+=a.move(n.containerPhrasing(e,{before:u,after:">",...a.current()})),u+=a.move(">"),o(),n.stack=f,u}o=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${s}`),c+=a.move(" "+i),c+=a.move(n.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),o(),c}function Q1e(e,t,n){return o8(e,n)?"<":"["}c8.peek=X1e;function c8(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const u=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=f,s(),i==="full"||!c||c!==u?l+=o.move(u+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function X1e(){return"["}function RT(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function W1e(e){const t=RT(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Z1e(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function u8(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function eke(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?Z1e(n):RT(n);const o=e.ordered?a==="."?")":".":W1e(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),u8(n)===a&&f){let u=-1;for(;++u<e.children.length;){const d=e.children[u];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=o),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),c}function tke(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function nke(e,t,n,r){const i=tke(n);let s=n.bulletCurrent||RT(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(r);o.move(s+" ".repeat(a-s.length)),o.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,o.current()),f);return l(),c;function f(u,d,h){return d?(h?"":" ".repeat(a))+u:(h?s:s+" ".repeat(a-s.length))+u}}function rke(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const ike=oS(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ske(e,t,n,r){return(e.children.some(function(a){return ike(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ake(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}f8.peek=oke;function f8(e,t,n,r){const i=ake(n),s=n.enter("strong"),a=n.createTracker(r),o=a.move(i+i);let l=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const c=l.charCodeAt(0),f=ob(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(l=Ih(c)+l.slice(1));const u=l.charCodeAt(l.length-1),d=ob(r.after.charCodeAt(0),u,i);d.inside&&(l=l.slice(0,-1)+Ih(u));const h=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},o+l+h}function oke(e,t,n){return n.options.strong||"*"}function lke(e,t,n,r){return n.safe(e.value,r)}function cke(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function uke(e,t,n){const r=(u8(n)+(n.options.ruleSpaces?" ":"")).repeat(cke(n));return n.options.ruleSpaces?r.slice(0,-1):r}const d8={blockquote:D1e,break:EN,code:F1e,definition:U1e,emphasis:n8,hardBreak:EN,heading:V1e,html:r8,image:i8,imageReference:s8,inlineCode:a8,link:l8,linkReference:c8,list:eke,listItem:nke,paragraph:rke,root:ske,strong:f8,text:lke,thematicBreak:uke};function fke(){return{enter:{table:dke,tableData:CN,tableHeader:CN,tableRow:mke},exit:{codeText:pke,table:hke,tableData:lw,tableHeader:lw,tableRow:lw}}}function dke(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function hke(e){this.exit(e),this.data.inTable=void 0}function mke(e){this.enter({type:"tableRow",children:[]},e)}function lw(e){this.exit(e)}function CN(e){this.enter({type:"tableCell",children:[]},e)}function pke(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,gke));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function gke(e,t){return t==="|"?t:e}function yke(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
261
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:a,tableCell:l,tableRow:o}};function a(h,p,b,S){return c(f(h,b,S),h.align)}function o(h,p,b,S){const m=u(h,b,S),y=c([m]);return y.slice(0,y.indexOf(`
|
|
262
|
+
`))}function l(h,p,b,S){const m=b.enter("tableCell"),y=b.enter("phrasing"),v=b.containerPhrasing(h,{...S,before:s,after:s});return y(),m(),v}function c(h,p){return M1e(h,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function f(h,p,b){const S=h.children;let m=-1;const y=[],v=p.enter("table");for(;++m<S.length;)y[m]=u(S[m],p,b);return v(),y}function u(h,p,b){const S=h.children;let m=-1;const y=[],v=p.enter("tableRow");for(;++m<S.length;)y[m]=l(S[m],h,p,b);return v(),y}function d(h,p,b){let S=d8.inlineCode(h,p,b);return b.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function bke(){return{exit:{taskListCheckValueChecked:TN,taskListCheckValueUnchecked:TN,paragraph:Ske}}}function vke(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:wke}}}function TN(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Ske(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function wke(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(a);let l=d8.listItem(e,t,n,{...r,...o.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(f){return f+a}}function xke(){return[e1e(),w1e(),E1e(),fke(),bke()]}function _ke(e){return{extensions:[t1e(),x1e(e),C1e(),yke(e),vke()]}}const kke={tokenize:Rke,partial:!0},h8={tokenize:Mke,partial:!0},m8={tokenize:Nke,partial:!0},p8={tokenize:Dke,partial:!0},Eke={tokenize:zke,partial:!0},g8={name:"wwwAutolink",tokenize:Ake,previous:b8},y8={name:"protocolAutolink",tokenize:Oke,previous:v8},na={name:"emailAutolink",tokenize:Tke,previous:S8},os={};function Cke(){return{text:os}}let Do=48;for(;Do<123;)os[Do]=na,Do++,Do===58?Do=65:Do===91&&(Do=97);os[43]=na;os[45]=na;os[46]=na;os[95]=na;os[72]=[na,y8];os[104]=[na,y8];os[87]=[na,g8];os[119]=[na,g8];function Tke(e,t,n){const r=this;let i,s;return a;function a(u){return!m1(u)||!S8.call(r,r.previous)||MT(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(u))}function o(u){return m1(u)?(e.consume(u),o):u===64?(e.consume(u),l):n(u)}function l(u){return u===46?e.check(Eke,f,c)(u):u===45||u===95||Rn(u)?(s=!0,e.consume(u),l):f(u)}function c(u){return e.consume(u),i=!0,l}function f(u){return s&&i&&Pn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):n(u)}}function Ake(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!b8.call(r,r.previous)||MT(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(kke,e.attempt(h8,e.attempt(m8,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function Oke(e,t,n){const r=this;let i="",s=!1;return a;function a(u){return(u===72||u===104)&&v8.call(r,r.previous)&&!MT(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(u),e.consume(u),o):n(u)}function o(u){if(Pn(u)&&i.length<5)return i+=String.fromCodePoint(u),e.consume(u),o;if(u===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(u),l}return n(u)}function l(u){return u===47?(e.consume(u),s?c:(s=!0,l)):n(u)}function c(u){return u===null||ib(u)||ct(u)||Ml(u)||iS(u)?n(u):e.attempt(h8,e.attempt(m8,f),n)(u)}function f(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function Rke(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function Mke(e,t,n){let r,i,s;return a;function a(c){return c===46||c===95?e.check(p8,l,o)(c):c===null||ct(c)||Ml(c)||c!==45&&iS(c)?l(c):(s=!0,e.consume(c),a)}function o(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),a}function l(c){return i||r||!s?n(c):t(c)}}function Nke(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(p8,t,s)(a):a===null||ct(a)||Ml(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function Dke(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),s):o===93?(e.consume(o),i):o===60||o===null||ct(o)||Ml(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||ct(o)||Ml(o)?t(o):r(o)}function s(o){return Pn(o)?a(o):n(o)}function a(o){return o===59?(e.consume(o),r):Pn(o)?(e.consume(o),a):n(o)}}function zke(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return Rn(s)?n(s):t(s)}}function b8(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ct(e)}function v8(e){return!Pn(e)}function S8(e){return!(e===47||m1(e))}function m1(e){return e===43||e===45||e===46||e===95||Rn(e)}function MT(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Ike={tokenize:Hke,partial:!0};function $ke(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Pke,continuation:{tokenize:Uke},exit:Bke}},text:{91:{name:"gfmFootnoteCall",tokenize:Fke},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Lke,resolveTo:jke}}}}function Lke(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return n(l);const c=Si(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function jke(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function Fke(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(u){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),l}function l(u){return u!==94?n(u):(e.enter("gfmFootnoteCallMarker"),e.consume(u),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(u){if(s>999||u===93&&!a||u===null||u===91||ct(u))return n(u);if(u===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(Si(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(u)}return ct(u)||(a=!0),s++,e.consume(u),u===92?f:c}function f(u){return u===91||u===92||u===93?(e.consume(u),s++,c):c(u)}}function Pke(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(p)}function f(p){if(a>999||p===93&&!o||p===null||p===91||ct(p))return n(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return s=Si(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return ct(p)||(o=!0),a++,e.consume(p),p===92?u:f}function u(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}function d(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ue(e,h,"gfmFootnoteDefinitionWhitespace")):n(p)}function h(p){return t(p)}}function Uke(e,t,n){return e.check(Im,t,e.attempt(Ike,t,n))}function Bke(e){e.exit("gfmFootnoteDefinition")}function Hke(e,t,n){const r=this;return Ue(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function qke(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},u={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},d=[["enter",f,o],["enter",a[c][1],o],["exit",a[c][1],o],["enter",u,o]],h=o.parser.constructs.insideSpan.null;h&&Or(d,d.length,0,sS(h,a.slice(c+1,l),o)),Or(d,d.length,0,[["exit",u,o],["enter",a[l][1],o],["exit",a[l][1],o],["exit",f,o]]),Or(a,c-1,l-c+3,d),l=c+d.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function s(a,o,l){const c=this.previous,f=this.events;let u=0;return d;function d(p){return c===126&&f[f.length-1][1].type!=="characterEscape"?l(p):(a.enter("strikethroughSequenceTemporary"),h(p))}function h(p){const b=Fu(c);if(p===126)return u>1?l(p):(a.consume(p),u++,h);if(u<2&&!n)return l(p);const S=a.exit("strikethroughSequenceTemporary"),m=Fu(p);return S._open=!m||m===2&&!!b,S._close=!b||b===2&&!!m,o(p)}}}class Vke{constructor(){this.map=[]}add(t,n,r){Kke(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function Kke(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Gke(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Yke(){return{flow:{null:{name:"table",tokenize:Jke,resolveAll:Qke}}}}function Jke(e,t,n){const r=this;let i=0,s=0,a;return o;function o(M){let $=r.events.length-1;for(;$>-1;){const Y=r.events[$][1].type;if(Y==="lineEnding"||Y==="linePrefix")$--;else break}const L=$>-1?r.events[$][1].type:null,J=L==="tableHead"||L==="tableRow"?k:l;return J===k&&r.parser.lazy[r.now().line]?n(M):J(M)}function l(M){return e.enter("tableHead"),e.enter("tableRow"),c(M)}function c(M){return M===124||(a=!0,s+=1),f(M)}function f(M){return M===null?n(M):fe(M)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),h):n(M):ze(M)?Ue(e,f,"whitespace")(M):(s+=1,a&&(a=!1,i+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),a=!0,f):(e.enter("data"),u(M)))}function u(M){return M===null||M===124||ct(M)?(e.exit("data"),f(M)):(e.consume(M),M===92?d:u)}function d(M){return M===92||M===124?(e.consume(M),u):u(M)}function h(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(M):(e.enter("tableDelimiterRow"),a=!1,ze(M)?Ue(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):p(M))}function p(M){return M===45||M===58?S(M):M===124?(a=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),b):C(M)}function b(M){return ze(M)?Ue(e,S,"whitespace")(M):S(M)}function S(M){return M===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),m):M===45?(s+=1,m(M)):M===null||fe(M)?_(M):C(M)}function m(M){return M===45?(e.enter("tableDelimiterFiller"),y(M)):C(M)}function y(M){return M===45?(e.consume(M),y):M===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(M))}function v(M){return ze(M)?Ue(e,_,"whitespace")(M):_(M)}function _(M){return M===124?p(M):M===null||fe(M)?!a||i!==s?C(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):C(M)}function C(M){return n(M)}function k(M){return e.enter("tableRow"),A(M)}function A(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),A):M===null||fe(M)?(e.exit("tableRow"),t(M)):ze(M)?Ue(e,A,"whitespace")(M):(e.enter("data"),N(M))}function N(M){return M===null||M===124||ct(M)?(e.exit("data"),A(M)):(e.consume(M),M===92?D:N)}function D(M){return M===92||M===124?(e.consume(M),N):N(M)}}function Qke(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,c,f,u;const d=new Vke;for(;++n<e.length;){const h=e[n],p=h[1];h[0]==="enter"?p.type==="tableHead"?(o=!1,l!==0&&(AN(d,t,l,c,f),f=void 0,l=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(n,0,[["enter",c,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(r=!0,u=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,f={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(n,0,[["enter",f,t]])),i=p.type==="tableDelimiterRow"?2:f?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],u=Cp(d,t,s,i,void 0,u),s=[0,0,0,0]),a[2]=n)):p.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],u=Cp(d,t,s,i,void 0,u)),s=a,a=[s[1],n,0,0])):p.type==="tableHead"?(o=!0,l=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(l=n,s[1]!==0?(a[0]=a[1],u=Cp(d,t,s,i,n,u)):a[1]!==0&&(u=Cp(d,t,a,i,n,u)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&AN(d,t,l,c,f),d.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=Gke(t.events,n))}return e}function Cp(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},bc(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const l=bc(t.events,n[1]);if(s={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const c=bc(t.events,n[2]),f=bc(t.events,n[3]),u={type:o,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",u,t]]),r!==2){const d=t.events[n[2]],h=t.events[n[3]];if(d[1].end=Object.assign({},h[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,b=n[3]-n[2]-1;e.add(p,b,[])}}e.add(n[3]+1,0,[["exit",u,t]])}return i!==void 0&&(s.end=Object.assign({},bc(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function AN(e,t,n,r,i){const s=[],a=bc(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function bc(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Xke={name:"tasklistCheck",tokenize:Zke};function Wke(){return{text:{91:Xke}}}function Zke(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return ct(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(l)}function o(l){return fe(l)?t(l):ze(l)?e.check({tokenize:eEe},t,n)(l):n(l)}}function eEe(e,t,n){return Ue(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function tEe(e){return OH([Cke(),$ke(),qke(e),Yke(),Wke()])}const nEe={};function w8(e){const t=this,n=e||nEe,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(tEe(n)),s.push(xke()),a.push(_ke(n))}function rEe(e){const[t,n]=x.useState(!1),[r,i]=x.useState(!1),s=()=>localStorage.getItem(e)==="true",a=x.useCallback(()=>s()?!1:(n(!0),!0),[e]),o=x.useCallback(()=>{r&&localStorage.setItem(e,"true"),n(!1)},[r,e]);return{cancel:x.useCallback(()=>{n(!1)},[]),dismiss:o,dontRemind:r,isDismissed:s,setDontRemind:i,show:a,visible:t}}const iEe={grantedDismissed:"codecommit-granted-dismissed"},sEe=cT("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function hr({asChild:e=!1,className:t,variant:n="default",...r}){const i=e?QB:"span";return w.jsx(i,{"data-slot":"badge","data-variant":n,className:Ve(sEe({variant:n}),t),...r})}function ON({className:e,...t}){return w.jsx("div",{"data-slot":"card",className:Ve("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function aEe({className:e,...t}){return w.jsx("div",{"data-slot":"card-header",className:Ve("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function oEe({className:e,...t}){return w.jsx("div",{"data-slot":"card-title",className:Ve("leading-none font-semibold",e),...t})}function RN({className:e,...t}){return w.jsx("div",{"data-slot":"card-content",className:Ve("px-6",e),...t})}const x8=e=>e==="green"?"text-green-600 dark:text-green-400":e==="yellow"?"text-yellow-600 dark:text-yellow-400":"text-red-600 dark:text-red-400",lEe=e=>e==="green"?"border-green-500/30":e==="yellow"?"border-yellow-500/30":"border-red-500/30",cEe=e=>e==="positive"?"outline":e==="neutral"?"secondary":"destructive",uEe=e=>e==="positive"?"border-green-500/30 text-green-600 dark:text-green-400":"",fEe=e=>{const t=new Date(e),n=t.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),r=Date.now()-t.getTime(),i=Math.floor(r/6e4);if(i<1)return`${n} · just now`;if(i<60)return`${n} · ${i}m ago`;const s=Math.floor(i/60);if(s<24)return`${n} · ${s}h ago`;const a=Math.floor(s/24);return`${n} · ${a}d ago`},MN=e=>e.comments.length===0?0:Math.min(...e.comments.map(t=>new Date(t.root.creationDate).getTime())),_8=e=>1+e.replies.reduce((t,n)=>t+_8(n),0);function dEe({score:e}){if(!e)return null;const t=dT(e.total);return w.jsx(hr,{variant:"outline",className:`${lEe(t)} ${x8(t)} tabular-nums font-semibold`,children:e.total.toFixed(1)})}function hEe({score:e}){if(!e)return w.jsx("p",{className:"text-xs text-muted-foreground pt-2",children:"Waiting for comment count..."});const t=dT(e.total);return w.jsxs("div",{className:"space-y-3 pt-2",children:[w.jsxs("div",{className:"flex items-baseline gap-2",children:[w.jsx("span",{className:`text-lg font-bold tabular-nums ${x8(t)}`,children:e.total.toFixed(1)}),w.jsx("span",{className:"text-xs text-muted-foreground",children:"/ 10"}),w.jsx("div",{className:"ml-2 h-1.5 flex-1 overflow-hidden rounded-full bg-muted",children:w.jsx("div",{className:`h-full rounded-full ${t==="green"?"bg-green-500":t==="yellow"?"bg-yellow-500":"bg-red-500"}`,style:{width:`${e.total*10}%`}})})]}),w.jsx("div",{className:"space-y-2",children:e.categories.map(n=>w.jsxs("div",{className:"flex items-start gap-3 rounded border px-3 py-2",children:[w.jsx("span",{className:`w-8 text-right text-xs font-semibold tabular-nums ${n.value>0?"text-green-600 dark:text-green-400":n.value<0?"text-red-600 dark:text-red-400":"text-muted-foreground"}`,children:n.value>0?`+${n.value}`:n.value}),w.jsxs("div",{className:"flex-1 min-w-0",children:[w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx("span",{className:"text-xs font-medium",children:n.label}),w.jsx(hr,{variant:cEe(n.status),className:`text-[10px] px-1.5 py-0 ${uEe(n.status)}`,children:n.statusLabel})]}),w.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:n.description})]})]},n.label))})]})}function k8({thread:e,depth:t}){return e.root.deleted?null:w.jsxs("div",{className:t>0?"ml-4 border-l-2 border-muted pl-3":"",children:[w.jsxs("div",{className:"space-y-1 py-2",children:[w.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[w.jsx("span",{className:"font-medium",children:e.root.author}),w.jsx("span",{children:"·"}),w.jsx("span",{children:fEe(e.root.creationDate)})]}),w.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none break-words [&_a]:text-primary [&_img]:inline [&_img]:h-5 [&_img]:w-auto",children:w.jsx(XH,{remarkPlugins:[w8],children:e.root.content})})]}),e.replies.map(n=>w.jsx(k8,{thread:n,depth:t+1},n.root.id))]})}function mEe({pr:e}){const t=Sr(H2),n=Zr(H2),r=x.useRef(null);return x.useEffect(()=>{r.current!==e.id&&(r.current=e.id,t({payload:{pullRequestId:e.id,repositoryName:e.repositoryName,account:{id:e.account.id,region:e.account.region}}}))},[e.id,e.repositoryName,e.account.id,e.account.region,t]),rue(n).onInitialOrWaiting(()=>w.jsx("div",{className:"pt-2",children:w.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading comments..."})})).onError(()=>w.jsx("div",{className:"pt-2",children:w.jsx("p",{className:"text-xs text-destructive",children:"Failed to load comments"})})).onDefect(()=>w.jsx("div",{className:"pt-2",children:w.jsx("p",{className:"text-xs text-destructive",children:"Failed to load comments"})})).onSuccess(i=>{const s=i.reduce((a,o)=>a+o.comments.reduce((l,c)=>l+_8(c),0),0);return w.jsxs("div",{className:"pt-2",children:[i.length===0&&w.jsx("p",{className:"text-xs text-muted-foreground",children:"No comments"}),s>0&&w.jsx("div",{className:"space-y-1",children:[...i].sort((a,o)=>MN(o)-MN(a)).map((a,o)=>w.jsxs("div",{children:[a.filePath&&w.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:a.filePath}),a.comments.map(l=>w.jsx(k8,{thread:l,depth:0},l.root.id)),o<i.length-1&&w.jsx(fT,{className:"my-2"})]},o))})]})}).render()}function NN({title:e,count:t,children:n}){const[r,i]=x.useState(!1);return w.jsxs("div",{className:"rounded-lg border bg-card",children:[w.jsxs("button",{className:"flex w-full items-center gap-2 px-4 py-2.5 text-left text-sm font-medium hover:bg-accent/50",onClick:()=>i(!r),children:[w.jsx(BC,{className:`size-4 text-muted-foreground transition-transform ${r?"":"-rotate-90"}`}),e,t!==void 0&&w.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",t,")"]})]}),r&&w.jsx("div",{className:"border-t px-4 pb-3",children:n})]})}function pEe(){const e=Zr(qB),t=Zr(Rm),n=x.useMemo(()=>e?t.pullRequests.find(d=>d.id===e)??null:null,[e,t.pullRequests]),r=x.useMemo(()=>n?Ur(rb(n,new Date)):void 0,[n]),i=Sr(Vv),s=Sr(Che),a=rEe(iEe.grantedDismissed),o=x.useCallback(()=>{n&&s({payload:{profile:n.account.id,link:n.link}})},[s,n]),l=x.useCallback(()=>{n&&(a.show()||o())},[a,n,o]),c=()=>{a.dismiss(),o()};if(x.useEffect(()=>{const d=h=>{h.key==="Escape"?(h.preventDefault(),i("prs")):(h.key==="Enter"||h.key==="o")&&(n!=null&&n.link)&&l()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[l,n,i]),!n)return w.jsx("div",{className:"flex items-center justify-center py-20 text-muted-foreground",children:w.jsx("p",{className:"text-sm",children:"No PR selected"})});const f=n.isMergeable?w.jsx(hr,{variant:"outline",className:"border-green-500/30 text-green-600 dark:text-green-400",children:"Mergeable"}):w.jsx(hr,{variant:"destructive",children:"Conflict"}),u=n.isApproved?w.jsx(hr,{variant:"outline",className:"border-green-500/30 text-green-600 dark:text-green-400",children:"Approved"}):w.jsx(hr,{variant:"secondary",children:"Pending"});return w.jsxs("div",{className:"space-y-6",children:[w.jsxs("div",{className:"flex items-center gap-4",children:[w.jsxs(Go,{variant:"ghost",size:"sm",onClick:()=>i("prs"),children:[w.jsx(Lhe,{className:"size-4"}),"Back"]}),w.jsx("div",{className:"ml-auto",children:w.jsxs(Go,{size:"sm",onClick:l,children:[w.jsx(Khe,{className:"size-4"}),"Open in Console"]})})]}),w.jsxs("div",{children:[w.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:n.title}),w.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[f,u,w.jsx(hr,{variant:"outline",children:n.status}),w.jsx(dEe,{score:r}),w.jsxs("span",{className:"text-sm text-muted-foreground",children:[n.author," · ",uT(n.creationDate)]})]})]}),w.jsx(fT,{}),w.jsx(ON,{children:w.jsxs(RN,{className:"grid grid-cols-[auto_1fr] gap-x-6 gap-y-2 py-4 text-sm",children:[w.jsx("span",{className:"text-muted-foreground",children:"Repository"}),w.jsx("span",{className:"font-mono text-xs",children:n.repositoryName}),w.jsx("span",{className:"text-muted-foreground",children:"Branch"}),w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(hr,{variant:"outline",className:"font-mono text-xs",children:n.sourceBranch}),w.jsx(Fhe,{className:"size-3 text-muted-foreground"}),w.jsx(hr,{variant:"outline",className:"font-mono text-xs",children:n.destinationBranch})]}),w.jsx("span",{className:"text-muted-foreground",children:"ID"}),w.jsx("span",{className:"font-mono text-xs",children:n.id})]})}),w.jsx(NN,{title:"Health Score Breakdown",children:w.jsx(hEe,{score:r})}),n.description&&w.jsxs(ON,{children:[w.jsx(aEe,{children:w.jsx(oEe,{className:"text-sm",children:"Description"})}),w.jsx(RN,{children:w.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:w.jsx(XH,{remarkPlugins:[w8],children:n.description})})})]}),w.jsx(NN,{title:"Comments",...n.commentCount!==void 0?{count:n.commentCount}:{},children:w.jsx(mEe,{pr:n},n.id)}),w.jsx(lH,{open:a.visible,onOpenChange:a.cancel,children:w.jsxs(cH,{children:[w.jsxs(uH,{children:[w.jsx(fH,{children:"Granted CLI Required"}),w.jsxs(dH,{children:['"Open in Console" uses'," ",w.jsx("a",{href:"https://docs.commonfate.io/granted/introduction",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Granted"})," ","to assume the AWS role for this account. Make sure the"," ",w.jsx("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-xs",children:"assume"})," CLI is installed and configured before continuing."]})]}),w.jsxs(Lve,{children:[w.jsxs("label",{className:"flex items-center gap-2 text-sm text-muted-foreground mr-auto",children:[w.jsx("input",{type:"checkbox",checked:a.dontRemind,onChange:d=>a.setDontRemind(d.target.checked),className:"accent-primary"}),"Don't remind again"]}),w.jsx(Go,{variant:"ghost",onClick:a.cancel,children:"Cancel"}),w.jsx(Go,{onClick:c,children:"Continue"})]})]})})]})}function gEe({onClick:e,pr:t}){const n=x.useMemo(()=>Ur(rb(t,new Date)),[t]),r=n?dT(n.total):void 0,i=r==="green"?"text-green-600 dark:text-green-400":r==="yellow"?"text-yellow-600 dark:text-yellow-400":"text-red-600 dark:text-red-400",s=t.isMergeable?t.isApproved?w.jsx(hr,{variant:"outline",className:"border-green-500/30 text-green-600 dark:text-green-400",children:"Approved"}):w.jsx(hr,{variant:"secondary",children:"Pending"}):w.jsx(hr,{variant:"destructive",children:"Conflict"});return w.jsxs("div",{className:"group flex cursor-pointer flex-col gap-1.5 px-4 py-3 transition-colors hover:bg-accent/50",onClick:e,children:[w.jsxs("div",{className:"flex items-center gap-2",children:[s,n&&w.jsx("span",{className:`text-xs font-semibold tabular-nums ${i}`,children:n.total.toFixed(1)}),w.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.author," · ",uT(t.creationDate)]}),t.commentCount!==void 0&&t.commentCount>0&&w.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[w.jsx(Whe,{className:"size-3"}),t.commentCount]})]}),w.jsxs("div",{className:"flex items-baseline gap-1.5",children:[w.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:t.repositoryName}),w.jsx("span",{className:"text-muted-foreground/50",children:"›"}),w.jsx("span",{className:"text-sm font-medium",children:t.title})]}),t.description&&w.jsx("p",{className:"line-clamp-2 text-xs text-muted-foreground",children:t.description.split(`
|
|
263
|
+
`).slice(0,2).join(" ")})]})}function yEe(){const e=Zr(Rm),t=Zr(U_),n=Zr(Gy),r=Sr(qB),i=Sr(Vv),s=e.status==="loading",a=e.pullRequests,o=e.currentUser,l=x.useMemo(()=>{var v;if(a.length===0)return[];const u=t.toLowerCase(),d=_=>{var C;return t?_.repositoryName.toLowerCase().includes(u)||_.title.toLowerCase().includes(u)||_.author.toLowerCase().includes(u)||_.sourceBranch.toLowerCase().includes(u)||(((C=_.description)==null?void 0:C.toLowerCase().includes(u))??!1):!0},h=new Date,p=_=>{var C;if(n.type==="all")return!0;if(n.type==="hot")return BL(rb(_,h),k=>k.total>=7);if(n.type==="mine")return o&&_.author!==o?!1:n1(_.title)===n.value;if(n.type==="account")return((C=_.account)==null?void 0:C.id)===n.value;if(n.type==="author")return _.author===n.value;if(n.type==="scope")return n1(_.title)===n.value;if(n.type==="repo")return _.repositoryName===n.value;if(n.type==="status")switch(n.value){case"approved":return _.isApproved;case"pending":return!_.isApproved;case"mergeable":return _.isMergeable;case"conflicts":return!_.isMergeable;default:return!0}return!0},b=_=>d(_)&&p(_),S=new Map;for(const _ of a){const C=((v=_.account)==null?void 0:v.id)??"unknown";S.has(C)||S.set(C,[]),S.get(C).push(_)}const m=_=>{if(n.type!=="hot")return _;const C=new Map(_.map(k=>[k.id,lt(rb(k,h).pipe(Bn(A=>A.total)),()=>-1)]));return[..._].sort((k,A)=>(C.get(A.id)??-1)-(C.get(k.id)??-1))},y=[];for(const[_,C]of S){const k=C.filter(b);k.length>0&&y.push([_,m(k)])}return y},[a,o,t,n]),c=u=>{r(u.id),i("details")},f=a.filter(u=>u.commentCount!==void 0).length;return l.length===0?s?w.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-20 text-muted-foreground",children:[w.jsx(G2,{className:"size-8 animate-spin opacity-40"}),w.jsx("p",{className:"text-sm font-medium",children:"Loading pull requests..."}),e.statusDetail&&w.jsx("p",{className:"font-mono text-xs opacity-60",children:e.statusDetail}),a.length>0&&w.jsxs("p",{className:"text-xs opacity-50",children:[a.length," PRs fetched (filter hides all)"]})]}):w.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-20 text-muted-foreground",children:[w.jsxs("svg",{className:"size-16 opacity-30",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w.jsx("rect",{x:"8",y:"12",width:"48",height:"40",rx:"4",stroke:"currentColor",strokeWidth:"2"}),w.jsx("path",{d:"M8 24h48",stroke:"currentColor",strokeWidth:"2"}),w.jsx("circle",{cx:"16",cy:"18",r:"2",fill:"currentColor"}),w.jsx("circle",{cx:"22",cy:"18",r:"2",fill:"currentColor"}),w.jsx("circle",{cx:"28",cy:"18",r:"2",fill:"currentColor"}),w.jsx("path",{d:"M24 36h16M28 42h8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),w.jsx("p",{className:"text-sm",children:"No pull requests found"}),a.length>0&&w.jsxs("p",{className:"text-xs opacity-50",children:[a.length," PRs loaded — try a different filter"]})]}):w.jsxs("div",{className:"space-y-6",children:[(s||f<a.length&&a.length>0)&&w.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[w.jsx(G2,{className:"size-3 animate-spin"}),s?w.jsxs("span",{children:["Loading... ",e.statusDetail&&w.jsx("span",{className:"font-mono opacity-60",children:e.statusDetail})]}):w.jsxs("span",{children:["Enriching details (",f,"/",a.length,")"]})]}),l.map(([u,d])=>w.jsxs("section",{children:[w.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[w.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:u}),w.jsx(hr,{variant:"secondary",children:d.length})]}),w.jsx("div",{className:"divide-y rounded-lg border bg-card",children:d.map(h=>w.jsx(gEe,{pr:h,onClick:()=>c(h)},h.id))})]},u))]})}function bEe(){const e=Zr(Vv),t=Sr(Rm);return Rhe(n=>t(n)),w.jsxs("div",{className:"flex min-h-screen flex-col bg-background",children:[w.jsx(uSe,{}),e==="prs"&&w.jsx(sSe,{}),w.jsxs("main",{className:"mx-auto w-full max-w-5xl flex-1 px-4 py-6",children:[e==="prs"&&w.jsx(yEe,{}),e==="details"&&w.jsx(pEe,{})]}),w.jsx(Vve,{})]})}function vEe(){return w.jsx(oSe,{children:w.jsx(bEe,{})})}const DN=document.getElementById("root");DN&&OV.createRoot(DN).render(w.jsx(Pt.StrictMode,{children:w.jsx(vEe,{})}));
|