@knpkv/codecommit-web 0.16.0 → 0.17.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.
Files changed (79) hide show
  1. package/README.md +13 -0
  2. package/dist/client/assets/index-BQbzvlT7.js +90 -0
  3. package/dist/client/assets/index-Rg2HVfx7.css +1 -0
  4. package/dist/client/assets/pr-review-workspace-B7GX-PRi.js +23 -0
  5. package/dist/client/index.html +2 -2
  6. package/dist/pull-request-coordinates.d.ts.map +1 -1
  7. package/dist/pull-request-coordinates.js +5 -4
  8. package/dist/pull-request-coordinates.js.map +1 -1
  9. package/dist/server/Api.d.ts +243 -243
  10. package/dist/server/Api.d.ts.map +1 -1
  11. package/dist/server/Api.js +1 -1
  12. package/dist/server/Api.js.map +1 -1
  13. package/dist/server/Server.d.ts +3 -3
  14. package/dist/server/Server.d.ts.map +1 -1
  15. package/dist/server/Server.js +13 -11
  16. package/dist/server/Server.js.map +1 -1
  17. package/dist/server/handlers/accounts-live.d.ts +1 -1
  18. package/dist/server/handlers/accounts-live.d.ts.map +1 -1
  19. package/dist/server/handlers/accounts-live.js +1 -1
  20. package/dist/server/handlers/accounts-live.js.map +1 -1
  21. package/dist/server/handlers/audit-live.d.ts +1 -1
  22. package/dist/server/handlers/audit-live.d.ts.map +1 -1
  23. package/dist/server/handlers/audit-live.js +1 -1
  24. package/dist/server/handlers/audit-live.js.map +1 -1
  25. package/dist/server/handlers/config-live.d.ts +1 -1
  26. package/dist/server/handlers/config-live.d.ts.map +1 -1
  27. package/dist/server/handlers/config-live.js +2 -2
  28. package/dist/server/handlers/config-live.js.map +1 -1
  29. package/dist/server/handlers/events-live.d.ts +1 -1
  30. package/dist/server/handlers/events-live.d.ts.map +1 -1
  31. package/dist/server/handlers/events-live.js +26 -8
  32. package/dist/server/handlers/events-live.js.map +1 -1
  33. package/dist/server/handlers/notifications-live.d.ts +2 -2
  34. package/dist/server/handlers/notifications-live.d.ts.map +1 -1
  35. package/dist/server/handlers/notifications-live.js +2 -2
  36. package/dist/server/handlers/notifications-live.js.map +1 -1
  37. package/dist/server/handlers/permissions-live.d.ts +1 -1
  38. package/dist/server/handlers/permissions-live.d.ts.map +1 -1
  39. package/dist/server/handlers/permissions-live.js +1 -1
  40. package/dist/server/handlers/permissions-live.js.map +1 -1
  41. package/dist/server/handlers/prs-live.d.ts +3 -3
  42. package/dist/server/handlers/prs-live.d.ts.map +1 -1
  43. package/dist/server/handlers/prs-live.js +3 -3
  44. package/dist/server/handlers/prs-live.js.map +1 -1
  45. package/dist/server/handlers/sandbox-live.d.ts +1 -1
  46. package/dist/server/handlers/sandbox-live.d.ts.map +1 -1
  47. package/dist/server/handlers/sandbox-live.js +2 -2
  48. package/dist/server/handlers/sandbox-live.js.map +1 -1
  49. package/dist/server/handlers/stats-live.d.ts +1 -1
  50. package/dist/server/handlers/stats-live.d.ts.map +1 -1
  51. package/dist/server/handlers/stats-live.js +1 -1
  52. package/dist/server/handlers/stats-live.js.map +1 -1
  53. package/dist/server/handlers/subscriptions-live.d.ts +1 -1
  54. package/dist/server/handlers/subscriptions-live.d.ts.map +1 -1
  55. package/dist/server/handlers/subscriptions-live.js +1 -1
  56. package/dist/server/handlers/subscriptions-live.js.map +1 -1
  57. package/dist/server/internal/OwnerSessionSecurity.d.ts +19 -8
  58. package/dist/server/internal/OwnerSessionSecurity.d.ts.map +1 -1
  59. package/dist/server/internal/OwnerSessionSecurity.js +109 -32
  60. package/dist/server/internal/OwnerSessionSecurity.js.map +1 -1
  61. package/dist/server/internal/PublicOrigin.d.ts +9 -0
  62. package/dist/server/internal/PublicOrigin.d.ts.map +1 -0
  63. package/dist/server/internal/PublicOrigin.js +17 -0
  64. package/dist/server/internal/PublicOrigin.js.map +1 -0
  65. package/dist/server/review/PullRequestReview.d.ts +1 -1
  66. package/dist/server/review/PullRequestReview.d.ts.map +1 -1
  67. package/dist/server/review/PullRequestReview.js +1 -1
  68. package/dist/server/review/PullRequestReview.js.map +1 -1
  69. package/dist/server/review/ReviewSkillCatalog.js +2 -2
  70. package/dist/tooling/authenticated-dev-proxy.d.ts +20 -5
  71. package/dist/tooling/authenticated-dev-proxy.d.ts.map +1 -1
  72. package/dist/tooling/authenticated-dev-proxy.js +25 -9
  73. package/dist/tooling/authenticated-dev-proxy.js.map +1 -1
  74. package/dist/tooling/authenticated-dev-proxy.test.js +96 -5
  75. package/dist/tooling/authenticated-dev-proxy.test.js.map +1 -1
  76. package/package.json +32 -26
  77. package/dist/client/assets/index-DqzI_8bH.js +0 -90
  78. package/dist/client/assets/index-Ds8Muxxv.css +0 -1
  79. package/dist/client/assets/pr-review-workspace-Ca3Vmiye.js +0 -22
@@ -0,0 +1,90 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/pr-review-workspace-B7GX-PRi.js","assets/pr-review-workspace-mH4SV5xO.css"])))=>i.map(i=>d[i]);
2
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ee(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ee(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),ee(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=ee(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=ee(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ee(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return ee(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var te=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function ne(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,te)}catch(e){te(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function re(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ne(re.bind(null,e))}var ie={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ie,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=re,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ne,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),h=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function m(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&m(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),A=Symbol.for(`react.portal`),j=Symbol.for(`react.fragment`),M=Symbol.for(`react.strict_mode`),N=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),P=Symbol.for(`react.context`),F=Symbol.for(`react.forward_ref`),te=Symbol.for(`react.suspense`),ne=Symbol.for(`react.suspense_list`),re=Symbol.for(`react.memo`),ie=Symbol.for(`react.lazy`),ae=Symbol.for(`react.activity`),oe=Symbol.for(`react.legacy_hidden`),se=Symbol.for(`react.memo_cache_sentinel`),ce=Symbol.for(`react.view_transition`),le=Symbol.for(`react.recoverable`),ue=Symbol.iterator;function de(e){return typeof e!=`object`||!e?null:(e=ue&&e[ue]||e[`@@iterator`],typeof e==`function`?e:null)}var fe=Symbol.for(`react.client.reference`);function pe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===fe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case j:return`Fragment`;case N:return`Profiler`;case M:return`StrictMode`;case te:return`Suspense`;case ne:return`SuspenseList`;case ae:return`Activity`;case ce:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case A:return`Portal`;case P:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case F:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case re:return t=e.displayName||null,t===null?pe(e.type)||`Memo`:t;case ie:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}var me=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge={pending:!1,data:null,method:null,action:null},_e=[],ve=-1;function ye(e){return{current:e}}function be(e){0>ve||(e.current=_e[ve],_e[ve]=null,ve--)}function xe(e,t){ve++,_e[ve]=e.current,e.current=t}var Se=ye(null),Ce=ye(null),we=ye(null),Te=ye(null);function Ee(e,t){switch(xe(we,t),xe(Ce,e),xe(Se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Tp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Tp(t),e=Ep(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}be(Se),xe(Se,e)}function De(){be(Se),be(Ce),be(we)}function Oe(e){var t=e.memoizedState;t!==null&&(gh._currentValue=t.memoizedState,xe(Te,e)),t=Se.current;var n=Ep(t,e.type);t!==n&&(xe(Ce,e),xe(Se,n))}function ke(e){Ce.current===e&&(be(Se),be(Ce)),Te.current===e&&(be(Te),gh._currentValue=ge)}var Ae,je;function Me(e){if(Ae===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ae=t&&t[1]||``,je=-1<e.stack.indexOf(`
3
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
+ `+Ae+e+je}var Ne=!1;function Pe(e,t){if(!e||Ne)return``;Ne=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5
+ `),l=s.split(`
6
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ne=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Me(n):``}function Fe(e,t){switch(e.tag){case 26:case 27:case 5:return Me(e.type);case 16:return Me(`Lazy`);case 13:return e.child!==t&&t!==null?Me(`Suspense Fallback`):Me(`Suspense`);case 19:return Me(`SuspenseList`);case 0:case 15:return Pe(e.type,!1);case 11:return Pe(e.type.render,!1);case 1:return Pe(e.type,!0);case 31:return Me(`Activity`);case 30:return Me(`ViewTransition`);default:return``}}function Ie(e){try{var t=``,n=null;do t+=Fe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
+ Error generating stack: `+e.message+`
9
+ `+e.stack}}var Le=Object.prototype.hasOwnProperty,Re=t.unstable_scheduleCallback,ze=t.unstable_cancelCallback,Be=t.unstable_shouldYield,Ve=t.unstable_requestPaint,He=t.unstable_now,Ue=t.unstable_getCurrentPriorityLevel,We=t.unstable_ImmediatePriority,Ge=t.unstable_UserBlockingPriority,Ke=t.unstable_NormalPriority,qe=t.unstable_LowPriority,Je=t.unstable_IdlePriority,Ye=t.log,Xe=t.unstable_setDisableYieldValue,Ze=null,Qe=null;function $e(e){if(typeof Ye==`function`&&Xe(e),Qe&&typeof Qe.setStrictMode==`function`)try{Qe.setStrictMode(Ze,e)}catch{}}var et=Math.clz32?Math.clz32:rt,tt=Math.log,nt=Math.LN2;function rt(e){return e>>>=0,e===0?32:31-(tt(e)/nt|0)|0}var it=256,at=262144,ot=4194304;function st(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ct(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=st(n))):i=st(o):i=st(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=st(n))):i=st(o)):i=st(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function lt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ut(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-et(n),i=1<<r;t|=e[r],n&=~i}return t}function dt(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 ft(){var e=ot;return ot<<=1,!(ot&62914560)&&(ot=4194304),e}function pt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function mt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ht(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-et(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&gt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function gt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-et(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function _t(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-et(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function vt(e,t){var n=t&-t;return n=n&42?1:yt(n),(n&(e.suspendedLanes|t))===0?n:0}function yt(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 bt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function xt(){var e=he.p;return e===0?(e=window.event,e===void 0?32:Mh(e.type)):e}function St(e,t){var n=he.p;try{return he.p=e,t()}finally{he.p=n}}var Ct=Math.random().toString(36).slice(2),wt=`__reactFiber$`+Ct,Tt=`__reactProps$`+Ct,Et=`__reactContainer$`+Ct,Dt=`__reactEvents$`+Ct,Ot=`__reactListeners$`+Ct,kt=`__reactHandles$`+Ct,At=`__reactResources$`+Ct,jt=`__reactMarker$`+Ct,Mt=`__reactLoad$`+Ct;function Nt(e){delete e[wt],delete e[Tt],delete e[Ot],delete e[kt]}function Pt(e){var t;if(t=e[wt])return t;for(var n=e.parentNode;n;){if(t=n[Et]||n[wt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Cm(e);e!==null;){if(n=e[wt])return n;e=Cm(e)}return t}e=n,n=e.parentNode}return null}function Ft(e){if(e=e[wt]||e[Et]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function It(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Lt(e){var t=e[At];return t||=e[At]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Rt(e){e[jt]=!0}function zt(e){e[Mt]=void 0}var Bt=new Set,Vt={};function Ht(e,t){Ut(e,t),Ut(e+`Capture`,t)}function Ut(e,t){for(Vt[e]=t,e=0;e<t.length;e++)Bt.add(t[e])}var Wt=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]*$`),Gt={},Kt={};function qt(e){return Le.call(Kt,e)?!0:Le.call(Gt,e)?!1:Wt.test(e)?Kt[e]=!0:(Gt[e]=!0,!1)}var Jt=!1;function Yt(){var e=Jt;return Jt=!1,e}function Xt(e,t,n){if(qt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Zt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Qt(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 $t(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function en(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function tn(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nn(e){if(!e._valueTracker){var t=en(e)?`checked`:`value`;e._valueTracker=tn(e,t,``+e[t])}}function rn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=en(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var an=/[\n"\\]/g;function on(e){return e.replace(an,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function sn(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+$t(t)):e.value!==``+$t(t)&&(e.value=``+$t(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):ln(e,$t(n)):o===`number`&&e.value==t?ln(e,$t(e.value)):ln(e,$t(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+$t(s):e.removeAttribute(`name`)}function cn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){nn(e);return}n=n==null?``:``+$t(n),t=t==null?n:``+$t(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),nn(e)}function ln(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function un(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=``+$t(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 dn(e,t,n){if(t!=null&&(t=``+$t(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+$t(n)}function fn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(me(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=$t(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),nn(e)}function pn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var mn=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 hn(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||mn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function gn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Jt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(hn(e,a,r),Jt=!0)}else for(var o in t)t.hasOwnProperty(o)&&hn(e,o,t[o])}function _n(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 vn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),yn=/^[\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 bn(e){return yn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function xn(){}var Sn=null;function Cn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wn=null,Tn=null;function En(e){var t=Ft(e);if(t&&(e=t.stateNode)){var n=e[Tt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(sn(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="`+on(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Tt]||null;if(!a)throw Error(i(90));sn(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&rn(r)}break a;case`textarea`:dn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&un(e,!!n.multiple,t,!1)}}}var Dn=!1;function On(e,t,n){if(Dn)return e(t,n);Dn=!0;try{return e(t)}finally{if(Dn=!1,(wn!==null||Tn!==null)&&(Zd(),wn&&(t=wn,e=Tn,Tn=wn=null,En(t),e)))for(t=0;t<e.length;t++)En(e[t])}}function kn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Tt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var An=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,jn=!1;if(An)try{var Mn={};Object.defineProperty(Mn,"passive",{get:function(){jn=!0}}),window.addEventListener(`test`,Mn,Mn),window.removeEventListener(`test`,Mn,Mn)}catch{jn=!1}var Nn=null,Pn=null,Fn=null;function In(){if(Fn)return Fn;var e,t=Pn,n=t.length,r,i=`value`in Nn?Nn.value:Nn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Fn=i.slice(e,1<r?1-r:void 0)}function Ln(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 Rn(){return!0}function zn(){return!1}function Bn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Rn:zn,this.isPropagationStopped=zn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Rn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Rn)},persist:function(){},isPersistent:Rn}),t}var Vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hn=Bn(Vn),Un=D({},Vn,{view:0,detail:0}),Wn=Bn(Un),Gn,Kn,qn,Jn=D({},Un,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ar,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!==qn&&(qn&&e.type===`mousemove`?(Gn=e.screenX-qn.screenX,Kn=e.screenY-qn.screenY):Kn=Gn=0,qn=e),Gn)},movementY:function(e){return`movementY`in e?e.movementY:Kn}}),Yn=Bn(Jn),Xn=Bn(D({},Jn,{dataTransfer:0})),Zn=Bn(D({},Un,{relatedTarget:0})),Qn=Bn(D({},Vn,{animationName:0,elapsedTime:0,pseudoElement:0})),$n=Bn(D({},Vn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),er=Bn(D({},Vn,{data:0})),tr={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},nr={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`},rr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function ir(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=rr[e])?!!t[e]:!1}function ar(){return ir}var or=Bn(D({},Un,{key:function(e){if(e.key){var t=tr[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Ln(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?nr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ar,charCode:function(e){return e.type===`keypress`?Ln(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Ln(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),sr=Bn(D({},Jn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),cr=Bn(D({},Vn,{submitter:0})),lr=Bn(D({},Un,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ar})),ur=Bn(D({},Vn,{propertyName:0,elapsedTime:0,pseudoElement:0})),dr=Bn(D({},Jn,{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})),fr=Bn(D({},Vn,{newState:0,oldState:0,source:0})),pr=[9,13,27,32],mr=An&&`CompositionEvent`in window,hr=null;An&&`documentMode`in document&&(hr=document.documentMode);var gr=An&&`TextEvent`in window&&!hr,_r=An&&(!mr||hr&&8<hr&&11>=hr),vr=` `,yr=!1;function br(e,t){switch(e){case`keyup`:return pr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function xr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Sr=!1;function Cr(e,t){switch(e){case`compositionend`:return xr(t);case`keypress`:return t.which===32?(yr=!0,vr):null;case`textInput`:return e=t.data,e===vr&&yr?null:e;default:return null}}function wr(e,t){if(Sr)return e===`compositionend`||!mr&&br(e,t)?(e=In(),Fn=Pn=Nn=null,Sr=!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 _r&&t.locale!==`ko`?null:t.data;default:return null}}var Tr={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 Er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Tr[e.type]:t===`textarea`}function Dr(e,t,n,r){wn?Tn?Tn.push(r):Tn=[r]:wn=r,t=cp(t,`onChange`),0<t.length&&(n=new Hn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Or=null,kr=null;function Ar(e){ep(e,0)}function jr(e){if(rn(It(e)))return e}function Mr(e,t){if(e===`change`)return t}var Nr=!1;if(An){var Pr;if(An){var Fr=`oninput`in document;if(!Fr){var Ir=document.createElement(`div`);Ir.setAttribute(`oninput`,`return;`),Fr=typeof Ir.oninput==`function`}Pr=Fr}else Pr=!1;Nr=Pr&&(!document.documentMode||9<document.documentMode)}function Lr(){Or&&(Or.detachEvent(`onpropertychange`,Rr),kr=Or=null)}function Rr(e){if(e.propertyName===`value`&&jr(kr)){var t=[];Dr(t,kr,e,Cn(e)),On(Ar,t)}}function zr(e,t,n){e===`focusin`?(Lr(),Or=t,kr=n,Or.attachEvent(`onpropertychange`,Rr)):e===`focusout`&&Lr()}function Br(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return jr(kr)}function Vr(e,t){if(e===`click`)return jr(t)}function Hr(e,t){if(e===`input`||e===`change`)return jr(t)}function Ur(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Wr=typeof Object.is==`function`?Object.is:Ur;function Gr(e,t){if(Wr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Le.call(t,i)||!Wr(e[i],t[i]))return!1}return!0}function Kr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function qr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jr(e,t){var n=qr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=qr(n)}}function Yr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Kr(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=Kr(e.document)}return t}function Zr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Qr=An&&`documentMode`in document&&11>=document.documentMode,$r=null,ei=null,ti=null,ni=!1;function ri(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ni||$r==null||$r!==Kr(r)||(r=$r,`selectionStart`in r&&Zr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ti&&Gr(ti,r)||(ti=r,r=cp(ei,`onSelect`),0<r.length&&(t=new Hn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=$r)))}function ii(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ai={animationend:ii(`Animation`,`AnimationEnd`),animationiteration:ii(`Animation`,`AnimationIteration`),animationstart:ii(`Animation`,`AnimationStart`),transitionrun:ii(`Transition`,`TransitionRun`),transitionstart:ii(`Transition`,`TransitionStart`),transitioncancel:ii(`Transition`,`TransitionCancel`),transitionend:ii(`Transition`,`TransitionEnd`)},oi={},si={};An&&(si=document.createElement(`div`).style,`AnimationEvent`in window||(delete ai.animationend.animation,delete ai.animationiteration.animation,delete ai.animationstart.animation),`TransitionEvent`in window||delete ai.transitionend.transition);function ci(e){if(oi[e])return oi[e];if(!ai[e])return e;var t=ai[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in si)return oi[e]=t[n];return e}var li=ci(`animationend`),ui=ci(`animationiteration`),di=ci(`animationstart`),fi=ci(`transitionrun`),pi=ci(`transitionstart`),mi=ci(`transitioncancel`),hi=ci(`transitionend`),gi=new Map,_i=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);_i.push(`scrollEnd`);function vi(e,t){gi.set(e,t),Ht(t,[e])}var yi=0;function bi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Md.identifierPrefix;var n=yi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function xi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Bd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function Si(e,t){return e=xi(e),t=xi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var Ci=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},wi=[],Ti=0,Ei=0;function Di(){for(var e=Ti,t=Ei=Ti=0;t<e;){var n=wi[t];wi[t++]=null;var r=wi[t];wi[t++]=null;var i=wi[t];wi[t++]=null;var a=wi[t];if(wi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ji(n,i,a)}}function Oi(e,t,n,r){wi[Ti++]=e,wi[Ti++]=t,wi[Ti++]=n,wi[Ti++]=r,Ei|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ki(e,t,n,r){return Oi(e,t,n,r),Mi(e)}function Ai(e,t){return Oi(e,null,null,t),Mi(e)}function ji(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-et(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Mi(e){if(50<Vd)throw Vd=0,Hd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ni={};function Pi(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 Fi(e,t,n,r){return new Pi(e,t,n,r)}function Ii(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Li(e,t){var n=e.alternate;return n===null?(n=Fi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ri(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function zi(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Ii(r)&&(s=1);else if(typeof r==`string`)s=rh(e,n,Se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ae:return e=Fi(31,n,t,a),e.elementType=ae,e.lanes=o,e;case j:return Bi(n.children,a,o,t);case M:s=8,a|=24;break;case N:return e=Fi(12,n,t,a|2),e.elementType=N,e.lanes=o,e;case te:return e=Fi(13,n,t,a),e.elementType=te,e.lanes=o,e;case ne:return e=Fi(19,n,t,a),e.elementType=ne,e.lanes=o,e;case oe:case ce:return e=a|32,e=Fi(30,n,t,e),e.elementType=ce,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case P:s=10;break a;case ee:s=9;break a;case F:s=11;break a;case re:s=14;break a;case ie:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Fi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Bi(e,t,n,r){return e=Fi(7,e,r,t),e.lanes=n,e}function Vi(e,t,n){return e=Fi(6,e,null,t),e.lanes=n,e}function Hi(e){var t=Fi(18,null,null,0);return t.stateNode=e,t}function Ui(e,t,n){return t=Fi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Wi=new WeakMap;function Gi(e,t){if(typeof e==`object`&&e){var n=Wi.get(e);return n===void 0?(t={value:e,source:t,stack:Ie(t)},Wi.set(e,t),t):n}return{value:e,source:t,stack:Ie(t)}}var Ki=[],qi=0,Ji=null,Yi=0,Xi=[],Zi=0,Qi=null,$i=1,ea=``;function ta(e,t){Ki[qi++]=Yi,Ki[qi++]=Ji,Ji=e,Yi=t}function na(e,t,n){Xi[Zi++]=$i,Xi[Zi++]=ea,Xi[Zi++]=Qi,Qi=e;var r=$i;e=ea;var i=32-et(r)-1;r&=~(1<<i),n+=1;var a=32-et(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,$i=1<<32-et(t)+i|n<<i|r,ea=a+e}else $i=1<<a|n<<i|r,ea=e}function ra(e){e.return!==null&&(ta(e,1),na(e,1,0))}function ia(e){for(;e===Ji;)Ji=Ki[--qi],Ki[qi]=null,Yi=Ki[--qi],Ki[qi]=null;for(;e===Qi;)Qi=Xi[--Zi],Xi[Zi]=null,ea=Xi[--Zi],Xi[Zi]=null,$i=Xi[--Zi],Xi[Zi]=null}function aa(e,t){Xi[Zi++]=$i,Xi[Zi++]=ea,Xi[Zi++]=Qi,$i=t.id,ea=t.overflow,Qi=e}var oa=null,sa=null,ca=!1,la=null,ua=!1,da=Error(i(519));function fa(e){throw va(Gi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),da}function pa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[wt]=e,t[Tt]=r,n){case`dialog`:tp(`cancel`,t),tp(`close`,t);break;case`iframe`:case`object`:case`embed`:tp(`load`,t);break;case`video`:case`audio`:for(n=0;n<Qf.length;n++)tp(Qf[n],t);break;case`source`:tp(`error`,t);break;case`img`:case`image`:case`link`:tp(`error`,t),tp(`load`,t);break;case`details`:tp(`toggle`,t);break;case`input`:tp(`invalid`,t),cn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:tp(`invalid`,t);break;case`textarea`:tp(`invalid`,t),fn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||mp(t.textContent,n)?(r.popover!=null&&(tp(`beforetoggle`,t),tp(`toggle`,t)),r.onScroll!=null&&tp(`scroll`,t),r.onScrollEnd!=null&&tp(`scrollend`,t),r.onClick!=null&&(t.onclick=xn),t=!0):t=!1,t||fa(e,!0)}function ma(e){for(oa=e.return;oa;)switch(oa.tag){case 5:case 31:case 13:ua=!1;return;case 27:case 3:ua=!0;return;default:oa=oa.return}}function ha(e){if(e!==oa)return!1;if(!ca)return ma(e),ca=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Op(e.type,e.memoizedProps)),n=!n),n&&sa&&fa(e),ma(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));sa=Sm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));sa=Sm(e)}else t===27?(t=sa,Lp(e.type)?(e=xm,xm=null,sa=e):sa=t):sa=oa?bm(e.stateNode.nextSibling):null;return!0}function ga(){sa=oa=null,ca=!1}function _a(){var e=la;return e!==null&&(wd===null?wd=e:wd.push.apply(wd,e),la=null),e}function va(e){la===null?la=[e]:la.push(e)}var ya=ye(null),ba=null,xa=null;function Sa(e,t,n){xe(ya,t._currentValue),t._currentValue=n}function Ca(e){e._currentValue=ya.current,be(ya)}function wa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ta(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),wa(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),wa(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),wa(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Ea(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Wr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Te.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[gh]:e.push(gh))}a=a.return}return e!==null&&Ta(t,e,n,r),t.flags|=262144,e!==null}function Da(e){for(e=e.firstContext;e!==null;){if(!Wr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Oa(e){ba=e,xa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ka(e){return ja(ba,e)}function Aa(e,t){return ba===null&&Oa(e),ja(e,t)}function ja(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},xa===null){if(e===null)throw Error(i(308));xa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else xa=xa.next=t;return n}var Ma=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Na=t.unstable_scheduleCallback,L=t.unstable_NormalPriority,Pa={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fa(){return{controller:new Ma,data:new Map,refCount:0}}function Ia(e){e.refCount--,e.refCount===0&&Na(L,function(){e.controller.abort()})}function La(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Ra=null;function za(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ba=null,Va=0,Ha=0,Ua=null;function Wa(e,t){if(Ba===null){var n=Ba=[];Va=0,Ha=qf(),Ua={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Va++,t.then(Ga,Ga),t}function Ga(){if(--Va===0&&(Ra=null,Ba!==null)){Ua!==null&&(Ua.status=`fulfilled`);var e=Ba;Ba=null,Ha=0,Ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ka(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var qa=I.S;I.S=function(e,t){if(Dd=He(),typeof t==`object`&&t&&typeof t.then==`function`&&Wa(e,t),Ra!==null)for(var n=Nf;n!==null;)La(n,Ra),n=n.next;if(n=e.types,n!==null){for(var r=Nf;r!==null;)La(r,n),r=r.next;if(Ha!==0){r=Ra,r===null&&(r=Ra=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}qa!==null&&qa(e,t)};var Ja=ye(null);function Ya(){var e=Ja.current;return e===null?cd.pooledCache:e}function Xa(e,t){t===null?xe(Ja,Ja.current):xe(Ja,t.pool)}function Za(){var e=Ya();return e===null?null:{parent:Pa._currentValue,pool:e}}var Qa=Error(i(460)),$a=Error(i(474)),eo=Error(i(542)),to={then:function(){}};function no(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ro(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(xn,xn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,so(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(xn,xn);else{if(e=cd,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,so(e),e}throw ao=t,Qa}}function io(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ao=e,Qa):e}}var ao=null;function oo(){if(ao===null)throw Error(i(459));var e=ao;return ao=null,e}function so(e){if(e===Qa||e===eo)throw Error(i(483))}var co=null,lo=0;function uo(e){var t=lo;return lo+=1,co===null&&(co=[]),ro(co,e,t)}function R(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function fo(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function po(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Li(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Vi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===j?(e=d(e,t,n.props.children,r,n.key),R(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ie&&io(i)===t.type)?(t=a(t,n.props),R(t,n),t.return=e,t):(t=zi(n.type,n.key,n.props,null,e.mode,r),R(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ui(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Bi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Vi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=zi(t.type,t.key,t.props,null,e.mode,n),R(n,t),n.return=e,n;case A:return t=Ui(t,e.mode,n),t.return=e,t;case ie:return t=io(t),f(e,t,n)}if(me(t)||de(t))return t=Bi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,uo(t),n);if(t.$$typeof===P)return f(e,Aa(e,t),n);fo(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case k:return n.key===i?l(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case ie:return n=io(n),p(e,t,n,r)}if(me(n)||de(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,uo(n),r);if(n.$$typeof===P)return p(e,t,Aa(e,n),r);fo(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case k:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case A:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ie:return r=io(r),m(e,t,n,r,i)}if(me(r)||de(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,uo(r),i);if(r.$$typeof===P)return m(e,t,n,Aa(t,r),i);fo(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),ca&&ta(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return ca&&ta(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),ca&&ta(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),ca&&ta(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return ca&&ta(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),ca&&ta(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),R(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ie&&io(l)===r.type){n(e,r.sibling),c=a(r,o.props),R(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=Bi(o.props.children,e.mode,c,o.key),R(c,o),c.return=e,e=c):(c=zi(o.type,o.key,o.props,null,e.mode,c),R(c,o),c.return=e,e=c)}return s(e);case A:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ui(o,e.mode,c),c.return=e,e=c}return s(e);case ie:return o=io(o),_(e,r,o,c)}if(me(o))return h(e,r,o,c);if(de(o)){if(l=de(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,uo(o),c);if(o.$$typeof===P)return _(e,r,Aa(e,o),c);fo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Vi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{lo=0;var i=_(e,t,n,r);return co=null,i}catch(t){if(t===Qa||t===eo)throw t;var a=Fi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var mo=po(!0),ho=po(!1),go=!1;function _o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vo(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 yo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function bo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,sd&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Mi(e),ji(e,null,n),t}return Oi(e,r,t,n),Mi(e)}function xo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_t(e,n)}}function So(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Co=!1;function wo(){if(Co){var e=Ua;if(e!==null)throw e}}function To(e,t,n,r){Co=!1;var i=e.updateQueue;go=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(ud&f)===f:(r&f)===f){f!==0&&f===Ha&&(Co=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:go=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),vd|=o,e.lanes=o,e.memoizedState=d}}function Eo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Do(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Eo(n[e],t)}var Oo=ye(null),ko=ye(0);function Ao(e,t){e=gd,xe(ko,e),xe(Oo,t),gd=e|t.baseLanes}function jo(){xe(ko,gd),xe(Oo,Oo.current)}function Mo(){gd=ko.current,be(Oo),be(ko)}var No=ye(null),Po=null;function Fo(e){var t=e.alternate;xe(Bo,Bo.current&1),xe(No,e),Po===null&&(t===null||Oo.current!==null||t.memoizedState!==null)&&(Po=e)}function Io(e){xe(Bo,Bo.current),xe(No,e),Po===null&&(Po=e)}function Lo(e){e.tag===22?(xe(Bo,Bo.current),xe(No,e),Po===null&&(Po=e)):Ro()}function Ro(){xe(Bo,Bo.current),xe(No,No.current)}function zo(e){be(No),Po===e&&(Po=null),be(Bo)}var Bo=ye(0);function Vo(e,t){xe(No,No.current),xe(Bo,t)}function Ho(e){be(Bo),be(No),Po===e&&(Po=null)}function Uo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||_m(n)||vm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wo=0,Go=null,Ko=null,qo=null,Jo=!1,Yo=!1,Xo=!1,Zo=0,Qo=0,$o=null,es=0;function ts(){throw Error(i(321))}function ns(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Wr(e[n],t[n]))return!1;return!0}function rs(e,t,n,r,i,a){return Wo=a,Go=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?bc:xc,Xo=!1,a=n(r,i),Xo=!1,Yo&&(a=as(t,n,r,i)),is(e),a}function is(e){I.H=yc;var t=Ko!==null&&Ko.next!==null;if(Wo=0,qo=Ko=Go=null,Jo=!1,Qo=0,$o=null,t)throw Error(i(300));e===null||Rc||(e=e.dependencies,e!==null&&Da(e)&&(Rc=!0))}function as(e,t,n,r){Go=e;var a=0;do{if(Yo&&($o=null),Qo=0,Yo=!1,25<=a)throw Error(i(301));if(a+=1,qo=Ko=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=Sc,o=t(n,r)}while(Yo);return o}function os(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?ps(t):t,e=e.useState()[0],(Ko===null?null:Ko.memoizedState)!==e&&(Go.flags|=1024),t}function ss(){var e=Zo!==0;return Zo=0,e}function cs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ls(e){if(Jo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Jo=!1}Wo=0,qo=Ko=Go=null,Yo=!1,Qo=Zo=0,$o=null}function us(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qo===null?Go.memoizedState=qo=e:qo=qo.next=e,qo}function ds(){if(Ko===null){var e=Go.alternate;e=e===null?null:e.memoizedState}else e=Ko.next;var t=qo===null?Go.memoizedState:qo.next;if(t!==null)qo=t,Ko=e;else{if(e===null)throw Go.alternate===null?Error(i(467)):Error(i(310));Ko=e,e={memoizedState:Ko.memoizedState,baseState:Ko.baseState,baseQueue:Ko.baseQueue,queue:Ko.queue,next:null},qo===null?Go.memoizedState=qo=e:qo=qo.next=e}return qo}function fs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ps(e){var t=Qo;return Qo+=1,$o===null&&($o=[]),e=ro($o,e,t),t=Go,(qo===null?t.memoizedState:qo.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?bc:xc),e}function ms(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ps(e);if(e.$$typeof===le)return;if(e.$$typeof===P)return ka(e)}throw Error(i(438,String(e)))}function hs(e){var t=null,n=Go.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Go.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=fs(),Go.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]=se;return t.index++,n}function gs(e,t){return typeof t==`function`?t(e):t}function _s(e){return vs(ds(),Ko,e)}function vs(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Wo&f)===f:(ud&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ha&&(d=!0);else if((Wo&p)===p){u=u.next,p===Ha&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,Go.lanes|=p,vd|=p;f=u.action,Xo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,Go.lanes|=f,vd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Wr(o,e.memoizedState)&&(Rc=!0,d&&(n=Ua,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ys(e){var t=ds(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Wr(o,t.memoizedState)||(Rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function bs(e,t,n){var r=Go,a=ds(),o=ca;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Wr((Ko||a).memoizedState,n);if(s&&(a.memoizedState=n,Rc=!0),a=a.queue,Gs(Cs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||qo!==null&&!!(qo.memoizedState.tag&1),Bs(e?9:8,{destroy:void 0},Ss.bind(null,r,a,n,t),null),e){if(r.flags|=2048,cd===null)throw Error(i(349));o||Wo&127||xs(r,t,n)}return n}function xs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Go.updateQueue,t===null?(t=fs(),Go.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ss(e,t,n,r){t.value=n,t.getSnapshot=r,ws(t)&&Ts(e)}function Cs(e,t,n){return n(function(){ws(t)&&Ts(e)})}function ws(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Wr(e,n)}catch{return!0}}function Ts(e){var t=Ai(e,2);t!==null&&Kd(t,e,2)}function Es(e){var t=us();if(typeof e==`function`){var n=e;if(e=n(),Xo){$e(!0);try{n()}finally{$e(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gs,lastRenderedState:e},t}function Ds(e,t,n,r){return e.baseState=n,vs(e,Ko,typeof r==`function`?r:gs)}function Os(e,t,n,r,a){if(gc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ks(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ks(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};o.types=a===null?null:a.types,I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),As(e,t,s)}catch(n){Ms(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),As(e,t,a)}catch(n){Ms(e,t,n)}}function As(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){js(e,t,n)},function(n){return Ms(e,t,n)}):js(e,t,n)}function js(e,t,n){t.status=`fulfilled`,t.value=n,Ns(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ks(e,n)))}function Ms(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Ns(t),t=t.next;while(t!==r)}e.action=null}function Ns(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ps(e,t){return t}function Fs(e,t){if(ca){var n=cd.formState;if(n!==null){a:{var r=Go;if(ca){if(sa){b:{for(var i=sa,a=ua;i.nodeType!==8;){if(!a){i=null;break b}if(i=bm(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){sa=bm(i.nextSibling),r=i.data===`F!`;break a}}fa(r)}r=!1}r&&(t=n[0])}}return n=us(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ps,lastRenderedState:t},n.queue=r,n=pc.bind(null,Go,r),r.dispatch=n,r=Es(!1),a=hc.bind(null,Go,!1,r.queue),r=us(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Os.bind(null,Go,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Is(e){return Ls(ds(),Ko,e)}function Ls(e,t,n){if(t=vs(e,t,Ps)[0],e=_s(gs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ps(t)}catch(e){throw e===Qa?eo:e}else r=t;t=ds();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(Go.flags|=2048,Bs(9,{destroy:void 0},Rs.bind(null,i,n),null)),[r,a,e]}function Rs(e,t){e.action=t}function zs(e){var t=ds(),n=Ko;if(n!==null)return Ls(t,n,e);ds(),t=t.memoizedState,n=ds();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Bs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Go.updateQueue,t===null&&(t=fs(),Go.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 Vs(){return ds().memoizedState}function Hs(e,t,n,r){var i=us();Go.flags|=e,i.memoizedState=Bs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Us(e,t,n,r){var i=ds();r=r===void 0?null:r;var a=i.memoizedState.inst;Ko!==null&&r!==null&&ns(r,Ko.memoizedState.deps)?i.memoizedState=Bs(t,a,n,r):(Go.flags|=e,i.memoizedState=Bs(1|t,a,n,r))}function Ws(e,t){Hs(8390656,8,e,t)}function Gs(e,t){Us(2048,8,e,t)}function Ks(e){Go.flags|=4;var t=Go.updateQueue;if(t===null)t=fs(),Go.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function qs(e){var t=ds().memoizedState;return Ks({ref:t,nextImpl:e}),function(){if(sd&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Js(e,t){return Us(4,2,e,t)}function Ys(e,t){return Us(4,4,e,t)}function Xs(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 Zs(e,t,n){n=n==null?null:n.concat([e]),Us(4,4,Xs.bind(null,t,e),n)}function Qs(){}function $s(e,t){var n=ds();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&ns(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ec(e,t){var n=ds();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&ns(t,r[1]))return r[0];if(r=e(),Xo){$e(!0);try{e()}finally{$e(!1)}}return n.memoizedState=[r,t],r}function tc(e,t,n){return n===void 0||Wo&1073741824&&!(ud&261930)?e.memoizedState=t:(e.memoizedState=n,e=Wd(),Go.lanes|=e,vd|=e,n)}function nc(e,t,n,r){return Wr(n,t)?n:Oo.current===null?!(Wo&106)||Wo&1073741824&&!(ud&261930)?(Rc=!0,e.memoizedState=n):(e=Wd(),Go.lanes|=e,vd|=e,t):(e=tc(e,n,r),Wr(e,t)||(Rc=!0),e)}function rc(e,t,n,r,i){var a=he.p;he.p=a!==0&&8>a?a:8;var o=I.T,s={};s.types=o===null?null:o.types,I.T=s,hc(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?mc(e,t,Ka(c,r),Ud(e)):mc(e,t,r,Ud(e))}catch(n){mc(e,t,{then:function(){},status:`rejected`,reason:n},Ud())}finally{he.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function ic(){}function ac(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=oc(e).queue;rc(e,a,t,ge,n===null?ic:function(){return sc(e),n(r)})}function oc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ge,baseState:ge,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gs,lastRenderedState:ge},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function sc(e){var t=oc(e);t.next===null&&(t=e.alternate.memoizedState),mc(e,t.next.queue,{},Ud())}function cc(){return ka(gh)}function lc(){return ds().memoizedState}function uc(){return ds().memoizedState}function dc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ud();e=yo(n);var r=bo(t,e,n);r!==null&&(Kd(r,t,n),xo(r,t,n)),t={cache:Fa()},e.payload=t;return}t=t.return}}function fc(e,t,n){var r=Ud();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},gc(e)?_c(t,n):(n=ki(e,t,n,r),n!==null&&(Kd(n,e,r),vc(n,t,r)))}function pc(e,t,n){mc(e,t,n,Ud())}function mc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(gc(e))_c(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Wr(s,o))return Oi(e,t,i,0),cd===null&&Di(),!1}catch{}if(n=ki(e,t,i,r),n!==null)return Kd(n,e,r),vc(n,t,r),!0}return!1}function hc(e,t,n,r){if(r={lane:2,revertLane:qf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},gc(e)){if(t)throw Error(i(479))}else t=ki(e,n,r,2),t!==null&&Kd(t,e,2)}function gc(e){var t=e.alternate;return e===Go||t!==null&&t===Go}function _c(e,t){Yo=Jo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_t(e,n)}}var yc={readContext:ka,use:ms,useCallback:ts,useContext:ts,useEffect:ts,useImperativeHandle:ts,useLayoutEffect:ts,useInsertionEffect:ts,useMemo:ts,useReducer:ts,useRef:ts,useState:ts,useDebugValue:ts,useDeferredValue:ts,useTransition:ts,useSyncExternalStore:ts,useId:ts,useHostTransitionStatus:ts,useFormState:ts,useActionState:ts,useOptimistic:ts,useMemoCache:ts,useCacheRefresh:ts,useEffectEvent:ts},bc={readContext:ka,use:ms,useCallback:function(e,t){return us().memoizedState=[e,t===void 0?null:t],e},useContext:ka,useEffect:Ws,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Hs(4194308,4,Xs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hs(4194308,4,e,t)},useInsertionEffect:function(e,t){Hs(4,2,e,t)},useMemo:function(e,t){var n=us();t=t===void 0?null:t;var r=e();if(Xo){$e(!0);try{e()}finally{$e(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=us();if(n!==void 0){var i=n(t);if(Xo){$e(!0);try{n(t)}finally{$e(!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=fc.bind(null,Go,e),[r.memoizedState,e]},useRef:function(e){var t=us();return e={current:e},t.memoizedState=e},useState:function(e){e=Es(e);var t=e.queue,n=pc.bind(null,Go,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Qs,useDeferredValue:function(e,t){return tc(us(),e,t)},useTransition:function(){var e=Es(!1);return e=rc.bind(null,Go,e.queue,!0,!1),us().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Go,a=us();if(ca){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),cd===null)throw Error(i(349));ud&127||xs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ws(Cs.bind(null,r,o,e),[e]),r.flags|=2048,Bs(9,{destroy:void 0},Ss.bind(null,r,o,n,t),null),n},useId:function(){var e=us(),t=cd.identifierPrefix;if(ca){var n=ea,r=$i;n=(r&~(1<<32-et(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Zo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=es++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:cc,useFormState:Fs,useActionState:Fs,useOptimistic:function(e){var t=us();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=hc.bind(null,Go,!0,n),n.dispatch=t,[e,t]},useMemoCache:hs,useCacheRefresh:function(){return us().memoizedState=dc.bind(null,Go)},useEffectEvent:function(e){var t=us(),n={impl:e};return t.memoizedState=n,function(){if(sd&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},xc={readContext:ka,use:ms,useCallback:$s,useContext:ka,useEffect:Gs,useImperativeHandle:Zs,useInsertionEffect:Js,useLayoutEffect:Ys,useMemo:ec,useReducer:_s,useRef:Vs,useState:function(){return _s(gs)},useDebugValue:Qs,useDeferredValue:function(e,t){return nc(ds(),Ko.memoizedState,e,t)},useTransition:function(){var e=_s(gs)[0],t=ds().memoizedState;return[typeof e==`boolean`?e:ps(e),t]},useSyncExternalStore:bs,useId:lc,useHostTransitionStatus:cc,useFormState:Is,useActionState:Is,useOptimistic:function(e,t){return Ds(ds(),Ko,e,t)},useMemoCache:hs,useCacheRefresh:uc,useEffectEvent:qs},Sc={readContext:ka,use:ms,useCallback:$s,useContext:ka,useEffect:Gs,useImperativeHandle:Zs,useInsertionEffect:Js,useLayoutEffect:Ys,useMemo:ec,useReducer:ys,useRef:Vs,useState:function(){return ys(gs)},useDebugValue:Qs,useDeferredValue:function(e,t){var n=ds();return Ko===null?tc(n,e,t):nc(n,Ko.memoizedState,e,t)},useTransition:function(){var e=ys(gs)[0],t=ds().memoizedState;return[typeof e==`boolean`?e:ps(e),t]},useSyncExternalStore:bs,useId:lc,useHostTransitionStatus:cc,useFormState:zs,useActionState:zs,useOptimistic:function(e,t){var n=ds();return Ko===null?(n.baseState=e,[e,n.queue.dispatch]):Ds(n,Ko,e,t)},useMemoCache:hs,useCacheRefresh:uc,useEffectEvent:qs};function Cc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var wc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ud(),i=yo(r);i.payload=t,n!=null&&(i.callback=n),t=bo(e,i,r),t!==null&&(Kd(t,e,r),xo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ud(),i=yo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=bo(e,i,r),t!==null&&(Kd(t,e,r),xo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ud(),r=yo(n);r.tag=2,t!=null&&(r.callback=t),t=bo(e,r,n),t!==null&&(Kd(t,e,n),xo(t,e,n))}};function Tc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Gr(n,r)||!Gr(i,a):!0}function Ec(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&&wc.enqueueReplaceState(t,t.state,null)}function Dc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Oc(e){Ci(e)}function kc(e){console.error(e)}function Ac(e){Ci(e)}function jc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Mc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Nc(e,t,n){return n=yo(n),n.tag=3,n.payload={element:null},n.callback=function(){jc(e,t)},n}function Pc(e){return e=yo(e),e.tag=3,e}function Fc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Mc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Mc(t,n,r),typeof i!=`function`&&(Ad===null?Ad=new Set([this]):Ad.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Ic(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ea(t,n,a,!0),n=No.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Po===null?af():n.alternate===null&&_d===0&&(_d=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===to?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Df(e,r,a)),!1;case 22:return n.flags|=65536,r===to?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)),Df(e,r,a)),!1}throw Error(i(435,n.tag))}return Df(e,r,a),af(),!1}if(ca)return t=No.current,t===null?(r!==da&&(t=Error(i(423),{cause:r}),va(Gi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Gi(r,n),a=Nc(e.stateNode,r,a),So(e,a),_d!==4&&(_d=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==da&&(e=Error(i(422),{cause:r}),va(Gi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Gi(o,n),Cd===null?Cd=[o]:Cd.push(o),_d!==4&&(_d=2),t===null)return!0;r=Gi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Nc(n.stateNode,r,e),So(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(Ad===null||!Ad.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Pc(a),Fc(a,e,n,r),So(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Lc=Error(i(461)),Rc=!1;function zc(e,t,n,r){t.child=e===null?ho(t,null,n,r):mo(t,e.child,n,r)}function Bc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Oa(t),r=rs(e,t,n,o,a,i),s=ss(),e!==null&&!Rc?(cs(e,t,i),ml(e,t,i)):(ca&&s&&ra(t),t.flags|=1,zc(e,t,r,i),t.child)}function Vc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ii(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Hc(e,t,a,r,i)):(e=zi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!hl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Gr:n,n(o,r)&&e.ref===t.ref)return ml(e,t,i)}return t.flags|=1,e=Li(a,r),e.ref=t.ref,e.return=t,t.child=e}function Hc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Gr(a,r)&&e.ref===t.ref){if(Rc=!1,t.pendingProps=r=a,hl(e,i))e.flags&131072&&(Rc=!0);else return t.lanes=e.lanes,ml(e,t,i)}}return Xc(e,t,n,r,i)}function Uc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Gc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xa(t,a===null?null:a.cachePool),a===null?jo():Ao(t,a),Lo(t);else return r=t.lanes=536870912,Gc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Xa(t,null),jo(),Ro()):(Xa(t,a.cachePool),Ao(t,a),Ro(),t.memoizedState=null);return zc(e,t,i,n),t.child}function Wc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Gc(e,t,n,r,i){var a=Ya();return a=a===null?null:{parent:Pa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Xa(t,null),jo(),Lo(t),e!==null&&Ea(e,t,r,!0),t.childLanes=i,null}function Kc(e,t){return t=al({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function qc(e,t,n){return mo(t,e.child,null,n),e=Kc(t,t.pendingProps),e.flags|=2,zo(t),t.memoizedState=null,e}function Jc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(ca){if(r.mode===`hidden`)return e=Kc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Wc(null,e);if(Io(t),(e=sa)?(e=gm(e,ua),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Qi===null?null:{id:$i,overflow:ea},retryLane:536870912,hydrationErrors:null},n=Hi(e),n.return=t,t.child=n,oa=t,sa=null)):e=null,e===null)throw fa(t);return t.lanes=536870912,null}return Kc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Io(t),a){if(t.flags&256)t.flags&=-257,t=qc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Rc||Ea(e,t,n,!1),a=(n&e.childLanes)!==0,Rc||a){if(Oo.current===null){if(r=cd,r!==null&&(s=vt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Ai(e,s),Kd(r,e,s),Lc;af()}t=qc(e,t,n)}else e=o.treeContext,sa=bm(s.nextSibling),oa=t,ca=!0,la=null,ua=!1,e!==null&&aa(t,e),t=Kc(t,r),t.flags|=134221824;return t}return e=Li(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Yc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Xc(e,t,n,r,i){return Oa(t),n=rs(e,t,n,r,void 0,i),r=ss(),e!==null&&!Rc?(cs(e,t,i),ml(e,t,i)):(ca&&r&&ra(t),t.flags|=1,zc(e,t,n,i),t.child)}function Zc(e,t,n,r,i,a){return Oa(t),t.updateQueue=null,n=as(t,r,n,i),is(e),r=ss(),e!==null&&!Rc?(cs(e,t,a),ml(e,t,a)):(ca&&r&&ra(t),t.flags|=1,zc(e,t,n,a),t.child)}function Qc(e,t,n,r,i){if(Oa(t),t.stateNode===null){var a=Ni,o=n.contextType;typeof o==`object`&&o&&(a=ka(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=wc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},_o(t),o=n.contextType,a.context=typeof o==`object`&&o?ka(o):Ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Cc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&wc.enqueueReplaceState(a,a.state,null),To(t,r,a,i),wo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Dc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Ni,typeof u==`object`&&u&&(o=ka(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ec(t,a,r,o),go=!1;var f=t.memoizedState;a.state=f,To(t,r,a,i),wo(),l=t.memoizedState,s||f!==l||go?(typeof d==`function`&&(Cc(t,n,d,r),l=t.memoizedState),(c=go||Tc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,vo(e,t),o=t.memoizedProps,u=Dc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Ni,typeof l==`object`&&l&&(c=ka(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ec(t,a,r,c),go=!1,f=t.memoizedState,a.state=f,To(t,r,a,i),wo();var p=t.memoizedState;o!==d||f!==p||go||e!==null&&e.dependencies!==null&&Da(e.dependencies)?(typeof s==`function`&&(Cc(t,n,s,r),p=t.memoizedState),(u=go||Tc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Da(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Yc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=mo(t,e.child,null,i),t.child=mo(t,null,n,i)):zc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ml(e,t,i),e}function $c(e,t,n,r){return ga(),t.flags|=256,zc(e,t,n,r),t.child}var el={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function tl(e){return{baseLanes:e,cachePool:Za()}}function nl(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=xd),e}function rl(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Bo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(ca){if(i?Fo(t):Ro(),(e=sa)?(e=gm(e,ua),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Qi===null?null:{id:$i,overflow:ea},retryLane:536870912,hydrationErrors:null},n=Hi(e),n.return=t,t.child=n,oa=t,sa=null)):e=null,e===null)throw fa(t);return t.lanes=vm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Ro(),i=t.mode,a=al({mode:`hidden`,children:a},i),r=Bi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=tl(n),r.childLanes=nl(e,o,n),t.memoizedState=el,Wc(null,r)):(Fo(t),il(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return sl(e,t,a,o,r,c,s,n)}return i?(Ro(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Li(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Bi(i,a,n,null),i.flags|=2):i=Li(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Wc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=tl(n):(a=i.cachePool,a===null?a=Za():(s=Pa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=nl(e,o,n),t.memoizedState=el,Wc(e.child,r)):(Fo(t),n=e.child,e=n.sibling,n=Li(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function il(e,t){return t=al({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function al(e,t){return e=Fi(22,e,null,t),e.lanes=0,e}function ol(e,t,n){return mo(t,e.child,null,n),e=il(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function sl(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Fo(t),t.flags&=-257,ol(e,t,c)):t.memoizedState===null?(Ro(),o=a.fallback,s=t.mode,a=al({mode:`visible`,children:a.children},s),o=Bi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,mo(t,e.child,null,c),a=t.child,a.memoizedState=tl(c),a.childLanes=nl(e,r,c),t.memoizedState=el,Wc(null,a)):(Ro(),t.child=e.child,t.flags|=128,null);if(Fo(t),vm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,va({value:a,source:null,stack:null})),ol(e,t,c)}if(Rc||Ea(e,t,c,!1),r=(c&e.childLanes)!==0,Rc||r){if(Oo.current!==null)return ol(e,t,c);if(r=cd,r!==null&&(a=vt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Ai(e,a),Kd(r,e,a),Lc;return _m(o)||af(),ol(e,t,c)}return _m(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,sa=bm(o.nextSibling),oa=t,ca=!0,la=null,ua=!1,e!==null&&aa(t,e),t=il(t,a.children),t.flags|=134221824,t)}function cl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),wa(e.return,t,n)}function ll(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Uo(n)===null&&(t=e),e=e.sibling}return t}function ul(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function dl(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function fl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Bo.current;if(t.flags&128)return Vo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Vo(t,o),i===`backwards`&&e!==null?(dl(e),zc(e,t,r,n),dl(e)):zc(e,t,r,n),r=ca?Yi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&cl(e,n,t);else if(e.tag===19)cl(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=ll(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,dl(t)),ul(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Uo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ul(t,!0,n,null,a,r);break;case`together`:ul(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=ll(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ul(t,!1,i,n,a,r)}return t.child}function pl(e,t,n){var r=t.pendingProps;return Sa(t,t.type,r.value),zc(e,t,r.children,n),t.child}function ml(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),vd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Ea(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Li(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Li(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function hl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Da(e)))}function gl(e,t,n){switch(t.tag){case 3:Ee(t,t.stateNode.containerInfo),Sa(t,Pa,e.memoizedState.cache),ga();break;case 27:case 5:Oe(t);break;case 4:Ee(t,t.stateNode.containerInfo);break;case 10:Sa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Io(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Fo(t),t.flags|=128,null;r=Ea(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?rl(e,t,n):(Fo(t),e=ml(e,t,n),e===null?null:e.sibling)}Fo(t);break;case 19:if(t.flags&128)return fl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(Ea(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return fl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Vo(t,Bo.current),r)break;return null;case 22:return t.lanes=0,Uc(e,t,n,t.pendingProps);case 24:Sa(t,Pa,e.memoizedState.cache)}return ml(e,t,n)}function _l(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Rc=!0;else{if(!hl(e,n)&&!(t.flags&128))return Rc=!1,gl(e,t,n);Rc=!!(e.flags&131072)}}else Rc=!1,ca&&t.flags&1048576&&na(t,Yi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=io(t.elementType),t.type=e,typeof e==`function`)Ii(e)?(r=Dc(e,r),t.tag=1,t=Qc(null,t,e,r,n)):(t.tag=0,t=Xc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===F){t.tag=11,t=Bc(null,t,e,r,n);break a}if(a===re){t.tag=14,t=Vc(null,t,e,r,n);break a}if(a===P){t.tag=10,t.type=e,t=pl(null,t,n);break a}}throw t=pe(e)||e,Error(i(306,t,``))}}return t;case 0:return Xc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Dc(r,t.pendingProps),Qc(e,t,r,a,n);case 3:a:{if(Ee(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,vo(e,t),To(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Sa(t,Pa,r),r!==o.cache&&Ta(t,[Pa],n,!0),wo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=$c(e,t,r,n);break a}if(r!==a){a=Gi(Error(i(424)),t),va(a),t=$c(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(sa=bm(e.firstChild),oa=t,ca=!0,la=null,ua=!0,n=ho(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ga(),r===a){t=ml(e,t,n);break a}zc(e,t,r,n)}t=t.child}return t;case 26:return Yc(e,t),e===null?(n=Um(t.type,null,t.pendingProps,null))?t.memoizedState=n:ca||(t.stateNode=Dp(t.type,t.pendingProps,we.current,t)):t.memoizedState=Um(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Oe(t),e===null&&ca&&(r=t.stateNode=Em(t.type,t.pendingProps,we.current),oa=t,ua=!0,a=sa,Lp(t.type)?(xm=a,sa=bm(r.firstChild)):sa=a),zc(e,t,t.pendingProps.children,n),Yc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ca&&((a=r=sa)&&(r=mm(r,t.type,t.pendingProps,ua),r===null?a=!1:(t.stateNode=r,oa=t,sa=bm(r.firstChild),ua=!1,a=!0)),a||fa(t)),Oe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Op(a,o)?r=null:s!==null&&Op(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=rs(e,t,os,null,null,n),gh._currentValue=a),Yc(e,t),zc(e,t,r,n),t.child;case 6:return e===null&&ca&&((e=n=sa)&&(n=hm(n,t.pendingProps,ua),n===null?e=!1:(t.stateNode=n,oa=t,sa=null,e=!0)),e||fa(t)),null;case 13:return rl(e,t,n);case 4:return Ee(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=mo(t,null,r,n):zc(e,t,r,n),t.child;case 11:return Bc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Yc(e,t),zc(e,t,r,n),t.child;case 8:return zc(e,t,t.pendingProps.children,n),t.child;case 12:return zc(e,t,t.pendingProps.children,n),t.child;case 10:return pl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Oa(t),a=ka(a),r=r(a),t.flags|=1,zc(e,t,r,n),t.child;case 14:return Vc(e,t,t.type,t.pendingProps,n);case 15:return Hc(e,t,t.type,t.pendingProps,n);case 19:return fl(e,t,n);case 31:return Jc(e,t,n);case 22:return Uc(e,t,n,t.pendingProps);case 24:return Oa(t),r=ka(Pa),e===null?(a=Ya(),a===null&&(a=cd,o=Fa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},_o(t),Sa(t,Pa,a)):((e.lanes&n)!==0&&(vo(e,t),To(t,null,null,n),wo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Sa(t,Pa,r),r!==a.cache&&Ta(t,[Pa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Sa(t,Pa,r))),zc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:ca&&ra(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Yc(e,t),zc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function vl(e){e.flags|=4}function yl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?ih(t,r):ih(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(tf())e.flags|=8192;else throw ao=to,$a}}else e.flags&=-16777217}function bl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!ah(t)){if(tf())e.flags|=8192;else throw ao=to,$a}}function xl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ft(),e.lanes|=t,Sd|=t)}function Sl(e,t){if(!ca)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function Cl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function wl(e,t,n){var r=t.pendingProps;switch(ia(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Cl(t),null;case 1:return Cl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ca(Pa),De(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ha(t)?vl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_a())),Cl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(vl(t),o===null?(Cl(t),yl(t,a,null,r,n)):(Cl(t),bl(t,o))):o?o===e.memoizedState?(Cl(t),t.flags&=-16777217):(vl(t),Cl(t),bl(t,o)):(e=e.memoizedProps,e!==r&&vl(t),Cl(t),yl(t,a,e,r,n)),null;case 27:if(ke(t),n=we.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&vl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Cl(t),t.subtreeFlags&=-33554433,null}e=Se.current,ha(t)?pa(t,e):(e=Em(a,r,n),t.stateNode=e,vl(t))}return Cl(t),t.subtreeFlags&=-33554433,null;case 5:if(ke(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&vl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Cl(t),t.subtreeFlags&=-33554433,null}if(o=Se.current,ha(t))pa(t,o);else{var s=wp(we.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[wt]=t,o[Tt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(_p(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&vl(t)}}return Cl(t),t.subtreeFlags&=-33554433,yl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&vl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=we.current,ha(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=oa,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[wt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||mp(e.nodeValue,n)),e||fa(t,!0)}else e=wp(e).createTextNode(r),e[wt]=t,t.stateNode=e}return Cl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ha(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[wt]=t}else ga(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Cl(t),e=!1}else n=_a(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(zo(t),t):(zo(t),null);if(t.flags&128)throw Error(i(558))}return Cl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ha(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[wt]=t}else ga(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Cl(t),a=!1}else a=_a(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(zo(t),t):(zo(t),null)}return zo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),xl(t,t.updateQueue),Cl(t),null);case 4:return De(),e===null&&ip(t.stateNode.containerInfo),t.flags|=67108864,Cl(t),null;case 10:return Ca(t.type),Cl(t),null;case 19:if(Ho(t),r=t.memoizedState,r===null)return Cl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Sl(r,!1);else{if(_d!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Uo(e),o!==null){for(t.flags|=128,Sl(r,!1),e=o.updateQueue,t.updateQueue=e,xl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ri(n,e),n=n.sibling;return Vo(t,Bo.current&1|2),ca&&ta(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&He()>Od&&(t.flags|=128,a=!0,Sl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Uo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,xl(t,e),Sl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!ca)return Cl(t),null}else 2*He()-r.renderingStartTime>Od&&n!==536870912&&(t.flags|=128,a=!0,Sl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=He(),e.sibling=null,o=Bo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||ca?Vo(t,o):(n=o,xe(No,t),xe(Bo,n),Po===null&&(Po=t)),ca&&ta(t,r.treeForkCount),e}return Cl(t),null;case 22:case 23:return zo(t),Mo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Cl(t),t.subtreeFlags&6&&(t.flags|=8192)):Cl(t),n=t.updateQueue,n!==null&&xl(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&&be(Ja),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ca(Pa),Cl(t),null;case 25:return null;case 30:return t.flags|=33554432,Cl(t),null}throw Error(i(156,t.tag))}function Tl(e,t){switch(ia(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ca(Pa),De(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ke(t),null;case 31:if(t.memoizedState!==null){if(zo(t),t.alternate===null)throw Error(i(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(zo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ho(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return De(),null;case 10:return Ca(t.type),null;case 22:case 23:return zo(t),Mo(),e!==null&&be(Ja),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ca(Pa),null;case 25:return null;default:return null}}function El(e,t){switch(ia(t),t.tag){case 3:Ca(Pa),De();break;case 26:case 27:case 5:ke(t);break;case 4:De();break;case 31:t.memoizedState!==null&&zo(t);break;case 13:zo(t);break;case 19:Ho(t);break;case 10:Ca(t.type);break;case 22:case 23:zo(t),Mo(),e!==null&&be(Ja);break;case 24:Ca(Pa)}}function Dl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Ef(t,t.return,e)}}function Ol(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Ef(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ef(t,t.return,e)}}function kl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Do(t,n)}catch(t){Ef(e,e.return,t)}}}function Al(e,t,n){n.props=Dc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ef(e,t,n)}}function jl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=bi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Gp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Kp(e);m(e.child,!1,lm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Ef(e,t,n)}}function Ml(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Ef(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Ef(e,t,n)}else n.current=null}}function Nl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)dm(e.stateNode,t[n])}function Pl(e){for(var t=e.return;t!==null&&(Ll(t)&&dm(e.stateNode,t.stateNode),!Il(t));)t=t.return}function Fl(e){for(var t=e.return;t!==null&&(Ll(t)&&fm(e.stateNode,t.stateNode),!Il(t));)t=t.return}function Il(e){return e.tag===5||e.tag===3||e.tag===27}function Ll(e){return e&&e.tag===7&&e.stateNode!==null}function Rl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Ef(e,e.return,t)}}function zl(e,t,n){try{var r=e.stateNode;yp(r,e.type,n,t),r[Tt]=t}catch(t){Ef(e,e.return,t)}}function Bl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Lp(e.type)||e.tag===4}function Vl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Bl(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&&Lp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Hl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=xn)),Nl(e,r),Jt=!0;else if(i!==4&&(i===27&&(Nl(e,r),r=null,Lp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Hl(e,t,n,r),e=e.sibling;e!==null;)Hl(e,t,n,r),e=e.sibling}function Ul(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Nl(e,r),Jt=!0;else if(i!==4&&(i===27&&(Nl(e,r),r=null,Lp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Ul(e,t,n,r),e=e.sibling;e!==null;)Ul(e,t,n,r),e=e.sibling}function Wl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);_p(t,r,n),t[wt]=e,t[Tt]=n}catch(t){Ef(e,e.return,t)}}var Gl=!1,Kl=null;function ql(e){(e.tag===30||e.subtreeFlags&33554432)&&(Gl=!0)}var Jl=null;function Yl(){var e=Jl;return Jl=null,e}var Xl=0;function Zl(e,t,n,r,i){return Xl=0,Ql(e.child,t,n,r,i)}function Ql(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Up(o);r.push(s),s.view&&(a=!0)}else a||Up(o).view&&(a=!0);Gl=!0,Bp(o,Xl===0?t:t+`_`+Xl,n),Xl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Ql(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function $l(e,t){for(;e!==null;)e.tag===5?Vp(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||$l(e.child,t)),e=e.sibling}function eu(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(eu(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=Si(t.default,t.share),t!==`none`&&(Zl(e,n,t,null,!1)||$l(e.child,!1))}e=e.sibling}}function tu(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=bi(r,n),a=Si(r.default,n.paired?r.share:r.enter);a===`none`?eu(e):Zl(e,i,a,null,!1)?(eu(e),n.paired||t||Gd(e,r.onEnter)):$l(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)tu(e,t),e=e.sibling;else eu(e)}function nu(e){if(Kl!==null&&Kl.size!==0){var t=Kl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=Si(n.default,n.share);if(a!==`none`&&(Zl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Gd(e,n.onShare)):$l(e.child,!1)),t.delete(r),t.size===0)break}}}nu(e)}e=e.sibling}}}function ru(e){if(e.tag===30){var t=e.memoizedProps,n=bi(t,e.stateNode),r=Kl===null?void 0:Kl.get(n),i=Si(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Zl(e,n,i,null,!1)?r===void 0?Gd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Kl.delete(n),Gd(e,t.onShare)):$l(e.child,!1)),Kl!==null&&nu(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ru(e),e=e.sibling;else Kl!==null&&nu(e)}function iu(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=bi(t,e.stateNode);t=Si(t.default,t.update),e.flags&=-5,t!==`none`&&Zl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&iu(e);e=e.sibling}}function au(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,$l(e.child,!1))}au(e)}e=e.sibling}}function ou(e){if(e.tag===30)e.stateNode.paired=null,$l(e.child,!1),au(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ou(e),e=e.sibling;else au(e)}function su(e){for(e=e.child;e!==null;)e.tag===30?$l(e.child,!1):e.subtreeFlags&33554432&&su(e),e=e.sibling}function cu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Xl<a.length){var l=a[Xl],u=Up(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Bp(c,Xl===0?n:n+`_`+Xl,i),s&&e.flags&4||(Jl===null&&(Jl=[]),Jl.push(c,Xl===0?r:r+`_`+Xl,t.memoizedProps)),Xl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:cu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function lu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=bi(n,r),a=Si(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(eee)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Xl=0,i=cu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Gd(e,n.onUpdate))}else e.subtreeFlags&33554432&&lu(e,t);e=e.sibling}}var uu=!1,du=!1,fu=!1,pu=!1,mu=typeof WeakSet==`function`?WeakSet:Set,hu=null,gu=!1,_u=!1,vu=!1,yu=!1;function bu(e,t,n){if(e=e.containerInfo,Sp=Th,e=Xr(e),Zr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(Cp={focusedElem:e,selectionRange:r},Th=!1,n=(n&335544064)===n,hu=t,t=n?9270:1024;hu!==null;){if(e=hu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&ru(r[a]);if(e.alternate===null&&e.flags&2)n&&ql(e),xu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&ru(r),xu(n);continue}if(r!==null&&r.memoizedState!==null){n&&ql(e),xu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,hu=r):(n&&iu(e),xu(n))}}Kl=null}function xu(e){for(;hu!==null;){var t=hu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=Dc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){Ef(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)pm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:pm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=bi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=Si(a.default,a.update),a!==`none`&&Zl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,hu=r;break}hu=t.return}}function Su(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Hu(e,n),r&4&&Dl(5,n);break;case 1:if(Hu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Ef(n,n.return,e)}else{var i=Dc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Ef(n,n.return,e)}}}r&64&&kl(n),r&512&&jl(n,n.return);break;case 3:if(Hu(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{Do(e,t)}catch(e){Ef(n,n.return,e)}}break;case 27:t===null&&r&4&&Wl(n);case 26:case 5:Hu(e,n),t===null&&r&4&&Rl(n),r&512&&jl(n,n.return);break;case 12:Hu(e,n);break;case 31:Hu(e,n),r&4&&ju(e,n);break;case 13:Hu(e,n),r&4&&Mu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Af.bind(null,n),ym(e,n))));break;case 22:if(r=n.memoizedState!==null||uu,!r){var a=t!==null&&t.memoizedState!==null||du;t=uu,i=du,uu=r,(du=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Wu(e,n,r)):Hu(e,n),uu=t,du=i}break;case 30:Hu(e,n),r&512&&jl(n,n.return);break;case 7:r&512&&jl(n,n.return);default:Hu(e,n)}}function Cu(e,t){for(e=e.child;e!==null;)wu(e,t),e=e.sibling}function wu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){Ef(e,e.return,t)}Tu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Jt=!0}catch(t){Ef(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?zp(s,!0):zp(e.stateNode,!1)}catch(t){Ef(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&Cu(e,t);break;default:Cu(e,t)}}function Tu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:wu(n,r);break a;case 22:n.memoizedState===null&&Tu(n,r);break a;default:Tu(n,r)}}e=e.sibling}}function Eu(e){var t=e.alternate;t!==null&&(e.alternate=null,Eu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Nt(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 Du=null,Ou=!1;function ku(e,t,n){for(n=n.child;n!==null;)Au(e,t,n),n=n.sibling}function Au(e,t,n){if(Qe&&typeof Qe.onCommitFiberUnmount==`function`)try{Qe.onCommitFiberUnmount(Ze,n)}catch{}switch(n.tag){case 26:du||Ml(n,t),ku(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!du&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:du||Ml(n,t),Fl(n);var r=Du,i=Ou;Lp(n.type)&&(Du=n.stateNode,Ou=!1),ku(e,t,n),Dm(n.stateNode,n.type,n.memoizedProps),Du=r,Ou=i;break;case 5:du||Ml(n,t),Fl(n);case 6:if(n.tag===6&&Fl(n),r=Du,i=Ou,Du=null,ku(e,t,n),Du=r,Ou=i,Du!==null){if(Ou)try{(Du.nodeType===9?Du.body:Du.nodeName===`HTML`?Du.ownerDocument.body:Du).removeChild(n.stateNode),Jt=!0}catch(e){Ef(n,t,e)}else try{Du.removeChild(n.stateNode),Jt=!0}catch(e){Ef(n,t,e)}}break;case 18:Du!==null&&(Ou?(e=Du,Rp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Zh(e)):Rp(Du,n.stateNode));break;case 4:r=Du,i=Ou,Du=n.stateNode.containerInfo,Ou=!0,ku(e,t,n),Du=r,Ou=i;break;case 0:case 11:case 14:case 15:Ol(2,n,t),du||Ol(4,n,t),ku(e,t,n);break;case 1:du||(Ml(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Al(n,t,r)),ku(e,t,n);break;case 21:ku(e,t,n);break;case 22:du=(r=du)||n.memoizedState!==null,ku(e,t,n),du=r;break;case 30:Ml(n,t),ku(e,t,n);break;case 7:du||Ml(n,t),ku(e,t,n);break;default:ku(e,t,n)}}function ju(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Zh(e)}catch(e){Ef(t,t.return,e)}}}function Mu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Zh(e)}catch(e){Ef(t,t.return,e)}}function Nu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new mu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new mu),t;default:throw Error(i(435,e.tag))}}function Pu(e,t){var n=Nu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=jf.bind(null,e,t);t.then(r,r)}})}function Fu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Lp(l.type)){Du=l.stateNode,Ou=!1;break a}break;case 5:Du=l.stateNode,Ou=!1;break a;case 3:case 4:Du=l.stateNode.containerInfo,Ou=!0;break a}l=l.return}if(Du===null)throw Error(i(160));Au(s,c,o),Du=null,Ou=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Lu(t,e,n),t=t.sibling}var Iu=null;function Lu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Fu(t,e,n),Ru(e),a&4&&(Ol(3,e,e.return),Dl(3,e),Ol(5,e,e.return));break;case 1:Fu(t,e,n),Ru(e),a&512&&(du||r===null||Ml(r,r.return)),a&64&&uu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Iu,Fu(t,e,n),Ru(e),a&512&&(du||r===null||Ml(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(uu)e.stateNode=Dp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[jt]||r[wt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),_p(r,t,n),r[wt]=e,Rt(r),t=r;break a;case`link`:if(o=th(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),_p(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=th(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),_p(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[wt]=e,Rt(r),t=r}e.stateNode=t}}else uu||nh(o,e.type,e.stateNode)}else e.stateNode=Xm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&zl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||du||t.parentNode.removeChild(t)):a.count--,n===null?uu||nh(o,e.type,e.stateNode):Xm(o,n,e.memoizedProps))}break;case 27:Fu(t,e,n),Ru(e),a&512&&(du||r===null||Ml(r,r.return)),r!==null&&a&4&&zl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=fu,fu=!1,Fu(t,e,n),fu=o,Ru(e),a&512&&(du||r===null||Ml(r,r.return)),e.flags&32){t=e.stateNode;try{pn(t,``),Jt=!0}catch(t){Ef(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,zl(e,t,r===null?t:r.memoizedProps)),a&1024&&(pu=!0);break;case 6:if(Fu(t,e,n),Ru(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Jt=!0}catch(t){Ef(e,e.return,t)}}break;case 3:if(Jt=!1,eh=null,o=Iu,Iu=jm(t.containerInfo),Fu(t,e,n),Iu=o,Ru(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Zh(t.containerInfo)}catch(t){Ef(e,e.return,t)}pu&&(pu=!1,zu(e)),Jt=!1;break;case 4:a=fu,fu=uu,r=Yt(),o=Iu,Iu=jm(e.stateNode.containerInfo),Fu(t,e,n),Ru(e),Iu=o,Jt&&_u&&(vu=!0),Jt=r,fu=a;break;case 12:Fu(t,e,n),Ru(e);break;case 31:Fu(t,e,n),Ru(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Pu(e,t)));break;case 13:Fu(t,e,n),Ru(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Ed=He()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Pu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=uu,l=du,u=fu;uu=c||o,fu=u||o,du=l||s,Fu(t,e,n),du=l,fu=u,uu=c,Ru(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||uu||du||(t=s||du,n=uu,r=du,uu=o||uu,du=t,Uu(e,2),uu=n,du=r),!o&&fu||Cu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Pu(e,n))));break;case 19:Fu(t,e,n),Ru(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Pu(e,t)));break;case 30:a&512&&(du||r===null||Ml(r,r.return)),a=Yt(),o=_u,s=(n&335544064)===n,c=e.memoizedProps,_u=s&&Si(c.default,c.update)!==`none`,Fu(t,e,n),Ru(e),s&&r!==null&&Jt&&(e.flags|=4),_u=o,Jt=a;break;case 21:break;case 7:a&512&&(du||r===null||Ml(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Fu(t,e,n),Ru(e)}}function Ru(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Bl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Ll(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Il(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Ul(e,Vl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(pn(l,``),n.flags&=-33),Ul(e,Vl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Hl(e,Vl(e),u,s);break;default:throw Error(i(161))}}catch(t){Ef(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;zu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Th=!0,t.reset(),Th=!1),e=e.sibling}}function Bu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Vu(t,e),t=t.sibling;else lu(t,!1)}function Vu(e,t){var n=e.alternate;if(n===null)tu(e,!1);else switch(e.tag){case 3:if(yu=gu=!1,Yl(),Bu(t,e),!gu&&!vu){if(e=Jl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Vp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),yu=!0}Jl=null;break;case 5:Bu(t,e);break;case 4:r=gu,gu=!1,Bu(t,e),gu&&(vu=!0),gu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Bu(t,e):tu(e,!1));break;case 30:r=gu,i=Yl(),gu=!1,Bu(t,e),gu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=bi(a,o),o=bi(n.memoizedProps,o);var s=Si(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Xl=0,t=cu(e,n,t,o,s,a,!0),Xl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Gd(e,e.memoizedProps.onUpdate),Jl=i):i!==null&&(i.push.apply(i,Jl),Jl=i),gu=e.flags&32?!0:r;break;default:Bu(t,e)}}function Hu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Su(e,t.alternate,t),t=t.sibling}function Uu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Ol(4,n,n.return),Uu(n,r);break;case 1:Ml(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Al(n,n.return,i),Uu(n,r);break;case 27:r&2&&Dm(n.stateNode,n.type,n.memoizedProps);case 5:Ml(n,n.return),n.tag!==5&&n.tag!==27||Fl(n),Uu(n,r);break;case 6:Fl(n);break;case 26:Ml(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||du||i.parentNode.removeChild(i),Uu(n,r);break;case 22:n.memoizedState===null&&Uu(n,r);break;case 30:Ml(n,n.return),Uu(n,r);break;case 7:Ml(n,n.return);default:Uu(n,r)}e=e.sibling}}function Wu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Wu(i,a,n),Dl(4,a);break;case 1:if(Wu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Ef(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Eo(l[i],c)}catch(e){Ef(r,r.return,e)}}s&&o&64&&kl(a),jl(a,a.return);break;case 27:n&2&&Wl(a);case 5:a.tag!==5&&a.tag!==27||Pl(a),Wu(i,a,n),s&&r===null&&o&4&&Rl(a),jl(a,a.return);break;case 6:Pl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||uu||nh(jm(c.ownerDocument),a.type,c),Wu(i,a,n),s&&r===null&&o&4&&Rl(a),jl(a,a.return);break;case 12:Wu(i,a,n);break;case 31:Wu(i,a,n),s&&o&4&&ju(i,a);break;case 13:Wu(i,a,n),s&&o&4&&Mu(i,a);break;case 22:a.memoizedState===null&&Wu(i,a,n),jl(a,a.return);break;case 30:Wu(i,a,n),jl(a,a.return);break;case 7:jl(a,a.return);default:Wu(i,a,n)}t=t.sibling}}function Gu(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&&Ia(n))}function Ku(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ia(e))}function qu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Ju(e,t,n,r),t=t.sibling;else i&&su(t)}function Ju(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&ou(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:qu(e,t,n,r),a&2048&&Dl(9,t);break;case 1:qu(e,t,n,r);break;case 3:qu(e,t,n,r),i&&yu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Ia(a)));break;case 12:if(a&2048){qu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){Ef(t,t.return,e)}}else qu(e,t,n,r);break;case 31:qu(e,t,n,r);break;case 13:qu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&ou(t),o._visibility&2?qu(e,t,n,r):(o._visibility|=2,Yu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&ou(s),o._visibility&2?qu(e,t,n,r):Xu(e,t)),a&2048&&Gu(s,t);break;case 24:qu(e,t,n,r),a&2048&&Ku(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&($l(a.child,!0),$l(t.child,!0))),qu(e,t,n,r);break;default:qu(e,t,n,r)}}function Yu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Yu(a,o,s,c,i),Dl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Yu(a,o,s,c,i)):u._visibility&2?Yu(a,o,s,c,i):Xu(a,o),i&&l&2048&&Gu(o.alternate,o);break;case 24:Yu(a,o,s,c,i),i&&l&2048&&Ku(o.alternate,o);break;default:Yu(a,o,s,c,i)}t=t.sibling}}function Xu(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:Xu(n,r),i&2048&&Gu(r.alternate,r);break;case 24:Xu(n,r),i&2048&&Ku(r.alternate,r);break;default:Xu(n,r)}t=t.sibling}}var Zu=8192;function Qu(e,t,n){if(e.subtreeFlags&Zu)for(e=e.child;e!==null;)$u(e,t,n),e=e.sibling}function $u(e,t,n){switch(e.tag){case 26:Qu(e,t,n),e.flags&Zu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&sh(n,e)):ch(n,Iu,e.memoizedState,e.memoizedProps));break;case 5:Qu(e,t,n),e.flags&Zu&&(e=e.stateNode,(t&335544128)===t&&sh(n,e));break;case 3:case 4:var r=Iu;Iu=jm(e.stateNode.containerInfo),Qu(e,t,n),Iu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Zu,Zu=16777216,Qu(e,t,n),Zu=r):Qu(e,t,n));break;case 30:if((e.flags&Zu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Kl===null&&(Kl=new Map),Kl.set(r,i)}Qu(e,t,n);break;default:Qu(e,t,n)}}function ed(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 td(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];hu=r,id(r,e)}ed(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)nd(e),e=e.sibling}function nd(e){switch(e.tag){case 0:case 11:case 15:td(e),e.flags&2048&&Ol(9,e,e.return);break;case 3:td(e);break;case 12:td(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,rd(e)):td(e);break;default:td(e)}}function rd(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];hu=r,id(r,e)}ed(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ol(8,t,t.return),rd(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,rd(t));break;default:rd(t)}e=e.sibling}}function id(e,t){for(;hu!==null;){var n=hu;switch(n.tag){case 0:case 11:case 15:Ol(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:Ia(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,hu=r;else a:for(n=e;hu!==null;){r=hu;var i=r.sibling,a=r.return;if(Eu(r),r===n){hu=null;break a}if(i!==null){i.return=a,hu=i;break a}hu=a}}}var ad={getCacheForType:function(e){var t=ka(Pa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ka(Pa).controller.signal}},od=typeof WeakMap==`function`?WeakMap:Map,sd=0,cd=null,ld=null,ud=0,dd=0,fd=null,pd=!1,md=!1,hd=!1,gd=0,_d=0,vd=0,yd=0,bd=0,xd=0,Sd=0,Cd=null,wd=null,Td=!1,Ed=0,Dd=0,Od=1/0,kd=null,Ad=null,jd=0,Md=null,Nd=null,Pd=0,Fd=0,Id=null,Ld=null,Rd=null,zd=null,Bd=null,Vd=0,Hd=null;function Ud(){return sd&2&&ud!==0?ud&-ud:I.T===null?xt():qf()}function Wd(){if(xd===0){if(!(ud&536870912)||ca){var e=at;at<<=1,!(at&3932160)&&(at=262144),xd=e}else xd=536870912}return e=No.current,e!==null&&(e.flags|=32),xd}function Gd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Gp(bi(e.memoizedProps,n))),zd===null&&(zd=[]),zd.push(t.bind(null,r))}}function Kd(e,t,n){(e===cd&&(dd===2||dd===9)||e.cancelPendingCommit!==null)&&($d(e,0),Xd(e,ud,xd,!1)),mt(e,n),(!(sd&2)||e!==cd)&&(e===cd&&(!(sd&2)&&(yd|=n),_d===4&&Xd(e,ud,xd,!1)),zf(e))}function qd(e,t,n){if(sd&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||lt(e,t),a=r?cf(e,t):of(e,t,!0),o=r;do{if(a===0){md&&!r&&Xd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Yd(n)){a=of(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Cd;var l=c.current.memoizedState.isDehydrated;if(l&&($d(c,s).flags|=256),s=of(c,s,!1),s!==2&&s!==6){if(hd&&!l){c.errorRecoveryDisabledLanes|=o,yd|=o,a=4;break a}o=wd,wd=a,o!==null&&(wd===null?wd=o:wd.push.apply(wd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){$d(e,0),Xd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Xd(r,t,xd,!pd);break a;case 2:wd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Ed+300-He(),10<a)){if(Xd(r,t,xd,!pd),ct(r,0,!0)!==0)break a;Pd=t,r.timeoutHandle=jp(Jd.bind(null,r,n,wd,kd,Td,t,xd,yd,Sd,pd,o,`Throttled`,-0,0),a);break a}Jd(r,n,wd,kd,Td,t,xd,yd,Sd,pd,o,null,-0,0)}break}while(1);zf(e)}function Jd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;if(d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xn},Kl=null,$u(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=dh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?Ed-He():(a&4194048)===a?Dd-He():0,m=aee(d,m),m!==null)){Pd=a,e.cancelPendingCommit=m(hf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Xd(e,a,o,!l);return}hf(e,t,a,n,r,i,o,s,c,l,u,d)}function Yd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Wr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Xd(e,t,n,r){t=ut(e,t),t&=~bd,t&=~yd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-et(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&gt(e,n,t)}function Zd(){return sd&6?!0:(Bf(0,!1),!1)}function Qd(){if(ld!==null){if(dd===0)var e=ld.return;else e=ld,xa=ba=null,ls(e),co=null,lo=0,e=ld;for(;e!==null;)El(e.alternate,e),e=e.return;ld=null}}function $d(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Mp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Pd=0,Qd(),cd=e,ld=n=Li(e.current,null),ud=t,dd=0,fd=null,pd=!1,md=lt(e,t),hd=!1,Sd=xd=bd=yd=vd=_d=0,wd=Cd=null,Td=!1,gd=ut(e,t),Di(),n}function ef(e,t){Go=null,I.H=yc,t===Qa||t===eo?(t=oo(),dd=3):t===$a?(t=oo(),dd=4):dd=t===Lc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,fd=t,ld===null&&(_d=1,jc(e,Gi(t,e.current)))}function tf(){var e=No.current;return e===null?!0:(ud&4194048)===ud?Po===null:(ud&62914560)===ud||ud&536870912?e===Po:!1}function nf(){var e=I.H;return I.H=yc,e===null?yc:e}function rf(){var e=I.A;return I.A=ad,e}function af(){_d=4,pd||(ud&4194048)!==ud&&No.current!==null||(md=!0),!(vd&134217727)&&!(yd&134217727)||cd===null||Xd(cd,ud,xd,!1)}function of(e,t,n){var r=sd;sd|=2;var i=nf(),a=rf();(cd!==e||ud!==t)&&(kd=null,$d(e,t)),t=!1;var o=_d;a:do try{if(dd!==0&&ld!==null){var s=ld,c=fd;switch(dd){case 8:Qd(),o=6;break a;case 3:case 2:case 9:case 6:No.current===null&&(t=!0);var l=dd;if(dd=0,fd=null,ff(e,s,c,l),n&&md){o=0;break a}break;default:l=dd,dd=0,fd=null,ff(e,s,c,l)}}sf(),o=_d;break}catch(t){ef(e,t)}while(1);return t&&e.shellSuspendCounter++,xa=ba=null,sd=r,I.H=i,I.A=a,ld===null&&(cd=null,ud=0,Di()),o}function sf(){for(;ld!==null;)uf(ld)}function cf(e,t){var n=sd;sd|=2;var r=nf(),a=rf();cd!==e||ud!==t?(kd=null,Od=He()+500,$d(e,t)):md=lt(e,t);a:do try{if(dd!==0&&ld!==null){t=ld;var o=fd;b:switch(dd){case 1:dd=0,fd=null,ff(e,t,o,1);break;case 2:case 9:if(no(o)){dd=0,fd=null,df(t);break}t=function(){dd!==2&&dd!==9||cd!==e||(dd=7),zf(e)},o.then(t,t);break a;case 3:dd=7;break a;case 4:dd=5;break a;case 7:no(o)?(dd=0,fd=null,df(t)):(dd=0,fd=null,ff(e,t,o,7));break;case 5:var s=null;switch(ld.tag){case 26:s=ld.memoizedState;case 5:case 27:var c=ld;if(s?ah(s):c.stateNode.complete){dd=0,fd=null;var l=c.sibling;if(l!==null)ld=l;else{var u=c.return;u===null?ld=null:(ld=u,pf(u))}break b}}dd=0,fd=null,ff(e,t,o,5);break;case 6:dd=0,fd=null,ff(e,t,o,6);break;case 8:Qd(),_d=6;break a;default:throw Error(i(462))}}lf();break}catch(t){ef(e,t)}while(1);return xa=ba=null,I.H=r,I.A=a,sd=n,ld===null?(cd=null,ud=0,Di(),_d):0}function lf(){for(;ld!==null&&!Be();)uf(ld)}function uf(e){var t=_l(e.alternate,e,gd);e.memoizedProps=e.pendingProps,t===null?pf(e):ld=t}function df(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Zc(n,t,t.pendingProps,t.type,void 0,ud);break;case 11:t=Zc(n,t,t.pendingProps,t.type.render,t.ref,ud);break;case 5:ls(t);var r=t;r===oa&&(ca?(ma(r),r.tag===5&&r.stateNode!=null&&(sa=r.stateNode)):(ma(r),ca=!0));default:El(n,t),t=ld=Ri(t,gd),t=_l(n,t,gd)}e.memoizedProps=e.pendingProps,t===null?pf(e):ld=t}function ff(e,t,n,r){xa=ba=null,ls(t),co=null,lo=0;var i=t.return;try{if(Ic(e,i,t,n,ud)){_d=1,jc(e,Gi(n,e.current)),ld=null;return}}catch(t){if(i!==null)throw ld=i,t;_d=1,jc(e,Gi(n,e.current)),ld=null;return}t.flags&32768?(ca||r===1?e=!0:md||ud&536870912?e=!1:(pd=e=!0,(r===2||r===9||r===3||r===6)&&(r=No.current,r!==null&&r.tag===13&&(r.flags|=16384))),mf(t,e)):pf(t)}function pf(e){var t=e;do{if(t.flags&32768){mf(t,pd);return}e=t.return;var n=wl(t.alternate,t,gd);if(n!==null){ld=n;return}if(t=t.sibling,t!==null){ld=t;return}ld=t=e}while(t!==null);_d===0&&(_d=5)}function mf(e,t){do{var n=Tl(e.alternate,e);if(n!==null){n.flags&=32767,ld=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ld=e;return}ld=e=n}while(e!==null);_d=6,ld=null}function hf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do Cf();while(jd!==0);if(sd&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===cd&&(ld=cd=null,ud=0),Nd=t,Md=e,Pd=n,Id=a,Ld=r,gf(e,t,n,s,c,l,f)}}function gf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Fd=s,s|=Ei,ht(e,n,s,r,i,a),zd=null,(n&335544064)===n?(Bd=za(e),r=10262):(Bd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Mf(Ke,function(){return wf(),null})):(e.callbackNode=null,e.callbackPriority=0),Gl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=I.T,I.T=null,i=he.p,he.p=2,a=sd,sd|=4;try{bu(e,t,n)}finally{sd=a,he.p=i,I.T=r}}jd=1,Gl?Rd=ree(o,e.containerInfo,Bd,yf,bf,vf,xf,wf,_f,null,null):(yf(),bf(),xf())}function _f(e){if(jd!==0){var t=Md.onRecoverableError;t(e,{componentStack:null})}}function vf(){jd===3&&(jd=0,Vu(Nd,Md),jd=4)}function yf(){if(jd===1){jd=0;var e=Md,t=Nd,n=Pd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=I.T,I.T=null;var i=he.p;he.p=2;var a=sd;sd|=4;try{_u=vu=!1,Lu(t,e,n),n=Cp;var o=Xr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Yr(s.ownerDocument.documentElement,s)){if(c!==null&&Zr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Jr(s,h),v=Jr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}Th=!!Sp,Cp=Sp=null}finally{sd=a,he.p=i,I.T=r}}e.current=t,jd=2}}function bf(){if(jd===2){jd=0;var e=Md,t=Nd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=he.p;he.p=2;var i=sd;sd|=4;try{Su(e,t.alternate,t)}finally{sd=i,he.p=r,I.T=n}}jd=3}}function xf(){if(jd===4||jd===3){jd=0;var e=Rd;Rd=null,Ve();var t=Md,n=Nd,r=Pd,i=Ld,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?jd=5:(jd=0,Nd=Md=null,Sf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Ad=null),bt(r),n=n.stateNode,Qe&&typeof Qe.onCommitFiberRoot==`function`)try{Qe.onCommitFiberRoot(Ze,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=I.T,a=he.p,he.p=2,I.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{I.T=n,he.p=a}}if(i=zd,o=Bd,Bd=null,i!==null&&(zd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Pd&3&&Cf(),zf(t),a=t.pendingLanes,r&261930&&a&42?t===Hd?Vd++:(Vd=0,Hd=t):(Vd=0,Hd=null),Bf(0,!1)}}function Sf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ia(t)))}function Cf(){return Rd!==null&&(Rd.skipTransition(),Rd=null),yf(),bf(),xf(),wf()}function wf(){if(jd!==5)return!1;var e=Md,t=Fd;Fd=0;var n=bt(Pd),r=I.T,a=he.p;try{he.p=32>n?32:n,I.T=null,n=Id,Id=null;var o=Md,s=Pd;if(jd=0,Nd=Md=null,Pd=0,sd&6)throw Error(i(331));var c=sd;if(sd|=4,nd(o.current),Ju(o,o.current,s,n),sd=c,Bf(0,!1),Qe&&typeof Qe.onPostCommitFiberRoot==`function`)try{Qe.onPostCommitFiberRoot(Ze,o)}catch{}return!0}finally{he.p=a,I.T=r,Sf(e,t)}}function Tf(e,t,n){t=Gi(n,t),t=Nc(e.stateNode,t,2),e=bo(e,t,2),e!==null&&(mt(e,2),zf(e))}function Ef(e,t,n){if(e.tag===3)Tf(e,e,n);else for(;t!==null;){if(t.tag===3){Tf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Ad===null||!Ad.has(r))){e=Gi(n,e),n=Pc(2),r=bo(t,n,2),r!==null&&(Fc(n,r,t,e),mt(r,2),zf(r));break}}t=t.return}}function Df(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new od;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)||(hd=!0,i.add(n),e=Of.bind(null,e,t,n),t.then(e,e))}function Of(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,cd===e&&(ud&n)===n&&(_d===4||_d===3&&(ud&62914560)===ud&&300>He()-Ed?sd&2?bd|=n:$d(e,0):bd|=n,Sd===ud&&(Sd=0)),zf(e)}function kf(e,t){t===0&&(t=ft()),e=Ai(e,t),e!==null&&(mt(e,t),zf(e))}function Af(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),kf(e,n)}function jf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),kf(e,n)}function Mf(e,t){return Re(e,t)}var Nf=null,Pf=null,Ff=!1,If=!1,Lf=!1,Rf=0;function zf(e){e!==Pf&&e.next===null&&(Pf===null?Nf=Pf=e:Pf=Pf.next=e),If=!0,Ff||(Ff=!0,Kf())}function Bf(e,t){if(!Lf&&If){Lf=!0;do for(var n=!1,r=Nf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-et(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Gf(r,a))}else a=ud,a=ct(r,r===cd?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||lt(r,a)||(n=!0,Gf(r,a))}r=r.next}while(n);Lf=!1}}function Vf(){Hf()}function Hf(){If=Ff=!1;var e=0;Rf!==0&&Ap()&&(e=Rf);for(var t=He(),n=null,r=Nf;r!==null;){var i=r.next,a=Uf(r,t);a===0?(r.next=null,n===null?Nf=i:n.next=i,i===null&&(Pf=n)):(n=r,(e!==0||a&3)&&(If=!0)),r=i}jd!==0&&jd!==5||Bf(e,!1),Rf!==0&&(Rf=0)}function Uf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-et(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=dt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=cd,n=ud,n=ct(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(dd===2||dd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ze(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||lt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ze(r),bt(n)){case 2:case 8:n=Ge;break;case 32:n=Ke;break;case 268435456:n=Je;break;default:n=Ke}return r=Wf.bind(null,e),n=Re(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ze(r),e.callbackPriority=2,e.callbackNode=null,2}function Wf(e,t){if(jd!==0&&jd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Cf()&&e.callbackNode!==n)return null;var r=ud;return r=ct(e,e===cd?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(qd(e,r,t),Uf(e,He()),e.callbackNode!=null&&e.callbackNode===n?Wf.bind(null,e):null)}function Gf(e,t){if(Cf())return null;qd(e,t,!0)}function Kf(){Fp(function(){sd&6?Re(We,Vf):Hf()})}function qf(){if(Rf===0){var e=Ha;e===0&&(e=it,it<<=1,!(it&261888)&&(it=256)),Rf=e}return Rf}function Jf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:bn(e)}function Yf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Jf((i[Tt]||null).action),o=r.submitter;o&&(t=(t=o[Tt]||null)?Jf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Hn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Rf!==0){var e=new FormData(i,o);ac(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),ac(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Xf=0;Xf<_i.length;Xf++){var Zf=_i[Xf];vi(Zf.toLowerCase(),`on`+(Zf[0].toUpperCase()+Zf.slice(1)))}vi(li,`onAnimationEnd`),vi(ui,`onAnimationIteration`),vi(di,`onAnimationStart`),vi(`dblclick`,`onDoubleClick`),vi(`focusin`,`onFocus`),vi(`focusout`,`onBlur`),vi(fi,`onTransitionRun`),vi(pi,`onTransitionStart`),vi(mi,`onTransitionCancel`),vi(hi,`onTransitionEnd`),Ut(`onMouseEnter`,[`mouseout`,`mouseover`]),Ut(`onMouseLeave`,[`mouseout`,`mouseover`]),Ut(`onPointerEnter`,[`pointerout`,`pointerover`]),Ut(`onPointerLeave`,[`pointerout`,`pointerover`]),Ht(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ht(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ht(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ht(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ht(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ht(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Qf=`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(` `),$f=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Qf));function ep(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ci(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ci(e)}i.currentTarget=null,a=c}}}}function tp(e,t){var n=t[Dt];n===void 0&&(n=t[Dt]=new Set);var r=e+`__bubble`;n.has(r)||(ap(t,e,2,!1),n.add(r))}function np(e,t,n){var r=0;t&&(r|=4),ap(n,e,r,t)}var rp=`_reactListening`+Math.random().toString(36).slice(2);function ip(e){if(!e[rp]){e[rp]=!0,Bt.forEach(function(t){t!==`selectionchange`&&($f.has(t)||np(t,!1,e),np(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[rp]||(t[rp]=!0,np(`selectionchange`,!1,t))}}function ap(e,t,n,r){switch(Mh(t)){case 2:var i=Eh;break;case 8:i=Dh;break;default:i=Oh}n=i.bind(null,t,n,e),i=void 0,!jn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function op(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Pt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}On(function(){var r=a,i=Cn(n),s=[];a:{var c=gi.get(e);if(c!==void 0){var l=Hn,u=e;switch(e){case`keypress`:if(Ln(n)===0)break a;case`keydown`:case`keyup`:l=or;break;case`focusin`:u=`focus`,l=Zn;break;case`focusout`:u=`blur`,l=Zn;break;case`beforeblur`:case`afterblur`:l=Zn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Yn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Xn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=lr;break;case li:case ui:case di:l=Qn;break;case hi:l=ur;break;case`scroll`:case`scrollend`:l=Wn;break;case`wheel`:l=dr;break;case`copy`:case`cut`:case`paste`:l=$n;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=sr;break;case`submit`:l=cr;break;case`toggle`:case`beforetoggle`:l=fr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=kn(m,p),g!=null&&d.push(sp(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==Sn&&(u=n.relatedTarget||n.fromElement)&&(Pt(u)||u[Et]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Pt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Yn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=sr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:It(c),h=l==null?u:It(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Pt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,lp):null,c!==null&&up(s,u,c,d,!1),l!==null&&f!==null&&up(s,f,l,d,!0)))}a:{if(c=r?It(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Mr;else if(Er(c)){if(Nr)_=Hr;else{_=Br;var v=zr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&_n(r.elementType)&&(_=Mr):_=Vr;if(_&&=_(e,r)){Dr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?It(r):window,e){case`focusin`:(Er(v)||v.contentEditable===`true`)&&($r=v,ei=r,ti=null);break;case`focusout`:ti=ei=$r=null;break;case`mousedown`:ni=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ni=!1,ri(s,n,i);break;case`selectionchange`:if(Qr)break;case`keydown`:case`keyup`:ri(s,n,i)}var y;if(mr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else Sr?br(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(_r&&n.locale!==`ko`&&(Sr||b!==`onCompositionStart`?b===`onCompositionEnd`&&Sr&&(y=In()):(Nn=i,Pn=`value`in Nn?Nn.value:Nn.textContent,Sr=!0)),v=cp(r,b),0<v.length&&(b=new er(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=xr(n),y!==null&&(b.data=y)))),(y=gr?Cr(e,n):wr(e,n))&&(b=cp(r,`onBeforeInput`),0<b.length&&(v=new er(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Yf(s,e,r,n,i)}ep(s,t)})}function sp(e,t,n){return{instance:e,listener:t,currentTarget:n}}function cp(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=kn(e,n),i!=null&&r.unshift(sp(e,i,a)),i=kn(e,t),i!=null&&r.push(sp(e,i,a))),e.tag===3)return r;e=e.return}return[]}function lp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function up(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=kn(n,a),l!=null&&o.unshift(sp(n,l,c))):i||(l=kn(n,a),l!=null&&o.push(sp(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var dp=/\r\n?/g,fp=/\u0000|\uFFFD/g;function pp(e){return(typeof e==`string`?e:``+e).replace(dp,`
10
+ `).replace(fp,``)}function mp(e,t){return t=pp(t),pp(e)===t}function hp(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||pn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&pn(e,``+r);else return;break;case`className`:Zt(e,`class`,r);break;case`tabIndex`:Zt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Zt(e,n,r);break;case`style`:gn(e,r,o);return;case`data`:if(t!==`object`){Zt(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=bn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&hp(e,t,`name`,a.name,a,null),hp(e,t,`formEncType`,a.formEncType,a,null),hp(e,t,`formMethod`,a.formMethod,a,null),hp(e,t,`formTarget`,a.formTarget,a,null)):(hp(e,t,`encType`,a.encType,a,null),hp(e,t,`method`,a.method,a,null),hp(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=bn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=xn);return;case`onScroll`:r!=null&&tp(`scroll`,e);return;case`onScrollEnd`:r!=null&&tp(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=bn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:tp(`beforetoggle`,e),tp(`toggle`,e),Xt(e,`popover`,r);break;case`xlinkActuate`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Xt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=vn.get(n)||n,Xt(e,n,r);else return}Jt=!0}function gp(e,t,n,r,a,o){switch(n){case`style`:gn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)pn(e,r);else if(typeof r==`number`||typeof r==`bigint`)pn(e,``+r);else return;break;case`onScroll`:r!=null&&tp(`scroll`,e);return;case`onScrollEnd`:r!=null&&tp(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=xn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Vt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[Tt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Jt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Xt(e,n,r)}return}Jt=!0}function _p(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:tp(`error`,e),tp(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:hp(e,t,o,s,n,null)}}a&&hp(e,t,`srcSet`,n.srcSet,n,null),r&&hp(e,t,`src`,n.src,n,null);return;case`input`:tp(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:hp(e,t,r,d,n,null)}}cn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in tp(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:hp(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&un(e,!!r,n,!0):un(e,!!r,t,!1);return;case`textarea`:for(s in tp(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:hp(e,t,s,c,n,null)}fn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:hp(e,t,l,r,n,null)}return;case`dialog`:tp(`beforetoggle`,e),tp(`toggle`,e),tp(`cancel`,e),tp(`close`,e);break;case`iframe`:case`object`:tp(`load`,e);break;case`video`:case`audio`:for(r=0;r<Qf.length;r++)tp(Qf[r],e);break;case`image`:tp(`error`,e),tp(`load`,e);break;case`details`:tp(`toggle`,e);break;case`embed`:case`source`:case`link`:tp(`error`,e),tp(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:hp(e,t,u,r,n,null)}return;default:if(_n(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&gp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&hp(e,t,c,r,n,null))}var vp={};function yp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||hp(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Jt=!0),o=m;break;case`name`:m!==f&&(Jt=!0),a=m;break;case`checked`:m!==f&&(Jt=!0),u=m;break;case`defaultChecked`:m!==f&&(Jt=!0),d=m;break;case`value`:m!==f&&(Jt=!0),s=m;break;case`defaultValue`:m!==f&&(Jt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&hp(e,t,p,m,r,f)}}sn(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||hp(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Jt=!0),p=o;break;case`defaultValue`:o!==l&&(Jt=!0),c=o;break;case`multiple`:o!==l&&(Jt=!0),s=o;default:o!==l&&hp(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?un(e,!!n,n?[]:``,!1):un(e,!!n,t,!0)):un(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:hp(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Jt=!0),p=a;break;case`defaultValue`:a!==o&&(Jt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&hp(e,t,s,a,r,o)}dn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:hp(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Jt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:hp(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&hp(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:hp(e,t,u,p,r,m)}return;default:if(_n(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&gp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||gp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&hp(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||hp(e,t,f,p,r,m)}function bp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function xp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&bp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&bp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Sp=null,Cp=null;function wp(e){return e.nodeType===9?e:e.ownerDocument}function Tp(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 Ep(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 Dp(e,t,n,r){return n=wp(n).createElement(e),n[wt]=r,n[Tt]=t,_p(n,e,t),Rt(n),n}function Op(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 kp=null;function Ap(){var e=window.event;return e&&e.type===`popstate`?e!==kp&&(kp=e,!0):(kp=null,!1)}var jp=typeof setTimeout==`function`?setTimeout:void 0,Mp=typeof clearTimeout==`function`?clearTimeout:void 0,Np=typeof Promise==`function`?Promise:void 0,Pp=typeof requestAnimationFrame==`function`?requestAnimationFrame:jp,Fp=typeof queueMicrotask==`function`?queueMicrotask:Np===void 0?jp:function(e){return Np.resolve(null).then(e).catch(Ip)};function Ip(e){setTimeout(function(){throw e})}function Lp(e){return e===`head`}function Rp(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),Zh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Om(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Om(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[jt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Om(e.ownerDocument.body)}n=i}while(n);Zh(t)}function zp(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 Bp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Vp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Hp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Up(e){return Hp(e.getBoundingClientRect(),getComputedStyle(e),e)}function eee(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Hp(t,n,e)}function tee(e){return e.documentElement.clientHeight}function nee(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function ree(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(tee(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=oh(f),u>lh){s.length=o;break}f=new Promise(nee.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Wp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Wp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Wp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Wp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Gp(e){return{name:e,group:new Wp(`group`,e),imagePair:new Wp(`image-pair`,e),old:new Wp(`old`,e),new:new Wp(`new`,e)}}function Kp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Kp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Zp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Yp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,qp,e,s,r)}this._eventListeners=a}};function qp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Kp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Zp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Yp(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,Jp,e,n,i),r.splice(t,1),a!==null&&a()}};function Jp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Yp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Xp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Zp(e,t,n,r){if(e.length===0)return-1;r=Xp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Xp(a.optionsOrUseCapture)===r)return i}return-1}Kp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Yp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Yp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Kp.prototype.focus=function(e){m(this._fragmentFiber.child,!0,Qp,e,void 0,void 0)};function Qp(e,t){return e.tag!==6&&(e=b(e),wm(e,t))}Kp.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,$p,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Qp(t[n],e);n--);};function $p(e,t){return t.push(e),!1}Kp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=wp(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,em,e,void 0,void 0))};function em(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Kp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,tm,e,void 0,void 0)};function tm(e,t){return e.tag!==6&&(e=b(e),t.observe(e),!1)}Kp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,nm,e,void 0,void 0);for(var n=t=0;n<rm.length;n++){var r=rm[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):rm[t++]=r}rm.length=t}};function nm(e,t){return e.tag!==6&&(e=b(e),t.unobserve(e),!1)}var rm=[],im=!1;function am(e,t,n){rm.push({fragmentInstance:e,observer:t,instance:n}),im||(im=!0,Tm(function(){im=!1;var e=rm;rm=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Kp.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,om,e,void 0,void 0),e};function om(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Kp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Kp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,$p,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||sm(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function sm(e,t,n,r,i){var a=Pt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(m(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(m(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function cm(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Kp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,$p,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),cm(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),cm(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function lm(e,t){return e=b(e),um(e,t),!1}function um(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function dm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Yp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<rm.length;i++){var a=rm[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(rm[r++]=a)}rm.length=r,n.observe(e)}),um(e,t))}function fm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Yp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?am(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function pm(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`:pm(n),Nt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function mm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[jt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=bm(e.nextSibling),e===null)break}return null}function hm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=bm(e.nextSibling),e===null))return null;return e}function gm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=bm(e.nextSibling),e===null))return null;return e}function _m(e){return e.data===`$?`||e.data===`$~`}function vm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function ym(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 bm(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 xm=null;function Sm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return bm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Cm(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 wm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function Tm(e){Pp(function(){Pp(function(t){return e(t)})})}function Em(e,t,n){switch(t=wp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Dm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&hp(e,t,r,null,vp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===xn&&(e.onclick=null),Nt(e)}function Om(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Nt(e)}var km=new Map,Am=new Set;function jm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Mm=he.d;he.d={f:Nm,r:iee,D:Im,C:Lm,L:Rm,m:zm,X:Vm,S:Bm,M:Hm};function Nm(){var e=Mm.f(),t=Zd();return e||t}function iee(e){var t=Ft(e);t!==null&&t.tag===5&&t.type===`form`?sc(t):Mm.r(e)}var Pm=typeof document>`u`?null:document;function Fm(e,t,n){var r=Pm;if(r&&typeof t==`string`&&t){var i=on(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Am.has(i)||(Am.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),_p(t,`link`,e),Rt(t),r.head.appendChild(t)))}}function Im(e){Mm.D(e),Fm(`dns-prefetch`,e,null)}function Lm(e,t){Mm.C(e,t),Fm(`preconnect`,e,t)}function Rm(e,t,n){Mm.L(e,t,n);var r=Pm;if(r&&e&&t){var i=`link[rel="preload"][as="`+on(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+on(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+on(n.imageSizes)+`"]`)):i+=`[href="`+on(e)+`"]`;var a=i;switch(t){case`style`:a=Wm(e);break;case`script`:a=Jm(e)}if(!(km.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),km.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Gm(a))||t===`script`&&r.querySelector(Ym(a))))){var o=r.createElement(`link`);_p(o,`link`,e),t===`style`&&(o[Mt]=!0,o.onload=o.onerror=function(){zt(o)}),Rt(o),r.head.appendChild(o)}}}function zm(e,t){Mm.m(e,t);var n=Pm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+on(r)+`"][href="`+on(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Jm(e)}if(!km.has(a)&&(e=D({rel:`modulepreload`,href:e},t),km.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ym(a)))return}r=n.createElement(`link`),_p(r,`link`,e),Rt(r),n.head.appendChild(r)}}}function Bm(e,t,n){Mm.S(e,t,n);var r=Pm;if(r&&e){var i=Lt(r).hoistableStyles,a=Wm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Gm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=km.get(a))&&Qm(e,n);var c=o=r.createElement(`link`);Rt(c),_p(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Zm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Vm(e,t){Mm.X(e,t);var n=Pm;if(n&&e){var r=Lt(n).hoistableScripts,i=Jm(e),a=r.get(i);a||(a=n.querySelector(Ym(i)),a||(e=D({src:e,async:!0},t),(t=km.get(i))&&$m(e,t),a=n.createElement(`script`),Rt(a),_p(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hm(e,t){Mm.M(e,t);var n=Pm;if(n&&e){var r=Lt(n).hoistableScripts,i=Jm(e),a=r.get(i);a||(a=n.querySelector(Ym(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=km.get(i))&&$m(e,t),a=n.createElement(`script`),Rt(a),_p(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Um(e,t,n,r){var a=(a=we.current)?jm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Wm(n.href),t=Lt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Wm(n.href);var o=Lt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Gm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=km.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},km.set(e,o)),qm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Jm(n),t=Lt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Wm(e){return`href="`+on(e)+`"`}function Gm(e){return`link[rel="stylesheet"][`+e+`]`}function Km(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function qm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Mt]){r.loading=1;return}}else t=e.createElement(`link`),t[Mt]=!0,t.onload=t.onerror=zt.bind(null,t),_p(t,`link`,n),Rt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Jm(e){return`[src="`+on(e)+`"]`}function Ym(e){return`script[async]`+e}function Xm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+on(n.href)+`"]`);if(r)return t.instance=r,Rt(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Rt(r),_p(r,`style`,a),Zm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Wm(n.href);var o=e.querySelector(Gm(a));if(o)return t.state.loading|=4,t.instance=o,Rt(o),o;r=Km(n),(a=km.get(a))&&Qm(r,a),o=(e.ownerDocument||e).createElement(`link`),Rt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),_p(o,`link`,r),t.state.loading|=4,Zm(o,n.precedence,e),t.instance=o;case`script`:return o=Jm(n.src),(a=e.querySelector(Ym(o)))?(t.instance=a,Rt(a),a):(r=n,(a=km.get(o))&&(r=D({},n),$m(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Rt(a),_p(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Zm(r,n.precedence,e));return t.instance}function Zm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Qm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function $m(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var eh=null;function th(e,t,n){if(eh===null){var r=new Map,i=eh=new Map;i.set(n,r)}else i=eh,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[jt]||a[wt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function nh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function rh(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 ih(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function ah(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function oh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function sh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=oh(t),e.suspenseyImages.push(t)),e=fh.bind(e),t.decode().then(e,e))}function ch(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Wm(r.href),a=t.querySelector(Gm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=dh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Rt(a);return}a=t.ownerDocument||t,r=Km(r),(i=km.get(i))&&Qm(r,i),a=a.createElement(`link`),Rt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),_p(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=dh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var lh=0;function aee(e,t){return e.stylesheets&&e.count===0&&mh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&mh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&lh===0&&(lh=62500*xp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&mh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>lh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function uh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)mh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function dh(){this.count--,uh(this)}function fh(){this.imgCount--,uh(this)}var ph=null;function mh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ph=new Map,t.forEach(hh,e),ph=null,dh.call(e))}function hh(e,t){if(!(t.state.loading&4)){var n=ph.get(e);if(n)var r=n.get(null);else{n=new Map,ph.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=dh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var gh={$$typeof:P,Provider:null,Consumer:null,_currentValue:ge,_currentValue2:ge,_threadCount:0};function _h(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=pt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pt(0),this.hiddenUpdates=pt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function vh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new _h(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Fi(3,null,null,t),e.current=a,a.stateNode=e,t=Fa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},_o(a),e}function yh(e){return e?(e=Ni,e):Ni}function bh(e,t,n,r,i,a){i=yh(i),r.context===null?r.context=i:r.pendingContext=i,r=yo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=bo(e,r,t),n!==null&&(Kd(n,e,t),xo(n,e,t))}function xh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Sh(e,t){xh(e,t),(e=e.alternate)&&xh(e,t)}function Ch(e){if(e.tag===13||e.tag===31){var t=Ai(e,67108864);t!==null&&Kd(t,e,67108864),Sh(e,67108864)}}function wh(e){if(e.tag===13||e.tag===31){var t=Ud();t=yt(t);var n=Ai(e,t);n!==null&&Kd(n,e,t),Sh(e,t)}}var Th=!0;function Eh(e,t,n,r){var i=I.T;I.T=null;var a=he.p;try{he.p=2,Oh(e,t,n,r)}finally{he.p=a,I.T=i}}function Dh(e,t,n,r){var i=I.T;I.T=null;var a=he.p;try{he.p=8,Oh(e,t,n,r)}finally{he.p=a,I.T=i}}function Oh(e,t,n,r){if(Th){var i=kh(r);if(i===null)op(e,t,r,Ah,n),Vh(e,r);else if(Uh(i,e,t,n,r))r.stopPropagation();else if(Vh(e,r),t&4&&-1<Bh.indexOf(e)){for(;i!==null;){var a=Ft(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=st(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-et(o);s.entanglements[1]|=c,o&=~c}zf(a),!(sd&6)&&(Od=He()+500,Bf(0,!1))}}break;case 31:case 13:s=Ai(a,2),s!==null&&Kd(s,a,2),Zd(),Sh(a,2)}if(a=kh(r),a===null&&op(e,t,r,Ah,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else op(e,t,r,null,n)}}function kh(e){return e=Cn(e),jh(e)}var Ah=null;function jh(e){if(Ah=null,e=Pt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ah=e,null}function Mh(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ue()){case We:return 2;case Ge:return 8;case Ke:case qe:return 32;case Je:return 268435456;default:return 32}default:return 32}}var Nh=!1,Ph=null,Fh=null,Ih=null,Lh=new Map,Rh=new Map,zh=[],Bh=`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 Vh(e,t){switch(e){case`focusin`:case`focusout`:Ph=null;break;case`dragenter`:case`dragleave`:Fh=null;break;case`mouseover`:case`mouseout`:Ih=null;break;case`pointerover`:case`pointerout`:Lh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Rh.delete(t.pointerId)}}function Hh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ft(t),t!==null&&Ch(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Uh(e,t,n,r,i){switch(t){case`focusin`:return Ph=Hh(Ph,e,t,n,r,i),!0;case`dragenter`:return Fh=Hh(Fh,e,t,n,r,i),!0;case`mouseover`:return Ih=Hh(Ih,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Lh.set(a,Hh(Lh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Rh.set(a,Hh(Rh.get(a)||null,e,t,n,r,i)),!0}return!1}function Wh(e){var t=Pt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,St(e.priority,function(){wh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,St(e.priority,function(){wh(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 Gh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=kh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Sn=r,n.target.dispatchEvent(r),Sn=null}else return t=Ft(n),t!==null&&Ch(t),e.blockedOn=n,!1;t.shift()}return!0}function Kh(e,t,n){Gh(e)&&n.delete(t)}function qh(){Nh=!1,Ph!==null&&Gh(Ph)&&(Ph=null),Fh!==null&&Gh(Fh)&&(Fh=null),Ih!==null&&Gh(Ih)&&(Ih=null),Lh.forEach(Kh),Rh.forEach(Kh)}function Jh(e,n){e.blockedOn===n&&(e.blockedOn=null,Nh||(Nh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,qh)))}var Yh=null;function Xh(e){Yh!==e&&(Yh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Yh===e&&(Yh=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(jh(r||n)===null)continue;break}var a=Ft(n);a!==null&&(e.splice(t,3),t-=3,ac(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Zh(e){function t(t){return Jh(t,e)}Ph!==null&&Jh(Ph,e),Fh!==null&&Jh(Fh,e),Ih!==null&&Jh(Ih,e),Lh.forEach(t),Rh.forEach(t);for(var n=0;n<zh.length;n++){var r=zh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<zh.length&&(n=zh[0],n.blockedOn===null);)Wh(n),n.blockedOn===null&&zh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Tt]||null;if(typeof a==`function`)o||Xh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Tt]||null)s=o.formAction;else if(jh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Xh(n)}}}function Qh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function $h(e){this._internalRoot=e}eg.prototype.render=$h.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;bh(n,Ud(),e,t,null,null)},eg.prototype.unmount=$h.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;bh(e.current,2,null,e,null,null),Zd(),t[Et]=null}};function eg(e){this._internalRoot=e}eg.prototype.unstable_scheduleHydration=function(e){if(e){var t=xt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<zh.length&&t!==0&&t<zh[n].priority;n++);zh.splice(n,0,e),n===0&&Wh(e)}};var tg=n.version;if(tg!==`19.3.0`)throw Error(i(527,tg,`19.3.0`));he.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var ng={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var rg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rg.isDisabled&&rg.supportsFiber)try{Ze=rg.inject(ng),Qe=rg}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Oc,s=kc,c=Ac;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=vh(e,1,!1,null,null,n,r,null,o,s,c,Qh),e[Et]=t.current,ip(e),new $h(t)}})),_=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,y=/^[\\/]{2}/;function b(e,t){return t+e.replace(/\\/g,`/`)}var x=`popstate`;function S(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function C(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return O(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:k(t)}return j(t,n,null,e)}function w(e,t){if(e===!1||e==null)throw Error(t)}function T(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function E(){return Math.random().toString(36).substring(2,10)}function D(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function O(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?A(t):t,state:n,key:t&&t.key||r||E(),mask:i}}function k({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function A(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function j(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=S(e)?e:O(h.location,e,t);n&&n(r,e),l=u()+1;let d=D(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=S(e)?e:O(h.location,e,t);n&&n(r,e),l=u();let i=D(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return M(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(x,d),c=e,()=>{i.removeEventListener(x,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function M(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),w(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:k(t);return i=i.replace(/ $/,`%20`),!n&&y.test(i)&&(i=r+i),new URL(i,r)}var N=l(d(),1),ee=class{#e=new Map;constructor(e){if(e)for(let[t,n]of e)this.set(t,n)}get(e){if(this.#e.has(e))return this.#e.get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){this.#e.set(e,t)}},P=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`,`unstable_validateParams`]);function F(e){return P.has(e)}var te=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`,`unstable_validateParams`]);function ne(e){return te.has(e)}function re(e){return e.index===!0}function ie(e){let t={};return e.Component&&Object.assign(t,{element:N.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:N.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:N.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function ae(e,t=ie,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(w(e.index!==!0||!e.children,`Cannot specify children on an index route`),w(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),re(e)){let n={...e,id:s};return r[s]=oe(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=oe(n,t(n)),e.children&&(n.children=ae(e.children,t,o,r,i)),n}})}function oe(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function se(e,t,n=`/`){return ce(e,t,n,!1)}function ce(e,t,n,r,i){let a=ke((typeof t==`string`?A(t):t).pathname||`/`,n);if(a==null)return null;let o=i??ue(e),s=null,c=Oe(a);for(let e=0;s==null&&e<o.length;++e)s=we(o[e],c,r);return s}function le(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function ue(e){let t=de(e);return pe(t),t}function de(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;w(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=ze([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(w(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),de(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:Se(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=De(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of fe(e.path))a(e,t,!0,n)}),t}function fe(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=fe(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function pe(e){e.sort((e,t)=>e.score===t.score?Ce(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var me=/^:[\w-]+$/,I=/^:[\w-]+/,he=3.5,ge=3,_e=2,ve=1,ye=10,be=-2,xe=e=>e===`*`;function Se(e,t){let n=e.split(`/`),r=n.length;return n.some(xe)&&(r+=be),t&&(r+=_e),n.filter(e=>!xe(e)).reduce((e,t)=>e+(me.test(t)?ge:I.test(t)?he:t===``?ve:ye),r)}function Ce(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function we(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Ee(u,l,s.matcher,s.compiledParams):Te(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Te({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:ze([a,d.pathname]),pathnameBase:Ve(ze([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=ze([a,d.pathnameBase]))}return o}function Te(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=De(e.path,e.caseSensitive,e.end);return Ee(e,t,n,r)}function Ee(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=Be(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=Be(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function De(e,t=!1,n=!0){T(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Oe(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return T(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ke(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Ae({basename:e,pathname:t}){return t===`/`?e:ze([e,t])}var je=e=>v.test(e);function Me(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?A(e):e,a;return n?(n=Re(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?Ne(n.substring(1),`/`):Ne(n,t)):a=t,{pathname:a,search:He(r),hash:Ue(i)}}function Ne(e,t){let n=Be(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Pe(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Fe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ie(e){let t=Fe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Le(e,t,n,r=!1){let i;typeof e==`string`?i=A(e):(i={...e},w(!i.pathname||!i.pathname.includes(`?`),Pe(`?`,`pathname`,`search`,i)),w(!i.pathname||!i.pathname.includes(`#`),Pe(`#`,`pathname`,`hash`,i)),w(!i.search||!i.search.includes(`#`),Pe(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Me(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Re=e=>e.replace(/[\\/]{2,}/g,`/`),ze=e=>Re(e.join(`/`));function Be(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var Ve=e=>Be(e).replace(/^\/*/,`/`),He=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ue=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,We=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],Ge=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ke(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function qe(e){return ze(e.map(e=>e.route.path).filter(Boolean))||`/`}function Je(e,t){let n=new URL(typeof e==`string`||e instanceof URL?e:e.url),r=typeof t==`string`?A(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);let i=e.toString();n.search=i?`?${i}`:``}else n.search=``;return n.hash=r.hash||``,n}var Ye=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Xe(e,t){let n=e;if(typeof n!=`string`||!v.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ye)try{let e=new URL(window.location.href),r=y.test(n)?new URL(b(n,e.protocol)):new URL(n),a=ke(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{T(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var Ze=Symbol(`Uninstrumented`),Qe=new WeakMap;function $e(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){e.lazy!=null&&n.lazy.push(e.lazy),e[`lazy.loader`]!=null&&n[`lazy.loader`].push(e[`lazy.loader`]),e[`lazy.action`]!=null&&n[`lazy.action`].push(e[`lazy.action`]),e[`lazy.middleware`]!=null&&n[`lazy.middleware`].push(e[`lazy.middleware`]),e.middleware!=null&&n.middleware.push(e.middleware),e.loader!=null&&n.loader.push(e.loader),e.action!=null&&n.action.push(e.action)}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=t.lazy;r.lazy=async(...t)=>at(await ot(n.lazy,void 0,()=>e(...t),st))}if(typeof t.lazy==`object`){let e=t.lazy;if(typeof e.middleware==`function`&&n[`lazy.middleware`].length>0){let t=e.middleware;r.lazy=Object.assign(r.lazy||{},{middleware:async(...e)=>at(await ot(n[`lazy.middleware`],void 0,()=>t(...e),st))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>at(await ot(n[`lazy.loader`],void 0,()=>t(...e),st))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>at(await ot(n[`lazy.action`],void 0,()=>t(...e),st))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=tt(t.loader),i=async(...t)=>at(await ot(n.loader,ct(t[0]),()=>e(...t),st));e.hydrate===!0&&(i.hydrate=!0),nt(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=tt(t.action),i=async(...t)=>at(await ot(n.action,ct(t[0]),()=>e(...t),st));nt(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=tt(e),r=async(...e)=>at(await ot(n.middleware,ct(e[0]),()=>t(...e),st));return nt(r,t),r})),r}function et(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){e.navigate!=null&&n.navigate.push(e.navigate),e.fetch!=null&&n.fetch.push(e.fetch)}})),n.navigate.length>0){let t=tt(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?k(i):`.`,...lt(e,a??{})};return at(await ot(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=rt(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...st(e),meta:o})))};nt(r,t),e.navigate=r}if(n.fetch.length>0){let t=tt(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return at(await ot(n.fetch,{href:o??`.`,fetcherKey:i,...lt(e,s??{})},async()=>{let n=rt(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...st(e),meta:c})))};nt(r,t),e.fetch=r}return e}function tt(e){return e[Ze]??e}function nt(e,t){e[Ze]=t}function rt(e,t){return Qe.set(e,t),()=>{Qe.get(e)===t&&Qe.delete(e)}}function it(e){let t=Qe.get(e);return Qe.delete(e),t}function at(e){if(e.type===`error`)throw e.value;return e.value}async function ot(e,t,n,r,i={result:null,innerResult:null},a=e.length-1){let o=e[a];if(o){let s,c=async()=>(s?console.error(`You cannot call instrumented handlers more than once`):s=ot(e,t,n,r,i,a-1),await s,w(i.innerResult,`Expected an inner result`),i.innerResult);try{await o(c,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}s||await c(),await s}else{try{i.result={type:`success`,value:await n()}}catch(e){i.result={type:`error`,value:e}}i.innerResult=r(i.result,t)}return i.result?i.result:(i.result={type:`error`,value:Error(`No result assigned in instrumentation chain.`)},i.innerResult=r(i.result,t),i.result)}function st(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function ct(e){let{request:t,context:n,params:r}=e;return{...e,request:ut(t),params:{...r},context:dt(n)}}function lt(e,t){return{currentUrl:k(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function ut(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function dt(e){return{get:t=>e.get(t)}}var ft=class{#e=[];#t=[];#n;constructor(e){this.#n=e}update(e){this.#e=e,this.#t=ue(e)}match(e,t=!1){return ce(this.#e,e,this.#n,t,this.#t)}},pt=new URL(`http://localhost`);function mt(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),pt)}catch{return pt}}function ht(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function gt(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function _t(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!ht(i,n),s=!ht(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!gt(e,i)||!ht(i,a)))throw Error(`External navigation is not allowed`)}var vt=[`POST`,`PUT`,`PATCH`,`DELETE`],yt=new Set(vt),bt=[`GET`,...vt],xt=new Set(bt),St=new Set([301,302,303,307,308]),Ct=new Set([307,308]),wt={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Tt={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Et={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Dt=`remix-router-transitions`,Ot=Symbol(`ResetLoaderData`);function kt(e,t){return e.unstable_routePatternMatching?(w(void 0,`You must call unstable_preloadRoutePattern() from "react-router/route-pattern" before enabling future.unstable_routePatternMatching.`),new(void 0)(t)):new ft(t)}var At=class{#e;#t;#n;constructor(e,t){this.#e=e,this.#n=t,this.#n.update(e)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#t??this.#e}get hasHMRRoutes(){return this.#t!=null}setRoutes(e){this.#e=e,this.#t||this.#n.update(e)}setHmrRoutes(e){this.#t=e,this.#n.update(e)}commitHmrRoutes(){this.#t&&(this.#e=this.#t,this.#t=void 0,this.#n.update(this.#e))}};function jt(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;w(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties,a=i||(()=>({}));if(e.instrumentations){let t=e.instrumentations;a=e=>({...i?.(e),...$e(t.map(e=>e.route).filter(Boolean),e)})}let o={...e.future},s=e.basename||`/`;s.startsWith(`/`)||(s=`/${s}`);let c=kt(o,s),l={},u=new At(ae(e.routes,a,void 0,l),c),d=e.dataStrategy||Jt,f=null,p=new Set,m=null,h=null,g=null,_=null,v=e.hydrationData!=null,b=c.match(e.history.location),x=!1,S=null,C,E;if(b==null&&!e.patchRoutesOnNavigation){let t=yn(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=vn(u.activeRoutes);C=!0,E=!C,b=n,S={[r.id]:t}}else if(b&&!e.hydrationData&&ut(b,e.history.location.pathname).active&&(b=null),!b){C=!1,E=!C,b=[];let t=ut(null,e.history.location.pathname);t.active&&t.matches&&(x=!0,b=t.matches)}else if(b.some(e=>e.route.lazy))C=!1,E=!C;else if(!b.some(e=>It(e.route)))C=!0,E=!C;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=b;if(n){let e=b.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}E=!1,C=!0,r.forEach(e=>{let r=Lt(e.route,t,n);E||=r.renderFallback,C&&=!r.shouldLoad})}let D,j={historyAction:e.history.action,location:e.history.location,matches:b,initialized:C,renderFallback:E,navigation:wt,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},N=`POP`,P=null,F=!1,te,ne=!1,re=new Map,ie=null,oe=!1,se=!1,ce=new Set,ue=new Map,de=0,fe=-1,pe=new Map,me=new Set,I=new Map,he=new Map,ge=new Set,_e=new Map,ve,ye=null;function be(){if(f=e.history.listen(({action:t,location:n,delta:r})=>{if(ve){ve(),ve=void 0;return}T(_e.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=rt({currentLocation:j.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{ve=e});e.history.go(r*-1),nt(i,{state:`blocked`,location:n,proceed(){nt(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(j.blockers);e.set(i,Et),Ce({blockers:e})}}),P?.resolve(),P=null;return}return De(t,n)}),n){Wn(t,re);let e=()=>Gn(t,re);t.addEventListener(`pagehide`,e),ie=()=>t.removeEventListener(`pagehide`,e)}return j.initialized||De(`POP`,j.location,{initialHydration:!0}),D}function xe(){f&&f(),ie&&ie(),p.clear(),te&&te.abort(),j.fetchers.forEach((e,t)=>Ge(j.fetchers,t)),j.blockers.forEach((e,t)=>tt(t))}function Se(e){if(p.add(e),m){let{newErrors:t}=m;m=null,e(j,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>p.delete(e)}function Ce(e,t={}){e.matches&&=e.matches.map(e=>{let t=l[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),j={...j,...e};let n=[],r=[];j.fetchers.forEach((e,t)=>{e.state===`idle`&&(ge.has(t)?n.push(t):r.push(t))}),ge.forEach(e=>{!j.fetchers.has(e)&&!ue.has(e)&&n.push(e)}),p.size===0&&(m={newErrors:e.errors??null}),[...p].forEach(r=>r(j,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ge(j.fetchers,e)),r.forEach(e=>j.fetchers.delete(e))}function we(t,n,{flushSync:r}={}){let i=j.actionData!=null&&j.navigation.formMethod!=null&&Pn(j.navigation.formMethod)&&j.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?j.actionData:null;let o=n.loaderData?hn(j.loaderData,n.loaderData,n.matches||[],n.errors):j.loaderData,s=j.blockers;s.size>0&&!oe&&(s=new Map(s),s.forEach((e,t)=>s.set(t,Et)));let c=!oe&&lt(t,n.matches||j.matches),l=F===!0||j.navigation.formMethod!=null&&Pn(j.navigation.formMethod)&&t.state?._isRedirect!==!0;u.commitHmrRoutes(),oe||N===`POP`||(N===`PUSH`?e.history.push(t,t.state):N===`REPLACE`&&e.history.replace(t,t.state));let d;if(N===`POP`&&!oe&&t!==j.location){let e=re.get(j.location.pathname);e&&e.has(t.pathname)?d={currentLocation:j.location,nextLocation:t}:re.has(t.pathname)&&(d={currentLocation:t,nextLocation:j.location})}else if(ne){let e=re.get(j.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),re.set(j.location.pathname,e)),d={currentLocation:j.location,nextLocation:t}}Ce({...n,actionData:a,loaderData:o,historyAction:N,location:t,initialized:!0,renderFallback:!1,navigation:wt,revalidation:`idle`,restoreScrollPosition:c,preventScrollReset:l,blockers:s},{viewTransitionOpts:d,flushSync:r===!0}),N=`POP`,F=!1,ne=!1,oe=!1,se=!1,P?.resolve(),P=null,ye?.resolve(),ye=null}async function Te(t,n){if(P?.resolve(),P=null,typeof t==`number`){P||=Kn();let n=P.promise;return e.history.go(t),n}let r=it(D),{path:i,submission:a,error:o}=Pt(!1,Nt(j.location,j.matches,s,t,n?.fromRouteId,n?.relative),n),c;if(n?.mask){let t=typeof n.mask==`string`?A(n.mask):{...j.location.mask,...n.mask};if(c={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},y.test(c.pathname))throw Error(`External navigation is not allowed`);c.pathname.startsWith(`\\`)&&(c.pathname=c.pathname.replace(/^\\+/,`/`)),_t(typeof n.mask==`string`?n.mask:k(n.mask),k(c),e.history.createURL(`/`),`reject`)}let l=j.location,u=O(l,i,n&&n.state,void 0,c);u={...u,...e.history.encodeLocation(u)},_t(t==null?e.history.createHref(j.location):typeof t==`string`?t:k(t),e.history.createHref(u.mask||u),e.history.createURL(`/`),`reject`);let d=n&&n.replace!=null?n.replace:void 0,f=`PUSH`;d===!0?f=`REPLACE`:d===!1||a!=null&&Pn(a.formMethod)&&a.formAction===j.location.pathname+j.location.search&&(f=`REPLACE`);let p=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,m=(n&&n.flushSync)===!0,h=rt({currentLocation:l,nextLocation:u,historyAction:f});if(h){nt(h,{state:`blocked`,location:u,proceed(){nt(h,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),Te(t,n)},reset(){let e=new Map(j.blockers);e.set(h,Et),Ce({blockers:e})}});return}await De(f,u,{submission:a,pendingError:o,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate,instrumentationNavigateMetaReceiver:r})}function Ee(){ye||=Kn(),Be(),Ce({revalidation:`loading`});let e=ye.promise;return j.navigation.state===`submitting`?e:j.navigation.state===`idle`?(De(j.historyAction,j.location,{startUninterruptedRevalidation:!0}),e):(De(N||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation,enableViewTransition:ne===!0}),e)}async function De(t,n,r){te&&te.abort(),te=null,N=t,oe=(r&&r.startUninterruptedRevalidation)===!0,ct(j.location,j.matches),F=(r&&r.preventScrollReset)===!0,ne=(r&&r.enableViewTransition)===!0;let i=r?.initialHydration&&j.matches&&j.matches.length>0&&!x?j.matches:c.match(n),a=(r&&r.flushSync)===!0;if(i&&j.initialized&&!se&&Sn(j.location,n)&&!(r&&r.submission&&Pn(r.submission.formMethod))){we(n,{matches:i},{flushSync:a});return}let o=ut(i,n.pathname);if(o.active&&o.matches&&(i=o.matches),r?.instrumentationNavigateMetaReceiver){let t=Ln(e.history,n,i);r.instrumentationNavigateMetaReceiver(t)}if(!i){let{error:e,notFoundMatches:t,route:r}=at(n.pathname);we(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:a});return}let s=r&&r.overrideNavigation?{...r.overrideNavigation,matches:i,historyAction:t}:void 0;te=new AbortController;let l=un(e.history,n,te.signal,r&&r.submission),u=e.getContext?await e.getContext():new ee,d;if(r&&r.pendingError)d=[_n(i).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Pn(r.submission.formMethod)){let c=await Oe(l,n,r.submission,i,t,u,o.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:a});if(c.shortCircuited)return;if(c.pendingActionResult){let[e,t]=c.pendingActionResult;if(Dn(t)&&Ke(t.error)&&t.error.status===404){te=null,we(n,{matches:c.matches,loaderData:{},errors:{[e]:t.error}});return}}i=c.matches||i,d=c.pendingActionResult,s=zn(n,i,t,r.submission),a=!1,o.active=!1,l=un(e.history,l.url,l.signal)}let{shortCircuited:f,matches:p,loaderData:m,errors:h,workingFetchers:g}=await Ae(l,n,i,t,u,o.active,s,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,a,d,r&&r.callSiteDefaultShouldRevalidate);f||(te=null,we(n,{matches:p||i,...gn(d),loaderData:m,errors:h,...g?{fetchers:g}:{}}))}async function Oe(t,n,i,o,c,d,f,p,m={}){if(Be(),Ce({navigation:Bn(n,o,c,i)},{flushSync:m.flushSync===!0}),f){let e=await dt(o,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=vn(u.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=_n(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)o=e.matches;else{let{notFoundMatches:e,error:t,route:r}=at(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=In(o,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:yn(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Re(t,n,en(a,l,t,n,o,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of o)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(On(h)){let n;return n=m&&m.replace!=null?m.replace:ln(h.response.headers.get(`Location`),new URL(t.url),s,e.history)===j.location.pathname+j.location.search,await Le(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(Dn(h)){let e=_n(o,g.route.id);return(m&&m.replace)!==!0&&(N=`PUSH`),{matches:o,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:o,pendingActionResult:[g.route.id,h]}}async function Ae(t,n,i,o,s,d,f,p,m,h,g,_,v,y){let b=f||zn(n,i,o,p),x=p||m||Rn(b),S=!oe&&!g;if(d){if(S){let e=Me(v);Ce({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await dt(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=vn(u.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=_n(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=at(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let{dsMatches:C,revalidatingFetchers:w}=Ft(t,s,a,l,e.history,j,i,x,n,g?[]:r,g===!0,se,ce,ge,I,me,c,v,y);if(fe=++de,!e.dataStrategy&&!C.some(e=>e.shouldLoad)&&!C.some(e=>e.route.middleware&&e.route.middleware.length>0)&&w.length===0){let e=new Map(j.fetchers),t=Xe(e);return we(n,{matches:i,loaderData:{},errors:v&&Dn(v[1])?{[v[0]]:v[1].error}:null,...gn(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Me(v);t!==void 0&&(e.actionData=t)}w.length>0&&(e.fetchers=Ne(w)),Ce(e,{flushSync:_})}w.forEach(e=>{Je(e.key),e.controller&&ue.set(e.key,e.controller)});let T=()=>w.forEach(e=>Je(e.key));te&&te.signal.addEventListener(`abort`,T);let{loaderResults:E,fetcherResults:D}=await ze(C,w,t,n,s);if(t.signal.aborted)return{shortCircuited:!0};te&&te.signal.removeEventListener(`abort`,T),w.forEach(e=>ue.delete(e.key));let O=bn(E);if(O)return await Le(t,O.result,!0,{replace:h}),{shortCircuited:!0};if(O=bn(D),O)return me.add(O.key),await Le(t,O.result,!0,{replace:h}),{shortCircuited:!0};let k=new Map(j.fetchers),{loaderData:A,errors:M}=mn(j,i,E,v,w,D,k);g&&j.errors&&(M={...j.errors,...M});let N=Xe(k),ee=Ze(fe,k),P=N||ee||w.length>0;return{matches:i,loaderData:A,errors:M,...P?{workingFetchers:k}:{}}}function Me(e){if(e&&!Dn(e[1]))return{[e[0]]:e[1].data};if(j.actionData)return Object.keys(j.actionData).length===0?null:j.actionData}function Ne(e){let t=new Map(j.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=Vn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Pe(t,n,r,i){Je(t);let a=(i&&i.flushSync)===!0,o=it(D),l=Nt(j.location,j.matches,s,r,n,i?.relative),u=c.match(l),d=ut(u,l);if(d.active&&d.matches&&(u=d.matches),o&&o(Ln(e.history,l,u)),!u){He(t,n,yn(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=Pt(!0,l,i);if(m){He(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new ee,g=(i&&i.preventScrollReset)===!0;if(p&&Pn(p.formMethod)){await Fe(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate);return}let _={routeId:n,path:f,isDiscovering:d.active};I.set(t,_),await Ie(t,_,u,h,a,g,p)}async function Fe(t,n,i,o,s,u,d,f,p,m){Be(),I.delete(t),Ve(t,Hn(p,j.fetchers.get(t)),{flushSync:d});let h=new AbortController,g=un(e.history,i,h.signal,p);if(u){let e=await dt(o,new URL(g.url).pathname,g.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){He(t,n,e.error,{flushSync:d});return}if(e.matches)o=e.matches;else{He(t,n,yn(404,{pathname:i}),{flushSync:d});return}}let _=In(o,i);if(!_.route.action&&!_.route.lazy){He(t,n,yn(405,{method:p.formMethod,pathname:i,routeId:n}),{flushSync:d});return}ue.set(t,h);let v=de,y=en(a,l,g,i,o,_,r,s),b=await Re(g,i,y,s,t),x=b[_.route.id];if(!x){for(let e of y)if(b[e.route.id]){x=b[e.route.id];break}}if(g.signal.aborted){ue.get(t)===h&&ue.delete(t);return}if(ge.has(t)){if(On(x)||Dn(x)){Ve(t,Un(void 0));return}}else{if(On(x)){if(ue.delete(t),fe>v){Ve(t,Un(void 0));return}return me.add(t),Ve(t,Vn(p)),Le(g,x,!1,{fetcherSubmission:p,preventScrollReset:f})}if(Dn(x)){He(t,n,x.error);return}}let S=j.navigation.location||j.location,C=un(e.history,S,h.signal),T=j.navigation.state===`idle`?j.matches:c.match(j.navigation.location);w(T,`Didn't find any matches after fetcher action`);let E=++de;pe.set(t,E);let{dsMatches:D,revalidatingFetchers:O}=Ft(C,s,a,l,e.history,j,T,p,S,r,!1,se,ce,ge,I,me,c,[_.route.id,x],m),k=Vn(p,x.data),A=new Map(j.fetchers);A.set(t,k),O.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=A.get(t),r=Vn(void 0,n?n.data:void 0);A.set(t,r),Je(t),e.controller&&ue.set(t,e.controller)}),Ce({fetchers:A});let M=()=>O.forEach(e=>Je(e.key));h.signal.addEventListener(`abort`,M);let{loaderResults:ee,fetcherResults:P}=await ze(D,O,C,S,s);if(h.signal.aborted){pe.get(t)===E&&pe.delete(t);return}h.signal.removeEventListener(`abort`,M),pe.delete(t),ue.delete(t),O.forEach(e=>ue.delete(e.key));let F=j.fetchers.has(t),ne=e=>{if(!F)return e;let n=new Map(e.fetchers);return n.set(t,Un(x.data)),{...e,fetchers:n}},re=bn(ee);if(re)return j=ne(j),Le(C,re.result,!1,{preventScrollReset:f});if(re=bn(P),re)return me.add(re.key),j=ne(j),Le(C,re.result,!1,{preventScrollReset:f});let ie=new Map(j.fetchers);F&&ie.set(t,Un(x.data));let{loaderData:ae,errors:oe}=mn(j,T,ee,void 0,O,P,ie);Ze(E,ie),j.navigation.state===`loading`&&E>fe?(w(N,`Expected pending action`),te&&te.abort(),we(j.navigation.location,{matches:T,loaderData:ae,errors:oe,fetchers:ie})):(Ce({errors:oe,loaderData:hn(j.loaderData,ae,T,oe),fetchers:ie}),se=!1)}async function Ie(t,n,i,o,s,c,u){let{routeId:d,path:f}=n,p=j.fetchers.get(t);Ve(t,Vn(u,p?p.data:void 0),{flushSync:s});let m=new AbortController,h=un(e.history,f,m.signal);if(n.isDiscovering){let e=await dt(i,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){He(t,d,e.error,{flushSync:s});return}if(e.matches)i=e.matches,n.isDiscovering=!1;else{He(t,d,yn(404,{pathname:f}),{flushSync:s});return}}let g=In(i,f);ue.set(t,m);let _=de,v=await Re(h,f,en(a,l,h,f,i,g,r,o),o,t),y=v[g.route.id];if(!y){for(let e of i)if(v[e.route.id]){y=v[e.route.id];break}}if(ue.get(t)===m&&ue.delete(t),!h.signal.aborted){if(ge.has(t)){Ve(t,Un(void 0));return}if(On(y)){if(fe>_){Ve(t,Un(void 0));return}me.add(t),await Le(h,y,!1,{preventScrollReset:c});return}if(Dn(y)){He(t,d,y.error);return}Ve(t,Un(y.data))}}async function Le(r,i,a,{submission:o,fetcherSubmission:c,preventScrollReset:l,replace:u}={}){a||(P?.resolve(),P=null),i.response.headers.has(`X-Remix-Revalidate`)&&(se=!0);let d=i.response.headers.get(`Location`);w(d,`Expected a Location header on the redirect Response`);let f=d,p=new URL(r.url);d=ln(d,p,s,e.history),_t(f,d,p,`allow-explicit`);let m=O(j.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(je(d)){let n=M(t,d,!0);e=n.origin!==t.location.origin||ke(n.pathname,s)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}te=null;let h=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:g,formAction:_,formEncType:v}=j.navigation;!o&&!c&&g&&_&&v&&(o=Rn(j.navigation));let y=o||c;Ct.has(i.response.status)&&y&&Pn(y.formMethod)?await De(h,m,{submission:{...y,formAction:d},preventScrollReset:l||F,enableViewTransition:a?ne:void 0}):await De(h,m,{overrideNavigation:zn(m,[],h,o),fetcherSubmission:c,preventScrollReset:l||F,enableViewTransition:a?ne:void 0})}async function Re(e,t,n,r,i){let a,o={};try{a=await tn(d,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!Pn(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!j.loaderData.hasOwnProperty(e.route.id)&&(!j.errors||!j.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(En(r)){let i=r.result;o[t]={type:`redirect`,response:on(i,e,t,n,s)}}else o[t]=await an(r);return o}async function ze(e,t,n,r,i){let a=Re(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Re(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:yn(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Be(){se=!0,I.forEach((e,t)=>{ue.has(t)&&ce.add(t),Je(t)})}function Ve(e,t,n={}){let r=new Map(j.fetchers);r.set(e,t),Ce({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function He(e,t,n,r={}){let i=_n(j.matches,t),a=new Map(j.fetchers);Ge(a,e),Ce({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Ue(e){return he.set(e,(he.get(e)||0)+1),ge.has(e)&&ge.delete(e),j.fetchers.get(e)||Tt}function We(e,t){Je(e,t?.reason),Ve(e,Un(null))}function Ge(e,t){let n=j.fetchers.get(t);ue.has(t)&&!(n&&n.state===`loading`&&pe.has(t))&&Je(t),I.delete(t),pe.delete(t),me.delete(t),ge.delete(t),ce.delete(t),e.delete(t)}function qe(e){let t=(he.get(e)||0)-1;t<=0?(he.delete(e),ge.add(e)):he.set(e,t),Ce({fetchers:new Map(j.fetchers)})}function Je(e,t){let n=ue.get(e);n&&(n.abort(t),ue.delete(e))}function Ye(e,t){for(let n of e){let e=t.get(n);w(e,`Expected fetcher: ${n}`);let r=Un(e.data);t.set(n,r)}}function Xe(e){let t=[],n=!1;for(let r of me){let i=e.get(r);w(i,`Expected fetcher: ${r}`),i.state===`loading`&&(me.delete(r),t.push(r),n=!0)}return Ye(t,e),n}function Ze(e,t){let n=[];for(let[r,i]of pe)if(i<e){let e=t.get(r);w(e,`Expected fetcher: ${r}`),e.state===`loading`&&(Je(r),pe.delete(r),n.push(r))}return Ye(n,t),n.length>0}function Qe(e,t){let n=j.blockers.get(e)||Et;return _e.get(e)!==t&&_e.set(e,t),n}function tt(e){j.blockers.delete(e),_e.delete(e)}function nt(e,t){let n=j.blockers.get(e)||Et;w(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(j.blockers);r.set(e,t),Ce({blockers:r})}function rt({currentLocation:e,nextLocation:t,historyAction:n}){if(_e.size===0)return;_e.size>1&&T(!1,`A router only supports one blocker at a time`);let r=Array.from(_e.entries()),[i,a]=r[r.length-1],o=j.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function at(e){let t=yn(404,{pathname:e}),n=u.activeRoutes,{matches:r,route:i}=vn(n);return{notFoundMatches:r,route:i,error:t}}function ot(e,t,n){if(h=e,_=t,g=n||null,!v&&j.navigation===wt){v=!0;let e=lt(j.location,j.matches);e!=null&&Ce({restoreScrollPosition:e})}return()=>{h=null,_=null,g=null}}function st(e,t){return g&&g(e,t.map(e=>le(e,j.loaderData)))||e.key}function ct(e,t){if(h&&_){let n=st(e,t);h[n]=_()}}function lt(e,t){if(h){let n=st(e,t),r=h[n];if(typeof r==`number`)return r}return null}function ut(t,n){if(e.patchRoutesOnNavigation){if(!t)return{active:!0,matches:c.match(n,!0)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:c.match(n,!0)}}return{active:!1,matches:null}}async function dt(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let o=t;for(;;){let t=l;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:o,fetcherKey:i,patch:(e,n)=>{r.aborted||Vt(e,n,u,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:o}}if(r.aborted)return{type:`aborted`};let s=c.match(n),d=null;if(s&&(Object.keys(s[0].params).length===0||(d=c.match(n,!0),!(d&&o.length<d.length&&ft(o,d.slice(0,o.length))))))return{type:`success`,matches:s};if(d||=c.match(n,!0),!d||ft(o,d))return{type:`success`,matches:null};o=d}}function ft(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function pt(e){l={},u.setHmrRoutes(ae(e,a,void 0,l))}function mt(e,t,n=!1){Vt(e,t,u,l,a,n),u.hasHMRRoutes||Ce({})}return D={get basename(){return s},get future(){return o},get state(){return j},get routes(){return u.stableRoutes},match(e){return c.match(e)},get manifest(){return l},get window(){return t},initialize:be,subscribe:Se,enableScrollRestoration:ot,navigate:Te,fetch:Pe,revalidate:Ee,createHref:t=>e.history.createHref(t),createURL:t=>e.history.createURL(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ue,resetFetcher:We,deleteFetcher:qe,dispose:xe,getBlocker:Qe,deleteBlocker:tt,patchRoutes:mt,_internalFetchControllers:ue,_internalSetRoutes:pt,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){Ce(e)}},e.instrumentations&&(D=et(D,e.instrumentations.map(e=>e.router).filter(Boolean))),D}function Mt(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Nt(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Le(r||`.`,Ie(o),ke(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=Fn(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=Ae({basename:n,pathname:c.pathname})),k(c)}function Pt(e,t,n){if(!n||!Mt(n))return{path:t};if(n.formMethod&&!Nn(n.formMethod))return{path:t,error:yn(405,{method:n.formMethod})};let r=()=>({path:t,error:yn(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=xn(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Pn(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}\n`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!Pn(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}w(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=dn(n.formData),s=n.formData;else if(n.body instanceof FormData)o=dn(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=fn(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=fn(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Pn(c.formMethod))return{path:t,submission:c};let l=A(t);return e&&l.search&&Fn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:k(l),submission:c}}function Ft(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v){let y=_?Dn(_[1])?_[1].error:_[1].data:void 0,b=i.createURL(a.location),x=i.createURL(c),S;if(u&&a.errors){let e=Object.keys(a.errors)[0];S=o.findIndex(t=>t.route.id===e)}else if(_&&Dn(_[1])){let e=_[0];S=o.findIndex(t=>t.route.id===e)-1}let C=_?_[1].statusCode:void 0,w=C&&C>=400,T={currentUrl:b,currentParams:a.matches[0]?.params||{},nextUrl:x,nextParams:o[0].params,...s,actionResult:y,actionStatus:C},E=qe(o),D=o.map((i,o)=>{let{route:s}=i,f=null;if(S!=null&&o>S)f=!1;else if(s.lazy)f=!0;else if(!It(s))f=!1;else if(u){let{shouldLoad:e}=Lt(s,a.loaderData,a.errors);f=e}else Rt(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return $t(n,r,e,c,E,i,l,t,f);let p=!1;typeof v==`boolean`?p=v:w?p=!1:d||b.pathname+b.search===x.pathname+x.search?p=!0:b.search===x.search?zt(a.matches[o],i)&&(p=!0):p=!0;let m={...T,defaultShouldRevalidate:p};return $t(n,r,e,c,E,i,l,t,Bt(i,m),m,v)}),O=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s)||e.isDiscovering)return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,_=g.match(e.path);if(!_){O.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let y=In(_,e.path),b=new AbortController,x=un(i,e.path,b.signal),S=null;if(f.has(s))f.delete(s),S=en(n,r,x,e.path,_,y,l,t);else if(m)d&&(S=en(n,r,x,e.path,_,y,l,t));else{let i;i=typeof v==`boolean`?v:!w&&d;let a={...T,defaultShouldRevalidate:i};Bt(y,a)&&(S=en(n,r,x,e.path,_,y,l,t,a))}S&&O.push({key:s,routeId:e.routeId,path:e.path,matches:S,match:y,request:x,controller:b})}),{dsMatches:D,revalidatingFetchers:O}}function It(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Lt(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!It(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function Rt(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function zt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Bt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Vt(e,t,n,r,i,a){let o;if(e){let t=r[e];w(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>Ht(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=ae(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=ae([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function Ht(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index!==t.index||e.path!==t.path||e.caseSensitive!==t.caseSensitive?!1:(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>Ht(e,t)))??!1}var Ut=new WeakMap,Wt=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(w(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=Ut.get(i);o||(o={},Ut.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=F(e),n=i[e]!==void 0;if(t)T(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)T(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},Gt=new WeakMap;function Kt(e,t,n,r,i){let a=n[e.id];if(w(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=Gt.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{w(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=ne(e),o=a[e]!==void 0;i?T(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?T(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return Gt.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=Wt({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function qt(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Jt(e){return e.matches.some(e=>e.route.middleware)?Yt(e,()=>qt(e)):qt(e)}function Yt(e,t){return Xt(e,t,e=>{if(Mn(e))throw e;return e},wn,n);async function n(t,n,r){if(r)return Object.assign(r.value,{[n]:{type:`error`,result:t}});{let{matches:r}=e,i=Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0)),a=r[i].route.id;for(let e of r.slice(0,i+1))try{await e._lazyPromises?.route}catch{a=e.route.id;break}return{[_n(r,a).route.id]:{type:`error`,result:t}}}}}async function Xt(e,t,n,r,i){let{matches:a,...o}=e;return await Zt(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Zt(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await Zt(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function Qt(e,t,n,r,i){let a=Wt({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=Kt(r.route,Pn(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function $t(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=Qt(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Bt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Bt(a,{...l,defaultShouldRevalidate:e}):Bt(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Pn(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Pn(n.method)||!p)?nn({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function en(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?$t(e,t,n,r,qe(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Qt(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function tn(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:Je(t,n),pattern:qe(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return Yt(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function nn({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Pn(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:Je(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw yn(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)c=await f(t);else{let t=new URL(e.url);throw yn(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function rn(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function an(e){let{result:t,type:n}=e;if(An(t)){let e;try{e=await rn(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new Ge(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?kn(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:Cn(t),statusCode:Ke(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Ke(t)?t.status:void 0}:kn(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function on(e,t,n,r,i){let a=e.headers.get(`Location`);if(w(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!je(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Nt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var sn=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function cn(e){try{return sn.includes(new URL(e).protocol)}catch{return!1}}function ln(e,t,n,r){if(je(e)){let r=e,i=y.test(r)?new URL(b(r,t.protocol)):new URL(r);if(cn(i.toString()))throw Error(`Invalid redirect location`);let a=ke(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Re(i.pathname)+i.search+i.hash}try{if(cn(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function un(e,t,n,r){let i=e.createURL(xn(t)).toString(),a={signal:n};if(r&&Pn(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?dn(r.formData):r.formData}return new Request(i,a)}function dn(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function fn(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function pn(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&Dn(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(w(!On(f),`Cannot handle redirect results in processLoaderData`),Dn(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=_n(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=Ot),c||(c=!0,s=Ke(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function mn(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=pn(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(w(s,`Did not find corresponding fetcher result`),Dn(s)){let t=_n(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(On(s))w(!1,`Unhandled fetcher revalidation redirect`);else{let e=Un(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function hn(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==Ot).reduce((e,[t,n])=>(e[t]=n,e),{}),a=0;for(let o of n){let n=o.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&o.route.loader&&(i[n]=e[n],a++),r&&r.hasOwnProperty(n))break}return Object.keys(t).length===0&&a===Object.keys(e).length?e:i}function gn(e){return e?Dn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function _n(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.ErrorBoundary!=null||e.route.errorElement!=null)||e[0]}function vn(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function yn(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new Ge(e||500,o,Error(s),!0)}function bn(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(On(r))return{key:n,result:r}}}function xn(e){return k({...typeof e==`string`?A(e):e,hash:``})}function Sn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function Cn(e){return new Ge(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function wn(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&Tn(t))}function Tn(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function En(e){return An(e.result)&&St.has(e.result.status)}function Dn(e){return e.type===`error`}function On(e){return(e&&e.type)===`redirect`}function kn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function An(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function jn(e){return St.has(e)}function Mn(e){return An(e)&&jn(e.status)&&e.headers.has(`Location`)}function Nn(e){return xt.has(e.toUpperCase())}function Pn(e){return yt.has(e.toUpperCase())}function Fn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function In(e,t){let n=typeof t==`string`?A(t).search:t.search;if(e[e.length-1].route.index&&Fn(n||``))return e[e.length-1];let r=Fe(e);return r[r.length-1]}function Ln(e,t,n){return{url:Je(e.createURL(t),t),pattern:n?qe(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function Rn(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(t&&n&&r){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function zn(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Bn(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function Vn(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Hn(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Un(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Wn(e,t){try{let n=e.sessionStorage.getItem(Dt);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function Gn(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Dt,JSON.stringify(n))}catch(e){T(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function Kn(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var qn=N.createContext(null);qn.displayName=`DataRouter`;var Jn=N.createContext(null);Jn.displayName=`DataRouterState`;var Yn=N.createContext(null);Yn.displayName=`DataRouterData`;var Xn=N.createContext(null);Xn.displayName=`DataRouterNavigation`;var Zn=N.createContext(!1);function Qn(){return N.useContext(Zn)}var $n=N.createContext({isTransitioning:!1});$n.displayName=`ViewTransition`;var er=N.createContext(null);er.displayName=`Fetchers`;var tr=N.createContext(null);tr.displayName=`Await`;var nr=N.createContext(null);nr.displayName=`Navigation`;var rr=N.createContext(null);rr.displayName=`Location`;var ir=N.createContext({outlet:null,matches:[],isDataRoute:!1});ir.displayName=`Route`;var ar=N.createContext(!1);ar.displayName=`IsDataRoute`;var or=N.createContext(void 0);or.displayName=`RouteId`;var sr=N.createContext(null);sr.displayName=`RouteError`;var cr=`REACT_ROUTER_ERROR`,lr=`REDIRECT`,ur=`ROUTE_ERROR_RESPONSE`;function dr(e){if(e.startsWith(`${cr}:${lr}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function fr(e){if(e.startsWith(`${cr}:${ur}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ge(t.status,t.statusText,t.data)}catch{}}function pr(e,{relative:t}={}){w(mr(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=N.useContext(nr),{hash:i,pathname:a,search:o}=Sr(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:ze([n,a])),r.createHref({pathname:s,search:o,hash:i})}function mr(){return N.useContext(rr)!=null}function hr(){return w(mr(),`useLocation() may be used only in the context of a <Router> component.`),N.useContext(rr).location}var gr=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function _r(){return N.useContext(ar)?Br():vr()}function vr(){w(mr(),`useNavigate() may be used only in the context of a <Router> component.`);let e=N.useContext(qn),{basename:t,navigator:n}=N.useContext(nr),{matches:r}=N.useContext(ir),{pathname:i}=hr(),a=JSON.stringify(Ie(r)),o=N.useRef(!1);return N.useLayoutEffect(()=>{o.current=!0}),N.useCallback((r,s={})=>{if(T(o.current,gr),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Le(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:ze([t,c.pathname])),_t(typeof r==`string`?r:k(r),n.createHref(c),mt(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var yr=N.createContext(null);function br(e){let t=N.useContext(ir).outlet;return N.useMemo(()=>t&&N.createElement(yr.Provider,{value:e},t),[t,e])}function xr(){let{matches:e}=N.useContext(ir);return e[e.length-1]?.params??{}}function Sr(e,{relative:t}={}){let{matches:n}=N.useContext(ir),{pathname:r}=hr(),i=JSON.stringify(Ie(n));return N.useMemo(()=>Le(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Cr(e,t,n){w(mr(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=N.useContext(nr),{matches:i}=N.useContext(ir),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=hr(),l;if(t){let e=typeof t==`string`?A(t):t;w(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f;f=n?n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):n.router.match(n.state.location):se(e,{pathname:d});let p=Ar(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:ze([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:ze([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?N.createElement(rr.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function wr(){let e=zr(),t=Ke(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return N.createElement(N.Fragment,null,N.createElement(`h2`,null,`Unexpected Application Error!`),N.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?N.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Tr=N.createElement(wr,null),Er=class extends N.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=Zn;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=fr(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:N.createElement(ir.Provider,{value:this.props.routeContext},N.createElement(ar.Provider,{value:this.props.routeContext.isDataRoute},N.createElement(or.Provider,{value:this.props.routeContext.matches[this.props.routeContext.matches.length-1]?.route.id},N.createElement(sr.Provider,{value:e,children:this.props.component}))));return this.context?N.createElement(Or,{error:e},t):t}},Dr=new WeakMap;function Or({children:e,error:t}){let{basename:n,navigator:r}=N.useContext(nr);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=dr(t.digest);if(e){let i=Dr.get(t);if(i)throw i;let a=Xe(e.location,n),o=a.absoluteURL||a.to;if(_t(e.location,o,mt(r),`allow-explicit`),cn(o))throw Error(`Invalid redirect location`);if(Ye&&!Dr.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Dr.set(t,n),n}}return N.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function kr({routeContext:e,match:t,children:n}){let r=N.useContext(qn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),N.createElement(ir.Provider,{value:e},N.createElement(ar.Provider,{value:e.isDataRoute},N.createElement(or.Provider,{value:t.route.id},n)))}function Ar(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);w(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:qe(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Tr,o&&(s<0&&c===0?(Hr(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?N.createElement(n.route.Component,null):n.route.element?n.route.element:e,N.createElement(kr,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?N.createElement(Er,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function jr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Mr(e){let t=N.useContext(qn);return w(t,jr(e)),t}function Nr(e){let t=N.useContext(Jn);return w(t,jr(e)),t}function Pr(e){let t=N.useContext(Yn);return w(t,jr(e)),t}function Fr(e){let t=N.useContext(Xn);return w(t,jr(e)),t}function Ir(e){let t=N.useContext(or);return w(t,`${e} can only be used on routes that contain a unique "id"`),t}function Lr(){let{navigation:e}=Fr(`useNavigation`);return N.useMemo(()=>{let{matches:t,historyAction:n,...r}=e;return r},[e])}function Rr(){let{matches:e}=Nr(`useMatches`),{loaderData:t}=Pr(`useMatches`);return N.useMemo(()=>e.map(e=>le(e,t)),[e,t])}function zr(){let e=N.useContext(sr),t=Pr(`useRouteError`),n=Ir(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Br(){let{router:e}=Mr(`useNavigate`),t=Ir(`useNavigate`),n=N.useRef(!1);return N.useLayoutEffect(()=>{n.current=!0}),N.useCallback(async(r,i={})=>{T(n.current,gr),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Vr={};function Hr(e,t,n){!t&&!Vr[e]&&(Vr[e]=!0,T(!1,n))}var Ur={};function Wr(e,t){!e&&!Ur[t]&&(Ur[t]=!0,console.warn(t))}var Gr=[`HydrateFallback`,`hydrateFallbackElement`],Kr=class{status=`pending`;promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function qr({router:e,flushSync:t,onError:n,useTransitions:r}){r=Qn()||r;let[i,a]=N.useState(e.state),[o,s]=(0,N.useOptimistic)(i),[c,l]=N.useState(),[u,d]=N.useState({isTransitioning:!1}),[f,p]=N.useState(),[m,h]=N.useState(),[g,_]=N.useState(),v=N.useRef(new Map),y=N.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:qe(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),Wr(u===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let y=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(Wr(g==null||y,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!g||!y){t&&u?t(()=>a(i)):r===!1?a(i):N.startTransition(()=>{r===!0&&s(e=>Jr(e,i)),a(i)});return}if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>h(n));return}m?(f?.resolve(),m.skipTransition(),_({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,m,f,r,s,n]);N.useLayoutEffect(()=>e.subscribe(y),[e,y]),N.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new Kr)},[u]),N.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):N.startTransition(()=>{r===!0&&s(e=>Jr(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})}),h(i)}},[c,f,e.window,r,s]),N.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),N.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),_(void 0))},[u.isTransitioning,g]);let b=N.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),x=e.basename||`/`,S=N.useMemo(()=>({router:e,navigator:b,static:!1,basename:x,onError:n}),[e,b,x,n]),C=N.useMemo(()=>({historyAction:o.historyAction,location:o.location,matches:o.matches,initialized:o.initialized,renderFallback:o.renderFallback,restoreScrollPosition:o.restoreScrollPosition,preventScrollReset:o.preventScrollReset,blockers:o.blockers}),[o.historyAction,o.location,o.matches,o.initialized,o.renderFallback,o.restoreScrollPosition,o.preventScrollReset,o.blockers]),w=N.useMemo(()=>({navigation:o.navigation,revalidation:o.revalidation}),[o.navigation,o.revalidation]),T=N.useMemo(()=>({loaderData:o.loaderData,actionData:o.actionData,errors:o.errors}),[o.loaderData,o.actionData,o.errors]),E=N.useMemo(()=>({fetchers:o.fetchers,fetcherData:v.current}),[o.fetchers]);return N.createElement(N.Fragment,null,N.createElement(qn.Provider,{value:S},N.createElement(Jn.Provider,{value:C},N.createElement(Xn.Provider,{value:w},N.createElement(Yn.Provider,{value:T},N.createElement(er.Provider,{value:E},N.createElement($n.Provider,{value:u},N.createElement($r,{basename:x,location:o.location,navigationType:o.historyAction,navigator:b,useTransitions:r},N.createElement(Yr,{routes:e.routes,manifest:e.manifest,state:o,isStatic:!1,onError:n})))))))),null)}function Jr(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var Yr=N.memo(Xr);function Xr({routes:e,manifest:t,state:n,isStatic:r,onError:i}){let a=N.useContext(qn);return w(a,`You must render this element inside a <DataRouterContext.Provider> element`),Cr(e,void 0,{router:a.router,manifest:t,state:n,isStatic:r,onError:i})}function Zr({to:e,replace:t,state:n,relative:r}){w(mr(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=N.useContext(nr);T(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=N.useContext(ir),{pathname:s}=hr(),c=_r(),l=Le(e,Ie(o),s,r===`path`);_t(typeof e==`string`?e:k(e),a.createHref(l),mt(a),`reject`);let u=JSON.stringify(l);return N.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function Qr(e){return br(e.context)}function $r({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){w(!mr(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=N.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=A(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=N.useMemo(()=>{let e=ke(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return T(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:N.createElement(nr.Provider,{value:c},N.createElement(rr.Provider,{children:t,value:h}))}N.Component;var ei=`application/x-www-form-urlencoded`;function ti(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function ni(e){return ti(e)&&e.tagName.toLowerCase()===`button`}function ri(e){return ti(e)&&e.tagName.toLowerCase()===`form`}function ii(e){return ti(e)&&e.tagName.toLowerCase()===`input`}function ai(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function oi(e,t){return e.button===0&&(!t||t===`_self`)&&!ai(e)}function si(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function ci(e,t){let n=si(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var li=null;function ui(){if(li===null)try{new FormData(document.createElement(`form`),0),li=!1}catch{li=!0}return li}var di=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function fi(e){return e!=null&&!di.has(e)?(T(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ei}"`),null):e}function pi(e,t){let n,r,i,a,o;if(ri(e)){let o=e.getAttribute(`action`);r=o?ke(o,t):null,n=e.getAttribute(`method`)||`get`,i=fi(e.getAttribute(`enctype`))||ei,a=new FormData(e)}else if(ni(e)||ii(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?ke(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=fi(e.getAttribute(`formenctype`))||fi(o.getAttribute(`enctype`))||ei,a=new FormData(o,e),!ui()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(ti(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=ei,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function mi(e,t){if(e===!1||e==null)throw Error(t)}var hi={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},gi=/[&><\u2028\u2029]/g;function _i(e){return e.replace(gi,e=>hi[e])}function vi(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname=n.pathname.endsWith(`/`)?`${n.pathname}_.${t}`:`${n.pathname}.${t}`,n}var yi=l(h(),1),bi=l(_(),1),xi=`modulepreload`,Si=function(e){return`/`+e},Ci={},wi=function(e){return e.pathname.endsWith(`.css`)},Ti=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=Si(t,n);let r=s(t);if(r.href in Ci)return;Ci[r.href]=!0;let i=wi(r);if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let o=document.createElement(`link`);if(o.rel=i?`stylesheet`:xi,i||(o.as=`script`),o.crossOrigin=``,o.href=r.href,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),i)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${r}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};async function Ei(e,t){if(e.id in t)return t[e.id];try{let n=await Ti(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Di(e){return e!=null&&typeof e.page==`string`}function Oi(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function ki(e,t,n){return Pi((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Ei(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Oi).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Ai(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function ji(e,t,{includeHydrateFallback:n}={}){return Mi(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Mi(e){return[...new Set(e)]}function Ni(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Pi(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Di(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Ni(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}var Fi=N.createContext(void 0);Fi.displayName=`FrameworkContext`;function Ii(){let e=N.useContext(Fi);return mi(e,`You must render this element inside a <HydratedRouter> element`),e}function Li(e,t){let n=N.useContext(Fi),[r,i]=N.useState(!1),[a,o]=N.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=N.useRef(null);N.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),N.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Ri(s,p),onBlur:Ri(c,m),onMouseEnter:Ri(l,p),onMouseLeave:Ri(u,m),onTouchStart:Ri(d,p)}]:[a,f,{}]:[!1,f,{}]}function Ri(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function zi({page:e,...t}){let n=Qn(),{nonce:r}=Ii(),{router:i}=Mr(`PrefetchPageLinks`),a=N.useMemo(()=>i.match(e),[i,i.routes,e]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?N.createElement(Vi,{page:e,matches:a,...t}):N.createElement(Hi,{page:e,matches:a,...t})):null}function Bi(e){let{manifest:t,routeModules:n}=Ii(),[r,i]=N.useState([]);return N.useEffect(()=>{let r=!1;return ki(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Vi({page:e,matches:t,...n}){let r=hr(),i=N.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=vi(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return N.createElement(N.Fragment,null,i.map(e=>N.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Hi({page:e,matches:t,...n}){let r=hr(),{manifest:i,routeModules:a}=Ii(),{matches:o}=Nr(`PrefetchPageLinks`),{loaderData:s}=Pr(`PrefetchPageLinks`),c=N.useMemo(()=>Ai(e,t,o,i,r,`data`),[e,t,o,i,r]),l=N.useMemo(()=>Ai(e,t,o,i,r,`assets`),[e,t,o,i,r]),u=N.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,o=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];t&&t.hasLoader&&(!c.some(t=>t.route.id===e.route.id)&&e.route.id in s&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?o=!0:n.add(e.route.id))}),n.size===0)return[];let l=vi(e,`data`);return o&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[s,r,i,c,t,e,a]),d=N.useMemo(()=>ji(l,i),[l,i]),f=Bi(l);return N.createElement(N.Fragment,null,u.map(e=>N.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>N.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>N.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Ui(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Wi=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Wi&&(window.__reactRouterVersion=`8`)}catch{}function Gi(e,t){return jt({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:C({window:t?.window}),hydrationData:t?.hydrationData||Ki(),routes:e,mapRouteProperties:ie,hydrationRouteProperties:Gr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function Ki(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:qi(e.errors)}),e}function qi(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new Ge(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&We.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}var Ji=N.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=N.useContext(nr),y=typeof l==`string`&&v.test(l),b=Xe(l,h);l=b.to;let x=pr(l,{relative:r}),S=hr(),C=null;if(o){let e=Le(o,[],S.mask?S.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:ze([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=Li(n,p),D=Qi(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=N.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:Ui(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?N.createElement(N.Fragment,null,A,N.createElement(zi,{page:x})):A});Ji.displayName=`Link`;var Yi=N.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=Sr(a,{relative:c.relative}),d=hr(),f=N.useContext(Xn),{navigator:p,basename:m}=N.useContext(nr),h=f!=null&&ua(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f?.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=ke(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(y)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return N.createElement(Ji,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});Yi.displayName=`NavLink`;var Xi=N.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=N.useContext(nr),g=na(),_=ra(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&v.test(s);return N.createElement(`form`,{ref:m,method:y,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?N.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});Xi.displayName=`Form`;function Zi({getKey:e,storageKey:t,...n}){let r=N.useContext(Fi),{basename:i}=N.useContext(nr),a=hr(),o=Rr();sa({getKey:e,storageKey:t});let s=N.useMemo(()=>{if(!r||!e)return null;let t=oa(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),N.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${_i(JSON.stringify(t||ia))}, ${_i(JSON.stringify(s))})`}})}Zi.displayName=`ScrollRestoration`;function Qi(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=_r(),d=hr(),f=Sr(e,{relative:o});return N.useCallback(p=>{if(oi(p,t)){p.preventDefault();let t=n===void 0?k(d)===k(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?N.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function $i(e){T(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=N.useRef(si(e)),n=N.useRef(!1),r=hr(),i=N.useMemo(()=>ci(r.search,n.current?null:t.current),[r.search]),a=_r();return[i,N.useCallback((e,t)=>{let r=si(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var ea=0,ta=()=>`__${String(++ea)}__`;function na(){let{router:e}=Mr(`useSubmit`),{basename:t}=N.useContext(nr),n=Ir(`useSubmit`),r=e.fetch,i=e.navigate;return N.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=pi(e,t);a.navigate===!1?await r(a.fetcherKey||ta(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function ra(e,{relative:t}={}){let{basename:n}=N.useContext(nr),r=N.useContext(ir);w(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Sr(e||`.`,{relative:t})},o=hr();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:ze([n,a.pathname])),k(a)}var ia=`react-router-scroll-positions`,aa={};function oa(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:ke(e.pathname,n)||e.pathname},t)),i??=e.key,i}function sa({getKey:e,storageKey:t}={}){let{router:n}=Mr(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Nr(`useScrollRestoration`),{basename:a}=N.useContext(nr),o=hr(),s=Rr(),c=Lr();N.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),la(N.useCallback(e=>{e.persisted&&(window.history.scrollRestoration=`manual`)},[])),ca(N.useCallback(()=>{if(c.state===`idle`){let t=oa(o,s,a,e);aa[t]=window.scrollY}try{sessionStorage.setItem(t||ia,JSON.stringify(aa))}catch(e){T(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(N.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||ia);e&&(aa=JSON.parse(e))}catch{}},[t]),N.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(aa,()=>window.scrollY,e?(t,n)=>oa(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),N.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{T(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function ca(e,t){let{capture:n}=t||{};N.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function la(e,t){let{capture:n}=t||{};N.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pageshow`,e,t),()=>{window.removeEventListener(`pageshow`,e,t)}},[e,n])}function ua(e,{relative:t}={}){let n=N.useContext($n);w(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Mr(`useViewTransitionState`),i=Sr(e,{relative:t});if(!n.isTransitioning)return!1;let a=ke(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=ke(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Te(i.pathname,o)!=null||Te(i.pathname,a)!=null}var da=Object.defineProperty,fa=(e,t)=>da(e,`name`,{value:t,configurable:!0});function pa(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}fa(pa,`setRef`);function ma(...e){return t=>{let n=!1,r=e.map(e=>{let r=pa(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():pa(e[t],null)}}}}fa(ma,`composeRefs`);function ha(...e){return N.useCallback(ma(...e),e)}fa(ha,`useComposedRefs`);var ga=Object.defineProperty,_a=(e,t)=>ga(e,`name`,{value:t,configurable:!0});function va(e){let t=N.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Da(r)&&typeof ja==`function`&&(r=ja(r._payload)),N.Children.forEach(r,e=>{if(Ta(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Da(n)&&typeof ja==`function`&&(n=ja(n._payload)),a=Sa(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=N.cloneElement(a,void 0,s):!o&&N.Children.count(r)===1&&N.isValidElement(r)&&(a=r);let c=a?wa(a):void 0,l=ha(n,c);if(!a){if(r||r===0)throw Error(o?Aa(e):ka(e));return r}let u=Ca(i,a.props??{});return a.type!==N.Fragment&&(u.ref=n?l:c),N.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}_a(va,`createSlot`);var ya=va(`Slot`),ba=Symbol.for(`radix.slottable`);function xa(e){let t=_a(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=ba,t}_a(xa,`createSlottable`);var Sa=_a((e,t)=>{if(`child`in e.props){let t=e.props.child;return N.isValidElement(t)?N.cloneElement(t,void 0,e.props.children(t.props.children)):null}return N.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function Ca(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}_a(Ca,`mergeProps`);function wa(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}_a(wa,`getElementRef`);function Ta(e){return N.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ba}_a(Ta,`isSlottable`);var Ea=Symbol.for(`react.lazy`);function Da(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Ea&&`_payload`in e&&Oa(e._payload)}_a(Da,`isLazyComponent`);function Oa(e){return typeof e==`object`&&!!e&&`then`in e}_a(Oa,`isPromiseLike`);var ka=_a(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Aa=_a(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),ja=N.use,Ma=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Na=o(((e,t)=>{t.exports=Ma()})),L=Na(),Pa=Object.defineProperty,Fa=(e,t)=>Pa(e,`name`,{value:t,configurable:!0}),Ia=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=va(`Primitive.${t}`),r=N.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,L.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function La(e,t){e&&yi.flushSync(()=>e.dispatchEvent(t))}Fa(La,`dispatchDiscreteCustomEvent`);var Ra=Object.defineProperty,za=(e,t)=>Ra(e,`name`,{value:t,configurable:!0}),Ba=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`}),Va=N.forwardRef(za(function(e,t){return(0,L.jsx)(Ia.span,{...e,ref:t,style:{...Ba,...e.style}})},`VisuallyHidden`)),Ha=Object.defineProperty,Ua=((e,t)=>Ha(e,`name`,{value:t,configurable:!0}))(({children:e,label:t})=>{let n=N.Children.only(e);return(0,L.jsxs)(L.Fragment,{children:[N.cloneElement(n,{"aria-hidden":`true`,focusable:`false`}),(0,L.jsx)(Va,{children:t})]})},`AccessibleIcon`),Wa=Object.defineProperty,Ga=(e,t)=>Wa(e,`name`,{value:t,configurable:!0});function Ka(e,t){let n=N.createContext(t);n.displayName=e+`Context`;let r=Ga(e=>{let{children:t,...r}=e,i=N.useMemo(()=>r,Object.values(r));return(0,L.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=N.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return Ga(i,`useContext`),[r,i]}Ga(Ka,`createContext`);function qa(e,t=[]){let n=[];function r(t,r){let i=N.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=Ga(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=N.useMemo(()=>o,Object.values(o));return(0,L.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=N.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return Ga(s,`useContext`),[o,s]}Ga(r,`createContext`);let i=Ga(()=>{let t=n.map(e=>N.createContext(e));return Ga(function(n){let r=n?.[e]||t;return N.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,Ja(i,...t)]}Ga(qa,`createContextScope`);function Ja(...e){let t=e[0];if(e.length===1)return t;let n=Ga(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return Ga(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return N.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}Ga(Ja,`composeContextScopes`);var Ya=Object.defineProperty,Xa=(e,t)=>Ya(e,`name`,{value:t,configurable:!0});function Za(e){let t=e+`CollectionProvider`,[n,r]=qa(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Xa(e=>{let{scope:t,children:n}=e,r=N.useRef(null),a=N.useRef(new Map).current;return(0,L.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=va(s),l=N.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=ha(t,a(s,n).collectionRef);return(0,L.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=va(u),p=N.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=N.useRef(null),s=ha(t,o),c=a(u,n);return N.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,L.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return N.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return Xa(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}Xa(Za,`createCollection`);var Qa=new WeakMap,$a=class e extends Map{static{Xa(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],Qa.set(this,!0)}set(e,t){return Qa.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=no(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=eo(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=eo(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return eo(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function eo(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=to(e,t);return n===-1?void 0:e[n]}Xa(eo,`at`);function to(e,t){let n=e.length,r=no(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Xa(to,`toSafeIndex`);function no(e){return e!==e||e===0?0:Math.trunc(e)}Xa(no,`toSafeInteger`);function ro(e){let t=e+`CollectionProvider`,[n,r]=qa(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new $a,setItemMap:Xa(()=>void 0,`setItemMap`)}),o=Xa(({state:e,...t})=>e?(0,L.jsx)(c,{...t,state:e}):(0,L.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=Xa(e=>{let t=h();return(0,L.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=Xa(e=>{let{scope:t,children:n,state:r}=e,a=N.useRef(null),[o,s]=N.useState(null),c=ha(a,s),[l,u]=r;return N.useEffect(()=>{if(!o)return;let e=so(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,L.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=va(l),d=N.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=ha(t,a(l,n).collectionRef);return(0,L.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=va(f),m=N.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=N.useRef(null),[s,c]=N.useState(null),l=ha(t,o,c),{setItemMap:u}=a(f,n),d=N.useRef(i);io(d.current,i)||(d.current=i);let m=d.current;return N.useEffect(()=>{let e=m;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(oo):(t.set(s,{...e,element:s}),t.toSorted(oo)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new $a(e)))}},[s,m,u]),(0,L.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});m.displayName=f;function h(){return N.useState(new $a)}Xa(h,`useInitCollection`);function g(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return Xa(g,`useCollection`),[{Provider:o,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:h}]}Xa(ro,`createCollection`);function io(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Xa(io,`shallowEqual`);function ao(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Xa(ao,`isElementPreceding`);function oo(e,t){return!e[1].element||!t[1].element?0:ao(e[1].element,t[1].element)?-1:1}Xa(oo,`sortByDocumentPosition`);function so(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Xa(so,`getChildListObserver`);var co=Object.defineProperty,lo=(e,t)=>co(e,`name`,{value:t,configurable:!0}),uo=!!(typeof window<`u`&&window.document&&window.document.createElement);function R(e,t,{checkForDefaultPrevented:n=!0}={}){return lo(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}lo(R,`composeEventHandlers`);function fo(e){if(!uo)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}lo(fo,`getOwnerWindow`);function po(e){if(!uo)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}lo(po,`getOwnerDocument`);function mo(e,t=!1){let{activeElement:n}=po(e);if(!n?.nodeName)return null;if(ho(n)&&n.contentDocument)return mo(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=po(n).getElementById(e);if(t)return t}}return n}lo(mo,`getActiveElement`);function ho(e){return e.tagName===`IFRAME`}lo(ho,`isFrame`);var go=globalThis?.document?N.useLayoutEffect:()=>{},_o=Object.defineProperty,vo=(e,t)=>_o(e,`name`,{value:t,configurable:!0}),yo=N.useEffectEvent,bo=N.useInsertionEffect;function xo(e){if(typeof yo==`function`)return yo(e);let t=N.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof bo==`function`?bo(()=>{t.current=e}):go(()=>{t.current=e}),N.useMemo(()=>((...e)=>t.current?.(...e)),[])}vo(xo,`useEffectEvent`);var So=Object.defineProperty,Co=(e,t)=>So(e,`name`,{value:t,configurable:!0}),wo=N.useInsertionEffect||go;function To({prop:e,defaultProp:t,onChange:n=Co(()=>{},`onChange`),caller:r}){let[i,a,o]=Eo({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,N.useCallback(t=>{if(s){let n=Do(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Co(To,`useControllableState`);function Eo({defaultProp:e,onChange:t}){let[n,r]=N.useState(e),i=N.useRef(n),a=N.useRef(t);return wo(()=>{a.current=t},[t]),N.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Co(Eo,`useUncontrolledState`);function Do(e){return typeof e==`function`}Co(Do,`isFunction`);var Oo=Symbol(`RADIX:SYNC_STATE`);function ko(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=xo(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=N.useReducer((t,n)=>{if(n.type===Oo)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=N.useRef(p);N.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=N.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return N.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:Oo,state:i})},[i,d.state,c]),[h,f]}Co(ko,`useControllableStateReducer`);var Ao=Object.defineProperty,jo=(e,t)=>Ao(e,`name`,{value:t,configurable:!0});function Mo(e,t){return N.useReducer((e,n)=>t[e][n]??e,e)}jo(Mo,`useStateMachine`);var No=jo(e=>{let{present:t,children:n}=e,r=Po(t),i=typeof n==`function`?n({present:r.isPresent}):N.Children.only(n),a=Io(r.ref,Ro(i));return typeof n==`function`||r.isPresent?N.cloneElement(i,{ref:a}):null},`Presence`);function Po(e){let[t,n]=N.useState(),r=N.useRef(null),i=N.useRef(e),a=N.useRef(`none`),o=N.useRef(void 0),[s,c]=Mo(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return N.useEffect(()=>{s===`mounted`?(a.current=o.current??Lo(r.current),o.current=void 0):a.current=`none`},[s]),go(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Lo(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),go(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=jo(a=>{let o=Lo(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=jo(e=>{e.target===t&&(a.current=Lo(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:N.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=Lo(t)}else r.current=null;n(e)},[])}}jo(Po,`usePresence`);function Fo(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}jo(Fo,`setRef`);function Io(...e){let t=N.useRef(e);return t.current=e,N.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Fo(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Fo(n[e],null)}}},[])}jo(Io,`useStableComposedRefs`);function Lo(e){return e?.animationName||`none`}jo(Lo,`getAnimationName`);function Ro(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}jo(Ro,`getElementRef`);var zo=Object.defineProperty,Bo=(e,t)=>zo(e,`name`,{value:t,configurable:!0}),Vo=N.useId||(()=>void 0),Ho=0;function Uo(e){let[t,n]=N.useState(Vo());return go(()=>{e||n(e=>e??String(Ho++))},[e]),e||(t?`radix-${t}`:``)}Bo(Uo,`useId`);var Wo=Object.defineProperty,Go=(e,t)=>Wo(e,`name`,{value:t,configurable:!0}),Ko=N.createContext(void 0);function qo(e){let t=N.useContext(Ko);return e||t||`ltr`}Go(qo,`useDirection`);var Jo=Object.defineProperty,Yo=(e,t)=>Jo(e,`name`,{value:t,configurable:!0});function Xo(e){let t=N.useRef(e);return N.useEffect(()=>{t.current=e}),N.useMemo(()=>((...e)=>t.current?.(...e)),[])}Yo(Xo,`useCallbackRef`);var Zo=Object.defineProperty,Qo=(e,t)=>Zo(e,`name`,{value:t,configurable:!0}),$o=`dismissableLayer.update`,es=`dismissableLayer.pointerDownOutside`,ts=`dismissableLayer.focusOutside`,ns,rs=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),is=N.forwardRef(Qo(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=N.useContext(rs),[d,f]=N.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=N.useState({}),h=ha(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=N.useRef(!1),C=ss(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:N.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=cs(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,E=Xo(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return N.useEffect(()=>{if(T)return p.addEventListener(`keydown`,E,{capture:!0}),()=>p.removeEventListener(`keydown`,E,{capture:!0})},[p,T,E]),N.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ns=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ls(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=ns))}},[d,p,n,u]),N.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ls())},[d,u]),N.useEffect(()=>{let e=Qo(()=>m({}),`handleUpdate`);return document.addEventListener($o,e),()=>document.removeEventListener($o,e)},[]),(0,L.jsx)(Ia.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:R(e.onFocusCapture,w.onFocusCapture),onBlurCapture:R(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,C.onPointerDownCapture)})},`DismissableLayer`));function as(){let e=N.useContext(rs),[t,n]=N.useState(null);return N.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Qo(as,`useDismissableLayerSurface`);var os=Qo(()=>!0,`IS_TRUE`);function ss(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=os}=t,s=Xo(e),c=N.useRef(!1),l=N.useRef(!1),u=N.useRef(new Map),d=N.useRef(()=>{});return N.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}Qo(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}Qo(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}Qo(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}Qo(p,`handleInteractionBubble`);let m=Qo(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||us(es,s,p,{discrete:!0})};if(Qo(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:Qo(()=>c.current=!0,`onPointerDownCapture`)}}Qo(ss,`usePointerDownOutside`);function cs(e,t=globalThis?.document){let n=Xo(e),r=N.useRef(!1);return N.useEffect(()=>{let e=Qo(e=>{e.target&&!r.current&&us(ts,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Qo(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Qo(()=>r.current=!1,`onBlurCapture`)}}Qo(cs,`useFocusOutside`);function ls(){let e=new CustomEvent($o);document.dispatchEvent(e)}Qo(ls,`dispatchUpdate`);function us(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?La(i,a):i.dispatchEvent(a)}Qo(us,`handleAndDispatchCustomEvent`);var ds=Object.defineProperty,fs=(e,t)=>ds(e,`name`,{value:t,configurable:!0}),ps=`focusScope.autoFocusOnMount`,ms=`focusScope.autoFocusOnUnmount`,hs={bubbles:!1,cancelable:!0},gs=N.forwardRef(fs(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=N.useState(null),l=Xo(i),u=Xo(a),d=N.useRef(null),f=ha(t,c),p=N.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;N.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Cs(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Cs(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Cs(s)};fs(e,`handleFocusIn`),fs(t,`handleFocusOut`),fs(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),N.useEffect(()=>{if(s){ws.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(ps,hs);s.addEventListener(ps,l),s.dispatchEvent(t),t.defaultPrevented||(_s(Ds(ys(s)),{select:!0}),document.activeElement===e&&Cs(s))}return()=>{s.removeEventListener(ps,l),setTimeout(()=>{let t=new CustomEvent(ms,hs);s.addEventListener(ms,u),s.dispatchEvent(t),t.defaultPrevented||Cs(e??document.body,{select:!0}),s.removeEventListener(ms,u),ws.remove(p)},0)}}},[s,l,u,p]);let m=N.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=vs(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Cs(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Cs(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,L.jsx)(Ia.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function _s(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Cs(r,{select:t}),document.activeElement!==n)return}fs(_s,`focusFirst`);function vs(e){let t=ys(e);return[bs(t,e),bs(t.reverse(),e)]}fs(vs,`getTabbableEdges`);function ys(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:fs(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}fs(ys,`getTabbableCandidates`);function bs(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):xs(r,{upTo:t})))return r}fs(bs,`findVisible`);function xs(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}fs(xs,`isHidden`);function Ss(e){return e instanceof HTMLInputElement&&`select`in e}fs(Ss,`isSelectableInput`);function Cs(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ss(e)&&t&&e.select()}}fs(Cs,`focus`);var ws=Ts();function Ts(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Es(e,t),e.unshift(t)},remove(t){e=Es(e,t),e[0]?.resume()}}}fs(Ts,`createFocusScopesStack`);function Es(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}fs(Es,`arrayRemove`);function Ds(e){return e.filter(e=>e.tagName!==`A`)}fs(Ds,`removeLinks`);var Os=Object.defineProperty,ks=N.forwardRef(((e,t)=>Os(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=N.useState(!1);go(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?yi.createPortal((0,L.jsx)(Ia.div,{...r,ref:t}),o):null},`Portal`)),As=ks,js=Object.defineProperty,Ms=(e,t)=>js(e,`name`,{value:t,configurable:!0}),Ns=0,Ps=null;function Fs(e){return Is(),e.children}Ms(Fs,`FocusGuards`);function Is(){N.useEffect(()=>{Ps||={start:Ls(),end:Ls()};let{start:e,end:t}=Ps;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Ns++,()=>{Ns===1&&(Ps?.start.remove(),Ps?.end.remove(),Ps=null),Ns=Math.max(0,Ns-1)}},[])}Ms(Is,`useFocusGuards`);function Ls(){let 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}Ms(Ls,`createFocusGuard`);var Rs=function(){return Rs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Rs.apply(this,arguments)};function zs(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 Bs(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Vs=`right-scroll-bar-position`,Hs=`width-before-scroll-bar`,Us=`with-scroll-bars-hidden`,Ws=`--removed-body-scroll-bar-size`;function Gs(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ks(e,t){var n=(0,N.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var qs=typeof window<`u`?N.useLayoutEffect:N.useEffect,Js=new WeakMap;function Ys(e,t){var n=Ks(t||null,function(t){return e.forEach(function(e){return Gs(e,t)})});return qs(function(){var t=Js.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Gs(e,null)}),i.forEach(function(e){r.has(e)||Gs(e,a)})}Js.set(n,e)},[e]),n}function Xs(e){return e}function Zs(e,t){t===void 0&&(t=Xs);var n=[],r=!1;return{read:function(){if(r)throw 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(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Qs(e){e===void 0&&(e={});var t=Zs(null);return t.options=Rs({async:!0,ssr:!1},e),t}var $s=function(e){var t=e.sideCar,n=zs(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return N.createElement(r,Rs({},n))};$s.isSideCarExport=!0;function ec(e,t){return e.useMedium(t),$s}var tc=Qs(),nc=function(){},rc=N.forwardRef(function(e,t){var n=N.useRef(null),r=N.useState({onScrollCapture:nc,onWheelCapture:nc,onTouchMoveCapture:nc}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=zs(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Ys([n,t]),C=Rs(Rs({},b),i);return N.createElement(N.Fragment,null,u&&N.createElement(x,{sideCar:tc,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?N.cloneElement(N.Children.only(s),Rs(Rs({},C),{ref:S})):N.createElement(v,Rs({},C,{className:c,ref:S}),s))});rc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},rc.classNames={fullWidth:Hs,zeroRight:Vs};var ic=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function ac(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=ic();return t&&e.setAttribute(`nonce`,t),e}function oc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function sc(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var cc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ac())&&(oc(t,n),sc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},lc=function(){var e=cc();return function(t,n){N.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},uc=function(){var e=lc();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},dc={left:0,top:0,right:0,gap:0},fc=function(e){return parseInt(e||``,10)||0},pc=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[fc(n),fc(r),fc(i)]},mc=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return dc;var t=pc(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])}},hc=uc(),gc=`data-scroll-locked`,_c=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
11
+ .${Us} {
12
+ overflow: hidden ${r};
13
+ padding-right: ${s}px ${r};
14
+ }
15
+ body[${gc}] {
16
+ overflow: hidden ${r};
17
+ overscroll-behavior: contain;
18
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
19
+ padding-left: ${i}px;
20
+ padding-top: ${a}px;
21
+ padding-right: ${o}px;
22
+ margin-left:0;
23
+ margin-top:0;
24
+ margin-right: ${s}px ${r};
25
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
26
+ }
27
+
28
+ .${Vs} {
29
+ right: ${s}px ${r};
30
+ }
31
+
32
+ .${Hs} {
33
+ margin-right: ${s}px ${r};
34
+ }
35
+
36
+ .${Vs} .${Vs} {
37
+ right: 0 ${r};
38
+ }
39
+
40
+ .${Hs} .${Hs} {
41
+ margin-right: 0 ${r};
42
+ }
43
+
44
+ body[${gc}] {
45
+ ${Ws}: ${s}px;
46
+ }
47
+ `},vc=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},yc=function(){N.useEffect(function(){return document.body.setAttribute(gc,(vc()+1).toString()),function(){var e=vc()-1;e<=0?document.body.removeAttribute(gc):document.body.setAttribute(gc,e.toString())}},[])},bc=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;yc();var a=N.useMemo(function(){return mc(i)},[i]);return N.createElement(hc,{styles:_c(a,!t,i,n?``:`!important`)})},xc=!1;if(typeof window<`u`)try{var Sc=Object.defineProperty({},"passive",{get:function(){return xc=!0,!0}});window.addEventListener(`test`,Sc,Sc),window.removeEventListener(`test`,Sc,Sc)}catch{xc=!1}var Cc=xc?{passive:!1}:!1,wc=function(e){return e.tagName===`TEXTAREA`},Tc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!wc(e)&&n[t]===`visible`)},Ec=function(e){return Tc(e,`overflowY`)},Dc=function(e){return Tc(e,`overflowX`)},Oc=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),jc(e,r)){var i=Mc(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},kc=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Ac=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},jc=function(e,t){return e===`v`?Ec(t):Dc(t)},Mc=function(e,t){return e===`v`?kc(t):Ac(t)},Nc=function(e,t){return e===`h`&&t===`rtl`?-1:1},Pc=function(e,t,n,r,i){var a=Nc(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Mc(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&jc(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Fc=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ic=function(e){return[e.deltaX,e.deltaY]},Lc=function(e){return e&&`current`in e?e.current:e},Rc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},zc=function(e){return`
48
+ .block-interactivity-${e} {pointer-events: none;}
49
+ .allow-interactivity-${e} {pointer-events: all;}
50
+ `},Bc=0,Vc=[];function Hc(e){var t=N.useRef([]),n=N.useRef([0,0]),r=N.useRef(),i=N.useState(Bc++)[0],a=N.useState(uc)[0],o=N.useRef(e);N.useEffect(function(){o.current=e},[e]),N.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Bs([e.lockRef.current],(e.shards||[]).map(Lc),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=N.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Fc(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Oc(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Oc(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Pc(h,t,e,h===`h`?s:c,!0)},[]),c=N.useCallback(function(e){var n=e;if(Vc.length&&Vc[Vc.length-1]===a){var r=`deltaY`in n?Ic(n):Fc(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Rc(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Lc).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=N.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Uc(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=N.useCallback(function(e){n.current=Fc(e),r.current=void 0},[]),d=N.useCallback(function(t){l(t.type,Ic(t),t.target,s(t,e.lockRef.current))},[]),f=N.useCallback(function(t){l(t.type,Fc(t),t.target,s(t,e.lockRef.current))},[]);N.useEffect(function(){return Vc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Cc),document.addEventListener(`touchmove`,c,Cc),document.addEventListener(`touchstart`,u,Cc),function(){Vc=Vc.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Cc),document.removeEventListener(`touchmove`,c,Cc),document.removeEventListener(`touchstart`,u,Cc)}},[]);var p=e.removeScrollBar,m=e.inert;return N.createElement(N.Fragment,null,m?N.createElement(a,{styles:zc(i)}):null,p?N.createElement(bc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Uc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Wc=ec(tc,Hc),Gc=N.forwardRef(function(e,t){return N.createElement(rc,Rs({},e,{ref:t,sideCar:Wc}))});Gc.classNames=rc.classNames;var Kc=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},qc=new WeakMap,Jc=new WeakMap,Yc={},Xc=0,Zc=function(e){return e&&(e.host||Zc(e.parentNode))},Qc=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Zc(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},$c=function(e,t,n,r){var i=Qc(t,Array.isArray(e)?e:[e]);Yc[n]||(Yc[n]=new WeakMap);var a=Yc[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(qc.get(e)||0)+1,l=(a.get(e)||0)+1;qc.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Jc.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Xc++,function(){o.forEach(function(e){var t=qc.get(e)-1,i=a.get(e)-1;qc.set(e,t),a.set(e,i),t||(Jc.has(e)||e.removeAttribute(r),Jc.delete(e)),i||e.removeAttribute(n)}),Xc--,Xc||(qc=new WeakMap,qc=new WeakMap,Jc=new WeakMap,Yc={})}},el=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Kc(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),$c(r,i,n,`aria-hidden`)):function(){return null}},tl=Object.defineProperty,nl=(e,t)=>tl(e,`name`,{value:t,configurable:!0}),rl=`Dialog`,[il,al]=qa(rl),[ol,sl]=il(rl),cl=nl(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=N.useRef(null),c=N.useRef(null),[l,u]=To({prop:r,defaultProp:i??!1,onChange:a,caller:rl}),[d,f]=N.useState(0),[p,m]=N.useState(0);return(0,L.jsx)(ol,{scope:t,triggerRef:s,contentRef:c,contentId:Uo(),titleId:Uo(),descriptionId:Uo(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:N.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),ll=`DialogTrigger`,ul=N.forwardRef(nl(function(e,t){let{__scopeDialog:n,...r}=e,i=sl(ll,n),a=ha(t,i.triggerRef);return(0,L.jsx)(Ia.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Al(i.open),...r,ref:a,onClick:R(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),dl=`DialogPortal`,[fl,pl]=il(dl,{forceMount:void 0}),ml=nl(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=sl(dl,t);return(0,L.jsx)(fl,{scope:t,forceMount:n,children:N.Children.map(r,e=>(0,L.jsx)(No,{present:n||a.open,children:(0,L.jsx)(ks,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),hl=`DialogOverlay`,gl=N.forwardRef(nl(function(e,t){let n=pl(hl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=sl(hl,e.__scopeDialog);return a.modal?(0,L.jsx)(No,{present:r||a.open,children:(0,L.jsx)(vl,{...i,ref:t})}):null},`DialogOverlay`)),_l=va(`DialogOverlay.RemoveScroll`),vl=N.forwardRef(nl(function(e,t){let{__scopeDialog:n,...r}=e,i=sl(hl,n),a=ha(t,as());return(0,L.jsx)(Gc,{as:_l,allowPinchZoom:!0,shards:[i.contentRef],children:(0,L.jsx)(Ia.div,{"data-state":Al(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),yl=`DialogContent`,bl=N.forwardRef(nl(function(e,t){let n=pl(yl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=sl(yl,e.__scopeDialog);return(0,L.jsx)(No,{present:r||a.open,children:a.modal?(0,L.jsx)(xl,{...i,ref:t}):(0,L.jsx)(Sl,{...i,ref:t})})},`DialogContent`)),xl=N.forwardRef(nl(function(e,t){let n=sl(yl,e.__scopeDialog),r=N.useRef(null),i=ha(t,n.contentRef,r);return N.useEffect(()=>{let e=r.current;if(e)return el(e)},[]),(0,L.jsx)(Cl,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:R(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:R(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),Sl=N.forwardRef(nl(function(e,t){let n=sl(yl,e.__scopeDialog),r=N.useRef(!1),i=N.useRef(!1);return(0,L.jsx)(Cl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),Cl=N.forwardRef(nl(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=sl(yl,n);return Is(),(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(gs,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,L.jsx)(is,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":Al(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),wl=`DialogTitle`,Tl=N.forwardRef(nl(function(e,t){let{__scopeDialog:n,...r}=e,i=sl(wl,n),{setTitleCount:a}=i;return go(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,L.jsx)(Ia.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),El=`DialogDescription`,Dl=N.forwardRef(nl(function(e,t){let{__scopeDialog:n,...r}=e,i=sl(El,n),{setDescriptionCount:a}=i;return go(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,L.jsx)(Ia.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),Ol=`DialogClose`,kl=N.forwardRef(nl(function(e,t){let{__scopeDialog:n,...r}=e,i=sl(Ol,n);return(0,L.jsx)(Ia.button,{type:`button`,...r,ref:t,onClick:R(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function Al(e){return e?`open`:`closed`}nl(Al,`getState`);var jl=Object.defineProperty,Ml=(e,t)=>jl(e,`name`,{value:t,configurable:!0}),Nl=`Avatar`,[Pl,Fl]=qa(Nl),Il=[0,()=>void 0],[Ll,Rl]=Pl(Nl),zl=N.forwardRef(Ml(function(e,t){let{__scopeAvatar:n,...r}=e,[i,a]=N.useState(`idle`),[o,s]=Kl();return(0,L.jsx)(Ll,{scope:n,imageLoadingStatus:i,setImageLoadingStatus:a,imageCount:o,setImageCount:s,children:(0,L.jsx)(Ia.span,{...r,ref:t})})},`Avatar`)),Bl=`AvatarImage`,Vl=N.forwardRef(Ml(function(e,t){let{__scopeAvatar:n,src:r,onLoadingStatusChange:i,...a}=e,o=Rl(Bl,n);o.setImageCount;let s=Wl(r,{referrerPolicy:a.referrerPolicy,crossOrigin:a.crossOrigin,loadingStatus:o.imageLoadingStatus,setLoadingStatus:o.setImageLoadingStatus}),c=Xo(e=>{i?.(e)}),l=N.useRef(s);return go(()=>{let e=l.current;l.current=s,s!==e&&c(s)},[s,c]),s===`loaded`?(0,L.jsx)(Ia.img,{...a,ref:t,src:r}):null},`AvatarImage`)),Hl=`AvatarFallback`,Ul=N.forwardRef(Ml(function(e,t){let{__scopeAvatar:n,delayMs:r,...i}=e,a=Rl(Hl,n),[o,s]=N.useState(r===void 0);return N.useEffect(()=>{if(r!==void 0){let e=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(e)}},[r]),o&&a.imageLoadingStatus!==`loaded`?(0,L.jsx)(Ia.span,{...i,ref:t}):null},`AvatarFallback`));function Wl(e,{loadingStatus:t,setLoadingStatus:n,referrerPolicy:r,crossOrigin:i}){return go(()=>{if(!e){n(`error`);return}let t=new window.Image,a=Ml(e=>{let t=e.currentTarget;n(Gl(t))},`handleLoad`),o=Ml(()=>n(`error`),`handleError`);return t.addEventListener(`load`,a),t.addEventListener(`error`,o),r&&(t.referrerPolicy=r),t.crossOrigin=i??null,t.src=e,n(Gl(t)),()=>{t.removeEventListener(`load`,a),t.removeEventListener(`error`,o),n(`idle`)}},[e,i,r,n]),t}Ml(Wl,`useImageLoadingStatus`);function Gl(e){return e.complete?e.naturalWidth>0?`loaded`:`error`:`loading`}Ml(Gl,`getImageLoadingStatus`);function Kl(){return Il}Ml(Kl,`useImageCount`);function ql(e){}Ml(ql,`useUpdateImageCount`);var Jl=Object.defineProperty,Yl=(e,t)=>Jl(e,`name`,{value:t,configurable:!0});function Xl(e){let[t,n]=N.useState(void 0);return go(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}Yl(Xl,`useSize`);var Zl=[`top`,`right`,`bottom`,`left`],Ql=Math.min,$l=Math.max,eu=Math.round,tu=Math.floor,nu=e=>({x:e,y:e}),ru={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function iu(e,t,n){return $l(e,Ql(t,n))}function au(e,t){return typeof e==`function`?e(t):e}function ou(e){return e.split(`-`)[0]}function su(e){return e.split(`-`)[1]}function cu(e){return e===`x`?`y`:`x`}function lu(e){return e===`y`?`height`:`width`}function uu(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function du(e){return cu(uu(e))}function fu(e,t,n){n===void 0&&(n=!1);let r=su(e),i=du(e),a=lu(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=xu(o)),[o,xu(o)]}function pu(e){let t=xu(e);return[mu(e),t,mu(t)]}function mu(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var hu=[`left`,`right`],gu=[`right`,`left`],_u=[`top`,`bottom`],vu=[`bottom`,`top`];function yu(e,t,n){switch(e){case`top`:case`bottom`:return n?t?gu:hu:t?hu:gu;case`left`:case`right`:return t?_u:vu;default:return[]}}function bu(e,t,n,r){let i=su(e),a=yu(ou(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(mu)))),a}function xu(e){let t=ou(e);return ru[t]+e.slice(t.length)}function Su(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Cu(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Su(e)}function wu(e){let{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 Tu(e,t,n){let{reference:r,floating:i}=e,a=uu(t),o=du(t),s=lu(o),c=ou(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=su(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Eu(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=au(t,e),p=Cu(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=wu(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=wu(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Du=50,Ou=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Eu},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Tu(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Du&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Tu(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ku=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=au(e,t)||{};if(l==null)return{};let d=Cu(u),f={x:n,y:r},p=du(i),m=lu(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Ql(d[_],T),D=Ql(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=iu(E,k,O),j=!c.arrow&&su(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Au=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=au(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ou(r),_=uu(o),v=ou(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[xu(o)]:pu(o)),x=p!==`none`;!d&&x&&b.push(...bu(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=fu(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===uu(t)||T.every(e=>uu(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=uu(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function ju(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Mu(e){return Zl.some(t=>e[t]>=0)}var Nu=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=au(e,t);switch(i){case`referenceHidden`:{let e=ju(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Mu(e)}}}case`escaped`:{let e=ju(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Mu(e)}}}default:return{}}}}},Pu=new Set([`left`,`top`]);async function Fu(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ou(n),s=su(n),c=uu(n)===`y`,l=Pu.has(o)?-1:1,u=a&&c?-1:1,d=au(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Iu=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Fu(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Lu=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=au(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=uu(i),p=cu(f),m=u[p],h=u[f],g=(e,t)=>iu(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Ru=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=au(e,t),u={x:n,y:r},d=uu(i),f=cu(d),p=u[f],m=u[d],h=au(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Pu.has(ou(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},zu=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=au(e,t),c=await i.detectOverflow(t,s),l=ou(n),u=su(n),d=uu(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Ql(p-c[m],g),y=Ql(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*$l(c.left,c.right):S=p-2*$l(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Bu(){return typeof window<`u`}function Vu(e){return Wu(e)?(e.nodeName||``).toLowerCase():`#document`}function Hu(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Uu(e){return((Wu(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Wu(e){return Bu()?e instanceof Node||e instanceof Hu(e).Node:!1}function Gu(e){return Bu()?e instanceof Element||e instanceof Hu(e).Element:!1}function Ku(e){return Bu()?e instanceof HTMLElement||e instanceof Hu(e).HTMLElement:!1}function qu(e){return!Bu()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Hu(e).ShadowRoot}function Ju(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ad(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Yu(e){return/^(table|td|th)$/.test(Vu(e))}function Xu(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Zu=/transform|translate|scale|rotate|perspective|filter/,Qu=/paint|layout|strict|content/,$u=e=>!!e&&e!==`none`,ed;function td(e){let t=Gu(e)?ad(e):e;return $u(t.transform)||$u(t.translate)||$u(t.scale)||$u(t.rotate)||$u(t.perspective)||!rd()&&($u(t.backdropFilter)||$u(t.filter))||Zu.test(t.willChange||``)||Qu.test(t.contain||``)}function nd(e){let t=sd(e);for(;Ku(t)&&!id(t);){if(td(t))return t;if(Xu(t))return null;t=sd(t)}return null}function rd(){return ed??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ed}function id(e){return/^(html|body|#document)$/.test(Vu(e))}function ad(e){return Hu(e).getComputedStyle(e)}function od(e){return Gu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sd(e){if(Vu(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||qu(e)&&e.host||Uu(e);return qu(t)?t.host:t}function cd(e){let t=sd(e);return id(t)?(e.ownerDocument||e).body:Ku(t)&&Ju(t)?t:cd(t)}function ld(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=cd(e),i=r===e.ownerDocument?.body,a=Hu(r);if(i){let e=ud(a);return t.concat(a,a.visualViewport||[],Ju(r)?r:[],e&&n?ld(e):[])}return t.concat(r,ld(r,[],n))}function ud(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function dd(e){let t=ad(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ku(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=eu(n)!==a||eu(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function fd(e){return Gu(e)?e:e.contextElement}function pd(e){let t=fd(e);if(!Ku(t))return nu(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=dd(t),o=(a?eu(n.width):n.width)/r,s=(a?eu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var md=nu(0);function hd(e){let t=Hu(e);return!rd()||!t.visualViewport?md:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gd(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Hu(e)}function _d(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=fd(e),o=nu(1);t&&(r?Gu(r)&&(o=pd(r)):o=pd(e));let s=gd(a,n,r)?hd(a):nu(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Hu(a),t=Gu(r)?Hu(r):r,n=e,i=ud(n);for(;i&&t!==n;){let e=pd(i),t=i.getBoundingClientRect(),r=ad(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Hu(i),i=ud(n)}}return wu({width:u,height:d,x:c,y:l})}function vd(e,t){let n=od(e).scrollLeft;return t?t.left+n:_d(Uu(e)).left+n}function yd(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-vd(e,n),y:n.top+t.scrollTop}}function bd(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Uu(r),s=t?Xu(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=nu(1),u=nu(0),d=Ku(r);if((d||!a)&&((Vu(r)!==`body`||Ju(o))&&(c=od(r)),d)){let e=_d(r);l=pd(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?yd(o,c):nu(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function xd(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Sd(e){let t=od(e),n=e.ownerDocument.body,r=$l(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=$l(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+vd(e),o=-t.scrollTop;return ad(n).direction===`rtl`&&(a+=$l(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Cd=25;function wd(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Hu(e),a=Uu(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!rd()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(vd(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Cd&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Td(e,t){let n=_d(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=pd(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ed(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=wd(e,n,t);else if(t===`document`)r=Sd(Uu(e));else if(Gu(t))r=Td(t,n);else{let n=hd(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return wu(r)}function Dd(e,t){let n=t.get(e);if(n)return n;let r=ld(e,[],!1).filter(e=>Gu(e)&&Vu(e)!==`body`),i=null,a=ad(e).position===`fixed`,o=a?sd(e):e;for(;Gu(o)&&!id(o);){let e=ad(o),t=td(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=sd(o)}return t.set(e,r),r}function Od(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Xu(t)?[]:Dd(t,this._c):[].concat(n),r],o=Ed(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ed(t,a[e],i);s=$l(n.top,s),c=Ql(n.right,c),l=Ql(n.bottom,l),u=$l(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function kd(e){let{width:t,height:n}=dd(e);return{width:t,height:n}}function Ad(e,t,n){let r=Ku(t),i=Uu(t),a=n===`fixed`,o=_d(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=nu(0);if((r||!a)&&((Vu(t)!==`body`||Ju(i))&&(s=od(t)),r)){let e=_d(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=vd(i));let l=i&&!r&&!a?yd(i,s):nu(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function jd(e){return ad(e).position===`static`}function Md(e,t){if(!Ku(e)||ad(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Uu(e)===n&&(n=n.ownerDocument.body),n}function Nd(e,t){let n=Hu(e);if(Xu(e))return n;if(!Ku(e)){let t=sd(e);for(;t&&!id(t);){if(Gu(t)&&!jd(t))return t;t=sd(t)}return n}let r=Md(e,t);for(;r&&Yu(r)&&jd(r);)r=Md(r,t);return r&&id(r)&&jd(r)&&!td(r)?n:r||nd(e)||n}var Pd=async function(e){let t=this.getOffsetParent||Nd,n=this.getDimensions,r=await n(e.floating);return{reference:Ad(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Fd(e){return ad(e).direction===`rtl`}var Id={convertOffsetParentRelativeRectToViewportRelativeRect:bd,getDocumentElement:Uu,getClippingRect:Od,getOffsetParent:Nd,getElementRects:Pd,getClientRects:xd,getDimensions:kd,getScale:pd,isElement:Gu,isRTL:Fd};function Ld(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Rd(e,t,n){let r=null,i,a=Uu(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=tu(d),h=tu(a.clientWidth-(u+f)),g=tu(a.clientHeight-(d+p)),_=tu(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:$l(0,Ql(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Ld(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Hu(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function zd(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=fd(e),u=i||a?[...l?ld(l):[],...t?ld(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Rd(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?_d(e):null;c&&g();function g(){let t=_d(e);h&&!Ld(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Bd=Iu,Vd=Lu,Hd=Au,Ud=zu,Wd=Nu,Gd=ku,Kd=Ru,qd=(e,t,n)=>{let r=new Map,i=n??{},a={...Id,...i.platform,_c:r};return Ou(e,t,{...i,platform:a})},Jd=typeof document<`u`?N.useLayoutEffect:function(){};function Yd(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(!Yd(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;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Yd(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Xd(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zd(e,t){let n=Xd(e);return Math.round(t*n)/n}function Qd(e){let t=N.useRef(e);return Jd(()=>{t.current=e}),t}function $d(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=N.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=N.useState(r);Yd(f,r)||p(r);let[m,h]=N.useState(null),[g,_]=N.useState(null),v=N.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=N.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=N.useRef(null),C=N.useRef(null),w=N.useRef(u),T=c!=null,E=Qd(c),D=Qd(i),O=Qd(l),k=N.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),qd(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Yd(w.current,t)&&(w.current=t,yi.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Jd(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=N.useRef(!1);Jd(()=>(A.current=!0,()=>{A.current=!1}),[]),Jd(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=N.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=N.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=N.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Zd(M.floating,u.x),r=Zd(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Xd(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return N.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:ee}),[u,k,j,M,ee])}var ef=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Gd({element:r.current,padding:i}).fn(n):r?Gd({element:r,padding:i}).fn(n):{}}}},tf=(e,t)=>{let n=Bd(e);return{name:n.name,fn:n.fn,options:[e,t]}},nf=(e,t)=>{let n=Vd(e);return{name:n.name,fn:n.fn,options:[e,t]}},rf=(e,t)=>({fn:Kd(e).fn,options:[e,t]}),af=(e,t)=>{let n=Hd(e);return{name:n.name,fn:n.fn,options:[e,t]}},of=(e,t)=>{let n=Ud(e);return{name:n.name,fn:n.fn,options:[e,t]}},sf=(e,t)=>{let n=Wd(e);return{name:n.name,fn:n.fn,options:[e,t]}},cf=(e,t)=>{let n=ef(e);return{name:n.name,fn:n.fn,options:[e,t]}},lf=Object.defineProperty,uf=(e,t)=>lf(e,`name`,{value:t,configurable:!0}),df=`Popper`,[ff,pf]=qa(df),[mf,hf]=ff(df),gf=uf(e=>{let{__scopePopper:t,children:n}=e,[r,i]=N.useState(null),[a,o]=N.useState(void 0);return(0,L.jsx)(mf,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),_f=`PopperAnchor`,vf=N.forwardRef(uf(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=hf(_f,n),o=N.useRef(null),s=a.onAnchorChange,c=ha(t,N.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=N.useRef(null);N.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&Tf(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,L.jsx)(Ia.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),yf=`PopperContent`,[bf,xf]=ff(yf),Sf=N.forwardRef(uf(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=hf(yf,n),[_,v]=N.useState(null),y=ha(t,v),[b,x]=N.useState(null),S=Xl(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,k={padding:E,boundary:D.filter(Cf),altBoundary:O},{refs:A,floatingStyles:j,placement:M,isPositioned:ee,middlewareData:P}=$d({strategy:`fixed`,placement:T,whileElementsMounted:uf((...e)=>zd(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[tf({mainAxis:i+w,alignmentAxis:o}),c&&nf({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?rf():void 0,...k}),c&&af({...k}),of({...k,apply:uf(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),b&&cf({element:b,padding:s}),wf({arrowWidth:C,arrowHeight:w}),f&&sf({strategy:`referenceHidden`,...k,boundary:O?k.boundary:void 0})]}),F=g.setPlacementState;go(()=>(F(M),()=>{F(void 0)}),[M,F]);let[te,ne]=Tf(M),re=Xo(m);go(()=>{ee&&re?.()},[ee,re]);let ie=P.arrow?.x,ae=P.arrow?.y,oe=P.arrow?.centerOffset!==0,[se,ce]=N.useState();return go(()=>{_&&ce(window.getComputedStyle(_).zIndex)},[_]),(0,L.jsx)(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...j,transform:ee?j.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:se,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(` `),...P.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,L.jsx)(bf,{scope:n,placedSide:te,placedAlign:ne,onArrowChange:x,arrowX:ie,arrowY:ae,shouldHideArrow:oe,children:(0,L.jsx)(Ia.div,{"data-side":te,"data-align":ne,...h,ref:y,style:{...h.style,animation:ee?h.style?.animation:`none`}})})})},`PopperContent`));function Cf(e){return e!==null}uf(Cf,`isNotNull`);var wf=uf(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Tf(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function Tf(e){let[t,n=`center`]=e.split(`-`);return[t,n]}uf(Tf,`getSideAndAlignFromPlacement`);var Ef=gf,Df=vf,Of=Sf,kf=Object.defineProperty,Af=(e,t)=>kf(e,`name`,{value:t,configurable:!0}),jf=!1;function Mf(){let[e,t]=N.useState(jf);return N.useEffect(()=>{jf||(jf=!0,t(!0))},[]),e}Af(Mf,`useIsHydrated`);var Nf=N.useSyncExternalStore;function Pf(){return()=>{}}Af(Pf,`subscribe`);function Ff(){return Nf(Pf,()=>!0,()=>!1)}Af(Ff,`useIsHydratedModern`);var If=typeof Nf==`function`?Ff:Mf,Lf=Object.defineProperty,Rf=(e,t)=>Lf(e,`name`,{value:t,configurable:!0}),zf=`rovingFocusGroup.onEntryFocus`,Bf={bubbles:!1,cancelable:!0},Vf=`RovingFocusGroup`,[Hf,Uf,Wf]=Za(Vf),[Gf,Kf]=qa(Vf,[Wf]),[qf,Jf]=Gf(Vf),Yf=N.forwardRef(Rf(function(e,t){return(0,L.jsx)(Hf.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,L.jsx)(Hf.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,L.jsx)(Xf,{...e,ref:t})})})},`RovingFocusGroup`)),Xf=N.forwardRef(Rf(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=N.useRef(null),p=ha(t,f),m=qo(a),[h,g]=To({prop:o,defaultProp:s??null,onChange:c,caller:Vf}),[_,v]=N.useState(!1),y=Xo(l),b=Uf(n),x=N.useRef(!1),[S,C]=N.useState(0);return N.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(zf,y),()=>e.removeEventListener(zf,y)},[y]),(0,L.jsx)(qf,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:N.useCallback(e=>g(e),[g]),onItemShiftTab:N.useCallback(()=>v(!0),[]),onFocusableItemAdd:N.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:N.useCallback(()=>C(e=>e-1),[]),children:(0,L.jsx)(Ia.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:R(e.onMouseDown,()=>{x.current=!0}),onFocus:R(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(zf,Bf);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);np([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:R(e.onBlur,()=>v(!1))})})},`RovingFocusGroupImpl`)),Zf=`RovingFocusGroupItem`,Qf=N.forwardRef(Rf(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Uo(),l=a||c,u=Jf(Zf,n),d=u.currentTabStopId===l,f=Uf(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=If();return go(()=>{if(g&&r)return p(),()=>m()},[g,r,p,m]),N.useEffect(()=>{if(!g&&r)return p(),()=>m()},[g,r,p,m]),(0,L.jsx)(Hf.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,L.jsx)(Ia.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:R(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:R(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:R(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=tp(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?rp(n,r+1):n.slice(r+1)}setTimeout(()=>np(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),$f={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function ep(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}Rf(ep,`getDirectionAwareKey`);function tp(e,t,n){let r=ep(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return $f[r]}Rf(tp,`getFocusIntent`);function np(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Rf(np,`focusFirst`);function rp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Rf(rp,`wrapArray`);var ip=Yf,ap=Qf,op=Object.defineProperty,sp=(e,t)=>op(e,`name`,{value:t,configurable:!0}),cp=[`Enter`,` `],lp=[`ArrowDown`,`PageUp`,`Home`],up=[`ArrowUp`,`PageDown`,`End`],dp=[...lp,...up];[...cp],[...cp];var fp=`Menu`,[pp,mp,hp]=Za(fp),[gp,_p]=qa(fp,[hp,pf,Kf]),vp=pf(),yp=Kf(),[bp,xp]=gp(fp),[Sp,Cp]=gp(fp),wp=sp(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=vp(t),[c,l]=N.useState(null),u=N.useRef(!1),d=Xo(a),f=qo(i);return N.useEffect(()=>{let e=sp(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=sp(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),N.useEffect(()=>{if(!n)return;let e=sp(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,L.jsx)(Ef,{...s,children:(0,L.jsx)(bp,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,L.jsx)(Sp,{scope:t,onClose:N.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),Tp=N.forwardRef(sp(function(e,t){let{__scopeMenu:n,...r}=e,i=vp(n);return(0,L.jsx)(Df,{...i,...r,ref:t})},`MenuAnchor`)),Ep=`MenuPortal`,[Dp,Op]=gp(Ep,{forceMount:void 0}),kp=sp(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=xp(Ep,t);return(0,L.jsx)(Dp,{scope:t,forceMount:n,children:(0,L.jsx)(No,{present:n||a.open,children:(0,L.jsx)(ks,{asChild:!0,container:i,children:r})})})},`MenuPortal`),Ap=`MenuContent`,[jp,Mp]=gp(Ap),Np=N.forwardRef(sp(function(e,t){let n=Op(Ap,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=xp(Ap,e.__scopeMenu),o=Cp(Ap,e.__scopeMenu);return(0,L.jsx)(pp.Provider,{scope:e.__scopeMenu,children:(0,L.jsx)(No,{present:r||a.open,children:(0,L.jsx)(pp.Slot,{scope:e.__scopeMenu,children:o.modal?(0,L.jsx)(Pp,{...i,ref:t}):(0,L.jsx)(Fp,{...i,ref:t})})})})},`MenuContent`)),Pp=N.forwardRef(sp(function(e,t){let n=xp(Ap,e.__scopeMenu),r=N.useRef(null),i=ha(t,r);return N.useEffect(()=>{let e=r.current;if(e)return el(e)},[]),(0,L.jsx)(Lp,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:R(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),Fp=N.forwardRef(sp(function(e,t){let n=xp(Ap,e.__scopeMenu);return(0,L.jsx)(Lp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),Ip=va(`MenuContent.ScrollLock`),Lp=N.forwardRef(sp(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=xp(Ap,n),_=Cp(Ap,n),v=vp(n),y=yp(n),b=mp(n),[x,S]=N.useState(null),C=N.useRef(null),w=ha(t,C,g.onContentChange),T=N.useRef(0),E=N.useRef(``),D=N.useRef(0),O=N.useRef(null),k=N.useRef(`right`),A=N.useRef(0),j=m?Gc:N.Fragment,M=m?{as:Ip,allowPinchZoom:!0}:void 0,ee=sp(e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Yp(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;sp((function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);N.useEffect(()=>()=>window.clearTimeout(T.current),[]),Is();let P=N.useCallback(e=>k.current===O.current?.side&&Zp(e,O.current?.area),[]);return(0,L.jsx)(jp,{scope:n,searchRef:E,onItemEnter:N.useCallback(e=>{P(e)&&e.preventDefault()},[P]),onItemLeave:N.useCallback(e=>{P(e)||(C.current?.focus(),S(null))},[P]),onTriggerLeave:N.useCallback(e=>{P(e)&&e.preventDefault()},[P]),pointerGraceTimerRef:D,onPointerGraceIntentChange:N.useCallback(e=>{O.current=e},[]),children:(0,L.jsx)(j,{...M,children:(0,L.jsx)(gs,{asChild:!0,trapped:i,onMountAutoFocus:R(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,L.jsx)(is,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,L.jsx)(ip,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:R(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,L.jsx)(Of,{role:`menu`,"aria-orientation":`vertical`,"data-state":Wp(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:R(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ee(e.key));let i=C.current;if(e.target!==i||!dp.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);up.includes(e.key)&&a.reverse(),qp(a)}),onBlur:R(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:R(e.onPointerMove,Qp(e=>{let t=e.target,n=A.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>A.current?`right`:`left`;k.current=t,A.current=e.clientX}}))})})})})})})},`MenuContentImpl`)),Rp=`MenuItem`,zp=`menu.itemSelect`,Bp=N.forwardRef(sp(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=N.useRef(null),o=Cp(Rp,e.__scopeMenu),s=Mp(Rp,e.__scopeMenu),c=ha(t,a),l=N.useRef(!1),u=sp(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(zp,{bubbles:!0,cancelable:!0});e.addEventListener(zp,e=>r?.(e),{once:!0}),La(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,L.jsx)(Vp,{...i,ref:c,disabled:n,onClick:R(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:R(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:R(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&cp.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),Vp=N.forwardRef(sp(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Mp(Rp,n),s=yp(n),c=N.useRef(null),l=ha(t,c),[u,d]=N.useState(!1),[f,p]=N.useState(``);return N.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,L.jsx)(pp.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,L.jsx)(ap,{asChild:!0,...s,focusable:!r,children:(0,L.jsx)(Ia.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:R(e.onPointerMove,Qp(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R(e.onPointerLeave,Qp(e=>o.onItemLeave(e))),onFocus:R(e.onFocus,()=>d(!0)),onBlur:R(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[Hp,Up]=gp(`MenuRadioGroup`,{value:void 0,onValueChange:sp(()=>{},`onValueChange`)}),[eee,tee]=gp(`MenuItemIndicator`,{checked:!1}),[nee,ree]=gp(`MenuSub`);function Wp(e){return e?`open`:`closed`}sp(Wp,`getOpenState`);function Gp(e){return e===`indeterminate`}sp(Gp,`isIndeterminate`);function Kp(e){return Gp(e)?`indeterminate`:e?`checked`:`unchecked`}sp(Kp,`getCheckedState`);function qp(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}sp(qp,`focusFirst`);function Jp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}sp(Jp,`wrapArray`);function Yp(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Jp(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}sp(Yp,`getNextMatch`);function Xp(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}sp(Xp,`isPointInPolygon`);function Zp(e,t){return t?Xp({x:e.clientX,y:e.clientY},t):!1}sp(Zp,`isPointerInGraceArea`);function Qp(e){return t=>t.pointerType===`mouse`?e(t):void 0}sp(Qp,`whenMouse`);var $p=wp,em=Tp,tm=kp,nm=Np,rm=Bp,im=Object.defineProperty,am=(e,t)=>im(e,`name`,{value:t,configurable:!0}),om=`DropdownMenu`,[sm,cm]=qa(om,[_p]),lm=_p(),[um,dm]=sm(om),fm=am(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=lm(t),l=N.useRef(null),[u,d]=To({prop:i,defaultProp:a??!1,onChange:o,caller:om});return(0,L.jsx)(um,{scope:t,triggerId:Uo(),triggerRef:l,contentId:Uo(),open:u,onOpenChange:d,onOpenToggle:N.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,L.jsx)($p,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),pm=`DropdownMenuTrigger`,mm=N.forwardRef(am(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=dm(pm,n),o=lm(n),s=ha(t,a.triggerRef);return(0,L.jsx)(em,{asChild:!0,...o,children:(0,L.jsx)(Ia.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:R(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:R(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),hm=am(e=>{let{__scopeDropdownMenu:t,...n}=e,r=lm(t);return(0,L.jsx)(tm,{...r,...n})},`DropdownMenuPortal`),gm=`DropdownMenuContent`,_m=N.forwardRef(am(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=dm(gm,n),a=lm(n),o=N.useRef(!1);return(0,L.jsx)(nm,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:R(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:R(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),vm=N.forwardRef(am(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=lm(n);return(0,L.jsx)(rm,{...i,...r,ref:t})},`DropdownMenuItem`)),ym=fm,bm=mm,xm=hm,Sm=_m,Cm=vm,wm=Object.defineProperty,Tm=(e,t)=>wm(e,`name`,{value:t,configurable:!0});function Em(e){let t=N.useRef({value:e,previous:e});return N.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}Tm(Em,`usePrevious`);var Dm=Object.defineProperty,Om=(e,t)=>Dm(e,`name`,{value:t,configurable:!0});function km(e,[t,n]){return Math.min(n,Math.max(t,e))}Om(km,`clamp`);var Am=Object.defineProperty,jm=(e,t)=>Am(e,`name`,{value:t,configurable:!0}),Mm=`Popover`,[Nm,iee]=qa(Mm,[pf]),Pm=pf(),[Fm,Im]=Nm(Mm),Lm=jm(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=Pm(t),c=N.useRef(null),[l,u]=N.useState(!1),[d,f]=To({prop:r,defaultProp:i??!1,onChange:a,caller:Mm});return(0,L.jsx)(Ef,{...s,children:(0,L.jsx)(Fm,{scope:t,contentId:Uo(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:N.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:N.useCallback(()=>u(!0),[]),onCustomAnchorRemove:N.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),Rm=`PopoverTrigger`,zm=N.forwardRef(jm(function(e,t){let{__scopePopover:n,...r}=e,i=Im(Rm,n),a=Pm(n),o=ha(t,i.triggerRef),s=(0,L.jsx)(Ia.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Xm(i.open),...r,ref:o,onClick:R(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,L.jsx)(Df,{asChild:!0,...a,children:s})},`PopoverTrigger`)),Bm=`PopoverPortal`,[Vm,Hm]=Nm(Bm,{forceMount:void 0}),Um=jm(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Im(Bm,t);return(0,L.jsx)(Vm,{scope:t,forceMount:n,children:(0,L.jsx)(No,{present:n||a.open,children:(0,L.jsx)(ks,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),Wm=`PopoverContent`,Gm=N.forwardRef(jm(function(e,t){let n=Hm(Wm,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Im(Wm,e.__scopePopover);return(0,L.jsx)(No,{present:r||a.open,children:a.modal?(0,L.jsx)(qm,{...i,ref:t}):(0,L.jsx)(Jm,{...i,ref:t})})},`PopoverContent`)),Km=va(`PopoverContent.RemoveScroll`),qm=N.forwardRef(jm(function(e,t){let n=Im(Wm,e.__scopePopover),r=N.useRef(null),i=ha(t,r),a=N.useRef(!1);return N.useEffect(()=>{let e=r.current;if(e)return el(e)},[]),(0,L.jsx)(Gc,{as:Km,allowPinchZoom:!0,children:(0,L.jsx)(Ym,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:R(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),Jm=N.forwardRef(jm(function(e,t){let n=Im(Wm,e.__scopePopover),r=N.useRef(!1),i=N.useRef(!1);return(0,L.jsx)(Ym,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),Ym=N.forwardRef(jm(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=Im(Wm,n),p=Pm(n);return Is(),(0,L.jsx)(gs,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,L.jsx)(is,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,L.jsx)(Of,{"data-state":Xm(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})},`PopoverContentImpl`));function Xm(e){return e?`open`:`closed`}jm(Xm,`getState`);var Zm=Lm,Qm=zm,$m=Um,eh=Gm,th=Object.defineProperty,nh=(e,t)=>th(e,`name`,{value:t,configurable:!0}),rh=[` `,`Enter`,`ArrowUp`,`ArrowDown`],ih=[` `,`Enter`],ah=`Select`,[oh,sh,ch]=Za(ah),[lh,aee]=qa(ah,[ch,pf]),uh=pf(),[dh,fh]=lh(ah),[ph,mh]=lh(ah);function hh(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=uh(t),[_,v]=N.useState(null),[y,b]=N.useState(null),[x,S]=N.useState(!1),C=qo(l),[w,T]=To({prop:r,defaultProp:i??!1,onChange:a,caller:ah}),[E,D]=To({prop:o,defaultProp:s,onChange:c,caller:ah}),O=N.useRef(null),k=N.useRef(E);N.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=nh(()=>D(k.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,D]);let A=!_||!!m||!!_.closest(`form`),[j,M]=N.useState(new Set),ee=Uo(),P=Array.from(j).map(e=>e.props.value).join(`;`),F=N.useCallback(e=>{M(t=>new Set(t).add(e))},[]),te=N.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),ne={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:ee,value:E,onValueChange:D,open:w,onOpenChange:T,dir:C,triggerPointerDownPosRef:O,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:j,nativeSelectKey:P,isFormControl:A};return(0,L.jsx)(Ef,{...g,children:(0,L.jsx)(dh,{scope:t,...ne,children:(0,L.jsx)(oh.Provider,{scope:t,children:(0,L.jsx)(ph,{scope:t,onNativeOptionAdd:F,onNativeOptionRemove:te,children:ng(h)?h(ne):n})})})})}nh(hh,`SelectProvider`);var gh=nh(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,L.jsx)(hh,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,L.jsxs)(L.Fragment,{children:[n,e?(0,L.jsx)(tg,{__scopeSelect:t}):null]})})},`Select`),_h=`SelectTrigger`,vh=N.forwardRef(nh(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=uh(n),o=fh(_h,n),s=o.disabled||r,c=ha(t,o.onTriggerChange),l=sh(n),u=N.useRef(`touch`),[d,f,p]=ig(e=>{let t=l().filter(e=>!e.disabled),n=ag(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=nh(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,L.jsx)(Df,{asChild:!0,...a,children:(0,L.jsx)(Ia.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":rg(o.value)?``:void 0,...i,ref:c,onClick:R(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:R(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:R(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&rh.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),yh=`SelectValue`,bh=N.forwardRef(nh(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=fh(yh,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=ha(t,c.onValueNodeChange);go(()=>{l(u)},[l,u]);let f=rg(c.value);return(0,L.jsx)(Ia.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,L.jsx)(N.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),xh=N.forwardRef(nh(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,L.jsx)(Ia.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[Sh,Ch]=lh(`SelectPortal`,{forceMount:void 0}),wh=nh(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,L.jsx)(Sh,{scope:e.__scopeSelect,forceMount:n,children:(0,L.jsx)(ks,{asChild:!0,...r})})},`SelectPortal`),Th=`SelectContent`,Eh=N.forwardRef(nh(function(e,t){let n=Ch(Th,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=fh(Th,e.__scopeSelect),[o,s]=N.useState();return go(()=>{s(new DocumentFragment)},[]),(0,L.jsx)(No,{present:r||a.open,children:({present:e})=>e?(0,L.jsx)(Mh,{...i,ref:t}):(0,L.jsx)(Dh,{...i,fragment:o})})},`SelectContent`)),Dh=N.forwardRef(nh(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?yi.createPortal((0,L.jsx)(kh,{scope:n,children:(0,L.jsx)(oh.Slot,{scope:n,children:(0,L.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),Oh=10,[kh,Ah]=lh(Th),jh=va(`SelectContent.RemoveScroll`),Mh=N.forwardRef(nh(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=fh(Th,n),[y,b]=N.useState(null),[x,S]=N.useState(null),C=ha(t,b),[w,T]=N.useState(null),[E,D]=N.useState(null),O=sh(n),[k,A]=N.useState(!1),j=N.useRef(!1);N.useEffect(()=>{if(y)return el(y)},[y]),Is();let M=N.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[O,x]),ee=N.useCallback(()=>M([w,y]),[M,w,y]);N.useEffect(()=>{k&&ee()},[k,ee]);let{onOpenChange:P,triggerPointerDownPosRef:F}=v;N.useEffect(()=>{if(y){let e={x:0,y:0},t=nh(t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},`handlePointerMove`),n=nh(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||P(!1),document.removeEventListener(`pointermove`,t),F.current=null},`handlePointerUp`);return F.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,P,F]),N.useEffect(()=>{let e=nh(()=>P(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[P]);let[te,ne]=ig(e=>{let t=O().filter(e=>!e.disabled),n=ag(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),re=N.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(j.current=!0))},[v.value]),ie=N.useCallback(()=>y?.focus(),[y]),ae=N.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),oe=r===`popper`?Ph:Nh,se=oe===Ph?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,L.jsx)(kh,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:re,selectedItem:w,onItemLeave:ie,itemTextRefCallback:ae,focusSelectedItem:ee,selectedItemText:E,position:r,isPositioned:k,searchRef:te,children:(0,L.jsx)(Gc,{as:jh,allowPinchZoom:!0,children:(0,L.jsx)(gs,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:R(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,L.jsx)(is,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,L.jsx)(oe,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...se,onPlaced:()=>A(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:R(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ne(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>M(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),Nh=N.forwardRef(nh(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=fh(Th,n),o=Ah(Th,n),[s,c]=N.useState(null),[l,u]=N.useState(null),d=ha(t,u),f=sh(n),p=N.useRef(!1),m=N.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=N.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Oh,d=km(a,[Oh,Math.max(Oh,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Oh,d=km(a,[Oh,Math.max(Oh,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Oh*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Oh,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${Oh}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);go(()=>y(),[y]);let[b,x]=N.useState();go(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]);let S=N.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]);return(0,L.jsx)(Fh,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:S,children:(0,L.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,L.jsx)(Ia.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),Ph=N.forwardRef(nh(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Oh,...a}=e,o=uh(n);return(0,L.jsx)(Of,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.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)`}})},`SelectPopperPosition`)),[Fh,Ih]=lh(Th,{}),Lh=`SelectViewport`,Rh=N.forwardRef(nh(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=Ah(Lh,n),o=Ih(Lh,n),s=ha(t,a.onViewportChange),c=N.useRef(0);return(0,L.jsxs)(L.Fragment,{children:[(0,L.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}),(0,L.jsx)(oh.Slot,{scope:n,children:(0,L.jsx)(Ia.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:R(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-Oh*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[zh,Bh]=lh(`SelectGroup`),Vh=`SelectItem`,[Hh,Uh]=lh(Vh),Wh=N.forwardRef(nh(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=fh(Vh,n),c=Ah(Vh,n),l=s.value===r,[u,d]=N.useState(a??``),[f,p]=N.useState(!1),m=ha(t,Xo(e=>c.itemRefCallback?.(e,r,i))),h=Uo(),g=N.useRef(`touch`),_=nh(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,L.jsx)(Hh,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:N.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,L.jsx)(oh.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,L.jsx)(Ia.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:R(o.onFocus,()=>p(!0)),onBlur:R(o.onBlur,()=>p(!1)),onClick:R(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:R(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:R(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:R(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:R(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:R(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(ih.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),Gh=`SelectItemText`,Kh=N.forwardRef(nh(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=fh(Gh,n),s=Ah(Gh,n),c=Uh(Gh,n),l=mh(Gh,n),[u,d]=N.useState(null),f=Xo(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=ha(t,d,c.onItemTextChange,f),m=u?.textContent,h=N.useMemo(()=>(0,L.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return go(()=>(g(h),()=>_(h)),[g,_,h]),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Ia.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!rg(o.value)?yi.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),qh=`SelectItemIndicator`,Jh=N.forwardRef(nh(function(e,t){let{__scopeSelect:n,...r}=e;return Uh(qh,n).isSelected?(0,L.jsx)(Ia.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),Yh=`SelectScrollUpButton`,Xh=N.forwardRef(nh(function(e,t){let n=Ah(Yh,e.__scopeSelect),r=Ih(Yh,e.__scopeSelect),[i,a]=N.useState(!1),o=ha(t,r.onScrollButtonChange);return go(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};nh(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,L.jsx)($h,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),Zh=`SelectScrollDownButton`,Qh=N.forwardRef(nh(function(e,t){let n=Ah(Zh,e.__scopeSelect),r=Ih(Zh,e.__scopeSelect),[i,a]=N.useState(!1),o=ha(t,r.onScrollButtonChange);return go(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};nh(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,L.jsx)($h,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),$h=N.forwardRef(nh(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Ah(`SelectScrollButton`,n),o=N.useRef(null),s=sh(n),c=N.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return N.useEffect(()=>()=>c(),[c]),go(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,L.jsx)(Ia.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:R(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:R(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:R(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),eg=`SelectBubbleInput`,tg=N.forwardRef(nh(function({__scopeSelect:e,...t},n){let r=fh(eg,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=N.useRef(null),m=ha(n,p),h=i??``,g=Em(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return N.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,L.jsxs)(Ia.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...Ba,...t.style},ref:m,defaultValue:h,children:[rg(i)&&!_?(0,L.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function ng(e){return typeof e==`function`}nh(ng,`isFunction`);function rg(e){return e===``||e===void 0}nh(rg,`shouldShowPlaceholder`);function ig(e){let t=Xo(e),n=N.useRef(``),r=N.useRef(0),i=N.useCallback(e=>{let i=n.current+e;t(i),nh((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=N.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return N.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}nh(ig,`useTypeaheadSearch`);function ag(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=og(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}nh(ag,`findNextItem`);function og(e,t){return e.map((n,r)=>e[(t+r)%e.length])}nh(og,`wrapArray`);var oee=Object.defineProperty,sg=(e,t)=>oee(e,`name`,{value:t,configurable:!0}),cg=`horizontal`,see=[`horizontal`,`vertical`],lg=N.forwardRef(sg(function(e,t){let{decorative:n,orientation:r=cg,...i}=e,a=ug(r)?r:cg,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,L.jsx)(Ia.div,{"data-orientation":a,...o,...i,ref:t})},`Separator`));function ug(e){return see.includes(e)}sg(ug,`isValidOrientation`);var dg=lg,fg=Object.defineProperty,pg=(e,t)=>fg(e,`name`,{value:t,configurable:!0}),mg=`Toggle`,hg=N.forwardRef(pg(function(e,t){let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=To({prop:n,onChange:i,defaultProp:r??!1,caller:mg});return(0,L.jsx)(Ia.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:R(e.onClick,()=>{e.disabled||s(!o)})})},`Toggle`)),gg=Object.defineProperty,_g=(e,t)=>gg(e,`name`,{value:t,configurable:!0}),vg=`ToggleGroup`,[yg,cee]=qa(vg,[Kf]),bg=Kf(),xg=N.forwardRef(_g(function(e,t){let{type:n,...r}=e;if(n===`single`)return(0,L.jsx)(wg,{role:`radiogroup`,...r,ref:t});if(n===`multiple`)return(0,L.jsx)(Tg,{role:`toolbar`,...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${vg}\``)},`ToggleGroup`)),[Sg,Cg]=yg(vg),wg=N.forwardRef(_g(function(e,t){let{value:n,defaultValue:r,onValueChange:i=_g(()=>{},`onValueChange`),...a}=e,[o,s]=To({prop:n,defaultProp:r??``,onChange:i,caller:vg});return(0,L.jsx)(Sg,{scope:e.__scopeToggleGroup,type:`single`,value:N.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:N.useCallback(()=>s(``),[s]),children:(0,L.jsx)(Og,{...a,ref:t})})},`ToggleGroupImplSingle`)),Tg=N.forwardRef(_g(function(e,t){let{value:n,defaultValue:r,onValueChange:i=_g(()=>{},`onValueChange`),...a}=e,[o,s]=To({prop:n,defaultProp:r??[],onChange:i,caller:vg}),c=N.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=N.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,L.jsx)(Sg,{scope:e.__scopeToggleGroup,type:`multiple`,value:o,onItemActivate:c,onItemDeactivate:l,children:(0,L.jsx)(Og,{...a,ref:t})})},`ToggleGroupImplMultiple`)),[Eg,Dg]=yg(vg),Og=N.forwardRef(_g(function(e,t){let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...c}=e,l=bg(n),u=qo(o),d={dir:u,...c};return(0,L.jsx)(Eg,{scope:n,rovingFocus:i,disabled:r,children:i?(0,L.jsx)(ip,{asChild:!0,...l,orientation:a,dir:u,loop:s,children:(0,L.jsx)(Ia.div,{...d,ref:t})}):(0,L.jsx)(Ia.div,{...d,ref:t})})},`ToggleGroupImpl`)),kg=`ToggleGroupItem`,Ag=N.forwardRef(_g(function(e,t){let n=Cg(kg,e.__scopeToggleGroup),r=Dg(kg,e.__scopeToggleGroup),i=bg(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=N.useRef(null);return r.rovingFocus?(0,L.jsx)(ap,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:(0,L.jsx)(jg,{...s,ref:t})}):(0,L.jsx)(jg,{...s,ref:t})},`ToggleGroupItem`)),jg=N.forwardRef(_g(function(e,t){let{__scopeToggleGroup:n,value:r,...i}=e,a=Cg(kg,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0},s=a.type===`single`?o:void 0;return(0,L.jsx)(hg,{...s,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})},`ToggleGroupItemImpl`)),Mg=e=>{let{asChild:t,children:n,...r}=e;return t?(0,L.jsx)(ya,{...r,children:(0,N.cloneElement)(n,{"data-rly-root":``})}):(0,L.jsx)(`div`,{...r,"data-rly-root":``,children:n})},Ng=(0,N.createContext)(`system`),Pg=({theme:e,...t})=>(0,L.jsx)(Ng.Provider,{value:e,children:(0,L.jsx)(Mg,{...t,"data-theme":e})}),Fg=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Ig(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Fg(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Lg=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},Rg=e=>{let t=Lg(e);return t.charAt(0).toUpperCase()+t.slice(1)},zg=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Bg={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Vg(e){return e!=null}function Hg(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Bg.width,a=e.size??e.height??Bg.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?zg(...c):zg(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Bg[`stroke-width`])*Number(e.size??e.width??Bg.width)/Number(t.size??t.width??Bg.width):t.strokeWidth??Bg[`stroke-width`];return[`svg`,{...Object.entries(Bg).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Vg(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Vg(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Vg(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function Ug(e,t={}){return Hg(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Wg=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Gg=(0,N.createContext)({}),Kg=()=>(0,N.useContext)(Gg),qg=(0,N.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=Kg()??{},y=!!c||Wg(d),[b,x,S=[]]=Ug(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:zg(v,s),hasA11yProp:y,attributes:d});return(0,N.createElement)(b,{ref:f,...x},[...S.map(([e,t])=>(0,N.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function z(e,t=[],n=[]){let r=typeof e==`string`?Ig(e,t,n):e,i=(0,N.forwardRef)(({className:e,...t},n)=>(0,N.createElement)(qg,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Rg(r.name)),i}var Jg={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};Jg.node;var Yg=z(Jg),Xg={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};Xg.node;var Zg=z(Xg),Qg={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};Qg.node;var $g=z(Qg),e_={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};e_.node;var lee=z(e_),t_={name:`bell-off`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]};t_.node;var uee=z(t_),n_={name:`bell`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]};n_.node;var r_=z(n_),i_={name:`box`,size:24,node:[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]};i_.node;var a_=z(i_),o_={name:`calendar`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]};o_.node;var dee=z(o_),s_={name:`chart-column`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]],aliases:[`bar-chart-3`]};s_.node;var fee=z(s_),c_={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};c_.node;var l_=z(c_),u_={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};u_.node;var d_=z(u_),f_={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};f_.node;var p_=z(f_),m_={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};m_.node;var h_=z(m_),g_={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};g_.node;var __=z(g_),v_={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};v_.node;var y_=z(v_),b_={name:`circle-check-big`,size:24,node:[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]],aliases:[`check-circle`]};b_.node;var x_=z(b_),S_={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};S_.node;var C_=z(S_),w_={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};w_.node;var T_=z(w_),E_={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};E_.node;var D_=z(E_),O_={name:`code`,size:24,node:[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]};O_.node;var k_=z(O_),A_={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};A_.node;var j_=z(A_),M_={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};M_.node;var N_=z(M_),P_={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};P_.node;var F_=z(P_),I_={name:`external-link`,size:24,node:[[`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`}]]};I_.node;var L_=z(I_),R_={name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};R_.node;var z_=z(R_),B_={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};B_.node;var V_=z(B_),H_={name:`file`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]};H_.node;var U_=z(H_),W_={name:`flame`,size:24,node:[[`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`}]]};W_.node;var G_=z(W_),K_={name:`funnel`,size:24,node:[[`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`}]],aliases:[`filter`]};K_.node;var q_=z(K_),J_={name:`git-branch`,size:24,node:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]};J_.node;var Y_=z(J_),X_={name:`git-merge`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 21V9a9 9 0 0 0 9 9`,key:`7kw0sc`}]]};X_.node;var Z_=z(X_),Q_={name:`git-pull-request`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]};Q_.node;var $_=z(Q_),ev={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};ev.node;var tv=z(ev),nv={name:`link`,size:24,node:[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]};nv.node;var rv=z(nv),iv={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};iv.node;var av=z(iv),ov={name:`loader`,size:24,node:[[`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`}]]};ov.node;var sv=z(ov),cv={name:`log-in`,size:24,node:[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]};cv.node;var lv=z(cv),uv={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};uv.node;var dv=z(uv),fv={name:`mail-open`,size:24,node:[[`path`,{d:`M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z`,key:`1jhwl8`}],[`path`,{d:`m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10`,key:`1qfld7`}]]};fv.node;var pv=z(fv),mv={name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]};mv.node;var hv=z(mv),gv={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};gv.node;var _v=z(gv),vv={name:`message-square`,size:24,node:[[`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`}]]};vv.node;var yv=z(vv),bv={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};bv.node;var xv=z(bv),Sv={name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]};Sv.node;var Cv=z(Sv),wv={name:`moon`,size:24,node:[[`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`}]]};wv.node;var Tv=z(wv),Ev={name:`palette`,size:24,node:[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]};Ev.node;var Dv=z(Ev),Ov={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};Ov.node;var kv=z(Ov),Av={name:`radio-tower`,size:24,node:[[`path`,{d:`M4.9 16.1C1 12.2 1 5.8 4.9 1.9`,key:`s0qx1y`}],[`path`,{d:`M7.8 4.7a6.14 6.14 0 0 0-.8 7.5`,key:`1idnkw`}],[`circle`,{cx:`12`,cy:`9`,r:`2`,key:`1092wv`}],[`path`,{d:`M16.2 4.8c2 2 2.26 5.11.8 7.47`,key:`ojru2q`}],[`path`,{d:`M19.1 1.9a9.96 9.96 0 0 1 0 14.1`,key:`rhi7fg`}],[`path`,{d:`M9.5 18h5`,key:`mfy3pd`}],[`path`,{d:`m8 22 4-11 4 11`,key:`25yftu`}]]};Av.node;var pee=z(Av),jv={name:`refresh-cw`,size:24,node:[[`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`}]]};jv.node;var Mv=z(jv),Nv={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};Nv.node;var mee=z(Nv),Pv={name:`scroll-text`,size:24,node:[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]};Pv.node;var Fv=z(Pv),Iv={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Iv.node;var Lv=z(Iv),Rv={name:`server`,size:24,node:[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]};Rv.node;var hee=z(Rv),zv={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};zv.node;var Bv=z(zv),Vv={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};Vv.node;var Hv=z(Vv),Uv={name:`star`,size:24,node:[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]};Uv.node;var gee=z(Uv),Wv={name:`sun`,size:24,node:[[`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`}]]};Wv.node;var Gv=z(Wv),Kv={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Kv.node;var qv=z(Kv),Jv={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};Jv.node;var _ee=z(Jv),Yv={name:`user`,size:24,node:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]};Yv.node;var Xv=z(Yv),Zv={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Zv.node;var Qv=z(Zv),vee={size:{small:{pixels:16,purpose:`Dense metadata and supporting controls`},default:{pixels:20,purpose:`Standard interface controls`},large:{pixels:24,purpose:`Prominent standalone indicators`}}},yee={size:`default`},bee={"arrow-down":Yg,"arrow-left":Zg,"arrow-right":$g,"arrow-up":lee,check:l_,"chevron-down":d_,"chevron-left":h_,"chevron-right":p_,"chevron-up":__,alert:y_,clock:D_,"external-link":L_,file:U_,link:rv,loader:av,menu:_v,minus:xv,plus:kv,search:Lv,user:Xv,close:Qv},xee=e=>vee.size[e??yee.size].pixels,$v=e=>{let t=bee[e.name],n=xee(e.size),r={className:e.className,color:`currentColor`,focusable:!1,height:n,strokeWidth:1.75,width:n};if(e.decorative)return(0,L.jsx)(t,{...r,"aria-hidden":`true`});if(e.label.trim().length===0)throw Error(`Informative Icon labels must contain visible text`);return(0,L.jsx)(Ua,{label:e.label,children:(0,L.jsx)(t,{...r})})},ey={available:!1},ty=(0,N.createContext)(ey),ny=()=>(0,N.useContext)(ty),ry=({children:e})=>{let t=ny();return t.available?e(t.container):null},See=({children:e,container:t})=>{let[n,r]=(0,N.useState)(null),i=t===void 0?n:t,a=i===null?ey:{available:!0,container:i};return(0,L.jsxs)(ty.Provider,{value:a,children:[e,t===void 0?(0,L.jsx)(`div`,{"data-rly-portal-root":``,ref:r}):null]})},iy=(0,N.createContext)(e=>(0,L.jsx)(`a`,{...e})),Cee=()=>(0,N.useContext)(iy),wee=({children:e,component:t})=>(0,L.jsx)(iy.Provider,{value:t,children:e}),ay=e=>{let t=Cee();return(0,L.jsx)(t,{...e})},oy={dockerDismissed:`codecommit-docker-dismissed`,grantedDismissed:`codecommit-granted-dismissed`,theme:`codecommit-theme`,desktopNotifications:`codecommit:desktopNotifications`,reminders:`codecommit:reminders`,reminderInterval:`codecommit:reminderInterval`},sy=(0,N.createContext)({theme:`system`,setTheme:()=>{}}),Tee=(0,N.forwardRef)(function({href:e,...t},n){return(0,L.jsx)(Ji,{...t,ref:n,to:e})}),Eee=()=>{try{let e=localStorage.getItem(oy.theme);return e===`dark`||e===`light`||e===`system`?e:`system`}catch{return`system`}},Dee=()=>window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`;function Oee({children:e}){let[t,n]=(0,N.useState)(Eee),[r,i]=(0,N.useState)(Dee),a=(0,N.useCallback)(e=>{n(e);try{localStorage.setItem(oy.theme,e)}catch{}},[]);(0,N.useEffect)(()=>{let e=document.documentElement,n=t===`system`?r:t;e.classList.remove(`dark`,`light`),e.classList.add(n),e.dataset.theme=t},[r,t]),(0,N.useEffect)(()=>{let e=window.matchMedia(`(prefers-color-scheme: dark)`),t=()=>i(e.matches?`dark`:`light`);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let o=(0,N.useMemo)(()=>({theme:t,setTheme:a}),[a,t]);return(0,L.jsx)(sy,{value:o,children:(0,L.jsx)(Pg,{theme:t,children:(0,L.jsx)(See,{children:(0,L.jsx)(wee,{component:Tee,children:e})})})})}var cy=()=>(0,N.useContext)(sy),ly=(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 e=0,r=t.length;e<r;e++)n=t[e](n);return n}}},uy={pipe(){return ly(this,arguments)}},dy=function(){function e(){}return e.prototype=uy,e}(),B=function(e,t){if(typeof e==`function`)return function(){return e(arguments)?t.apply(this,arguments):e=>t(e,...arguments)};switch(e){case 0:case 1:throw RangeError(`Invalid arity ${e}`);case 2:return function(e,n){return arguments.length>=2?t(e,n):function(n){return t(n,e)}};case 3:return function(e,n,r){return arguments.length>=3?t(e,n,r):function(r){return t(r,e,n)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);let n=arguments;return function(e){return t(e,...n)}}}},fy=e=>e,py=e=>()=>e,my=py(!0),hy=py(!1),kee=py(null),gy=py(void 0),_y=gy;function vy(e,...t){return ly(e,t)}function Aee(e,t,n,r,i,a,o,s,c){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return a(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return o(a(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return s(o(a(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return c(s(o(a(i(r(n(t(e.apply(this,arguments)))))))))}}}function yy(e){let t=new WeakMap;return n=>{let r=t.get(n);if(r!==void 0)return r;let i=e(n);return t.set(n,i),i}}function by(e){let t=new WeakMap;return n=>{let r=t.get(n);if(r!==void 0)return r;let i=e(n);return t.set(n,i),i!==n&&t.set(i,i),i}}var xy=e=>{let t=new Set(Reflect.ownKeys(e));if(e.constructor===Object)return t;e instanceof Error&&t.delete(`stack`);let n=Object.getPrototypeOf(e),r=n;for(;r!==null&&r!==Object.prototype;){let e=Reflect.ownKeys(r);for(let n=0;n<e.length;n++)t.add(e[n]);r=Object.getPrototypeOf(r)}return t.has(`constructor`)&&typeof e.constructor==`function`&&n===e.constructor.prototype&&t.delete(`constructor`),t},Sy=new WeakSet,Cy=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),wy=0,Ty=()=>{wy++};function Ey(e){return typeof e==`string`}function Dy(e){return typeof e==`number`}function Oy(e){return typeof e==`boolean`}function ky(e){return typeof e==`symbol`}function Ay(e){return Ey(e)||Dy(e)||ky(e)}function jy(e){return typeof e==`function`}function My(e){return e===void 0}function Ny(e){return e!==void 0}function Py(e){return e!=null}function Fy(e){return!1}function Iy(e){return!0}function Ly(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ry(e){return typeof e==`object`&&!!e||jy(e)}var zy=B(2,(e,t)=>Ry(e)&&t in e),By=B(2,(e,t)=>zy(e,`_tag`)&&e._tag===t);function Vy(e){return e instanceof Error}function Hy(e){return zy(e,Symbol.iterator)||Ey(e)}var Uy=`~effect/Hash`,Wy=e=>{switch(typeof e){case`number`:return Xy(e);case`bigint`:return Zy(e.toString(10));case`string`:return Zy(e);case`function`:case`object`:if(e===null)break;if(e instanceof Date)return Number.isNaN(e.getTime())?Zy(`Invalid Date`):Zy(e.toISOString());if(e instanceof RegExp)return Zy(e.toString());{if(Sy.has(e))return Gy(e);let t=ob.get(e);if(t!==void 0)return t;if(sb.has(e))return Ty(),Zy(`[Circular]`);sb.add(e);let n=wy,r;try{r=`~effect/Hash`in e?e[Uy]():typeof e==`function`?Gy(e):e instanceof DataView?tb(Cy(e)):Array.isArray(e)||ArrayBuffer.isView(e)?tb(e):e instanceof Map?nb(e):e instanceof Set?ib(e):$y(e)}finally{sb.delete(e)}return n===wy&&ob.set(e,r),r}}return Jy(Ky(Zy(String(e))))},Gy=e=>(ab.has(e)||ab.set(e,Jy(Math.random()*4294967296|0)),ab.get(e)),Ky=e=>(e^=e>>>16,e=Math.imul(e,2246822507),e^=e>>>13,e=Math.imul(e,3266489909),e^e>>>16),qy=B(2,(e,t)=>Ky(Math.imul(e,2654435761)+Math.imul(t,2246822507))),Jy=e=>e&3221225471|e>>>1&1073741824,Yy=new DataView(new ArrayBuffer(8)),Xy=e=>{let t=e|0;return t===e?Jy(t):(Yy.setFloat64(0,e===e?e:NaN),Jy(qy(Yy.getInt32(0),Yy.getInt32(4))))},Zy=e=>{let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return Jy(t)},Qy=(e,t)=>{let n=12289;for(let r of t)n^=qy(Wy(r),Wy(e[r]));return Jy(n)},$y=e=>Qy(e,xy(e)),eb=(e,t)=>n=>{let r=e;for(let e of n)r^=t(e);return Jy(r)},tb=e=>{let t=6151;for(let n of e)t=qy(t,Wy(n));return Jy(t)},nb=eb(Zy(`Map`),([e,t])=>qy(Wy(e),Wy(t))),rb=Zy(`Set`),ib=eb(rb,e=>qy(rb,Wy(e))),ab=new WeakMap,ob=new WeakMap,sb=new WeakSet,cb=`~effect/Equal`;function lb(){return arguments.length===1?e=>ub(e,arguments[0]):ub(arguments[0],arguments[1])}function ub(e,t){if(e===t)return!0;if(e==null||t==null)return!1;let n=typeof e;return n===typeof t?n===`number`&&e!==e&&t!==t?!0:n!==`object`&&n!==`function`||Sy.has(e)||Sy.has(t)?!1:db(e,t):!1}function db(e,t){let n=pb.length;for(let r=n;r-->0;)if(pb[r]===e&&mb[r]===t)return!0;if(n)return fb(e,t);let r=hb.get(e);r||hb.set(e,r=new WeakMap);let i=r.get(t);return i===void 0&&r.set(t,i=fb(e,t)),i}function fb(e,t){pb.push(e),mb.push(t);try{return gb(e,t)}finally{pb.pop(),mb.pop()}}var pb=[],mb=[],hb=new WeakMap;function gb(e,t){if(Wy(e)!==Wy(t))return!1;if(e instanceof Date){if(!(t instanceof Date))return!1;let n=e.getTime(),r=t.getTime();return n===r||Number.isNaN(n)&&Number.isNaN(r)}if(e instanceof RegExp)return t instanceof RegExp&&e.toString()===t.toString();let n=Sb(e);if(n!==Sb(t)||typeof e==`function`&&!n)return!1;if(n)return e[cb](t);if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:_b(e,t);if(ArrayBuffer.isView(e)){let n=e instanceof DataView;return!ArrayBuffer.isView(t)||e.byteLength!==t.byteLength||n!==t instanceof DataView?!1:n?vb(Cy(e),Cy(t)):vb(e,t)}return e instanceof Map?!(t instanceof Map)||e.size!==t.size?!1:bb(e,t,xb,jee):e instanceof Set?!(t instanceof Set)||e.size!==t.size?!1:bb(e,t,Wy,ub):yb(e,t)}function _b(e,t){for(let n=0;n<e.length;n++)if(!ub(e[n],t[n]))return!1;return!0}function vb(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function yb(e,t){let n=xy(e),r=xy(t);if(n.size!==r.size)return!1;for(let i of n)if(!r.has(i)||!ub(e[i],t[i]))return!1;return!0}function bb(e,t,n,r){let i=new Map;for(let e of t){let t=n(e),r=i.get(t);r?r.push(e):i.set(t,[e])}outer:for(let t of e){let e=i.get(n(t));if(e){for(let n=0;n<e.length;n++)if(r(t,e[n])){e[n]=e[e.length-1],e.pop();continue outer}}return!1}return!0}var xb=e=>Wy(e[0]),jee=(e,t)=>ub(e[0],t[0])&&ub(e[1],t[1]),Sb=e=>zy(e,cb),Mee=()=>lb,Cb=Symbol.for(`~effect/Redactable`),Nee=e=>zy(e,Cb);function wb(e){return Nee(e)?Tb(e):e}function Tb(e){return e[Cb](globalThis[`~effect/Fiber/currentFiber`]?.context??Pee)}var Eb=`~effect/Fiber/currentFiber`,Db=new Map,Pee={"~effect/Context":{},base:Db,depth:0,mapUnsafe:Db,pipe(){return ly(this,arguments)}};function Ob(e,t){let n=t?.space??0,r=new WeakSet,i=n?typeof n==`number`?` `.repeat(n):n:``,a=e=>i.repeat(e),o=(e,t)=>{let n=e?.constructor;return n&&n!==Object.prototype.constructor&&n.name?`${n.name}(${t})`:t},s=e=>{try{return Reflect.ownKeys(e)}catch{return[`[ownKeys threw]`]}};function c(e,t=0){try{return l(e,t)}catch{return(typeof e==`object`&&e||typeof e==`function`)&&r.delete(e),`[inspection threw]`}}function l(e,n=0){if(typeof e==`string`)return JSON.stringify(e);if(typeof e==`number`||e==null||typeof e==`boolean`||typeof e==`symbol`)return String(e);if(typeof e==`bigint`)return String(e)+`n`;if(typeof e==`object`||typeof e==`function`){if(r.has(e))return Fee;r.add(e);let l;if(Cb in e)l=c(Tb(e),n);else if(Array.isArray(e))l=!i||e.length<=1?`[${e.map(e=>c(e,n)).join(`,`)}]`:`[\n${a(n+1)}${e.map(e=>c(e,n+1)).join(`,
51
+ `+a(n+1))}\n${a(n)}]`;else if(e instanceof Date)l=Ab(e);else if(!t?.ignoreToString&&zy(e,`toString`)&&typeof e.toString==`function`&&e.toString!==Object.prototype.toString&&e.toString!==Array.prototype.toString){let t=Lee(e);l=e instanceof Error&&e.cause!==void 0?`${t} (cause: ${c(e.cause,n)})`:t}else if(Symbol.iterator in e)l=`${e.constructor.name}(${c(Array.from(e),n)})`;else{let t=s(e);if(!i||t.length<=1){let r=`{${t.map(t=>`${kb(t)}:${c(jb(e,t),n)}`).join(`,`)}}`;l=o(e,r)}else{let r=`{\n${t.map(t=>`${a(n+1)}${kb(t)}: ${c(jb(e,t),n+1)}`).join(`,
52
+ `)}\n${a(n)}}`;l=o(e,r)}}return r.delete(e),l}return String(e)}return c(e,0)}var Fee=`[Circular]`;function kb(e){return typeof e==`string`?JSON.stringify(e):String(e)}function Iee(e){return e.map(e=>`[${kb(e)}]`).join(``)}function Ab(e){try{return e.toISOString()}catch{return`Invalid Date`}}function Lee(e){try{let t=e.toString();return typeof t==`string`?t:String(t)}catch{return`[toString threw]`}}function jb(e,t){try{return e[t]}catch{return`[property access threw]`}}function Ree(e,t){let n=[];return JSON.stringify(e,function(e,t){let r=Object.getOwnPropertyDescriptor(this,e)?.value,i=zy(r,Cb)?wb(r):wb(t);if(typeof i==`bigint`)return Ob(i);if(typeof i!=`object`||!i)return i;let a=i instanceof Error&&!zy(i,`toJSON`)?{...i,name:i.name,message:i.message}:i;for(;n.length>0&&n[n.length-1]!==this;)n.pop();if(!n.includes(i))return n.push(i),a!==i&&n.push(a),a},t?.space)??`null`}var Mb=Symbol.for(`nodejs.util.inspect.custom`),Nb=e=>{try{return e=wb(e),zy(e,`toJSON`)&&jy(e.toJSON)&&e.toJSON.length===0?e.toJSON():Array.isArray(e)?e.map(Nb):e}catch{return`[toJSON threw]`}},Pb={toJSON(){return Nb(this)},[Mb](){return this.toJSON()},toString(){return Ob(this.toJSON())}},zee=class{[Mb](){return this.toJSON()}toString(){return Ob(this.toJSON())}},Bee=(()=>{let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.hasOwn(e,`writable`)?e.writable===!0:e.set!==void 0})(),Fb=()=>Error.stackTraceLimit,Ib=e=>{Bee&&(Error.stackTraceLimit=e)},Lb=class{constructor(e){this.value=e,this.done=!1}next(e){return this.done?(this.value=e,this):(this.done=!0,{value:this.value,done:!1})}},Rb=(()=>{let e=`~effect/Utils/internal`,t={[e]:e=>e()},n={[e]:e=>{try{return e()}finally{}}};return Fb()!==0&&t[e](()=>Error().stack)?.includes(e)===!0?t[e]:n[e]})();function zb(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0}):e[t]=n}function Bb(e,t){for(let n of Reflect.ownKeys(t))Object.prototype.propertyIsEnumerable.call(t,n)&&zb(e,n,t[n])}var Vb=`~effect/Effect`,Hb=`~effect/Exit`,Ub={_A:fy,_E:fy,_R:fy},Wb=`${Vb}/identifier`,Gb=`${Vb}/args`,Kb=`${Vb}/evaluate`,qb=`${Vb}/successCont`,Jb=`${Vb}/failureCont`,Yb=`${Vb}/ensureCont`,Xb=Symbol.for(`effect/Effect/Yield`),Zb={pipe(){return ly(this,arguments)},toJSON(){return{...this}},toString(){return Ob(this.toJSON(),{ignoreToString:!0,space:2})},[Mb](){return this.toJSON()}},Qb={[Vb]:Ub,...Zb,[Symbol.iterator](){return new Lb(this)},toJSON(){return{_id:`Effect`,op:this[Wb],...Gb in this?{args:this[Gb]}:void 0}}},$b=e=>zy(e,Vb),ex=e=>zy(e,Hb),tx=`~effect/Cause`,nx=`~effect/Cause/Reason`,rx=e=>zy(e,tx),ix=e=>zy(e,nx),ax=class{constructor(e){this[tx]=tx,this.reasons=e}pipe(){return ly(this,arguments)}toJSON(){return{_id:`Cause`,failures:this.reasons.map(e=>e.toJSON())}}toString(){return`Cause(${Ob(this.reasons)})`}[Mb](){return this.toJSON()}[cb](e){return rx(e)&&this.reasons.length===e.reasons.length&&this.reasons.every((t,n)=>lb(t,e.reasons[n]))}[Uy](){return tb(this.reasons)}},ox=new WeakMap,sx=class{[nx];annotations;_tag;constructor(e,t,n){if(this[nx]=nx,this._tag=e,t!==cx&&typeof n==`object`&&n&&t.size>0){let e=ox.get(n);e&&(t=new Map([...e,...t])),ox.set(n,t)}this.annotations=t}annotate(e,t){if(e.mapUnsafe.size===0)return this;let n=new Map(this.annotations);e.mapUnsafe.forEach((e,r)=>{t?.overwrite!==!0&&n.has(r)||n.set(r,e)});let r=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return r.annotations=n,r}pipe(){return ly(this,arguments)}toString(){return Ob(this)}[Mb](){return this.toString()}},cx=new Map,lx=class extends sx{constructor(e,t=cx){super(`Fail`,t,e),this.error=e}toString(){return`Fail(${Ob(this.error)})`}toJSON(){return{_tag:`Fail`,error:this.error}}[cb](e){return hx(e)&&lb(this.error,e.error)&&lb(this.annotations,e.annotations)}[Uy](){return qy(Zy(this._tag))(qy(Wy(this.error))(Wy(this.annotations)))}},ux=e=>new ax(e),dx=e=>new ax([new lx(e)]),fx=class extends sx{constructor(e,t=cx){super(`Die`,t,e),this.defect=e}toString(){return`Die(${Ob(this.defect)})`}toJSON(){return{_tag:`Die`,defect:this.defect}}[cb](e){return gx(e)&&lb(this.defect,e.defect)&&lb(this.annotations,e.annotations)}[Uy](){return qy(Zy(this._tag))(qy(Wy(this.defect))(Wy(this.annotations)))}},px=e=>new ax([new fx(e)]),mx=B(e=>rx(e[0]),(e,t,n)=>t.mapUnsafe.size===0?e:new ax(e.reasons.map(e=>e.annotate(t,n)))),hx=e=>e._tag===`Fail`,gx=e=>e._tag===`Die`,_x=e=>e._tag===`Interrupt`;function vx(e){return Dx(`Effect.evaluate: Not implemented`)}var yx=e=>({...Qb,[Wb]:e.op,[Kb]:e[Kb]??vx,[qb]:e[qb],[Jb]:e[Jb],[Yb]:e[Yb]}),bx=e=>{let t=yx(e),n=function(e){this[Gb]=e};return n.prototype=t,function(e){return new n(e)}},xx=e=>{let t={[Hb]:Hb,_tag:e.op,get[e.prop](){return this[Gb]},...yx(e),toString(){return`${e.op}(${Ob(this[Gb])})`},toJSON(){return{_id:`Exit`,_tag:e.op,[e.prop]:this[Gb]}},[cb](e){return ex(e)&&e._tag===this._tag&&lb(this[Gb],e[Gb])},[Uy](){return qy(Zy(e.op),Wy(this[Gb]))}},n=function(e){this[Gb]=e};return n.prototype=t,function(e){return new n(e)}},Sx=xx({op:`Success`,prop:`value`,[Kb](e){let t=e.getCont(qb);return t?t[qb](this[Gb],e,this):e.yieldWith(this)}}),Cx={key:`effect/Cause/StackTrace`},wx={key:`effect/Cause/InterruptorStackTrace`},Tx=xx({op:`Failure`,prop:`cause`,[Kb](e){let t=this[Gb],n=!1;e.cache.stackFrame&&(t=mx(t,{mapUnsafe:new Map([[Cx.key,e.cache.stackFrame]])}),n=!0);let r=e.getCont(Jb);for(;e.interruptible&&e._interruptedCause&&r;)r=e.getCont(Jb);return r?r[Jb](t,e,n?void 0:this):e.yieldWith(n?Tx(t):this)}}),Ex=e=>Tx(dx(e)),Dx=e=>Tx(px(e)),Ox=bx({op:`WithFiber`,[Kb](e){return this[Gb](e)}}),kx=function(){class e extends globalThis.Error{}let t=yx({op:`YieldableError`,[Kb](){return Ex(this)}});return delete t.toString,Object.assign(e.prototype,t),e}(),Ax=function(){let e=Symbol.for(`effect/Data/Error/plainArgs`);return class extends kx{constructor(t){super(t?.message,t?.cause?{cause:t.cause}:void 0),t&&(Bb(this,t),Object.defineProperty(this,e,{value:t,enumerable:!1}))}toJSON(){return{...this[e],...this}}}}(),jx=e=>{class t extends Ax{_tag=e}return t.prototype.name=e,t},Mx=`~effect/Cause/NoSuchElementError`,Nx=class extends jx(`NoSuchElementError`){[Mx]=Mx;constructor(e){super({message:e})}},Px=`~effect/Cause/Done`,Fx=e=>zy(e,Px),Ix={[Px]:Px,_tag:`Done`,value:void 0},Lx=e=>e===void 0?Ix:{[Px]:Px,_tag:`Done`,value:e},Rx=Ex(Ix),zx=e=>e===void 0?Rx:Ex(Lx(e)),Bx=e=>yx({op:e.label,[Kb]:e.evaluate}),Vx=e=>(t,n)=>t===n||e(t,n),Hx=(e,t)=>e===t,Ux=()=>Hx;function Wx(e){return Vx((t,n)=>{if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!e[r](t[r],n[r]))return!1;return!0})}function Gx(e){return Vx((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})}var Kx=`~effect/Option`,qx={[Kx]:{_A:e=>e},...Zb,[Symbol.iterator](){return new Lb(this)}},Jx=Object.defineProperty(Object.assign(Object.create(qx),{_tag:`Some`,_op:`Some`,[cb](e){return Zx(e)&&$x(e)&&lb(this.value,e.value)},[Uy](){return qy(Wy(this._tag))(Wy(this.value))},toString(){return`some(${Ob(this.value)})`},toJSON(){return{_id:`Option`,_tag:this._tag,value:Nb(this.value)}}}),"valueOrUndefined",{get(){return this.value}}),Yx=Wy(`None`),Xx=Object.assign(Object.create(qx),{_tag:`None`,_op:`None`,valueOrUndefined:void 0,[cb](e){return Zx(e)&&Qx(e)},[Uy](){return Yx},toString(){return`none()`},toJSON(){return{_id:`Option`,_tag:this._tag}}}),Zx=e=>zy(e,Kx),Qx=e=>e._tag===`None`,$x=e=>e._tag===`Some`,eS=Object.create(Xx),tS=function(e){this.value=e};tS.prototype=Jx;var nS=e=>new tS(e),rS=`~effect/Result`,iS={[rS]:{_A:e=>e,_E:e=>e},...Zb,[Symbol.iterator](){return new Lb(this)}},aS=Object.assign(Object.create(iS),{_tag:`Success`,_op:`Success`,[cb](e){return sS(e)&&lS(e)&&lb(this.success,e.success)},[Uy](){return qy(Wy(this._tag))(Wy(this.success))},toString(){return`success(${Ob(this.success)})`},toJSON(){return{_id:`Result`,_tag:this._tag,value:Nb(this.success)}}}),oS=Object.assign(Object.create(iS),{_tag:`Failure`,_op:`Failure`,[cb](e){return sS(e)&&cS(e)&&lb(this.failure,e.failure)},[Uy](){return qy(Wy(this._tag))(Wy(this.failure))},toString(){return`failure(${Ob(this.failure)})`},toJSON(){return{_id:`Result`,_tag:this._tag,failure:Nb(this.failure)}}}),sS=e=>zy(e,rS),cS=e=>e._tag===`Failure`,lS=e=>e._tag===`Success`,uS=function(e){this.failure=e};uS.prototype=oS;var dS=e=>new uS(e),fS=function(e){this.success=e};fS.prototype=aS;var pS=e=>new fS(e);function mS(e){return(t,n)=>t===n?0:e(t,n)}var hS=mS((e,t)=>e<t?-1:1),gS=mS((e,t)=>globalThis.Number.isNaN(e)&&globalThis.Number.isNaN(t)?0:globalThis.Number.isNaN(e)?-1:globalThis.Number.isNaN(t)?1:e<t?-1:1),_S=B(2,(e,t)=>mS((n,r)=>e(t(n),t(r)))),vS=e=>B(2,(t,n)=>e(t,n)===-1),yS=e=>B(2,(t,n)=>e(t,n)===1),bS=e=>B(2,(t,n)=>e(t,n)!==1),xS=e=>B(2,(t,n)=>e(t,n)!==-1),SS=()=>eS,CS=nS,wS=Zx,TS=Qx,ES=$x,DS=B(2,(e,{onNone:t,onSome:n})=>TS(e)?t():n(e.value)),OS=B(2,(e,t)=>TS(e)?t():e.value),kS=B(2,(e,t)=>TS(e)?t():e),AS=e=>e==null?SS():CS(e),jS=OS(kee),MS=OS(gy),NS=B(2,(e,t)=>{if(ES(e))return e.value;throw t()}),PS=B(2,(e,t)=>TS(e)?SS():CS(t(e.value))),FS=B(2,(e,t)=>TS(e)?SS():t(e.value)),IS=B(2,(e,t)=>TS(e)?SS():AS(t(e.value))),LS=B(2,(e,t)=>TS(e)?SS():t(e.value)?CS(e.value):SS()),RS=`~effect/Context/Service`,zS=function(){function e(){}let t=e;Object.setPrototypeOf(t,BS);let n=(e,n)=>(t.key=e,n?.defaultValue&&(t[HS]=HS,t.defaultValue=n.defaultValue),n?.make&&(t.make=n.make),n?.fiberCached&&VS.add(e),t);return arguments.length>0?n(arguments[0],arguments[1]):n},BS={[RS]:RS,...Bx({label:`Service`,evaluate(e){return Sx(aC(e.context,this))}}),toJSON(){return{_id:`Service`,key:this.key}},of(e){return e},context(e){return eC(this,e)},use(e){return Ox(t=>e(aC(t.context,this)))},useSync(e){return Ox(t=>Sx(e(aC(t.context,this))))}},VS=new Set,HS=`~effect/Context/Reference`,US=`~effect/Context`,WS=8,GS=8,KS=(e,t,n,r)=>{let i=Object.create(Vee);return i.cacheRoot=e??i,i.base=t,i.overlay=n,i.depth=r,i._flat=void 0,i.baseHits=0,i},qS=(e,t)=>{t&&(qS(e,t.parent),e.set(t.key,t.value))},JS=e=>{if(e._flat)return e._flat;if(!e.overlay)return e._flat=e.base;let t=new Map(e.base);return qS(t,e.overlay),e._flat=t},YS=(e,t)=>{let n=new Map(e.mapUnsafe);return t(n),QS(n)},XS=Symbol(),ZS=(e,t)=>{let n=e;for(let e=n.overlay;e;e=e.parent)if(e.key===t)return e.value;let r=n.base.get(t);return r===void 0&&!n.base.has(t)?XS:(n.overlay&&++n.baseHits>=n.base.size&&n.baseHits>=GS&&(n.base=JS(n),n.overlay=void 0,n.depth=0),r)},QS=e=>KS(void 0,e,void 0,0),Vee={get mapUnsafe(){return JS(this)},...Zb,[US]:{_Services:e=>e},toJSON(){return{_id:`Context`,services:Array.from(this.mapUnsafe).map(([e,t])=>({key:e,value:t}))}},[cb](e){if(!Uee(e))return!1;let t=this.mapUnsafe,n=e.mapUnsafe;if(t.size!==n.size)return!1;for(let[e,r]of t)if(!n.has(e)||!lb(r,n.get(e)))return!1;return!0},[Uy](){return Xy(this.mapUnsafe.size)}},Hee=(e,t)=>e.cacheRoot===t.cacheRoot,Uee=e=>zy(e,US),Wee=e=>!!e[HS],$S=()=>Gee,Gee=QS(new Map),eC=(e,t)=>QS(new Map([[e.key,t]])),tC=B(3,(e,t,n)=>Kee(e,t.key,n)),Kee=(e,t,n)=>{let r=e,i=VS.has(t)?void 0:r.cacheRoot;if(r.depth>=WS){let e=new Map(r.mapUnsafe);return e.set(t,n),KS(i,e,void 0,0)}return KS(i,r.base,{key:t,value:n,parent:r.overlay},r.depth+1)},nC=B(2,(e,t)=>rC(e,t.key)),rC=(e,t)=>{let n=ZS(e,t);return n===XS?void 0:n},iC=B(2,(e,t)=>{let n=ZS(e,t.key);if(n===XS){if(Wee(t))return qee(t);throw Jee(t)}return n}),aC=iC,oC=`~effect/Context/defaultValue`,qee=e=>oC in e?e[oC]:e[oC]=e.defaultValue(),Jee=e=>{let t=Error(`Service not found${e.key?`: ${String(e.key)}`:``}`);if(t.stack){let e=t.stack.split(`
53
+ `);e.splice(1,3),t.stack=e.join(`
54
+ `)}return t},sC=B(2,(e,t)=>e.mapUnsafe.size===0?t:t.mapUnsafe.size===0?e:YS(e,e=>t.mapUnsafe.forEach((t,n)=>e.set(n,t)))),Yee=(...e)=>{let t=new Map;for(let n=0;n<e.length;n++)e[n].mapUnsafe.forEach((e,n)=>{t.set(n,e)});return QS(t)},Xee=(...e)=>t=>YS(t,t=>{for(let n=0;n<e.length;n++)t.delete(e[n].key)}),cC=zS,lC=e=>e.length>0,uC=e=>e>0?Math.floor(e):0,dC=pS,fC=dS,pC=e=>{if(jy(e))try{return dC(e())}catch(e){return fC(e)}try{return dC(e.try())}catch(t){return fC(e.catch(t))}},Zee=sS,mC=cS,hC=lS,Qee=B(2,(e,t)=>mC(e)?fC(t(e.failure)):e),$ee=B(2,(e,{onFailure:t,onSuccess:n})=>mC(e)?t(e.failure):n(e.success)),ete=Wx,tte=B(2,(e,t)=>Object.hasOwn(e,t)),gC=B(2,(e,t)=>{let n={...e};for(let r of _C(e))zb(n,r,t(e[r],r));return n}),_C=e=>Object.keys(e),nte=e=>B(2,(t,n)=>{for(let r of _C(t))if(!tte(n,r)||!e(t[r],n[r]))return!1;return!0}),rte=e=>{let t=nte(e);return(e,n)=>t(e,n)&&t(n,e)},vC=globalThis.Array,yC=e=>vC.isArray(e)?e:vC.from(e),bC=e=>vC.isArray(e)?e:[e],xC=B(2,(e,t)=>[...e,t]),SC=B(2,(e,t)=>yC(e).concat(yC(t)));vC.isArray;var CC=lC,wC=lC,ite=e=>e[e.length-1],ate=(e,t)=>{let n=Wy(t),r=e.get(n);if(r===void 0)return e.set(n,[t]),!0;for(let e of r)if(lb(e,t))return!1;return r.push(t),!0},TC=()=>[],EC=e=>[e],DC=B(2,(e,t)=>e.map(t)),ote=Gx,ste=e=>{let t=yC(e);if(t.length<2)return[...t];let n=new Map,r=[];for(let e of t)ate(n,e)&&r.push(e);return r},OC=`~effect/Duration`,kC=BigInt(0),AC=BigInt(1),cte=BigInt(2),lte=BigInt(10),ute=BigInt(1e3),jC=e=>BigInt(e<0?Math.ceil(e-.5):Math.floor(e+.5)),MC=e=>jC(e*1e6),NC=(e,t)=>{let n=e.indexOf(`.`);if(n===-1)return BigInt(e)*t;let r=e[0]===`-`,i=e.slice(n+1),a=lte**BigInt(i.length),o=(BigInt(e.slice(+!!r,n))*a+BigInt(i))*t,s=o/a+(o%a*cte>=a?AC:kC);return r?-s:s},dte=/^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/,PC=e=>{switch(typeof e){case`number`:return HC(e);case`bigint`:return VC(e);case`string`:{if(e===`Infinity`)return zC;if(e===`-Infinity`)return BC;let t=dte.exec(e);if(!t)break;let[n,r,i]=t;if(i===`nano`||i===`nanos`)return VC(NC(r,AC));if(i===`micro`||i===`micros`)return VC(NC(r,ute));let a=Number(r);switch(i){case`milli`:case`millis`:return HC(a);case`second`:case`seconds`:return UC(a);case`minute`:case`minutes`:return WC(a);case`hour`:case`hours`:return GC(a);case`day`:case`days`:return KC(a);case`week`:case`weeks`:return qC(a)}break}case`object`:{if(e===null)break;if(OC in e)return e;if(Array.isArray(e))return e.length!==2||!e.every(Dy)?FC(e):Number.isNaN(e[0])||Number.isNaN(e[1])?gte:e[0]===-1/0||e[1]===-1/0?BC:e[0]===1/0||e[1]===1/0?zC:LC(jC(e[0]*1e9+e[1]));let t=e,n=0;return t.weeks&&(n+=t.weeks*6048e5),t.days&&(n+=t.days*864e5),t.hours&&(n+=t.hours*36e5),t.minutes&&(n+=t.minutes*6e4),t.seconds&&(n+=t.seconds*1e3),t.milliseconds&&(n+=t.milliseconds),!t.microseconds&&!t.nanoseconds?LC(n):LC(jC(n*1e6+(t.microseconds??0)*1e3+(t.nanoseconds??0)))}}return FC(e)},FC=e=>{throw Error(`Invalid Input: ${e}`)},IC={_tag:`Millis`,millis:0},fte={_tag:`Infinity`},pte={_tag:`NegativeInfinity`},mte={[OC]:OC,[Uy](){switch(this.value._tag){case`Millis`:{let e=this.value.millis*1e6;return Number.isFinite(e)?Wy(jC(e)):Xy(this.value.millis)}case`Nanos`:return Wy(this.value.nanos);default:return $y(this.value)}},[cb](e){return hte(e)&&ew(this,e)},toString(){switch(this.value._tag){case`Infinity`:return`Infinity`;case`NegativeInfinity`:return`-Infinity`;case`Nanos`:return`${this.value.nanos} nanos`;case`Millis`:return`${this.value.millis} millis`}},toJSON(){switch(this.value._tag){case`Millis`:return{_id:`Duration`,_tag:`Millis`,millis:this.value.millis};case`Nanos`:return{_id:`Duration`,_tag:`Nanos`,nanos:String(this.value.nanos)};case`Infinity`:return{_id:`Duration`,_tag:`Infinity`};case`NegativeInfinity`:return{_id:`Duration`,_tag:`NegativeInfinity`}}},[Mb](){return this.toJSON()},pipe(){return ly(this,arguments)}},LC=e=>{let t=Object.create(mte);return t.value=typeof e==`number`?isNaN(e)||e===0||Object.is(e,-0)?IC:Number.isFinite(e)?Number.isInteger(e)?{_tag:`Millis`,millis:e}:{_tag:`Nanos`,nanos:MC(e)}:e>0?fte:pte:e===kC?IC:{_tag:`Nanos`,nanos:e},t},hte=e=>zy(e,OC),RC=e=>e.value._tag!==`Infinity`&&e.value._tag!==`NegativeInfinity`,gte=LC(0),zC=LC(1/0),BC=LC(-1/0),VC=e=>LC(e),HC=e=>LC(e),UC=e=>LC(e*1e3),WC=e=>LC(e*6e4),GC=e=>LC(e*36e5),KC=e=>LC(e*864e5),qC=e=>LC(e*6048e5),JC=e=>ZC(PC(e),{onMillis:fy,onNanos:e=>Number(e)/1e6,onInfinity:()=>1/0,onNegativeInfinity:()=>-1/0}),YC=e=>ZC(PC(e),{onMillis:e=>e/36e5,onNanos:e=>Number(e)/36e11,onInfinity:()=>1/0,onNegativeInfinity:()=>-1/0}),XC=e=>{let t=PC(e);switch(t.value._tag){case`Infinity`:case`NegativeInfinity`:throw Error(`Cannot convert infinite duration to nanos`);case`Nanos`:return t.value.nanos;case`Millis`:return MC(t.value.millis)}},ZC=B(2,(e,t)=>{switch(e.value._tag){case`Millis`:return t.onMillis(e.value.millis);case`Nanos`:return t.onNanos(e.value.nanos);case`Infinity`:return t.onInfinity();case`NegativeInfinity`:return(t.onNegativeInfinity??t.onInfinity)()}}),QC=B(3,(e,t,n)=>e.value._tag===`Infinity`||e.value._tag===`NegativeInfinity`||t.value._tag===`Infinity`||t.value._tag===`NegativeInfinity`?n.onInfinity(e,t):e.value._tag===`Millis`?t.value._tag===`Millis`?n.onMillis(e.value.millis,t.value.millis):n.onNanos(XC(e),t.value.nanos):n.onNanos(e.value.nanos,XC(t))),$C=(e,t)=>QC(e,t,{onMillis:(e,t)=>e===t,onNanos:(e,t)=>e===t,onInfinity:(e,t)=>e.value._tag===t.value._tag}),ew=B(2,(e,t)=>$C(e,t)),tw=B(2,(e,t)=>n=>{let r=e(n);if(mC(r))return fC(n);let i=t(r.success);return mC(i)?fC(n):i}),nw=e=>t=>{let n=e(t);return mC(n)?SS():CS(n.success)},rw=cC(`effect/Scheduler`,{fiberCached:!0,defaultValue:()=>new cw}),iw=e=>{let t=!1;return Promise.resolve().then(()=>{t||e()}),()=>{t=!0}},aw=`setImmediate`in globalThis?e=>{let t=globalThis.setImmediate(e);return()=>globalThis.clearImmediate(t)}:e=>{let t=setTimeout(e,0);return()=>clearTimeout(t)},ow=e=>{try{return aw(e)}catch{return iw(e)}},sw=class{buckets=[];scheduleTask(e,t){let n=this.buckets,r=n.length,i,a=0;for(;a<r&&!(n[a][0]>t);a++)i=n[a];i&&i[0]===t?i[1].push(e):a===r?n.push([t,[e]]):n.splice(a,0,[t,[e]])}drain(){let e=this.buckets;return this.buckets=[],e}},cw=class{executionMode;setImmediate;constructor(e=`async`,t){this.executionMode=e,this.setImmediate=t??(e===`sync`?iw:ow)}shouldYield(e){return e.currentOpCount>=e.cache.maxOpsBeforeYield}makeDispatcher(){return new lw(this.setImmediate)}},lw=class{tasks=new sw;running=void 0;setImmediate;constructor(e=ow){this.setImmediate=e}scheduleTask(e,t){this.tasks.scheduleTask(e,t),this.running===void 0&&(this.running=this.setImmediate(this.afterScheduled))}afterScheduled=()=>{this.running=void 0,this.runTasks()};runTasks(){let e=this.tasks.drain();for(let t=0;t<e.length;t++){let n=e[t][1];for(let e=0;e<n.length;e++)n[e]()}}flush(){for(;this.tasks.buckets.length>0;)this.running!==void 0&&(this.running(),this.running=void 0),this.runTasks()}},uw=cC(`effect/Scheduler/MaxOpsBeforeYield`,{fiberCached:!0,defaultValue:()=>2048}),dw=cC(`effect/Scheduler/PreventSchedulerYield`,{fiberCached:!0,defaultValue:()=>!1}),fw=class extends dy{constructor(e){super(),e&&Bb(this,e)}},pw=e=>class extends fw{_tag=e},mw=()=>new Proxy({},{get(e,t,n){return t===`$is`?By:t===`$match`?hw:e=>({...e,_tag:t})}});function hw(){if(arguments.length===1){let e=arguments[0];return function(t){return e[t._tag](t)}}let e=arguments[0];return arguments[1][e._tag](e)}var gw=jx,_w=`~effect/encoding/EncodingError`,vw=class extends gw(`EncodingError`){[_w]=_w},yw=e=>{switch(e){case 16:return Sw();case 32:return Cw();default:{let t=``;for(let n=e>>>3;n>0;n--)t+=xw();return t}}},V=Uint8Array.from(`0123456789abcdef`,e=>e.charCodeAt(0)),bw=()=>Math.random()*4294967296>>>0,xw=()=>{let e=bw();return String.fromCharCode(V[e>>>28],V[e>>>24&15],V[e>>>20&15],V[e>>>16&15],V[e>>>12&15],V[e>>>8&15],V[e>>>4&15],V[e&15])},Sw=()=>{let e=bw(),t=bw();return String.fromCharCode(V[e>>>28],V[e>>>24&15],V[e>>>20&15],V[e>>>16&15],V[e>>>12&15],V[e>>>8&15],V[e>>>4&15],V[e&15],V[t>>>28],V[t>>>24&15],V[t>>>20&15],V[t>>>16&15],V[t>>>12&15],V[t>>>8&15],V[t>>>4&15],V[t&15])},Cw=()=>{let e=bw(),t=bw(),n=bw(),r=bw();return String.fromCharCode(V[e>>>28],V[e>>>24&15],V[e>>>20&15],V[e>>>16&15],V[e>>>12&15],V[e>>>8&15],V[e>>>4&15],V[e&15],V[t>>>28],V[t>>>24&15],V[t>>>20&15],V[t>>>16&15],V[t>>>12&15],V[t>>>8&15],V[t>>>4&15],V[t&15],V[n>>>28],V[n>>>24&15],V[n>>>20&15],V[n>>>16&15],V[n>>>12&15],V[n>>>8&15],V[n>>>4&15],V[n&15],V[r>>>28],V[r>>>24&15],V[r>>>20&15],V[r>>>16&15],V[r>>>12&15],V[r>>>8&15],V[r>>>4&15],V[r&15])},ww=`effect/Tracer/ParentSpan`,Tw=class extends zS()(ww,{fiberCached:!0}){},Ew=e=>e,Dw=cC(`effect/Tracer/DisablePropagation`,{defaultValue:hy}),Ow=cC(`effect/Tracer/CurrentTraceLevel`,{defaultValue:()=>`Info`}),kw=cC(`effect/Tracer/MinimumTraceLevel`,{defaultValue:()=>`All`}),Aw=`effect/Tracer`,jw=Ew({span:e=>new Mw(e)}),Mw=class{_tag=`Span`;sampled;name;parent;annotations;links;startTime;kind;status;_traceId=void 0;_spanId=void 0;_attributes=void 0;_events=void 0;constructor(e){this.name=e.name,this.parent=e.parent,this.annotations=e.annotations,this.links=e.links,this.startTime=e.startTime,this.kind=e.kind,this.sampled=e.sampled,this.status={_tag:`Started`,startTime:e.startTime}}get traceId(){return this._traceId??=MS(this.parent)?.traceId??yw(32)}get spanId(){return this._spanId??=yw(16)}get attributes(){return this._attributes??=new Map}get events(){return this._events??=[]}end(e,t){this.status={_tag:`Ended`,endTime:e,exit:t,startTime:this.status.startTime}}attribute(e,t){this.attributes.set(e,t)}event(e,t,n){this.events.push([e,t,n??{}])}addLinks(e){this.links.push(...e)}},Nw=`effect/Metric/FiberRuntimeMetrics`,Pw=cC(`effect/References/CurrentStackFrame`,{fiberCached:!0,defaultValue:gy}),Fw=cC(`effect/References/TracerEnabled`,{fiberCached:!0,defaultValue:my}),Iw=cC(`effect/References/TracerTimingEnabled`,{defaultValue:my}),Lw=cC(`effect/References/TracerSpanAnnotations`,{defaultValue:()=>({})}),Rw=cC(`effect/References/TracerSpanLinks`,{defaultValue:()=>[]}),zw=cC(`effect/References/CurrentLogLevel`,{fiberCached:!0,defaultValue:()=>`Info`}),Bw=cC(`effect/References/MinimumLogLevel`,{fiberCached:!0,defaultValue:()=>`Info`}),Vw=e=>{if(e?.captureStackTrace===!1||e?.captureStackTrace!==void 0&&typeof e.captureStackTrace!=`boolean`)return e;let t=Fb();if(t===0&&e?.captureStackTrace!==!0)return{...e,captureStackTrace:!1};Ib(3);let n=Error();return Ib(t),{...e,captureStackTrace:Uw(()=>n.stack)}},Hw=e=>t=>{let n;return()=>{if(n!==void 0)return n;let r=t();if(!r)return;let i=r.split(`
55
+ `);if(i[e]!==void 0)return n=i[e].trim(),n}},Uw=Hw(3),Ww=class extends sx{constructor(e,t=cx){super(`Interrupt`,t,`Interrupted`),this.fiberId=e}toString(){return`Interrupt(${this.fiberId})`}toJSON(){return{_tag:`Interrupt`,fiberId:this.fiberId}}[cb](e){return _x(e)&&this.fiberId===e.fiberId&&this.annotations===e.annotations}[Uy](){return qy(Zy(`${this._tag}:${this.fiberId}`))(Gy(this.annotations))}},Gw=e=>new Ww(e),Kw=e=>new ax([new Ww(e)]),qw=e=>{for(let t=0;t<e.reasons.length;t++){let n=e.reasons[t];if(n._tag===`Fail`)return dC(n.error)}return fC(e)},Jw=nw(qw),Yw=e=>{let t=e.reasons.find(gx);return t?dC(t.defect):fC(e)},Xw=e=>e.reasons.some(_x),Zw=e=>{let t;for(let n=0;n<e.reasons.length;n++){let r=e.reasons[n];r._tag===`Interrupt`&&(t??=new Set,r.fiberId!==void 0&&t.add(r.fiberId))}return t?dC(t):fC(e)},Qw=(e,t)=>{let n=new Map,r=[];for(let i of e.concat(t)){let e=Wy(i),t=n.get(e);if(t===void 0)n.set(e,[i]);else if(t.some(e=>lb(e,i)))continue;else t.push(i);r.push(i)}return r},$w=B(2,(e,t)=>{if(e.reasons.length===0)return t;if(t.reasons.length===0)return e;let n=new ax(Qw(e.reasons,t.reasons));return lb(e,n)?e:n}),eT=B(2,(e,t)=>{let n=!1,r=e.reasons.map(e=>hx(e)?(n=!0,new lx(t(e.error),e.annotations)):e);return n?ux(r):e}),tT=e=>{let t;for(let n of e.reasons){if(n._tag===`Fail`)return n.error;n._tag===`Die`&&(t??=n)}return t===void 0?e.reasons.length>0?new globalThis.Error(`All fibers interrupted without error`):new globalThis.Error(`Empty cause`):t.defect},nT=`~effect/Fiber`,rT={_A:fy,_E:fy},iT={id:0},aT=()=>globalThis[Eb],oT=class{constructor(e,t=!0){this.setContext(e),this.id=++iT.id,this.currentOpCount=0,this.interruptible=t,this._stack=[],this._observers=void 0,this._exit=void 0,this._children=void 0,this._interruptedCause=void 0,this._yielded=void 0,this._running=!1,this._deferredInterrupt=!1,this._parent=void 0,this.cache.runtimeMetrics?.recordFiberStart(this.context)}get[nT](){return rT}get currentDispatcher(){return this._dispatcher??=this.cache.scheduler.makeDispatcher()}getRef(e){return aC(this.context,e)}addObserver(e){return this._exit?(e(this._exit),_y):(this._observers===void 0?this._observers=[e]:this._observers.push(e),()=>this.removeObserver(e))}removeObserver(e){if(this._exit||this._observers===void 0)return;let t=this._observers.indexOf(e);t>=0&&this._observers.splice(t,1)}interruptUnsafe(e,t){if(this._exit)return;let n=Kw(e);this.cache.stackFrame&&(n=mx(n,eC(Cx,this.cache.stackFrame))),t&&(n=mx(n,t)),this._interruptedCause=this._interruptedCause?$w(this._interruptedCause,n):n,this.interruptible&&(this._running?this._deferredInterrupt=!0:this.evaluate(bT(this._interruptedCause)))}pollUnsafe(){return this._exit}evaluate(e){if(this._exit)return;if(this._yielded!==void 0){let e=this._yielded;this._yielded=void 0,e()}let t=this.runLoop(e);if(t===Xb)return;let n=uT.interruptChildren&&uT.interruptChildren(this);if(n!==void 0)return this.evaluate(lE(n,()=>t));if(this._exit=t,this.cache.runtimeMetrics?.recordFiberEnd(this.context,this._exit),this._parent&&=(this._parent._children?.delete(this),void 0),this._observers!==void 0){let e=this._observers;this._observers=void 0;for(let n=0;n<e.length;n++)e[n](t)}this._stack.length=0,this._children=void 0,this.context=$S()}runLoop(e){let t=globalThis[Eb];globalThis[Eb]=this;let n=this._running;this._running=!0;let r=!1,i=e;this.currentOpCount=0;try{for(;;){this._deferredInterrupt&&(this._deferredInterrupt=!1,i=bT(this._interruptedCause)),this.currentOpCount++;let e=this.cache;if(!r&&!e.preventYield&&e.scheduler.shouldYield(this)){r=!0;let e=i;i=lE(TT,()=>e)}if(i=e.tracerContext?e.tracerContext(i,this):i[Kb](this),i===Xb){let e=this._yielded;if(Hb in e)return this._deferredInterrupt=!1,this._yielded=void 0,e;if(this._deferredInterrupt){this._yielded=void 0,e();continue}return Xb}}}catch(e){return zy(i,Kb)?this.runLoop(Dx(e)):Dx(`Fiber.runLoop: Not a valid effect: ${String(i)}`)}finally{this._running=n,globalThis[Eb]=t}}getCont(e){if(this._deferredInterrupt)return this._deferredInterrupt=!1,cT;for(;;){let t=this._stack.pop();if(!t)return;let n=t[Yb];if(n!==void 0){let r=n.call(t,this);if(r)return r[e]=r,r}if(t[e])return t}}succeedWith(e){if(!(++this.currentOpCount&lT-1))return Sx(e);let t=this.getCont(qb);return t?t[qb](e,this):this.yieldWith(Sx(e))}yieldWith(e){return this._yielded=e,Xb}children(){return this._children??=new Set}pipe(){return ly(this,arguments)}setContext(e){let t=this.context;if(this.context=e,t!==void 0&&Hee(t,e))return;let n=e.cacheRoot,r=n._fiberCache??=sT(e);this.cache?.scheduler!==r.scheduler&&(this._dispatcher=void 0),this.cache=r}get currentSpanLocal(){let e=this.cache.span;return e?._tag===`Span`?e:void 0}},sT=e=>{let t=rC(e,Aw);return{scheduler:aC(e,rw),tracer:t,tracerContext:t?t.context:void 0,tracerEnabled:aC(e,Fw),span:rC(e,ww),logLevel:aC(e,zw),minimumLogLevel:aC(e,Bw),stackFrame:aC(e,Pw),runtimeMetrics:rC(e,Nw),maxOpsBeforeYield:aC(e,uw),preventYield:aC(e,dw)}},cT={[qb](e,t){return bT(t._interruptedCause)},[Jb](e,t){return bT(t._interruptedCause)}},lT=32,uT={interruptChildren:void 0},dT=e=>{if(!e.cache.stackFrame)return;let t=new Map;return t.set(wx.key,e.cache.stackFrame),QS(t)},fT=e=>{let t=e;return t._exit?yT(t._exit):LT(n=>t._exit?n(yT(t._exit)):ST(e.addObserver(e=>n(yT(e)))))},pT=e=>LT(t=>{let n=e[Symbol.iterator](),r=[],i;function a(){let e=n.next();for(;!e.done;){if(e.value._exit){r.push(e.value._exit),e=n.next();continue}i=e.value.addObserver(e=>{r.push(e),a()});return}t(yT(r))}return a(),ST(()=>i?.())}),mT=e=>{let t=e;return t._exit?t._exit:LT(n=>t._exit?n(t._exit):ST(e.addObserver(n)))},hT=e=>LT(t=>{let n=Array.from(e);if(n.length===0)return t(yT(TC()));let r=Array(n.length),i=TC(),a=()=>{for(let e=0;e<i.length;e++)n[e].removeObserver(i[e])},o=0,s=!1;for(let e=0;e<n.length&&!s;e++){let c=i=>{if(o++,i._tag===`Failure`)return s=!0,a(),t(i);r[e]=i.value,o===n.length&&t(yT(r))};i.push(c),n[e].addObserver(c)}return ST(()=>{s=!0,a()})}),gT=e=>Ox(t=>_T(e,t.id)),_T=B(e=>zy(e[0],nT),(e,t,n)=>Ox(r=>{let i=dT(r);return i=i&&n?sC(i,n):i??n,e.interruptUnsafe(t,i),cE(fT(e))})),vT=e=>Ox(t=>{let n=dT(t),r=TC();for(let i of e)i.interruptUnsafe(t.id,n),r.push(i);return cE(pT(r))}),yT=Sx,bT=Tx,xT=Ex,ST=bx({op:`Sync`,[Kb](e){let t=this[Gb](),n=e.getCont(qb);return n?n[qb](t,e):e.yieldWith(Sx(t))}}),CT=bx({op:`Suspend`,[Kb](e){return this[Gb]()}}),wT=$ee({onFailure:xT,onSuccess:yT}),TT=bx({op:`Yield`,[Kb](e){let t=!1;return e.currentDispatcher.scheduleTask(()=>{t||e.evaluate(SE)},this[Gb]??0),e.yieldWith(()=>{t=!0})}})(0),ET=yT(SS()),DT=e=>CT(()=>bT(e())),OT=e=>Dx(e),kT=e=>CT(()=>xT(e())),AT=yT(void 0),jT=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new vO(e,`An error occurred in Effect.try`):e.catch;return CT(()=>{try{return yT(t())}catch(e){return xT(n(e))}})},MT=e=>FT(function(t,n){e(n).then(e=>t(yT(e)),e=>t(OT(e)))},e.length!==0),NT=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new vO(e,`An error occurred in Effect.tryPromise`):e.catch;return FT(function(e,r){let i=t=>{try{e(xT(Rb(()=>n(t))))}catch(t){e(OT(t))}};try{t(r).then(t=>e(yT(t)),i)}catch(e){i(e)}},t.length!==0)},PT=e=>Ox(t=>e(t.id)),FT=function(){let e=yx({op:`Async`,[Kb](e){let t=!1,n=!1,r=this.withSignal?new AbortController:void 0,i=this.register.call(e.cache.scheduler,r=>{t||(t=!0,n?e.evaluate(r):n=r)},r?.signal);return n===!1?(n=!0,e._yielded=()=>{t=!0},r===void 0&&i===void 0||e._stack.push(IT(()=>(t=!0,r?.abort(),i??SE))),Xb):n}}),t=function(e,t){this.register=e,this.withSignal=t};return t.prototype=e,function(e,n){return new t(e,n)}}(),IT=bx({op:`AsyncFinalizer`,[Yb](e){e.interruptible&&(e.interruptible=!1,e._stack.push(PD))},[Jb](e,t){return Xw(e)?lE(lD(Tx(e),this[Gb]()),()=>bT(e)):bT(e)}}),LT=e=>FT(e,e.length>=2),RT=LT(_y),zT=(...e)=>{if(e.length===1){let t=e[0];return CT(()=>qT(t()))}let[t,n]=e;return CT(()=>qT(n.call(t.self)))},BT=(e,...t)=>{let n=t.length===0?function(){return CT(()=>qT(e.apply(this,arguments)))}:function(){let n=CT(()=>qT(e.apply(this,arguments)));for(let e=0;e<t.length;e++)n=t[e](n,...arguments);return n};return VT(e.length,n)},VT=(e,t)=>Object.defineProperty(t,"length",{value:e,configurable:!0}),HT=Hw(2),UT=function(){let e=typeof arguments[0]==`string`,t=e?arguments[0]:`Effect.fn`,n=e?arguments[1]:void 0,r=Fb(),i;return r!==0&&(Ib(2),i=new globalThis.Error,Ib(r)),e?(r,...a)=>WT(t,r,i,a,e,n):WT(t,arguments[0],i,Array.prototype.slice.call(arguments,1),e,n)},WT=(e,t,n,r,i,a)=>{let o=typeof t==`function`?t:r.shift().bind(t.self),s=`${e} (definition)`,c=n?HT(()=>n.stack):gy;return VT(o.length,function(...t){let n=CT(()=>{let e=o.apply(this,arguments);return $b(e)?e:qT(e)});for(let e=0;e<r.length;e++)n=r[e](n,...t);if(!$b(n))return n;let l=Fb(),u;return l!==0&&(Ib(2),u=new globalThis.Error,Ib(l)),AE(i?uO(e,a,e=>dO(n,e)):n,Pw,t=>({name:e,stack:u?HT(()=>u.stack):gy,parent:{name:s,stack:c,parent:t}}))})},GT=(e,...t)=>VT(e.length,t.length===0?function(){return KT(()=>e.apply(this,arguments))}:function(){let n=KT(()=>e.apply(this,arguments));for(let e of t)n=e(n,...arguments);return n}),KT=e=>{try{let t=e(),n;for(;;){let r=t.next(n);if(r.done)return yT(r.value);let i=r.value;if(i&&i._tag===`Success`){n=i.value;continue}if(i&&i._tag===`Failure`)return r.value;{let n=!0;return CT(()=>n?(n=!1,lE(r.value,e=>qT(t,e))):CT(()=>qT(e())))}}}catch(e){return OT(e)}},qT=function(){let e=yx({op:`Iterator`,[qb](e,t){let n=this.iterator;for(;;){let r=n.next(e);if(r.done)return yT(r.value);if(!uE(r.value))return t._stack.push(this),r.value;if(r.value._tag===`Failure`)return r.value;e=r.value.value}},[Kb](e){return this[qb](this.initial,e)}}),t=function(e,t){this.iterator=e,this.initial=t};return t.prototype=e,function(e,n){return new t(e,n)}}(),JT=B(2,(e,t)=>new ZT(e,QT,yT(t))),YT=function(e){return e._stack.push(this),this[Gb]},XT=yx({op:`OnSuccess`,[Kb]:YT}),ZT=function(e,t,n){this[Gb]=e,this[qb]=t,this.payload=n};ZT.prototype=XT;var QT=function(){return this.payload},$T=function(e,t){return t.succeedWith(this.payload)},eE=(()=>{let e=`~effect/Effect/stackProbe`;return{[e]:function(){return Error().stack}}[e]()?.includes(`[as `+e+`]`)===!0})(),tE=function(e,t){let n=this.payload;return t.succeedWith(eE?n(e):Rb(()=>n(e)))},nE=function(e){let t=this.payload;return t(e)},rE=function(e){let t=this.payload;return new ZT(t(e),$T,e)},iE=function(e){return new ZT(this.payload,$T,e)},aE=e=>pE(e,CS),oE=B(2,(e,t)=>new ZT(e,$b(t)?QT:nE,t)),sE=B(2,(e,t)=>new ZT(e,$b(t)?iE:rE,t)),cE=e=>new ZT(e,QT,SE),lE=B(2,(e,t)=>new ZT(e,nE,t)),uE=e=>e[Hb]!==void 0,dE=B(2,(e,t)=>uE(e)?e._tag===`Success`?t(e.value):e:lE(e,t)),fE=e=>lE(e,fy),pE=B(2,(e,t)=>new ZT(e,tE,t)),mE=B(2,(e,t)=>uE(e)?CE(e,t):pE(e,t)),hE=B(2,(e,t)=>uE(e)?wE(e,t):WE(e,t)),gE=B(2,(e,t)=>uE(e)?TE(e,t):GE(e,t)),_E=e=>Tx(Kw(e)),vE=e=>e._tag===`Success`,yE=e=>e._tag===`Failure`,bE=e=>e._tag===`Failure`?dC(e.cause):fC(e),xE=tw(bE,qw),SE=Sx(void 0),CE=B(2,(e,t)=>e._tag===`Success`?Sx(t(e.value)):e),wE=B(2,(e,t)=>{if(e._tag===`Success`)return e;let n=qw(e.cause);return mC(n)?e:Ex(t(n.success))}),TE=B(2,(e,t)=>{if(e._tag===`Success`)return Sx(t.onSuccess(e.value));let n=qw(e.cause);return mC(n)?e:Ex(t.onFailure(n.success))}),EE=B(2,(e,t)=>vE(e)?t:e),DE=e=>{let t=[];for(let n of e)n._tag===`Failure`&&t.push(...n.cause.reasons);return t.length===0?SE:Tx(ux(t))},OE=e=>{let t=xE(e);return mC(t)?SS():CS(t.success)},kE=B(2,(e,t)=>Ox(n=>{let r=n.context,i=t(r);return r===i?e:(n.setContext(i),wD(n,()=>{n.setContext(r)}),e)})),AE=B(3,(e,t,n)=>kE(e,e=>{let r=iC(e,t),i=n(r);return r===i?e:tC(e,t,i)})),jE=()=>ME,ME=Ox(e=>yT(e.context)),NE=e=>Ox(t=>e(t.context)),PE=B(2,(e,t)=>uE(e)?e:kE(e,sC(t))),FE=function(){return arguments.length===1?B(2,(e,t)=>IE(e,arguments[0],t)):B(3,(e,t,n)=>IE(e,t,n)).apply(this,arguments)},IE=(e,t,n)=>kE(e,tC(t,n)),LE=B(2,(e,t)=>lE(t,t=>t?aE(e):ET)),RE=B(e=>$b(e[0]),(e,t)=>VD({while:my,body:py(t?.disableYield?e:lE(e,e=>TT)),step:_y})),zE=B(2,(e,t)=>new VE(e,t.length===1?t:e=>t(e))),BE=yx({op:`OnFailure`,[Kb]:YT}),VE=function(e,t){this[Gb]=e,this[Jb]=t};VE.prototype=BE;var HE=B(3,(e,t,n)=>zE(e,e=>{let r=t(e);return mC(r)?bT(r.failure):n(r.success,e)})),UE=B(2,(e,t)=>HE(e,qw,e=>t(e))),WE=B(2,(e,t)=>UE(e,e=>kT(()=>t(e)))),GE=B(2,(e,t)=>QE(e,{onFailure:e=>kT(()=>t.onFailure(e)),onSuccess:e=>ST(()=>t.onSuccess(e))})),KE=e=>eD(e,{onFailure:fC,onSuccess:dC}),qE=B(2,(e,t)=>new YE(e,t.onSuccess.length===1?t.onSuccess:e=>t.onSuccess(e),t.onFailure.length===1?t.onFailure:e=>t.onFailure(e))),JE=yx({op:`OnSuccessAndFailure`,[Kb]:YT}),YE=function(e,t,n){this[Gb]=e,this[qb]=t,this[Jb]=n};YE.prototype=JE;var XE=function(e,t){let n=this.payload;return t.succeedWith(eE?n.onSuccess(e):Rb(()=>n.onSuccess(e)))},ZE=((e,t)=>{let n=yx({op:e,[Kb]:YT,[qb]:XE,[Jb]:t}),r=function(e,t){this[Gb]=e,this.payload=t};return r.prototype=n,r})(`Match`,function(e,t){let n=e.reasons.find(hx);if(n===void 0)return bT(e);let r=this.payload;return t.succeedWith(eE?r.onFailure(n.error):Rb(()=>r.onFailure(n.error)))}),QE=B(2,(e,t)=>qE(e,{onFailure:e=>{let n=e.reasons.find(hx);return n?t.onFailure(n.error):bT(e)},onSuccess:t.onSuccess})),$E=B(2,(e,t)=>new ZE(e,t)),eD=B(2,(e,t)=>{if(uE(e)){if(e._tag===`Success`)return Sx(t.onSuccess(e.value));let n=qw(e.cause);return mC(n)?e:Sx(t.onFailure(n.success))}return $E(e,t)}),tD=e=>uE(e)?Sx(e):nD(e),nD=bx({op:`Exit`,[Kb](e){return e._stack.push(this),this[Gb]},[qb](e,t,n){return t.succeedWith(n??Sx(e))},[Jb](e,t,n){return t.succeedWith(n??Tx(e))}}),rD=`~effect/Scope`,iD=`~effect/Scope/Closeable`,aD=zS(`effect/Scope`),oD=(e,t)=>Ox(n=>{let r=sD(e,t);return r===void 0?AT:(LD(n),r)}),sD=(e,t)=>{let n=e.state;if(n._tag===`Closed`||(e.state={_tag:`Closed`,exit:t},e.parent!==void 0&&hD(e.parent,e),n._tag===`Empty`))return;if(n.finalizer!==void 0)return cD(n.finalizer,t);let r=n.finalizers;return r.size===1?cD(r.values().next().value,t):uD(e,r,t)},cD=(e,t)=>{try{return e(t)}catch(e){return Dx(e)}},lD=(e,t)=>vE(e)?t:zE(t,t=>bT($w(e.cause,t))),uD=BT(function*(e,t,n){let r=[],i=[],a=Array.from(t.values()),o=aT();for(let t=a.length-1;t>=0;t--){let s=a[t];e.strategy===`sequential`?r.push(yield*tD(cD(s,n))):i.push(YD(o,cD(s,n),!0,!0,`inherit`))}return i.length>0&&(r=yield*pT(i)),yield*DE(r)}),dD=(e,t)=>{let n=_D(t,e);return e.state._tag===`Closed`?(n.state=e.state,n):(mD(e,n,e=>oD(n,e)),n)},fD=(e,t)=>CT(()=>e.state._tag===`Closed`?t(e.state.exit):(mD(e,{},t),AT)),pD=(e,t)=>fD(e,py(t)),mD=(e,t,n)=>{if(e.state._tag===`Empty`)e.state={_tag:`Open`,finalizerKey:t,finalizer:n,finalizers:void 0};else if(e.state._tag===`Open`){let r=e.state;r.finalizer===void 0?r.finalizers.set(t,n):(r.finalizers=new Map([[r.finalizerKey,r.finalizer]]),r.finalizerKey=void 0,r.finalizer=void 0,r.finalizers.set(t,n))}},hD=(e,t)=>{if(e.state._tag!==`Open`)return;let n=e.state;n.finalizerKey===t?e.state=vD:n.finalizers!==void 0&&(n.finalizers.delete(t),n.finalizers.size===0&&(e.state=vD))},gD=e=>_D(e,void 0),_D=(e=`sequential`,t)=>({[iD]:iD,[rD]:rD,strategy:e,parent:t,state:vD}),vD={_tag:`Empty`},yD=aD,bD=FE(aD),xD=e=>CT(()=>{let t=gD();return TD(e(t),e=>CT(()=>sD(t,e)??AT))}),SD=function(){let e=yx({op:`OnExit`,[Kb](e){return e._stack.push(this),this.effect},[Yb](e){e.interruptible&&this.interruptible!==!0&&(e._stack.push(PD),e.interruptible=!1)},[qb](e,t,n){n??=Sx(e);let r;try{r=this.onExit(n)}catch(e){r=Dx(e)}return r?lE(r,e=>n):n},[Jb](e,t,n){n??=Tx(e);let r;try{r=this.onExit(n)}catch(e){r=Dx(e)}return r?lE(lD(n,r),e=>n):n}}),t=function(e,t,n){this.effect=e,this.onExit=t,this.interruptible=n};return t.prototype=e,t}(),CD=(e,t,n)=>new SD(e,t,n),wD=(e,t)=>{e._stack.push(new SD(void 0,t,void 0))},TD=B(2,CD),ED=B(3,(e,t,n)=>TD(e,e=>{let r=t(e);return mC(r)?AT:n(r.success,e)})),DD=B(2,(e,t)=>ED(e,bE,t)),OD=B(3,(e,t,n)=>TD(e,e=>{if(e._tag!==`Failure`)return AT;let r=t(e.cause);return mC(r)?AT:n(r.success,e.cause)})),kD=B(2,(e,t)=>OD(Zw,t)(e)),AD=e=>ST(()=>{let t=sO(!1),n=!1,r,i=lE(t.await,()=>r);return Ox(a=>r===void 0?n?i:(n=!0,wD(a,e=>ST(()=>{r=e,t.openUnsafe()})),e):r)}),jD=Ox(e=>bT(Kw(e.id))),MD=e=>Ox(t=>t.interruptible?(t.interruptible=!1,t._stack.push(PD),e):e),ND=bx({op:`SetInterruptible`,[Yb](e){if(e.interruptible=this[Gb],e._interruptedCause&&e.interruptible)return()=>bT(e._interruptedCause)}}),PD=ND(!0),FD=ND(!1),ID=e=>{if(e.interruptible=!0,e._stack.push(FD),e._interruptedCause)return bT(e._interruptedCause)},LD=e=>{let t=e;t.interruptible&&(t.interruptible=!1,t._stack.push(PD))},RD=e=>Ox(t=>t.interruptible?e:ID(t)??e),zD=e=>Ox(t=>t.interruptible?(t.interruptible=!1,t._stack.push(PD),e(RD)):e(fy)),BD=(e,t)=>Hy(e)?t?.mode===`result`?HD(e,KE,t):HD(e,fy,t):t?.discard?t.mode===`result`?HD(Object.values(e),KE,t):HD(Object.values(e),fy,t):CT(()=>{let n={};return JT(HD(Object.entries(e),([e,r])=>pE(t?.mode===`result`?KE(r):r,t=>{zb(n,e,t)}),{discard:!0,concurrency:t?.concurrency}),n)}),VD=bx({op:`While`,[qb](e,t){return this[Gb].step(e),this[Gb].while()?(t._stack.push(this),this[Gb].body()):SE},[Kb](e){return this[Gb].while()?(e._stack.push(this),this[Gb].body()):SE}}),HD=B(e=>typeof e[1]==`function`,(e,t,n)=>CT(()=>{let r=WD(n?.concurrency);if(r===1)return UD(e,t,n);let i=yC(e),a=i.length;if(a===0)return n?.discard?AT:yT([]);let o=n?.discard?void 0:Array(a),s=JD({f:t,out:o},i,{concurrency:r});return s?JT(s,o):yT(o)})),UD=(e,t,n)=>CT(()=>{let r=n?.discard?void 0:[],i=e[Symbol.iterator](),a=i.next(),o=0;return JT(VD({while:()=>!a.done,body:()=>t(a.value,o++),step:e=>{r&&r.push(e),a=i.next()}}),r)}),WD=e=>e===`unbounded`?1/0:Math.max(1,e??1),GD=()=>e=>{let t=e.onItem,n=e.step,r=(e,t,r,a,o)=>lE(tD(o),o=>n(e,t[r],o,r)??i(e,t,r+1,a)??AT),i=(e,i,a=0,o=i.length)=>{for(;a<o;a++){let s=i[a],c=t(e,s,a);if(!uE(c))return r(e,i,a,o,c);let l=n(e,s,c,a);if(l)return l._tag===`Failure`?l:void 0}};return i},KD=e=>{let t=e.onItem,n=e.step;return(e,r,i)=>{let a=0,o=i.end??r.length,s=i.concurrency,c=!1,l,u,d,f,p,m=e=>{let t=Dx(e);return f=t,c=!0,u&&u.size>0?lE(MD(vT(Array.from(u))),()=>f??t):t},h=()=>{let i=!1;for(;!f&&a<o;a++){let o=r[a],g=p??t(e,o,a);if(uE(g)){if(f=n(e,o,g,a),f)break}else if(l){p=void 0;let t=YD(l,g,!0,!0,`inherit`);if(t._exit){if(f=n(e,o,t._exit,a),f)break;continue}u.add(t);let r=a;if(t.addObserver(a=>{u.delete(t);try{if(f){if(a._tag===`Failure`){let e=a.cause.reasons.filter(e=>e._tag!==`Interrupt`);if(e.length>0){let t=ux(e);f=Tx(f._tag===`Failure`?$w(f.cause,t):t)}}}else{let t=n(e,o,a,r);t&&(f=t,h())}if(i){let e=h();e&&d(e)}else c&&u.size===0&&d(f??AT)}catch(e){d(m(e))}}),u.size<s)continue;i=!0,a++;return}else return LT(e=>{l=aT(),u=new Set,p=g,d=e;let t;try{t=h()}catch(t){return e(m(t))}return t?e(t):CT(()=>(f??=SE,lE(u?vT(u):AT,()=>f?._tag===`Failure`?f:AT)))})}if(c=!0,f){if(u&&u.size>0){let e=dT(l);u.forEach(t=>t.interruptUnsafe(l.id,e));return}if(d||f._tag===`Failure`)return f}else if(d){if(u)u.size===0&&d(AT);else return SE}};return h()}},qD=()=>e=>KD(e),JD=KD({onItem(e,t,n){return e.f(t,n)},step(e,t,n,r){if(n._tag===`Failure`)return n;e.out&&(e.out[r]=n.value)}}),YD=(e,t,n=!1,r=!1,i=!1)=>{let a=e,o=i===`inherit`?a.interruptible:!i,s=new oT(a.context,o);return n?s.evaluate(t):a.currentDispatcher.scheduleTask(()=>s.evaluate(t),0),!r&&!s._exit&&(a.children().add(s),s._parent=a),s},XD=B(e=>$b(e[0]),(e,t)=>Ox(n=>yT(YD(n,e,t?.startImmediately,!0,t?.uninterruptible)))),ZD=B(e=>$b(e[0]),(e,t,n)=>Ox(r=>{let i=YD(r,e,n?.startImmediately,!0,n?.uninterruptible);if(!i._exit){if(t.state._tag!==`Closed`){let e={};mD(t,e,()=>PT(e=>e===i.id?AT:gT(i))),i.addObserver(()=>hD(t,e))}else i.interruptUnsafe(r.id,dT(r))}return yT(i)})),QD=e=>(t,n)=>{let r=new oT(n?.scheduler?tC(e,rw,n.scheduler):e,n?.uninterruptible!==!0);if(r.evaluate(t),r._exit)return r;if(n?.signal){if(n.signal.aborted)r.interruptUnsafe();else{let e=()=>r.interruptUnsafe();n.signal.addEventListener(`abort`,e,{once:!0}),r.addObserver(()=>n.signal.removeEventListener(`abort`,e))}}return n?.onFiberStart&&n.onFiberStart(r),r},$D=B(2,(e,t)=>{if(e._exit)return e;if(t.state._tag===`Closed`)return e.interruptUnsafe(e.id),e;let n={};return mD(t,n,()=>gT(e)),e.addObserver(()=>hD(t,n)),e}),eO=QD($S()),tO=e=>{let t=QD(e);return(e,n)=>{let r=t(e,n);return n?.onExit&&r.addObserver(n.onExit),e=>r.interruptUnsafe(e)}},nO=e=>{let t=QD(e);return(e,n)=>{let r=t(e,n);return new Promise(e=>{r.addObserver(t=>e(t))})}},_te=nO($S()),vte=(e=>{let t=nO(e);return(e,n)=>t(e,n).then(e=>{if(e._tag===`Failure`)throw tT(e.cause);return e.value})})($S()),rO=e=>{let t=QD(e);return e=>{if(uE(e))return e;let n=new cw(`sync`),r=t(e,{scheduler:n});return r._dispatcher?.flush(),r._exit??Dx(new Ate(r))}},yte=rO($S()),iO=e=>{let t=rO(e);return e=>{let n=t(e);if(n._tag===`Failure`)throw tT(n.cause);return n.value}},bte=iO($S()),aO=yT(!0),oO=yT(!1),xte=class{waiters=[];scheduled=void 0;_isOpen;constructor(e){this._isOpen=e}scheduleUnsafe(e){if(this.waiters.length===0)return aO;if(this.scheduled===void 0)this.scheduled=this.waiters,e.currentDispatcher.scheduleTask(this.flushScheduled,0);else for(let e=0;e<this.waiters.length;e++)this.scheduled.push(this.waiters[e]);return this.waiters=[],aO}flushScheduled=()=>{if(this.scheduled===void 0)return;let e=this.scheduled;this.scheduled=void 0;for(let t=0;t<e.length;t++)e[t](SE)};flushWaiters(){let e=this.waiters;this.waiters=[],this.flushScheduled();for(let t=0;t<e.length;t++)e[t](SE)}open=Ox(e=>this._isOpen?oO:(this._isOpen=!0,this.scheduleUnsafe(e)));release=Ox(e=>this._isOpen?oO:this.scheduleUnsafe(e));openUnsafe(){return!this._isOpen&&(this._isOpen=!0,this.flushWaiters(),!0)}await=LT(e=>this._isOpen?e(AT):(this.waiters.push(e),ST(()=>{let t=this.waiters.indexOf(e);t===-1?this.scheduled!==void 0&&(t=this.scheduled.indexOf(e),t!==-1&&this.scheduled.splice(t,1)):this.waiters.splice(t,1)})));closeUnsafe(){return this._isOpen?(this._isOpen=!1,!0):!1}close=ST(()=>this.closeUnsafe());whenOpen=e=>lE(this.await,()=>e);isOpen(){return this._isOpen}},sO=e=>new xte(e??!1),cO=BigInt(0),Ste={_tag:`Span`,spanId:`noop`,traceId:`noop`,sampled:!1,status:{_tag:`Ended`,startTime:cO,endTime:cO,exit:SE},attributes:new Map,links:[],kind:`internal`,attribute(){},event(){},end(){},addLinks(){}},Cte=e=>Object.assign(Object.create(Ste),e),lO=e=>e?aC(e.annotations,Dw)?e._tag===`Span`?lO(MS(e.parent)):SS():CS(e):SS(),wte=(e,t,n)=>{let r=!e.cache.tracerEnabled||n?.annotations&&aC(n.annotations,Dw),i=n?.parent===void 0?n?.root?SS():lO(e.cache.span):CS(n.parent),a;if(r)a=Cte({name:t,parent:i,annotations:tC(n?.annotations??$S(),Dw,!0)});else{let r=e.cache.tracer??jw,o=e.getRef(fO),s=e.getRef(Iw),c=e.getRef(Lw),l=e.getRef(Rw),u=n?.level??e.getRef(Ow),d=n?.links===void 0?l.length===0?[]:l.slice():[...l,...n.links];a=r.span({name:t,parent:i,annotations:n?.annotations??$S(),links:d,startTime:s?o.currentTimeNanosUnsafe():cO,kind:n?.kind??`internal`,root:n?.root??TS(i),sampled:n?.sampled??(ES(i)&&i.value.sampled===!1?!1:!jte(e.getRef(kw),u))});for(let e in c)a.attribute(e,c[e]);if(n?.attributes!==void 0)for(let e in n.attributes)a.attribute(e,n.attributes[e])}return a},Tte=(e,t)=>(t=typeof t==`function`?t:gy,AE(Pw,n=>({name:e,stack:t,parent:n}))),Ete=(e,t,n,r)=>ST(()=>{e.status._tag!==`Ended`&&e.end(r?n.currentTimeNanosUnsafe():cO,t)}),uO=(e,...t)=>{let n=t.length===1?void 0:t[0],r=t[t.length-1];return Ox(t=>{let i=wte(t,e,n),a=t.getRef(fO),o=t.getRef(Iw);return wD(t,e=>Ete(i,e,a,o)),r(i)})},dO=FE(Tw),Dte=function(){let e=$b(arguments[0]),t=e?arguments[1]:arguments[0],n=e?arguments[2]:arguments[1],r=fy;return t._tag===`Span`&&(n=Vw(n),r=Tte(t.name,n?.captureStackTrace)),e?dO(r(arguments[0]),t):e=>dO(r(e),t)},fO=cC(`effect/Clock`,{defaultValue:()=>new Ote}),pO=2**31-1,Ote=class{currentTimeMillisUnsafe(){return Date.now()}currentTimeMillis=ST(()=>this.currentTimeMillisUnsafe());currentTimeNanosUnsafe(){return kte()}currentTimeNanos=ST(()=>this.currentTimeNanosUnsafe());monotonicTimeNanosUnsafe(){return hO()}monotonicTimeNanos=ST(()=>this.monotonicTimeNanosUnsafe());sleep(e){return this.sleepMillis(JC(e))}sleepMillis(e){return e<=0?TT:Number.isFinite(e)?LT(t=>{let n=e>pO?this.sleepMillis(e-pO):AT,r=setTimeout(()=>t(n),Math.min(e,pO));return ST(()=>clearTimeout(r))}):RT}},mO=BigInt(1e6),hO=function(){let e=globalThis.process?.hrtime;if(typeof e?.bigint==`function`)return()=>e.bigint();if(typeof performance<`u`&&typeof performance.now==`function`)return()=>BigInt(Math.round(performance.now()*1e6));let t=BigInt(0);return()=>{let e=BigInt(Date.now())*mO;return e>t&&(t=e),t}}(),kte=function(){let e=BigInt(1e9),t;return()=>{let n=hO(),r=BigInt(Date.now())*mO;if(t===void 0)t=r-n;else{let i=t+n;(r>i?r-i:i-r)>e&&(t=r-n)}return t+n}}(),gO=`~effect/Cause/AsyncFiberError`,Ate=class extends jx(`AsyncFiberError`){[gO]=gO;constructor(e){super({message:`An asynchronous Effect was executed with Effect.runSync`,fiber:e})}},_O=`~effect/Cause/UnknownError`,vO=class extends jx(`UnknownError`){[_O]=_O;constructor(e,t){super({message:t,cause:e})}},jte=yS(_S(gS,e=>{switch(e){case`All`:return-(2**53-1);case`Fatal`:return 5e4;case`Error`:return 4e4;case`Warn`:return 3e4;case`Info`:return 2e4;case`Debug`:return 1e4;case`Trace`:return 0;case`None`:return 2**53-1}})),yO={bold:`1`,red:`31`,green:`32`,yellow:`33`,blue:`34`,cyan:`36`,white:`37`,gray:`90`,black:`30`,bgBrightRed:`101`};yO.gray,yO.blue,yO.green,yO.yellow,yO.red,yO.bgBrightRed,yO.black;var bO=rx,Mte=ix,xO=hx,SO=ux,CO=dx,Nte=px,Pte=Kw,wO=e=>new lx(e),TO=e=>new fx(e),Fte=Gw,EO=eT,Ite=$w,DO=tT,Lte=Jw,Rte=Yw,OO=Xw,zte=Zw,kO=Nx,Bte=Fx,AO=zx,Vte=ex,jO=Sx,MO=Tx,NO=Ex,PO=SE,FO=vE,Hte=yE,IO=OE,Ute={"~effect/Deferred":{_A:fy,_E:fy},pipe(){return ly(this,arguments)}},LO=function(){this.resumes=void 0,this.effect=void 0};LO.prototype=Ute;var RO=()=>new LO,Wte=e=>LT(t=>e.effect?t(e.effect):(e.resumes??=[],e.resumes.push(t),ST(()=>{let n=e.resumes;if(n===void 0)return;let r=n.indexOf(t);r>=0&&n.splice(r,1)}))),Gte=B(2,(e,t)=>ST(()=>zO(e,t))),Kte=B(2,(e,t)=>Gte(e,Tx(t))),qte=B(2,(e,t)=>Kte(e,Kw(t))),zO=(e,t)=>{if(e.effect)return!1;if(e.effect=t,e.resumes){let n=e.resumes;e.resumes=void 0;for(let e=0;e<n.length;e++)n[e](t)}return!0},BO=aD,VO=gD,HO=bD,UO=fD,WO=pD,GO=dD,KO=oD,Jte=`~effect/Layer`,qO=`~effect/Layer/MemoMap`,Yte=(e,t)=>{let n={observers:0,deferred:RO(),scope:VO(),finalizer:r=>CT(()=>--n.observers>0?AT:(e.map.delete(t),KO(n.scope,r)))};return n},JO=(e,t)=>t.state._tag!==`Closed`&&(e.observers++,mD(t,{},e.finalizer),!0),Xte={[Jte]:{_ROut:fy,_E:fy,_RIn:fy},pipe(){return ly(this,arguments)}},YO=e=>{let t=Object.create(Xte);return t.build=e,t},XO=e=>YO((t,n)=>{let r=GO(n);return TD(e(t,r),e=>e._tag===`Failure`?KO(r,e):AT)}),Zte=e=>{let t=XO((n,r)=>n.getOrElseMemoize(t,r,e));return t},ZO=class{get[qO](){return qO}parent;constructor(e){this.parent=e}map=new Map;get(e,t){let n=this.map.get(e);return n?(JO(n,t),n.deferred.effect??Wte(n.deferred)):this.parent?.get(e,t)}getOrElseMemoize(e,t,n){return CT(()=>{let r;return CD(CT(()=>{let i=this.get(e,t);if(i)return i;let a=Yte(this,e);return JO(a,t)?(r=a.deferred,this.map.set(e,a),n(this,a.scope)):n(this,t)}),e=>{r&&zO(r,e)})})}},QO=()=>new ZO,Qte=e=>new ZO(e),$O=class e extends zS()(`effect/Layer/CurrentMemoMap`){static forkOrCreate(t){let n=nC(t,e);return n?Qte(n):QO()}},ek=B(3,(e,t,n)=>FE(pE(e.build(t,n),tC($O,t)),$O,t)),$te=function(){return arguments.length===1?e=>tk(eC(arguments[0],e)):tk(eC(arguments[0],arguments[1]))},tk=e=>YO(py(yT(e))),nk=function(){return arguments.length===1?e=>rk(arguments[0],e):rk(arguments[0],arguments[1])},rk=(e,t)=>ik(pE(t,t=>eC(e,t))),ik=e=>Zte((t,n)=>HO(e,n)),ene=e=>ik(JT(e,$S())),ak=(e,t,n)=>{let r=GO(n,`parallel`);return HD(e,e=>e.build(t,GO(r,`sequential`)),{concurrency:e.length}).pipe(pE(e=>Yee(...e)))},tne=(...e)=>XO((t,n)=>ak(e,t,n)),ok=(e,t,n)=>XO((r,i)=>lE(Array.isArray(t)?ak(t,r,i):t.build(r,i),t=>e.build(r,i).pipe(PE(t),pE(e=>n(e,t))))),sk=B(2,(e,t)=>ok(e,t,fy)),ck=B(2,(e,t)=>ok(e,t,(e,t)=>sC(t,e))),lk=`~effect/DateTime`,uk=`~effect/DateTime/TimeZone`,dk={[lk]:lk,pipe(){return ly(this,arguments)},[Mb](){return this.toString()},toJSON(){return nne(this).toJSON()}};({...dk}),{...dk};var fk={[uk]:uk,[Mb](){return this.toString()}};({...fk}),{...fk};var nne=e=>new Date(e.epochMilliseconds);globalThis.String;var rne=e=>e.trim(),ine=B(2,(e,t)=>HE(e,ane,e=>t(e))),pk=e=>e.reasons.some(mk),mk=e=>e._tag===`Fail`&&Bte(e.error),hk=e=>{let t,n=!1;for(let r of e.reasons)mk(r)?t??=r.error:r._tag!==`Interrupt`&&(n=!0);return t===void 0?fC(e):n?fC(SO(e.reasons.filter(e=>!mk(e)))):dC(t)},ane=e=>{let t=hk(e);return mC(t)?t:dC(t.success.value)},one=e=>{let t=hk(e);return mC(t)?MO(t.failure):jO(t.success.value)},gk=$b,sne=BD,cne=HD,lne=VD,_k=MT,vk=NT,H=yT,yk=ET,bk=CT,xk=ST,Sk=AT,Ck=LT,wk=RT,Tk=zT,Ek=xT,Dk=bT,Ok=DT,kk=OT,Ak=jT,jk=Ox,Mk=wT,Nk=lE,une=fE,Pk=oE,Fk=sE,Ik=tD,Lk=pE,Rk=JT,zk=cE,Bk=UE,Vk=zE,Hk=WE,Uk=LE,Wk=qE,Gk=jE,Kk=NE,qk=PE,Jk=kE,dne=FE,fne=yD,Yk=xD,Xk=DD,Zk=TD,Qk=AD,$k=jD,eA=kD,tA=MD,nA=zD,rA=RE,iA=uO,aA=Dte,oA=ZD,sA=XD,cA=eO,lA=QD,uA=tO,dA=vte,fA=_te,pA=bte,pne=iO,mA=yte,hA=BT,gA=UT,_A=mE,vA=hE,yA=gE,bA=dE,xA=GT,SA=`~effect/Chunk`;function CA(e,t,n,r,i){for(let a=t;a<Math.min(e.length,t+i);a++)n[r+a-t]=e[a];return n}var wA=[],TA=e=>Vx((t,n)=>{if(t.length!==n.length)return!1;let r=FA(t),i=FA(n);for(let t=0;t<r.length;t++)if(!e(r[t],i[t]))return!1;return!0}),EA=TA(lb),DA={[SA]:{_A:e=>e},toString(){return`Chunk(${Ob(FA(this))})`},toJSON(){return{_id:`Chunk`,values:Nb(FA(this))}},[Mb](){return this.toJSON()},[cb](e){return kA(e)&&EA(this,e)},[Uy](){return tb(FA(this))},[Symbol.iterator](){switch(this.backing._tag){case`IArray`:return this.backing.array[Symbol.iterator]();case`IEmpty`:return wA[Symbol.iterator]();default:return FA(this)[Symbol.iterator]()}},pipe(){return ly(this,arguments)}},OA=e=>{let t=Object.create(DA);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=AA,t.right=AA;break;case`ISingleton`:t.length=1,t.depth=0,t.left=AA,t.right=AA;break;case`ISlice`:t.length=e.length,t.depth=0,t.left=AA,t.right=AA}return t},kA=e=>zy(e,SA),AA=OA({_tag:`IEmpty`}),jA=()=>AA,MA=e=>OA({_tag:`ISingleton`,a:e}),NA=e=>kA(e)?e:mne(yC(e)),PA=(e,t,n)=>{switch(e.backing._tag){case`IArray`:CA(e.backing.array,0,t,n,e.length);break;case`IConcat`:PA(e.left,t,n),PA(e.right,t,n+e.left.length);break;case`ISingleton`:t[n]=e.backing.a;break;case`ISlice`:CA(FA(e.backing.chunk),e.backing.offset,t,n,e.length)}},FA=e=>{switch(e.backing._tag){case`IEmpty`:return wA;case`IArray`:return e.backing.array;default:{let t=Array(e.length);return PA(e,t,0),e.backing={_tag:`IArray`,array:t},e.left=AA,e.right=AA,e.depth=0,t}}},mne=e=>e.length===0?jA():e.length===1?MA(e[0]):OA({_tag:`IArray`,array:e}),hne=mT,gne=hT,_ne=gT,vne=aT,IA=$D,LA=sO,RA=`~effect/MutableRef`,yne={[RA]:RA,...Zb,toJSON(){return{_id:`MutableRef`,current:Nb(this.current)}}},zA=e=>{let t=Object.create(yne);return t.current=e,t},bne=B(2,(e,t)=>(e.current=t,e)),xne=Symbol.for(`effect/MutableList/Empty`),BA=()=>({head:void 0,tail:void 0,length:0}),VA=e=>{let t=e.head;t.offset>=1024&&t===e.tail&&t.mutable&&(t.array.length-t.offset)*8<=t.offset&&(e.head=e.tail={array:t.array.slice(t.offset),mutable:!0,offset:0,next:void 0})},HA=()=>({array:[],mutable:!0,offset:0,next:void 0}),UA=(e,t)=>{e.tail?e.tail.mutable||(e.tail.next=HA(),e.tail=e.tail.next):e.head=e.tail=HA(),e.tail.array.push(t),e.length++},WA=e=>{e.head=e.tail=void 0,e.length=0},GA=(e,t)=>{if(t=uC(t),t<=0||!e.head)return[];if(t=Math.min(t,e.length),t===e.length&&e.head?.offset===0&&!e.head.next){let t=e.head.array;return WA(e),t}let n=Array(t),r=0,i=e.head;for(;i;){for(;i.offset<i.array.length;)if(n[r++]=i.array[i.offset],i.mutable&&(i.array[i.offset]=void 0),i.offset++,r===t)return e.head=i.offset===i.array.length&&i.next?i.next:i,e.length-=t,e.length===0?WA(e):VA(e),n;i=i.next}return WA(e),n},KA=e=>GA(e,e.length),qA=e=>{if(!e.head)return xne;let t=e.head.array[e.head.offset];return e.head.mutable&&(e.head.array[e.head.offset]=void 0),e.head.offset++,e.length--,e.head.offset===e.head.array.length?e.head.next?e.head=e.head.next:WA(e):VA(e),t},JA=(e,t)=>{let n=[],r=e.head,i=0;for(;r;){for(let e=r.offset;e<r.array.length;e++)t(r.array[e],i++)&&n.push(r.array[e]);r=r.next}if(n.length===0){WA(e);return}e.head=e.tail={array:n,mutable:!0,offset:0,next:void 0},e.length=n.length},YA=(e,t)=>JA(e,e=>e!==t),XA=`~effect/PubSub/Subscription`,ZA=B(2,(e,t)=>e.shutdownFlag.current||ES(e.ended.current)?!1:e.pubsub.publish(t)?(e.strategy.completeSubscribersUnsafe(e.pubsub,e.subscribers),!0):!1),QA=e=>tA(Kk(t=>{let n=aC(t,BO),r=GO(e.scope),i=nj(e.pubsub,e.subscribers,e.strategy,e.ended);return WO(r,$A(i)).pipe(Pk(UO(n,e=>KO(r,e))),Rk(i))})),$A=e=>tA(jk(t=>(bne(e.shutdownFlag,!0),cne(KA(e.pollers),e=>qte(e,t.id),{discard:!0,concurrency:`unbounded`}).pipe(Fk(()=>xk(()=>{e.subscribers.delete(e.subscription),e.subscription.unsubscribe(),e.replayWindow.close(),e.strategy.onPubSubEmptySpaceUnsafe(e.pubsub,e.subscribers)})),Uk(e.shutdownHook.open),zk)))),ej=e=>bk(function t(n){if(e.shutdownFlag.current)return $k;let r=e.pollers.length===0?e.subscription.pollUpTo(1/0):[];return n&&(r=n.concat(r)),e.strategy.onPubSubEmptySpaceUnsafe(e.pubsub,e.subscribers),e.replayWindow.remaining>0?H(e.replayWindow.takeAll().concat(r)):CC(r)?H(r):Nk(tj(e),e=>t([e]))}),tj=e=>Ck(t=>{if(e.shutdownFlag.current)return t($k);if(ES(e.ended.current))return t(H(e.ended.current.value));let n=RO(),r=e.subscribers.get(e.subscription);return r||(r=new Set,e.subscribers.set(e.subscription,r)),r.add(e.pollers),UA(e.pollers,n),e.strategy.completePollersUnsafe(e.pubsub,e.subscribers,e.subscription,e.pollers),n.effect?t(n.effect):(n.resumes=[t],xk(()=>YA(e.pollers,n)))}),nj=(e,t,n,r)=>new rj(e,t,e.subscribe(),BA(),LA(!1),zA(!1),n,e.replayWindow(),r),rj=class{[XA]={_A:fy};pubsub;subscribers;subscription;pollers;shutdownHook;shutdownFlag;strategy;replayWindow;ended;constructor(e,t,n,r,i,a,o,s,c){this.pubsub=e,this.subscribers=t,this.subscription=n,this.pollers=r,this.shutdownHook=i,this.shutdownFlag=a,this.strategy=o,this.replayWindow=s,this.ended=c}pipe(){return ly(this,arguments)}},ij=`~effect/Queue`,aj=`~effect/Queue/Enqueue`,oj=`~effect/Queue/Dequeue`,sj={_A:fy,_E:fy},cj={[ij]:sj,[aj]:sj,[oj]:sj,...Zb,toJSON(){return{_id:`effect/Queue`,state:this.state._tag,size:xj(this)}}},lj=e=>Ox(t=>{let n=Object.create(cj);return n.dispatcher=t.currentDispatcher,n.capacity=e?.capacity??1/0,n.strategy=e?.strategy??`suspend`,n.messages=BA(),n.scheduleRunning=!1,n.state={_tag:`Open`,takers:new Set,offers:new Set,awaiters:new Set},yT(n)}),uj=e=>lj({capacity:e}),dj=B(2,(e,t)=>CT(()=>fj(e,t)?Cj:e.state._tag===`Open`&&e.strategy===`suspend`?jj(e,t):Sj)),fj=(e,t)=>e.state._tag===`Open`?e.messages.length>=e.capacity?e.strategy===`sliding`?(qA(e.messages),UA(e.messages,t),!0):e.capacity<=0&&e.state.takers.size>0&&(UA(e.messages,t),Ej(e),!0):(UA(e.messages,t),Dj(e),!0):!1,pj=B(2,(e,t)=>ST(()=>mj(e,t))),mj=(e,t)=>{if(e.state._tag!==`Open`)return!1;let n=EE(Tx(t),wj);return e.state.offers.size===0&&e.messages.length===0?(Ij(e,n),!0):(e.state={...e.state,_tag:`Closing`,exit:n},Dj(e),!0)},hj=e=>ST(()=>gj(e)),gj=e=>{if(e.state._tag===`Done`)return!1;WA(e.messages);let t=e.state.offers;Ij(e,e.state._tag===`Open`?Tj:e.state.exit);for(let e of t)Nj(e);return!0},_j=e=>vj(e,1,1/0),vj=B(3,(e,t,n)=>(t=uC(t),n=uC(n),CT(()=>Oj(e,t,n)??oE(Aj(e,()=>kj(e,t)),vj(e,t,n))))),yj=e=>CT(()=>bj(e)??oE(Aj(e,()=>kj(e,1)),yj(e))),bj=e=>{if(e.state._tag===`Done`)return e.state.exit;if(e.messages.length>0){let t=qA(e.messages);return Fj(e),Sx(t)}if(e.capacity<=0&&e.state.offers.size>0){let t=Pj(e.state.offers);return Fj(e),Sx(t)}},xj=e=>e.state._tag===`Done`?0:e.messages.length,Sj=Sx(!1),Cj=Sx(!0),wj=Ex(Lx()),Tj=_E(),Ej=e=>{if(e.state._tag!==`Done`&&e.state.takers.size!==0){for(let t of e.state.takers)if(t.ready()&&(e.state.takers.delete(t),t.resume(SE),e.messages.length===0))break}},Dj=e=>{e.scheduleRunning||e.state._tag===`Done`||e.state.takers.size===0||(e.scheduleRunning=!0,e.dispatcher.scheduleTask(()=>{e.scheduleRunning=!1,Ej(e)},0))},Oj=(e,t,n)=>{if(e.state._tag===`Done`)return e.state.exit;if(n<=0||t<=0)return Sx([]);if(!kj(e,t))return;let r=e.messages.length>0?GA(e.messages,n):[Pj(e.state.offers)];return Fj(e),Sx(r)},kj=(e,t)=>e.messages.length>=(e.state._tag===`Closing`?1:Math.min(t,e.capacity||1))||e.capacity<=0&&e.state._tag!==`Done`&&e.state.offers.size>0,Aj=(e,t)=>LT(n=>{if(e.state._tag===`Done`)return n(e.state.exit);if(t())return n(SE);let r={ready:t,resume:n};return e.state.takers.add(r),ST(()=>{e.state._tag!==`Done`&&e.state.takers.delete(r)})}),jj=(e,t)=>LT(n=>fj(e,t)?n(Cj):Mj(e,{_tag:`Single`,message:t,resume:n})),Mj=(e,t)=>{if(e.state._tag!==`Open`)return Nj(t);let n=e.state.offers;return n.add(t),ST(()=>{e.state._tag!==`Done`&&(n.delete(t),e.state._tag===`Closing`&&n.size===0&&e.messages.length===0&&Ij(e,e.state.exit))})},Nj=e=>e._tag===`Single`?e.resume(Sj):e.resume(Sx(e.remaining.slice(e.offset))),Pj=e=>{let t=e.values().next().value;if(t._tag===`Single`)return e.delete(t),t.resume(Cj),t.message;let n=t.remaining[t.offset++];return t.offset===t.remaining.length&&(e.delete(t),t.resume(Sx([]))),n},Fj=e=>{if(e.state._tag===`Done`)return pk(e.state.exit.cause);if(e.state.offers.size===0)return e.state._tag===`Closing`&&e.messages.length===0&&(Ij(e,e.state.exit),pk(e.state.exit.cause));for(let t of e.state.offers){let n=e.capacity-e.messages.length;if(n<=0)break;if(t._tag===`Single`)UA(e.messages,t.message),e.state.offers.delete(t),t.resume(Cj);else{for(;t.offset<t.remaining.length;t.offset++){if(n===0)return!1;UA(e.messages,t.remaining[t.offset]),n--}e.state.offers.delete(t),t.resume(Sx([]))}}return!1},Ij=(e,t)=>{if(e.state._tag===`Done`)return;let n=e.state;e.state={_tag:`Done`,exit:t};for(let e of n.takers)e.resume(t);n.takers.clear();for(let e of n.awaiters)e(t);n.awaiters.clear()},Lj=e=>new Sne(e),Rj=(e,t,n)=>LT(r=>{if(e.free>=t)return r(n);let i=()=>{e.free<t||(e.waiters.delete(i),r(n))};return e.waiters.add(i),ST(()=>{e.waiters.delete(i)})}),Sne=class{waiters=new Set;taken=0;permits;constructor(e){this.permits=e}get free(){return this.permits-this.taken}take(e){let t=CT(()=>this.free<e?Rj(this,e,t):(this.taken+=e,yT(e)));return t}takeIfAvailable(e){return CT(()=>this.free<e?yT(!1):(this.taken+=e,yT(!0)))}releaseUnsafe(e,t){return this.taken-=t,this.waiters.size>0&&e.currentDispatcher.scheduleTask(()=>{for(let e of this.waiters){if(this.free<=0)break;e()}},0),this.free}resize(e){return Ox(t=>(this.permits=e,this.free<0||this.releaseUnsafe(t,0),AT))}release(e){return Ox(t=>yT(this.releaseUnsafe(t,e)))}get releaseAll(){return Ox(e=>yT(this.releaseUnsafe(e,this.taken)))}withPermits(e){return t=>zD(n=>{let r=CT(()=>this.free<e?lE(n(Rj(this,e,AT)),()=>r):(this.taken+=e,CD(n(t),()=>{this.releaseUnsafe(aT(),e)},!0)));return r})}withPermit=this.withPermits(1);withPermitsIfAvailable(e){return t=>zD(n=>this.free<e?ET:(this.taken+=e,CD(n(aE(t)),()=>{this.releaseUnsafe(aT(),e)},!0)))}},zj=`~effect/Channel`,Cne=e=>zy(e,zj),wne={[zj]:{_Env:fy,_InErr:fy,_InElem:fy,_OutErr:fy,_OutElem:fy},pipe(){return ly(this,arguments)}},Bj=e=>{let t=Object.create(wne);return t.transform=(t,n)=>Vk(e(t,n),e=>H(Dk(e))),t},Vj=(e,t)=>Bj((n,r)=>Nk(Wj(e)(n,r),e=>t(e,r))),Hj=e=>Bj((t,n)=>e),Uj=e=>Bj(hA(function*(t,n){let r=GO(n),i=e=>KO(r,one(e));return Xk(yield*Xk(e(t,n,r),i),i)})),Wj=e=>e.transform,Tne=(e,t,n)=>lj({capacity:n?.bufferSize,strategy:n?.strategy}).pipe(Fk(t=>WO(e,hj(t))),Fk(n=>oA(HO(t(n),e),e))),Ene=(e,t)=>Bj((n,r)=>Lk(Tne(r,e,t),_j)),Dne=e=>Bj((t,n)=>bk(()=>Wj(e())(t,n))),One=Hj(H(AO())),kne=e=>Hj(H(Ek(e))),Ane=e=>Hj(H(_j(e))),jne=e=>Hj(H(eA(ej(e),()=>AO()))),Mne=e=>qj(Lk(QA(e),jne)),Nne=e=>Bj((t,n)=>Pne({scope:n,readable:e.evaluate(),onError:e.onError,releaseLockOnEnd:e.releaseLockOnEnd})),Pne=e=>{let t=e.readable.getReader(),n=e.exit??zA(void 0),r=bk(()=>n.current?n.current:Wk(vk({try:()=>t.read(),catch:e.onError}),{onFailure:e=>n.current??Dk(e),onSuccess:({done:e,value:t})=>n.current?n.current:e?AO():H(EC(t))}));return Rk(WO(e.scope,e.releaseLockOnEnd?xk(()=>t.releaseLock()):_k(()=>t.cancel().catch(_y))),r)},Gj=B(2,(e,t)=>Vj(e,e=>xk(()=>{let n=0;return Lk(e,e=>t(e,n++))}))),Fne=e=>e===void 0||e!==`unbounded`&&e<=1,Ine=B(e=>Cne(e[0]),(e,t,n)=>Fne(n?.concurrency)?Lne(e,t):Rne(e,t,n)),Lne=(e,t)=>Bj((n,r)=>{let i=0;return Lk(Wj(e)(n,r),Nk(e=>t(e,i++)))}),Rne=(e,t,n)=>Uj(hA(function*(r,i,a){let o=0,s=yield*Wj(e)(r,i),c=n.concurrency===`unbounded`?2**53-1:n.concurrency,l=yield*uj(0);yield*WO(a,hj(l));let u=lA(yield*Gk()),d=IA(a);if(n.unordered){let e=Lj(c),n=py(e.release(1)),r=Wk({onFailure:e=>Nk(pj(l,e),n),onSuccess:e=>Nk(dj(l,e),n)});yield*e.take(1).pipe(Nk(()=>s),Nk(e=>{let n=o++;return d(u(r(bk(()=>t(e,n))))),Sk}),rA({disableYield:!0}),Vk(t=>e.withPermits(c-1)(pj(l,t))),oA(a))}else{let e=yield*uj(c-2);yield*WO(a,hj(e)),yield*yj(e).pipe(une,Nk(e=>dj(l,e)),rA({disableYield:!0}),Vk(e=>pj(l,e)),oA(a));let n,r=e=>{e._tag!==`Success`&&(n=e.cause,mj(l,e.cause))};yield*s.pipe(Nk(i=>{if(n)return Dk(n);let a=o++,s=u(bk(()=>t(i,a)));return d(s),s.addObserver(r),dj(e,hne(s))}),rA({disableYield:!0}),Vk(t=>dj(e,MO(t)).pipe(Pk(pj(e,t)))),oA(a))}return yj(l)})),zne=e=>Vj(e,e=>{let t,n=0;return H(bk(function r(){if(t===void 0)return Nk(e,e=>{switch(e.length){case 0:return r();case 1:return H(e[0]);default:return t=e,H(e[n++])}});let i=t[n++];return n>=t.length&&(t=void 0,n=0),H(i)}))}),Bne=B(2,(e,t)=>Vj(e,e=>H(Nk(e,function n(r){let i=[];for(let e=0;e<r.length;e++)t(r[e])&&i.push(r[e]);return wC(i)?H(i):Nk(e,n)})))),Kj=B(2,(e,t)=>Bj((n,r)=>Nk(Wj(e)(n,r),e=>Wj(t)(e,r)))),qj=e=>Bj((t,n)=>{let r;return H(bk(()=>r||e.pipe(HO(n),Nk(e=>Wj(e)(t,n)),Nk(e=>r=e))))}),Vne=B(2,(e,t)=>Uj((n,r,i)=>UO(i,t).pipe(Pk(Wj(e)(n,r))))),Jj=B(2,(e,t)=>Vne(e,e=>t)),Yj=(e,t,n)=>bk(()=>{let r=VO();return ine(Nk(Wj(e)(AO(),r),t),n||H).pipe(Zk(e=>KO(r,e)))}),Xj=B(2,(e,t)=>Bj((n,r)=>Lk(qk(Wj(e)(n,r),t),qk(t)))),Zj=B(2,(e,t)=>Yj(e,e=>rA(Nk(e,t),{disableYield:!0}))),Qj=hA(function*(e){let t=Lj(1),n=yield*Gk(),r=aC(n,BO);return(yield*Wj(e)(AO(),r)).pipe(qk(n),t.withPermits(1))},Vk(e=>H(Dk(e)))),$j=(e,t)=>Wj(e)(AO(),t),eM=`~effect/MutableHashMap`,tM={[eM]:eM,[Symbol.iterator](){return this.backing[Symbol.iterator]()},toString(){return`MutableHashMap(${Ob(Array.from(this))})`},toJSON(){return{_id:`MutableHashMap`,values:Nb(Array.from(this))}},[Mb](){return this.toJSON()},pipe(){return ly(this,arguments)}},nM=()=>{let e=Object.create(tM);return e.backing=new Map,e.buckets=new Map,e},rM=B(2,(e,t)=>{if(e.backing.has(t))return CS(e.backing.get(t));if(iM(t))return SS();let n=Wy(t),r=e.buckets.get(n);return r===void 0?SS():aM(e,r,t)}),iM=e=>typeof e!=`object`&&typeof e!=`function`,aM=(e,t,n)=>{for(let r=0,i=t.length;r<i;r++)if(lb(n,t[r])){let n=t[r];return CS(e.backing.get(n))}return SS()},oM=B(3,(e,t,n)=>{if(e.backing.has(t)||iM(t))return e.backing.set(t,n),e;let r=Wy(t),i=e.buckets.get(r);if(i===void 0)return e.buckets.set(r,[t]),e.backing.set(t,n),e;let a=sM(i,t);return a===void 0&&(i.push(t),a=t),e.backing.set(a,n),e}),sM=(e,t)=>{for(let n=0,r=e.length;n<r;n++)if(lb(t,e[n]))return e[n]},cM=B(2,(e,t)=>{if(iM(t))return e.backing.delete(t),e;let n=Wy(t),r=e.buckets.get(n);if(r===void 0)return e;for(let n=0,i=r.length;n<i;n++){let i=r[n];if(i===t||lb(t,i)){e.backing.delete(i),r.splice(n,1);break}}return r.length===0&&e.buckets.delete(n),e}),lM=e=>dM(typeof e==`string`?fM.encode(e):e),uM=e=>{let t=pM(e),n=t.length;if(n%4!=0)return fC(new vw({kind:`Decode`,module:`Base64`,input:t,message:`Length must be a multiple of 4, but is ${n}`}));let r=t.indexOf(`=`);if(r!==-1&&(r<n-2||r===n-2&&t[n-1]!==`=`))return fC(new vw({kind:`Decode`,module:`Base64`,input:t,message:`Found a '=' character, but it is not at the end`}));try{let e=t.endsWith(`==`)?2:+!!t.endsWith(`=`),r=new Uint8Array(n/4*3-e);for(let e=0,i=0;e<n;e+=4,i+=3){let n=gM(t.charCodeAt(e))<<18|gM(t.charCodeAt(e+1))<<12|gM(t.charCodeAt(e+2))<<6|gM(t.charCodeAt(e+3));r[i]=n>>16,r[i+1]=n>>8&255,r[i+2]=n&255}return dC(r)}catch(e){return fC(new vw({kind:`Decode`,module:`Base64`,input:t,message:e instanceof Error?e.message:`Invalid input`}))}},dM=e=>{let t=e.length,n=``,r=2;for(;r<t;r+=3)n+=mM[e[r-2]>>2],n+=mM[(e[r-2]&3)<<4|e[r-1]>>4],n+=mM[(e[r-1]&15)<<2|e[r]>>6],n+=mM[e[r]&63];return r===t+1&&(n+=mM[e[r-2]>>2],n+=mM[(e[r-2]&3)<<4],n+=`==`),r===t&&(n+=mM[e[r-2]>>2],n+=mM[(e[r-2]&3)<<4|e[r-1]>>4],n+=mM[(e[r-1]&15)<<2],n+=`=`),n},fM=new TextEncoder,pM=e=>e.replace(/[\n\r]/g,``),mM=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,hM=new Uint8Array(123).fill(255);for(let e=0;e<64;e++)hM[mM.charCodeAt(e)]=e;hM[61]=0;var gM=e=>{if(e>=hM.length||hM[e]===255)throw TypeError(`Invalid character ${String.fromCharCode(e)}`);return hM[e]},_M=BigInt(1),vM=BigInt(1e3),yM=BigInt(1024),bM=[{symbol:`B`,factor:_M,names:[`B`,`byte`,`bytes`]},{symbol:`kB`,factor:vM,names:[`kB`,`kilobyte`,`kilobytes`]},{symbol:`MB`,factor:vM**BigInt(2),names:[`MB`,`megabyte`,`megabytes`]},{symbol:`GB`,factor:vM**BigInt(3),names:[`GB`,`gigabyte`,`gigabytes`]},{symbol:`TB`,factor:vM**BigInt(4),names:[`TB`,`terabyte`,`terabytes`]},{symbol:`PB`,factor:vM**BigInt(5),names:[`PB`,`petabyte`,`petabytes`]},{symbol:`EB`,factor:vM**BigInt(6),names:[`EB`,`exabyte`,`exabytes`]},{symbol:`ZB`,factor:vM**BigInt(7),names:[`ZB`,`zettabyte`,`zettabytes`]},{symbol:`YB`,factor:vM**BigInt(8),names:[`YB`,`yottabyte`,`yottabytes`]},{symbol:`RB`,factor:vM**BigInt(9),names:[`RB`,`ronnabyte`,`ronnabytes`]},{symbol:`QB`,factor:vM**BigInt(10),names:[`QB`,`quettabyte`,`quettabytes`]}],xM=[bM[0],{symbol:`KiB`,factor:yM,names:[`KiB`,`kibibyte`,`kibibytes`]},{symbol:`MiB`,factor:yM**BigInt(2),names:[`MiB`,`mebibyte`,`mebibytes`]},{symbol:`GiB`,factor:yM**BigInt(3),names:[`GiB`,`gibibyte`,`gibibytes`]},{symbol:`TiB`,factor:yM**BigInt(4),names:[`TiB`,`tebibyte`,`tebibytes`]},{symbol:`PiB`,factor:yM**BigInt(5),names:[`PiB`,`pebibyte`,`pebibytes`]},{symbol:`EiB`,factor:yM**BigInt(6),names:[`EiB`,`exbibyte`,`exbibytes`]},{symbol:`ZiB`,factor:yM**BigInt(7),names:[`ZiB`,`zebibyte`,`zebibytes`]},{symbol:`YiB`,factor:yM**BigInt(8),names:[`YiB`,`yobibyte`,`yobibytes`]}];[...bM,...xM.slice(1)];var SM=`~effect/Stream`,CM={_R:fy,_E:fy,_A:fy},wM=function(e){this.channel=e};wM.prototype={[SM]:CM,pipe(){return ly(this,arguments)}};var TM=e=>new wM(e),EM=`~effect/Stream`,DM=e=>zy(e,EM),OM=TM,kM=(e,t)=>OM(Bj((n,r)=>Nk($j(e.channel,r),e=>t(e,r)))),AM=e=>e.channel,jM=(e,t)=>OM(Ene(e,t)),MM=OM(One),NM=e=>OM(Dne(()=>e().channel)),PM=e=>OM(kne(e)),FM=e=>OM(Ane(e)),IM=e=>OM(Mne(e)),LM=e=>OM(Nne(e)),RM=e=>OM(qj(Lk(e,AM))),zM=B(2,(e,t)=>NM(()=>{let n=0;return OM(Gj(e.channel,DC(e=>t(e,n++))))})),BM=B(e=>DM(e[0]),(e,t,n)=>e.channel.pipe(zne,Ine(t,n),Gj(EC),OM)),VM=B(2,(e,t)=>OM(Bne(AM(e),t))),HM=B(2,(e,t)=>OM(Kj(e.channel,t))),UM=B(e=>DM(e[0]),(e,t)=>NM(()=>{let n=new TextDecoder(t?.encoding);return zM(e,e=>n.decode(e,{stream:!0}))})),WM=B(2,(e,t)=>OM(Jj(e.channel,t))),GM=B(2,(e,t)=>OM(Xj(e.channel,t))),KM=B(2,(e,t)=>Zj(e.channel,t)),qM=e=>Qj(e.channel),JM=B(e=>DM(e[0]),(e,t,n)=>{let r,i,a=LA(!1);return new ReadableStream({start(n){i=cA(qk(KM(e,e=>a.whenOpen(xk(()=>{a.closeUnsafe();for(let t=0;t<e.length;t++)n.enqueue(e[t]);r(),r=void 0}))),t)),i.addObserver(e=>{e._tag===`Failure`?n.error(DO(e.cause)):n.close()})},pull(){return new Promise(e=>{r=e,a.openUnsafe()})},cancel(){if(i)return dA(zk(_ne(i)))}},n?.strategy)}),YM=B(e=>DM(e[0]),(e,t)=>Lk(Gk(),n=>JM(e,n,t))),XM=`~effect/BigDecimal`,ZM={[XM]:XM,[Uy](){let e=aN(this);return qy(Zy(String(e.value)),Xy(e.scale))},[cb](e){return QM(e)&&uN(this,e)===0},toString(){return`BigDecimal(${fN(this)})`},toJSON(){return{_id:`BigDecimal`,value:String(this.value),scale:this.scale}},[Mb](){return this.toJSON()},pipe(){return ly(this,arguments)}},QM=e=>zy(e,XM),$M=(e,t)=>{if(!Number.isSafeInteger(t))throw RangeError(`Scale must be a safe integer, got ${t}`);let n=Object.create(ZM);return n.value=e,n.scale=t,n},eN=(e,t)=>{let n=$M(e,t);return n.normalized=n,n},tN=BigInt(0),nN=BigInt(1),rN=BigInt(10),iN=eN(tN,0),aN=e=>{if(e.normalized===void 0){if(e.value===tN)e.normalized=iN;else{let t=`${e.value}`,n=t.length;for(;t[n-1]===`0`;)n--;e.normalized=eN(BigInt(t.slice(0,n)),e.scale-(t.length-n))}}return e.normalized},oN=100,sN=[nN],cN=(e,t)=>e===t?0:e<t?-1:1,lN=(e,t)=>{let n=`${e.value<tN?-e.value:e.value}`,r=`${t.value<tN?-t.value:t.value}`,i=BigInt(n.length-r.length)-BigInt(e.scale)+BigInt(t.scale);if(i!==tN)return i<tN?-1:1;let a=Math.max(n.length,r.length);return hS(n.padEnd(a,`0`),r.padEnd(a,`0`))},uN=(e,t)=>{if(e.scale===t.scale)return cN(e.value,t.value);let n=dN(e),r=dN(t);if(n!==r)return n<r?-1:1;if(n===0)return 0;let i=e.scale-t.scale,a=Math.abs(i);if(a>oN)return n===-1?lN(t,e):lN(e,t);let o=sN[a]??=rN**BigInt(a);return i>0?cN(e.value,t.value*o):cN(e.value*o,t.value)},dN=e=>e.value===tN?0:e.value<tN?-1:1,fN=e=>{let t=aN(e);if(Math.abs(t.scale)>=16)return pN(t);let n=t.value<tN,r=`${n?-t.value:t.value}`,i=t.scale>0?r.padStart(t.scale+1,`0`):r.padEnd(r.length-t.scale,`0`),a=i.length-t.scale,o=t.scale>0?`${i.slice(0,a)}.${i.slice(a)}`:i;return n?`-${o}`:o},pN=e=>{if(mN(e))return`0e+0`;let t=aN(e),n=`${t.value}`,r=t.value<tN?2:1,i=n.slice(0,r),a=n.slice(r),o=a.length-t.scale;return`${i}${a===``?``:`.${a}`}e${o>=0?`+`:``}${o}`},mN=e=>e.value===tN,hN=`~effect/http/Cookies`,gN=`~effect/http/Cookies/Cookie`,_N={[hN]:hN,...Pb,toJSON(){return{_id:`effect/Cookies`,cookies:gC(this.cookies,e=>e.toJSON())}},pipe(){return ly(this,arguments)}},vN=e=>{let t=Object.create(_N);return t.cookies=e,t},yN=e=>{let t={};for(let n of e)zb(t,n.name,n);return vN(t)},bN=e=>{let t=typeof e==`string`?[e]:e,n=[];for(let e of t){let t=xN(e.trim());t&&n.push(t)}return yN(n)};function xN(e){let t=e.split(`;`).map(e=>e.trim()).filter(e=>e!==``);if(t.length===0)return;let n=t[0].indexOf(`=`);if(n===-1)return;let r=t[0].slice(0,n);if(!SN.test(r))return;let i=t[0].slice(n+1),a=wN(i);if(t.length===1)return Object.assign(Object.create(CN),{name:r,value:a,valueEncoded:i});let o={};for(let e=1;e<t.length;e++){let n=t[e],r=n.indexOf(`=`),i=r===-1?n:n.slice(0,r).trim(),a=r===-1?void 0:n.slice(r+1).trim();switch(i.toLowerCase()){case`domain`:{if(a===void 0)break;let e=a.trim().replace(/^\./,``);e&&(o.domain=e);break}case`expires`:{if(a===void 0)break;let e=new Date(a);isNaN(e.getTime())||(o.expires=e);break}case`max-age`:{if(a===void 0)break;let e=parseInt(a,10);isNaN(e)||(o.maxAge=UC(e));break}case`path`:if(a===void 0)break;a[0]===`/`&&(o.path=a);break;case`priority`:if(a===void 0)break;switch(a.toLowerCase()){case`low`:o.priority=`low`;break;case`medium`:o.priority=`medium`;break;case`high`:o.priority=`high`}break;case`httponly`:o.httpOnly=!0;break;case`secure`:o.secure=!0;break;case`partitioned`:o.partitioned=!0;break;case`samesite`:if(a===void 0)break;switch(a.toLowerCase()){case`lax`:o.sameSite=`lax`;break;case`strict`:o.sameSite=`strict`;break;case`none`:o.sameSite=`none`}}}return Object.assign(Object.create(CN),{name:r,value:a,valueEncoded:i,options:Object.keys(o).length>0?o:void 0})}var SN=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,CN={[gN]:gN,...Pb,toJSON(){return{_id:`effect/Cookies/Cookie`,name:this.name,value:this.value,options:this.options}}},wN=e=>{try{return decodeURIComponent(e)}catch{return e}},TN=new WeakMap,EN=e=>{if(TN.has(e))return TN.get(e);throw Error(`Unable to get redacted value`+(e.label?` with label: "${e.label}"`:``))},DN=`~effect/Redacted`,ON=e=>zy(e,DN),kN=(e,t)=>{let n=Object.create(AN);return t?.label&&(n.label=t.label),TN.set(n,e),n},AN={[DN]:{_A:e=>e},label:void 0,...Zb,toJSON(){return this.toString()},toString(){return`<redacted${Ey(this.label)?`:`+this.label:``}>`},[Uy](){return Wy(TN.get(this))},[cb](e){return ON(e)&&lb(TN.get(this),TN.get(e))}},jN=EN,MN=Symbol.for(`~effect/http/Headers`),NN=Object.defineProperties(Object.create(null),{[MN]:{value:MN},[Cb]:{value(e){return UN(this,aC(e,GN))}},toJSON:{value(){return wb(this)}},[cb]:{value(e){return FN(this,e)}},[Uy]:{value(){return $y(this)}},toString:{value:Pb.toString},[Mb]:{value:Pb[Mb]}}),PN=e=>Object.assign(Object.create(NN),e),FN=rte(Ux()),IN=Object.create(NN),LN=e=>{if(e===void 0)return IN;if(Symbol.iterator in e){let t=Object.create(NN);for(let[n,r]of e)t[n.toLowerCase()]=r;return t}let t=Object.create(NN);for(let[n,r]of Object.entries(e))Array.isArray(r)?t[n.toLowerCase()]=r.join(`, `):r!==void 0&&(t[n.toLowerCase()]=r);return t},RN=e=>Object.setPrototypeOf(e,NN),zN=B(3,(e,t,n)=>{let r=PN(e);return r[t.toLowerCase()]=n,r}),BN=B(2,(e,t)=>PN({...e,...LN(t)})),VN=B(2,(e,t)=>{let n=PN(e);return Object.assign(n,t),n}),HN=B(2,(e,t)=>{let n=PN(e);return delete n[t.toLowerCase()],n}),UN=B(2,(e,t)=>{let n={...e},r=t=>{if(typeof t==`string`){let r=t.toLowerCase();r in e&&(n[r]=kN(e[r]))}else for(let r in e)r.search(t)!==-1&&(n[r]=kN(e[r]))};if(Array.isArray(t))for(let e=0;e<t.length;e++)r(t[e]);else r(t);return n}),WN=(e,t)=>{for(let n=0;n<t.length;n++){let r=t[n];if(typeof r==`string`){if(r.toLowerCase()===e.toLowerCase())return!0}else if(e.search(r)!==-1)return!0}return!1},GN=cC(`effect/Headers/CurrentRedactedNames`,{defaultValue:()=>[`authorization`,`cookie`,`set-cookie`,`x-api-key`]}),KN=`~effect/http/UrlParams`,qN=e=>zy(e,KN),JN={...Zb,[KN]:KN,[Symbol.iterator](){return this.params[Symbol.iterator]()},toJSON(){return{_id:`UrlParams`,params:Object.fromEntries(this.params)}},[cb](e){return QN(this,e)},[Uy](){return tb(this.params.flat())}},YN=e=>{let t=Object.create(JN);return t.params=e,t},XN=e=>{if(qN(e))return e;let t=ZN(e),n=[];for(let e=0;e<t.length;e++)if(Array.isArray(t[e][0])){let[r,i]=t[e];n.push([`${r[0]}[${r.slice(1).join(`][`)}]`,i])}else n.push(t[e]);return YN(n)},ZN=e=>{let t=typeof e[Symbol.iterator]==`function`?yC(e):Object.entries(e),n=[];for(let[e,r]of t)if(Array.isArray(r))for(let t=0;t<r.length;t++)r[t]!==void 0&&n.push([e,String(r[t])]);else if(typeof r==`object`&&r){let t=ZN(r);for(let[r,i]of t)n.push([[e,...typeof r==`string`?[r]:r],i])}else r!==void 0&&n.push([e,String(r)]);return n},QN=Vx((e,t)=>$N(e.params,t.params)),$N=ote(ete([Ux(),Ux()])),eP=YN([]),tP=B(2,(e,t)=>YN(t(e.params))),nP=B(2,(e,t)=>{let n=XN(t).params.slice(),r=new Set;for(let e=0;e<n.length;e++)r.add(n[e][0]);for(let t=0;t<e.params.length;t++)r.has(e.params[t][0])||n.push(e.params[t]);return YN(n)}),rP=B(2,(e,t)=>tP(e,SC(XN(t).params))),iP=e=>new URLSearchParams(XN(e).params).toString(),aP=e=>{let t={};for(let[n,r]of e.params)if(!Object.hasOwn(t,n))zb(t,n,r);else{let e=t[n];typeof e==`string`?zb(t,n,[e,r]):e.push(r)}return t};function oP(e){return e.checks?e.checks[e.checks.length-1].annotations:e.annotations}function sP(e){return t=>oP(t)?.[e]}var cP=`~structural`,lP=`~sentinels`,uP=`~constructor`,dP=yy(e=>{let t=oP(e)?.identifier;return typeof t==`string`?t:e.getExpected(dP)}),fP=Symbol(),pP=jO,mP=pP(fP),hP=pP(fP),gP=e=>e===fP?SS():CS(e),_P=e=>e._tag===`None`?mP:pP(e.value),vP=`~effect/SchemaIssue/Issue`;function yP(e){return zy(e,vP)&&e[vP]===vP}function Hne(e){return Object.hasOwn(e,`input`)}var bP=class{[vP]=vP;constructor(e,t){t?.reportInput===!0&&e!==fP&&(this.input=e)}},Une=class extends bP{_tag=`Filter`;filter;issue;constructor(e,t,n,r){super(n,r),this.filter=e,this.issue=t}},Wne=class extends bP{_tag=`Encoding`;ast;issue;constructor(e,t,n,r){super(n,r),this.ast=e,this.issue=t}},xP=class extends bP{_tag=`Pointer`;path;issue;constructor(e,t){super(),this.path=e,this.issue=t}},SP=class extends bP{_tag=`MissingKey`;annotations;constructor(e){super(),this.annotations=e}},CP=class extends bP{_tag=`UnexpectedKey`;ast;constructor(e,t,n){super(t,n),this.ast=e}},wP=class extends bP{_tag=`Composite`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},TP=class extends bP{_tag=`InvalidType`;ast;constructor(e,t,n){super(t,n),this.ast=e}},EP=class extends bP{_tag=`InvalidValue`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}};function DP(e,t,n,r,i){return new wP(e,[new xP([t],n)],r,i)}var OP=class extends bP{_tag=`Forbidden`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}},kP=class extends bP{_tag=`AnyOf`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},Gne=class extends bP{_tag=`OneOf`;ast;successes;constructor(e,t,n,r){super(n,r),this.ast=e,this.successes=t}};function AP(e,t,n){if(yP(e))return e;if(typeof e==`string`)return new EP({message:e},t,n);let r=typeof e.issue==`string`?new EP({message:e.issue},t,n):e.issue;return new xP(e.path,r)}function Kne(e,t,n){if(e!==void 0)return typeof e==`boolean`?e?void 0:new EP(void 0,t,n):AP(e,t,n)}function qne(e,t,n,r){return Array.isArray(t)?wC(t)?t.length===1?AP(t[0],n,r):new wP(e,DC(t,e=>AP(e,n,r)),n,r):void 0:Kne(t,n,r)}var Jne=e=>{let t=IP(e);if(t!==void 0)return t;switch(e._tag){case`InvalidType`:return NP(dP(e.ast),e);case`InvalidValue`:{let t=MP(e);if(t!==void 0)return NP(t,e);let n=jP(e);return n===void 0?`Expected a valid value`:`Invalid data ${n}`}case`MissingKey`:return`Missing key`;case`UnexpectedKey`:{let t=jP(e);return t===void 0?`Expected no excess property`:`Unexpected key with value ${t}`}case`Forbidden`:return`Forbidden operation`;case`OneOf`:{let t=jP(e);return t===void 0?`Expected exactly one member to match`:`Expected exactly one member to match the input ${t}`}}},Yne=e=>IP(e.issue)??IP(e);function jP(e){return Hne(e)?Ob(e.input):void 0}function MP(e){let t=e.annotations?.expected;return typeof t==`string`?t:void 0}function NP(e,t){let n=jP(t);return n===void 0?`Expected ${e}`:`Expected ${e}, got ${n}`}function PP(e){let t=e.annotations?.expected;if(typeof t==`string`)return t;switch(e._tag){case`Filter`:return`<filter>`;case`FilterGroup`:return e.checks.map(e=>PP(e)).join(` & `)}}function Xne(){return e=>FP(e,``)}var Zne=Xne();function FP(e,t){let n;switch(e._tag){case`Filter`:{let r=Yne(e);if(r!==void 0)n=r;else{if(e.issue._tag!==`InvalidValue`)return FP(e.issue,t);let r=MP(e.issue);n=r===void 0?NP(PP(e.filter),e):NP(r,e.issue)}break}case`Encoding`:return FP(e.issue,t);case`Pointer`:return FP(e.issue,t+Iee(e.path));case`Composite`:case`AnyOf`:if(e._tag===`Composite`||e.issues.length>0)return e.issues.map(e=>FP(e,t)).join(`
56
+ `);n=IP(e)??NP(dP(e.ast),e);break;default:n=Jne(e)}return t?`${n}\n at ${t}`:n}function IP(e){if(e._tag===`Pointer`)return;if(e._tag===`Encoding`)return IP(e.issue);let t=(e._tag===`Filter`?e.filter.annotations:`annotations`in e?e.annotations:e.ast.annotations)?.[e._tag===`MissingKey`?`messageMissingKey`:e._tag===`UnexpectedKey`?`messageUnexpectedKey`:`message`];if(typeof t==`string`)return t}function LP(e){let t;for(let n of e.reasons){if(!xO(n)||!yP(n.error))return;t??=n.error}return t}function RP(e,t){let n=LP(e);if(n===void 0)throw Error(t,{cause:e});return n}var zP=e=>lM(e).replace(/=/g,``).replace(/\+/g,`-`).replace(/\//g,`_`),BP=e=>Object.assign(Object.create(uy),e),Qne=BP({_tag:`Passthrough`});function VP(){return Qne}function HP(e){return BP({_tag:`Transform`,transform:e})}function UP(e){return BP({_tag:`TransformEffect`,transform:e})}function $ne(e){return BP({_tag:`TransformOptional`,transform:e})}function ere(e){return BP({_tag:`TransformOptionalEffect`,transform:e})}function WP(){return $ne(()=>SS())}function GP(e){return ere(t=>{let n=LS(t,Ny);return ES(n)?H(n):_A(e,CS)})}function KP(){return HP(globalThis.String)}function qP(){return HP(globalThis.Number)}function tre(){return HP(e=>new globalThis.Date(e))}function nre(){return HP(rne)}function rre(e){return UP((t,n)=>Ak({try:()=>JSON.parse(t,e?.reviver),catch:()=>new EP({expected:`a valid JSON string`},t,n)}))}function ire(e){return UP((t,n)=>Ak({try:()=>{let n=JSON.stringify(t,e?.replacer,e?.space);if(n===void 0)throw TypeError(`Value cannot be represented as JSON`);return n},catch:()=>new EP({expected:`a JSON-serializable value`},t,n)}))}function are(){return HP(lM)}function ore(){return UP((e,t)=>vA(Mk(uM(e)),()=>new EP({expected:`a valid Base64 string`},e,t)))}var sre=class extends dy{_tag=`Middleware`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new sre(this.encode,this.decode)}},JP=`~effect/SchemaTransformation/Transformation`,YP=class extends dy{[JP]=JP;_tag=`Transformation`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new YP(this.encode,this.decode)}};function cre(e){return zy(e,JP)&&e[JP]===JP}var XP=e=>cre(e)?e:new YP(e.decode,e.encode);function ZP(e){return new YP(UP(e.decode),UP(e.encode))}function QP(e){return new YP(HP(e.decode),HP(e.encode))}function lre(){return new YP(nre(),VP())}var ure=new YP(VP(),VP());function $P(){return ure}var eF=new YP(qP(),KP()),tF=new YP(tre(),HP(Ab)),dre=e=>Ly(e)&&typeof e.message==`string`,fre=e=>{let t=Object.hasOwn(e,`cause`)?Error(e.message,{cause:nF(e.cause)}):Error(e.message);return typeof e.name==`string`&&e.name!==`Error`&&(t.name=e.name),typeof e.stack==`string`&&(t.stack=e.stack),t},pre=e=>{try{let t=Ree(e);return t===void 0?Ob(e):JSON.parse(t)}catch{return Ob(e)}},mre=(e,t,n)=>{let r={name:e.name,message:typeof e.message==`string`?e.message:``};return t?.includeStack&&typeof e.stack==`string`&&(r.stack=e.stack),!t?.excludeCause&&e.cause!==void 0&&(r.cause=n(e.cause)),r},hre=e=>{let t=new WeakSet,n=r=>{if(Vy(r)){if(t.has(r))return`[Circular]`;t.add(r);let i=mre(r,e,n);return t.delete(r),i}return pre(r)};return n},nF=e=>dre(e)?fre(e):e,gre=e=>QP({decode:nF,encode:hre(e)}),_re=new YP(ore(),are());function vre(e){return new YP(rre(e??{}),ire(e))}function rF(e){return t=>t._tag===e}var iF=rF(`Declaration`),yre=rF(`Null`),aF=rF(`Void`),oF=rF(`Never`),sF=rF(`Literal`),cF=rF(`UniqueSymbol`),lF=rF(`Arrays`),uF=rF(`Objects`),dF=rF(`Union`),fF=rF(`Suspend`),pF=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},mF={},hF=class{isOptional;isMutable;constructorDefault;annotations;constructor(e,t,n=void 0,r=void 0){this.isOptional=e,this.isMutable=t,this.constructorDefault=n,this.annotations=r}},gF=`~effect/Schema`,_F=class{[gF]=gF;annotations;checks;encoding;context;constructor(e=void 0,t=void 0,n=void 0,r=void 0){this.annotations=e,this.checks=t,this.encoding=n,this.context=r}toString(){return`<${this._tag}>`}},vF=class extends _F{_tag=`Declaration`;typeParameters;run;encodingChecks;encodingRun;constructor(e,t,n,r,i,a,o,s){super(n,r,i,a),this.typeParameters=e,this.run=t,this.encodingChecks=o,this.encodingRun=s}getParser(){let e;return(t,n)=>t===fP?mP:(e??=this.run(this.typeParameters))(t,this,n)}_rebuild(e,t,n,r,i){let a=HI(this.typeParameters,e);return a===this.typeParameters&&t===this.checks&&n===this.encodingChecks&&r===this.run&&i===this.encodingRun?this:new vF(a,r,this.annotations,t,void 0,this.context,n,i)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks,this.run,this.encodingRun)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks,this.encodingRun??this.run,this.run)}getExpected(){let e=this.annotations?.expected;return typeof e==`string`?e:`<Declaration>`}},yF=new class extends _F{_tag=`Null`;getParser(){return oL(this,null)}getExpected(){return`null`}},bF=class extends _F{_tag=`Undefined`;getParser(){return oL(this,void 0)}toCodecJson(){return AI(this,[xF])}getExpected(){return`undefined`}},xF=new pF(yF,new YP(HP(()=>void 0),HP(()=>null))),SF=new bF,CF=new class extends _F{_tag=`Void`;getParser(){let e=pP(void 0);return t=>t===fP?mP:e}toCodecJson(){return AI(this,[xF])}getExpected(){return`void`}},wF=new class extends _F{_tag=`Never`;getParser(){return sL(this,Fy)}getExpected(){return`never`}},TF=new class extends _F{_tag=`Unknown`;getParser(){return sL(this,Iy)}getExpected(){return`unknown`}},EF=class extends _F{_tag=`Literal`;literal;constructor(e,t,n,r,i){if(super(t,n,r,i),typeof e==`number`&&!globalThis.Number.isFinite(e))throw Error(`A numeric literal must be finite, got ${Ob(e)}`);this.literal=e}getParser(){return oL(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?DF(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:DF(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function DF(e){let t=globalThis.String(e.literal);return AI(e,[new pF(new EF(t),new YP(HP(()=>e.literal),HP(()=>t)))])}var OF=new class extends _F{_tag=`String`;getParser(){return sL(this,Ey)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&gL(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},kF=class extends _F{_tag=`Number`;getParser(){return sL(this,Dy)}matchKey(e,t){return this._match(dL,e,t)}matchPart(e,t){return this._match(uL,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:gL(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(AF(this.checks,`effect/schema/isFinite`)||AF(this.checks,`effect/schema/isInt`))?this:AI(this,[TI])}toCodecStringTree(){return this.toCodecJson()===this?AI(this,[mL]):AI(this,[hL])}getExpected(){return`number`}};function AF(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&AF(e.checks,t))}var jF=new kF,MF=new class extends _F{_tag=`Boolean`;getParser(){return sL(this,Oy)}getExpected(){return`boolean`}},NF=class extends _F{_tag=`Arrays`;isMutable;elements;rest;encodingChecks;constructor(e,t,n,r,i,a,o,s){super(r,i,a,o),this.isMutable=e,this.elements=t,this.rest=n,this.encodingChecks=s;let c=!1;for(let e=0;e<t.length;e++)if(ZI(t[e]))c=!0;else if(c)throw Error(`A required element cannot follow an optional element. ts(1257)`);if(c&&n.length>1)throw Error(`A required element cannot follow an optional element. ts(1257)`);for(let e=1;e<n.length;e++)if(ZI(n[e]))throw Error(`An optional element cannot follow a rest element. ts(1266)`)}getParser(e,t=e){let n=this,r,i,a=n.elements.length,o=Math.max(0,n.rest.length-1);function s(e,t){return t<a?r[t]:t>=e?i[t-e+1]:i[0]}let c=e=>{let{input:t,len:r,options:i}=e;if(n.rest.length===0&&r>a)for(let o=a;o<r;o++){let r=new CP(n,t[o],i),a=new xP([o],r);if(i.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return Ek(new wP(n,[a],t,i))}return e.issues?Ek(new wP(n,e.issues,t,i)):pP(e.output)},l=(e,t)=>{let r=e.length,i={ast:n,getParser:s,input:e,len:r,tailThreshold:Math.max(a,r-o),output:new globalThis.Array(r),issues:void 0,options:t},u=n.rest.length===0?a:Math.max(r,a+o),d=t.concurrency===void 0?1:WD(t.concurrency),f=d===1?IF(i,e,0,u):LF(i,e,{concurrency:d,end:u});if(!f)return c(i);if(uE(f))return bA(f,()=>c(i));let p=!0;return bk(()=>p?(p=!1,Nk(f,()=>c(i))):l(e,t))};return(e,a)=>{if(e===fP)return mP;try{return Array.isArray(e)?(r||(r=n.elements.map(e=>({ast:e,parser:t(e)})),i=n.rest.map(e=>({ast:e,parser:t(e)}))),l(e,a)):Ek(new TP(n,e,a))}catch(e){return kk(e)}}}_rebuild(e,t,n){let r=HI(this.elements,e),i=HI(this.rest,e);return r===this.elements&&i===this.rest&&t===this.checks&&n===this.encodingChecks?this:new NF(this.isMutable,r,i,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){return`array`}};function PF(e,t,n,r){if(n._tag===`Failure`)return RF(e,e.ast,r,n);let i=n===hP?t:n[Gb];if(i!==fP)e.output[r]=i;else{let t=e.getParser(e.tailThreshold,r);if(ZI(t.ast))return;let n=new xP([r],new SP(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return NO(new wP(e.ast,[n],e.input,e.options))}}var FF={onItem(e,t,n){let r=n<e.len?t:fP;return e.getParser(e.tailThreshold,n).parser(r,e.options)},step:PF},IF=GD()(FF),LF=qD()(FF),RF=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=LP(r.cause);if(i===void 0)return MO(EO(r.cause,r=>new wP(t,[new xP([n],r)],e.input,e.options)));let a=new xP([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return NO(new wP(t,[a],e.input,e.options))},zF=`[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?`;function BF(e,t,n=mF){let r,i;function a(t){switch(t._tag){case`String`:case`TemplateLiteral`:return(r??=Object.keys(e)).filter(e=>t.matchPart(e,n)!==void 0);case`Number`:return(r??=Object.keys(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Symbol`:return(i??=Object.getOwnPropertySymbols(e)).filter(r=>Object.prototype.propertyIsEnumerable.call(e,r)&&t.matchKey(r,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(cL(nL(t)))}var VF=class{name;type;constructor(e,t){this.name=e,this.type=t}};function HF(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(HF);default:return!1}}function UF(e){let t=MI(e);switch(t._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return t.types.every(UF);default:return!1}}function WF(e){return HF(e)&&UF(e)}var GF=class{parameter;type;constructor(e,t){if(!WF(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,ZI(t)&&!aL(t))throw Error("Cannot use `Schema.optionalKey` with index signatures, use `Schema.optional` instead.")}},KF=class extends _F{_tag=`Objects`;propertySignatures;indexSignatures;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.propertySignatures=e,this.indexSignatures=t,this.encodingChecks=o}getParser(e,t=e){let n=this,r=n.propertySignatures.length,i=n.indexSignatures.length;if(!r&&!i)return sL(n,Py);let a,o,s=()=>(a||(a=n.propertySignatures.map(e=>({parser:t(e.type),name:e.name,type:e.type})),o=i?n.indexSignatures.map(n=>({is:n,parserKey:e(cL(n.parameter)),parserValue:t(n.type)})):void 0),a),c=()=>{let e=new Set(n.propertySignatures.map(e=>typeof e.name==`number`?globalThis.String(e.name):e.name)),t=(t,i,a,o,s)=>{if(s._tag===`Failure`)return RF(t,n,i,s)??PO;let c=s===hP?o:s[Gb];if(a!==fP&&c!==fP){if(r&&(e.has(i)||e.has(typeof a==`number`?globalThis.String(a):a)))return PO;zb(t.out,a,c)}return PO},c=(e,r,i,a)=>{if(!a){let t=i.parserKey(r,e.options);if(!uE(t))return Nk(Ik(t),t=>c(e,r,i,t));a=t}if(a._tag===`Failure`)return RF(e,n,r,a)??PO;let o=a===hP?r:a[Gb],s=e.input[r],l=i.parserValue(s,e.options);return uE(l)?t(e,r,o,s,l):Nk(Ik(l),n=>t(e,r,o,s,n))},l=(e,n,r)=>{let i=e.input[n],a=r.parserValue(i,e.options);return uE(a)?t(e,n,n,i,a):Nk(Ik(a),r=>t(e,n,n,i,r))},u=i?qD()({onItem:(e,[t,n])=>n.is.parameter===OF?l(e,t,n):c(e,t,n),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0;return xA(function*(t,d){if(t===fP)return fP;if(typeof t!=`object`||!t||Array.isArray(t))return yield*Ek(new TP(n,t,d));s();let f=t,p={},m={ast:n,input:f,out:p,issues:void 0,options:d},h=d.errors===`all`,g=d.onExcessProperty===`error`,_=d.concurrency===void 0?1:WD(d.concurrency),v=i&&g?n.indexSignatures.map(e=>BF(f,e.parameter,d)):void 0;if(g){let r=v?new Set(e):e;if(v)for(let e of v)for(let t of e)r.add(t);let i=Reflect.ownKeys(f);for(let e=0;e<i.length;e++){let a=i[e];if(!r.has(a)&&Object.prototype.propertyIsEnumerable.call(f,a)){let e=new CP(n,f[a],d),r=new xP([a],e);if(h){m.issues?m.issues.push(r):m.issues=[r];continue}return yield*Ek(new wP(n,[r],t,d))}}}if(r){let e=_===1?YF(m,a):XF(m,a,{concurrency:_});e&&(yield*e)}if(i&&_===1)for(let e=0;e<i;e++){let t=o[e],n=t.is.parameter===OF?l:c,r=v?.[e]??(t.is.parameter===OF?Object.keys(f):BF(f,t.is.parameter,d));for(let e=0;e<r.length;e++){let i=n(m,r[e],t);if(!uE(i))yield*i;else if(i._tag===`Failure`)return yield*i}}else if(u){let e=TC();for(let t=0;t<i;t++){let n=o[t],r=v?.[t]??(n.is.parameter===OF?Object.keys(f):BF(f,n.is.parameter,d));for(let t=0;t<r.length;t++)e.push([r[t],n])}let t=u(m,e,{concurrency:_});t&&(yield*t)}return m.issues?yield*Ek(new wP(n,m.issues,t,d)):p})};if(i)return c();let l,u=(e,t,n)=>{let r=a[t];return Nk(Ik(n),n=>{let i=qF(e,r,n);if(i)return i;let o=()=>pP(e.out),s=YF(e,a.slice(t+1));return s?bA(s,o):o()})};return(e,t)=>{if(e===fP)return mP;if(t.errors===`all`||t.onExcessProperty!==void 0||t.concurrency!==void 0&&WD(t.concurrency)!==1)return(l??=c())(e,t);if(typeof e!=`object`||!e||Array.isArray(e))return Ek(new TP(n,e,t));let r=s(),i=e,a={},o={ast:n,input:i,out:a,issues:void 0,options:t};try{for(let e=0;e<r.length;e++){let n=r[e],s=n.name,c=cI(i,s),l=c?i[s]:fP,d=n.parser(l,t);if(!uE(d))return u(o,e,d);if(d===hP){c&&zb(a,s,l);continue}let f=qF(o,n,d);if(f)return f}}catch(e){return kk(e)}return pP(a)}}_rebuild(e,t,n,r){let i=HI(this.propertySignatures,t=>{let n=e(t.type);return n===t.type?t:new VF(t.name,n)}),a=HI(this.indexSignatures,n=>{let r=t(n.parameter),i=e(n.type);return r===n.parameter&&i===n.type?n:new GF(r,i)});return i===this.propertySignatures&&a===this.indexSignatures&&n===this.checks&&r===this.encodingChecks?this:new KF(i,a,this.annotations,n,void 0,this.context,r)}flip(e){return this._rebuild(e,e,this.encodingChecks,this.checks)}recur(e,t=e){return this._rebuild(e,t,this.checks,this.encodingChecks)}getExpected(){return this.propertySignatures.length===0&&this.indexSignatures.length===0?`object | array`:`object`}};function qF(e,t,n){if(n._tag===`Failure`)return RF(e,e.ast,t.name,n);if(n===hP)return;let r=n[Gb];if(r!==fP){zb(e.out,t.name,r);return}if(delete e.out[t.name],!ZI(t.type)){let n=new xP([t.name],new SP(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}return NO(new wP(e.ast,[n],e.input,e.options))}}var JF={onItem(e,t){if(!cI(e.input,t.name))return t.parser(fP,e.options);let n=e.input[t.name];return zb(e.out,t.name,n),t.parser(n,e.options)},step:qF},YF=GD()(JF),XF=qD()(JF);function ZF(e,t){return e?t?[...e,...t]:e:t}function QF(e,t,n){return new KF(Reflect.ownKeys(e).map(t=>new VF(t,e[t].ast)),[],n,t)}function $F(e){return e.ast}function eI(e,t=void 0){return new NF(!1,e.map(e=>e.ast),[],void 0,t)}function tI(e,t,n){return new uI(e.map($F),t,void 0,n)}var nI=by(e=>{for(;;){if(fF(e))return TF;let t=e.encoding;if(!t)return e.recur?.(nI,fy)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==fy))return TF;e=t[t.length-1].to}});function rI(e){switch(e._tag){case`Null`:return[`null`];case`Undefined`:return[`undefined`];case`String`:case`TemplateLiteral`:return[`string`];case`Number`:return[`number`];case`Boolean`:return[`boolean`];case`Symbol`:case`UniqueSymbol`:return[`symbol`];case`BigInt`:return[`bigint`];case`Arrays`:return[`array`];case`ObjectKeyword`:return[`object`,`array`,`function`];case`Objects`:return e.propertySignatures.length||e.indexSignatures.length?[`object`]:[`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`];case`Enum`:return Array.from(new Set(e.enums.map(([,e])=>typeof e)));case`Literal`:return[typeof e.literal];case`Union`:return Array.from(new Set(e.types.flatMap(rI)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function iI(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[lP];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!ZI(t)){if(sF(t))return[{key:e.name,literal:t.literal}];if(cF(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!ZI(e)){if(sF(e))return[{key:t,literal:e.literal}];if(cF(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>iI(nI(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return iI(e.thunk())}}var aI=new WeakMap,oI=Object.freeze([]),sI=e=>e===null?`null`:Array.isArray(e)?`array`:typeof e,cI=(e,t)=>t===`__proto__`?Object.hasOwn(e,t):t in e;function lI(e){let t=aI.get(e);if(t)return t;let n,r=0,i,a,o=!0,s=[];for(let t=0;t<e.length;t++){let c=e[t],l=nI(c);if(oF(l))continue;if(sF(l)||cF(l)){a??=new Map;let e=sF(l)?l.literal:l.symbol;s[t]=e;let n=a.get(e);n||a.set(e,n=[]),n.push(t)}else o=!1;let u=iI(l);if(u.length){n??=new Map,r++;for(let{key:e,literal:r}of u){let i=n.get(e);i||n.set(e,i=[new Map,new Set]),i[1].add(t);let a=i[0].get(r);a||i[0].set(r,a=new Set),a.add(t)}}else{i??={};let e=rI(l);for(let n of e)(i[n]??=[]).push(t)}}let c={},l=e=>c[e]??=Object.freeze(i?.[e]??oI);if(o&&a)a.forEach(Object.freeze),t=e=>a.get(e)??oI;else if(n?.size===1&&!i){let[r,[i]]=n.entries().next().value,a=new Map;for(let[e,t]of i)a.set(e,Object.freeze(Array.from(t)));let o=Object.freeze(e.map((e,t)=>t));t=(e,t)=>{if(Ry(e)){let n=cI(e,r)?e[r]:void 0;if(n!==void 0)return a.get(n)??oI;if(t)return o}return oI}}else if(n){let e;for(let t of n)(!e||t[1][0].size>e[1][0].size)&&t[1][1].size===r&&(e=t);t=(t,r)=>{let a=sI(t);if(!Ry(t))return l(a);let o=new Set(i?.[a]),s;if(e){let[n,[i]]=e,c=cI(t,n),u=c?t[n]:void 0;if(c&&(!r||u!==void 0)){let e=i.get(u);if(!e)return l(a);for(let t of e)o.add(t);s=n}}if(s===void 0)for(let[e,[i,a]]of n){let n=cI(t,e),s=n?t[e]:void 0;if(n&&(!r||s!==void 0)){let e=i.get(s);if(e)for(let t of e)o.add(t)}else if(r)for(let e of a)o.add(e)}for(let[e,[i,a]]of n){if(e===s)continue;let n=cI(t,e),c=n?t[e]:void 0;if(n&&(!r||c!==void 0)){let e=i.get(c);for(let t of o)a.has(t)&&!e?.has(t)&&o.delete(t)}}return Array.from(o).sort((e,t)=>e-t)}}else t=e=>{let t=l(sI(e));return a?t.filter(t=>s[t]===void 0||s[t]===e):t};return aI.set(e,t),t}var uI=class extends _F{_tag=`Union`;types;options;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.options=t,this.encodingChecks=o}getParser(e,t){let n=this,r=t!==void 0,i=[],a=t=>i[t]??=e(n.types[t]),o;return(e,t)=>{if(e===fP)return mP;let i=(o??=lI(n.types))(e,r);if(i.length===0)return Ek(new kP(n,[],e,t));if(i.length===1){let r=a(i[0])(e,t);return r._tag===`Success`?r:uE(r)?dI(n,r.cause,e,t):fI(n,r,e,t)}return pI(n,a,i,e,t)}}_rebuild(e,t,n){let r=HI(this.types,e);return r===this.types&&t===this.checks&&n===this.encodingChecks?this:new uI(r,this.options,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}matchPart(e,t){for(let n of this.types){let r=n.matchPart(e,t);if(r!==void 0)return r}}getExpected(e){let t=this.annotations?.expected;if(typeof t==`string`)return t;if(this.types.length===0)return`never`;let n=this.types.map(t=>{let n=nL(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(sF);if(t.length>0)return`${_I(n.isMutable)}[ ${t.map(t=>e(t)+vI(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>sF(e.type));if(t.length>0)return`{ ${t.map(t=>`${_I(t.type.context?.isMutable)}${kb(t.name)}${vI(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function dI(e,t,n,r){let i=LP(t);return i?NO(new kP(e,[i],n,r)):MO(t)}function fI(e,t,n,r){return Vk(t,t=>dI(e,t,n,r))}function pI(e,t,n,r,i){let a={ast:e,parser:t,input:r,out:void 0,successes:e.options?.mode===`oneOf`?[]:void 0,issues:void 0,options:i},o=hI(a,n);return o?mI(o,a):a.out?a.out:Ek(new kP(e,a.issues??[],r,i))}function mI(e,t){return bA(e,e=>t.out===hP?H(t.input):t.out?t.out:Ek(new kP(t.ast,t.issues??[],t.input,t.options)))}var hI=GD()({onItem(e,t){return e.parser(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=LP(n.cause);if(t===void 0)return n;e.issues?e.issues.push(t):e.issues=[t]}else{if(e.out&&e.successes)return e.successes.push(e.ast.types[t]),NO(new Gne(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(e.ast.types[t]);else return PO}}}),gI=new uI([new EF(`Infinity`),new EF(`-Infinity`),new EF(`NaN`)]);function _I(e){return e?``:`readonly `}function vI(e){return e?`?`:``}var yI=class extends _F{_tag=`Suspend`;thunk;constructor(e,t,n,r,i){if(n)throw Error(`Cannot add checks to Suspend`);super(t,void 0,r,i);let a;this.thunk=()=>a??=e()}getParser(e){let t;return(n,r)=>(t??=e(this.thunk()))(n,r)}recur(e){return new yI(()=>e(this.thunk()),this.annotations,void 0,void 0,this.context)}getExpected(e){return e(this.thunk())}},bI=class extends dy{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(e){return new bI(this.run,{...this.annotations,...e},this.aborted)}abort(){return new bI(this.run,this.annotations,!0)}and(e,t){return new xI([this,e],t)}},xI=class extends dy{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(e){return new xI(this.checks,{...this.annotations,...e})}and(e,t){return new xI([this,e],t)}};function SI(e,t,n=!1){return new bI((t,n,r)=>qne(n,e(t,n,r),t,r),t,n)}function CI(e){return SI(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,representation:{id:`effect/schema/isFinite`,payload:null},toJsonSchema:()=>({type:`number`}),toCode:()=>({runtime:`Schema.isFinite()`}),arbitraryConstraint:{number:`finite`},...e})}var wI=FI(jF,[CI()]),TI=new pF(new uI([wI,gI]),new YP(qP(),HP(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function EI(e,t){let n=new globalThis.RegExp(e),r={source:n.source,flags:n.flags};return SI(e=>(n.lastIndex=0,n.test(e)),{expected:`a string matching the RegExp ${r.source}`,representation:{id:`effect/schema/isPattern`,payload:r},toJsonSchema:()=>[{},!0],arbitraryConstraint:{patterns:[r]},...t})}var DI=new WeakMap;function OI(e,t){let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,t);return Reflect.ownKeys(t).every(e=>e===`context`||e===`encoding`)&&DI.set(n,kI(e)),n}function kI(e){let t=DI.get(e);if(t!==void 0)return t;if(e.encoding===void 0)return e;let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,{encoding:void 0});return DI.set(e,n),n}function AI(e,t){return e.encoding===t?e:OI(e,{encoding:t})}function jI(e,t){if(e.context===t)return e;let n=kI(e);return n.context===t&&n.encoding===e.encoding?n:OI(e,{context:t})}function MI(e){return e.encoding?MI(e.encoding[e.encoding.length-1].to):e}function NI(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return PI(e,xC(e.checks.slice(0,-1),n.annotate(t)))}return OI(e,{annotations:{...e.annotations,...t}})}function PI(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:OI(e,{checks:t})}function FI(e,t){return PI(e,ZF(e.checks,t))}function II(e,t){let n=t(e.to);return n===e.to?e:new pF(n,e.transformation)}function LI(e,t){let n=e,r=n[n.length-1],i=II(r,t);return i===r?e:xC(e.slice(0,e.length-1),i)}function RI(e){return t=>t.encoding?AI(t,LI(t.encoding,e)):t}function zI(e,t){return RI(e=>jI(e,t))(e)}function BI(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:AI(r,LI(r.encoding,n))}return e(r)}return by(n)}function VI(e,t,n){let r=new pF(e,t);return AI(n,n.encoding?[...n.encoding,r]:[r])}function HI(e,t){let n;for(let r=0;r<e.length;r++){let i=e[r],a=t(i);if(n)n[r]=a;else if(a!==i){n=Array(e.length);for(let t=0;t<r;t++)n[t]=e[t];n[r]=a}}return n??e}function UI(e,t){return jI(e,e.context?new hF(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new hF(!1,!1,void 0,t))}var WI=by(e=>GI(jI(e,e.context?e.context.isOptional===!1?new hF(!0,e.context.isMutable,e.context.constructorDefault,e.context.annotations):e.context:new hF(!0,!1)))),GI=RI(WI),KI=yy(e=>WI(new uI([e,SF])));function qI(e,t){return jI(e,e.context?new hF(e.context.isOptional,e.context.isMutable,t,e.context.annotations):new hF(!1,!1,t))}function JI(e,t,n){return VI(e,n,t)}function YI(e){let t=[],n=[];function r(e){switch(e._tag){case`Literal`:Ay(e.literal)&&!t.includes(e.literal)&&t.push(e.literal);return;case`UniqueSymbol`:t.includes(e.symbol)||t.push(e.symbol);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)r(e.types[t]);return;default:n.push(e)}}return r(e),{literals:t,parameters:n}}function XI(e,t){let{literals:n,parameters:r}=YI(e);return new KF(n.map(e=>new VF(e,t)),r.map(e=>new GF(e,t)))}function ZI(e){return e.context?.isOptional??!1}function QI(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(QI)}function $I(e){function t(e){return QI(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return CC(n)?n:void 0}function eL(e){let t=!0;function n(e){return t=t&&!e.encoding&&!fF(e),t&&`recur`in e&&e.recur(n),e}return`recur`in e&&e.recur(n),t}var tL=by(e=>{let t=kI(e);if(t!==e){let n=tL(t);return n===t&&e.encoding===void 0?e:jI(n,e.context)}let n=`recur`in e?e.recur(tL):e;if(`encodingChecks`in n&&n.encodingChecks){let t=eL(e)?n.encodingChecks:lF(n)||uF(n)||iF(n)&&n.typeParameters.length>0?$I(n.encodingChecks):void 0;return OI(n,{encodingChecks:void 0,checks:ZF(n.checks,t)})}return n}),nL=by(e=>tL(iL(e)));function rL(e,t){let n=t,r=n.length,i=n[r-1],a=[new pF(iL(AI(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new pF(iL(n[e-1].to),n[e].transformation.flip()));let o=iL(i.to);return o.encoding?AI(o,[...o.encoding,...a]):AI(o,a)}var iL=yy(e=>{if(e.encoding)return rL(e,e.encoding);let t=kI(e);if(t!==e){let n=iL(t);return n===t?e:jI(n,e.context)}return`flip`in e?e.flip(iL):`recur`in e?e.recur(iL):e});function aL(e){switch(e._tag){case`Undefined`:return!0;case`Union`:return e.types.some(aL);default:return!1}}function oL(e,t){let n=t===0?hP:pP(t);return(r,i)=>r===fP?mP:r===t?n:Ek(new TP(e,r,i))}function sL(e,t){return(n,r)=>n===fP?mP:t(n)?hP:Ek(new TP(e,n,r))}var cL=BI(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(cL)}}),lL=BI(e=>{switch(e._tag){default:return e;case`Symbol`:case`UniqueSymbol`:return e.toCodecStringTree();case`Union`:return e.recur(lL)}}),uL=new globalThis.RegExp(`^${zF}$`),dL=new globalThis.RegExp(`^(?:${zF}|Infinity|-Infinity|NaN)$`);function fL(e){return EI(uL,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:uL.source}),...e})}var pL=FI(OF,[fL()]),mL=new pF(pL,eF),hL=new pF(new uI([pL,gI]),eF);function gL(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=gL(o.checks,t,n,r,i),n&&(i.errors!==`all`||n[n.length-1].filter.aborted))return n}else{let e=o.run(t,r,i);if(e){let r=new Une(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function _L(e){if(!iF(e))return;let t=e.annotations?.[uP];return jy(t)?t(e.typeParameters):void 0}var vL=sP;function yL(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&globalThis.Number.isFinite(e)}function bL(e){return e===void 0||typeof e==`string`}function xL(e,t){let n=new WeakMap,r=[];outer:for(;;){if(typeof e!=`object`||!e){if(!t(e))return!1}else{let t=e,i=n.get(t);if(i===!1)return!1;if(i===void 0){let e=Array.isArray(t);if(!e){let e=Object.getPrototypeOf(t);if(e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null)return!1}n.set(t,!1),r.push({value:t,keys:e?t.length:Object.keys(t),index:0})}}for(;r.length>0;){let t=r[r.length-1],i=t.keys;if(typeof i==`number`){if(t.index<i){e=t.value[t.index++];continue outer}}else if(t.index<i.length){e=t.value[i[t.index++]];continue outer}n.set(t.value,!0),r.pop()}return!0}}function SL(e){return xL(e,yL)}var CL=new vF([],()=>(e,t,n)=>SL(e)?hP:Ek(new TP(t,e,n)),{representation:{id:`effect/schema/Json`,payload:null},expected:`JSON value`,toCodecJson:()=>void 0,toCodecStringTree:()=>DL}),wL=new pF(CL,$P()),TL=new pF(new uI([new NF(!1,[],[CL]),new KF([],[new GF(OF,CL)])]),$P());function EL(e){return xL(e,bL)}var DL=new pF(new vF([],()=>(e,t,n)=>EL(e)?hP:Ek(new TP(t,e,n)),{expected:`StringTree`,toCodecStringTree:()=>void 0}),$P()),OL=(e,t,n)=>e===hP?n(t):bA(e,n);function kL(e){if(e._tag===`Middleware`)return(t,n,r)=>AL(t===hP?e.decode(pP(gP(n)),r):e.decode(_A(t,gP),r));let t=e.decode;switch(t._tag){case`Passthrough`:return(e,t)=>e===hP?pP(t):e;case`Transform`:{let e=e=>e===fP?mP:pP(t.transform(e));return(t,n)=>OL(t,n,e)}case`TransformOptional`:{let e=e=>_P(t.transform(gP(e)));return(t,n)=>OL(t,n,e)}case`TransformEffect`:return(e,n,r)=>OL(e,n,e=>e===fP?mP:t.transform(e,r));case`TransformOptionalEffect`:return(e,n,r)=>OL(e,n,e=>AL(t.transform(gP(e),r)))}}var AL=e=>bA(e,_P),jL=(e,t,n,r)=>Vk(r,r=>Ok(()=>EO(r,r=>new Wne(e,r,t,n))));function ML(e,t){let n=kL(e.link.transformation),r;return(i,a)=>{if(i===fP)return mP;if(e.isConstructed(i))return hP;let o=(r??=t(e.link.to))(i,a);return n(o,i,a)}}function NL(e,t){let n=e.context.constructorDefault;return(r,i)=>{if(r!==fP&&r!==void 0)return t(r,i);let a=n;if(uE(a)&&a._tag===`Success`){let e=t(a[Gb],i);return e===hP?a:e}return bA(jL(e,r,i,a),e=>{let n=t(e,i);return n===hP?pP(e):n})}}function PL(e,t){let n=t(e);return e.context?.constructorDefault===void 0?n:NL(e,n)}function FL(e,t,n,r,i){if(e._tag===`Declaration`)for(let n of e.typeParameters)t(n);let a=n?_L(e):void 0,o=a?ML(a,t):r??e.getParser(t,n),s=e.checks,c=e.encoding,l=c?.map(e=>kL(e.transformation)),u=e.encodingChecks;if(!c&&!s&&!u)return o;let d,f=(t,n)=>{let r=o(t,n);if(u&&!n.disableChecks){if(uE(r)){if(r._tag===`Success`){let i=r===hP?t:r[Gb];if(t!==fP&&i!==fP){let i=gL(u,t,void 0,e,n);i&&(r=Ek(new wP(e,i,t,n)))}}}else r=Nk(r,r=>{if(t!==fP&&r!==fP){let r=gL(u,t,void 0,e,n);if(r)return Ek(new wP(e,r,t,n))}return H(r)})}if(s&&!n.disableChecks){if(uE(r)){if(r._tag===`Success`){let i=r===hP?t:r[Gb];if(i===fP)return r;let a=gL(s,i,void 0,e,n);a&&(r=Ek(new wP(e,a,i,n)))}}else r=Nk(r,t=>{if(t!==fP){let r=gL(s,t,void 0,e,n);if(r)return Ek(new wP(e,r,t,n))}return H(t)})}return r},p=i===void 0?f:i(f);return c?(n,r)=>{let i=d??=c.map(e=>t(e.to)),a=n,o=i[i.length-1](n,r);for(let e=c.length-1;e>=0;e--)if(o=l[e](o,a,r),e!==0){let t=i[e-1];o._tag===`Success`?(a=o[Gb],o=t(a,r)):o=bA(o,e=>{let n=t(e,r);return n===hP?pP(e):n})}if(o._tag===`Success`){let e=o[Gb],t=p(e,r);return t===hP?o:t}return o=jL(e,n,r,o),bA(o,e=>{let t=p(e,r);return t===hP?pP(e):t})}:p}var IL=Symbol(),LL=new WeakMap,RL=e=>HL(e).parser,zL=e=>HL(e).makeEffect,BL=e=>PL(e,zL),VL=class{ast;constructor(e){this.ast=e}get decodeEffect(){return this.cachedDecodeEffect??=FL(this.ast,RL)}get parser(){return this.decodeEffect}get makeEffect(){return this.cachedMakeEffect??=FL(this.ast,zL,BL)}};function HL(e){let t=LL.get(e);if(t!==void 0)return t;let n=new VL(e);return LL.set(e,n),n}function UL(e){let t=e.ast,n;return(e,r)=>(n??=iR(dR,tL(t)))(e,r?.disableChecks?r?.parseOptions?{...r.parseOptions,disableChecks:!0}:{disableChecks:!0}:r?.parseOptions)}function WL(e){let t=UL(e);return(e,n)=>{let r=mA(t(e,n));return FO(r)?CS(r.value):(RP(r.cause,`Option adapter can only return none for schema issues`),SS())}}function GL(e){return lR(tL(e.ast))}function KL(e){return JL(e.ast)}function qL(e){{let t=aR(nR(e));return e=>{let n=t(e,mF);return FO(n)?!0:(RP(n.cause,`Type guard adapter can only return false for schema issues`),!1)}}}function JL(e){let t=tL(e),n=e=>(n=qL(t),n(e));return e=>n(e)}function YL(e,t){let n=nR(e.ast);return t===void 0?n:(e,r)=>n(e,eR(t,r))}function XL(e,t){return oR(YL(e,t))}var ZL=XL;function QL(e,t){return sR(YL(e,t))}function $L(e,t){let n=nR(iL(e.ast));return t===void 0?n:(e,r)=>n(e,eR(t,r))}var eR=(e,t)=>t?{...e,...t}:e,tR=e=>e===fP?Ek(new EP):H(e);function nR(e){return iR(uR,e)}function rR(e,t){return e===hP?H(t):uE(e)?e[Gb]===fP?tR(fP):e:bA(e,tR)}function iR(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??mF);return a===hP?H(r):uE(a)?a[Gb]===fP?tR(fP):a:bA(a,tR)}}function aR(e){return(t,n)=>mA(e(t,n))}function oR(e){let t=aR(e);return(e,n)=>{let r=t(e,n);return FO(r)?CS(r.value):(RP(r.cause,`Option adapter can only return none for schema issues`),SS())}}function sR(e){let t=aR(e);return(e,n)=>{let r=t(e,n);return FO(r)?dC(r.value):fC(RP(r.cause,`Result adapter can only return schema issues`))}}function cR(e,t){let n=mA(e);if(FO(n))return n.value;let r=RP(n.cause,t);throw Error(`Schema validation failed`,{cause:r})}function lR(e){let t,n;return(r,i)=>{t??=HL(e);let a=i?.disableChecks?i.parseOptions?{...i.parseOptions,disableChecks:!0}:{disableChecks:!0}:i?.parseOptions??mF,o=t.make;if(o!==void 0&&r!==fP){let e;try{e=o(r,a)}catch(e){throw RP(Nte(e),`Constructor adapter can only throw schema issues`),e}if(e!==IL&&e!==fP)return e}return cR(rR((n??=t.makeEffect)(r,a),r),`Constructor adapter can only throw schema issues`)}}var uR=e=>HL(e).parser,dR=e=>HL(e).makeEffect,fR=`~effect/Schema/Schema`,pR=Symbol(),mR={[fR]:fR,get make(){let e=GL(this);return Object.defineProperty(this,"make",{value:e,enumerable:!0}),e},get makeEffect(){let e=UL(this);return Object.defineProperty(this,"makeEffect",{value:e,enumerable:!0}),e},get makeOption(){let e=WL(this);return Object.defineProperty(this,"makeOption",{value:e,enumerable:!0}),e},pipe(){return ly(this,arguments)},annotate(e){return this.rebuild(NI(this.ast,e))},annotateKey(e){return this.rebuild(UI(this.ast,e))},check(...e){return this.rebuild(FI(this.ast,e))},rebuild(e){return hR(e,this[pR])}};function hR(e,t){function n(){}let r=Object.setPrototypeOf(n,mR);return t&&(Object.hasOwn(t,`name`)||Object.hasOwn(t,`length`)||Object.hasOwn(t,`__proto__`))?Object.defineProperties(r,Object.getOwnPropertyDescriptors({...t})):Object.assign(r,t),r[pR]=t,r.ast=e,r}function gR(e){return hR(_R(e.ast),{schema:e})}var _R=BI(e=>{let t=SR(e,_R),n=e.context;return t===e||n===void 0?t:zI(t,vR(n))});function vR(e){return e.constructorDefault===void 0?e:new hF(e.isOptional,e.isMutable,void 0,e.annotations)}function yR(e){if(e.propertySignatures.some(e=>typeof e.name!=`string`))throw new globalThis.Error(`Objects property names must be strings`,{cause:e})}function bR(e){return t=>{let n=[...t].sort((t,n)=>e(nL(t))-e(nL(n)));return n.some((e,n)=>e!==t[n])?n:t}}var xR=bR(e=>{switch(e._tag){case`BigInt`:case`Symbol`:case`UniqueSymbol`:return 0;default:return 1}});function SR(e,t){switch(e._tag){case`Declaration`:{let n=e.annotations?.toCodecJson??e.annotations?.toCodec;if(!jy(n))return AI(e,[wL]);let r=n(e.typeParameters.map(e=>hR(nL(e))));return r===void 0?e:AI(e,[II(r,t)])}case`Unknown`:return AI(e,[wL]);case`ObjectKeyword`:return AI(e,[TL]);case`Undefined`:case`Void`:case`Literal`:case`Number`:return e.toCodecJson();case`UniqueSymbol`:case`Symbol`:case`BigInt`:return e.toCodecStringTree();case`Objects`:return yR(e),e.recur(t,lL);case`Union`:{let n=xR(e.types);return n===e.types?e.recur(t):new uI(n,e.options,e.annotations,e.checks,e.encoding,e.context,e.encodingChecks).recur(t)}case`Arrays`:case`Suspend`:return e.recur(t)}return e}function CR(e){return hR(kR(e.ast),{schema:e})}var wR=bR(e=>{switch(e._tag){case`Null`:case`Boolean`:case`Number`:case`BigInt`:case`Symbol`:case`UniqueSymbol`:return 0;default:return 1}});function TR(e,t,n){switch(e._tag){case`Declaration`:{let r=e.typeParameters.map(e=>hR(t(nL(e)))),i=e.annotations?.toCodecStringTree;if(jy(i)){let n=i(r);return n===void 0?e:AI(e,[II(n,t)])}let a=e.annotations?.toCodecJson,o=jy(a)?a(r):void 0,s=o===void 0?e.annotations?.toCodec:void 0,c=o??(jy(s)?s(r):void 0);return c===void 0?n(e):AI(e,[II(c,t)])}case`Null`:return AI(e,[ER]);case`Boolean`:return AI(e,[DR]);case`Unknown`:case`ObjectKeyword`:return AI(e,[DL]);case`Enum`:case`Number`:case`Literal`:case`UniqueSymbol`:case`Symbol`:case`BigInt`:return e.toCodecStringTree();case`Objects`:return yR(e),e.recur(t,lL);case`Union`:{let n=wR(e.types);return n===e.types?e.recur(t):new uI(n,e.options,e.annotations,e.checks,e.encoding,e.context,e.encodingChecks).recur(t)}case`Arrays`:case`Suspend`:return e.recur(t)}return e}var ER=new pF(new EF(`null`),new YP(HP(()=>null),HP(()=>`null`))),DR=new pF(new uI([new EF(`true`),new EF(`false`)]),new YP(HP(e=>e===`true`),KP())),OR=new YP(HP(e=>typeof e==`string`?[e]:e),VP()),kR=BI(e=>{let t=TR(e,kR,e=>{throw new globalThis.Error(`Missing structural codec for StringTree`,{cause:e})});return t!==e&&e.context!==void 0?zI(t,vR(e.context)):t},{stopAt:e=>e.transformation===OR}),AR=e=>e,jR=`~effect/Schema/SchemaError`;function MR(e){return zy(e,`~effect/Schema/SchemaError`)&&e[`~effect/Schema/SchemaError`]===`~effect/Schema/SchemaError`}var NR=fR;function PR(){return(e,t,n)=>ez(new vF(e.map($F),e=>t(e.map(e=>ez(e))),n))}function FR(e,t){return PR()([],()=>(t,n,r)=>e(t)?H(t):Ek(new TP(n,t,r)),t)}var IR=class extends gw(`SchemaError`){[jR]=jR;constructor(e){let t=Fb();Ib(0);try{super({issue:e})}finally{Ib(t)}}get message(){return Zne(this.issue)}toString(){return`SchemaError(${this.message})`}};function LR(e){return MR(e)}function RR(e){return uE(e)?zR(e):Vk(e,e=>Ok(()=>EO(e,e=>new IR(e))))}function zR(e){return FO(e)?e:MO(EO(e.cause,e=>new IR(e)))}function BR(e,t){let n;for(let r of e.reasons){if(!xO(r)||!LR(r.error))throw new globalThis.Error(t,{cause:e});n??=r.error}if(n===void 0)throw new globalThis.Error(t,{cause:e});return n}function VR(e){return fA(e).then(e=>{if(FO(e))return e.value;throw BR(e.cause,`Promise adapter can only reject schema errors`)})}function HR(e){let t=mA(e);if(FO(t))return t.value;throw BR(t.cause,`Sync adapter can only throw schema errors`)}var UR=KL;function WR(e,t){let n=YL(e,t);return(e,t)=>RR(n(e,t))}var GR=WR,KR=ZL;function qR(e,t){let n=QL(e,t);return(e,t)=>Qee(n(e,t),e=>new IR(e))}function JR(e,t){let n=WR(e,t);return(e,t)=>VR(n(e,t))}function YR(e,t){let n=WR(e,t);return(e,t)=>HR(n(e,t))}var XR=YR;function ZR(e,t){let n=$L(e,t);return(e,t)=>RR(n(e,t))}function QR(e,t){let n=ZR(e,t);return(e,t)=>HR(n(e,t))}var $R=QR,ez=hR;function tz(e){return zy(e,NR)&&e[NR]===NR}var nz=AR(e=>ez(WI(e.ast),{schema:e})),U=AR(e=>{let t=Sz(e);return ez(KI(e.ast),{schema:t})}),rz=AR(e=>ez(tL(e.ast),{schema:e})),iz=AR(e=>ez(nL(e.ast),{schema:e}));function az(e){let t=ez(new EF(e),{literal:e,transform(n){return t.pipe(Ez(az(n),{decode:HP(()=>n),encode:HP(()=>e)}))}});return t}var oz=ez(wF),sz=ez(TF),cz=ez(yF),lz=ez(SF),W=ez(OF),G=ez(jF),uz=ez(MF),dz=ez(CF);function fz(e,t){return ez(e,{fields:t,mapFields(e,t){let n=e(this.fields);return fz(QF(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function K(e){return fz(QF(e,void 0),e)}function pz(e,t){return ez(XI(e.ast,t.ast),{key:e,value:t})}function mz(e,t){return ez(e,{elements:t,mapElements(e,t){let n=e(this.elements);return mz(eI(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function hz(e){return mz(eI(e),e)}var q=AR(e=>ez(new NF(!1,[],[e.ast]),{value:e}));function gz(e,t,n){return t!==void 0&&n!==void 0?e.check(oB(t,n)):t===void 0?n===void 0?e:e.check(aB(n)):e.check(nB(t))}var _z=AR(e=>ez(new NF(!1,[e.ast],[e.ast]),{value:e}));function vz(e,t){return ez(e,{members:t,mapMembers(e,t){let n=e(this.members);return vz(tI(n,this.ast.options,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function yz(e,t){return vz(tI(e,t,void 0),e)}function bz(e){let t=e.map(az);return ez(tI(t,void 0,void 0),{literals:e,members:t,mapMembers(e){return yz(e(this.members))},pick(e){return bz(e)},transform(e){return yz(t.map((t,n)=>t.transform(e[n])))}})}var xz=AR(e=>yz([e,cz])),Sz=AR(e=>yz([e,lz]));function Cz(e){return ez(new yI(()=>e().ast))}function wz(...e){return t=>t.check(...e)}function Tz(e){return t=>ez(t.ast,{schema:t,identifier:e})}function Ez(e,t){return n=>ez(JI(n.ast,e.ast,t?XP(t):$P()),{from:n,to:e})}function Dz(e,t){return n=>t?Ez(n,t)(e):Ez(n)(e)}function Oz(e){return t=>ez(qI(t.ast,e),{schema:t})}function kz(e){return Vk(e,e=>Ok(()=>EO(e,e=>e.issue)))}function Az(e,t){let n=t?.encodingStrategy===`omit`?WP():VP();return t=>nz(iz(t)).pipe(Ez(t,{decode:GP(kz(e)),encode:n}))}function jz(e,t){return n=>rz(n).pipe(Az(e,t),Dz(nz(n)))}function Mz(e,t){let n=t?.encodingStrategy===`omit`?WP():VP();return t=>U(iz(t)).pipe(Ez(t,{decode:GP(kz(e)),encode:n}))}function Nz(e,t){return n=>rz(n).pipe(Mz(e,t),Dz(U(n)))}function Pz(e){return az(e).pipe(Oz(H(e)))}function Fz(e,t){return K({_tag:Pz(e),...t})}function Iz(e){return t=>{let n={},r=[],i=new Set,a={};return o(t),Object.assign(t,{cases:n,discriminants:r,isAnyOf:t=>n=>t.includes(n[e]),guards:a,match:s,matchOrElse:c});function o(t){let s=t.ast;if(dF(s)&&`members`in t&&globalThis.Array.isArray(t.members)&&t.members.every(tz))return t.members.forEach(o);let c=iI(s);if(c.length>0){let o=c.find(t=>t.key===e)?.literal;if(Ay(o)){let e=typeof o==`number`?globalThis.String(o):o;if(i.has(e))throw new globalThis.Error(`Duplicate discriminant: ${globalThis.String(o)}`);i.add(e),r.push(o),zb(n,o,t),zb(a,o,KL(rz(t)));return}}throw new globalThis.Error(`No literal or unique symbol found`)}function s(){if(arguments.length===1){let t=arguments[0];return function(n){let r=n[e];return(Object.hasOwn(t,r)?t[r]:void 0)(n)}}let t=arguments[0],n=arguments[1],r=t[e];return(Object.hasOwn(n,r)?n[r]:void 0)(t)}function c(){if(arguments.length===2){let t=arguments[0],n=arguments[1];return function(r){let i=r[e];return(Object.hasOwn(t,i)?t[i]??n:n)(r)}}let t=arguments[0],n=arguments[1],r=arguments[2],i=t[e];return(Object.hasOwn(n,i)?n[i]??r:r)(t)}}}function Lz(e){let t={},n=[];for(let r of Object.keys(e)){let i=Fz(r,e[r]);zb(t,r,i),n.push(i)}let r=yz(n),{guards:i,isAnyOf:a,match:o,matchOrElse:s}=Iz(`_tag`)(r);return ez(r.ast,{cases:t,isAnyOf:a,guards:i,match:o,matchOrElse:s})}function Rz(e,t){return FR(t=>t instanceof e,t)}function zz(){return(e,t)=>new pF(e.ast,XP(t))}var Bz=SI,Vz=`^\\S[\\s\\S]*\\S$|^\\S$|^$`;function Hz(e){let t=new globalThis.RegExp(Vz);return Bz(e=>e.trim()===e,{expected:`a string with no leading or trailing whitespace`,representation:{id:`effect/schema/isTrimmed`,payload:null},toJsonSchema:()=>({pattern:t.source}),toCode:()=>({runtime:`Schema.isTrimmed()`}),arbitraryConstraint:{patterns:[{source:Vz,flags:``}]},...e})}function Uz(e,t){let n=e.source,r=e.flags,i=/^[dg]*uy?$/.test(r),a=r===``?`new RegExp(${Ob(n)})`:`new RegExp(${Ob(n)}, ${Ob(r)})`;return EI(e,{toJsonSchema:()=>i?{pattern:r.endsWith(`y`)?`^(?:${n})`:n}:[{},!0],toCode:()=>({runtime:`Schema.isPattern(${a})`}),...t})}var Wz=e=>e?new globalThis.RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$/;function Gz(e,t){let n=Wz(e);return Uz(n,{expected:e?`a UUID v${e}`:`a UUID`,representation:{id:`effect/schema/isUUID`,payload:{version:e??null}},toJsonSchema:()=>({pattern:n.source,format:`uuid`}),toCode:()=>({runtime:e===void 0?`Schema.isUUID()`:`Schema.isUUID(${e})`}),...t})}var Kz=ez(wI);function qz(e){let t=yS(e.order),n=e.formatter??Ob;return(r,i)=>Bz(e=>t(e,r),{expected:`a value greater than ${n(r)}`,arbitraryConstraint:{order:e.order,minimum:r,exclusiveMinimum:!0},...e.annotate?.(r),...i})}function Jz(e){let t=xS(e.order),n=e.formatter??Ob;return(r,i)=>Bz(e=>t(e,r),{expected:`a value greater than or equal to ${n(r)}`,arbitraryConstraint:{order:e.order,minimum:r},...e.annotate?.(r),...i})}function Yz(e){let t=xS(e.order),n=yS(e.order),r=bS(e.order),i=vS(e.order),a=e.formatter??Ob;return(o,s)=>{let c=o.exclusiveMinimum?n:t,l=o.exclusiveMaximum?i:r;return Bz(e=>c(e,o.minimum)&&l(e,o.maximum),{expected:`a value between ${a(o.minimum)}${o.exclusiveMinimum?` (excluded)`:``} and ${a(o.maximum)}${o.exclusiveMaximum?` (excluded)`:``}`,arbitraryConstraint:{order:e.order,minimum:o.minimum,maximum:o.maximum,...o.exclusiveMinimum&&{exclusiveMinimum:!0},...o.exclusiveMaximum&&{exclusiveMaximum:!0}},...e.annotate?.(o),...s})}}function Xz(e){if(!globalThis.Number.isFinite(e))throw new globalThis.RangeError(`Expected a finite number, got ${Ob(e)}`);return e}var Zz=qz({order:gS,annotate:e=>({representation:{id:`effect/schema/isGreaterThan`,payload:{exclusiveMinimum:Xz(e)}},toJsonSchema:()=>({exclusiveMinimum:e}),toCode:()=>({runtime:`Schema.isGreaterThan(${Ob(e)})`})})}),Qz=Jz({order:gS,annotate:e=>({representation:{id:`effect/schema/isGreaterThanOrEqualTo`,payload:{minimum:Xz(e)}},toJsonSchema:()=>({minimum:e}),toCode:()=>({runtime:`Schema.isGreaterThanOrEqualTo(${Ob(e)})`})})}),$z=Yz({order:gS,annotate:e=>{let t=e.exclusiveMinimum?!0:void 0,n=e.exclusiveMaximum?!0:void 0;return{representation:{id:`effect/schema/isBetween`,payload:{minimum:Xz(e.minimum),maximum:Xz(e.maximum),...t&&{exclusiveMinimum:t},...n&&{exclusiveMaximum:n}}},toJsonSchema:()=>({[t?`exclusiveMinimum`:`minimum`]:e.minimum,[n?`exclusiveMaximum`:`maximum`]:e.maximum}),toCode:()=>({runtime:`Schema.isBetween({ minimum: ${Ob(e.minimum)}, maximum: ${Ob(e.maximum)}, exclusiveMinimum: ${Ob(t)}, exclusiveMaximum: ${Ob(n)} })`})}}});function eB(e){return Bz(e=>globalThis.Number.isSafeInteger(e),{expected:`an integer`,representation:{id:`effect/schema/isInt`,payload:null},toJsonSchema:()=>[{type:`integer`},!0],toCode:()=>({runtime:`Schema.isInt()`}),arbitraryConstraint:{number:`integer`},...e})}var tB=G.check(eB());function nB(e,t){return e=sB(e),rB(e,Math.ceil(e/2),t)}function rB(e,t,n){return Bz(t=>t.length>=e,{expected:`a value with a length of at least ${e}`,representation:{id:`effect/schema/isMinLength`,payload:{minLength:e}},toJsonSchema:({type:n})=>n===`string`?e<=1?{minLength:t}:[{minLength:t},!0]:n===`array`?{minItems:e}:n===void 0?[{minLength:t,minItems:e},!0]:[{},!0],toCode:()=>({runtime:`Schema.isMinLength(${e})`}),[cP]:!0,arbitraryConstraint:{minLength:e},...n})}function iB(e){return rB(1,1,e)}function aB(e,t){return e=sB(e),Bz(t=>t.length<=e,{expected:`a value with a length of at most ${e}`,representation:{id:`effect/schema/isMaxLength`,payload:{maxLength:e}},toJsonSchema:({type:t})=>t===`string`?e===0?{maxLength:e}:[{maxLength:e},!0]:t===`array`?{maxItems:e}:t===void 0?[{maxLength:e,maxItems:e},!0]:[{},!0],toCode:()=>({runtime:`Schema.isMaxLength(${e})`}),[cP]:!0,arbitraryConstraint:{maxLength:e},...t})}function oB(e,t,n){return e=sB(e),t=sB(t),Bz(n=>n.length>=e&&n.length<=t,{expected:e===t?`a value with a length of ${e}`:`a value with a length between ${e} and ${t}`,representation:{id:`effect/schema/isBetweenLength`,payload:{minimum:e,maximum:t}},toJsonSchema:({type:n})=>n===`string`?t===0||Math.ceil(e/2)>t?{minLength:Math.ceil(e/2),maxLength:t}:[{minLength:Math.ceil(e/2),maxLength:t},!0]:n===`array`?{minItems:e,maxItems:t}:n===void 0?[{minLength:Math.ceil(e/2),maxLength:t,minItems:e,maxItems:t},!0]:[{},!0],toCode:()=>({runtime:`Schema.isBetweenLength(${e}, ${t})`}),[cP]:!0,arbitraryConstraint:{minLength:e,maxLength:t},...n})}function sB(e){if(!globalThis.Number.isFinite(e))throw new globalThis.RangeError(`Expected a finite number, got ${e}`);return Math.max(0,Math.floor(e))}function cB(e){return Bz(e=>ste(e).length===e.length,{expected:`an array with unique items`,representation:{id:`effect/schema/isUnique`,payload:null},toJsonSchema:()=>({uniqueItems:!0}),toCode:()=>({runtime:`Schema.isUnique()`}),arbitraryConstraint:{uniqueBy:fy},...e})}var lB=e=>+(e?.includeStack===!0)|(e?.excludeCause===!0?2:0),uB=e=>{switch(e){case 0:return;case 1:return{includeStack:!0};case 2:return{excludeCause:!0};case 3:return{includeStack:!0,excludeCause:!0}}},dB=[];function fB(e){let t=lB(e),n=dB[t];if(n!==void 0)return n;let r=jre.pipe(Ez(sz,gre(uB(t))));return dB[t]=r,r}globalThis.RegExp,globalThis.URL;var pB=W.annotate({expected:`a string that will be decoded as a Date`}),mB=FR(e=>e instanceof globalThis.Date&&!globalThis.Number.isNaN(e.getTime()),{representation:{id:`effect/schema/Date`,payload:null},toCode:()=>({runtime:`Schema.Date`,Type:`globalThis.Date`}),expected:`a valid Date`,toCodecJson:()=>zz()(pB,tF)}),hB=pB.pipe(Ez(mB,tF)),bre=W.annotate({expected:`a string that will be decoded as JSON`,contentMediaType:`application/json`});function gB(e,t){return bre.pipe(Ez(e,vre(t)))}var xre=gB(sz);globalThis.File,globalThis.FormData,globalThis.URLSearchParams;var _B=W.annotate({expected:`a string that will be decoded as a number`}).pipe(Ez(G,eF)),Sre=W.check(Hz()),vB=W.annotate({expected:`a string that will be decoded as a trimmed string`}).pipe(Ez(Sre,lre())),Cre=W.annotate({expected:`a base64 encoded string that will be decoded as Uint8Array`,format:`byte`,contentEncoding:`base64`}),wre=Rz(globalThis.Uint8Array,{representation:{id:`effect/schema/Uint8Array`,payload:null},toCode:()=>({runtime:`Schema.Uint8Array`,Type:`globalThis.Uint8Array`}),expected:`Uint8Array`,toCodecJson:()=>zz()(Cre,_re)});function yB(e,t){return ez(PR()([e,t],([e,t])=>(n,r,i)=>{if(!Mte(n))return Ek(new TP(r,n,i));switch(n._tag){case`Fail`:return yA(YL(e)(n.error,i),{onSuccess:wO,onFailure:e=>DP(r,`error`,e,n,i)});case`Die`:return yA(YL(t)(n.defect,i),{onSuccess:TO,onFailure:e=>DP(r,`defect`,e,n,i)});case`Interrupt`:return H(n)}},{representation:{id:`effect/schema/CauseReason`,payload:null},toCode:({typeParameters:e})=>({runtime:`Schema.CauseReason(${e[0].runtime}, ${e[1].runtime})`,Type:`Cause.Failure<${e[0].Type}, ${e[1].Type}>`,importDeclarations:[`import * as Cause from "effect/Cause"`]}),expected:`Cause.Failure`,toCodec:([e,t])=>zz()(yz([K({_tag:az(`Fail`),error:e}),K({_tag:az(`Die`),defect:t}),K({_tag:az(`Interrupt`),fiberId:Sz(Kz)})]),QP({decode:e=>{switch(e._tag){case`Fail`:return wO(e.error);case`Die`:return TO(e.defect);case`Interrupt`:return Fte(e.fiberId)}},encode:e=>{switch(e._tag){case`Fail`:return{_tag:`Fail`,error:e.error};case`Die`:return{_tag:`Die`,defect:e.defect};case`Interrupt`:return{_tag:`Interrupt`,fiberId:e.fiberId}}}}))}).ast,{error:e,defect:t})}function bB(e,t){return ez(PR()([e,t],([e,t])=>{let n=q(yB(e,t));return(e,t,r)=>bO(e)?yA(YL(n)(e.reasons,r),{onSuccess:SO,onFailure:n=>DP(t,`failures`,n,e,r)}):Ek(new TP(t,e,r))},{representation:{id:`effect/schema/Cause`,payload:null},toCode:({typeParameters:e})=>({runtime:`Schema.Cause(${e[0].runtime}, ${e[1].runtime})`,Type:`Cause.Cause<${e[0].Type}, ${e[1].Type}>`,importDeclarations:[`import * as Cause from "effect/Cause"`]}),expected:`Cause`,toCodec:([e,t])=>zz()(q(yB(e,t)),QP({decode:SO,encode:({reasons:e})=>e}))}).ast,{error:e,defect:t})}function xB(e){return zz()(e,QP({decode:NA,encode:yC}))}function SB(e){return ez(PR()([e],([e])=>{let t=q(e);return(e,n,r)=>kA(e)?yA(YL(t)(yC(e),r),{onSuccess:NA,onFailure:t=>DP(n,`values`,t,e,r)}):Ek(new TP(n,e,r))},{representation:{id:`effect/schema/Chunk`,payload:null},toCode:({typeParameters:e})=>({runtime:`Schema.Chunk(${e[0].runtime})`,Type:`Chunk.Chunk<${e[0].Type}>`}),expected:`Chunk`,toCodec:([e])=>xB(q(e)),toCodecArbitrary:({constraint:e,typeParameters:[t]})=>xB(gz(q(t),e?.minLength,e?.maxLength)),toEquivalence:([e])=>TA(e)}).ast,{value:e})}function Tre(e){return ez(PR()([e],([e])=>(t,n,r)=>wS(t)?TS(t)?yk:yA(YL(e)(t.value,r),{onSuccess:CS,onFailure:e=>DP(n,`value`,e,t,r)}):Ek(new TP(n,t,r)),{representation:{id:`effect/schema/Option`,payload:null},toCode:({typeParameters:e})=>({runtime:`Schema.Option(${e[0].runtime})`,Type:`Option.Option<${e[0].Type}>`,importDeclarations:[`import * as Option from "effect/Option"`]}),expected:`Option`,toCodec:([e])=>zz()(yz([K({_tag:az(`Some`),value:e}),K({_tag:az(`None`)})]),QP({decode:e=>e._tag===`None`?SS():CS(e.value),encode:e=>ES(e)?{_tag:`Some`,value:e.value}:{_tag:`None`}}))}).ast,{value:e})}var Ere=FR(qN,{representation:{id:`effect/http/UrlParams`,payload:null},toCode:()=>({runtime:`Schema.UrlParams`,Type:`UrlParams.UrlParams`,importDeclarations:[`import * as UrlParams from "effect/http/UrlParams"`]}),expected:`UrlParams`,toEquivalence:()=>QN,toCodec:()=>zz()(q(hz([W,W])),QP({decode:YN,encode:e=>e.params}))}).pipe(Ez(pz(W,yz([W,_z(W)])),QP({decode:aP,encode:XN}))),Dre=globalThis.Symbol.for(`immer-draftable`),CB={};function wB(e,t,n,r,i){let a=kre(n,t,r),o=TB(t),s=class extends e{constructor(...[e,t]){let r=t?.[`~payload`],i=r?.token===CB?r.value:n.make(e??{},t);super(i,{...t,disableChecks:!0,"~payload":{token:CB,value:i}})}static[NR]=NR;get[o](){return o}static[Dre]=!0;static identifier=t;static fields=n.fields;static get ast(){return a(this).ast}static pipe(){return ly(this,arguments)}static rebuild(e){return a(this).rebuild(e)}static make(e,t){return GL(a(this))(e??{},t)}static makeOption(e,t){return WL(a(this))(e??{},t)}static makeEffect(e,t){return a(this).makeEffect(e??{},t)}static annotate(e){return this.rebuild(NI(this.ast,e))}static annotateKey(e){return this.rebuild(UI(this.ast,e))}static check(...e){return this.rebuild(FI(this.ast,e))}static extend(e){return(t,r)=>{let a=EB(t)?t:K(t),o={...n.fields,...a.fields},s=QF(o,n.ast.checks,{identifier:e});return wB(this,e,fz(FI(s,a.ast.checks),o),r,i)}}static mapFields(e,t){return n.mapFields(e,t)}};return i!==void 0&&Object.assign(s.prototype,i(t)),s}function Ore(e){return new YP(HP(t=>new e(t,{"~payload":{token:CB,value:t}})),VP())}function TB(e){return`~effect/Schema/Class/${e}`}function kre(e,t,n){let r;return i=>{if(r!==void 0)return r;let a=TB(t),o=e=>e instanceof i||zy(e,a),s=Ore(i);return r=Ez(ez(new vF([e.ast],()=>(e,t,n)=>o(e)?H(e):Ek(new TP(t,e,n)),{identifier:t,[uP]:([e])=>({isConstructed:o,link:new pF(e,s)}),toCodec:([e])=>new pF(e.ast,s),toEquivalence:([e])=>e,toFormatter:([e])=>t=>`${i.identifier}(${e(t)})`,[lP]:iI(e.ast),...n})),s)(e)}}function EB(e){return tz(e)}var DB=e=>(t,n)=>wB(fw,e,EB(t)?t:K(t),n,e=>({toString(){return`${e}(${Ob({...this})})`}})),Are=e=>(t,n)=>wB(Ax,e,EB(t)?t:K(t),n,e=>({name:e})),OB=e=>(t,n,r)=>{let i=EB(n)?n.mapFields(e=>({_tag:Pz(t),...e}),{unsafePreserveChecks:!0}):Fz(t,n);return Are(e??t)(i,r)},kB=gR,AB=CR,jre=ez(NI(CL,{toCode:()=>({runtime:`Schema.Json`,Type:`Schema.Json`})})),jB=`~effect/reactivity/Reactivity`,MB=zS(`effect/reactivity/Reactivity`),Mre=xk(()=>{let e=new Map,t=t=>{LB(t,t=>{let n=e.get(t);n!==void 0&&n.forEach(e=>e())})},n=e=>Kk(n=>{let r=nC(n,NB);return r?LB(e,e=>{r.add(e)}):t(e),Sk}),r=(e,t)=>Fk(t,n(e)),i=(t,n)=>{let r=[];return LB(t,t=>{r.push(t);let i=e.get(t);i===void 0&&(i=new Set,e.set(t,i)),i.add(n)}),()=>{for(let t=0;t<r.length;t++){let i=e.get(r[t]);i!==void 0&&(i.delete(n),i.size===0&&e.delete(r[t]))}}},a=(e,t)=>Tk(function*(){let n=yield*Gk(),r=aC(n,BO),a=yield*lj(),o=Aee(lA(n),IA(r)),s=!1,c=!1,l=e=>{e._tag===`Failure`?mj(a,e.cause):fj(a,e.value),c?(c=!1,o(t).addObserver(l)):s=!1};function u(){if(s){c=!0;return}s=!0,o(t).addObserver(l)}return yield*WO(r,xk(i(e,u))),u(),a}),o=(e,t)=>a(e,t).pipe(Lk(FM),RM),s=t=>bk(()=>{let n=new Set;return t.pipe(dne(NB,n),Zk(t=>xk(()=>{n.forEach(t=>{let n=e.get(t);n!==void 0&&n.forEach(e=>e())})})))});return MB.of({[jB]:jB,mutation:r,query:a,stream:o,invalidateUnsafe:t,invalidate:n,registerUnsafe:i,withBatch:s})}),NB=class extends zS()(`effect/reactivity/Reactivity/PendingInvalidation`){},PB=B(2,(e,t)=>MB.use(n=>n.mutation(t,e))),Nre=e=>MB.use(t=>t.invalidate(e)),FB=nk(MB)(Mre);function IB(e){switch(typeof e){case`string`:case`number`:case`bigint`:case`boolean`:return String(e);default:return Wy(e)}}var LB=(e,t)=>{if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(IB(e[n]));return}for(let n in e){t(n);let r=e[n];for(let e=0;e<r.length;e++)t(`${n}:${IB(r[e])}`)}},RB=B(2,(e,t)=>e===void 0?void 0:t(e)),Pre=`~effect/SubscriptionRef`,zB=e=>zy(e,Pre);({...Zb});var BB=e=>IM(e.pubsub),Fre=e=>xk(()=>e.value),Ire=(e,t)=>{e.value=t,ZA(e.pubsub,t)},VB=B(2,(e,t)=>e.semaphore.withPermit(xk(()=>Ire(e,t)))),HB=`~effect/reactivity/AsyncResult`,UB=e=>zy(e,HB),WB={[HB]:{E:fy,A:fy},pipe(){return ly(this,arguments)},[cb](e){if(this._tag!==e._tag||this.waiting!==e.waiting)return!1;switch(this._tag){case`Initial`:return!0;case`Success`:return lb(this.value,e.value);case`Failure`:return lb(this.cause,e.cause)}},[Uy](){let e=Zy(`${this._tag}:${this.waiting}`);return this._tag===`Initial`?e:qy(e)(this._tag===`Success`?Wy(this.value):Wy(this.cause))}},Lre=e=>e.waiting,GB=(e,t)=>e._tag===`Success`?XB(e.value):$B(e.cause,{previous:t}),KB=e=>e._tag===`None`?JB(!0):eV(e.value),qB=e=>e._tag===`Initial`,Rre=e=>e._tag!==`Initial`,JB=(e=!1)=>{let t=Object.create(WB);return t._tag=`Initial`,t.waiting=e,t},YB=e=>e._tag===`Success`,XB=(e,t)=>{let n=Object.create(WB);return n._tag=`Success`,n.value=e,n.waiting=t?.waiting??!1,n.timestamp=t?.timestamp??Date.now(),n},ZB=e=>e._tag===`Failure`,QB=(e,t)=>{let n=Object.create(WB);return n._tag=`Failure`,n.cause=e,n.previousSuccess=t?.previousSuccess??SS(),n.waiting=t?.waiting??!1,n},$B=(e,t)=>QB(e,{previousSuccess:FS(t.previous,e=>YB(e)?CS(e):ZB(e)?e.previousSuccess:SS()),waiting:t.waiting}),zre=(e,t)=>$B(CO(e),t),eV=B(e=>UB(e[0]),(e,t)=>{if(e.waiting)return t?.touch?Bre(e):e;let n=Object.assign(Object.create(WB),e);return n.waiting=!0,t?.touch&&YB(n)&&(n.timestamp=Date.now()),n}),Bre=e=>YB(e)?XB(e.value,{waiting:e.waiting}):e,tV=B(2,(e,t)=>e._tag===`Failure`?$B(e.cause,{previous:t,waiting:e.waiting}):e),nV=e=>e._tag===`Success`?CS(e.value):e._tag===`Failure`?PS(e.previousSuccess,e=>e.value):SS(),rV=e=>NS(nV(e),()=>new kO(`AsyncResult.getOrThrow: no value found`)),iV=e=>{switch(e._tag){case`Success`:return jO(e.value);case`Failure`:return MO(e.cause);default:return NO(new kO)}},aV=e=>new Vre(e),Vre=class{constructor(e){this.result=e}result;output=SS();when(e,t){if(TS(this.output)&&e(this.result)){let e=t(this.result);ES(e)&&(this.output=e)}return this}pipe(){return ly(this,arguments)}onWaiting(e){return this.when(e=>e.waiting,t=>CS(e(t)))}onInitialOrWaiting(e){return this.when(e=>qB(e)||e.waiting,t=>CS(e(t)))}onInitial(e){return this.when(qB,t=>CS(e(t)))}onSuccess(e){return this.when(YB,t=>CS(e(t.value,t)))}onFailure(e){return this.when(ZB,t=>CS(e(t.cause,t)))}onError(e){return this.onErrorIf(my,e)}onErrorIf(e,t){return this.when(ZB,n=>Lte(n.cause).pipe(LS(e),PS(e=>t(e,n))))}onErrorTag(e,t){return this.onErrorIf(t=>zy(t,`_tag`)&&(Array.isArray(e)?e.includes(t._tag):t._tag===e),t)}onDefect(e){return this.when(ZB,t=>{let n=Rte(t.cause);return mC(n)?SS():CS(e(n.success,t))})}onInterrupt(e){return this.when(ZB,t=>{let n=zte(t.cause);return mC(n)?SS():CS(e(n.success,t))})}orElse(e){return OS(this.output,e)}orNull(){return jS(this.output)}render(){if(ES(this.output))return this.output.value;if(ZB(this.result))throw DO(this.result.cause);return null}exhaustive(){return this.render()}},oV=e=>{let t=e.success??oz,n=e.error??oz,r=PR()([t,bB(n,fB())],([e,t])=>(n,r,i)=>{if(!UB(n))return Ek(new TP(r,n,i));switch(n._tag){case`Initial`:return H(n);case`Success`:return yA(YL(e)(n.value,i),{onSuccess:e=>XB(e,n),onFailure:e=>DP(r,`value`,e,n,i)});case`Failure`:{let a=n.previousSuccess.pipe(PS(t=>yA(YL(e)(t.value,i),{onSuccess:e=>CS(XB(e,t)),onFailure:e=>new wP(r,[new xP([`previousSuccess`,`value`],e)],n,i)})),OS(()=>yk)),o=vA(YL(t)(n.cause,i),e=>DP(r,`cause`,e,n,i));return bA(a,e=>_A(o,t=>QB(t,{previousSuccess:e,waiting:n.waiting})))}}},{expected:`AsyncResult`,toCodec([e,t]){let n=Fz(`Success`,{value:e,waiting:uz,timestamp:tB});return zz()(yz([Fz(`Initial`,{waiting:uz}),n,Fz(`Failure`,{cause:t,previousSuccess:Tre(n),waiting:uz})]),QP({decode:e=>{switch(e._tag){case`Initial`:return JB(e.waiting);case`Success`:return XB(e.value,{waiting:e.waiting,timestamp:e.timestamp});case`Failure`:return QB(e.cause,{previousSuccess:PS(e.previousSuccess,e=>XB(e.value,e)),waiting:e.waiting})}},encode(e){switch(e._tag){case`Initial`:return{_tag:`Initial`,waiting:e.waiting};case`Success`:return{_tag:`Success`,value:e.value,waiting:e.waiting,timestamp:e.timestamp};case`Failure`:return{_tag:`Failure`,cause:e.cause,previousSuccess:e.previousSuccess,waiting:e.waiting}}}}))},toEquivalence:Mee,toFormatter:([e,t])=>n=>{switch(n._tag){case`Success`:return`AsyncResult.Success(${e(n.value)}, ${n.waiting}, ${n.timestamp})`;case`Failure`:return`AsyncResult.Failure(${t(n.cause)}, ${n.waiting})`;case`Initial`:return`AsyncResult.Initial(${n.waiting}, ${n.waiting})`}}});return Object.assign(r,{success:t,error:n})},sV=`~effect/reactivity/AtomRegistry`,Hre=e=>zy(e,sV),Ure=e=>new Kre(e?.initialValues,e?.scheduleTask,e?.timeoutResolution,e?.defaultIdleTTL),cV=zS(sV),Wre=B(e=>Hre(e[0]),(e,t,n)=>{let r=n?.suspendOnWaiting??!1;return Ck(n=>{let i=e.get(t);if(i._tag!==`Initial`&&!(r&&i.waiting))return n(iV(i));let a=e.subscribe(t,e=>{e._tag!==`Initial`&&!(r&&e.waiting)&&(n(iV(e)),a())});return xk(a)})}),Gre={immediate:!0},lV=e=>{e()},uV={};function dV(e,t){let n=uV;for(let r of e)try{t(r)}catch(e){n===uV&&(n=e)}if(n!==uV)throw n}var fV=`~effect-atom/atom/Atom/Serializable`,pV=e=>fV in e?e[fV].key:e,Kre=class{[sV];timeoutResolution;defaultIdleTTL;scheduler;schedulerAsync;dispatcher;onNodeAdded;onNodeRemoved;constructor(e,t,n,r){if(this[sV]=sV,this.scheduler=new cw(`sync`,t),this.schedulerAsync=new cw(`async`,t),this.dispatcher=this.schedulerAsync.makeDispatcher(),this.defaultIdleTTL=r,this.timeoutResolution=n===void 0&&r!==void 0?Math.round(r/2):n??1e3,e!==void 0)for(let[t,n]of e){let e=t;for(;e.initialValueTarget;)e=e.initialValueTarget;this.ensureNode(e).setInitialValue(n)}}nodes=new Map;preloadedSerializable=new Map;timeoutBuckets=new Map;nodeTimeoutBucket=new Map;disposed=!1;getNodes(){return this.nodes}get(e){return this.ensureNode(e).value()}set(e,t){e.write(this.ensureNode(e).writeContext,t)}setSerializable(e,t){this.preloadedSerializable.set(e,t)}modify(e,t){let n=this.ensureNode(e),r=t(n.value());return e.write(n.writeContext,r[1]),r[0]}update(e,t){let n=this.ensureNode(e);e.write(n.writeContext,t(n.value()))}refresh=e=>{e.refresh===void 0?this.invalidateAtom(e):e.refresh(this.refresh)};subscribe(e,t,n){let r=this.ensureNode(e);n?.immediate?t(r.value()):r.state===hV.stale&&r.value();let i=r.subscribe(function(){t(r._value)});return()=>{i(),r.canBeRemoved&&this.scheduleNodeRemoval(r)}}mount(e){return this.subscribe(e,_y,Gre)}atomHasTtl(e){return!e.keepAlive&&e.idleTTL!==0&&(e.idleTTL!==void 0||this.defaultIdleTTL!==void 0)}ensureNode(e){let t=pV(e),n=this.nodes.get(t);if(n===void 0?(n=this.createNode(e),this.nodes.set(t,n),this.onNodeAdded?.(n)):this.atomHasTtl(e)&&this.removeNodeTimeout(n),typeof t==`string`&&this.preloadedSerializable.has(t)){let r=this.preloadedSerializable.get(t);this.preloadedSerializable.delete(t);let i=e[fV].decode(r),a=e;for(;a.initialValueTarget;)a=a.initialValueTarget;a===e?n.setValue(i):this.ensureNode(a).setInitialValue(i)}return n}createNode(e){if(this.disposed)throw Error(`Cannot access Atom ${e}: registry is disposed`);return e.keepAlive||this.scheduleAtomRemoval(e),new qre(this,e)}invalidateAtom=e=>{this.ensureNode(e).invalidate()};scheduleAtomRemoval(e){this.dispatcher.scheduleTask(()=>{let t=this.nodes.get(pV(e));t!==void 0&&t.canBeRemoved&&this.removeNode(t)},0)}scheduleNodeRemoval(e){this.dispatcher.scheduleTask(()=>{e.canBeRemoved&&this.removeNode(e)},0)}removeNode(e){this.atomHasTtl(e.atom)?this.setNodeTimeout(e):(this.nodes.delete(pV(e.atom)),e.remove(),this.onNodeRemoved?.(e))}setNodeTimeout(e){if(this.nodeTimeoutBucket.has(e))return;let t=e.atom.idleTTL??this.defaultIdleTTL;if(this.#e!==null&&(t-=this.#e,t<=0)){this.nodes.delete(pV(e.atom)),e.remove(),this.onNodeRemoved?.(e);return}let n=Math.ceil(t/this.timeoutResolution)*this.timeoutResolution,r=Date.now()+n,i=r-r%this.timeoutResolution+this.timeoutResolution,a=this.timeoutBuckets.get(i);a===void 0&&(a=[new Set,setTimeout(()=>this.sweepBucket(i),i-Date.now())],this.timeoutBuckets.set(i,a)),a[0].add(e),this.nodeTimeoutBucket.set(e,i)}removeNodeTimeout(e){let t=this.nodeTimeoutBucket.get(e);if(t===void 0)return;this.nodeTimeoutBucket.delete(e),this.scheduleNodeRemoval(e);let[n,r]=this.timeoutBuckets.get(t);n.delete(e),n.size===0&&(clearTimeout(r),this.timeoutBuckets.delete(t))}#e=null;sweepBucket(e){let t=this.timeoutBuckets.get(e)[0];this.timeoutBuckets.delete(e),dV(t,this.removeIdleNode)}removeIdleNode=e=>{if(this.nodeTimeoutBucket.delete(e),e.canBeRemoved){this.nodes.delete(pV(e.atom)),this.onNodeRemoved?.(e),this.#e=e.atom.idleTTL??this.defaultIdleTTL;try{e.remove()}finally{this.#e=null}}};reset(){this.timeoutBuckets.forEach(([,e])=>clearTimeout(e)),this.timeoutBuckets.clear(),this.nodeTimeoutBucket.clear();let e=Array.from(this.nodes.values());this.nodes.clear();for(let t of e)t.state=hV.removed;dV(e,this.destroyNode)}destroyNode=e=>{e.remove(),this.onNodeRemoved?.(e)};dispose(){this.disposed=!0,this.reset()}},mV={alive:1,initialized:2,waitingForValue:4},hV={uninitialized:mV.alive|mV.waitingForValue,stale:mV.alive|mV.initialized|mV.waitingForValue,valid:mV.alive|mV.initialized,removed:0},qre=class{constructor(e,t){this.registry=e,this.atom=t,this.writeContext=new Xre(e,this)}registry;atom;state=hV.uninitialized;lifetime;writeContext;preserveInitialValueOnBuild=!1;invalidatedDuringBuild=!1;failed=!1;parents=new Set;children=new Set;listeners=new Set;observedChildren=0;currentState(){switch(this.state){case hV.uninitialized:return`uninitialized`;case hV.stale:return`stale`;case hV.valid:return`valid`;default:return`removed`}}get canBeRemoved(){return!this.atom.keepAlive&&this.listeners.size===0&&this.children.size===0&&this.state!==0}get building(){return this.lifetime!==void 0&&this.lifetime.reads!==void 0}get isObserved(){return!this.atom.lazy||this.listeners.size>0||this.observedChildren>0}childObserved(e){let t=this.isObserved;this.observedChildren+=e,t!==this.isObserved&&this.observedChanged(e)}observedChanged(e){for(let t of this.parents)t.childObserved(e)}_value=void 0;value(){for(;(this.state&mV.waitingForValue)!==0;)this.build();return this._value}build(){this.disposeLifetime(),this.invalidatedDuringBuild=!1;let e=Yre(this);this.lifetime=e;let t,n=!1;try{t=this.atom.read(e),n=!0}finally{let t=e.reads;e.reads=void 0,this.lifetime===e&&(this.dropUnread(t),n||this.fail())}if(this.lifetime===e&&(this.state&mV.waitingForValue)!==0&&(this.preserveInitialValueOnBuild?(this.preserveInitialValueOnBuild=!1,this.failed=!1,this.state=hV.valid):this.setValue(t)),e.failure!==uV)throw e.failure}fail(){this.failed=!0;try{this.invalidateChildren()}catch{}}readTracked(e,t){let n=this.registry.ensureNode(e);this.parents.has(n)||(this.parents.add(n),n.children.add(this),this.isObserved&&n.childObserved(1));try{return n.value()}catch(e){if(t.reads===void 0||n.state!==hV.valid)throw e;return t.failure===uV&&(t.failure=e),n._value}finally{t.reads!==void 0&&!t.disposed&&t.reads.add(n)}}dropUnread(e){if(e.size===this.parents.size)return;let t=this.isObserved;for(let n of this.parents)e.has(n)||(this.parents.delete(n),n.children.delete(this),t&&n.childObserved(-1),n.canBeRemoved&&this.registry.scheduleNodeRemoval(n))}valueOption(){return(this.state&mV.initialized)===0?SS():CS(this._value)}setInitialValue(e){if((this.state&mV.initialized)===0){this.preserveInitialValueOnBuild=!0,this.state=hV.stale,this._value=e,this.listeners.size>0&&this.announce();return}this.setValue(e)}setValue(e){let t=this.failed;this.failed=!1;let n=(this.state&mV.initialized)!==0;if(this.state=hV.valid,n&&this.atom.equals(this._value,e)){t&&this.invalidateChildren();return}this._value=e;let r=uV;try{this.invalidateChildren()}catch(e){r=e}if(this.listeners.size>0)try{this.announce()}catch(e){r===uV&&(r=e)}if(r!==uV)throw r}announce(){_V.phase===gV.collect?_V.notify.add(this):this.notify()}invalidate(){if(this.state===hV.valid){this.state=hV.stale;try{this.disposeLifetime()}finally{this.propagate()}}else this.building&&_V.phase!==gV.collect?this.build():this.propagate()}propagate(){_V.phase===gV.collect?(this.building&&(this.invalidatedDuringBuild=!0),_V.stale.push(this)):this.isObserved?this.value():this.invalidateChildren()}invalidateChildren(){if(this.children.size===0)return;let e=uV;for(let t of Array.from(this.children))if(t.affectedBy(this))try{t.invalidate()}catch(t){e===uV&&(e=t)}if(e!==uV)throw e}affectedBy(e){if(this.state===hV.valid)return!0;let t=this.lifetime?.reads;return t===void 0?this.isObserved&&e.state===hV.valid:t.has(e)}notify(){_V.phase===gV.commit&&_V.notify.delete(this),dV(this.listeners,lV)}disposeLifetime(){let e=this.lifetime;e!==void 0&&(this.lifetime=void 0,e.dispose())}remove(){let e=this.isObserved;this.state=hV.removed,this.listeners.clear();try{this.disposeLifetime()}finally{let t=Array.from(this.parents);this.parents.clear(),dV(t,t=>{t.children.delete(this),e&&t.childObserved(-1),t.canBeRemoved&&this.registry.removeNode(t)})}}subscribe(e){let t=this.isObserved;return this.listeners.add(e),t||this.observedChanged(1),()=>{this.listeners.delete(e)&&!this.isObserved&&this.observedChanged(-1)}}},Jre={get registry(){return this.node.registry},addFinalizer(e){if(this.disposed)return e();this.finalizers??=[],this.finalizers.push(e)},get(e){return this.disposed?this.node.registry.get(e):this.node.readTracked(e,this)},result(e,t){if(this.disposed||this.isFn)return this.resultOnce(e,t);let n=this.get(e);if(t?.suspendOnWaiting&&n.waiting)return wk;switch(n._tag){case`Initial`:return wk;case`Failure`:return MO(n.cause);case`Success`:return H(n.value)}},resultOnce(e,t){return Ck(n=>{let r=this.once(e);if(r._tag!==`Initial`&&!(t?.suspendOnWaiting&&r.waiting))return n(iV(r));let i=this.node.registry.subscribe(e,e=>{e._tag===`Initial`||t?.suspendOnWaiting&&e.waiting||(i(),n(iV(e)))},{immediate:!1});return xk(i)})},setResult(e,t){return this.disposed?wk:(this.node.registry.set(e,t),this.resultOnce(e,{suspendOnWaiting:!0}))},some(e){if(this.disposed||this.isFn)return this.someOnce(e);let t=this.get(e);return t._tag===`None`?wk:H(t.value)},someOnce(e){return Ck(t=>{let n=this.once(e);if(ES(n))return t(H(n.value));let r=this.node.registry.subscribe(e,e=>{TS(e)||(r(),t(H(e.value)))},{immediate:!1});return xk(r)})},once(e){return this.node.registry.get(e)},self(){return this.disposed?SS():this.node.valueOption()},refresh(e){this.disposed||this.node.registry.refresh(e)},refreshSelf(){this.disposed||this.node.invalidate()},mount(e){this.disposed||this.addFinalizer(this.node.registry.mount(e))},subscribe(e,t,n){this.disposed||this.addFinalizer(this.node.registry.subscribe(e,t,n))},setSelf(e){this.disposed||this.node.setValue(e)},set(e,t){this.disposed||this.node.registry.set(e,t)},stream(e,t){return this.disposed?MM:jM(n=>xk(()=>{this.subscribe(e,e=>fj(n,e),{immediate:!t?.withoutInitialValue})}))},streamResult(e,t){return this.stream(e,t).pipe(VM(Rre),BM(e=>e._tag===`Success`?H(e.value):Dk(e.cause)))},dispose(){if(this.disposed=!0,this.finalizers===void 0)return;let e=this.finalizers;this.finalizers=void 0,dV(e.reverse(),lV)}},Yre=e=>{function t(n){return t.disposed||t.isFn?e.registry.get(n):e.readTracked(n,t)}return Object.setPrototypeOf(t,Jre),t.isFn=!1,t.disposed=!1,t.finalizers=void 0,t.node=e,t.reads=new Set,t.failure=uV,t},Xre=class{constructor(e,t){this.registry=e,this.node=t}registry;node;get(e){return this.registry.get(e)}set(e,t){return this.registry.set(e,t)}setSelf(e){return this.node.setValue(e)}refreshSelf(){return this.node.invalidate()}},gV={disabled:0,collect:1,commit:2},_V={phase:gV.disabled,depth:0,stale:[],notify:new Set};function Zre(e){let t=_V.phase;_V.phase=gV.collect,_V.depth++;let n=uV;try{e()}catch(e){n=e}if(_V.depth===1){let{notify:e,stale:t}=_V,r=0;do{for(_V.phase=gV.collect;r<t.length;r++)try{Qre(t[r])}catch(e){n===uV&&(n=e)}_V.phase=gV.commit;for(let t of e)try{t.notify()}catch(e){n===uV&&(n=e)}}while(r<t.length);_V.stale=[],e.clear()}if(_V.depth--,_V.phase=t,n!==uV)throw n}function Qre(e){if(e.state===hV.valid){if(!e.invalidatedDuringBuild)return;e.invalidatedDuringBuild=!1,e.state=hV.stale,e.disposeLifetime()}e.value()}var vV=`~effect/reactivity/Atom`,yV=e=>zy(e,vV),bV=`~effect/reactivity/Atom/Writable`,xV=B(2,(e,t)=>{let n=PC(t),r=RC(n);return Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!r,idleTTL:r?JC(n):void 0})}),SV=xV(0),CV={[vV]:vV,equals:Object.is,...Zb,toJSON(){return{_id:`Atom`,keepAlive:this.keepAlive,lazy:this.lazy,label:this.label}}},$re={...CV,atom(e,t){let n=OV(e,t);return TV(e=>{let t=e.self(),r=e(this);return r._tag===`Success`?n(e,r.value):tV(r,t)})},fn(e,t){return arguments.length===0?(e,t)=>wV(this,e,t):wV(this,e,t)},pull(e,t){let n=SV(AV(0));return uie(n,TV(r=>{let i=r.self(),a=r(this);return a._tag===`Success`?MV(r,lie(r,n,e,t),JB(!0),a.value):tV(a,i)}))},subscriptionRef(e){return oie(SV(TV(t=>{let n=t.self(),r=t(this);if(r._tag!==`Success`)return tV(r,n);let i=typeof e==`function`?e(t):e;return zB(i)?i:MV(t,i,JB(!0),r.value)})),(e,t)=>aie(e,t,rV(e(this))))}},wV=(e,t,n)=>{let[r,i,a]=cie(n?.reactivityKeys?(e,r)=>{let i=t(e,r);return gk(i)?PB(i,n.reactivityKeys):WM(i,Nre(n.reactivityKeys))}:t,n);return EV(t=>{t.get(a);let n=t.self(),i=t.get(e);return i._tag===`Success`?r(t,i.value):tV(i,n)},i)},eie={...CV,[bV]:bV},tie=e=>bV in e,TV=(e,t)=>{let n=Object.create(CV);return n.keepAlive=!1,n.lazy=!0,n.read=e,n.refresh=t,n},EV=(e,t,n)=>{let r=Object.create(eie);return r.keepAlive=!1,r.lazy=!0,r.read=e,r.write=t,r.refresh=n,r};function nie(e,t){e.setSelf(t)}var DV=(e,t)=>{let n=OV(e,t);return`~effect/reactivity/Atom`in n?n:TV(n)},OV=(e,t)=>{if(typeof e==`function`&&!gk(e)&&!DM(e)){let n=e;return function(e,r){let i=n(e);switch(typeof i){case`function`:case`object`:return i===null?i:kV in i?jV(e,i,t,r):rie in i?FV(e,i,t,r):i;default:return i}}}return gk(e)?function(n,r){return jV(n,e,t,r)}:DM(e)?function(n,r){return FV(n,e,t,r)}:AV(e)},kV=`~effect/Effect`,rie=`~effect/Stream`,AV=e=>EV(function(t){return e},nie),jV=(e,t,n,r)=>MV(e,t,n?.initialValue===void 0?JB():XB(n.initialValue),r,n?.uninterruptible);function MV(e,t,n,r=$S(),i=!1){let a=e.self(),o=VO();e.addFinalizer(()=>{lA(r)(KO(o,PO))});let s,c=!1,l=NV(r.pipe(tC(BO,o),tC(cV,e.registry),tC(rw,e.registry.scheduler)),t,function(t){s=GB(t,a),c&&e.setSelf(s)},i);return c=!0,l!==void 0&&e.addFinalizer(l),s===void 0?a._tag===`Some`?KB(a):eV(n):s}function NV(e,t,n,r=!1){if(Vte(t)){n(t);return}let i=lA(e)(t);i.currentDispatcher?.flush();let a=i.pollUnsafe();if(a){n(a);return}let o=i.addObserver(n);function s(){o(),r||i.interruptUnsafe()}return s}function iie(e){let t=e?.memoMap??SV(DV(()=>QO())),n=e=>yV(t)?e(t):t,r=FB;function i(e){let t=Object.create($re);t.keepAlive=!1,t.lazy=!0,t.refresh=void 0,t.factory=i;let a=zV(TV(typeof e==`function`?t=>ck(e(t),r):()=>ck(e,r)));return t.layer=a,t.read=function(e){let t=e(a);return jV(e,Nk(fne,r=>ek(t,n(e),r)),{uninterruptible:!0})},t}i.memoMap=t,i.addGlobalLayer=e=>{r=ck(r,sk(e,FB))};let a=SV(DV(e=>Kk(t=>ek(FB,n(e),aC(t,BO))).pipe(Lk(aC(MB)))));return i.withReactivity=e=>t=>BV(t,n=>{let r=rV(n(a));return n.addFinalizer(r.registerUnsafe(e,()=>{n.refresh(t)})),n.subscribe(t,e=>n.setSelf(e)),n.once(t)},{initialValueTarget:t}),i}var PV=iie();PV.withReactivity;var FV=(e,t,n,r)=>IV(e,t,n?.initialValue===void 0?JB():XB(n.initialValue),r);function IV(e,t,n,r=$S()){let i=e.self();r=tC(r,cV,e.registry);let a=Yk(n=>Nk($j(t.channel,n),t=>lne({while:my,body:()=>t,step(t){e.setSelf(XB(ite(t),{waiting:!0}))}}))).pipe(Vk(t=>(pk(t)?vy(e.self(),FS(nV),DS({onNone:()=>e.setSelf(zre(new kO,{previous:e.self()})),onSome:t=>e.setSelf(XB(t))})):e.setSelf($B(t,{previous:e.self()})),Sk))),o=NV(r.pipe(tC(cV,e.registry),tC(rw,e.registry.scheduler)),a,_y,!1);return o!==void 0&&e.addFinalizer(o),i._tag===`Some`?KB(i):eV(n)}var aie=(e,t,n=$S())=>zB(t)?(e.addFinalizer(BB(t).pipe(KM(t=>{for(let n=0;n<t.length;n++)e.setSelf(t[n]);return Sk}),uA(n))),pne(n)(Fre(t))):t._tag===`Success`?IV(e,BB(t.value),JB(!0),n):t,oie=(e,t)=>{function n(t,n){let r=t.get(e);zB(r)?pA(VB(r,n)):YB(r)&&pA(VB(r.value,n))}return EV(n=>{let r=n(e);return zB(r)||YB(r)?t(n,r):r},n)},sie=Symbol.for(`effect/reactivity/atom/Atom/Reset`),LV=Symbol.for(`effect/reactivity/atom/Atom/Interrupt`);function cie(e,t){let n=SV(AV([0,void 0])),r=t?.initialValue===void 0?JB():XB(t.initialValue),i=t?.concurrent?SV(TV(e=>{let t=new Set;return e.addFinalizer(()=>t.forEach(e=>e.interruptUnsafe())),t})):void 0;function a(t,a){let o=i?t(i):void 0;t.isFn=!0;let[s,c]=t.get(n);if(s===0)return r;if(c===LV)return $B(Pte(),{previous:t.self()});let l=e(c,t);return kV in l?(o&&(l=Nk(sA(l,{startImmediately:!0}),e=>{o.add(e);let t=Array.from(o);return e.addObserver(()=>o.delete(e)),Lk(gne(t),e=>e[0])})),MV(t,l,r,a,!1)):IV(t,l,r,a)}function o(e,t){pie(()=>{t===sie?e.set(n,[0,void 0]):t===LV?e.set(n,[e.get(n)[0]+1,LV]):e.set(n,[e.get(n)[0]+1,t]),e.refreshSelf()})}return[a,o,n]}var lie=(e,t,n,r)=>Nk(qM(typeof n==`function`?n(e):n),n=>{let i=vne().context,a=TC(),o=Wk(n,{onFailure(e){return pk(e)?wC(a)?H({done:!0,items:a}):Ek(new kO(`Atom.pull: no items`)):Dk(e)},onSuccess(e){let t;return r?.disableAccumulation?t=e:(t=SC(a,e),a=t),H({done:!1,items:t})}}),s=new Set;return e.addFinalizer(()=>{for(let e of s)e()}),e.once(t),e.subscribe(t,()=>{e.setSelf(KB(e.self()));let t;t=NV(i,o,n=>{t&&s.delete(t);let r=GB(n,e.self()),i=s.size>0;e.setSelf(i?eV(r):r)}),t&&s.add(t)}),o}),uie=(e,t)=>EV(t.read,function(t,n){t.set(e,t.get(e)+1)}),RV=typeof WeakRef>`u`||typeof FinalizationRegistry>`u`?e=>{let t=nM();return function(n){let r=rM(t,n);if(r._tag===`Some`)return r.value;let i=e(n);return oM(t,n,i),i}}:e=>{let t=nM(),n=new FinalizationRegistry(e=>{let n=rM(t,e);n._tag===`Some`&&n.value.deref()===void 0&&cM(t,e)});return function(r){let i=rM(t,r).pipe(IS(e=>e.deref()));if(i._tag===`Some`)return i.value;let a=e(r);return oM(t,r,new WeakRef(a)),n.register(a,r),a}},zV=e=>Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!0}),BV=B(e=>yV(e[0]),(e,t,n)=>{let r=SV(tie(e)?EV(n=>t(n,e),function(t,n){t.set(e,n)},e.refresh??function(t){t(e)}):TV(n=>t(n,e),e.refresh??function(t){t(e)}));return n?.initialValueTarget&&(r.initialValueTarget=die(n.initialValueTarget)),r}),die=e=>{let t=e;for(;t.initialValueTarget;)t=t.initialValueTarget;return t},fie=B(2,(e,t)=>BV(e,n=>t(n(e)))),pie=Zre,mie=`~effect-atom/atom/Atom/Serializable`,VV=B(2,(e,t)=>{let n=kB(t.schema);return Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,label:e.label??[t.key,Fb()===0?``:Error().stack?.split(`
57
+ `)[5]??``],[mie]:{key:t.key,encode:$R(n),decode:XR(n)}})}),hie=`~effect-atom/atom/Atom/ServerValue`,gie=B(2,(e,t)=>`~effect-atom/atom/Atom/ServerValue`in e?e[hie](e=>t.get(e)):t.get(e)),_ie=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),HV=l(o(((e,t)=>{t.exports=_ie()}))(),1);function vie(e){let t=HV.unstable_scheduleCallback(4,e);return()=>HV.unstable_cancelCallback(t)}var UV=N.createContext(Ure({scheduleTask:vie,defaultIdleTTL:400})),WV=new WeakMap;function yie(e,t){let n=WV.get(e);n===void 0&&(n=new WeakMap,WV.set(e,n));let r=n.get(t);if(r!==void 0)return r;let i={subscribe(n){return e.subscribe(t,n)},snapshot(){return e.get(t)},getServerSnapshot(){return gie(t,e)}};return n.set(t,i),i}function GV(e,t){let n=yie(e,t);return N.useSyncExternalStore(n.subscribe,n.snapshot,n.getServerSnapshot)}var KV=(e,t)=>{let n=N.useContext(UV);return t?GV(n,N.useMemo(()=>fie(e,t),[e,t])):GV(n,e)};function bie(e,t){N.useEffect(()=>e.mount(t),[t,e])}function qV(e,t,n){return n?.mode===`promise`||n?.mode===`promiseExit`?N.useCallback(r=>{e.set(t,r);let i=fA(Wre(e,t,{suspendOnWaiting:!0}));return n.mode===`promise`?i.then(xie):i},[e,t,n.mode]):N.useCallback(n=>{e.set(t,typeof n==`function`?n(e.get(t)):n)},[e,t])}var xie=e=>{if(FO(e))return e.value;throw DO(e.cause)},JV=(e,t)=>{let n=N.useContext(UV);return bie(n,e),qV(n,e,t)},YV=(e,t)=>{let n=N.useContext(UV);return[GV(n,e),qV(n,e,t)]};function Sie(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var Cie=e=>{switch(e){case`success`:return Eie;case`info`:return Oie;case`warning`:return Die;case`error`:return kie;default:return null}},wie=Array(12).fill(0),Tie=({visible:e,className:t})=>N.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},N.createElement(`div`,{className:`sonner-spinner`},wie.map((e,t)=>N.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),Eie=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},N.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),Die=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},N.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),Oie=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},N.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),kie=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},N.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),Aie=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},N.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),N.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),jie=()=>{let[e,t]=N.useState(document.hidden);return N.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},Mie=1,Nie=100,XV=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:Mie++,ZV=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-Nie;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=XV(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],N.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(Fie(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!N.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!N.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!N.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!N.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=XV(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},Pie=(e,t)=>ZV.message(e,t),Fie=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,QV=Object.assign(Pie,{success:ZV.success,info:ZV.info,warning:ZV.warning,error:ZV.error,custom:ZV.custom,message:ZV.message,promise:ZV.promise,dismiss:ZV.dismiss,loading:ZV.loading},{getHistory:()=>ZV.toasts,getToasts:()=>ZV.getActiveToasts()});Sie(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function $V(e){return e.label!==void 0}var Iie=3,Lie=`24px`,Rie=`16px`,eH=4e3,zie=356,Bie=14,Vie=45,Hie=200;function tH(...e){return e.filter(Boolean).join(` `)}function Uie(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var Wie=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:T=`Close toast`}=e,[E,D]=N.useState(null),[O,k]=N.useState(null),[A,j]=N.useState(!1),[M,ee]=N.useState(!1),[P,F]=N.useState(!1),[te,ne]=N.useState(!1),[re,ie]=N.useState(!1),[ae,oe]=N.useState(0),[se,ce]=N.useState(0),le=N.useRef(n.duration||y||eH),ue=N.useRef(null),de=N.useRef(null),fe=c===0,pe=c+1<=o,me=n.type,I=me??`default`,he=n.dismissible!==!1,ge=n.className||``,_e=n.descriptionClassName||``,ve=N.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),ye=N.useMemo(()=>n.closeButton??p,[n.closeButton,p]),be=N.useMemo(()=>n.duration||y||eH,[n.duration,y]),xe=N.useRef(0),Se=N.useRef(0),Ce=N.useRef(0),we=N.useRef(null),[Te,Ee]=b.split(`-`),De=N.useMemo(()=>s.reduce((e,t,n)=>n>=ve?e:e+t.height,0),[s,ve]),Oe=jie(),ke=N.useMemo(()=>e.swipeDirections??Uie(b),[e.swipeDirections,b]),Ae=n.invert||t,je=me===`loading`;Se.current=N.useMemo(()=>ve*x+De,[ve,De]),N.useEffect(()=>{le.current=be},[be]),N.useEffect(()=>{j(!0)},[]),N.useEffect(()=>{let e=de.current;if(e){let t=e.getBoundingClientRect().height;return ce(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),N.useLayoutEffect(()=>{if(!A)return;let e=de.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,ce(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[A,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Me=N.useCallback(()=>{ee(!0),oe(Se.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},Hie)},[n,d,a,Se]);N.useEffect(()=>{if(n.promise&&me===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Oe?(()=>{if(Ce.current<xe.current){let e=new Date().getTime()-xe.current;le.current-=e}Ce.current=new Date().getTime()})():le.current!==1/0&&(xe.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Me()},le.current)),()=>clearTimeout(e)},[u,i,n,me,Oe,Me]),N.useEffect(()=>{n.delete&&(Me(),n.onDismiss==null||n.onDismiss.call(n,n))},[Me,n.delete]);function Ne(){return w?.loading?N.createElement(`div`,{className:tH(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":me===`loading`},w.loading):N.createElement(Tie,{className:tH(C?.loader,n?.classNames?.loader),visible:me===`loading`})}let Pe=n.icon||w?.[me]||Cie(me);return N.createElement(`li`,{tabIndex:0,ref:de,className:tH(_,ge,C?.toast,n?.classNames?.toast,C?.[I],n?.classNames?.[I]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":A,"data-promise":!!n.promise,"data-swiped":re,"data-removed":M,"data-visible":pe,"data-y-position":Te,"data-x-position":Ee,"data-index":c,"data-front":fe,"data-swiping":P,"data-dismissible":he,"data-type":me,"data-invert":Ae,"data-swipe-out":te,"data-swipe-direction":O,"data-expanded":!!(u||S&&A),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${M?ae:Se.current}px`,"--initial-height":S?`auto`:`${se}px`,...m,...n.style},onDragEnd:()=>{F(!1),D(null),we.current=null},onPointerDown:e=>{e.button!==2&&!je&&he&&(ue.current=new Date,oe(Se.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(F(!0),we.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(te||!he)return;we.current=null;let e=Number(de.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(de.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ue.current?.getTime(),i=E===`x`?e:t,a=Math.abs(i)/r;if((E===`x`?ke.includes(e>0?`right`:`left`):ke.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=Vie||a>.11)){oe(Se.current),n.onDismiss==null||n.onDismiss.call(n,n),k(E===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Me(),ne(!0);return}var o,s;(o=de.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=de.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),ie(!1),F(!1),D(null)},onPointerMove:e=>{var t,n;if(!we.current||!he||window.getSelection()?.toString().length>0)return;let r=e.clientY-we.current.y,i=e.clientX-we.current.x;!E&&(Math.abs(i)>1||Math.abs(r)>1)&&D(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(E===`y`){if(ke.includes(`top`)||ke.includes(`bottom`)){if(ke.includes(`top`)&&r<0||ke.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(E===`x`&&(ke.includes(`left`)||ke.includes(`right`))){if(ke.includes(`left`)&&i<0||ke.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&ie(!0),(t=de.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=de.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},ye&&!n.jsx&&me!==`loading`?N.createElement(`button`,{"aria-label":T,"data-disabled":je,"data-close-button":!0,onClick:je||!he?()=>{}:()=>{Me(),n.onDismiss==null||n.onDismiss.call(n,n)},className:tH(C?.closeButton,n?.classNames?.closeButton)},w?.close??Aie):null,(me||n.icon||n.promise)&&n.icon!==null&&(w?.[me]!==null||n.icon)?N.createElement(`div`,{"data-icon":``,className:tH(C?.icon,n?.classNames?.icon)},me===`loading`?n.icon||Ne():n.promise?Ne():null,me===`loading`?null:Pe):null,N.createElement(`div`,{"data-content":``,className:tH(C?.content,n?.classNames?.content)},N.createElement(`div`,{"data-title":``,className:tH(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?N.createElement(`div`,{"data-description":``,className:tH(v,_e,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),N.isValidElement(n.cancel)?n.cancel:n.cancel&&$V(n.cancel)?N.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{$V(n.cancel)&&he&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Me())},className:tH(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,N.isValidElement(n.action)?n.action:n.action&&$V(n.action)?N.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{$V(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&Me())},className:tH(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function nH(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function Gie(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?Rie:Lie;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var Kie=N.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=Iie,toastOptions:g,dir:_=nH(),gap:v=Bie,icons:y,customAriaLabel:b,containerAriaLabel:x=`Notifications`}=e,[S,C]=N.useState([]),w=N.useMemo(()=>n?S.filter(e=>e.toasterId===n):S.filter(e=>!e.toasterId),[S,n]),T=N.useMemo(()=>Array.from(new Set([i].concat(w.filter(e=>e.position).map(e=>e.position)))),[w,i]),[E,D]=N.useState([]),[O,k]=N.useState(!1),[A,j]=N.useState(!1),[M,ee]=N.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),P=N.useRef(null),F=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),te=N.useRef(null),ne=N.useRef(!1),re=N.useCallback(e=>{C(t=>(t.find(t=>t.id===e.id)?.delete||ZV.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return N.useEffect(()=>ZV.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{C(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{yi.flushSync(()=>{C(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),N.useEffect(()=>{if(d!==`system`){ee(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?ee(`dark`):ee(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{ee(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{ee(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),N.useEffect(()=>{S.length<=1&&k(!1)},[S]),N.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;k(!0),(t=P.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===P.current||P.current?.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),N.useEffect(()=>{if(P.current)return()=>{te.current&&(te.current.focus({preventScroll:!0}),te.current=null,ne.current=!1)}},[P.current]),N.createElement(`section`,{ref:t,"aria-label":b??`${x} ${F}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},T.map((t,n)=>{let[i,a]=t.split(`-`);return w.length?N.createElement(`ol`,{key:t,dir:_===`auto`?nH():_,tabIndex:-1,ref:P,className:c,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${E[0]?.height||0}px`,"--width":`${zie}px`,"--gap":`${v}px`,...m,...Gie(l,u)},onBlur:e=>{ne.current&&!e.currentTarget.contains(e.relatedTarget)&&(ne.current=!1,te.current&&=(te.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ne.current||(ne.current=!0,te.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{A||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||j(!0)},onPointerUp:()=>j(!1)},w.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>N.createElement(Wie,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:A,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:re,toasts:w.filter(e=>e.position==n.position),heights:E.filter(e=>e.position==n.position),setHeights:D,expandByDefault:o,gap:v,expanded:O,swipeDirections:e.swipeDirections}))):null}))}),qie=(e,t)=>()=>{let n=GR(_z(e),t);return Bj((e,t)=>H(Nk(e,e=>n(e))))},Jie={"~effect/Match/Matcher":{_input:fy,_filters:fy,_result:fy,_return:fy,_flavor:fy},_tag:`ValueMatcher`,add(e){return hC(this.value)?this:e._tag===`When`&&e.guard(this.provided)===!0||e._tag===`Not`&&e.guard(this.provided)===!1?rH(this.provided,dC(e.evaluate(this.provided))):this},pipe(){return ly(this,arguments)}};function rH(e,t){let n=Object.create(Jie);return n.provided=e,n.value=t,n}var Yie=(e,t)=>({_tag:`When`,guard:e,evaluate:t}),iH=e=>{if(typeof e==`function`)return e;if(Array.isArray(e)){let t=e.map(iH),n=t.length;return e=>{if(!Array.isArray(e))return!1;for(let r=0;r<n;r++)if(t[r](e[r])===!1)return!1;return!0}}if(typeof e==`object`&&e){let t=Reflect.ownKeys(e).map(t=>[t,iH(e[t])]),n=t.length;return e=>{if(typeof e!=`object`||!e)return!1;for(let r=0;r<n;r++){let[n,i]=t[r];if(!(n in e)||i(e[n])===!1)return!1}return!0}}return t=>t===e},Xie=e=>rH(e,fC(e)),Zie=(e,t)=>n=>n.add(Yie(iH(e),t)),Qie=e=>t=>{let n=$ie(t);return Zee(n)?n._tag===`Success`?n.success:e(n.failure):(...t)=>{let r=n(...t);return hC(r)?r.success:e(r.failure,...t)}},$ie=e=>{if(e._tag===`ValueMatcher`)return e.value;let t=e.cases.length;if(t===1){let t=e.cases[0];return(...n)=>{let r=e.select(...n);return t._tag===`When`&&t.guard(r)===!0||t._tag===`Not`&&t.guard(r)===!1?dC(t.evaluate(r,...n)):fC(r)}}return(...n)=>{let r=e.select(...n);for(let i=0;i<t;i++){let t=e.cases[i];if(t._tag===`When`&&t.guard(r)===!0||t._tag===`Not`&&t.guard(r)===!1)return dC(t.evaluate(r,...n))}return fC(r)}},aH=Xie,oH=Zie,sH=Qie,cH=`~effect/http/HttpBody`,eae=e=>zy(e,cH),lH=class{[cH];constructor(){this[cH]=cH}[Mb](){return this.toJSON()}toString(){return Ob(this,{ignoreToString:!0})}},tae=new class extends lH{_tag=`Empty`;toJSON(){return{_id:`effect/HttpBody`,_tag:`Empty`}}},uH=class extends lH{_tag=`Uint8Array`;contentType;contentLength;text;_body;constructor(e,t,n,r){super(),this._body=e,this.text=r,this.contentType=t,this.contentLength=n}get body(){return this._body??=rae(this.text)}toJSON(){return{_id:`effect/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}}},nae=(e,t)=>new uH(e,t??`application/octet-stream`,e.length),dH=new TextEncoder,fH=globalThis.Buffer,rae=fH===void 0?e=>dH.encode(e):e=>fH.from(e,`utf8`),pH=(e,t)=>{if(typeof e!=`string`&&(e=e===void 0?``:String(e)),fH!==void 0)return new uH(void 0,t??`text/plain`,fH.byteLength(e,`utf8`),e);let n=dH.encode(e);return new uH(n,t??`text/plain`,n.length,e)},iae=(e,t)=>pH(iP(XN(e)),t??`application/x-www-form-urlencoded`),aae=class extends lH{_tag=`FormData`;contentType=void 0;contentLength=void 0;formData;constructor(e){super(),this.formData=e}toJSON(){return{_id:`effect/HttpBody`,_tag:`FormData`,formData:this.formData}}},oae=e=>new aae(e),mH=`~effect/http/HttpClientError`,sae=e=>zy(e,mH),hH=class extends gw(`HttpClientError`){constructor(e){`cause`in e.reason?super({...e,cause:e.reason.cause}):super(e)}[mH]=mH;get request(){return this.reason.request}get response(){return`response`in this.reason?this.reason.response:void 0}get message(){return this.reason.message}},gH=e=>e.endsWith(`Error`)?e.slice(0,-5):e,_H=(e,t,n)=>t?`${e}: ${t} (${n})`:`${e} error (${n})`,cae=class extends gw(`TransportError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return _H(gH(this._tag),this.description,this.methodAndUrl)}},lae=class extends gw(`InvalidUrlError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return _H(gH(this._tag),this.description,this.methodAndUrl)}},uae=class extends gw(`StatusCodeError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let e=`${this.response.status} ${this.methodAndUrl}`;return _H(gH(this._tag),this.description,e)}},vH=class extends gw(`DecodeError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let e=`${this.response.status} ${this.methodAndUrl}`;return _H(gH(this._tag),this.description,e)}},yH=class extends gw(`EmptyBodyError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let e=`${this.response.status} ${this.methodAndUrl}`;return _H(gH(this._tag),this.description,e)}},bH=e=>e!==`GET`&&e!==`HEAD`&&e!==`OPTIONS`&&e!==`TRACE`,xH=[[`GET`,`get`],[`POST`,`post`],[`PUT`,`put`],[`DELETE`,`del`],[`PATCH`,`patch`],[`HEAD`,`head`],[`OPTIONS`,`options`],[`TRACE`,`trace`],[`QUERY`,`query`]],SH=(e,t)=>t._tag===`Empty`||t._tag===`FormData`?HN(HN(e,`content-type`),`content-length`):(e=t.contentType===void 0?HN(e,`content-type`):zN(e,`content-type`,t.contentType),t.contentLength===void 0?HN(e,`content-length`):zN(e,`content-length`,t.contentLength.toString())),CH=class extends gw(`UrlError`){},wH=(e,t,n)=>pC({try:()=>{let r=new URL(e,TH());for(let e=0;e<t.params.length;e++){let[n,i]=t.params[e];i!==void 0&&r.searchParams.append(n,i)}return n!==void 0&&(r.hash=n),r},catch:e=>new CH({cause:e})}),TH=()=>{if(`location`in globalThis&&globalThis.location!==void 0&&globalThis.location.origin!==void 0&&globalThis.location.pathname!==void 0)return location.origin+location.pathname},EH=`~effect/http/HttpClientRequest`,DH={[EH]:EH,...Pb,toJSON(){return{_id:`HttpClientRequest`,method:this.method,url:this.url,urlParams:this.urlParams,hash:this.hash,headers:wb(this.headers),body:this.body.toJSON()}},pipe(){return ly(this,arguments)}};function OH(e,t,n,r,i,a){let o=Object.create(DH);return o.method=e,o.url=t,o.urlParams=n,o.hash=r,o.headers=i,o.body=a,o}var kH=OH(`GET`,``,eP,SS(),IN,tae),AH=e=>(t,n)=>jH(kH,{method:e,url:t,...n??void 0}),jH=B(2,(e,t)=>{let n=e;return t.method&&(n=MH(n,t.method)),t.url&&(n=LH(n,t.url)),t.headers&&(n=PH(n,t.headers)),t.urlParams&&(n=BH(n,t.urlParams)),t.hash&&(n=HH(n,t.hash)),t.body&&(n=UH(n,t.body)),t.accept&&(n=FH(n,t.accept)),t.acceptJson&&(n=IH(n)),n}),MH=B(2,(e,t)=>OH(t,e.url,e.urlParams,e.hash,e.headers,e.body)),NH=B(3,(e,t,n)=>OH(e.method,e.url,e.urlParams,e.hash,zN(e.headers,t,n),e.body)),PH=B(2,(e,t)=>OH(e.method,e.url,e.urlParams,e.hash,BN(e.headers,t),e.body)),FH=B(2,(e,t)=>NH(e,`Accept`,t)),IH=FH(`application/json`),LH=B(2,(e,t)=>{if(typeof t==`string`)return OH(e.method,t,e.urlParams,e.hash,e.headers,e.body);let n=new URL(t.toString()),r=XN(n.searchParams),i=AS(n.hash===``?void 0:n.hash.slice(1));return n.search=``,n.hash=``,OH(e.method,n.toString(),r,i,e.headers,e.body)}),RH=B(2,(e,t)=>t===``?e:OH(e.method,zH(t,e.url),e.urlParams,e.hash,e.headers,e.body)),zH=(e,t)=>{let n=e.endsWith(`/`),r=t.startsWith(`/`);return n&&r?e+t.slice(1):!n&&!r?e+`/`+t:e+t},BH=B(2,(e,t)=>OH(e.method,e.url,nP(e.urlParams,t),e.hash,e.headers,e.body)),VH=B(2,(e,t)=>OH(e.method,e.url,rP(e.urlParams,t),e.hash,e.headers,e.body)),HH=B(2,(e,t)=>OH(e.method,e.url,e.urlParams,CS(t),e.headers,e.body)),UH=B(2,(e,t)=>OH(e.method,e.url,e.urlParams,e.hash,SH(e.headers,t),t)),WH=B(2,(e,t)=>UH(e,oae(t)));function GH(e){let t=wH(e.url,e.urlParams,MS(e.hash));return hC(t)?CS(t.success):SS()}var KH=`~effect/http/HttpIncomingMessage`,qH=(e,t)=>{let n=e.headers[`content-type`]??``,r;if(n.includes(`application/json`))try{r=pA(e.json)}catch{}else if(n.includes(`text/`)||n.includes(`urlencoded`))try{r=pA(e.text)}catch{}let i={...t,headers:wb(e.headers),remoteAddress:e.remoteAddress};return r!==void 0&&(i.body=r),i},JH=`~effect/http/HttpClientResponse`,YH=(e,t)=>new XH(e,t),XH=class extends zee{[KH];[JH];request;source;constructor(e,t){super(),this.request=e,this.source=t,this[KH]=KH,this[JH]=JH}toJSON(){return qH(this,{_id:`HttpClientResponse`,request:this.request.toJSON(),status:this.status})}get status(){return this.source.status}get url(){if(this.source.url)return this.source.url.split(`#`)[0];let e=GH(this.request);return TS(e)?``:(e.value.hash=``,e.value.href)}get headers(){return LN(this.source.headers)}cachedCookies;get cookies(){return this.cachedCookies?this.cachedCookies:this.cachedCookies=bN(this.source.headers.getSetCookie())}get remoteAddress(){return SS()}get stream(){return this.source.body?LM({evaluate:()=>this.source.body,onError:e=>new hH({reason:new vH({request:this.request,response:this,cause:e})})}):PM(new hH({reason:new yH({request:this.request,response:this,description:`can not create stream from empty body`})}))}get json(){return Nk(this.text,e=>Ak({try:()=>e===``?null:JSON.parse(e),catch:e=>new hH({reason:new vH({request:this.request,response:this,cause:e})})}))}textBody;get text(){return this.textBody??=Lk(this.arrayBuffer,e=>new TextDecoder().decode(e))}get urlParamsBody(){return Nk(this.text,e=>Ak({try:()=>XN(new URLSearchParams(e)),catch:e=>new hH({reason:new vH({request:this.request,response:this,cause:e})})}))}formDataBody;get formData(){return this.formDataBody??=vk({try:()=>this.source.formData(),catch:e=>new hH({reason:new vH({request:this.request,response:this,cause:e})})}).pipe(Qk,pA)}arrayBufferBody;get arrayBuffer(){return this.arrayBufferBody||=vk({try:()=>this.source.arrayBuffer(),catch:e=>new hH({reason:new vH({request:this.request,response:this,cause:e})})}).pipe(Qk,pA),this.arrayBufferBody}pipe(){return ly(this,arguments)}},ZH=e=>RN({b3:`${e.traceId}-${e.spanId}-${e.sampled?`1`:`0`}${DS(e.parent,{onNone:()=>``,onSome:e=>`-${e.spanId}`})}`,traceparent:`00-${e.traceId}-${e.spanId}-${e.sampled?`01`:`00`}`}),QH=`~effect/http/HttpClient`,$H=zS(`effect/HttpClient`),eU=B(2,(e,t)=>tU(n=>t(e.postprocess(n)),e.preprocess)),tU=(e,t)=>{let n=Object.create(nU);return n.preprocess=t,n.postprocess=e,n.execute=function(n){return e(t(n))},n},nU={[QH]:QH,pipe(){return ly(this,arguments)},...Pb,toJSON(){return{_id:`effect/HttpClient`}},...Object.fromEntries(xH.map(([e,t])=>[t,function(t,n){return this.execute(AH(e)(t,n))}]))},rU=e=>tU(t=>Nk(t,t=>jk(n=>{let r=fU.get(t),i=r??new AbortController,a=wH(t.url,t.urlParams,MS(t.hash));if(mC(a))return Ek(new hH({reason:new lae({request:t,cause:a.failure})}));let o=a.success;if(n.getRef(Dw)||n.getRef(oU)(t)){let a=e(t,o,i.signal,n);return r?a:nA(e=>Wk(e(a),{onSuccess(e){return dU.register(e,i),H(new pU(e,i))},onFailure(e){return OO(e)&&i.abort(),Dk(e)}}))}return iA(n.getRef(lU)(t),{kind:`client`},a=>{a.attribute(`http.request.method`,t.method),a.attribute(`server.address`,o.origin),o.port!==``&&a.attribute(`server.port`,+o.port),a.attribute(`url.full`,o.toString()),a.attribute(`url.path`,o.pathname),a.attribute(`url.scheme`,o.protocol.slice(0,-1));let s=o.search.slice(1);s!==``&&a.attribute(`url.query`,s);let c=n.getRef(GN),l=n.getRef(sU);for(let e in t.headers)l(e,`request`)&&a.attribute(`http.request.header.${e}`,WN(e,c)?`<redacted>`:t.headers[e]);return t=n.getRef(cU)?PH(t,ZH(a)):t,nA(s=>s(e(t,o,i.signal,n)).pipe(aA(a,{captureStackTrace:!1}),Wk({onSuccess:e=>{a.attribute(`http.response.status_code`,e.status);for(let t in e.headers)l(t,`response`)&&a.attribute(`http.response.header.${t}`,WN(t,c)?`<redacted>`:e.headers[t]);return r?H(e):(dU.register(e,i),H(new pU(e,i)))},onFailure(e){return!r&&OO(e)&&i.abort(),Dk(e)}})))})})),H),iU=B(2,(e,t)=>tU(e.postprocess,n=>Lk(e.preprocess(n),t))),aU=B(2,(e,t)=>tU(e.postprocess,n=>Nk(e.preprocess(n),t))),oU=cC(`effect/http/HttpClient/TracerDisabledWhen`,{defaultValue:()=>hy}),sU=cC(`effect/http/HttpClient/TracerHeaderFilter`,{defaultValue:()=>my}),cU=cC(`effect/http/HttpClient/TracerPropagationEnabled`,{defaultValue:my}),lU=cC(`effect/http/HttpClient/SpanNameGenerator`,{defaultValue:()=>e=>`http.client ${e.method}`}),uU=e=>nk($H)(Kk(t=>Lk(e,e=>eU(e,Jk(e=>sC(t,e)))))),dU=(()=>{if(`FinalizationRegistry`in globalThis&&globalThis.FinalizationRegistry){let e=new FinalizationRegistry(e=>{e.abort()});return{register(t,n){e.register(t,n,t)},unregister(t){e.unregister(t)}}}let e=new Map;return{register(t,n){e.set(t,setTimeout(()=>n.abort(),5e3))},unregister(t){let n=e.get(t);n!==void 0&&(clearTimeout(n),e.delete(t))}}})(),fU=new WeakMap,pU=class{original;controller;constructor(e,t){this.original=e,this.controller=t}[JH]=JH;[KH]=KH;applyInterrupt(e){return bk(()=>(dU.unregister(this.original),eA(e,()=>xk(()=>{this.controller.abort()}))))}get request(){return this.original.request}get url(){return this.original.url}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 NM(()=>(dU.unregister(this.original),WM(this.original.stream,xk(()=>{this.controller.abort()}))))}toJSON(){return this.original.toJSON()}[Mb](){return this.original[Mb]()}pipe(){return ly(this,arguments)}},mU=cC(`effect/http/FetchHttpClient/Fetch`,{defaultValue:()=>globalThis.fetch}),hU=class extends zS()(`effect/http/FetchHttpClient/RequestInit`){},gU=uU(H(rU((e,t,n,r)=>{let i=r.getRef(mU),a=nC(r.context,hU)??{},o=a.headers?VN(LN(a.headers),e.headers):e.headers;o[`content-length`]&&(o=HN(o,`content-length`));let s=r=>Lk(vk({try:()=>i(t,{...a,method:e.method,headers:o,body:r,duplex:typeof ReadableStream<`u`&&r instanceof ReadableStream?`half`:void 0,signal:n}),catch:t=>new hH({reason:new cae({request:e,cause:t})})}),t=>YH(e,t));switch(e.body._tag){case`Raw`:case`Uint8Array`:return s(e.body.body);case`FormData`:return s(e.body.formData);case`Stream`:return Nk(YM(e.body.stream),s)}return s(void 0)})));({...Zb});var _U=new Uint8Array(256);for(let e of"!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")_U[e.charCodeAt(0)]=1;var vU=new Uint8Array(256);vU[9]=1;for(let e=32;e<=126;e++)vU[e]=1;for(let e=128;e<=255;e++)vU[e]=1;var yU=zS(`effect/http/HttpServerRequest`),bU=new WeakSet,xU=e=>jk(t=>{let n=iC(t.context,yU);return bU.add(n.source),e}),SU=zS(`effect/http/HttpRouter`),CU=e=>e.endsWith(`/`)?e.slice(0,-1):e,wU=B(2,(e,t)=>(t=CU(t),e===`*`?`${t}/*`:e===`/`?t:t+e)),TU=`~effect/http/HttpRouter/Middleware`,EU=function(){return arguments.length===0?DU:DU(arguments[0],arguments[1])},DU=(e,t)=>t?.global?ene(Tk(function*(){let t=yield*SU,n=gk(e)?yield*e:e;yield*t.addGlobalMiddleware(n)})):new AU(gk(e)?ik(Lk(e,e=>QS(new Map([[kU,e]])))):tk(QS(new Map([[kU,e]])))),OU=0,kU=`effect/http/HttpRouter/MiddlewareFn`,AU=class e{[TU]={};layerFn;dependencies;constructor(e,t){this.layerFn=e,this.dependencies=t;let n=`effect/http/HttpRouter/Middleware-${++OU}`;this.layer=ik(Tk({self:this},function*(){let e=yield*Gk(),t=[rC(e,kU)];if(this.dependencies){let n=yield*$O,r=aC(e,BO),i=yield*ek(this.dependencies,n,r);t.push(...MU(i))}return QS(new Map([[n,t]]))})).pipe(sk(this.layerFn))}layer;combine(t){return new e(this.layerFn,this.dependencies?ck(this.dependencies,t.layer):t.layer)}},jU=new WeakMap,MU=e=>{let t=jU.get(e);if(t)return t;let n=TC(),r=0;for(let[t,i]of e.mapUnsafe)t.startsWith(`effect/http/HttpRouter/Middleware-`)&&(n.push(i),i.length>r&&(r=i.length));if(n.length===0)t=[];else{let e=new Set;for(let t=r-1;t>=0;t--)for(let r of n)t<r.length&&e.add(r[t]);t=yC(e).reverse()}return jU.set(e,t),t};EU(xU).layer;var NU={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,OK:200,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511},PU=e=>NU[e],FU=`~effect/encoding/Sse/SseError`,IU=class extends gw(`EventTooLarge`){get message(){return`Pending SSE event exceeded the maximum size of ${this.maxEventSize}`}},LU=class extends gw(`SseError`){[FU]=FU;get message(){return this.reason.message}},RU=10485760,zU=e=>Bj((t,n)=>xk(()=>{let n=[],r,i=VU(e=>{e._tag===`Retry`?r=e:n.push(e)},e),a=Nk(t,e=>{for(let t=0;t<e.length;t++){let n=i.feed(e[t]);if(n!==void 0)return Ek(n)}return Sk});return bk(function e(){if(CC(n)){let e=n;return n=[],H(e)}return r?Ek(r):Nk(a,e)})})),BU=(e,t,n)=>Kj(zU(t),qie(UU.pipe(Ez(e,WU)),n)());function VU(e,t){let n=t?.maxEventSize??RU,r,i,a,o,s,c,l,u;return d(),{feed:f,reset:d};function d(){r=!0,i=``,a=0,o=-1,s=!1,c=void 0,l=void 0,u=``}function f(e){i=i?i+e:e,r&&i.startsWith(HU)&&(i=i.slice(HU.length)),r=!1;let t=i.length,c=0;for(;c<t;){s&&=(i[c]===`
58
+ `&&++c,!1);let e=-1,n=o,r;for(let o=c+a;e<0&&o<t;++o)r=i[o],r===`:`&&n<0?n=o-c:r===`\r`?(s=!0,e=o-c):r===`
59
+ `&&(e=o-c);if(e<0){a=t-c,o=n;break}a=0,o=-1,p(i,c,n,e),c+=e+1}if(c===t?i=``:c>0&&(i=i.slice(c)),i.length+u.length>n){let e=new LU({reason:new IU({maxEventSize:n})});return d(),e}}function p(t,n,r,i){if(i===0){u.length>0&&(e({_tag:`Event`,id:c,event:l||`message`,data:u.slice(0,-1)}),u=``),l=void 0;return}let a=r<0,o=t.slice(n,n+(a?i:r)),s=0;s=a?i:t[n+r+1]===` `?r+2:r+1;let d=n+s,f=i-s,p=t.slice(d,d+f).toString();o===`data`?u+=p?`${p}\n`:`
60
+ `:o===`event`?l=p:o===`id`&&!p.includes(`\0`)?c=p:o===`retry`&&/^\d+$/.test(p)&&e(new KU({duration:HC(parseInt(p,10)),lastEventId:c}))}}var HU=``,UU=K({_tag:Pz(`Event`),id:Sz(W),event:W,data:W}),WU=QP({decode:e=>e.id===void 0?{event:e.event,data:e.data}:{id:e.id,event:e.event,data:e.data},encode:e=>({_tag:`Event`,id:e.id,event:e.event??`message`,data:e.data})}),GU=`~effect/encoding/Sse/Retry`,KU=class e extends pw(`Retry`){[GU]=GU;static is(e){return zy(e,GU)}static filter(t){return e.is(t)?dC(t):fC(t)}},qU=`~effect/http-api/HttpApiSchema/Stream`;function JU(e){let t=typeof e==`string`?PU(e):e;return e=>e.annotate({httpApiStatus:t})}var YU=(e=>dz.pipe(JU(e)))(204),XU=e=>tz(e)&&zy(e,qU),ZU=e=>XU(e)&&e._tag===`StreamSse`,QU=e=>XU(e)&&e._tag===`StreamUint8Array`,$U=`~effect/http-api/HttpApiSchema/WithHeaders`,eW=`~effect/http-api/HttpApiSchema/WithHeadersValue`,tW=e=>({[eW]:eW,body:e.body,headers:e.headers}),nW=e=>tz(e)&&zy(e,`~effect/http-api/HttpApiSchema/WithHeaders`);function rW(e,t,n){return ez(e.ast,{[$U]:$U,schema:t,headers:n})}function iW(e,t){return e.annotate({"~httpApiEncoding":{_tag:t._tag,contentType:t.contentType??aW(t._tag)}})}function aW(e){switch(e){case`Multipart`:return`multipart/form-data`;case`Json`:return`application/json`;case`FormUrlEncoded`:return`application/x-www-form-urlencoded`;case`Uint8Array`:return`application/octet-stream`;case`Text`:return`text/plain`}}function oW(e){return t=>iW(t,{_tag:`FormUrlEncoded`,...e})}var sW=e=>{if(aF(e)||aF(nL(e)))return!0;let t=e.encoding?.[0].to;return t!==void 0&&aF(t)},cW=vL(`~httpApiEncoding`),lW=vL(`~httpApiWithHeaders`),uW=vL(`httpApiStatus`),dW={_tag:`Json`,contentType:`application/json`},fW={_tag:`FormUrlEncoded`,contentType:`application/x-www-form-urlencoded`};function pW(e){return cW(e)??dW}function mW(e,t){return cW(e)||(bH(t)?dW:fW)}function hW(e){let t=pW(e);if(t._tag===`Multipart`)throw Error(`Multipart is not supported in response`);return t}function gW(e){return uW(e)??200}function _W(e){return nW(e)?uW(e.ast)??gW(e.schema.ast):gW(e.ast)}function vW(e){return nW(e)&&cW(e.ast)===void 0?hW(e.schema.ast):hW(e.ast)}function yW(e){return uW(e)??500}function bW(e){return nW(e)?uW(e.ast)??yW(e.schema.ast):yW(e.ast)}function xW(e){let t=e.toLowerCase().trim(),n=t.indexOf(`;`);return n===-1?t:t.slice(0,n).trim()}var SW=`~effect/http-api/HttpApiEndpoint`;function CW(e){let t=[];for(let{schemas:n}of e.payload.values())t.push(...n);return t}function wW(e){let t=Array.from(e.success);return CC(t)?t:[YU]}function TW(e){let t=new Set(e.error),n=e.disableCodecs?fy:PW;for(let r of e.middlewares){let e=r;for(let r of e.error)t.add(n(r))}return Array.from(t)}var EW={[SW]:SW,pipe(){return ly(this,arguments)},prefix(e){return OW({...DW(this),path:wU(this.path,e)})},middleware(e){return OW({...DW(this),middlewares:new Set([...this.middlewares,e])})},annotate(e,t){return OW({...DW(this),annotations:tC(this.annotations,e,t)})},annotateMerge(e){return OW({...DW(this),annotations:sC(this.annotations,e)})}},DW=e=>({identifier:e.identifier,path:e.path,method:e.method,params:e.params,query:e.query,headers:e.headers,payload:e.payload,success:e.success,error:e.error,annotations:e.annotations,middlewares:e.middlewares,disableCodecs:e.disableCodecs});function OW(e){function t(){}return Object.setPrototypeOf(t,EW),Object.assign(t,e)}var kW=e=>(t,n,r)=>{let i=r?.disableCodecs??!1,a=i?fy:AB;return OW({identifier:t,path:n,method:e,params:AW(r?.params,a),query:AW(r?.query,a),headers:AW(r?.headers,a),payload:jW(r?.payload,e,i),success:NW(r?.success,e,i),error:FW(r?.error,i),annotations:$S(),middlewares:new Set,disableCodecs:i})};function AW(e,t){if(e!==void 0)return tz(e)?t(e):t(K(e))}function jW(e,t,n){let r=new Map;if(e===void 0)return r;let i=Array.isArray(e)?e:tz(e)?[e]:[K(e).pipe(oW())],a=n?fy:GW;for(let e of i){let n=mW(e.ast,t),i=xW(n.contentType),o=r.get(i);if(o){if(o.encoding._tag!==n._tag)throw Error(`Multiple payload encodings for content-type: ${n.contentType}`);if(o.encoding._tag===`Multipart`)throw Error(`Multiple multipart payloads for content-type: ${n.contentType}`);o.schemas.push(a(e,t))}else r.set(i,{encoding:n,schemas:[a(e,t)]})}return r}var MW=`effect/http-api/stream/failure`;function NW(e,t,n){if(e===void 0)return new Set;let r=bC(e);return IW(r,t),new Set(n?r:r.map(PW))}var PW=yy(e=>XU(e)?e:nW(e)?rW(e,XU(e.schema)?e.schema:WW(e.schema,vW(e)),AB(e.headers)):UW(e));function FW(e,t){if(e===void 0)return new Set;let n=bC(e);for(let e of n)if(XU(nW(e)?e.schema:e))throw Error(`Streaming schemas are not supported in error responses`);return RW(n,bW),new Set(t?n:n.map(PW))}function IW(e,t){let n=!1,r=new Map;for(let i of e){let e=nW(i)?i.schema:i,a=_W(i);if(XU(e)){if(zW(e,t),n)throw Error(`Multiple streaming success responses are not supported`);n=!0;let i=LW(r,a);if(i.noContent)throw Error(`Cannot combine no-content and streaming success responses for status: ${a}`);if(i.bufferedContentTypes.has(xW(e.contentType)))throw Error(`Cannot combine buffered and streaming success responses for status ${a} and content-type: ${e.contentType}`);r.set(a,{...i,stream:e})}else{let t=LW(r,a),n=sW(e.ast);if(t.stream!==void 0){if(n)throw Error(`Cannot combine no-content and streaming success responses for status: ${a}`);let e=vW(i);if(xW(e.contentType)===xW(t.stream.contentType))throw Error(`Cannot combine buffered and streaming success responses for status ${a} and content-type: ${e.contentType}`)}n||t.bufferedContentTypes.add(xW(vW(i).contentType)),t.noContent=t.noContent||n}}RW(e,_W)}function LW(e,t){let n=e.get(t);return n===void 0&&(n={bufferedContentTypes:new Set,noContent:!1},e.set(t,n)),n}function RW(e,t){let n=new Map;for(let r of e){let e=t(r),i=lW(r.ast),a=nW(r)?r.schema:i?.body??r,o=sW(a.ast)?``:xW(XU(a)?a.contentType:vW(r).contentType),s=n.get(e);s===void 0&&(s={headerContentType:void 0,plainContentTypes:new Set},n.set(e,s));let c=()=>Error(`Cannot combine a response with headers with another response for status ${e} and content-type: ${o||`<no content>`}`);if(nW(r)||i!==void 0){if(s.headerContentType!==void 0)throw Error(`Cannot declare multiple responses with headers for status ${e}`);if(s.plainContentTypes.has(o))throw c();s.headerContentType=o}else{if(s.headerContentType===o)throw c();s.plainContentTypes.add(o)}}}function zW(e,t){if(t===`HEAD`)throw Error(`HEAD endpoints cannot declare streaming success responses`);if(ZU(e)&&BW(e.events.ast))throw Error(`SSE event name is reserved: ${MW}`)}function BW(e){return VW(nL(e),new Set)}function VW(e,t){if(t.has(e))return!1;if(t.add(e),dF(e))return e.types.some(e=>VW(e,t));if(fF(e))return VW(e.thunk(),t);if(!uF(e))return!1;let n=e.propertySignatures.find(e=>e.name===`event`);return n!==void 0&&HW(n.type,t)}function HW(e,t){if(t.has(e))return!1;t.add(e);let n=nL(e);return n===e?sF(e)?e.literal===MW:dF(e)?e.types.some(e=>HW(e,t)):fF(e)?HW(e.thunk(),t):!1:HW(n,t)}function UW(e){let t=hW(e.ast),n=lW(e.ast);return n===void 0?WW(e,t):e.annotate({"~httpApiWithHeaders":{...n,bodyCodec:WW(n.body,t),headersCodec:AB(n.headers)}})}function WW(e,t){switch(t._tag){case`Json`:return kB(e);case`FormUrlEncoded`:return AB(e);case`Text`:case`Uint8Array`:return e}}function GW(e,t){switch(mW(e.ast,t)._tag){case`Json`:return kB(e);case`FormUrlEncoded`:return AB(e);case`Text`:case`Uint8Array`:case`Multipart`:return e}}var KW=kW(`GET`),qW=kW(`POST`),JW=kW(`PUT`),YW=kW(`DELETE`),XW=`~effect/http-api/HttpApi`,ZW={[XW]:XW,pipe(){return ly(this,arguments)},add(...e){let t={...this.groups};for(let n of e)zb(t,n.identifier,n);return $W({...QW(this),groups:t})},addHttpApi(e){let t={...this.groups};for(let n of Object.keys(e.groups)){let r=e.groups[n];zb(t,n,r.annotateMerge(sC(e.annotations,r.annotations)))}return $W({...QW(this),groups:t})},prefix(e){return $W({...QW(this),groups:gC(this.groups,t=>t.prefix(e))})},middleware(e){return $W({...QW(this),groups:gC(this.groups,t=>t.middleware(e))})},annotate(e,t){return $W({...QW(this),annotations:tC(this.annotations,e,t)})},annotateMerge(e){return $W({...QW(this),annotations:sC(this.annotations,e)})}},QW=e=>({identifier:e.identifier,groups:e.groups,annotations:e.annotations}),$W=e=>{function t(){}return Object.setPrototypeOf(t,ZW),Object.assign(t,e)},eG=e=>$W({identifier:e,groups:{},annotations:$S()}),tG=(e,t)=>{let n=Object.values(e.groups);for(let r of n){let n=sC(e.annotations,r.annotations);t.onGroup({group:r,mergedAnnotations:n});let i=Object.values(r.endpoints);for(let e of i)(!t.predicate||t.predicate({endpoint:e,group:r}))&&t.onEndpoint({group:r,endpoint:e,middleware:e.middlewares,mergedAnnotations:sC(n,e.annotations),successes:nG(wW(e),_W),errors:nG(TW(e),bW)})}},nG=(e,t)=>{let n=new Map;return e.forEach(r),n;function r(e){if(XU(nW(e)?e.schema:e))return;let r=t(e),i=n.get(r);i===void 0?n.set(r,[e]):i.push(e)}},rG=class extends zS()(`effect/http-api/HttpApi/ParseOptions`){},iG=class extends zS()(`effect/http-api/HttpApi/ParamsParseOptions`){},aG=class extends zS()(`effect/http-api/HttpApi/QueryParseOptions`){},oG=class extends zS()(`effect/http-api/HttpApi/HeadersParseOptions`){},sG=class extends zS()(`effect/http-api/HttpApi/PayloadParseOptions`){},cG=class extends zS()(`effect/http-api/HttpApi/SuccessParseOptions`){},lG=class extends zS()(`effect/http-api/HttpApi/ErrorParseOptions`){},uG=e=>{let t=nC(e,rG);return{params:nC(e,iG)??t,query:nC(e,aG)??t,headers:nC(e,oG)??t,payload:nC(e,sG)??t,success:nC(e,cG)??t,error:nC(e,lG)??t}},dG=`~effect/http-api/HttpApiMiddleware`,fG=`~effect/http-api/HttpApiMiddleware/Security`,pG=()=>(e,t)=>{let n=Fb(),r;n!==0&&(Ib(2),r=new globalThis.Error,Ib(n));class i extends zS()(e){}let a=i;if(Object.defineProperty(i,"stack",{get(){return r?.stack}}),a[dG]=dG,a.error=mG(t?.error),a.requiredForClient=t?.requiredForClient??!1,t?.security!==void 0){if(Object.keys(t.security).length===0)throw Error(`HttpApiMiddleware.Service: security object must not be empty`);a[fG]=fG,a.security=t.security}return a};function mG(e){return e===void 0?new Set:new Set(Array.isArray(e)?e:[e])}var hG=(e,t)=>ik(Tk(function*(){let n=(yield*Gk()).pipe(Xee(BO)),r=gk(t)?yield*t:t;return QS(new Map([[`${e.key}/Client`,e=>Jk(r(e),e=>sC(n,e))]]))})),gG=new Set;function _G(e){if(e===void 0)return gG;let t=MI(e.ast);return uF(t)&&t.indexSignatures.length===0?new Set(t.propertySignatures.map(e=>String(e.name))):void 0}var vG=(e,t)=>Tk(function*(){let n=yield*Gk(),r=t.httpClient.pipe(t?.baseUrl===void 0?fy:iU(RH(t.baseUrl.toString())));function i(e,t,a,o,s){if(s===-1)return r.execute(a);let c=n.mapUnsafe.get(o[s]);return c===void 0?i(e,t,a,o,s-1):c({endpoint:t,group:e,request:a,next(n){return i(e,t,n,o,s-1)}})}tG(e,{predicate:t?.predicate,onGroup(e){t.onGroup?.(e)},onEndpoint(e){let{group:n,endpoint:r,errors:a,successes:o,mergedAnnotations:s}=e,c=uG(s),l=SG(r.path,r.params),u={orElse:HG},d=new Map;for(let[e,t]of a.entries()){let n=OG(t);for(let[t,r]of n.entries())EG(d,e,t,CG(r,c.error,c.headers))}for(let[e,t]of d.entries()){let n=DG(t);u[e]=e=>Nk(Vk(n(e),t=>Dk(Ite(CO(new hH({reason:new uae({request:e.request,response:e})})),t))),Ek)}let f=new Map;for(let[e,t]of o.entries()){let n=OG(t);for(let[t,r]of n.entries())EG(f,e,t,CG(r,c.success,c.headers))}for(let e of MG(r)){let t=jG(e)?e.schema:e;EG(f,_W(e),t.contentType,NG(e,c.success,c.headers))}for(let[e,t]of f.entries())u[e]=DG(t);let p=RB(r.params,e=>ZR(e,c.params)),m=CW(r),h=CC(m)?ZR(bH(r.method)?WG(m,r.method):yz(m),c.payload):void 0,g=RB(r.headers,e=>ZR(e,c.headers)),_=RB(r.query,e=>ZR(e,c.query)),v=Array.from(e.middleware,e=>`${e.key}/Client`),y=hA(function*(e){let a=AH(r.method)(r.path);if(e!==void 0){if(p!==void 0){let t=yield*p(e.params);a=LH(a,l(t))}if(h!==void 0){if(bH(r.method)){if(e.payload instanceof FormData)a=WH(a,e.payload);else{let t=yield*h(e.payload);a=UH(a,t)}}else{let t=yield*h(e.payload);a=VH(a,t)}}if(g!==void 0){let t=yield*g(e.headers);a=PH(a,t)}if(_!==void 0){let t=yield*_(e.query);a=VH(a,t)}}let o=yield*i(n,r,a,v,v.length-1);if(e?.responseMode===`response-only`)return o;let s=(u[o.status]??u.orElse)(o,e?.sseOptions),c=yield*t.transformResponse===void 0?s:t.transformResponse(s);return e?.responseMode===`decoded-and-response`?[c,o]:c});t.onEndpoint({...e,endpointFn:y})}})}),yG=(e,t)=>Nk($H,n=>bG(e,{...t,httpClient:t?.transformClient?t.transformClient(n):n})),bG=(e,t)=>{let n={};return vG(e,{...t,onGroup({group:e}){e.topLevel||zb(n,e.identifier,{})},onEndpoint({endpoint:e,endpointFn:t,group:r}){zb(r.topLevel?n:n[r.identifier],e.identifier,t)}}).pipe(Rk(n))},xG=/(\/?):(\w+)(\?)?/g,SG=(e,t)=>{if(t===void 0||!e.includes(`:`))return t=>e;let n=_G(t);return t=>e.replace(xG,(e,r,i,a)=>{if(n!==void 0&&!n.has(i))return e;let o=t[i];if(o===void 0){if(a!==void 0)return``;throw Error(`Missing path parameter: ${i}`)}return`${r}${encodeURIComponent(o)}`})};function CG(e,t,n){let r=e.some(e=>nW(e)||lW(e.ast)!==void 0),i=WR(r?yz(e.map(e=>TG(e,t,n))):BG(e),t);return e=>Nk(e.arrayBuffer,r?t=>i({body:t,headers:e.headers}):i)}var wG=K({body:sz,headers:sz});function TG(e,t,n){let r=lW(e.ast),i=r===void 0?nW(e)?{body:e.schema,headers:e.headers,toValue:tW}:{body:e,headers:sz,toValue:e=>e.body}:{body:r.bodyCodec,headers:r.headersCodec,toValue:r.transformation.decode},a=WR(VG(i.body).pipe(Ez(i.body)),t),o=WR(i.headers,n);return wG.pipe(Ez(nW(e)?e:rz(e),ZP({decode:e=>sne({body:a(e.body),headers:o(e.headers)}).pipe(Lk(i.toValue),Hk(e=>e.issue)),encode:(e,t)=>Ek(new OP({message:`Decode only schema`},e,t))})))}function EG(e,t,n,r){let i=xW(n),a=e.get(t);a===void 0?e.set(t,[{contentType:i,decode:r}]):a.push({contentType:i,decode:r})}function DG(e){let t=e[0];return e.length===1&&t!==void 0?t.decode:(t,n)=>{let r=xW(t.headers[`content-type`]??``),i=e.find(e=>e.contentType===r);return i===void 0?kG(t,r,e):i.decode(t,n)}}function OG(e){let t=new Map;for(let n of e){let e=sW((nW(n)?n.schema:n).ast)?``:xW(vW(n).contentType),r=t.get(e);r===void 0?t.set(e,[n]):r.push(n)}return t}function kG(e,t,n){let r=Array.from(new Set(n.map(e=>e.contentType))).join(`, `);return Ek(new hH({reason:new vH({request:e.request,response:e,description:`Unsupported response content-type for status ${e.status}: ${t||`<missing>`}. Expected one of: ${r}`})}))}var AG=`effect/http-api/stream/failure`,jG=e=>nW(e);function MG(e){let t=[];for(let n of e.success)XU(nW(n)?n.schema:n)&&t.push(n);return t}function NG(e,t,n){let r=jG(e),i=r?e.schema:e,a=QU(i)?void 0:{declaration:i,decoder:PG(i,t)},o=(e,t)=>Lk(Gk(),n=>GM(a===void 0?e.stream:FG(e.stream,a.declaration,a.decoder(t)),n));if(!r)return o;let s=WR(e.headers,n);return(e,t)=>Nk(s(e.headers),n=>Lk(o(e,t),e=>tW({body:e,headers:n})))}function PG(e,t){let n=yz([K({id:U(W),event:az(AG),data:gB(kB(bB(e.error,fB())))}),e.events]),r=BU(n,void 0,t);return e=>e===void 0?r:BU(n,e,t)}function FG(e,t,n){let r=kM(e.pipe(UM,HM(n)),e=>xk(()=>{let t;return bk(()=>t===void 0?Nk(e,e=>{for(let n=0;n<e.length;n++){let r=e[n];if(r.event===AG&&bO(r.data)){if(n===0)return Dk(r.data);t=r.data,e=e.slice(0,n);break}}return H(e)}):Dk(t))}));return t.sseMode===`data`?zM(r,e=>e.data):r}var IG=Rz(globalThis.ArrayBuffer,{expected:`ArrayBuffer`}),LG=IG.pipe(Ez(wre,QP({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)}}))),RG=IG.pipe(Ez(W,QP({decode(e){return new TextDecoder().decode(e)},encode(e){let t=new TextEncoder().encode(e);return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}}))),zG=RG.pipe(Ez(yz([az(``).pipe(Ez(lz,QP({decode:()=>void 0,encode:()=>``}))),xre])));function BG(e){return yz(e.map(t));function t(e){return VG(e).pipe(Ez(e))}}function VG(e){switch(hW(e.ast)._tag){case`Json`:return yre(nL(e.ast))?zG.pipe(Ez(sz,QP({decode:e=>e===void 0?null:e,encode:e=>e===null?void 0:e}))):zG;case`FormUrlEncoded`:return RG.pipe(Ez(Ere,QP({decode:e=>XN(new URLSearchParams(e)),encode:iP})));case`Uint8Array`:return LG;case`Text`:return RG}}var HG=e=>Ek(new hH({reason:new vH({request:e.request,response:e})})),UG=FR(eae);function WG(e,t){return yz(e.map(e=>KG(e,t)))}var GG=new WeakMap;function KG(e,t){let n=e.ast,r=GG.get(n);if(r!==void 0)return r;let i=mW(n,t),a=UG.pipe(Ez(e,ZP({decode(e,t){return Ek(new OP({message:`Encode only schema`},e,t))},encode(e,t){switch(i._tag){case`Multipart`:return Ek(new OP({message:`Payload must be a FormData`},e,t));case`Json`:try{return H(pH(JSON.stringify(e),i.contentType))}catch{return Ek(new EP({expected:`a JSON-serializable request body`},e,t))}case`Text`:return typeof e==`string`?H(pH(e,i.contentType)):Ek(new EP({message:`Expected a string`},e,t));case`FormUrlEncoded`:return Ly(e)?H(iae(XN(e),i.contentType)):Ek(new EP({message:`Expected a record`},e,t));case`Uint8Array`:return e instanceof Uint8Array?H(nae(e,i.contentType)):Ek(new EP({message:`Expected a Uint8Array`},e,t))}}})));return GG.set(n,a),a}var qG=`~effect/http-api/HttpApiGroup`,JG={[qG]:qG,add(...e){let t={...this.endpoints};for(let n of e)zb(t,n.identifier,n);return XG({...YG(this),endpoints:t})},prefix(e){return XG({...YG(this),endpoints:gC(this.endpoints,t=>t.prefix(e))})},middleware(e){return XG({...YG(this),endpoints:gC(this.endpoints,t=>t.middleware(e))})},annotateMerge(e){return XG({...YG(this),annotations:sC(this.annotations,e)})},annotate(e,t){return XG({...YG(this),annotations:tC(this.annotations,e,t)})},annotateEndpointsMerge(e){return XG({...YG(this),endpoints:gC(this.endpoints,t=>t.annotateMerge(e))})},annotateEndpoints(e,t){return XG({...YG(this),endpoints:gC(this.endpoints,n=>n.annotate(e,t))})},pipe(){return ly(this,arguments)}},YG=e=>({identifier:e.identifier,topLevel:e.topLevel,endpoints:e.endpoints,annotations:e.annotations}),XG=e=>{function t(){}return Object.setPrototypeOf(t,JG),t.key=`effect/http-api/HttpApiGroup/${e.identifier}`,Object.assign(t,e)},ZG=(e,t)=>XG({identifier:e,topLevel:t?.topLevel??!1,endpoints:{},annotations:$S()}),QG=`~effect/http-api/HttpApiSecurity`,$G={[QG]:QG,pipe(){return ly(this,arguments)}},eK=e=>Object.assign(Object.create($G),{_tag:`ApiKey`,key:e.key,in:e.in??`header`,annotations:$S()}),tK=()=>(e,t)=>{let n=zS()(e),r=nk(n,yG(t.api,t));n.runtime=(t.runtime??PV)(typeof t.httpClient==`function`?e=>sk(r,t.httpClient(e)):sk(r,t.httpClient));let i=Bk(e=>LR(e)||sae(e)?kk(e):Ek(e)),a=t.api.groups,o=RV(({endpoint:e,group:t,responseMode:r})=>{let o=n.runtime.fn()(hA(function*(o){let s=yield*n,c=a[t].topLevel?s:s[t],l=i(c[e]({...o,responseMode:r}));return yield*o.reactivityKeys?PB(l,o.reactivityKeys):l}));if(r===`decoded-only`){let n=a[t].endpoints[e];return VV(o,{key:`AtomHttpApi:mutation:${t}:${e}`,schema:oV({success:yz(wW(n)),error:yz(TW(n))})})}return o});n.mutation=(e,t,n)=>o({group:e,endpoint:t,responseMode:n?.responseMode??`decoded-only`});let s=RV(e=>{let t=n.runtime.atom(n.use(t=>{let n=t,r=a[e.group].topLevel?n:n[e.group];return i(r[e.endpoint](e))}));if(e.reactivityKeys&&(t=n.runtime.factory.withReactivity(e.reactivityKeys)(t)),e.responseMode===`decoded-only`&&e.serializationKey){let n=a[e.group].endpoints[e.endpoint];t=VV(t,{key:`AtomHttpApi:${e.group}:${e.endpoint}:${e.serializationKey}`,schema:oV({success:yz(wW(n)),error:yz(TW(n))})})}return e.timeToLive&&(t=RC(e.timeToLive)?xV(t,e.timeToLive):zV(t)),t});return n.query=(e,t,n)=>{let r={group:e,endpoint:t,params:n.params,query:n.query,payload:n.payload,headers:n.headers,responseMode:n.responseMode??`decoded-only`,sseOptions:n.sseOptions,reactivityKeys:n.reactivityKeys,timeToLive:n.timeToLive===void 0?void 0:PC(n.timeToLive),serializationKey:n.serializationKey};return s(r)},n},nK=W.pipe(Tz(`PullRequestId`)),rK=W.pipe(Tz(`RepositoryName`)),iK=W.pipe(Tz(`AwsProfileName`)),aK=W.pipe(Tz(`AwsRegion`)),oK=W.pipe(Tz(`CommentId`)),sK=W.pipe(Tz(`SandboxId`)),cK=bz([`OPEN`,`CLOSED`,`MERGED`]),lK=bz([`error`,`info`,`warning`,`success`]),uK=bz([`idle`,`loading`,`error`]),dK=bz([`creating`,`cloning`,`starting`,`running`,`stopping`,`stopped`,`error`]),fK=class extends DB(`Account`)({profile:iK,region:aK,awsAccountId:U(W),repoAccountId:U(W)}){},pK=class extends DB(`ApprovalRule`)({ruleName:W,requiredApprovals:G,poolMembers:q(W),poolMemberArns:q(W).pipe(jz(H([]))),satisfied:uz,fromTemplate:U(W)}){},mK=class extends DB(`PullRequest`)({id:nK,title:W,description:U(W),author:W,repositoryName:rK,creationDate:mB,lastModifiedDate:mB,link:W,account:fK,status:cK,sourceBranch:W,destinationBranch:W,isMergeable:uz,isApproved:uz,commentCount:U(G),healthScore:U(G),fetchedAt:U(mB),approvedBy:q(W),approvedByArns:q(W).pipe(jz(H([]))),commentedBy:q(W),filesChanged:U(G),approvalRules:q(pK).pipe(jz(H([])))}){get consoleUrl(){return yK(this.account.region,this.repositoryName,this.id)}},hK=(e,t)=>{let n=e=>e.trim().toLowerCase(),r=e=>{let t=n(e).split(/[/:]/).filter(e=>e.length>0);return t[t.length-1]??``},i=n(e),a=n(t);if(i===``||a===``)return!1;if(i===a)return!0;let o=r(e),s=r(t);return o!==``&&o===s},gK=(e,t)=>t===void 0||t.length===0||e.approvedBy.some(e=>hK(t,e))?!1:e.approvalRules.some(e=>!e.satisfied&&e.poolMembers.some(e=>hK(t,e))),_K=(e,t)=>t===void 0?e:e.filter(e=>t.has(e.account.profile)),vK=e=>e.startsWith(`cn-`)?`console.amazonaws.cn`:e.startsWith(`us-gov-`)?`console.amazonaws-us-gov.com`:`console.aws.amazon.com`,yK=(e,t,n)=>`https://${e}.${vK(e)}/codesuite/codecommit/repositories/${t}/pull-requests/${n}?region=${e}`,bK=K({region:aK.check(Uz(/^[a-z]{2}(?:-gov)?-[a-z0-9-]+-[0-9]+$/u)),repositoryName:rK.check(Uz(/^[A-Za-z0-9._-]{1,100}$/u)),pullRequestId:nK.check(Uz(/^[0-9]{1,200}$/u))}),xK=/^(?<region>[a-z]{2}(?:-gov)?-[a-z0-9-]+-\d+)\.(?<domain>console\.aws\.amazon\.com|console\.amazonaws\.cn|console\.amazonaws-us-gov\.com)$/u,SK=/^\/codesuite\/codecommit\/repositories\/(?<repositoryName>[A-Za-z0-9._-]{1,100})\/pull-requests\/(?<pullRequestId>[0-9]{1,200})(?:\/(?<view>activity|changes|details))?$/u,CK=e=>{if(!URL.canParse(e))return null;let t=new URL(e),n=xK.exec(t.hostname),r=SK.exec(t.pathname),i=n?.groups?.region,a=n?.groups?.domain,o=r?.groups?.repositoryName,s=r?.groups?.pullRequestId,c=r?.groups?.view,l=t.searchParams.getAll(`region`);return t.protocol!==`https:`||t.port.length>0||t.username.length>0||t.password.length>0||t.hash.length>0&&c!==`activity`||i===void 0||a===void 0||o===void 0||s===void 0||a!==vK(i)||l.length>1||l.length===1&&l[0]!==i?null:{region:aK.make(i),repositoryName:rK.make(o),pullRequestId:nK.make(s)}};W.check(Hz(),iB(),aB(2048)).pipe(Ez(bK,{decode:UP((e,t)=>{let n=CK(e);return n===null?Ek(new EP({expected:`an AWS CodeCommit pull-request console URL`},e,t)):H(n)}),encode:HP(({pullRequestId:e,region:t,repositoryName:n})=>yK(t,n,e))})),DB(`Sandbox`)({id:sK,pullRequestId:nK,awsAccountId:W,repositoryName:rK,region:aK,sourceBranch:W,containerId:U(W),port:U(G),workspacePath:W,status:dK,error:U(W),createdAt:mB,lastActivityAt:mB}),DB(`PRComment`)({id:oK,content:W,author:W,creationDate:mB,inReplyTo:U(oK),deleted:uz,filePath:U(W),lineNumber:U(G)});var wK=bz([`BEFORE`,`AFTER`]),TK=K({root:K({id:W,content:W,author:W,creationDate:W,inReplyTo:U(W),deleted:uz,filePath:U(W),lineNumber:U(G)}),replies:q(Cz(()=>TK))}),EK=K({filePath:U(W),beforeCommitId:U(W),afterCommitId:U(W),relativeFileVersion:U(wK),comments:q(TK)}),DK=bz([`new_comment`,`comment_edited`,`comment_deleted`,`approval_changed`,`approval_requested`,`review_reminder`,`merge_changed`,`title_changed`,`description_changed`,`pr_merged`,`pr_closed`,`pr_reopened`]);DB(`PersistentNotification`)({id:G,pullRequestId:nK,awsAccountId:W,type:DK,message:W,createdAt:mB,read:uz}),mw(),DB(`NotificationItem`)({type:lK,title:W,message:W,timestamp:mB,profile:nz(W)});var OK=e=>H(e),kK=bz([`review`,`security`,`tests`,`explain`]),AK=kK.literals,jK=bz([`codex`,`claude`]),MK=bz([`native-codex`,`native-claude`]),NK=bz([`configured-default`,`default`,`gpt-5.6-luna`,`gpt-5.6-terra`,`gpt-5.6-sol`]),PK=jK.literals,FK=MK.literals,IK=NK.literals,LK=e=>e===`claude`?[`configured-default`,`default`]:[`configured-default`,`gpt-5.6-luna`,`gpt-5.6-terra`,`gpt-5.6-sol`],RK=K({id:W.check(Hz(),iB(),aB(64),Uz(/^[a-z][a-z0-9-]*$/u)),name:W.check(Hz(),iB(),aB(80)),kind:kK,provider:jK.pipe(jz(OK(`codex`))),harness:MK.pipe(jz(OK(`native-codex`))),model:NK.pipe(jz(OK(`configured-default`))),skillIds:q(W.check(Hz(),iB(),aB(256))).check(aB(24),cB())}).check(Bz(e=>e.harness===(e.provider===`claude`?`native-claude`:`native-codex`)&&LK(e.provider).includes(e.model),{expected:`a supported reviewer provider, harness, and model`}));K({defaultProfileId:W.check(Hz(),iB(),aB(64),Uz(/^[a-z][a-z0-9-]*$/u)).pipe(jz(OK(`thorough`))),profiles:q(RK).check(nB(1),aB(12)).pipe(jz(OK([{id:`thorough`,name:`Thorough review`,kind:`review`,provider:`codex`,harness:`native-codex`,model:`configured-default`,skillIds:[`builtin:pr-review`,`builtin:pr-review-diff`]},{id:`security`,name:`Security review`,kind:`security`,provider:`codex`,harness:`native-codex`,model:`configured-default`,skillIds:[`builtin:pr-review-diff`]},{id:`tests`,name:`Test review`,kind:`tests`,provider:`codex`,harness:`native-codex`,model:`configured-default`,skillIds:[`builtin:pr-review-diff`]},{id:`explain`,name:`Explain change`,kind:`explain`,provider:`codex`,harness:`native-codex`,model:`configured-default`,skillIds:[]}])))}).check(Bz(({defaultProfileId:e,profiles:t})=>new Set(t.map(({id:e})=>e)).size===t.length&&t.some(({id:t})=>t===e),{expected:`unique review profile ids containing the default profile`}));var zK=K({author:W,prCount:G}),BK=K({author:W,commentCount:G}),VK=K({author:W,approvalCount:G}),HK=K({id:W,title:W,author:W,repositoryName:W,accountRegion:W,commentCount:G,awsAccountId:W}),UK=K({small:G,medium:G,large:G,extraLarge:G}),WK=K({filesAdded:G,filesModified:G,filesDeleted:G}),GK=K({author:W,avgFilesChanged:G,prCount:G}),KK=K({id:W,title:W,author:W,repositoryName:W,accountRegion:W,daysSinceActivity:G,awsAccountId:W}),qK=K({topContributorShare:G,uniqueContributors:G}),JK=K({prId:W,prTitle:W,author:W,repositoryName:W,accountRegion:W,awsAccountId:W,durationMs:G,fromLabel:W,toLabel:W}),YK=K({week:W,weekStart:W,weekEnd:W,dataAvailableSince:xz(W),prsCreated:G,prsMerged:G,prsClosed:G,totalComments:G,topContributors:q(zK),topReviewers:q(BK),topApprovers:q(VK),medianTimeToMerge:xz(G),medianTimeToFirstReview:xz(G),medianTimeToAddressFeedback:xz(G),mergeTimeDetails:q(JK),firstReviewDetails:q(JK),feedbackDetails:q(JK),mostActivePRs:q(HK),prSizeDistribution:UK,avgDiffSize:xz(WK),diffSizeByContributor:q(GK),stalePRs:q(KK),reviewCoverage:xz(G),approvalRate:xz(G),busFactor:xz(qK),availableRepos:q(W),availableAuthors:q(W),availableAccounts:q(W)}),XK=65536,ZK=32768,QK=8e3,$K=16320,eq=new TextEncoder,tq=class extends OB()(`ApiError`,{message:W}){},nq=class extends OB()(`UnauthorizedApiError`,{message:W},{httpApiStatus:401}){},rq=class extends OB()(`ForbiddenApiError`,{message:W},{httpApiStatus:403}){},iq=class extends pG()(`@knpkv/codecommit-web/OwnerSessionAuth`,{error:[nq,rq],security:{ownerCookie:eK({in:`cookie`,key:`cc_owner`})}}){},aq=K({id:W,awsAccountId:W,accountProfile:W,accountRegion:W,title:W,description:xz(W),author:W,repositoryName:W,creationDate:W,lastModifiedDate:W,status:W,sourceBranch:W,destinationBranch:W,isMergeable:G,isApproved:G,commentCount:xz(G),link:W,fetchedAt:W}),oq=K({pullRequestId:nK,revisionId:W,baseCommit:W,headCommit:W,files:q(K({index:tB.pipe(wz(Qz(0))),status:bz([`added`,`modified`,`deleted`,`renamed`]),path:W,previousPath:xz(W),beforeMode:xz(W),afterMode:xz(W)}))}),sq=K({revisionId:W,headCommit:W}),cq=K({repositoryName:W,region:aK}),lq=K({repositoryName:U(W),region:U(aK)}).check(Bz(({region:e,repositoryName:t})=>t===void 0==(e===void 0),{expected:`repositoryName and region must be provided together`})),uq=K({fileIndex:tB.pipe(wz(Qz(0))),revisionId:W,state:bz([`text`,`binary`,`oversized`]),before:xz(W),after:xz(W)}),dq=kK,fq=W.check(Uz(/^F[1-9][0-9]{0,5}$/u)),pq=yz([fq,az(`PR`)]),mq=W.check(Hz(),iB(),aB(200)),hq=W.check(Hz(),iB(),aB(256)),gq=q(hq).check(aB(24),cB()),_q=RK,vq=yz([K({scope:az(`general`)}),K({scope:az(`file`),filePath:W.check(iB(),aB(1024))}),K({scope:az(`line`),filePath:W.check(iB(),aB(1024)),line:tB.pipe(wz(Qz(1))),side:bz([`before`,`after`])})]),yq=K({id:fq,priority:bz([`P1`,`P2`,`P3`,`P4`]),title:W.check(Hz(),iB(),aB(200)),summary:W.check(Hz(),iB(),aB(500)),details:W.check(Hz(),iB(),aB(4e3)),recommendation:W.check(Hz(),iB(),aB(2e3)),verification:W.check(Hz(),iB(),aB(1e3)),publicationTarget:bz([`pr-comment`,`line-comment`]),location:vq}).check(Bz(e=>e.location.scope===`line`==(e.publicationTarget===`line-comment`),{expected:`line-comment paired with a line location and pr-comment paired with a general or file location`})),bq=W.check(Hz(),iB(),aB(8e3)),xq=W.check(Hz(),iB(),aB(12e3)),Sq=K({...K({findings:q(yq).check(aB(50),Bz(e=>new Set(e.map(e=>e.id)).size===e.length,{expected:`unique Relay finding ids`})),verdict:bq}).fields,explanation:U(xq)}).check(Bz(e=>eq.encode(JSON.stringify(e)).byteLength<=XK,{expected:`a Relay review result no larger than ${String(XK)} UTF-8 bytes`}));K({findings:q(yq).check(aB(0)),verdict:bq,explanation:xq}).check(Bz(e=>eq.encode(JSON.stringify(e)).byteLength<=XK,{expected:`an Explain result no larger than ${String(XK)} UTF-8 bytes`}));var Cq=K({pullRequestId:nK,revisionId:W,baseCommit:W,headCommit:W,kind:dq,profile:_q,result:Sq}).check(Bz(e=>e.kind===e.profile.kind&&(e.kind!==`explain`||e.result.explanation!==void 0&&e.result.findings.length===0),{expected:`a response matching its profile and Explain output contract`})),wq=W.check(Hz(),iB(),aB(8e3),Bz(e=>eq.encode(e).byteLength<=QK,{expected:`a Relay conversation message no larger than ${String(QK)} UTF-8 bytes`}),Bz(e=>eq.encode(JSON.stringify(e)).byteLength<=$K,{expected:`a Relay conversation message retainable as one half of a completed exchange`})),Tq=K({id:U(mq),findingId:pq,role:bz([`user`,`assistant`]),message:wq}),Eq=bz([`revision`,`files`,`patch`,`agent`,`validation`,`posting`]),Dq=yz([K({type:az(`progress`),phase:Eq,message:W,detail:U(W)}),K({type:az(`complete`),review:Cq,reply:U(wq)}),K({type:az(`error`),message:W})]),Oq=K({findingId:fq,operationId:W,summary:W}),kq=K({revisionId:W,baseCommit:W,headCommit:W,profile:_q}),Aq=q(Tq).check(aB(40),Bz(e=>eq.encode(JSON.stringify(e)).byteLength<=ZK,{expected:`Relay conversation turns no larger than ${String(ZK)} UTF-8 bytes`})),jq=K({...kq.fields,currentReview:Sq,turns:Aq,findingId:pq,message:wq}).check(Bz(({findingId:e,message:t})=>UR(Tq)({findingId:e,role:`user`,message:t}),{expected:`a continuation message retainable as its user conversation turn`})),Mq=K({id:G,pullRequestId:W,awsAccountId:W,type:W,title:W,profile:W,repositoryName:W,accountRegion:W,message:W,createdAt:W,read:G}),Nq=class extends ZG(`prs`).add(KW(`list`,`/`,{success:SB(mK)})).add(qW(`refresh`,`/refresh`,{success:W})).add(KW(`search`,`/search`,{query:K({q:W,limit:U(_B.pipe(wz($z({minimum:1,maximum:50})))),offset:U(_B.pipe(wz(Qz(0))))}),success:K({items:q(aq),total:G,hasMore:uz}),error:tq})).add(qW(`refreshSingle`,`/:awsAccountId/:prId/refresh`,{params:K({awsAccountId:W,prId:nK}),query:lq,success:sq,error:tq})).add(qW(`create`,`/`,{payload:K({repositoryName:W,title:W,description:U(W),sourceBranch:W,destinationBranch:W,account:fK}),success:W,error:tq})).add(qW(`open`,`/open`,{payload:K({profile:W,link:W.pipe(wz(Bz(e=>/^https:\/\/[\w-]+\.console\.aws\.amazon\.com\//.test(e))))}),success:W,error:tq})).add(KW(`comments`,`/comments`,{query:K({pullRequestId:W,repositoryName:W,profile:iK,region:aK}),success:q(EK),error:tq})).add(KW(`diff`,`/:awsAccountId/:prId/diff`,{params:K({awsAccountId:W,prId:nK}),query:cq,success:oq,error:tq})).add(KW(`diffContent`,`/:awsAccountId/:prId/diff/:fileIndex`,{params:K({awsAccountId:W,prId:nK,fileIndex:_B.pipe(wz(eB(),Qz(0)))}),query:K({...cq.fields,revisionId:W,baseCommit:W,headCommit:W}),success:uq,error:tq})).add(qW(`relayReview`,`/:awsAccountId/:prId/relay-review`,{params:K({awsAccountId:W,prId:nK}),query:cq,payload:K({revisionId:W,baseCommit:W,headCommit:W,profile:_q}),success:Cq,error:tq})).add(qW(`relayReviewStream`,`/:awsAccountId/:prId/relay-review/stream`,{params:K({awsAccountId:W,prId:nK}),query:cq,payload:kq,success:W,error:tq})).add(qW(`relayReviewContinueStream`,`/:awsAccountId/:prId/relay-review/continue`,{params:K({awsAccountId:W,prId:nK}),query:cq,payload:jq,success:W,error:tq})).add(qW(`postRelayFinding`,`/:awsAccountId/:prId/relay-review/findings/:findingId/post`,{params:K({awsAccountId:W,prId:nK,findingId:fq}),query:cq,payload:K({revisionId:W,baseCommit:W,headCommit:W,finding:yq}),success:Oq,error:tq})).add(qW(`createApprovalRule`,`/approval-rules`,{payload:K({pullRequestId:W,approvalRuleName:W,requiredApprovals:G,poolMembers:q(W),account:fK}),success:W,error:tq})).add(JW(`updateApprovalRule`,`/approval-rules`,{payload:K({pullRequestId:W,approvalRuleName:W,requiredApprovals:G,poolMembers:q(W),account:fK}),success:W,error:tq})).add(YW(`deleteApprovalRule`,`/approval-rules`,{payload:K({pullRequestId:W,approvalRuleName:W,account:fK}),success:W,error:tq})).prefix(`/api/prs`){},Pq=class extends ZG(`events`).add(KW(`stream`,`/`,{success:W})).prefix(`/api/events`){},Fq=K({hostPath:W,containerPath:W,readonly:uz}),Iq=K({image:W,extensions:q(W),setupCommands:q(W),env:pz(W,W),volumeMounts:q(Fq),cloneDepth:G}),Lq=K({defaultProfileId:W,profiles:q(_q)}),Rq=K({id:hq,name:W,description:W,source:W}),zq=K({accounts:q(K({profile:W,regions:q(W),enabled:uz})),autoDetect:uz,autoRefresh:uz,refreshIntervalSeconds:G,currentUser:U(W),review:Lq,sandbox:U(Iq)}),Bq=K({path:W,exists:uz,modifiedAt:U(W)}),Vq=K({path:W,sizeBytes:G,exists:uz,modifiedAt:U(W)}),Hq=K({status:bz([`valid`,`missing`,`corrupted`]),path:W,errors:q(W)}),Uq=K({accounts:q(K({profile:W,regions:q(W),enabled:uz})),autoDetect:uz,autoRefresh:uz,refreshIntervalSeconds:G,review:U(Lq),sandbox:U(Iq)}),Wq=bz([`refreshed`,`failed`]),Gq=K({backupPath:U(W),config:zq,refreshStatus:Wq}),Kq=class extends ZG(`config`).add(KW(`list`,`/`,{success:zq})).add(KW(`path`,`/path`,{success:Bq,error:tq})).add(KW(`database`,`/database`,{success:Vq,error:tq})).add(KW(`validate`,`/validate`,{success:Hq,error:tq})).add(KW(`reviewSkills`,`/review-skills`,{success:q(Rq),error:tq})).add(qW(`save`,`/save`,{payload:Uq,success:bz([`saved`,`saved-refresh-failed`]),error:tq})).add(qW(`reset`,`/reset`,{success:Gq,error:tq})).prefix(`/api/config`){},qq=class extends ZG(`accounts`).add(KW(`list`,`/`,{success:SB(fK)})).prefix(`/api/accounts`){},Jq=vB.check(iB()),Yq=K({awsAccountId:W,pullRequestId:nK,repositoryName:U(Jq),region:U(Jq)}).check(Bz(e=>e.repositoryName===void 0==(e.region===void 0)?void 0:`repositoryName and region must be provided together`)),Xq=K({awsAccountId:W,pullRequestId:W,repositoryName:xz(W),accountRegion:xz(W)}),Zq=class extends ZG(`subscriptions`).add(qW(`subscribe`,`/subscribe`,{payload:Yq,success:W,error:tq})).add(qW(`unsubscribe`,`/unsubscribe`,{payload:Yq,success:W,error:tq})).add(KW(`list`,`/`,{success:q(Xq)})).prefix(`/api/subscriptions`){},Qq=K({items:q(Mq),nextCursor:U(G)}),$q=class extends ZG(`notifications`).add(KW(`list`,`/`,{query:K({limit:U(_B.pipe(wz($z({minimum:1,maximum:100})))),cursor:U(_B),filter:U(bz([`system`,`prs`])),unreadOnly:U(_B)}),success:Qq})).add(KW(`count`,`/count`,{success:K({unread:G})})).add(qW(`markRead`,`/read`,{payload:K({id:G}),success:W})).add(qW(`markUnread`,`/unread`,{payload:K({id:G}),success:W})).add(qW(`markAllRead`,`/read-all`,{success:W})).add(qW(`ssoLogin`,`/sso-login`,{payload:K({profile:iK}),success:W,error:tq})).add(qW(`ssoLogout`,`/sso-logout`,{success:W,error:tq})).prefix(`/api/notifications`){},eJ=K({id:W,pullRequestId:W,awsAccountId:W,region:xz(W),repositoryName:W,sourceBranch:W,containerId:xz(W),port:xz(G),status:dK,statusDetail:xz(W),logs:xz(W),error:xz(W),createdAt:W,lastActivityAt:W}),tJ=K({password:W}),nJ=K({pullRequestId:nK,awsAccountId:W,repositoryName:W,sourceBranch:W,profile:iK,region:W}),rJ=K({sandboxId:sK}),iJ=class extends ZG(`sandbox`).add(qW(`create`,`/`,{payload:nJ,success:eJ,error:tq})).add(KW(`list`,`/`,{success:q(eJ),error:tq})).add(KW(`get`,`/:sandboxId`,{params:rJ,success:eJ,error:tq})).add(KW(`credentials`,`/:sandboxId/credentials`,{params:rJ,success:tJ,error:tq})).add(qW(`stop`,`/:sandboxId/stop`,{params:rJ,success:W,error:tq})).add(qW(`restart`,`/:sandboxId/restart`,{params:rJ,success:W,error:tq})).add(YW(`delete`,`/:sandboxId`,{params:rJ,success:W,error:tq})).prefix(`/api/sandbox`){},aJ=class extends ZG(`stats`).add(KW(`get`,`/`,{query:K({week:W.pipe(wz(Uz(/^\d{4}-W\d{2}$/))),repo:U(W),author:U(W),account:U(W)}),success:YK,error:tq})).add(qW(`sync`,`/sync`,{payload:K({week:W.pipe(wz(Uz(/^\d{4}-W\d{2}$/)))}),success:W,error:tq})).prefix(`/api/stats`){},oJ=bz([`always_allow`,`allow`,`deny`]),sJ=K({operation:W,state:oJ,category:bz([`read`,`write`]),description:W}),cJ=K({id:G,timestamp:W,operation:W,accountProfile:W,region:W,permissionState:W,context:W,durationMs:xz(G)}),lJ=class extends ZG(`permissions`).add(qW(`respond`,`/respond`,{payload:K({id:W,response:bz([`allow_once`,`always_allow`,`deny`])}),success:W,error:tq})).add(KW(`list`,`/`,{success:q(sJ)})).add(qW(`update`,`/update`,{payload:K({operation:W,state:oJ}),success:W,error:tq})).add(qW(`reset`,`/reset`,{success:W})).add(KW(`auditSettings`,`/audit`,{success:K({enabled:uz,retentionDays:G})})).add(qW(`updateAuditSettings`,`/audit`,{payload:K({enabled:U(uz),retentionDays:U(G)}),success:W,error:tq})).prefix(`/api/permissions`){},uJ=class extends ZG(`audit`).add(KW(`list`,`/`,{query:K({limit:U(_B.pipe(wz($z({minimum:1,maximum:200})))),offset:U(_B.pipe(wz(Qz(0)))),operation:U(W),accountProfile:U(W),permissionState:U(W),from:U(W),to:U(W),search:U(W)}),success:K({items:q(cJ),total:G,nextCursor:U(G)}),error:tq})).add(KW(`export`,`/export`,{query:K({from:U(W),to:U(W)}),success:q(cJ),error:tq})).add(YW(`clear`,`/`,{success:K({deleted:G}),error:tq})).prefix(`/api/audit`){},dJ=class extends eG(`CodeCommitApi`).add(Nq).add(Pq).add(Kq).add(qq).add($q).add(Zq).add(iJ).add(aJ).add(lJ).add(uJ).middleware(iq){},fJ=/^[0-9a-f]{64}$/u,pJ=W.check(Uz(fJ,{expected:`a lowercase 256-bit browser credential`}));pJ.pipe(Tz(`BrowserCredential`));var mJ=pJ.pipe(Tz(`PairingCode`));pJ.pipe(Tz(`SessionToken`));var hJ=pJ.pipe(Tz(`CsrfToken`));W.check(Uz(fJ,{expected:`a lowercase SHA-256 credential digest`})).pipe(Tz(`CredentialDigest`)),K({pairingCode:mJ});var gJ=K({csrfToken:hJ});K({expiresAt:G.check(eB()),consumedAt:xz(G.check(eB())),revokedAt:xz(G.check(eB()))}),OB()(`CredentialCookieError`,{reason:bz([`invalid-credential`,`invalid-attribute`,`invalid-max-age`])}),yz([K({name:W,path:W,httpOnly:uz,sameSite:bz([`strict`,`lax`,`none`]),secure:az(!0),maxAge:nz(G),sourceOrigin:W}),K({name:W,path:W,httpOnly:uz,sameSite:bz([`strict`,`lax`,`none`]),secure:az(!1),maxAge:nz(G),sourceOrigin:nz(W)})]);var _J=e=>{let t=new URLSearchParams(e.startsWith(`#`)?e.slice(1):e).get(`bootstrap_token`);if(t===null)return{_tag:`missing`};let n=qR(mJ)(t);return hC(n)?{_tag:`present`,token:kN(n.success)}:{_tag:`malformed`}},vJ=(e,t)=>`${e}${t}`,yJ=`codecommit_web_csrf`,bJ=gJ,xJ=null,SJ=!1,CJ={_tag:`Ready`},wJ=e=>({_tag:`Failed`,message:e}),TJ=()=>{try{return!My(window)}catch{return!1}},EJ=()=>{if(!TJ())return null;if(SJ)return xJ;try{let e=window.localStorage.getItem(yJ);if(e===null)return xJ;let t=qR(hJ)(e);return hC(t)?t.success:xJ}catch{return SJ=!0,xJ}},DJ=(async()=>{if(!TJ())return CJ;let e=_J(window.location.hash);if(e._tag===`missing`)return CJ;try{let t=vJ(window.location.pathname,window.location.search);if(window.history.replaceState(null,``,t),e._tag===`malformed`)return wJ(`Owner session bootstrap token is malformed`);let n=e.token,r=await window.fetch(`/auth/bootstrap`,{method:`POST`,credentials:`same-origin`,headers:{Authorization:`Bearer ${jN(n)}`}});if(!r.ok)return wJ(`Owner session bootstrap failed with status ${r.status}`);let i=await JR(bJ)(await r.json());xJ=i.csrfToken;try{window.localStorage.setItem(yJ,i.csrfToken)}catch{SJ=!0}return CJ}catch(e){return wJ(Vy(e)?e.message:`Owner session bootstrap failed`)}})(),OJ=zS(`@knpkv/codecommit-web/AtomHttpApiRuntimeMarker`),kJ=hG(iq,gA(`OwnerSessionClient.cookie`)(function*({next:e,request:t}){return yield*e(t)})),AJ=tne(gU,$te(OJ,void 0),kJ),jJ=tK()(`ApiClient`,{api:dJ,baseUrl:`/`,httpClient:AJ,transformClient:e=>e.pipe(aU(e=>_k(()=>DJ).pipe(Lk(t=>{if(t._tag===`Failed`)return e;let n=EJ();return n===null?e:NH(e,`x-csrf-token`,n)}))))});jJ.runtime;var MJ={pullRequests:[],accounts:[],status:`idle`};jJ.query(`prs`,`list`,{reactivityKeys:[`prs`],timeToLive:`30 seconds`});var NJ=jJ.query(`config`,`list`,{reactivityKeys:[`config`],timeToLive:`30 seconds`}),PJ=jJ.query(`config`,`reviewSkills`,{reactivityKeys:[`config`],timeToLive:`60 seconds`});jJ.query(`accounts`,`list`,{reactivityKeys:[`accounts`],timeToLive:`60 seconds`});var FJ=jJ.mutation(`prs`,`refresh`),IJ=jJ.mutation(`prs`,`open`),LJ=jJ.query(`config`,`path`,{reactivityKeys:[`config`],timeToLive:`60 seconds`}),RJ=jJ.query(`config`,`database`,{reactivityKeys:[`config`],timeToLive:`60 seconds`}),zJ=jJ.query(`config`,`validate`,{reactivityKeys:[`config`],timeToLive:`60 seconds`}),BJ=jJ.mutation(`config`,`save`),VJ=jJ.mutation(`config`,`reset`),HJ=jJ.mutation(`notifications`,`ssoLogin`),UJ=jJ.mutation(`notifications`,`ssoLogout`),WJ=jJ.query(`subscriptions`,`list`,{reactivityKeys:[`subscriptions`],timeToLive:`5 seconds`}),GJ=jJ.mutation(`subscriptions`,`subscribe`),KJ=jJ.mutation(`subscriptions`,`unsubscribe`);jJ.query(`notifications`,`list`,{query:{},reactivityKeys:[`notifications`],timeToLive:`10 seconds`}),jJ.query(`notifications`,`count`,{reactivityKeys:[`notifications`],timeToLive:`10 seconds`});var qJ=jJ.mutation(`notifications`,`list`),JJ=jJ.mutation(`notifications`,`markRead`),YJ=jJ.mutation(`notifications`,`markUnread`),XJ=jJ.mutation(`notifications`,`markAllRead`);jJ.query(`sandbox`,`list`,{reactivityKeys:[`sandbox`],timeToLive:`5 seconds`});var ZJ=RV(e=>jJ.query(`sandbox`,`credentials`,{params:{sandboxId:e},reactivityKeys:[`sandbox`],timeToLive:`30 seconds`})),QJ=jJ.mutation(`sandbox`,`create`),$J=jJ.mutation(`sandbox`,`stop`),eY=jJ.mutation(`sandbox`,`restart`),tY=jJ.mutation(`sandbox`,`delete`),nY=jJ.mutation(`stats`,`sync`);jJ.mutation(`prs`,`search`);var rY=jJ.mutation(`prs`,`refreshSingle`),iY=jJ.mutation(`prs`,`createApprovalRule`),aY=jJ.mutation(`prs`,`updateApprovalRule`);jJ.mutation(`prs`,`deleteApprovalRule`);var oY=jJ.query(`permissions`,`list`,{reactivityKeys:[`permissions`],timeToLive:`30 seconds`}),sY=jJ.mutation(`permissions`,`respond`),cY=jJ.mutation(`permissions`,`update`),lY=jJ.mutation(`permissions`,`reset`),uY=jJ.query(`permissions`,`auditSettings`,{reactivityKeys:[`permissions`],timeToLive:`30 seconds`}),dY=jJ.mutation(`permissions`,`updateAuditSettings`),fY=jJ.mutation(`audit`,`list`),pY=jJ.mutation(`audit`,`export`),mY=jJ.mutation(`audit`,`clear`),hY=DV(MJ).pipe(zV),gY=W.check(Hz(),iB(),aB(200)).pipe(Tz(`RelaySelectorId`)),_Y=K({id:gY,label:W.check(Hz(),iB(),aB(200))}),vY=K({modelId:gY,models:q(_Y).check(nB(1)),profileId:gY,profiles:q(_Y).check(nB(1))}),yY=e=>new Set(e.map(({id:e})=>e)).size===e.length,bY=vY.check(Bz(({profiles:e})=>yY(e),{expected:`unique Relay profile option identifiers`}),Bz(({models:e})=>yY(e),{expected:`unique Relay model option identifiers`}),Bz(({profileId:e,profiles:t})=>t.some(({id:t})=>t===e),{expected:`a selected Relay profile present in the profile options`}),Bz(({modelId:e,models:t})=>t.some(({id:t})=>t===e),{expected:`a selected Relay model present in the model options`})),xY=Lz({collapsed:{},expanded:{}}),SY=K({dock:xY,selection:bY}),CY=class extends OB()(`InvalidRelaySelectorState`,{reason:bz([`duplicate-model`,`duplicate-profile`,`invalid-input`,`model-not-found`,`profile-not-found`])}){},wY=WR(vY);gA(`RelayProduct.makeInitialRelayState`)(function*(e){let t=yield*wY(e).pipe(Hk(()=>new CY({reason:`invalid-input`})));return yY(t.profiles)?yY(t.models)?t.profiles.some(({id:e})=>e===t.profileId)?t.models.some(({id:e})=>e===t.modelId)?SY.make({dock:xY.cases.collapsed.make({}),selection:bY.make(t)}):yield*new CY({reason:`model-not-found`}):yield*new CY({reason:`profile-not-found`}):yield*new CY({reason:`duplicate-model`}):yield*new CY({reason:`duplicate-profile`})});var TY=e=>W.check(Hz(),iB(),aB(e)),EY=e=>W.check(Gz(7),Uz(/^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,{expected:`a canonical lowercase UUID v7`})).pipe(Tz(e)),DY=bz([`codecommit`,`control-center`]),OY=bz([`continue-pull-request-conversation`,`locate-pull-request-conversation`]),kY=TY(200).pipe(Tz(`RelayPrincipalId`)),AY=EY(`RelayWorkspaceId`),jY=EY(`RelayPluginConnectionId`),MY=EY(`RelayEntityId`),NY=TY(1e3).pipe(Tz(`RelayRepositoryName`)),PY=TY(200).pipe(Tz(`RelayPullRequestId`)),FY=TY(200).pipe(Tz(`RelayAccountId`)),IY=TY(100).pipe(Tz(`RelayRegion`)),LY=W.check(Hz(),iB(),aB(4096),Uz(/^\/(?!\/)/u,{expected:`an application-owned absolute path`}));Lz({codecommit:{principalId:kY},"control-center":{principalId:kY,workspaceId:AY}});var RY=K({accountId:nz(FY),provider:az(`codecommit`),pullRequestId:PY,region:IY,repositoryName:NY}),zY=K({pluginConnectionId:jY,pullRequestId:PY,repositoryName:NY,workspaceId:AY}),BY=K({accountId:FY,pullRequestId:PY,region:IY,repositoryName:NY}),VY=K({entityId:MY,href:LY}),HY=K({accountId:FY,href:LY,pullRequestId:PY,routeAccountId:nz(FY)}),UY=Lz({codecommit:{...BY.fields},"control-center":{...zY.fields}}),WY=Lz({codecommit:{route:HY,selection:bY,thread:BY},"control-center":{route:VY,selection:bY,thread:zY}}).check(Bz(e=>{switch(e._tag){case`codecommit`:return e.route.accountId===e.thread.accountId&&e.route.pullRequestId===e.thread.pullRequestId&&e.route.href===`/accounts/${encodeURIComponent(e.route.routeAccountId??e.route.accountId)}/prs/${encodeURIComponent(e.route.pullRequestId)}`;case`control-center`:return e.route.href===`/w/${e.thread.workspaceId}/items/${e.route.entityId}`}},{expected:`a product-qualified thread paired with its exact pull-request route`})),GY=e=>{switch(e._tag){case`codecommit`:return UY.cases.codecommit.make(e.thread);case`control-center`:return UY.cases[`control-center`].make(e.thread)}},KY=K({conversation:WY,message:W.check(Hz(),iB(),aB(8e3)).pipe(Tz(`PullRequestContinuationMessage`)),selection:bY});K({messageId:TY(200).pipe(Tz(`RelayContinuationMessageId`)),thread:UY});var qY=class extends OB()(`RelayAuthenticationRequired`,{operation:OY,product:DY}){};OB()(`RelayAuthorizationDenied`,{operation:OY,product:DY}),OB()(`RelayAuthenticationUnavailable`,{operation:OY,product:DY});var JY=class extends OB()(`PullRequestConversationNotFound`,{product:DY,pullRequestId:PY,repositoryName:NY}){},YY=class extends OB()(`PullRequestConversationAmbiguous`,{matches:tB.check(Zz(1)),product:DY,pullRequestId:PY,repositoryName:NY}){};OB()(`PullRequestConversationLookupFailed`,{product:DY});var XY=class extends OB()(`PullRequestConversationRedirectFailed`,{href:LY,product:DY}){},ZY=class extends OB()(`PullRequestConversationContinuationRejected`,{product:DY,reason:bz([`conversation-busy`,`selection-unavailable`,`thread-not-found`]),thread:UY}){},QY=class extends OB()(`PullRequestConversationContinuationFailed`,{product:DY,thread:UY}){};OB()(`RelayProductAdapterContractError`,{actualProduct:DY,expectedProduct:DY,operation:OY}),OB()(`RelayProductContinuationReceiptMismatch`,{actualThread:UY,expectedThread:UY}),zS()(`@knpkv/relay-product/RelayProduct`);var $Y=class extends Error{_tag=`RelayProductDockProviderMissing`;constructor(){super(`Relay product dock provider is missing`)}},eX=(0,N.createContext)(void 0),tX=({children:e})=>{let[t,n]=(0,N.useState)(null),r=(0,N.useCallback)(e=>(n(e),()=>{n(t=>t===e?null:t)}),[]),i=(0,N.useMemo)(()=>({register:r,registration:t}),[r,t]);return(0,L.jsx)(eX,{value:i,children:e})},nX=e=>{let t=(0,N.useContext)(eX);if(t===void 0)throw new $Y;(0,N.useEffect)(()=>t.register(e),[e,t.register])},rX=()=>{let e=(0,N.useContext)(eX);if(e===void 0)throw new $Y;return e.registration};gw(`RelayProductDockInvariantViolation`);var iX=(0,N.lazy)(async()=>({default:(await Ti(()=>Promise.resolve().then(()=>doe),void 0)).RelayDock})),aX=class extends N.Component{state={failed:!1};static getDerivedStateFromError(e){return{failed:!0}}render(){return this.state.failed?null:this.props.children}},oX=e=>{switch(e._tag){case`RelayAuthenticationRequired`:return`Authenticate with this product before using its Relay conversations.`;case`RelayAuthorizationDenied`:return`This session cannot use Relay for pull-request conversations.`;case`RelayAuthenticationUnavailable`:return`The product authentication boundary is unavailable.`;case`PullRequestConversationNotFound`:return`No Relay conversation matches ${e.repositoryName} PR #${e.pullRequestId}.`;case`PullRequestConversationAmbiguous`:return`${String(e.matches)} Relay conversations match this pull request; include its account.`;case`PullRequestConversationLookupFailed`:return`Relay could not search the product's pull-request conversations.`;case`PullRequestConversationRedirectFailed`:return`Relay found the conversation but could not open its exact pull-request page.`;case`PullRequestConversationContinuationRejected`:return e.reason===`conversation-busy`?`This pull-request conversation already has a run in progress.`:e.reason===`selection-unavailable`?`The selected Relay profile or model is no longer available.`:`This pull-request conversation no longer exists.`;case`PullRequestConversationContinuationFailed`:return`Relay could not continue this pull-request conversation.`;case`RelayProductAdapterContractError`:return`The active product does not own this pull-request conversation.`;case`RelayProductContinuationReceiptMismatch`:return`Relay returned a continuation receipt for another pull-request conversation.`}},sX=e=>{let t=e.reasons.find(xO);return t===void 0?`Relay ended unexpectedly. No request was accepted.`:oX(t.error)},cX=()=>{let[e,t]=(0,N.useState)({description:null,pending:!1}),n=(0,N.useRef)(0);return(0,N.useEffect)(()=>()=>{n.current+=1},[]),[e,(0,N.useCallback)(e=>{n.current+=1;let r=n.current;t({description:null,pending:!0}),fA(e).then(e=>{n.current===r&&t(FO(e)?{description:null,pending:!1}:{description:sX(e.cause),pending:!1})})},[])]},lX=({host:e})=>{let[t,n]=(0,N.useState)(``),[r,i]=(0,N.useState)(``),[a,o]=(0,N.useState)(``),[s,c]=(0,N.useState)(``),[l,u]=(0,N.useState)(null),[d,f]=cX();return(0,L.jsxs)(`form`,{"aria-label":`Find a pull request conversation`,onSubmit:n=>{n.preventDefault();let i=t.trim(),o=i.length===0?{provider:`codecommit`,pullRequestId:r.trim(),region:a.trim(),repositoryName:s.trim()}:{accountId:i,provider:`codecommit`,pullRequestId:r.trim(),region:a.trim(),repositoryName:s.trim()},c=qR(RY)(o);if(mC(c)){u(`Enter a region, repository, and pull-request number.`);return}u(null),f(e.locatePullRequestConversation(c.success))},children:[(0,L.jsx)(`h2`,{children:`Find a pull request conversation`}),(0,L.jsx)(`p`,{children:`Relay opens the exact product page before continuing a PR thread.`}),(0,L.jsxs)(`label`,{children:[(0,L.jsx)(`span`,{children:`Region`}),(0,L.jsx)(`input`,{onChange:e=>o(e.currentTarget.value),value:a})]}),(0,L.jsxs)(`label`,{children:[(0,L.jsx)(`span`,{children:`Repository`}),(0,L.jsx)(`input`,{onChange:e=>c(e.currentTarget.value),value:s})]}),(0,L.jsxs)(`label`,{children:[(0,L.jsx)(`span`,{children:`Pull request`}),(0,L.jsx)(`input`,{inputMode:`numeric`,onChange:e=>i(e.currentTarget.value),value:r})]}),(0,L.jsxs)(`label`,{children:[(0,L.jsx)(`span`,{children:`Account (optional)`}),(0,L.jsx)(`input`,{onChange:e=>n(e.currentTarget.value),value:t})]}),l===null&&d.description===null?null:(0,L.jsx)(`p`,{"aria-live":`assertive`,role:`alert`,children:l??d.description}),(0,L.jsx)(`button`,{disabled:d.pending,type:`submit`,children:d.pending?`Opening PR conversation…`:`Open PR conversation`})]})},uX=({messages:e})=>e.length===0?(0,L.jsx)(`p`,{children:`No Relay turns yet. The first message starts this PR's durable thread.`}):(0,L.jsx)(`ol`,{"aria-label":`Pull request conversation`,children:e.map(e=>(0,L.jsxs)(`li`,{"data-relay-message-role":e.role,children:[(0,L.jsx)(`strong`,{children:e.role===`relay`?`Relay`:e.role===`operator`?`You`:`System`}),(0,L.jsx)(`p`,{children:e.text})]},e.id))}),dX=(e,t)=>t.selection.profiles.some(({id:t})=>t===e.profileId)&&t.selection.models.some(({id:t})=>t===e.modelId),fX=({registration:e,selection:t})=>{let[n,r]=(0,N.useState)(``),[i,a]=(0,N.useState)(null),[o,s]=cX(),c=dX(t,e);return(0,L.jsxs)(`form`,{"aria-label":`Continue pull request conversation`,onSubmit:i=>{if(i.preventDefault(),!c){a(`Rerun Relay with the selected profile or model before continuing this PR thread.`);return}let o=qR(KY)({conversation:e.conversation,message:n.trim(),selection:t});if(mC(o)){a(`Enter a pull-request request of 8,000 characters or fewer.`);return}a(null),s(e.continuePullRequestConversation(o.success).pipe(Fk(()=>xk(()=>r(``)))))},children:[(0,L.jsxs)(`label`,{children:[(0,L.jsx)(`span`,{children:`Continue this PR thread`}),(0,L.jsx)(`textarea`,{maxLength:8e3,onChange:e=>r(e.currentTarget.value),placeholder:`Ask Relay to verify one concrete part of this pull request…`,rows:3,value:n})]}),i===null&&o.description===null?null:(0,L.jsx)(`p`,{"aria-live":`assertive`,role:`alert`,children:i??o.description}),!c&&i===null?(0,L.jsx)(`p`,{"aria-live":`polite`,children:`Rerun Relay with the selected profile or model before continuing this PR thread.`}):null,(0,L.jsx)(`button`,{disabled:o.pending||n.trim().length===0||!c,type:`submit`,children:o.pending?`Continuing on this PR…`:`Continue on this PR`})]})},pX=(e,t)=>{if(t===null)return{content:(0,L.jsx)(lX,{host:e}),status:`ready`};switch(t.status){case`loading`:return{description:`Loading the durable conversation for this pull request.`,status:`loading`,title:`Loading PR thread`};case`error`:return{description:t.description,status:`error`,title:`PR thread unavailable`};case`unavailable`:return{description:t.description,status:`unavailable`,title:`Relay unavailable for this PR`};case`ready`:return{content:(0,L.jsx)(uX,{messages:t.messages}),status:`ready`}}},mX=e=>e===null?`host`:JSON.stringify(GY(e.conversation)),hX=e=>JSON.stringify({modelId:e.modelId,models:e.models,profileId:e.profileId,profiles:e.profiles}),gX=({children:e,host:t})=>(0,L.jsxs)(tX,{children:[e,(0,L.jsx)(_X,{host:t})]}),_X=({host:e})=>{let t=rX(),n=t?.selection??e.selection,r=mX(t),i=hX(n),[a,o]=(0,N.useState)(n);(0,N.useEffect)(()=>o(n),[i,r]);let s=e=>{let t=a.models.find(({id:t})=>t===e);if(t===void 0)return;let n=a.profiles.find(({id:e})=>e===t.id);o(n===void 0?{...a,modelId:t.id}:{...a,modelId:t.id,profileId:n.id})},c=e=>{let t=a.profiles.find(({id:t})=>t===e);if(t===void 0)return;let n=a.models.find(({id:e})=>e===t.id);o(n===void 0?{...a,profileId:t.id}:{...a,modelId:n.id,profileId:t.id})},l=t?.status===`ready`?t:null;return(0,L.jsx)(`div`,{"data-relay-product-dock-chrome":``,style:{insetBlockEnd:`max(var(--rly-space-16), env(safe-area-inset-bottom, 0px))`,insetInlineEnd:`max(var(--rly-space-16), env(safe-area-inset-right, 0px))`,position:`fixed`,zIndex:80},children:(0,L.jsx)(aX,{children:(0,L.jsx)(N.Suspense,{fallback:null,children:(0,L.jsx)(iX,{context:t?.context??e.context,defaultOpen:!1,footer:l===null?void 0:(0,L.jsx)(fX,{registration:l,selection:a},r),selection:{model:{onValueChange:s,options:a.models.map(({id:e,label:t})=>({label:t,value:e})),value:a.modelId},profile:{onValueChange:c,options:a.profiles.map(({id:e,label:t})=>({label:t,value:e})),value:a.profileId}},state:pX(e,t)})})})})},vX=(e,t,n,r)=>`/accounts/${encodeURIComponent(e)}/prs/${encodeURIComponent(t)}?repository=${encodeURIComponent(n)}&region=${encodeURIComponent(r)}`,yX=(e,t)=>e.account.awsAccountId===t||e.account.profile===t,bX=(e,t)=>yX(e,t)||e.account.repoAccountId===t,xX=(e,t)=>String(e.id)===t.pullRequestId&&(t.accountId===void 0||yX(e,t.accountId))&&(t.repositoryName===void 0||String(e.repositoryName)===t.repositoryName)&&(t.region===void 0||String(e.account.region)===t.region),SX=(e,t)=>String(e.id)===t.pullRequestId&&(t.accountId===void 0||bX(e,t.accountId))&&(t.repositoryName===void 0||String(e.repositoryName)===t.repositoryName)&&(t.region===void 0||String(e.account.region)===t.region),CX=YR(bY)({modelId:`configured-default`,models:[{id:`configured-default`,label:`Configured default`}],profileId:`configured-review`,profiles:[{id:`configured-review`,label:`Configured review`}]}),wX=e=>e!==void 0&&e.length>0?e:void 0,TX=e=>wX(e.repoAccountId)??wX(e.awsAccountId)??e.profile,EX=e=>wX(e.repoAccountId)===void 0?`credential`:`repository`,DX=e=>wX(e.awsAccountId)??e.profile,OX=(e,t,n)=>{let r=TX(t.account);return YR(WY)({_tag:`codecommit`,route:{accountId:r,href:`/accounts/${encodeURIComponent(e)}/prs/${encodeURIComponent(t.id)}`,pullRequestId:t.id,routeAccountId:e},selection:n,thread:{accountId:r,pullRequestId:t.id,region:t.account.region,repositoryName:t.repositoryName}})},kX=({children:e})=>{let t=KV(hY),n=_r(),r=(0,N.useMemo)(()=>({context:[{id:`product`,label:`Product`,value:`CodeCommit`}],locatePullRequestConversation:gA(`CodeCommitRelayDock.locatePullRequestConversation`)(function*(e){if(t.currentUser===void 0)return yield*new qY({operation:`locate-pull-request-conversation`,product:`codecommit`});let r={pullRequestId:String(e.pullRequestId),region:String(e.region),repositoryName:String(e.repositoryName)};e.accountId!==void 0&&(r={...r,accountId:e.accountId});let i=t.pullRequests.filter(e=>SX(e,r));if(i.length===0)return yield*new JY({product:`codecommit`,pullRequestId:e.pullRequestId,repositoryName:e.repositoryName});if(i.length>1)return yield*new YY({matches:i.length,product:`codecommit`,pullRequestId:e.pullRequestId,repositoryName:e.repositoryName});let a=i[0];if(a===void 0)return yield*new JY({product:`codecommit`,pullRequestId:e.pullRequestId,repositoryName:e.repositoryName});let o=vX(DX(a.account),String(a.id),String(a.repositoryName),String(a.account.region));yield*vk({try:async()=>{await n(o)},catch:()=>new XY({href:o,product:`codecommit`})})}),product:`codecommit`,selection:CX}),[n,t.currentUser,t.pullRequests]);return(0,L.jsx)(gX,{host:r,children:e})},AX=e=>YR(bY)({modelId:e?.model??`configured-default`,models:[{id:e?.model??`configured-default`,label:e?.model??`Configured default`}],profileId:e?.id??`configured-review`,profiles:[{id:e?.id??`configured-review`,label:e?.name??`Configured review`}]}),jX=(e,t)=>e?.profile??t,MX=e=>e===`user`?`operator`:`relay`,NX=e=>e.result.explanation===void 0?[]:[{id:`explanation:${e.revisionId}`,role:`relay`,text:e.result.explanation}],PX=(e,t)=>[{id:`review:${e.revisionId}`,role:`relay`,text:e.result.verdict},...NX(e),...t.map((e,t)=>({id:`${e.findingId}:${e.role}:${String(t)}`,role:MX(e.role),text:e.message}))],FX=({available:e,context:t,continueReview:n,conversation:r,isReviewing:i,review:a,reviewIsStale:o=!1,selectedFindingId:s,selection:c,turns:l})=>{let u={context:t,conversation:r,selection:c};if(!e)return{...u,description:`Configure a CodeCommit Relay review profile before starting this PR thread.`,status:`unavailable`};if(a===null)return{...u,description:`Run Relay in the exact-revision review workspace to start this PR thread.`,status:`unavailable`};if(o)return{...u,description:`Re-run Relay against the current exact revision before continuing this PR thread.`,status:`unavailable`};let d=GY(r),f=s??`PR`;return{...u,continuePullRequestConversation:e=>i?new ZY({product:`codecommit`,reason:`conversation-busy`,thread:d}):e.selection.profileId!==c.profileId||e.selection.modelId!==c.modelId?new ZY({product:`codecommit`,reason:`selection-unavailable`,thread:d}):vk({try:()=>n(f,e.message),catch:()=>new QY({product:`codecommit`,thread:d})}).pipe(Nk(e=>e._tag===`completed`?Sk:new QY({product:`codecommit`,thread:d}))),messages:PX(a,l),status:`ready`}},IX=({accountId:e,continueReview:t,diff:n,isReviewing:r,profile:i,pullRequest:a,review:o,reviewIsStale:s,selectedFindingId:c,turns:l})=>{let u=(0,N.useMemo)(()=>AX(i),[i?.id,i?.model,i?.name]),d=TX(a.account),f=(0,N.useMemo)(()=>OX(e,a,u),[e,a.account.region,a.id,a.repositoryName,d,u]);return nX((0,N.useMemo)(()=>FX({available:i!==void 0,context:[{id:`repository`,label:`Repository`,value:a.repositoryName},{id:`pull-request`,label:`Pull request`,value:`#${a.id}`},{id:`head`,label:`Current head`,value:n.headCommit.slice(0,12)}],continueReview:t,conversation:f,isReviewing:r,review:o,reviewIsStale:s,selectedFindingId:c,selection:u,turns:l}),[f,t,n.headCommit,r,i,a.id,a.repositoryName,o,s,c,u,l])),null},LX=()=>{try{return Notification}catch{return}},RX=e=>{let t=e.awsAccountId,n=e.pullRequestId;return t!==void 0&&t!==``&&n!==void 0&&n!==``?e.repositoryName!==void 0&&e.repositoryName!==``&&e.accountRegion!==void 0&&e.accountRegion!==``?vX(t,n,e.repositoryName,e.accountRegion):`/accounts/${encodeURIComponent(t)}/prs/${encodeURIComponent(n)}`:`/notifications`};function zX(e){let t=(0,N.useRef)(e);t.current=e;let n=(0,N.useRef)([]),r=(0,N.useRef)(new Set);return{notify:(0,N.useCallback)(e=>{if(e.id!=null){if(r.current.has(e.id))return;if(r.current.add(e.id),r.current.size>500){let e=[...r.current];r.current=new Set(e.slice(e.length-250))}}let i=LX();if(i===void 0||i.permission!==`granted`)return;try{if(localStorage.getItem(oy.desktopNotifications)!==`true`)return}catch{return}let a=new i(e.title||`CodeCommit`,{body:e.message,icon:`/favicon.ico`});a.addEventListener(`click`,()=>{window.focus(),a.close(),t.current?.(RX(e))}),n.current.push(a),setTimeout(()=>{n.current=n.current.filter(e=>e!==a)},3e4)},[])}}var BX=36e5;function VX(e,t){try{let n=localStorage.getItem(e);return n===null?t:n===`true`}catch{return t}}function HX(e,t){try{let n=localStorage.getItem(e);return n===null?t:Number(n)||t}catch{return t}}function UX(e){let t=(0,N.useRef)(e);t.current=e,(0,N.useEffect)(()=>{let e=null,n=()=>{let t=HX(oy.reminderInterval,BX);e=setTimeout(r,t)},r=()=>{if(VX(oy.reminders,!0)&&t.current>0){QV(`You have ${t.current} PR${t.current>1?`s`:``} awaiting your review`,{duration:1e4});let e=LX();e!==void 0&&e.permission===`granted`&&VX(oy.desktopNotifications,!1)&&new e(`Review Reminder`,{body:`${t.current} PR${t.current>1?`s`:``} awaiting your review`,icon:`/favicon.ico`,tag:`review-reminder`})}n()};return n(),()=>{e&&clearTimeout(e)}},[])}var WX=K({id:W,title:W,description:U(W),author:W,repositoryName:W,creationDate:hB,lastModifiedDate:hB,link:W,account:K({profile:W,region:W,awsAccountId:U(W),repoAccountId:U(W)}),status:cK,sourceBranch:W,destinationBranch:W,isMergeable:uz,isApproved:uz,commentCount:U(G),healthScore:U(G),fetchedAt:U(hB),approvedBy:q(W).pipe(Nz(H([]))),approvedByArns:q(W).pipe(Nz(H([]))),commentedBy:q(W).pipe(Nz(H([]))),filesChanged:U(G),approvalRules:q(K({ruleName:W,requiredApprovals:G,poolMembers:q(W),poolMemberArns:q(W).pipe(Nz(H([]))),satisfied:uz,fromTemplate:U(W)})).pipe(Nz(H([])))}),GX=K({id:G,pullRequestId:W,awsAccountId:W,type:W,title:W,profile:W,repositoryName:W,accountRegion:W,message:W,createdAt:W,read:G}),KX=K({id:W,pullRequestId:W,awsAccountId:W,region:xz(W),repositoryName:W,sourceBranch:W,containerId:xz(W),port:xz(G),status:W,statusDetail:xz(W),logs:xz(W),error:xz(W),createdAt:W,lastActivityAt:W}),qX=YR(gB(K({pullRequests:q(WX),accounts:q(K({profile:W,region:W,enabled:uz})),enabledProfiles:U(q(W)),status:uK,statusDetail:U(W),error:U(W),lastUpdated:U(hB),currentUser:U(W),pendingReviewCount:G.pipe(Nz(H(0))),unreadNotificationCount:U(G),notifications:U(K({items:q(GX),nextCursor:U(G)})),sandboxes:U(q(KX)),permissionPrompt:U(K({id:W,operation:W,category:W,context:W}))}))),JX=YR(iK),YX=YR(aK),XX=YR(mK),ZX=e=>({items:e.items,...e.nextCursor!==void 0&&{nextCursor:e.nextCursor}}),QX=e=>{let t=e.notifications===void 0?void 0:ZX(e.notifications);return{pullRequests:e.pullRequests.map(e=>XX(e)),accounts:e.accounts.map(e=>({profile:JX(e.profile),region:YX(e.region),enabled:e.enabled})),status:e.status,pendingReviewCount:e.pendingReviewCount,...e.enabledProfiles!==void 0&&{enabledProfiles:e.enabledProfiles},...e.statusDetail!==void 0&&{statusDetail:e.statusDetail},...e.error!==void 0&&{error:e.error},...e.lastUpdated!==void 0&&{lastUpdated:e.lastUpdated},...e.currentUser!==void 0&&{currentUser:e.currentUser},...e.unreadNotificationCount!==void 0&&{unreadNotificationCount:e.unreadNotificationCount},...t!==void 0&&{notifications:t},...e.sandboxes!==void 0&&{sandboxes:e.sandboxes},...e.permissionPrompt!==void 0&&{permissionPrompt:e.permissionPrompt}}};function $X(e,t,n){let r=(0,N.useRef)(e);r.current=e;let i=(0,N.useRef)(t);i.current=t;let a=(0,N.useRef)(n);a.current=n;let[o,s]=(0,N.useState)(`disconnected`),c=(0,N.useRef)(0);return(0,N.useEffect)(()=>{let e=null,t=0,n=null,o=!1,l=()=>{e=new EventSource(`/api/events/`),e.onopen=()=>{t=0,s(`connected`)},e.onmessage=e=>{try{let t=QX(qX(e.data)),n=t.notifications?.items??[],o=new Set([`title_changed`,`description_changed`]);if(c.current>0)for(let e of n)e.id>c.current&&!o.has(e.type)&&(QV(e.title||`New notification`,{id:`notif-${e.id}`,description:e.message,duration:8e3,action:e.awsAccountId!==``&&e.pullRequestId!==``&&e.repositoryName!==``&&e.accountRegion!==``?{label:`View`,onClick:()=>i.current?.(vX(e.awsAccountId,e.pullRequestId,e.repositoryName,e.accountRegion))}:{label:`View`,onClick:()=>i.current?.(`/notifications`)}}),a.current?.({id:e.id,type:e.type,title:e.title||`CodeCommit`,message:e.message,awsAccountId:e.awsAccountId,pullRequestId:e.pullRequestId,repositoryName:e.repositoryName,accountRegion:e.accountRegion}));if(n.length>0){let e=Math.max(...n.map(e=>e.id));e>c.current&&(c.current=e)}r.current(t)}catch{}},e.onerror=()=>{if(e?.close(),t>=50){s(`disconnected`);return}s(`reconnecting`);let r=Math.min(1e3*2**t,3e4);n=setTimeout(()=>{t++,l()},r)}};return DJ.then(e=>{o||(e._tag===`Ready`?l():s(`disconnected`))}),()=>{o=!0,e?.close(),n!=null&&clearTimeout(n)}},[]),o}var eZ=[`account`,`author`,`approver`,`commenter`,`scope`,`repo`,`status`,`size`],tZ=DV(!1).pipe(zV),nZ=[`accounts`,`refresh`,`relay`,`sandbox`,`notifications`,`permissions`,`audit`,`theme`,`config`,`about`];DV(`accounts`).pipe(zV);var rZ=1,iZ=.9,aZ=.8,oZ=.17,sZ=.1,cZ=.999,lZ=.9999,uZ=.99,dZ=/[\\\/_+.#"@\[\(\{&]/,fZ=/[\\\/_+.#"@\[\(\{&]/g,pZ=/[\s-]/,mZ=/[\s-]/g;function hZ(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?rZ:uZ;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=hZ(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=rZ:dZ.test(e.charAt(l-1))?(d*=aZ,p=e.slice(i,l-1).match(fZ),p&&i>0&&(d*=cZ**+p.length)):pZ.test(e.charAt(l-1))?(d*=iZ,m=e.slice(i,l-1).match(mZ),m&&i>0&&(d*=cZ**+m.length)):(d*=oZ,i>0&&(d*=cZ**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=lZ)),(d<sZ&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=hZ(e,t,n,r,l+1,a+2,o),f*sZ>d&&(d=f*sZ)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function gZ(e){return e.toLowerCase().replace(mZ,` `)}function _Z(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,hZ(e,t,gZ(e),gZ(t),0,0,{})}var vZ=`[cmdk-group=""]`,yZ=`[cmdk-group-items=""]`,bZ=`[cmdk-group-heading=""]`,xZ=`[cmdk-item=""]`,SZ=`${xZ}:not([aria-disabled="true"])`,CZ=`cmdk-item-select`,wZ=`data-value`,TZ=(e,t,n)=>_Z(e,t,n),EZ=N.createContext(void 0),DZ=()=>N.useContext(EZ),OZ=N.createContext(void 0),kZ=()=>N.useContext(OZ),AZ=N.createContext(void 0),jZ=N.forwardRef((e,t)=>{let n=GZ(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=GZ(()=>new Set),i=GZ(()=>new Map),a=GZ(()=>new Map),o=GZ(()=>new Set),s=UZ(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=Uo(),y=Uo(),b=Uo(),x=N.useRef(null),S=JZ();WZ(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,C.emit()}},[u]),WZ(()=>{S(6,k)},[]);let C=N.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)O(),E(),S(1,D);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(b);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(S(7,()=>{n.current.selectedItemId=A()?.id,C.emit()}),r||S(5,k),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}C.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),w=N.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,T(t,r)),S(2,()=>{E(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),S(3,()=>{O(),E(),n.current.value||D(),C.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=A();S(4,()=>{O(),t?.getAttribute(`id`)===e&&D(),C.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:b,labelId:y,listInnerRef:x}),[]);function T(e,t){let r=s.current?.filter??TZ;return e?r(e,n.current.search,t):0}function E(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;j().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(yZ);t?t.appendChild(e.parentElement===t?e:e.closest(`${yZ} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${yZ} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=x.current?.querySelector(`${vZ}[${wZ}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function D(){let e=j().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(wZ);C.setState(`value`,e||void 0)}function O(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=T(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function k(){var e;let t=A();t&&(t.parentElement?.firstChild===t&&((e=t.closest(vZ)?.querySelector(bZ))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function A(){return x.current?.querySelector(`${xZ}[aria-selected="true"]`)}function j(){return Array.from(x.current?.querySelectorAll(SZ)||[])}function M(e){let t=j()[e];t&&C.setState(`value`,t.getAttribute(wZ))}function ee(e){var t;let n=A(),r=j(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&C.setState(`value`,a.getAttribute(wZ))}function P(e){let t=A()?.closest(vZ),n;for(;t&&!n;)t=e>0?VZ(t,vZ):HZ(t,vZ),n=t?.querySelector(SZ);n?C.setState(`value`,n.getAttribute(wZ)):ee(e)}let F=()=>M(j().length-1),te=e=>{e.preventDefault(),e.metaKey?F():e.altKey?P(1):ee(1)},ne=e=>{e.preventDefault(),e.metaKey?M(0):e.altKey?P(-1):ee(-1)};return N.createElement(Ia.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&te(e);break;case`ArrowDown`:te(e);break;case`p`:case`k`:g&&e.ctrlKey&&ne(e);break;case`ArrowUp`:ne(e);break;case`Home`:e.preventDefault(),M(0);break;case`End`:e.preventDefault(),F();break;case`Enter`:{e.preventDefault();let t=A();if(t){let e=new Event(CZ);t.dispatchEvent(e)}}}}},N.createElement(`label`,{"cmdk-label":``,htmlFor:w.inputId,id:w.labelId,style:ZZ},c),XZ(e,e=>N.createElement(OZ.Provider,{value:C},N.createElement(EZ.Provider,{value:w},e))))}),MZ=N.forwardRef((e,t)=>{let n=Uo(),r=N.useRef(null),i=N.useContext(AZ),a=DZ(),o=UZ(e),s=o.current?.forceMount??i?.forceMount;WZ(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=qZ(n,r,[e.value,e.children,r],e.keywords),l=kZ(),u=KZ(e=>e.value&&e.value===c.current),d=KZ(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);N.useEffect(()=>{let t=r.current;if(t&&!e.disabled)return t.addEventListener(CZ,f),()=>t.removeEventListener(CZ,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return N.createElement(Ia.div,{ref:ma(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),NZ=N.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=Uo(),s=N.useRef(null),c=N.useRef(null),l=Uo(),u=DZ(),d=KZ(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));WZ(()=>u.group(o),[]),qZ(o,s,[e.value,e.heading,c]);let f=N.useMemo(()=>({id:o,forceMount:i}),[i]);return N.createElement(Ia.div,{ref:ma(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!d||void 0},n&&N.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),XZ(e,e=>N.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},N.createElement(AZ.Provider,{value:f},e))))}),PZ=N.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=N.useRef(null),a=KZ(e=>!e.search);return!n&&!a?null:N.createElement(Ia.div,{ref:ma(i,t),...r,"cmdk-separator":``,role:`separator`})}),FZ=N.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=kZ(),o=KZ(e=>e.search),s=KZ(e=>e.selectedItemId),c=DZ();return N.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),N.createElement(Ia.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),IZ=N.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=N.useRef(null),o=N.useRef(null),s=KZ(e=>e.selectedItemId),c=DZ();return N.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),N.createElement(Ia.div,{ref:ma(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},XZ(e,e=>N.createElement(`div`,{ref:ma(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),LZ=N.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return N.createElement(cl,{open:n,onOpenChange:r},N.createElement(ml,{container:o},N.createElement(gl,{"cmdk-overlay":``,className:i}),N.createElement(bl,{"aria-label":e.label,"cmdk-dialog":``,className:a},N.createElement(jZ,{ref:t,...s}))))}),RZ=N.forwardRef((e,t)=>KZ(e=>e.filtered.count===0)?N.createElement(Ia.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),zZ=N.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return N.createElement(Ia.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},XZ(e,e=>N.createElement(`div`,{"aria-hidden":!0},e)))}),BZ=Object.assign(jZ,{List:IZ,Item:MZ,Input:FZ,Group:NZ,Separator:PZ,Dialog:LZ,Empty:RZ,Loading:zZ});function VZ(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function HZ(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function UZ(e){let t=N.useRef(e);return WZ(()=>{t.current=e}),t}var WZ=typeof window>`u`?N.useEffect:N.useLayoutEffect;function GZ(e){let t=N.useRef();return t.current===void 0&&(t.current=e()),t}function KZ(e){let t=kZ(),n=()=>e(t.snapshot());return N.useSyncExternalStore(t.subscribe,n,n)}function qZ(e,t,n,r=[]){let i=N.useRef(),a=DZ();return WZ(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(wZ,s),i.current=s}),i}var JZ=()=>{let[e,t]=N.useState(),n=GZ(()=>new Map);return WZ(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function YZ(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function XZ({asChild:e,children:t},n){return e&&N.isValidElement(t)?N.cloneElement(YZ(t),{ref:t.ref},n(t.props.children)):n(t)}var ZZ={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function QZ(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=QZ(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function $Z(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=QZ(e))&&(r&&(r+=` `),r+=t);return r}var eQ=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},tQ=(e,t)=>({classGroupId:e,validator:t}),nQ=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),rQ=`-`,iQ=[],aQ=`arbitrary..`,oQ=e=>{let t=lQ(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return cQ(e);let n=e.split(rQ);return sQ(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?eQ(i,t):t:i||iQ}return n[e]||iQ}}},sQ=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=sQ(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(rQ):e.slice(t).join(rQ),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},cQ=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?aQ+r:void 0})(),lQ=e=>{let{theme:t,classGroups:n}=e;return uQ(n,t)},uQ=(e,t)=>{let n=nQ();for(let r in e){let i=e[r];dQ(i,n,r,t)}return n},dQ=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];fQ(i,t,n,r)}},fQ=(e,t,n,r)=>{if(typeof e==`string`){pQ(e,t,n);return}if(typeof e==`function`){mQ(e,t,n,r);return}hQ(e,t,n,r)},pQ=(e,t,n)=>{let r=e===``?t:gQ(t,e);r.classGroupId=n},mQ=(e,t,n,r)=>{if(_Q(e)){dQ(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(tQ(n,e))},hQ=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];dQ(o,gQ(t,a),n,r)}},gQ=(e,t)=>{let n=e,r=t.split(rQ),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=nQ(),n.nextPart.set(t,i)),n=i}return n},_Q=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,vQ=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},yQ=`!`,bQ=`:`,xQ=[],SQ=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),CQ=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===bQ){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(yQ)?(c=s.slice(0,-1),l=!0):s.startsWith(yQ)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return SQ(t,l,c,u)};if(t){let e=t+bQ,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):SQ(xQ,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},wQ=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},TQ=e=>({cache:vQ(e.cacheSize),parseClassName:CQ(e),sortModifiers:wQ(e),postfixLookupClassGroupIds:EQ(e),...oQ(e)}),EQ=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},DQ=/\s+/,OQ=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(DQ),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+yQ:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},kQ=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=AQ(n))&&(i&&(i+=` `),i+=r);return i},AQ=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=AQ(e[r]))&&(n&&(n+=` `),n+=t);return n},jQ=(e,...t)=>{let n,r,i,a,o=o=>(n=TQ(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=OQ(e,n);return i(e,a),a};return a=o,(...e)=>a(kQ(...e))},MQ=[],NQ=e=>{let t=t=>t[e]||MQ;return t.isThemeGetter=!0,t.themeKey=e,t},PQ=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,FQ=/^\((?:(\w[\w-]*):)?(.+)\)$/i,IQ=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,LQ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,RQ=/\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$/,zQ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,BQ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VQ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,HQ=e=>IQ.test(e),UQ=e=>!!e&&!Number.isNaN(Number(e)),WQ=e=>!!e&&Number.isInteger(Number(e)),GQ=e=>e.endsWith(`%`)&&UQ(e.slice(0,-1)),KQ=e=>LQ.test(e),qQ=()=>!0,JQ=e=>RQ.test(e)&&!zQ.test(e),YQ=()=>!1,XQ=e=>BQ.test(e),ZQ=e=>VQ.test(e),QQ=e=>!J(e)&&!Y(e),$Q=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),e$=e=>h$(e,y$,YQ),J=e=>PQ.test(e),t$=e=>h$(e,b$,JQ),n$=e=>h$(e,x$,UQ),r$=e=>h$(e,C$,qQ),i$=e=>h$(e,S$,YQ),a$=e=>h$(e,_$,YQ),o$=e=>h$(e,v$,ZQ),s$=e=>h$(e,w$,XQ),Y=e=>FQ.test(e),c$=e=>g$(e,b$),l$=e=>g$(e,S$),u$=e=>g$(e,_$),d$=e=>g$(e,y$),f$=e=>g$(e,v$),p$=e=>g$(e,w$,!0),m$=e=>g$(e,C$,!0),h$=(e,t,n)=>{let r=PQ.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},g$=(e,t,n=!1)=>{let r=FQ.exec(e);return r?r[1]?t(r[1]):n:!1},_$=e=>e===`position`||e===`percentage`,v$=e=>e===`image`||e===`url`,y$=e=>e===`length`||e===`size`||e===`bg-size`,b$=e=>e===`length`,x$=e=>e===`number`,S$=e=>e===`family-name`,C$=e=>e===`number`||e===`weight`,w$=e=>e===`shadow`,T$=jQ(()=>{let e=NQ(`color`),t=NQ(`font`),n=NQ(`text`),r=NQ(`font-weight`),i=NQ(`tracking`),a=NQ(`leading`),o=NQ(`breakpoint`),s=NQ(`container`),c=NQ(`spacing`),l=NQ(`radius`),u=NQ(`shadow`),d=NQ(`inset-shadow`),f=NQ(`text-shadow`),p=NQ(`drop-shadow`),m=NQ(`blur`),h=NQ(`perspective`),g=NQ(`aspect`),_=NQ(`ease`),v=NQ(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Y,J],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Y,J,c],T=()=>[HQ,`full`,`auto`,...w()],E=()=>[WQ,`none`,`subgrid`,Y,J],D=()=>[`auto`,{span:[`full`,WQ,Y,J]},WQ,Y,J],O=()=>[WQ,`auto`,Y,J],k=()=>[`auto`,`min`,`max`,`fr`,Y,J],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[HQ,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ee=()=>[s,HQ,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],P=()=>[HQ,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,Y,J],te=()=>[...b(),u$,a$,{position:[Y,J]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,d$,e$,{size:[Y,J]}],ie=()=>[GQ,c$,t$],ae=()=>[``,`none`,`full`,l,Y,J],oe=()=>[``,UQ,c$,t$],se=()=>[`solid`,`dashed`,`dotted`,`double`],ce=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],le=()=>[UQ,GQ,u$,a$],ue=()=>[``,`none`,m,Y,J],de=()=>[`none`,UQ,Y,J],fe=()=>[`none`,UQ,Y,J],pe=()=>[UQ,Y,J],me=()=>[HQ,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[KQ],breakpoint:[KQ],color:[qQ],container:[KQ],"drop-shadow":[KQ],ease:[`in`,`out`,`in-out`],font:[QQ],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[KQ],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[KQ],shadow:[KQ],spacing:[`px`,UQ],text:[KQ],"text-shadow":[KQ],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,HQ,J,Y,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Y,J]}],"container-named":[$Q],columns:[{columns:[UQ,`auto`,J,Y,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[WQ,`auto`,Y,J]}],basis:[{basis:[HQ,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[UQ,HQ,`auto`,`initial`,`none`,J]}],grow:[{grow:[``,UQ,Y,J]}],shrink:[{shrink:[``,UQ,Y,J]}],order:[{order:[WQ,`first`,`last`,`none`,Y,J]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...ee()]}],"min-inline-size":[{"min-inline":[`auto`,...ee()]}],"max-inline-size":[{"max-inline":[`none`,...ee()]}],"block-size":[{block:[`auto`,...P()]}],"min-block-size":[{"min-block":[`auto`,...P()]}],"max-block-size":[{"max-block":[`none`,...P()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...N()]}],"font-size":[{text:[`base`,n,c$,t$]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,m$,r$]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,GQ,J]}],"font-family":[{font:[l$,i$,t]}],"font-features":[{"font-features":[J]}],"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,Y,J]}],"line-clamp":[{"line-clamp":[UQ,`none`,Y,n$]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,Y,J]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Y,J]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...se(),`wavy`]}],"text-decoration-thickness":[{decoration:[UQ,`from-font`,`auto`,Y,t$]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[UQ,`auto`,Y,J]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[WQ,Y,J]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Y,J]}],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`,Y,J]}],"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:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},WQ,Y,J],radial:[``,Y,J],conic:[``,WQ,Y,J]},f$,o$]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-bs":[{"border-bs":oe()}],"border-w-be":[{"border-be":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...se(),`hidden`,`none`]}],"divide-style":[{divide:[...se(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...se(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[UQ,Y,J]}],"outline-w":[{outline:[``,UQ,c$,t$]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`inner`,`none`,u,p$,s$]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,p$,s$]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:oe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[UQ,t$]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,p$,s$]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[UQ,Y,J]}],"mix-blend":[{"mix-blend":[...ce(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ce()}],"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":[UQ]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[Y,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[UQ]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Y,J]}],filter:[{filter:[``,`none`,Y,J]}],blur:[{blur:ue()}],brightness:[{brightness:[UQ,Y,J]}],contrast:[{contrast:[UQ,Y,J]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,p$,s$]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,UQ,Y,J]}],"hue-rotate":[{"hue-rotate":[UQ,Y,J]}],invert:[{invert:[``,UQ,Y,J]}],saturate:[{saturate:[UQ,Y,J]}],sepia:[{sepia:[``,UQ,Y,J]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Y,J]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[UQ,Y,J]}],"backdrop-contrast":[{"backdrop-contrast":[UQ,Y,J]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,UQ,Y,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[UQ,Y,J]}],"backdrop-invert":[{"backdrop-invert":[``,UQ,Y,J]}],"backdrop-opacity":[{"backdrop-opacity":[UQ,Y,J]}],"backdrop-saturate":[{"backdrop-saturate":[UQ,Y,J]}],"backdrop-sepia":[{"backdrop-sepia":[``,UQ,Y,J]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Y,J]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[UQ,`initial`,Y,J]}],ease:[{ease:[`linear`,`initial`,_,Y,J]}],delay:[{delay:[UQ,Y,J]}],animate:[{animate:[`none`,v,Y,J]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Y,J]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:fe()}],"scale-x":[{"scale-x":fe()}],"scale-y":[{"scale-y":fe()}],"scale-z":[{"scale-z":fe()}],"scale-3d":[`scale-3d`],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[Y,J,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:me()}],"translate-x":[{"translate-x":me()}],"translate-y":[{"translate-y":me()}],"translate-z":[{"translate-z":me()}],"translate-none":[`translate-none`],zoom:[{zoom:[WQ,Y,J]}],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"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`,Y,J]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,Y,J]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[UQ,c$,t$,n$]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function E$(...e){return T$($Z(e))}function D$({...e}){return(0,L.jsx)(cl,{"data-slot":`dialog`,...e})}function O$({...e}){return(0,L.jsx)(ml,{"data-slot":`dialog-portal`,...e})}function k$({className:e,...t}){return(0,L.jsx)(gl,{"data-slot":`dialog-overlay`,className:E$(`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 A$({children:e,className:t,showCloseButton:n=!0,...r}){return(0,L.jsxs)(O$,{"data-slot":`dialog-portal`,children:[(0,L.jsx)(k$,{}),(0,L.jsxs)(bl,{"data-slot":`dialog-content`,className:E$(`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&&(0,L.jsxs)(kl,{"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:[(0,L.jsx)(Qv,{}),(0,L.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function j$({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`dialog-header`,className:E$(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function M$({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`dialog-footer`,className:E$(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function N$({className:e,...t}){return(0,L.jsx)(Tl,{"data-slot":`dialog-title`,className:E$(`text-lg leading-none font-semibold`,e),...t})}function P$({className:e,...t}){return(0,L.jsx)(Dl,{"data-slot":`dialog-description`,className:E$(`text-muted-foreground text-sm`,e),...t})}function F$({className:e,...t}){return(0,L.jsx)(BZ,{"data-slot":`command`,className:E$(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})}function I$({children:e,className:t,description:n=`Search for a command to run...`,showCloseButton:r=!0,title:i=`Command Palette`,...a}){return(0,L.jsxs)(D$,{...a,children:[(0,L.jsxs)(j$,{className:`sr-only`,children:[(0,L.jsx)(N$,{children:i}),(0,L.jsx)(P$,{children:n})]}),(0,L.jsx)(A$,{className:E$(`overflow-hidden p-0`,t),showCloseButton:r,children:(0,L.jsx)(F$,{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 L$({className:e,...t}){return(0,L.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b px-3`,children:[(0,L.jsx)(Lv,{className:`size-4 shrink-0 opacity-50`}),(0,L.jsx)(BZ.Input,{"data-slot":`command-input`,className:E$(`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 R$({className:e,...t}){return(0,L.jsx)(BZ.List,{"data-slot":`command-list`,className:E$(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function z$({...e}){return(0,L.jsx)(BZ.Empty,{"data-slot":`command-empty`,className:`py-6 text-center text-sm`,...e})}function B$({className:e,...t}){return(0,L.jsx)(BZ.Group,{"data-slot":`command-group`,className:E$(`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 V$({className:e,...t}){return(0,L.jsx)(BZ.Separator,{"data-slot":`command-separator`,className:E$(`bg-border -mx-1 h-px`,e),...t})}function H$({className:e,...t}){return(0,L.jsx)(BZ.Item,{"data-slot":`command-item`,className:E$(`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})}var U$={account:`Account`,author:`Author`,approver:`Approver`,commenter:`Commenter`,scope:`Scope`,repo:`Repo`,status:`Status`,size:`Size`};function W$(){let e=KV(tZ),t=JV(tZ),n=_r(),r=JV(FJ),i=e=>{n(e?`/settings/${e}`:`/settings`),t(!1)};return(0,N.useEffect)(()=>{let e=e=>{e.key===`p`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),t(e=>!e))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t]),(0,L.jsxs)(I$,{open:e,onOpenChange:t,showCloseButton:!1,children:[(0,L.jsx)(L$,{placeholder:`Type a command...`}),(0,L.jsxs)(R$,{children:[(0,L.jsx)(z$,{children:`No results found.`}),(0,L.jsxs)(B$,{heading:`Actions`,children:[(0,L.jsxs)(H$,{onSelect:()=>{r({}),t(!1)},children:[(0,L.jsx)(Mv,{}),`Refresh PRs`]}),(0,L.jsxs)(H$,{onSelect:()=>{n(`/`),t(!1)},children:[(0,L.jsx)(q_,{}),`View: PR List`]}),(0,L.jsxs)(H$,{onSelect:()=>{n(`/notifications`),t(!1)},children:[(0,L.jsx)(r_,{}),`View: Notifications`]})]}),(0,L.jsx)(V$,{}),(0,L.jsxs)(B$,{heading:`Settings`,children:[(0,L.jsxs)(H$,{onSelect:()=>i(),children:[(0,L.jsx)(Bv,{}),`Open Settings`]}),(0,L.jsxs)(H$,{onSelect:()=>i(`accounts`),children:[(0,L.jsx)(Bv,{}),`Settings: Accounts`]}),(0,L.jsxs)(H$,{onSelect:()=>i(`theme`),children:[(0,L.jsx)(Bv,{}),`Settings: Theme`]}),(0,L.jsxs)(H$,{onSelect:()=>i(`config`),children:[(0,L.jsx)(Bv,{}),`Settings: Config`]}),(0,L.jsxs)(H$,{onSelect:()=>i(`about`),children:[(0,L.jsx)(Bv,{}),`Settings: About`]})]}),(0,L.jsx)(V$,{}),(0,L.jsxs)(B$,{heading:`Filters`,children:[(0,L.jsxs)(H$,{onSelect:()=>{n(`/?hot=1`),t(!1)},children:[(0,L.jsx)(G_,{}),`Hot`]}),eZ.map(e=>(0,L.jsxs)(H$,{onSelect:()=>{n(`/?f=${e}:`),t(!1)},children:[(0,L.jsx)(q_,{}),`Filter: `,U$[e]]},e))]})]})]})}var G$=e=>`${e.getDate().toString().padStart(2,`0`)}.${(e.getMonth()+1).toString().padStart(2,`0`)}.${e.getFullYear()}`,K$=(e,t,n=`Updated`)=>aH(Math.max(0,Math.floor((t.getTime()-e.getTime())/1e3))).pipe(oH(e=>e<60,e=>`${n} ${e}s ago`),oH(e=>e<3600,e=>`${n} ${Math.floor(e/60)}m ago`),oH(e=>e<86400,e=>`${n} ${Math.floor(e/3600)}h ago`),sH(()=>`${n} on ${G$(e)}`)),q$=e=>{let t=/^(\d{4})-W(\d{2})$/.exec(e);if(!t)return SS();let n=parseInt(t[1],10),r=parseInt(t[2],10);if(r<1||r>53)return SS();let i=new Date(Date.UTC(n,0,4)),a=i.getUTCDay()||7,o=new Date(i.getTime()+((r-1)*7-(a-1))*864e5);return CS({week:e,start:o,end:new Date(o.getTime()+6048e5)})},J$=e=>{let t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())),n=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-n);let r=new Date(Date.UTC(t.getUTCFullYear(),0,1)),i=Math.ceil(((t.getTime()-r.getTime())/864e5+1)/7);return`${t.getUTCFullYear()}-W${i.toString().padStart(2,`0`)}`},Y$=e=>{let t=e.week.split(`-W`),n=e.start.toLocaleString(`en-US`,{month:`short`,timeZone:`UTC`}),r=e.end.toLocaleString(`en-US`,{month:`short`,timeZone:`UTC`}),i=e.start.getUTCDate(),a=e.end.getUTCDate(),o=n===r?`${n} ${i} – ${a}`:`${n} ${i} – ${r} ${a}`;return`W${t[1]} ${t[0]} · ${o}`},X$=e=>{let t=YC(HC(e));return t<1?`${Math.round(t*60)}m`:t<24?`${Math.floor(t)}h`:`${Math.round(t/24*10)/10}d`},Z$=e=>Object.prototype.toString.call(e),Q$=e=>e===!0||e===!1,$$=e=>Z$(Object(e))===`[object Function]`,e1=e=>Z$(Object(e))===`[object Number]`&&Object.is(Object(e).valueOf(),e),t1=e=>e!==null&&Object(e)===e&&!$$(e),n1=e=>Z$(Object(e))===`[object String]`&&Object(e).valueOf()===e,r1=e=>e,i1=(e,t)=>{let n=e[t];if(n===void 0)throw Error(`Missing CSS Module class: ${t}`);return n},a1=(...e)=>e.filter(e=>n1(e)&&e.length>0).join(` `),X=(e,t)=>{if(e.trim().length===0)throw Error(`${t} must contain visible text`);return e},o1=new WeakMap,s1=new WeakMap,c1=(0,N.createContext)(null),l1=0,u1=(e,t)=>{let n=(0,N.useRef)({open:e,value:t}),r=e&&!n.current.open?t:n.current.value;return(0,N.useLayoutEffect)(()=>{e?n.current.open||(n.current={open:!0,value:t}):n.current={open:!1,value:t}},[e,t]),r},d1=e=>`inert`in e&&Q$(e.inert),f1=e=>e!==null&&d1(e),p1=({children:e})=>{let[t,n]=(0,N.useState)(!1);return(0,N.createElement)(c1.Provider,{value:{isContentMounted:t,setContentMounted:n}},e)},m1=()=>(0,N.useContext)(c1)?.isContentMounted??!0,h1=()=>(0,N.useContext)(c1)!==null,g1=()=>{let e=(0,N.useContext)(c1)?.setContentMounted;(0,N.useLayoutEffect)(()=>(e?.(!0),()=>e?.(!1)),[e])},_1=e=>{let t=o1.get(e);if(t===void 0){o1.set(e,{count:1,previous:e.inert}),e.inert=!0;return}t.count+=1},v1=e=>{let t=o1.get(e);if(t!==void 0){if(t.count>1){--t.count;return}e.inert=t.previous,o1.delete(e)}},y1=(e,t)=>{(0,N.useLayoutEffect)(()=>{if(!t)return;let n=e.current;if(n===null)return;let r=new Set,i=new Set,a=n.ownerDocument.defaultView?.MutationObserver,o=null,s=()=>{let e=n;for(;e!==e.ownerDocument.body;){let t=e.parentNode;if(t===null)break;i.has(t)||(o?.observe(t,{childList:!0}),i.add(t));let n=!1;for(let i of t.children){if(i===e){n=!0;continue}!(n&&i.hasAttribute(`data-rly-modal-layer`))&&f1(i)&&!r.has(i)&&(_1(i),r.add(i))}let a=e.parentElement;if(a!==null){e=a;continue}if(!(`host`in t))break;let s=t.host;if(!t1(s)||!d1(s))break;e=s}};return a!==void 0&&(o=new a(s)),s(),()=>{o?.disconnect();for(let e of r)v1(e)}},[t,e])},b1=e=>{let t=s1.get(e);if(t!==void 0){t.count+=1;return}let n=e.documentElement;s1.set(e,{count:1,overflow:n.style.overflow,overscrollBehavior:n.style.overscrollBehavior}),n.style.overflow=`hidden`,n.style.overscrollBehavior=`none`},x1=e=>{let t=s1.get(e);if(t===void 0)return;if(t.count>1){--t.count;return}let n=e.documentElement;n.style.overflow=t.overflow,n.style.overscrollBehavior=t.overscrollBehavior,s1.delete(e)},S1=(e,t)=>{(0,N.useLayoutEffect)(()=>{if(!t)return;let n=e.current?.ownerDocument;if(n!==void 0)return b1(n),()=>x1(n)},[t,e])},C1=()=>{l1+=1},w1=e=>{let t=++l1;setTimeout(()=>{l1===t&&e!==null&&e.isConnected===!0&&e.focus()},0)},T1={layer:`rly_Sheet-module__layer`,trigger:`rly_Sheet-module__trigger`,close:`rly_Sheet-module__close`,iconClose:`rly_Sheet-module__iconClose`,overlay:`rly_Sheet-module__overlay`,"rly-sheet-overlay-out":`rly_Sheet-module__rly-sheet-overlay-out`,"rly-sheet-overlay-in":`rly_Sheet-module__rly-sheet-overlay-in`,content:`rly_Sheet-module__content`,end:`rly_Sheet-module__end`,"rly-sheet-end-out":`rly_Sheet-module__rly-sheet-end-out`,"rly-sheet-end-in":`rly_Sheet-module__rly-sheet-end-in`,start:`rly_Sheet-module__start`,"rly-sheet-start-out":`rly_Sheet-module__rly-sheet-start-out`,"rly-sheet-start-in":`rly_Sheet-module__rly-sheet-start-in`,header:`rly_Sheet-module__header`,heading:`rly_Sheet-module__heading`,title:`rly_Sheet-module__title`,description:`rly_Sheet-module__description`,body:`rly_Sheet-module__body`,footer:`rly_Sheet-module__footer`},E1=e=>i1(T1,e),D1=r1({side:{end:{className:E1(`end`),purpose:`Supporting detail that follows the current reading flow`,tokens:[`color-surface-1`,`radius-overlay`,`motion-standard`]},start:{className:E1(`start`),purpose:`Navigation or context that precedes the current reading flow`,tokens:[`color-surface-1`,`radius-overlay`,`motion-standard`]}}}),O1=r1({side:`end`}),k1=(0,N.createContext)(null),A1=()=>{let e=(0,N.useContext)(k1);if(e===null)throw Error(`Sheet compound components must be nested inside Sheet.Root`);return e},j1=({children:e,entryMotion:t})=>{let n=A1(),r=(0,N.useRef)(null);return g1(),y1(r,n.open),(0,L.jsx)(`div`,{className:E1(`layer`),"data-rly-modal-layer":``,"data-rly-sheet-entry-motion":t,"data-rly-sheet-layer":``,ref:r,children:e})},M1=(e,t)=>(n1(e)&&X(e,`${t} children`),e),N1=Object.freeze({Body:({className:e,...t})=>(0,L.jsx)(`div`,{...t,className:a1(E1(`body`),e)}),Close:({children:e,className:t,type:n,...r})=>(0,L.jsx)(kl,{...r,className:a1(E1(`close`),t),type:n??`button`,children:M1(e,`Sheet.Close`)}),Content:({children:e,className:t,closeLabel:n,description:r,entryMotion:i=`intrinsic`,initialFocusRef:a,ref:o,side:s=O1.side,tabIndex:c,title:l,...u})=>{let d=A1(),f=u1(d.open,i),p=X(l,`Sheet title`),m=r===void 0?void 0:X(r,`Sheet description`),h=X(n??`Close ${p}`,`Sheet closeLabel`),g=(0,N.useRef)(null),_=(0,N.useCallback)(e=>{g.current=e,$$(o)?o(e):o!=null&&(o.current=e)},[o]);return(0,L.jsx)(ry,{children:n=>(0,L.jsx)(ml,{container:n,children:(0,L.jsxs)(j1,{entryMotion:f,children:[(0,L.jsx)(gl,{className:E1(`overlay`),"data-rly-sheet-overlay":``,onPointerDown:()=>d.requestOpenChange(!1)}),(0,L.jsxs)(bl,{...u,...m===void 0?{"aria-describedby":void 0}:{},className:a1(E1(`content`),D1.side[s].className,t),"data-rly-sheet-side":s,onCloseAutoFocus:e=>e.preventDefault(),onOpenAutoFocus:e=>{e.preventDefault();let t=g.current?.ownerDocument.activeElement??null;d.restoreFocusRef.current===null&&f1(t)&&(d.restoreFocusRef.current=t);let n=a?.current??g.current;n?.focus(),n!==g.current&&n?.ownerDocument.activeElement!==n&&g.current?.focus()},ref:_,tabIndex:c??-1,children:[(0,L.jsxs)(`div`,{className:E1(`header`),children:[(0,L.jsxs)(`div`,{className:E1(`heading`),children:[(0,L.jsx)(Tl,{className:E1(`title`),children:p}),m===void 0?null:(0,L.jsx)(Dl,{className:E1(`description`),children:m})]}),(0,L.jsx)(kl,{"aria-label":h,className:E1(`iconClose`),type:`button`,children:(0,L.jsx)($v,{decorative:!0,name:`close`,size:`default`})})]}),e]})]})})})},Footer:({className:e,...t})=>(0,L.jsx)(`footer`,{...t,className:a1(E1(`footer`),e)}),Root:e=>{let{children:t,defaultOpen:n=!1,onOpenChange:r,open:i}=e,[a,o]=(0,N.useState)(n),s=m1(),c=(0,N.useRef)(null),l=(i??a)&&s,u=(0,N.useRef)(l),d=e=>{i===void 0&&o(e),r?.(e)};return(0,N.useLayoutEffect)(()=>{u.current!==l&&(u.current=l,l?C1():w1(c.current))},[l]),(0,L.jsx)(p1,{children:(0,L.jsx)(k1.Provider,{value:{open:l,requestOpenChange:d,restoreFocusRef:c},children:(0,L.jsx)(cl,{modal:!0,onOpenChange:d,open:l,children:t})})})},Trigger:({children:e,className:t,onClick:n,type:r,...i})=>{let a=A1();return(0,L.jsx)(ul,{...i,className:a1(E1(`trigger`),t),onClick:e=>{a.restoreFocusRef.current=e.currentTarget,n?.(e)},type:r??`button`,children:M1(e,`Sheet.Trigger`)})}}),P1={root:`rly_Button-module__root`,primary:`rly_Button-module__primary`,secondary:`rly_Button-module__secondary`,quiet:`rly_Button-module__quiet`,compact:`rly_Button-module__compact`,defaultSize:`rly_Button-module__defaultSize`,principal:`rly_Button-module__principal`,stretch:`rly_Button-module__stretch`,content:`rly_Button-module__content`,label:`rly_Button-module__label`,loadingContent:`rly_Button-module__loadingContent`,loader:`rly_Button-module__loader`},F1=e=>i1(P1,e),I1=r1({variant:{primary:{className:F1(`primary`),purpose:`Single principal action`,tokens:[`color-action-background`,`color-action-foreground`]},secondary:{className:F1(`secondary`),purpose:`Default supporting action`,tokens:[`color-surface-1`,`color-border-2`]},quiet:{className:F1(`quiet`),purpose:`Low-emphasis contextual action`,tokens:[`color-text-1`,`color-surface-2`]}},size:{compact:{className:F1(`compact`),purpose:`Dense text action`,tokens:[`space-40`]},default:{className:F1(`defaultSize`),purpose:`Standard action`,tokens:[`space-48`]},principal:{className:F1(`principal`),purpose:`Prominent consequential action`,tokens:[`space-48`,`space-8`]}}}),L1=({"aria-label":e,"aria-labelledby":t,children:n,className:r,disabled:i,leadingIcon:a,loading:o=!1,size:s=`default`,stretch:c=!1,trailingIcon:l,type:u,variant:d=`secondary`,...f})=>{if(!e1(n)&&!n1(n)||n1(n)&&n.trim().length===0)throw Error(`Button children must contain visible content`);return(0,L.jsxs)(`button`,{...f,"aria-busy":o?`true`:void 0,"aria-label":o&&!t?.trim()?e?.trim()?e:String(n):e,"aria-labelledby":t,className:a1(F1(`root`),I1.variant[d].className,I1.size[s].className,c&&F1(`stretch`),r),"data-loading":o?`true`:void 0,disabled:i||o,type:u??`button`,children:[(0,L.jsxs)(`span`,{className:a1(F1(`content`),o&&F1(`loadingContent`)),children:[a===void 0?null:(0,L.jsx)($v,{decorative:!0,name:a,size:s===`compact`?`small`:`default`}),(0,L.jsx)(`span`,{className:F1(`label`),children:n}),l===void 0?null:(0,L.jsx)($v,{decorative:!0,name:l,size:s===`compact`?`small`:`default`})]}),o?(0,L.jsx)(`span`,{"aria-hidden":`true`,className:F1(`loader`),children:(0,L.jsx)($v,{decorative:!0,name:`loader`,size:s===`compact`?`small`:`default`})}):null]})},R1={root:`rly_StateLabel-module__root`,neutral:`rly_StateLabel-module__neutral`,positive:`rly_StateLabel-module__positive`,critical:`rly_StateLabel-module__critical`,caution:`rly_StateLabel-module__caution`,progress:`rly_StateLabel-module__progress`,compact:`rly_StateLabel-module__compact`,defaultSize:`rly_StateLabel-module__defaultSize`},z1=e=>i1(R1,e),B1=r1({tone:{neutral:{className:z1(`neutral`),purpose:`Neutral or unavailable state`,tokens:[`color-text-2`,`color-surface-2`]},positive:{className:z1(`positive`),purpose:`Positive state`,tokens:[`color-success-ink`,`color-success-tint`]},critical:{className:z1(`critical`),purpose:`Critical state`,tokens:[`color-blocked-ink`,`color-blocked-tint`]},caution:{className:z1(`caution`),purpose:`Caution state`,tokens:[`color-held-ink`,`color-held-tint`]},progress:{className:z1(`progress`),purpose:`Work in progress`,tokens:[`color-deploying-ink`,`color-deploying-tint`]}},size:{compact:{className:z1(`compact`),purpose:`Dense metadata state`,tokens:[`type-meta`]},default:{className:z1(`defaultSize`),purpose:`Standard explicit state`,tokens:[`type-label`]}}}),V1={neutral:`minus`,positive:`check`,critical:`alert`,caution:`clock`,progress:`loader`},H1=({className:e,icon:t,label:n,size:r=`default`,tone:i=`neutral`,...a})=>(0,L.jsxs)(`span`,{...a,className:a1(z1(`root`),B1.tone[i].className,B1.size[r].className,e),children:[(0,L.jsx)($v,{decorative:!0,name:t??V1[i],size:`small`}),(0,L.jsx)(`span`,{children:X(n,`StateLabel label`)})]}),U1={root:`rly_Avatar-module__root`,small:`rly_Avatar-module__small`,defaultSize:`rly_Avatar-module__defaultSize`,large:`rly_Avatar-module__large`,hero:`rly_Avatar-module__hero`,circle:`rly_Avatar-module__circle`,roundedSquare:`rly_Avatar-module__roundedSquare`,image:`rly_Avatar-module__image`,fallback:`rly_Avatar-module__fallback`},W1=e=>i1(U1,e),G1=r1({size:{small:{className:W1(`small`),purpose:`Compact supporting identity`,tokens:[`space-24`]},default:{className:W1(`defaultSize`),purpose:`Standard identity`,tokens:[`space-32`]},large:{className:W1(`large`),purpose:`Prominent identity`,tokens:[`space-40`]},hero:{className:W1(`hero`),purpose:`Page-level identity`,tokens:[`space-48`,`space-8`]}},form:{circle:{className:W1(`circle`),purpose:`Human or general identity`,tokens:[`radius-round`]},"rounded-square":{className:W1(`roundedSquare`),purpose:`Non-human or system identity`,tokens:[`radius-field`]}}}),K1=({className:e,decorative:t,fallback:n,form:r=`circle`,label:i,size:a=`default`,src:o,...s})=>{let c=t?void 0:X(i,`Avatar label`),l=X(n,`Avatar fallback`);return(0,L.jsxs)(zl,{...s,"aria-hidden":t?`true`:void 0,"aria-label":c,className:a1(W1(`root`),G1.size[a].className,G1.form[r].className,e),role:t?void 0:`img`,children:[o===void 0?null:(0,L.jsx)(Vl,{alt:``,className:W1(`image`),decoding:`async`,loading:`lazy`,src:o}),(0,L.jsx)(Ul,{"aria-hidden":`true`,className:W1(`fallback`),children:l})]})},q1={root:`rly_IconButton-module__root`,primary:`rly_IconButton-module__primary`,secondary:`rly_IconButton-module__secondary`,quiet:`rly_IconButton-module__quiet`,compact:`rly_IconButton-module__compact`,defaultSize:`rly_IconButton-module__defaultSize`,principal:`rly_IconButton-module__principal`},J1=e=>i1(q1,e),Y1=r1({variant:{primary:{className:J1(`primary`),purpose:`Principal icon action`,tokens:[`color-action-background`,`color-action-foreground`]},secondary:{className:J1(`secondary`),purpose:`Default icon action`,tokens:[`color-surface-1`,`color-border-2`]},quiet:{className:J1(`quiet`),purpose:`Low-emphasis icon action`,tokens:[`color-text-1`,`color-surface-2`]}},size:{compact:{className:J1(`compact`),purpose:`Minimum accessible icon target`,tokens:[`space-40`,`space-4`]},default:{className:J1(`defaultSize`),purpose:`Standard icon target`,tokens:[`space-48`]},principal:{className:J1(`principal`),purpose:`Prominent icon target`,tokens:[`space-48`,`space-8`]}}}),X1=({className:e,disabled:t,icon:n,label:r,loading:i=!1,size:a=`default`,type:o,variant:s=`secondary`,...c})=>(0,L.jsx)(`button`,{...c,"aria-busy":i?`true`:void 0,"aria-label":X(r,`IconButton label`),className:a1(J1(`root`),Y1.variant[s].className,Y1.size[a].className,e),"data-loading":i?`true`:void 0,disabled:t||i,type:o??`button`,children:(0,L.jsx)($v,{decorative:!0,name:i?`loader`:n,size:a===`compact`?`small`:`default`})}),Z1=new WeakSet,Q1=e=>(Z1.add(e),e),$1=e=>Z1.has(e),e0={trigger:`rly_Select-module__trigger`,compact:`rly_Select-module__compact`,defaultSize:`rly_Select-module__defaultSize`,triggerIcon:`rly_Select-module__triggerIcon`,content:`rly_Select-module__content`,viewport:`rly_Select-module__viewport`,item:`rly_Select-module__item`,itemIndicator:`rly_Select-module__itemIndicator`,scrollButton:`rly_Select-module__scrollButton`},t0=e=>i1(e0,e),n0=r1({size:{compact:{className:t0(`compact`),purpose:`Dense form rows`,tokens:[`space-40`,`type-meta`]},default:{className:t0(`defaultSize`),purpose:`Standard selection control`,tokens:[`space-48`,`type-body`]}}}),r0=r1({size:`default`}),i0=(e,t)=>{if(!t&&!e.some(e=>!e.disabled))throw Error(`Select options must contain at least one enabled option`);let n=new Set;for(let t of e){X(t.label,`Select option label`);let e=X(t.value,`Select option value`);if(n.has(e))throw Error(`Duplicate Select option value: ${e}`);n.add(e)}},a0=Q1(e=>{let t=`value`in e,{"aria-describedby":n,"aria-errormessage":r,"aria-invalid":i,"aria-label":a,"aria-labelledby":o,"aria-required":s,autoComplete:c,className:l,defaultOpen:u,defaultValue:d,disabled:f=!1,form:p,id:m,name:h,onBlur:g,onFocus:_,onKeyDown:v,onOpenChange:y,onValueChange:b,open:x,options:S,placeholder:C=`Select an option`,ref:w,required:T=!1,size:E=r0.size,tabIndex:D,value:O}=e;i0(S,f),X(a??o,a===void 0?`Select aria-labelledby`:`Select aria-label`);let k=X(C,`Select placeholder`),A=O??d;if(A!==void 0&&!S.some(e=>e.value===A))throw Error(`Select value does not match an option: ${A}`);return(0,L.jsxs)(gh,{...c===void 0?{}:{autoComplete:c},...u===void 0?{}:{defaultOpen:u},...d===void 0?{}:{defaultValue:d},disabled:f,...p===void 0?{}:{form:p},...h===void 0?{}:{name:h},...y===void 0?{}:{onOpenChange:y},...b===void 0?{}:{onValueChange:b},...x===void 0?{}:{open:x},required:T,...t?{value:O??``}:{},children:[(0,L.jsxs)(vh,{"aria-describedby":n,"aria-errormessage":r,"aria-invalid":i,"aria-label":a,"aria-labelledby":o,"aria-required":s??(T?!0:void 0),className:a1(t0(`trigger`),n0.size[E].className,l),id:m,onBlur:g,onFocus:_,onKeyDown:v,ref:w,tabIndex:D,children:[(0,L.jsx)(bh,{placeholder:k}),(0,L.jsx)(xh,{asChild:!0,children:(0,L.jsx)(`span`,{"aria-hidden":`true`,className:t0(`triggerIcon`),children:(0,L.jsx)($v,{decorative:!0,name:`chevron-down`,size:`small`})})})]}),(0,L.jsx)(ry,{children:e=>(0,L.jsx)(wh,{container:e,children:(0,L.jsxs)(Eh,{align:`start`,className:a1(t0(`content`),n0.size[E].className),position:`popper`,sideOffset:6,children:[(0,L.jsx)(Xh,{"aria-hidden":`true`,className:t0(`scrollButton`),children:(0,L.jsx)($v,{decorative:!0,name:`chevron-up`,size:`small`})}),(0,L.jsx)(Rh,{className:t0(`viewport`),children:S.map(e=>(0,N.createElement)(Wh,{className:t0(`item`),...e.disabled===void 0?{}:{disabled:e.disabled},key:e.value,textValue:e.label,value:e.value},(0,L.jsx)(Kh,{children:e.label}),(0,L.jsx)(Jh,{className:t0(`itemIndicator`),children:(0,L.jsx)($v,{decorative:!0,name:`check`,size:`small`})})))}),(0,L.jsx)(Qh,{"aria-hidden":`true`,className:t0(`scrollButton`),children:(0,L.jsx)($v,{decorative:!0,name:`chevron-down`,size:`small`})})]})})})]})}),o0={root:`rly_Skeleton-module__root`,text:`rly_Skeleton-module__text`,block:`rly_Skeleton-module__block`,circle:`rly_Skeleton-module__circle`},s0=e=>i1(o0,e),c0=r1({variant:{text:{className:s0(`text`),purpose:`A line of unavailable copy`,tokens:[`type-body`,`radius-tag`]},block:{className:s0(`block`),purpose:`A rectangular unavailable region`,tokens:[`space-64`,`radius-control`]},circle:{className:s0(`circle`),purpose:`A circular unavailable image`,tokens:[`radius-round`]}}}),l0=({className:e,decorative:t=!0,height:n,label:r,style:i,variant:a=`text`,width:o,...s})=>{if(!t&&r===void 0)throw Error(`Skeleton label must contain visible text`);let c=t||r===void 0?void 0:X(r,`Skeleton label`),l={...n!==void 0&&{blockSize:n},...o!==void 0&&{inlineSize:o}};return(0,L.jsx)(`div`,{...s,"aria-busy":t?void 0:`true`,"aria-hidden":t?`true`:void 0,"aria-label":c,className:a1(s0(`root`),c0.variant[a].className,e),role:t?`presentation`:`status`,style:{...i,...l}})},u0={root:`rly_StatePanel-module__root`,neutral:`rly_StatePanel-module__neutral`,positive:`rly_StatePanel-module__positive`,critical:`rly_StatePanel-module__critical`,caution:`rly_StatePanel-module__caution`,progress:`rly_StatePanel-module__progress`,rail:`rly_StatePanel-module__rail`,icon:`rly_StatePanel-module__icon`,content:`rly_StatePanel-module__content`,title:`rly_StatePanel-module__title`,description:`rly_StatePanel-module__description`,action:`rly_StatePanel-module__action`},d0=e=>i1(u0,e),f0=r1({tone:{neutral:{className:d0(`neutral`),purpose:`Neutral explanatory state`,tokens:[`color-text-2`,`color-surface-2`]},positive:{className:d0(`positive`),purpose:`Positive outcome`,tokens:[`color-success-ink`,`color-success-tint`]},critical:{className:d0(`critical`),purpose:`Critical outcome requiring attention`,tokens:[`color-blocked-ink`,`color-blocked-tint`]},caution:{className:d0(`caution`),purpose:`Held outcome requiring review`,tokens:[`color-held-ink`,`color-held-tint`]},progress:{className:d0(`progress`),purpose:`Work currently in progress`,tokens:[`color-deploying-ink`,`color-deploying-tint`]}}}),p0={neutral:`minus`,positive:`check`,critical:`alert`,caution:`clock`,progress:`loader`},m0=({action:e,announce:t=`off`,className:n,description:r,icon:i,title:a,tone:o=`neutral`,...s})=>{let c=t===`assertive`?`alert`:t===`polite`?`status`:void 0;return(0,L.jsxs)(`section`,{...s,"aria-live":t===`off`?void 0:t,className:a1(d0(`root`),f0.tone[o].className,n),role:c,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:d0(`rail`)}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:d0(`icon`),children:(0,L.jsx)($v,{decorative:!0,name:i??p0[o]})}),(0,L.jsxs)(`div`,{className:d0(`content`),children:[(0,L.jsx)(`strong`,{className:d0(`title`),children:X(a,`StatePanel title`)}),r===void 0?null:(0,L.jsx)(`div`,{className:d0(`description`),children:r}),e===void 0?null:(0,L.jsx)(`div`,{className:d0(`action`),children:e})]})]})},h0={root:`rly_Field-module__root`,label:`rly_Field-module__label`,required:`rly_Field-module__required`,description:`rly_Field-module__description`,error:`rly_Field-module__error`,controlSlot:`rly_Field-module__controlSlot`,control:`rly_Field-module__control`,compact:`rly_Field-module__compact`,defaultSize:`rly_Field-module__defaultSize`},g0=e=>i1(h0,e),_0=[`aria-describedby`,`aria-errormessage`,`aria-invalid`,`aria-labelledby`,`aria-required`,`id`,`required`],v0=new Set([`button`,`input`,`select`,`textarea`]),y0=r1({size:{compact:{className:g0(`compact`),purpose:`Dense form rows`,tokens:[`space-40`,`type-meta`]},default:{className:g0(`defaultSize`),purpose:`Standard form controls`,tokens:[`space-48`,`type-label`]}}}),b0=r1({size:`default`}),x0=({children:e,className:t,controlId:n,description:r,error:i,label:a,required:o=!1,size:s=b0.size,...c})=>{let l=(0,N.useId)(),u=n??`rly-field-${l}`,d=`${u}-label`,f=r===void 0?void 0:`${u}-description`,p=i===void 0?void 0:`${u}-error`,m={"aria-describedby":[f,p].filter(e=>e!==void 0).join(` `)||void 0,"aria-errormessage":p,"aria-invalid":i!==void 0||void 0,"aria-labelledby":d,"aria-required":o?!0:void 0,className:g0(`control`),id:u},h=o?{...m,required:!0}:m,g=e(h),_=g.type;if(!(n1(_)?v0.has(_):($$(_)||t1(_))&&_!==null&&$1(_)))throw Error(`Field children must render one concrete or rly-owned control`);for(let e of _0)if(g.props[e]!==h[e])throw Error(`Field control must apply ${e}`);if(!g.props.className.split(` `).includes(h.className))throw Error(`Field control must apply className`);return(0,L.jsxs)(`div`,{...c,className:a1(g0(`root`),y0.size[s].className,t),"data-error":i===void 0?void 0:`true`,children:[(0,L.jsxs)(`label`,{className:g0(`label`),htmlFor:u,id:d,children:[X(a,`Field label`),o?(0,L.jsx)(`span`,{className:g0(`required`),children:`Required`}):null]}),r===void 0?null:(0,L.jsx)(`p`,{className:g0(`description`),id:f,children:X(r,`Field description`)}),(0,L.jsx)(`div`,{className:g0(`controlSlot`),children:g}),i===void 0?null:(0,L.jsx)(`p`,{className:g0(`error`),id:p,role:`alert`,children:X(i,`Field error`)})]})},S0={layer:`rly_Dialog-module__layer`,overlay:`rly_Dialog-module__overlay`,content:`rly_Dialog-module__content`,defaultSize:`rly_Dialog-module__defaultSize`,wide:`rly_Dialog-module__wide`,header:`rly_Dialog-module__header`,title:`rly_Dialog-module__title`,description:`rly_Dialog-module__description`,body:`rly_Dialog-module__body`,"dialog-fade-in":`rly_Dialog-module__dialog-fade-in`,"dialog-fade-out":`rly_Dialog-module__dialog-fade-out`,"dialog-enter":`rly_Dialog-module__dialog-enter`,"dialog-exit":`rly_Dialog-module__dialog-exit`,"dialog-compact-in":`rly_Dialog-module__dialog-compact-in`,"dialog-compact-out":`rly_Dialog-module__dialog-compact-out`},C0=e=>i1(S0,e),w0=(0,N.createContext)(null),T0=()=>{let e=(0,N.useContext)(w0);if(e===null)throw Error(`Dialog compound components must be nested inside Dialog`);return e},E0=(e,t)=>{$$(e)?e(t):e!=null&&(e.current=t)},D0=()=>{try{return f1(document.activeElement)?document.activeElement:null}catch{return null}},O0=r1({size:{default:{className:C0(`defaultSize`),purpose:`Focused decision or short form`,tokens:[`radius-overlay`,`space-32`]},wide:{className:C0(`wide`),purpose:`Detailed comparison or multi-section form`,tokens:[`radius-overlay`,`space-64`]}}}),k0=({children:e,entryMotion:t})=>{let n=T0(),r=(0,N.useRef)(null);return g1(),y1(r,n.open),(0,L.jsx)(`div`,{className:C0(`layer`),"data-rly-dialog-entry-motion":t,"data-rly-dialog-layer":``,"data-rly-modal-layer":``,ref:r,children:e})},A0=Object.freeze({Close:e=>(0,L.jsx)(kl,{asChild:!0,children:(0,L.jsx)(L1,{...e})}),Content:({children:e,className:t,description:n,entryMotion:r=`intrinsic`,initialFocusRef:i,size:a=`default`,title:o,...s})=>{let c=T0(),l=u1(c.open,r),u=X(o,`Dialog title`),d=n===void 0?void 0:X(n,`Dialog description`);return(0,L.jsx)(ry,{children:n=>(0,L.jsx)(ml,{container:n,children:(0,L.jsxs)(k0,{entryMotion:l,children:[(0,L.jsx)(gl,{className:C0(`overlay`),"data-rly-dialog-overlay":``,onPointerDown:()=>{c.requestOpenChange(!1)}}),(0,L.jsxs)(bl,{...s,...d===void 0?{"aria-describedby":void 0}:{},className:a1(C0(`content`),O0.size[a].className,t),onCloseAutoFocus:e=>{e.preventDefault()},onOpenAutoFocus:e=>{let t=D0();c.triggerRef.current===null&&t!==null&&(c.restoreTargetRef.current=t);let n=i?.current;n!=null&&(e.preventDefault(),n.focus())},children:[(0,L.jsxs)(`header`,{className:C0(`header`),children:[(0,L.jsx)(Tl,{className:C0(`title`),children:u}),d===void 0?null:(0,L.jsx)(Dl,{className:C0(`description`),children:d})]}),(0,L.jsx)(`div`,{className:C0(`body`),children:e})]})]})})})},Root:({children:e,defaultOpen:t=!1,onOpenChange:n,open:r})=>{let[i,a]=(0,N.useState)(t),o=m1(),s=(r??i)&&o,c=(0,N.useRef)(s),l=(0,N.useRef)(null),u=(0,N.useRef)(s?D0():null);s&&!c.current&&(u.current=l.current??D0());let d=e=>{e&&(u.current=l.current??D0()),r===void 0&&a(e),n?.(e)};return(0,N.useLayoutEffect)(()=>{c.current!==s&&(c.current=s,s?C1():w1(u.current))},[s]),(0,L.jsx)(p1,{children:(0,L.jsx)(w0.Provider,{value:{open:s,requestOpenChange:d,restoreTargetRef:u,triggerRef:l},children:(0,L.jsx)(cl,{modal:!0,onOpenChange:d,open:s,children:e})})})},Trigger:({ref:e,...t})=>{let n=T0();return(0,L.jsx)(ul,{asChild:!0,children:(0,L.jsx)(L1,{...t,ref:t=>{n.triggerRef.current=t,E0(e,t)}})})}}),j0={root:`rly_Divider-module__root`,horizontal:`rly_Divider-module__horizontal`,vertical:`rly_Divider-module__vertical`,subtle:`rly_Divider-module__subtle`,strong:`rly_Divider-module__strong`},M0=e=>i1(j0,e);M0(`horizontal`),M0(`vertical`),M0(`subtle`),M0(`strong`);var N0={root:`rly_Surface-module__root`,tonePrimary:`rly_Surface-module__tonePrimary`,toneSecondary:`rly_Surface-module__toneSecondary`,toneTertiary:`rly_Surface-module__toneTertiary`,shapeCard:`rly_Surface-module__shapeCard`,shapeGrouped:`rly_Surface-module__shapeGrouped`,paddingNone:`rly_Surface-module__paddingNone`,paddingCompact:`rly_Surface-module__paddingCompact`,paddingDefault:`rly_Surface-module__paddingDefault`,paddingSpacious:`rly_Surface-module__paddingSpacious`},P0=e=>i1(N0,e),F0=r1({tone:{primary:{className:P0(`tonePrimary`),purpose:`Primary bordered surface`,tokens:[`color-surface-1`,`color-border-1`]},secondary:{className:P0(`toneSecondary`),purpose:`Quiet secondary surface`,tokens:[`color-surface-2`]},tertiary:{className:P0(`toneTertiary`),purpose:`Inset tertiary surface`,tokens:[`color-surface-3`]}},form:{card:{className:P0(`shapeCard`),purpose:`Standard card geometry`,tokens:[`radius-control`]},grouped:{className:P0(`shapeGrouped`),purpose:`Grouped content geometry`,tokens:[`radius-group`]}},padding:{none:{className:P0(`paddingNone`),purpose:`Caller-owned internal layout`,tokens:[`space-0`]},compact:{className:P0(`paddingCompact`),purpose:`Dense supporting content`,tokens:[`space-16`]},default:{className:P0(`paddingDefault`),purpose:`Standard content`,tokens:[`space-24`]},spacious:{className:P0(`paddingSpacious`),purpose:`Prominent grouped content`,tokens:[`space-32`]}}}),I0=({as:e,children:t,className:n,form:r=`card`,padding:i=`default`,ref:a,tone:o=`primary`,...s})=>(0,N.createElement)(e??`div`,{...s,className:a1(P0(`root`),F0.tone[o].className,F0.form[r].className,F0.padding[i].className,n),ref:a},t),L0={root:`rly_Tabs-module__root`,list:`rly_Tabs-module__list`,trigger:`rly_Tabs-module__trigger`,defaultSize:`rly_Tabs-module__defaultSize`,large:`rly_Tabs-module__large`,panel:`rly_Tabs-module__panel`},R0=e=>i1(L0,e);R0(`defaultSize`),R0(`large`);var z0={root:`rly_Text-module__root`,verdict:`rly_Text-module__verdict`,pageTitle:`rly_Text-module__pageTitle`,sectionTitle:`rly_Text-module__sectionTitle`,cardTitle:`rly_Text-module__cardTitle`,bodyLarge:`rly_Text-module__bodyLarge`,body:`rly_Text-module__body`,label:`rly_Text-module__label`,meta:`rly_Text-module__meta`,code:`rly_Text-module__code`,tonePrimary:`rly_Text-module__tonePrimary`,toneSecondary:`rly_Text-module__toneSecondary`,toneTertiary:`rly_Text-module__toneTertiary`,toneInherit:`rly_Text-module__toneInherit`},B0=e=>i1(z0,e),V0=r1({variant:{verdict:{className:B0(`verdict`),purpose:`One restrained verdict thesis`,tokens:[`type-verdict`]},"page-title":{className:B0(`pageTitle`),purpose:`Primary page title`,tokens:[`type-page-title`]},"section-title":{className:B0(`sectionTitle`),purpose:`Section heading`,tokens:[`type-section-title`]},"card-title":{className:B0(`cardTitle`),purpose:`Card or panel heading`,tokens:[`type-card-title`]},"body-large":{className:B0(`bodyLarge`),purpose:`Leading explanatory copy`,tokens:[`type-body-large`]},body:{className:B0(`body`),purpose:`Default interface copy`,tokens:[`type-body`]},label:{className:B0(`label`),purpose:`Control and metadata labels`,tokens:[`type-label`]},meta:{className:B0(`meta`),purpose:`Supporting metadata`,tokens:[`type-meta`]},code:{className:B0(`code`),purpose:`Code and tabular data`,tokens:[`type-code`]}},tone:{primary:{className:B0(`tonePrimary`),purpose:`Primary readable text`,tokens:[`color-text-1`]},secondary:{className:B0(`toneSecondary`),purpose:`Supporting text`,tokens:[`color-text-2`]},tertiary:{className:B0(`toneTertiary`),purpose:`Restricted tertiary text`,tokens:[`color-text-3`]},inherit:{className:B0(`toneInherit`),purpose:`Inherit semantic context`,tokens:[]}}}),H0=r1({variant:`body`,tone:`primary`}),U0=e=>e===`code`?`code`:e===`verdict`?`p`:e===`label`||e===`meta`?`span`:`p`,W0=({as:e,children:t,className:n,ref:r,tone:i=H0.tone,variant:a=H0.variant,...o})=>(0,N.createElement)(e??U0(a),{...o,className:a1(B0(`root`),V0.variant[a].className,V0.tone[i].className,n),ref:r},t),G0={root:`rly_ToggleGroup-module__root`,item:`rly_ToggleGroup-module__item`,defaultSize:`rly_ToggleGroup-module__defaultSize`,compact:`rly_ToggleGroup-module__compact`},K0=e=>i1(G0,e);K0(`compact`),K0(`defaultSize`);var q0={header:`_header_sb6or_1`,brand:`_brand_sb6or_15`,brandMark:`_brandMark_sb6or_28`,brandName:`_brandName_sb6or_45`,navigation:`_navigation_sb6or_51`,navLink:`_navLink_sb6or_61`,navCount:`_navCount_sb6or_88`,utilities:`_utilities_sb6or_106`,status:`_status_sb6or_115`,statusDot:`_statusDot_sb6or_127`,"status-pulse":`_status-pulse_sb6or_1`,statusErrorDetail:`_statusErrorDetail_sb6or_148`,commandButton:`_commandButton_sb6or_156`,iconButton:`_iconButton_sb6or_157`,userButton:`_userButton_sb6or_158`,notificationCount:`_notificationCount_sb6or_200`,avatar:`_avatar_sb6or_232`,userName:`_userName_sb6or_247`,userChevron:`_userChevron_sb6or_254`,menu:`_menu_sb6or_259`,menuIdentity:`_menuIdentity_sb6or_268`,menuSeparator:`_menuSeparator_sb6or_286`,menuIcon:`_menuIcon_sb6or_292`,shortcut:`_shortcut_sb6or_301`,menuCount:`_menuCount_sb6or_302`,spinning:`_spinning_sb6or_323`,"icon-spin":`_icon-spin_sb6or_1`,statusCopy:`_statusCopy_sb6or_392`};function J0({...e}){return(0,L.jsx)(ym,{"data-slot":`dropdown-menu`,...e})}function Y0({...e}){return(0,L.jsx)(bm,{"data-slot":`dropdown-menu-trigger`,...e})}function X0({align:e=`end`,className:t,sideOffset:n=4,...r}){return(0,L.jsx)(xm,{children:(0,L.jsx)(Sm,{"data-slot":`dropdown-menu-content`,align:e,sideOffset:n,className:E$(`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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md`,t),...r})})}function Z0({className:e,...t}){return(0,L.jsx)(Cm,{"data-slot":`dropdown-menu-item`,className:E$(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 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`,e),...t})}function Q0({className:e,...t}){return(0,L.jsx)(`kbd`,{"data-slot":`kbd`,className:E$(`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})}var $0=[{active:e=>e===`/`||e.startsWith(`/accounts/`),label:`Pull requests`,to:`/`},{active:e=>e===`/sandboxes`||e.startsWith(`/sandbox/`),label:`Sandboxes`,to:`/sandboxes`},{active:e=>e===`/notifications`||e===`/audit`,label:`Activity`,to:`/notifications`},{active:e=>e.startsWith(`/settings`),label:`Settings`,to:`/settings`}],e2=e=>e===void 0?``:e.split(/[.@_\s-]+/).filter(e=>e.length>0).slice(0,2).map(e=>e[0]?.toUpperCase()).join(``)||`U`;function t2({detail:e,label:t,state:n}){return(0,L.jsxs)(`span`,{"aria-label":`${t}. ${e}`,className:q0.status,role:`status`,title:e,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:q0.statusDot,"data-state":n}),(0,L.jsx)(`span`,{className:q0.statusCopy,children:t}),n===`error`?(0,L.jsx)(`span`,{className:q0.statusErrorDetail,children:e}):null]})}function n2(){let e=KV(hY),t=JV(FJ),n=JV(UJ),r=JV(tZ),i=_r(),{pathname:a}=hr(),{setTheme:o,theme:s}=cy(),c=e.status===`loading`,l=e.status===`error`,u=e.unreadNotificationCount??0,d=e.pendingReviewCount??0,f=(e.sandboxes??[]).filter(e=>e.status===`running`||e.status===`creating`||e.status===`cloning`||e.status===`starting`).length,p=e.lastUpdated?K$(e.lastUpdated,new Date):`No completed sync yet`,m=l?`error`:c?`loading`:e.lastUpdated?`live`:`connecting`,h=l?`Sync issue`:c?`Syncing`:e.lastUpdated?`Live`:`Connecting`,g=l?e.error??`Unable to refresh pull requests`:e.statusDetail??p,_=s===`dark`?`light`:s===`light`?`system`:`dark`,v=s===`dark`?Tv:s===`light`?Gv:Cv;return(0,L.jsxs)(`header`,{className:q0.header,children:[(0,L.jsxs)(Ji,{"aria-label":`CodeCommit pull requests`,className:q0.brand,to:`/`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:q0.brandMark,children:(0,L.jsx)($_,{})}),(0,L.jsx)(`span`,{className:q0.brandName,children:`CodeCommit`})]}),(0,L.jsx)(`nav`,{"aria-label":`Primary`,className:q0.navigation,children:$0.map(e=>{let t=e.active(a),n=e.to===`/`?d:e.to===`/sandboxes`?f:0,r=e.to===`/`?`needing your review`:`active`;return(0,L.jsxs)(Ji,{"aria-current":t?`page`:void 0,"aria-label":n>0?`${e.label}, ${n} ${r}`:void 0,className:q0.navLink,to:e.to,children:[(0,L.jsx)(`span`,{children:e.label}),n>0?(0,L.jsx)(`span`,{"aria-hidden":`true`,className:q0.navCount,children:n>99?`99+`:n}):null]},e.label)})}),(0,L.jsxs)(`div`,{className:q0.utilities,children:[(0,L.jsx)(t2,{detail:g,label:h,state:m}),(0,L.jsx)(X1,{className:q0.commandButton,icon:`search`,label:`Open command palette`,onClick:()=>r(!0),size:`compact`,variant:`quiet`}),(0,L.jsxs)(`button`,{"aria-label":u>0?`Notifications, ${u} unread`:`Notifications`,className:q0.iconButton,onClick:()=>i(`/notifications`),title:`Notifications`,type:`button`,children:[(0,L.jsx)(r_,{"aria-hidden":`true`}),u>0?(0,L.jsx)(`span`,{"aria-hidden":`true`,className:q0.notificationCount,children:u>99?`99+`:u}):null]}),(0,L.jsxs)(J0,{children:[(0,L.jsx)(Y0,{asChild:!0,children:(0,L.jsx)(`button`,{"aria-label":e.currentUser?`Open account menu for ${e.currentUser}`:`Open application menu`,className:q0.userButton,type:`button`,children:e.currentUser?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:q0.avatar,children:e2(e.currentUser)}),(0,L.jsx)(`span`,{className:q0.userName,children:e.currentUser}),(0,L.jsx)(d_,{"aria-hidden":`true`,className:q0.userChevron})]}):(0,L.jsx)(F_,{"aria-hidden":`true`})})}),(0,L.jsxs)(X0,{"aria-label":`Application actions`,className:q0.menu,sideOffset:10,children:[e.currentUser?(0,L.jsxs)(`div`,{className:q0.menuIdentity,children:[(0,L.jsx)(`span`,{children:`Signed in as`}),(0,L.jsx)(`strong`,{children:e.currentUser})]}):null,(0,L.jsxs)(Z0,{onSelect:()=>r(!0),children:[(0,L.jsx)(`span`,{className:q0.menuIcon,"aria-hidden":`true`,children:`⌘`}),`Command palette`,(0,L.jsx)(Q0,{className:q0.shortcut,children:`⌘P`})]}),(0,L.jsxs)(Z0,{disabled:c,onSelect:()=>t({}),children:[(0,L.jsx)(Mv,{className:c?q0.spinning:void 0}),c?`Refreshing…`:`Refresh pull requests`]}),d>0?(0,L.jsxs)(Z0,{onSelect:()=>i(`/?review=1`),children:[(0,L.jsx)(V_,{}),`Needs my review`,(0,L.jsx)(`span`,{className:q0.menuCount,children:d})]}):null,(0,L.jsx)(`div`,{className:q0.menuSeparator,role:`separator`}),(0,L.jsxs)(Z0,{onSelect:()=>i(`/stats`),children:[(0,L.jsx)(fee,{}),`Statistics`]}),(0,L.jsxs)(Z0,{onSelect:()=>i(`/audit`),children:[(0,L.jsx)(Fv,{}),`Audit log`]}),(0,L.jsxs)(Z0,{"aria-label":`Cycle theme. Current theme: ${s}. Next theme: ${_}.`,onSelect:()=>o(_),children:[(0,L.jsx)(v,{}),`Theme: `,s]}),e.currentUser?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:q0.menuSeparator,role:`separator`}),(0,L.jsxs)(Z0,{onSelect:()=>n({}),children:[(0,L.jsx)(dv,{}),`Log out`]})]}):null]})]})]})]})}var r2=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,i2=$Z,a2=(e,t)=>n=>{if(t?.variants==null)return i2(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=r2(t)||r2(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return i2(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},o2=a2(`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 s2({asChild:e=!1,className:t,variant:n=`default`,...r}){let i=e?ya:`span`;return(0,L.jsx)(i,{"data-slot":`badge`,"data-variant":n,className:E$(o2({variant:n}),t),...r})}var c2=a2(`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 l2({asChild:e=!1,className:t,size:n=`default`,variant:r=`default`,...i}){let a=e?ya:`button`;return(0,L.jsx)(a,{"data-slot":`button`,"data-variant":r,"data-size":n,className:E$(c2({variant:r,size:n,className:t})),...i})}function u2({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`button-group`,className:E$(`inline-flex items-stretch rounded-md border overflow-hidden [&>*]:rounded-none [&>*]:border-0 [&>*]:shadow-none [&>*:not(:last-child)]:border-r`,e),...t})}function d2({prompt:e}){let t=JV(sY),n=n=>t({payload:{id:e.id,response:n}});return(0,L.jsx)(D$,{open:!0,children:(0,L.jsxs)(A$,{showCloseButton:!1,children:[(0,L.jsxs)(j$,{children:[(0,L.jsxs)(N$,{className:`flex items-center gap-2`,children:[(0,L.jsx)(Hv,{className:`size-5`}),`API Permission Required`]}),(0,L.jsx)(P$,{children:e.context})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md bg-muted px-3 py-2`,children:[(0,L.jsx)(s2,{variant:e.category===`write`?`destructive`:`secondary`,children:e.category}),(0,L.jsx)(`code`,{className:`text-xs font-mono`,children:e.operation})]}),(0,L.jsxs)(M$,{children:[(0,L.jsx)(l2,{variant:`outline`,onClick:()=>n(`deny`),children:`Deny`}),(0,L.jsx)(l2,{variant:`secondary`,onClick:()=>n(`allow_once`),children:`Allow Once`}),(0,L.jsx)(l2,{onClick:()=>n(`always_allow`),children:`Always Allow`})]})]})})}var f2={root:`_root_dn6e5_1`,fullWidthRoot:`_fullWidthRoot_dn6e5_9`,main:`_main_dn6e5_14`,fullWidthMain:`_fullWidthMain_dn6e5_21`};function p2(){let e=JV(hY),t=KV(hY),n=_r(),r=(0,N.useCallback)(e=>n(e??`/notifications`),[n]),{notify:i}=zX(e=>n(e));$X(t=>e(t),r,i),UX(t.pendingReviewCount??0);let a=Zme(),{theme:o}=cy();return(0,L.jsx)(kX,{children:(0,L.jsxs)(`div`,{className:`${f2.root} ${a?f2.fullWidthRoot:``}`,children:[(0,L.jsx)(n2,{}),(0,L.jsx)(`main`,{className:a?f2.fullWidthMain:f2.main,children:(0,L.jsx)(Qr,{})}),(0,L.jsx)(Zi,{storageKey:`codecommit-web-scroll-positions`}),(0,L.jsx)(W$,{}),(0,L.jsx)(Kie,{theme:o}),t.permissionPrompt&&(0,L.jsx)(d2,{prompt:t.permissionPrompt})]})})}var m2=(e,t)=>({category:e,description:t}),h2={getCallerIdentity:m2(`read`,`Get current user identity`),listRepositories:m2(`read`,`List all repositories`),getRepository:m2(`read`,`Get repository identity`),listPullRequests:m2(`read`,`List PR IDs for a repo`),getPullRequests:m2(`read`,`Fetch PR details`),getPullRequest:m2(`read`,`Single PR detail`),evaluatePullRequestApprovalRules:m2(`read`,`Check approval status`),getPullRequestApprovalStates:m2(`read`,`Get who approved`),getMergeConflicts:m2(`read`,`Check merge conflicts`),getCommentsForPullRequest:m2(`read`,`Fetch PR comments`),listBranches:m2(`read`,`List branches`),getDifferences:m2(`read`,`Diff stats`),getBlob:m2(`read`,`Read immutable file content`),createPullRequest:m2(`write`,`Create a pull request`),updatePullRequestTitle:m2(`write`,`Edit PR title`),updatePullRequestDescription:m2(`write`,`Edit PR description`),postPullRequestComment:m2(`write`,`Post a comment to a pull request`),createApprovalRule:m2(`write`,`Create approval rule`),updateApprovalRule:m2(`write`,`Update approval rule`),deleteApprovalRule:m2(`write`,`Delete approval rule`)},g2=new Map(Object.entries(h2)),_2=()=>[...g2.entries()];function v2({className:e,type:t,...n}){return(0,L.jsx)(`input`,{type:t,"data-slot":`input`,className:E$(`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 y2({...e}){return(0,L.jsx)(gh,{"data-slot":`select`,...e})}function b2({...e}){return(0,L.jsx)(bh,{"data-slot":`select-value`,...e})}function x2({children:e,className:t,size:n=`default`,...r}){return(0,L.jsxs)(vh,{"data-slot":`select-trigger`,"data-size":n,className:E$(`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,(0,L.jsx)(xh,{asChild:!0,children:(0,L.jsx)(d_,{className:`size-4 opacity-50`})})]})}function S2({align:e=`center`,children:t,className:n,position:r=`item-aligned`,...i}){return(0,L.jsx)(wh,{children:(0,L.jsxs)(Eh,{"data-slot":`select-content`,className:E$(`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:[(0,L.jsx)(w2,{}),(0,L.jsx)(Rh,{className:E$(`p-1`,r===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,L.jsx)(T2,{})]})})}function C2({children:e,className:t,...n}){return(0,L.jsxs)(Wh,{"data-slot":`select-item`,className:E$(`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:[(0,L.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,L.jsx)(Jh,{children:(0,L.jsx)(l_,{className:`size-4`})})}),(0,L.jsx)(Kh,{children:e})]})}function w2({className:e,...t}){return(0,L.jsx)(Xh,{"data-slot":`select-scroll-up-button`,className:E$(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,L.jsx)(__,{className:`size-4`})})}function T2({className:e,...t}){return(0,L.jsx)(Qh,{"data-slot":`select-scroll-down-button`,className:E$(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,L.jsx)(d_,{className:`size-4`})})}var E2=50,D2=`secondary`,O2=`default`,k2=`destructive`,A2=`outline`,j2=()=>[`all`,..._2().map(([e])=>e)],M2=UR(K({id:G,timestamp:W,operation:W,accountProfile:W,region:W,permissionState:W,context:W,durationMs:xz(G)})),N2=e=>{switch(e){case`always_allowed`:return D2;case`allowed`:return O2;case`denied`:return k2;case`timed_out`:return A2;default:return A2}};function P2(){let e=_r(),[,t]=YV(fY,{mode:`promise`}),[,n]=YV(pY,{mode:`promise`}),[r,i]=(0,N.useState)([]),[a,o]=(0,N.useState)(0),[s,c]=(0,N.useState)(!0),[l,u]=(0,N.useState)(0),[d,f]=(0,N.useState)(``),[p,m]=(0,N.useState)(``),[h,g]=(0,N.useState)(``),_=(0,N.useMemo)(()=>({limit:E2,offset:l,...d&&{search:d},...p&&{operation:p},...h&&{permissionState:h}}),[l,d,p,h]);(0,N.useEffect)(()=>{let e=!1;return c(!0),t({query:_}).then(t=>{e||(i(t.items.filter(M2)),o(t.total),c(!1))}).catch(()=>c(!1)),()=>{e=!0}},[t,_]);let v=l+E2<a,y=(0,N.useCallback)(()=>{n({query:{}}).then(e=>{let t=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`audit-log-${new Date().toISOString().slice(0,10)}.json`,r.click(),URL.revokeObjectURL(n)}).catch(()=>{})},[n]);return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,L.jsxs)(l2,{variant:`ghost`,size:`sm`,className:`gap-2`,onClick:()=>e(`/`),children:[(0,L.jsx)(Zg,{className:`size-4`}),`Back`]}),(0,L.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Audit Log`}),(0,L.jsxs)(`span`,{className:`text-sm text-muted-foreground`,children:[a,` entries`]}),(0,L.jsx)(`div`,{className:`ml-auto`,children:(0,L.jsxs)(l2,{variant:`outline`,size:`sm`,className:`gap-2`,onClick:y,children:[(0,L.jsx)(N_,{className:`size-3`}),`Export JSON`]})})]}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsxs)(`div`,{className:`relative flex-1`,children:[(0,L.jsx)(Lv,{className:`absolute left-2.5 top-2.5 size-4 text-muted-foreground`}),(0,L.jsx)(v2,{placeholder:`Search operations and context...`,value:d,onChange:e=>{f(e.target.value),u(0)},className:`pl-9`})]}),(0,L.jsxs)(y2,{value:p||`all`,onValueChange:e=>{m(e===`all`?``:e),u(0)},children:[(0,L.jsx)(x2,{className:`w-48`,children:(0,L.jsx)(b2,{placeholder:`Operation`})}),(0,L.jsx)(S2,{children:j2().map(e=>(0,L.jsx)(C2,{value:e,children:e===`all`?`All operations`:e},e))})]}),(0,L.jsxs)(y2,{value:h||`all`,onValueChange:e=>{g(e===`all`?``:e),u(0)},children:[(0,L.jsx)(x2,{className:`w-40`,children:(0,L.jsx)(b2,{placeholder:`State`})}),(0,L.jsxs)(S2,{children:[(0,L.jsx)(C2,{value:`all`,children:`All states`}),(0,L.jsx)(C2,{value:`always_allowed`,children:`Always allowed`}),(0,L.jsx)(C2,{value:`allowed`,children:`Allowed`}),(0,L.jsx)(C2,{value:`denied`,children:`Denied`}),(0,L.jsx)(C2,{value:`timed_out`,children:`Timed out`})]})]})]}),(0,L.jsx)(`div`,{className:`rounded-md border`,children:(0,L.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{className:`border-b bg-muted/50`,children:[(0,L.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Timestamp`}),(0,L.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Operation`}),(0,L.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Account`}),(0,L.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`State`}),(0,L.jsx)(`th`,{className:`px-3 py-2 text-right font-medium`,children:`Duration`}),(0,L.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Context`})]})}),(0,L.jsxs)(`tbody`,{children:[s&&r.length===0&&(0,L.jsx)(`tr`,{children:(0,L.jsx)(`td`,{colSpan:6,className:`px-3 py-8 text-center text-muted-foreground`,children:`Loading...`})}),!s&&r.length===0&&(0,L.jsx)(`tr`,{children:(0,L.jsx)(`td`,{colSpan:6,className:`px-3 py-8 text-center text-muted-foreground`,children:`No entries`})}),r.map(e=>(0,L.jsxs)(`tr`,{className:`border-b last:border-0 hover:bg-muted/30`,children:[(0,L.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-muted-foreground whitespace-nowrap`,children:new Date(e.timestamp).toLocaleString()}),(0,L.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs`,children:e.operation}),(0,L.jsx)(`td`,{className:`px-3 py-2 text-xs`,children:e.accountProfile||`-`}),(0,L.jsx)(`td`,{className:`px-3 py-2`,children:(0,L.jsx)(s2,{variant:N2(e.permissionState),className:`text-xs`,children:e.permissionState})}),(0,L.jsx)(`td`,{className:`px-3 py-2 text-right font-mono text-xs text-muted-foreground`,children:e.durationMs==null?`-`:`${e.durationMs}ms`}),(0,L.jsx)(`td`,{className:`px-3 py-2 text-xs text-muted-foreground truncate max-w-[200px]`,children:e.context})]},e.id))]})]})}),(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:a>0?`${l+1}–${Math.min(l+E2,a)} of ${a}`:`0 entries`}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(l2,{variant:`outline`,size:`sm`,disabled:l===0,onClick:()=>u(Math.max(0,l-E2)),children:`Previous`}),(0,L.jsx)(l2,{variant:`outline`,size:`sm`,disabled:!v,onClick:()=>u(l+E2),children:`Next`})]})]})]})}function F2(e={}){let{filter:t,unreadOnly:n}=e,r=t!==void 0||n===!0,i=KV(hY).notifications,[a,o]=(0,N.useState)([]),[s,c]=(0,N.useState)(null),[l,u]=YV(qJ,{mode:`promise`}),d=(0,N.useRef)(`${t}:${n}`),f=`${t}:${n}`;d.current!==f&&(d.current=f,o([]),c(null));let p=i?.items[0]?.id,m=(0,N.useRef)(p);!r&&m.current!==p&&(m.current=p,a.length>0&&o([]));let h=(0,N.useMemo)(()=>({limit:20,...t&&{filter:t},...n&&{unreadOnly:1}}),[t,n]);(0,N.useEffect)(()=>{if(!r)return;let e=!1;return u({query:h}).then(t=>{e||c({items:t.items,...t.nextCursor!==void 0&&{nextCursor:t.nextCursor}})}).catch(()=>{}),()=>{e=!0}},[r,h,u]);let g=r?s:i,_=a.length>0?a[a.length-1].nextCursor:g?.nextCursor,v=_!==void 0,y=l.waiting,b=(0,N.useCallback)(async()=>{if(v&&!y&&_!==void 0)try{let e=await u({query:{...h,cursor:_}}),t={items:e.items,...e.nextCursor!==void 0&&{nextCursor:e.nextCursor}};o(e=>[...e,t])}catch{}},[v,y,_,u,h]);return{items:(0,N.useMemo)(()=>{let e=g?.items??[];return a.length===0?e:[...e,...a.flatMap(e=>e.items)]},[g?.items,a]),hasMore:v,isLoading:y,loadMore:b}}function I2(e,t){let n=(0,N.useRef)(null),r=(0,N.useRef)(e);return r.current=e,(0,N.useCallback)(e=>{n.current?.disconnect(),n.current=null,e&&(n.current=new IntersectionObserver(e=>{e[0]?.isIntersecting&&r.current()},t),n.current.observe(e))},[JSON.stringify(t)])}function L2(e){let[t,n]=(0,N.useState)(null),r=(0,N.useRef)(e);return r.current!==e&&(r.current=e,t!==null&&n(null)),[t??e,n]}function R2(e){let[t,n]=(0,N.useState)(new Set),r=(0,N.useRef)(e);return r.current!==e&&(r.current=e,t.size>0&&n(new Set)),[t,(0,N.useCallback)(e=>{n(t=>new Set(t).add(e))},[]),(0,N.useCallback)(e=>{n(new Set(e))},[]),(0,N.useCallback)(e=>{n(t=>{let n=new Set(t);return n.delete(e),n})},[])]}function z2({className:e,decorative:t=!0,orientation:n=`horizontal`,...r}){return(0,L.jsx)(dg,{"data-slot":`separator`,decorative:t,orientation:n,className:E$(`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})}var B2=a2(`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`}}),V2=N.createContext({size:`default`,variant:`default`,spacing:0});function H2({children:e,className:t,size:n,spacing:r=0,variant:i,...a}){return(0,L.jsx)(xg,{"data-slot":`toggle-group`,"data-variant":i,"data-size":n,"data-spacing":r,className:E$(`group/toggle-group flex w-fit items-center rounded-md`,t),...a,children:(0,L.jsx)(V2,{value:{variant:i,size:n,spacing:r},children:e})})}function U2({children:e,className:t,size:n,variant:r,...i}){let a=N.useContext(V2);return(0,L.jsx)(Ag,{"data-slot":`toggle-group-item`,"data-variant":a.variant||r,"data-size":a.size||n,"data-spacing":a.spacing,className:E$(B2({variant:a.variant||r,size:a.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})}var W2=e=>/ExpiredToken|Unauthorized|AuthFailure|SSO|token|credentials|expired/i.test(e),G2=e=>e===`system`||e===`prs`,K2=e=>{switch(e){case`error`:return(0,L.jsx)(y_,{className:`size-4 text-destructive shrink-0`});case`warning`:return(0,L.jsx)(_ee,{className:`size-4 text-yellow-500 shrink-0`});case`success`:return(0,L.jsx)(x_,{className:`size-4 text-green-500 shrink-0`});default:return(0,L.jsx)(tv,{className:`size-4 text-blue-500 shrink-0`})}},q2=KR(gB(K({operation:U(W),profile:U(W),region:U(W),cause:U(W),error:U(W),message:U(W)}))),J2=e=>kS(q2(e),()=>CS({cause:e})),Y2=e=>{let t=J2(e);if(TS(t))return e;let{cause:n,error:r,message:i,operation:a}=t.value,o=n??r??i,s=[];return a!==void 0&&s.push(a),o!==void 0&&s.push(o),s.length>0?s.join(` — `):e},X2=e=>{let t=new Date(e),n=new Date().getTime()-t.getTime();return n<6e4?`just now`:n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:t.toLocaleDateString()};function Z2(){let[e,t]=(0,N.useState)(void 0),[n,r]=(0,N.useState)(!0),[i,a]=(0,N.useState)(new Set),o=e=>a(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),s=KV(hY),c=_r(),{hasMore:l,isLoading:u,items:d,loadMore:f}=F2({filter:e,unreadOnly:n}),p=JV(JJ),m=JV(YJ),h=JV(XJ),g=JV(HJ),_=JV(UJ),[v,y,b]=R2(d[0]?.id),[x,S,,C]=R2(d[0]?.id),w=I2(()=>{l&&!u&&f()}),T=d.map(e=>x.has(e.id)?{...e,read:0}:v.has(e.id)?{...e,read:1}:e),E=s.unreadNotificationCount??0,D=e=>e.pullRequestId===``,O=e=>{e.read===0&&(y(e.id),C(e.id),p({payload:{id:e.id}})),D(e)?o(e.id):c(e.repositoryName!==``&&e.accountRegion!==``?vX(e.awsAccountId,e.pullRequestId,e.repositoryName,e.accountRegion):`/accounts/${encodeURIComponent(e.awsAccountId)}/prs/${e.pullRequestId}`)};return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Notifications`}),(0,L.jsx)(l2,{variant:`ghost`,size:`sm`,onClick:()=>c(`/`),children:`Back`})]}),(0,L.jsx)(z2,{}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsxs)(H2,{type:`single`,value:e??`all`,onValueChange:e=>t(G2(e)?e:void 0),variant:`outline`,size:`sm`,children:[(0,L.jsx)(U2,{value:`all`,children:`All`}),(0,L.jsx)(U2,{value:`system`,children:`System`}),(0,L.jsx)(U2,{value:`prs`,children:`PRs`})]}),(0,L.jsx)(l2,{variant:n?`secondary`:`ghost`,size:`sm`,onClick:()=>r(e=>!e),children:`Unread only`})]}),(0,L.jsxs)(`div`,{className:`space-y-3`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsx)(`div`,{className:`flex items-center gap-2`,children:E>0&&(0,L.jsxs)(s2,{variant:`destructive`,children:[E,` unread`]})}),E>0&&(0,L.jsxs)(l2,{variant:`ghost`,size:`sm`,onClick:()=>{b(T.map(e=>e.id)),h({})},children:[(0,L.jsx)(l_,{className:`size-3.5 mr-1`}),`Mark all read`]})]}),T.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground py-4 text-center`,children:`No notifications`}):(0,L.jsx)(`div`,{className:`divide-y rounded-md border`,children:T.map(e=>{let t=Y2(e.message),n=i.has(e.id);return(0,L.jsxs)(`div`,{className:`flex ${e.read===0?`border-l-2 border-l-blue-500`:``}`,children:[(0,L.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,L.jsxs)(`div`,{className:`flex items-start gap-3 px-3 py-2.5 cursor-pointer hover:bg-accent/50 transition-colors`,role:`button`,tabIndex:0,onClick:()=>O(e),onKeyDown:t=>{t.key===`Enter`&&O(e)},children:[K2(e.type),(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,L.jsx)(`span`,{className:`text-sm truncate ${e.read===0?`font-medium`:`text-muted-foreground`}`,children:e.title||(D(e)?e.type:`PR #${e.pullRequestId}`)}),(0,L.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:X2(e.createdAt)})]}),!n&&(0,L.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground line-clamp-1`,children:t})]})]}),n&&(0,L.jsxs)(`div`,{className:`px-3 pb-2.5 ml-7 space-y-2 min-w-0 overflow-hidden`,children:[DS(J2(e.message),{onNone:()=>(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground break-words`,children:e.message}),onSome:e=>(0,L.jsxs)(`div`,{className:`text-xs text-muted-foreground space-y-0.5`,children:[e.operation&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`font-medium`,children:`operation:`}),` `,e.operation]}),e.profile&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`font-medium`,children:`profile:`}),` `,e.profile]}),e.region&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`font-medium`,children:`region:`}),` `,e.region]}),e.cause&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`font-medium`,children:`cause:`}),` `,e.cause]}),e.error&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`font-medium`,children:`error:`}),` `,e.error]}),e.message&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`font-medium`,children:`message:`}),` `,e.message]})]})}),(0,L.jsxs)(u2,{children:[(0,L.jsx)(l2,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-xs`,onClick:()=>{e.read===0?(y(e.id),C(e.id),p({payload:{id:e.id}})):(S(e.id),m({payload:{id:e.id}}))},children:e.read===0?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(pv,{className:`size-3`}),` Mark as read`]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(hv,{className:`size-3`}),` Mark as unread`]})}),D(e)&&W2(e.message)&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(l2,{variant:`default`,size:`sm`,className:`h-7 px-2.5 text-xs`,onClick:()=>{try{let t=XR(iK)(e.profile||e.title);g({payload:{profile:t}})}catch{}},children:`Login`}),(0,L.jsx)(l2,{variant:`ghost`,size:`sm`,className:`h-7 px-2.5 text-xs`,onClick:()=>{_({})},children:`Logout`})]})]})]})]}),(0,L.jsx)(`button`,{className:`shrink-0 px-3 flex items-center hover:bg-accent/50 transition-colors border-l border-border`,onClick:()=>o(e.id),title:n?`Collapse`:`Expand`,children:(0,L.jsx)(p_,{className:`size-4 text-muted-foreground transition-transform ${n?`rotate-90`:``}`})})]},e.id)})}),(0,L.jsx)(`div`,{ref:w,className:`h-1`}),u&&(0,L.jsx)(`div`,{className:`flex justify-center py-2`,children:(0,L.jsx)(sv,{className:`size-4 animate-spin text-muted-foreground`})})]})]})}var Q2=864e5,$2=`green`,e4=`yellow`,t4=`red`,n4=e=>Math.round(e*10)/10,r4=(e,t,n)=>Math.min(t,Math.max(e,n)),i4=(e,t)=>Math.max(0,(t.getTime()-e.getTime())/Q2),a4=e=>/^\w+(\([^)]+\))?:/.test(e)||/^[A-Z]+-\d+:/.test(e),o4=(e,t)=>{let n=i4(e.lastModifiedDate,t),r=i4(e.creationDate,t),i=e.commentCount??0,a=a4(e.title),o=!!e.description&&e.description.trim().length>0,s=-(n*1),c=-(r*.5),l=i*1,u=e.isApproved?2:0,d=e.isMergeable?0:-3,f=a?.5:0,p=o?.5:0;return CS({total:n4(r4(0,10,10+s+c+l+u+d+f+p)),breakdown:[{label:`Base`,value:10},{label:`Time decay`,value:n4(s)},{label:`Age`,value:n4(c)},{label:`Comments`,value:n4(l)},{label:`Approval`,value:u},{label:`Conflicts`,value:d},{label:`Scope`,value:f},{label:`Description`,value:p}],categories:[{label:`Activity`,description:`-1 per day since last update (${Math.round(n)}d ago)`,value:n4(s),...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:n4(c),...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:n4(l),...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:u,...e.isApproved?{status:`positive`,statusLabel:`APPROVED`}:{status:`neutral`,statusLabel:`PENDING`}},{label:`Mergeable`,description:e.isMergeable?`No merge conflicts`:`-3 penalty for merge conflicts`,value:d,...e.isMergeable?{status:`positive`,statusLabel:`CLEAN`}:{status:`negative`,statusLabel:`CONFLICT`}},{label:`Scope`,description:a?`+0.5 bonus — conventional commit or ticket prefix detected`:`No scope prefix found (e.g. feat(auth): or JIRA-123:)`,value:f,...a?{status:`positive`,statusLabel:`DETECTED`}:{status:`negative`,statusLabel:`MISSING`}},{label:`Description`,description:o?`+0.5 bonus — PR description provided`:`No PR description provided`,value:p,...o?{status:`positive`,statusLabel:`PROVIDED`}:{status:`negative`,statusLabel:`MISSING`}}]})},s4=e=>aH(e).pipe(oH(e=>e>=7,()=>$2),oH(e=>e>=4,()=>e4),sH(()=>t4)),c4={root:`rly_AgentContextButton-module__root`,mark:`rly_AgentContextButton-module__mark`,glyph:`rly_AgentContextButton-module__glyph`,copy:`rly_AgentContextButton-module__copy`,contextRow:`rly_AgentContextButton-module__contextRow`,action:`rly_AgentContextButton-module__action`,agent:`rly_AgentContextButton-module__agent`,contextLabel:`rly_AgentContextButton-module__contextLabel`,context:`rly_AgentContextButton-module__context`,job:`rly_AgentContextButton-module__job`,count:`rly_AgentContextButton-module__count`},l4=e=>i1(c4,e),u4=()=>(0,L.jsx)(`span`,{"aria-hidden":`true`,className:l4(`mark`),children:(0,L.jsx)(`svg`,{className:l4(`glyph`),focusable:`false`,viewBox:`0 0 24 24`,children:(0,L.jsx)(`path`,{d:`M12 3.5 14 10l6.5 2-6.5 2-2 6.5L10 14l-6.5-2 6.5-2Z`,fill:`currentColor`})})}),d4=({actionLabel:e=`Ask agent`,agentName:t,className:n,context:r,contextLabel:i=`Context`,job:a,type:o,...s})=>{let c=X(e,`AgentContextButton actionLabel`),l=X(t,`AgentContextButton agentName`),u=X(r,`AgentContextButton context`),d=X(i,`AgentContextButton contextLabel`),f=a===void 0?void 0:X(a.status,`AgentContextButton job status`);if(a?.count!==void 0&&(!Number.isInteger(a.count)||a.count<0))throw Error(`AgentContextButton job count must be a non-negative integer`);return(0,L.jsxs)(`button`,{...s,className:a1(l4(`root`),n),"data-rly-agent-context-button":``,type:o??`button`,children:[(0,L.jsx)(u4,{}),(0,L.jsxs)(`span`,{className:l4(`copy`),children:[(0,L.jsx)(`span`,{className:l4(`action`),children:c}),(0,L.jsx)(`span`,{className:l4(`agent`),children:l}),(0,L.jsxs)(`span`,{className:l4(`contextRow`),children:[(0,L.jsx)(`span`,{className:l4(`contextLabel`),children:d}),(0,L.jsx)(`span`,{className:l4(`context`),children:u})]})]}),f===void 0?null:(0,L.jsxs)(`span`,{className:l4(`job`),"data-rly-agent-job":``,children:[f,a?.count===void 0?null:(0,L.jsx)(`span`,{className:l4(`count`),children:a.count})]})]})},f4={drawer:`rly_AgentDrawer-module__drawer`,body:`rly_AgentDrawer-module__body`,slot:`rly_AgentDrawer-module__slot`,slotContent:`rly_AgentDrawer-module__slotContent`,identityCopy:`rly_AgentDrawer-module__identityCopy`,contextSlot:`rly_AgentDrawer-module__contextSlot`,identity:`rly_AgentDrawer-module__identity`,mark:`rly_AgentDrawer-module__mark`,glyph:`rly_AgentDrawer-module__glyph`,eyebrow:`rly_AgentDrawer-module__eyebrow`,slotTitle:`rly_AgentDrawer-module__slotTitle`,contextSummary:`rly_AgentDrawer-module__contextSummary`},p4=e=>i1(f4,e),m4=()=>(0,L.jsx)(`span`,{"aria-hidden":`true`,className:p4(`mark`),children:(0,L.jsx)(`svg`,{className:p4(`glyph`),focusable:`false`,viewBox:`0 0 24 24`,children:(0,L.jsx)(`path`,{d:`M12 3.5 14 10l6.5 2-6.5 2-2 6.5L10 14l-6.5-2 6.5-2Z`,fill:`currentColor`})})}),h4=({children:e,label:t,name:n})=>(0,L.jsxs)(`section`,{className:p4(`slot`),"data-rly-agent-drawer-slot":n,children:[(0,L.jsx)(`h2`,{className:p4(`slotTitle`),children:t}),(0,L.jsx)(`div`,{className:p4(`slotContent`),children:e})]}),g4=({agentName:e,capabilities:t,className:n,composer:r,context:i,contextSummary:a,evidence:o,onOpenChange:s,open:c,thread:l,title:u,...d})=>{let f=X(e,`AgentDrawer agentName`),p=X(a,`AgentDrawer contextSummary`),m=X(u,`AgentDrawer title`),h=(0,N.useRef)(null);return(0,L.jsx)(N1.Root,{onOpenChange:s,open:c,children:(0,L.jsx)(N1.Content,{className:a1(p4(`drawer`),n),description:`Context-aware session with ${f}`,initialFocusRef:h,title:m,children:(0,L.jsxs)(N1.Body,{...d,className:p4(`body`),children:[(0,L.jsxs)(`section`,{className:a1(p4(`slot`),p4(`contextSlot`)),"data-rly-agent-drawer-slot":`context`,ref:h,tabIndex:-1,children:[(0,L.jsxs)(`div`,{className:p4(`identity`),children:[(0,L.jsx)(m4,{}),(0,L.jsxs)(`div`,{className:p4(`identityCopy`),children:[(0,L.jsx)(`span`,{className:p4(`eyebrow`),children:f}),(0,L.jsx)(`h2`,{className:p4(`contextSummary`),children:p})]})]}),(0,L.jsx)(`div`,{className:p4(`slotContent`),children:i})]}),(0,L.jsx)(h4,{label:`Evidence`,name:`evidence`,children:o}),(0,L.jsx)(h4,{label:`Capabilities`,name:`capabilities`,children:t}),(0,L.jsxs)(`section`,{"aria-live":`polite`,"aria-relevant":`additions text`,className:p4(`slot`),"data-rly-agent-drawer-slot":`thread`,children:[(0,L.jsx)(`h2`,{className:p4(`slotTitle`),children:`Thread`}),(0,L.jsx)(`div`,{className:p4(`slotContent`),children:l})]}),(0,L.jsx)(h4,{label:`Message`,name:`composer`,children:r})]})})})},_4={root:`rly_AgentJob-module__root`,header:`rly_AgentJob-module__header`,agentGlyph:`rly_AgentJob-module__agentGlyph`,titleBlock:`rly_AgentJob-module__titleBlock`,eyebrow:`rly_AgentJob-module__eyebrow`,progressLabel:`rly_AgentJob-module__progressLabel`,metadata:`rly_AgentJob-module__metadata`,progressBlock:`rly_AgentJob-module__progressBlock`,slot:`rly_AgentJob-module__slot`,footer:`rly_AgentJob-module__footer`,outcome:`rly_AgentJob-module__outcome`},v4=e=>i1(_4,e),y4=(e,t)=>{if(e==null||Q$(e))throw Error(`${t} must contain renderable content`);n1(e)&&X(e,t)},b4={queued:{label:`Queued`,tone:`neutral`},running:{label:`Running`,tone:`progress`},"cancel-requested":{label:`Cancel requested`,tone:`caution`},succeeded:{label:`Succeeded`,tone:`positive`},failed:{label:`Failed`,tone:`critical`},cancelled:{label:`Cancelled`,tone:`neutral`}},x4=e=>{if(e!==void 0&&(!Number.isFinite(e)||e<0||e>100))throw Error(`AgentJob progress must be between 0 and 100`)},S4=({cancelLabel:e=`Request cancellation`,capability:t,className:n,context:r,evidence:i,heading:a,onCancel:o,outcome:s,progress:c,provider:l,revision:u,sandbox:d,state:f,...p})=>{let m=X(a,`AgentJob heading`),h=X(l,`AgentJob provider`),g=X(t,`AgentJob capability`),_=X(e,`AgentJob cancelLabel`);y4(r,`AgentJob context`),y4(i,`AgentJob evidence`),(f===`succeeded`||f===`failed`||f===`cancelled`)&&y4(s,`AgentJob terminal outcome`),d!==void 0&&X(d,`AgentJob sandbox`),u!==void 0&&X(u,`AgentJob revision`),x4(c);let v=b4[f],y=f===`queued`||f===`running`,b=`rly-agent-job-progress-${(0,N.useId)()}`;return(0,L.jsxs)(`article`,{...p,"aria-busy":f===`queued`||f===`running`||f===`cancel-requested`,className:a1(v4(`root`),n),"data-rly-agent-job-state":f,children:[(0,L.jsxs)(`header`,{className:v4(`header`),children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:v4(`agentGlyph`),children:`AI`}),(0,L.jsxs)(`span`,{className:v4(`titleBlock`),children:[(0,L.jsxs)(`span`,{className:v4(`eyebrow`),children:[h,` · `,g]}),(0,L.jsx)(`h2`,{children:m})]}),(0,L.jsx)(H1,{label:v.label,size:`compact`,tone:v.tone})]}),c===void 0?null:(0,L.jsxs)(`div`,{className:v4(`progressBlock`),children:[(0,L.jsxs)(`span`,{className:v4(`progressLabel`),id:b,children:[`Progress `,(0,L.jsxs)(`strong`,{children:[Math.round(c),`%`]})]}),(0,L.jsx)(`progress`,{"aria-labelledby":b,max:100,value:c})]}),(0,L.jsxs)(`dl`,{className:v4(`metadata`),children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Provider`}),(0,L.jsx)(`dd`,{children:h})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Capability`}),(0,L.jsx)(`dd`,{children:g})]}),d===void 0?null:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Sandbox`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(`code`,{children:d})})]}),u===void 0?null:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Revision`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(`code`,{children:u})})]})]}),(0,L.jsxs)(`section`,{className:v4(`slot`),"data-rly-agent-job-context":``,children:[(0,L.jsx)(`h3`,{children:`Exact context`}),r]}),(0,L.jsxs)(`section`,{className:v4(`slot`),"data-rly-agent-job-evidence":``,children:[(0,L.jsx)(`h3`,{children:`Evidence`}),i]}),s===void 0?null:(0,L.jsxs)(`section`,{className:a1(v4(`slot`),v4(`outcome`)),"data-rly-agent-job-outcome":f,children:[(0,L.jsx)(`h3`,{children:`Terminal outcome`}),s]}),y&&o!==void 0?(0,L.jsx)(`footer`,{className:v4(`footer`),children:(0,L.jsx)(L1,{onClick:o,size:`compact`,variant:`quiet`,children:_})}):null]})},C4={root:`rly_AgentProposal-module__root`,header:`rly_AgentProposal-module__header`,agentIdentity:`rly_AgentProposal-module__agentIdentity`,agentText:`rly_AgentProposal-module__agentText`,eyebrow:`rly_AgentProposal-module__eyebrow`,heading:`rly_AgentProposal-module__heading`,agentRole:`rly_AgentProposal-module__agentRole`,proposalReference:`rly_AgentProposal-module__proposalReference`,context:`rly_AgentProposal-module__context`,boundary:`rly_AgentProposal-module__boundary`,evidence:`rly_AgentProposal-module__evidence`,outcome:`rly_AgentProposal-module__outcome`,state:`rly_AgentProposal-module__state`,facts:`rly_AgentProposal-module__facts`},w4=e=>i1(C4,e),T4=e=>{X(e.id,`AgentProposal agent id`),X(e.name,`AgentProposal agent name`),X(e.role,`AgentProposal agent role`),X(e.avatarFallback,`AgentProposal agent avatarFallback`),e.avatarSrc!==void 0&&X(e.avatarSrc,`AgentProposal agent avatarSrc`)},E4=e=>{if(X(e.id,`AgentProposal id`),T4(e.agent),X(e.capability,`AgentProposal capability`),X(e.context,`AgentProposal context`),X(e.expectedRevision,`AgentProposal expectedRevision`),X(e.impact,`AgentProposal impact`),X(e.target,`AgentProposal target`),e.evidence.length===0)throw Error(`AgentProposal evidence must contain at least one reference`);let t=new Set;for(let n of e.evidence){let e=X(n.id,`AgentProposal evidence id`);if(t.has(e))throw Error(`AgentProposal evidence ids must be unique: ${e}`);t.add(e),X(n.label,`AgentProposal evidence label for ${e}`),X(n.reference,`AgentProposal evidence reference for ${e}`)}return e},D4=({className:e,outcome:t,proposal:n,state:r,...i})=>{let a=E4(n),o=`rly-agent-proposal-${(0,N.useId)()}`,s=`rly-agent-proposal-reference-${(0,N.useId)()}`;return(0,L.jsxs)(`section`,{...i,"aria-labelledby":`${o} ${s}`,className:a1(w4(`root`),e),"data-rly-agent-proposal-id":a.id,children:[(0,L.jsxs)(`header`,{className:w4(`header`),children:[(0,L.jsxs)(`div`,{className:w4(`agentIdentity`),children:[(0,L.jsx)(K1,{decorative:!0,fallback:a.agent.avatarFallback,form:`rounded-square`,...a.agent.avatarSrc===void 0?{}:{src:a.agent.avatarSrc}}),(0,L.jsxs)(`div`,{className:w4(`agentText`),children:[(0,L.jsx)(`p`,{className:w4(`eyebrow`),children:`Agent proposal`}),(0,L.jsx)(`h2`,{className:w4(`heading`),id:o,children:a.agent.name}),(0,L.jsx)(`p`,{className:w4(`agentRole`),children:a.agent.role}),(0,L.jsx)(`code`,{className:w4(`proposalReference`),id:s,children:a.id})]})]}),(0,L.jsx)(`div`,{className:w4(`state`),"data-rly-agent-proposal-slot":`state`,children:r})]}),(0,L.jsx)(`p`,{className:w4(`boundary`),children:`This is an agent proposal. It is not human authorization.`}),(0,L.jsxs)(`p`,{className:w4(`context`),children:[(0,L.jsx)(`span`,{children:`Context`}),a.context]}),(0,L.jsxs)(`dl`,{className:w4(`facts`),children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Capability`}),(0,L.jsx)(`dd`,{children:a.capability})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Target`}),(0,L.jsx)(`dd`,{children:a.target})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Expected revision`}),(0,L.jsx)(`dd`,{children:a.expectedRevision})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Impact`}),(0,L.jsx)(`dd`,{children:a.impact})]})]}),(0,L.jsxs)(`div`,{className:w4(`evidence`),"data-rly-agent-proposal-evidence":``,children:[(0,L.jsx)(`h3`,{children:`Evidence`}),(0,L.jsx)(`ul`,{children:a.evidence.map(e=>(0,L.jsxs)(`li`,{children:[(0,L.jsx)(`span`,{children:e.label}),(0,L.jsx)(`code`,{children:e.reference})]},e.id))})]}),(0,L.jsxs)(`div`,{className:w4(`outcome`),"data-rly-agent-proposal-slot":`outcome`,children:[(0,L.jsx)(`h3`,{children:`Outcome`}),t]})]})},O4={root:`rly_AgentThread-module__root`,header:`rly_AgentThread-module__header`,messageHead:`rly_AgentThread-module__messageHead`,actor:`rly_AgentThread-module__actor`,actions:`rly_AgentThread-module__actions`,agentGlyph:`rly_AgentThread-module__agentGlyph`,avatar:`rly_AgentThread-module__avatar`,context:`rly_AgentThread-module__context`,composer:`rly_AgentThread-module__composer`,conceptLabel:`rly_AgentThread-module__conceptLabel`,messages:`rly_AgentThread-module__messages`,message:`rly_AgentThread-module__message`,agent:`rly_AgentThread-module__agent`,human:`rly_AgentThread-module__human`,system:`rly_AgentThread-module__system`,actorText:`rly_AgentThread-module__actorText`,empty:`rly_AgentThread-module__empty`,content:`rly_AgentThread-module__content`,evidence:`rly_AgentThread-module__evidence`,visuallyHidden:`rly_AgentThread-module__visuallyHidden`},k4=e=>i1(O4,e),A4=(e,t)=>{if(e==null||Q$(e))throw Error(`${t} must contain renderable content`);n1(e)&&X(e,t)},j4=e=>{let t=e.trim().split(/\s+/u),n=Array.from(t[0]??``)[0]??``,r=Array.from(t[t.length-1]??``)[0]??``;return X(`${n}${t.length>1?r:``}`,`AgentThread actor fallback`)},M4=e=>{if(e.kind===`human`){X(e.person.id,`AgentThread human id`),X(e.person.name,`AgentThread human name`),X(e.person.role,`AgentThread human role`),e.person.avatarFallback!==void 0&&X(e.person.avatarFallback,`AgentThread human avatarFallback`),e.person.avatarSrc!==void 0&&X(e.person.avatarSrc,`AgentThread human avatarSrc`);return}X(e.id,`AgentThread ${e.kind} id`),X(e.name,`AgentThread ${e.kind} name`),e.kind===`agent`&&(X(e.role,`AgentThread agent role`),e.avatarFallback!==void 0&&X(e.avatarFallback,`AgentThread agent avatarFallback`))},N4=e=>{let t=e.kind===`human`?e.person.name:e.name,n=e.kind===`human`?e.person.role:e.kind===`agent`?e.role:`System event`,r=e.kind===`human`?e.person.avatarFallback??j4(t):e.kind===`agent`?e.avatarFallback??j4(t):`·`,i=e.kind===`human`?e.person.avatarSrc:void 0;return(0,L.jsxs)(`div`,{className:a1(k4(`actor`),k4(e.kind)),"data-rly-agent-thread-actor":e.kind,children:[(0,L.jsx)(K1,{className:k4(`avatar`),"data-rly-agent-thread-avatar-form":e.kind===`human`?`circle`:`rounded-square`,decorative:!0,fallback:r,form:e.kind===`human`?`circle`:`rounded-square`,size:`default`,...i===void 0?{}:{src:i}}),(0,L.jsxs)(`span`,{className:k4(`actorText`),children:[(0,L.jsx)(`strong`,{children:t}),(0,L.jsx)(`span`,{children:n})]})]})},P4=({announcement:e,className:t,composer:n,context:r,emptyLabel:i=`No messages yet.`,heading:a,messages:o,...s})=>{let c=X(a,`AgentThread heading`),l=X(i,`AgentThread emptyLabel`);A4(r,`AgentThread context`),A4(n,`AgentThread composer`),e!==void 0&&X(e,`AgentThread announcement`);let u=new Set;for(let e of o){let t=X(e.id,`AgentThread message id`);if(u.has(t))throw Error(`AgentThread message ids must be unique: ${t}`);u.add(t),M4(e.actor),A4(e.content,`AgentThread message content for ${t}`),X(e.dateTime,`AgentThread message dateTime for ${t}`),X(e.time,`AgentThread message time for ${t}`)}return(0,L.jsxs)(`section`,{...s,className:a1(k4(`root`),t),"data-rly-agent-thread":``,children:[(0,L.jsxs)(`header`,{className:k4(`header`),children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:k4(`agentGlyph`),children:`AI`}),(0,L.jsx)(`h2`,{children:c})]}),(0,L.jsxs)(`div`,{className:k4(`context`),"data-rly-agent-thread-context":``,children:[(0,L.jsx)(`span`,{className:k4(`conceptLabel`),children:`Exact context`}),r]}),o.length===0?(0,L.jsx)(`p`,{className:k4(`empty`),children:l}):(0,L.jsx)(`ol`,{"aria-label":`${c} messages`,className:k4(`messages`),children:o.map(e=>(0,L.jsxs)(`li`,{className:k4(`message`),"data-rly-agent-thread-message":e.id,children:[(0,L.jsxs)(`div`,{className:k4(`messageHead`),children:[N4(e.actor),(0,L.jsx)(`time`,{dateTime:e.dateTime,children:e.time})]}),(0,L.jsx)(`div`,{className:k4(`content`),children:e.content}),e.evidence===void 0?null:(0,L.jsx)(`div`,{className:k4(`evidence`),"data-rly-agent-thread-evidence":``,children:e.evidence}),e.actions===void 0?null:(0,L.jsx)(`div`,{className:k4(`actions`),"data-rly-agent-thread-actions":``,children:e.actions})]},e.id))}),(0,L.jsx)(`p`,{"aria-atomic":`true`,"aria-live":`polite`,className:k4(`visuallyHidden`),children:e}),(0,L.jsx)(`div`,{className:k4(`composer`),"data-rly-agent-thread-composer":``,children:n})]})},F4={root:`rly_Person-module__root`,compact:`rly_Person-module__compact`,defaultSize:`rly_Person-module__defaultSize`,identity:`rly_Person-module__identity`,name:`rly_Person-module__name`,role:`rly_Person-module__role`},I4=e=>i1(F4,e),L4=r1({size:{compact:{className:I4(`compact`),purpose:`Dense identity row with complete attribution`,tokens:[`space-24`,`type-meta`]},default:{className:I4(`defaultSize`),purpose:`Standard identity row with complete attribution`,tokens:[`space-32`,`type-label`,`type-meta`]}}}),R4=r1({size:`default`}),z4=e=>{let t=e.trim().split(/\s+/u),n=t[0]??``,r=t[t.length-1]??n,i=Array.from(n);return X(`${i[0]??``}${t.length>1?Array.from(r)[0]??``:i[1]??``}`,`Person avatar fallback`)},B4=e=>(X(e.id,`Person id`),X(e.name,`Person name`),X(e.role,`Person role`),e.avatarFallback!==void 0&&X(e.avatarFallback,`Person avatarFallback`),e.avatarSrc!==void 0&&X(e.avatarSrc,`Person avatarSrc`),e),V4=({className:e,person:t,size:n=`default`,...r})=>{let i=B4(t),a=i.avatarFallback??z4(i.name);return(0,L.jsxs)(`div`,{...r,className:a1(I4(`root`),L4.size[n].className,e),"data-rly-person-size":n,children:[(0,L.jsx)(K1,{decorative:!0,fallback:a,size:n===`compact`?`small`:`default`,...i.avatarSrc===void 0?{}:{src:i.avatarSrc}}),(0,L.jsxs)(`span`,{className:I4(`identity`),children:[(0,L.jsx)(`span`,{className:I4(`name`),children:i.name}),(0,L.jsx)(`span`,{className:I4(`role`),children:i.role})]})]})},H4={root:`rly_PeopleStrip-module__root`,compact:`rly_PeopleStrip-module__compact`,defaultSize:`rly_PeopleStrip-module__defaultSize`,personItem:`rly_PeopleStrip-module__personItem`,controlItem:`rly_PeopleStrip-module__controlItem`,overflow:`rly_PeopleStrip-module__overflow`},U4=e=>i1(H4,e),W4=r1({size:{compact:{className:U4(`compact`),purpose:`Dense attributed people list for narrow surfaces`,tokens:[`space-8`,`space-40`]},default:{className:U4(`defaultSize`),purpose:`Standard attributed people list`,tokens:[`space-12`,`space-40`]}}}),G4=r1({size:`default`}),K4=e=>{if(!Number.isInteger(e)||e<1)throw Error(`PeopleStrip limit must be a positive integer`);return e},q4=e=>{let t=new Set;for(let n of e){let e=X(n.id,`PeopleStrip person id`);if(X(n.name,`PeopleStrip name for ${e}`),X(n.role,`PeopleStrip role for ${e}`),t.has(e))throw Error(`PeopleStrip person ids must be unique: ${e}`);t.add(e)}},J4=({"aria-label":e,className:t,expanded:n,limit:r=3,onExpandedChange:i,people:a,size:o=`default`,...s})=>{let c=X(e,`PeopleStrip aria-label`),l=K4(r);q4(a);let u=Math.max(a.length-l,0),d=n?a:a.slice(0,l);return(0,L.jsxs)(`ul`,{...s,"aria-label":c,className:a1(U4(`root`),W4.size[o].className,t),"data-rly-people-strip-size":o,children:[d.map(e=>(0,L.jsx)(`li`,{className:U4(`personItem`),children:(0,L.jsx)(V4,{person:e,size:o})},e.id)),u===0?null:(0,L.jsx)(`li`,{className:U4(`controlItem`),children:(0,L.jsx)(`button`,{"aria-expanded":n,"aria-label":n?`Show fewer people`:`Show ${u} more people`,className:U4(`overflow`),onClick:()=>i(!n),type:`button`,children:n?`Show fewer`:`+${u} people`})})]})},Y4={root:`rly_CollaboratorGroup-module__root`,compact:`rly_CollaboratorGroup-module__compact`,defaultSize:`rly_CollaboratorGroup-module__defaultSize`,heading:`rly_CollaboratorGroup-module__heading`,lanes:`rly_CollaboratorGroup-module__lanes`,lane:`rly_CollaboratorGroup-module__lane`,laneHeading:`rly_CollaboratorGroup-module__laneHeading`,empty:`rly_CollaboratorGroup-module__empty`},X4=e=>i1(Y4,e),Z4=r1({size:{compact:{className:X4(`compact`),purpose:`Narrow entity attribution with explicit role lanes`,tokens:[`space-12`,`type-label`]},default:{className:X4(`defaultSize`),purpose:`Standard entity attribution with explicit role lanes`,tokens:[`space-20`,`type-card-title`]}}}),Q4=r1({size:`default`}),$4=({approvers:e=[],authors:t=[],className:n,emptyLabel:r=`No collaborators assigned.`,expandedCategories:i,heading:a,limit:o=3,onCategoryExpandedChange:s,operators:c=[],owners:l=[],reviewers:u=[],size:d=`default`,...f})=>{let p=X(a,`CollaboratorGroup heading`),m=X(r,`CollaboratorGroup emptyLabel`),h=`rly-collaborators-${(0,N.useId)()}`,g=new Set(i),_=[{category:`authors`,label:`Authors`,people:t},{category:`owners`,label:`Owners`,people:l},{category:`reviewers`,label:`Reviewers`,people:u},{category:`operators`,label:`Operators`,people:c},{category:`approvers`,label:`Approvers`,people:e}].filter(e=>e.people.length>0);return(0,L.jsxs)(`section`,{...f,"aria-labelledby":h,className:a1(X4(`root`),Z4.size[d].className,n),"data-rly-collaborator-group-size":d,children:[(0,L.jsx)(`h2`,{className:X4(`heading`),id:h,children:p}),_.length===0?(0,L.jsx)(`p`,{className:X4(`empty`),children:m}):(0,L.jsx)(`div`,{className:X4(`lanes`),children:_.map(e=>(0,L.jsxs)(`section`,{className:X4(`lane`),children:[(0,L.jsx)(`h3`,{className:X4(`laneHeading`),children:e.label}),(0,L.jsx)(J4,{"aria-label":`${p}: ${e.label}`,expanded:g.has(e.category),limit:o,onExpandedChange:t=>s(e.category,t),people:e.people,size:d})]},e.category))})]})},e3={root:`rly_FreshnessStamp-module__root`,stateWord:`rly_FreshnessStamp-module__stateWord`,separator:`rly_FreshnessStamp-module__separator`,time:`rly_FreshnessStamp-module__time`,compact:`rly_FreshnessStamp-module__compact`,defaultSize:`rly_FreshnessStamp-module__defaultSize`,current:`rly_FreshnessStamp-module__current`,cached:`rly_FreshnessStamp-module__cached`,missing:`rly_FreshnessStamp-module__missing`,stale:`rly_FreshnessStamp-module__stale`,unavailable:`rly_FreshnessStamp-module__unavailable`},t3=e=>i1(e3,e),n3=r1({state:{current:{className:t3(`current`),purpose:`Current source observation`,tokens:[`color-success-ink`,`color-success-tint`]},cached:{className:t3(`cached`),purpose:`Valid cached source observation`,tokens:[`color-text-2`,`color-surface-2`]},stale:{className:t3(`stale`),purpose:`Source observation beyond its supplied freshness threshold`,tokens:[`color-held-ink`,`color-held-tint`]},missing:{className:t3(`missing`),purpose:`Provider authoritatively reported no object`,tokens:[`color-text-2`,`color-surface-2`]},unavailable:{className:t3(`unavailable`),purpose:`No valid source observation is available`,tokens:[`color-blocked-ink`,`color-blocked-tint`]}},size:{compact:{className:t3(`compact`),purpose:`Dense freshness metadata`,tokens:[`type-meta`]},default:{className:t3(`defaultSize`),purpose:`Standard freshness metadata`,tokens:[`type-label`,`type-meta`]}}}),r3=r1({size:`default`}),i3={current:`Current`,cached:`Cached`,stale:`Stale`,missing:`Missing`,unavailable:`Unavailable`},a3={current:`check`,cached:`clock`,stale:`clock`,missing:`minus`,unavailable:`alert`},o3=({className:e,dateTime:t,size:n=`default`,state:r,time:i,...a})=>{let o=i===void 0?void 0:X(i,`FreshnessStamp time`),s=t===void 0?void 0:X(t,`FreshnessStamp dateTime`);return(0,L.jsxs)(`span`,{...a,className:a1(t3(`root`),n3.state[r].className,n3.size[n].className,e),"data-rly-freshness-state":r,children:[(0,L.jsxs)(`span`,{className:t3(`stateWord`),children:[(0,L.jsx)($v,{decorative:!0,name:a3[r],size:`small`}),(0,L.jsx)(`span`,{children:i3[r]})]}),o===void 0||s===void 0?null:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:t3(`separator`),children:`·`}),(0,L.jsx)(`time`,{className:t3(`time`),dateTime:s,children:o})]})]})},s3={root:`rly_ServiceMark-module__root`,rail:`rly_ServiceMark-module__rail`,glyph:`rly_ServiceMark-module__glyph`,name:`rly_ServiceMark-module__name`,compact:`rly_ServiceMark-module__compact`,defaultSize:`rly_ServiceMark-module__defaultSize`,codecommit:`rly_ServiceMark-module__codecommit`,codepipeline:`rly_ServiceMark-module__codepipeline`,jira:`rly_ServiceMark-module__jira`,confluence:`rly_ServiceMark-module__confluence`,clockify:`rly_ServiceMark-module__clockify`},c3=e=>i1(s3,e),l3=r1({service:{codecommit:{className:c3(`codecommit`),purpose:`CodeCommit provenance`,tokens:[`color-service-codecommit`]},codepipeline:{className:c3(`codepipeline`),purpose:`CodePipeline provenance`,tokens:[`color-service-codepipeline`]},jira:{className:c3(`jira`),purpose:`Jira provenance`,tokens:[`color-service-jira`]},confluence:{className:c3(`confluence`),purpose:`Confluence provenance`,tokens:[`color-service-confluence`]},clockify:{className:c3(`clockify`),purpose:`Clockify provenance`,tokens:[`color-service-clockify`]}},size:{compact:{className:c3(`compact`),purpose:`Dense provenance metadata`,tokens:[`space-24`,`type-meta`]},default:{className:c3(`defaultSize`),purpose:`Standard provenance identity`,tokens:[`space-32`,`type-label`]}}}),u3=r1({size:`default`}),d3={codecommit:`CodeCommit`,codepipeline:`CodePipeline`,jira:`Jira`,confluence:`Confluence`,clockify:`Clockify`},f3={codecommit:()=>(0,L.jsxs)(`svg`,{"aria-hidden":`true`,className:c3(`glyph`),focusable:`false`,viewBox:`0 0 24 24`,children:[(0,L.jsx)(`path`,{d:`M6 5.5h7.5a3 3 0 0 1 3 3v7`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.8`}),(0,L.jsx)(`circle`,{cx:`6`,cy:`5.5`,fill:`currentColor`,r:`2`}),(0,L.jsx)(`circle`,{cx:`16.5`,cy:`17.5`,fill:`currentColor`,r:`2`}),(0,L.jsx)(`path`,{d:`m10 12 2-2 2 2-2 2Z`,fill:`none`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.6`})]}),codepipeline:()=>(0,L.jsxs)(`svg`,{"aria-hidden":`true`,className:c3(`glyph`),focusable:`false`,viewBox:`0 0 24 24`,children:[(0,L.jsx)(`rect`,{fill:`none`,height:`5`,rx:`1`,stroke:`currentColor`,strokeWidth:`1.7`,width:`5`,x:`2.5`,y:`9.5`}),(0,L.jsx)(`rect`,{fill:`none`,height:`5`,rx:`1`,stroke:`currentColor`,strokeWidth:`1.7`,width:`5`,x:`16.5`,y:`9.5`}),(0,L.jsx)(`path`,{d:`M8 12h7m-2.5-2.5L15 12l-2.5 2.5`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.8`})]}),jira:()=>(0,L.jsxs)(`svg`,{"aria-hidden":`true`,className:c3(`glyph`),focusable:`false`,viewBox:`0 0 24 24`,children:[(0,L.jsx)(`path`,{d:`m12 2.8 8.8 8.8a.6.6 0 0 1 0 .8L12 21.2l-8.8-8.8a.6.6 0 0 1 0-.8Z`,fill:`currentColor`}),(0,L.jsx)(`path`,{d:`m12 7.2 4.8 4.8-4.8 4.8L7.2 12Z`,fill:`var(--rly-color-surface-1)`}),(0,L.jsx)(`path`,{d:`m12 9.8 2.2 2.2-2.2 2.2L9.8 12Z`,fill:`currentColor`})]}),confluence:()=>(0,L.jsxs)(`svg`,{"aria-hidden":`true`,className:c3(`glyph`),focusable:`false`,viewBox:`0 0 24 24`,children:[(0,L.jsx)(`path`,{d:`M4 7.2c3.6 2.1 6.8 2.4 9.6.9L17 6.3l2.7 4.3-3.4 1.8c-4.6 2.4-9.5 1.8-14-1.5Z`,fill:`currentColor`}),(0,L.jsx)(`path`,{d:`M20 16.8c-3.6-2.1-6.8-2.4-9.6-.9L7 17.7l-2.7-4.3 3.4-1.8c4.6-2.4 9.5-1.8 14 1.5Z`,fill:`currentColor`})]}),clockify:()=>(0,L.jsxs)(`svg`,{"aria-hidden":`true`,className:c3(`glyph`),focusable:`false`,viewBox:`0 0 24 24`,children:[(0,L.jsx)(`circle`,{cx:`11`,cy:`13`,fill:`none`,r:`7`,stroke:`currentColor`,strokeWidth:`1.8`}),(0,L.jsx)(`path`,{d:`M11 9v4l3 2m1.5-10.7 1.8-1.8M18 7l2-2`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.8`})]})},p3=({className:e,service:t,size:n=`default`,...r})=>{let i=f3[t],a=d3[t];return(0,L.jsxs)(`span`,{...r,"aria-label":a,className:a1(c3(`root`),l3.service[t].className,l3.size[n].className,e),"data-rly-service":t,role:`img`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:c3(`rail`)}),(0,L.jsx)(i,{}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:c3(`name`),children:a})]})},m3={root:`rly_Verdict-module__root`,verdict:`rly_Verdict-module__verdict`,caution:`rly_Verdict-module__caution`,critical:`rly_Verdict-module__critical`,neutral:`rly_Verdict-module__neutral`,positive:`rly_Verdict-module__positive`,progress:`rly_Verdict-module__progress`,reasonPanel:`rly_Verdict-module__reasonPanel`,icon:`rly_Verdict-module__icon`,reason:`rly_Verdict-module__reason`},h3=e=>i1(m3,e),g3=r1({tone:{caution:{className:h3(`caution`),purpose:`Intentional hold or caution requiring attention`,tokens:[`color-held-ink`,`color-held-tint`]},critical:{className:h3(`critical`),purpose:`Explicit blocker or failed prerequisite`,tokens:[`color-blocked-ink`,`color-blocked-tint`]},neutral:{className:h3(`neutral`),purpose:`Neutral, missing, or unavailable outcome`,tokens:[`color-text-2`,`color-surface-2`]},positive:{className:h3(`positive`),purpose:`Satisfied readiness or successful outcome`,tokens:[`color-success-ink`,`color-success-tint`]},progress:{className:h3(`progress`),purpose:`Active work or delivery progress`,tokens:[`color-deploying-ink`,`color-deploying-tint`]}}}),_3={caution:`clock`,critical:`alert`,neutral:`minus`,positive:`check`,progress:`loader`},v3=({className:e,reason:t,tone:n,verdict:r,...i})=>{let a=X(t,`Verdict reason`),o=X(r,`Verdict verdict`);return(0,L.jsxs)(`section`,{...i,className:a1(h3(`root`),g3.tone[n].className,e),"data-rly-verdict-tone":n,children:[(0,L.jsx)(`h2`,{className:h3(`verdict`),children:o}),(0,L.jsxs)(`div`,{className:h3(`reasonPanel`),children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:h3(`icon`),children:(0,L.jsx)($v,{decorative:!0,name:_3[n],size:`large`})}),(0,L.jsx)(`p`,{className:h3(`reason`),children:a})]})]})},y3={root:`rly_EntityShell-module__root`,navigation:`rly_EntityShell-module__navigation`,header:`rly_EntityShell-module__header`,identity:`rly_EntityShell-module__identity`,title:`rly_EntityShell-module__title`,hero:`rly_EntityShell-module__hero`,body:`rly_EntityShell-module__body`,headerAside:`rly_EntityShell-module__headerAside`,freshness:`rly_EntityShell-module__freshness`,headerSlot:`rly_EntityShell-module__headerSlot`,slotLabel:`rly_EntityShell-module__slotLabel`,content:`rly_EntityShell-module__content`,relationships:`rly_EntityShell-module__relationships`,activity:`rly_EntityShell-module__activity`,asideSlot:`rly_EntityShell-module__asideSlot`,aside:`rly_EntityShell-module__aside`},b3=e=>i1(y3,e),x3=({actions:e,activity:t,agentEntry:n,className:r,collaborators:i,content:a,evidence:o,facts:s,freshness:c,freshnessDateTime:l,freshnessTime:u,navigation:d,reason:f,relationships:p,service:m,title:h,tone:g,verdict:_,...v})=>{let y=X(h,`EntityShell title`);if(l===void 0!=(u===void 0))throw Error(`EntityShell freshnessDateTime and freshnessTime must be supplied together`);let b=`rly-entity-shell-${(0,N.useId)()}`;return(0,L.jsxs)(`article`,{...v,"aria-labelledby":b,className:a1(b3(`root`),r),"data-rly-entity-shell":``,children:[d===void 0?null:(0,L.jsx)(`nav`,{"aria-label":`${y} navigation`,className:b3(`navigation`),"data-rly-entity-shell-slot":`navigation`,children:d}),(0,L.jsxs)(`header`,{className:b3(`header`),children:[(0,L.jsxs)(`div`,{className:b3(`identity`),children:[(0,L.jsx)(p3,{service:m}),(0,L.jsx)(`h1`,{className:b3(`title`),id:b,children:y})]}),(0,L.jsxs)(`div`,{className:b3(`hero`),children:[(0,L.jsx)(v3,{reason:f,tone:g,verdict:_}),(0,L.jsxs)(`div`,{className:b3(`headerAside`),children:[(0,L.jsxs)(`div`,{className:b3(`freshness`),"data-rly-entity-shell-slot":`freshness`,children:[(0,L.jsx)(`span`,{className:b3(`slotLabel`),children:`Freshness`}),l===void 0||u===void 0?(0,L.jsx)(o3,{state:c}):(0,L.jsx)(o3,{dateTime:l,state:c,time:u})]}),(0,L.jsx)(`div`,{className:b3(`headerSlot`),"data-rly-entity-shell-slot":`actions`,children:e}),(0,L.jsx)(`div`,{className:b3(`headerSlot`),"data-rly-entity-shell-slot":`agent-entry`,children:n})]})]})]}),(0,L.jsxs)(`div`,{className:b3(`body`),children:[(0,L.jsx)(`section`,{className:b3(`content`),"data-rly-entity-shell-slot":`content`,children:a}),(0,L.jsxs)(`aside`,{className:b3(`aside`),children:[s===void 0?null:(0,L.jsx)(`section`,{className:b3(`asideSlot`),"data-rly-entity-shell-slot":`facts`,children:s}),o===void 0?null:(0,L.jsx)(`section`,{className:b3(`asideSlot`),"data-rly-entity-shell-slot":`evidence`,children:o}),(0,L.jsx)(`section`,{className:b3(`asideSlot`),"data-rly-entity-shell-slot":`collaborators`,children:i})]})]}),(0,L.jsx)(`section`,{className:b3(`relationships`),"data-rly-entity-shell-slot":`relationships`,children:p}),t===void 0?null:(0,L.jsx)(`section`,{className:b3(`activity`),"data-rly-entity-shell-slot":`activity`,children:t})]})},S3={root:`rly_EntityTable-module__root`,defaultDensity:`rly_EntityTable-module__defaultDensity`,compact:`rly_EntityTable-module__compact`,heading:`rly_EntityTable-module__heading`,sectionHeading:`rly_EntityTable-module__sectionHeading`,cardHeading:`rly_EntityTable-module__cardHeading`,headerLabel:`rly_EntityTable-module__headerLabel`,headerSort:`rly_EntityTable-module__headerSort`,sortSelect:`rly_EntityTable-module__sortSelect`,loading:`rly_EntityTable-module__loading`,stateLabel:`rly_EntityTable-module__stateLabel`,table:`rly_EntityTable-module__table`,head:`rly_EntityTable-module__head`,sortControls:`rly_EntityTable-module__sortControls`,sortLabel:`rly_EntityTable-module__sortLabel`,sortButton:`rly_EntityTable-module__sortButton`,cell:`rly_EntityTable-module__cell`,row:`rly_EntityTable-module__row`,body:`rly_EntityTable-module__body`},C3=e=>i1(S3,e),w3=r1({density:{default:{className:C3(`defaultDensity`),purpose:`One labelled line per field when the table narrows to cards`,tokens:[`space-12`]},compact:{className:C3(`compact`),purpose:`Narrow cards led by the first column, the rest as a two-column label and value grid`,tokens:[`space-8`,`space-2`]}},headingSize:{section:{className:C3(`sectionHeading`),purpose:`The table is a page section of its own`,tokens:[`type-section-title`]},card:{className:C3(`cardHeading`),purpose:`The table sits in a panel beside other card-titled panels`,tokens:[`type-card-title`]}}}),T3=r1({density:`default`,headingSize:`section`}),E3=e=>{let t=new Set;for(let n of e){let e=X(n.id,`EntityTable column id`);if(t.has(e))throw Error(`EntityTable column ids must be unique: ${e}`);t.add(e),X(n.label,`EntityTable column label for ${e}`)}return t},D3=(e,t)=>{let n=new Set;for(let r of e){let e=X(r.id,`EntityTable row id`);if(n.has(e))throw Error(`EntityTable row ids must be unique: ${e}`);n.add(e);let i=new Set;for(let n of r.cells){let r=X(n.columnId,`EntityTable cell column id for ${e}`);if(!t.has(r))throw Error(`EntityTable row ${e} has an unknown column: ${r}`);if(i.has(r))throw Error(`EntityTable row ${e} repeats column: ${r}`);i.add(r)}for(let n of t)if(!i.has(n))throw Error(`EntityTable row ${e} is missing column: ${n}`)}},O3=e=>e.state===`ready`||e.state===`stale`||e.state===`partial`||e.state===`error`||e.state===`unavailable`?e.rows:[],k3=({direction:e})=>e===`none`?null:(0,L.jsx)($v,{decorative:!0,name:e===`ascending`?`arrow-up`:`arrow-down`,size:`small`}),A3=({className:e,columns:t,data:n,density:r=`default`,heading:i,headingSize:a=`section`,onSortChange:o,...s})=>{let c=X(i,`EntityTable heading`),l=E3(t),u=O3(n);if(D3(u,l),n.state===`ready`&&u.length===0)throw Error(`EntityTable ready state must contain at least one row; use the empty state instead`);if(n.state===`loading`){X(n.label,`EntityTable loading label`);let e=n.skeletonRows??3;if(!Number.isInteger(e)||e<1||e>20)throw Error(`EntityTable skeletonRows must be an integer from 1 to 20`)}if((n.state===`empty`||n.state===`not-found`)&&(X(n.title,`EntityTable state title`),n.description!==void 0&&X(n.description,`EntityTable state description`)),(n.state===`stale`||n.state===`partial`||n.state===`error`||n.state===`unavailable`)&&(X(n.title,`EntityTable cached state title`),X(n.description,`EntityTable cached state description`),u.length===0))throw Error(`EntityTable ${n.state} state must retain at least one cached row`);let d=`rly-entity-table-${(0,N.useId)()}`,f=t.filter(e=>e.sortable===!0),p=f.find(e=>e.sortDirection!==`none`),m=new Map(t.map(e=>[e.id,e])),h=n.state===`stale`||n.state===`partial`||n.state===`error`||n.state===`unavailable`?(0,L.jsx)(m0,{description:n.description,title:n.title,tone:n.tone}):null;return(0,L.jsxs)(`section`,{...s,"aria-busy":n.state===`loading`?`true`:void 0,"aria-labelledby":d,className:a1(C3(`root`),w3.density[r].className,w3.headingSize[a].className,e),"data-rly-entity-table-density":r,"data-rly-entity-table-state":n.state,children:[(0,L.jsx)(`h2`,{className:C3(`heading`),id:d,children:c}),n.state===`loading`?(0,L.jsxs)(`div`,{"aria-label":n.label,className:C3(`loading`),role:`status`,children:[(0,L.jsx)(`span`,{className:C3(`stateLabel`),children:n.label}),Array.from({length:n.skeletonRows??3},(e,t)=>(0,L.jsx)(l0,{height:`48px`,variant:`block`},t))]}):n.state===`empty`||n.state===`not-found`?(0,L.jsx)(m0,{description:n.description,title:n.title}):(0,L.jsxs)(L.Fragment,{children:[h,r===`compact`?f.length===0?null:(0,L.jsxs)(`div`,{className:C3(`sortSelect`),children:[(0,L.jsx)(a0,{"aria-label":`Sort by`,onValueChange:e=>{e!==p?.id&&o(e)},options:f.map(e=>({label:e.sortDirection===`ascending`?`${e.label} ↑`:e.sortDirection===`descending`?`${e.label} ↓`:e.label,value:e.id})),placeholder:`Sort by`,value:p?.id}),p===void 0?null:(0,L.jsx)(X1,{icon:p.sortDirection===`ascending`?`arrow-up`:`arrow-down`,label:`Reverse order, currently ${p.sortDirection}`,onClick:()=>o(p.id),variant:`secondary`})]}):(0,L.jsxs)(`div`,{"aria-label":`${c} sorting`,className:C3(`sortControls`),role:`group`,children:[(0,L.jsx)(`span`,{className:C3(`sortLabel`),children:`Sort`}),f.map(e=>(0,L.jsxs)(`button`,{"aria-label":`Sort by ${e.label}, currently ${e.sortDirection}`,className:C3(`sortButton`),onClick:()=>o(e.id),type:`button`,children:[(0,L.jsx)(`span`,{children:e.label}),(0,L.jsx)(k3,{direction:e.sortDirection})]},e.id))]}),(0,L.jsxs)(`table`,{"aria-labelledby":d,className:C3(`table`),children:[(0,L.jsx)(`thead`,{className:C3(`head`),children:(0,L.jsx)(`tr`,{children:t.map(e=>(0,L.jsx)(`th`,{"aria-label":e.label,"aria-sort":e.sortable===!0?e.sortDirection:void 0,scope:`col`,children:e.sortable===!0?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:C3(`headerLabel`),children:e.label}),(0,L.jsxs)(`button`,{"aria-label":`Sort by ${e.label}, currently ${e.sortDirection}`,className:C3(`headerSort`),onClick:()=>o(e.id),type:`button`,children:[(0,L.jsx)(`span`,{children:e.label}),(0,L.jsx)(k3,{direction:e.sortDirection})]})]}):e.label},e.id))})}),(0,L.jsx)(`tbody`,{className:C3(`body`),children:u.map(e=>{let n=new Map(e.cells.map(e=>[e.columnId,e.content]));return(0,L.jsx)(`tr`,{className:C3(`row`),"data-rly-entity-row-id":e.id,children:t.map(e=>(0,L.jsx)(`td`,{className:C3(`cell`),"data-label":m.get(e.id)?.label,children:n.get(e.id)},e.id))},e.id)})})]})]})]})},j3={root:`rly_EvidenceStamp-module__root`,source:`rly_EvidenceStamp-module__source`,freshness:`rly_EvidenceStamp-module__freshness`,conceptLabel:`rly_EvidenceStamp-module__conceptLabel`,sourceDetail:`rly_EvidenceStamp-module__sourceDetail`,reference:`rly_EvidenceStamp-module__reference`},M3=e=>i1(j3,e),N3=({className:e,freshness:t,freshnessDateTime:n,freshnessTime:r,reference:i,service:a,...o})=>{let s=X(i,`EvidenceStamp reference`),c=n===void 0||r===void 0?(0,L.jsx)(o3,{size:`compact`,state:t}):(0,L.jsx)(o3,{dateTime:n,size:`compact`,state:t,time:r});return(0,L.jsxs)(`div`,{...o,className:a1(M3(`root`),e),"data-rly-evidence-stamp":``,children:[(0,L.jsxs)(`div`,{className:M3(`source`),"data-rly-evidence-source":a,children:[(0,L.jsx)(`span`,{className:M3(`conceptLabel`),children:`Evidence source`}),(0,L.jsxs)(`div`,{className:M3(`sourceDetail`),children:[(0,L.jsx)(p3,{service:a,size:`compact`}),(0,L.jsx)(`code`,{className:M3(`reference`),children:s})]})]}),(0,L.jsxs)(`div`,{className:M3(`freshness`),"data-rly-evidence-freshness":t,children:[(0,L.jsx)(`span`,{className:M3(`conceptLabel`),children:`Freshness`}),c]})]})},P3={root:`rly_GovernedActionReview-module__root`,header:`rly_GovernedActionReview-module__header`,eyebrow:`rly_GovernedActionReview-module__eyebrow`,heading:`rly_GovernedActionReview-module__heading`,boundary:`rly_GovernedActionReview-module__boundary`,confirmationHelp:`rly_GovernedActionReview-module__confirmationHelp`,reviewer:`rly_GovernedActionReview-module__reviewer`,facts:`rly_GovernedActionReview-module__facts`,evidence:`rly_GovernedActionReview-module__evidence`,outcome:`rly_GovernedActionReview-module__outcome`,proposalReference:`rly_GovernedActionReview-module__proposalReference`,decision:`rly_GovernedActionReview-module__decision`,confirmation:`rly_GovernedActionReview-module__confirmation`,actions:`rly_GovernedActionReview-module__actions`},F3=e=>i1(P3,e),I3={pending:{label:`Awaiting human decision`,tone:`caution`},rejected:{label:`Rejected by human reviewer`,tone:`critical`},authorized:{label:`Authorized by human reviewer`,tone:`positive`},executing:{label:`Authorized action executing`,tone:`progress`},succeeded:{label:`Authorized action succeeded`,tone:`positive`},failed:{label:`Authorized action failed`,tone:`critical`},cancelled:{label:`Authorized action cancelled`,tone:`neutral`}},L3=({authorizeLabel:e=`Authorize exact action`,className:t,confirmationLabel:n,isConfirmed:r,onAuthorize:i,onConfirmationChange:a,onReject:o,outcome:s,proposal:c,rejectLabel:l=`Reject proposal`,reviewer:u,state:d,...f})=>{let p=E4(c),m=X(e,`GovernedActionReview authorizeLabel`),h=X(n,`GovernedActionReview confirmationLabel`),g=X(l,`GovernedActionReview rejectLabel`);X(u.id,`GovernedActionReview reviewer id`),X(u.name,`GovernedActionReview reviewer name`),X(u.role,`GovernedActionReview reviewer role`);let _=`rly-governed-action-${(0,N.useId)()}`,v=`rly-governed-action-reference-${(0,N.useId)()}`,y=`rly-governed-confirmation-${(0,N.useId)()}`,b=I3[d],x=()=>{d===`pending`&&r&&i()};return(0,L.jsxs)(`section`,{...f,"aria-labelledby":`${_} ${v}`,className:a1(F3(`root`),t),"data-rly-governed-action-state":d,children:[(0,L.jsxs)(`header`,{className:F3(`header`),children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:F3(`eyebrow`),children:`Human authorization`}),(0,L.jsx)(`h2`,{className:F3(`heading`),id:_,children:`Review exact proposed action`}),(0,L.jsx)(`code`,{className:F3(`proposalReference`),id:v,children:p.id})]}),(0,L.jsx)(H1,{label:b.label,tone:b.tone})]}),(0,L.jsx)(`p`,{className:F3(`boundary`),children:`The agent proposed this action. Only the named human reviewer can authorize it.`}),(0,L.jsxs)(`div`,{className:F3(`reviewer`),children:[(0,L.jsx)(`span`,{children:`Human reviewer`}),(0,L.jsx)(V4,{person:u})]}),(0,L.jsxs)(`dl`,{className:F3(`facts`),children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Proposal`}),(0,L.jsx)(`dd`,{children:p.capability})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Target`}),(0,L.jsx)(`dd`,{children:p.target})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Expected revision`}),(0,L.jsx)(`dd`,{children:p.expectedRevision})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Impact`}),(0,L.jsx)(`dd`,{children:p.impact})]})]}),(0,L.jsxs)(`div`,{className:F3(`evidence`),"data-rly-governed-action-evidence":``,children:[(0,L.jsx)(`h3`,{children:`Evidence reviewed before decision`}),(0,L.jsx)(`ul`,{children:p.evidence.map(e=>(0,L.jsxs)(`li`,{children:[(0,L.jsx)(`span`,{children:e.label}),(0,L.jsx)(`code`,{children:e.reference})]},e.id))})]}),d===`pending`?(0,L.jsxs)(`form`,{className:F3(`decision`),onSubmit:e=>e.preventDefault(),children:[(0,L.jsxs)(`label`,{className:F3(`confirmation`),htmlFor:y,children:[(0,L.jsx)(`input`,{checked:r,id:y,onChange:e=>a(e.currentTarget.checked),type:`checkbox`}),(0,L.jsx)(`span`,{children:h})]}),(0,L.jsx)(`p`,{className:F3(`confirmationHelp`),children:`Confirm the exact proposal, target, revision, impact, and evidence above.`}),(0,L.jsxs)(`div`,{className:F3(`actions`),children:[(0,L.jsx)(L1,{onClick:o,variant:`secondary`,children:g}),(0,L.jsx)(L1,{disabled:!r,onClick:x,variant:`primary`,children:m})]})]}):null,(0,L.jsxs)(`div`,{className:F3(`outcome`),"data-rly-governed-action-outcome":``,children:[(0,L.jsx)(`h3`,{children:`Recorded outcome`}),s]})]})},R3={missing:{icon:`alert`,label:`Missing`},inferred:{icon:`search`,label:`Inferred`},proposed:{icon:`plus`,label:`Proposed`},verified:{icon:`check`,label:`Verified`},governed:{icon:`link`,label:`Governed`},rejected:{icon:`close`,label:`Rejected`},superseded:{icon:`arrow-right`,label:`Superseded`}},z3={forward:{arrow:`→`,label:`Forward`},reverse:{arrow:`←`,label:`Reverse`},bidirectional:{arrow:`↔`,label:`Bidirectional`}},B3=(e,t)=>{X(e.id,`${t} person id`),X(e.name,`${t} person name`),X(e.role,`${t} person role`),e.avatarFallback!==void 0&&X(e.avatarFallback,`${t} person avatarFallback`),e.avatarSrc!==void 0&&X(e.avatarSrc,`${t} person avatarSrc`)},V3=(e,t)=>{if(!Object.hasOwn(l3.service,e))throw Error(`${t} service must be a supported rly service`)},H3=(e,t)=>{if(e.state===`present`){X(e.id,`${t} id`),X(e.title,`${t} title`),X(e.reference,`${t} reference`),V3(e.service,t),e.href!==void 0&&X(e.href,`${t} href`),e.person!==void 0&&B3(e.person,t);return}if(e.state===`missing`){X(e.label,`${t} missing label`),X(e.reason,`${t} missing reason`),e.service!==void 0&&V3(e.service,t);return}throw Error(`${t} state must be present or missing`)},U3=e=>{let t=new Set;for(let n of e){let e=X(n.id,`Relationship id`);if(t.has(e))throw Error(`Relationship ids must be unique: ${e}`);if(t.add(e),X(n.kind,`Relationship kind for ${e}`),!Object.hasOwn(z3,n.direction))throw Error(`Relationship direction for ${e} must be supported`);if(!Object.hasOwn(R3,n.lifecycle))throw Error(`Relationship lifecycle for ${e} must be supported`);H3(n.source,`Relationship ${e} source`),H3(n.target,`Relationship ${e} target`),n.evidence!==void 0&&X(n.evidence,`Relationship evidence for ${e}`),n.actor!==void 0&&B3(n.actor,`Relationship ${e} actor`)}},W3={root:`rly_RelationshipChain-module__root`,heading:`rly_RelationshipChain-module__heading`,empty:`rly_RelationshipChain-module__empty`,list:`rly_RelationshipChain-module__list`,item:`rly_RelationshipChain-module__item`,endpoint:`rly_RelationshipChain-module__endpoint`,endpointLink:`rly_RelationshipChain-module__endpointLink`,identity:`rly_RelationshipChain-module__identity`,missingIdentity:`rly_RelationshipChain-module__missingIdentity`,title:`rly_RelationshipChain-module__title`,missingLabel:`rly_RelationshipChain-module__missingLabel`,kind:`rly_RelationshipChain-module__kind`,reference:`rly_RelationshipChain-module__reference`,direction:`rly_RelationshipChain-module__direction`,evidence:`rly_RelationshipChain-module__evidence`,fieldLabel:`rly_RelationshipChain-module__fieldLabel`,missingEndpoint:`rly_RelationshipChain-module__missingEndpoint`,relationship:`rly_RelationshipChain-module__relationship`,arrow:`rly_RelationshipChain-module__arrow`,actor:`rly_RelationshipChain-module__actor`},G3=e=>i1(W3,e),K3=({endpoint:e})=>{if(e.state===`missing`)return(0,L.jsxs)(`div`,{className:a1(G3(`endpoint`),G3(`missingEndpoint`)),"data-rly-endpoint-state":`missing`,children:[e.service===void 0?null:(0,L.jsx)(p3,{service:e.service,size:`compact`}),(0,L.jsxs)(`span`,{className:G3(`missingIdentity`),children:[(0,L.jsxs)(`span`,{className:G3(`missingLabel`),children:[(0,L.jsx)($v,{decorative:!0,name:`alert`,size:`small`}),e.label]}),(0,L.jsx)(`span`,{className:G3(`reference`),children:e.reason})]})]});let t=(0,L.jsxs)(`span`,{className:G3(`identity`),children:[(0,L.jsx)(`span`,{className:G3(`title`),children:e.title}),(0,L.jsx)(`span`,{className:G3(`reference`),children:e.reference})]});return(0,L.jsxs)(`div`,{className:G3(`endpoint`),"data-rly-endpoint-id":e.id,"data-rly-endpoint-state":`present`,children:[(0,L.jsx)(p3,{service:e.service,size:`compact`}),e.href===void 0?t:(0,L.jsx)(ay,{className:G3(`endpointLink`),href:e.href,children:t}),e.person===void 0?null:(0,L.jsx)(V4,{person:e.person,size:`compact`})]})},q3=({className:e,emptyLabel:t=`No relationships recorded.`,heading:n,relationships:r,...i})=>{let a=X(n,`RelationshipChain heading`),o=X(t,`RelationshipChain emptyLabel`);U3(r);let s=`${(0,N.useId)()}-heading`;return(0,L.jsxs)(`section`,{...i,"aria-labelledby":s,className:a1(G3(`root`),e),children:[(0,L.jsx)(`h2`,{className:G3(`heading`),id:s,children:a}),r.length===0?(0,L.jsx)(`p`,{className:G3(`empty`),children:o}):(0,L.jsx)(`ol`,{className:G3(`list`),children:r.map(e=>{let t=z3[e.direction],n=R3[e.lifecycle];return(0,L.jsxs)(`li`,{className:G3(`item`),"data-rly-relationship-id":e.id,"data-rly-relationship-direction":e.direction,"data-rly-relationship-kind":e.kind,"data-rly-relationship-lifecycle":e.lifecycle,children:[(0,L.jsx)(K3,{endpoint:e.source}),(0,L.jsxs)(`div`,{className:G3(`relationship`),"data-rly-relationship-detail":``,children:[(0,L.jsxs)(`span`,{className:G3(`direction`),children:[(0,L.jsx)(`span`,{children:t.label}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:G3(`arrow`),children:t.arrow})]}),(0,L.jsx)(`span`,{className:G3(`kind`),children:e.kind}),(0,L.jsx)(H1,{icon:n.icon,label:n.label,size:`compact`,tone:`neutral`}),e.actor===void 0?null:(0,L.jsxs)(`div`,{className:G3(`actor`),"data-rly-relationship-actor":e.actor.id,children:[(0,L.jsx)(`span`,{className:G3(`fieldLabel`),children:`Actor`}),(0,L.jsx)(V4,{person:e.actor,size:`compact`})]})]}),(0,L.jsx)(K3,{endpoint:e.target}),(0,L.jsxs)(`p`,{className:G3(`evidence`),children:[(0,L.jsx)(`span`,{className:G3(`fieldLabel`),children:`Evidence`}),(0,L.jsx)(`span`,{"data-rly-relationship-evidence":``,children:e.evidence??`No evidence recorded.`})]})]},e.id)})})]})},dae={root:`rly_RelationshipTable-module__root`,heading:`rly_RelationshipTable-module__heading`,empty:`rly_RelationshipTable-module__empty`,table:`rly_RelationshipTable-module__table`,head:`rly_RelationshipTable-module__head`,cell:`rly_RelationshipTable-module__cell`,endpoint:`rly_RelationshipTable-module__endpoint`,identity:`rly_RelationshipTable-module__identity`,relationship:`rly_RelationshipTable-module__relationship`,actor:`rly_RelationshipTable-module__actor`,endpointLink:`rly_RelationshipTable-module__endpointLink`,title:`rly_RelationshipTable-module__title`,missingLabel:`rly_RelationshipTable-module__missingLabel`,kind:`rly_RelationshipTable-module__kind`,reference:`rly_RelationshipTable-module__reference`,direction:`rly_RelationshipTable-module__direction`,evidence:`rly_RelationshipTable-module__evidence`,fieldLabel:`rly_RelationshipTable-module__fieldLabel`,missingEndpoint:`rly_RelationshipTable-module__missingEndpoint`,arrow:`rly_RelationshipTable-module__arrow`,body:`rly_RelationshipTable-module__body`,row:`rly_RelationshipTable-module__row`},J3=e=>i1(dae,e),Y3=({endpoint:e})=>{if(e.state===`missing`)return(0,L.jsxs)(`div`,{className:a1(J3(`endpoint`),J3(`missingEndpoint`)),"data-rly-endpoint-state":`missing`,children:[e.service===void 0?null:(0,L.jsx)(p3,{service:e.service,size:`compact`}),(0,L.jsxs)(`span`,{className:J3(`identity`),children:[(0,L.jsxs)(`span`,{className:J3(`missingLabel`),children:[(0,L.jsx)($v,{decorative:!0,name:`alert`,size:`small`}),e.label]}),(0,L.jsx)(`span`,{className:J3(`reference`),children:e.reason})]})]});let t=(0,L.jsxs)(`span`,{className:J3(`identity`),children:[(0,L.jsx)(`span`,{className:J3(`title`),children:e.title}),(0,L.jsx)(`span`,{className:J3(`reference`),children:e.reference})]});return(0,L.jsxs)(`div`,{className:J3(`endpoint`),"data-rly-endpoint-id":e.id,"data-rly-endpoint-state":`present`,children:[(0,L.jsx)(p3,{service:e.service,size:`compact`}),e.href===void 0?t:(0,L.jsx)(ay,{className:J3(`endpointLink`),href:e.href,children:t}),e.person===void 0?null:(0,L.jsx)(V4,{person:e.person,size:`compact`})]})},fae=({className:e,emptyLabel:t=`No relationships recorded.`,heading:n,relationships:r,...i})=>{let a=X(n,`RelationshipTable heading`),o=X(t,`RelationshipTable emptyLabel`);U3(r);let s=`${(0,N.useId)()}-heading`;return(0,L.jsxs)(`section`,{...i,"aria-labelledby":s,className:a1(J3(`root`),e),children:[(0,L.jsx)(`h2`,{className:J3(`heading`),id:s,children:a}),r.length===0?(0,L.jsx)(`p`,{className:J3(`empty`),children:o}):(0,L.jsxs)(`table`,{"aria-labelledby":s,className:J3(`table`),children:[(0,L.jsx)(`thead`,{className:J3(`head`),children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{scope:`col`,children:`Source`}),(0,L.jsx)(`th`,{scope:`col`,children:`Relationship`}),(0,L.jsx)(`th`,{scope:`col`,children:`Target`}),(0,L.jsx)(`th`,{scope:`col`,children:`Evidence`})]})}),(0,L.jsx)(`tbody`,{className:J3(`body`),children:r.map(e=>{let t=z3[e.direction],n=R3[e.lifecycle];return(0,L.jsxs)(`tr`,{className:J3(`row`),"data-rly-relationship-id":e.id,"data-rly-relationship-direction":e.direction,"data-rly-relationship-kind":e.kind,"data-rly-relationship-lifecycle":e.lifecycle,children:[(0,L.jsx)(`td`,{className:J3(`cell`),"data-label":`Source`,children:(0,L.jsx)(Y3,{endpoint:e.source})}),(0,L.jsx)(`td`,{className:J3(`cell`),"data-label":`Relationship`,children:(0,L.jsxs)(`div`,{className:J3(`relationship`),"data-rly-relationship-detail":``,children:[(0,L.jsxs)(`span`,{className:J3(`direction`),children:[(0,L.jsx)(`span`,{children:t.label}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:J3(`arrow`),children:t.arrow})]}),(0,L.jsx)(`span`,{className:J3(`kind`),children:e.kind}),(0,L.jsx)(H1,{icon:n.icon,label:n.label,size:`compact`,tone:`neutral`}),e.actor===void 0?null:(0,L.jsxs)(`div`,{className:J3(`actor`),"data-rly-relationship-actor":e.actor.id,children:[(0,L.jsx)(`span`,{className:J3(`fieldLabel`),children:`Actor`}),(0,L.jsx)(V4,{person:e.actor,size:`compact`})]})]})}),(0,L.jsx)(`td`,{className:J3(`cell`),"data-label":`Target`,children:(0,L.jsx)(Y3,{endpoint:e.target})}),(0,L.jsx)(`td`,{className:J3(`cell`),"data-label":`Evidence`,children:(0,L.jsx)(`span`,{className:J3(`evidence`),"data-rly-relationship-evidence":``,children:e.evidence??`No evidence recorded.`})})]},e.id)})})]})]})},pae={root:`rly_RelayDock-module__root`,trigger:`rly_RelayDock-module__trigger`,close:`rly_RelayDock-module__close`,mark:`rly_RelayDock-module__mark`,markLine:`rly_RelayDock-module__markLine`,markGlyph:`rly_RelayDock-module__markGlyph`,layer:`rly_RelayDock-module__layer`,overlay:`rly_RelayDock-module__overlay`,panel:`rly_RelayDock-module__panel`,sheet:`rly_RelayDock-module__sheet`,rail:`rly_RelayDock-module__rail`,railHeader:`rly_RelayDock-module__railHeader`,railHeading:`rly_RelayDock-module__railHeading`,title:`rly_RelayDock-module__title`,description:`rly_RelayDock-module__description`,fixedContext:`rly_RelayDock-module__fixedContext`,contents:`rly_RelayDock-module__contents`,context:`rly_RelayDock-module__context`,selection:`rly_RelayDock-module__selection`,sectionLabel:`rly_RelayDock-module__sectionLabel`,chipList:`rly_RelayDock-module__chipList`,chip:`rly_RelayDock-module__chip`,chipLabel:`rly_RelayDock-module__chipLabel`,chipValue:`rly_RelayDock-module__chipValue`,selectionGrid:`rly_RelayDock-module__selectionGrid`,body:`rly_RelayDock-module__body`,ready:`rly_RelayDock-module__ready`,state:`rly_RelayDock-module__state`,footer:`rly_RelayDock-module__footer`},X3=e=>i1(pae,e),Z3=`(max-width: 40rem), (max-height: 40rem) and (pointer: coarse)`,Q3=[`a[href]`,`button:not([disabled])`,`iframe:not([tabindex="-1"])`,`input:not([disabled])`,`select:not([disabled])`,`details > summary:first-of-type`,`textarea:not([disabled])`,`[contenteditable]:not([contenteditable="false"])`,`[tabindex]:not([tabindex="-1"])`].join(`,`),mae=`button, fieldset, input, object, optgroup, option, output, select, textarea`,hae=e=>`activeElement`in e,$3=e=>`host`in e&&t1(e.host),e6=e=>{let t=e.activeElement;return t===null?null:t.shadowRoot===null?t:e6(t.shadowRoot)??t},gae=e=>{let t=e.getRootNode();return hae(t)?e6(t):e.ownerDocument.activeElement},_ae=e=>{let t=e.getRootNode();return $3(t)&&f1(t.host)?t.host:null},vae=e=>`assignedSlot`in e,yae=e=>e.nodeType===1,t6=(e,t)=>{if(t!==void 0&&t.has(e)){let n=t.get(e);return n!=null&&yae(n)?n:null}return(vae(e)?e.assignedSlot:null)??e.parentElement??_ae(e)},n6=(e,t,n)=>{if(t===null)return!1;if(e.contains(t))return!0;let r=new Set,i=t;for(;!r.has(i);){r.add(i);let t=t6(i,n);if(t===null)return!1;if(t===e||e.contains(t))return!0;i=t}return!1},r6=(e,t)=>n6(e,t),i6=e=>{let t=e.activeElement;return f1(t)?t.shadowRoot===null?t:i6(t.shadowRoot)??t:null},bae=e=>{let t=i6(e);return t===e.body||t===e.documentElement?null:t},a6=(e,t)=>{if(e.matches(`:disabled`))return!1;let n=e.ownerDocument.defaultView;if(n===null)return!f1(e)||e.hidden===!1;let r=n.getComputedStyle(e).visibility;if(r===`hidden`||r===`collapse`)return!1;let i=e;for(;i!==null;){if(f1(i)&&i.inert)return!1;if(i.tagName===`DETAILS`&&!i.hasAttribute(`open`)){let n=i.querySelector(`:scope > summary:first-of-type`);if(n===null||!n6(n,e,t))return!1}if(i!==e&&i.tagName===`FIELDSET`&&i.hasAttribute(`disabled`)&&e.matches(mae)){let n=i.querySelector(`:scope > legend:first-of-type`);if(n===null||!n6(n,e,t))return!1}let r=n.getComputedStyle(i);if(f1(i)&&i.hidden!==!1||r.display===`none`||i===e&&r.display===`contents`||i!==e&&r.contentVisibility===`hidden`)return!1;i=t6(i,t)}return!0},o6=(e,t)=>{let n=e.getRootNode(),r=new Set,i=t6(e,t);for(;i!==null&&!r.has(i);){if(r.add(i),i.getRootNode()!==n)return!1;if(f1(i)&&i.isContentEditable)return!0;i=t6(i,t)}return!1},s6=e=>f1(e)&&e.tagName===`INPUT`&&e.getAttribute(`type`)?.toLowerCase()===`radio`,c6=e=>`tabIndex`in e&&e1(e.tabIndex),xae=`http://www.w3.org/2000/svg`,l6=e=>{if(e.namespaceURI===xae&&e.localName===`a`&&e.hasAttribute(`href`)){let t=e.getAttribute(`tabindex`);if(t===null)return 0;let n=Number.parseInt(t,10);return Number.isNaN(n)?0:n}return c6(e)?e.tabIndex:null},u6=e=>e.tagName===`SLOT`&&`assignedElements`in e,Sae=e=>u6(e)&&$3(e.getRootNode()),Cae=(e,t)=>{let n=l6(e)??-1,r=l6(t)??-1,i=n>0,a=r>0;return i===a?i&&a&&n!==r?n-r:0:i?-1:1},d6=e=>{let t=l6(e);return t!==null&&e.hasAttribute(`tabindex`)&&t<0},wae=e=>d6(e)&&(u6(e)||f1(e)&&e.shadowRoot?.delegatesFocus===!0),Tae=(e,t,n,r)=>{if(e.name.length===0)return!0;let i=n.filter(({element:n,nativeRoot:i})=>i===t&&s6(n)&&n.name===e.name&&n.form===e.form&&a6(n,r)).map(({element:e})=>e).filter(s6).find(e=>e.checked);return i===void 0?e.tabIndex>=0:i===e},f6=e=>{let t=(e,r,i)=>{let a=[],o=new Map,s=(e,i)=>{if(a.push({composedParent:i,element:e,focusScope:r,nativeRoot:e.getRootNode()}),Sae(e)){let n=e.assignedNodes({flatten:!1}),r=e.assignedElements({flatten:!1}),i=[...e.children];o.set(e,t(n.length>0?r:i,e,e));return}if(u6(e)){o.set(e,t([...e.children],e,e));return}if(e.shadowRoot!==null&&(!d6(e)||e.shadowRoot.delegatesFocus===!0))o.set(e,n(e.shadowRoot,e.shadowRoot,e));else if(e.shadowRoot===null)for(let t of e.children)s(t,e)};for(let t of e)s(t,i);return{entries:a,nested:o}},n=(e,n,r)=>t([...e.children],n,r),r=e=>{let t=[...e.entries].sort((e,t)=>Cae(e.element,t.element)),n=[];for(let i of t){n.push(i);let t=e.nested.get(i.element);if(t!==void 0)for(let e of r(t))n.push(e)}return n};return r(n(e,e,e))},p6=(e,t,n)=>t.filter(r=>{let{element:i,nativeRoot:a}=r;if(i.tagName===`SLOT`)return!1;let o=l6(i);if(o===null)return!1;let s=i,c=new Set;for(;!c.has(s);){c.add(s);let t=t6(s,n);if(t===null||t===e)break;if(wae(t))return!1;s=t}return!i.matches(Q3)||i.shadowRoot?.delegatesFocus===!0||!a6(i,n)||s6(i)&&!Tae(i,a,t,n)?!1:o>=0||f1(i)&&i.isContentEditable&&!i.hasAttribute(`tabindex`)&&!o6(i,n)||i.matches(`details > summary:first-of-type`)&&!d6(i)}).map(({element:e})=>e),m6=e=>t1(e)&&`tagName`in e&&e.tagName===`IFRAME`&&`contentDocument`in e,Eae=e=>t1(e)&&`nodeType`in e&&e.nodeType===1,Dae=e=>[...e.querySelectorAll(Q3)].filter(e=>{let t=l6(e);return t!==null&&t>=0||f1(e)&&e.isContentEditable&&!e.hasAttribute(`tabindex`)&&!o6(e,new Map)}),Oae=e=>{let t=e.ownerDocument,n=new Map,r=(t,n)=>{let r=f6(e),i=p6(e,r,new Map(r.map(({composedParent:e,element:t})=>[t,e]))),a=i.findIndex(e=>e===t),o=n?i[i.length-1]:i[0];((a<0?void 0:i[a+(n?-1:1)])??o)?.focus()},i=e=>{let t=n.get(e),i=e.contentDocument;if(t?.frameDocument!==null&&t?.frameDocument!==void 0&&t.frameDocument.removeEventListener(`keydown`,t.onKeyDown,!0),t===void 0)return;if(i===null){n.set(e,{...t,frameDocument:null});return}let a=t=>{if(t.defaultPrevented||t.key!==`Tab`)return;let n=Dae(i),a=Eae(t.target)?t.target:i.activeElement,o=n[0],s=n[n.length-1];(t.shiftKey?a===o:a===s)&&(t.preventDefault(),r(e,t.shiftKey))};i.addEventListener(`keydown`,a,!0),n.set(e,{...t,frameDocument:i,onKeyDown:a})},a=e=>{if(n.has(e)){i(e);return}let t=()=>i(e);n.set(e,{frameDocument:null,onKeyDown:()=>void 0,onLoad:t}),e.addEventListener(`load`,t),i(e)},o=()=>{for(let{element:t}of f6(e))t.tagName===`IFRAME`&&m6(t)&&a(t)},s=e=>{m6(e.target)&&a(e.target)};t.addEventListener(`focusin`,s,!0),o();let c=t.defaultView?.MutationObserver,l=c===void 0?null:new c(o);return l?.observe(e,{childList:!0,subtree:!0}),()=>{t.removeEventListener(`focusin`,s,!0),l?.disconnect();for(let[e,t]of n)e.removeEventListener(`load`,t.onLoad),t.frameDocument!==null&&t.frameDocument.removeEventListener(`keydown`,t.onKeyDown,!0)}},kae=(e,t)=>{if(e===null||!(`matchMedia`in e))return()=>void 0;let n=e.matchMedia(Z3);return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},Aae=e=>e!==null&&`matchMedia`in e&&e.matchMedia(Z3).matches,jae=()=>!1,Mae=e=>{let t=(0,N.useCallback)(t=>kae(e,t),[e]),n=(0,N.useCallback)(()=>Aae(e),[e]);return(0,N.useSyncExternalStore)(t,n,jae)},Nae=()=>(0,L.jsxs)(`span`,{"aria-hidden":`true`,className:X3(`mark`),children:[(0,L.jsx)(`span`,{className:X3(`markLine`)}),(0,L.jsx)(`svg`,{className:X3(`markGlyph`),focusable:`false`,viewBox:`0 0 24 24`,children:(0,L.jsx)(`path`,{d:`M12 3.5 14 10l6.5 2-6.5 2-2 6.5L10 14l-6.5-2 6.5-2Z`,fill:`currentColor`})})]}),Pae=({context:e,labelId:t})=>{if(e.length===0)throw Error(`RelayDock context must contain at least one chip`);let n=new Set;return(0,L.jsxs)(`section`,{"aria-labelledby":t,className:X3(`context`),children:[(0,L.jsx)(`h2`,{className:X3(`sectionLabel`),id:t,children:`Context`}),(0,L.jsx)(`ul`,{className:X3(`chipList`),children:e.map(e=>{let t=X(e.id,`RelayDock context chip id`);if(n.has(t))throw Error(`Duplicate RelayDock context chip id: ${t}`);return n.add(t),(0,L.jsxs)(`li`,{className:X3(`chip`),"data-rly-relay-dock-context":t,children:[(0,L.jsx)(`span`,{className:X3(`chipLabel`),children:X(e.label,`RelayDock context chip label`)}),(0,L.jsx)(`span`,{className:X3(`chipValue`),children:X(e.value,`RelayDock context chip value`)})]},t)})})]})},Fae=({labelId:e,selection:t})=>{let n=(0,N.useId)(),r=(0,N.useId)();return(0,L.jsxs)(`section`,{"aria-labelledby":e,className:X3(`selection`),children:[(0,L.jsx)(`h2`,{className:X3(`sectionLabel`),id:e,children:`Run with`}),(0,L.jsxs)(`div`,{className:X3(`selectionGrid`),children:[(0,L.jsx)(x0,{controlId:`rly-relay-dock-profile-${n}`,label:`Profile`,size:`compact`,children:e=>(0,L.jsx)(a0,{...e,...t.profile.disabled===void 0?{}:{disabled:t.profile.disabled},onValueChange:t.profile.onValueChange,options:t.profile.options,size:`compact`,value:t.profile.value})}),(0,L.jsx)(x0,{controlId:`rly-relay-dock-model-${r}`,label:`Model`,size:`compact`,children:e=>(0,L.jsx)(a0,{...e,...t.model.disabled===void 0?{}:{disabled:t.model.disabled},onValueChange:t.model.onValueChange,options:t.model.options,size:`compact`,value:t.model.value})})]})]})},Iae=({state:e})=>{if(e.status===`ready`)return(0,L.jsx)(`section`,{"aria-live":`polite`,className:X3(`ready`),"data-rly-relay-dock-state":`ready`,children:e.content});let t=e.status===`error`?`assertive`:`polite`,n=e.status===`loading`?`progress`:e.status===`error`?`critical`:`neutral`;return(0,L.jsx)(m0,{action:`action`in e?e.action:void 0,announce:t,className:X3(`state`),"data-rly-relay-dock-state":e.status,description:e.description,title:X(e.title,`RelayDock ${e.status} title`),tone:n})},Lae=({context:e,footer:t,selection:n,state:r})=>{let i=(0,N.useId)(),a=(0,N.useId)();return(0,L.jsxs)(`div`,{className:X3(`contents`),"data-rly-relay-dock-scroll":``,children:[(0,L.jsxs)(`div`,{className:X3(`fixedContext`),children:[(0,L.jsx)(Pae,{context:e,labelId:i}),(0,L.jsx)(Fae,{labelId:a,selection:n})]}),(0,L.jsx)(`section`,{"aria-label":`Relay thread`,className:X3(`body`),tabIndex:0,children:(0,L.jsx)(Iae,{state:r})}),t==null?null:(0,L.jsx)(`footer`,{className:X3(`footer`),children:t})]})},Rae=({restoreDocument:e,restoreTarget:t,target:n})=>{let r=(0,N.useRef)(!1);return(0,N.useLayoutEffect)(()=>{let i=n.current;i!==null&&(r.current||=(t.current=bae(e??i.ownerDocument),!0),i.focus())},[e,t,n]),null},zae=({children:e,modal:t,modalLayer:n})=>{let r=(0,N.useRef)(null);return g1(),y1(r,t),S1(r,t),(0,L.jsx)(`div`,{className:X3(`layer`),"data-rly-modal-layer":n?``:void 0,"data-rly-relay-dock-modal":t?`true`:`false`,ref:r,children:e})},Bae=({closeRef:e,compactViewport:t,context:n,description:r,footer:i,headingId:a,modal:o,onClose:s,parentModalPresent:c,restoreDocument:l,restoreTargetRef:u,selection:d,state:f,title:p})=>{let m=`${a}-description`,h=(0,N.useRef)(null);(0,N.useLayoutEffect)(()=>{let e=h.current;if(o&&e!==null)return Oae(e)},[o]);let g=e=>{let t=e.currentTarget;if(!e.nativeEvent.composedPath().includes(t)||e.defaultPrevented)return;if(e.key===`Escape`){if(e.nativeEvent.isComposing)return;e.stopPropagation(),s();return}if(!o||e.key!==`Tab`)return;let n=f6(t),r=new Map(n.map(({composedParent:e,element:t})=>[t,e])),i=e=>{let t=new Set,n=e;for(;!t.has(n);){t.add(n);let e=t6(n,r);if(e===null)return null;if(f1(e)&&e.shadowRoot?.delegatesFocus===!0)return e;n=e}return null},a=p6(t,n,r),c=a[0]??t,l=a[a.length-1]??t,u=gae(t),d=new Set(a),f=u!==null&&r6(t,u)&&!a.some(e=>e===u),p=e=>{let t=new Set,i=e;for(;!t.has(i);){t.add(i);let e=n.findIndex(({element:e})=>e===i);if(e>=0)return e;let a=t6(i,r);if(a===null)return-1;i=a}return-1},m=f&&u!==null?i(u):null,h=f&&u!==null?p(u):-1,g=f?(e=>{if(h<0)return null;for(let t=h+e;t>=0&&t<n.length;t+=e){let e=n[t]?.element;if(e!==void 0&&d.has(e)&&c6(e))return e}return null})(e.shiftKey?-1:1):null,_=m!==null&&g!==null&&n6(m,g,r),v=f&&!_&&(g===null||!r6(t,g)),y=e.shiftKey&&(u===c||!r6(t,u)||_||v),b=!e.shiftKey&&(u===l||!r6(t,u)||_||v);(y||b)&&(e.preventDefault(),(_&&g!==null?g:e.shiftKey?l:c).focus())};return(0,L.jsx)(ry,{children:_=>(0,L.jsx)(As,{container:_,children:(0,L.jsxs)(zae,{modal:o,modalLayer:o||c,children:[o?(0,L.jsx)(`div`,{"aria-hidden":`true`,className:X3(`overlay`),"data-rly-relay-dock-overlay":``,onPointerDown:s}):null,(0,L.jsxs)(`section`,{"aria-describedby":m,"aria-labelledby":a,"aria-modal":o?!0:void 0,className:a1(X3(`panel`),X3(o?`sheet`:`rail`)),"data-rly-relay-dock-presentation":t?`mobile-sheet`:o?`overlay`:`rail`,onKeyDown:g,ref:h,role:o?`dialog`:`complementary`,tabIndex:-1,children:[(0,L.jsxs)(`header`,{className:X3(`railHeader`),children:[(0,L.jsxs)(`div`,{className:X3(`railHeading`),children:[(0,L.jsx)(`h1`,{className:X3(`title`),id:a,children:p}),(0,L.jsx)(`p`,{className:X3(`description`),id:m,children:r})]}),(0,L.jsx)(`button`,{"aria-label":`Close ${p}`,className:X3(`close`),onClick:s,ref:e,type:`button`,children:(0,L.jsx)($v,{decorative:!0,name:`close`})})]}),(0,L.jsx)(Rae,{restoreDocument:l,restoreTarget:u,target:e}),(0,L.jsx)(Lae,{context:n,footer:i,selection:d,state:f})]})]})})})},Vae=e=>{let{className:t,context:n,defaultOpen:r=!1,description:i=`Ask in this context or prepare approval-bound work.`,desktopPresentation:a=`overlay`,footer:o,onOpenChange:s,open:c,ref:l,selection:u,state:d,title:f=`Relay`,triggerLabel:p=`Open Relay`,...m}=e,[h,g]=(0,N.useState)(r),_=h1(),v=m1(),y=ny(),b=(c??h)&&v&&y.available,x=Mae(y.available?y.container.ownerDocument.defaultView:null),S=x||a===`overlay`,C=(0,N.useRef)(null),w=(0,N.useRef)(null),T=(0,N.useRef)(null),E=(0,N.useRef)({modal:S,open:!1}),D=(0,N.useId)(),O=X(i,`RelayDock description`),k=X(f,`RelayDock title`),A=X(p,`RelayDock triggerLabel`),j=e=>{c===void 0&&g(e),s?.(e)};return(0,N.useLayoutEffect)(()=>{let e=E.current;E.current={modal:S,open:b},!e.open&&b?(C1(),w.current?.focus()):e.open&&b&&e.modal!==S?w.current?.focus():e.open&&!b&&(w1(T.current??C.current),T.current=null)},[S,b]),(0,L.jsxs)(`div`,{...m,className:a1(X3(`root`),t),"data-rly-relay-dock":``,"data-rly-relay-dock-open":b?`true`:`false`,ref:l,children:[(0,L.jsxs)(`button`,{"aria-expanded":b,"aria-haspopup":S?`dialog`:void 0,className:X3(`trigger`),"data-rly-relay-dock-trigger":``,hidden:b,onClick:e=>{e.currentTarget.focus(),j(!0)},ref:C,type:`button`,children:[(0,L.jsx)(Nae,{}),(0,L.jsx)(`span`,{children:A})]}),b?(0,L.jsx)(p1,{children:(0,L.jsx)(Bae,{closeRef:w,compactViewport:x,context:n,description:O,footer:o,headingId:D,modal:S,onClose:()=>j(!1),parentModalPresent:_,restoreDocument:C.current?.ownerDocument??null,restoreTargetRef:T,selection:u,state:d,title:k})}):null]})},Hae=/^(?:--[A-Za-z0-9_\-\u0080-\uD7FF\uE000-\u{10ffff}]*|-?[A-Za-z_\u0080-\uD7FF\uE000-\u{10ffff}][A-Za-z0-9_\-\u0080-\uD7FF\uE000-\u{10ffff}]*)$/u,Uae=new Set([`auto`,`default`,`inherit`,`initial`,`match-element`,`none`,`revert`,`revert-layer`,`unset`]),h6=e=>{if(e===void 0)return;let t={relay:e.relay,verdict:e.verdict,version:e.version},n=[[`relay`,t.relay],[`verdict`,t.verdict],[`version`,t.version]],r=new Set;for(let[e,t]of n){let n=X(t,`Release transition ${e} name`);if(n===`root`||Uae.has(n.toLowerCase()))throw Error(`Release transition ${e} name must not use a reserved CSS value: ${n}`);if(!Hae.test(n))throw Error(`Release transition ${e} name must be a valid unescaped CSS custom identifier: ${n}`);if(r.has(n))throw Error(`Release transition names must be unique: ${n}`);r.add(n)}return Object.freeze(t)},Wae={blocked:!0,ready:!0,deploying:!0,building:!0,shipped:!0,held:!0,unknown:!0},g6=e=>{if(X(e.id,`Release presentation id`),X(e.version,`Release presentation version`),X(e.codename,`Release presentation codename`),X(e.algorithm,`Release presentation algorithm`),X(e.verdict,`Release presentation verdict`),X(e.reason,`Release presentation reason`),!Object.hasOwn(Wae,e.state))throw Error(`Release presentation state must be supported`);e.freshnessDateTime!==void 0&&(X(e.freshnessDateTime,`Release presentation freshnessDateTime`),X(e.freshnessTime,`Release presentation freshnessTime`));let t=new Set;for(let n of e.facts){let e=X(n.id,`Release presentation fact id`);if(t.has(e))throw Error(`Release presentation fact ids must be unique: ${e}`);t.add(e),X(n.label,`Release presentation fact label for ${e}`),X(n.value,`Release presentation fact value for ${e}`)}return e},Gae={root:`rly_ReleaseRelay-module__root`,tiles:`rly_ReleaseRelay-module__tiles`,handoff:`rly_ReleaseRelay-module__handoff`,tile:`rly_ReleaseRelay-module__tile`,glyph:`rly_ReleaseRelay-module__glyph`,identity:`rly_ReleaseRelay-module__identity`,codename:`rly_ReleaseRelay-module__codename`,algorithm:`rly_ReleaseRelay-module__algorithm`,compact:`rly_ReleaseRelay-module__compact`,hero:`rly_ReleaseRelay-module__hero`},_6=e=>i1(Gae,e),v6=r1({0:{name:`orbit`},1:{name:`split`},2:{name:`brace`},3:{name:`wave`},4:{name:`gate`},5:{name:`fork`},6:{name:`bridge`},7:{name:`beacon`},8:{name:`loop`},9:{name:`pulse`},10:{name:`anchor`},11:{name:`ladder`},12:{name:`knot`},13:{name:`spark`},14:{name:`stack`},15:{name:`compass`}}),y6=r1({size:{compact:{className:_6(`compact`),purpose:`Release rows and compact previews`,tokens:[`space-32`,`space-8`,`type-label`]},hero:{className:_6(`hero`),purpose:`Page-level release identity`,tokens:[`space-48`,`space-4`,`space-8`,`type-card-title`]}}}),Kae=r1({size:`compact`}),qae={0:`M12 4a8 8 0 1 1-6.9 4M5.1 8H9V4.1`,1:`M5 5v4c0 2 1 3 3 3h8c2 0 3 1 3 3v4M12 12V5`,2:`M9 4H7v5l-3 3 3 3v5h2M15 4h2v5l3 3-3 3v5h-2`,3:`M3 9c3-4 6-4 9 0s6 4 9 0M3 15c3-4 6-4 9 0s6 4 9 0`,4:`M5 19V8l7-4 7 4v11M9 19v-7h6v7`,5:`M12 20V9M12 12 6 6M12 12l6-6M6 6v4M18 6v4`,6:`M3 17h18M5 17v-5c4-5 10-5 14 0v5M8 17v-3M16 17v-3`,7:`M12 3v3M5.6 5.6l2.1 2.1M18.4 5.6l-2.1 2.1M6 20h12l-2-9H8Z`,8:`M8 8a4 4 0 0 1 8 0v8a4 4 0 0 1-8 0V8Zm0 4h8`,9:`M3 13h4l2-6 4 12 2-6h6`,10:`M12 3v15M8 7h8M5 14c0 4 3 7 7 7s7-3 7-7M5 14l-2 2M19 14l2 2`,11:`M7 3v18M17 3v18M7 7h10M7 12h10M7 17h10`,12:`M8 5a4 4 0 0 1 4 4v6a4 4 0 1 0 4-4H8a4 4 0 1 0 4 4V9a4 4 0 0 1 4-4`,13:`M12 3v5M12 16v5M3 12h5M16 12h5M5.6 5.6l3.5 3.5M14.9 14.9l3.5 3.5M18.4 5.6l-3.5 3.5M9.1 14.9l-3.5 3.5`,14:`m4 8 8-4 8 4-8 4Zm0 4 8 4 8-4M4 16l8 4 8-4`,15:`m12 3 3 6 6 3-6 3-3 6-3-6-6-3 6-3Zm0 6v6M9 12h6`},Jae=e=>{if(e.length!==3)throw Error(`ReleaseRelay symbolIndices must contain exactly three indices`);let t=new Set;for(let n of e){if(!Number.isInteger(n)||n<0||n>15)throw Error(`ReleaseRelay symbol indices must be integers from 0 through 15`);if(t.has(n))throw Error(`ReleaseRelay symbol indices must be distinct`);t.add(n)}return e},b6=({algorithm:e,className:t,codename:n,size:r=`compact`,symbolIndices:i,...a})=>{let o=X(e,`ReleaseRelay algorithm`),s=X(n,`ReleaseRelay codename`),c=Jae(i),l=`Release relay, ${s}, symbols ${c.map(e=>v6[e].name).join(`, `)}.`;return(0,L.jsxs)(`figure`,{...a,className:a1(_6(`root`),y6.size[r].className,t),"data-rly-release-relay-size":r,children:[(0,L.jsxs)(`span`,{"aria-label":l,className:_6(`tiles`),role:`img`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:_6(`handoff`),"data-rly-release-relay-handoff":``}),c.map((e,t)=>(0,L.jsx)(`span`,{"aria-hidden":`true`,className:_6(`tile`),"data-rly-release-relay-position":t,"data-rly-release-symbol-index":e,"data-rly-release-symbol-name":v6[e].name,children:(0,L.jsx)(`svg`,{className:_6(`glyph`),focusable:`false`,viewBox:`0 0 24 24`,children:(0,L.jsx)(`path`,{d:qae[e],fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.7`,vectorEffect:`non-scaling-stroke`})})},e))]}),(0,L.jsxs)(`figcaption`,{className:_6(`identity`),children:[(0,L.jsx)(`span`,{className:_6(`codename`),children:s}),(0,L.jsxs)(`span`,{className:_6(`algorithm`),children:[`Identity algorithm: `,o]})]})]})},Yae={body:`rly_ReleasePreview-module__body`,summary:`rly_ReleasePreview-module__summary`,releaseMeta:`rly_ReleasePreview-module__releaseMeta`,personGroup:`rly_ReleasePreview-module__personGroup`,fact:`rly_ReleasePreview-module__fact`,dialogSurface:`rly_ReleasePreview-module__dialogSurface`,dialogFrame:`rly_ReleasePreview-module__dialogFrame`,dialogScroll:`rly_ReleasePreview-module__dialogScroll`,identityRow:`rly_ReleasePreview-module__identityRow`,version:`rly_ReleasePreview-module__version`,people:`rly_ReleasePreview-module__people`,eyebrow:`rly_ReleasePreview-module__eyebrow`,unassigned:`rly_ReleasePreview-module__unassigned`,facts:`rly_ReleasePreview-module__facts`,slot:`rly_ReleasePreview-module__slot`,dialogFooter:`rly_ReleasePreview-module__dialogFooter`,sheetFooter:`rly_ReleasePreview-module__sheetFooter`,dialogClose:`rly_ReleasePreview-module__dialogClose`,fullViewButton:`rly_ReleasePreview-module__fullViewButton`},x6=e=>i1(Yae,e),Xae=({agentEntry:e,collaborators:t,entryMotion:n=`intrinsic`,evidence:r,onOpenChange:i,onOpenFullView:a,open:o,openFullViewLabel:s=`Open full view`,presentation:c=`dialog`,primaryAction:l,release:u,stages:d,transitionNames:f,workset:p})=>{let m=g6(u),h=h6(f),g=X(s,`ReleasePreview openFullViewLabel`),_=(0,N.useRef)(null),v=m.freshnessDateTime===void 0?(0,L.jsx)(o3,{state:m.freshness}):(0,L.jsx)(o3,{dateTime:m.freshnessDateTime,state:m.freshness,time:m.freshnessTime}),y=`Release preview: ${m.version} ${m.codename}`,b=(0,L.jsxs)(`div`,{className:x6(`body`),"data-rly-release-preview-presentation":c,"data-rly-release-state":m.state,children:[(0,L.jsxs)(`section`,{"aria-label":`Release summary`,className:x6(`summary`),"data-rly-release-preview-summary":``,ref:_,tabIndex:-1,children:[(0,L.jsxs)(`div`,{className:x6(`identityRow`),children:[(0,L.jsx)(b6,{algorithm:m.algorithm,codename:m.codename,"data-rly-release-transition-name":h?.relay,"data-rly-release-transition-part":`relay`,size:`hero`,style:h===void 0?void 0:{viewTransitionName:h.relay},symbolIndices:m.symbolIndices}),(0,L.jsxs)(`div`,{className:x6(`releaseMeta`),children:[(0,L.jsx)(`p`,{className:x6(`version`),"data-rly-release-transition-name":h?.version,"data-rly-release-transition-part":`version`,style:h===void 0?void 0:{viewTransitionName:h.version},children:m.version}),v]})]}),(0,L.jsxs)(`div`,{className:x6(`people`),children:[(0,L.jsxs)(`div`,{className:x6(`personGroup`),children:[(0,L.jsx)(`span`,{className:x6(`eyebrow`),children:`Owner`}),m.owner===void 0?(0,L.jsx)(`span`,{className:x6(`unassigned`),"data-rly-release-owner":`unassigned`,children:`Unassigned`}):(0,L.jsx)(V4,{person:m.owner})]}),(0,L.jsxs)(`div`,{className:x6(`personGroup`),children:[(0,L.jsx)(`span`,{className:x6(`eyebrow`),children:`Approver`}),m.approver===void 0?(0,L.jsx)(`span`,{className:x6(`unassigned`),"data-rly-release-approver":`unassigned`,children:`Unassigned`}):(0,L.jsx)(V4,{person:m.approver})]})]}),(0,L.jsx)(v3,{"data-rly-release-transition-name":h?.verdict,"data-rly-release-transition-part":`verdict`,reason:m.reason,style:h===void 0?void 0:{viewTransitionName:h.verdict},tone:m.tone,verdict:m.verdict}),(0,L.jsx)(`dl`,{className:x6(`facts`),children:m.facts.map(e=>(0,L.jsxs)(`div`,{className:x6(`fact`),children:[(0,L.jsx)(`dt`,{children:e.label}),(0,L.jsx)(`dd`,{children:e.value})]},e.id))})]}),t===void 0?null:(0,L.jsx)(`div`,{className:x6(`slot`),"data-rly-release-preview-slot":`collaborators`,children:t}),(0,L.jsx)(`div`,{className:x6(`slot`),"data-rly-release-preview-slot":`primary-action`,children:l}),(0,L.jsx)(`div`,{className:x6(`slot`),"data-rly-release-preview-slot":`stages`,children:d}),(0,L.jsx)(`div`,{className:x6(`slot`),"data-rly-release-preview-slot":`workset`,children:p}),(0,L.jsx)(`div`,{className:x6(`slot`),"data-rly-release-preview-slot":`evidence`,children:r}),(0,L.jsx)(`div`,{className:x6(`slot`),"data-rly-release-preview-slot":`agent-entry`,children:e})]}),x=(0,L.jsx)(L1,{className:x6(`fullViewButton`),onClick:a,size:`default`,variant:`secondary`,children:g});return c===`sheet`?(0,L.jsx)(N1.Root,{onOpenChange:i,open:o,children:(0,L.jsxs)(N1.Content,{entryMotion:n,initialFocusRef:_,title:y,children:[(0,L.jsx)(N1.Body,{"data-rly-release-preview-scroll":`sheet`,children:b}),(0,L.jsx)(N1.Footer,{className:x6(`sheetFooter`),"data-rly-release-preview-footer":`sheet`,children:x})]})}):(0,L.jsx)(A0.Root,{onOpenChange:i,open:o,children:(0,L.jsx)(A0.Content,{className:x6(`dialogSurface`),entryMotion:n,initialFocusRef:_,size:`wide`,title:y,children:(0,L.jsxs)(`div`,{className:x6(`dialogFrame`),children:[(0,L.jsx)(`div`,{className:x6(`dialogClose`),children:(0,L.jsx)(A0.Close,{size:`compact`,variant:`quiet`,children:`Close preview`})}),(0,L.jsx)(`div`,{className:x6(`dialogScroll`),"data-rly-release-preview-scroll":`dialog`,children:b}),(0,L.jsx)(`footer`,{className:x6(`dialogFooter`),"data-rly-release-preview-footer":`dialog`,children:x})]})})})},Zae={root:`rly_ReleaseRow-module__root`,identity:`rly_ReleaseRow-module__identity`,verdictBlock:`rly_ReleaseRow-module__verdictBlock`,people:`rly_ReleaseRow-module__people`,actions:`rly_ReleaseRow-module__actions`,personGroup:`rly_ReleaseRow-module__personGroup`,fact:`rly_ReleaseRow-module__fact`,version:`rly_ReleaseRow-module__version`,verdict:`rly_ReleaseRow-module__verdict`,reason:`rly_ReleaseRow-module__reason`,eyebrow:`rly_ReleaseRow-module__eyebrow`,unassigned:`rly_ReleaseRow-module__unassigned`,facts:`rly_ReleaseRow-module__facts`,agentEntry:`rly_ReleaseRow-module__agentEntry`,previewButton:`rly_ReleaseRow-module__previewButton`},S6=e=>i1(Zae,e),Qae=({agentEntry:e,className:t,onPreview:n,previewLabel:r=`Preview release`,release:i,transitionNames:a,...o})=>{let s=g6(i),c=h6(a),l=X(r,`ReleaseRow previewLabel`),u=`rly-release-row-verdict-${(0,N.useId)()}`,d=s.freshnessDateTime===void 0?(0,L.jsx)(o3,{size:`compact`,state:s.freshness}):(0,L.jsx)(o3,{dateTime:s.freshnessDateTime,size:`compact`,state:s.freshness,time:s.freshnessTime});return(0,L.jsxs)(`article`,{...o,className:a1(S6(`root`),t),"data-rly-release-id":s.id,"data-rly-release-state":s.state,children:[(0,L.jsxs)(`div`,{className:S6(`identity`),children:[(0,L.jsx)(b6,{algorithm:s.algorithm,codename:s.codename,"data-rly-release-transition-name":c?.relay,"data-rly-release-transition-part":`relay`,size:`compact`,style:c===void 0?void 0:{viewTransitionName:c.relay},symbolIndices:s.symbolIndices}),(0,L.jsx)(`p`,{className:S6(`version`),"data-rly-release-transition-name":c?.version,"data-rly-release-transition-part":`version`,style:c===void 0?void 0:{viewTransitionName:c.version},children:s.version}),d]}),(0,L.jsxs)(`section`,{"aria-labelledby":u,className:S6(`verdictBlock`),"data-rly-release-transition-name":c?.verdict,"data-rly-release-transition-part":`verdict`,style:c===void 0?void 0:{viewTransitionName:c.verdict},children:[(0,L.jsx)(`h2`,{className:S6(`verdict`),id:u,children:s.verdict}),(0,L.jsx)(`p`,{className:S6(`reason`),children:s.reason})]}),(0,L.jsxs)(`div`,{className:S6(`people`),children:[(0,L.jsxs)(`div`,{className:S6(`personGroup`),children:[(0,L.jsx)(`span`,{className:S6(`eyebrow`),children:`Owner`}),s.owner===void 0?(0,L.jsx)(`span`,{className:S6(`unassigned`),"data-rly-release-owner":`unassigned`,children:`Unassigned`}):(0,L.jsx)(V4,{person:s.owner,size:`compact`})]}),s.approver===void 0?null:(0,L.jsxs)(`div`,{className:S6(`personGroup`),children:[(0,L.jsx)(`span`,{className:S6(`eyebrow`),children:`Approver`}),(0,L.jsx)(V4,{person:s.approver,size:`compact`})]})]}),(0,L.jsx)(`dl`,{className:S6(`facts`),children:s.facts.map(e=>(0,L.jsxs)(`div`,{className:S6(`fact`),"data-rly-release-fact":e.id,children:[(0,L.jsx)(`dt`,{children:e.label}),(0,L.jsx)(`dd`,{children:e.value})]},e.id))}),(0,L.jsxs)(`div`,{className:S6(`actions`),children:[(0,L.jsx)(L1,{className:S6(`previewButton`),onClick:n,size:`default`,children:l}),e===void 0?null:(0,L.jsx)(`div`,{className:S6(`agentEntry`),children:e})]})]})},$ae={root:`rly_StageRail-module__root`,heading:`rly_StageRail-module__heading`,list:`rly_StageRail-module__list`,item:`rly_StageRail-module__item`,marker:`rly_StageRail-module__marker`,connector:`rly_StageRail-module__connector`,content:`rly_StageRail-module__content`,name:`rly_StageRail-module__name`,reason:`rly_StageRail-module__reason`,empty:`rly_StageRail-module__empty`,compact:`rly_StageRail-module__compact`,defaultSize:`rly_StageRail-module__defaultSize`,long:`rly_StageRail-module__long`},C6=e=>i1($ae,e),w6=r1({size:{compact:{className:C6(`compact`),purpose:`Dense release and entity stage summaries`,tokens:[`space-24`,`space-8`,`type-label`,`type-meta`]},default:{className:C6(`defaultSize`),purpose:`Standard stage progression with supporting context`,tokens:[`space-24`,`space-12`,`type-card-title`,`type-body`]}}}),eoe=r1({size:`default`}),toe=e=>{let t=new Set;for(let n of e){let e=X(n.id,`StageRail stage id`);if(X(n.name,`StageRail name for ${e}`),X(n.state,`StageRail state for ${e}`),n.reason!==void 0&&X(n.reason,`StageRail reason for ${e}`),t.has(e))throw Error(`StageRail stage ids must be unique: ${e}`);t.add(e)}return e},T6=({className:e,emptyLabel:t=`No stages recorded.`,heading:n,size:r=`default`,stages:i,...a})=>{let o=X(n,`StageRail heading`),s=X(t,`StageRail emptyLabel`),c=toe(i),l=`rly-stage-rail-${(0,N.useId)()}`;return(0,L.jsxs)(`section`,{...a,"aria-labelledby":l,className:a1(C6(`root`),w6.size[r].className,c.length>6&&C6(`long`),e),"data-rly-stage-rail-size":r,children:[(0,L.jsx)(`h2`,{className:C6(`heading`),id:l,children:o}),c.length===0?(0,L.jsx)(`p`,{className:C6(`empty`),children:s}):(0,L.jsx)(`ol`,{className:C6(`list`),children:c.map((e,t)=>(0,L.jsxs)(`li`,{className:C6(`item`),"data-rly-stage-id":e.id,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:C6(`marker`),"data-rly-stage-marker":``,children:t+1}),t===c.length-1?null:(0,L.jsx)(`span`,{"aria-hidden":`true`,className:C6(`connector`),"data-rly-stage-connector":``}),(0,L.jsxs)(`div`,{className:C6(`content`),children:[(0,L.jsx)(`h3`,{className:C6(`name`),children:e.name}),(0,L.jsx)(H1,{label:e.state,size:r===`compact`?`compact`:`default`,tone:e.tone}),e.reason===void 0?null:(0,L.jsx)(`p`,{className:C6(`reason`),children:e.reason}),e.owner===void 0?null:(0,L.jsx)(V4,{person:e.owner,size:r})]})]},e.id))})]})},noe={root:`rly_TimelineRow-module__root`,time:`rly_TimelineRow-module__time`,marker:`rly_TimelineRow-module__marker`,dot:`rly_TimelineRow-module__dot`,connector:`rly_TimelineRow-module__connector`,content:`rly_TimelineRow-module__content`,meta:`rly_TimelineRow-module__meta`,title:`rly_TimelineRow-module__title`,link:`rly_TimelineRow-module__link`,detail:`rly_TimelineRow-module__detail`,actorKind:`rly_TimelineRow-module__actorKind`,actor:`rly_TimelineRow-module__actor`},E6=e=>i1(noe,e),D6={human:`Human`,agent:`Agent`,plugin:`Plugin`,system:`System`},roe=e=>{if(X(e.id,`TimelineRow event id`),X(e.title,`TimelineRow event title`),X(e.detail,`TimelineRow event detail`),X(e.dateTime,`TimelineRow event dateTime`),X(e.time,`TimelineRow event time`),e.href!==void 0&&X(e.href,`TimelineRow event href`),!Object.hasOwn(D6,e.actorKind))throw Error(`TimelineRow event actorKind must be human, agent, plugin, or system`);return e},ioe=({className:e,continued:t,event:n,...r})=>{let i=roe(n),a=`rly-timeline-row-${(0,N.useId)()}`,o=(0,L.jsx)(`h2`,{className:E6(`title`),id:a,children:i.title});return(0,L.jsxs)(`li`,{...r,className:a1(E6(`root`),e),"data-rly-timeline-actor":i.actorKind,"data-rly-timeline-event-id":i.id,children:[(0,L.jsx)(`time`,{className:E6(`time`),dateTime:i.dateTime,children:i.time}),(0,L.jsxs)(`span`,{"aria-hidden":`true`,className:E6(`marker`),children:[(0,L.jsx)(`span`,{className:E6(`dot`)}),t?(0,L.jsx)(`span`,{className:E6(`connector`),"data-rly-timeline-connector":``}):null]}),(0,L.jsxs)(`article`,{"aria-labelledby":a,className:E6(`content`),children:[i.href===void 0?o:(0,L.jsx)(ay,{className:E6(`link`),href:i.href,children:o}),(0,L.jsx)(`p`,{className:E6(`detail`),children:i.detail})]}),(0,L.jsxs)(`div`,{className:E6(`meta`),children:[(0,L.jsx)(`span`,{className:E6(`actorKind`),children:D6[i.actorKind]}),i.service===void 0?null:(0,L.jsx)(p3,{service:i.service,size:`compact`}),i.actor===void 0?null:(0,L.jsx)(`div`,{className:E6(`actor`),children:i.actor})]})]})},aoe={root:`rly_WorksetCard-module__root`,heading:`rly_WorksetCard-module__heading`,dimensions:`rly_WorksetCard-module__dimensions`,dimension:`rly_WorksetCard-module__dimension`,dimensionHeading:`rly_WorksetCard-module__dimensionHeading`,gaps:`rly_WorksetCard-module__gaps`,list:`rly_WorksetCard-module__list`,gapList:`rly_WorksetCard-module__gapList`,keyList:`rly_WorksetCard-module__keyList`,item:`rly_WorksetCard-module__item`,gap:`rly_WorksetCard-module__gap`,identity:`rly_WorksetCard-module__identity`,link:`rly_WorksetCard-module__link`,itemTitle:`rly_WorksetCard-module__itemTitle`,reference:`rly_WorksetCard-module__reference`,empty:`rly_WorksetCard-module__empty`,conceptLabel:`rly_WorksetCard-module__conceptLabel`,emptyLink:`rly_WorksetCard-module__emptyLink`,linkedWork:`rly_WorksetCard-module__linkedWork`},O6=e=>i1(aoe,e),k6=(e,t)=>{e!==void 0&&X(e,`${t} href`)},A6=(e,t,n)=>{let r=X(e,`${n} id`);if(t.has(r))throw Error(`${n} ids must be unique: ${r}`);return t.add(r),r},ooe=e=>{let t=new Set;for(let n of e){let e=A6(n.id,t,`WorksetCard Jira item`);X(n.key,`WorksetCard Jira key for ${e}`),X(n.title,`WorksetCard Jira title for ${e}`),X(n.state,`WorksetCard Jira state for ${e}`),k6(n.href,`WorksetCard Jira item ${e}`)}},soe=e=>{let t=new Set;for(let n of e){let e=A6(n.id,t,`WorksetCard pull request group`);X(n.title,`WorksetCard pull request title for ${e}`),X(n.reference,`WorksetCard pull request reference for ${e}`),X(n.state,`WorksetCard pull request state for ${e}`),k6(n.href,`WorksetCard pull request group ${e}`);for(let t of n.linkedJiraKeys)X(t,`WorksetCard linked Jira key for ${e}`)}},coe=e=>{let t=new Set;for(let n of e){let e=A6(n.id,t,`WorksetCard gap`);if(X(n.label,`WorksetCard gap label for ${e}`),X(n.reason,`WorksetCard gap reason for ${e}`),!Object.hasOwn(l3.service,n.service))throw Error(`WorksetCard gap service for ${e} must be supported`)}},loe=e=>{let t=new Set;for(let n of e){let e=A6(n.id,t,`WorksetCard pipeline`);X(n.title,`WorksetCard pipeline title for ${e}`),X(n.reference,`WorksetCard pipeline reference for ${e}`),X(n.state,`WorksetCard pipeline state for ${e}`),k6(n.href,`WorksetCard pipeline ${e}`)}},j6=({href:e,reference:t,title:n})=>{let r=(0,L.jsxs)(`span`,{className:O6(`identity`),children:[(0,L.jsx)(`span`,{className:O6(`itemTitle`),children:n}),(0,L.jsx)(`span`,{className:O6(`reference`),children:t})]});return e===void 0?r:(0,L.jsx)(ay,{className:O6(`link`),href:e,children:r})},uoe=({className:e,gapEmptyLabel:t=`No relationship gaps recorded.`,gaps:n,heading:r,jiraEmptyLabel:i=`No Jira work recorded.`,jiraItems:a,pipelineEmptyLabel:o=`No pipeline delivery recorded.`,pipelines:s,pullRequestEmptyLabel:c=`No pull request groups recorded.`,pullRequestGroups:l,...u})=>{let d=X(r,`WorksetCard heading`),f=X(i,`WorksetCard jiraEmptyLabel`),p=X(c,`WorksetCard pullRequestEmptyLabel`),m=X(t,`WorksetCard gapEmptyLabel`),h=X(o,`WorksetCard pipelineEmptyLabel`);ooe(a),soe(l),coe(n),loe(s);let g=`rly-workset-${(0,N.useId)()}`;return(0,L.jsxs)(`section`,{...u,"aria-labelledby":g,className:a1(O6(`root`),e),children:[(0,L.jsx)(`h2`,{className:O6(`heading`),id:g,children:d}),(0,L.jsxs)(`div`,{className:O6(`dimensions`),children:[(0,L.jsxs)(`section`,{className:O6(`dimension`),"data-rly-workset-dimension":`jira`,children:[(0,L.jsxs)(`div`,{className:O6(`dimensionHeading`),children:[(0,L.jsx)(p3,{service:`jira`,size:`compact`}),(0,L.jsx)(`h3`,{children:`Jira work`})]}),a.length===0?(0,L.jsx)(`p`,{className:O6(`empty`),children:f}):(0,L.jsx)(`ul`,{className:O6(`list`),children:a.map(e=>(0,L.jsxs)(`li`,{className:O6(`item`),"data-rly-workset-jira-id":e.id,children:[(0,L.jsx)(j6,{...e.href===void 0?{}:{href:e.href},reference:e.key,title:e.title}),(0,L.jsx)(H1,{label:e.state,size:`compact`,tone:e.tone}),e.owner===void 0?null:(0,L.jsx)(V4,{person:e.owner,size:`compact`})]},e.id))})]}),(0,L.jsxs)(`section`,{className:O6(`dimension`),"data-rly-workset-dimension":`pull-requests`,children:[(0,L.jsxs)(`div`,{className:O6(`dimensionHeading`),children:[(0,L.jsx)(p3,{service:`codecommit`,size:`compact`}),(0,L.jsx)(`h3`,{children:`Pull request groups`})]}),l.length===0?(0,L.jsx)(`p`,{className:O6(`empty`),children:p}):(0,L.jsx)(`ul`,{className:O6(`list`),children:l.map(e=>(0,L.jsxs)(`li`,{className:O6(`item`),"data-rly-workset-pr-id":e.id,children:[(0,L.jsx)(j6,{...e.href===void 0?{}:{href:e.href},reference:e.reference,title:e.title}),(0,L.jsx)(H1,{label:e.state,size:`compact`,tone:e.tone}),(0,L.jsxs)(`div`,{className:O6(`linkedWork`),children:[(0,L.jsx)(`span`,{className:O6(`conceptLabel`),children:`Linked Jira work`}),e.linkedJiraKeys.length===0?(0,L.jsx)(`span`,{className:O6(`emptyLink`),children:`No Jira links recorded.`}):(0,L.jsx)(`ul`,{className:O6(`keyList`),children:e.linkedJiraKeys.map((e,t)=>(0,L.jsx)(`li`,{"data-rly-linked-jira-key":e,children:e},`${e}-${t}`))})]}),e.author===void 0?null:(0,L.jsx)(V4,{person:e.author,size:`compact`})]},e.id))}),(0,L.jsxs)(`div`,{className:O6(`gaps`),children:[(0,L.jsx)(`h4`,{children:`Relationship gaps`}),n.length===0?(0,L.jsx)(`p`,{className:O6(`empty`),children:m}):(0,L.jsx)(`ul`,{className:O6(`gapList`),children:n.map(e=>(0,L.jsxs)(`li`,{className:O6(`gap`),"data-rly-workset-gap-id":e.id,children:[(0,L.jsx)(p3,{service:e.service,size:`compact`}),(0,L.jsx)(`strong`,{children:e.label}),(0,L.jsx)(`span`,{children:e.reason})]},e.id))})]})]}),(0,L.jsxs)(`section`,{className:O6(`dimension`),"data-rly-workset-dimension":`pipelines`,children:[(0,L.jsxs)(`div`,{className:O6(`dimensionHeading`),children:[(0,L.jsx)(p3,{service:`codepipeline`,size:`compact`}),(0,L.jsx)(`h3`,{children:`Pipeline delivery`})]}),s.length===0?(0,L.jsx)(`p`,{className:O6(`empty`),children:h}):(0,L.jsx)(`ul`,{className:O6(`list`),children:s.map(e=>(0,L.jsxs)(`li`,{className:O6(`item`),"data-rly-workset-pipeline-id":e.id,children:[(0,L.jsx)(j6,{...e.href===void 0?{}:{href:e.href},reference:e.reference,title:e.title}),(0,L.jsx)(H1,{label:e.state,size:`compact`,tone:e.tone}),e.operator===void 0?null:(0,L.jsx)(V4,{person:e.operator,size:`compact`}),e.approver===void 0?null:(0,L.jsx)(V4,{person:e.approver,size:`compact`}),(0,L.jsx)(T6,{heading:`${e.reference} stages`,size:`compact`,stages:e.stages})]},e.id))})]})]})]})},doe=s({AgentContextButton:()=>d4,AgentDrawer:()=>g4,AgentJob:()=>S4,AgentProposal:()=>D4,AgentThread:()=>P4,CollaboratorGroup:()=>$4,EntityShell:()=>x3,EntityTable:()=>A3,EvidenceStamp:()=>N3,FreshnessStamp:()=>o3,GovernedActionReview:()=>L3,PeopleStrip:()=>J4,Person:()=>V4,RLY_COLLABORATOR_GROUP_DEFAULT_VARIANTS:()=>Q4,RLY_COLLABORATOR_GROUP_VARIANTS:()=>Z4,RLY_ENTITY_TABLE_DEFAULT_VARIANTS:()=>T3,RLY_ENTITY_TABLE_VARIANTS:()=>w3,RLY_FRESHNESS_STAMP_DEFAULT_VARIANTS:()=>r3,RLY_FRESHNESS_STAMP_VARIANTS:()=>n3,RLY_PEOPLE_STRIP_DEFAULT_VARIANTS:()=>G4,RLY_PEOPLE_STRIP_VARIANTS:()=>W4,RLY_PERSON_DEFAULT_VARIANTS:()=>R4,RLY_PERSON_VARIANTS:()=>L4,RLY_RELATIONSHIP_DIRECTION_PRESENTATION:()=>z3,RLY_RELATIONSHIP_LIFECYCLE_PRESENTATION:()=>R3,RLY_RELEASE_RELAY_DEFAULT_VARIANTS:()=>Kae,RLY_RELEASE_RELAY_SYMBOLS:()=>v6,RLY_RELEASE_RELAY_VARIANTS:()=>y6,RLY_SERVICE_MARK_DEFAULT_VARIANTS:()=>u3,RLY_SERVICE_MARK_VARIANTS:()=>l3,RLY_STAGE_RAIL_DEFAULT_VARIANTS:()=>eoe,RLY_STAGE_RAIL_VARIANTS:()=>w6,RLY_VERDICT_VARIANTS:()=>g3,RelationshipChain:()=>q3,RelationshipTable:()=>fae,RelayDock:()=>Vae,ReleasePreview:()=>Xae,ReleaseRelay:()=>b6,ReleaseRow:()=>Qae,ServiceMark:()=>p3,StageRail:()=>T6,TimelineRow:()=>ioe,Verdict:()=>v3,WorksetCard:()=>uoe});function foe(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var poe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,moe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hoe={};function M6(e,t){return((t||hoe).jsx?moe:poe).test(e)}var goe=/[ \t\n\f\r]/g;function _oe(e){return typeof e==`object`?e.type===`text`&&N6(e.value):N6(e)}function N6(e){return e.replace(goe,``)===``}var P6=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};P6.prototype.normal={},P6.prototype.property={},P6.prototype.space=void 0;function F6(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new P6(n,r,t)}function I6(e){return e.toLowerCase()}var L6=class{constructor(e,t){this.attribute=t,this.property=e}};L6.prototype.attribute=``,L6.prototype.booleanish=!1,L6.prototype.boolean=!1,L6.prototype.commaOrSpaceSeparated=!1,L6.prototype.commaSeparated=!1,L6.prototype.defined=!1,L6.prototype.mustUseProperty=!1,L6.prototype.number=!1,L6.prototype.overloadedBoolean=!1,L6.prototype.property=``,L6.prototype.spaceSeparated=!1,L6.prototype.space=void 0;var R6=s({boolean:()=>z6,booleanish:()=>B6,commaOrSpaceSeparated:()=>W6,commaSeparated:()=>U6,number:()=>Z,overloadedBoolean:()=>V6,spaceSeparated:()=>H6}),voe=0,z6=G6(),B6=G6(),V6=G6(),Z=G6(),H6=G6(),U6=G6(),W6=G6();function G6(){return 2**++voe}var K6=Object.keys(R6),q6=class extends L6{constructor(e,t,n,r){let i=-1;if(super(e,t),J6(this,`space`,r),typeof n==`number`)for(;++i<K6.length;){let e=K6[i];J6(this,K6[i],(n&R6[e])===R6[e])}}};q6.prototype.defined=!0;function J6(e,t,n){n&&(e[t]=n)}function Y6(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new q6(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[I6(r)]=r,n[I6(a.attribute)]=r}return new P6(t,n,e.space)}var X6=Y6({properties:{ariaActiveDescendant:null,ariaAtomic:B6,ariaAutoComplete:null,ariaBusy:B6,ariaChecked:B6,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:H6,ariaCurrent:null,ariaDescribedBy:H6,ariaDetails:null,ariaDisabled:B6,ariaDropEffect:H6,ariaErrorMessage:null,ariaExpanded:B6,ariaFlowTo:H6,ariaGrabbed:B6,ariaHasPopup:null,ariaHidden:B6,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:H6,ariaLevel:Z,ariaLive:null,ariaModal:B6,ariaMultiLine:B6,ariaMultiSelectable:B6,ariaOrientation:null,ariaOwns:H6,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:B6,ariaReadOnly:B6,ariaRelevant:null,ariaRequired:B6,ariaRoleDescription:H6,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:B6,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Z6(e,t){return t in e?e[t]:t}function Q6(e,t){return Z6(e,t.toLowerCase())}var yoe=Y6({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:U6,acceptCharset:H6,accessKey:H6,action:null,allow:null,allowFullScreen:z6,allowPaymentRequest:z6,allowUserMedia:z6,alpha:z6,alt:null,as:null,async:z6,autoCapitalize:null,autoComplete:H6,autoFocus:z6,autoPlay:z6,blocking:H6,capture:null,charSet:null,checked:z6,cite:null,className:H6,closedBy:null,colorSpace:null,cols:Z,colSpan:Z,command:null,commandFor:null,content:null,contentEditable:B6,controls:z6,controlsList:H6,coords:Z|U6,crossOrigin:null,data:null,dateTime:null,decoding:null,default:z6,defer:z6,dir:null,dirName:null,disabled:z6,download:V6,draggable:B6,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:z6,formTarget:null,headers:H6,height:Z,hidden:V6,high:Z,href:null,hrefLang:null,htmlFor:H6,httpEquiv:H6,id:null,imageSizes:null,imageSrcSet:null,inert:z6,inputMode:null,integrity:null,is:null,isMap:z6,itemId:null,itemProp:H6,itemRef:H6,itemScope:z6,itemType:H6,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:z6,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:z6,muted:z6,name:null,nonce:null,noModule:z6,noValidate:z6,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:z6,optimum:Z,pattern:null,ping:H6,placeholder:null,playsInline:z6,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:z6,referrerPolicy:null,rel:H6,required:z6,reversed:z6,rows:Z,rowSpan:Z,sandbox:H6,scope:null,scoped:z6,seamless:z6,selected:z6,shadowRootClonable:z6,shadowRootCustomElementRegistry:z6,shadowRootDelegatesFocus:z6,shadowRootMode:null,shadowRootSerializable:z6,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:B6,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:z6,useMap:null,value:B6,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:H6,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:z6,declare:z6,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:z6,noHref:z6,noShade:z6,noWrap:z6,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:B6,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:z6,disablePictureInPicture:z6,disableRemotePlayback:z6,exportParts:U6,part:H6,prefix:null,property:null,results:Z,security:null,unselectable:null},space:`html`,transform:Q6}),boe=Y6({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`,maskType:`mask-type`,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:W6,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:H6,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:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:z6,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,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:U6,g2:U6,glyphName:U6,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:W6,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,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:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:H6,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:W6,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:W6,rev:W6,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:W6,requiredFeatures:W6,requiredFonts:W6,requiredFormats:W6,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:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:W6,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:W6,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:W6,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Z6}),$6=Y6({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()}}),e8=Y6({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Q6}),t8=Y6({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),xoe={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`},Soe=/[A-Z]/g,n8=/-[a-z]/g,Coe=/^data[-\w.:]+$/i;function woe(e,t){let n=I6(t),r=t,i=L6;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Coe.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(n8,Eoe);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!n8.test(e)){let n=e.replace(Soe,Toe);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=q6}return new i(r,t)}function Toe(e){return`-`+e.toLowerCase()}function Eoe(e){return e.charAt(1).toUpperCase()}var Doe=F6([X6,yoe,$6,e8,t8],`html`),r8=F6([X6,boe,$6,e8,t8],`svg`);function Ooe(e){return e.join(` `).trim()}var koe=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
61
+ `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),Aoe=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(koe());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),joe=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Moe=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Aoe()),r=joe();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),i8=o8(`end`),a8=o8(`start`);function o8(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function s8(e){let t=a8(e),n=i8(e);if(t&&n)return{start:t,end:n}}function c8(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?u8(e.position):`start`in e||`end`in e?u8(e):`line`in e||`column`in e?l8(e):``}function l8(e){return d8(e&&e.line)+`:`+d8(e&&e.column)}function u8(e){return l8(e&&e.start)+`-`+l8(e&&e.end)}function d8(e){return e&&typeof e==`number`?e:1}var f8=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=c8(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};f8.prototype.file=``,f8.prototype.name=``,f8.prototype.reason=``,f8.prototype.message=``,f8.prototype.stack=``,f8.prototype.column=void 0,f8.prototype.line=void 0,f8.prototype.ancestors=void 0,f8.prototype.cause=void 0,f8.prototype.fatal=void 0,f8.prototype.place=void 0,f8.prototype.ruleId=void 0,f8.prototype.source=void 0;var Noe=l(Moe(),1),p8={}.hasOwnProperty,Poe=new Map,Foe=/[A-Z]/g,Ioe=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Loe=new Set([`td`,`th`]),m8=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Roe(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Koe(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Goe(n,t.jsx,t.jsxs)}let 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`?r8:Doe,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=h8(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function h8(e,t,n){if(t.type===`element`)return zoe(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Boe(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Hoe(e,t,n);if(t.type===`mdxjsEsm`)return Voe(e,t);if(t.type===`root`)return Uoe(e,t,n);if(t.type===`text`)return Woe(e,t)}function zoe(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=r8,e.schema=i),e.ancestors.push(t);let a=y8(e,t.tagName,!1),o=qoe(e,t),s=v8(e,t);return Ioe.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!_oe(e)})),g8(e,o,a,t),_8(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Boe(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}b8(e,t.position)}function Voe(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);b8(e,t.position)}function Hoe(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=r8,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:y8(e,t.name,!0),o=Joe(e,t),s=v8(e,t);return g8(e,o,a,t),_8(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Uoe(e,t,n){let r={};return _8(r,v8(e,t)),e.create(t,e.Fragment,r,n)}function Woe(e,t){return t.value}function g8(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function _8(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Goe(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Koe(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=a8(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function qoe(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&p8.call(t.properties,i)){let a=Yoe(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Loe.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Joe(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else b8(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else b8(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function v8(e,t){let n=[],r=-1,i=e.passKeys?new Map:Poe;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=h8(e,a,o);s!==void 0&&n.push(s)}return n}function Yoe(e,t,n){let r=woe(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?foe(n):Ooe(n)),r.property===`style`){let t=typeof n==`object`?n:Xoe(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Zoe(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?xoe[r.property]||r.property:r.attribute,n]}}function Xoe(e,t){try{return(0,Noe.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new f8("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=m8+`#cannot-parse-style-attribute`,r}}function y8(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=M6(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=M6(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return p8.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);b8(e)}function b8(e,t){let n=new f8("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=m8+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Zoe(e){let t={},n;for(n in e)p8.call(e,n)&&(t[Qoe(n)]=e[n]);return t}function Qoe(e){let t=e.replace(Foe,$oe);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function $oe(e){return`-`+e.toLowerCase()}var x8={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`]},ese={};function S8(e,t){let n=t||ese;return C8(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function C8(e,t,n){if(tse(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 w8(e.children,t,n)}return Array.isArray(e)?w8(e,t,n):``}function w8(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=C8(e[i],t,n);return r.join(``)}function tse(e){return!!(e&&typeof e==`object`)}var T8=document.createElement(`i`);function E8(e){let t=`&`+e+`;`;T8.innerHTML=t;let n=T8.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function D8(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function O8(e,t){return e.length>0?(D8(e,e.length,0,t),e):t}var k8={}.hasOwnProperty;function A8(e){let t={},n=-1;for(;++n<e.length;)nse(t,e[n]);return t}function nse(e,t){let n;for(n in t){let r=(k8.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){k8.call(r,a)||(r[a]=[]);let e=i[a];rse(r[a],Array.isArray(e)?e:e?[e]:[])}}}function rse(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);D8(e,0,0,r)}function j8(e,t){let 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 M8(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var N8=H8(/[A-Za-z]/),P8=H8(/[\dA-Za-z]/),ise=H8(/[#-'*+\--9=?A-Z^-~]/);function F8(e){return e!==null&&(e<32||e===127)}var I8=H8(/\d/),ase=H8(/[\dA-Fa-f]/),ose=H8(/[!-/:-@[-`{-~]/);function L8(e){return e!==null&&e<-2}function R8(e){return e!==null&&(e<0||e===32)}function z8(e){return e===-2||e===-1||e===32}var B8=H8(/\p{P}|\p{S}/u),V8=H8(/\s/);function H8(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function U8(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&P8(e.charCodeAt(n+1))&&P8(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function W8(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return z8(r)?(e.enter(n),s(r)):t(r)}function s(r){return z8(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var sse={tokenize:cse};function cse(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),W8(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return L8(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var lse={tokenize:use},G8={tokenize:dse};function use(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return D8(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(G8,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(G8,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return L8(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;D8(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function dse(e,t,n){return W8(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function K8(e){if(e===null||R8(e)||V8(e))return 1;if(B8(e))return 2}function q8(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var J8={name:`attention`,resolveAll:fse,tokenize:pse};function fse(e,t){let n=-1,r,i,a,o,s,c,l,u;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;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Y8(d,-c),Y8(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=O8(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=O8(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=O8(l,q8(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=O8(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=O8(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,D8(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function pse(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=K8(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=K8(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Y8(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var mse={name:`autolink`,tokenize:hse};function hse(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return N8(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||P8(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||P8(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||F8(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):ise(t)?(e.consume(t),l):n(t)}function u(e){return P8(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||P8(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var X8={partial:!0,tokenize:gse};function gse(e,t,n){return r;function r(t){return z8(t)?W8(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||L8(e)?t(e):n(e)}}var Z8={continuation:{tokenize:vse},exit:yse,name:`blockQuote`,tokenize:_se};function _se(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return z8(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function vse(e,t,n){let r=this;return i;function i(t){return z8(t)?W8(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Z8,t,n)(r)}}function yse(e){e.exit(`blockQuote`)}var Q8={name:`characterEscape`,tokenize:bse};function bse(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return ose(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var $8={name:`characterReference`,tokenize:xse};function xse(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=P8,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=ase,u):(e.enter(`characterReferenceValue`),a=7,o=I8,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===P8&&!E8(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var e5={partial:!0,tokenize:Cse},t5={concrete:!0,name:`codeFenced`,tokenize:Sse};function Sse(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),z8(t)?W8(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||L8(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(e5,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||L8(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):z8(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),W8(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||L8(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||L8(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&z8(t)?W8(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||L8(t)?e.check(e5,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||L8(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),z8(t)?W8(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),z8(t)?W8(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||L8(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Cse(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var n5={name:`codeIndented`,tokenize:Tse},wse={partial:!0,tokenize:Ese};function Tse(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),W8(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):L8(t)?e.attempt(wse,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||L8(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Ese(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):L8(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):W8(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):L8(e)?i(e):n(e)}}var Dse={name:`codeText`,previous:kse,resolve:Ose,tokenize:Ase};function Ose(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 kse(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Ase(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):L8(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||L8(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var jse=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&r5(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),r5(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),r5(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);r5(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);r5(this.left,t.reverse())}}}};function r5(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 i5(e){let t={},n=-1,r,i,a,o,s,c,l,u=new jse(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Mse(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return D8(e,0,1/0,u.slice(0)),!l}function Mse(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Nse={resolve:Fse,tokenize:Ise},Pse={partial:!0,tokenize:Lse};function Fse(e){return i5(e),e}function Ise(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):L8(t)?e.check(Pse,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Lse(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),W8(e,a,`linePrefix`)}function a(i){if(i===null||L8(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function a5(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||F8(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||L8(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||R8(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||F8(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function o5(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):L8(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||L8(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!z8(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function s5(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):L8(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),W8(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||L8(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Rse(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return z8(r)?(e.enter(n),s(r)):t(r)}function s(r){return z8(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function c5(e,t){let n;return r;function r(i){return L8(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):z8(i)?Rse(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var zse={name:`definition`,tokenize:Vse},Bse={partial:!0,tokenize:Hse};function Vse(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return o5.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=M8(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return R8(t)?c5(e,l)(t):l(t)}function l(t){return a5(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Bse,d,d)(t)}function d(t){return z8(t)?W8(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||L8(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Hse(e,t,n){return r;function r(t){return R8(t)?c5(e,i)(t):n(t)}function i(t){return s5(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return z8(t)?W8(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||L8(e)?t(e):n(e)}}var Use={name:`hardBreakEscape`,tokenize:Wse};function Wse(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return L8(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Gse={name:`headingAtx`,resolve:Kse,tokenize:qse};function Kse(e,t){let n=e.length-2,r=3,i,a;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},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},D8(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function qse(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||R8(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||L8(n)?(e.exit(`atxHeading`),t(n)):z8(n)?W8(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||R8(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Jse=`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`.split(`.`),l5=[`pre`,`script`,`style`,`textarea`],Yse={concrete:!0,name:`htmlFlow`,resolveTo:Qse,tokenize:$se},Xse={partial:!0,tokenize:tce},Zse={partial:!0,tokenize:ece};function Qse(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 $se(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:F):N8(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):N8(a)?(e.consume(a),i=4,r.interrupt?t:F):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:F):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return N8(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||R8(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&l5.includes(l)?(i=1,r.interrupt?t(s):O(s)):Jse.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||P8(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return z8(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||N8(t)?(e.consume(t),b):z8(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||P8(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):z8(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):z8(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||L8(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||R8(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||z8(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||L8(t)?O(t):z8(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),te):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),P):L8(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Xse,ne,k)(t)):t===null||L8(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Zse,A,ne)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||L8(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),F):O(t)}function N(t){return t===47?(e.consume(t),o=``,ee):O(t)}function ee(t){if(t===62){let n=o.toLowerCase();return l5.includes(n)?(e.consume(t),te):O(t)}return N8(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ee):O(t)}function P(t){return t===93?(e.consume(t),F):O(t)}function F(t){return t===62?(e.consume(t),te):t===45&&i===2?(e.consume(t),F):O(t)}function te(t){return t===null||L8(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),te)}function ne(n){return e.exit(`htmlFlow`),t(n)}}function ece(e,t,n){let r=this;return i;function i(t){return L8(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function tce(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(X8,t,n)}}var nce={name:`htmlText`,tokenize:rce};function rce(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):N8(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):N8(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):L8(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):L8(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):L8(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):L8(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return N8(t)?(e.consume(t),S):n(t)}function S(t){return t===45||P8(t)?(e.consume(t),S):C(t)}function C(t){return L8(t)?(o=C,N(t)):z8(t)?(e.consume(t),C):M(t)}function w(t){return t===45||P8(t)?(e.consume(t),w):t===47||t===62||R8(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||N8(t)?(e.consume(t),E):L8(t)?(o=T,N(t)):z8(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||P8(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):L8(t)?(o=D,N(t)):z8(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):L8(t)?(o=O,N(t)):z8(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):L8(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||R8(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||R8(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return z8(t)?W8(e,P,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):P(t)}function P(t){return e.enter(`htmlTextData`),o(t)}}var u5={name:`labelEnd`,resolveAll:sce,resolveTo:cce,tokenize:lce},ice={tokenize:uce},ace={tokenize:dce},oce={tokenize:fce};function sce(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&D8(e,0,e.length,n),e}function cce(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=O8(s,e.slice(a+1,a+r+3)),s=O8(s,[[`enter`,u,t]]),s=O8(s,q8(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=O8(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=O8(s,e.slice(o+1)),s=O8(s,[[`exit`,c,t]]),D8(e,a,e.length,s),e}function lce(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(M8(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(ice,u,o?u:d)(t):t===91?e.attempt(ace,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(oce,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function uce(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return R8(t)?c5(e,a)(t):a(t)}function a(t){return t===41?u(t):a5(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return R8(t)?c5(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?s5(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return R8(t)?c5(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function dce(e,t,n){let r=this;return i;function i(t){return o5.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(M8(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function fce(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var pce={name:`labelStartImage`,resolveAll:u5.resolveAll,tokenize:mce};function mce(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var hce={name:`labelStartLink`,resolveAll:u5.resolveAll,tokenize:gce};function gce(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var d5={name:`lineEnding`,tokenize:_ce};function _ce(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),W8(e,t,`linePrefix`)}}var f5={name:`thematicBreak`,tokenize:vce};function vce(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||L8(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),z8(t)?W8(e,s,`whitespace`)(t):s(t))}}var p5={continuation:{tokenize:Sce},exit:wce,name:`list`,tokenize:xce},yce={partial:!0,tokenize:Tce},bce={partial:!0,tokenize:Cce};function xce(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:I8(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(f5,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return I8(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(X8,r.interrupt?n:u,e.attempt(yce,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return z8(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Sce(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(X8,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,W8(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!z8(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(bce,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,W8(e,e.attempt(p5,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Cce(e,t,n){let r=this;return W8(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function wce(e){e.exit(this.containerState.type)}function Tce(e,t,n){let r=this;return W8(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!z8(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var m5={name:`setextUnderline`,resolveTo:Ece,tokenize:Dce};function Ece(e,t){let n=e.length,r,i,a;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),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Dce(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),z8(t)?W8(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||L8(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Oce={tokenize:kce};function kce(e){let t=this,n=e.attempt(X8,r,e.attempt(this.parser.constructs.flowInitial,i,W8(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Nse,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Ace={resolveAll:g5()},jce=h5(`string`),Mce=h5(`text`);function h5(e){return{resolveAll:g5(e===`text`?Nce:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function g5(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Nce(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Pce=s({attentionMarkers:()=>Hce,contentInitial:()=>Ice,disable:()=>Uce,document:()=>Fce,flow:()=>Rce,flowInitial:()=>Lce,insideSpan:()=>Vce,string:()=>zce,text:()=>Bce}),Fce={42:p5,43:p5,45:p5,48:p5,49:p5,50:p5,51:p5,52:p5,53:p5,54:p5,55:p5,56:p5,57:p5,62:Z8},Ice={91:zse},Lce={[-2]:n5,[-1]:n5,32:n5},Rce={35:Gse,42:f5,45:[m5,f5],60:Yse,61:m5,95:f5,96:t5,126:t5},zce={38:$8,92:Q8},Bce={[-5]:d5,[-4]:d5,[-3]:d5,33:pce,38:$8,42:J8,60:[mse,nce],91:hce,92:[Use,Q8],93:u5,95:J8,96:Dse},Vce={null:[J8,Ace]},Hce={null:[42,95]},Uce={null:[]};function Wce(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=O8(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=q8(a,l.events,l),l.events):[]}function f(e,t){return Kce(p(e),t)}function p(e){return Gce(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){L8(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&D8(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Gce(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Kce(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
62
+ `;break;case-3:o=`\r
63
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function qce(e){let t={constructs:A8([Pce,...(e||{}).extensions||[]]),content:n(sse),defined:[],document:n(lse),flow:n(Oce),lazy:{},string:n(jce),text:n(Mce)};return t;function n(e){return n;function n(n){return Wce(t,e,n)}}}function Jce(e){for(;!i5(e););return e}var _5=/[\0\t\n\r]/g;function Yce(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(_5.lastIndex=u,c=_5.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Xce=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Zce(e){return e.replace(Xce,Qce)}function Qce(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return j8(n.slice(t?2:1),t?16:10)}return E8(n)||e}var v5={}.hasOwnProperty;function $ce(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),ele(n)(Jce(qce(n).document().write(Yce()(e,t,!0))))}function ele(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ve),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(I),blockQuote:a(ue),characterEscape:T,characterReference:T,codeFenced:a(de),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(de,o),codeText:a(fe,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(pe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(me),hardBreakEscape:a(he),hardBreakTrailing:a(he),htmlFlow:a(ge,o),htmlFlowData:T,htmlText:a(ge,o),htmlTextData:T,image:a(_e),label:o,link:a(ve),listItem:a(be),listItemValue:f,listOrdered:a(ye,d),listUnordered:a(ye),paragraph:a(xe),reference:re,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(I),strong:a(Se),thematicBreak:a(we)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:le,autolinkProtocol:ce,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:oe,characterReference:se,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:P,labelText:ee,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ie,resourceDestinationString:F,resourceTitleString:te,resource:ne,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};b5(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];v5.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||x5).call(a,void 0,e[0])}for(r.position={start:y5(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:y5(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:y5(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||x5).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+c8({start:e.start,end:e.end})+`): it’s not open`);n.position.end=y5(e.end)}function u(){return S8(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=M8(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Ce(),n.position={start:y5(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=y5(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=y5(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ee(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Zce(t),n.identifier=M8(t).toLowerCase()}function P(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=M8(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ae(e){this.data.characterReferenceType=e.type}function oe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=j8(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=E8(t);let i=this.stack[this.stack.length-1];i.value+=r}function se(e){let t=this.stack.pop();t.position.end=y5(e.end)}function ce(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function le(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ue(){return{type:`blockquote`,children:[]}}function de(){return{type:`code`,lang:null,meta:null,value:``}}function fe(){return{type:`inlineCode`,value:``}}function pe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function me(){return{type:`emphasis`,children:[]}}function I(){return{type:`heading`,depth:0,children:[]}}function he(){return{type:`break`}}function ge(){return{type:`html`,value:``}}function _e(){return{type:`image`,title:null,url:``,alt:null}}function ve(){return{type:`link`,title:null,url:``,children:[]}}function ye(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function be(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function xe(){return{type:`paragraph`,children:[]}}function Se(){return{type:`strong`,children:[]}}function Ce(){return{type:`text`,value:``}}function we(){return{type:`thematicBreak`}}}function y5(e){return{line:e.line,column:e.column,offset:e.offset}}function b5(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?b5(e,r):tle(e,r)}}function tle(e,t){let n;for(n in t)if(v5.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function x5(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+c8({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+c8({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+c8({start:t.start,end:t.end})+`) is still open`)}function nle(e){let t=this;t.parser=n;function n(n){return $ce(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function rle(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function ile(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
64
+ `}]}function ale(e,t){let n=t.value?t.value+`
65
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function ole(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sle(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cle(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=U8(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function lle(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ule(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function S5(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function dle(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return S5(e,t);let i={src:U8(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function fle(e,t){let n={src:U8(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function ple(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function mle(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return S5(e,t);let i={href:U8(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function hle(e,t){let n={href:U8(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gle(e,t,n){let r=e.all(t),i=n?_le(n):C5(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
66
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
67
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function _le(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=C5(n[r])}return t}function C5(e){return e.spread??e.children.length>1}function vle(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function yle(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ble(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function xle(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sle(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=a8(t.children[1]),o=i8(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Cle(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function wle(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var w5=9,T5=32;function Tle(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(E5(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(E5(t.slice(i),i>0,!1)),a.join(``)}function E5(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===w5||t===T5;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===w5||t===T5;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Ele(e,t){let n={type:`text`,value:Tle(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Dle(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Ole={blockquote:rle,break:ile,code:ale,delete:ole,emphasis:sle,footnoteReference:cle,heading:lle,html:ule,imageReference:dle,image:fle,inlineCode:ple,linkReference:mle,link:hle,listItem:gle,list:vle,paragraph:yle,root:ble,strong:xle,table:Sle,tableCell:wle,tableRow:Cle,text:Ele,thematicBreak:Dle,toml:D5,yaml:D5,definition:D5,footnoteDefinition:D5};function D5(){}var O5=typeof self==`object`?self:globalThis,k5=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new O5[e](t)},kle=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof O5[e]==`function`?k5(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(k5(a,o),i)};return r},A5=e=>kle(new Map,e)(0),j5=``,{toString:Ale}={},{keys:jle}=Object,M5=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Ale.call(e).slice(8,-1);switch(n){case`Array`:return[1,j5];case`Object`:return[2,j5];case`Date`:return[3,j5];case`RegExp`:return[4,j5];case`Map`:return[5,j5];case`Set`:return[6,j5];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},N5=([e,t])=>e===0&&(t===`function`||t===`symbol`),Mle=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=M5(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of jle(r))(e||!N5(M5(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,isNaN(r.getTime())?j5:r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(N5(M5(n))||N5(M5(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!N5(M5(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},P5=(e,{json:t,lossy:n}={})=>{let r=[];return Mle(!(t||n),!!t,new Map,r)(e),r},F5=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?A5(P5(e,t)):structuredClone(e):(e,t)=>A5(P5(e,t));function Nle(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Ple(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Fle(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Nle,r=e.options.footnoteBackLabel||Ple,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=U8(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...F5(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
68
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
69
+ `}]}}var I5=(function(e){if(e==null)return zle;if(typeof e==`function`)return L5(e);if(typeof e==`object`)return Array.isArray(e)?Ile(e):Lle(e);if(typeof e==`string`)return Rle(e);throw Error(`Expected function, string, or object as test`)});function Ile(e){let t=[],n=-1;for(;++n<e.length;)t[n]=I5(e[n]);return L5(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Lle(e){let t=e;return L5(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Rle(e){return L5(t);function t(t){return t&&t.type===e}}function L5(e){return t;function t(t,n,r){return!!(Ble(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function zle(){return!0}function Ble(e){return typeof e==`object`&&!!e&&`type`in e}function Vle(e){return e}var R5=[];function z5(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=I5(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+Vle(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=R5,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Hle(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Hle(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?R5:[e]}function B5(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),z5(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var V5={}.hasOwnProperty,Ule={};function Wle(e,t){let n=t||Ule,r=new Map,i=new Map,a={all:s,applyData:Kle,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Ole,...n.handlers},one:o,options:n,patch:Gle,wrap:Jle};return B5(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(V5.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=F5(n);return r.children=a.all(e),r}return F5(e)}return(a.options.unknownHandler||qle)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=H5(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=H5(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Gle(e,t){e.position&&(t.position=s8(e))}function Kle(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,F5(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function qle(e,t){let n=t.data||{},r=`value`in t&&!(V5.call(n,`hProperties`)||V5.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 Jle(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
70
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
71
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
72
+ `}),n}function H5(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function U5(e,t){let n=Wle(e,t),r=n.one(e,void 0),i=Fle(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
73
+ `},i)),a}function Yle(e,t){return e&&`run`in e?async function(n,r){let i=U5(n,{file:r,...t});await e.run(i,r)}:function(n,r){return U5(n,{file:r,...e||t})}}function W5(e){if(e)throw e}var Xle=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function G5(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Zle(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Qle(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Qle(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var K5={basename:$le,dirname:eue,extname:tue,join:nue,sep:`/`};function $le(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);q5(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function eue(e){if(q5(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||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function tue(e){q5(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function nue(...e){let t=-1,n;for(;++t<e.length;)q5(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:rue(n)}function rue(e){q5(e);let t=e.codePointAt(0)===47,n=iue(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function iue(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function q5(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var aue={cwd:oue};function oue(){return`/`}function J5(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function sue(e){if(typeof e==`string`)e=new URL(e);else if(!J5(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return cue(e)}function cue(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Y5=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],X5=class{constructor(e){let t;t=e?J5(e)?{path:e}:typeof e==`string`||lue(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:aue.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Y5.length;){let e=Y5[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Y5.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?K5.basename(this.path):void 0}set basename(e){Q5(e,`basename`),Z5(e,`basename`),this.path=K5.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?K5.dirname(this.path):void 0}set dirname(e){$5(this.basename,`dirname`),this.path=K5.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?K5.extname(this.path):void 0}set extname(e){if(Z5(e,`extname`),$5(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=K5.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){J5(e)&&(e=sue(e)),Q5(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?K5.basename(this.path,this.extname):void 0}set stem(e){Q5(e,`stem`),Z5(e,`stem`),this.path=K5.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new f8(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Z5(e,t){if(e&&e.includes(K5.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+K5.sep+"`")}function Q5(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function $5(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function lue(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var uue=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),e7=l(Xle(),1),due={}.hasOwnProperty,fue=new class e extends uue{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=Zle()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,e7.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(r7(`data`,this.frozen),this.namespace[e]=t,this):due.call(this.namespace,e)&&this.namespace[e]||void 0:e?(r7(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=o7(e),n=this.parser||this.Parser;return t7(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),t7(`process`,this.parser||this.Parser),n7(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=o7(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);mue(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),t7(`processSync`,this.parser||this.Parser),n7(`processSync`,this.compiler||this.Compiler),this.process(e,r),a7(`processSync`,`process`,t),n;function r(e,r){t=!0,W5(e),n=r}}run(e,t,n){i7(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=o7(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),a7(`runSync`,`run`,n),r;function i(e,t){W5(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=o7(t),r=this.compiler||this.Compiler;return n7(`stringify`,r),i7(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(r7(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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(e.plugins),e.settings&&(r.settings=(0,e7.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];G5(o)&&G5(r)&&(r=(0,e7.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function t7(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function n7(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function r7(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function i7(e){if(!G5(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function a7(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function o7(e){return pue(e)?e:new X5(e)}function pue(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function mue(e){return typeof e==`string`||hue(e)}function hue(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var s7=[],c7={allowDangerousHtml:!0},gue=/^(https?|ircs?|mailto|xmpp)$/i,_ue=[{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 l7(e){let t=vue(e),n=yue(e);return bue(t.runSync(t.parse(n),n),e)}function vue(e){let t=e.rehypePlugins||s7,n=e.remarkPlugins||s7,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...c7}:c7;return fue().use(nle).use(n).use(Yle,r).use(t)}function yue(e){let t=e.children||``,n=new X5;return typeof t==`string`?n.value=t:``+t,n}function bue(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||xue;for(let e of _ue)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return B5(e,l),Roe(e,{Fragment:L.Fragment,components:i,ignoreInvalidStyle:!0,jsx:L.jsx,jsxs:L.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in x8)if(Object.hasOwn(x8,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=x8[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function xue(e){let 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||gue.test(e.slice(0,t))?e:``}var u7=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],d7={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...u7,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...u7],h2:[[`className`,`sr-only`]],img:[...u7,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...u7,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...u7],table:[...u7],ul:[...u7,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},f7={}.hasOwnProperty;function Sue(e,t){let n={type:`root`,children:[]},r=p7({schema:t?{...d7,...t}:d7,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function p7(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return Cue(e,n);case`doctype`:return wue(e,n);case`element`:return Tue(e,n);case`root`:return Eue(e,n);case`text`:return Due(e,n)}}}function Cue(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return _7(r,t),r}}function wue(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return _7(e,t),e}}function Tue(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=m7(e,t.children),i=Oue(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&f7.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return _7(o,t),o}function Eue(e,t){let n={type:`root`,children:m7(e,t.children)};return _7(n,t),n}function Due(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return _7(n,t),n}function m7(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=p7(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function Oue(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&f7.call(r,n)?r[n]:void 0,o=r&&f7.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(f7.call(s,l)){let t=s[l],n=h7(e,v7(a,l),l,t);n??=h7(e,v7(o,l),l,t),n!=null&&(c[l]=n)}if(i&&f7.call(i,n)){let e=i[n];for(l in e)f7.call(e,l)&&!f7.call(c,l)&&(c[l]=e[l])}return c}function h7(e,t,n,r){return t?Array.isArray(r)?kue(e,t,n,r):g7(e,t,n,r):void 0}function kue(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=g7(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function g7(e,t,n,r){if((typeof r==`boolean`||typeof r==`number`||typeof r==`string`)&&Aue(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Aue(e,t,n){let r=e.schema.protocols&&f7.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function _7(e,t){let n=s8(t);t.data&&(e.data=F5(t.data)),n&&(e.position=n)}function v7(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function y7(e){return function(t){return Sue(t,e)}}function b7(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function jue(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Mue(e,t,n){let r=I5((n||{}).ignore||[]),i=Nue(t),a=-1;for(;++a<i.length;)z5(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Nue(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Pue(e[0]),Fue(e[1])])}return t}function Pue(e){return typeof e==`string`?new RegExp(jue(e),`g`):e}function Fue(e){return typeof e==`function`?e:function(){return e}}var x7=`phrasing`,S7=[`autolink`,`link`,`image`,`label`];function Iue(){return{transforms:[Uue],enter:{literalAutolink:Rue,literalAutolinkEmail:C7,literalAutolinkHttp:C7,literalAutolinkWww:C7},exit:{literalAutolink:Hue,literalAutolinkEmail:Vue,literalAutolinkHttp:zue,literalAutolinkWww:Bue}}}function Lue(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:x7,notInConstruct:S7},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:x7,notInConstruct:S7},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:x7,notInConstruct:S7}]}}function Rue(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function C7(e){this.config.enter.autolinkProtocol.call(this,e)}function zue(e){this.config.exit.autolinkProtocol.call(this,e)}function Bue(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Vue(e){this.config.exit.autolinkEmail.call(this,e)}function Hue(e){this.exit(e)}function Uue(e){Mue(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Wue],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Gue]],{ignore:[`link`,`linkReference`]})}function Wue(e,t,n,r,i){let a=``;if(!w7(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Kue(n)))return!1;let o=que(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Gue(e,t,n,r){return!w7(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Kue(e){let 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 que(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=b7(e,`(`),a=b7(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function w7(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||V8(n)||B8(n))&&(!t||n!==47)}T7.peek=nde;function Jue(){this.buffer()}function Yue(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Xue(){this.buffer()}function Zue(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Que(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=M8(this.sliceSerialize(e)).toLowerCase(),n.label=t}function $ue(e){this.exit(e)}function ede(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=M8(this.sliceSerialize(e)).toLowerCase(),n.label=t}function tde(e){this.exit(e)}function nde(){return`[`}function T7(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function rde(){return{enter:{gfmFootnoteCallString:Jue,gfmFootnoteCall:Yue,gfmFootnoteDefinitionLabelString:Xue,gfmFootnoteDefinition:Zue},exit:{gfmFootnoteCallString:Que,gfmFootnoteCall:$ue,gfmFootnoteDefinitionLabelString:ede,gfmFootnoteDefinition:tde}}}function ide(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:T7},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
74
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?E7:ade))),s(),o}}function ade(e,t,n){return t===0?e:E7(e,t,n)}function E7(e,t,n){return(n?``:` `)+e}var ode=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];D7.peek=dde;function sde(){return{canContainEols:[`delete`],enter:{strikethrough:lde},exit:{strikethrough:ude}}}function cde(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:ode}],handlers:{delete:D7}}}function lde(e){this.enter({type:`delete`,children:[]},e)}function ude(e){this.exit(e)}function D7(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function dde(){return`~`}function fde(e){return e.length}function pde(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||fde,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=mde(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=O7(r[d]);else{let e=O7(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
75
+ `)}function mde(e){return e==null?``:String(e)}function O7(e){let 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 hde(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),gde);return i(),o}function gde(e,t,n){return`>`+(n?``:` `)+e}function _de(e,t){return k7(e,t.inConstruct,!0)&&!k7(e,t.notInConstruct,!1)}function k7(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 A7(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
76
+ `&&_de(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
77
+ `}function vde(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function yde(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 bde(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function xde(e,t,n,r){let i=bde(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(yde(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Sde);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(vde(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
78
+ `,encode:["`"],...s.current()})),t()}return u+=s.move(`
79
+ `),a&&(u+=s.move(a+`
80
+ `)),u+=s.move(c),l(),u}function Sde(e,t,n){return(n?``:` `)+e}function j7(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Cde(e,t,n,r){let i=j7(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
81
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function wde(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function M7(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function N7(e,t,n){let r=K8(e),i=K8(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}}P7.peek=Tde;function P7(e,t,n,r){let i=wde(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=N7(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=M7(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=N7(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+M7(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Tde(e,t,n){return n.options.emphasis||`*`}function Ede(e,t){let n=!1;return B5(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&S8(e)&&(t.options.setext||n))}function Dde(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Ede(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
82
+ `,after:`
83
+ `});return r(),t(),o+`
84
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
85
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
86
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=M7(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}F7.peek=Ode;function F7(e){return e.value||``}function Ode(){return`<`}I7.peek=kde;function I7(e,t,n,r){let i=j7(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function kde(){return`!`}L7.peek=Ade;function L7(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Ade(){return`!`}R7.peek=jde;function R7(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function jde(){return"`"}function z7(e,t){let n=S8(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))}B7.peek=Mde;function B7(e,t,n,r){let i=j7(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(z7(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Mde(e,t,n){return z7(e,n)?`<`:`[`}V7.peek=Nde;function V7(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Nde(){return`[`}function H7(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Pde(e){let t=H7(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Fde(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function U7(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Ide(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Fde(n):H7(n),s=e.ordered?o===`.`?`)`:`.`:Pde(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.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&&(c=!0),U7(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Lde(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Rde(e,t,n,r){let i=Lde(n),a=n.bulletCurrent||H7(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function zde(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Bde=I5([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Vde(e,t,n,r){return(e.children.some(function(e){return Bde(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Hde(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}W7.peek=Ude;function W7(e,t,n,r){let i=Hde(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=N7(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=M7(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=N7(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+M7(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Ude(e,t,n){return n.options.strong||`*`}function Wde(e,t,n,r){return n.safe(e.value,r)}function Gde(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Kde(e,t,n){let r=(U7(n)+(n.options.ruleSpaces?` `:``)).repeat(Gde(n));return n.options.ruleSpaces?r.slice(0,-1):r}var G7={blockquote:hde,break:A7,code:xde,definition:Cde,emphasis:P7,hardBreak:A7,heading:Dde,html:F7,image:I7,imageReference:L7,inlineCode:R7,link:B7,linkReference:V7,list:Ide,listItem:Rde,paragraph:zde,root:Vde,strong:W7,text:Wde,thematicBreak:Kde};function qde(){return{enter:{table:Jde,tableData:q7,tableHeader:q7,tableRow:Xde},exit:{codeText:Zde,table:Yde,tableData:K7,tableHeader:K7,tableRow:K7}}}function Jde(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Yde(e){this.exit(e),this.data.inTable=void 0}function Xde(e){this.enter({type:`tableRow`,children:[]},e)}function K7(e){this.exit(e)}function q7(e){this.enter({type:`tableCell`,children:[]},e)}function Zde(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Qde));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Qde(e,t){return t===`|`?t:e}function $de(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
87
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
88
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return pde(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=G7.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function efe(){return{exit:{taskListCheckValueChecked:J7,taskListCheckValueUnchecked:J7,paragraph:nfe}}}function tfe(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:rfe}}}function J7(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function nfe(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function rfe(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=G7.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function ife(){return[Iue(),rde(),sde(),qde(),efe()]}function afe(e){return{extensions:[Lue(),ide(e),cde(),$de(e),tfe()]}}var ofe={tokenize:ffe,partial:!0},Y7={tokenize:pfe,partial:!0},X7={tokenize:mfe,partial:!0},Z7={tokenize:hfe,partial:!0},sfe={tokenize:gfe,partial:!0},Q7={name:`wwwAutolink`,tokenize:ufe,previous:r9},$7={name:`protocolAutolink`,tokenize:dfe,previous:i9},e9={name:`emailAutolink`,tokenize:lfe,previous:a9},t9={};function cfe(){return{text:t9}}for(var n9=48;n9<123;)t9[n9]=e9,n9++,n9===58?n9=65:n9===91&&(n9=97);t9[43]=e9,t9[45]=e9,t9[46]=e9,t9[95]=e9,t9[72]=[e9,$7],t9[104]=[e9,$7],t9[87]=[e9,Q7],t9[119]=[e9,Q7];function lfe(e,t,n){let r=this,i,a;return o;function o(t){return!o9(t)||!a9.call(r,r.previous)||s9(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return o9(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(sfe,u,l)(t):t===45||t===95||P8(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&N8(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function ufe(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!r9.call(r,r.previous)||s9(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(ofe,e.attempt(Y7,e.attempt(X7,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function dfe(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&i9.call(r,r.previous)&&!s9(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(N8(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||F8(t)||R8(t)||V8(t)||B8(t)?n(t):e.attempt(Y7,e.attempt(X7,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function ffe(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function pfe(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Z7,c,s)(t):t===null||R8(t)||V8(t)||t!==45&&B8(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function mfe(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Z7,t,a)(o):o===null||R8(o)||V8(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function hfe(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),a):o===93?(e.consume(o),i):o===60||o===null||R8(o)||V8(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||R8(e)||V8(e)?t(e):r(e)}function a(e){return N8(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):N8(t)?(e.consume(t),o):n(t)}}function gfe(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return P8(e)?n(e):t(e)}}function r9(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||R8(e)}function i9(e){return!N8(e)}function a9(e){return!(e===47||o9(e))}function o9(e){return e===43||e===45||e===46||e===95||P8(e)}function s9(e){let t=e.length,n=!1;for(;t--;){let 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}var _fe={tokenize:Tfe,partial:!0};function vfe(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Sfe,continuation:{tokenize:Cfe},exit:wfe}},text:{91:{name:`gfmFootnoteCall`,tokenize:xfe},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:yfe,resolveTo:bfe}}}}function yfe(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=M8(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function bfe(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`;let 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++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function xfe(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||R8(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(M8(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return R8(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Sfe(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||R8(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=M8(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return R8(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),W8(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Cfe(e,t,n){return e.check(X8,t,e.attempt(_fe,t,n))}function wfe(e){e.exit(`gfmFootnoteDefinition`)}function Tfe(e,t,n){let r=this;return W8(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Efe(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&D8(o,o.length,0,q8(s,e.slice(r+1,n),t)),D8(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),D8(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=K8(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=K8(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Dfe=class{constructor(){this.map=[]}add(e,t,n){Ofe(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Ofe(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 kfe(e,t){let n=!1,r=[];for(;t<e.length;){let 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`){let e=r.length-1;r[e]=r[e]===`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 Afe(){return{flow:{null:{name:`table`,tokenize:jfe,resolveAll:Mfe}}}}function jfe(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):L8(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):z8(t)?W8(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||R8(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,z8(t)?W8(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return z8(t)?W8(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||L8(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return z8(t)?W8(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||L8(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||L8(n)?(e.exit(`tableRow`),t(n)):z8(n)?W8(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||R8(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Mfe(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Dfe;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(l9(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=c9(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=c9(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=c9(f,t,o,i,n,d)):(o[0]=o[1],d=c9(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&l9(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=kfe(t.events,n))}return e}function c9(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},u9(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=u9(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=u9(t.events,n[2]),a=u9(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},u9(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function l9(e,t,n,r,i){let a=[],o=u9(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function u9(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Nfe={name:`tasklistCheck`,tokenize:Ffe};function Pfe(){return{text:{91:Nfe}}}function Ffe(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return R8(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return L8(r)?t(r):z8(r)?e.check({tokenize:Ife},t,n)(r):n(r)}}function Ife(e,t,n){return W8(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Lfe(e){return A8([cfe(),vfe(),Efe(e),Afe(),Pfe()])}var Rfe={};function d9(e){let t=this,n=e||Rfe,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Lfe(n)),a.push(ife()),o.push(afe(n))}function f9(e){let t=e.refreshGeneration??0,n={pullRequestId:e.pullRequestId,repositoryName:e.repositoryName,profile:e.profile,region:e.region};return KV((0,N.useMemo)(()=>jJ.query(`prs`,`comments`,{query:n,serializationKey:`${e.profile}:${e.region}:${e.repositoryName}:${e.pullRequestId}:${String(t)}`,timeToLive:`60 seconds`}),[e.pullRequestId,e.repositoryName,e.profile,e.region,t]))}function p9(e){let[t,n]=(0,N.useState)(!1),[r,i]=(0,N.useState)(!1),a=()=>localStorage.getItem(e)===`true`,o=(0,N.useCallback)(()=>!a()&&(n(!0),!0),[e]),s=(0,N.useCallback)(()=>{r&&localStorage.setItem(e,`true`),n(!1)},[r,e]);return{cancel:(0,N.useCallback)(()=>{n(!1)},[]),dismiss:s,dontRemind:r,isDismissed:a,setDontRemind:i,show:o,visible:t}}function zfe({items:e,onRefresh:t,permissionPrompt:n,stableKey:r}){let[i,a]=(0,N.useState)(null),[o,s]=(0,N.useState)(null),c=(0,N.useRef)(!1),l=(0,N.useRef)(null),u=(0,N.useRef)(t);u.current=t;let d=(0,N.useCallback)(()=>u.current(),[]);return(0,N.useEffect)(()=>{n?c.current=!0:c.current&&(c.current=!1,d())},[n,d]),(0,N.useEffect)(()=>{if((i||o)&&!n){let e=500,t=Date.now(),n=()=>{if(Date.now()-t>3e4){a(null),s(null);return}d(),e=Math.min(e*1.5,3e3),l.current=setTimeout(n,e)};return l.current=setTimeout(n,e),()=>{l.current&&clearTimeout(l.current)}}},[i,o,n,d]),(0,N.useEffect)(()=>{a(null),s(null),l.current&&=(clearTimeout(l.current),null)},[r]),{pendingAdd:i,pendingRemove:o,add:e=>a(e),remove:e=>s(e)}}var Bfe=`cc1_`,m9=vB.check(iB(),aB(180)),Vfe=K({accountId:m9,pullRequestId:nK,repositoryName:rK,region:aK}).check(Bz(e=>zP(JSON.stringify([e.accountId,e.pullRequestId,e.repositoryName,e.region])).length+4<=1024?void 0:`Pull-request coordinate token exceeds the router parameter limit`));hz([m9,m9,m9,m9]),K({accountId:m9,pullRequestId:m9,repositoryName:m9,region:m9}),gw(`PullRequestCoordinateDecodeError`);var Hfe=e=>{let t=YR(Vfe)(e);return`${Bfe}${zP(JSON.stringify([t.accountId,t.pullRequestId,t.repositoryName,t.region]))}`},h9=(e,t)=>{let n=t.filePath??e.filePath;return n===void 0||t.lineNumber===void 0||!Number.isInteger(t.lineNumber)||t.lineNumber<1||e.beforeCommitId===void 0||e.afterCommitId===void 0||e.relativeFileVersion===void 0?null:{afterCommitId:e.afterCommitId,author:t.author,beforeCommitId:e.beforeCommitId,commentId:t.id,content:t.content,filePath:n,lineNumber:t.lineNumber,side:e.relativeFileVersion===`AFTER`?`after`:`before`}},Ufe=(e,t)=>e.beforeCommitId===t.baseCommit&&e.afterCommitId===t.headCommit,Wfe=(e,t)=>e.find(e=>t.side===`after`?e.status!==`deleted`&&e.path===t.filePath:e.status!==`added`&&(e.previousPath??e.path)===t.filePath)?.index,g9=e=>{let t=e.match(/^\w+\(([^)]+)\):/);if(t?.[1]!==void 0)return t[1];let n=e.match(/^([A-Z]+-\d+):/);return n?.[1]===void 0?null:n[1]},Q={page:`_page_1ww23_1`,hero:`_hero_1ww23_2`,decisionWorkspace:`_decisionWorkspace_1ww23_3`,actionRail:`_actionRail_1ww23_4`,actionGroup:`_actionGroup_1ww23_5`,revisionCard:`_revisionCard_1ww23_6`,revisionHeading:`_revisionHeading_1ww23_7`,branchPair:`_branchPair_1ww23_8`,reviewWorkspace:`_reviewWorkspace_1ww23_9`,contentColumn:`_contentColumn_1ww23_10`,contentSection:`_contentSection_1ww23_11`,sectionHeading:`_sectionHeading_1ww23_12`,evidenceColumn:`_evidenceColumn_1ww23_13`,approvalSection:`_approvalSection_1ww23_14`,approverCard:`_approverCard_1ww23_15`,approverBody:`_approverBody_1ww23_16`,approverPicker:`_approverPicker_1ww23_17`,scoreBreakdown:`_scoreBreakdown_1ww23_18`,scoreCategories:`_scoreCategories_1ww23_19`,scoreCategoryCopy:`_scoreCategoryCopy_1ww23_20`,comments:`_comments_1ww23_21`,commentLocations:`_commentLocations_1ww23_22`,commentLocation:`_commentLocation_1ww23_22`,commentBody:`_commentBody_1ww23_24`,loadingState:`_loadingState_1ww23_37`,backNavigation:`_backNavigation_1ww23_44`,eyebrow:`_eyebrow_1ww23_53`,heroMeta:`_heroMeta_1ww23_54`,actionHeading:`_actionHeading_1ww23_55`,approverHeading:`_approverHeading_1ww23_56`,approverTitle:`_approverTitle_1ww23_57`,approverSuggestions:`_approverSuggestions_1ww23_58`,suggestedApprovers:`_suggestedApprovers_1ww23_59`,approverMembers:`_approverMembers_1ww23_60`,commentMeta:`_commentMeta_1ww23_61`,scoreSummary:`_scoreSummary_1ww23_62`,factStates:`_factStates_1ww23_64`,title:`_title_1ww23_76`,textLink:`_textLink_1ww23_89`,codeLink:`_codeLink_1ww23_90`,stateLink:`_stateLink_1ww23_104`,disclosureTrigger:`_disclosureTrigger_1ww23_105`,iconAction:`_iconAction_1ww23_106`,suggestionChoice:`_suggestionChoice_1ww23_107`,suggestedApprover:`_suggestedApprover_1ww23_59`,removeApprover:`_removeApprover_1ww23_109`,approverInput:`_approverInput_1ww23_110`,verdict:`_verdict_1ww23_123`,actionButton:`_actionButton_1ww23_146`,facts:`_facts_1ww23_201`,commentPath:`_commentPath_1ww23_202`,description:`_description_1ww23_286`,markdown:`_markdown_1ww23_287`,disclosure:`_disclosure_1ww23_105`,disclosureIcon:`_disclosureIcon_1ww23_352`,disclosureContent:`_disclosureContent_1ww23_363`,approverPickerActions:`_approverPickerActions_1ww23_413`,approverField:`_approverField_1ww23_420`,approverMember:`_approverMember_1ww23_60`,scoreTrack:`_scoreTrack_1ww23_514`,scoreFill:`_scoreFill_1ww23_522`,scoreCategory:`_scoreCategory_1ww23_20`,scoreDelta:`_scoreDelta_1ww23_561`,comment:`_comment_1ww23_21`,commentReply:`_commentReply_1ww23_598`,commentJump:`_commentJump_1ww23_633`},Gfe=(0,N.lazy)(()=>Ti(()=>import(`./pr-review-workspace-B7GX-PRi.js`).then(e=>({default:e.PullRequestReviewWorkspace})),__vite__mapDeps([0,1]))),_9=e=>e.account.awsAccountId!==void 0&&e.account.awsAccountId.length>0?e.account.awsAccountId:e.account.profile,v9=(e,t)=>e.awsAccountId===_9(t)&&e.pullRequestId===String(t.id)&&e.repositoryName===String(t.repositoryName)&&e.region===String(t.account.region),Kfe=(e,t)=>e.status!==`stopped`&&e.status!==`stopping`&&e.status!==`error`&&v9(e,t),qfe=(e,t)=>e.status===`stopping`&&v9(e,t),Jfe=(e,t)=>(t.account.awsAccountId===void 0||t.account.awsAccountId.length===0)&&e.some(e=>/^\d{12}$/u.test(e.awsAccountId)&&e.awsAccountId!==t.account.profile&&e.status!==`stopped`&&e.status!==`error`&&e.pullRequestId===String(t.id)&&e.repositoryName===String(t.repositoryName)&&e.region===String(t.account.region)),y9=e=>e.account.awsAccountId===void 0||e.account.awsAccountId.length===0?e.account.profile:Hfe({accountId:e.account.awsAccountId,pullRequestId:e.id,repositoryName:e.repositoryName,region:e.account.region}),Yfe=(e,t,n,r)=>JSON.stringify([e??``,t??``,n??``,r??``]),Xfe=(e,t)=>{let n=e.filter(e=>xX(e,t));return{pullRequest:n.length===1?n[0]??null:null,ambiguous:n.length>1}},b9=e=>e===`green`?`positive`:e===`yellow`?`caution`:`critical`,Zfe=e=>e===`positive`?`positive`:e===`neutral`?`neutral`:`critical`,Qfe=e=>{let t=Vy(e)?e.message.trim():``;return t.length>0?t:`Try the refresh again.`},$fe=e=>{let t=zy(e,`tagName`)?e.tagName:void 0;return t===`INPUT`||t===`TEXTAREA`},epe=e=>{let 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`;let a=Math.floor(i/60);return a<24?`${n} · ${a}h ago`:`${n} · ${Math.floor(a/24)}d ago`},x9=e=>e.comments.length===0?0:Math.min(...e.comments.map(e=>new Date(e.root.creationDate).getTime())),S9=e=>1+e.replies.reduce((e,t)=>e+S9(t),0),C9=e=>e.root.deleted?0:1+e.replies.reduce((e,t)=>e+C9(t),0),w9=e=>[e.root.id,...e.replies.flatMap(w9)];function tpe({onCountChange:e,snapshot:t}){let n=(0,N.useRef)(``);return(0,N.useEffect)(()=>{let r=`${String(t.count)}:${t.commentIds.join(`\0`)}`;n.current!==r&&(n.current=r,e(t))}),null}function npe({score:e}){if(e===void 0)return null;let t=s4(e.total);return(0,L.jsx)(H1,{label:`Health ${e.total.toFixed(1)} / 10`,size:`compact`,tone:b9(t)})}function rpe({score:e}){if(e===void 0)return(0,L.jsx)(W0,{tone:`secondary`,variant:`meta`,children:`Waiting for comment count…`});let t=s4(e.total);return(0,L.jsxs)(`div`,{className:Q.scoreBreakdown,children:[(0,L.jsxs)(`div`,{className:Q.scoreSummary,children:[(0,L.jsx)(`strong`,{"data-tone":b9(t),children:e.total.toFixed(1)}),(0,L.jsx)(`span`,{children:`/ 10`}),(0,L.jsx)(`div`,{"aria-label":`Health score ${e.total.toFixed(1)} out of 10`,"aria-valuemax":10,"aria-valuemin":0,"aria-valuenow":e.total,className:Q.scoreTrack,role:`progressbar`,children:(0,L.jsx)(`div`,{className:Q.scoreFill,"data-tone":b9(t),style:{width:`${e.total*10}%`}})})]}),(0,L.jsx)(`ul`,{className:Q.scoreCategories,children:e.categories.map(e=>(0,L.jsxs)(`li`,{className:Q.scoreCategory,children:[(0,L.jsx)(`span`,{className:Q.scoreDelta,"data-direction":e.value>0?`up`:e.value<0?`down`:`flat`,children:e.value>0?`+${e.value}`:e.value}),(0,L.jsxs)(`div`,{className:Q.scoreCategoryCopy,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(W0,{as:`strong`,variant:`label`,children:e.label}),(0,L.jsx)(H1,{label:e.statusLabel,size:`compact`,tone:Zfe(e.status)})]}),(0,L.jsx)(W0,{tone:`secondary`,variant:`meta`,children:e.description})]})]},e.label))})]})}function T9({depth:e,location:t,navigation:n,onNavigateToDiff:r,thread:i,visible:a}){let o=e===0?h9(t,i.root):null,s=n?.destination===`comment`&&n.target.commentId===i.root.id,c=(0,N.useRef)(null);return(0,N.useEffect)(()=>{s&&a&&c.current!==null&&(c.current.scrollIntoView({behavior:`smooth`,block:`center`}),c.current.focus({preventScroll:!0}))},[s,a]),i.root.deleted?null:(0,L.jsxs)(`article`,{className:e>0?Q.commentReply:Q.comment,"data-active":s?`true`:void 0,ref:c,tabIndex:s?-1:void 0,children:[(0,L.jsxs)(`div`,{className:Q.commentBody,children:[(0,L.jsxs)(`div`,{className:Q.commentMeta,children:[(0,L.jsx)(`strong`,{children:i.root.author}),(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,L.jsx)(`time`,{dateTime:i.root.creationDate,children:epe(i.root.creationDate)}),o===null?null:(0,L.jsxs)(`button`,{className:Q.commentJump,onClick:()=>r(o),type:`button`,children:[(0,L.jsx)(k_,{"aria-hidden":`true`}),` View in diff`]})]}),(0,L.jsx)(`div`,{className:`${Q.markdown??``} prose prose-sm dark:prose-invert max-w-none break-words [&_a]:text-primary [&_img]:inline [&_img]:h-5 [&_img]:w-auto`,children:(0,L.jsx)(l7,{remarkPlugins:[d9],rehypePlugins:[y7],children:i.root.content})})]}),i.replies.map(i=>(0,L.jsx)(T9,{depth:e+1,location:t,navigation:n,onNavigateToDiff:r,thread:i,visible:a},i.root.id))]})}function ipe({commentsRefreshGeneration:e,navigation:t,onCountChange:n,onNavigateToDiff:r,pr:i,visible:a}){return aV(f9({pullRequestId:i.id,repositoryName:i.repositoryName,profile:i.account.profile,region:i.account.region,refreshGeneration:e})).onInitialOrWaiting(()=>(0,L.jsx)(m0,{announce:`polite`,description:`Reading the current CodeCommit conversation.`,title:`Loading comments`,tone:`progress`})).onError(()=>(0,L.jsx)(m0,{announce:`polite`,description:`Refresh the pull request to try reading the conversation again.`,title:`Comments unavailable`,tone:`critical`})).onDefect(()=>(0,L.jsx)(m0,{announce:`polite`,description:`Refresh the pull request to try reading the conversation again.`,title:`Comments unavailable`,tone:`critical`})).onSuccess(e=>{let i=e.reduce((e,t)=>e+t.comments.reduce((e,t)=>e+S9(t),0),0),o=e.flatMap(e=>e.comments.flatMap(w9)).sort(),s=e.reduce((e,t)=>e+t.comments.reduce((e,t)=>e+C9(t),0),0);return(0,L.jsxs)(`div`,{className:Q.comments,children:[(0,L.jsx)(tpe,{onCountChange:n,snapshot:{commentIds:o,count:i}}),e.length===0&&(0,L.jsx)(W0,{tone:`secondary`,variant:`meta`,children:`No comments`}),s>0&&(0,L.jsx)(`div`,{className:Q.commentLocations,children:[...e].sort((e,t)=>x9(t)-x9(e)).map((n,i)=>(0,L.jsxs)(`section`,{className:Q.commentLocation,children:[n.filePath&&(0,L.jsx)(`code`,{className:Q.commentPath,children:n.filePath}),n.comments.map(e=>(0,L.jsx)(T9,{depth:0,location:n,navigation:t,onNavigateToDiff:r,thread:e,visible:a},e.root.id)),i<e.length-1&&(0,L.jsx)(z2,{className:`my-2`})]},n.filePath??`loc-${i}`))})]})}).render()}function ape({pr:e}){let t=f9({pullRequestId:e.id,repositoryName:e.repositoryName,profile:e.account.profile,region:e.account.region}),n=e.status===`MERGED`?e.lastModifiedDate.getTime()-e.creationDate.getTime():null,{timeToAddressFeedback:r,timeToFirstReview:i}=(0,N.useMemo)(()=>{if(!YB(t))return{timeToFirstReview:null,timeToAddressFeedback:null};let n=[];for(let e of t.value){let t=e=>{for(let r of e)n.push({author:r.root.author,date:new Date(r.root.creationDate)}),t(r.replies)};t(e.comments)}n.sort((e,t)=>e.date.getTime()-t.date.getTime());let r=n.find(t=>t.author!==e.author),i=r===void 0?null:r.date.getTime()-e.creationDate.getTime(),a=e.isApproved&&e.approvedBy.some(t=>t!==e.author)?e.lastModifiedDate.getTime()-e.creationDate.getTime():null,o=i!=null&&a!=null?Math.min(i,a):i??a,s=[];for(let t=0;t<n.length;t++)if(n[t].author!==e.author){let r=n.slice(t+1).find(t=>t.author===e.author);r!==void 0&&s.push(r.date.getTime()-n[t].date.getTime())}return{timeToFirstReview:o,timeToAddressFeedback:s.length>0?s.reduce((e,t)=>e+t,0)/s.length:null}},[t,e.author,e.creationDate,e.lastModifiedDate,e.isApproved,e.approvedBy]);return n==null&&i==null&&r==null?null:(0,L.jsxs)(L.Fragment,{children:[n!=null&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`dt`,{children:`Time to merge`}),(0,L.jsx)(`dd`,{children:X$(n)})]}),i!=null&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`dt`,{children:`Time to first review`}),(0,L.jsx)(`dd`,{children:X$(i)})]}),r!=null&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`dt`,{children:`Time to address feedback`}),(0,L.jsx)(`dd`,{children:X$(r)})]})]})}function E9({children:e,count:t,keepMounted:n=!1,openRequestKey:r,title:i}){let[a,o]=(0,N.useState)(!1);(0,N.useEffect)(()=>{r!==void 0&&o(!0)},[r]);let s=e(a);return(0,L.jsxs)(I0,{as:`section`,className:Q.disclosure,padding:`none`,form:`grouped`,children:[(0,L.jsxs)(`button`,{"aria-expanded":a,className:Q.disclosureTrigger,onClick:()=>o(!a),type:`button`,children:[(0,L.jsx)(d_,{"aria-hidden":`true`,className:Q.disclosureIcon,"data-open":a?`true`:`false`}),(0,L.jsx)(`span`,{children:i}),t!==void 0&&(0,L.jsx)(`small`,{children:t})]}),(a||n)&&(0,L.jsx)(`div`,{className:Q.disclosureContent,hidden:!a,children:s})]})}var ope=`Required approvers`,spe=`Optional approvers`,cpe=(e,t)=>{let n=e.trim();if(n.length!==0&&t.length!==0)return n.startsWith(`CodeCommitApprovers:`)?n:`CodeCommitApprovers:${t}:${n}`};function lpe({approvalRules:e,approvedBy:t,currentUser:n,knownUserArns:r,onRefresh:i,onSetApprovers:a,permissionPrompt:o,repoAccountId:s,required:c,ruleName:l,title:u}){let[d,f]=(0,N.useState)(!1),[p,m]=(0,N.useState)(``),h=e.flatMap(e=>e.poolMembers).join(`,`),g=zfe({items:e.flatMap(e=>e.poolMembers),stableKey:h,permissionPrompt:o,onRefresh:i}),{pendingAdd:_,pendingRemove:v}=g,y=(0,N.useMemo)(()=>{let t=new Set;for(let n of e)if(n.fromTemplate!==void 0||n.ruleName===l)for(let e of n.poolMembers)t.add(e);return[...t]},[e,l]),b=e.find(e=>e.ruleName===l&&e.fromTemplate===void 0),x=b?.poolMemberArns??[],S=b?.poolMembers??[],C=(0,N.useMemo)(()=>[...r.entries()].filter(([e])=>!y.includes(e)&&e!==_),[r,y,_]),w=s.length>0?`CodeCommitApprovers:${s}:`:``,T=e=>{let t=cpe(e,s);if(t===void 0)return;let n=/^CodeCommitApprovers:[^:]*:(.+)$/.exec(t);g.add(n===null?e:n[1]),a([...x,t]),f(!1)},E=e=>{g.remove(e);let t=S.indexOf(e);t>=0&&a(x.filter((e,n)=>n!==t))},D=e.length>0&&e.every(e=>e.satisfied);return(0,L.jsxs)(I0,{as:`section`,className:Q.approverCard,padding:`default`,form:`grouped`,tone:`secondary`,children:[(0,L.jsxs)(`header`,{className:Q.approverHeading,children:[(0,L.jsxs)(`div`,{className:Q.approverTitle,children:[(0,L.jsx)(W0,{as:`h3`,variant:`card-title`,children:u}),c&&e.length>0&&(D?(0,L.jsx)(H1,{label:`Satisfied`,size:`compact`,tone:`positive`}):(0,L.jsx)(H1,{label:`Pending`,size:`compact`,tone:`caution`}))]}),(0,L.jsx)(l2,{"aria-expanded":d,"aria-label":d?`Close ${u.toLocaleLowerCase()} editor`:`Add ${u.toLocaleLowerCase()}`,className:Q.iconAction,onClick:()=>f(!d),size:`icon-sm`,variant:`ghost`,children:(0,L.jsx)(kv,{className:`size-4`})})]}),(0,L.jsxs)(`div`,{className:Q.approverBody,children:[d&&(0,L.jsxs)(`div`,{className:Q.approverPicker,children:[C.length>0&&(0,L.jsx)(`div`,{className:Q.approverSuggestions,children:C.map(([e])=>(0,L.jsx)(l2,{className:Q.suggestionChoice,onClick:()=>m(e),size:`sm`,variant:`outline`,children:e},e))}),(0,L.jsxs)(`div`,{className:Q.approverPickerActions,children:[(0,L.jsx)(x0,{className:Q.approverField,description:`Enter a known user or the complete CodeCommit approver identity.`,label:`Approver`,size:`compact`,children:e=>(0,L.jsx)(`input`,{...e,className:`${e.className} ${Q.approverInput??``}`,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Enter`&&p.trim().length>0&&w.length>0&&(T(p.trim()),m(``))},placeholder:w.length>0?`${w}USERNAME`:`username`,value:p})}),(0,L.jsx)(L1,{disabled:p.trim().length===0||w.length===0,onClick:()=>{T(p.trim()),m(``)},size:`compact`,variant:`primary`,children:`Add`})]})]}),!d&&w.length>0&&C.length>0&&(0,L.jsxs)(`div`,{className:Q.suggestedApprovers,children:[(0,L.jsx)(W0,{tone:`tertiary`,variant:`meta`,children:`Suggested`}),C.slice(0,5).map(([e,t])=>(0,L.jsxs)(`button`,{className:Q.suggestedApprover,onClick:()=>T(t),type:`button`,children:[(0,L.jsx)(kv,{"aria-hidden":`true`}),e]},e))]}),(y.length>0||_)&&(0,L.jsxs)(`div`,{className:Q.approverMembers,children:[y.map(e=>{let r=t.includes(e),i=S.includes(e),a=e===v;return(0,L.jsxs)(s2,{className:`${Q.approverMember??``} ${r?`border-green-500/30 text-green-600 dark:text-green-400`:``} ${a?`opacity-50`:``}`,variant:e===n?`default`:r?`outline`:`secondary`,children:[a&&(0,L.jsx)(sv,{className:`size-3 animate-spin`}),!a&&r&&(0,L.jsx)(l_,{className:`size-3`}),e,i&&!a&&(0,L.jsx)(`button`,{"aria-label":`Remove ${e} from ${u.toLocaleLowerCase()}`,className:Q.removeApprover,onClick:()=>E(e),type:`button`,children:(0,L.jsx)(qv,{className:`size-3`})})]},e)}),_&&!y.includes(_)&&(0,L.jsxs)(s2,{className:`${Q.approverMember??``} opacity-70`,variant:`secondary`,children:[(0,L.jsx)(sv,{className:`size-3 animate-spin`}),_]})]})]})]})}var upe=e=>{switch(e.status){case`MERGED`:return{reason:`CodeCommit reports this pull request merged into ${e.destinationBranch}.`,tone:`positive`,verdict:`Merged.`};case`CLOSED`:return{reason:`CodeCommit reports this pull request closed without a merge.`,tone:`neutral`,verdict:`Closed.`};case`OPEN`:return e.isMergeable?e.isApproved?{reason:`CodeCommit reports a clean merge and the provider approval is satisfied.`,tone:`positive`,verdict:`Ready to merge.`}:{reason:`The branch is mergeable, but its provider approval is still pending.`,tone:`caution`,verdict:`Review pending.`}:{reason:`Resolve the conflict between ${e.sourceBranch} and ${e.destinationBranch} before merging.`,tone:`critical`,verdict:`Resolve conflicts.`}}},dpe=e=>e===`MERGED`?`positive`:e===`CLOSED`?`neutral`:`progress`;function fpe(){let{accountId:e,prId:t}=xr(),[n]=$i(),r=KV(hY),i=JV(rY),a=JV(rY,{mode:`promise`}),o=JV(iY),s=JV(aY),c=(0,N.useRef)(null),l=(0,N.useMemo)(()=>{if(t===void 0||t.length===0)return{pullRequest:null,ambiguous:!1};let i={pullRequestId:t};return e!==void 0&&(i={...i,accountId:e}),n.has(`region`)&&(i={...i,region:n.get(`region`)??``}),n.has(`repository`)&&(i={...i,repositoryName:n.get(`repository`)??``}),Xfe(r.pullRequests,i)},[e,t,n,r.pullRequests]),u=l.pullRequest,d=n.has(`repository`)!==n.has(`region`)||l.ambiguous,f=u===null?e:y9(u),p=u===null?n.get(`repository`)??void 0:String(u.repositoryName),m=u===null?n.get(`region`)??void 0:String(u.account.region),h=u?.account?.repoAccountId||``,g=(0,N.useMemo)(()=>{let e=new Map,t=t=>{t.length!==0&&t!==`*`&&(e.has(t)||e.set(t,h.length>0?`CodeCommitApprovers:${h}:${t}`:t))};for(let e of r.pullRequests){t(e.author);for(let n of e.approvedBy)t(n);for(let n of e.commentedBy)t(n);for(let n of e.approvalRules)for(let e of n.poolMembers)t(e)}return e},[r.pullRequests,h]);(0,N.useEffect)(()=>{if(d||u!==null||f===void 0||f.length===0||t===void 0||t.length===0)return;let e=`${f}:${t}:${p??``}:${m??``}`;c.current!==e&&(c.current=e,i({params:{awsAccountId:f,prId:nK.make(t)},query:p!==void 0&&m!==void 0?{repositoryName:p,region:aK.make(m)}:{}}))},[u,t,f,m,p,i,d]);let _=(0,N.useMemo)(()=>u===null?void 0:MS(o4(u,new Date)),[u]),v=_r(),y=JV(IJ),b=p9(oy.grantedDismissed),x=p9(oy.dockerDismissed),S=KV(WJ),C=JV(GJ),w=JV(KJ),T=u?.account.awsAccountId??u?.account.profile,E=u===null?void 0:{repositoryName:String(u.repositoryName),region:u.account.region},[D,O]=L2((0,N.useMemo)(()=>YB(S)&&T!==void 0&&T.length>0?S.value.some(e=>e.awsAccountId===T&&e.pullRequestId===t&&e.repositoryName===E?.repositoryName&&e.accountRegion===E?.region):!1,[S,T,t,E])),k=(0,N.useCallback)(()=>{if(T===void 0||T.length===0||u===null)return;let e={awsAccountId:T,pullRequestId:u.id,repositoryName:String(u.repositoryName),region:u.account.region};O(!D),D?w({payload:e}):C({payload:e})},[T,D,u,C,w]),[A,j]=(0,N.useState)(!1),[M,ee]=(0,N.useState)(0),[P,F]=(0,N.useState)(0),te=(0,N.useRef)(new Set),ne=Yfe(T??e,t,u===null?p:String(u.repositoryName),u===null?m:String(u.account.region)),[re,ie]=(0,N.useState)(null),ae=u?.commentCount,oe=ae===void 0||re?.identity!==ne?ae:Math.max(ae,re.count),[se,ce]=(0,N.useState)(null),le=se?.identity===ne?se.navigation:null,ue=(0,N.useRef)(0),de=(0,N.useCallback)((e,t)=>{ue.current+=1,ce({identity:ne,navigation:{destination:e,requestId:ue.current,target:t}})},[ne]),fe=(0,N.useRef)(null),pe=(0,N.useCallback)((e,n)=>{let r=`${T??``}:${t??``}:${e.revisionId}:${e.headCommit}`,i=fe.current!==r;fe.current=r,(n||i)&&ee(e=>e+1)},[T,t]);(0,N.useEffect)(()=>()=>{for(let e of te.current)window.clearTimeout(e);te.current.clear()},[]),(0,N.useEffect)(()=>{ae!==void 0&&ie(e=>e?.identity!==ne||ae===e.baseCount?e:e.pendingCommentIds.length>0?{...e,baseCount:ae,count:Math.max(e.count,ae)}:ae<e.count?{...e,baseCount:ae}:null)},[ae,ne]);let me=(0,N.useCallback)(e=>{let t=u?.commentCount??0;ie(n=>{if(n?.identity!==ne)return n;let r=new Set(e.commentIds),i=n.pendingCommentIds.filter(e=>!r.has(e)),a=e.count+i.length;return i.length===0&&a<=t?null:{...n,baseCount:t,count:Math.max(t,a),pendingCommentIds:i}})},[ne,u?.commentCount]),I=(0,N.useCallback)(e=>{let t=e.startsWith(`comment:`)?e.slice(8):e;ie(e=>{let n=u?.commentCount??0;return e?.identity===ne?{...e,baseCount:n,count:Math.max(e.count,n)+1,pendingCommentIds:[...e.pendingCommentIds,t]}:{baseCount:n,count:n+1,identity:ne,pendingCommentIds:[t]}}),F(e=>e+1);for(let e of[1500,5e3]){let t=window.setTimeout(()=>{te.current.delete(t),F(e=>e+1)},e);te.current.add(t)}},[ne,u?.commentCount]),he=(0,N.useCallback)(()=>{f!==void 0&&f.length!==0&&t!==void 0&&t.length!==0&&a({params:{awsAccountId:f,prId:nK.make(t)},query:p!==void 0&&m!==void 0?{repositoryName:p,region:aK.make(m)}:{}}).then(e=>pe(e,!1),()=>{})},[pe,t,f,m,p,a]),ge=(0,N.useCallback)(()=>{f===void 0||f.length===0||t===void 0||t.length===0||A||(j(!0),a({params:{awsAccountId:f,prId:nK.make(t)},query:p!==void 0&&m!==void 0?{repositoryName:p,region:aK.make(m)}:{}}).then(e=>{pe(e,!0),j(!1)},e=>{j(!1),QV.error(`Unable to refresh pull request`,{description:Qfe(e)})}))},[pe,A,t,f,m,p,a]),_e=u===null?``:u.link.length>0?u.link:`https://${u.account.region}.console.aws.amazon.com/codesuite/codecommit/repositories/${u.repositoryName}/pull-requests/${u.id}?region=${u.account.region}`,[ve,ye]=(0,N.useState)(!1),be=(0,N.useCallback)(()=>{_e.length!==0&&navigator.clipboard.writeText(_e).then(()=>{ye(!0),setTimeout(()=>ye(!1),2e3)},()=>{})},[_e]),xe=JV(QJ,{mode:`promiseExit`}),Se=(0,N.useMemo)(()=>u===null?void 0:r.sandboxes?.find(e=>Kfe(e,u)),[u,r.sandboxes]),Ce=(0,N.useMemo)(()=>u===null?void 0:r.sandboxes?.find(e=>qfe(e,u)),[u,r.sandboxes]),we=(0,N.useMemo)(()=>u!==null&&Jfe(r.sandboxes??[],u),[u,r.sandboxes]),[Te,Ee]=(0,N.useState)(!1);(0,N.useEffect)(()=>{Te&&Se!==void 0&&(Ee(!1),v(`/sandbox/${Se.id}`))},[Te,Se,v]);let De=(0,N.useCallback)(()=>{if(u===null)return;let e=_9(u),t=xe({payload:{pullRequestId:u.id,awsAccountId:e,repositoryName:u.repositoryName,sourceBranch:u.sourceBranch,profile:u.account.profile,region:u.account.region}});Ee(!0),t.then(e=>{if(Hte(e)){Ee(!1);let t=DS(IO(e),{onNone:()=>`Try again once the current sandbox has stopped.`,onSome:e=>Vy(e)?e.message:`Try again once the current sandbox has stopped.`});QV.error(`Unable to create sandbox`,{description:t})}})},[u,xe]),Oe=(0,N.useCallback)(()=>{if(u!==null){if(we){QV.info(`AWS account discovery is unavailable. Refresh before creating a sandbox.`);return}if(Ce!==void 0){QV.info(`Sandbox is still stopping. Try again once it has stopped.`);return}if(Se!==void 0){v(`/sandbox/${Se.id}`);return}x.show()||De()}},[u,we,Ce,Se,x,De,v]),ke=()=>{x.dismiss(),De()},Ae=(0,N.useCallback)(()=>{u!==null&&_e.length!==0&&y({payload:{profile:u.account.profile,link:_e}})},[_e,y,u]),je=(0,N.useCallback)(()=>{u!==null&&(b.show()||Ae())},[b,u,Ae]),Me=()=>{b.dismiss(),Ae()};if((0,N.useEffect)(()=>{let e=e=>{$fe(e.target)||(e.key===`Escape`?(e.preventDefault(),v(`/`)):(e.key===`Enter`||e.key===`o`)&&_e.length>0?je():e.key===`.`&&u!==null&&(e.preventDefault(),Oe()))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[_e,je,Oe,v,u]),d)return(0,L.jsx)(`section`,{className:Q.loadingState,children:(0,L.jsx)(m0,{announce:`assertive`,description:`Choose both repository and region to identify this pull request.`,title:`Pull request coordinates are ambiguous`,tone:`critical`})});if(u===null)return(0,L.jsx)(`section`,{className:Q.loadingState,children:(0,L.jsx)(m0,{announce:`polite`,description:`Reading the current provider facts and approval state from CodeCommit.`,title:`Loading pull request`,tone:`progress`})});let Ne=upe(u),Pe=g9(u.title),Fe=u.status===`OPEN`?`Open`:u.status===`MERGED`?`Merged`:`Closed`;return(0,L.jsxs)(`article`,{className:Q.page,children:[(0,L.jsx)(`nav`,{"aria-label":`Pull request navigation`,className:Q.backNavigation,children:(0,L.jsx)(L1,{leadingIcon:`arrow-left`,onClick:()=>v(`/`),size:`compact`,variant:`quiet`,children:`Back`})}),(0,L.jsxs)(`header`,{className:Q.hero,children:[(0,L.jsxs)(`div`,{className:Q.eyebrow,children:[(0,L.jsx)(p3,{service:`codecommit`,size:`compact`}),(0,L.jsxs)(W0,{tone:`secondary`,variant:`label`,children:[`Pull request `,u.id]})]}),(0,L.jsx)(W0,{as:`h1`,className:Q.title,variant:`page-title`,children:u.title}),(0,L.jsxs)(`div`,{className:Q.heroMeta,children:[(0,L.jsx)(Ji,{className:Q.textLink,to:`/?f=author:${encodeURIComponent(u.author)}`,children:u.author}),(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,L.jsx)(`time`,{dateTime:u.creationDate.toISOString(),children:G$(u.creationDate)}),u.fetchedAt&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,L.jsx)(`span`,{children:K$(u.fetchedAt,new Date,`Fetched`)})]})]})]}),(0,L.jsxs)(`section`,{"aria-label":`Pull request decision and actions`,className:Q.decisionWorkspace,children:[(0,L.jsx)(v3,{className:Q.verdict,reason:Ne.reason,tone:Ne.tone,verdict:Ne.verdict}),(0,L.jsxs)(`aside`,{className:Q.actionRail,children:[(0,L.jsxs)(`div`,{className:Q.actionHeading,children:[(0,L.jsx)(W0,{tone:`secondary`,variant:`label`,children:`Actions`}),(0,L.jsx)(H1,{label:Fe,size:`compact`,tone:dpe(u.status)})]}),(0,L.jsxs)(`div`,{className:Q.actionGroup,children:[(0,L.jsxs)(l2,{className:Q.actionButton,disabled:A,onClick:ge,size:`sm`,variant:`outline`,children:[(0,L.jsx)(Mv,{className:`size-3.5 ${A?`animate-spin`:``}`}),`Refresh`]}),(0,L.jsxs)(l2,{className:Q.actionButton,onClick:k,size:`sm`,variant:`outline`,children:[D?(0,L.jsx)(uee,{className:`size-3.5`}):(0,L.jsx)(r_,{className:`size-3.5`}),D?`Unsubscribe`:`Subscribe`]}),(0,L.jsxs)(l2,{className:Q.actionButton,onClick:Oe,size:`sm`,variant:`outline`,children:[(0,L.jsx)(k_,{className:`size-3.5`}),Ce===void 0?Se===void 0?`Sandbox`:`Open Sandbox`:`Stopping…`]}),(0,L.jsx)(L1,{className:Q.actionButton,leadingIcon:ve?`check`:`link`,onClick:be,size:`compact`,variant:`secondary`,children:ve?`Copied`:`Copy Link`}),(0,L.jsx)(L1,{className:Q.actionButton,leadingIcon:`external-link`,onClick:je,size:`compact`,variant:`primary`,children:`Open in Console`})]}),(0,L.jsx)(W0,{tone:`tertiary`,variant:`meta`,children:`Enter or O opens CodeCommit · . opens the sandbox · Esc returns to the list`})]})]}),(0,L.jsxs)(I0,{as:`section`,className:Q.revisionCard,padding:`spacious`,form:`grouped`,tone:`secondary`,children:[(0,L.jsxs)(`header`,{className:Q.revisionHeading,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(W0,{tone:`secondary`,variant:`label`,children:`Current revision`}),(0,L.jsx)(W0,{as:`h2`,variant:`section-title`,children:u.repositoryName})]}),(0,L.jsx)(npe,{score:_})]}),(0,L.jsxs)(`div`,{"aria-label":`${u.sourceBranch} into ${u.destinationBranch}`,className:Q.branchPair,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(W0,{tone:`secondary`,variant:`meta`,children:`Source`}),(0,L.jsx)(`code`,{children:u.sourceBranch})]}),(0,L.jsx)($g,{"aria-hidden":`true`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(W0,{tone:`secondary`,variant:`meta`,children:`Destination`}),(0,L.jsx)(`code`,{children:u.destinationBranch})]})]}),(0,L.jsxs)(`dl`,{className:Q.facts,children:[(0,L.jsx)(`dt`,{children:`Account`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(Ji,{className:Q.codeLink,to:`/?f=account:${encodeURIComponent(u.account.profile)}`,children:u.account.profile})}),(0,L.jsx)(`dt`,{children:`Repository`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(Ji,{className:Q.codeLink,to:`/?f=repo:${encodeURIComponent(u.repositoryName)}`,children:u.repositoryName})}),(0,L.jsx)(`dt`,{children:`Author`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(Ji,{className:Q.textLink,to:`/?f=author:${encodeURIComponent(u.author)}`,children:u.author})}),Pe&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`dt`,{children:`Scope`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(Ji,{className:Q.textLink,to:`/?f=scope:${encodeURIComponent(Pe)}`,children:Pe})})]}),(0,L.jsx)(`dt`,{children:`Status`}),(0,L.jsx)(`dd`,{className:Q.factStates,children:u.status===`MERGED`?(0,L.jsx)(Ji,{className:Q.stateLink,to:`/?f=status:merged`,children:(0,L.jsx)(H1,{label:`Merged`,size:`compact`,tone:`positive`})}):u.status===`CLOSED`?(0,L.jsx)(Ji,{className:Q.stateLink,to:`/?f=status:closed`,children:(0,L.jsx)(H1,{label:`Closed`,size:`compact`,tone:`neutral`})}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Ji,{className:Q.stateLink,to:`/?f=status:${u.isApproved?`approved`:`pending`}`,children:(0,L.jsx)(H1,{label:u.isApproved?`Approved`:`Pending approval`,size:`compact`,tone:u.isApproved?`positive`:`caution`})}),(0,L.jsx)(Ji,{className:Q.stateLink,to:`/?f=status:${u.isMergeable?`mergeable`:`conflicts`}`,children:(0,L.jsx)(H1,{label:u.isMergeable?`Mergeable`:`Conflict`,size:`compact`,tone:u.isMergeable?`positive`:`critical`})})]})}),(0,L.jsx)(`dt`,{children:`Pull request ID`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(`code`,{children:u.id})}),(0,L.jsx)(`dt`,{children:`Last activity`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(`time`,{dateTime:u.lastModifiedDate.toISOString(),children:G$(u.lastModifiedDate)})}),(0,L.jsx)(ape,{pr:u})]})]}),(0,L.jsx)(N.Suspense,{fallback:(0,L.jsx)(m0,{announce:`polite`,description:`Preparing the exact-revision review workbench.`,title:`Loading diff tools`,tone:`progress`}),children:(0,L.jsx)(Gfe,{accountId:y9(u),commentsRefreshGeneration:P,commentNavigation:le,onFindingPosted:I,onNavigateToComment:e=>de(`comment`,e),pullRequest:u,refreshGeneration:M})}),(0,L.jsxs)(`div`,{className:Q.reviewWorkspace,children:[(0,L.jsxs)(`section`,{"aria-label":`Pull request narrative and comments`,className:Q.contentColumn,children:[u.description&&(0,L.jsxs)(I0,{as:`section`,className:Q.contentSection,padding:`spacious`,form:`grouped`,children:[(0,L.jsxs)(`header`,{className:Q.sectionHeading,children:[(0,L.jsx)(W0,{as:`h2`,variant:`section-title`,children:`Description`}),(0,L.jsx)(W0,{tone:`secondary`,variant:`meta`,children:`What the author says this revision changes`})]}),(0,L.jsx)(`div`,{className:`${Q.description??``} prose prose-sm dark:prose-invert max-w-none`,children:(0,L.jsx)(l7,{remarkPlugins:[d9],rehypePlugins:[y7],children:u.description})})]}),(0,L.jsx)(E9,{...le?.destination===`comment`?{openRequestKey:`${le.target.commentId}:${String(le.requestId)}`}:{},keepMounted:!0,title:`Comments`,...oe===void 0?{}:{count:oe},children:e=>(0,L.jsx)(ipe,{commentsRefreshGeneration:P,navigation:le,onCountChange:me,onNavigateToDiff:e=>de(`diff`,e),pr:u,visible:e},u.id)})]}),(0,L.jsxs)(`aside`,{className:Q.evidenceColumn,children:[(0,L.jsxs)(`section`,{className:Q.approvalSection,children:[(0,L.jsxs)(`header`,{className:Q.sectionHeading,children:[(0,L.jsx)(W0,{as:`h2`,variant:`section-title`,children:`Decision evidence`}),(0,L.jsx)(W0,{tone:`secondary`,variant:`meta`,children:`Provider approval rules for this pull request`})]}),[{title:`Required Approvers`,ruleName:ope,required:!0},{title:`Optional Approvers`,ruleName:spe,required:!1}].map(e=>(0,L.jsx)(lpe,{approvalRules:u.approvalRules,approvedBy:u.approvedBy,currentUser:r.currentUser,knownUserArns:g,onRefresh:he,onSetApprovers:t=>{let n=u.approvalRules.find(t=>t.ruleName===e.ruleName&&t.fromTemplate===void 0);n===void 0?t.length>0&&o({payload:{account:u.account,approvalRuleName:e.ruleName,poolMembers:t,pullRequestId:u.id,requiredApprovals:e.required?t.length:0}}):s({payload:{account:u.account,approvalRuleName:n.ruleName,poolMembers:t.length>0?t:[`*`],pullRequestId:u.id,requiredApprovals:e.required&&t.length>0?t.length:0}})},permissionPrompt:r.permissionPrompt!==void 0,repoAccountId:h,required:e.required,ruleName:e.ruleName,title:e.title},e.ruleName))]}),(0,L.jsx)(E9,{title:`Health Score Breakdown`,children:()=>(0,L.jsx)(rpe,{score:_})})]})]}),(0,L.jsx)(D$,{open:b.visible,onOpenChange:b.cancel,children:(0,L.jsxs)(A$,{children:[(0,L.jsxs)(j$,{children:[(0,L.jsx)(N$,{children:`Granted CLI Required`}),(0,L.jsxs)(P$,{children:[`"Open in Console" uses`,` `,(0,L.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`,` `,(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`,children:`assume`}),` CLI is installed and configured before continuing.`]})]}),(0,L.jsxs)(M$,{children:[(0,L.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-muted-foreground mr-auto`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:b.dontRemind,onChange:e=>b.setDontRemind(e.target.checked),className:`accent-primary`}),`Don't remind again`]}),(0,L.jsx)(l2,{variant:`ghost`,onClick:b.cancel,children:`Cancel`}),(0,L.jsx)(l2,{onClick:Me,children:`Continue`})]})]})}),(0,L.jsx)(D$,{open:x.visible,onOpenChange:x.cancel,children:(0,L.jsxs)(A$,{children:[(0,L.jsxs)(j$,{children:[(0,L.jsx)(N$,{children:`Docker Required`}),(0,L.jsx)(P$,{children:`Sandbox uses Docker to run a code-server container. Make sure Docker is started before continuing.`})]}),(0,L.jsxs)(M$,{children:[(0,L.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-muted-foreground mr-auto`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:x.dontRemind,onChange:e=>x.setDontRemind(e.target.checked),className:`accent-primary`}),`Don't show again`]}),(0,L.jsx)(l2,{onClick:ke,children:`OK`})]})]})})]})}var D9=e=>_K(e.pullRequests,e.enabledProfiles===void 0?void 0:new Set(e.enabledProfiles)),ppe=e=>eZ.some(t=>t===e),O9=[{key:`status`,value:`open`}],k9=O9.map(e=>`${e.key}:${e.value}`);function mpe(e){let t=e.getAll(`f`);if(t.length===0)return O9;let n=[];for(let e of t){let t=e.indexOf(`:`);if(t<1)continue;let r=e.slice(0,t),i=e.slice(t+1);ppe(r)&&i&&(n.some(e=>e.key===r&&e.value===i)||n.push({key:r,value:i}))}return n}function A9(){let[e,t]=$i();return{state:(0,N.useMemo)(()=>{let t=e.get(`mineScope`),n=e.get(`from`),r=e.get(`to`);return{filters:mpe(e),hot:e.get(`sortBy`)===`updated`,...e.has(`groupBy`)&&{groupBy:e.get(`groupBy`)},mine:e.has(`mine`),review:e.has(`review`),...t!=null&&{mineScope:t},q:e.get(`q`)??``,...n!=null&&{from:n},...r!=null&&{to:r}}},[e]),toggleFilter:(0,N.useCallback)((e,n)=>{t(t=>{let r=t.getAll(`f`),i=`${e}:${n}`;if(r.length===0){for(let e of k9)t.append(`f`,e);r=t.getAll(`f`)}let a=r.includes(i);t.delete(`f`);for(let e of r)e!==i&&e!==``&&t.append(`f`,e);return a||t.append(`f`,i),t.getAll(`f`).length===0&&a&&t.append(`f`,``),t},{preventScrollReset:!0,replace:!0})},[t]),removeFilterKey:(0,N.useCallback)(e=>{t(t=>{let n=t.getAll(`f`);if(n.length===0){for(let e of k9)t.append(`f`,e);n=t.getAll(`f`)}t.delete(`f`);for(let r of n)r!==``&&r.slice(0,r.indexOf(`:`))!==e&&t.append(`f`,r);return t.getAll(`f`).length===0&&t.append(`f`,``),t},{preventScrollReset:!0,replace:!0})},[t]),toggleHot:(0,N.useCallback)(()=>{t(e=>(e.get(`sortBy`)===`updated`?e.delete(`sortBy`):e.set(`sortBy`,`updated`),e),{preventScrollReset:!0,replace:!0})},[t]),toggleReview:(0,N.useCallback)(()=>{t(e=>(e.has(`review`)?e.delete(`review`):e.set(`review`,`1`),e),{preventScrollReset:!0,replace:!0})},[t]),toggleMine:(0,N.useCallback)(()=>{t(e=>(e.has(`mine`)?(e.delete(`mine`),e.delete(`mineScope`)):e.set(`mine`,`1`),e),{preventScrollReset:!0,replace:!0})},[t]),setMineScope:(0,N.useCallback)(e=>{t(t=>(e?t.set(`mineScope`,e):t.delete(`mineScope`),t),{preventScrollReset:!0,replace:!0})},[t]),setFilterText:(0,N.useCallback)(e=>{t(t=>(e?t.set(`q`,e):t.delete(`q`),t),{preventScrollReset:!0,replace:!0})},[t]),clearAll:(0,N.useCallback)(()=>{t(e=>(e.delete(`f`),e.delete(`sortBy`),e.delete(`groupBy`),e.delete(`mine`),e.delete(`review`),e.delete(`mineScope`),e.delete(`q`),e.delete(`from`),e.delete(`to`),e),{preventScrollReset:!0,replace:!0})},[t])}}function hpe({...e}){return(0,L.jsx)(Zm,{"data-slot":`popover`,...e})}function gpe({...e}){return(0,L.jsx)(Qm,{"data-slot":`popover-trigger`,...e})}function _pe({align:e=`start`,className:t,sideOffset:n=4,...r}){return(0,L.jsx)($m,{children:(0,L.jsx)(eh,{"data-slot":`popover-content`,align:e,sideOffset:n,className:E$(`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 z-50 w-[200px] origin-(--radix-popover-content-transform-origin) overflow-hidden rounded-md border p-0 shadow-md outline-hidden`,t),...r})})}var $={page:`_page_cz5jb_1`,hero:`_hero_cz5jb_7`,eyebrow:`_eyebrow_cz5jb_13`,title:`_title_cz5jb_19`,lede:`_lede_cz5jb_23`,facets:`_facets_cz5jb_27`,facet:`_facet_cz5jb_27`,facetLabel:`_facetLabel_cz5jb_72`,facetCount:`_facetCount_cz5jb_77`,queueSection:`_queueSection_cz5jb_86`,accountGroups:`_accountGroups_cz5jb_87`,accountGroup:`_accountGroup_cz5jb_87`,emptyStack:`_emptyStack_cz5jb_89`,activitySection:`_activitySection_cz5jb_90`,sectionHeading:`_sectionHeading_cz5jb_99`,activityHeading:`_activityHeading_cz5jb_100`,accountHeading:`_accountHeading_cz5jb_101`,controls:`_controls_cz5jb_108`,searchBar:`_searchBar_cz5jb_113`,searchInputWrap:`_searchInputWrap_cz5jb_120`,searchIcon:`_searchIcon_cz5jb_127`,searchInput:`_searchInput_cz5jb_120`,clearSearch:`_clearSearch_cz5jb_162`,filterTrigger:`_filterTrigger_cz5jb_163`,filterChip:`_filterChip_cz5jb_164`,activityMore:`_activityMore_cz5jb_165`,activeFilters:`_activeFilters_cz5jb_188`,filterPanel:`_filterPanel_cz5jb_222`,modeGroup:`_modeGroup_cz5jb_232`,modeButton:`_modeButton_cz5jb_241`,structuredFilters:`_structuredFilters_cz5jb_246`,filterLegend:`_filterLegend_cz5jb_255`,filterCount:`_filterCount_cz5jb_292`,clearFilters:`_clearFilters_cz5jb_304`,filterPopover:`_filterPopover_cz5jb_309`,commandSeparator:`_commandSeparator_cz5jb_317`,childOption:`_childOption_cz5jb_323`,groupOption:`_groupOption_cz5jb_327`,optionCheck:`_optionCheck_cz5jb_331`,queueSurface:`_queueSurface_cz5jb_353`,prRow:`_prRow_cz5jb_357`,prMain:`_prMain_cz5jb_385`,prKicker:`_prKicker_cz5jb_391`,prByline:`_prByline_cz5jb_392`,prNumber:`_prNumber_cz5jb_403`,prTitle:`_prTitle_cz5jb_410`,prDescription:`_prDescription_cz5jb_422`,metaSeparator:`_metaSeparator_cz5jb_432`,commentCount:`_commentCount_cz5jb_436`,prFacts:`_prFacts_cz5jb_451`,prFact:`_prFact_cz5jb_451`,prDecision:`_prDecision_cz5jb_482`,health:`_health_cz5jb_489`,healthScore:`_healthScore_cz5jb_495`,scorePositive:`_scorePositive_cz5jb_503`,scoreCaution:`_scoreCaution_cz5jb_507`,scoreCritical:`_scoreCritical_cz5jb_511`,approvalCount:`_approvalCount_cz5jb_515`,openReview:`_openReview_cz5jb_519`,queueState:`_queueState_cz5jb_556`,emptyActions:`_emptyActions_cz5jb_564`,ssoActions:`_ssoActions_cz5jb_565`,ssoPanel:`_ssoPanel_cz5jb_575`,ssoButton:`_ssoButton_cz5jb_586`,ssoWatermark:`_ssoWatermark_cz5jb_590`,activityTitle:`_activityTitle_cz5jb_604`,activityList:`_activityList_cz5jb_622`,activityItem:`_activityItem_cz5jb_628`,activityIcon:`_activityIcon_cz5jb_656`,activityNeutral:`_activityNeutral_cz5jb_670`,activityPositive:`_activityPositive_cz5jb_675`,activityCaution:`_activityCaution_cz5jb_680`,activityCritical:`_activityCritical_cz5jb_685`,activityProgress:`_activityProgress_cz5jb_690`,activityCopy:`_activityCopy_cz5jb_695`,activityItemTitle:`_activityItemTitle_cz5jb_701`,visuallyHidden:`_visuallyHidden_cz5jb_708`},vpe=(e,t)=>e.review?`review`:e.hot?`hot`:t!==void 0&&e.filters.some(e=>e.key===`author`&&e.value===t)?`mine`:`all`,j9=new Set([`approved`,`pending`,`mergeable`,`conflicts`]),ype=new Set([`open`,`merged`,`closed`,...j9]),bpe={open:`lifecycle`,merged:`lifecycle`,closed:`lifecycle`,approved:`approval`,pending:`approval`,mergeable:`merge`,conflicts:`merge`},M9={account:`Account`,author:`Author`,approver:`Approver`,commenter:`Commenter`,scope:`Scope`,repo:`Repository`,status:`Status`,size:`Size`},N9=(e,t)=>{switch(t.key){case`account`:return e.account.profile===t.value;case`author`:return e.author===t.value;case`scope`:return g9(e.title)===t.value;case`repo`:return e.repositoryName===t.value;case`approver`:return e.approvedBy.some(e=>e===t.value);case`commenter`:return e.commentedBy.some(e=>e===t.value);case`size`:{let n=e.filesChanged;if(n==null)return!1;switch(t.value){case`small`:return n<5;case`medium`:return n>=5&&n<=15;case`large`:return n>=16&&n<=30;case`xlarge`:return n>30;default:return!0}}case`status`:switch(t.value){case`approved`:return e.status===`OPEN`&&e.isApproved;case`pending`:return e.status===`OPEN`&&!e.isApproved;case`mergeable`:return e.status===`OPEN`&&e.isMergeable;case`conflicts`:return e.status===`OPEN`&&!e.isMergeable;case`merged`:return e.status===`MERGED`;case`closed`:return e.status===`CLOSED`;case`open`:return e.status===`OPEN`;default:return!0}default:return!0}},P9=e=>{let t=new Map;for(let n of e){let e=n.key===`status`?`status:${bpe[n.value]??n.value}`:n.key,r=t.get(e);r?r.push(n):t.set(e,[n])}return t},xpe=e=>{let t=new Set,n=new Set,r=new Set,i=new Set,a=new Set,o=new Set;for(let s of e){t.add(s.author),n.add(s.account.profile),i.add(s.repositoryName);let e=g9(s.title);e&&r.add(e);for(let e of s.commentedBy)e&&a.add(e);for(let e of s.approvedBy)e&&o.add(e)}return{account:[...n].sort(),author:[...t].sort(),approver:[...o].sort(),commenter:[...a].sort(),scope:[...r].sort(),repo:[...i].sort(),status:[`open`,`approved`,`pending`,`mergeable`,`conflicts`,`merged`,`closed`],size:[`small`,`medium`,`large`,`xlarge`]}},Spe=({filters:e,review:t})=>{if(t)return`review`;let n=new Set(e.filter(e=>e.key===`status`).map(e=>e.value).filter(e=>ype.has(e)));if(n.size===1){if(n.has(`open`))return`open`;if(n.has(`approved`))return`approved`;if(n.has(`pending`))return`pending`}if(n.size===j9.size&&[...j9].every(e=>n.has(e)))return`open`},Cpe=(e,t,n)=>!(Dy(t)&&Number.isFinite(t)&&e<t||Dy(n)&&Number.isFinite(n)&&e>=n),F9=[`status`,`author`,`repo`,`scope`,`account`,`approver`,`commenter`,`size`];function wpe({selected:e}){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:$.optionCheck,"data-selected":e?`true`:void 0,children:e?(0,L.jsx)(l_,{}):null}),(0,L.jsx)(`span`,{className:$.visuallyHidden,children:e?`Selected`:`Not selected`})]})}function Tpe({filterKey:e,groups:t,label:n,onToggle:r,options:i,selected:a}){let[o,s]=(0,N.useState)(!1),c=a.length,l=(0,N.useMemo)(()=>new Set(t===void 0?[]:Object.values(t).flat()),[t]),u=(0,N.useMemo)(()=>{let e=new Map;if(t!==void 0)for(let[n,r]of Object.entries(t))for(let t of r)e.set(t,n);return e},[t]);return(0,L.jsxs)(hpe,{onOpenChange:s,open:o,children:[(0,L.jsx)(gpe,{asChild:!0,children:(0,L.jsxs)(`button`,{className:$.filterTrigger,"data-active":c>0?`true`:void 0,type:`button`,children:[(0,L.jsx)(`span`,{children:n}),c>0?(0,L.jsx)(`span`,{className:$.filterCount,children:c}):null,(0,L.jsx)(d_,{"aria-hidden":`true`})]})}),(0,L.jsx)(_pe,{align:`start`,className:$.filterPopover,side:`bottom`,children:(0,L.jsxs)(F$,{children:[(0,L.jsx)(L$,{placeholder:`Search ${n.toLowerCase()}…`}),(0,L.jsxs)(R$,{children:[(0,L.jsx)(z$,{children:`No matching options.`}),(0,L.jsx)(B$,{children:i.map((n,o)=>{let s=t!==void 0&&n in t,c=l.has(n),d=u.get(n),f=s?(t[n]?.every(e=>a.includes(e))??!1)||a.includes(n):a.includes(n)||d!==void 0&&a.includes(d),p=o>0?i[o-1]:void 0,m=!c&&!s&&p!==void 0&&l.has(p);return(0,L.jsxs)(`div`,{children:[m?(0,L.jsx)(`div`,{className:$.commandSeparator}):null,(0,L.jsxs)(H$,{className:c?$.childOption:void 0,onSelect:()=>r(e,n),children:[(0,L.jsx)(wpe,{selected:f}),(0,L.jsx)(`span`,{className:s?$.groupOption:void 0,children:n})]})]},n)})})]})]})})]})}function Epe(){let e=KV(hY),{clearAll:t,state:n,toggleFilter:r}=A9(),[,i]=$i(),a=(0,N.useMemo)(()=>D9(e),[e.enabledProfiles,e.pullRequests]),o=e.currentUser;(0,N.useEffect)(()=>{i(e=>{let t=e.getAll(`f`).some(e=>e.startsWith(`author:`));return!e.has(`sortBy`)&&!e.has(`groupBy`)&&!e.has(`review`)&&!t&&e.set(`sortBy`,`updated`),e},{preventScrollReset:!0,replace:!0})},[i]);let s=(0,N.useMemo)(()=>{let e=new Map;for(let t of n.filters){let n=e.get(t.key);n===void 0?e.set(t.key,[t.value]):n.push(t.value)}return e},[n.filters]),c=(0,N.useCallback)((e,t)=>{e===`status`&&t===`open`?i(e=>{let t=e.getAll(`f`);if(t.length===0&&(e.append(`f`,`status:open`),t=e.getAll(`f`)),t.includes(`status:open`)){e.delete(`f`);for(let n of t)n!==`status:open`&&n!==``&&e.append(`f`,n);return e.getAll(`f`).length===0&&e.append(`f`,``),e}let n=[...j9].map(e=>`status:${e}`),r=new Set([`status:merged`,`status:closed`]),i=n.every(e=>t.includes(e));e.delete(`f`);for(let i of t)n.includes(i)||r.has(i)||e.append(`f`,i);if(!i)for(let t of n)e.append(`f`,t);return e.getAll(`f`).length===0&&e.append(`f`,``),e},{preventScrollReset:!0,replace:!0}):e===`status`&&j9.has(t)&&s.get(`status`)?.includes(`open`)===!0?i(e=>{let n=e.getAll(`f`);n.length===0&&(e.append(`f`,`status:open`),n=e.getAll(`f`)),e.delete(`f`);for(let t of n)t!==`status:open`&&t!==``&&e.append(`f`,t);for(let n of j9)n!==t&&e.append(`f`,`status:${n}`);return e},{preventScrollReset:!0,replace:!0}):r(e,t)},[s,i,r]),l=(0,N.useMemo)(()=>{let e=P9(n.filters),t=()=>[],r={account:t(),author:t(),approver:t(),commenter:t(),scope:t(),repo:t(),status:t(),size:t()};for(let t of F9){let n=[...e.entries()].filter(([e])=>e!==t&&!e.startsWith(`${t}:`));r[t]=xpe(n.length===0?a:a.filter(e=>n.every(([,t])=>t.some(t=>N9(e,t)))))[t]}return r},[a,n.filters]),u=vpe(n,o),d=n.filters.length>0||n.hot||n.review||n.q.length>0||!!(n.from||n.to),f=(0,N.useCallback)(e=>{i(t=>{t.delete(`sortBy`),t.delete(`groupBy`),t.delete(`review`);let n=t.getAll(`f`).filter(e=>o!==void 0&&o.length>0?e!==`author:${o}`:!0);t.delete(`f`);for(let e of n)t.append(`f`,e);switch(e===u?`hot`:e){case`hot`:t.set(`sortBy`,`updated`);break;case`all`:t.set(`groupBy`,`account`);break;case`mine`:t.set(`groupBy`,`account`),o!==void 0&&o.length>0&&t.append(`f`,`author:${o}`);break;case`review`:t.set(`review`,`1`)}return!t.getAll(`f`).some(e=>e.startsWith(`status:`))&&t.getAll(`f`).length>0&&t.append(`f`,`status:open`),t},{preventScrollReset:!0,replace:!0})},[u,o,i]),p=[{id:`hot`,label:`Hot`,visible:!0},{id:`all`,label:`All`,visible:!0},{id:`mine`,label:`Mine`,visible:o!==void 0},{id:`review`,label:`Review`,visible:o!==void 0}];return(0,L.jsxs)(`section`,{"aria-label":`Queue views and filters`,className:$.filterPanel,children:[(0,L.jsx)(`div`,{className:$.modeGroup,role:`group`,"aria-label":`Queue view`,children:p.filter(e=>e.visible).map(e=>(0,L.jsx)(L1,{"aria-pressed":u===e.id,className:$.modeButton,onClick:()=>f(e.id),size:`compact`,variant:u===e.id?`primary`:`quiet`,children:e.label},e.id))}),(0,L.jsxs)(`div`,{className:$.structuredFilters,children:[(0,L.jsx)(W0,{className:$.filterLegend,tone:`tertiary`,variant:`meta`,children:`Filter by`}),F9.map(e=>(0,L.jsx)(Tpe,{filterKey:e,label:M9[e],onToggle:c,options:l[e],selected:s.get(e)??[],...e===`status`?{groups:{open:[...j9]}}:{}},e))]}),d?(0,L.jsx)(L1,{className:$.clearFilters,onClick:t,size:`compact`,variant:`quiet`,children:`Reset view`}):null]})}var Dpe=e=>{switch(e.status){case`MERGED`:return{actionLabel:`View pull request`,summary:`Merged`};case`CLOSED`:return{actionLabel:`View pull request`,summary:`Closed`};case`OPEN`:{if(!e.isMergeable)return{actionLabel:`Inspect conflict`,summary:`Merge blocked`};let t=e.approvedBy.length;return{actionLabel:`Open review`,summary:`${t} ${t===1?`approval`:`approvals`}`}}}},Ope=(e,t)=>t?e.lastModifiedDate:e.creationDate,kpe=(e,t,n)=>t?K$(e.lastModifiedDate,n):`Opened ${G$(e.creationDate)}`,Ape=e=>e.status===`MERGED`?{label:`Merged`,tone:`progress`}:e.status===`CLOSED`?{label:`Closed`,tone:`neutral`}:e.isMergeable?e.isApproved?{label:`Approved`,tone:`positive`}:{label:`Pending`,tone:`caution`}:{label:`Conflict`,tone:`critical`},jpe=e=>{switch(e){case`green`:return $.scorePositive??``;case`yellow`:return $.scoreCaution??``;default:return $.scoreCritical??``}};function I9({currentUser:e,pr:t,showUpdated:n,to:r}){let i=gK(t,e),a=(0,N.useMemo)(()=>MS(o4(t,new Date)),[t]),o=Ape(t),s=Dpe(t),c=t.description?.split(`
89
+ `).slice(0,2).join(` `);return(0,L.jsxs)(Ji,{className:$.prRow,to:r,children:[(0,L.jsxs)(`div`,{className:$.prMain,children:[(0,L.jsxs)(`div`,{className:$.prKicker,children:[(0,L.jsx)(p3,{service:`codecommit`,size:`compact`}),(0,L.jsxs)(W0,{className:$.prNumber,tone:`inherit`,variant:`code`,children:[`PR #`,t.id]}),(0,L.jsx)(H1,{label:o.label,size:`compact`,tone:o.tone}),i?(0,L.jsx)(H1,{label:`Needs your review`,size:`compact`,tone:`caution`}):null]}),(0,L.jsx)(W0,{as:`h3`,className:$.prTitle,variant:`card-title`,children:t.title}),c?(0,L.jsx)(W0,{className:$.prDescription,tone:`secondary`,variant:`meta`,children:c}):null,(0,L.jsxs)(`div`,{className:$.prByline,children:[(0,L.jsx)(W0,{tone:`secondary`,variant:`meta`,children:t.author}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:$.metaSeparator,children:`·`}),(0,L.jsx)(W0,{as:`time`,dateTime:Ope(t,n===!0).toISOString(),tone:`tertiary`,variant:`meta`,children:kpe(t,n===!0,new Date)}),t.commentCount!==void 0&&t.commentCount>0?(0,L.jsxs)(`span`,{"aria-label":`${t.commentCount} comments`,className:$.commentCount,children:[(0,L.jsx)(yv,{"aria-hidden":`true`}),t.commentCount]}):null]})]}),(0,L.jsxs)(`dl`,{className:$.prFacts,children:[(0,L.jsxs)(`div`,{className:$.prFact,children:[(0,L.jsx)(`dt`,{children:`Repository`}),(0,L.jsx)(`dd`,{children:t.repositoryName})]}),(0,L.jsxs)(`div`,{className:$.prFact,children:[(0,L.jsx)(`dt`,{children:`Revision`}),(0,L.jsxs)(`dd`,{title:`${t.sourceBranch} to ${t.destinationBranch}`,children:[t.sourceBranch,` → `,t.destinationBranch]})]})]}),(0,L.jsxs)(`div`,{className:$.prDecision,children:[a?(0,L.jsxs)(`div`,{className:$.health,children:[(0,L.jsx)(W0,{tone:`tertiary`,variant:`meta`,children:`Health`}),(0,L.jsx)(`span`,{className:`${$.healthScore??``} ${jpe(s4(a.total))}`,children:a.total.toFixed(1)})]}):null,(0,L.jsx)(W0,{className:$.approvalCount,tone:`tertiary`,variant:`meta`,children:s.summary}),(0,L.jsxs)(`span`,{className:$.openReview,children:[s.actionLabel,(0,L.jsx)($g,{"aria-hidden":`true`})]})]})]})}var Mpe={new_comment:{icon:yv,tone:`progress`},comment_edited:{icon:yv,tone:`neutral`},comment_deleted:{icon:yv,tone:`neutral`},approval_changed:{icon:C_,tone:`positive`},approval_requested:{icon:V_,tone:`caution`},pr_merged:{icon:Z_,tone:`positive`},pr_closed:{icon:T_,tone:`critical`},pr_reopened:{icon:Mv,tone:`progress`},merge_changed:{icon:Y_,tone:`progress`}},Npe={icon:r_,tone:`neutral`},Ppe=e=>{switch(e){case`positive`:return $.activityPositive??``;case`caution`:return $.activityCaution??``;case`critical`:return $.activityCritical??``;case`progress`:return $.activityProgress??``;default:return $.activityNeutral??``}};function Fpe({notifications:e}){let t=e.filter(e=>e.pullRequestId!==``).slice(0,5);if(t.length===0)return null;let n=new Date;return(0,L.jsxs)(`section`,{"aria-labelledby":`recent-activity-heading`,className:$.activitySection,children:[(0,L.jsxs)(`div`,{className:$.activityHeading,children:[(0,L.jsxs)(`div`,{className:$.activityTitle,children:[(0,L.jsx)(p3,{service:`codecommit`,size:`compact`}),(0,L.jsx)(W0,{as:`h2`,id:`recent-activity-heading`,variant:`section-title`,children:`Recent activity`})]}),(0,L.jsxs)(Ji,{className:$.activityMore,to:`/notifications`,children:[`View all activity`,(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`→`})]})]}),(0,L.jsx)(I0,{className:$.activityList,padding:`none`,form:`grouped`,children:t.map(e=>{let t=Mpe[e.type]??Npe,r=t.icon,i=e.awsAccountId!==``&&e.pullRequestId!==``&&e.repositoryName!==``&&e.accountRegion!==``?vX(e.awsAccountId,e.pullRequestId,e.repositoryName,e.accountRegion):void 0,a=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`${$.activityIcon??``} ${Ppe(t.tone)}`,children:(0,L.jsx)(r,{"aria-hidden":`true`})}),(0,L.jsxs)(`span`,{className:$.activityCopy,children:[(0,L.jsx)(W0,{className:$.activityItemTitle,variant:`label`,children:e.title||e.message}),(0,L.jsxs)(W0,{tone:`tertiary`,variant:`meta`,children:[K$(new Date(e.createdAt),n),e.profile!==void 0&&e.profile!==``?` · ${e.profile}`:``]})]})]});return i===void 0?(0,L.jsx)(`div`,{className:$.activityItem,children:a},e.id):(0,L.jsx)(Ji,{className:$.activityItem,to:i,children:a},e.id)})})]})}function Ipe(){let{clearAll:e,setFilterText:t,state:n,toggleFilter:r}=A9(),[,i]=$i(),a=(0,N.useMemo)(()=>{let e=new Map;for(let t of n.filters){let n=e.get(t.key);n?n.push(t.value):e.set(t.key,[t.value])}return e},[n.filters]),o=!!(n.from||n.to),s=n.filters.length>0||n.review||n.q.length>0||o,c=n.filters.length>0||o,l=()=>{i(e=>(e.delete(`from`),e.delete(`to`),e),{preventScrollReset:!0,replace:!0})};return(0,L.jsxs)(`div`,{className:$.searchBar,children:[(0,L.jsxs)(`label`,{className:$.searchInputWrap,children:[(0,L.jsx)(W0,{className:$.visuallyHidden,variant:`meta`,children:`Search pull requests`}),(0,L.jsx)($v,{className:$.searchIcon??``,decorative:!0,name:`search`,size:`small`}),(0,L.jsx)(`input`,{className:$.searchInput,onChange:e=>t(e.target.value),placeholder:c?`Refine by title, author, or branch`:`Search title, author, or branch`,type:`search`,value:n.q})]}),c?(0,L.jsxs)(`div`,{"aria-label":`Active filters`,className:$.activeFilters,children:[[...a.entries()].flatMap(([e,t])=>t.map(t=>(0,L.jsxs)(`button`,{"aria-label":`Remove ${M9[e]} filter ${t}`,className:$.filterChip,onClick:()=>r(e,t),type:`button`,children:[(0,L.jsxs)(`span`,{children:[M9[e],`:`]}),` `,t,(0,L.jsx)($v,{decorative:!0,name:`close`,size:`small`})]},`${e}:${t}`))),o?(0,L.jsxs)(`button`,{"aria-label":`Remove date range filter`,className:$.filterChip,onClick:l,type:`button`,children:[(0,L.jsx)(`span`,{children:`Date:`}),` `,n.from??`Any`,` → `,n.to??`Any`,(0,L.jsx)($v,{decorative:!0,name:`close`,size:`small`})]}):null]}):null,s?(0,L.jsxs)(`button`,{"aria-label":`Clear search and filters`,className:$.clearSearch,onClick:e,type:`button`,children:[`Clear all`,(0,L.jsx)($v,{decorative:!0,name:`close`,size:`small`})]}):null]})}var L9=e=>vX(e.account.profile,String(e.id),String(e.repositoryName),String(e.account.region)),R9=e=>`${e.account.awsAccountId??e.account.profile}:${String(e.id)}:${String(e.repositoryName)}:${String(e.account.region)}`,Lpe=(e,t)=>{let n=e.getAll(`f`).filter(e=>!e.startsWith(`status:`)&&e!==``);e.delete(`f`);for(let t of n)e.append(`f`,t);e.append(`f`,`status:${t}`)};function Rpe(){let e=KV(hY),t=JV(HJ),{state:n,toggleFilter:r}=A9(),[,i]=$i(),a=(0,N.useMemo)(()=>D9(e),[e.enabledProfiles,e.pullRequests]),o=e.status===`loading`,s=(0,N.useMemo)(()=>{let t=0,n=0,r=0,i=0;for(let o of a)o.status===`OPEN`&&(i+=1,o.isApproved?r+=1:n+=1,gK(o,e.currentUser)&&(t+=1));return{approved:r,open:i,pending:n,review:t}},[e.currentUser,a]),c=(0,N.useMemo)(()=>{if(a.length===0)return[];let{filters:t,from:r,q:i,review:o,to:s}=n,c=i.toLowerCase(),l=P9(t),u=t.some(e=>e.key===`status`&&j9.has(e.value)),d=t.some(e=>e.key===`status`&&[`open`,`merged`,`closed`].includes(e.value)),f=u&&!d,p=r!==void 0&&r!==``?new Date(r).getTime():void 0,m=s!==void 0&&s!==``?new Date(s).getTime():void 0,h=t.find(e=>e.key===`status`);return a.filter(t=>i.length>0&&!t.repositoryName.toLowerCase().includes(c)&&!t.title.toLowerCase().includes(c)&&!t.author.toLowerCase().includes(c)&&!t.sourceBranch.toLowerCase().includes(c)&&!(t.description?.toLowerCase().includes(c)??!1)||f&&t.status!==`OPEN`||![...l.values()].every(e=>e.some(e=>N9(t,e)))||(Number.isFinite(p)||Number.isFinite(m))&&!Cpe(h?.value===`merged`||h?.value===`closed`?t.lastModifiedDate.getTime():t.creationDate.getTime(),p,m)?!1:!o||gK(t,e.currentUser)).sort((e,t)=>t.lastModifiedDate.getTime()-e.lastModifiedDate.getTime())},[e.currentUser,n,a]),l=Spe(n),u=(0,N.useCallback)(t=>{i(n=>{if(n.delete(`groupBy`),n.delete(`mine`),n.delete(`mineScope`),n.delete(`review`),n.set(`sortBy`,`updated`),e.currentUser!==void 0&&e.currentUser!==``){let t=n.getAll(`f`).filter(t=>t!==`author:${e.currentUser}`&&t!==``);n.delete(`f`);for(let e of t)n.append(`f`,e)}return Lpe(n,t===`review`?`open`:t),t===`review`&&n.set(`review`,`1`),n},{preventScrollReset:!0,replace:!0})},[e.currentUser,i]),d=(0,N.useMemo)(()=>[...new Set(e.accounts.filter(e=>e.enabled).map(e=>e.profile))],[e.accounts]),f=a.length===0&&d.length>0,p=new Set(c.map(e=>e.account.profile)).size,m=e.currentUser!==void 0&&e.currentUser!==``?e.notifications?.items??[]:[],h=(()=>{if(c.length===0&&o)return(0,L.jsx)(m0,{announce:`polite`,className:$.queueState,description:a.length>0?`${a.length} pull requests are available; the current view hides them while refresh continues.`:`Reading configured CodeCommit accounts and preparing the decision queue.`,title:`Loading pull requests`,tone:`progress`});if(c.length===0){let e=a.length>0;return(0,L.jsxs)(`div`,{className:$.emptyStack,children:[(0,L.jsx)(m0,{className:$.queueState,description:e?`${a.length} pull requests are cached, but none match the current search and filters.`:f?`A configured AWS session may have expired. Sign in to load its pull requests.`:`No pull requests are available from the configured accounts yet.`,title:e?`No pull requests match this view`:`The queue is empty`}),e?(0,L.jsxs)(`div`,{className:$.emptyActions,children:[(0,L.jsx)(L1,{onClick:()=>r(`status`,`merged`),size:`compact`,children:`Show merged`}),(0,L.jsx)(L1,{onClick:()=>r(`status`,`closed`),size:`compact`,children:`Show closed`})]}):null,f?(0,L.jsxs)(I0,{className:$.ssoPanel,padding:`compact`,form:`grouped`,children:[(0,L.jsx)(W0,{as:`h3`,variant:`card-title`,children:`Restore AWS sessions`}),(0,L.jsx)(W0,{tone:`secondary`,variant:`meta`,children:`Sign in with each profile that should contribute to this queue.`}),(0,L.jsx)(`div`,{className:$.ssoActions,children:d.map(e=>(0,L.jsx)(L1,{className:$.ssoButton,leadingIcon:`user`,onClick:()=>t({payload:{profile:e}}),size:`compact`,children:e},e))}),(0,L.jsx)(lv,{"aria-hidden":`true`,className:$.ssoWatermark})]}):null]})}if(n.groupBy!==`account`)return(0,L.jsx)(I0,{className:$.queueSurface,padding:`none`,form:`grouped`,children:c.map(t=>(0,L.jsx)(I9,{currentUser:e.currentUser,pr:t,showUpdated:!0,to:L9(t)},R9(t)))});let i=new Map;for(let e of c){let t=e.account?.profile??`unknown`,n=i.get(t);n===void 0?i.set(t,[e]):n.push(e)}return(0,L.jsx)(`div`,{className:$.accountGroups,children:[...i.entries()].map(([t,n],r)=>(0,L.jsxs)(`section`,{"aria-labelledby":`account-group-${r}`,className:$.accountGroup,children:[(0,L.jsxs)(`div`,{className:$.accountHeading,children:[(0,L.jsx)(W0,{as:`h3`,id:`account-group-${r}`,variant:`label`,children:t}),(0,L.jsxs)(W0,{tone:`tertiary`,variant:`meta`,children:[n.length,` `,n.length===1?`pull request`:`pull requests`]})]}),(0,L.jsx)(I0,{className:$.queueSurface,padding:`none`,form:`grouped`,children:n.map(t=>(0,L.jsx)(I9,{currentUser:e.currentUser,pr:t,to:L9(t)},R9(t)))})]},t))})})(),g=[{count:s.review,id:`review`,label:`Needs your review`},{count:s.pending,id:`pending`,label:`Waiting on others`},{count:s.approved,id:`approved`,label:`Approved`},{count:s.open,id:`open`,label:`All open`}];return(0,L.jsxs)(`div`,{className:$.page,children:[(0,L.jsxs)(`header`,{className:$.hero,children:[(0,L.jsxs)(`div`,{className:$.eyebrow,children:[(0,L.jsx)(p3,{service:`codecommit`,size:`compact`}),(0,L.jsx)(W0,{tone:`secondary`,variant:`meta`,children:`Review queue`})]}),(0,L.jsx)(W0,{as:`h1`,className:$.title,variant:`page-title`,children:`What needs a decision.`}),(0,L.jsx)(W0,{className:$.lede,tone:`secondary`,variant:`body-large`,children:`Open pull requests, ordered around your review work rather than repository noise.`})]}),(0,L.jsx)(`div`,{"aria-label":`Pull request facets`,className:$.facets,role:`group`,children:g.map(e=>(0,L.jsxs)(`button`,{"aria-pressed":l===e.id,className:$.facet,onClick:()=>u(e.id),type:`button`,children:[(0,L.jsx)(`span`,{className:$.facetLabel,children:e.label}),(0,L.jsx)(`span`,{"aria-label":`${e.count} pull requests`,className:$.facetCount,children:e.count})]},e.id))}),(0,L.jsxs)(`section`,{"aria-labelledby":`review-queue-heading`,className:$.queueSection,children:[(0,L.jsxs)(`div`,{className:$.sectionHeading,children:[(0,L.jsx)(W0,{as:`h2`,id:`review-queue-heading`,variant:`section-title`,children:`Review queue`}),(0,L.jsxs)(W0,{"aria-live":`polite`,tone:`tertiary`,variant:`meta`,children:[c.length,` `,c.length===1?`result`:`results`,p>0?` · ${p} ${p===1?`AWS account`:`AWS accounts`}`:``]})]}),(0,L.jsxs)(`div`,{className:$.controls,children:[(0,L.jsx)(Ipe,{}),(0,L.jsx)(Epe,{})]}),h]}),m.length>0?(0,L.jsx)(Fpe,{notifications:m}):null]})}var zpe=e=>e===`127.0.0.1`?`localhost`:`127.0.0.1`,Bpe=(e,t)=>`http://${zpe(e)}:${t}/`,z9={page:`_page_1ps52_1`,hero:`_hero_1ps52_8`,heroCopy:`_heroCopy_1ps52_15`,eyebrow:`_eyebrow_1ps52_21`,title:`_title_1ps52_42`,lede:`_lede_1ps52_43`,sectionTitle:`_sectionTitle_1ps52_44`,emptyTitle:`_emptyTitle_1ps52_45`,emptyDescription:`_emptyDescription_1ps52_46`,workspaceTitle:`_workspaceTitle_1ps52_47`,workspaceMeta:`_workspaceMeta_1ps52_48`,statusDetail:`_statusDetail_1ps52_49`,errorMessage:`_errorMessage_1ps52_50`,inventory:`_inventory_1ps52_64`,sectionHeader:`_sectionHeader_1ps52_69`,sandboxList:`_sandboxList_1ps52_76`,sandboxRow:`_sandboxRow_1ps52_84`,sandboxIdentity:`_sandboxIdentity_1ps52_101`,sandboxOpen:`_sandboxOpen_1ps52_107`,sandboxHeading:`_sandboxHeading_1ps52_125`,repository:`_repository_1ps52_132`,branch:`_branch_1ps52_142`,sandboxId:`_sandboxId_1ps52_101`,port:`_port_1ps52_144`,logTimestamp:`_logTimestamp_1ps52_145`,logMessage:`_logMessage_1ps52_146`,credentialCode:`_credentialCode_1ps52_147`,sandboxMeta:`_sandboxMeta_1ps52_164`,statusDetailInline:`_statusDetailInline_1ps52_174`,metaSeparator:`_metaSeparator_1ps52_180`,rowActions:`_rowActions_1ps52_184`,workspaceActions:`_workspaceActions_1ps52_185`,viewActions:`_viewActions_1ps52_186`,credentialActions:`_credentialActions_1ps52_187`,empty:`_empty_1ps52_45`,emptyAction:`_emptyAction_1ps52_209`,workspace:`_workspace_1ps52_47`,workspaceHeader:`_workspaceHeader_1ps52_221`,workspaceIdentity:`_workspaceIdentity_1ps52_231`,backButton:`_backButton_1ps52_239`,workspaceHeading:`_workspaceHeading_1ps52_243`,credentialBar:`_credentialBar_1ps52_272`,credentialFailure:`_credentialFailure_1ps52_273`,credentialLabel:`_credentialLabel_1ps52_293`,credentialButton:`_credentialButton_1ps52_308`,workspaceContent:`_workspaceContent_1ps52_331`,workspaceNotice:`_workspaceNotice_1ps52_340`,logs:`_logs_1ps52_353`,logLine:`_logLine_1ps52_367`,noLogs:`_noLogs_1ps52_384`,editorFrame:`_editorFrame_1ps52_392`,loadingPage:`_loadingPage_1ps52_401`,loadingPanel:`_loadingPanel_1ps52_410`},Vpe=new Set([`creating`,`cloning`,`starting`]),Hpe=e=>{switch(e){case`running`:return`positive`;case`creating`:case`cloning`:case`starting`:case`stopping`:return`progress`;case`error`:return`critical`;default:return`neutral`}},Upe=e=>e.length===0?`Unknown`:`${e.slice(0,1).toUpperCase()}${e.slice(1)}`,Wpe=({logs:e})=>{let t=(0,N.useRef)(null);(0,N.useEffect)(()=>{t.current!==null&&(t.current.scrollTop=t.current.scrollHeight)},[e]);let n=e.trimEnd().split(`
90
+ `);return(0,L.jsx)(`div`,{"aria-label":`Sandbox logs`,className:z9.logs,ref:t,role:`log`,children:n.map((e,t)=>{let n=e.match(/^\[([^\]]+)\]\s*(.*)$/),r=n?.[1],i=n?.[2]??e;return(0,L.jsxs)(`div`,{className:z9.logLine,children:[r===void 0?null:(0,L.jsx)(`span`,{className:z9.logTimestamp,children:r}),(0,L.jsx)(`span`,{className:z9.logMessage,children:i})]},`${r??`line`}-${String(t)}`)})})},Gpe=({sandboxId:e})=>{let t=KV(ZJ(e)),[n,r]=(0,N.useState)(!1);if(ZB(t))return(0,L.jsx)(`div`,{className:z9.credentialFailure,role:`alert`,children:`Unable to load the code-server password. Reload the sandbox after checking the owner session.`});let i=YB(t)?t.value.password:null;return(0,L.jsxs)(`div`,{className:z9.credentialBar,children:[(0,L.jsx)(`span`,{className:z9.credentialLabel,children:`Authenticated owner access`}),(0,L.jsx)(`code`,{className:z9.credentialCode,children:i===null?`Loading…`:n?i:`••••••••••••`}),(0,L.jsxs)(`div`,{"aria-label":`Sandbox credential actions`,className:z9.credentialActions,role:`group`,children:[(0,L.jsx)(`button`,{"aria-label":n?`Hide code-server password`:`Reveal code-server password`,className:z9.credentialButton,disabled:i===null,onClick:()=>r(e=>!e),type:`button`,children:n?(0,L.jsx)(z_,{"aria-hidden":`true`,size:16}):(0,L.jsx)(V_,{"aria-hidden":`true`,size:16})}),(0,L.jsx)(`button`,{"aria-label":`Copy code-server password`,className:z9.credentialButton,disabled:i===null,onClick:()=>{i!==null&&navigator.clipboard.writeText(i)},type:`button`,children:(0,L.jsx)(j_,{"aria-hidden":`true`,size:16})})]})]})};function Kpe(){let{sandboxId:e}=xr(),[t,n]=$i(),r=KV(hY),i=JV($J),a=JV(eY),o=JV(tY),s=_r();return(0,L.jsx)(qpe,{deleteSandbox:o,initialView:t.get(`view`)===`logs`?`logs`:`editor`,navigate:s,onViewChange:e=>n(e===`logs`?{view:`logs`}:{},{preventScrollReset:!0,replace:!0}),renderCredentials:e=>(0,L.jsx)(Gpe,{sandboxId:e}),restartSandbox:a,sandboxId:e,state:r,stopSandbox:i})}function qpe({deleteSandbox:e,initialView:t,navigate:n,onViewChange:r,renderCredentials:i,restartSandbox:a,sandboxId:o,state:s,stopSandbox:c}){let[l,u]=(0,N.useState)(t===`logs`),d=(0,N.useMemo)(()=>s.sandboxes?.find(e=>e.id===o)??null,[o,s.sandboxes]),f=(0,N.useCallback)(e=>{u(e===`logs`),r(e)},[r]),p=(0,N.useCallback)(()=>{o!==void 0&&c({params:{sandboxId:sK.make(o)}})},[o,c]);if(d===null)return(0,L.jsx)(`div`,{className:z9.loadingPage,children:(0,L.jsx)(m0,{announce:`polite`,className:z9.loadingPanel,description:`CodeCommit is loading the isolated review workspace and its current lifecycle state.`,title:`Loading sandbox`,tone:`progress`})});let m=d.status===`running`,h=Vpe.has(d.status),g=l||!m,_=(d.status===`stopped`||d.status===`error`)&&d.containerId!==null,v=d.status===`stopped`||d.status===`error`,y=m||h,b=d.region===null?`/accounts/${d.awsAccountId}/prs/${d.pullRequestId}`:vX(d.awsAccountId,d.pullRequestId,d.repositoryName,d.region);return(0,L.jsxs)(`div`,{className:z9.workspace,children:[(0,L.jsxs)(`header`,{className:z9.workspaceHeader,children:[(0,L.jsxs)(`div`,{className:z9.workspaceIdentity,children:[(0,L.jsx)(L1,{className:z9.backButton,leadingIcon:`arrow-left`,onClick:()=>n(b),size:`compact`,variant:`quiet`,children:`Back to PR`}),(0,L.jsxs)(`div`,{className:z9.workspaceHeading,children:[(0,L.jsxs)(`p`,{className:z9.workspaceTitle,children:[(0,L.jsx)(`span`,{className:z9.sandboxId,children:d.repositoryName}),` / `,d.sourceBranch]}),(0,L.jsxs)(`p`,{className:z9.workspaceMeta,children:[`PR #`,d.pullRequestId,` · `,d.id]})]}),(0,L.jsx)(H1,{label:Upe(d.status),size:`compact`,tone:Hpe(d.status)})]}),(0,L.jsxs)(`div`,{"aria-label":`Sandbox workspace actions`,className:z9.workspaceActions,role:`group`,children:[d.logs===null?null:(0,L.jsxs)(`div`,{"aria-label":`Workspace view`,className:z9.viewActions,role:`group`,children:[m?(0,L.jsx)(L1,{"aria-pressed":!g,onClick:()=>f(`editor`),size:`compact`,variant:g?`quiet`:`primary`,children:`Editor`}):null,(0,L.jsx)(L1,{"aria-pressed":g,onClick:()=>f(`logs`),size:`compact`,variant:g?`primary`:`quiet`,children:`Logs`})]}),_?(0,L.jsx)(L1,{onClick:()=>a({params:{sandboxId:sK.make(d.id)}}),size:`compact`,variant:`secondary`,children:`Restart`}):null,v?(0,L.jsx)(L1,{onClick:()=>{e({params:{sandboxId:sK.make(d.id)}}),n(`/sandboxes`)},size:`compact`,variant:`quiet`,children:`Delete`}):null,y?(0,L.jsx)(L1,{onClick:p,size:`compact`,variant:`secondary`,children:`Stop`}):null]})]}),m&&!g?i(sK.make(d.id)):null,g?(0,L.jsxs)(`div`,{className:z9.workspaceContent,children:[d.statusDetail===null&&d.error===null?null:(0,L.jsxs)(`div`,{className:z9.workspaceNotice,children:[d.statusDetail===null?null:(0,L.jsx)(`p`,{className:z9.statusDetail,children:d.statusDetail}),d.error===null?null:(0,L.jsx)(m0,{announce:`assertive`,description:d.error,title:`Sandbox stopped before readiness`,tone:`critical`})]}),d.logs===null?(0,L.jsx)(`div`,{className:z9.noLogs,children:(0,L.jsx)(m0,{description:h?`Logs will appear as the reviewed revision is cloned and prepared.`:`This sandbox did not retain lifecycle logs.`,title:h?`Preparing the revision`:`No logs available`,tone:h?`progress`:`neutral`})}):(0,L.jsx)(Wpe,{logs:d.logs})]}):(0,L.jsx)(`iframe`,{className:z9.editorFrame,src:d.port===null?void 0:Bpe(window.location.hostname,d.port),title:`${d.repositoryName} code sandbox`})]})}var Jpe=new Set([`creating`,`cloning`,`starting`]),B9=e=>Jpe.has(e),Ype=e=>{switch(e){case`running`:return`positive`;case`creating`:case`cloning`:case`starting`:case`stopping`:return`progress`;case`error`:return`critical`;default:return`neutral`}},Xpe=e=>e.length===0?`Unknown`:`${e.slice(0,1).toUpperCase()}${e.slice(1)}`,Zpe=e=>{let t=new Date(e),n=Date.now()-t.getTime();return n<6e4?`just now`:n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:`${Math.floor(n/864e5)}d ago`};function Qpe(){let e=KV(hY),t=JV($J),n=JV(eY),r=JV(tY),i=_r();return(0,L.jsx)($pe,{deleteSandbox:r,navigate:i,restartSandbox:n,state:e,stopSandbox:t})}function $pe({deleteSandbox:e,navigate:t,restartSandbox:n,state:r,stopSandbox:i}){let a=r.sandboxes??[],o=a.filter(({status:e})=>e===`running`).length;return(0,L.jsxs)(`div`,{className:z9.page,children:[(0,L.jsxs)(`header`,{className:z9.hero,children:[(0,L.jsxs)(`div`,{className:z9.heroCopy,children:[(0,L.jsx)(`span`,{className:z9.eyebrow,children:`Isolated review environments`}),(0,L.jsx)(W0,{as:`h1`,className:z9.title,variant:`page-title`,children:`Sandboxes`}),(0,L.jsx)(W0,{className:z9.lede,tone:`secondary`,variant:`body-large`,children:`Open a revision in its own authenticated workspace, then keep lifecycle and logs in view.`})]}),(0,L.jsx)(H1,{label:o===1?`1 running`:`${String(o)} running`,tone:o>0?`positive`:`neutral`})]}),a.length===0?(0,L.jsx)(m0,{action:(0,L.jsx)(L1,{className:z9.emptyAction,onClick:()=>t(`/`),variant:`secondary`,children:`Open pull requests`}),className:z9.empty,description:`Choose a pull request, then select "Sandbox" or press "." to create an isolated review workspace.`,title:`No sandboxes yet`}):(0,L.jsxs)(`section`,{"aria-labelledby":`sandbox-inventory-heading`,className:z9.inventory,children:[(0,L.jsxs)(`div`,{className:z9.sectionHeader,children:[(0,L.jsx)(W0,{as:`h2`,className:z9.sectionTitle,id:`sandbox-inventory-heading`,variant:`section-title`,children:`Review environments`}),(0,L.jsx)(W0,{tone:`tertiary`,variant:`meta`,children:a.length===1?`1 sandbox`:`${String(a.length)} sandboxes`})]}),(0,L.jsx)(`div`,{className:z9.sandboxList,children:a.map(r=>{let a=r.status===`running`||B9(r.status),o=(r.status===`stopped`||r.status===`error`)&&r.containerId,s=r.status===`stopped`||r.status===`error`;return(0,L.jsxs)(`article`,{className:z9.sandboxRow,children:[(0,L.jsxs)(`div`,{className:z9.sandboxIdentity,children:[(0,L.jsxs)(`button`,{"aria-label":`Open ${r.repositoryName} sandbox for pull request ${r.pullRequestId}`,className:z9.sandboxOpen,onClick:()=>t(`/sandbox/${r.id}`),type:`button`,children:[(0,L.jsxs)(`span`,{className:z9.sandboxHeading,children:[(0,L.jsx)(`span`,{className:z9.repository,children:r.repositoryName}),(0,L.jsx)(`span`,{className:z9.branch,children:r.sourceBranch}),(0,L.jsx)(H1,{label:Xpe(r.status),size:`compact`,tone:Ype(r.status)})]}),(0,L.jsxs)(`span`,{className:z9.sandboxMeta,children:[(0,L.jsxs)(`span`,{children:[`PR #`,r.pullRequestId]}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:z9.metaSeparator,children:`·`}),(0,L.jsx)(`span`,{children:Zpe(r.createdAt)}),r.port!==null&&r.status===`running`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:z9.metaSeparator,children:`·`}),(0,L.jsxs)(`span`,{className:z9.port,children:[`port `,r.port]})]}):null,r.statusDetail!==null&&B9(r.status)?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:z9.metaSeparator,children:`·`}),(0,L.jsx)(`span`,{className:z9.statusDetailInline,children:r.statusDetail})]}):null]})]}),r.error===null?null:(0,L.jsx)(`p`,{className:z9.errorMessage,children:r.error})]}),(0,L.jsxs)(`div`,{"aria-label":`Actions for ${r.repositoryName}`,className:z9.rowActions,role:`group`,children:[r.logs===null?null:(0,L.jsx)(L1,{onClick:()=>t(`/sandbox/${r.id}?view=logs`),size:`compact`,variant:`quiet`,children:`Logs`}),a?(0,L.jsx)(L1,{onClick:()=>i({params:{sandboxId:sK.make(r.id)}}),size:`compact`,variant:`secondary`,children:`Stop`}):null,o?(0,L.jsx)(L1,{onClick:()=>n({params:{sandboxId:sK.make(r.id)}}),size:`compact`,variant:`secondary`,children:`Restart`}):null,s?(0,L.jsx)(L1,{onClick:()=>e({params:{sandboxId:sK.make(r.id)}}),size:`compact`,variant:`quiet`,children:`Delete`}):null]})]},r.id)})})]})]})}var eme=[{key:`Esc`,desc:`Back / Close`},{key:`R`,desc:`Refresh PRs`},{key:`/`,desc:`Filter PRs`},{key:`1-7`,desc:`Quick filters`},{key:`Enter`,desc:`Open PR details`},{key:`Cmd+P`,desc:`Command palette`}];function tme(){return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`About`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Keyboard shortcuts and info`})]}),(0,L.jsx)(z2,{}),(0,L.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,L.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:`Keyboard Shortcuts`}),eme.map(e=>(0,L.jsxs)(`div`,{className:`flex items-center justify-between py-0.5`,children:[(0,L.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:e.desc}),(0,L.jsx)(`kbd`,{className:`rounded border bg-muted px-1.5 py-0.5 font-mono text-xs`,children:e.key})]},e.key))]})]})}var nme=[`all`,`on`,`off`];function rme(){let e=KV(NJ),t=KV(hY),n=JV(BJ),r=JV(HJ),i=JV(UJ),[a,o]=(0,N.useState)(``),[s,c]=(0,N.useState)(`all`),[l,u]=(0,N.useState)({}),d=(0,N.useRef)(null);(0,N.useEffect)(()=>()=>{d.current&&clearTimeout(d.current)},[]);let f=(0,N.useCallback)(e=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{n({payload:e})},500)},[n]),p=(0,N.useCallback)((e,t)=>{let n=!(l[e]??t.accounts.find(t=>t.profile===e)?.enabled??!0),r={...l,[e]:n};u(r),f({accounts:t.accounts.map(t=>({profile:t.profile,regions:[...t.regions],enabled:t.profile===e?n:r[t.profile]??t.enabled})),autoDetect:t.autoDetect,autoRefresh:t.autoRefresh,refreshIntervalSeconds:t.refreshIntervalSeconds})},[f,l]);return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Accounts`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`AWS profiles configured for CodeCommit`})]}),(0,L.jsx)(z2,{}),aV(e).onInitialOrWaiting(()=>(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`})).onDefect(()=>(0,L.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load config`})).onSuccess(e=>(0,L.jsx)(ime,{currentUser:t.currentUser,data:e,overrides:l,search:a,setSearch:o,statusFilter:s,setStatusFilter:c,toggleAccount:p,onSsoLogin:e=>{try{r({payload:{profile:XR(iK)(e)}})}catch{}},onSsoLogout:()=>i({})})).render()]})}function ime({currentUser:e,data:t,onSsoLogin:n,onSsoLogout:r,overrides:i,search:a,setSearch:o,setStatusFilter:s,statusFilter:c,toggleAccount:l}){let u=(0,N.useMemo)(()=>t.accounts.map(e=>({...e,enabled:i[e.profile]??e.enabled})),[t.accounts,i]),d=(0,N.useMemo)(()=>{let e=a.toLowerCase();return u.filter(t=>!(c===`on`&&!t.enabled||c===`off`&&t.enabled||e&&!t.profile.toLowerCase().includes(e)&&!t.regions.some(t=>t.toLowerCase().includes(e))))},[u,a,c]),f=u.filter(e=>e.enabled),p=f.length;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,L.jsx)(Xv,{className:`size-4 text-muted-foreground`}),e?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Current user:`}),(0,L.jsx)(`span`,{className:`font-medium`,children:e}),(0,L.jsx)(l2,{variant:`ghost`,size:`sm`,className:`h-6 px-1.5 text-xs`,title:`SSO Logout`,onClick:()=>r(),children:(0,L.jsx)(dv,{className:`size-3`})})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Not logged in`}),f[0]&&(()=>{let e=f[0].profile;return(0,L.jsx)(l2,{variant:`ghost`,size:`sm`,className:`h-6 px-1.5 text-xs`,title:`SSO Login`,onClick:()=>n(e),children:(0,L.jsx)(lv,{className:`size-3`})})})()]})]}),u.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground py-4`,children:`No accounts configured. Edit the config file to add AWS profiles.`}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsxs)(`div`,{className:`relative flex-1`,children:[(0,L.jsx)(Lv,{className:`absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground`}),(0,L.jsx)(v2,{placeholder:`Search profiles...`,value:a,onChange:e=>o(e.target.value),className:`h-8 pl-8 text-sm`})]}),(0,L.jsx)(u2,{children:nme.map(e=>(0,L.jsx)(l2,{variant:c===e?`default`:`outline`,size:`sm`,className:`h-8 px-2.5 text-xs capitalize`,onClick:()=>s(e),children:e},e))})]}),(0,L.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[p,`/`,u.length,` enabled`,d.length!==u.length&&` · ${d.length} shown`]}),(0,L.jsxs)(`div`,{className:`divide-y rounded-md border`,children:[d.map(e=>(0,L.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,L.jsx)(hee,{className:`size-3.5 text-muted-foreground shrink-0`}),(0,L.jsx)(`span`,{className:`text-sm font-medium truncate`,children:e.profile}),(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground truncate`,children:e.regions.join(`, `)||`default`})]}),(0,L.jsx)(l2,{variant:e.enabled?`default`:`outline`,size:`sm`,className:`ml-2 h-6 px-2 text-xs shrink-0`,onClick:()=>l(e.profile,t),children:e.enabled?`On`:`Off`})]},e.profile)),d.length===0&&(0,L.jsx)(`p`,{className:`px-3 py-4 text-center text-sm text-muted-foreground`,children:`No matching accounts`})]})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,L.jsx)(tv,{className:`size-3`}),`Auto-detect: `,t.autoDetect?`enabled`:`disabled`]})]})}function ame(){let e=_r(),t=KV(uY),n=JV(dY),r=JV(mY),[i,a]=(0,N.useState)(!0),[o,s]=(0,N.useState)(30),[c,l]=(0,N.useState)(!1);(0,N.useEffect)(()=>{YB(t)&&(a(t.value.enabled),s(t.value.retentionDays),l(!1))},[t]);let[u,d]=(0,N.useState)(!1);return(0,N.useEffect)(()=>{u&&YB(t)&&(d(!1),l(!1))},[u,t]),(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h3`,{className:`text-lg font-semibold`,children:`Audit Log`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Record every AWS API call made by the app`})]}),(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`label`,{className:`flex items-center justify-between rounded-md border px-3 py-3`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm font-medium`,children:`Enable audit logging`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Log all API calls with permission state and duration`})]}),(0,L.jsx)(`button`,{role:`switch`,"aria-checked":i,onClick:()=>{a(!i),l(!0)},className:`relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors ${i?`bg-primary`:`bg-muted`}`,children:(0,L.jsx)(`span`,{className:`pointer-events-none block size-4 rounded-full bg-background shadow-lg transition-transform ${i?`translate-x-4`:`translate-x-0`}`})})]}),(0,L.jsxs)(`div`,{className:`rounded-md border px-3 py-3 space-y-2`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium`,children:`Retention period (days)`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Entries older than this are pruned on server start`}),(0,L.jsxs)(y2,{value:String(o),onValueChange:e=>{s(Number(e)),l(!0)},children:[(0,L.jsx)(x2,{className:`w-36`,children:(0,L.jsx)(b2,{})}),(0,L.jsxs)(S2,{children:[(0,L.jsx)(C2,{value:`7`,children:`7 days`}),(0,L.jsx)(C2,{value:`14`,children:`14 days`}),(0,L.jsx)(C2,{value:`30`,children:`30 days`}),(0,L.jsx)(C2,{value:`60`,children:`60 days`}),(0,L.jsx)(C2,{value:`90`,children:`90 days`}),(0,L.jsx)(C2,{value:`180`,children:`180 days`}),(0,L.jsx)(C2,{value:`365`,children:`365 days`})]})]})]})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-0 rounded-md border w-fit`,children:[(0,L.jsx)(l2,{size:`sm`,disabled:!c,onClick:()=>{n({payload:{enabled:i,retentionDays:o}}),d(!0)},className:`rounded-r-none border-0`,children:`Save`}),(0,L.jsx)(l2,{variant:`outline`,size:`sm`,onClick:()=>e(`/audit`),className:`rounded-l-none border-0 border-l`,children:`View Audit Log`})]}),(0,L.jsx)(l2,{variant:`destructive`,size:`sm`,onClick:()=>r({}),children:`Clear All Logs`})]})]})}var ome=e=>e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`;function V9({copied:e,copyKey:t,detail:n,label:r,onCopy:i,path:a}){return(0,L.jsxs)(`div`,{className:`flex items-baseline gap-3 py-1.5`,children:[(0,L.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground w-24`,children:r}),(0,L.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,L.jsx)(`code`,{className:`truncate text-xs font-mono`,children:a}),(0,L.jsx)(`button`,{onClick:()=>i(a,t),className:`shrink-0 rounded p-0.5 hover:bg-muted`,children:e===t?(0,L.jsx)(x_,{className:`size-3 text-green-500`}):(0,L.jsx)(j_,{className:`size-3 text-muted-foreground`})})]}),(0,L.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:n})]})]})}function sme(){let e=KV(LJ),t=KV(zJ),n=KV(RJ),r=JV(VJ),[i,a]=(0,N.useState)(null),[o,s]=(0,N.useState)(!1),c=(0,N.useCallback)((e,t)=>{navigator.clipboard.writeText(e).then(()=>{a(t),setTimeout(()=>a(null),2e3)},()=>{})},[]),l=(0,N.useCallback)(async()=>{s(!0);try{await r({})}finally{s(!1)}},[r]),u=e=>e?`Modified ${K$(new Date(e),new Date,``).trim()}`:``;return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Configuration`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`File locations, validation, and storage`})]}),(0,L.jsx)(z2,{}),(0,L.jsxs)(`div`,{className:`space-y-1`,children:[aV(e).onInitialOrWaiting(()=>(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground py-1`,children:`Loading config path...`})).onError(()=>(0,L.jsx)(`p`,{className:`text-xs text-destructive py-1`,children:`Failed to load config path`})).onDefect(()=>(0,L.jsx)(`p`,{className:`text-xs text-destructive py-1`,children:`Failed to load config path`})).onSuccess(e=>{let n=YB(t)?` · ${t.value.status}`:``,r=e.exists?`${u(e.modifiedAt)}${n}`:`Not created yet${n}`;return(0,L.jsx)(V9,{label:`Config file`,path:e.path,detail:r,copyKey:`config`,copied:i,onCopy:c})}).render(),aV(t).onInitialOrWaiting(()=>null).onError(()=>null).onDefect(()=>null).onSuccess(e=>e.errors.length>0?(0,L.jsx)(`div`,{className:`ml-27 rounded bg-destructive/10 px-2 py-1 text-[11px] text-destructive`,children:e.errors.map((e,t)=>(0,L.jsx)(`p`,{children:e},t))}):null).render(),(0,L.jsx)(z2,{}),aV(n).onInitialOrWaiting(()=>(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground py-1`,children:`Loading database info...`})).onError(()=>(0,L.jsx)(`p`,{className:`text-xs text-destructive py-1`,children:`Failed to load database info`})).onDefect(()=>(0,L.jsx)(`p`,{className:`text-xs text-destructive py-1`,children:`Failed to load database info`})).onSuccess(e=>{let t=e.exists?`${ome(e.sizeBytes)} · ${u(e.modifiedAt)}`:`Not created yet`;return(0,L.jsx)(V9,{label:`Cache database`,path:e.path,detail:t,copyKey:`db`,copied:i,onCopy:c})}).render()]}),(0,L.jsx)(z2,{}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsxs)(`div`,{className:`flex-1`,children:[(0,L.jsx)(`p`,{className:`text-sm font-medium`,children:`Reset to Defaults`}),(0,L.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`Backs up current config, then re-detects AWS profiles`})]}),(0,L.jsxs)(l2,{variant:`outline`,size:`sm`,onClick:l,disabled:o,className:`shrink-0 gap-2`,children:[(0,L.jsx)(mee,{className:E$(`size-3.5`,o&&`animate-spin`)}),o?`Resetting...`:`Reset`]})]})]})}var H9=(e,t)=>{try{let n=localStorage.getItem(e);return n===null?t:n===`true`}catch{return t}},cme=(e,t)=>{try{let n=localStorage.getItem(e);return n===null?t:Number(n)||t}catch{return t}},lme=[{label:`30 min`,ms:18e5},{label:`1 hour`,ms:36e5},{label:`2 hours`,ms:72e5},{label:`4 hours`,ms:144e5}];function ume(){let[e,t]=(0,N.useState)(()=>H9(oy.desktopNotifications,!1)),[n,r]=(0,N.useState)(()=>H9(oy.reminders,!0)),[i,a]=(0,N.useState)(()=>cme(oy.reminderInterval,36e5)),[o,s]=(0,N.useState)(LX()?.permission??`unsupported`),c=(0,N.useCallback)(async()=>{if(!e&&o==="default"){let e=LX();if(e===void 0){s(`unsupported`);return}let t=await e.requestPermission();if(s(t),t!==`granted`)return}let n=!e;t(n);try{localStorage.setItem(oy.desktopNotifications,String(n))}catch{}},[e,o]),l=(0,N.useCallback)(()=>{let e=!n;r(e);try{localStorage.setItem(oy.reminders,String(e))}catch{}},[n]),u=(0,N.useCallback)(e=>{a(e);try{localStorage.setItem(oy.reminderInterval,String(e))}catch{}},[]);return(0,N.useEffect)(()=>{let e=()=>{let e=LX();e!==void 0&&s(e.permission)};return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},[]),(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Notifications`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Desktop notifications and review reminders`})]}),(0,L.jsx)(z2,{}),(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg border p-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(r_,{className:`size-5 text-muted-foreground`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm font-medium`,children:`Desktop Notifications`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:o===`unsupported`?`Not available in this browser`:o===`denied`?`Blocked by browser — enable in site settings`:`Show browser notifications for approval requests and PR updates`})]})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[o===`granted`&&(0,L.jsx)(s2,{variant:`outline`,className:`text-xs`,children:`Granted`}),(0,L.jsx)(`button`,{role:`switch`,"aria-checked":e,onClick:c,disabled:o===`unsupported`||o===`denied`,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${e?`bg-primary`:`bg-muted`} ${o===`unsupported`||o===`denied`?`opacity-50 cursor-not-allowed`:`cursor-pointer`}`,children:(0,L.jsx)(`span`,{className:`inline-block size-4 rounded-full bg-white transition-transform ${e?`translate-x-6`:`translate-x-1`}`})})]})]}),(0,L.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg border p-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(D_,{className:`size-5 text-muted-foreground`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm font-medium`,children:`Review Reminders`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Periodic reminders for PRs awaiting your review`})]})]}),(0,L.jsx)(`button`,{role:`switch`,"aria-checked":n,onClick:l,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors cursor-pointer ${n?`bg-primary`:`bg-muted`}`,children:(0,L.jsx)(`span`,{className:`inline-block size-4 rounded-full bg-white transition-transform ${n?`translate-x-6`:`translate-x-1`}`})})]}),n&&(0,L.jsxs)(`div`,{className:`rounded-lg border p-4`,children:[(0,L.jsx)(`p`,{className:`text-sm font-medium mb-2`,children:`Reminder Interval`}),(0,L.jsx)(`div`,{className:`flex gap-2`,children:lme.map(e=>(0,L.jsx)(`button`,{"aria-pressed":i===e.ms,onClick:()=>u(e.ms),className:`rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${i===e.ms?`bg-primary text-primary-foreground`:`bg-muted text-muted-foreground hover:bg-muted/80`}`,children:e.label},e.ms))})]})]})]})}var dme=`always_allow`,fme=e=>e===`always_allow`||e===`allow`||e===`deny`;function pme(){let e=KV(oY),t=JV(cY),n=JV(lY),r=YB(e)?e.value:[],i=r.filter(e=>e.category===`read`),a=r.filter(e=>e.category===`write`),o=()=>{for(let e of r)e.state!==`always_allow`&&t({payload:{operation:e.operation,state:dme}})},s=(e,n)=>(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`h4`,{className:`text-sm font-medium text-muted-foreground`,children:e}),n.map(e=>(0,L.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border px-3 py-2`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,L.jsx)(s2,{variant:e.category===`write`?`destructive`:`secondary`,className:`text-xs shrink-0`,children:e.category}),(0,L.jsxs)(`div`,{className:`min-w-0`,children:[(0,L.jsx)(`code`,{className:`text-xs font-mono`,children:e.operation}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:e.description})]})]}),(0,L.jsxs)(y2,{value:e.state,onValueChange:n=>{fme(n)&&t({payload:{operation:e.operation,state:n}})},children:[(0,L.jsx)(x2,{className:`w-36 shrink-0`,children:(0,L.jsx)(b2,{})}),(0,L.jsxs)(S2,{children:[(0,L.jsx)(C2,{value:`always_allow`,children:`Always Allow`}),(0,L.jsx)(C2,{value:`allow`,children:`Ask Each Time`}),(0,L.jsx)(C2,{value:`deny`,children:`Deny`})]})]})]},e.operation))]});return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h3`,{className:`text-lg font-semibold`,children:`API Permissions`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Control which AWS API calls the app can make`})]}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(l2,{variant:`outline`,size:`sm`,onClick:o,children:`Always Allow All`}),(0,L.jsx)(l2,{variant:`outline`,size:`sm`,onClick:()=>n({}),children:`Reset (Clear All)`})]}),qB(e)?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`}):(0,L.jsxs)(`div`,{className:`space-y-6`,children:[s(`Read Operations`,i),s(`Write Operations`,a)]})]})}var mme=[{label:`1 min`,value:60},{label:`5 min`,value:300},{label:`10 min`,value:600},{label:`15 min`,value:900},{label:`30 min`,value:1800}];function hme(){let e=KV(NJ),t=JV(BJ),n=(0,N.useRef)(null),r=(0,N.useRef)(null),[i,a]=(0,N.useState)({});(0,N.useEffect)(()=>{YB(e)&&(r.current=e.value)},[e]),(0,N.useEffect)(()=>{let e=new BroadcastChannel(`codecommit-config`);return n.current=e,e.onmessage=e=>{a(t=>({...t,...e.data}))},()=>e.close()},[]);let o=(0,N.useCallback)(e=>{let i=r.current;i&&(a(t=>({...t,...e})),n.current?.postMessage(e),t({payload:{accounts:i.accounts.map(e=>({profile:e.profile,regions:[...e.regions],enabled:e.enabled})),autoDetect:i.autoDetect,autoRefresh:e.autoRefresh??i.autoRefresh,refreshIntervalSeconds:e.refreshIntervalSeconds??i.refreshIntervalSeconds}}))},[t]);return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Auto-refresh`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Periodically fetch PR updates from AWS`})]}),(0,L.jsx)(z2,{}),aV(e).onInitialOrWaiting(()=>(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`})).onDefect(()=>(0,L.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load config`})).onSuccess(e=>{let t=i.autoRefresh??e.autoRefresh,n=i.refreshIntervalSeconds??e.refreshIntervalSeconds;return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,L.jsx)(Mv,{className:`size-4 text-muted-foreground`}),(0,L.jsx)(`span`,{children:`Auto-refresh`})]}),(0,L.jsx)(l2,{variant:t?`default`:`outline`,size:`sm`,className:`h-7 px-3 text-xs`,onClick:()=>o({autoRefresh:!t}),children:t?`On`:`Off`})]}),t&&(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Refresh interval`}),(0,L.jsx)(u2,{children:mme.map(e=>(0,L.jsx)(l2,{variant:n===e.value?`default`:`outline`,size:`sm`,className:`h-7 px-3 text-xs`,onClick:()=>o({refreshIntervalSeconds:e.value}),children:e.label},e.value))})]})]})}).render()]})}var gme=(e,t,n)=>{let r=e.skillIds.includes(t);return n?r||e.skillIds.length>=24?e:{...e,skillIds:[...e.skillIds,t]}:r?{...e,skillIds:e.skillIds.filter(e=>e!==t)}:e},_me=(e,t)=>!e.skillIds.includes(t)&&e.skillIds.length>=24,vme=(e,t)=>{let n=new Set(t.map(({id:e})=>e));return[...t.map(e=>({...e,available:!0})),...e.skillIds.filter(e=>!n.has(e)).map(e=>({id:e,name:e,description:`No longer available in this environment; deselect it to repair the profile`,source:`unavailable`,available:!1}))]};function yme({disabled:e=!1,onSkillChange:t,profile:n,skills:r}){return(0,L.jsx)(`div`,{className:`grid gap-2 md:grid-cols-2`,children:vme(n,r).map(r=>(0,L.jsxs)(`label`,{className:`flex items-start gap-2 rounded-md border p-3 text-sm`,children:[(0,L.jsx)(`input`,{checked:n.skillIds.includes(r.id),disabled:e||_me(n,r.id),onChange:e=>t(r.id,e.target.checked),type:`checkbox`}),(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`b`,{children:r.name}),(0,L.jsxs)(`small`,{className:`block text-muted-foreground`,children:[r.description,` · `,r.source]})]})]},r.id))})}function bme(){let e=KV(NJ),t=KV(PJ),n=JV(BJ,{mode:`promiseExit`}),r=_r();return(0,L.jsx)(Sme,{config:e,onReload:()=>void r(0),saveConfig:n,skills:t})}var xme=e=>DS(IO(e),{onNone:()=>`Failed to save Relay profiles`,onSome:e=>e.message});function Sme({config:e,onReload:t=()=>void 0,saveConfig:n,skills:r}){let i=(0,N.useRef)(null),[a,o]=(0,N.useState)(null),[s,c]=(0,N.useState)(null),[l,u]=(0,N.useState)(!1),[d,f]=(0,N.useState)(null),[p,m]=(0,N.useState)(!1);(0,N.useEffect)(()=>{YB(e)&&(i.current=e.value,a===null&&(o(e.value.review),c(e.value.review)))},[e,a]);let h=(0,N.useCallback)((e,t,n)=>{m(!1),o(r=>r===null?null:{...r,profiles:r.profiles.map(r=>r.id===e?gme(r,t,n):r)})},[]),g=(0,N.useCallback)((e,t)=>{m(!1),o(n=>n===null?null:{...n,profiles:n.profiles.map(n=>n.id===e?{...n,...t}:n)})},[]),_=(0,N.useCallback)(async()=>{let e=i.current;if(e===null||a===null)return;u(!0),f(null),m(!1);let t={accounts:e.accounts.map(({enabled:e,profile:t,regions:n})=>({enabled:e,profile:t,regions:[...n]})),autoDetect:e.autoDetect,autoRefresh:e.autoRefresh,refreshIntervalSeconds:e.refreshIntervalSeconds,review:a},r=await n({payload:e.sandbox===void 0?t:{...t,sandbox:e.sandbox},reactivityKeys:[`config`]});FO(r)?(c(a),r.value===`saved-refresh-failed`?f(`Relay profiles were saved, but pull-request refresh failed; reload before running Relay`):m(!0)):f(xme(r)),u(!1)},[a,n]),v=a!==null&&s!==null&&JSON.stringify(a)!==JSON.stringify(s);return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Relay review profiles`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Default focus and prompt-only skills for Diff & Relay`})]}),YB(e)&&a!==null?(0,L.jsx)(l2,{disabled:!v||l,onClick:()=>void _(),size:`sm`,children:l?`Saving…`:p?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(l_,{className:`size-3.5`}),` Saved`]}):`Save`}):null]}),d===null?null:(0,L.jsx)(`p`,{className:`text-sm text-destructive`,role:`alert`,children:d}),(0,L.jsx)(z2,{}),ZB(e)?(0,L.jsxs)(`div`,{className:`space-y-2 rounded-lg border border-destructive/40 bg-destructive/5 p-4`,role:`alert`,children:[(0,L.jsx)(`p`,{className:`text-sm font-medium text-destructive`,children:`Could not load Relay profiles`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Check the server connection, then reload this page to retry.`}),(0,L.jsx)(l2,{onClick:t,size:`sm`,variant:`outline`,children:`Reload`})]}):!YB(e)||a===null?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading profiles…`}):(0,L.jsxs)(`div`,{className:`space-y-5`,children:[(0,L.jsxs)(`label`,{className:`grid gap-2 text-sm font-medium`,children:[`Default profile`,(0,L.jsx)(`select`,{className:`h-9 rounded-md border bg-transparent px-3 text-sm`,disabled:l,onChange:e=>{m(!1),o(t=>t===null?null:{...t,defaultProfileId:e.target.value})},value:a.defaultProfileId,children:a.profiles.map(e=>(0,L.jsx)(`option`,{value:e.id,children:e.name},e.id))})]}),ZB(r)?(0,L.jsx)(`p`,{className:`rounded-md border border-destructive/40 bg-destructive/5 p-3 text-xs text-destructive`,role:`alert`,children:`Environment skills could not be loaded. Reload this page to retry.`}):null,a.profiles.map(e=>(0,L.jsxs)(`section`,{className:`space-y-3 rounded-lg border p-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h3`,{className:`text-sm font-semibold`,children:e.name}),(0,L.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.provider,` · `,e.harness,` · `,e.model]})]}),(0,L.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,L.jsxs)(`label`,{className:`grid gap-1 text-xs font-medium`,children:[`Review kind`,(0,L.jsxs)(`select`,{className:`h-9 rounded-md border bg-transparent px-3 text-sm`,disabled:l,onChange:t=>{let n=AK.find(e=>e===t.target.value);n!==void 0&&g(e.id,{kind:n})},value:e.kind,children:[(0,L.jsx)(`option`,{value:`review`,children:`Full review`}),(0,L.jsx)(`option`,{value:`security`,children:`Security`}),(0,L.jsx)(`option`,{value:`tests`,children:`Tests`}),(0,L.jsx)(`option`,{value:`explain`,children:`Explain`})]})]}),(0,L.jsxs)(`label`,{className:`grid gap-1 text-xs font-medium`,children:[`Provider`,(0,L.jsx)(`select`,{className:`h-9 rounded-md border bg-transparent px-3 text-sm`,disabled:l,onChange:t=>{let n=PK.find(e=>e===t.target.value);n!==void 0&&g(e.id,{provider:n,harness:n===`claude`?`native-claude`:`native-codex`,model:n===`claude`?e.model==="default"||e.model===`configured-default`?e.model:`configured-default`:e.model==="default"?`configured-default`:e.model})},value:e.provider,children:PK.map(e=>(0,L.jsx)(`option`,{children:e},e))})]}),(0,L.jsxs)(`label`,{className:`grid gap-1 text-xs font-medium`,children:[`Harness`,(0,L.jsx)(`select`,{className:`h-9 rounded-md border bg-transparent px-3 text-sm`,disabled:l,onChange:t=>{let n=FK.find(e=>e===t.target.value);n!==void 0&&g(e.id,{harness:n})},value:e.harness,children:FK.filter(t=>t===(e.provider===`claude`?`native-claude`:`native-codex`)).map(e=>(0,L.jsx)(`option`,{children:e},e))})]}),(0,L.jsxs)(`label`,{className:`grid gap-1 text-xs font-medium`,children:[`Model`,(0,L.jsx)(`select`,{className:`h-9 rounded-md border bg-transparent px-3 text-sm`,disabled:l,onChange:t=>{let n=IK.find(e=>e===t.target.value);n!==void 0&&g(e.id,{model:n})},value:e.model,children:LK(e.provider).map(e=>(0,L.jsx)(`option`,{children:e},e))})]})]}),(0,L.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.skillIds.length,`/`,24,` prompt-only methods selected`]}),YB(r)?(0,L.jsx)(yme,{disabled:l,onSkillChange:(t,n)=>h(e.id,t,n),profile:e,skills:r.value}):ZB(r)?(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Skill selection unavailable.`}):(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Loading environment skills…`})]},e.id)),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Skills are injected as prompt-only review methods. Relay cannot run their tools or open referenced files.`})]})]})}var U9=`/tmp/.local/share`,Cme=[{label:`Node 22`,cmd:`export NVM_DIR="$HOME/.nvm" && curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | sh && . "$NVM_DIR/nvm.sh" && nvm install 22`},{label:`pnpm`,cmd:`npm install --global --prefix "$HOME/.local" pnpm && echo 'export PATH="$HOME/.local/bin:$PATH"' >> "$HOME/.profile"`},{label:`Bun`,cmd:`curl -fsSL https://bun.sh/install | bash && echo 'export PATH="$HOME/.bun/bin:$PATH"' >> ~/.bashrc && echo 'export PATH="$HOME/.bun/bin:$PATH"' >> ~/.profile`}],wme=[{label:`VS Code Extensions`,mount:{hostPath:`~/.codecommit/sandbox-volumes/extensions`,containerPath:`${U9}/code-server/extensions`,readonly:!1}},{label:`VS Code Settings`,mount:{hostPath:`~/.codecommit/sandbox-volumes/settings.json`,containerPath:`${U9}/code-server/User/settings.json`,readonly:!0}},{label:`VS Code Keybindings`,mount:{hostPath:`~/.codecommit/sandbox-volumes/keybindings.json`,containerPath:`${U9}/code-server/User/keybindings.json`,readonly:!0}}],Tme={image:`codercom/code-server@sha256:b88ed46a6ace76a0294a17a24f39aa88032ed0a3692c3d8ab5433b47ab57ccbf`,extensions:[],setupCommands:[],env:{},volumeMounts:[],cloneDepth:0};function Eme(){let e=KV(NJ),t=JV(BJ,{mode:`promise`});return(0,L.jsx)(Dme,{config:e,saveConfig:t})}function Dme({config:e,saveConfig:t}){let n=(0,N.useRef)(null),[r,i]=(0,N.useState)(null),[a,o]=(0,N.useState)(null),[s,c]=(0,N.useState)(!1),[l,u]=(0,N.useState)(!1),[d,f]=(0,N.useState)(null),p=(0,N.useRef)(null);(0,N.useEffect)(()=>()=>{p.current!==null&&clearTimeout(p.current)},[]),(0,N.useEffect)(()=>{if(YB(e)&&(n.current=e.value,!r)){let t=e.value.sandbox??Tme;i(t),o(t)}},[e,r]);let m=(0,N.useMemo)(()=>r!==null&&a!==null&&JSON.stringify(r)!==JSON.stringify(a),[r,a]),h=(0,N.useCallback)(e=>{u(!1),f(null),i(t=>t&&{...t,...e})},[]),g=(0,N.useCallback)(async()=>{let e=n.current;if(e&&r){c(!0),u(!1),f(null);try{await t({payload:{accounts:e.accounts.map(e=>({profile:e.profile,regions:[...e.regions],enabled:e.enabled})),autoDetect:e.autoDetect,autoRefresh:e.autoRefresh,refreshIntervalSeconds:e.refreshIntervalSeconds,sandbox:r}}),o(r),u(!0),p.current!==null&&clearTimeout(p.current),p.current=setTimeout(()=>u(!1),600)}catch(e){f(Vy(e)?e.message:`Failed to save sandbox settings`)}finally{c(!1)}}},[t,r]);return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Sandbox`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Docker sandbox defaults for code review environments`})]}),r&&(0,L.jsx)(l2,{size:`sm`,className:`h-8 gap-1.5 px-3`,disabled:!m||s,onClick:g,children:s?`Saving…`:l?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(l_,{className:`size-3.5`}),` Saved`]}):`Save`})]}),d!==null&&(0,L.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:d}),(0,L.jsx)(z2,{}),aV(e).onInitialOrWaiting(()=>(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`})).onDefect(()=>(0,L.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load config`})).onSuccess(()=>r&&(0,L.jsx)(Ome,{settings:r,onChange:h})).render()]})}function Ome({onChange:e,settings:t}){let[n,r]=(0,N.useState)(``),[i,a]=(0,N.useState)(``),[o,s]=(0,N.useState)(``),[c,l]=(0,N.useState)(``),[u,d]=(0,N.useState)(``),[f,p]=(0,N.useState)(``),[m,h]=(0,N.useState)(!1);return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium`,children:`Docker Image`}),(0,L.jsx)(v2,{value:t.image,placeholder:`codercom/code-server@sha256:…`,onChange:t=>e({image:t.target.value}),className:`h-8 text-sm`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Digest-pinned base image for sandboxes. Must have code-server or install via setup commands.`})]}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium`,children:`Clone Depth`}),(0,L.jsx)(`div`,{className:`flex gap-1.5`,children:[{label:`Full`,value:0},{label:`1`,value:1},{label:`10`,value:10},{label:`50`,value:50},{label:`100`,value:100}].map(n=>(0,L.jsx)(l2,{variant:t.cloneDepth===n.value?`default`:`outline`,size:`sm`,className:`h-7 px-3 text-xs`,onClick:()=>e({cloneDepth:n.value}),children:n.label},n.value))}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`0 = full history. Higher values speed up clone but limit git log.`})]}),(0,L.jsx)(z2,{}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium`,children:`VS Code Extensions`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Installed via code-server --install-extension`}),(0,L.jsx)(Ame,{settings:t,onChange:e}),(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:t.extensions.map(n=>(0,L.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-muted px-2 py-0.5 text-xs`,children:[(0,L.jsx)(a_,{className:`size-3 text-muted-foreground`}),n,(0,L.jsx)(`button`,{className:`ml-0.5 text-muted-foreground hover:text-foreground`,onClick:()=>e({extensions:t.extensions.filter(e=>e!==n)}),children:(0,L.jsx)(Qv,{className:`size-3`})})]},n))}),(0,L.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,L.jsx)(v2,{value:n,placeholder:`publisher.extension-id`,onChange:e=>r(e.target.value),onKeyDown:i=>{i.key===`Enter`&&n.trim()&&(e({extensions:[...t.extensions,n.trim()]}),r(``))},className:`h-8 text-sm flex-1`}),(0,L.jsx)(l2,{variant:`outline`,size:`sm`,className:`h-8`,disabled:!n.trim(),onClick:()=>{e({extensions:[...t.extensions,n.trim()]}),r(``)},children:(0,L.jsx)(kv,{className:`size-3.5`})})]})]}),(0,L.jsx)(z2,{}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium`,children:`Setup Commands`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Shell commands run in container after ready`}),(0,L.jsx)(jme,{settings:t,onChange:e}),(0,L.jsx)(`div`,{className:`space-y-1.5`,children:t.setupCommands.map((n,r)=>(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,L.jsx)(`code`,{className:`flex-1 rounded-md bg-muted px-2 py-1 text-xs font-mono truncate`,children:n}),(0,L.jsx)(`button`,{className:`text-muted-foreground hover:text-destructive shrink-0`,onClick:()=>e({setupCommands:t.setupCommands.filter((e,t)=>t!==r)}),children:(0,L.jsx)(qv,{className:`size-3.5`})})]},r))}),(0,L.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,L.jsx)(v2,{value:i,placeholder:`npm i -g tsx`,onChange:e=>a(e.target.value),onKeyDown:n=>{n.key===`Enter`&&i.trim()&&(e({setupCommands:[...t.setupCommands,i.trim()]}),a(``))},className:`h-8 text-sm font-mono flex-1`}),(0,L.jsx)(l2,{variant:`outline`,size:`sm`,className:`h-8`,disabled:!i.trim(),onClick:()=>{e({setupCommands:[...t.setupCommands,i.trim()]}),a(``)},children:(0,L.jsx)(kv,{className:`size-3.5`})})]})]}),(0,L.jsx)(z2,{}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium`,children:`Environment Variables`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Extra env vars injected into sandbox container`}),(0,L.jsx)(`div`,{className:`space-y-1.5`,children:Object.entries(t.env).map(([n,r])=>(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,L.jsx)(`code`,{className:`rounded-md bg-muted px-2 py-1 text-xs font-mono`,children:n}),(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`=`}),(0,L.jsx)(`code`,{className:`flex-1 rounded-md bg-muted px-2 py-1 text-xs font-mono truncate`,children:r}),(0,L.jsx)(`button`,{className:`text-muted-foreground hover:text-destructive shrink-0`,onClick:()=>{let r={...t.env};delete r[n],e({env:r})},children:(0,L.jsx)(qv,{className:`size-3.5`})})]},n))}),(0,L.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,L.jsx)(v2,{value:o,placeholder:`KEY`,onChange:e=>s(e.target.value),className:`h-8 text-sm font-mono w-32`}),(0,L.jsx)(`span`,{className:`flex items-center text-xs text-muted-foreground`,children:`=`}),(0,L.jsx)(v2,{value:c,placeholder:`value`,onChange:e=>l(e.target.value),onKeyDown:n=>{n.key===`Enter`&&o.trim()&&(e({env:{...t.env,[o.trim()]:c}}),s(``),l(``))},className:`h-8 text-sm font-mono flex-1`}),(0,L.jsx)(l2,{variant:`outline`,size:`sm`,className:`h-8`,disabled:!o.trim(),onClick:()=>{e({env:{...t.env,[o.trim()]:c}}),s(``),l(``)},children:(0,L.jsx)(kv,{className:`size-3.5`})})]})]}),(0,L.jsx)(z2,{}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium`,children:`Volume Mounts`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Map host paths into the container`}),(0,L.jsx)(Mme,{settings:t,onChange:e}),(0,L.jsx)(`div`,{className:`space-y-1.5`,children:t.volumeMounts.map((n,r)=>(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,L.jsx)(`code`,{className:`rounded-md bg-muted px-2 py-1 text-xs font-mono truncate`,children:n.hostPath}),(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:`:`}),(0,L.jsx)(`code`,{className:`flex-1 rounded-md bg-muted px-2 py-1 text-xs font-mono truncate`,children:n.containerPath}),n.readonly&&(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:`(ro)`}),(0,L.jsx)(`button`,{className:`text-muted-foreground hover:text-destructive shrink-0`,onClick:()=>e({volumeMounts:t.volumeMounts.filter((e,t)=>t!==r)}),children:(0,L.jsx)(qv,{className:`size-3.5`})})]},r))}),(0,L.jsxs)(`div`,{className:`flex gap-1.5 items-center`,children:[(0,L.jsx)(v2,{value:u,placeholder:`/host/path`,onChange:e=>d(e.target.value),className:`h-8 text-sm font-mono flex-1`}),(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:`:`}),(0,L.jsx)(v2,{value:f,placeholder:`/container/path`,onChange:e=>p(e.target.value),onKeyDown:n=>{n.key===`Enter`&&u.trim()&&f.trim()&&(e({volumeMounts:[...t.volumeMounts,{hostPath:u.trim(),containerPath:f.trim(),readonly:m}]}),d(``),p(``),h(!1))},className:`h-8 text-sm font-mono flex-1`}),(0,L.jsx)(l2,{variant:m?`default`:`outline`,size:`sm`,className:`h-8 px-2 text-xs shrink-0`,onClick:()=>h(!m),title:`Read-only`,children:`RO`}),(0,L.jsx)(l2,{variant:`outline`,size:`sm`,className:`h-8`,disabled:!u.trim()||!f.trim(),onClick:()=>{e({volumeMounts:[...t.volumeMounts,{hostPath:u.trim(),containerPath:f.trim(),readonly:m}]}),d(``),p(``),h(!1)},children:(0,L.jsx)(kv,{className:`size-3.5`})})]})]})]})}var kme=[{label:`ESLint`,id:`dbaeumer.vscode-eslint`},{label:`Prettier`,id:`esbenp.prettier-vscode`},{label:`GitLens`,id:`eamodio.gitlens`},{label:`Error Lens`,id:`usernamehw.errorlens`}];function Ame({onChange:e,settings:t}){let n=(0,N.useMemo)(()=>kme.filter(e=>!t.extensions.includes(e.id)),[t.extensions]);return n.length===0?null:(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.map(n=>(0,L.jsxs)(l2,{variant:`outline`,size:`sm`,className:`h-7 gap-1 px-2 text-xs`,onClick:()=>e({extensions:[...t.extensions,n.id]}),children:[(0,L.jsx)(kv,{className:`size-3`}),n.label]},n.id))})}function jme({onChange:e,settings:t}){let n=(0,N.useMemo)(()=>Cme.filter(e=>!t.setupCommands.some(t=>t===e.cmd)),[t.setupCommands]);return n.length===0?null:(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.map(n=>(0,L.jsxs)(l2,{variant:`outline`,size:`sm`,className:`h-7 gap-1 px-2 text-xs`,onClick:()=>e({setupCommands:[...t.setupCommands,n.cmd]}),children:[(0,L.jsx)(kv,{className:`size-3`}),n.label]},n.label))})}function Mme({onChange:e,settings:t}){let n=(0,N.useMemo)(()=>wme.filter(e=>!t.volumeMounts.some(t=>t.hostPath===e.mount.hostPath)),[t.volumeMounts]);return n.length===0?null:(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.map(n=>(0,L.jsxs)(l2,{variant:`outline`,size:`sm`,className:`h-7 gap-1 px-2 text-xs`,onClick:()=>e({volumeMounts:[...t.volumeMounts,n.mount]}),children:[(0,L.jsx)(kv,{className:`size-3`}),n.label]},n.label))})}function Nme(){let{setTheme:e,theme:t}=cy();return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Theme`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Choose your preferred appearance`})]}),(0,L.jsx)(z2,{}),(0,L.jsx)(`div`,{className:`grid grid-cols-3 gap-3`,children:[{id:`light`,label:`Light`,icon:(0,L.jsx)(Gv,{className:`size-5`})},{id:`dark`,label:`Dark`,icon:(0,L.jsx)(Tv,{className:`size-5`})},{id:`system`,label:`System`,icon:(0,L.jsx)(Cv,{className:`size-5`})}].map(n=>(0,L.jsxs)(`button`,{onClick:()=>e(n.id),className:E$(`flex flex-col items-center gap-2 rounded-lg border p-4 transition-colors`,t===n.id?`border-primary bg-primary/5`:`border-border hover:border-primary/50`),children:[n.icon,(0,L.jsx)(`span`,{className:`text-sm font-medium`,children:n.label})]},n.id))})]})}var W9={layout:`_layout_1spyr_1`,sidebar:`_sidebar_1spyr_9`,backButton:`_backButton_1spyr_17`,tabList:`_tabList_1spyr_22`,tab:`_tab_1spyr_22`,content:`_content_1spyr_71`},Pme={accounts:(0,L.jsx)(Xv,{className:`size-4`}),refresh:(0,L.jsx)(Mv,{className:`size-4`}),relay:(0,L.jsx)(pee,{className:`size-4`}),sandbox:(0,L.jsx)(a_,{className:`size-4`}),notifications:(0,L.jsx)(r_,{className:`size-4`}),permissions:(0,L.jsx)(Hv,{className:`size-4`}),audit:(0,L.jsx)(Fv,{className:`size-4`}),theme:(0,L.jsx)(Dv,{className:`size-4`}),config:(0,L.jsx)(U_,{className:`size-4`}),about:(0,L.jsx)(tv,{className:`size-4`})},G9={accounts:`Accounts`,refresh:`Refresh`,relay:`Relay`,sandbox:`Sandbox`,notifications:`Notifications`,permissions:`Permissions`,audit:`Audit`,theme:`Theme`,config:`Config`,about:`About`},Fme=e=>nZ.some(t=>t===e);function Ime(){let{tab:e}=xr(),t=Fme(e)?e:`accounts`,n=_r();return(0,L.jsxs)(`div`,{className:W9.layout,children:[(0,L.jsxs)(`nav`,{"aria-label":`Settings`,className:W9.sidebar,children:[(0,L.jsxs)(l2,{className:W9.backButton,onClick:()=>n(`/`),size:`sm`,variant:`ghost`,children:[(0,L.jsx)(Zg,{className:`size-4`}),`Back to PRs`]}),(0,L.jsx)(`div`,{className:W9.tabList,children:nZ.map(e=>(0,L.jsxs)(Ji,{"aria-current":t===e?`page`:void 0,className:W9.tab,"data-active":t===e?`true`:void 0,to:`/settings/${e}`,children:[Pme[e],(0,L.jsx)(`span`,{children:G9[e]})]},e))})]}),(0,L.jsxs)(`section`,{"aria-label":`${G9[t]} settings`,className:W9.content,children:[t===`accounts`&&(0,L.jsx)(rme,{}),t===`refresh`&&(0,L.jsx)(hme,{}),t===`relay`&&(0,L.jsx)(bme,{}),t===`sandbox`&&(0,L.jsx)(Eme,{}),t===`notifications`&&(0,L.jsx)(ume,{}),t===`permissions`&&(0,L.jsx)(pme,{}),t===`audit`&&(0,L.jsx)(ame,{}),t===`theme`&&(0,L.jsx)(Nme,{}),t===`config`&&(0,L.jsx)(sme,{}),t===`about`&&(0,L.jsx)(tme,{})]})]})}var Lme=(e,t)=>jJ.query(`stats`,`get`,{query:{week:e,...t},timeToLive:`30 seconds`});function Rme(e,t){return KV((0,N.useMemo)(()=>Lme(e,t),[e,t.repo,t.author,t.account]))}function K9({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`card`,className:E$(`bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm`,e),...t})}function q9({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`card-header`,className:E$(`@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 J9({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`card-title`,className:E$(`leading-none font-semibold`,e),...t})}function Y9({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`card-content`,className:E$(`px-6`,e),...t})}function X9(e){return e==null?`—`:X$(e)}function Z9({icon:e,label:t,onClick:n,value:r}){return(0,L.jsx)(K9,{className:n===void 0?void 0:`cursor-pointer transition-colors hover:bg-accent/50`,onClick:n,children:(0,L.jsxs)(Y9,{className:`flex items-center gap-3 p-4`,children:[(0,L.jsx)(`div`,{className:`rounded-md bg-muted p-2`,children:(0,L.jsx)(e,{className:`size-4 text-muted-foreground`})}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-2xl font-bold tabular-nums`,children:r}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:t})]})]})})}function zme({highlight:e,label:t,onClick:n,pct:r,value:i}){return(0,L.jsxs)(`div`,{className:`group relative flex items-center gap-2 rounded-md px-2 py-1.5${n===void 0?``:` cursor-pointer`}`,onClick:n,children:[(0,L.jsx)(`div`,{className:`absolute inset-0 rounded-md transition-colors ${e===!0?`bg-amber-400/[0.08] group-hover:bg-amber-400/[0.14]`:`bg-foreground/[0.06] dark:bg-foreground/[0.08] group-hover:bg-foreground/[0.10] dark:group-hover:bg-foreground/[0.14]`}`,style:{width:`${r}%`}}),e===!0&&(0,L.jsx)(gee,{"aria-hidden":`true`,className:`relative z-10 size-3 shrink-0 text-amber-400 fill-amber-400`,style:{animation:`star-in 400ms ease-out`}},t),(0,L.jsx)(`span`,{className:`relative z-10 flex-1 truncate text-xs${e===!0?` text-amber-400 font-medium`:``}`,children:t}),(0,L.jsx)(`span`,{className:`relative z-10 shrink-0 text-xs tabular-nums ${e===!0?`text-amber-400/60`:`text-muted-foreground`}`,children:i})]})}function Q9({data:e,labelKey:t,onItemClick:n,title:r,valueKey:i}){let a=e.reduce((e,t)=>Math.max(e,Number(t[i])||0),0);return(0,L.jsxs)(K9,{children:[(0,L.jsx)(q9,{className:`pb-2`,children:(0,L.jsx)(J9,{className:`text-sm`,children:r})}),(0,L.jsx)(Y9,{children:e.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No data`}):(0,L.jsx)(`div`,{className:`space-y-1.5`,children:e.map((e,r)=>{let o=String(e[t]),s=Number(e[i])||0,c=a>0?s/a*100:0;return(0,L.jsx)(zme,{label:o,value:s,pct:c,highlight:r===0,onClick:n===void 0?void 0:()=>n(o)},o)})})})]})}function Bme({dist:e,onBarClick:t}){let n=[{key:`small`,label:`S`,sub:`<5 files`,count:e.small},{key:`medium`,label:`M`,sub:`5–15`,count:e.medium},{key:`large`,label:`L`,sub:`15–30`,count:e.large},{key:`xlarge`,label:`XL`,sub:`30+`,count:e.extraLarge}],r=n.reduce((e,t)=>e+t.count,0),i=Math.max(...n.map(e=>e.count),1);return(0,L.jsxs)(K9,{children:[(0,L.jsx)(q9,{className:`pb-2`,children:(0,L.jsx)(J9,{className:`text-sm`,children:`PR Size Distribution`})}),(0,L.jsx)(Y9,{children:r===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No diff data`}):(0,L.jsx)(`div`,{className:`flex items-end gap-2 h-[120px]`,children:n.map(e=>(0,L.jsxs)(`div`,{className:`flex flex-1 flex-col items-center gap-1${t!==void 0&&e.count>0?` cursor-pointer`:``}`,onClick:t!==void 0&&e.count>0?()=>t(e.key):void 0,children:[(0,L.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:e.count}),(0,L.jsx)(`div`,{className:`w-full flex items-end`,style:{height:80},children:(0,L.jsx)(`div`,{className:`w-full rounded-t bg-foreground/[0.12] dark:bg-foreground/[0.16] transition-all hover:bg-foreground/[0.18] dark:hover:bg-foreground/[0.22]`,style:{height:`${e.count/i*100}%`,minHeight:e.count>0?4:0}})}),(0,L.jsxs)(`div`,{className:`text-center`,children:[(0,L.jsx)(`div`,{className:`text-xs font-medium`,children:e.label}),(0,L.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:e.sub})]})]},e.key))})})]})}function Vme({onPRClick:e,prs:t}){return t.length===0?null:(0,L.jsxs)(K9,{children:[(0,L.jsx)(q9,{className:`pb-2`,children:(0,L.jsx)(J9,{className:`text-sm`,children:`Most Active PRs`})}),(0,L.jsx)(Y9,{children:(0,L.jsx)(`div`,{className:`space-y-2`,children:t.map(t=>(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-sm cursor-pointer hover:bg-accent rounded px-2 py-1`,onClick:()=>e(t.awsAccountId,t.id,t.repositoryName,t.accountRegion),children:[(0,L.jsxs)(`span`,{className:`text-muted-foreground font-mono`,children:[`#`,t.id]}),(0,L.jsx)(`span`,{className:`truncate flex-1`,children:t.title}),(0,L.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:t.author}),(0,L.jsx)(s2,{variant:`secondary`,className:`text-xs`,children:t.repositoryName}),(0,L.jsxs)(`span`,{className:`text-xs tabular-nums`,children:[t.commentCount,` comments`]})]},`${t.awsAccountId}:${t.id}:${t.repositoryName}:${t.accountRegion}`))})})]})}function Hme({onPRClick:e,prs:t}){return t.length===0?null:(0,L.jsxs)(K9,{children:[(0,L.jsx)(q9,{className:`pb-2`,children:(0,L.jsx)(J9,{className:`text-sm flex items-center gap-1`,children:`Stale PRs`})}),(0,L.jsx)(Y9,{children:(0,L.jsx)(`div`,{className:`space-y-1`,children:t.map(t=>(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-sm cursor-pointer hover:bg-accent rounded px-2 py-1`,onClick:()=>e(t.awsAccountId,t.id,t.repositoryName,t.accountRegion),children:[(0,L.jsxs)(`span`,{className:`text-muted-foreground font-mono`,children:[`#`,t.id]}),(0,L.jsx)(`span`,{className:`truncate flex-1`,children:t.title}),(0,L.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:t.author}),(0,L.jsxs)(s2,{variant:`destructive`,className:`text-xs`,children:[t.daysSinceActivity,`d idle`]})]},`${t.awsAccountId}:${t.id}:${t.repositoryName}:${t.accountRegion}`))})})]})}function Ume({data:e}){return(0,L.jsxs)(K9,{children:[(0,L.jsx)(q9,{className:`pb-2`,children:(0,L.jsx)(J9,{className:`text-sm`,children:`Health`})}),(0,L.jsx)(Y9,{children:(0,L.jsxs)(`div`,{className:`grid grid-cols-4 gap-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Review Coverage`}),(0,L.jsx)(`div`,{className:`text-lg font-bold tabular-nums`,children:e.reviewCoverage==null?`—`:`${(e.reviewCoverage*100).toFixed(0)}%`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Approval Rate`}),(0,L.jsx)(`div`,{className:`text-lg font-bold tabular-nums`,children:e.approvalRate==null?`—`:`${(e.approvalRate*100).toFixed(0)}%`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Stale PRs`}),(0,L.jsx)(`div`,{className:`text-lg font-bold tabular-nums`,children:e.stalePRs.length})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Bus Factor`}),(0,L.jsx)(`div`,{className:`text-lg font-bold tabular-nums`,children:e.busFactor===null?`—`:`${e.busFactor.uniqueContributors} (${(e.busFactor.topContributorShare*100).toFixed(0)}%)`})]})]})})]})}function Wme({author:e,data:t,repo:n,setFilter:r}){return(0,L.jsxs)(L.Fragment,{children:[t.availableRepos.length>0&&(0,L.jsxs)(y2,{value:n||`__all__`,onValueChange:e=>r(`repo`,e===`__all__`?void 0:e),children:[(0,L.jsx)(x2,{className:`w-[140px] h-8 text-xs`,children:(0,L.jsx)(b2,{placeholder:`All repos`})}),(0,L.jsxs)(S2,{children:[(0,L.jsx)(C2,{value:`__all__`,children:`All repos`}),t.availableRepos.map(e=>(0,L.jsx)(C2,{value:e,children:e},e))]})]}),t.availableAuthors.length>0&&(0,L.jsxs)(y2,{value:e||`__all__`,onValueChange:e=>r(`author`,e===`__all__`?void 0:e),children:[(0,L.jsx)(x2,{className:`w-[140px] h-8 text-xs`,children:(0,L.jsx)(b2,{placeholder:`All authors`})}),(0,L.jsxs)(S2,{children:[(0,L.jsx)(C2,{value:`__all__`,children:`All authors`}),t.availableAuthors.map(e=>(0,L.jsx)(C2,{value:e,children:e},e))]})]})]})}function Gme({details:e,goToPR:t}){return e.length===0?(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground py-2`,children:`No data points`}):(0,L.jsx)(`div`,{className:`space-y-1 mt-2`,children:e.map((e,n)=>(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-xs cursor-pointer hover:bg-accent rounded px-2 py-1`,onClick:()=>t(e.awsAccountId,e.prId,e.repositoryName,e.accountRegion),children:[(0,L.jsxs)(`span`,{className:`text-muted-foreground font-mono shrink-0`,children:[`#`,e.prId]}),(0,L.jsx)(`span`,{className:`truncate flex-1`,children:e.prTitle}),(0,L.jsx)(`span`,{className:`text-muted-foreground shrink-0`,children:e.author}),(0,L.jsx)(s2,{variant:`secondary`,className:`text-[10px] shrink-0`,children:e.repositoryName}),(0,L.jsx)(`span`,{className:`font-mono tabular-nums shrink-0`,children:X9(e.durationMs)}),(0,L.jsxs)(`span`,{className:`text-muted-foreground shrink-0 text-[10px]`,children:[e.fromLabel,` → `,e.toLabel]})]},`${e.awsAccountId}:${e.prId}:${n}`))})}function Kme({data:e,goToPR:t}){let[n,r]=(0,N.useState)(null),i=e=>r(t=>t===e?null:e),a=[{key:`merge`,label:`Median Time to Merge`,value:e.medianTimeToMerge,details:e.mergeTimeDetails},{key:`review`,label:`Median Time to First Review`,value:e.medianTimeToFirstReview,details:e.firstReviewDetails},{key:`feedback`,label:`Median Time to Address Feedback`,value:e.medianTimeToAddressFeedback,details:e.feedbackDetails}];return(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`div`,{className:`grid grid-cols-3 gap-3`,children:a.map(e=>(0,L.jsx)(K9,{className:`cursor-pointer transition-colors hover:bg-accent/50 ${n===e.key?`ring-1 ring-ring`:``}`,onClick:()=>i(e.key),children:(0,L.jsxs)(Y9,{className:`p-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.label}),(0,L.jsx)(d_,{className:`size-3 text-muted-foreground transition-transform ${n===e.key?`rotate-180`:``}`})]}),(0,L.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,L.jsx)(`div`,{className:`text-xl font-bold tabular-nums`,children:X9(e.value)}),e.details.length>0&&(0,L.jsxs)(`span`,{className:`text-[10px] text-muted-foreground`,children:[e.details.length,` PRs`]})]})]})},e.key))}),n&&(0,L.jsx)(K9,{children:(0,L.jsxs)(Y9,{className:`p-3`,children:[(0,L.jsxs)(`div`,{className:`text-xs font-medium mb-1`,children:[a.find(e=>e.key===n)?.label,` — Detail`]}),(0,L.jsx)(Gme,{details:a.find(e=>e.key===n)?.details??[],goToPR:t})]})})]})}function qme({data:e,goToPR:t,handleSync:n,navigate:r,syncing:i}){return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,L.jsx)(Z9,{label:`PRs Created`,value:e.prsCreated,icon:$_,onClick:()=>r(`/?from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),(0,L.jsx)(Z9,{label:`PRs Merged`,value:e.prsMerged,icon:$_,onClick:()=>r(`/?f=status:merged&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),(0,L.jsx)(Z9,{label:`Comments`,value:e.totalComments,icon:yv})]}),(0,L.jsx)(Kme,{data:e,goToPR:t}),(0,L.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,L.jsx)(Q9,{data:e.topContributors,labelKey:`author`,valueKey:`prCount`,title:`Top Contributors`,onItemClick:t=>r(`/?f=author:${encodeURIComponent(t)}&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),(0,L.jsx)(Q9,{data:e.topReviewers,labelKey:`author`,valueKey:`commentCount`,title:`Top Commenters`,onItemClick:t=>r(`/?f=commenter:${encodeURIComponent(t)}&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),(0,L.jsx)(Q9,{data:e.topApprovers,labelKey:`author`,valueKey:`approvalCount`,title:`Top Approvers`,onItemClick:t=>r(`/?f=approver:${encodeURIComponent(t)}&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)})]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,L.jsx)(Bme,{dist:e.prSizeDistribution,onBarClick:t=>r(`/?f=size:${t}&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),e.avgDiffSize&&(0,L.jsx)(K9,{children:(0,L.jsxs)(Y9,{className:`space-y-2 p-4`,children:[(0,L.jsx)(`div`,{className:`text-sm font-medium`,children:`Average Diff Size`}),(0,L.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Files added`}),(0,L.jsx)(`span`,{className:`font-mono`,children:e.avgDiffSize.filesAdded.toFixed(1)})]}),(0,L.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Files modified`}),(0,L.jsx)(`span`,{className:`font-mono`,children:e.avgDiffSize.filesModified.toFixed(1)})]}),(0,L.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Files deleted`}),(0,L.jsx)(`span`,{className:`font-mono`,children:e.avgDiffSize.filesDeleted.toFixed(1)})]})]})})]}),(0,L.jsx)(Vme,{prs:e.mostActivePRs,onPRClick:t}),(0,L.jsx)(Ume,{data:e}),(0,L.jsx)(Hme,{prs:e.stalePRs,onPRClick:t}),e.dataAvailableSince&&(0,L.jsxs)(`div`,{className:`text-xs text-muted-foreground text-center py-2`,children:[`Data available since `,G$(new Date(e.dataAvailableSince))]}),e.prsCreated===0&&e.prsMerged===0&&e.totalComments===0&&(0,L.jsxs)(`div`,{className:`text-center py-8 text-muted-foreground`,children:[(0,L.jsx)(`p`,{className:`text-sm`,children:`No activity for this week.`}),(0,L.jsxs)(l2,{variant:`outline`,size:`sm`,className:`mt-2`,onClick:n,disabled:i,children:[(0,L.jsx)(Mv,{className:`size-3 mr-1 ${i?`animate-spin`:``}`}),`Sync this week`]})]})]})}function Jme(){let e=_r(),[t,n]=$i(),r=JV(nY),i=(0,N.useMemo)(()=>J$(new Date),[]),a=t.get(`week`)||i,o=t.get(`repo`)||void 0,s=t.get(`author`)||void 0,c=t.get(`account`)||void 0,l=Rme(a,{repo:o,author:s,account:c}),u=KV(hY),d=u.status===`loading`,f=(0,N.useRef)(d);(0,N.useEffect)(()=>{f.current&&!d&&n(e=>(e.set(`_t`,Date.now().toString()),e)),f.current=d},[d,n]);let p=(0,N.useMemo)(()=>q$(a),[a]),m=(0,N.useMemo)(()=>p._tag===`None`?a:Y$(p.value),[a,p]),h=(0,N.useCallback)(e=>{if(p._tag===`None`)return;let t=J$(new Date(p.value.start.getTime()+e*7*864e5));t>i||n(e=>(e.set(`week`,t),e))},[p,i,n]),g=(0,N.useCallback)((e,t)=>{n(n=>(t!==void 0&&t!==``?n.set(e,t):n.delete(e),n))},[n]),_=(0,N.useCallback)(()=>{r({payload:{week:a}})},[a,r]),v=(0,N.useCallback)((t,n,r,i)=>{e(r!==void 0&&i!==void 0?vX(t,n,r,i):`/accounts/${t}/prs/${n}`)},[e]);return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(l2,{variant:`ghost`,size:`icon-sm`,onClick:()=>e(`/`),children:(0,L.jsx)(h_,{className:`size-4`})}),(0,L.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Statistics`}),(0,L.jsx)(s2,{variant:`secondary`,className:`text-[10px] tracking-wide uppercase font-normal text-muted-foreground/60`,children:`🚧 Experimental`})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,L.jsx)(l2,{variant:`ghost`,size:`icon-sm`,onClick:()=>h(-1),children:(0,L.jsx)(Zg,{className:`size-4`})}),(0,L.jsx)(`span`,{className:`text-sm font-medium min-w-[220px] text-center`,children:m}),(0,L.jsx)(l2,{variant:`ghost`,size:`icon-sm`,onClick:()=>h(1),disabled:a>=i,children:(0,L.jsx)($g,{className:`size-4`})}),(0,L.jsxs)(l2,{variant:`outline`,size:`sm`,onClick:()=>n(e=>(e.set(`week`,i),e)),disabled:a===i,children:[(0,L.jsx)(dee,{className:`size-3 mr-1`}),` Today`]}),(0,L.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[aV(l).onSuccess(e=>(0,L.jsx)(Wme,{data:e,repo:o,author:s,setFilter:g})).render(),(0,L.jsxs)(l2,{variant:`outline`,size:`sm`,onClick:_,disabled:d,children:[(0,L.jsx)(Mv,{className:`size-3 mr-1 ${d?`animate-spin`:``}`}),`Sync`]})]})]}),d&&u.statusDetail&&(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground truncate`,children:u.statusDetail}),(o!==void 0||s!==void 0||c!==void 0)&&(0,L.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[o&&(0,L.jsxs)(s2,{variant:`secondary`,className:`cursor-pointer`,onClick:()=>g(`repo`,void 0),children:[`repo: `,o,` ×`]}),s&&(0,L.jsxs)(s2,{variant:`secondary`,className:`cursor-pointer`,onClick:()=>g(`author`,void 0),children:[`author: `,s,` ×`]}),c&&(0,L.jsxs)(s2,{variant:`secondary`,className:`cursor-pointer`,onClick:()=>g(`account`,void 0),children:[`account: `,c,` ×`]})]}),(0,L.jsx)(z2,{}),aV(l).onInitialOrWaiting(()=>(0,L.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,L.jsx)(sv,{className:`size-5 animate-spin text-muted-foreground`})})).onError(()=>(0,L.jsx)(`div`,{className:`text-sm text-destructive py-4`,children:`Failed to load stats`})).onDefect(()=>(0,L.jsx)(`div`,{className:`text-sm text-destructive py-4`,children:`Failed to load stats`})).onSuccess(t=>(0,L.jsx)(qme,{data:t,navigate:e,goToPR:v,handleSync:_,syncing:d})).render()]})}var Yme=e=>e!=null&&zy(e,`fullWidth`),Xme=e=>Yme(e.handle)&&e.handle.fullWidth===!0,Zme=()=>Rr().some(Xme),Qme=Gi([{element:(0,L.jsx)(p2,{}),children:[{index:!0,element:(0,L.jsx)(Rpe,{})},{path:`accounts/:accountId/prs/:prId`,element:(0,L.jsx)(fpe,{})},{path:`sandboxes`,element:(0,L.jsx)(Qpe,{})},{path:`sandbox/:sandboxId`,element:(0,L.jsx)(Kpe,{}),handle:{fullWidth:!0}},{path:`settings/:tab?`,element:(0,L.jsx)(Ime,{})},{path:`notifications`,element:(0,L.jsx)(Z2,{})},{path:`stats`,element:(0,L.jsx)(Jme,{})},{path:`audit`,element:(0,L.jsx)(P2,{})},{path:`*`,element:(0,L.jsx)(Zr,{to:`/`,replace:!0})}]}]),$me=class extends N.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?(0,L.jsxs)(`div`,{style:{padding:`2rem`,textAlign:`center`},children:[(0,L.jsx)(`h1`,{children:`Something went wrong`}),(0,L.jsx)(`button`,{onClick:()=>window.location.reload(),style:{marginTop:`1rem`},children:`Reload`})]}):this.props.children}},$9=document.getElementById(`root`);$9&&bi.createRoot($9).render((0,L.jsx)(N.StrictMode,{children:(0,L.jsx)($me,{children:(0,L.jsx)(Oee,{children:(0,L.jsx)(qr,{router:Qme})})})}));export{Hv as $,YB as A,gB as B,gq as C,KV as D,JV as E,W as F,nz as G,Zz as H,K as I,mC as J,gw as K,Fz as L,tB as M,bz as N,ZB as O,pz as P,By as Q,JR as R,Aq as S,ZK as T,iB as U,UR as V,Hz as W,pC as X,dC as Y,Vy as Z,jJ as _,W0 as a,d_ as at,Cq as b,L1 as c,_r as ct,X as d,av as et,i1 as f,NJ as g,jX as h,f9 as i,__ as it,Lre as j,qB as k,H1 as l,d as lt,EX as m,Ufe as n,C_ as nt,I0 as o,z as ot,IX as p,fC as q,h9 as r,y_ as rt,m0 as s,Na as st,Wfe as t,T_ as tt,a1 as u,l as ut,DJ as v,Dq as w,Tq as x,EJ as y,qR as z};