pinomad 0.4.0 → 0.6.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 (34) hide show
  1. package/README.md +4 -2
  2. package/dist/{chunk-837gh8nr.js → chunk-0xh6cy9v.js} +69 -17
  3. package/dist/{chunk-n73t5xzw.js → chunk-367n9je8.js} +2 -2
  4. package/dist/{chunk-xhwkx9bd.js → chunk-3dnnaz4j.js} +14 -15
  5. package/dist/{chunk-z5pmcscx.js → chunk-4btj08we.js} +676 -377
  6. package/dist/{chunk-7gmkgyaz.js → chunk-7qb9tq54.js} +324 -4
  7. package/dist/{chunk-d4y99pfy.js → chunk-7s1f4z4g.js} +4 -3
  8. package/dist/chunk-b1h374jr.js +159 -0
  9. package/dist/{chunk-fgx2sh7d.js → chunk-c8nxym2z.js} +1 -1
  10. package/dist/{chunk-akgxwg8f.js → chunk-d5ypmmr7.js} +29 -12
  11. package/dist/{chunk-374zqx5h.js → chunk-d93kvxvc.js} +18 -2
  12. package/dist/chunk-ggb1taqy.js +16 -0
  13. package/dist/chunk-jn7y815x.js +79 -0
  14. package/dist/{chunk-b3f0ced1.js → chunk-k2s1hfq5.js} +39 -16
  15. package/dist/chunk-kzbzacz9.js +12 -0
  16. package/dist/{chunk-myjp910s.js → chunk-n4tjhcb7.js} +25 -21
  17. package/dist/{chunk-cjfmfyjb.js → chunk-ngf1zatm.js} +7 -6
  18. package/dist/{chunk-vw5yb5pd.js → chunk-wqvp1fwh.js} +304 -38
  19. package/dist/{chunk-5785kwej.js → chunk-ywmm63ks.js} +9 -7
  20. package/dist/chunk-znhn8af7.js +33 -0
  21. package/dist/pinomad.js +40 -16
  22. package/package.json +1 -1
  23. package/web/apple-touch-icon.png +0 -0
  24. package/web/assets/index-C_aU_ZiV.js +383 -0
  25. package/web/assets/index-DaPcXZPM.css +1 -0
  26. package/web/favicon.svg +1 -0
  27. package/web/index.html +4 -2
  28. package/dist/chunk-17p6bfvy.js +0 -63
  29. package/dist/chunk-302y6by9.js +0 -50
  30. package/dist/chunk-knaw1a9g.js +0 -182
  31. package/dist/chunk-prhvksh3.js +0 -14
  32. package/dist/chunk-xrvmnymc.js +0 -33
  33. package/web/assets/index-8mNNPXPT.js +0 -383
  34. package/web/assets/index-BFJJgGGo.css +0 -1
@@ -1,383 +0,0 @@
1
- var EC=Object.defineProperty;var Jk=e=>{throw TypeError(e)};var TC=(e,t,n)=>t in e?EC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var te=(e,t,n)=>TC(e,typeof t!="symbol"?t+"":t,n),t1=(e,t,n)=>t.has(e)||Jk("Cannot "+n);var G=(e,t,n)=>(t1(e,t,"read from private field"),n?n.call(e):t.get(e)),ze=(e,t,n)=>t.has(e)?Jk("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Se=(e,t,n,s)=>(t1(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),V=(e,t,n)=>(t1(e,t,"access private method"),n);var Ju=(e,t,n,s)=>({set _(r){Se(e,t,r,n)},get _(){return G(e,t,s)}});function zC(e,t){for(var n=0;n<t.length;n++){const s=t[n];if(typeof s!="string"&&!Array.isArray(s)){for(const r in s)if(r!=="default"&&!(r in e)){const i=Object.getOwnPropertyDescriptor(s,r);i&&Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:()=>s[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();function AC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var I5={exports:{}},Gh={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var NC=Symbol.for("react.transitional.element"),MC=Symbol.for("react.fragment");function _5(e,t,n){var s=null;if(n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:NC,type:e,key:s,ref:t!==void 0?t:null,props:n}}Gh.Fragment=MC;Gh.jsx=_5;Gh.jsxs=_5;I5.exports=Gh;var o=I5.exports,O5={exports:{}},ke={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var i0=Symbol.for("react.transitional.element"),RC=Symbol.for("react.portal"),IC=Symbol.for("react.fragment"),_C=Symbol.for("react.strict_mode"),OC=Symbol.for("react.profiler"),DC=Symbol.for("react.consumer"),LC=Symbol.for("react.context"),BC=Symbol.for("react.forward_ref"),qC=Symbol.for("react.suspense"),HC=Symbol.for("react.memo"),D5=Symbol.for("react.lazy"),PC=Symbol.for("react.activity"),UC=Symbol.for("react.view_transition"),eb=Symbol.iterator;function FC(e){return e===null||typeof e!="object"?null:(e=eb&&e[eb]||e["@@iterator"],typeof e=="function"?e:null)}var L5={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B5=Object.assign,q5={};function Tl(e,t,n){this.props=e,this.context=t,this.refs=q5,this.updater=n||L5}Tl.prototype.isReactComponent={};Tl.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")};Tl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function H5(){}H5.prototype=Tl.prototype;function a0(e,t,n){this.props=e,this.context=t,this.refs=q5,this.updater=n||L5}var o0=a0.prototype=new H5;o0.constructor=a0;B5(o0,Tl.prototype);o0.isPureReactComponent=!0;var tb=Array.isArray;function Ip(){}var Qe={H:null,A:null,T:null,S:null},P5=Object.prototype.hasOwnProperty;function l0(e,t,n){var s=n.ref;return{$$typeof:i0,type:e,key:t,ref:s!==void 0?s:null,props:n}}function GC(e,t){return l0(e.type,t,e.props)}function c0(e){return typeof e=="object"&&e!==null&&e.$$typeof===i0}function VC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var nb=/\/+/g;function n1(e,t){return typeof e=="object"&&e!==null&&e.key!=null?VC(""+e.key):t.toString(36)}function WC(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Ip,Ip):(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 mo(e,t,n,s,r){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case i0:case RC:a=!0;break;case D5:return a=e._init,mo(a(e._payload),t,n,s,r)}}if(a)return r=r(e),a=s===""?"."+n1(e,0):s,tb(r)?(n="",a!=null&&(n=a.replace(nb,"$&/")+"/"),mo(r,t,n,"",function(u){return u})):r!=null&&(c0(r)&&(r=GC(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(nb,"$&/")+"/")+a)),t.push(r)),1;a=0;var l=s===""?".":s+":";if(tb(e))for(var c=0;c<e.length;c++)s=e[c],i=l+n1(s,c),a+=mo(s,t,n,i,r);else if(c=FC(e),typeof c=="function")for(e=c.call(e),c=0;!(s=e.next()).done;)s=s.value,i=l+n1(s,c++),a+=mo(s,t,n,i,r);else if(i==="object"){if(typeof e.then=="function")return mo(WC(e),t,n,s,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function ed(e,t,n){if(e==null)return e;var s=[],r=0;return mo(e,s,"","",function(i){return t.call(n,i,r++)}),s}function KC(e){if(e._status===-1){var t=e._result,n=t();n.then(function(s){(e._status===0||e._status===-1)&&(e._status=1,e._result=s,n.status===void 0&&(n.status="fulfilled",n.value=s))},function(s){(e._status===0||e._status===-1)&&(e._status=2,e._result=s,n.status===void 0&&(n.status="rejected",n.reason=s))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var sb=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function U5(e){var t=Qe.T,n={};n.types=t!==null?t.types:null,Qe.T=n;try{var s=e(),r=Qe.S;r!==null&&r(n,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(Ip,sb)}catch(i){sb(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),Qe.T=t}}function F5(e){var t=Qe.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else U5(F5.bind(null,e))}var XC={map:ed,forEach:function(e,t,n){ed(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ed(e,function(){t++}),t},toArray:function(e){return ed(e,function(t){return t})||[]},only:function(e){if(!c0(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ke.Activity=PC;ke.Children=XC;ke.Component=Tl;ke.Fragment=IC;ke.Profiler=OC;ke.PureComponent=a0;ke.StrictMode=_C;ke.Suspense=qC;ke.ViewTransition=UC;ke.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Qe;ke.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Qe.H.useMemoCache(e)}};ke.addTransitionType=F5;ke.cache=function(e){return function(){return e.apply(null,arguments)}};ke.cacheSignal=function(){return null};ke.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var s=B5({},e.props),r=e.key;if(t!=null)for(i in t.key!==void 0&&(r=""+t.key),t)!P5.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(s[i]=t[i]);var i=arguments.length-2;if(i===1)s.children=n;else if(1<i){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+2];s.children=a}return l0(e.type,r,s)};ke.createContext=function(e){return e={$$typeof:LC,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:DC,_context:e},e};ke.createElement=function(e,t,n){var s,r={},i=null;if(t!=null)for(s in t.key!==void 0&&(i=""+t.key),t)P5.call(t,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(r[s]=t[s]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];r.children=l}if(e&&e.defaultProps)for(s in a=e.defaultProps,a)r[s]===void 0&&(r[s]=a[s]);return l0(e,i,r)};ke.createRef=function(){return{current:null}};ke.forwardRef=function(e){return{$$typeof:BC,render:e}};ke.isValidElement=c0;ke.lazy=function(e){return{$$typeof:D5,_payload:{_status:-1,_result:e},_init:KC}};ke.memo=function(e,t){return{$$typeof:HC,type:e,compare:t===void 0?null:t}};ke.startTransition=U5;ke.unstable_useCacheRefresh=function(){return Qe.H.useCacheRefresh()};ke.use=function(e){return Qe.H.use(e)};ke.useActionState=function(e,t,n){return Qe.H.useActionState(e,t,n)};ke.useCallback=function(e,t){return Qe.H.useCallback(e,t)};ke.useContext=function(e){return Qe.H.useContext(e)};ke.useDebugValue=function(){};ke.useDeferredValue=function(e,t){return Qe.H.useDeferredValue(e,t)};ke.useEffect=function(e,t){return Qe.H.useEffect(e,t)};ke.useEffectEvent=function(e){return Qe.H.useEffectEvent(e)};ke.useId=function(){return Qe.H.useId()};ke.useImperativeHandle=function(e,t,n){return Qe.H.useImperativeHandle(e,t,n)};ke.useInsertionEffect=function(e,t){return Qe.H.useInsertionEffect(e,t)};ke.useLayoutEffect=function(e,t){return Qe.H.useLayoutEffect(e,t)};ke.useMemo=function(e,t){return Qe.H.useMemo(e,t)};ke.useOptimistic=function(e,t){return Qe.H.useOptimistic(e,t)};ke.useReducer=function(e,t,n){return Qe.H.useReducer(e,t,n)};ke.useRef=function(e){return Qe.H.useRef(e)};ke.useState=function(e){return Qe.H.useState(e)};ke.useSyncExternalStore=function(e,t,n){return Qe.H.useSyncExternalStore(e,t,n)};ke.useTransition=function(){return Qe.H.useTransition()};ke.version="19.3.0";O5.exports=ke;var x=O5.exports;const Vh=AC(x),G5=zC({__proto__:null,default:Vh},[x]);var Ql={},rb;function ZC(){if(rb)return Ql;rb=1,Object.defineProperty(Ql,"__esModule",{value:!0}),Ql.styleq=void 0;var e=new WeakMap,t="$$css";function n(r){var i,a,l;return r!=null&&(i=r.disableCache===!0,a=r.disableMix===!0,l=r.transform),function(){for(var u=[],d="",f=null,h="",p=i?null:e,m=new Array(arguments.length),b=0;b<arguments.length;b++)m[b]=arguments[b];for(;m.length>0;){var y=m.pop();if(!(y==null||y===!1)){if(Array.isArray(y)){for(var g=0;g<y.length;g++)m.push(y[g]);continue}var k=l!=null?l(y):y;if(k.$$css!=null){var v="";if(p!=null&&p.has(k)){var w=p.get(k);w!=null&&(v=w[0],h=w[2],u.push.apply(u,w[1]),p=w[3])}else{var j=[];for(var $ in k){var C=k[$];if($===t){var E=k[$];E!==!0&&(h=h?E+"; "+h:E);continue}typeof C=="string"||C===null?u.includes($)||(u.push($),p!=null&&j.push($),typeof C=="string"&&(v+=v?" "+C:C)):console.error("styleq: ".concat($," typeof ").concat(String(C),' is not "string" or "null".'))}if(p!=null){var T=new WeakMap;p.set(k,[v,j,h,T]),p=T}}v&&(d=d?v+" "+d:v)}else if(a)f==null&&(f={}),f=Object.assign({},k,f);else{var S=null;for(var N in k){var z=k[N];z!==void 0&&(u.includes(N)||(z!=null&&(f==null&&(f={}),S==null&&(S={}),S[N]=z),u.push(N),p=null))}S!=null&&(f=Object.assign(S,f))}}}var M=[d,f,h];return M}}var s=Ql.styleq=n();return s.factory=n,Ql}var YC=ZC();function B(...e){const[t,n,s]=YC.styleq(e),r={};return t!=null&&t!==""&&(r.className=t),n!=null&&Object.keys(n).length>0&&(r.style=n),s!=null&&s!==""&&(r["data-style-src"]=s),r}const QC={"--color-accent":"light-dark(#0064E0, #2694FE)","--color-accent-muted":"light-dark(#0082FB33, #0082FB3F)","--color-on-accent":"light-dark(#FFFFFF, #FFFFFF)","--color-neutral":"light-dark(rgba(5, 54, 89, 0.1), rgba(223, 226, 229, 0.2))","--color-background-surface":"light-dark(#FFFFFF, #1F1F22)","--color-background-body":"light-dark(#F1F4F7, #111112)","--color-overlay":"light-dark(#01122866, #11111299)","--color-overlay-hover":"light-dark(#0536590C, #FFFFFF0C)","--color-overlay-pressed":"light-dark(#05365919, #FFFFFF19)","--color-background-muted":"light-dark(#0536590C, #1111127F)","--color-text-primary":"light-dark(#0A1317, #DFE2E5)","--color-text-secondary":"light-dark(#4E606F, #AAAFB5)","--color-text-disabled":"light-dark(#A4B0BC, #6F747C)","--color-text-accent":"light-dark(#0064E0, #3E9EFB)","--color-on-dark":"light-dark(#FFFFFF, #FFFFFF)","--color-on-light":"light-dark(#000000, #000000)","--color-icon-accent":"light-dark(#0064E0, #2694FE)","--color-icon-primary":"light-dark(#0A1317, #DFE2E5)","--color-icon-secondary":"light-dark(#4E606F, #AAAFB5)","--color-icon-disabled":"light-dark(#A4B0BC, #6F747C)","--color-background-card":"light-dark(#FFFFFF, #1F1F22)","--color-background-popover":"light-dark(#FFFFFF, #28292C)","--color-background-inverted":"light-dark(#0A1317, #FFFFFF)","--color-background-error-inverted":"light-dark(#AA071E, #E3193B)","--color-success":"light-dark(#0D8626, #0D8626)","--color-success-muted":"light-dark(#0B991F33, #0B991F3F)","--color-on-success":"light-dark(#FFFFFF, #FFFFFF)","--color-error":"light-dark(#E3193B, #F5394F)","--color-error-muted":"light-dark(#E3193B33, #F5394F3F)","--color-on-error":"light-dark(#FFFFFF, #FFFFFF)","--color-warning":"light-dark(#E9AF08, #F2C00B)","--color-warning-muted":"light-dark(#E2A40033, #E2A4003F)","--color-on-warning":"light-dark(#0A1317, #0A1317)","--color-border":"light-dark(#05365919, #F2F4F619)","--color-border-emphasized":"light-dark(#CCD3DB, #494D53)","--color-skeleton":"light-dark(#CCD3DB, #5A5E66)","--color-track":"light-dark(#CCD3DB, #5A5E66)","--color-shadow":"light-dark(rgba(5, 54, 89, 0.1), rgba(0, 0, 0, 0.3))","--color-tint-hover":"light-dark(black, white)","--color-background-blue":"light-dark(#0171E333, #0171E333)","--color-border-blue":"light-dark(#0064E0, #2694FE)","--color-icon-blue":"light-dark(#0064E0, #2694FE)","--color-text-blue":"light-dark(#042F97, #AFD7FF)","--color-background-cyan":"light-dark(#03A7D733, #03A7D733)","--color-border-cyan":"light-dark(#089DD0, #0171A4)","--color-icon-cyan":"light-dark(#00ACC1, #26C6DA)","--color-text-cyan":"light-dark(#014975, #A1EEF9)","--color-background-gray":"light-dark(#0A131733, #666A724C)","--color-border-gray":"light-dark(#647685, #748695)","--color-icon-gray":"light-dark(#4E606F, #AAAFB5)","--color-text-gray":"light-dark(#0A1317, #E7EAED)","--color-background-green":"light-dark(#24BB5E33, #24BB5E33)","--color-border-green":"light-dark(#0D8626, #0B991F)","--color-icon-green":"light-dark(#0D8626, #26A756)","--color-text-green":"light-dark(#09441F, #A5F690)","--color-background-orange":"light-dark(#F2790233, #F2790233)","--color-border-orange":"light-dark(#EB6E00, #B34A01)","--color-icon-orange":"light-dark(#E9690B, #FB8C00)","--color-text-orange":"light-dark(#6B2203, #FDB876)","--color-background-pink":"light-dark(#E638B333, #E638B333)","--color-border-pink":"light-dark(#F351C0, #C02294)","--color-icon-pink":"light-dark(#C2185B, #EC407A)","--color-text-pink":"light-dark(#650053, #FEADE3)","--color-background-purple":"light-dark(#7952FF33, #7952FF33)","--color-border-purple":"light-dark(#9081FF, #7340FE)","--color-icon-purple":"light-dark(#5B08D8, #7952FF)","--color-text-purple":"light-dark(#3E0697, #B3B0FE)","--color-background-red":"light-dark(#E3193B33, #E3193B33)","--color-border-red":"light-dark(#E3193B, #F5394F)","--color-icon-red":"light-dark(#D31130, #E3193B)","--color-text-red":"light-dark(#7B0210, #FFB2B8)","--color-background-teal":"light-dark(#0DB7AF33, #0DB7AF33)","--color-border-teal":"light-dark(#08A3A3, #08767D)","--color-icon-teal":"light-dark(#009688, #26A69A)","--color-text-teal":"light-dark(#083943, #40DCCD)","--color-background-yellow":"light-dark(#E2A40033, #E2A40033)","--color-border-yellow":"light-dark(#C58600, #B47700)","--color-icon-yellow":"light-dark(#FBC02D, #FFEE58)","--color-text-yellow":"light-dark(#753F07, #FBCE03)"},JC={"--spacing-0":"0px","--spacing-0-5":"2px","--spacing-1":"4px","--spacing-1-5":"6px","--spacing-2":"8px","--spacing-3":"12px","--spacing-4":"16px","--spacing-5":"20px","--spacing-6":"24px","--spacing-7":"28px","--spacing-8":"32px","--spacing-9":"36px","--spacing-10":"40px","--spacing-11":"44px","--spacing-12":"48px"},rs={"--spacing-1":"var(--spacing-1)","--spacing-2":"var(--spacing-2)"},eE={"--size-element-sm":"28px","--size-element-md":"32px","--size-element-lg":"36px"},tE={"--radius-none":"0px","--radius-inner":"4px","--radius-element":"8px","--radius-container":"12px","--radius-page":"28px","--radius-chat":"28px","--radius-full":"9999px"},nE={"--shadow-low":"0px 1px 1px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), 0px 2px 8px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2))","--shadow-med":"0px 1px 2px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), 0px 2px 12px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2))","--shadow-high":"0px 2px 2px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), 0px 8px 24px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3))","--shadow-inset-hover":"inset 0px 0px 0px 2px light-dark(rgba(5, 54, 89, 0.15), rgba(223, 226, 229, 0.2))","--shadow-inset-selected":"inset 0px 0px 0px 2px rgba(1, 113, 227, 0.5)","--shadow-inset-success":"inset 0px 0px 0px 2px rgba(38, 167, 86, 0.3)","--shadow-inset-warning":"inset 0px 0px 0px 2px rgba(226, 164, 0, 0.3)","--shadow-inset-error":"inset 0px 0px 0px 2px rgba(227, 25, 59, 0.3)"},sE={"--duration-fast-min":"130ms","--duration-fast":"175ms","--duration-fast-max":"230ms","--duration-medium-min":"310ms","--duration-medium":"410ms","--duration-medium-max":"550ms","--duration-slow-min":"730ms","--duration-slow":"975ms","--duration-slow-max":"1300ms"},rE={"--ease-standard":"cubic-bezier(0.24, 1, 0.4, 1)"},iE={"--font-family-body":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',"--font-family-code":'"SF Mono", Monaco, Consolas, monospace',"--font-family-heading":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},aE={"--font-size-4xs":"0.375rem","--font-size-3xs":"0.4375rem","--font-size-2xs":"0.5rem","--font-size-xs":"0.625rem","--font-size-sm":"0.75rem","--font-size-base":"0.875rem","--font-size-lg":"1.0625rem","--font-size-xl":"1.25rem","--font-size-2xl":"1.5rem","--font-size-3xl":"1.8125rem","--font-size-4xl":"2.1875rem","--font-size-5xl":"2.625rem"},oE={"--font-weight-normal":"400","--font-weight-medium":"500","--font-weight-semibold":"600","--font-weight-bold":"700"},lE={"--text-heading-1-size":"var(--font-size-2xl)","--text-heading-1-weight":"var(--font-weight-semibold)","--text-heading-1-leading":"1.3333","--text-heading-2-size":"var(--font-size-xl)","--text-heading-2-weight":"var(--font-weight-semibold)","--text-heading-2-leading":"1.4","--text-heading-3-size":"var(--font-size-lg)","--text-heading-3-weight":"var(--font-weight-semibold)","--text-heading-3-leading":"1.4118","--text-heading-4-size":"var(--font-size-base)","--text-heading-4-weight":"var(--font-weight-semibold)","--text-heading-4-leading":"1.4286","--text-heading-5-size":"var(--font-size-sm)","--text-heading-5-weight":"var(--font-weight-semibold)","--text-heading-5-leading":"1.6667","--text-heading-6-size":"var(--font-size-xs)","--text-heading-6-weight":"var(--font-weight-semibold)","--text-heading-6-leading":"1.6","--text-body-size":"var(--font-size-base)","--text-body-weight":"var(--font-weight-normal)","--text-body-leading":"1.4286","--text-large-size":"var(--font-size-lg)","--text-large-weight":"var(--font-weight-semibold)","--text-large-leading":"1.4118","--text-label-size":"var(--font-size-base)","--text-label-weight":"var(--font-weight-medium)","--text-label-leading":"1.4286","--text-code-size":"var(--font-size-base)","--text-code-weight":"var(--font-weight-normal)","--text-code-leading":"1.4286","--text-supporting-size":"var(--font-size-sm)","--text-supporting-weight":"var(--font-weight-normal)","--text-supporting-leading":"1.6667","--text-display-1-size":"var(--font-size-5xl)","--text-display-1-weight":"var(--font-weight-normal)","--text-display-1-leading":"1.2381","--text-display-2-size":"var(--font-size-4xl)","--text-display-2-weight":"var(--font-weight-normal)","--text-display-2-leading":"1.2571","--text-display-3-size":"var(--font-size-3xl)","--text-display-3-weight":"var(--font-weight-normal)","--text-display-3-leading":"1.2414"},u0=x.createContext(null);u0.displayName="LayoutAreaContext";const cE={hasHeader:!1,hasFooter:!1,hasStart:!1,hasEnd:!1},Wh=x.createContext(cE);Wh.displayName="LayoutSlotsContext";const Kh=x.createContext(null);Kh.displayName="LayoutDividerContext";const uE={center:{kGNEyG:"x6s0dn4",$$css:!0},end:{kGNEyG:"xuk3077",$$css:!0},start:{kGNEyG:"x1cy8zhl",$$css:!0},stretch:{kGNEyG:"x1qjc9v5",$$css:!0}},dE={start:{kjj79g:"x1nhvcw1",$$css:!0},center:{kjj79g:"xl56j7k",$$css:!0},end:{kjj79g:"x13a6bvl",$$css:!0},between:{kjj79g:"x1qughib",$$css:!0},around:{kjj79g:"x1l1ennw",$$css:!0},evenly:{kjj79g:"xaw8158",$$css:!0}},fE={horizontal:{kXwgrk:"x1q0g3np",$$css:!0},vertical:{kXwgrk:"xdt5ytf",$$css:!0}},hE={nowrap:{kwnvtZ:"xozqiw3",$$css:!0},wrap:{kwnvtZ:"x1a02dak",$$css:!0},"wrap-reverse":{kwnvtZ:"x8hhl5t",$$css:!0}},xE={stack:{k1xSpc:"x78zum5",$$css:!0}},pE={0:{k1C7PZ:"x1o57wo1",khm7nJ:"x6yxi7o",$$css:!0},1:{k1C7PZ:"x1lfs0n9",khm7nJ:"x1ngg2t4",$$css:!0},2:{k1C7PZ:"xak3so",khm7nJ:"x1x7z4sm",$$css:!0},3:{k1C7PZ:"xewh9hi",khm7nJ:"x4olc9o",$$css:!0},4:{k1C7PZ:"xty4p9g",khm7nJ:"xtx9w7w",$$css:!0},5:{k1C7PZ:"x1eqhezk",khm7nJ:"x1iu6piu",$$css:!0},6:{k1C7PZ:"x3qlgwd",khm7nJ:"xczp1bk",$$css:!0},8:{k1C7PZ:"xicv188",khm7nJ:"xgx0vcf",$$css:!0},10:{k1C7PZ:"x1p37tyl",khm7nJ:"x1xpicb7",$$css:!0},"0.5":{k1C7PZ:"x1kihgfc",khm7nJ:"x1tw44j4",$$css:!0},"1.5":{k1C7PZ:"x1thn6ci",khm7nJ:"xhq53yo",$$css:!0}};function _p({crossAlign:e,direction:t,gap:n,mainAlign:s,wrap:r}){return[xE.stack,fE[t],n!=null&&pE[n],e!=null&&uE[e],s!=null&&dE[s],r!=null&&hE[r]]}const gE={reset:{kAzted:"x2lwn1j",k7Eaqz:"xeuugli",$$css:!0}},mE={center:{kSGwAc:"xamitd3",$$css:!0},end:{kSGwAc:"xpvyfi4",$$css:!0},start:{kSGwAc:"xqcrz7y",$$css:!0},stretch:{kSGwAc:"xkh2ocl",$$css:!0}},yE={fill:{kzQI83:"x1iyjqo2",$$css:!0},static:{kzQI83:"x1c4vz4f",kmuXW:"x2lah0s",$$css:!0}};function kE({crossAlignSelf:e,size:t}={}){return[gE.reset,yE[t??"static"],e!=null&&mE[e]]}function d0(e){return e==="base"?"":e.split("+").map(t=>{const[n,s]=t.split(":");return s===void 0?`.${n}`:/^\d/.test(s)?`.${n}-${s}`:`.${s}`}).join("")}function bE(e,t){return e!=null?`id:${e}`:`fallback:${typeof t=="function"?t():t}`}function td(e,t){const n={...e,...t},s=[e.className,t.className].filter(Boolean).join(" ");s?n.className=s:delete n.className;const r=t.style&&e.style?{...e.style,...t.style}:t.style||e.style;return r?n.style=r:delete n.style,n}function U(e,t,n,s){if(typeof e=="string"){const l=e,c=t??{className:""},u=n;let d=c.className?`${l} ${c.className}`:l;u&&(d=`${d} ${u}`);const f=s&&c.style?{...c.style,...s}:s||c.style;return{...c,className:d,style:f}}let a=td(e,typeof t=="string"?{className:t}:t??{});return typeof n=="string"?a=td(a,{className:n}):n!=null&&(a=td(a,{style:n})),s!=null&&(a=td(a,{style:s})),a}function it(...e){return t=>{const n=[];for(const s of e)if(typeof s=="function"){const r=s(t);typeof r=="function"&&n.push(r)}else s!=null&&(s.current=t);if(n.length>0)return()=>{for(const s of n)s()}}}function Xh(...e){return t=>{for(const n of e)if(n==null||n(t),t.defaultPrevented)return}}const f0="astryx",V5=f0,Zh=f0,vE=f0;function Op(e){return`${V5}-${e}`}function Cn(e){return`data-${Zh}-${e}`}function wE(e){return`--${vE}-${e}`}function jE(e){return`data-${e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`}function SE(e,t){return/^\d/.test(t)?`${e}-${t}`:t}function $E(e,t){const n=[Op(e)];if(t)for(const[s,r]of Object.entries(t))r!=null&&n.push(SE(s,String(r)));return n.join(" ")}function CE(e){const t={};if(e)for(const[n,s]of Object.entries(e))s!=null&&(t[jE(n)]=String(s));return t}function P(e,t){return{className:$E(e,t),...CE(t)}}function ib(e){const t=e.auxiliaryData;return typeof(t==null?void 0:t.group)=="string"?t.group:void 0}function EE(e){var a;if(!e.some(l=>ib(l)!=null))return[{heading:null,items:e}];const n=[],s=new Map,r=[];for(const l of e){const c=ib(l);c!=null?(s.has(c)||(n.push(c),s.set(c,[])),(a=s.get(c))==null||a.push(l)):r.push(l)}const i=n.map(l=>({heading:l,items:s.get(l)??[]}));return r.length>0&&i.push({heading:null,items:r}),i}let ra=null;const Bf=new Map;function TE(){return ra||(ra=new ResizeObserver(e=>{for(const t of e){const n=Bf.get(t.target);n&&n(t)}})),ra}function h0(e,t){Bf.set(e,t),TE().observe(e),t({target:e})}function x0(e){Bf.delete(e),ra&&(ra.unobserve(e),Bf.size===0&&(ra.disconnect(),ra=null))}function s1(e){return e!=null&&typeof e!="boolean"&&e!==""}function ab(...e){const t=e.flatMap(n=>typeof n=="string"?n.trim().split(/\s+/):[]).filter(Boolean);if(t.length!==0)return Array.from(new Set(t)).join(" ")}function W5(e,t=[],n){return{ariaLabelledBy:n?ab(n.labelID,e):void 0,ariaDescribedBy:ab(n==null?void 0:n.describedByIDs,...t)}}const zE={transparent:{r:0,g:0,b:0,a:0},black:{r:0,g:0,b:0,a:1},white:{r:255,g:255,b:255,a:1}},qf=(e,t,n)=>Math.max(t,Math.min(n,e));function AE(e){return e.split("").map(t=>t+t).join("")}function NE(e){if(typeof e!="string")return null;const t=e.trim().replace(/^#/,""),n=t.length===3||t.length===4?AE(t):t;return n.length!==6&&n.length!==8||!/^[0-9a-fA-F]+$/.test(n)?null:{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:n.length===8?parseInt(n.slice(6,8),16)/255:1}}function ME(e){const t=e.indexOf("(");if(t===-1||!e.trim().endsWith(")"))return null;const s=e.slice(t+1,e.lastIndexOf(")")).replace(/\//g," ").split(/[\s,]+/).map(u=>u.trim()).filter(Boolean);if(s.length<3)return null;const r=u=>{const d=u.endsWith("%")?parseFloat(u)/100*255:parseFloat(u);return qf(d,0,255)},i=r(s[0]),a=r(s[1]),l=r(s[2]);if([i,a,l].some(Number.isNaN))return null;let c=1;if(s.length>=4){const u=s[3];if(c=u.endsWith("%")?parseFloat(u)/100:parseFloat(u),Number.isNaN(c))return null;c=qf(c,0,1)}return{r:i,g:a,b:l,a:c}}function ob(e){const t=e.trim(),n=zE[t.toLowerCase()];return n?{...n}:t.startsWith("#")?NE(t):/^rgba?\(/i.test(t)?ME(t):null}function RE(e,t,n){const s=r=>qf(Math.round(r),0,255).toString(16).padStart(2,"0").toUpperCase();return`#${s(e)}${s(t)}${s(n)}`}function IE({r:e,g:t,b:n,a:s}){if(s>=1)return RE(e,t,n);const r=i=>qf(Math.round(i),0,255);return`rgba(${r(e)}, ${r(t)}, ${r(n)}, ${parseFloat(s.toFixed(4))})`}function _E(e,t){return`${e}: ${t}`}function pa(e,t,...n){}function K5(e,t,...n){console.error(_E(e,t),...n)}function p0(e,t,n,...s){}const OE={kbCHJM:"x1nrll8i",k3aq6I:"xsqj5wx",$$css:!0},ul={mirror:{k3aq6I:"xgtlewx",$$css:!0},centerInline:e=>[OE,{"--x-transform":`translate(-50%, ${e})`!=null?`translate(-50%, ${e})`:void 0}]},X5={0:"spacing0",.5:"spacing0_5",1:"spacing1",1.5:"spacing1_5",2:"spacing2",3:"spacing3",4:"spacing4",5:"spacing5",6:"spacing6",8:"spacing8",10:"spacing10"},zl={0:{kZCmMZ:"x18gyask",kwRFfy:"x1s0aq8i",kLKAdn:"x1ydh6w3",kGO01o:"x1l20ajd",$$css:!0},1:{kZCmMZ:"x1vsv5vr",kwRFfy:"x1nryj5t",kLKAdn:"xfsso4q",kGO01o:"xy143xn",$$css:!0},2:{kZCmMZ:"x12gdq22",kwRFfy:"x1djylfy",kLKAdn:"x1xye8es",kGO01o:"x1wesfrj",$$css:!0},3:{kZCmMZ:"x126nfab",kwRFfy:"x1t818jl",kLKAdn:"x1vlblms",kGO01o:"xvmdzux",$$css:!0},4:{kZCmMZ:"x1rey3nv",kwRFfy:"xnjyzlh",kLKAdn:"x1oa1p4a",kGO01o:"x1awphl8",$$css:!0},5:{kZCmMZ:"x1blguxw",kwRFfy:"xdbrk9v",kLKAdn:"xx7rijo",kGO01o:"x1hk98q",$$css:!0},6:{kZCmMZ:"x31w388",kwRFfy:"x1we12cn",kLKAdn:"x1adxfkp",kGO01o:"xjpqqx5",$$css:!0},8:{kZCmMZ:"x1j3hnjz",kwRFfy:"x1q91b2g",kLKAdn:"xoxd1wu",kGO01o:"x2oz4g1",$$css:!0},10:{kZCmMZ:"xqp078j",kwRFfy:"x160ivqr",kLKAdn:"xk6660b",kGO01o:"x2izi54",$$css:!0},"0.5":{kZCmMZ:"x138rykx",kwRFfy:"x1le3yxw",kLKAdn:"xbx876j",kGO01o:"xij103a",$$css:!0},"1.5":{kZCmMZ:"xfti1ec",kwRFfy:"x17hk9do",kLKAdn:"x1kwdpsa",kGO01o:"x1opdxmq",$$css:!0}},Al={0:{"--container-padding-inline-start":"x1gu2k80","--container-padding-inline-end":"x91ghl5",$$css:!0},1:{"--container-padding-inline-start":"x1cvlban","--container-padding-inline-end":"x2oyxnl",$$css:!0},2:{"--container-padding-inline-start":"x1xlrr2o","--container-padding-inline-end":"xcas3b9",$$css:!0},3:{"--container-padding-inline-start":"xfdwxua","--container-padding-inline-end":"xu0ipoa",$$css:!0},4:{"--container-padding-inline-start":"x1dlhslv","--container-padding-inline-end":"xs0pscg",$$css:!0},5:{"--container-padding-inline-start":"x1s81nki","--container-padding-inline-end":"xgkj7vj",$$css:!0},6:{"--container-padding-inline-start":"x1ep0dkj","--container-padding-inline-end":"x94cj42",$$css:!0},8:{"--container-padding-inline-start":"xw1diwv","--container-padding-inline-end":"x1b9k1pi",$$css:!0},10:{"--container-padding-inline-start":"xserb3f","--container-padding-inline-end":"xx5lg5w",$$css:!0},"0.5":{"--container-padding-inline-start":"x14ws0sr","--container-padding-inline-end":"x1wz3t3y",$$css:!0},"1.5":{"--container-padding-inline-start":"x176g23i","--container-padding-inline-end":"xntetml",$$css:!0}},Nl={0:{"--container-padding-block-start":"x1i3qcxz",$$css:!0},1:{"--container-padding-block-start":"xnsckjb",$$css:!0},2:{"--container-padding-block-start":"xa8b4fq",$$css:!0},3:{"--container-padding-block-start":"x11k4f5r",$$css:!0},4:{"--container-padding-block-start":"xm01sq8",$$css:!0},5:{"--container-padding-block-start":"xp8wdkl",$$css:!0},6:{"--container-padding-block-start":"x1hmud4d",$$css:!0},8:{"--container-padding-block-start":"xfv60at",$$css:!0},10:{"--container-padding-block-start":"x17h9kl7",$$css:!0},"0.5":{"--container-padding-block-start":"xvdf9ev",$$css:!0},"1.5":{"--container-padding-block-start":"x1kbx601",$$css:!0}},Ml={0:{"--container-padding-block-end":"xkunwnr",$$css:!0},1:{"--container-padding-block-end":"x57a7ii",$$css:!0},2:{"--container-padding-block-end":"x1lsgcmx",$$css:!0},3:{"--container-padding-block-end":"x1q3ppug",$$css:!0},4:{"--container-padding-block-end":"x4hfsld",$$css:!0},5:{"--container-padding-block-end":"xbib2ws",$$css:!0},6:{"--container-padding-block-end":"x1q8d17g",$$css:!0},8:{"--container-padding-block-end":"x8lgq76",$$css:!0},10:{"--container-padding-block-end":"x15vxphk",$$css:!0},"0.5":{"--container-padding-block-end":"x1cao3zv",$$css:!0},"1.5":{"--container-padding-block-end":"xv53x8y",$$css:!0}},DE={0:{"--layout-padding-outer-x":"xswhm3q",$$css:!0},1:{"--layout-padding-outer-x":"xc96xmq",$$css:!0},2:{"--layout-padding-outer-x":"x15dxnc0",$$css:!0},3:{"--layout-padding-outer-x":"xadgj3j",$$css:!0},4:{"--layout-padding-outer-x":"x1v56qcf",$$css:!0},5:{"--layout-padding-outer-x":"x1nzs0gl",$$css:!0},6:{"--layout-padding-outer-x":"x1c3n52a",$$css:!0},8:{"--layout-padding-outer-x":"x1t3kfz",$$css:!0},10:{"--layout-padding-outer-x":"x1jdf5a4",$$css:!0},"0.5":{"--layout-padding-outer-x":"xihiwg7",$$css:!0},"1.5":{"--layout-padding-outer-x":"x1u93lgd",$$css:!0}},LE={0:{"--layout-padding-outer-y":"x1mzf5mb",$$css:!0},1:{"--layout-padding-outer-y":"x1gpfxoh",$$css:!0},2:{"--layout-padding-outer-y":"x10pz7y9",$$css:!0},3:{"--layout-padding-outer-y":"x1p6yq3h",$$css:!0},4:{"--layout-padding-outer-y":"xx738ci",$$css:!0},5:{"--layout-padding-outer-y":"x6yxws5",$$css:!0},6:{"--layout-padding-outer-y":"x180vrwl",$$css:!0},8:{"--layout-padding-outer-y":"xid7e43",$$css:!0},10:{"--layout-padding-outer-y":"x26l4wa",$$css:!0},"0.5":{"--layout-padding-outer-y":"x1vj96e0",$$css:!0},"1.5":{"--layout-padding-outer-y":"xd3dqby",$$css:!0}},BE={0:{kZCmMZ:"x18gyask",kwRFfy:"x1s0aq8i",$$css:!0},1:{kZCmMZ:"x1vsv5vr",kwRFfy:"x1nryj5t",$$css:!0},2:{kZCmMZ:"x12gdq22",kwRFfy:"x1djylfy",$$css:!0},3:{kZCmMZ:"x126nfab",kwRFfy:"x1t818jl",$$css:!0},4:{kZCmMZ:"x1rey3nv",kwRFfy:"xnjyzlh",$$css:!0},5:{kZCmMZ:"x1blguxw",kwRFfy:"xdbrk9v",$$css:!0},6:{kZCmMZ:"x31w388",kwRFfy:"x1we12cn",$$css:!0},8:{kZCmMZ:"x1j3hnjz",kwRFfy:"x1q91b2g",$$css:!0},10:{kZCmMZ:"xqp078j",kwRFfy:"x160ivqr",$$css:!0},"0.5":{kZCmMZ:"x138rykx",kwRFfy:"x1le3yxw",$$css:!0},"1.5":{kZCmMZ:"xfti1ec",kwRFfy:"x17hk9do",$$css:!0}},qE={0:{kLKAdn:"x1ydh6w3",kGO01o:"x1l20ajd",$$css:!0},1:{kLKAdn:"xfsso4q",kGO01o:"xy143xn",$$css:!0},2:{kLKAdn:"x1xye8es",kGO01o:"x1wesfrj",$$css:!0},3:{kLKAdn:"x1vlblms",kGO01o:"xvmdzux",$$css:!0},4:{kLKAdn:"x1oa1p4a",kGO01o:"x1awphl8",$$css:!0},5:{kLKAdn:"xx7rijo",kGO01o:"x1hk98q",$$css:!0},6:{kLKAdn:"x1adxfkp",kGO01o:"xjpqqx5",$$css:!0},8:{kLKAdn:"xoxd1wu",kGO01o:"x2oz4g1",$$css:!0},10:{kLKAdn:"xk6660b",kGO01o:"x2izi54",$$css:!0},"0.5":{kLKAdn:"xbx876j",kGO01o:"xij103a",$$css:!0},"1.5":{kLKAdn:"x1kwdpsa",kGO01o:"x1opdxmq",$$css:!0}},Ur={layoutOuter:{keTefX:"xojxgvx",k71WvV:"x1fcf3bl",keoZOQ:"x1sa9bsh",k1K539:"x6h7pi7",$$css:!0},layoutInner:{"--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0},fill:{kZKoxP:"x12qplqi",kskxy:"xenllk4",$$css:!0},auto:{kAzted:"x1us19tq",$$css:!0},middle:{kUk6DE:"x98rzlu",kAzted:"x2lwn1j",$$css:!0},fullBleed:{"--layout-padding-outer-x":"x1wbjvqu","--layout-padding-outer-y":"xzxxx64",$$css:!0}},HE={kzqmXN:"xh8yej3",kUOVxO:"xvueqy4",$$css:!0},lb={contentWidthVar:e=>[{"--layout-content-width":(typeof e=="number"?`${e}px`:e)!=null?"x4906uf":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x---layout-content-width":(typeof e=="number"?`${e}px`:e)!=null?typeof e=="number"?`${e}px`:e:void 0}],contentWidth:e=>[HE,{ks0D6T:(typeof e=="number"?`${e}px`:e)!=null?"xf68679":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(typeof e=="number"?`${e}px`:e)}]};function Jl({area:e,children:t}){return t==null?null:o.jsx(u0,{value:e,children:t})}const PE={"x-default-marker":"x-default-marker",$$css:!0};function Qn({children:e,content:t,contentWidth:n,defaultHasDividers:s,end:r,footer:i,header:a,height:l="fill",padding:c,ref:u,start:d,xstyle:f,className:h,style:p}){const m=l==="fill",b=t??e,y=x.useMemo(()=>s!=null?{defaultHasDividers:s}:null,[s]),g=a!=null,k=i!=null,v=d!=null,w=r!=null,j=x.useMemo(()=>({hasHeader:g,hasFooter:k,hasStart:v,hasEnd:w}),[g,k,v,w]),$=o.jsx(Wh,{value:j,children:o.jsx("div",{ref:u,...U(P("layout",{height:l}),B(Ur.layoutOuter,m?Ur.fill:Ur.auto,f),h,p),children:o.jsxs("div",{...B(PE,Ur.layoutInner,..._p({direction:"vertical"}),m?Ur.fill:Ur.auto,c===0&&Ur.fullBleed,c!=null&&DE[c],c!=null&&LE[c],n!=null&&lb.contentWidthVar(n)),children:[o.jsx(Jl,{area:"header",children:a}),o.jsxs("div",{...B(..._p({direction:"horizontal"}),Ur.middle,n!=null&&lb.contentWidth(n)),children:[o.jsx(Jl,{area:"start",children:d}),o.jsx("div",{...B(...kE({size:"fill"})),children:o.jsx(Jl,{area:"content",children:b})}),o.jsx(Jl,{area:"end",children:r})]}),o.jsx(Jl,{area:"footer",children:i})]})})});return y!=null?o.jsx(Kh,{value:y,children:$}):$}Qn.displayName="Layout";const nd={header:{kmuXW:"x2lah0s",$$css:!0},inner:{kB7OPa:"x9f619",ks0D6T:"xjl2t3p",kUOVxO:"xvueqy4",kZCmMZ:"x139j0dd",kwRFfy:"xpc6k2p",kLKAdn:"x81pis9",kGO01o:"xg476vw","--container-padding-inline-start":"xdvaxxn","--container-padding-inline-end":"xqpvj4r","--container-padding-block-start":"xzz8v79","--container-padding-block-end":"xi9ns85",$$css:!0},fullBleed:{kZCmMZ:"x1c1uobl",kwRFfy:"xyri2b",kLKAdn:"xexx8yu",kGO01o:"x18d9i69","--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0},divider:{kt9PQ7:"xso031l",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},UE={sizing:e=>[{kZKoxP:e!=null?"x16ye13r":e,$$css:!0},{"--x-height":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function Hf({children:e,hasDivider:t,height:n,label:s,padding:r,role:i,xstyle:a,className:l,style:c,ref:u,...d}){const f=x.use(Kh),h=t??(f==null?void 0:f.defaultHasDividers)??!1,p=r===0;return o.jsx("div",{ref:u,role:i,"aria-label":s,"data-divider":h||void 0,...U(P("layout-header"),B(nd.header,UE.sizing(n??null),h&&nd.divider,a),l,c),...d,children:o.jsx("div",{...B(nd.inner,p&&nd.fullBleed,r!=null&&zl[r],r!=null&&Al[r],r!=null&&Nl[r],r!=null&&Ml[r]),children:e})})}Hf.displayName="LayoutHeader";const Ss={panel:{kB7OPa:"x9f619",kmuXW:"x2lah0s",kVQacm:"x7giv3",kZCmMZ:"xwjyata",kwRFfy:"x1peupej",kLKAdn:"xqty4a",kGO01o:"xg476vw","--container-padding-inline-start":"x408pgh","--container-padding-inline-end":"xikqloz","--container-padding-block-start":"xjmgx01","--container-padding-block-end":"xi9ns85",$$css:!0},startPanel:{kZCmMZ:"x139j0dd",$$css:!0},endPanel:{kwRFfy:"xpc6k2p",$$css:!0},noHeader:{kLKAdn:"x81pis9",$$css:!0},noFooter:{kGO01o:"xon7vh3",$$css:!0},fullBleed:{kZCmMZ:"x1c1uobl",kwRFfy:"xyri2b",kLKAdn:"xexx8yu",kGO01o:"x18d9i69","--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0},scrollable:{kVQacm:"xysyzu8",$$css:!0},dividerEnd:{ke9TFa:"x1lun4ml",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",$$css:!0},dividerStart:{k2ei4v:"xpilrb4",kVhnKS:"x1t7ytsu",kGJrpR:"x1j92z86",$$css:!0},collapseStart:{keTefX:"x1wim8z0",$$css:!0},collapseEnd:{k71WvV:"x1kpg4um",$$css:!0}},FE={sizing:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function g0({children:e,hasDivider:t=!1,isScrollable:n=!0,label:s,padding:r,role:i,width:a,resizable:l,xstyle:c,className:u,style:d,ref:f,...h}){const p=x.use(u0),{hasHeader:m,hasFooter:b}=x.use(Wh),y=l?l._size:a,g=p==="start",k=p==="end",v=r===0,w=!t&&!v&&r==null,j=g?Ss.dividerEnd:k?Ss.dividerStart:null,$=g?Ss.collapseEnd:k?Ss.collapseStart:null;return o.jsx("div",{ref:f,role:i,"aria-label":s,...U(P("layout-panel"),B(Ss.panel,FE.sizing(y??null),g&&!v&&r==null&&Ss.startPanel,k&&!v&&r==null&&Ss.endPanel,!m&&!v&&r==null&&Ss.noHeader,!b&&!v&&r==null&&Ss.noFooter,n&&Ss.scrollable,v&&Ss.fullBleed,r!=null&&zl[r],r!=null&&Al[r],r!=null&&Nl[r],r!=null&&Ml[r],t&&j,w&&$,c),u,d),...h,children:e})}g0.displayName="LayoutPanel";const Bi={content:{kB7OPa:"x9f619",kZKoxP:"x5yr21d",kUk6DE:"x98rzlu",kAzted:"x2lwn1j",kVQacm:"x7giv3",kZCmMZ:"xwjyata",kwRFfy:"x1peupej",kLKAdn:"xqty4a x1ioh5az",kGO01o:"xg476vw xsg11nj","--container-padding-inline-start":"x408pgh","--container-padding-inline-end":"xikqloz","--container-padding-block-start":"xjmgx01","--container-padding-block-end":"xi9ns85",$$css:!0},noStart:{kZCmMZ:"x139j0dd","--container-padding-inline-start":"xdvaxxn","--container-padding-inline-end":"xqpvj4r",$$css:!0},noEnd:{kwRFfy:"xpc6k2p",$$css:!0},noHeader:{kLKAdn:"x81pis9","--container-padding-block-start":"xzz8v79",$$css:!0},noFooter:{kGO01o:"xon7vh3","--container-padding-block-end":"x1xjq73n",$$css:!0},scrollable:{kVQacm:"xysyzu8",$$css:!0},fullBleed:{kZCmMZ:"x1c1uobl",kwRFfy:"xyri2b",kLKAdn:"xexx8yu",kGO01o:"x18d9i69","--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0}};function Jn({children:e,isScrollable:t=!0,padding:n,label:s,role:r,xstyle:i,className:a,style:l,ref:c,...u}){const{hasHeader:d,hasFooter:f,hasStart:h,hasEnd:p}=x.use(Wh),m=n===0;return o.jsx("div",{ref:c,role:r,"aria-label":s,...U(P("layout-content"),B(Bi.content,!h&&!m&&n==null&&Bi.noStart,!p&&!m&&n==null&&Bi.noEnd,!d&&!m&&n==null&&Bi.noHeader,!f&&!m&&n==null&&Bi.noFooter,t&&Bi.scrollable,m&&Bi.fullBleed,n!=null&&zl[n],n!=null&&Al[n],n!=null&&Nl[n],n!=null&&Ml[n],i),a,l),...u,children:e})}Jn.displayName="LayoutContent";function Z5(e){return(e.style.anchorName??"").split(",").map(n=>n.trim()).filter(Boolean)}function Y5(e,t){e.style.anchorName=t.join(", ")}function GE(e,t){const n=Z5(e);n.includes(t)||(n.push(t),Y5(e,n))}function VE(e,t){Y5(e,Z5(e).filter(n=>n!==t))}const r1={base:{keoZOQ:"xdj266r",k1K539:"xat24cr",keTefX:"x1lziwak",k71WvV:"x14z9mp",kLKAdn:"xexx8yu",kGO01o:"x18d9i69",kZCmMZ:"x1c1uobl",kwRFfy:"xyri2b",kMzoRj:"xc342km",ksu8eU:"xng3xce",kVQacm:"x1rea2x4",kMv6JI:"x9ynric",kWkggS:"xjbqb8w",$$css:!0},fixed:{kVAEAm:"xixxii4",$$css:!0}};function WE(e="above",t="center"){if(e==="above"||e==="below"){const s=e==="above"?"self-block-start":"self-block-end";return t==="start"?`${s} span-self-inline-end`:t==="end"?`${s} span-self-inline-start`:s}const n=e==="start"?"self-inline-start":"self-inline-end";return t==="start"?`${n} span-self-block-end`:t==="end"?`${n} span-self-block-start`:n}function KE(e="above",t="center"){const n="flip-block, flip-inline, flip-block flip-inline";if(t!=="center")return n;if(e==="above"||e==="below"){const[i,a]=e==="above"?["top","bottom"]:["bottom","top"];return`${n}, ${i} span-left, ${i} span-right, ${a} span-left, ${a} span-right`}const[s,r]=e==="start"?["left","right"]:["right","left"];return`${n}, ${s} span-top, ${s} span-bottom, ${r} span-top, ${r} span-bottom`}function Rl(e){const{mode:t,onShow:n,onHide:s,lightDismiss:r=!1}=e,i=x.useId(),a=`--astryx-layer-${i.replace(/:/g,"")}`,[l,c]=x.useState(!1),u=x.useRef(null),d=x.useRef(null),f=x.useRef(!1),h=x.useCallback(()=>{const $=u.current;$&&!f.current&&(typeof $.showPopover=="function"?$.showPopover():$.style.display="block",f.current=!0,c(!0),n==null||n())},[n]),p=x.useCallback(()=>{if(f.current){const $=u.current;$&&(typeof $.hidePopover=="function"?$.hidePopover():$.style.display="none"),f.current=!1,c(!1),s==null||s()}},[s]),m=t==="context"?$=>{d.current&&d.current!==$&&VE(d.current,a),$&&GE($,a),d.current=$}:void 0,b=x.useCallback($=>{$.newState==="closed"&&f.current&&(f.current=!1,c(!1),s==null||s())},[s]),y=x.useRef(null),g=x.useRef(null),k=x.useCallback(($,C)=>{y.current&&g.current&&(y.current!==$||g.current!==C)&&(y.current.removeEventListener("toggle",g.current),y.current=null,g.current=null),$&&y.current!==$&&($.addEventListener("toggle",C),y.current=$,g.current=C)},[]),v=x.useCallback($=>{u.current=$,k($,b)},[b,k]);x.useEffect(()=>(u.current&&k(u.current,b),()=>{y.current&&g.current&&(y.current.removeEventListener("toggle",g.current),y.current=null,g.current=null)}),[b,k]);const w=x.useCallback(($,C)=>{const{placement:E="above",alignment:T="center",positioning:S="anchor",role:N,"aria-label":z,xstyle:M,className:R,style:I,as:A="div",onMouseEnter:_,onMouseLeave:O}=C||{},D=S==="custom"?{positionAnchor:a}:{positionAnchor:a,positionArea:WE(E,T),positionTryFallbacks:KE(E,T)},L=B(r1.base,M),q=R?`${R} ${L.className??""}`:L.className;return o.jsx(A,{ref:v,id:i,role:N,"aria-label":z,popover:r?"auto":"manual",className:q,style:{...L.style,...D,...I},onMouseEnter:_,onMouseLeave:O,children:$})},[a,i,r,v]),j=x.useCallback(($,C)=>{const{x:E,y:T,xstyle:S,className:N,style:z}=C,M={top:T,left:E},R=B(r1.base,r1.fixed,S),I=N?`${N} ${R.className??""}`:R.className;return o.jsx("div",{ref:v,id:i,popover:r?"auto":"manual",className:I,style:{...R.style,...M,...z},children:$})},[v,i,r]);return t==="context"?{ref:m,anchorId:a,show:h,hide:p,isOpen:l,id:i,render:w}:{ref:void 0,show:h,hide:p,isOpen:l,id:i,render:j}}const rr={below:{kKVMdj:"xl1vlw0 x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},above:{kKVMdj:"x3psbcj x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},end:{kKVMdj:"x1i331go x1vxsm5i x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},start:{kKVMdj:"xck01x9 x18lne9g x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0}},XE=100,i1={container:{kWkggS:"x19aspcf",kMwMTN:"xrkvqaz",kaIpWk:"x1hviunn",kMv6JI:"x9ynric",kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",$$css:!0},marginBlock:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",keTefX:"x1lziwak",k71WvV:"x14z9mp",$$css:!0},marginInline:{keoZOQ:"xdj266r",k1K539:"xat24cr",keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0}};function ZE(e){return e.hasAttribute("tabindex")?e.tabIndex>=0:["A","BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)?!e.disabled:!!e.isContentEditable}function ms(e={}){const{placement:t="above",alignment:n="center",delay:s=200,hideDelay:r=0,focusTrigger:i="auto",isEnabled:a=!0,isOpen:l,isDefaultOpen:c=!1,onShow:u,onHide:d}=e,f=t==="above"||t==="below"?i1.marginBlock:i1.marginInline,h=Rl({mode:"context",onShow:u,onHide:d}),p=x.useMemo(()=>[i1.container,f],[f]),m=x.useRef(null),b=x.useRef(null),y=x.useRef(null),g=x.useCallback(()=>{m.current&&(clearTimeout(m.current),m.current=null),b.current&&(clearTimeout(b.current),b.current=null)},[]),k=x.useCallback(()=>{!a||l===!1||(g(),m.current=setTimeout(()=>{h.show()},s))},[a,l,g,h,s]),v=x.useCallback(()=>{if(l===!0)return;g();const M=r>0?r:XE;b.current=setTimeout(()=>{h.hide()},M)},[l,g,h,r]),w=x.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null)},[]),j=x.useCallback(()=>{typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(hover: none)").matches||k()},[k]),$=x.useCallback(()=>{v()},[v]),C=x.useCallback(M=>{!a||!M.target.matches(":focus-visible")||(g(),h.show())},[a,g,h]),E=x.useCallback(()=>{v()},[v]),T=x.useCallback(()=>{l===void 0&&(g(),h.hide())},[l,g,h]),S=x.useCallback(M=>{y.current&&(y.current.removeEventListener("mouseenter",j),y.current.removeEventListener("mouseleave",$),y.current.removeEventListener("focusin",C),y.current.removeEventListener("focusout",E),y.current.removeEventListener("pointerdown",T)),M&&(M.addEventListener("mouseenter",j),M.addEventListener("mouseleave",$),M.addEventListener("pointerdown",T),(i==="always"||i==="auto"&&ZE(M))&&(M.addEventListener("focusin",C),M.addEventListener("focusout",E))),y.current=M},[i,j,$,C,E,T]),N=x.useCallback(M=>{h.ref(M),S(M)},[h,S]);x.useEffect(()=>()=>{g()},[g]),x.useEffect(()=>{c&&h.show()},[]),x.useEffect(()=>{l!==void 0&&(l?(g(),h.show()):(g(),h.hide()))},[l,g,h]),x.useEffect(()=>{if(l!==void 0)return;const M=R=>{R.key==="Escape"&&(R.isComposing||R.keyCode===229||(g(),h.hide()))};return document.addEventListener("keydown",M),()=>{document.removeEventListener("keydown",M)}},[l,h,g]);const z=x.useCallback((M,R)=>{const I=(R==null?void 0:R.placement)??t,A={placement:I,alignment:(R==null?void 0:R.alignment)??n,role:"tooltip",xstyle:[p,rr[I]],className:P("tooltip").className,onMouseEnter:w,onMouseLeave:v};return h.render(o.jsx("div",{className:"xfsso4q xy143xn x12gdq22 x1djylfy xw5ewwj x13faqbe",children:M}),A)},[h,t,n,p,w,v]);return{ref:N,positionRef:h.ref,interactionRef:S,anchorId:h.anchorId,describedBy:h.id,renderTooltip:z}}const m0={"--color-syntax-keyword":"var(--color-text-accent)","--color-syntax-string":"var(--color-text-green)","--color-syntax-comment":"var(--color-text-secondary)","--color-syntax-number":"var(--color-text-orange)","--color-syntax-function":"var(--color-text-blue)","--color-syntax-type":"var(--color-text-purple)","--color-syntax-variable":"var(--color-text-primary)","--color-syntax-operator":"var(--color-text-cyan)","--color-syntax-constant":"var(--color-text-orange)","--color-syntax-tag":"var(--color-text-red)","--color-syntax-attribute":"var(--color-text-teal)","--color-syntax-property":"var(--color-text-cyan)","--color-syntax-punctuation":"var(--color-text-disabled)","--color-syntax-background":"var(--color-background-muted)"},YE={"--color-data-categorical-blue":"light-dark(#0171E3, #0171E3)","--color-data-categorical-orange":"light-dark(#EB6E00, #EB6E00)","--color-data-categorical-purple":"light-dark(#6B1EFD, #6B1EFD)","--color-data-categorical-green":"light-dark(#0B991F, #0B991F)","--color-data-categorical-pink":"light-dark(#F351C0, #F351C0)","--color-data-categorical-cyan":"light-dark(#0171A4, #0171A4)","--color-data-categorical-red":"light-dark(#F5394F, #F5394F)","--color-data-categorical-teal":"light-dark(#08A3A3, #08A3A3)","--color-data-categorical-brown":"light-dark(#965E03, #965E03)","--color-data-categorical-indigo":"light-dark(#6F8AFF, #6F8AFF)","--color-data-neutral":"light-dark(#8494A3, #8C939B)","--color-data-blue-5":"light-dark(#02165E, #02165E)","--color-data-blue-4":"light-dark(#004CBC, #004CBC)","--color-data-blue-3":"light-dark(#2694FE, #2694FE)","--color-data-blue-2":"light-dark(#78BEFF, #78BEFF)","--color-data-blue-1":"light-dark(#DBECFF, #DBECFF)","--color-data-shamrock-5":"light-dark(#0B603D, #0B603D)","--color-data-shamrock-4":"light-dark(#138546, #138546)","--color-data-shamrock-3":"light-dark(#24BB5E, #24BB5E)","--color-data-shamrock-2":"light-dark(#8EF7AA, #8EF7AA)","--color-data-shamrock-1":"light-dark(#D6FEE4, #D6FEE4)","--color-data-orange-5":"light-dark(#A13F04, #A13F04)","--color-data-orange-4":"light-dark(#D66100, #D66100)","--color-data-orange-3":"light-dark(#FD9537, #FD9537)","--color-data-orange-2":"light-dark(#FDB876, #FDB876)","--color-data-orange-1":"light-dark(#FFE6CF, #FFE6CF)","--color-data-pink-5":"light-dark(#8E1073, #8E1073)","--color-data-pink-4":"light-dark(#D123A1, #D123A1)","--color-data-pink-3":"light-dark(#F989D3, #F989D3)","--color-data-pink-2":"light-dark(#FEADE3, #FEADE3)","--color-data-pink-1":"light-dark(#FCE3F4, #FCE3F4)","--color-data-purple-5":"light-dark(#3E0697, #3E0697)","--color-data-purple-4":"light-dark(#6B1EFD, #6B1EFD)","--color-data-purple-3":"light-dark(#9081FF, #9081FF)","--color-data-purple-2":"light-dark(#B3B0FE, #B3B0FE)","--color-data-purple-1":"light-dark(#E8E8FB, #E8E8FB)","--color-data-red-5":"light-dark(#9D0519, #9D0519)","--color-data-red-4":"light-dark(#D31130, #D31130)","--color-data-red-3":"light-dark(#FB7D87, #FB7D87)","--color-data-red-2":"light-dark(#FFB2B8, #FFB2B8)","--color-data-red-1":"light-dark(#FEE4E6, #FEE4E6)","--color-data-teal-5":"light-dark(#08767D, #08767D)","--color-data-teal-4":"light-dark(#0C9293, #0C9293)","--color-data-teal-3":"light-dark(#0DB7AF, #0DB7AF)","--color-data-teal-2":"light-dark(#6CE6D8, #6CE6D8)","--color-data-teal-1":"light-dark(#D7FCF8, #D7FCF8)","--color-data-yellow-5":"light-dark(#8A5001, #8A5001)","--color-data-yellow-4":"light-dark(#D69804, #D69804)","--color-data-yellow-3":"light-dark(#FBCE03, #FBCE03)","--color-data-yellow-2":"light-dark(#FCEC85, #FCEC85)","--color-data-yellow-1":"light-dark(#FDF6BA, #FDF6BA)","--color-data-gray-5":"light-dark(#25363F, #333338)","--color-data-gray-4":"light-dark(#5D6C7B, #666A72)","--color-data-gray-3":"light-dark(#AFB9C4, #B2B8BE)","--color-data-gray-2":"light-dark(#CCD3DB, #D0D3D6)","--color-data-gray-1":"light-dark(#F1F4F7, #F2F4F6)"},QE={...m0,...YE},Q5=new Map;function JE(e){Q5.set(e.name,e)}function J5(e){return e==null||e===""?null:Q5.get(e)??null}const eT={avatar:[{property:"fontSize",vars:["--_avatar-fallback-font-size"]},{property:"fontWeight",vars:["--_avatar-fallback-font-weight"]},{property:"color",vars:["--_avatar-fallback-color"]},{property:"backgroundColor",vars:["--_avatar-fallback-background"]}],banner:[{property:"borderRadius",vars:["--_banner-radius"]}],button:[{property:"borderRadius",vars:["--_button-radius"]}],card:[{property:"borderRadius",vars:["--_card-radius"]},{property:"padding",expand:"container"}],chat:[{property:"borderRadius",vars:["--_chat-composer-radius"]},{property:"padding",vars:["--_chat-composer-padding"]}],dialog:[{property:"borderRadius",vars:["--_dialog-radius"]},{property:"padding",expand:"container"}],"dropdown-menu":[{property:"borderRadius",vars:["--_dropdown-menu-radius"]},{property:"padding",vars:["--_dropdown-menu-padding"]}],field:[{property:"borderRadius",vars:["--_field-radius"]}],hovercard:[{property:"borderRadius",vars:["--_hovercard-radius"]}],popover:[{property:"borderRadius",vars:["--_popover-radius"]}],section:[{property:"padding",expand:"container"}],"segmented-control":[{property:"borderRadius",vars:["--_segmented-control-radius"]},{property:"padding",vars:["--_segmented-control-padding"]}]};function cb(e,t){const n=eT[e];return n?n.filter(s=>s.property===t):[]}function e3(e){return`[data-${Zh}-theme="${e}"]`}const t3=`[data-${Zh}-theme]`;function ub(e){return`[data-${Zh}-media="${e}"]`}function Oo(e,t){return`.${V5}-${e}${t}`}function n3(e,t){const n=[];let s=0,r=0;for(let i=0;i<e.length;i++){const a=e[i];a==="("?s++:a===")"?s=Math.max(0,s-1):a===","&&s===0&&(n.push(e.slice(r,i).trim()),r=i+1)}return n.push(e.slice(r).trim()),n.map(i=>`${i}${t}`).join(", ")}function Pf(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const sd=new Set(["padding","paddingBlock","paddingInline","paddingBlockStart","paddingBlockEnd","paddingInlineStart","paddingInlineEnd"]);function tT(e){const t={};for(const[n,s]of e)switch(n){case"padding":{const r=s.trim().split(/\s+/);r.length===1?(t.blockStart=r[0],t.blockEnd=r[0],t.inline=r[0]):r.length===2?(t.blockStart=r[0],t.blockEnd=r[0],t.inline=r[1]):r.length>=3&&(t.blockStart=r[0],t.inline=r[1],t.blockEnd=r[2]);break}case"paddingBlock":{const r=s.trim().split(/\s+/);t.blockStart=r[0],t.blockEnd=r[1]??r[0];break}case"paddingInline":{const r=s.trim().split(/\s+/);r.length===1?t.inline=r[0]:(t.inlineStart=r[0],t.inlineEnd=r[1]);break}case"paddingBlockStart":t.blockStart=s;break;case"paddingBlockEnd":t.blockEnd=s;break;case"paddingInlineStart":t.inlineStart=s;break;case"paddingInlineEnd":t.inlineEnd=s;break}return t}function nT(e,t){const n=wE(`${e}-padding`),s=[],r=t.inlineStart??t.inline,i=t.inlineEnd??t.inline;return r!=null&&i!=null&&r===i&&t.blockStart!=null&&t.blockEnd!=null&&r===t.blockStart&&t.blockStart===t.blockEnd?(s.push([n,r??""]),s):(t.inlineStart!=null||t.inlineEnd!=null?(r!=null&&s.push([`${n}-inline-start`,r]),i!=null&&s.push([`${n}-inline-end`,i])):t.inline!=null&&s.push([`${n}-inline`,t.inline]),t.blockStart!=null&&s.push([`${n}-block-start`,t.blockStart]),t.blockEnd!=null&&s.push([`${n}-block-end`,t.blockEnd]),s)}function sT(e){const t=[],n=e.tokens,s=i=>n[i]||`var(${i})`,r=Object.entries(n);if(r.length>0){const i=r.map(([a,l])=>` ${a}: ${l};`).join(`
18
- `);t.push(` :scope {
19
- ${i}
20
- }`)}return e.components&&rT(e.components,t),iT(s,t),aT(e.components||{},t),lT(e.components||{},t),t}function rT(e,t){for(const[n,s]of Object.entries(e))for(const[r,i]of Object.entries(s)){const a=Object.entries(i);if(a.length===0)continue;const l=d0(r),c=Oo(n,l),u=[],d=[];for(const[m,b]of a)m.startsWith(":")&&typeof b=="object"?d.push([m,b]):u.push([m,b]);let f=u;const h=[];let p=!1;for(const[m,b]of u){const y=cb(n,m),g=sd.has(m)&&m!=="padding"?cb(n,"padding"):[];for(const k of[...y,...g])if(k.expand==="container"&&sd.has(m)&&(p=!0),k.vars)for(const v of k.vars)h.push([v,b])}if(p){const m=u.filter(([k])=>sd.has(k)),b=u.filter(([k])=>!sd.has(k)),y=tT(m),g=nT(n,y);f=[...b,...g]}if(h.length>0&&(f=[...f,...h]),f.length>0){const m=f.map(([b,y])=>` ${Pf(b)}: ${y};`).join(`
21
- `);t.push(` ${c} {
22
- ${m}
23
- }`)}for(const[m,b]of d){const y=Object.entries(b);if(y.length>0){const g=y.map(([k,v])=>` ${Pf(k)}: ${v};`).join(`
24
- `);t.push(` ${n3(c,m)} {
25
- ${g}
26
- }`)}}}}function iT(e,t){t.push(` :where(h1, h2, h3, h4, h5, h6) {
27
- font-family: var(--font-family-heading);
28
- color: var(--color-text-primary);
29
- }`);for(let n=1;n<=6;n++)t.push(` :where(h${n}) {
30
- font-size: ${e(`--text-heading-${n}-size`)};
31
- font-weight: ${e(`--text-heading-${n}-weight`)};
32
- line-height: ${e(`--text-heading-${n}-leading`)};
33
- }`);t.push(` :where(p) {
34
- font-family: var(--font-family-body);
35
- font-size: ${e("--text-body-size")};
36
- font-weight: ${e("--text-body-weight")};
37
- line-height: ${e("--text-body-leading")};
38
- color: var(--color-text-primary);
39
- }`),t.push(` :where(small) {
40
- font-size: ${e("--text-supporting-size")};
41
- font-weight: ${e("--text-supporting-weight")};
42
- line-height: ${e("--text-supporting-leading")};
43
- color: var(--color-text-secondary);
44
- }`),t.push(` :where(code, pre) {
45
- font-family: var(--font-family-code);
46
- font-size: ${e("--text-code-size")};
47
- line-height: ${e("--text-code-leading")};
48
- }`),t.push(` :where(hr) {
49
- border: none;
50
- border-top: 1px solid var(--color-border);
51
- }`)}function aT(e,t){const n={primary:"var(--color-text-primary)",secondary:"var(--color-text-secondary)",disabled:"var(--color-text-disabled)",placeholder:"var(--color-text-secondary)",accent:"var(--color-text-accent)"},s="text"in e,r="heading"in e,i="link"in e;if(s||r||i)for(const[a,l]of Object.entries(n))s&&t.push(` ${Oo("text",`.${a}`)} { color: ${l}; }`),r&&t.push(` ${Oo("heading",`.${a}`)} { color: ${l}; }`),i&&t.push(` ${Oo("link",`.${a}`)} { color: ${l}; }`)}const oT={"4xs":"var(--font-size-4xs)","3xs":"var(--font-size-3xs)","2xs":"var(--font-size-2xs)",xsm:"var(--font-size-xs)",sm:"var(--font-size-sm)",base:"var(--font-size-base)",lg:"var(--font-size-lg)",xl:"var(--font-size-xl)","2xl":"var(--font-size-2xl)","3xl":"var(--font-size-3xl)","4xl":"var(--font-size-4xl)"};function lT(e,t){if("text"in e)for(const[n,s]of Object.entries(oT)){const r=d0(`size:${n}`);t.push(` ${Oo("text",r)} { font-size: ${s}; }`)}}function cT(e){const t=sT(e),n=[],s=[];for(const r of t)r.trimStart().startsWith(":where(")?n.push(r):s.push(r);return{component:s,prose:n}}function uT(e){const t=[],n=e3(e.name);for(const r of["dark","light"]){const i=r==="dark"?e.__onDark:e.__onLight;if(!i)continue;const a=Object.entries(i.tokens);if(a.length>0){const l=a.map(([c,u])=>` ${c}: ${u};`).join(`
52
- `);t.push(` ${ub(r)} {
53
- ${l}
54
- }`)}if(i.components)for(const[l,c]of Object.entries(i.components))for(const[u,d]of Object.entries(c)){const f=Object.entries(d);if(f.length===0)continue;const h=d0(u),p=`:is(${ub(r)}) :is(${Oo(l,h)})`,m=[],b=[];for(const[y,g]of f)y.startsWith(":")&&typeof g=="object"?b.push([y,g]):m.push([y,g]);if(m.length>0){const y=m.map(([g,k])=>` ${Pf(g)}: ${k};`).join(`
55
- `);t.push(` ${p} {
56
- ${y}
57
- }`)}for(const[y,g]of b){const k=Object.entries(g);if(k.length>0){const v=k.map(([w,j])=>` ${Pf(w)}: ${j};`).join(`
58
- `);t.push(` ${n3(p,y)} {
59
- ${v}
60
- }`)}}}}if(t.length===0)return"";const s=t.join(`
61
-
62
- `);return`@scope (${n}) to (${t3}) {
63
- ${s}
64
- }`}function dT(e){const{component:t,prose:n}=cT(e),s=e3(e.name),r=t3;let i="";if(n.length>0){const c=n.join(`
65
-
66
- `);i=`@scope (${s}) to (${r}) {
67
- ${c}
68
- }`}let a="";if(t.length>0){const c=t.join(`
69
-
70
- `);a=`@scope (${s}) to (${r}) {
71
- ${c}
72
- }`}const l=uT(e);return l&&(a=a?`${a}
73
-
74
- ${l}`:l),{prose:i,component:a}}const s3={...QC,...JC,...eE,...tE,...nE,...sE,...rE,...iE,...aE,...oE,...lE,...QE};function fT(e){return`var(${e})`}Object.fromEntries(Object.keys(s3).map(e=>[e,fT(e)]));function y0(e){let t=0,n=null,s=!1;for(let r=0;r<e.length;r++){const i=e[r];if(n!==null){s?s=!1:i==="\\"?s=!0:i===n&&(n=null);continue}if(i==='"'||i==="'"){n=i;continue}if(i==="("){t++;continue}if(i===")"){t=Math.max(0,t-1);continue}if(i===","&&t===0)return[e.slice(0,r).trim(),e.slice(r+1).trim()]}return null}function hT(e){const t=e.trim(),n="light-dark(";if(!t.startsWith(n)||!t.endsWith(")"))return null;const s=t.slice(n.length,-1);return y0(s)}function a1(e,t){if(Array.isArray(e))return t==="dark"?e[1]:e[0];const n=hT(e);return n!==null?t==="dark"?n[1]:n[0]:e}function r3(e,t){let n=0;for(let s=t;s<e.length;s++){const r=e[s];if(r==="(")n++;else if(r===")"&&(n--,n===0))return s}return-1}function db(e){const t=e.trim(),n=t.match(/\s+([\d.]+)%$/);return n?{color:t.slice(0,n.index).trim(),percentage:parseFloat(n[1])}:{color:t,percentage:null}}function xT(e){const t=e.match(/^in\s+([\w-]+)\s*,\s*(.+)$/s);if(!t)return null;const[,n,s]=t;if(n.toLowerCase()!=="srgb")return null;const r=y0(s);if(r===null)return null;const i=db(r[0]),a=db(r[1]);if(i===null||a===null)return null;const l=ob(i.color),c=ob(a.color);if(l===null||c===null)return null;let u,d;i.percentage!==null&&a.percentage!==null?(u=i.percentage,d=a.percentage):i.percentage!==null?(u=i.percentage,d=100-u):a.percentage!==null?(d=a.percentage,u=100-d):(u=50,d=50);const f=u+d;if(f<=0)return null;const h=u/f,p=d/f,m=f<100?f/100:1,b=h*l.a+p*c.a,y=(j,$)=>h*j*l.a+p*$*c.a,g=y(l.r,c.r),k=y(l.g,c.g),v=y(l.b,c.b),w=b===0?{r:0,g:0,b:0}:{r:g/b,g:k/b,b:v/b};return IE({...w,a:b*m})}function Dp(e){const t=e.indexOf("color-mix(");if(t===-1)return e;const n=t+9,s=r3(e,n);if(s===-1)return e;const r=Dp(e.slice(n+1,s)),a=xT(r)??`color-mix(${r})`;return e.slice(0,t)+a+Dp(e.slice(s+1))}function Lp(e,t,n,s){const r=e.indexOf("var(");if(r===-1)return e;const i=r+3,a=r3(e,i);if(a===-1)return e;const l=e.slice(i+1,a),c=y0(l),u=(c?c[0]:l).trim(),d=c?c[1]:null;let f;s.has(u)?f=e.slice(r,a+1):u in t?(s.add(u),f=i3(u,t,n,s),s.delete(u)):d!==null?f=Lp(d.trim(),t,n,s):f=e.slice(r,a+1);const h=Lp(e.slice(a+1),t,n,s);return e.slice(0,r)+f+h}function pT(e,t,n,s){if(!e.includes("var(")&&!e.includes("color-mix("))return e;const r=Lp(e,t,n,s);return Dp(r)}function i3(e,t,n,s){if(e in n)return n[e];const r=t[e];if(r===void 0)return"";const i=pT(r,t,n,s);return n[e]=i,i}function fb(e){const t={};for(const n of Object.keys(e))i3(n,e,t,new Set);return t}function gT(e,t){const{mode:n}=t,s={};for(const[r,i]of Object.entries(s3))s[r]=a1(i,n);if(e==null)return fb(s);for(const[r,i]of Object.entries(e.tokens))s[r]=a1(i,n);if(e.__inputTokens)for(const[r,i]of Object.entries(e.__inputTokens))i!==void 0&&(s[r]=a1(i,n));return fb(s)}function qa(e,t=!1){const n=x.useCallback(i=>{const a=window.matchMedia(e);return a.addEventListener("change",i),()=>a.removeEventListener("change",i)},[e]),s=x.useCallback(()=>window.matchMedia(e).matches,[e]),r=x.useCallback(()=>t,[t]);return x.useSyncExternalStore(n,s,r)}const Yh=x.createContext(null);Yh.displayName="ThemeContext";function mT(){if(typeof document>"u")return null;const e=document.documentElement.getAttribute("data-theme");return e==="light"||e==="dark"?e:null}function yT(){return null}function kT(){return typeof document>"u"?null:document.documentElement.getAttribute(Cn("theme"))}function bT(){return null}function a3(){return null}const pc=new Set;let ec=null;const gc=new Set;let tc=null;function vT(){for(const e of pc)e()}function wT(e){return pc.add(e),pc.size===1&&typeof MutationObserver<"u"&&(ec=new MutationObserver(vT),ec.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})),()=>{pc.delete(e),pc.size===0&&ec&&(ec.disconnect(),ec=null)}}function jT(){for(const e of gc)e()}function ST(e){return gc.add(e),gc.size===1&&typeof MutationObserver<"u"&&(tc=new MutationObserver(jT),tc.observe(document.documentElement,{attributes:!0,attributeFilter:[Cn("theme")]})),()=>{gc.delete(e),gc.size===0&&tc&&(tc.disconnect(),tc=null)}}function o3(){return()=>{}}function $T(e){return x.useSyncExternalStore(e?o3:wT,e?a3:mT,yT)}function l3(e){return x.useSyncExternalStore(e?o3:ST,e?a3:kT,bT)}function c3(){const e=x.use(Yh),t=e!=null,n=l3(t);return(e==null?void 0:e.theme.name)??n}function Qh(){const e=x.use(Yh),t=e!=null,n=$T(t),s=l3(t),r=qa("(prefers-color-scheme: dark)"),i=(e==null?void 0:e.mode)??n??"system",a=(e==null?void 0:e.theme)??J5(s),l=i==="system"?r?"dark":"light":i,c=x.useMemo(()=>gT(a,{mode:l}),[a,l]),u=d=>c[d]??"";return{name:(a==null?void 0:a.name)??"default",mode:l,token:u,tokens:c}}const CT="modulepreload",ET=function(e){return"/"+e},hb={},u3=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=ET(c),c in hb)return;hb[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":CT,u||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return r.then(a=>{for(const l of a||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},k0={primary:{kMwMTN:"x1tgivj0",$$css:!0},secondary:{kMwMTN:"xv1l7n4",$$css:!0},disabled:{kMwMTN:"xnbbluu",$$css:!0},placeholder:{kMwMTN:"xv1l7n4",$$css:!0},accent:{kMwMTN:"xjse4m1",$$css:!0},inherit:{kMwMTN:"x1heor9g",$$css:!0}},TT={normal:{k63SB2:"x1sodnla",$$css:!0},medium:{k63SB2:"x1e4wzip",$$css:!0},semibold:{k63SB2:"x2mo6ok",$$css:!0},bold:{k63SB2:"x1lvx875",$$css:!0}},d3={body:{k63SB2:"xxovm9e",$$css:!0},large:{k63SB2:"x149oux8",$$css:!0},label:{k63SB2:"xmhvcl5",$$css:!0},code:{k63SB2:"xx3eeay",$$css:!0},supporting:{k63SB2:"xv8on6e",$$css:!0},"display-1":{k63SB2:"x1txul5o",$$css:!0},"display-2":{k63SB2:"x1y36c3f",$$css:!0},"display-3":{k63SB2:"x1on40hk",$$css:!0},inherit:{k63SB2:"x1pd3egz",$$css:!0}},b0={body:{kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",$$css:!0},large:{kGuDYH:"x18juvz8",kLWn49:"xf74fhv",$$css:!0},label:{kGuDYH:"xcr08ib",kLWn49:"x1kq96og",$$css:!0},code:{kGuDYH:"xp03k98",kLWn49:"x17iicif",kMv6JI:"x9m5x89",$$css:!0},supporting:{kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",$$css:!0},"display-1":{kGuDYH:"xsub3ws",kLWn49:"x112ttwr",$$css:!0},"display-2":{kGuDYH:"x1yego12",kLWn49:"xh0iwvy",$$css:!0},"display-3":{kGuDYH:"xlgnzhf",kLWn49:"x1ujwuaq",$$css:!0},inherit:{kGuDYH:"x1qlqyl8",kLWn49:"x15bjb6t",$$css:!0}},zT={"4xs":{kGuDYH:"xxc45ev",$$css:!0},"3xs":{kGuDYH:"x10p7juq",$$css:!0},"2xs":{kGuDYH:"x16a80zy",$$css:!0},xsm:{kGuDYH:"x51wmvv",$$css:!0},sm:{kGuDYH:"x1eqnyfr",$$css:!0},base:{kGuDYH:"x1j29vfg",$$css:!0},lg:{kGuDYH:"xc7cgfe",$$css:!0},xl:{kGuDYH:"x1wqms48",$$css:!0},"2xl":{kGuDYH:"xhs0kqb",$$css:!0},"3xl":{kGuDYH:"x10srzze",$$css:!0},"4xl":{kGuDYH:"xqcvi3d",$$css:!0}},AT={1:{kGuDYH:"xcg7oai",kLWn49:"xfmsba7",k63SB2:"x1v68xuy",$$css:!0},2:{kGuDYH:"x1xvnhcw",kLWn49:"x1cpk1wn",k63SB2:"x12yy4cs",$$css:!0},3:{kGuDYH:"xii13ha",kLWn49:"xwjzt0u",k63SB2:"x1jcxfy8",$$css:!0},4:{kGuDYH:"x8tkxat",kLWn49:"xqerer",k63SB2:"x2hcmsi",$$css:!0},5:{kGuDYH:"xsgqta0",kLWn49:"xo3gurs",k63SB2:"xno150v",$$css:!0},6:{kGuDYH:"xw5ohdf",kLWn49:"xeixjfn",k63SB2:"x1pw4frv",$$css:!0}},f3={inline:{k1xSpc:"xt0psk2",$$css:!0},block:{k1xSpc:"x1lliihq",$$css:!0}},Uf={singleLine:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",k1xSpc:"x1lliihq",$$css:!0},multiLine:{kVQacm:"xb3r6kr",k1xSpc:"x104kibb",kgKLqz:"x1ua5tub",$$css:!0}},h3={"break-word":{kTgw9:"x1lldw8n",kHjlTd:"x1mzt3pk",$$css:!0},"break-all":{kTgw9:"x1yn0g08",$$css:!0}},x3={wrap:{kN2L0X:"xk4td0m",$$css:!0},nowrap:{kN2L0X:"xebhuq6",$$css:!0},balance:{kN2L0X:"x1w2vvpw",$$css:!0},pretty:{kN2L0X:"x1fzhlzt",$$css:!0}},p3={enabled:{kxwWH2:"x1b2iylo",kzeHkT:"xwgcxoh",k1xSpc:"x1lliihq",$$css:!0}},g3={strikethrough:{kybGjl:"xmqliwb",$$css:!0}},NT={enabled:{kcqcaj:"xss6m8b",$$css:!0}},m3={start:{k9WMMc:"x1yc453h",$$css:!0},center:{k9WMMc:"x2b8uid",$$css:!0},end:{k9WMMc:"xp4054r",$$css:!0}},y3={content:{ks0D6T:"xw5ewwj",kTgw9:"x13faqbe",$$css:!0}};function k3(e){const{maxLines:t}=e,[n,s]=x.useState(!1),[r,i]=x.useState(""),a=x.useRef(null),l=x.useCallback(u=>{if(t===0){s(!1);return}if(i(u.textContent??""),t===1)s(u.scrollWidth>u.offsetWidth);else{let d=u.scrollHeight;try{const f=document.createRange();f.selectNodeContents(u),d=f.getBoundingClientRect().height,f.detach()}catch{}s(d>u.offsetHeight)}},[t]);return{ref:x.useCallback(u=>{a.current&&x0(a.current),a.current=u,u&&t>0?typeof ResizeObserver<"u"?h0(u,()=>{l(u)}):l(u):(s(!1),i(""))},[t,l]),isTruncated:n,fullText:r}}const MT=x.lazy(async()=>u3(()=>Promise.resolve().then(()=>Y3),void 0).then(e=>({default:e.Tooltip}))),RT={body:"primary",large:"primary",label:"primary",supporting:"secondary",code:"primary","display-1":"primary","display-2":"primary","display-3":"primary",inherit:"inherit"};function IT(e){return e in b0?e:"body"}function b3(e){return e in k0?e:"primary"}function ee({type:e="body",size:t,color:n,weight:s,display:r="inline",maxLines:i=0,hasTruncateTooltip:a=!0,wordBreak:l,textWrap:c,justify:u="start",hasCapsize:d=!1,hasStrikethrough:f=!1,hasTabularNumbers:h=!1,xstyle:p,className:m,style:b,as:y="span",children:g,ref:k,...v}){const w=n??RT[e]??"primary",j=IT(e),$=b3(w),C=l??(i===1?"break-all":"break-word"),E=i>0||d?"block":r,T=k3({maxLines:i}),S=typeof a=="string"?a:"above",N=i>0&&a!==!1&&T.isTruncated,z=x.useRef(null),M=i>1?{WebkitLineClamp:i}:void 0;return o.jsxs(o.Fragment,{children:[o.jsx(y,{ref:it(k,T.ref,z),...U(P("text",{type:e,size:t,color:w}),B(k0[$],b0[j],t&&zT[t],d3[j],s&&TT[s],i===1?Uf.singleLine:i>1?Uf.multiLine:f3[E],i>0&&h3[C],c&&x3[c],u!=="start"&&m3[u],d&&p3.enabled,f&&g3.strikethrough,h&&NT.enabled,p),m,{...b,...M}),title:N?T.fullText:void 0,...v,children:g}),N&&o.jsx(x.Suspense,{fallback:null,children:o.jsx(MT,{anchorRef:z,content:o.jsx("span",{...B(y3.content),children:T.fullText}),placement:S})})]})}ee.displayName="Text";const _T=.75,xb=1.5,pb={sm:{diameter:10,border:2},md:{diameter:14,border:3},lg:{diameter:18,border:3},xl:{diameter:28,border:4}},gb={wrapper:{k1xSpc:"x3nfvp2",kXwgrk:"xdt5ytf",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",$$css:!0},spinner:{k1xSpc:"xwz0xwf",kgQiWS:"x1ku5rj1",kVQacm:"xb3r6kr",kXLuUW:"xxymvpz",$$css:!0}};function on({size:e="md",shade:t="default",label:n,xstyle:s,className:r,style:i,"aria-label":a,"data-testid":l,ref:c,...u}){const d=x.useRef(null),{tokens:f}=Qh();x.useEffect(()=>{const w=d.current;if(w==null)return;const j=w.getContext("2d");if(!j)return;const{border:$,diameter:C}=pb[e],E=window.devicePixelRatio||1,T=t==="inherit"?getComputedStyle(w).color:null,S=t==="inherit"?T:t==="onMedia"?f["--color-on-dark"]:t==="subtle"?f["--color-text-secondary"]:f["--color-accent"],N=t==="inherit"?T:t==="onMedia"?`${f["--color-on-dark"]}4D`:f["--color-track"],z=C+$*2,M=Math.round(z*E),R=M+M%2,I=R/z,A=C/2*I,_=$*I;w.height=w.width=R,w.style.width=w.style.height=z+"px",j.lineCap="round",j.lineWidth=_;const O=R/2;j.beginPath(),j.arc(O,O,A,0,2*Math.PI),j.strokeStyle=N,t==="inherit"&&(j.globalAlpha=.3),j.stroke(),j.globalAlpha=1,j.beginPath(),j.arc(O,O,A,xb*Math.PI,(xb+_T)%2*Math.PI),j.strokeStyle=S,j.stroke()},[t,e,f]);const{border:h,diameter:p}=pb[e],m=p+h*2,b=n!=null,y=x.useId(),g=b&&typeof n=="string"&&a==null,k=a??(typeof n=="string"?n:void 0)??"Loading",v=o.jsx("span",{ref:b?void 0:c,role:"status","aria-label":g?void 0:k,"aria-labelledby":g?y:void 0,"data-testid":b?void 0:l,...b?{}:u,...U(b?"":P("spinner",{size:e,shade:t}),B(gb.spinner,!b&&s),b?void 0:r,{...b?{}:i,width:m,height:m}),children:o.jsx("canvas",{ref:d,className:"xlp1x4z x1lliihq x1so62im x14qxm4i xnh0sag xa4qsjk x1ka1v4i x1esw782"})});return b?o.jsxs("div",{ref:c,"data-testid":l,...u,...U(P("spinner",{size:e,shade:t}),B(gb.wrapper,s),r,i),children:[v,typeof n=="string"?o.jsx(ee,{id:y,type:"body",weight:"bold",children:n}):n]}):v}on.displayName="Spinner";function Mi({children:e,as:t="span",ref:n,...s}){return x.createElement(t,{ref:n,...s,className:"x10l6tqk x1i1rx1s xjm9jq1 xkdpibf x1717udv xb3r6kr xzpqnlu xuxw1ft xng3xce x13vifvy x1o0tod x47corl x87ps6o"},e)}Mi.displayName="VisuallyHidden";const Ff="data-astryx-edge-comp",OT={keTefX:"x1kftj4p",k71WvV:"x92e2el",$$css:!0},DT={inset:e=>[OT,{"--x-126w13d":(t=>typeof t=="number"?t+"px":t??void 0)(`calc(-1 * ${e})`),"--x-4drmnv":(t=>typeof t=="number"?t+"px":t??void 0)(`calc(-1 * ${e})`)}]},v0=x.createContext(null);v0.displayName="SizeContext";function Ha(e,t="md"){const n=x.use(v0);return e??n??t}v0.Provider;const v3=x.createContext(null);v3.displayName="ButtonGroupContext";function LT(){return x.use(v3)}const w3=x.createContext(null);w3.displayName="LinkContext";function BT(e){function t({href:n,ref:s,...r}){return x.createElement(e,{ref:s,href:n,to:n,...r})}return t.displayName=`LinkWithTo(${typeof e=="string"?e:e.displayName||e.name||"Component"})`,t}function Ri(e){const t=x.use(w3),n=e??(t==null?void 0:t.component)??"a";return x.useMemo(()=>n==="a"?"a":BT(n),[n])}const j3=x.createContext({locale:"en",direction:"ltr",messages:{}});j3.displayName="InternationalizationContext";function o1(e,t){const n=t&&t.cache?t.cache:VT,s=t&&t.serializer?t.serializer:FT;return(t&&t.strategy?t.strategy:PT)(e,{cache:n,serializer:s})}function qT(e){return e==null||typeof e=="number"||typeof e=="boolean"}function HT(e,t,n,s){const r=qT(s)?s:n(s);let i=t.get(r);return typeof i>"u"&&(i=e.call(this,s),t.set(r,i)),i}function S3(e,t,n){const s=Array.prototype.slice.call(arguments,3),r=n(s);let i=t.get(r);return typeof i>"u"&&(i=e.apply(this,s),t.set(r,i)),i}function $3(e,t,n,s,r){return n.bind(t,e,s,r)}function PT(e,t){const n=e.length===1?HT:S3;return $3(e,this,n,t.cache.create(),t.serializer)}function UT(e,t){return $3(e,this,S3,t.cache.create(),t.serializer)}const FT=function(){return JSON.stringify(arguments)};var GT=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}};const VT={create:function(){return new GT}},l1={variadic:UT},WT=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function KT(e){const t={};return e.replace(WT,n=>{const s=n.length;switch(n[0]){case"G":t.era=s===4?"long":s===5?"narrow":"short";break;case"y":t.year=s===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][s-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][s-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=s===4?"long":s===5?"narrow":"short";break;case"e":if(s<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][s-3];break;case"c":if(s<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][s-3];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][s-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][s-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][s-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][s-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][s-1];break;case"s":t.second=["numeric","2-digit"][s-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=s<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}const XT=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function ZT(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");const t=e.split(XT).filter(s=>s.length>0),n=[];for(const s of t){let r=s.split("/");if(r.length===0)throw new Error("Invalid number skeleton");const[i,...a]=r;for(const l of a)if(l.length===0)throw new Error("Invalid number skeleton");n.push({stem:i,options:a})}return n}function YT(e){return e.replace(/^(.*?)-/,"")}const mb=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,C3=/^(@+)?(\+|#+)?[rs]?$/g,QT=/(\*)(0+)|(#+)(0+)|(0+)/g,E3=/^(0+)$/;function yb(e){const t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(C3,function(n,s,r){return typeof r!="string"?(t.minimumSignificantDigits=s.length,t.maximumSignificantDigits=s.length):r==="+"?t.minimumSignificantDigits=s.length:s[0]==="#"?t.maximumSignificantDigits=s.length:(t.minimumSignificantDigits=s.length,t.maximumSignificantDigits=s.length+(typeof r=="string"?r.length:0)),""}),t}function T3(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function JT(e){let t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){const n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!E3.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function kb(e){const t={},n=T3(e);return n||t}function ez(e){let t={};for(const n of e){switch(n.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=n.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=YT(n.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t={...t,notation:"scientific",...n.options.reduce((i,a)=>({...i,...kb(a)}),{})};continue;case"engineering":t={...t,notation:"engineering",...n.options.reduce((i,a)=>({...i,...kb(a)}),{})};continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(n.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(n.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");n.options[0].replace(QT,function(i,a,l,c,u,d){if(a)t.minimumIntegerDigits=l.length;else{if(c&&u)throw new Error("We currently do not support maximum integer digits");if(d)throw new Error("We currently do not support exact integer digits")}return""});continue}if(E3.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(mb.test(n.stem)){if(n.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");n.stem.replace(mb,function(a,l,c,u,d,f){return c==="*"?t.minimumFractionDigits=l.length:u&&u[0]==="#"?t.maximumFractionDigits=u.length:d&&f?(t.minimumFractionDigits=d.length,t.maximumFractionDigits=d.length+f.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});const i=n.options[0];i==="w"?t={...t,trailingZeroDisplay:"stripIfInteger"}:i&&(t={...t,...yb(i)});continue}if(C3.test(n.stem)){t={...t,...yb(n.stem)};continue}const s=T3(n.stem);s&&(t={...t,...s});const r=JT(n.stem);r&&(t={...t,...r})}return t}let tz=function(e){return e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG",e}({});function bb(e){return e.type===0}function nz(e){return e.type===1}function z3(e){return e.type===2}function A3(e){return e.type===3}function N3(e){return e.type===4}function M3(e){return e.type===5}function R3(e){return e.type===6}function sz(e){return e.type===7}function I3(e){return e.type===8}function _3(e){return!!(e&&typeof e=="object"&&e.type===0)}function Bp(e){return!!(e&&typeof e=="object"&&e.type===1)}const O3=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,nc={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GS:["H","h","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ku-SY":["H","hB"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function rz(e,t){let n="";for(let s=0;s<e.length;s++){const r=e.charAt(s);if(r==="j"){let i=0;for(;s+1<e.length&&e.charAt(s+1)===r;)i++,s++;let a=1+(i&1),l=i<2?1:3+(i>>1),c="a",u=iz(t);for((u=="H"||u=="k")&&(l=0);l-- >0;)n+=c;for(;a-- >0;)n=u+n}else r==="J"?n+="H":n+=r}return n}function iz(e){var r,i;let t=e.hourCycle;if(t===void 0){const a=e;t=((r=a.getHourCycles)==null?void 0:r.call(a)[0])??((i=a.hourCycles)==null?void 0:i[0])}if(t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}const n=e.language;let s;return n!=="root"&&(s=e.maximize().region),(nc[`${n}-${s}`]||nc[s||""]||nc[n||""]||nc[`${n}-001`]||nc["001"])[0].charAt(0)}const az=new RegExp(`^${O3.source}*`),oz=new RegExp(`${O3.source}*$`);function Ne(e,t){return{start:e,end:t}}const lz=!!Object.fromEntries,cz=!!String.prototype.trimStart,uz=!!String.prototype.trimEnd,vb=lz?Object.fromEntries:function(t){const n={};for(const[s,r]of t)n[s]=r;return n},dz=cz?function(t){return t.trimStart()}:function(t){return t.replace(az,"")},fz=uz?function(t){return t.trimEnd()}:function(t){return t.replace(oz,"")},wb=new RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");function hz(e,t){return wb.lastIndex=t,wb.exec(e)[1]??""}function xz(e){if(e.length===0)return null;let t=1,n=1;for(let s=0;s<e.length;){const r=e.charCodeAt(s);switch(r){case 35:case 39:case 60:case 123:case 125:return null}if(r===10)t++,n=1,s++;else if(n++,r>=55296&&r<=56319&&s+1<e.length){const i=e.charCodeAt(s+1);s+=i>=56320&&i<=57343?2:1}else s++}return{offset:e.length,line:t,column:n}}var pz=class{constructor(e,t={}){this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}parse(){if(this.offset()!==0)throw Error("parser can only be used once");if(this.message.length>0){const e=this.message.charCodeAt(0);if(e!==35&&e!==39&&e!==60&&e!==123&&e!==125){const t=xz(this.message);if(t){const n=this.clonePosition();return this.position=t,{val:[{type:0,value:this.message,location:Ne(n,this.clonePosition())}],err:null}}}}return this.parseMessage(0,"",!1)}parseMessage(e,t,n){let s=[];for(;!this.isEOF();){const r=this.char();if(r===123){const i=this.parseArgument(e,n);if(i.err)return i;s.push(i.val)}else{if(r===125&&e>0)break;if(r===35&&(t==="plural"||t==="selectordinal")){const i=this.clonePosition();this.bump(),s.push({type:7,location:Ne(i,this.clonePosition())})}else if(r===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(26,Ne(this.clonePosition(),this.clonePosition()))}else if(r===60&&!this.ignoreTag&&qp(this.peek()||0)){const i=this.parseTag(e,t);if(i.err)return i;s.push(i.val)}else{const i=this.parseLiteral(e,t);if(i.err)return i;s.push(i.val)}}}return{val:s,err:null}}parseTag(e,t){const n=this.clonePosition();this.bump();const s=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:0,value:`<${s}/>`,location:Ne(n,this.clonePosition())},err:null};if(this.bumpIf(">")){const r=this.parseMessage(e+1,t,!0);if(r.err)return r;const i=r.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!qp(this.char()))return this.error(23,Ne(a,this.clonePosition()));const l=this.clonePosition();return s!==this.parseTagName()?this.error(26,Ne(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:8,value:s,children:i,location:Ne(n,this.clonePosition())},err:null}:this.error(23,Ne(a,this.clonePosition())))}else return this.error(27,Ne(n,this.clonePosition()))}else return this.error(23,Ne(n,this.clonePosition()))}parseTagName(){const e=this.offset();for(this.bump();!this.isEOF()&&mz(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){const n=this.clonePosition();let s="";for(;;){const i=this.tryParseQuote(t);if(i){s+=i;continue}const a=this.tryParseUnquoted(e,t);if(a){s+=a;continue}const l=this.tryParseLeftAngleBracket();if(l){s+=l;continue}break}const r=Ne(n,this.clonePosition());return{val:{type:0,value:s,location:r},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!gz(this.peek()||0))?(this.bump(),"<"):null}tryParseQuote(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();const t=[this.char()];for(this.bump();!this.isEOF();){const n=this.char();if(n===39)if(this.peek()===39)t.push(39),this.bump();else{this.bump();break}else t.push(n);this.bump()}return String.fromCodePoint(...t)}tryParseUnquoted(e,t){if(this.isEOF())return null;const n=this.char();return n===60||n===123||n===35&&(t==="plural"||t==="selectordinal")||n===125&&e>0?null:(this.bump(),String.fromCodePoint(n))}parseArgument(e,t){const n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,Ne(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(2,Ne(n,this.clonePosition()));let s=this.parseIdentifierIfPossible().value;if(!s)return this.error(3,Ne(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,Ne(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:s,location:Ne(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,Ne(n,this.clonePosition())):this.parseArgumentOptions(e,t,s,n);default:return this.error(3,Ne(n,this.clonePosition()))}}parseIdentifierIfPossible(){const e=this.clonePosition(),t=this.offset(),n=hz(this.message,t),s=t+n.length;return this.bumpTo(s),{value:n,location:Ne(e,this.clonePosition())}}parseArgumentOptions(e,t,n,s){let r=this.clonePosition(),i=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(i){case"":return this.error(4,Ne(r,a));case"number":case"date":case"time":{this.bumpSpace();let l=null;if(this.bumpIf(",")){this.bumpSpace();const d=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;const h=fz(f.val);if(h.length===0)return this.error(6,Ne(this.clonePosition(),this.clonePosition()));l={style:h,styleLocation:Ne(d,this.clonePosition())}}const c=this.tryParseArgumentClose(s);if(c.err)return c;const u=Ne(s,this.clonePosition());if(l&&l.style.startsWith("::")){let d=dz(l.style.slice(2));if(i==="number"){const f=this.parseNumberSkeletonFromString(d,l.styleLocation);return f.err?f:{val:{type:2,value:n,location:u,style:f.val},err:null}}else{if(d.length===0)return this.error(10,u);let f=d;this.locale&&(f=rz(d,this.locale));const h={type:1,pattern:f,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?KT(f):{}};return{val:{type:i==="date"?3:4,value:n,location:u,style:h},err:null}}}return{val:{type:i==="number"?2:i==="date"?3:4,value:n,location:u,style:(l==null?void 0:l.style)??null},err:null}}case"plural":case"selectordinal":case"select":{const l=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(12,Ne(l,{...l}));this.bumpSpace();let c=this.parseIdentifierIfPossible(),u=0;if(i!=="select"&&c.value==="offset"){if(!this.bumpIf(":"))return this.error(13,Ne(this.clonePosition(),this.clonePosition()));this.bumpSpace();const p=this.tryParseDecimalInteger(13,14);if(p.err)return p;this.bumpSpace(),c=this.parseIdentifierIfPossible(),u=p.val}const d=this.tryParsePluralOrSelectOptions(e,i,t,c);if(d.err)return d;const f=this.tryParseArgumentClose(s);if(f.err)return f;const h=Ne(s,this.clonePosition());return i==="select"?{val:{type:5,value:n,options:vb(d.val),location:h},err:null}:{val:{type:6,value:n,options:vb(d.val),offset:u,pluralType:i==="plural"?"cardinal":"ordinal",location:h},err:null}}default:return this.error(5,Ne(r,a))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(1,Ne(e,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let e=0;const t=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(11,Ne(n,this.clonePosition()));this.bump();break}case 123:e+=1,this.bump();break;case 125:if(e>0)e-=1;else return{val:this.message.slice(t.offset,this.offset()),err:null};break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}}parseNumberSkeletonFromString(e,t){let n=[];try{n=ZT(e)}catch{return this.error(7,t)}return{val:{type:0,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?ez(n):{}},err:null}}tryParsePluralOrSelectOptions(e,t,n,s){let r=!1;const i=[],a=new Set;let{value:l,location:c}=s;for(;;){if(l.length===0){const h=this.clonePosition();if(t!=="select"&&this.bumpIf("=")){const p=this.tryParseDecimalInteger(16,19);if(p.err)return p;c=Ne(h,this.clonePosition()),l=this.message.slice(h.offset,this.offset())}else break}if(a.has(l))return this.error(t==="select"?21:20,c);l==="other"&&(r=!0),this.bumpSpace();const u=this.clonePosition();if(!this.bumpIf("{"))return this.error(t==="select"?17:18,Ne(this.clonePosition(),this.clonePosition()));const d=this.parseMessage(e+1,t,n);if(d.err)return d;const f=this.tryParseArgumentClose(u);if(f.err)return f;i.push([l,{value:d.val,location:Ne(u,this.clonePosition())}]),a.add(l),this.bumpSpace(),{value:l,location:c}=this.parseIdentifierIfPossible()}return i.length===0?this.error(t==="select"?15:16,Ne(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!r?this.error(22,Ne(this.clonePosition(),this.clonePosition())):{val:i,err:null}}tryParseDecimalInteger(e,t){let n=1;const s=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);let r=!1,i=0;for(;!this.isEOF();){const l=this.char();if(l>=48&&l<=57)r=!0,i=i*10+(l-48),this.bump();else break}const a=Ne(s,this.clonePosition());return r?(i*=n,Number.isSafeInteger(i)?{val:i,err:null}:this.error(t,a)):this.error(e,a)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){const e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");const t=this.message.codePointAt(e);if(t===void 0)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t}error(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}}bump(){if(this.isEOF())return;const e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}bumpIf(e){if(this.message.startsWith(e,this.offset())){for(let t=0;t<e.length;t++)this.bump();return!0}return!1}bumpUntil(e){const t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)}bumpTo(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){const t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&yz(this.char());)this.bump()}peek(){if(this.isEOF())return null;const e=this.char(),t=this.offset();return this.message.charCodeAt(t+(e>=65536?2:1))??null}};function qp(e){return e>=97&&e<=122||e>=65&&e<=90}function gz(e){return qp(e)||e===47}function mz(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function yz(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Hp(e){e.forEach(t=>{if(delete t.location,M3(t)||R3(t))for(const n in t.options)delete t.options[n].location,Hp(t.options[n].value);else z3(t)&&_3(t.style)||(A3(t)||N3(t))&&Bp(t.style)?delete t.style.location:I3(t)&&Hp(t.children)})}function kz(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};const n=new pz(e,t).parse();if(n.err){const s=SyntaxError(tz[n.err.kind]);throw s.location=n.err.location,s.originalMessage=n.err.message,s}return t!=null&&t.captureLocation||Hp(n.val),n.val}var Jh=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},jb=class extends Jh{constructor(e,t,n,s){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join('", "')}"`,"INVALID_VALUE",s)}},bz=class extends Jh{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,"INVALID_VALUE",n)}},vz=class extends Jh{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,"MISSING_VALUE",t)}};function wz(e){return e.length<2?e:e.reduce((t,n)=>{const s=t[t.length-1];return!s||s.type!==0||n.type!==0?t.push(n):s.value+=n.value,t},[])}function jz(e){return typeof e=="function"}function nf(e,t,n,s,r,i,a){if(e.length===1&&bb(e[0]))return[{type:0,value:e[0].value}];const l=[];for(const c of e){if(bb(c)){l.push({type:0,value:c.value});continue}if(sz(c)){typeof i=="number"&&l.push({type:0,value:n.getNumberFormat(t).format(i)});continue}const{value:u}=c;if(!(r&&u in r))throw new vz(u,a);let d=r[u];if(nz(c)){(!d||typeof d=="string"||typeof d=="number"||typeof d=="bigint")&&(d=typeof d=="string"||typeof d=="number"||typeof d=="bigint"?String(d):""),l.push({type:typeof d=="string"?0:1,value:d});continue}if(A3(c)){const f=typeof c.style=="string"?s.date[c.style]:Bp(c.style)?c.style.parsedOptions:void 0;l.push({type:0,value:n.getDateTimeFormat(t,f).format(d)});continue}if(N3(c)){const f=typeof c.style=="string"?s.time[c.style]:Bp(c.style)?c.style.parsedOptions:s.time.medium;l.push({type:0,value:n.getDateTimeFormat(t,f).format(d)});continue}if(z3(c)){const f=typeof c.style=="string"?s.number[c.style]:_3(c.style)?c.style.parsedOptions:void 0;if(f&&f.scale){const h=f.scale||1;if(typeof d=="bigint"){if(!Number.isInteger(h))throw new TypeError(`Cannot apply fractional scale ${h} to bigint value. Scale must be an integer when formatting bigint.`);d=d*BigInt(h)}else d=d*h}l.push({type:0,value:n.getNumberFormat(t,f).format(d)});continue}if(I3(c)){const{children:f,value:h}=c,p=r[h];if(!jz(p))throw new bz(h,"function",a);let m=p(nf(f,t,n,s,r,i).map(b=>b.value));Array.isArray(m)||(m=[m]),l.push(...m.map(b=>({type:typeof b=="string"?0:1,value:b})))}if(M3(c)){const f=d,h=(Object.prototype.hasOwnProperty.call(c.options,f)?c.options[f]:void 0)||c.options.other;if(!h)throw new jb(c.value,d,Object.keys(c.options),a);l.push(...nf(h.value,t,n,s,r));continue}if(R3(c)){const f=`=${d}`;let h=Object.prototype.hasOwnProperty.call(c.options,f)?c.options[f]:void 0;if(!h){if(!Intl.PluralRules)throw new Jh(`Intl.PluralRules is not available in this environment.
75
- Try polyfilling it using "@formatjs/intl-pluralrules"
76
- `,"MISSING_INTL_API",a);const m=typeof d=="bigint"?Number(d):d,b=n.getPluralRules(t,{type:c.pluralType}).select(m-(c.offset||0));h=(Object.prototype.hasOwnProperty.call(c.options,b)?c.options[b]:void 0)||c.options.other}if(!h)throw new jb(c.value,d,Object.keys(c.options),a);const p=typeof d=="bigint"?Number(d):d;l.push(...nf(h.value,t,n,s,r,p-(c.offset||0)));continue}}return wz(l)}function Sz(e,t){return t?{...e,...t,...Object.keys(e).reduce((n,s)=>(n[s]={...e[s],...t[s]},n),{})}:e}function $z(e,t){return t?Object.keys(e).reduce((n,s)=>(n[s]=Sz(e[s],t[s]),n),{...e}):e}function c1(e){return{create(){return{get(t){return e[t]},set(t,n){e[t]=n}}}}}function Cz(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:o1((...t)=>new Intl.NumberFormat(...t),{cache:c1(e.number),strategy:l1.variadic}),getDateTimeFormat:o1((...t)=>new Intl.DateTimeFormat(...t),{cache:c1(e.dateTime),strategy:l1.variadic}),getPluralRules:o1((...t)=>new Intl.PluralRules(...t),{cache:c1(e.pluralRules),strategy:l1.variadic})}}var Gt,Ez=(Gt=class{constructor(t,n=Gt.defaultLocale,s,r){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=i=>{const a=this.formatToParts(i);if(a.length===1)return a[0].value;const l=a.reduce((c,u)=>(!c.length||u.type!==0||typeof c[c.length-1]!="string"?c.push(u.value):c[c.length-1]+=u.value,c),[]);return l.length<=1?l[0]||"":l},this.formatToParts=i=>nf(this.ast,this.locales,this.formatters,this.formats,i,void 0,this.message),this.resolvedOptions=()=>{var i;return{locale:((i=this.resolvedLocale)==null?void 0:i.toString())||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}},this.getAst=()=>this.ast,this.locales=n,this.resolvedLocale=Gt.resolveLocale(n),typeof t=="string"){if(this.message=t,!Gt.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const{...i}=r||{};this.ast=Gt.__parse(t,{...i,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=$z(Gt.formats,s),this.formatters=r&&r.formatters||Cz(this.formatterCache)}static get defaultLocale(){return Gt.memoizedDefaultLocale||(Gt.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),Gt.memoizedDefaultLocale}},Gt.memoizedDefaultLocale=null,Gt.resolveLocale=t=>{if(typeof Intl.Locale>"u")return;const n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])},Gt.__parse=kz,Gt.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},Gt),Tz=Ez;const zz={"@astryx.pagination.label":{defaultMessage:"Pagination",description:"Aria label for the pagination navigation region."},"@astryx.pagination.previous":{defaultMessage:"Go to previous page",description:"Aria label for the previous-page button."},"@astryx.pagination.next":{defaultMessage:"Go to next page",description:"Aria label for the next-page button."},"@astryx.pagination.previousBy":{defaultMessage:"Go back {step, number} {step, plural, one {page} other {pages}}",description:"Aria label for the previous button when it advances more than one page per click (the `step` prop > 1). `step` is the number of pages skipped."},"@astryx.pagination.nextBy":{defaultMessage:"Go forward {step, number} {step, plural, one {page} other {pages}}",description:"Aria label for the next button when it advances more than one page per click (the `step` prop > 1). `step` is the number of pages skipped."},"@astryx.pagination.first":{defaultMessage:"Go to first page",description:"Aria label for the first-page button (« double chevron) in the input pagination variant."},"@astryx.pagination.last":{defaultMessage:"Go to last page",description:"Aria label for the last-page button (» double chevron) in the input pagination variant."},"@astryx.pagination.goToPage":{defaultMessage:"Go to page {page, number}",description:"Aria label for an individual page-number button. `page` is 1-based."},"@astryx.pagination.goToPageInput":{defaultMessage:"Go to page",description:"Aria label for the editable page/row number box in the input pagination variant. No number — the box holds the value itself."},"@astryx.pagination.pageLabel":{defaultMessage:"Page",description:'Visible label before the editable box in the input pagination variant. Example: "Page [ 1 ] / 10".'},"@astryx.pagination.ofTotalPages":{defaultMessage:"/ {total, number}",description:'Visible total shown after the editable box in the input pagination variant. Example: the "/ 10" in "Page [ 1 ] / 10".'},"@astryx.pagination.pageIndicators":{defaultMessage:"Page indicators",description:"Aria label for the dots-variant page-indicator group."},"@astryx.pagination.itemsPerPage":{defaultMessage:"Items per page",description:"Label for the page-size selector."},"@astryx.pagination.count":{defaultMessage:"{from, number}–{to, number} of {total, number}",description:`Visible range-of-total text on a pagination bar. Example: "1–20 of 347"; the en-dash is translator's choice.`},"@astryx.pagination.pageOfTotal":{defaultMessage:"Page {current, number} of {total, number}",description:'Visible "Page X of Y" text on the compact pagination variant; also announced by screen readers. Keep short — sits in a compact toolbar.'},"@astryx.pagination.pageAnnounce":{defaultMessage:"Page {current, number}",description:"Screen-reader announcement when a page changes and total is unknown."},"@astryx.powersearch.editor.field":{defaultMessage:"Field",description:"Noun form-label above the field-picker dropdown in the PowerSearch filter-builder popover (which data column to filter on). Not an action."},"@astryx.powersearch.editor.operator":{defaultMessage:"Operator",description:'Noun form-label above the operator dropdown in the PowerSearch filter-builder popover. Refers to a comparison verb ("is", "contains"), not a math or phone operator.'},"@astryx.powersearch.editor.addFilter":{defaultMessage:"+ Add filter",description:'Button label inside a group in the PowerSearch filter-builder; adds another filter row (e.g. "Status = Active"). The leading "+ " is a plus-sign character.'},"@astryx.powersearch.editor.removeFilter":{defaultMessage:"Remove filter",description:'Screen-reader-only label on the "×" icon button next to a filter row in the PowerSearch editor; removes that row. Imperative verb.'},"@astryx.powersearch.editor.groupOperator":{defaultMessage:"Group operator",description:'Screen-reader-only label for the AND/OR toggle that combines sibling filters inside a filter group. Sighted users see just "AND" or "OR".'},"@astryx.powersearch.editor.group":{defaultMessage:"Group",description:'Fallback noun label shown on a nested filter-group chip when no AND/OR combining operator has been chosen. Use the noun ("a cluster"), not the verb "to group".'},"@astryx.powersearch.editor.delete":{defaultMessage:"Delete",description:"Button label inside the PowerSearch filter-editor popover; deletes the currently-edited filter row. Imperative verb form."},"@astryx.powersearch.editor.cancel":{defaultMessage:"Cancel",description:"Button label inside the PowerSearch filter-editor popover; closes the popover and discards pending edits. Imperative verb form."},"@astryx.powersearch.editor.apply":{defaultMessage:"Apply",description:'Primary button label inside the PowerSearch filter-editor popover; confirms the edited filter. Imperative verb; consumers may override to "Save".'},"@astryx.powersearch.valueEditor.value":{defaultMessage:"Value",description:'Noun form-label above a single free-text/number input in the PowerSearch value editor (e.g. the "acme" in `Name contains acme`). Not a verb or "worth".'},"@astryx.powersearch.valueEditor.values":{defaultMessage:"Values",description:"Plural noun form-label above a multi-value chip input in the PowerSearch value editor. Should match its singular counterpart `Value` in your language."},"@astryx.powersearch.valueEditor.time":{defaultMessage:"Time",description:"Noun form-label above a time-of-day (HH:MM) picker in the PowerSearch value editor. Clock time, not duration or era."},"@astryx.powersearch.valueEditor.date":{defaultMessage:"Date",description:"Noun form-label above a calendar-date picker in the PowerSearch value editor. Calendar date, not romantic date or fruit."},"@astryx.powersearch.valueEditor.relativeDate":{defaultMessage:"Relative date",description:'Label for the relative-date selector (e.g. "Last 7 days") in the PowerSearch value editor.'},"@astryx.powersearch.valueEditor.startDate":{defaultMessage:"Start date",description:"Noun form-label above the start-of-range date picker in the PowerSearch value editor. Pairs with `End date` — keep the two parallel in your language."},"@astryx.powersearch.valueEditor.endDate":{defaultMessage:"End date",description:"Noun form-label above the end-of-range date picker in the PowerSearch value editor. Pairs with `Start date` — keep the two parallel."},"@astryx.powersearch.valueEditor.entities":{defaultMessage:"Entities",description:'"Entities" is jargon — plural noun form-label above an entity picker (people, teams, projects). Prefer a natural collective like "items" if your language has no equivalent.'},"@astryx.powersearch.valueEditor.searchPlaceholder":{defaultMessage:"Search…",description:"Placeholder inside the search input in the PowerSearch entity/typeahead picker. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.enterValuePlaceholder":{defaultMessage:"Enter value…",description:"Placeholder inside a free-text single-value input in the PowerSearch value editor. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.addValuesPlaceholder":{defaultMessage:"Add values…",description:"Placeholder inside a multi-value chip input where the user types items and presses Enter to add each as a chip. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.enterNumberPlaceholder":{defaultMessage:"Enter number…",description:"Placeholder inside a numeric input in the PowerSearch value editor. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.selectValuesPlaceholder":{defaultMessage:"Select values…",description:"Placeholder on a dropdown for choosing values from a fixed enum list in the PowerSearch value editor. Imperative verb (user selects, not types)."},"@astryx.powersearch.operator.contains":{defaultMessage:"contains",description:"PowerSearch string operator, rendered inline as `<field> contains <value>` (e.g. `Name contains acme`). Lowercase verb form."},"@astryx.powersearch.operator.notContains":{defaultMessage:"does not contain",description:"PowerSearch negated string operator. Example: `Name does not contain test`. Lowercase; pairs with `contains`."},"@astryx.powersearch.operator.startsWith":{defaultMessage:"starts with",description:"PowerSearch string prefix operator. Example: `Email starts with admin@`. Lowercase."},"@astryx.powersearch.operator.notStartsWith":{defaultMessage:"does not start with",description:"PowerSearch negated prefix operator. Example: `Email does not start with test`. Lowercase; pairs with `starts with`."},"@astryx.powersearch.operator.endsWith":{defaultMessage:"ends with",description:"PowerSearch string suffix operator. Example: `Email ends with @meta.com`. Lowercase."},"@astryx.powersearch.operator.notEndsWith":{defaultMessage:"does not end with",description:"PowerSearch negated suffix operator. Example: `Email does not end with @gmail.com`. Lowercase; pairs with `ends with`."},"@astryx.powersearch.operator.is":{defaultMessage:"is",description:"PowerSearch equality operator for strings/enums. Example: `Status is Active`. Separate from `operator.equals` (numbers) — translations may diverge."},"@astryx.powersearch.operator.isNot":{defaultMessage:"is not",description:"PowerSearch inequality operator for strings/enums. Example: `Status is not Draft`. Pairs with `is`; separate from `operator.notEquals`."},"@astryx.powersearch.operator.equals":{defaultMessage:"is",description:'PowerSearch numeric equality operator. Example: `Age is 30`. Ships same English "is" as `operator.is` but is separate so numbers may diverge (e.g. "equals").'},"@astryx.powersearch.operator.notEquals":{defaultMessage:"is not",description:"PowerSearch numeric inequality operator. Example: `Count is not 0`. Same divergence option as `operator.equals`."},"@astryx.powersearch.operator.greaterThan":{defaultMessage:"is greater than",description:"PowerSearch numeric operator, strictly greater than. Example: `Age is greater than 18`. Lowercase."},"@astryx.powersearch.operator.lessThan":{defaultMessage:"is less than",description:"PowerSearch numeric operator, strictly less than. Example: `Priority is less than 5`. Lowercase."},"@astryx.powersearch.operator.greaterThanOrEqual":{defaultMessage:"is greater than or equal to",description:'PowerSearch numeric operator, ≥. Example: `Age is greater than or equal to 21`. A shorter form (e.g. "≥") is fine if idiomatic.'},"@astryx.powersearch.operator.lessThanOrEqual":{defaultMessage:"is less than or equal to",description:"PowerSearch numeric operator, ≤. Example: `Priority is less than or equal to 3`. A shorter form is fine if idiomatic."},"@astryx.powersearch.operator.before":{defaultMessage:"is before",description:"PowerSearch date operator, strictly earlier. Example: `Created is before 2024-01-01`. Temporal, not spatial."},"@astryx.powersearch.operator.after":{defaultMessage:"is after",description:"PowerSearch date operator, strictly later. Example: `Updated is after 2024-06-01`. Temporal."},"@astryx.powersearch.operator.between":{defaultMessage:"is between",description:"PowerSearch date operator, inclusive range. Example: `Created is between 2024-01-01 and 2024-06-30`. The `and <end>` portion is composed separately."},"@astryx.powersearch.operator.isTrue":{defaultMessage:"is true",description:"PowerSearch boolean operator: matches truthy. Example: `Is admin is true`. Pairs with `is false`; field may be affirmative or a yes/no question."},"@astryx.powersearch.operator.isFalse":{defaultMessage:"is false",description:"PowerSearch boolean operator: matches falsy. Example: `Is admin is false`. Pairs with `is true`."},"@astryx.powersearch.operator.isAnyOf":{defaultMessage:"is any of",description:"PowerSearch list operator: value is in the set. Example: `Status is any of [Active, Paused, Draft]`. The value list is composed separately; pairs with `is none of`."},"@astryx.powersearch.operator.isNoneOf":{defaultMessage:"is none of",description:"PowerSearch negated list operator: value not in the set. Example: `Status is none of [Archived, Deleted]`. Pairs with `is any of`."},"@astryx.powersearch.valueEditor.itemsCount":{defaultMessage:"{count, number} {count, plural, one {item} other {items}}",description:"Overflow summary on a compact filter chip when the list of selected items is too long. Example: `3 items` or `1 item`."},"@astryx.powersearch.valueEditor.entitiesCount":{defaultMessage:"{count, number} {count, plural, one {entity} other {entities}}",description:"Overflow summary on a compact filter chip when the list of selected entities is too long. Example: `5 entities` or `1 entity`. Pair with `itemsCount` translation."},"@astryx.powersearch.valueEditor.dateRange":{defaultMessage:"date range",description:"Fallback lowercase noun rendered inline in a filter chip when a date-range value can't be formatted (e.g. `Created is between date range`). Keep lowercase."},"@astryx.powersearch.valueEditor.filtersCount":{defaultMessage:"{count, number} {count, plural, one {filter} other {filters}}",description:"Summary inside a filter chip when the value is a nested set of filters. Example: `3 filters` or `1 filter`."},"@astryx.powersearch.resultCount":{defaultMessage:"{count, number} {count, plural, one {result} other {results}}",description:"Live result-count text next to the PowerSearch input, announced to screen readers on change. Example: `12 results`, `1 result`; keep compact."},"@astryx.alertDialog.cancel":{defaultMessage:"Cancel",description:"Button label on the secondary/dismiss button of an AlertDialog (modal confirmation). Imperative verb; consumers usually override with task-specific text."},"@astryx.appShell.mobileNavigation":{defaultMessage:"Mobile navigation",description:'Screen-reader-only accessible name for the mobile-only navigation region on small viewports. "Mobile" = phone/tablet (small screen), not "movable".'},"@astryx.appShell.skipToContent":{defaultMessage:"Skip to content",description:"Text of the skip link — the first focusable element on the page, visible only while keyboard-focused. Activating it jumps focus past the navigation to the main content area. Imperative verb; keep short."},"@astryx.avatar.nameWithStatus":{defaultMessage:"{name}, {status}",description:`Screen-reader accessible name for an Avatar showing a status indicator; composes the person's name with the status label, e.g. "Jane Doe, Online". {name} = the avatar's name/alt text, {status} = the status dot's label. Adjust separator and order per locale.`},"@astryx.avatarGroup.label":{defaultMessage:"Avatars",description:'Screen-reader-only fallback name for a horizontal cluster of user avatar images. Plural noun; consumers usually override with "Team members", "Attendees", etc.'},"@astryx.avatarGroup.keyboardHint":{defaultMessage:"Use arrow keys to move between avatars",description:"Screen-reader-only instruction attached (via aria-describedby) to a group of interactive avatars that share a single Tab stop. Tells keyboard users the Left/Right arrow keys move focus between the avatars. Only announced when the group has interactive (link/button) avatars."},"@astryx.avatarGroup.overflow":{defaultMessage:"{count, number} more",description:'Accessible name for the "+N" overflow indicator at the end of an AvatarGroup — announces how many additional avatars are not shown. Example: `5 more`. The visible "+N" text is unaffected; this is the aria-label only.'},"@astryx.banner.dismiss":{defaultMessage:"Dismiss",description:'"Dismiss" = close/hide this notification (not "reject a person"). Aria label AND tooltip on the small X button on a Banner.'},"@astryx.calendar.previousMonth":{defaultMessage:"Previous month",description:"Screen-reader-only label on the left-arrow button in a Calendar's month header (navigates one month back). Pairs with `calendar.nextMonth`."},"@astryx.calendar.nextMonth":{defaultMessage:"Next month",description:"Screen-reader-only label on the right-arrow button in a Calendar's month header (navigates one month forward). Pairs with `calendar.previousMonth`."},"@astryx.calendar.daySelected":{defaultMessage:"{date}, selected",description:'Accessible name for the Calendar day button that is the current single-mode selection. `{date}` is the localized full date, e.g. "Thursday, January 15, 2026". The trailing state word tells screen-reader users the focused day is selected.'},"@astryx.calendar.dayRangeStart":{defaultMessage:"{date}, range start",description:"Accessible name for the Calendar day button that begins the selected date range (or the first pick of an in-progress range). `{date}` is the localized full date."},"@astryx.calendar.dayRangeEnd":{defaultMessage:"{date}, range end",description:"Accessible name for the Calendar day button that ends the selected date range. `{date}` is the localized full date. Pairs with `calendar.dayRangeStart`."},"@astryx.calendar.dayRangeStartAndEnd":{defaultMessage:"{date}, range start and range end",description:"Accessible name for a Calendar day button that both begins and ends a completed one-day range. `{date}` is the localized full date."},"@astryx.calendar.dayInRange":{defaultMessage:"{date}, in range",description:"Accessible name for a Calendar day button strictly inside the selected date range (not an endpoint). `{date}` is the localized full date."},"@astryx.calendar.rangeStartAnnounce":{defaultMessage:"Start date {date}. Select an end date.",description:"Screen-reader announcement after the first pick of a Calendar range selection. `{date}` is the localized full date. Prompts the user that a second pick completes the range."},"@astryx.calendar.rangeCompleteAnnounce":{defaultMessage:"Selected range: {start} to {end}.",description:"Screen-reader announcement after the second pick completes a Calendar range selection. `{start}` and `{end}` are localized full dates in chronological order."},"@astryx.carousel.label":{defaultMessage:"Carousel",description:'Screen-reader-only fallback name for a horizontally-scrolling row of items. If "carousel" is unfamiliar in your locale, prefer the standard term (e.g. "slider").'},"@astryx.carousel.scrollLeft":{defaultMessage:"Scroll left",description:"Screen-reader-only label on the left arrow button in a Carousel. Pairs with `carousel.scrollRight`; in RTL locales, coordinate the two so left/right match layout."},"@astryx.carousel.scrollRight":{defaultMessage:"Scroll right",description:"Screen-reader-only label on the right arrow button in a Carousel. Pairs with `carousel.scrollLeft`; same RTL note."},"@astryx.carousel.slideLabel":{defaultMessage:"Slide {current, number} of {total, number}",description:"Screen-reader accessible name for one slide in a Carousel, giving its position. `current` is the 1-based slide number; `total` is the slide count."},"@astryx.chat.status.sending":{defaultMessage:"Sending",description:"Chat send-status caption under an outgoing message while it is being transmitted. Part of the set sending → sent → delivered → read (or failed) — keep tense/aspect consistent."},"@astryx.chat.status.sent":{defaultMessage:"Sent",description:"Chat send-status caption shown once the message reaches the server. Part of the set sending → **sent** → delivered → read (or failed) — keep tense consistent."},"@astryx.chat.status.delivered":{defaultMessage:"Delivered",description:"Chat send-status caption shown once the recipient's device received the message. Part of the set sending → sent → **delivered** → read (or failed)."},"@astryx.chat.status.read":{defaultMessage:"Read",description:'Chat send-status caption shown once the recipient opened the message. English past-participle ("has been read", /rɛd/), not the present verb — part of the set sending → sent → delivered → **read**.'},"@astryx.chat.status.failed":{defaultMessage:"Failed",description:"Chat send-status caption shown when the send attempt errored. Part of the set — the terminal failure branch, orthogonal to the sent → delivered → read success track."},"@astryx.chat.messageAriaLabel":{defaultMessage:"Message {status}",description:"Screen-reader-only accessible name for a chat message row. `{status}` interpolates the localized status word (e.g. `Message sent`, `Message delivered`) — reorder if needed."},"@astryx.chat.pastedText.expand":{defaultMessage:"Expand",description:'Button label on a chip in the chat composer representing a long pasted text block; clicking reveals full content. "Expand" here means reveal more, not grow physically.'},"@astryx.checkboxList.item.checkbox":{defaultMessage:"Checkbox",description:"Screen-reader-only last-ditch fallback name for a checkbox inside a list item when no label is provided. Should almost never render — consumers should supply a real label."},"@astryx.commandPalette.emptySearch":{defaultMessage:"No results",description:"Fallback empty-state text inside a CommandPalette when the user's query has no matches. Very short (2 words); neutral tone."},"@astryx.commandPalette.emptyBootstrap":{defaultMessage:"Type to search",description:"Onboarding empty-state text shown inside a CommandPalette on first open, before the user has typed anything. Imperative sentence fragment."},"@astryx.commandPalette.resultCount":{defaultMessage:"{count, number} {count, plural, one {result} other {results}}",description:"Screen-reader-only announcement of how many commands match the CommandPalette query as the user types. Example: `12 results`, `1 result`; keep compact."},"@astryx.commandPalette.noResultsFor":{defaultMessage:"No results for {query}",description:"Screen-reader-only announcement when a CommandPalette query matches nothing. `{query}` is the user's verbatim search text; keep it last if your language allows so truncation-by-AT still conveys the outcome."},"@astryx.commandPalette.loading":{defaultMessage:"Loading",description:"Screen-reader-only announcement that a CommandPalette search has started and results are being fetched. Present-progressive form; matches the visible spinner."},"@astryx.dateRangeInput.presetDateRanges":{defaultMessage:"Preset date ranges",description:'Screen-reader-only accessible name for the sidebar of quick-pick preset ranges inside a DateRangeInput popover (e.g. "Last 7 days", "This month").'},"@astryx.dateTimeInput.timePlaceholder":{defaultMessage:"Select a time",description:'Grey placeholder inside the empty time-of-day slot in a DateTimeInput. "Time" = clock time (HH:MM), not duration.'},"@astryx.dialog.close":{defaultMessage:"Close",description:'"Close" = shut/dismiss the dialog, not "nearby" (English homograph). Aria label AND tooltip on the X at the top-right of a Dialog.'},"@astryx.dropdownMenu.label":{defaultMessage:"Menu",description:'Screen-reader-only fallback name for a dropdown menu popover. Very generic; consumers usually override. Noun ("a menu"), not the imperative.'},"@astryx.lightbox.close":{defaultMessage:"Close",description:'"Close" = shut/dismiss (not "nearby"). Screen-reader-only label on the X button that dismisses a Lightbox.'},"@astryx.lightbox.previous":{defaultMessage:"Previous",description:"Screen-reader-only label on the left-arrow button in a Lightbox (navigates to previous media item). Pairs with `lightbox.next`."},"@astryx.lightbox.next":{defaultMessage:"Next",description:"Screen-reader-only label on the right-arrow button in a Lightbox (navigates to next media item). Pairs with `lightbox.previous`."},"@astryx.markdown.taskList":{defaultMessage:"Task list",description:"Screen-reader-only accessible name for a GitHub-flavored Markdown task list (rendered from `- [ ] item` / `- [x] done` syntax)."},"@astryx.markdown.table":{defaultMessage:"Table",description:'Screen-reader-only accessible name for a table rendered inside a Markdown block. Noun ("a table"), not the verb. Separate from `@astryx.table.label` — translations may diverge.'},"@astryx.mobileNav.closeNavigation":{defaultMessage:"Close navigation",description:"Screen-reader-only label on the X/close button that dismisses the MobileNav overlay. Pairs with `mobileNav.toggle.open`."},"@astryx.multiSelector.selectAll":{defaultMessage:"Select all",description:'Label on the checkbox/toggle at the top of a MultiSelector dropdown that selects every option. "All" is a determiner here (as in "all the options"), not the pronoun.'},"@astryx.multiSelector.searchPlaceholder":{defaultMessage:"Search…",description:"Placeholder inside the search input at the top of a MultiSelector's dropdown panel. Imperative verb; trailing `…` is one character."},"@astryx.multiSelector.searchOptions":{defaultMessage:"Search options",description:"Screen-reader-only accessible name for that same search input inside a MultiSelector."},"@astryx.multiSelector.selectAllPartiallySelected":{defaultMessage:"{label}, partially selected",description:'Accessible name for the MultiSelector select-all option while only some options are selected. `{label}` is the visible select-all label (e.g. "Select all"). ARIA forbids aria-selected="mixed" on options, so the indeterminate state is conveyed through the name instead. "Partially" = some but not all.'},"@astryx.popover.close":{defaultMessage:"Close popover",description:'"Close" = shut/dismiss, not "nearby". Screen-reader-only label on the close button inside a Popover.'},"@astryx.selector.searchPlaceholder":{defaultMessage:"Search…",description:"Placeholder inside the search input at the top of a Selector's dropdown panel (for filtering options). Imperative verb; trailing `…` is one character."},"@astryx.selector.searchOptions":{defaultMessage:"Search options",description:'"Options" = the list of choices in the dropdown. Screen-reader-only accessible name for the search input inside a Selector.'},"@astryx.sideNav.label":{defaultMessage:"Side navigation",description:"Screen-reader-only accessible name for the primary vertical sidebar nav (usually on the left)."},"@astryx.sideNav.resizeSidebar":{defaultMessage:"Resize sidebar",description:"Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu":{defaultMessage:"Open menu",description:"Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label":{defaultMessage:"Tabs",description:'Screen-reader-only fallback name for a horizontal tab bar. Plural noun; "Tabs" here = UI tab panels, not browser tabs or the Tab key.'},"@astryx.table.label":{defaultMessage:"Table",description:'Fallback screen-reader-only accessible name for a data-table region when the consumer provides none. Noun ("a table"), not the verb "to table".'},"@astryx.table.noData":{defaultMessage:"No data",description:'Fallback empty-state text in the table body when there are zero rows. Neutral tone (not error-y); consumers commonly override with something specific like "No results".'},"@astryx.table.filter.allPlaceholder":{defaultMessage:"All",description:'Placeholder on a per-column filter dropdown when nothing is selected, meaning "no filter — all rows match". Determiner form (as in "all values"), not the pronoun.'},"@astryx.table.filter.reset":{defaultMessage:"Reset",description:"Button label inside a table's filter panel/popover; clears pending filter values back to defaults. Imperative verb."},"@astryx.table.filter.apply":{defaultMessage:"Apply",description:"Primary button label inside a table's filter panel/popover; commits pending filter values. Imperative verb; pairs with `Reset`."},"@astryx.table.selection.selectAllRows":{defaultMessage:"Select all rows",description:'Aria label for the "select all rows" checkbox in a Table header.'},"@astryx.table.selection.selectRow":{defaultMessage:"Select row",description:'Aria label for the "select row" checkbox on a Table row.'},"@astryx.table.selection.selectRowNamed":{defaultMessage:"Select {label}",description:"Aria label for a Table row's selection checkbox when a per-row label is available (via getRowLabel). `label` is the row's human-readable identity, e.g. \"Alice\"."},"@astryx.table.sort.ascending":{defaultMessage:"Sort ascending",description:"Screen-reader-only label on a column header button that will sort the column ascending. Part of a set with `sort.descending` and `sort.clear` — keep parallel."},"@astryx.table.sort.descending":{defaultMessage:"Sort descending",description:"Screen-reader-only label on a column header button that will sort the column descending. Part of a set with `sort.ascending` and `sort.clear`."},"@astryx.table.sort.clear":{defaultMessage:"Clear sort",description:'Screen-reader-only label on a column header button that will remove the current sort. "Clear" here means remove, not transparent. Part of the sort set.'},"@astryx.table.sort.direction.ascending":{defaultMessage:"ascending",description:"Localized direction word interpolated as `direction` into @astryx.table.sort.sortedBy and @astryx.table.sort.sortedByWithPriority."},"@astryx.table.sort.direction.descending":{defaultMessage:"descending",description:"Localized direction word interpolated as `direction` into @astryx.table.sort.sortedBy and @astryx.table.sort.sortedByWithPriority."},"@astryx.table.sort.sortBy":{defaultMessage:"Sort by {label}",description:"Aria label for a sortable Table header button when the column is unsorted. `label` is the column header text."},"@astryx.table.sort.sortedBy":{defaultMessage:"Sort by {label}, sorted {direction}",description:"Aria label for a sorted Table header button. `direction` is the localized direction word from @astryx.table.sort.direction.*."},"@astryx.table.sort.sortedByWithPriority":{defaultMessage:"Sort by {label}, sorted {direction}, priority {rank, number} of {total, number}",description:"Aria label for a sorted Table header button in multi-sort. `rank` is the 1-based position of this column in the sort order; `total` is the number of sorted columns."},"@astryx.toast.dismiss":{defaultMessage:"Dismiss notification",description:"Screen-reader-only label on the X button of a Toast (transient notification popup). Distinct from `banner.dismiss` (persistent banner)."},"@astryx.toast.viewport":{defaultMessage:"Notifications",description:"Screen-reader-only accessible name for the invisible landmark region hosting the stack of Toast popups (usually pinned to a screen corner)."},"@astryx.tokenizer.clearAll":{defaultMessage:"Clear all",description:'Label on the "×" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner "all"; short.'},"@astryx.topNav.heading.openMenu":{defaultMessage:"Open menu",description:"Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel":{defaultMessage:"Top navigation",description:"Default accessible name (aria-label) for the <nav> landmark rendered by TopNav when no label is provided."},"@astryx.treeList.toggleChildren":{defaultMessage:"Toggle children",description:'"Children" = child nodes in the tree, not human children. Screen-reader-only label on the chevron next to a TreeList item that has children — toggles the sub-list.'},"@astryx.typeahead.emptySearchResults":{defaultMessage:"No results found",description:"Fallback empty-state message inside a Typeahead's suggestion popover when the current query has no matches. Neutral tone (not error-y)."},"@astryx.typeahead.loading":{defaultMessage:"Loading",description:"Screen-reader-only name for a spinner shown inside a Typeahead dropdown while suggestions are being fetched. Present-progressive form."},"@astryx.typeahead.searchResults":{defaultMessage:"Search results",description:"Screen-reader-only accessible name for the list of suggestions inside a Typeahead dropdown."},"@astryx.typeahead.clearSelection":{defaultMessage:"Clear selection",description:'"Selection" = the chosen value (not highlighted text). Screen-reader-only label on the X that clears the currently-selected value from a Typeahead.'},"@astryx.breadcrumbs.label":{defaultMessage:"Breadcrumb",description:"Screen-reader-only fallback name for the breadcrumb trail (e.g. `Home > Section > Page`). Singular in English per ARIA convention; plural is fine if natural in your locale."},"@astryx.chat.composer.placeholder":{defaultMessage:"Type a message…",description:"Grey placeholder text inside the empty chat composer textarea. Imperative verb; trailing `…` is one character."},"@astryx.chat.composerDrawer.label":{defaultMessage:"Items",description:'Fallback aria label for the ChatComposerDrawer — a horizontal list of attachment/tool chips. Consumers usually override with "Attachments", "Tools", etc.'},"@astryx.chat.composerInput.label":{defaultMessage:"Message input",description:'Screen-reader-only accessible name for the chat composer textarea. Reorder freely if your language uses one word for "message field".'},"@astryx.chat.speechRecognition.noSpeechDetected":{defaultMessage:"No speech was detected.",description:"Full-sentence error shown inline in the chat composer after voice input captured silence. Soft-error tone (not alarming); keep terminal period."},"@astryx.commandPalette.label":{defaultMessage:"Command palette",description:'Screen-reader-only fallback name for a keyboard-driven command menu (usually opened with Cmd/Ctrl-K). If unfamiliar, prefer a natural equivalent like "quick actions".'},"@astryx.commandPalette.input.placeholder":{defaultMessage:"Search…",description:"Grey placeholder inside the CommandPalette's search input. Imperative verb; trailing `…` is one character."},"@astryx.commandPalette.list.label":{defaultMessage:"Commands",description:'"Command" = an app action a user can invoke (metaphor from CLI), not a Unix command. Screen-reader-only name for the matching-commands list.'},"@astryx.contextMenu.label":{defaultMessage:"Context menu",description:'Screen-reader-only fallback name for the right-click / long-press popup menu. "Context" = context-specific to the activated element, not linguistic context.'},"@astryx.dateInput.placeholder":{defaultMessage:"Select a date",description:'Grey placeholder inside an empty DateInput field. "Date" = calendar date, not romantic or fruit. Imperative verb.'},"@astryx.dateInput.dialogLabel":{defaultMessage:"Choose date",description:"Screen-reader-only accessible name for the popover dialog opened from a DateInput's calendar toggle. Imperative verb + noun."},"@astryx.dateInput.closeCalendar":{defaultMessage:"Close calendar",description:"Screen-reader-only label on the X inside the DateInput calendar popover (dismisses the popover). Distinct from `dateInput.toggleCalendarClose`, which labels the outer toggle."},"@astryx.dateInput.openCalendar":{defaultMessage:"Open calendar",description:"Aria label for the DateInput / DateRangeInput / DateTimeInput calendar toggle button when the popover is closed."},"@astryx.dateInput.toggleCalendarClose":{defaultMessage:"Close calendar",description:"Aria label for the DateInput / DateRangeInput / DateTimeInput calendar toggle button when the popover is open. Distinct from closeCalendar (which labels the X inside the popover) so translators can differentiate the toggle vs the close-X UI."},"@astryx.dateInput.clear":{defaultMessage:"Clear {label}",description:"Aria label for the clear-value button in DateInput / DateRangeInput / DateTimeInput. `{label}` is the field's own label so screen readers announce e.g. 'Clear Start date'."},"@astryx.dateTimeInput.timeSuffix":{defaultMessage:"{label} time",description:'Screen-reader-only accessible name for the time-of-day slot in a DateTimeInput. Example: `Start date time`; reorder freely (e.g. "time of {label}").'},"@astryx.dateRangeInput.placeholder":{defaultMessage:"Select date range",description:"Grey placeholder inside an empty DateRangeInput field. Represents picking a start–end date pair. Imperative verb."},"@astryx.dateRangeInput.dialogLabel":{defaultMessage:"Choose date range",description:"Screen-reader-only accessible name for the popover dialog opened from a DateRangeInput. Imperative verb + noun phrase."},"@astryx.dateTimeInput.placeholder":{defaultMessage:"Select a date",description:'Grey placeholder inside an empty DateTimeInput field. Note: the English says only "date" though the field is date+time — do not add "and time" unless natural.'},"@astryx.dateTimeInput.dialogLabel":{defaultMessage:"Choose date",description:`Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only "date" phrasing as the placeholder — don't add "and time" unless natural.`},"@astryx.link.newTab":{defaultMessage:"(opens in new tab)",description:"Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."},"@astryx.mobileNav.toggle.open":{defaultMessage:"Open navigation",description:"Screen-reader-only label on the hamburger button that opens the MobileNav overlay (rendered when the overlay is closed). Pairs with `mobileNav.closeNavigation`."},"@astryx.moreMenu.label":{defaultMessage:"More options",description:"Screen-reader-only name for the small `⋯` (three-dots) overflow button that opens a menu of additional actions. Very short — sits on a tiny icon button."},"@astryx.multiSelector.selectPlaceholder":{defaultMessage:"Select…",description:'Placeholder on an empty MultiSelector trigger button. Same English as `selector.placeholder` but a separate key — plural phrasing like "Choose items…" is fine.'},"@astryx.outline.label":{defaultMessage:"Table of contents",description:"Screen-reader-only fallback name for a page's outline / table-of-contents sidebar (list of in-page headings). Rendered as `aria-label` on a `<nav>` landmark."},"@astryx.powersearch.label":{defaultMessage:"Search",description:"Screen-reader-only accessible name for the PowerSearch input (a filter-builder). The visible placeholder is separate; noun form often reads better than the verb."},"@astryx.powersearch.placeholder":{defaultMessage:"Search…",description:"Grey placeholder text inside the empty PowerSearch input. Imperative verb; trailing `…` is one character."},"@astryx.resizable.collapsed":{defaultMessage:"Collapsed",description:"aria-valuetext for the Resizable drag handle (role=separator) while its panel is collapsed to zero size. Replaces the numeric value announcement, since the numeric value is clamped to the minimum while collapsed. Adjective describing the panel state, not a verb/command."},"@astryx.resizable.handle.label":{defaultMessage:"Resize handle",description:"Screen-reader-only accessible name for the small draggable divider between two Resizable panels (users drag it to change the split ratio)."},"@astryx.selector.placeholder":{defaultMessage:"Select…",description:"Placeholder text on an empty Selector trigger button (a dropdown). Imperative verb; trailing `…` is one character. Very short — appears on the button face."},"@astryx.sideNav.heading.dialogLabel":{defaultMessage:"Navigation menu",description:"Screen-reader-only accessible name for the dropdown dialog opened from a SideNavHeading's overflow menu."},"@astryx.table.pagination.label":{defaultMessage:"Table pagination",description:"Screen-reader-only accessible name for the pagination `<nav>` appended below a data table. Kept separate from `@astryx.pagination.label` so translations may diverge."},"@astryx.timeInput.placeholder":{defaultMessage:"Select a time",description:'"Time" = clock time (HH:MM), not duration or era. Grey placeholder inside an empty TimeInput field; imperative verb.'},"@astryx.topNav.heading.dialogLabel":{defaultMessage:"Navigation menu",description:"Screen-reader-only accessible name for the dropdown dialog opened from a TopNavHeading's overflow menu. Kept separate from the SideNav sibling."},"@astryx.typeahead.searchPlaceholder":{defaultMessage:"Search…",description:"Placeholder inside an empty Typeahead input (a search field that suggests results as the user types). Imperative verb; trailing `…` is one character."},"@astryx.banner.collapse":{defaultMessage:"Collapse",description:'"Collapse" = fold up, not crumble. Aria label AND tooltip on the Banner expand/collapse toggle when currently expanded. Pairs with `banner.expand`.'},"@astryx.banner.expand":{defaultMessage:"Expand",description:'"Expand" = reveal more, not grow physically. Aria label AND tooltip on the same toggle when currently collapsed. Pairs with `banner.collapse`.'},"@astryx.button.loading":{defaultMessage:"Loading",description:'Screen-reader-only live-region announcement while a Button is in its loading state (spinner shown, action in flight). Progressive sense ("work in progress"), not a noun. Kept separate from `typeahead.loading` — translations may diverge.'},"@astryx.chatComposerDrawer.expand":{defaultMessage:"Expand {label}",description:"Screen-reader-only label on the ChatComposerDrawer toggle when the drawer is collapsed. `{label}` is the drawer's visible name — example: `Expand Attachments`. Pairs with `collapse`."},"@astryx.chatComposerDrawer.collapse":{defaultMessage:"Collapse {label}",description:"Screen-reader-only label on the ChatComposerDrawer toggle when the drawer is expanded. Example: `Collapse Attachments`. Pairs with `expand`."},"@astryx.chatDictationButton.startDictation":{defaultMessage:"Start dictation",description:"Accessible label for the microphone button when idle (not listening)."},"@astryx.chatDictationButton.stopDictation":{defaultMessage:"Stop dictation",description:"Accessible label for the microphone button when actively listening."},"@astryx.chatLayout.newMessages":{defaultMessage:"New messages",description:"Text on a floating pill at the bottom of a chat viewport when unseen messages arrive below the fold; clicking scrolls to bottom. Keep short — narrow pill."},"@astryx.chatLayoutScrollButton.scrollToBottom":{defaultMessage:"Scroll to bottom",description:"Visible tooltip AND screen-reader label for a small down-arrow button that scrolls the chat viewport to its latest message."},"@astryx.chatMessage.messageFrom":{defaultMessage:"Message from {sender}",description:"Screen-reader-only accessible name for a chat message when the sender name isn't visible. Example: `Message from Sarah`, `Message from Bot` — reorder freely."},"@astryx.chatSendButton.stop":{defaultMessage:"Stop",description:"Button label that replaces `Send` on the chat send button while an AI response is streaming; clicking aborts generation. Short — appears on a small button."},"@astryx.chatSendButton.send":{defaultMessage:"Send",description:"Primary button label on the chat submit button (paperplane icon). Imperative verb; pairs with `Stop`. Very short."},"@astryx.chatToolCalls.error":{defaultMessage:"Error: {message}",description:"Screen-reader text for a tool call that failed. {message} is the error detail."},"@astryx.chatToolCalls.groupLabel":{defaultMessage:"{count} tool calls",description:"Summary label shown in the group header when multiple tool calls are expanded. {count} is the number of calls."},"@astryx.chatTriggerMenu.suggestions":{defaultMessage:"Suggestions",description:"Screen-reader-only fallback label for the popover listbox opened by a trigger character (`@`, `/`) in the chat composer when the trigger provides no specific label."},"@astryx.citation.label":{defaultMessage:"Citation {number}: {title}",description:"Screen-reader-only accessible name for a Citation chip (a small numbered link to a source). Example: `Citation 1: OpenAI research paper`. Reorder freely."},"@astryx.codeBlock.copied":{defaultMessage:"Copied",description:'Screen-reader-only label on the CodeBlock copy button for ~2s after a successful copy. Past-participle ("has been copied"); pairs with `codeBlock.copyCode`.'},"@astryx.codeBlock.copyCode":{defaultMessage:"Copy code",description:'"Code" = source code. Aria label AND tooltip on the CodeBlock copy button in its default state. Pairs with `codeBlock.copied` (post-click state).'},"@astryx.codeBlock.code":{defaultMessage:"Code",description:`Screen-reader-only fallback name for a code-snippet scroll container when the code's language is unknown. "Code" = source code, not secret code or code of conduct.`},"@astryx.field.optional":{defaultMessage:"Optional",description:"Visible indicator shown next to a form field's label when the field is optional (isOptional). Mutually exclusive with the required indicator. Very short — appears inline after the label text."},"@astryx.field.required":{defaultMessage:"Required",description:"Visible indicator shown next to a form field's label when the field must be filled in (isRequired). Mutually exclusive with the optional indicator. Very short — appears inline after the label text."},"@astryx.fileInput.clearLabel":{defaultMessage:"Clear {label}",description:"Screen-reader-only label on the X that removes the selected file from a FileInput. Example: `Clear Attachment`, `Clear Résumé`."},"@astryx.fileInput.required":{defaultMessage:"Required",description:'Screen-reader-only description on the FileInput trigger indicating the field must be filled in. Mirrors the visible `Required` indicator next to the field label; conveyed via description because aria-required is not supported on role="button".'},"@astryx.fileInput.triggerWithFiles":{defaultMessage:"{label}, {fileNames}",description:"Accessible name for a FileInput trigger that has files attached, composing the field label with the selected filenames. Example: `Attachments, report.pdf, notes.txt`."},"@astryx.keyboardHint.toNavigate":{defaultMessage:"to navigate",description:"Trailing text in the keyboard-hint badge, shown after arrow-key icons — reads as `← → to navigate`. Lowercase sentence fragment completing the visual phrase; the badge is aria-hidden, so this is for sighted users only."},"@astryx.lightbox.mediaViewer":{defaultMessage:"Media viewer",description:"Screen-reader-only fallback name for the Lightbox dialog when the current media item has no alt text. Should rarely render — consumers should provide alt."},"@astryx.lightbox.zoom":{defaultMessage:"Zoom",description:'Screen-reader-only label on the Lightbox image acting as a zoom toggle button (aria-pressed reflects zoomed state). Verb ("to zoom"), very short.'},"@astryx.lightbox.zoomedIn":{defaultMessage:"Zoomed in, use arrow keys to pan",description:"Polite screen-reader announcement after zooming into a Lightbox image, including a hint that arrow keys pan while zoomed. Pairs with `lightbox.zoomedOut`."},"@astryx.lightbox.zoomedOut":{defaultMessage:"Zoomed out",description:"Polite screen-reader announcement after zooming back out of a Lightbox image. Pairs with `lightbox.zoomedIn`."},"@astryx.metadataList.showMore":{defaultMessage:"Show more",description:"Button label under a MetadataList that reveals items hidden beyond the configured maximum. Toggles with `metadataList.showLess` — keep the pair parallel in your language."},"@astryx.metadataList.showLess":{defaultMessage:"Show less",description:"Button label under a MetadataList that re-hides the extra items revealed by `metadataList.showMore`. Keep the pair parallel."},"@astryx.mobileNav.navigation":{defaultMessage:"Navigation",description:"Screen-reader-only fallback name for the MobileNav overlay dialog when no explicit label was passed."},"@astryx.multiSelector.clearAll":{defaultMessage:"Clear all {label}",description:"Screen-reader-only label on the X that clears every selected value from a MultiSelector. Example: `Clear all Countries`. `{label}` is typically already plural in English."},"@astryx.input.statusButton.error":{defaultMessage:"Error details",description:"Accessible name for the focusable status icon button inside an input when statusVariant is 'tooltip' and the status type is error. Activating or focusing the button reveals the error message in a tooltip. Keep it short — it labels an icon-only button."},"@astryx.input.statusButton.warning":{defaultMessage:"Warning details",description:"Accessible name for the focusable status icon button inside an input when statusVariant is 'tooltip' and the status type is warning. Activating or focusing the button reveals the warning message in a tooltip."},"@astryx.input.statusButton.success":{defaultMessage:"Success details",description:"Accessible name for the focusable status icon button inside an input when statusVariant is 'tooltip' and the status type is success. Activating or focusing the button reveals the success message in a tooltip."},"@astryx.numberInput.clearLabel":{defaultMessage:"Clear {label}",description:"Screen-reader-only label on the X that clears the value from a NumberInput. Example: `Clear Age`, `Clear Quantity`."},"@astryx.selector.clearLabel":{defaultMessage:"Clear {label}",description:"Screen-reader-only label on the X that clears the selected value from a Selector. `{label}` is the selector's visible label — example: `Clear Country`."},"@astryx.sideNavCollapseButton.expandSidebar":{defaultMessage:"Expand sidebar",description:"Aria label AND tooltip on the SideNav collapse/expand toggle when the sidebar is currently collapsed (clicking expands it). Pairs with `collapseSidebar`."},"@astryx.sideNavCollapseButton.collapseSidebar":{defaultMessage:"Collapse sidebar",description:"Aria label AND tooltip on the same toggle when the sidebar is currently expanded (clicking collapses it). Pairs with `expandSidebar`."},"@astryx.sideNavItem.expand":{defaultMessage:"Expand {label}",description:"Screen-reader-only label on the chevron next to a SideNav item with children when the group is collapsed. Example: `Expand Settings`. Pairs with `sideNavItem.collapse`."},"@astryx.sideNavItem.collapse":{defaultMessage:"Collapse {label}",description:"Screen-reader-only label on the same chevron when the group is expanded. Example: `Collapse Settings`. Pairs with `sideNavItem.expand`."},"@astryx.tableFiltering.filterByColumn":{defaultMessage:"Filter {header}",description:"Triple-use string on per-column filter controls: visible label, placeholder, AND aria label. `{header}` is the column header — example: `Filter Name`. Keep short."},"@astryx.tableGroupedRows.expandGroup":{defaultMessage:"Expand group {groupKey}",description:"Screen-reader-only label on the chevron next to a grouped table's group header when collapsed. Example: `Expand group Q1 2024`. Pairs with `collapseGroup`."},"@astryx.tableGroupedRows.collapseGroup":{defaultMessage:"Collapse group {groupKey}",description:"Screen-reader-only label on the same chevron when the group is expanded. Example: `Collapse group Q1 2024`. Pairs with `expandGroup`."},"@astryx.tableRowExpansion.collapseRow":{defaultMessage:"Collapse row",description:"Screen-reader-only label on the row-expand chevron when the row is currently expanded. Part of the four-way expand/collapse set."},"@astryx.tableRowExpansion.expandRow":{defaultMessage:"Expand row",description:"Screen-reader-only label on the row-expand chevron when the row is currently collapsed. Part of a four-way set with `collapseRow`, `expandAllRows`, `collapseAllRows`."},"@astryx.tableRowExpansion.collapseAllRows":{defaultMessage:"Collapse all rows",description:"Screen-reader-only label on the same header button when every row is expanded. Part of the four-way set."},"@astryx.tableRowExpansion.expandAllRows":{defaultMessage:"Expand all rows",description:"Screen-reader-only label on the header expand-all/collapse-all button when at least one row is collapsed (clicking expands every expandable row). Part of the four-way set."},"@astryx.step.goToStep":{defaultMessage:"Go to step {stepNumber, number}: {label}",description:"Accessible name for a clickable step in the lab Stepper. {stepNumber} is the 1-based position, {label} is the step's visible label."},"@astryx.step.goToStepWithStatus":{defaultMessage:"Go to step {stepNumber, number}: {label}, {status}",description:"Accessible name for a clickable lab Stepper step that also carries a status. {status} is one of the translated `step.status.*` words (completed/warning/error). Keep the pattern parallel to `step.goToStep`."},"@astryx.step.status.completed":{defaultMessage:"completed",description:"Screen-reader-only status word rendered next to a lab Stepper step label when the step is done (either progress-completed or status=success). Lowercase adjective; it is read mid-sentence after the step label."},"@astryx.step.status.warning":{defaultMessage:"warning",description:"Screen-reader-only status word rendered next to a lab Stepper step label when status=warning. Lowercase noun/adjective; read mid-sentence after the step label."},"@astryx.step.status.error":{defaultMessage:"error",description:"Screen-reader-only status word rendered next to a lab Stepper step label when status=error. Lowercase noun; read mid-sentence after the step label."},"@astryx.tableTree.collapseRow":{defaultMessage:"Collapse row",description:"Aria label for the Table tree-data expander chevron when the row is currently expanded."},"@astryx.tableTree.expandRow":{defaultMessage:"Expand row",description:"Aria label for the Table tree-data expander chevron when the row is currently collapsed."},"@astryx.tableTree.collapseAllRows":{defaultMessage:"Collapse all rows",description:"Aria label for the Table tree-data header toggle when all rows are expanded and clicking it collapses them."},"@astryx.tableTree.expandAllRows":{defaultMessage:"Expand all rows",description:"Aria label for the Table tree-data header toggle when rows are collapsed and clicking it expands them."},"@astryx.textArea.charactersRemaining":{defaultMessage:"{count, number} {count, plural, one {character} other {characters}} remaining",description:"Screen-reader-only announcement of how many characters the user can still type before hitting a TextArea's maxLength. Announced politely as the count nears the limit. `{count}` is the number remaining — example: `12 characters remaining`."},"@astryx.textArea.charactersOverLimit":{defaultMessage:"{count, number} {count, plural, one {character} other {characters}} over the limit",description:"Screen-reader-only assertive announcement when the user has typed past a TextArea's maxLength. `{count}` is how many characters over — example: `3 characters over the limit`."},"@astryx.textInput.clearLabel":{defaultMessage:"Clear {label}",description:"Screen-reader-only label on the X that clears the value from a TextInput. Example: `Clear Email`, `Clear Name`."},"@astryx.thumbnail.remove":{defaultMessage:"Remove {accessibleName}",description:'Screen-reader-only label on the "×" on a Thumbnail (image preview chip). `{accessibleName}` is the thumbnail\'s name — example: `Remove profile.jpg`.'},"@astryx.thumbnail.open":{defaultMessage:"Open {accessibleName}",description:'"Open" = launch/reveal (not "unfold" or the adjective). Screen-reader-only name on a clickable Thumbnail — example: `Open Sunset photo`.'},"@astryx.thumbnail.fallbackName":{defaultMessage:"Thumbnail",description:"Generic screen-reader name for a Thumbnail (image preview) that has no `alt` or `label`. Last-resort fallback so the control is never nameless; prefer a real name via `alt` or `label`."},"@astryx.timeInput.clearLabel":{defaultMessage:"Clear {label}",description:"Screen-reader-only label on the X that clears the value from a TimeInput. Example: `Clear Start time`."},"@astryx.timestamp.copyValue":{defaultMessage:"Copy {value}",description:"Aria label on a Timestamp copyable-hover-card row's copy button, in its default state. `value` is the formatted instant that row shows (e.g. `Copy February 19, 2026 at 5:00:00 PM UTC`). Imperative verb. Pairs with `timestamp.copied` (post-click state)."},"@astryx.timestamp.copy":{defaultMessage:"Copy",description:"Short label shown in the tooltip on a Timestamp copyable-hover-card row's copy button (hover/focus), in its default state. Imperative verb. Pairs with `timestamp.copied` (post-click state). The full `copyValue` string remains the button's aria-label for assistive tech."},"@astryx.timestamp.copied":{defaultMessage:"Copied",description:'Aria label on a Timestamp copy button for ~1.5s after a successful copy, and the text announced to a polite live region. Past-participle ("has been copied"); pairs with `timestamp.copyValue`.'},"@astryx.timestamp.detailsLabel":{defaultMessage:"Timestamp details",description:"Accessible name for the Timestamp copyable hover card popup, which lists the instant in the configured time zones/formats with a copy button per row."},"@astryx.token.remove":{defaultMessage:"Remove {label}",description:'Screen-reader-only label on the "×" on an individual Token/chip. Example: `Remove John Smith`, `Remove Active`. Imperative verb.'}},Az=zz,Sb=new Map;function Nz(e,t){const n=`${t}::${e}`;let s=Sb.get(n);return s===void 0&&(s=new Tz(e,t),Sb.set(n,s)),s}function Mz(e){let t;try{t=new Intl.Locale(e).baseName}catch{t=e}const n=t.split("-"),s=[];for(let r=n.length;r>0;r--)s.push(n.slice(0,r).join("-"));return s}function Rz(e,t,n,s){var a,l;const r=Mz(t);if(s!==void 0)for(const c of r){const u=(a=s[c])==null?void 0:a[e];if(u!==void 0)return u}for(const c of r){const u=(l=n[c])==null?void 0:l[e];if(u!==void 0)return u.defaultMessage}const i=Az[e];return i!==void 0?i.defaultMessage:null}function Iz(e,t,n,s,r){const i=Rz(e,n,s,r);return i===null?(p0(),e):t===void 0?i:Nz(i,n).format(t)}function be(){const e=x.use(j3);return x.useCallback((t,n)=>Iz(t,n,e.locale,e.messages,e.overrides),[e.locale,e.messages,e.overrides])}const Fr={base:{kVAEAm:"x1n2onr6",k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"x1txdalj",k8WAf4:"xce4md1",kg3NbH:"xrrkdod",kMzoRj:"xc342km",ksu8eU:"xng3xce",kaIpWk:"x1jxw6zd",kMv6JI:"xjb2p0i",kGuDYH:"xcr08ib",kLWn49:"x1kq96og",k63SB2:"x1e4wzip",khDVqt:"xuxw1ft",kkrTdU:"x1ypdohk",k1ekBW:"xrafxwg",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",$$css:!0},pressable:{k3aq6I:"x3oybdh xk4oym4",$$css:!0},disabled:{kkrTdU:"x1h6gzvc",kSiTet:"xbyyjgo",kKwaWg:"x18o3ruo",k3aq6I:"x1c071of x1pdlv7q",$$css:!0},ariaDisabled:{kKwaWg:"x18o3ruo x8o3jvd xuqm82a",$$css:!0},iconOnly:{"--button-icon-only-aspect":"x1v15ycx",kOBAk4:"xioom0i",kg3NbH:"xnjsko4",k8WAf4:"xt970qd",$$css:!0},iconWrapper:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",$$css:!0},contentWrapper:{k1xSpc:"xjp7ctv",$$css:!0},link:{kybGjl:"x1hl2dhg",$$css:!0}},_z={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]},Oz={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},Dz={sm:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",kGuDYH:"x1j61zf2",$$css:!0},md:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",kGuDYH:"x1j61zf2",$$css:!0},lg:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",kGuDYH:"xwsyq91",$$css:!0}},Lz={none:{kGVxlE:"x1gnnqk1",$$css:!0},low:{kGVxlE:"x1i5ehqx",$$css:!0},med:{kGVxlE:"x14hfi27",$$css:!0},high:{kGVxlE:"x1kcpxr7",$$css:!0}},Bz={primary:{kWkggS:"x1ewilqj",kMwMTN:"x17wrial",kKwaWg:"x1ilzqfv xq8i9tn",kI3sdo:"x17nn4n9","--button-focus-offset":"xkzo27j",kInvED:"x1wfwxd8 x13aywxo",$$css:!0},secondary:{kWkggS:"x17x4s8c",kMwMTN:"x1tgivj0",kKwaWg:"x1ilzqfv xq8i9tn",kI3sdo:"x17nn4n9","--button-focus-offset":"xkzo27j",kInvED:"x1wfwxd8 x13aywxo",$$css:!0},ghost:{kWkggS:"xjbqb8w",kMwMTN:"x1tgivj0",kKwaWg:"x1ilzqfv xq8i9tn",kI3sdo:"x17nn4n9","--button-focus-offset":"xkzo27j",kInvED:"x1wfwxd8 x13aywxo",$$css:!0},destructive:{kWkggS:"x1pjz0fi",kMwMTN:"x1m024r3",kKwaWg:"x1ilzqfv xq8i9tn",kI3sdo:"x1p73he7","--button-focus-offset":"xkzo27j",kInvED:"x1wfwxd8 x13aywxo",$$css:!0}},$b={hiddenContent:{kMwMTN:"x19co3pv",$$css:!0},hiddenContentDelayed:{kKVMdj:"x1ffowhz",k44tkh:"xjlvqhv",kWV6AL:"x10e4vud",kKxzle:"x17yabm6 x14q22ui",$$css:!0}},rd={horizontal:{krdFHd:"x15mokao x8eehn2",kVL7Gh:"xbiv7yw x1xrp5p4",kfmiAY:"x1ga7v0g xbfdvlp",kT0f0o:"x16uus16 xajhecq",k2ei4v:"xgbv0en x1pjv70x",kVhnKS:"x1t7ytsu xyf0ibl",kGJrpR:"x1j92z86",$$css:!0},vertical:{krdFHd:"x15mokao x8eehn2",kfmiAY:"x1ga7v0g x2qxyot",kVL7Gh:"xbiv7yw x12tyzlf",kT0f0o:"x16uus16 xajhecq",kEafiO:"x11xkdxz x1g31smg",kPef9Z:"x13fuv20 x1d9v4yf",kLZC3w:"x1pc3f07",$$css:!0},onSolidHorizontal:{kGJrpR:"xrvmtm5",$$css:!0},onSolidVertical:{kLZC3w:"x11npmm7",$$css:!0}};function re({label:e,variant:t="secondary",size:n,type:s="button",isDisabled:r=!1,isLoading:i=!1,isInterruptible:a=!1,clickAction:l,icon:c,isIconOnly:u=!1,width:d,elevation:f="none",children:h,endContent:p,tooltip:m,href:b,as:y,target:g,rel:k,xstyle:v,className:w,style:j,ref:$,...C}){const E=be(),T=Ha(n,"md"),S=LT(),[N,z]=x.useTransition(),M=x.useRef(!1),R=i||N,I=N||a,A=(S==null?void 0:S.isDisabled)??!1,_=r||A||R&&!a,O=Ri(y),D=b!=null&&!_,L=m!=null&&_,q=ms({placement:"above",isEnabled:m!=null}),F=ce=>{var Q;if(_||M.current&&!a){ce.preventDefault();return}(Q=C.onClick)==null||Q.call(C,ce),l&&!ce.defaultPrevented&&(M.current=!0,z(async()=>{try{await l(ce)}finally{M.current=!1}}))},X=L?ce=>{var Q;ce.key==="Enter"||ce.key===" "?ce.preventDefault():(Q=C.onKeyDown)==null||Q.call(C,ce)}:void 0,Z=t==="ghost"?{[Ff]:""}:null,ne=B(Fr.base,Oz[T],Bz[t],u&&Fr.iconOnly,_&&Fr.disabled,L&&Fr.ariaDisabled,D&&Fr.link,!S&&Fr.pressable,S&&(S.orientation==="horizontal"?rd.horizontal:rd.vertical),S&&(t==="primary"||t==="destructive")&&(S.orientation==="horizontal"?rd.onSolidHorizontal:rd.onSolidVertical),!S&&Lz[f],d!=null&&_z.width(d),v),J=U(P("button",{variant:t,size:T}),ne,w,j),K=o.jsxs(o.Fragment,{children:[R&&o.jsx("span",{...{0:{className:"x10l6tqk x13vifvy x1o0tod xtijo5x x1ey2m1c xrvj5dj x1ku5rj1"},1:{className:"x10l6tqk x13vifvy x1o0tod xtijo5x x1ey2m1c xrvj5dj x1ku5rj1 xqcmdr3 xb2rp9n xskzprw x17yabm6 x14q22ui"}}[!!I<<0],"aria-hidden":"true",children:o.jsx(on,{size:"sm",shade:"inherit"})}),o.jsxs("span",{...B(Fr.contentWrapper,R&&(I?$b.hiddenContentDelayed:$b.hiddenContent)),"aria-hidden":R||void 0,children:[c&&o.jsx("span",{...B(Fr.iconWrapper,Dz[T]),children:c}),u?null:o.jsx("span",{className:"xb3r6kr xlyipyv xeuugli",children:h??e}),!u&&p&&o.jsx("span",{className:"x3nfvp2 x6s0dn4 x1heor9g",children:p})]}),o.jsx(Mi,{role:"status","aria-live":"polite",children:R?E("@astryx.button.loading"):""})]}),le=u&&e!==""||R&&!u||h!=null&&h!==e?{"aria-label":e}:null,ve=m!=null?{"aria-describedby":[C["aria-describedby"],q.describedBy].filter(Boolean).join(" ")||void 0}:null,ge=it($,m!=null?q.ref:void 0);let xe;return D?xe=o.jsx(O,{ref:ge,href:b,target:g,rel:k,...J,...C,...le,...ve,...Z,"aria-busy":R||void 0,onClick:F,children:K}):xe=o.jsx("button",{ref:ge,type:s,disabled:L?void 0:_,...J,...C,...le,...ve,...Z,"aria-busy":R||void 0,"aria-disabled":L||void 0,onClick:F,...X?{onKeyDown:X}:null,children:K}),m?o.jsxs(o.Fragment,{children:[xe,q.renderTooltip(m)]}):xe}re.displayName="Button";const dt={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",width:"1em",height:"1em","aria-hidden":!0},so={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-hidden":!0},qz={close:o.jsx("svg",{...dt,children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6"})}),chevronDown:o.jsx("svg",{...dt,children:o.jsx("path",{d:"M6 9l6 6 6-6"})}),chevronLeft:o.jsx("svg",{...dt,children:o.jsx("path",{d:"M15 6l-6 6 6 6"})}),chevronRight:o.jsx("svg",{...dt,children:o.jsx("path",{d:"M9 6l6 6-6 6"})}),chevronsLeft:o.jsx("svg",{...dt,children:o.jsx("path",{d:"M18 6l-6 6 6 6M11 6l-6 6 6 6"})}),chevronsRight:o.jsx("svg",{...dt,children:o.jsx("path",{d:"M6 6l6 6-6 6M13 6l6 6-6 6"})}),check:o.jsx("svg",{...dt,children:o.jsx("path",{d:"M5 13l4 4L19 7"})}),success:o.jsx("svg",{...so,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3a9 9 0 100 18 9 9 0 000-18zm4.06 6.56a.75.75 0 00-1.12-1l-3.94 4.4-1.94-1.94a.75.75 0 00-1.06 1.06l2.5 2.5a.75.75 0 001.09-.03l4.47-5z"})}),error:o.jsx("svg",{...so,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3a9 9 0 100 18 9 9 0 000-18zm-2.47 5.47a.75.75 0 00-1.06 1.06L10.94 12l-2.47 2.47a.75.75 0 101.06 1.06L12 13.06l2.47 2.47a.75.75 0 101.06-1.06L13.06 12l2.47-2.47a.75.75 0 00-1.06-1.06L12 10.94l-2.47-2.47z"})}),warning:o.jsx("svg",{...so,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.29 3.86L2.07 19.05A2 2 0 003.78 22h16.44a2 2 0 001.71-2.95L13.71 3.86a2 2 0 00-3.42 0zM12 9a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 9zm0 9a1 1 0 100-2 1 1 0 000 2z"})}),info:o.jsx("svg",{...so,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3a9 9 0 100 18 9 9 0 000-18zm0 4a1 1 0 100 2 1 1 0 000-2zm-.75 3.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5z"})}),calendar:o.jsxs("svg",{...dt,children:[o.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),o.jsx("path",{d:"M16 2v4M8 2v4M3 10h18"})]}),clock:o.jsxs("svg",{...dt,children:[o.jsx("circle",{cx:"12",cy:"12",r:"9"}),o.jsx("path",{d:"M12 7v5l3 3"})]}),externalLink:o.jsxs("svg",{...dt,children:[o.jsx("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),o.jsx("path",{d:"M15 3h6v6"}),o.jsx("path",{d:"M10 14L21 3"})]}),menu:o.jsx("svg",{...dt,strokeWidth:2,children:o.jsx("path",{d:"M4 6h16M4 12h16M4 18h16"})}),moreHorizontal:o.jsxs("svg",{...so,children:[o.jsx("circle",{cx:"5",cy:"12",r:"1.5"}),o.jsx("circle",{cx:"12",cy:"12",r:"1.5"}),o.jsx("circle",{cx:"19",cy:"12",r:"1.5"})]}),search:o.jsxs("svg",{...dt,children:[o.jsx("circle",{cx:"11",cy:"11",r:"8"}),o.jsx("path",{d:"M21 21l-4.35-4.35"})]}),arrowUp:o.jsx("svg",{...dt,children:o.jsx("path",{d:"M12 19V5m0 0l-7 7m7-7l7 7"})}),arrowDown:o.jsx("svg",{...dt,children:o.jsx("path",{d:"M12 5v14m0 0l7-7m-7 7l-7-7"})}),arrowsUpDown:o.jsx("svg",{...dt,children:o.jsx("path",{d:"M3 7.5L7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5"})}),funnel:o.jsx("svg",{...dt,children:o.jsx("path",{d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 01-.659 1.591l-5.432 5.432a2.25 2.25 0 00-.659 1.591v2.927a2.25 2.25 0 01-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 00-.659-1.591L3.659 7.409A2.25 2.25 0 013 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0112 3z"})}),eyeSlash:o.jsx("svg",{...dt,children:o.jsx("path",{d:"M3.98 8.223A10.477 10.477 0 001.934 12c1.292 4.338 5.31 7.5 10.066 7.5.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})}),viewColumns:o.jsx("svg",{...dt,children:o.jsx("path",{d:"M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125z"})}),copy:o.jsxs("svg",{...dt,children:[o.jsx("path",{d:"M8 4v12a2 2 0 002 2h8a2 2 0 002-2V7.242a2 2 0 00-.602-1.43L16.083 2.57A2 2 0 0014.685 2H10a2 2 0 00-2 2z"}),o.jsx("path",{d:"M16 18v2a2 2 0 01-2 2H6a2 2 0 01-2-2V9a2 2 0 012-2h2"})]}),checkDouble:o.jsxs("svg",{...dt,children:[o.jsx("path",{d:"M2 13l4 4L14 7"}),o.jsx("path",{d:"M9 13l4 4L21 7"})]}),wrench:o.jsx("svg",{...dt,children:o.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),stop:o.jsx("svg",{...so,children:o.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}),microphone:o.jsxs("svg",{...dt,children:[o.jsx("path",{d:"M12 2a3 3 0 00-3 3v6a3 3 0 006 0V5a3 3 0 00-3-3z"}),o.jsx("path",{d:"M19 10v1a7 7 0 01-14 0v-1"}),o.jsx("path",{d:"M12 18v4m-4 0h8"})]})};let Hz={};function Pz(e){var t;return e==null?null:typeof e=="string"?((t=J5(e))==null?void 0:t.icons)??null:e.icons??null}function D3(e,t){const n=Pz(t);return(n==null?void 0:n[e])??Hz[e]??qz[e]}const L3={root:{kmuXW:"x2lah0s",$$css:!0},span:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",$$css:!0}},B3={primary:{kMwMTN:"xtbr613",$$css:!0},secondary:{kMwMTN:"xv9yike",$$css:!0},tertiary:{kMwMTN:"xv9yike",$$css:!0},disabled:{kMwMTN:"xqa6c3m",$$css:!0},accent:{kMwMTN:"xqwr325",$$css:!0},success:{kMwMTN:"xtjic6",$$css:!0},error:{kMwMTN:"xjt36v0",$$css:!0},warning:{kMwMTN:"xs3pv69",$$css:!0},inherit:{kMwMTN:"x1heor9g",$$css:!0},blue:{kMwMTN:"x1fns2mt",$$css:!0},red:{kMwMTN:"xeffzf7",$$css:!0},green:{kMwMTN:"xmxeech",$$css:!0},gray:{kMwMTN:"x1eyinzz",$$css:!0},cyan:{kMwMTN:"x157w0xa",$$css:!0},teal:{kMwMTN:"x1f3zxcb",$$css:!0},yellow:{kMwMTN:"x1g6zdft",$$css:!0},orange:{kMwMTN:"xxu74a4",$$css:!0},pink:{kMwMTN:"x1kxxfg5",$$css:!0},purple:{kMwMTN:"xzdw94u",$$css:!0}},Uz={xsm:{kzqmXN:"x1jw3ynk",kZKoxP:"xvle69y",$$css:!0},sm:{kzqmXN:"xcdlrvm",kZKoxP:"x1l36t39",$$css:!0},md:{kzqmXN:"xwqq7k2",kZKoxP:"xmll18r",$$css:!0},lg:{kzqmXN:"xp8d6y2",kZKoxP:"xam5rvr",$$css:!0}},Fz={xsm:{kzqmXN:"x1jw3ynk",kZKoxP:"xvle69y",kGuDYH:"xboafo0",$$css:!0},sm:{kzqmXN:"xcdlrvm",kZKoxP:"x1l36t39",kGuDYH:"x1jchvi3",$$css:!0},md:{kzqmXN:"xwqq7k2",kZKoxP:"xmll18r",kGuDYH:"x1603h9y",$$css:!0},lg:{kzqmXN:"xp8d6y2",kZKoxP:"xam5rvr",kGuDYH:"xngnso2",$$css:!0}};function Gz(e){return e!=null&&e!==""?{role:"img","aria-label":e}:{"aria-hidden":"true"}}function Ce({icon:e,color:t="inherit",size:n="md",label:s,ref:r,className:i,style:a,xstyle:l,...c}){const u=Gz(s);if(typeof e=="string")return o.jsx(Vz,{name:e,color:t,size:n,a11yProps:u,className:i,style:a,xstyle:l,spanProps:c});const d=e;return o.jsx(d,{ref:r,...u,...U(P("icon",{size:n,color:t}),B(L3.root,B3[t],Uz[n],l),i??void 0,a),...c})}Ce.displayName="Icon";function Vz({name:e,color:t,size:n,a11yProps:s,className:r,style:i,xstyle:a,spanProps:l}){const c=c3(),u=D3(e,c);if(u==null)return null;const d=l??{};return o.jsx("span",{...s,...d,...U(P("icon",{size:n,color:t}),B(L3.span,B3[t],Fz[n],a),r??void 0,i),children:u})}function qs(e,t){return typeof e=="string"?o.jsx(Ce,{icon:e,...t}):typeof e=="function"||typeof e=="object"&&e!==null&&"render"in e?o.jsx(Ce,{icon:e,...t}):e}function Ca(e){const t=c3();return D3(e,t)}const Wz={isMobile:!1,isMobileNavOpen:!1,toggleMobileNav:()=>{},openMobileNav:()=>{},closeMobileNav:()=>{},isMobileNavEnabled:!1,hasAutoToggle:!0},w0=x.createContext(Wz);w0.displayName="AppShellMobileContext";function ex(){return x.use(w0)}function q3({ref:e,children:t,label:n,"data-testid":s,xstyle:r,className:i,style:a}){const l=be(),c=n??l("@astryx.mobileNav.toggle.open"),{isMobile:u,isMobileNavEnabled:d,isMobileNavOpen:f,mobileNavId:h,toggleMobileNav:p}=ex();return!u||!d?null:o.jsx(re,{ref:e,variant:"ghost",label:c,icon:t??o.jsx(Ce,{icon:"menu",color:"inherit"}),onClick:p,"aria-expanded":f,"aria-controls":h||void 0,"data-testid":s??"mobile-nav-toggle",xstyle:r,className:i,style:a,isIconOnly:!0})}q3.displayName="MobileNavToggle";const wo=x.createContext("default");wo.displayName="SideNavRenderContext";function H3(){return x.use(wo)}const Pp=x.createContext("default");Pp.displayName="TopNavRenderContext";const Up=x.createContext(null);Up.displayName="TopNavMobileContentContext";const Kz=typeof Vh.Activity<"u",Xz=Kz?({mode:e,children:t})=>o.jsx(Vh.Activity,{mode:e,children:t}):({children:e})=>o.jsx(o.Fragment,{children:e}),Zz={sm:640,md:768,lg:1024,none:0},u1="astryx-app-shell-main",At={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kVAEAm:"x1n2onr6",$$css:!0},variantWash:{kWkggS:"x1eiddq6",$$css:!0},variantSurface:{kWkggS:"x10xzikg",$$css:!0},variantSection:{kWkggS:"x10xzikg",$$css:!0},variantElevated:{kWkggS:"x1eiddq6",$$css:!0},rootFill:{kZKoxP:"xtdtrs8",$$css:!0},rootAuto:{kAzted:"x1ov3xa9",$$css:!0},mainFocusTarget:{kI3sdo:"x1uvtmcs",$$css:!0},contentBgSurface:{kWkggS:"x10xzikg",$$css:!0},contentBgWash:{kWkggS:"x1eiddq6",$$css:!0},contentBgTransparent:{kWkggS:"xjbqb8w",kHBbk8:"xc8icb0",$$css:!0},navAreaWash:{kWkggS:"x1eiddq6",$$css:!0},navAreaSurface:{kWkggS:"x10xzikg",$$css:!0},banner:{kmuXW:"x2lah0s",$$css:!0},headerSticky:{kVAEAm:"x7wzq59",k87sOh:"x13vifvy",kY2c9j:"x1vjfegm",$$css:!0},panelAutoFill:{kUk6DE:"x98rzlu",kVQacm:"xysyzu8",$$css:!0}};function P3({variant:e="elevated",banner:t,children:n,contentPadding:s,"data-testid":r,height:i="fill",mobileNav:a,sideNav:l,topNav:c,xstyle:u,className:d,style:f,ref:h,...p}){const m=be(),b=a===!1,y=a!=null&&a!==!1&&typeof a=="object"&&!x.isValidElement(a)?a:null,g=(y==null?void 0:y.breakpoint)??"md",k=a!=null&&a!==!1&&(x.isValidElement(a)||typeof a=="string")?a:null,v=(y==null?void 0:y.content)??null,w=(y==null?void 0:y.hasToggle)!==!1,j=(y==null?void 0:y.isOpen)!==void 0,$=g==="none"?"(max-width: 0px)":`(max-width: ${Zz[g]}px)`,C=qa($,y==null?void 0:y.defaultIsMobile),[E,T]=x.useState(!1),S=(y==null?void 0:y.isOpen)??E,N=x.useCallback(Mn=>{var Rn;j||T(Mn),(Rn=y==null?void 0:y.onOpenChange)==null||Rn.call(y,Mn)},[j,y]),z=x.useCallback(()=>{var Mn;(Mn=document.getElementById(u1))==null||Mn.focus()},[]),M=i==="fill",R=i==="auto",I=s1(t),A=s1(c),_=s1(l),D=!b&&(A||_)&&k==null,L=e==="section",q=e==="elevated",F=e==="wash"||e==="elevated"?At.navAreaWash:e==="surface"?At.navAreaSurface:void 0,X=e==="wash"?At.contentBgWash:e==="elevated"&&A&&_&&!C?At.contentBgTransparent:e==="surface"||e==="elevated"?At.contentBgSurface:void 0,Y=F??At.navAreaSurface,Z=x.useRef(null),ne=x.useRef(null);x.useEffect(()=>{if(!R||!Z.current||!ne.current)return;const Mn=Z.current,Rn=ne.current,Xl=()=>{const to=Mn.getBoundingClientRect().height;Rn.style.setProperty("--appshell-header-height",`${to}px`)};return h0(Mn,()=>Xl()),()=>x0(Mn)},[R]);const J=_&&!C,K=k!=null,ie=D&&v!=null&&C,le=x.useId(),ve=x.useMemo(()=>({isMobile:C,isMobileNavOpen:S,mobileNavId:le,toggleMobileNav:()=>D&&N(!S),openMobileNav:()=>D&&N(!0),closeMobileNav:()=>N(!1),isMobileNavEnabled:D,hasAutoToggle:w}),[C,S,le,N,D,w]),ge=_&&w?o.jsx(wo,{value:"drawer-content",children:l}):null,xe=_?o.jsx(wo,{value:"drawer-content",children:l}):null,ce=A?C&&!b&&k==null?o.jsx(Up,{value:ge,children:o.jsx(Pp,{value:"mobile-bar",children:c})}):c:null,Q=A||I?o.jsxs(Hf,{padding:0,hasDivider:L&&A,children:[I&&o.jsx("div",{...B(At.banner,F),children:t}),A&&ce]}):void 0,ye=Q!=null?o.jsx("div",{ref:Z,role:"banner",...U(P("app-shell-header",{variant:e}),B(F,R&&At.headerSticky)),children:Q}):void 0,ue=J?o.jsx(g0,{padding:0,hasDivider:L,isScrollable:M,...P("app-shell-sidenav",{variant:e}),xstyle:[F,R&&Y,R&&At.panelAutoFill],children:l}):void 0,pe=ue!=null&&R?o.jsx("div",{className:"x2lah0s x7giv3 x7wzq59 xepuwc7 x16zugyo x78zum5 xdt5ytf",children:ue}):ue,De=q&&A&&J,se=o.jsx(Jn,{padding:s??0,role:"main",id:u1,tabIndex:-1,isScrollable:M,xstyle:[X,At.mainFocusTarget],children:n}),en=De?o.jsxs("div",{className:"x1n2onr6 x78zum5 x98rzlu x2lwn1j x5yr21d",children:[o.jsx("div",{className:"x10l6tqk x10a8y8t x10xzikg x183tx6i x47corl"}),se]}):se,js=!b&&w&&C&&!A&&_?o.jsx("div",{...U(P("app-shell-header",{variant:e}),B(F,R&&At.headerSticky)),children:o.jsx(Hf,{padding:0,hasDivider:L,children:o.jsxs("div",{className:"x78zum5 x6s0dn4 x1k15mir xf314gf",role:"navigation","aria-label":m("@astryx.appShell.mobileNavigation"),children:[o.jsx(wo,{value:"topbar",children:l}),o.jsx(q3,{})]})})}):void 0;return o.jsx(w0,{value:ve,children:o.jsxs("div",{...p,ref:it(h,ne),"data-testid":r,...U(P("app-shell",{variant:e}),B(At.root,e==="wash"?At.variantWash:e==="surface"?At.variantSurface:e==="section"?At.variantSection:At.variantElevated,M?At.rootFill:At.rootAuto,u),d,f),children:[o.jsx("a",{href:`#${u1}`,onClick:z,className:"x10l6tqk x1xrnuwo x1i1rx1s x1jqxupm xjm9jq1 x15cytp8 xt970qd xh2mrf5 xnjsko4 x1cf3d6k xkdpibf x1y5lnwp xb3r6kr xomzh7y x1hyvwdk x1rsz1da xuxw1ft x1hbpcn8 xc342km x13vifvy x1rw3289 x1o0tod xodanix x10xzikg xjse4m1 x1q2oy4v x1hl2dhg x2mo6ok xjm74w1","data-testid":"skip-to-content",children:m("@astryx.appShell.skipToContent")}),o.jsx(Qn,{height:i,padding:0,header:o.jsxs(o.Fragment,{children:[ye,js]}),start:pe,content:en}),K&&k,ie&&v,C&&!b&&k==null&&!v&&o.jsxs(Xz,{mode:S?"visible":"hidden",children:[_&&!A&&o.jsx(wo,{value:"drawer",children:l}),A&&o.jsx(Up,{value:xe,children:o.jsx(Pp,{value:"drawer",children:c})})]})]})})}P3.displayName="AppShell";function Yz(e){return!e||typeof window>"u"?!1:window.getComputedStyle(e).direction==="rtl"}const ir=typeof window<"u"?x.useLayoutEffect:x.useEffect,Qz=new Set(["text","search","url","tel","email","password","number"]);function Jz(e){if(e.isContentEditable)return e;const t=e.closest("[contenteditable]");return t&&t.getAttribute("contenteditable")!=="false"?t:null}function Cb(e,t){if(!(e instanceof HTMLElement))return!1;const n=Jz(e);if(n){const u=typeof window<"u"?window.getSelection():null;return u&&u.rangeCount>0&&!u.isCollapsed?!0:(n.textContent??"").length>0}const s=e.tagName==="TEXTAREA",r=e.tagName==="INPUT"&&Qz.has(e.type);if(!s&&!r)return!1;const i=e,{selectionStart:a,selectionEnd:l,value:c}=i;return a!==l||a==null?!0:t==="ArrowLeft"||t==="ArrowUp"||t==="Home"?a>0:t==="ArrowRight"||t==="ArrowDown"||t==="End"?a<c.length:!1}function Pa(e={}){const{itemSelector:t='[role="menuitem"]',boundarySelector:n,wrap:s=!0,onEscape:r,orientation:i="vertical",hasHomeEnd:a=!0,isRtl:l,hasRovingTabIndex:c=!1,hasCaretGuard:u=!1}=e,d=x.useRef(null),f=x.useCallback(E=>E.getAttribute("aria-disabled")==="true"||E.disabled===!0||E.hasAttribute("disabled"),[]),h=x.useCallback(()=>{const E=d.current;if(!E)return[];const T=Array.from(E.querySelectorAll(t));return n?T.filter(S=>S.closest(n)===E):T},[t,n]),p=x.useCallback(E=>{const T=d.current;if(!T||!n)return!0;const S=E.target;return S?S.closest(n)===T:!0},[n]),m=x.useCallback((E,T,S,N)=>{const z=E.length;if(z===0)return-1;let M=T;for(let R=0;R<z;R++){if(M<0||M>=z){if(!N)return-1;M=(M+z)%z}const I=E[M];if(I&&!f(I))return M;M+=S}return-1},[f]),b=x.useCallback(()=>{const E=h(),T=document.activeElement;return E.findIndex(S=>S===T||S.contains(T))},[h]),y=x.useCallback((E,T)=>{E.getAttribute("tabindex")!==String(T)&&E.setAttribute("tabindex",String(T))},[]),g=x.useCallback(()=>{const E=h(),T=E.filter(z=>!f(z));if(T.length===0)return;const N=T.find(z=>z.getAttribute("tabindex")==="0")??T[0];for(const z of E)y(z,z===N?0:-1)},[h,f,y]);ir(()=>{c&&g()});const k=x.useCallback((E,T)=>{const S=E[T];if(S){if(c)for(const N of E)y(N,N===S?0:-1);S.focus()}},[c,y]),v=x.useCallback(E=>{const T=h();if(T.length===0)return;const S=Math.max(0,Math.min(E,T.length-1));k(T,S)},[h,k]),w=x.useCallback(()=>{const E=h(),T=m(E,0,1,!1);return T!==-1?(k(E,T),!0):!1},[h,m,k]),j=x.useCallback(()=>{const E=h(),T=m(E,E.length-1,-1,!1);return T!==-1?(k(E,T),!0):!1},[h,m,k]),$=x.useCallback(()=>{c&&g()},[c,g]),C=x.useCallback(E=>{if(E.ctrlKey||E.metaKey||E.altKey||!p(E))return;if(E.key==="Escape"){E.preventDefault(),r==null||r();return}const T=i==="horizontal"||i==="both",S=i==="vertical"||i==="both",N=[],z=[];if(T){const D=E.key==="ArrowLeft"||E.key==="ArrowRight"?l??Yz(d.current):!1;N.push(D?"ArrowLeft":"ArrowRight"),z.push(D?"ArrowRight":"ArrowLeft")}S&&(N.push("ArrowDown"),z.push("ArrowUp"));const M=N.includes(E.key),R=z.includes(E.key),I=a&&E.key==="Home",A=a&&E.key==="End";if(!M&&!R&&!I&&!A||u&&(Cb(E.target,E.key)||Cb(document.activeElement,E.key)))return;const _=b(),O=h();if(M){const D=_===-1?0:_+1,L=m(O,D,1,s);L!==-1&&k(O,L)}else if(R){const D=_===-1?O.length-1:_-1,L=m(O,D,-1,s);L!==-1&&k(O,L)}else I?w():A&&j();E.preventDefault()},[b,h,s,i,l,a,u,m,k,w,j,r,p]);return{listRef:d,handleKeyDown:C,handleFocus:$,focusItem:v,focusFirst:w,focusLast:j,ownsEvent:p,getItems:h}}const eA={base:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"xzye2dw",kZKoxP:"x1grt7ep",k8WAf4:"xt970qd",kg3NbH:"xf314gf",kaIpWk:"xjspbzw",kMv6JI:"xjb2p0i",kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",k63SB2:"x1e4wzip",khDVqt:"xuxw1ft",$$css:!0}},tA={neutral:{kWkggS:"x17x4s8c",kMwMTN:"x1tgivj0",$$css:!0},info:{kWkggS:"x1ewilqj",kMwMTN:"x17wrial",$$css:!0},success:{kWkggS:"xdsz4j9",kMwMTN:"xri61p4",$$css:!0},warning:{kWkggS:"x1q8g9m5",kMwMTN:"xrebv38",$$css:!0},error:{kWkggS:"x1pjz0fi",kMwMTN:"x1m024r3",$$css:!0},blue:{kWkggS:"x1o0wnni",kMwMTN:"x1vvqiwl",$$css:!0},cyan:{kWkggS:"x1rgj867",kMwMTN:"x1txnczv",$$css:!0},green:{kWkggS:"x1sqjeoo",kMwMTN:"xltfdvo",$$css:!0},orange:{kWkggS:"x1e9xt6e",kMwMTN:"xm47u9q",$$css:!0},pink:{kWkggS:"xnpoty2",kMwMTN:"xiuofww",$$css:!0},purple:{kWkggS:"x16i6n6f",kMwMTN:"x1m9wyeb",$$css:!0},red:{kWkggS:"x1cibrc5",kMwMTN:"x1joocv1",$$css:!0},teal:{kWkggS:"x1jtji5o",kMwMTN:"x9x0lbs",$$css:!0},yellow:{kWkggS:"x1bo7t0x",kMwMTN:"xdhq94a",$$css:!0}};function Ru({variant:e="neutral",label:t,icon:n,xstyle:s,className:r,style:i,ref:a,...l}){return o.jsxs("span",{ref:a,...U(P("badge",{variant:e}),B(eA.base,tA[e],s),r,i),...l,children:[n,t]})}Ru.displayName="Badge";const nA={info:"info",warning:"warning",error:"error",success:"success"},sA={info:"status",warning:"alert",error:"alert",success:"status"},rA={info:"accent",warning:"warning",error:"error",success:"success"},qi={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kMv6JI:"xjb2p0i",$$css:!0},rootElevatedCard:{kaIpWk:"x1hviunn",$$css:!0},header:{k1xSpc:"x78zum5",kGNEyG:"x1cy8zhl",kOIVth:"x1txdalj",k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",$$css:!0},headerCardStandalone:{kaIpWk:"x1hviunn",$$css:!0},headerCardWithContent:{krdFHd:"x81l70g",kfmiAY:"x7hs6f1",kVL7Gh:"xbiv7yw",kT0f0o:"x16uus16",$$css:!0},headerCentered:{kGNEyG:"x6s0dn4",$$css:!0},endArea:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",kmuXW:"x2lah0s",keTefX:"xvc5jky",kqGvvJ:"x81ka23",$$css:!0}},iA={info:{kWkggS:"xgcxg3y",$$css:!0},warning:{kWkggS:"x24i8r5",$$css:!0},error:{kWkggS:"x1pritpl",$$css:!0},success:{kWkggS:"xu13z74",$$css:!0}},aA={none:{kGVxlE:"x1gnnqk1",$$css:!0},low:{kGVxlE:"x1i5ehqx",$$css:!0},med:{kGVxlE:"x14hfi27",$$css:!0},high:{kGVxlE:"x1kcpxr7",$$css:!0}};function yt({status:e,title:t,description:n,icon:s,isDismissable:r=!1,onDismiss:i,endContent:a,container:l="card",elevation:c="none",defaultIsExpanded:u=!1,children:d,xstyle:f,className:h,style:p,ref:m,...b}){const y=be(),[g,k]=x.useState(!1),[v,w]=x.useState(u),j=x.useId(),$=nA[e],C=sA[e],E=rA[e],T=d!=null;if(g)return null;const S=()=>{k(!0),i==null||i()},N=()=>{w(_=>!_)},z=a!=null||r||T,M=a!=null||r,R=n==null&&M,I=T&&v,A=l==="card";return o.jsxs("div",{ref:m,role:C,...U(B(qi.root,aA[c],A&&c!=="none"&&qi.rootElevatedCard,f),h,p),...b,children:[o.jsxs("div",{...U(P("banner",{container:l,status:e}),B(qi.header,R&&qi.headerCentered,iA[e],A&&(I?qi.headerCardWithContent:qi.headerCardStandalone))),children:[o.jsx("div",{...U(P("banner-icon",{status:e}),{className:"x78zum5 x6s0dn4 x2lah0s"}),"aria-hidden":"true",children:s??o.jsx(Ce,{icon:$,size:"md",color:E})}),o.jsxs("div",{className:"x78zum5 xdt5ytf xxhr3t x98rzlu xeuugli",children:[o.jsx("div",{className:"x1ghz6dp xjb2p0i xcr08ib x2mo6ok x1kq96og x1tgivj0",children:t}),n!=null&&o.jsx("div",{className:"x1ghz6dp xjb2p0i x141an7d x1sodnla x1ltkj2j xv1l7n4",children:n})]}),z&&o.jsxs("div",{...B(qi.endArea,DT.inset(rs["--spacing-2"])),children:[a,T&&o.jsx(re,{variant:"ghost",size:"sm",label:y(v?"@astryx.banner.collapse":"@astryx.banner.expand"),tooltip:y(v?"@astryx.banner.collapse":"@astryx.banner.expand"),icon:o.jsx("span",{...{0:{className:"x3nfvp2 x11xpdln xuedmi6 x12w9bfk xlr8y92"},1:{className:"x3nfvp2 x11xpdln xuedmi6 x12w9bfk xlr8y92 x19jd1h0"}}[!!v<<0],children:o.jsx(Ce,{icon:"chevronDown",size:"sm",color:"inherit"})}),onClick:N,"aria-expanded":v,"aria-controls":I?j:void 0,isIconOnly:!0}),r&&o.jsx(re,{variant:"ghost",size:"sm",label:y("@astryx.banner.dismiss"),tooltip:y("@astryx.banner.dismiss"),icon:o.jsx(Ce,{icon:"close",size:"sm",color:"inherit"}),onClick:S,isIconOnly:!0})]})]}),I&&o.jsx("div",{id:j,...U(P("banner-content",{container:l,status:e}),{0:{className:"x1de1mus x8o8v82 x1pzlopt xgbv0en xw8tdv1 x92x3c3 x1t7ytsu x18b5jzi x1q0q8m5 x1j92z86 x1gejf6u xw8gpjh"},1:{className:"x1de1mus x8o8v82 x1pzlopt xgbv0en xw8tdv1 x92x3c3 x1t7ytsu x18b5jzi x1q0q8m5 x1j92z86 x1gejf6u xw8gpjh x14k8p9y xiaxfje"}}[!!A<<0]),children:d})]})}yt.displayName="Banner";const oA={root:{k2ei4v:"xtpqe59",kVhnKS:"x1t7ytsu",kGJrpR:"x14ydlgx",kZCmMZ:"x1rey3nv",kMwMTN:"xv1l7n4",keTefX:"x1lziwak",k71WvV:"x14z9mp",keoZOQ:"xdj266r",k1K539:"xat24cr",$$css:!0}};function U3({children:e,cite:t,xstyle:n,className:s,style:r,ref:i,...a}){return o.jsxs("blockquote",{ref:i,...U(P("blockquote"),B(oA.root,n),s,r),...a,children:[e,t!=null&&o.jsx("footer",{children:o.jsx("cite",{className:"x1lliihq xtbrsbv x141an7d x1ltkj2j x1j61x8r",children:t})})]})}U3.displayName="Blockquote";const j0=x.createContext({variant:"default",separator:"/"});j0.displayName="BreadcrumbContext";const lA={root:{k1xSpc:"x1lliihq",$$css:!0}};function F3({children:e,separator:t="/",variant:n="default",xstyle:s,className:r,style:i,label:a,ref:l,...c}){const u=be(),d=a??u("@astryx.breadcrumbs.label"),f=x.useMemo(()=>({variant:n,separator:t}),[n,t]);return o.jsx(j0,{value:f,children:o.jsx("nav",{ref:l,"aria-label":d,...U(P("breadcrumbs",{variant:n}),B(lA.root,s),r,i),...c,children:o.jsx("ol",{className:"x78zum5 x6s0dn4 x1a02dak xe8uvvx x1ghz6dp x1717udv xzye2dw",children:e})})})}F3.displayName="Breadcrumbs";const cA='button:not([disabled]), a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), [contenteditable]:not([contenteditable="false"]), audio[controls], video[controls], iframe, details > summary:first-child',wr=[];function uA(e){wr.push(e)}function dA(e){for(let t=wr.length-1;t>=0;t--)if(wr[t].handler===e){wr.splice(t,1);return}}function fA(e){if(wr.length===0)return!1;let t=wr[0];for(let n=1;n<wr.length;n++){const s=wr[n],r=t.getContainer(),i=s.getContainer();r!=null&&i!=null&&i!==r&&i.contains(r)||(t=s)}return t.handler===e}function Eb(){return wr.length>0}function G3(e){return e.isComposing===!0||e.keyCode===229}function hA(e){if(e.hasAttribute("inert")||e.closest("[inert]")||e.hidden||e.closest("[hidden]")||e.closest('[aria-hidden="true"]'))return!1;if(typeof window<"u"&&window.getComputedStyle){const t=window.getComputedStyle(e);if(t.visibility==="hidden"||t.display==="none")return!1}return!0}function S0(e){return Array.from(e.querySelectorAll(cA)).filter(hA)}function V3(e){try{e.focus()}catch{}return document.activeElement===e}function Tb(e){const t=S0(e);for(const n of t)if(V3(n))return!0;return!1}function xA(e){const t=S0(e);for(let n=t.length-1;n>=0;n--)if(V3(t[n]))return!0;return!1}function pA(e){const{isActive:t,onEscape:n}=e,s=x.useRef(null),r=x.useRef(null),i=x.useRef(!1),a=x.useCallback(()=>{s.current&&Tb(s.current)},[]);return x.useEffect(()=>{if(!t)return;const l=document.activeElement,c=s.current;return()=>{const u=document.activeElement;(u==null||u===document.body||u===document.documentElement||c!=null&&c.contains(u))&&l!=null&&l.isConnected&&typeof l.focus=="function"&&l.focus()}},[t]),x.useEffect(()=>{if(!t)return;const l=c=>{const u=s.current;if(!u)return;const d=c.target;u.contains(d)?r.current=d:i.current&&(Tb(u),r.current===document.activeElement&&xA(u),r.current=document.activeElement),i.current=!1};return document.addEventListener("focus",l,!0),()=>{document.removeEventListener("focus",l,!0)}},[t]),x.useEffect(()=>{if(!t)return;const l=()=>{n==null||n()};n&&uA({handler:l,getContainer:()=>s.current});const c=u=>{const d=s.current;if(d){if(u.key==="Escape"&&n){if(u.defaultPrevented||G3(u)||!fA(l))return;u.preventDefault(),u.stopPropagation(),n();return}if(u.key==="Tab"){i.current=!0;const f=S0(d);if(f.length===0)return;const h=f[0],p=f[f.length-1];u.shiftKey?document.activeElement===h&&(u.preventDefault(),p.focus()):document.activeElement===p&&(u.preventDefault(),h.focus())}}};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c),n&&dA(l)}},[t,n]),{containerRef:s,focusFirst:a}}function Il(e,t,n=!0){const s=x.useRef(!1);x.useEffect(()=>{n&&!s.current&&(s.current=!0,pa())},[e,t,n])}const d1={surface:{kWkggS:"x1prclbq",kaIpWk:"x1hviunn",kGVxlE:"x1i5ehqx",$$css:!0},contentWrapper:{kVAEAm:"x1n2onr6",$$css:!0},closeButtonWrapper:{kVAEAm:"x10l6tqk",krVfgx:"x1ey2m1c",kY2c9j:"x1vjfegm",kzqmXN:"x1i1rx1s x10okhzq",kZKoxP:"xjm9jq1 x132qfvm",kVQacm:"xb3r6kr x1dordxg",kz4h6p:"x1hyvwdk x10wafsz",kfzvcC:"x47corl xbt4iw",kLKAdn:"xexx8yu x1kw28su",$$css:!0}};function _l(e={}){const{onShow:t,onHide:n,xstyle:s,hasLightDismiss:r=!0,hasEscapeDismiss:i=!0,hasAutoFocus:a=!0,hasSurface:l=!0,hasCloseButton:c=!0,closeButtonLabel:u,dialogLabel:d,role:f="dialog",isModal:h=!0}=e,p=be(),m=u??p("@astryx.popover.close"),b=x.useRef(null),y=x.useRef(!1),g=Rl({mode:"context",lightDismiss:r,onShow:t,onHide:n}),{containerRef:k,focusFirst:v}=pA({isActive:g.isOpen,onEscape:i||r?g.hide:void 0});x.useEffect(()=>{g.isOpen&&a&&!y.current&&requestAnimationFrame(()=>{v()}),g.isOpen||(y.current=!1)},[g.isOpen,a,v]);const w=x.useCallback(T=>{b.current=T,g.ref(T)},[g]),j=x.useCallback(T=>{y.current=(T==null?void 0:T.skipAutoFocus)??!1,g.show()},[g]),$=x.useCallback(()=>{g.isOpen?g.hide():j()},[g,j]),C={"aria-haspopup":f==="dialog"?"dialog":"true","aria-expanded":g.isOpen,"aria-controls":g.id};Il("usePopover",'role="dialog" without a `dialogLabel` renders an unnamed dialog. Pass `dialogLabel`, or use `role: "none"` for listbox/menu popups whose content already carries its own role.',f==="dialog"&&!d);const E=x.useCallback((T,S)=>g.render(o.jsxs("div",{ref:k,role:f==="dialog"?"dialog":void 0,"aria-modal":f==="dialog"&&h?!0:void 0,"aria-label":f==="dialog"?d:void 0,...B(d1.contentWrapper,l&&d1.surface,s),children:[T,c&&o.jsx("div",{...B(d1.closeButtonWrapper,ul.centerInline("100%")),children:o.jsx(re,{variant:"secondary",label:m,onClick:g.hide})})]}),{...S,xstyle:S==null?void 0:S.xstyle}),[g,c,l,m,k,d,f,h,s]);return{triggerRef:w,contentRef:k,anchorId:g.anchorId,show:j,hide:g.hide,toggle:$,isOpen:g.isOpen,id:g.id,render:E,triggerProps:C}}function gA(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key!==" "}function tx(e){const{getItemLabels:t,onMatch:n,getCurrentIndex:s,resetMs:r=750,isDisabled:i}=e,a=x.useRef(""),l=x.useRef(void 0),c=x.useCallback(()=>{a.current="",l.current&&(clearTimeout(l.current),l.current=void 0)},[]),u=x.useCallback(()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{a.current="",l.current=void 0},r)},[r]);return{onKeyDown:x.useCallback(f=>{const h=f.key===" "&&a.current.length>0;if(!gA(f)&&!h)return!1;const p=t();if(p.length===0)return!1;const m=f.key.toLowerCase(),b=a.current.length>0&&a.current.split("").every(w=>w===m),y=b?m:a.current+m;a.current=y,u();const g=(s==null?void 0:s())??-1,k=p.length,v=b?1:0;for(let w=0;w<k;w++){const j=(g+v+w+k)%k;if(i!=null&&i(j))continue;const $=p[j];if($!=null&&$.trim().toLowerCase().startsWith(y))return n(j),!0}return!0},[t,n,s,u,i]),reset:c}}const zb={horizontal:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kzqmXN:"xh8yej3",$$css:!0},vertical:{k1xSpc:"x3nfvp2",kXwgrk:"xdt5ytf",kGNEyG:"x6s0dn4",kZKoxP:"x5yr21d",$$css:!0}},ro={horizontalLine:{kZKoxP:"xsyqizj",kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",$$css:!0},verticalLine:{kzqmXN:"xjk4fl7",kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",$$css:!0},subtle:{kWkggS:"x1m4xfpy",$$css:!0},strong:{kWkggS:"x7njt3n",$$css:!0}},Ab={horizontal:{keTefX:"xojxgvx",k71WvV:"x1fcf3bl",kzqmXN:"xx6qvi6",$$css:!0},vertical:{keoZOQ:"x1sa9bsh",k1K539:"x6h7pi7",kZKoxP:"x12qplqi",$$css:!0}};function Wc({orientation:e="horizontal",label:t,variant:n="subtle",isFullBleed:s=!1,xstyle:r,className:i,style:a,ref:l,"aria-label":c,"aria-labelledby":u,...d}){const f=e==="horizontal",h=x.useId(),p=u??(t&&c==null?h:void 0);return o.jsxs("div",{ref:l,...d,role:"separator","aria-orientation":e,"aria-label":c,"aria-labelledby":p,...U(P("divider",{variant:n,orientation:e}),B(f?zb.horizontal:zb.vertical,s&&(f?Ab.horizontal:Ab.vertical),r),i,a),children:[o.jsx("div",{...B(f?ro.horizontalLine:ro.verticalLine,ro[n])}),t&&o.jsx("div",{id:h,...{0:{className:"x2lah0s xrrkdod x141an7d x1ltkj2j xv1l7n4"},1:{className:"x2lah0s x141an7d x1ltkj2j xv1l7n4 xnjsko4 x8o8v82"}}[!f<<0],children:t}),t&&o.jsx("div",{...B(f?ro.horizontalLine:ro.verticalLine,ro[n])})]})}Wc.displayName="Divider";const mA=["noopener","noreferrer"];function W3(e,t){if(e!=="_blank")return{target:e,rel:t};const n=(t==null?void 0:t.split(/\s+/).filter(Boolean))??[];for(const s of mA)n.includes(s)||n.push(s);return{target:e,rel:n.join(" ")}}const K3=["button","a","input","select","textarea",'[role="button"]','[role="link"]','[role="checkbox"]','[role="radio"]','[role="switch"]','[role="tab"]','[role="menuitem"]','[role="option"]','[role="combobox"]','[role="listbox"]','[role="slider"]','[role="spinbutton"]',"[data-pressable-container]"].join(","),yA='[aria-readonly="true"]';function Nb(e,t){let n=e;for(;n!=null&&n!==t&&n!==document.body;){if(n.matches(K3)&&!n.matches(yA))return!0;n=n.parentElement}return!1}function kA(e){if(typeof document>"u"||!("getSelection"in document))return!1;const t=document.getSelection();return t==null||t.isCollapsed?!1:e.contains(t.anchorNode)}function $0({containerRef:e,interactiveRef:t,onClick:n,href:s,target:r,disabled:i=!1}){x.useEffect(()=>{const c=e.current;c&&c.setAttribute("data-pressable-container","true")},[e]);const a=x.useCallback(c=>{if(i)return;const u=e.current;if(!u||kA(u))return;const d=c.target;if(d instanceof Element&&!(d!==c.currentTarget&&Nb(d,u))&&(n==null||n(c),!c.defaultPrevented&&(s!=null&&(r==="_blank"||c.ctrlKey||c.metaKey?window.open(s,"_blank","noopener"):t!=null&&t.current?t.current.click():window.location.href=s),s==null&&n==null&&(t!=null&&t.current)))){const f=new MouseEvent("click",{bubbles:c.bubbles,cancelable:c.cancelable,ctrlKey:c.ctrlKey,metaKey:c.metaKey,shiftKey:c.shiftKey,altKey:c.altKey,button:c.button});t.current.dispatchEvent(f),c.stopPropagation()}},[e,t,n,s,r,i]),l=x.useCallback(c=>{if(i)return;const u=e.current;if(!u)return;const d=c.target;if(!(d instanceof Element))return;c.button===1&&s!=null&&(d===c.currentTarget||!Nb(d,u))&&window.open(s,"_blank","noopener")},[e,s,i]);return{onClick:a,onMouseUp:l}}const bA=new Set(["option","tab","row","gridcell","columnheader","rowheader","treeitem"]),fn={root:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",kg3NbH:"xf314gf",kVAEAm:"x1n2onr6",kB7OPa:"x9f619",k9WMMc:"x1yc453h",kaIpWk:"xh6dtrn",$$css:!0},alignStart:{kGNEyG:"x1cy8zhl",$$css:!0},interactive:{kkrTdU:"x1ypdohk",k1ekBW:"x15406qy",kIyJzY:"xkvfbh3",kAMwcw:"xlr8y92",kWkggS:"xjbqb8w xe9uy6x xyxi2l3",$$css:!0},focusVisibleOutline:{kI3sdo:"x1a2a7pz x1irc7jg",kInvED:"x1wfwxd8 xdjuwb3",$$css:!0},highlighted:{kWkggS:"x1lmrjuc",$$css:!0},selected:{kWkggS:"xgcxg3y",$$css:!0},disabled:{kkrTdU:"x1h6gzvc",kfzvcC:"x47corl",$$css:!0},label:{kMwMTN:"x1tgivj0",kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",$$css:!0},labelSingleTruncate:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",$$css:!0},labelMultiTruncate:{kVQacm:"xb3r6kr",k1xSpc:"x104kibb",kgKLqz:"x1ua5tub",$$css:!0},description:{kMwMTN:"xv1l7n4",kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",$$css:!0},descriptionSingleTruncate:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",$$css:!0},descriptionMultiTruncate:{kVQacm:"xb3r6kr",k1xSpc:"x104kibb",kgKLqz:"x1ua5tub",$$css:!0}},Mb={lineClamp:e=>[{kJFfOR:e!=null?"x1yhjpo9":e,$$css:!0},{"--x-WebkitLineClamp":e??void 0}]},vA={compact:{k8WAf4:"xu0wf1k",$$css:!0},balanced:{k8WAf4:"xce4md1",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"xrrkdod",$$css:!0}};function Ua({as:e="div",marker:t,startContent:n,label:s,description:r,endContent:i,align:a="center",density:l="balanced",labelLines:c,descriptionLines:u,onClick:d,interactiveRef:f,href:h,target:p,rel:m,isHighlighted:b=!1,isSelected:y=!1,isDisabled:g=!1,xstyle:k,className:v,style:w,ref:j,role:$,...C}){const E=Ri(),T=f!=null,S=x.useRef(null),{onClick:N}=$0({containerRef:S,interactiveRef:f??void 0,disabled:g});Il("Item","`interactiveRef` is mutually exclusive with `onClick`/`href`. In delegation mode the row only forwards clicks to the referenced control, so `onClick`/`href` are ignored. Drop one of them.",T&&(d!=null||h!=null));const z=d!=null||h!=null||T,{target:M,rel:R}=W3(p,m),I=$!=null,A=$!=null&&bA.has($),_=typeof s=="string",O=typeof r=="string",D=c!=null?c===1?fn.labelSingleTruncate:fn.labelMultiTruncate:_?fn.labelSingleTruncate:null,L=u!=null?u===1?fn.descriptionSingleTruncate:fn.descriptionMultiTruncate:O?fn.descriptionSingleTruncate:null,q=o.jsxs(o.Fragment,{children:[o.jsx("span",{...B(fn.label,D,c!=null&&c>1&&Mb.lineClamp(c)),children:s}),r!=null&&o.jsx("span",{...B(fn.description,L,u!=null&&u>1&&Mb.lineClamp(u)),children:r})]}),F=Y=>{g||Y.target.closest("button, a, input, select, textarea")||d==null||d(Y)},X=o.jsxs(o.Fragment,{children:[t,n!=null&&o.jsx("span",{className:"x3psx0u x78zum5",children:n}),I||T?o.jsx("span",{...{0:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h"},1:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo"}}[!!g<<0],children:q}):h!=null?o.jsx(E,{href:h,target:M,rel:R,"aria-disabled":g||void 0,tabIndex:g?-1:void 0,...{0:{className:"xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz"},1:{className:"xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz xbyyjgo"}}[!!g<<0],children:q}):d!=null?o.jsx("button",{type:"button",onClick:d,disabled:g,...{0:{className:"xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz"},1:{className:"xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz xbyyjgo"}}[!!g<<0],children:q}):o.jsx("span",{...{0:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h"},1:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo"}}[!!g<<0],children:q}),i!=null&&o.jsx("span",{...{0:{className:"x3psx0u x78zum5 xvc5jky"},1:{className:"x3psx0u x78zum5 xvc5jky xbyyjgo"}}[!!g<<0],children:i})]});return o.jsx(e,{ref:T?it(j,S):j,...C,"aria-selected":A&&y||void 0,"aria-current":C["aria-current"]??(y&&!A?!0:void 0),"aria-disabled":g||void 0,...U(P("item",{density:l,align:a}),B(fn.root,vA[l],a==="start"&&fn.alignStart,z&&fn.interactive,z&&fn.focusVisibleOutline,b&&fn.highlighted,y&&fn.selected,g&&!I&&fn.disabled,k),v,w),role:$,onClick:T?N:I?d:z?F:void 0,children:X})}Ua.displayName="Item";const Ol=x.createContext(null);Ol.displayName="DropdownMenuContext";function C0(){return x.use(Ol)}const E0=x.createContext(null);E0.displayName="DropdownMenuRadioGroupContext";function wA(){return x.use(E0)}function T0(e,t){if(t||e.pointerType!=="mouse")return;const n=e.currentTarget;n!==n.ownerDocument.activeElement&&n.focus()}const Rb={root:{kB7OPa:"x9f619",kzqmXN:"xh8yej3",k8WAf4:"xce4md1",kg3NbH:"xf314gf",kaIpWk:"x1ws5lxm",kMv6JI:"x9ynric",kGuDYH:"xcr08ib",kMwMTN:"x1tgivj0",kWkggS:"xjbqb8w x1c52tdz",kkrTdU:"x1ypdohk",k9WMMc:"x1yc453h",kI3sdo:"x1a2a7pz",$$css:!0},disabled:{kSiTet:"xbyyjgo",kkrTdU:"x1h6gzvc",$$css:!0}},jA={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}};function Kc({icon:e,label:t,description:n,onClick:s,isDisabled:r=!1,endContent:i,xstyle:a,className:l,style:c}){const u=C0(),d=(u==null?void 0:u.menuSize)??"md",f=x.useCallback(()=>{r||!s||(s(),u==null||u.closeMenu())},[r,s,u]),h=x.useCallback(p=>T0(p,r),[r]);return o.jsx(Ua,{role:"menuitem",tabIndex:r?void 0:-1,onPointerMove:h,startContent:e?qs(e,{size:"sm",color:"secondary"}):void 0,label:t,description:n,endContent:i,onClick:f,isDisabled:r,xstyle:[Rb.root,jA[d],r&&Rb.disabled,a],...U(P("dropdown-menu-item",{size:d}),{className:l,style:c})})}Kc.displayName="DropdownMenuItem";function SA(e){const{show:t,hide:n,isOpen:s,isEnabled:r,showDelay:i=150,hideDelay:a=200}=e,l=qa("(hover: hover)"),c=x.useRef(null),u=x.useRef(null),d=x.useRef(null),f=x.useRef(!1),h=x.useRef(!1),p=x.useRef(s);p.current&&!s&&(f.current=!1),p.current=s;const m=x.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null),u.current&&(clearTimeout(u.current),u.current=null)},[]),{listRef:b,handleKeyDown:y,focusFirst:g}=Pa({onEscape:()=>{m(),n()}});x.useEffect(()=>()=>m(),[m]);const k=x.useCallback(()=>{m(),s?(h.current=!0,n()):(h.current=!1,t(),requestAnimationFrame(()=>g()))},[s,m,t,n,g]),v=x.useCallback(()=>{if(l){if(h.current){h.current=!1;return}f.current=!0,m(),i>0?c.current=setTimeout(()=>{t({skipAutoFocus:!0})},i):t({skipAutoFocus:!0})}},[l,m,t,i]),w=x.useCallback(()=>{f.current&&(m(),u.current=setTimeout(()=>{n()},a))},[m,n,a]),j=x.useCallback(()=>{m()},[m]),$=x.useCallback(S=>{d.current=S},[]),C=x.useCallback(()=>{},[]),E=x.useCallback(S=>{},[]),T=x.useCallback(S=>{},[]);return r?{triggerProps:{onClick:k,onMouseEnter:v,onMouseLeave:w},contentProps:{onMouseEnter:j,onMouseLeave:w,onKeyDown:y},menuRef:b,focusFirst:g,setTriggerEl:$}:{triggerProps:{onClick:C,onMouseEnter:C,onMouseLeave:C},contentProps:{onMouseEnter:C,onMouseLeave:C,onKeyDown:T},menuRef:b,focusFirst:g,setTriggerEl:E}}const Iu=new Set(["menuitem","menuitemradio","menuitemcheckbox"]),nx=[...Iu].map(e=>`[role="${e}"]:not([aria-disabled="true"])`).join(","),sx='[role="menu"]',f1={root:{kB7OPa:"x9f619",kzqmXN:"xh8yej3",k8WAf4:"xce4md1",kg3NbH:"xf314gf",kaIpWk:"x1ws5lxm",kMv6JI:"x9ynric",kGuDYH:"xcr08ib",kMwMTN:"x1tgivj0",kWkggS:"xjbqb8w x1c52tdz",kkrTdU:"x1ypdohk",k9WMMc:"x1yc453h",kI3sdo:"x1a2a7pz",$$css:!0},open:{kWkggS:"x1lmrjuc",$$css:!0},disabled:{kSiTet:"xbyyjgo",kkrTdU:"x1h6gzvc",$$css:!0}},$A={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}},CA={keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0},Ib={popover:{k7Eaqz:"x5w4yej",keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0},popoverCustomWidth:e=>[CA,{k7Eaqz:(typeof e=="number"?`${e}px`:e)!=null?"xkj4a21":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(typeof e=="number"?`${e}px`:e)}]};function X3(e){const{icon:t,label:n,description:s,isDisabled:r=!1,hasSpinner:i=!1,menuWidth:a,onOpenChange:l,children:c,xstyle:u,className:d,style:f,"data-testid":h,menuDataTestId:p}=e,m=C0(),b=(m==null?void 0:m.menuSize)??"md",y=!r,g=x.useId(),k=x.useId(),v=x.useRef(null),[w,j]=x.useState(!1),$=Rl({mode:"context",lightDismiss:!1,onShow:x.useCallback(()=>{j(!0),l==null||l(!0)},[l]),onHide:x.useCallback(()=>{j(!1),l==null||l(!1)},[l])}),C=x.useCallback(()=>{y&&$.show()},[y,$]),E=x.useCallback(()=>{$.hide()},[$]),{listRef:T,handleKeyDown:S,focusFirst:N,focusItem:z,ownsEvent:M,getItems:R}=Pa({itemSelector:nx,boundarySelector:sx,wrap:!1,onEscape:()=>D({focusTrigger:!0})}),I=tx({getItemLabels:()=>R().map(K=>K.textContent),onMatch:z,getCurrentIndex:()=>R().findIndex(K=>K===document.activeElement||K.contains(document.activeElement))}),{triggerProps:A,contentProps:_}=SA({show:C,hide:E,isOpen:w,isEnabled:y}),O=x.useCallback(K=>{y&&($.show(),K!=null&&K.focusFirst&&requestAnimationFrame(()=>{var le;N()||(le=T.current)==null||le.focus()}))},[y,$,N,T]),D=x.useCallback(K=>{var ie;$.hide(),(K==null?void 0:K.focusTrigger)!==!1&&((ie=v.current)==null||ie.focus())},[$]),L=x.useCallback(K=>{v.current=K,$.ref(K)},[$]),q=x.useCallback(()=>{r||(w?D({focusTrigger:!0}):O({focusFirst:!0}))},[r,w,O,D]),F=x.useCallback(K=>{if(r)return;const le=(typeof window<"u"&&v.current?window.getComputedStyle(v.current).direction==="rtl":!1)?"ArrowLeft":"ArrowRight";(K.key===le||K.key==="Enter"||K.key===" ")&&(K.preventDefault(),K.stopPropagation(),O({focusFirst:!0}))},[r,O]),X=x.useCallback(K=>T0(K,r),[r]),Y=x.useCallback(K=>{if(!M(K))return;if(K.key==="Escape"){K.preventDefault(),K.stopPropagation(),D({focusTrigger:!0});return}if(K.key==="Enter"||K.key===" "){K.preventDefault();const ve=document.activeElement;ve&&Iu.has(ve.getAttribute("role")??"")&&ve.click();return}const le=(typeof window<"u"&&T.current?window.getComputedStyle(T.current).direction==="rtl":!1)?"ArrowRight":"ArrowLeft";if(K.key===le){K.preventDefault(),D({focusTrigger:!0});return}if(I.onKeyDown(K)){K.preventDefault();return}S(K)},[M,D,S,I,T]),Z=x.useMemo(()=>({menuSize:b,closeMenu:()=>{D({focusTrigger:!1}),m==null||m.closeMenu()}}),[b,D,m]),ne=i?o.jsx("span",{...U(P("dropdown-menu-indicator-icon"),{className:"x78zum5 x6s0dn4"}),children:o.jsx(on,{size:"sm"})}):o.jsx("span",{...U(P("dropdown-menu-indicator-icon"),{className:"x78zum5 x6s0dn4"}),children:o.jsx(Ce,{icon:"chevronRight",size:"sm",color:"secondary"})}),J=a?Ib.popoverCustomWidth(a):Ib.popover;return o.jsxs(o.Fragment,{children:[o.jsx(Ua,{ref:K=>L(K),id:k,role:"menuitem",tabIndex:r?void 0:-1,"aria-haspopup":"menu","aria-expanded":w,"aria-controls":w?g:void 0,"aria-disabled":r||void 0,"data-testid":h,onMouseEnter:A.onMouseEnter,onMouseLeave:A.onMouseLeave,onPointerMove:X,startContent:t?qs(t,{size:"sm",color:"secondary"}):void 0,label:n,description:s,endContent:ne,onClick:q,onKeyDown:F,isDisabled:r,xstyle:[f1.root,$A[b],w&&f1.open,r&&f1.disabled,u],...U(P("dropdown-menu-item",{size:b}),{className:d,style:f})}),$.render(o.jsx("div",{ref:T,id:g,role:"menu",tabIndex:-1,"aria-labelledby":k,onKeyDown:Y,onMouseEnter:_.onMouseEnter,onMouseLeave:_.onMouseLeave,"data-testid":p,...U(P("dropdown-menu"),{className:"x9f619 x78zum5 xdt5ytf x1lsbc85 xuyqlj2 x1odjw0f x1fcsqxe xgory14 x9epnlk x1n97fys x1prclbq x1i5ehqx x1hc1fzr x19991ni xuedmi6 xlr8y92"}),children:o.jsx(Ol,{value:Z,children:c})}),{placement:"end",alignment:"start",xstyle:[J,rr.end]})]})}X3.displayName="DropdownMenuSubMenu";const EA={divider:{kqGvvJ:"xsq74q5",$$css:!0}};function h1(e){return`item-${e.label}`}function TA(e,t){return`section-${e.title??t}`}function rx(e){const t=[];for(let n=0;n<e.length;n++){const s=e[n];"type"in s&&s.type==="divider"?t.push(o.jsx(Wc,{xstyle:EA.divider,...P("dropdown-menu-divider")},`divider-${n}`)):"type"in s&&s.type==="section"?t.push(o.jsxs("div",{role:"group","aria-label":s.title,children:[s.title&&o.jsx("div",{"aria-hidden":"true",...U(P("dropdown-menu-section-heading"),{className:"xu0wf1k xf314gf x9ynric x141an7d x1ltkj2j xv1l7n4 x87ps6o"}),children:s.title}),s.items.map(r=>o.jsx(Kc,{icon:r.icon,label:r.label,onClick:r.onClick,isDisabled:r.isDisabled},h1(r)))]},TA(s,n))):"type"in s||(s.items&&s.items.length>0?t.push(o.jsx(X3,{icon:s.icon,label:s.label,isDisabled:s.isDisabled,children:rx(s.items)},h1(s))):t.push(o.jsx(Kc,{icon:s.icon,label:s.label,onClick:s.onClick,isDisabled:s.isDisabled},h1(s))))}return t}const io={root:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"xzye2dw",kogj98:"x1ghz6dp","--separator-display":"xkce8z9 x1ibt0lz",$$css:!0},defaultSize:{kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",$$css:!0},supportingSize:{kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",$$css:!0}},zA={popover:{k7Eaqz:"x5w4yej",kqGvvJ:"xsq74q5",$$css:!0}};function Z3({ref:e,as:t,children:n,href:s,onClick:r,isCurrent:i,startIcon:a,menu:l,menuSize:c,xstyle:u,className:d,style:f,"data-testid":h,...p}){const m=x.use(j0),b=Ri(t),y=m.variant==="supporting",g=x.useRef(null),k=x.useRef(null),v=i===!0,w=i==null,j=l!=null,$=c??(y?"sm":"md");x.useEffect(()=>{},[j,s,r]),x.useEffect(()=>{if(!w)return;const E=g.current;if(!E)return;const T=E.parentElement;if(!T)return;const S=Array.from(T.children),N=S.length>0&&S[S.length-1]===E,z=T.querySelector('[aria-current="page"]');if(N&&!z){const M=k.current??E;return M.setAttribute("aria-current","page"),()=>{M.removeAttribute("aria-current")}}});const C=o.jsxs(o.Fragment,{children:[a&&o.jsx("span",{className:"x78zum5 x6s0dn4 x2lah0s",children:a}),n]});return v?o.jsxs("li",{ref:it(e,g),...U(P("breadcrumb-item"),B(io.root,y?io.supportingSize:io.defaultSize,u),d,f),"data-testid":h,...p,children:[o.jsx("span",{"aria-hidden":"true",className:"x11ke7fs x6s0dn4 xv1l7n4 xu0wf1k x87ps6o",children:m.separator}),j?o.jsx(Fp,{ref:k,menu:l,menuSize:$,isSupporting:y,isCurrent:!0,label:n,children:C}):o.jsx("span",{...{0:{className:"x78zum5 x6s0dn4 xzye2dw x1pd3egz x1tgivj0"},1:{className:"x78zum5 x6s0dn4 xzye2dw x1pd3egz xv1l7n4"}}[!!y<<0],"aria-current":"page",children:C})]}):o.jsxs("li",{ref:it(e,g),...U(P("breadcrumb-item"),B(io.root,y?io.supportingSize:io.defaultSize,u),d,f),"data-testid":h,...p,children:[o.jsx("span",{"aria-hidden":"true",className:"x11ke7fs x6s0dn4 xv1l7n4 xu0wf1k x87ps6o",children:m.separator}),j?o.jsx(Fp,{ref:k,menu:l,menuSize:$,isSupporting:y,label:n,children:C}):s!=null?o.jsx(b,{ref:k,href:s,onClick:r,...{0:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk xv1l7n4"},1:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk xv1l7n4"}}[!!y<<0],children:C}):r!=null?o.jsx("button",{ref:k,type:"button",onClick:r,...{0:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk x1717udv x1ghz6dp xln7xf2 xv1l7n4"},1:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk x1717udv x1ghz6dp xln7xf2 xv1l7n4"}}[!!y<<0],children:C}):o.jsx("span",{ref:k,...{0:{className:"x78zum5 x6s0dn4 xzye2dw x1pd3egz x1tgivj0"},1:{className:"x78zum5 x6s0dn4 xzye2dw x1pd3egz xv1l7n4"}}[!!y<<0],children:C})]})}Z3.displayName="BreadcrumbItem";function Fp({ref:e,children:t,label:n,menu:s,menuSize:r,isSupporting:i,isCurrent:a=!1}){const l=x.useId(),c=x.useRef(null),u=_l({onHide:x.useCallback(()=>{var T;(T=c.current)==null||T.focus()},[]),hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"}),d=Ca("chevronDown"),f=x.useCallback(()=>{u.hide()},[u]),{listRef:h,handleKeyDown:p,focusFirst:m,focusItem:b,ownsEvent:y,getItems:g}=Pa({itemSelector:nx,boundarySelector:sx,wrap:!1,onEscape:f}),k=tx({getItemLabels:()=>g().map(T=>T.textContent),onMatch:b,getCurrentIndex:()=>g().findIndex(T=>T===document.activeElement||T.contains(document.activeElement))}),v=x.useCallback(T=>{if(y(T)){if(T.key==="Enter"||T.key===" "){T.preventDefault();const S=document.activeElement;S&&Iu.has(S.getAttribute("role")??"")&&S.click();return}if(T.key==="Tab"){f();return}if(k.onKeyDown(T)){T.preventDefault();return}p(T)}},[p,f,k,y]),w=x.useCallback(()=>{u.show(),requestAnimationFrame(()=>m())},[u,m]),j=x.useCallback(()=>{u.isOpen?u.hide():w()},[u,w]),$=x.useCallback(T=>{u.isOpen||(T.key==="ArrowDown"||T.key==="Enter"||T.key===" ")&&(T.preventDefault(),w())},[u.isOpen,w]),C=x.useMemo(()=>({closeMenu:f,menuSize:r}),[f,r]),E=Array.isArray(s)?rx(s):s;return o.jsxs(o.Fragment,{children:[o.jsxs("button",{ref:it(e,c,u.triggerRef),type:"button",onClick:j,onKeyDown:$,...U(P("breadcrumb-item-menu-trigger"),{...u.triggerProps,"aria-haspopup":"menu","aria-controls":l,"aria-current":a?"page":void 0}),...{0:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk x1717udv x1ghz6dp xln7xf2 xv1l7n4"},1:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk x1717udv x1ghz6dp xln7xf2 xv1l7n4"}}[!!i<<0],children:[t,o.jsx("span",{"aria-hidden":"true",className:"x78zum5 x6s0dn4 x2lah0s x141an7d",children:d})]}),u.render(o.jsx("div",{ref:h,id:l,role:"menu","aria-label":typeof n=="string"?n:void 0,onKeyDown:v,...U(P("breadcrumb-menu"),{className:"x9f619 x78zum5 xdt5ytf x1lsbc85 xuyqlj2 x1odjw0f x1fcsqxe xgory14 x9epnlk x1n97fys x87ps6o"}),children:o.jsx(Ol,{value:C,children:E})}),{placement:"below",alignment:"start",xstyle:[zA.popover,rr.below]})]})}Fp.displayName="BreadcrumbMenuTrigger";function AA(e){return typeof e=="string"||typeof e=="number"}function _b(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function Fa({children:e,anchorRef:t,content:n,placement:s="above",alignment:r="center",delay:i=200,hideDelay:a=0,focusTrigger:l="auto",isEnabled:c=!0,onOpenChange:u,hasHoverIndication:d="auto",isOpen:f,isDefaultOpen:h}){const p=x.useRef(null),m=e!=null?AA(e):!1,b=d===!0||d==="auto"&&m,y=x.useCallback(()=>{u==null||u(!0)},[u]),g=x.useCallback(()=>{u==null||u(!1)},[u]),k=ms({placement:s,alignment:r,delay:i,hideDelay:a,focusTrigger:l,isEnabled:c,isOpen:f,isDefaultOpen:h,onShow:y,onHide:g});return ir(()=>{if(!t)return;const v=t.current;if(!v)return;k.ref(v);const w=v.getAttribute("aria-describedby");return v.setAttribute("aria-describedby",_b(w,k.describedBy)??""),()=>{k.ref(null),w?v.setAttribute("aria-describedby",w):v.removeAttribute("aria-describedby")}},[t,k.ref,k.describedBy]),ir(()=>{if(t||m)return;const v=p.current;if(!v)return;const w=v.firstElementChild;if(!w)return;k.ref(w);const j=w.getAttribute("aria-describedby");return w.setAttribute("aria-describedby",_b(j,k.describedBy)??""),()=>{k.ref(null),j?w.setAttribute("aria-describedby",j):w.removeAttribute("aria-describedby")}},[t,m,k.ref,k.describedBy]),t&&e==null?o.jsx(o.Fragment,{children:k.renderTooltip(n)}):m?o.jsxs(o.Fragment,{children:[o.jsx("span",{ref:k.ref,tabIndex:0,"aria-describedby":k.describedBy,...{0:{className:"xt0psk2"},1:{className:"xt0psk2 xujl8zx xev0dqp xycaml9 xrys4gj"}}[!!b<<0],children:e}),k.renderTooltip(n)]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:p,className:"xjp7ctv",children:e}),k.renderTooltip(n)]})}Fa.displayName="Tooltip";const Y3=Object.freeze(Object.defineProperty({__proto__:null,Tooltip:Fa},Symbol.toStringTag,{value:"Module"})),NA="data-astryx-live-region",MA="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;inset-block-start:0;inset-inline-start:0;pointer-events:none;user-select:none;",RA=2e3,Gf={polite:null,assertive:null};function Q3(e){const t=Gf[e];t!=null&&(clearTimeout(t),Gf[e]=null)}function IA(e,t){Q3(e),Gf[e]=setTimeout(()=>{Gf[e]=null,t.textContent=""},RA)}let As=null;function Ob(e){const t=document.createElement("div");return t.setAttribute(NA,e),t.setAttribute("aria-live",e),t.setAttribute("aria-atomic","true"),t.setAttribute("role",e==="assertive"?"alert":"status"),t.style.cssText=MA,document.body.appendChild(t),t}function _A(){return typeof document>"u"?null:As?(As.polite.isConnected||document.body.appendChild(As.polite),As.assertive.isConnected||document.body.appendChild(As.assertive),As):(As={polite:Ob("polite"),assertive:Ob("assertive")},As)}function OA(e,t){const n=_A();if(!n)return;const s=t==="assertive"?n.assertive:n.polite;s.textContent="",requestAnimationFrame(()=>{s.textContent=e}),IA(t,s)}function DA(e){if(Q3(e),!As)return;const t=e==="assertive"?As.assertive:As.polite;t.textContent=""}function Dl(){return x.useCallback((e,t="polite")=>{if(!e){DA(t);return}OA(e,t)},[])}const LA={wrapper:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"xzye2dw",kmuXW:"x2lah0s",$$css:!0}},BA={ctrl:"⌃",alt:"⌥",shift:"⇧",enter:"↵",backspace:"⌫",escape:"Esc",tab:"⇥",up:"↑",down:"↓",left:"←",right:"→",plus:"+"};function qA(e,t){return e==="mod"?t?"⌘":"Ctrl":BA[e]??e.toUpperCase()}const HA={ctrl:"Control",alt:"Alt",shift:"Shift",enter:"Enter",backspace:"Backspace",escape:"Escape",tab:"Tab",up:"Up arrow",down:"Down arrow",left:"Left arrow",right:"Right arrow",plus:"Plus"};function PA(e,t){return e==="mod"?t?"Command":"Control":HA[e]??e.toUpperCase()}function UA(){return()=>{}}function FA(){return!1}function GA(){if(typeof navigator>"u")return!1;const e="userAgentData"in navigator?navigator.userAgentData:null;return e&&typeof e=="object"&&"platform"in e?/mac/i.test(e.platform??""):/Mac|iPhone|iPad|iPod/.test(navigator.platform??"")}function J3({keys:e,ref:t,xstyle:n,className:s,style:r,...i}){const a=x.useSyncExternalStore(UA,GA,FA),l=e.split("+").map(u=>u.trim().toLowerCase()),c=l.map(u=>PA(u,a)).join(" + ");return o.jsx("span",{...i,ref:t,role:"img","aria-label":c,...U(P("kbd"),B(LA.wrapper,n),s,r),children:l.map(u=>o.jsx("kbd",{"aria-hidden":"true",className:"x3nfvp2 x6s0dn4 xl56j7k x16asifk x1grt7ep x7a5moj xx3sua9 x17x4s8c xlxy82 x1q0q8m5 xib2hle xv1l7n4 x9ynric x141an7d x1e4wzip x1ltkj2j x87ps6o",children:qA(u,a)},u))})}J3.displayName="Kbd";const VA=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),WA={horizontal:["left","right"],vertical:["up","down"],both:["left","right","up","down"]},KA={hint:{kVAEAm:"xixxii4",kpwlN0:"x1anvkwx",kogj98:"x1ghz6dp",kWkggS:"x1prclbq",kaIpWk:"xh6dtrn",kGVxlE:"x1i5ehqx",kLKAdn:"xfsso4q",kGO01o:"xy143xn",kZCmMZ:"x12gdq22",kwRFfy:"x1djylfy",kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",kMwMTN:"xv1l7n4",khDVqt:"xuxw1ft",kSiTet:"xg01cxk xofkqq2",k1ekBW:"xsm4mo9",kIyJzY:"xx6bhzk",kzIqYQ:"xd00j3c",kfzvcC:"x47corl",$$css:!0}};function e4(e={}){const{orientation:t="horizontal",dismissAfterMs:n=3e3,isEnabled:s=!0}=e,r=be(),i=x.useRef(null),a=x.useRef(!1),l=x.useRef(!1),c=x.useRef(()=>{}),u=x.useCallback(()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]),d=x.useCallback(()=>{l.current=!0},[]),f=x.useCallback(()=>{l.current=!1,u(),c.current(null)},[u]),h=Rl({mode:"context",onShow:d,onHide:f});c.current=h.ref;const p=x.useCallback(()=>{a.current=!0,u(),h.hide(),l.current=!1,c.current(null)},[u,h]),m=x.useCallback(w=>{a.current||!s||(c.current(w),h.show(),u(),i.current=setTimeout(()=>{p()},n))},[u,p,n,s,h]);x.useEffect(()=>()=>{u(),c.current(null)},[u]);const b=x.useCallback(w=>{if(a.current||!s)return;const j=w.target;if(!j.matches(":focus-visible"))return;const $=w.currentTarget;w.relatedTarget instanceof Node&&$.contains(w.relatedTarget)||m(j)},[m,s]),y=x.useCallback(w=>{if(!l.current)return;const j=w.currentTarget;if(w.relatedTarget instanceof Node&&j.contains(w.relatedTarget)){!a.current&&w.relatedTarget instanceof HTMLElement&&c.current(w.relatedTarget);return}p()},[p]),g=x.useCallback(w=>{l.current&&VA.has(w.key)&&p()},[p]),k=o.jsx("span",{className:"x3nfvp2 x6s0dn4 xzye2dw",children:WA[t].map(w=>o.jsx(J3,{keys:w},w))});return{hintElement:h.render(o.jsxs("span",{"aria-hidden":"true",children:[k,o.jsx("span",{className:"x11g1kdw",children:r("@astryx.keyboardHint.toNavigate")})]}),{placement:"below",alignment:"start",xstyle:KA.hint,style:{marginBlockStart:rs["--spacing-2"]}}),onFocus:b,onBlur:y,onKeyDown:g}}function t4(e){x.useEffect(()=>{if(!e)return;const t=window.scrollX,n=window.scrollY,{body:s}=document,r=s.style.overflow,i=s.style.position,a=s.style.top,l=s.style.left,c=s.style.right;return s.style.overflow="hidden",s.style.position="fixed",s.style.top=`-${n}px`,s.style.left="0",s.style.right="0",()=>{s.style.overflow=r,s.style.position=i,s.style.top=a,s.style.left=l,s.style.right=c,window.scrollTo(t,n)}},[e])}let n4=!1;typeof window<"u"&&requestAnimationFrame(()=>{n4=!0});const XA={slideDown:{kKVMdj:"x1srr2gu x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},slideUp:{kKVMdj:"x1dvww92 x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},fadeIn:{kKVMdj:"xqcmdr3 x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},scaleIn:{kKVMdj:"x97zbip x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0}};function ZA(e="slideDown"){const[t]=x.useState(()=>n4);return t?XA[e]:null}const YA=50;function QA(e){const t=e.match(/^([\d.]+)ms$/);if(t)return parseFloat(t[1]);const n=e.match(/^([\d.]+)s$/);return n?parseFloat(n[1])*1e3:null}const JA={natural:10,fast:4,instant:1/0};function eN(e,t,n){const s="natural",r=JA[s],{token:i}=Qh(),a=x.useMemo(()=>{const y=QA(i("--duration-fast-min"));if(y==null)return YA;const g=y/10;return Math.max(4,Math.round(g))},[i,s]),[l,c]=x.useState(0),u=x.useRef(e),d=x.useRef(0),f=x.useRef(0),h=x.useRef(null);u.current=e;const p=x.useRef(e.length);e.length!==p.current&&(p.current=e.length,e.length===0&&l!==0&&(d.current=0,c(0)));const m=x.useRef(t);t!==m.current&&(m.current=t,!t&&e.length>0&&(d.current=e.length,c(e.length)));const b=qa("(prefers-reduced-motion: reduce)");return x.useEffect(()=>{if(!t||s==="instant"||b)return;function y(g){if(g-f.current>=a){f.current=g;const v=u.current,w=d.current;if(w<v.length){const j=Math.min(w+r,v.length);d.current=j,c(j)}}h.current=requestAnimationFrame(y)}return h.current=requestAnimationFrame(y),()=>{h.current!==null&&(cancelAnimationFrame(h.current),h.current=null)}},[t,r,a,s,b]),!t||s==="instant"||b?e:e.slice(0,l)}const tN=new Set(["text","password","email","number","search","tel","url","date","datetime-local","month","time","week"]),nN=new Set(["true","menu","listbox","tree","grid","dialog"]);function sN(e){if(e.getAttribute("role")==="combobox")return!0;const t=e.getAttribute("aria-haspopup");return t!=null&&nN.has(t)}function z0({containerRef:e,inputRef:t,disabled:n=!1}){const s=x.useCallback(()=>{const r=t.current;r!=null&&(r instanceof HTMLElement&&sN(r)?r.click():r instanceof HTMLInputElement&&tN.has(r.type)||r instanceof HTMLTextAreaElement?r.focus():r instanceof HTMLElement?r.click():"focus"in r&&r.focus())},[t]);return $0({containerRef:e,interactiveRef:t,onClick:s,disabled:n})}const rN={warning:"warning",error:"error",success:"success"},iN={warning:"@astryx.input.statusButton.warning",error:"@astryx.input.statusButton.error",success:"@astryx.input.statusButton.success"};function s4({status:e,statusVariant:t="attached",isInGroup:n=!1,size:s="md"}){const r=be(),a=t==="tooltip"&&!!(e!=null&&e.message),[l,c]=x.useState(void 0),u=ms({placement:"above",isEnabled:a,isOpen:l}),d=x.useCallback(()=>{c(void 0)},[]),f=x.useCallback(()=>{typeof window>"u"||typeof window.matchMedia!="function"||!window.matchMedia("(hover: none)").matches||c(m=>m!==!0)},[]);if(x.useEffect(()=>{if(l!==!0)return;const m=b=>{b.key==="Escape"&&c(void 0)};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[l]),!(!!e&&!n&&t!=="detached"))return{statusIcon:null,describedBy:void 0};const p=o.jsx(Ce,{icon:rN[e.type],size:s,color:e.type,...P("input-status-icon",{size:s,status:e.type})});return a?{statusIcon:o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",ref:u.ref,"aria-label":r(iN[e.type]),"aria-describedby":u.describedBy,onClick:f,onBlur:d,className:"x3nfvp2 x6s0dn4 xl56j7k x1717udv x1ghz6dp x1heor9g x1ypdohk xjspbzw x784prv x9v5kkp xzunyri x7s97pk",children:p}),u.renderTooltip(e.message)]}),describedBy:u.describedBy}:{statusIcon:p,describedBy:void 0}}const A0=x.createContext(null);A0.displayName="InteractiveRoleContext";function aN(){return x.use(A0)}function r4({href:e,onClick:t,isDisabled:n=!1}){const s=aN();return e!=null&&!n?"link":t!=null?"button":s??"inert"}const oN=500,lN=10;function cN(e){const{onLongPress:t,disabled:n=!1,delayMs:s=oN,moveCancelPx:r=lN}=e,i=x.useRef(null),a=x.useRef(null),l=x.useRef(t);l.current=t;const c=x.useCallback(()=>{i.current!=null&&(clearTimeout(i.current),i.current=null),a.current=null},[]),u=x.useCallback(f=>{if(n||f.touches.length!==1)return;const h=f.touches[0];c(),a.current={x:h.clientX,y:h.clientY},i.current=setTimeout(()=>{const p=a.current;p!=null&&l.current({x:p.x,y:p.y})},s)},[n,s,c]),d=x.useCallback(f=>{const h=a.current;if(h==null||f.touches.length!==1)return;const p=f.touches[0];(Math.abs(p.clientX-h.x)>r||Math.abs(p.clientY-h.y)>r)&&c()},[r,c]);return x.useEffect(()=>c,[c]),{onTouchStart:u,onTouchMove:d,onTouchEnd:c,onTouchCancel:c}}const N0=6,uN={x177fznd:"x177fznd",$$css:!0},id={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu x1ue31p x134zogi x7so5qh x1eb35i0",kSiTet:"xg01cxk xz63v9m x1ceiq2s xhva3ql",kVAEAm:"x10l6tqk xd2i8i8 xw895rg x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk xz63v9m x1ceiq2s xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x1d23w33",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x1d23w33",$$css:!0}},dN={x1e36hu2:"x1e36hu2",$$css:!0},ad={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu xqw8whb x1xhgmdq x7so5qh x1eb35i0",kSiTet:"xg01cxk x7g73g2 x8e9lel xhva3ql",kVAEAm:"x10l6tqk x13sqjsa xxj8d0r x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk x7g73g2 x8e9lel xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x19f70rm",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x19f70rm",$$css:!0}},fN={x10zkftw:"x10zkftw",$$css:!0},od={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu xrhii57 xeozflw x7so5qh x1eb35i0",kSiTet:"xg01cxk xe0m1oz xtpmopf xhva3ql",kVAEAm:"x10l6tqk x1k2a1sm xs5no71 x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk xe0m1oz xtpmopf xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr xramsae",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr xramsae",$$css:!0}},hN={xbjq1vy:"xbjq1vy",$$css:!0},ld={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu xtj9ir3 x1okg2q x7so5qh x1eb35i0",kSiTet:"xg01cxk xnsjgr4 x1y0vk26 xhva3ql",kVAEAm:"x10l6tqk x1cuf62g x1qy2sty x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk xnsjgr4 x1y0vk26 xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x177ftvf",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x177ftvf",$$css:!0}},xN={x3z7t8n:"x3z7t8n",$$css:!0},cd={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu x1ybz0u4 x1fpm3bq x7so5qh x1eb35i0",kSiTet:"xg01cxk x1qps2i7 x1a7n03g xhva3ql",kVAEAm:"x10l6tqk xeilikp x1xz04m3 x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk x1qps2i7 x1a7n03g xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x1k1siky",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x1k1siky",$$css:!0}},pN={x6dglqq:"x6dglqq",$$css:!0},ud={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu x17lvmk x192eg1j x7so5qh x1eb35i0",kSiTet:"xg01cxk x52nu6g xt179ik xhva3ql",kVAEAm:"x10l6tqk x8j1s1q x8gw32m x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk x52nu6g xt179ik xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr xenj0cg",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr xenj0cg",$$css:!0}},gN=[{marker:uN,reveal:id.reveal,revealLayoutPreserved:id.revealLayoutPreserved,conceal:id.conceal,concealLayoutPreserved:id.concealLayoutPreserved},{marker:dN,reveal:ad.reveal,revealLayoutPreserved:ad.revealLayoutPreserved,conceal:ad.conceal,concealLayoutPreserved:ad.concealLayoutPreserved},{marker:fN,reveal:od.reveal,revealLayoutPreserved:od.revealLayoutPreserved,conceal:od.conceal,concealLayoutPreserved:od.concealLayoutPreserved},{marker:hN,reveal:ld.reveal,revealLayoutPreserved:ld.revealLayoutPreserved,conceal:ld.conceal,concealLayoutPreserved:ld.concealLayoutPreserved},{marker:xN,reveal:cd.reveal,revealLayoutPreserved:cd.revealLayoutPreserved,conceal:cd.conceal,concealLayoutPreserved:cd.concealLayoutPreserved},{marker:pN,reveal:ud.reveal,revealLayoutPreserved:ud.revealLayoutPreserved,conceal:ud.conceal,concealLayoutPreserved:ud.concealLayoutPreserved}],Gp=new Array(N0).fill(!1);function mN(){for(let e=0;e<N0;e++)if(!Gp[e])return Gp[e]=!0,{index:e,isExhausted:!1};return{index:0,isExhausted:!0}}function yN(e,t){t||(Gp[e]=!1)}const Db=Object.freeze({});function kN(e={}){const{isEnabled:t=!0}=e,[n]=x.useState(()=>t?mN():null);if(x.useEffect(()=>{if(n!=null)return()=>yN(n.index,n.isExhausted)},[n]),Il("useContainerReveal",`More than ${N0} reveal containers are mounted at once; nested containers beyond the pool may share a marker. Add markers to containerReveal.pool.stylex.ts and raise POOL_SIZE.`,(n==null?void 0:n.isExhausted)??!1),n==null)return{getContainerProps:()=>Db,getContentRevealProps:()=>Db};const s=gN[n.index];return{getContainerProps:()=>B(s.marker),getContentRevealProps:(r={})=>{const{isRevealInverted:i=!1,isLayoutPreserved:a=!1}=r,l=i?a?s.concealLayoutPreserved:s.conceal:a?s.revealLayoutPreserved:s.reveal;return B(l)}}}const x1={label:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"xzye2dw",kMv6JI:"x9ynric",kGuDYH:"xcr08ib",kLWn49:"x1kq96og",k63SB2:"x1e4wzip",kMwMTN:"xv1l7n4",kkrTdU:"x1ypdohk",$$css:!0},labelDisabled:{kMwMTN:"xnbbluu",kkrTdU:"x1h6gzvc",$$css:!0},srOnly:{ksu8eU:"xng3xce",kMcinP:"xzpqnlu",kZKoxP:"xjm9jq1",kLqNvP:"x1o0tod",kogj98:"xkdpibf",kVQacm:"xb3r6kr",kmVPX3:"x1717udv",kfzvcC:"x47corl",kVAEAm:"x10l6tqk",k87sOh:"x13vifvy",kfSwDN:"x87ps6o",khDVqt:"xuxw1ft",kzqmXN:"x1i1rx1s",$$css:!0}};function ix({label:e,inputID:t,labelID:n,isGroupLabel:s=!1,isLabelHidden:r=!1,isDisabled:i=!1,isOptional:a=!1,isRequired:l=!1,labelIcon:c,labelTooltip:u,description:d,descriptionID:f,className:h,style:p,xstyle:m,ref:b,...y}){const g=be(),k=a?g("@astryx.field.optional"):l?g("@astryx.field.required"):null,v=s?"span":"label",w=!s&&t!=null,j=x.useRef(null),$=x.useMemo(()=>({get current(){var T;return t==null?null:((T=j.current)==null?void 0:T.ownerDocument.getElementById(t))??null},set current(T){}}),[t]),C=z0({containerRef:j,inputRef:$,disabled:!w}),E=o.jsxs(o.Fragment,{children:[c&&qs(c,{size:"sm",color:"inherit"}),e,k&&o.jsxs("span",{className:"x1sodnla x141an7d x1ltkj2j xv1l7n4",children:[o.jsx("span",{"aria-hidden":"true",children:" ∙ "}),k]}),u&&o.jsx(Fa,{content:u,placement:"above",children:o.jsx(Ce,{icon:"info",size:"sm",color:"inherit"})})]});return o.jsxs(o.Fragment,{children:[o.jsx(v,{ref:b,id:n,htmlFor:s?void 0:t,...y,...U(P("field-label"),B(x1.label,i&&x1.labelDisabled,r&&x1.srOnly,m),h,p),children:E}),d&&o.jsx("span",{ref:w?j:void 0,id:f,...w?C:void 0,...{0:{className:"x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4"},2:{className:"x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4 x1ypdohk"},1:{className:"x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4 xng3xce xzpqnlu xjm9jq1 x1o0tod xkdpibf xb3r6kr x1717udv x47corl x10l6tqk x13vifvy x87ps6o xuxw1ft x1i1rx1s"},3:{className:"x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4 x1ypdohk xng3xce xzpqnlu xjm9jq1 x1o0tod xkdpibf xb3r6kr x1717udv x47corl x10l6tqk x13vifvy x87ps6o xuxw1ft x1i1rx1s"}}[!!w<<1|!!r<<0],children:d})]})}ix.displayName="FieldLabel";const bN={warning:"warning",error:"error",success:"success"},p1={base:{kMv6JI:"x9ynric",kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",$$css:!0},attached:{keoZOQ:"x1c40v9y",kLKAdn:"x1ak3mig",kGO01o:"x1wesfrj",kg3NbH:"xf314gf",kVL7Gh:"xquck67",kT0f0o:"x14i3lts",$$css:!0},detached:{keoZOQ:"xcsaf9d",k8WAf4:"xce4md1",kg3NbH:"xf314gf",kaIpWk:"xh6dtrn",$$css:!0}},vN={warning:{kWkggS:"x24i8r5",kMwMTN:"xdhq94a",$$css:!0},error:{kWkggS:"x1pritpl",kMwMTN:"x1joocv1",$$css:!0},success:{kWkggS:"xu13z74",kMwMTN:"xltfdvo",$$css:!0}};function ax({ref:e,type:t,message:n,id:s,variant:r="attached",xstyle:i,className:a,style:l,...c}){const u=ZA("slideDown"),d=Dl();return x.useEffect(()=>{n&&d(n,t==="error"?"assertive":"polite")},[d,n,t]),o.jsx("div",{ref:e,id:s,...c,...U(P("field-status",{type:t,variant:r}),B(p1.base,u,r==="attached"?p1.attached:p1.detached,vN[t],i),a,l),children:r==="detached"?o.jsxs("span",{className:"x78zum5 x1cy8zhl xzye2dw",children:[o.jsx("span",{className:"x3nfvp2 x6s0dn4 x14o5nre x2lah0s",children:o.jsx(Ce,{icon:bN[t],size:"sm",color:"inherit",...P("field-status-icon",{type:t})})}),o.jsx("span",{children:n})]}):n})}ax.displayName="FieldStatus";const wN={x1tspnpo:"x1tspnpo",$$css:!0},ox=x.createContext(null);ox.displayName="CheckboxListContext";const hn={container:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",$$css:!0},containerLabelHidden:{kOIVth:"xxhr3t",$$css:!0},checkboxWrapper:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",kHBbk8:"xc8icb0",$$css:!0},input:{kVAEAm:"x10l6tqk",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",kSiTet:"xg01cxk",kkrTdU:"x1ypdohk",kY2c9j:"x1vjfegm",$$css:!0},inputDisabled:{kkrTdU:"x1h6gzvc",$$css:!0},checkbox:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kaIpWk:"xx3sua9",k1ekBW:"xts7igz",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",$$css:!0},checkboxFocus:{kI3sdo:"x1a2a7pz xkri23q",kInvED:"x81n7kt",$$css:!0},checkboxUnchecked:{kMwMTN:"xqwr325",kVAM5u:"xvy26l8 x1jtjlen",kWkggS:"x10xzikg xrsv7h",$$css:!0},checkboxChecked:{kMwMTN:"x17wrial",kVAM5u:"xad5do x1od6ugu",kWkggS:"x1ewilqj x6aeo4j",$$css:!0},checkboxDisabled:{kSiTet:"xbyyjgo",kVAM5u:"x14i3s5s xmt8yqp",$$css:!0},checkboxDisabledUnchecked:{kWkggS:"xwmxj5m x1cjfj8k",$$css:!0},checkmark:{k1xSpc:"x1s85apg",kMwMTN:"x17wrial xs5hli",$$css:!0},checkmarkVisible:{k1xSpc:"x1lliihq",$$css:!0},indeterminateMark:{k1xSpc:"x1s85apg",kWkggS:"x1azo05 xwvh9j7",kaIpWk:"xjspbzw",$$css:!0},indeterminateMarkVisible:{k1xSpc:"x1lliihq",$$css:!0}},Lb={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},jN={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},SN={sm:{kzqmXN:"xsmyaan",kZKoxP:"x1kpxq89",$$css:!0},md:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",$$css:!0}},$N={sm:{kzqmXN:"x1fsd2vl",kZKoxP:"x36qwtl",$$css:!0},md:{kzqmXN:"xsmyaan",kZKoxP:"x36qwtl",$$css:!0}},CN={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function i4({label:e,isLabelHidden:t=!1,description:n,onChange:s,changeAction:r,isLoading:i=!1,value:a,isDisabled:l=!1,htmlName:c,disabledMessage:u,isReadOnly:d=!1,isOptional:f=!1,isRequired:h=!1,size:p="md",onFocus:m,onBlur:b,labelIcon:y,status:g,width:k,xstyle:v,className:w,style:j,ref:$,...C}){const E=x.useId(),T=x.useId(),S=x.useId(),[,N]=x.useTransition(),[z,M]=x.useOptimistic(a),R=i||z!==a,I=l&&!!u,A=x.use(ox),_=l&&(I||((A==null?void 0:A.hasDisabledMessage)??!1)),O=ms({placement:"above",focusTrigger:"always",isEnabled:I}),D=z==="indeterminate",L=z===!0,q=L||D,F=x.useCallback(Z=>{Z&&(Z.indeterminate=D)},[D]),X=[];n&&X.push(T),g!=null&&g.message&&X.push(S),I&&X.push(O.describedBy);const Y=X.length>0?X.join(" "):void 0;return o.jsxs("div",{...U(P("checkbox-input",{size:p}),B(k!=null&&CN.width(k),v),w,j),children:[o.jsxs("div",{ref:Z=>{O.interactionRef(Z)},...B(hn.container,t&&hn.containerLabelHidden,!l&&wN),children:[o.jsxs("div",{...B(hn.checkboxWrapper,Lb[p]),children:[o.jsx("input",{...C,ref:it($,F,O.positionRef),id:E,type:"checkbox",name:l?void 0:c,checked:L,disabled:l&&!_,"aria-disabled":_?"true":void 0,readOnly:d,required:h,onChange:Z=>{if(l||R||d)return;const ne=Z.target.checked;s==null||s(ne,Z),r&&!Z.defaultPrevented&&N(async()=>{M(ne),await r(ne,Z)})},onFocus:m,onBlur:b,"aria-readonly":d||void 0,"aria-describedby":Y,"aria-invalid":(g==null?void 0:g.type)==="error"?!0:void 0,"aria-busy":R||void 0,...B(hn.input,Lb[p],l&&hn.inputDisabled)}),o.jsx("div",{"aria-hidden":"true",...U(P("checkbox",{size:p,checked:L?"checked":D?"indeterminate":null,disabled:l?"disabled":null}),B(hn.checkbox,jN[p],!l&&hn.checkboxFocus,q?hn.checkboxChecked:hn.checkboxUnchecked,l&&hn.checkboxDisabled,l&&!q&&hn.checkboxDisabledUnchecked)),children:R?o.jsx(on,{size:"sm",shade:"inherit"}):o.jsxs(o.Fragment,{children:[o.jsx("svg",{viewBox:"0 0 10 10",...B(hn.checkmark,SN[p],L&&hn.checkmarkVisible),children:o.jsx("path",{d:"M8.5 2.5L4 7.5L1.5 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})}),o.jsx("div",{...B(hn.indeterminateMark,$N[p],D&&hn.indeterminateMarkVisible)})]})})]}),o.jsx("div",{className:"x78zum5 xdt5ytf x1lsbc85",children:o.jsx(ix,{label:e,inputID:E,isLabelHidden:t,isDisabled:l,isOptional:f,isRequired:h,labelIcon:y,description:n,descriptionID:T})})]}),(g==null?void 0:g.message)&&o.jsx(ax,{type:g.type,message:g.message,id:S,variant:"detached"}),I&&O.renderTooltip(u)]})}i4.displayName="CheckboxInput";function a4({value:e,onChange:t,label:n,hasCloseOnSelect:s=!0,children:r,className:i,style:a,...l}){const c=x.useMemo(()=>({value:e,onChange:t,hasCloseOnSelect:s}),[e,t,s]);return o.jsx("div",{...l,role:"group","aria-label":n,...U({className:"x78zum5 xdt5ytf x1lsbc85"},{className:i,style:a}),children:o.jsx(E0,{value:c,children:r})})}a4.displayName="DropdownMenuRadioGroup";const ao={root:{kzqmXN:"xh8yej3",kaIpWk:"x1ws5lxm",kMwMTN:"x1tgivj0",kWkggS:"xjbqb8w x1c52tdz",kkrTdU:"x1ypdohk",kI3sdo:"x1a2a7pz",$$css:!0},disabled:{kSiTet:"xbyyjgo",kkrTdU:"x1h6gzvc",$$css:!0},circle:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",kB7OPa:"x9f619",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kaIpWk:"x16rqkct",k1ekBW:"xts7igz",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kayTVb:"x1g77sc7 xozvky",keTefX:"x1lziwak x1jymrmb",$$css:!0},unchecked:{kVAM5u:"xvy26l8",kWkggS:"x10xzikg",$$css:!0},checked:{kVAM5u:"xad5do",kWkggS:"x1ewilqj",$$css:!0},dot:{kaIpWk:"x16rqkct",kWkggS:"x1azo05",$$css:!0}},EN={sm:{kzqmXN:"x1xp8n7a",kZKoxP:"xmix8c7",$$css:!0},md:{kzqmXN:"x17z2i9w",kZKoxP:"x17rw0jw",$$css:!0}},TN={sm:{kzqmXN:"x1v4s8kt",kZKoxP:"xols6we",$$css:!0},md:{kzqmXN:"x1xc55vz",kZKoxP:"xdk7pt",$$css:!0}};function o4({value:e,label:t,description:n,icon:s,isDisabled:r=!1,endContent:i,xstyle:a,className:l,style:c,...u}){const d=C0(),f=wA();if(!f)throw new Error("DropdownMenuRadioItem must be used within a DropdownMenuRadioGroup");const h=(d==null?void 0:d.menuSize)??"md",p=h==="sm"?"sm":"md",m=f.value===e,b=x.useCallback(()=>{r||(f.onChange(e),f.hasCloseOnSelect&&(d==null||d.closeMenu()))},[r,f,e,d]),y=x.useCallback(g=>T0(g,r),[r]);return o.jsx(Ua,{...u,role:"menuitemradio","aria-checked":m,tabIndex:r?void 0:-1,onPointerMove:y,marker:o.jsx("span",{"aria-hidden":"true",...U(P("dropdown-menu-radio",{size:p,checked:m?"checked":null,disabled:r?"disabled":null}),B(ao.circle,EN[p],m?ao.checked:ao.unchecked)),children:m&&o.jsx("span",{...U(P("dropdown-menu-radio-dot",{size:p,checked:"checked",disabled:r?"disabled":null}),B(ao.dot,TN[p]))})}),startContent:s?qs(s,{size:"sm",color:"secondary"}):void 0,label:t,description:n,endContent:i,onClick:b,isDisabled:r,xstyle:[ao.root,r&&ao.disabled,a],...U(P("dropdown-menu-item",{size:h}),{className:l,style:c})})}o4.displayName="DropdownMenuRadioItem";function kn({icon:e,...t}){return o.jsx(re,{...t,icon:e,isIconOnly:!0})}kn.displayName="IconButton";const Bb={container:{kB7OPa:"x9f619",kZCmMZ:"x1c35znw",kwRFfy:"x64h4k7",kLKAdn:"x14m0hsi",kGO01o:"xc1wllq",$$css:!0}},zN={containerPaddingInlineStart:{"--container-padding-inline-start":"xjmlhfd",$$css:!0},containerPaddingInlineEnd:{"--container-padding-inline-end":"x1ihxwbr",$$css:!0},containerPaddingBlockStart:{"--container-padding-block-start":"x1rqz8me",$$css:!0},containerPaddingBlockEnd:{"--container-padding-block-end":"x1omyuck",$$css:!0},layoutPaddingOuterX:{"--layout-padding-outer-x":"x14rzhog",$$css:!0},layoutPaddingOuterY:{"--layout-padding-outer-y":"xjej9fs",$$css:!0},layoutPaddingInnerX:{"--layout-padding-inner-x":"x4poyjn",$$css:!0},layoutPaddingInnerY:{"--layout-padding-inner-y":"x1u1kw4e",$$css:!0}},AN={containerPaddingInlineStart:{"--container-padding-inline-start":"xrgx2ny",$$css:!0},containerPaddingInlineEnd:{"--container-padding-inline-end":"xyk0j9o",$$css:!0},containerPaddingBlockStart:{"--container-padding-block-start":"x876hks",$$css:!0},containerPaddingBlockEnd:{"--container-padding-block-end":"x1u89lk7",$$css:!0},layoutPaddingOuterX:{"--layout-padding-outer-x":"x12sptzx",$$css:!0},layoutPaddingOuterY:{"--layout-padding-outer-y":"xo78phr",$$css:!0},layoutPaddingInnerX:{"--layout-padding-inner-x":"x1we69p7",$$css:!0},layoutPaddingInnerY:{"--layout-padding-inner-y":"xsdnkbz",$$css:!0}},NN={containerPaddingInlineStart:{"--container-padding-inline-start":"x1tewnwq",$$css:!0},containerPaddingInlineEnd:{"--container-padding-inline-end":"x11h1f2o",$$css:!0},containerPaddingBlockStart:{"--container-padding-block-start":"x1g2kccc",$$css:!0},containerPaddingBlockEnd:{"--container-padding-block-end":"x1gvthzm",$$css:!0},layoutPaddingOuterX:{"--layout-padding-outer-x":"x1hsjncj",$$css:!0},layoutPaddingOuterY:{"--layout-padding-outer-y":"x1pui4bz",$$css:!0},layoutPaddingInnerX:{"--layout-padding-inner-x":"x2so38",$$css:!0},layoutPaddingInnerY:{"--layout-padding-inner-y":"xinu7xd",$$css:!0}},MN={card:zN,section:AN,dialog:NN},RN={spacing0:{"--container-padding-inline-start":"x1gu2k80",$$css:!0},spacing0_5:{"--container-padding-inline-start":"x14ws0sr",$$css:!0},spacing1:{"--container-padding-inline-start":"x1cvlban",$$css:!0},spacing1_5:{"--container-padding-inline-start":"x176g23i",$$css:!0},spacing2:{"--container-padding-inline-start":"x1xlrr2o",$$css:!0},spacing3:{"--container-padding-inline-start":"xfdwxua",$$css:!0},spacing4:{"--container-padding-inline-start":"x1dlhslv",$$css:!0},spacing5:{"--container-padding-inline-start":"x1s81nki",$$css:!0},spacing6:{"--container-padding-inline-start":"x1ep0dkj",$$css:!0},spacing7:{"--container-padding-inline-start":"x157xojc",$$css:!0},spacing8:{"--container-padding-inline-start":"xw1diwv",$$css:!0},spacing9:{"--container-padding-inline-start":"xraca2a",$$css:!0},spacing10:{"--container-padding-inline-start":"xserb3f",$$css:!0},spacing11:{"--container-padding-inline-start":"xziclwo",$$css:!0},spacing12:{"--container-padding-inline-start":"x1iiwihq",$$css:!0}},IN={spacing0:{"--container-padding-inline-end":"x91ghl5",$$css:!0},spacing0_5:{"--container-padding-inline-end":"x1wz3t3y",$$css:!0},spacing1:{"--container-padding-inline-end":"x2oyxnl",$$css:!0},spacing1_5:{"--container-padding-inline-end":"xntetml",$$css:!0},spacing2:{"--container-padding-inline-end":"xcas3b9",$$css:!0},spacing3:{"--container-padding-inline-end":"xu0ipoa",$$css:!0},spacing4:{"--container-padding-inline-end":"xs0pscg",$$css:!0},spacing5:{"--container-padding-inline-end":"xgkj7vj",$$css:!0},spacing6:{"--container-padding-inline-end":"x94cj42",$$css:!0},spacing7:{"--container-padding-inline-end":"x11tj35w",$$css:!0},spacing8:{"--container-padding-inline-end":"x1b9k1pi",$$css:!0},spacing9:{"--container-padding-inline-end":"x19w02kr",$$css:!0},spacing10:{"--container-padding-inline-end":"xx5lg5w",$$css:!0},spacing11:{"--container-padding-inline-end":"x1nmgbqg",$$css:!0},spacing12:{"--container-padding-inline-end":"x1wsfsk2",$$css:!0}},_N={spacing0:{"--container-padding-block-start":"x1i3qcxz",$$css:!0},spacing0_5:{"--container-padding-block-start":"xvdf9ev",$$css:!0},spacing1:{"--container-padding-block-start":"xnsckjb",$$css:!0},spacing1_5:{"--container-padding-block-start":"x1kbx601",$$css:!0},spacing2:{"--container-padding-block-start":"xa8b4fq",$$css:!0},spacing3:{"--container-padding-block-start":"x11k4f5r",$$css:!0},spacing4:{"--container-padding-block-start":"xm01sq8",$$css:!0},spacing5:{"--container-padding-block-start":"xp8wdkl",$$css:!0},spacing6:{"--container-padding-block-start":"x1hmud4d",$$css:!0},spacing7:{"--container-padding-block-start":"x1c00sag",$$css:!0},spacing8:{"--container-padding-block-start":"xfv60at",$$css:!0},spacing9:{"--container-padding-block-start":"x14fzdu7",$$css:!0},spacing10:{"--container-padding-block-start":"x17h9kl7",$$css:!0},spacing11:{"--container-padding-block-start":"x1rdjxae",$$css:!0},spacing12:{"--container-padding-block-start":"xecwdl6",$$css:!0}},ON={spacing0:{"--container-padding-block-end":"xkunwnr",$$css:!0},spacing0_5:{"--container-padding-block-end":"x1cao3zv",$$css:!0},spacing1:{"--container-padding-block-end":"x57a7ii",$$css:!0},spacing1_5:{"--container-padding-block-end":"xv53x8y",$$css:!0},spacing2:{"--container-padding-block-end":"x1lsgcmx",$$css:!0},spacing3:{"--container-padding-block-end":"x1q3ppug",$$css:!0},spacing4:{"--container-padding-block-end":"x4hfsld",$$css:!0},spacing5:{"--container-padding-block-end":"xbib2ws",$$css:!0},spacing6:{"--container-padding-block-end":"x1q8d17g",$$css:!0},spacing7:{"--container-padding-block-end":"x1yqogew",$$css:!0},spacing8:{"--container-padding-block-end":"x8lgq76",$$css:!0},spacing9:{"--container-padding-block-end":"x1f7f9rt",$$css:!0},spacing10:{"--container-padding-block-end":"x15vxphk",$$css:!0},spacing11:{"--container-padding-block-end":"x4bg2x9",$$css:!0},spacing12:{"--container-padding-block-end":"x186mjxr",$$css:!0}},DN={spacing0:{"--layout-padding-outer-x":"xswhm3q",$$css:!0},spacing0_5:{"--layout-padding-outer-x":"xihiwg7",$$css:!0},spacing1:{"--layout-padding-outer-x":"xc96xmq",$$css:!0},spacing1_5:{"--layout-padding-outer-x":"x1u93lgd",$$css:!0},spacing2:{"--layout-padding-outer-x":"x15dxnc0",$$css:!0},spacing3:{"--layout-padding-outer-x":"xadgj3j",$$css:!0},spacing4:{"--layout-padding-outer-x":"x1v56qcf",$$css:!0},spacing5:{"--layout-padding-outer-x":"x1nzs0gl",$$css:!0},spacing6:{"--layout-padding-outer-x":"x1c3n52a",$$css:!0},spacing7:{"--layout-padding-outer-x":"x1gfiokx",$$css:!0},spacing8:{"--layout-padding-outer-x":"x1t3kfz",$$css:!0},spacing9:{"--layout-padding-outer-x":"xzr4qsh",$$css:!0},spacing10:{"--layout-padding-outer-x":"x1jdf5a4",$$css:!0},spacing11:{"--layout-padding-outer-x":"x1hct0t0",$$css:!0},spacing12:{"--layout-padding-outer-x":"x11cyqoe",$$css:!0}},LN={spacing0:{"--layout-padding-outer-y":"x1mzf5mb",$$css:!0},spacing0_5:{"--layout-padding-outer-y":"x1vj96e0",$$css:!0},spacing1:{"--layout-padding-outer-y":"x1gpfxoh",$$css:!0},spacing1_5:{"--layout-padding-outer-y":"xd3dqby",$$css:!0},spacing2:{"--layout-padding-outer-y":"x10pz7y9",$$css:!0},spacing3:{"--layout-padding-outer-y":"x1p6yq3h",$$css:!0},spacing4:{"--layout-padding-outer-y":"xx738ci",$$css:!0},spacing5:{"--layout-padding-outer-y":"x6yxws5",$$css:!0},spacing6:{"--layout-padding-outer-y":"x180vrwl",$$css:!0},spacing7:{"--layout-padding-outer-y":"x1q6rme1",$$css:!0},spacing8:{"--layout-padding-outer-y":"xid7e43",$$css:!0},spacing9:{"--layout-padding-outer-y":"x1t5kicu",$$css:!0},spacing10:{"--layout-padding-outer-y":"x26l4wa",$$css:!0},spacing11:{"--layout-padding-outer-y":"x10zktp0",$$css:!0},spacing12:{"--layout-padding-outer-y":"x1yz3n6a",$$css:!0}},BN={spacing0:{"--layout-padding-inner-x":"xj1bl4l",$$css:!0},spacing0_5:{"--layout-padding-inner-x":"xlriy2h",$$css:!0},spacing1:{"--layout-padding-inner-x":"x6uuyak",$$css:!0},spacing1_5:{"--layout-padding-inner-x":"xd38f90",$$css:!0},spacing2:{"--layout-padding-inner-x":"xxqksqd",$$css:!0},spacing3:{"--layout-padding-inner-x":"x1fyui2f",$$css:!0},spacing4:{"--layout-padding-inner-x":"x1i2ajwi",$$css:!0},spacing5:{"--layout-padding-inner-x":"x1tac27u",$$css:!0},spacing6:{"--layout-padding-inner-x":"x1ntgf3t",$$css:!0},spacing7:{"--layout-padding-inner-x":"xhjd9tl",$$css:!0},spacing8:{"--layout-padding-inner-x":"xn7c84u",$$css:!0},spacing9:{"--layout-padding-inner-x":"xeqkbsz",$$css:!0},spacing10:{"--layout-padding-inner-x":"x1vf4qco",$$css:!0},spacing11:{"--layout-padding-inner-x":"xsmamsf",$$css:!0},spacing12:{"--layout-padding-inner-x":"x2xk2xj",$$css:!0}},qN={spacing0:{"--layout-padding-inner-y":"xwuefyo",$$css:!0},spacing0_5:{"--layout-padding-inner-y":"x180h0y5",$$css:!0},spacing1:{"--layout-padding-inner-y":"xmpug6m",$$css:!0},spacing1_5:{"--layout-padding-inner-y":"x1g8jpzm",$$css:!0},spacing2:{"--layout-padding-inner-y":"x1lksgje",$$css:!0},spacing3:{"--layout-padding-inner-y":"x4j7gld",$$css:!0},spacing4:{"--layout-padding-inner-y":"x1s3ehtl",$$css:!0},spacing5:{"--layout-padding-inner-y":"x1rj5eim",$$css:!0},spacing6:{"--layout-padding-inner-y":"x1ftgg6u",$$css:!0},spacing7:{"--layout-padding-inner-y":"x1ho74vh",$$css:!0},spacing8:{"--layout-padding-inner-y":"xm2cs6f",$$css:!0},spacing9:{"--layout-padding-inner-y":"x1vsq92b",$$css:!0},spacing10:{"--layout-padding-inner-y":"x18gbwmk",$$css:!0},spacing11:{"--layout-padding-inner-y":"x14zymzj",$$css:!0},spacing12:{"--layout-padding-inner-y":"xzfpkx9",$$css:!0}},HN={containerMaxHeight:e=>[{"--container-max-height":e!=null?"x18nyedi":e,$$css:!0},{"--x---container-max-height":e??void 0}]};function l4({padding:e="spacing4",paddingOuterX:t,paddingOuterY:n,paddingInnerX:s,paddingInnerY:r,useThemeDefault:i,maxHeight:a}){const l=t??e,c=n??e,u=s??e,d=r??e,f=a?HN.containerMaxHeight(a):null;if(i){const h=MN[i];return[Bb.container,h.containerPaddingInlineStart,h.containerPaddingInlineEnd,h.containerPaddingBlockStart,h.containerPaddingBlockEnd,h.layoutPaddingOuterX,h.layoutPaddingOuterY,h.layoutPaddingInnerX,h.layoutPaddingInnerY,f]}return[Bb.container,RN[l],IN[l],_N[c],ON[c],DN[l],LN[c],BN[u],qN[d],f]}const g1={card:{"--_card-radius":"x2kkz0m",kaIpWk:"x153u1i6",kVQacm:"x7giv3",kGVxlE:"x1p8z4y0",$$css:!0},withBorder:{kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kVAM5u:"x14i3s5s",kZCmMZ:"xs19ii7",kwRFfy:"x12frdag",kLKAdn:"x1nex4ik",kGO01o:"xbv1mwh",$$css:!0},scrollable:{kVQacm:"xysyzu8",$$css:!0}},PN={default:{kWkggS:"x1de1mus",$$css:!0},transparent:{kWkggS:"xjbqb8w",$$css:!0},muted:{kWkggS:"xwmxj5m",$$css:!0},blue:{kWkggS:"x1o0wnni",$$css:!0},cyan:{kWkggS:"x1rgj867",$$css:!0},gray:{kWkggS:"xspzpui",$$css:!0},green:{kWkggS:"x1sqjeoo",$$css:!0},orange:{kWkggS:"x1e9xt6e",$$css:!0},pink:{kWkggS:"xnpoty2",$$css:!0},purple:{kWkggS:"x16i6n6f",$$css:!0},red:{kWkggS:"x1cibrc5",$$css:!0},teal:{kWkggS:"x1jtji5o",$$css:!0},yellow:{kWkggS:"x1bo7t0x",$$css:!0}},UN={none:{"--_card-elevation":"xw28qpl",$$css:!0},low:{"--_card-elevation":"x1nn8khe",$$css:!0},med:{"--_card-elevation":"x1ovzxg0",$$css:!0},high:{"--_card-elevation":"xnpe7fx",$$css:!0}},FN={sizing:(e,t,n,s)=>[{kzqmXN:e!=null?"x5lhr3w":e,kZKoxP:t!=null?"x16ye13r":t,ks0D6T:n!=null?"xf68679":n,kAzted:s!=null?"x82snj4":s,$$css:!0},{"--x-width":(r=>typeof r=="number"?r+"px":r??void 0)(e),"--x-height":(r=>typeof r=="number"?r+"px":r??void 0)(t),"--x-maxWidth":(r=>typeof r=="number"?r+"px":r??void 0)(n),"--x-minHeight":(r=>typeof r=="number"?r+"px":r??void 0)(s)}]};function lx({width:e,height:t,maxWidth:n,minHeight:s,children:r,padding:i,variant:a="default",elevation:l="none",xstyle:c,className:u,style:d,ref:f,...h}){const p=t!=null&&t!=="auto",m=i==null,b=i??4,y=X5[b];return o.jsx("div",{ref:f,...U(P("card",{variant:a}),B(g1.card,PN[a],UN[l],p&&g1.scrollable,FN.sizing(e??null,t??null,n??null,s??null),...l4(m?{useThemeDefault:"card"}:{paddingInnerX:y,paddingInnerY:y,paddingOuterX:y,paddingOuterY:y}),!m&&b!==4&&zl[b],!m&&b!==4&&Al[b],!m&&b!==4&&Nl[b],!m&&b!==4&&Ml[b],a==="default"&&g1.withBorder,c),u,d),...h,children:r})}lx.displayName="Card";const dd={base:{k1xSpc:"xjp7ctv",kMwMTN:"x1tgivj0",kMv6JI:"x9ynric",$$css:!0},light:{kQNsl9:"x19aimcq",$$css:!0},dark:{kQNsl9:"xntwwlm",$$css:!0},system:{kQNsl9:"x108lcm5",$$css:!0}},Vp=Vh.createContext(!1);Vp.displayName="ThemeNestingContext";const m1=new Set;function GN(e){const t=x.useId();x.useInsertionEffect(()=>{if(e.__built)return;const n=`astryx-theme-${e.name}`;if(m1.has(n))return;p0(`theme-injection:${e.name}`,"Theme",`"${e.name}" is using runtime style injection. For better performance, use the pre-built theme:
77
-
78
- import {${e.name}Theme} from '@astryxdesign/theme-${e.name}/built';
79
- import '@astryxdesign/theme-${e.name}/theme.css';
80
-
81
- For custom themes, run \`npx @astryxdesign/cli theme build <file>\` to generate the built artifacts.`);const{prose:s,component:r}=dT(e);if(!(!s&&!r)){if(s){const i=document.createElement("style");i.setAttribute(Cn("theme-prose"),e.name),i.setAttribute(Cn("id"),t),i.textContent=`@layer reset {
82
- ${s}
83
- }`,document.head.appendChild(i)}if(r){const i=document.createElement("style");i.setAttribute(Cn("theme"),e.name),i.setAttribute(Cn("id"),t),i.textContent=`@layer astryx-theme {
84
- ${r}
85
- }`,document.head.appendChild(i)}return m1.add(n),()=>{const i=document.querySelector(`style[${Cn("theme-prose")}="${e.name}"][${Cn("id")}="${t}"]`),a=document.querySelector(`style[${Cn("theme")}="${e.name}"][${Cn("id")}="${t}"]`);i==null||i.remove(),a==null||a.remove(),m1.delete(n)}}},[e,t])}function VN(e,t,n){ir(()=>{if(!e&&!(typeof document>"u"))return t==="light"||t==="dark"?document.documentElement.setAttribute("data-theme",t):document.documentElement.removeAttribute("data-theme"),document.documentElement.setAttribute(Cn("theme"),n),()=>{document.documentElement.removeAttribute("data-theme"),document.documentElement.removeAttribute(Cn("theme"))}},[e,t,n])}function c4({theme:e,mode:t="system",children:n}){const s=x.use(Vp);JE(e),GN(e),VN(s,t,e.name);const r=t==="dark"?dd.dark:t==="light"?dd.light:dd.system,i=x.useMemo(()=>({theme:e,mode:t}),[e,t]);return o.jsx(Yh,{value:i,children:o.jsx(Vp,{value:!0,children:o.jsx("div",{...B(dd.base,r),"data-astryx-theme":e.name,"data-theme":t==="system"?void 0:t,children:n})})})}c4.displayName="Theme";function u4({mode:e,children:t}){return o.jsx("div",{[Cn("media")]:e,className:"xjp7ctv x1tgivj0",children:t})}u4.displayName="MediaTheme";const d4="--color-syntax-";function WN(e){return d4+e}const KN=Object.keys(m0).map(e=>e.replace(d4,""));function XN(e){const t={};for(const n of KN)t[WN(n)]=e.tokens[n];return t}const f4=x.createContext(null);f4.displayName="SyntaxThemeContext";function h4({theme:e,children:t}){const n=x.useMemo(()=>XN(e),[e]),s=x.useMemo(()=>({theme:e}),[e]);return o.jsx(f4,{value:s,children:o.jsx("div",{style:n,"data-astryx-syntax-theme":e.name,children:t})})}h4.displayName="SyntaxTheme";function x4({type:e,body:t,endContent:n,isAutoHide:s,autoHideDuration:r,isExiting:i=!1,onDismiss:a}){const l=be(),c=x.useRef(null),u=x.useRef(!1),d=x.useRef(r),f=x.useRef(null),h=x.useRef(a);h.current=a;const p=x.useCallback(()=>{!s||u.current||(c.current&&clearTimeout(c.current),f.current=Date.now(),c.current=setTimeout(()=>{h.current("auto")},d.current))},[s]),m=x.useCallback(()=>{if(!(!s||u.current)&&(u.current=!0,c.current&&(clearTimeout(c.current),c.current=null),f.current!=null)){const w=Date.now()-f.current;d.current=Math.max(d.current-w,1e3)}},[s]),b=x.useCallback(()=>{!s||!u.current||(u.current=!1,p())},[s,p]);x.useEffect(()=>(d.current=r,p(),()=>{c.current&&clearTimeout(c.current)}),[r,p]),x.useEffect(()=>{if(s)return window.addEventListener("blur",m),window.addEventListener("focus",b),()=>{window.removeEventListener("blur",m),window.removeEventListener("focus",b)}},[s,m,b]);const y=x.useCallback(()=>{a("manual")},[a]),g=e==="error",{mode:k}=Qh(),v=g||k==="light"?"dark":"light";return o.jsx("div",{role:g?"alert":"status","aria-live":g?"assertive":"polite","aria-atomic":"true",onMouseEnter:m,onMouseLeave:b,onFocusCapture:m,onBlurCapture:b,...U(P("toast",{type:e}),{0:{className:"x1na6nto x1pzlopt x1hviunn x1l2rt3b xxtfdz8 x14hfi27 x1hc1fzr x9ynric xjm74w1 xw6l6zx xnn1q72 x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x1tswlu5 xenstv7"},2:{className:"x1na6nto x1pzlopt x1hviunn x1l2rt3b xxtfdz8 x14hfi27 x1hc1fzr x9ynric xjm74w1 xw6l6zx xnn1q72 x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x1tswlu5 x1l5t2a3"},1:{className:"x1na6nto x1pzlopt x1hviunn x1l2rt3b xxtfdz8 x14hfi27 x9ynric xjm74w1 xw6l6zx x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x1tswlu5 xenstv7 xg01cxk x1lm5u"},3:{className:"x1na6nto x1pzlopt x1hviunn x1l2rt3b xxtfdz8 x14hfi27 x9ynric xjm74w1 xw6l6zx x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x1tswlu5 x1l5t2a3 xg01cxk x1lm5u"}}[!!g<<1|!!i<<0]),children:o.jsx(u4,{mode:v,children:o.jsxs("div",{className:"x78zum5 x1cy8zhl xjcht0a xh8yej3",children:[o.jsx("div",{className:"x98rzlu xeuugli",children:t}),o.jsxs("div",{className:"x2lah0s x78zum5 x6s0dn4 x1txdalj xacfrgf xmequkd",children:[n,o.jsx(re,{variant:"ghost",size:"sm",icon:o.jsx(Ce,{icon:"close",size:"sm",color:"inherit"}),label:l("@astryx.toast.dismiss"),onClick:y,isIconOnly:!0})]})]})})})}x4.displayName="Toast";const cx=x.createContext(null);cx.displayName="ToastContext";const sc={viewport:{kVAEAm:"xixxii4",kY2c9j:"x6cuj84",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kmVPX3:"x1shk3sm",kfzvcC:"x47corl",kpwlN0:"xh3736h",kogj98:"x1ghz6dp",kWkggS:"xjbqb8w",kVQacm:"x1rea2x4",$$css:!0},bottomEnd:{krVfgx:"x1ey2m1c",kt4wiu:"xtijo5x",kGNEyG:"xuk3077",$$css:!0},bottomStart:{krVfgx:"x1ey2m1c",kLqNvP:"x1o0tod",kGNEyG:"x1cy8zhl",$$css:!0},topEnd:{k87sOh:"x13vifvy",kt4wiu:"xtijo5x",kGNEyG:"xuk3077",kXwgrk:"x3ieub6",$$css:!0},topStart:{k87sOh:"x13vifvy",kLqNvP:"x1o0tod",kGNEyG:"x1cy8zhl",kXwgrk:"x3ieub6",$$css:!0}};function Wp(e){if(e==null||typeof e=="boolean")return"";if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(Array.isArray(e))return e.map(Wp).filter(Boolean).join(" ");if(x.isValidElement(e)){const{children:t}=e.props;return Wp(t)}return""}function M0({position:e="bottomEnd",maxVisible:t=5,inset:n,isTopLayer:s=!0,children:r}){const i=be(),[a,l]=x.useState([]),[c,u]=x.useState(new Set),d=x.useRef(a);d.current=a;const f=x.useRef(null),h=x.useRef(new Set),p=x.useRef(null),m=x.useRef(null),b=x.useRef(null),y=x.useCallback(N=>{if(!N)return null;const z=N.querySelectorAll(K3);for(const M of z)if(!(M.getAttribute("tabindex")==="-1"||M.hasAttribute("disabled")||M.getAttribute("aria-disabled")==="true"))return M;return null},[]),g=Dl(),k=x.useCallback(N=>{const{uniqueID:z,collisionBehavior:M="overwrite"}=N.options;if(z&&M==="ignore"&&d.current.some(I=>I.options.uniqueID===z))return;const R=Wp(N.options.body);R&&g(R,N.options.type==="error"?"assertive":"polite"),l(I=>z&&I.find(_=>_.options.uniqueID===z)?I.map(_=>_.options.uniqueID===z?N:_):[...I,N])},[g]),v=x.useCallback((N,z)=>{var _,O;if(h.current.has(N))return;h.current.add(N);const M=d.current.find(D=>D.id===N);M&&((O=(_=M.options).onHide)==null||O.call(_,z));const R=f.current,I=document.activeElement,A=(R==null?void 0:R.querySelector(`[data-toast-id="${N}"]`))??null;if(A&&I instanceof Node&&A.contains(I))if(m.current=N,d.current.filter(L=>L.id!==N).length>0){const L=d.current.findIndex(F=>F.id===N),q=d.current[L+1]??d.current[L-1];b.current=q?q.id:"restore"}else b.current="restore";u(D=>D.has(N)?D:new Set(D).add(N))},[]),w=x.useCallback(N=>{h.current.delete(N),u(z=>{if(!z.has(N))return z;const M=new Set(z);return M.delete(N),M}),l(z=>z.filter(M=>M.id!==N))},[]);x.useLayoutEffect(()=>{const N=m.current,z=b.current;if(N==null||z==null||a.some(I=>I.id===N))return;m.current=null,b.current=null;const M=f.current;if(z!=="restore"&&M){const I=M.querySelector(`[data-toast-id="${z}"]`),A=y(I)??I;if(A){A.focus();return}}const R=p.current;p.current=null,R&&R.isConnected?R.focus():M&&M.focus()},[a,y]);const j=x.useCallback(N=>d.current.find(z=>z.options.uniqueID===N),[]),$=x.useMemo(()=>({addToast:k,removeToast:v,findByUniqueID:j}),[k,v,j]),C=a.slice(-t),E={};n!=null&&n.top&&(E.top=n.top),n!=null&&n.bottom&&(E.bottom=n.bottom),n!=null&&n.start&&(E.insetInlineStart=n.start),n!=null&&n.end&&(E.insetInlineEnd=n.end),x.useEffect(()=>{if(!s)return;const N=f.current;if(N&&typeof N.showPopover=="function")try{N.showPopover()}catch{}},[s]);const T=a.length>0;x.useEffect(()=>{if(!T)return;const N=z=>{if(z.key!=="F6")return;const M=f.current;if(!M)return;const R=document.activeElement;if(R instanceof Node&&M.contains(R))return;z.preventDefault(),R instanceof HTMLElement&&(p.current=R);const I=M.querySelectorAll("[data-toast-id]"),A=I[I.length-1]??null;(y(A)??A??M).focus()};return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[T,y]);const S=e==="topEnd"?sc.topEnd:e==="topStart"?sc.topStart:e==="bottomStart"?sc.bottomStart:sc.bottomEnd;return o.jsxs(cx,{value:$,children:[r,o.jsx("div",{ref:f,role:"region","aria-label":i("@astryx.toast.viewport"),tabIndex:-1,popover:s?"manual":void 0,...U(B(sc.viewport,S),{style:Object.keys(E).length>0?E:void 0}),children:C.map(N=>{const z=N.options,M=z.type??"info",R=z.isAutoHide??M!=="error",I=z.autoHideDuration??5e3,A=c.has(N.id);return o.jsx("div",{"data-toast-id":N.id,...{0:{className:"x67bb7w xrvj5dj x1tu4anv xvmdzux xjshnde xuedmi6 xsagj69 xlr8y92 x1sopeo2 x5rzir7"},1:{className:"x67bb7w xrvj5dj xjshnde xuedmi6 xsagj69 xlr8y92 x1sopeo2 x5rzir7 xihq33y x18d9i69"}}[!!A<<0],onTransitionEnd:A?_=>{_.propertyName==="grid-template-rows"&&w(N.id)}:void 0,children:o.jsx("div",{className:"xb3r6kr",children:o.jsx(x4,{type:M,body:z.body,endContent:z.endContent,isAutoHide:R,autoHideDuration:I,isExiting:A,onDismiss:_=>v(N.id,_)})})},N.id)})})]})}M0.displayName="ToastViewport";const qb='button, [role="button"]';function Hb(e){return e.matches(qb)?e:e.querySelector(qb)}const Gr={contentPadding:{kLKAdn:"x1vlblms",kGO01o:"xvmdzux",kZCmMZ:"x126nfab",kwRFfy:"x1t818jl",$$css:!0},gap:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0},customWidth:e=>[{kzqmXN:(typeof e=="number"?`${e}px`:e)!=null?"x5lhr3w":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(typeof e=="number"?`${e}px`:e)}],matchTrigger:{k7Eaqz:"xrzjruh",$$css:!0}};function p4({children:e,anchorRef:t,content:n,placement:s="below",alignment:r="start",isOpen:i,onOpenChange:a,isEnabled:l=!0,width:c,label:u,role:d="dialog",isModal:f,hasCloseButton:h,closeButtonLabel:p,hasAutoFocus:m,hasLightDismiss:b=!0,hasEscapeDismiss:y=!0,xstyle:g,className:k,style:v,"data-testid":w}){const j=x.useRef(null),$=i!==void 0,C=x.useRef(0),E=x.useCallback(()=>{a==null||a(!0)},[a]),T=x.useCallback(()=>{C.current=Date.now(),a==null||a(!1)},[a]),S=_l({dialogLabel:u,role:d,isModal:f,hasLightDismiss:b,hasEscapeDismiss:y,hasCloseButton:h,closeButtonLabel:p,hasAutoFocus:m,onShow:E,onHide:T}),N=x.useCallback(()=>{l&&(Date.now()-C.current<50||S.toggle())},[l,S]),z=x.useCallback(A=>{(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),N())},[N]),M=x.useCallback(A=>{A.setAttribute("aria-haspopup",S.triggerProps["aria-haspopup"]),A.setAttribute("aria-expanded",String(S.triggerProps["aria-expanded"])),A.setAttribute("aria-controls",S.triggerProps["aria-controls"]),A.addEventListener("click",N);const _=A.tagName!=="BUTTON"&&A.getAttribute("role")==="button";return _&&A.addEventListener("keydown",z),()=>{A.removeAttribute("aria-haspopup"),A.removeAttribute("aria-expanded"),A.removeAttribute("aria-controls"),A.removeEventListener("click",N),_&&A.removeEventListener("keydown",z)}},[S,N,z]);ir(()=>{if(!t)return;const A=t.current;if(!A)return;const _=Hb(A);if(_||pa(),!_)return;S.triggerRef(A);const O=M(_);return()=>{S.triggerRef(null),O()}},[t,S,M]),ir(()=>{if(t||typeof e=="function")return;const A=j.current;if(!A)return;S.triggerRef(A);const _=Hb(A);if(_||pa(),!_)return;const O=M(_);return()=>{S.triggerRef(null),O()}},[t,S,M]),ir(()=>{$&&(i&&!S.isOpen?S.show():!i&&S.isOpen&&S.hide())},[i,$,S]);const R=c?Gr.customWidth(c):Gr.matchTrigger;if(t&&e==null)return o.jsx(o.Fragment,{children:S.render(o.jsx("div",{"data-testid":w,...U(P("popover"),B(Gr.contentPadding,g),k,v),children:n}),{placement:s,alignment:r,xstyle:[R,Gr.gap,rr[s]]})});if(typeof e=="function"){const A={ref:S.triggerRef,onClick:N,"aria-haspopup":"dialog","aria-expanded":S.isOpen,"aria-controls":S.id};return o.jsxs(o.Fragment,{children:[e(A),S.render(o.jsx("div",{"data-testid":w,...U(P("popover"),B(Gr.contentPadding,g),k,v),children:n}),{placement:s,alignment:r,xstyle:[R,Gr.gap,rr[s]]})]})}return o.jsxs(o.Fragment,{children:[o.jsx(A0,{value:"button",children:o.jsx("div",{ref:j,className:"x3nfvp2",children:e})}),S.render(o.jsx("div",{"data-testid":w,...U(P("popover"),B(Gr.contentPadding,g),k,v),children:n}),{placement:s,alignment:r,xstyle:[R,Gr.gap,rr[s]]})]})}p4.displayName="Popover";const y1={container:{kWkggS:"x10xzikg","--_hovercard-radius":"xqwz7mz",kaIpWk:"x7a53xk",kGVxlE:"x14hfi27",$$css:!0},marginBlock:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",keTefX:"x1lziwak",k71WvV:"x14z9mp",$$css:!0},marginInline:{keoZOQ:"xdj266r",k1K539:"xat24cr",keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0}};function ZN(e){return e.hasAttribute("tabindex")?e.tabIndex>=0:["A","BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)?!e.disabled:!!e.isContentEditable}function YN(e={}){const{placement:t="above",alignment:n="center",delay:s=300,hideDelay:r=200,focusTrigger:i="auto",isEnabled:a=!0,label:l,isOpen:c,isDefaultOpen:u=!1,onShow:d,onHide:f}=e,h=t==="above"||t==="below"?y1.marginBlock:y1.marginInline,p=Rl({mode:"context",onShow:d,onHide:f}),m=x.useMemo(()=>[y1.container,h],[h]),b=x.useRef(null),y=x.useRef(null),g=x.useRef(null),k=x.useRef(!1),v=x.useRef(!1),w=x.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),y.current&&(clearTimeout(y.current),y.current=null)},[]),j=x.useCallback(()=>{!a||c===!1||(w(),b.current=setTimeout(()=>{p.show()},s))},[a,c,w,p,s]),$=x.useCallback(()=>{c!==!0&&(w(),y.current=setTimeout(()=>{k.current||p.hide()},r))},[c,w,p,r]),C=x.useCallback(()=>{j()},[j]),E=x.useCallback(()=>{$()},[$]),T=x.useCallback(()=>{if(a){if(v.current){v.current=!1;return}w(),p.show()}},[a,w,p]),S=x.useCallback(I=>{const A=I.relatedTarget,_=document.getElementById(p.id);_!=null&&_.contains(A)||$()},[p.id,$]),N=x.useCallback(I=>{I.key==="Escape"&&(I.stopPropagation(),w(),p.hide())},[w,p]),z=x.useCallback(I=>{g.current&&(g.current.removeEventListener("mouseenter",C),g.current.removeEventListener("mouseleave",E),g.current.removeEventListener("focusin",T),g.current.removeEventListener("focusout",S),g.current.removeEventListener("keydown",N)),I&&(I.addEventListener("mouseenter",C),I.addEventListener("mouseleave",E),(i==="always"||i==="auto"&&ZN(I))&&(I.addEventListener("focusin",T),I.addEventListener("focusout",S)),I.addEventListener("keydown",N)),g.current=I},[i,C,E,T,S,N]),M=x.useCallback(I=>{p.ref(I),z(I)},[p,z]);x.useEffect(()=>()=>{w()},[w]),x.useEffect(()=>{u&&p.show()},[]),x.useEffect(()=>{c!==void 0&&(c?(w(),p.show()):(w(),p.hide()))},[c,w,p]);const R=x.useCallback((I,A)=>{const _=(A==null?void 0:A.placement)??t,O=P("hovercard").className,D={placement:_,alignment:(A==null?void 0:A.alignment)??n,role:l?"dialog":"group","aria-label":l||void 0,xstyle:[m,rr[_],A==null?void 0:A.xstyle],className:A!=null&&A.className?`${O} ${A.className}`:O,style:A==null?void 0:A.style,as:"span"};return p.render(o.jsx("span",{className:"x1lliihq x1vlblms xvmdzux x126nfab x1t818jl",onMouseEnter:()=>{k.current=!0,w()},onMouseLeave:()=>{k.current=!1,$()},onKeyDown:L=>{var q;L.key==="Escape"&&(L.stopPropagation(),v.current=!0,w(),p.hide(),(q=g.current)==null||q.focus())},onBlur:L=>{var X;const q=L.relatedTarget;L.currentTarget.contains(q)||(X=g.current)!=null&&X.contains(q)||$()},children:I}),D)},[p,t,n,l,w,$,m]);return{ref:M,positionRef:p.ref,interactionRef:z,anchorId:p.anchorId,describedBy:p.id,renderHoverCard:R,show:p.show,hide:p.hide}}function QN(e){return typeof e=="string"||typeof e=="number"}function JN(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function g4({children:e,content:t,placement:n="above",alignment:s="center",delay:r=300,hideDelay:i=200,focusTrigger:a="auto",isEnabled:l=!0,label:c,onOpenChange:u,hasHoverIndication:d="auto",isOpen:f,isDefaultOpen:h,xstyle:p,className:m,style:b}){const y=x.useRef(null),g=QN(e),k=d===!0||d==="auto"&&g,v=x.useCallback(()=>{u==null||u(!0)},[u]),w=x.useCallback(()=>{u==null||u(!1)},[u]),j=YN({placement:n,alignment:s,delay:r,hideDelay:i,focusTrigger:a,isEnabled:l,label:c,isOpen:f,isDefaultOpen:h,onShow:v,onHide:w});ir(()=>{if(g)return;const C=y.current;if(!C)return;const E=C.firstElementChild;if(!E)return;j.ref(E);const T=E.getAttribute("aria-describedby");return E.setAttribute("aria-describedby",JN(T,j.describedBy)??""),()=>{j.ref(null),T?E.setAttribute("aria-describedby",T):E.removeAttribute("aria-describedby")}},[g,j.ref,j.describedBy]);const $=j.renderHoverCard(t,{xstyle:p,className:m,style:b});return g?o.jsxs(o.Fragment,{children:[o.jsx("span",{ref:j.ref,tabIndex:0,"aria-describedby":j.describedBy,...{0:{className:"xt0psk2"},1:{className:"xt0psk2 xujl8zx xev0dqp xycaml9 x11b3rvo"}}[!!k<<0],children:e}),$]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{ref:y,className:"xjp7ctv",children:e}),$]})}g4.displayName="HoverCard";const Pb=new Map,eM=/\b(const|let|var|function|class|if|else|for|while|return|import|export|from|default|async|await|try|catch|throw|new|typeof|instanceof|interface|type|enum|extends|implements|switch|case|break|continue|do|in|of|void|null|undefined|true|false|this|super|yield|delete|static|public|private|protected|readonly|abstract|as|is|keyof|declare|module|namespace|require)\b/,tM=/\b(def|class|if|elif|else|for|while|return|import|from|as|with|try|except|raise|True|False|None|and|or|not|in|is|lambda|yield|async|await|pass|break|continue|del|global|nonlocal|assert|finally|print|self|cls)\b/,nM=/\b(if|then|else|elif|fi|for|do|done|while|until|case|esac|function|in|select|return|exit|local|export|source|alias|unalias|readonly|shift|eval|exec|set|unset|trap|wait|read|echo|printf|test|true|false)\b/,sM=/\b(important|inherit|initial|unset|revert|auto|none)\b/,rM=/\b(function|class|if|else|elseif|for|foreach|while|return|echo|public|private|protected|static|new|try|catch|throw|namespace|use|require|require_once|include|include_once|extends|implements|interface|abstract|final|const|var|true|false|null|array|isset|unset|empty|list|match|enum|switch|case|break|continue|do|yield|fn)\b/,iM=/\b(function|class|if|else|for|foreach|while|return|echo|public|private|protected|static|new|try|catch|throw|namespace|use|require|include|extends|implements|interface|abstract|final|const|shape|vec|dict|keyset|async|await|concurrent|enum|type|newtype|tuple|inout)\b/;function m4(e){const t=Pb.get(e);if(t!==void 0)return t;const n=aM(e);return Pb.set(e,n),n}function aM(e){const t=oM(e);return t?{defaultType:t.defaultType,patterns:t.patterns.map(n=>{const s=n.regex.flags.replace(/[gy]/g,"")+"y";return{...n,anchored:new RegExp(n.regex.source,s)}})}:null}function oM(e){switch(e){case"typescript":case"javascript":case"tsx":case"jsx":case"ts":case"js":return{defaultType:"variable",patterns:[{type:"comment",regex:/\/\*[\s\S]*?\*\//},{type:"comment",regex:/\/\/[^\n]*/},{type:"string",regex:/`(?:[^`\\]|\\.)*`/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"constant",regex:/@[\w]+/},{type:"number",regex:/\b0[xX][0-9a-fA-F_]+\b/},{type:"number",regex:/\b0[bB][01_]+\b/},{type:"number",regex:/\b0[oO][0-7_]+\b/},{type:"number",regex:/\b\d[\d_]*\.?[\d_]*(?:[eE][+-]?\d+)?\b/},{type:"keyword",regex:eM},{type:"function",regex:/\b[a-zA-Z_$][\w$]*(?=\s*\()/},{type:"type",regex:/\b[A-Z][a-zA-Z0-9_]*\b/},{type:"operator",regex:/[+\-*/%=!<>&|^~?:]+/},{type:"punctuation",regex:/[{}()\[\];,.]/},{type:"variable",regex:/\b[a-zA-Z_$][\w$]*\b/}]};case"json":return{defaultType:"punctuation",patterns:[{type:"property",regex:/"(?:[^"\\]|\\.)*"(?=\s*:)/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"number",regex:/-?\b\d+\.?\d*(?:[eE][+-]?\d+)?\b/},{type:"constant",regex:/\b(true|false|null)\b/},{type:"punctuation",regex:/[{}()\[\]:,]/}]};case"html":case"xml":case"svg":return{defaultType:"variable",patterns:[{type:"comment",regex:/<!--[\s\S]*?-->/},{type:"keyword",regex:/<!DOCTYPE[^>]*>/i},{type:"tag",regex:/<\/[a-zA-Z][\w-]*\s*>/},{type:"tag",regex:/<[a-zA-Z][\w-]*/},{type:"tag",regex:/\/?>/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"attribute",regex:/\b[a-zA-Z_:][\w:.-]*(?=\s*=)/},{type:"operator",regex:/=/}]};case"css":case"scss":case"less":return{defaultType:"variable",patterns:[{type:"comment",regex:/\/\*[\s\S]*?\*\//},{type:"comment",regex:/\/\/[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"variable",regex:/--[a-zA-Z_-][\w-]*/},{type:"number",regex:/-?\b\d+\.?\d*(?:px|em|rem|%|vh|vw|vmin|vmax|ch|ex|deg|rad|turn|s|ms|fr)?\b/},{type:"constant",regex:/#[0-9a-fA-F]{3,8}\b/},{type:"keyword",regex:sM},{type:"keyword",regex:/@[a-zA-Z][\w-]*/},{type:"tag",regex:/[.#][a-zA-Z_-][\w-]*/},{type:"keyword",regex:/::?[a-zA-Z][\w-]*/},{type:"function",regex:/\b[a-zA-Z_-][\w-]*(?=\s*\()/},{type:"property",regex:/[a-zA-Z_-][\w-]*(?=\s*:)/},{type:"punctuation",regex:/[{}()\[\];:,]/},{type:"operator",regex:/[+~>*=|^$]/}]};case"python":case"py":return{defaultType:"variable",patterns:[{type:"string",regex:/"""[\s\S]*?"""/},{type:"string",regex:/'''[\s\S]*?'''/},{type:"string",regex:/f"(?:[^"\\]|\\.)*"/},{type:"string",regex:/f'(?:[^'\\]|\\.)*'/},{type:"comment",regex:/#[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"constant",regex:/@[\w.]+/},{type:"number",regex:/\b0[xX][0-9a-fA-F_]+\b/},{type:"number",regex:/\b0[bB][01_]+\b/},{type:"number",regex:/\b0[oO][0-7_]+\b/},{type:"number",regex:/\b\d[\d_]*\.?[\d_]*(?:[eE][+-]?\d+)?j?\b/},{type:"keyword",regex:tM},{type:"function",regex:/\b[a-zA-Z_][\w]*(?=\s*\()/},{type:"type",regex:/\b[A-Z][a-zA-Z0-9_]*\b/},{type:"operator",regex:/[+\-*/%=!<>&|^~@:]+/},{type:"punctuation",regex:/[{}()\[\];,.]/},{type:"variable",regex:/\b[a-zA-Z_][\w]*\b/}]};case"bash":case"sh":case"zsh":case"shell":return{defaultType:"variable",patterns:[{type:"comment",regex:/#[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'[^']*'/},{type:"variable",regex:/\$\{[^}]+\}/},{type:"variable",regex:/\$[a-zA-Z_][\w]*/},{type:"variable",regex:/\$[0-9@#?*!$-]/},{type:"number",regex:/\b\d+\b/},{type:"keyword",regex:nM},{type:"function",regex:/\b[a-zA-Z_][\w]*(?=\s*\()/},{type:"operator",regex:/[|&<>;!]+/},{type:"punctuation",regex:/[{}()\[\]]/}]};case"php":return{defaultType:"variable",patterns:[{type:"comment",regex:/\/\*[\s\S]*?\*\//},{type:"comment",regex:/\/\/[^\n]*/},{type:"comment",regex:/#[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"variable",regex:/\$[a-zA-Z_][\w]*/},{type:"number",regex:/\b0[xX][0-9a-fA-F]+\b/},{type:"number",regex:/\b\d+\.?\d*(?:[eE][+-]?\d+)?\b/},{type:"keyword",regex:rM},{type:"function",regex:/\b[a-zA-Z_][\w]*(?=\s*\()/},{type:"type",regex:/\b[A-Z][a-zA-Z0-9_]*\b/},{type:"operator",regex:/[+\-*/%=!<>&|^~?:.]+/},{type:"constant",regex:/@[\w]+/},{type:"punctuation",regex:/[{}()\[\];,.]/}]};case"hack":return{defaultType:"variable",patterns:[{type:"comment",regex:/\/\*[\s\S]*?\*\//},{type:"comment",regex:/\/\/[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"variable",regex:/\$[a-zA-Z_][\w]*/},{type:"number",regex:/\b0[xX][0-9a-fA-F]+\b/},{type:"number",regex:/\b\d+\.?\d*(?:[eE][+-]?\d+)?\b/},{type:"keyword",regex:iM},{type:"type",regex:/\b[A-Z][a-zA-Z0-9_]*\b/},{type:"function",regex:/\b[a-zA-Z_][\w]*(?=\s*\()/},{type:"property",regex:new RegExp("(?<=->|::)\\b[a-zA-Z_][\\w]*\\b")},{type:"operator",regex:/[+\-*/%=!<>&|^~?:.]+/},{type:"constant",regex:/<<[\w]+/},{type:"punctuation",regex:/[{}()\[\];,.]/}]};case"yaml":case"yml":return{defaultType:"variable",patterns:[{type:"comment",regex:/#[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"constant",regex:/\b(true|false|yes|no|on|off|null|~)\b/i},{type:"variable",regex:/[&*][\w]+/},{type:"type",regex:/!!\w+/},{type:"number",regex:/\b-?\d+\.?\d*(?:[eE][+-]?\d+)?\b/},{type:"property",regex:/^[ \t]*[\w][\w ./-]*(?=\s*:)/m},{type:"keyword",regex:/---/},{type:"keyword",regex:/\.\.\./},{type:"operator",regex:/[:|>\-?]/},{type:"punctuation",regex:/[{}()\[\],]/},{type:"variable",regex:/\b[a-zA-Z_][\w]*\b/}]};case"markdown":case"md":return{defaultType:"variable",patterns:[{type:"keyword",regex:/^```[\w]*$/m},{type:"keyword",regex:/^#{1,6}\s+.*/m},{type:"keyword",regex:/^---$/m},{type:"keyword",regex:/^\*\*\*$/m},{type:"string",regex:/\*\*(?:[^*]|\*(?!\*))+\*\*/},{type:"string",regex:/\*(?:[^*])+\*/},{type:"constant",regex:/`[^`]+`/},{type:"function",regex:/\[(?:[^\]])+\]\([^)]+\)/},{type:"comment",regex:/^>\s+.*/m},{type:"operator",regex:/^\s*[-*+]\s/m},{type:"number",regex:/^\s*\d+\.\s/m}]};default:return null}}const Ub=2e3,lM=800;async function cM(){return typeof scheduler<"u"&&typeof scheduler.yield=="function"?scheduler.yield():new Promise(e=>setTimeout(e,0))}function y4(e,t,n,s){const r=[];let i=n;const a=Math.min(s,e.length);for(;i<a;){let l=!1;for(const c of t.patterns){c.anchored.lastIndex=i;const u=c.anchored.exec(e);if(u&&u.index===i&&u[0].length>0){c.type!==t.defaultType&&r.push({type:c.type,start:i-n,end:i-n+u[0].length}),i+=u[0].length,l=!0;break}}l||i++}return r}function uM(e,t){const n=m4(t);if(!n)return[];const s=[];let r=0;for(let i=0;i<=e.length;i++)(i===e.length||e[i]===`
86
- `)&&(s.push(y4(e,n,r,i)),r=i+1);return s}async function dM(e,t,n){const s=m4(t);if(!s)return[];const r=[];let i=0,a=0;for(let l=0;l<=e.length;l++)if((l===e.length||e[l]===`
87
- `)&&(r.push(y4(e,s,i,l)),a+=l-i+1,i=l+1,a>=lM&&l<e.length)){if(n!=null&&n.aborted)return r;a=0,await cM()}return r}function fM(e,t){const n=[0];for(let i=0;i<t.length;i++)t[i]===`
88
- `&&n.push(i+1);const s=Array.from({length:n.length},()=>[]);let r=0;for(const i of e){for(;r<n.length-1&&i.start>=n[r+1];)r++;const a=n[r];s[r].push({type:i.type,start:i.start-a,end:i.end-a})}return s}const hM=`:root {
89
- ${Object.entries(m0).map(([e,t])=>` ${e}: ${t};`).join(`
90
- `)}
91
- }`,xM=`
92
- ${hM}
93
-
94
- .astryx-codeblock code::highlight(astryx-keyword),
95
- .astryx-codeeditor code::highlight(astryx-keyword) { color: var(--color-syntax-keyword); }
96
- .astryx-codeblock code::highlight(astryx-string),
97
- .astryx-codeeditor code::highlight(astryx-string) { color: var(--color-syntax-string); }
98
- .astryx-codeblock code::highlight(astryx-comment),
99
- .astryx-codeeditor code::highlight(astryx-comment) { color: var(--color-syntax-comment); }
100
- .astryx-codeblock code::highlight(astryx-number),
101
- .astryx-codeeditor code::highlight(astryx-number) { color: var(--color-syntax-number); }
102
- .astryx-codeblock code::highlight(astryx-function),
103
- .astryx-codeeditor code::highlight(astryx-function) { color: var(--color-syntax-function); }
104
- .astryx-codeblock code::highlight(astryx-type),
105
- .astryx-codeeditor code::highlight(astryx-type) { color: var(--color-syntax-type); }
106
- .astryx-codeblock code::highlight(astryx-tag),
107
- .astryx-codeeditor code::highlight(astryx-tag) { color: var(--color-syntax-tag); }
108
- .astryx-codeblock code::highlight(astryx-attribute),
109
- .astryx-codeeditor code::highlight(astryx-attribute) { color: var(--color-syntax-attribute); }
110
- .astryx-codeblock code::highlight(astryx-property),
111
- .astryx-codeeditor code::highlight(astryx-property) { color: var(--color-syntax-property); }
112
- .astryx-codeblock code::highlight(astryx-operator),
113
- .astryx-codeeditor code::highlight(astryx-operator) { color: var(--color-syntax-operator); }
114
- .astryx-codeblock code::highlight(astryx-constant),
115
- .astryx-codeeditor code::highlight(astryx-constant) { color: var(--color-syntax-constant); }
116
- .astryx-codeblock code::highlight(astryx-punctuation),
117
- .astryx-codeeditor code::highlight(astryx-punctuation) { color: var(--color-syntax-punctuation); }
118
- .astryx-codeblock code::highlight(astryx-variable),
119
- .astryx-codeeditor code::highlight(astryx-variable) { color: var(--color-syntax-variable); }
120
-
121
- /* Span-based fallback classes — used when highlightMode='spans' or
122
- when the CSS Custom Highlight API is not available. */
123
- .astryx-token-keyword { color: var(--color-syntax-keyword); }
124
- .astryx-token-string { color: var(--color-syntax-string); }
125
- .astryx-token-comment { color: var(--color-syntax-comment); }
126
- .astryx-token-number { color: var(--color-syntax-number); }
127
- .astryx-token-function { color: var(--color-syntax-function); }
128
- .astryx-token-type { color: var(--color-syntax-type); }
129
- .astryx-token-tag { color: var(--color-syntax-tag); }
130
- .astryx-token-attribute { color: var(--color-syntax-attribute); }
131
- .astryx-token-property { color: var(--color-syntax-property); }
132
- .astryx-token-operator { color: var(--color-syntax-operator); }
133
- .astryx-token-constant { color: var(--color-syntax-constant); }
134
- .astryx-token-punctuation { color: var(--color-syntax-punctuation); }
135
- .astryx-token-variable { color: var(--color-syntax-variable); }
136
- `;let Fb=!1;function ux(){if(Fb||typeof document>"u")return;const e=document.createElement("style");e.setAttribute("data-astryx-highlight-styles",""),e.textContent=xM,document.head.appendChild(e),Fb=!0}const pM=["keyword","string","comment","number","function","type","tag","attribute","property","operator","constant","punctuation","variable"],Gb=new Set(pM);let fd=null;function gM(e){if(Gb.has(e)||(Gb.add(e),ux(),typeof document>"u"))return;if(!fd){const s=document.createElement("style");if(s.setAttribute("data-astryx-highlight-dynamic",""),document.head.appendChild(s),fd=s.sheet??null,!fd)return}const t=`astryx-${e}`,n=`var(--color-syntax-${e}, currentColor)`;fd.insertRule(`.astryx-codeblock code::highlight(${t}), .astryx-codeeditor code::highlight(${t}) { color: ${n}; }`)}function mM(){const e=new Map;return t=>{let n=e.get(t);if(n)return n;gM(t);const s=`astryx-${t}`;return n=CSS.highlights.get(s),n||(n=new Highlight,CSS.highlights.set(s,n)),e.set(t,n),n}}function k4(e,t,n,s){if(t.length===0)return;const r=e.firstChild;if(!r||r.nodeType!==Node.TEXT_NODE)return;const i=r.length;for(const a of t){if(a.start>=i||a.end<=0)continue;const l=Math.min(a.start,i),c=Math.min(a.end,i),u=s(a.type);try{const d=new Range;d.setStart(r,l),d.setEnd(r,c),u.add(d),n.push({range:d,highlight:u})}catch{}}}function k1(e){for(const{range:t,highlight:n}of e)n.delete(t)}function yM(e,t,n,s){const r=[],i=e.querySelectorAll("[data-line]");for(let a=0;a<i.length;a++){const l=n+a,c=t[l];c&&c.length>0&&k4(i[a],c,r,s)}return r}function kM(e,t){ux();const n=mM(),s=[],r=[];let i=0;for(let d=0;d<e.children.length;d++){const f=e.children[d],h=f.querySelectorAll("[data-line]");h.length>0&&f.tagName==="DIV"&&!f.hasAttribute("data-line")&&(s.push(f),r.push(i),i+=h.length)}if(s.length===0){const d=[],f=e.querySelectorAll("[data-line]");for(let h=0;h<f.length;h++){const p=t[h];p&&p.length>0&&k4(f[h],p,d,n)}return()=>k1(d)}const a=new Map,l=new Map;function c(d,f){if(a.has(d))return;const h=yM(d,t,r[f],n);a.set(d,h)}function u(d){const f=a.get(d);f&&(k1(f),a.delete(d))}for(let d=0;d<s.length;d++){const f=s[d],h=m=>{m.skipped?u(f):c(f,d)};f.addEventListener("contentvisibilityautostatechange",h),l.set(f,h);const p=f;typeof p.checkVisibility=="function"?p.checkVisibility({checkVisibilityCSS:!0,contentVisibilityAuto:!0})&&c(f,d):d<5&&c(f,d)}return function(){for(const[f,h]of l)f.removeEventListener("contentvisibilityautostatechange",h);l.clear();for(const f of a.values())k1(f);a.clear()}}const bM={card:{kaIpWk:"xh6dtrn",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kVAM5u:"x14i3s5s",$$css:!0},section:{kaIpWk:"x2u8bby",kMzoRj:"xc342km",ksu8eU:"xng3xce",kVAM5u:"x9r1u3d","--color-syntax-background":"x1mtvhk1",$$css:!0}},vM={"--_codeblock-gutter-width":"xtk08jq",$$css:!0},R0={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,k7Eaqz:(e==="fit-content"?"min(100%, 400px)":null)!=null?"xkj4a21":e==="fit-content"?"min(100%, 400px)":null,ks0D6T:(e==="fit-content"?"100%":null)!=null?"xf68679":e==="fit-content"?"100%":null,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e),"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e==="fit-content"?"min(100%, 400px)":null),"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e==="fit-content"?"100%":null)}],gutterWidth:e=>[vM,{"--x---_codeblock-gutter-width":`${e}ch`!=null?`${e}ch`:void 0}]},Er={root:{kVAEAm:"x1n2onr6",kHBbk8:"xc8icb0",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kogj98:"x1ghz6dp",kWkggS:"xzyc27v",kVQacm:"xb3r6kr",$$css:!0},code:{k1xSpc:"x1lliihq",kUk6DE:"x98rzlu",k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",kogj98:"x1ghz6dp",kMv6JI:"x9m5x89",kMwMTN:"xdfisg",kKi2Bq:"xeq4nuv",khDVqt:"x1sdyfia",kTgw9:"x1lldw8n",kHjlTd:"x1h4wwuj",$$css:!0},codeWrapped:{khDVqt:"x126k92a",kTgw9:"x1yn0g08",kHjlTd:"x1mzt3pk",$$css:!0},codeNumbered:{kVAEAm:"x1n2onr6",k5JduY:"x1s928wv",kwXMNM:"x1j6awrg",kSy8m5:"xd54j2p",kc1e00:"x1km86hw",kkgrvl:"xkj6t0a",kQlJh0:"x1p96cux",k6vLHU:"xvsnedh",kkQ525:"xnnzo76",kloYau:"x2q1x1w",$$css:!0},sizeSm:{kGuDYH:"x141an7d",$$css:!0},sizeMd:{kGuDYH:"xp03k98",$$css:!0}},wM=20,jM=100,Vb=x.memo(function({lines:t,startIndex:n,highlightSet:s,renderLineContent:r,lineNumbers:i}){return o.jsx(o.Fragment,{children:t.map((a,l)=>{const c=n+l;return o.jsx("div",{"data-line":c+1,...{0:{className:"x17iicif"},2:{className:"x17iicif xrvj5dj x1xx4m37 xf5zn4v x46gnpd x17gn2l9 x19ds33d x1wnbjh8 xtkarl4 x1rbqspl x3nzp0f"},1:{className:"x17iicif xgcxg3y x1ng9b9t x1pzlopt"},3:{className:"x17iicif xrvj5dj x1xx4m37 xf5zn4v x46gnpd x17gn2l9 x19ds33d x1wnbjh8 xtkarl4 x1rbqspl x3nzp0f xgcxg3y x1ng9b9t x1pzlopt"}}[!!i<<1|!!((s==null?void 0:s.has(c+1))??!1)<<0],children:r(a,c)},c)})})});function b4(e,t,n,s,r=wM){if(r=Math.max(1,Math.floor(r)),e.length<jM)return o.jsx(Vb,{lines:e,startIndex:0,highlightSet:t,renderLineContent:n,lineNumbers:s});const i=[];for(let a=0;a<e.length;a+=r){const l=Math.min(a+r,e.length),c=e.slice(a,l),u=`${c.length}lh`;i.push(o.jsx("div",{...U({className:"xb5mbof"},{style:{containIntrinsicBlockSize:`auto ${u}`}}),children:o.jsx(Vb,{lines:c,startIndex:a,highlightSet:t,renderLineContent:n,lineNumbers:s})},a))}return i}function v4(){return typeof CSS<"u"&&"highlights"in CSS&&typeof Highlight<"u"}function SM(){if(typeof navigator>"u")return!1;const e=navigator.userAgent;return e.includes("AppleWebKit")&&!e.includes("Chrome")}function $M(e,t,n){const[s,r]=x.useState(null),i=x.useMemo(()=>n?fM(n(e,t),e):e.length>=Ub?null:uM(e,t),[e,t,n]);return x.useEffect(()=>{if(e.length<Ub||n)return;const a=new AbortController;async function l(){try{const c=await dM(e,t,a.signal);a.signal.aborted||r({code:e,language:t,tokens:c})}catch{a.signal.aborted||r({code:e,language:t,tokens:[]})}}return l(),()=>{a.abort()}},[e,t,n]),i??((s==null?void 0:s.code)===e&&s.language===t?s.tokens:[])}function CM(e,t){if(t.length===0)return e||"​";const n=[];let s=0;for(const r of t){r.start>s&&n.push(e.slice(s,r.start));const i=Math.min(r.end,e.length);n.push(o.jsx("span",{className:`astryx-token-${r.type} xds-token-${r.type}`,children:e.slice(r.start,i)},`${r.start}-${r.type}`)),s=i}return s<e.length&&n.push(e.slice(s)),n.length>0?n:"​"}function EM({lines:e,tokenLines:t,highlightSet:n,isWrapped:s,sizeStyle:r,hasLineNumbers:i,maxDigits:a}){x.useInsertionEffect(()=>{ux()},[]);const l=x.useCallback((c,u)=>{const d=t[u]??[];return o.jsx("span",{className:"xeuugli",children:CM(c,d)})},[t]);return o.jsx("code",{...B(Er.code,r,s&&Er.codeWrapped,i&&Er.codeNumbered,i&&R0.gutterWidth(a)),children:b4(e,n,l,i)})}function TM({lines:e,tokenLines:t,highlightSet:n,isWrapped:s,sizeStyle:r,hasLineNumbers:i,maxDigits:a}){const l=x.useRef(null);x.useEffect(()=>{if(!v4())return;ux();const u=l.current;if(!(!u||t.length===0))return kM(u,t)},[t]);const c=x.useCallback(u=>u||"​",[]);return o.jsx("code",{ref:l,...B(Er.code,r,s&&Er.codeWrapped,i&&Er.codeNumbered,i&&R0.gutterWidth(a)),children:b4(e,n,c,i)})}function I0({code:e,language:t="plaintext",title:n,hasLanguageLabel:s=!0,hasLineNumbers:r=!1,highlightLines:i,hasCopyButton:a=!0,onCopy:l,isWrapped:c=!1,maxHeight:u,isCollapsible:d=!1,collapsibleThreshold:f=10,size:h="md",width:p="fit-content",container:m="card",tokenizer:b,highlightMode:y="auto",syntaxTheme:g,xstyle:k,className:v,style:w,ref:j,...$}){const C=be(),[E,T]=x.useState(!1),S=x.useRef(null),N=Dl();x.useEffect(()=>()=>{S.current!=null&&clearTimeout(S.current)},[]);const z=y==="spans"||y==="auto"&&!v4()||y==="auto"&&SM(),M=x.useMemo(()=>{const ge=e.split(`
137
- `);return ge.length>1&&ge[ge.length-1]===""&&ge.pop(),ge},[e]),R=$M(e,t,b),I=x.useMemo(()=>i?new Set(i):null,[i]),A=x.useCallback(async()=>{try{await navigator.clipboard.writeText(e),T(!0),N(C("@astryx.codeBlock.copied")),l==null||l(),S.current!=null&&clearTimeout(S.current),S.current=setTimeout(()=>{S.current=null,T(!1)},2e3)}catch{}},[e,l,N,C]),_=h==="sm"?Er.sizeSm:Er.sizeMd,O=String(M.length).length,D=s&&t!=="plaintext"?t:null,L=n!=null||D!=null,q=d&&M.length>=f,[F,X]=x.useState(!1),Y=x.useId(),Z=x.useRef(null),ne=u?{maxHeight:typeof u=="number"?`${u}px`:u}:void 0,J=o.jsx(Ce,{icon:E?"check":"copy",size:"sm",color:"inherit"}),K=a?o.jsx("button",{type:"button",onClick:ge=>{ge.stopPropagation(),A()},"aria-label":C(E?"@astryx.codeBlock.copied":"@astryx.codeBlock.copyCode"),...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x9epnlk x3kzqx6 xx3sua9 xjbqb8w xe9uy6x x1mjzq1q x1ypdohk x14ju556"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x9epnlk x3kzqx6 xx3sua9 xjbqb8w xe9uy6x x1mjzq1q x1ypdohk x14ju556 x10l6tqk xctzyg x72tfeb"}}[!L<<0],children:J}):null,ie=L?o.jsxs("div",{...{0:{className:"x78zum5 x6s0dn4 x1qughib x1pzlopt xzyc27v x7wzq59 x13vifvy x1vjfegm xce4md1"},1:{className:"x78zum5 x6s0dn4 x1qughib x1pzlopt xzyc27v x7wzq59 x13vifvy x1vjfegm xce4md1 x92x3c3 x1q0q8m5 xw8gpjh"}}[!!r<<0],children:[o.jsx("div",{role:q?"button":void 0,tabIndex:q?0:void 0,"aria-expanded":q?!F:void 0,"aria-controls":q?Y:void 0,onClick:q?()=>X(ge=>!ge):void 0,onKeyDown:q?ge=>{(ge.key==="Enter"||ge.key===" ")&&(ge.preventDefault(),X(xe=>!xe))}:void 0,...{0:{className:"x78zum5 x6s0dn4 x98rzlu xeuugli x1717udv xjbqb8w x1heor9g xln7xf2 x1yc453h"},1:{className:"x78zum5 x6s0dn4 x98rzlu xeuugli x1717udv xjbqb8w x1heor9g xln7xf2 x1yc453h x1ypdohk x87ps6o x17nn4n9 x1wfwxd8 x7s97pk"}}[!!q<<0],children:o.jsxs("span",{className:"x78zum5 x6s0dn4 x141an7d x9m5x89 x1e4wzip x1mjzq1q x1ghz6dp x1ltkj2j",children:[q&&o.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnur1sd xb3r6kr x1mjzq1q x1gbn2au x1aquc0h x12wqnr7 x128ha8g x11xpdln xuedmi6 xlr8y92"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnur1sd xb3r6kr x1mjzq1q x1gbn2au x1aquc0h x12wqnr7 x128ha8g x11xpdln xuedmi6 xlr8y92 x1iffjtl"}}[!F<<0],children:o.jsx(Ce,{icon:"chevronRight",size:"xsm",color:"inherit"})}),n,n&&D?" — ":"",D]})}),K]}):null,le=o.jsx("div",{ref:Z,tabIndex:0,role:"group","aria-label":D??C("@astryx.codeBlock.code"),...U({className:"xw2csxc x1odjw0f"},{style:ne}),children:o.jsx("div",{...{0:{className:"x78zum5 x1pshirs"},1:{className:"x78zum5 x1pshirs x1ajqlyv"}}[!!(L&&!r)<<0],children:z?o.jsx(EM,{lines:M,tokenLines:R,highlightSet:I,isWrapped:c,sizeStyle:_,hasLineNumbers:r,maxDigits:O}):o.jsx(TM,{lines:M,tokenLines:R,highlightSet:I,isWrapped:c,sizeStyle:_,hasLineNumbers:r,maxDigits:O})})}),ve=o.jsxs("pre",{ref:j,...U(P("codeblock",{size:h,language:t,container:m}),B(Er.root,R0.width(p),bM[m],k),v,w),...$,children:[ie,q?o.jsx("div",{id:Y,inert:F?!0:void 0,...{0:{className:"xrvj5dj x1tu4anv x1qn9uv2 x80gvsz xlr8y92"},1:{className:"xrvj5dj x1qn9uv2 x80gvsz xlr8y92 xihq33y"}}[!!F<<0],children:o.jsx("div",{className:"xb3r6kr x2lwn1j",children:le})}):le,!L&&K]});return g?o.jsx(h4,{theme:g,children:ve}):ve}I0.displayName="CodeBlock";const zM={base:{kMv6JI:"x9m5x89",kGuDYH:"xp03k98",kLWn49:"x15bjb6t",kWkggS:"xwmxj5m",kg3NbH:"x7a5moj",k8WAf4:"x1hp7d8q",kaIpWk:"xx3sua9",kHjlTd:"x1mzt3pk",kTgw9:"x13faqbe",$$css:!0}},AM={primary:{kMwMTN:"x1tgivj0",$$css:!0},secondary:{kMwMTN:"xv1l7n4",$$css:!0},inherit:{kMwMTN:"x1heor9g",$$css:!0}},NM={inherit:{kGuDYH:"x1qlqyl8",kLWn49:"x15bjb6t",$$css:!0}};function _0({children:e,color:t="primary",size:n,xstyle:s,className:r,style:i,ref:a,...l}){return o.jsx("code",{ref:a,...l,...U(P("code",{color:t}),B(zM.base,AM[t],n&&NM[n],s),r,i),children:e})}_0.displayName="Code";const O0=x.createContext(null);O0.displayName="DialogContext";function MM(){return x.use(O0)}function RM(e,t=16){const n=e.getBoundingClientRect(),s=n.left+n.width/2-window.innerWidth/2,r=n.top+n.height/2-window.innerHeight/2,i=Math.sqrt(s*s+r*r)||1;return{x:Math.round(s/i*t),y:Math.round(r/i*t)}}const Hi={dialog:{kVAEAm:"xixxii4",kogj98:"x1bpp3o7",kmVPX3:"x1717udv",kWkggS:"x10xzikg","--_dialog-radius":"xvuvksw",kaIpWk:"xuacgfc",kGVxlE:"x1kcpxr7",k1xSpc:"x1s85apg",kXwgrk:"xdt5ytf",kZKoxP:"xg7h5cd",kZeWKH:"xish69e",kSiTet:"xg01cxk",k44tkh:"xqgcaz",kyAemX:"x128ha8g",kWV6AL:"xskzprw",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},open:{k1xSpc:"x78zum5",kSiTet:"x1hc1fzr",kKVMdj:"x1ewfqum x1aquc0h",$$css:!0},backdrop:{kGyWv1:"xnixb3f",kba3nw:"x1abwkk1",$$css:!0},fullscreen:{kzqmXN:"x1o6l61p",kZKoxP:"xtdtrs8",ks0D6T:"xlbgzzq",kskxy:"x1wj9ous",kaIpWk:"x2u8bby",kogj98:"x1ghz6dp",kpwlN0:"x10a8y8t",$$css:!0},inner:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kUk6DE:"x12lumcd",kAzted:"x2lwn1j",kVQacm:"xb3r6kr",kaIpWk:"x1pjcqnp",$$css:!0},inlineWrapper:{kmVPX3:"x1717udv",kWkggS:"x10xzikg","--_dialog-radius":"xvuvksw",kaIpWk:"xuacgfc",kGVxlE:"x1kcpxr7",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kZKoxP:"xg7h5cd",kZeWKH:"xish69e",$$css:!0}},IM={ks0D6T:"x95b5qq",$$css:!0},_M={kogj98:"x1ghz6dp",$$css:!0},b1={sizing:(e,t)=>[IM,{kzqmXN:(typeof e=="number"?`${e}px`:e)!=null?"x5lhr3w":typeof e=="number"?`${e}px`:e,kskxy:(typeof t=="number"?`${t}px`:t)!=null?"x1jols5v":typeof t=="number"?`${t}px`:t,$$css:!0},{"--x-width":(n=>typeof n=="number"?n+"px":n??void 0)(typeof e=="number"?`${e}px`:e),"--x-maxHeight":(n=>typeof n=="number"?n+"px":n??void 0)(typeof t=="number"?`${t}px`:t)}],position:(e,t,n,s)=>[_M,{k87sOh:e!=null?"xjbys53":e,kLqNvP:t!=null?"x1lxsm33":t,kt4wiu:n!=null?"xqxgn94":n,krVfgx:s!=null?"x1nqzi6q":s,$$css:!0},{"--x-top":(r=>typeof r=="number"?r+"px":r??void 0)(e),"--x-insetInlineStart":(r=>typeof r=="number"?r+"px":r??void 0)(t),"--x-insetInlineEnd":(r=>typeof r=="number"?r+"px":r??void 0)(n),"--x-bottom":(r=>typeof r=="number"?r+"px":r??void 0)(s)}]};function hd(e){return typeof e=="number"?`${e}px`:e}function OM(e){const{top:t,bottom:n,start:s,end:r}=e;return{top:t!==void 0?hd(t):"auto",bottom:n!==void 0?hd(n):"auto",insetInlineStart:s!==void 0?hd(s):"auto",insetInlineEnd:r!==void 0?hd(r):"auto"}}function vs({isOpen:e,isInline:t=!1,onOpenChange:n,width:s=400,maxHeight:r="75vh",position:i,variant:a="standard",purpose:l="info",padding:c,children:u,xstyle:d,className:f,style:h,ref:p,...m}){const b=c==null,y=c??4,g=X5[y],k=a==="fullscreen",v=x.useId(),w=x.useMemo(()=>({isInline:t,titleId:v}),[t,v]),j=m["aria-label"]!=null||m["aria-labelledby"]!=null,$=x.useRef(null),C=x.useCallback(O=>{if($.current=O,!O||j)return;O.querySelector(`#${CSS.escape(v)}`)!=null?O.setAttribute("aria-labelledby",v):O.removeAttribute("aria-labelledby")},[v,j]),E=x.useRef(null),T=l!=="required",S=l==="info";x.useEffect(()=>{var D;if(t)return;const O=$.current;if(O)if(e){E.current=document.activeElement;const L=E.current;if(L&&L!==document.body){const q=RM(L);O.style.setProperty("--dialog-dir-x",`${q.x}px`),O.style.setProperty("--dialog-dir-y",`${q.y}px`)}else O.style.setProperty("--dialog-dir-x","0px"),O.style.setProperty("--dialog-dir-y","16px");if(!O.open){O.showModal();const q=O.querySelector("[data-autofocus]");q&&q.focus()}}else O.open&&O.close(),(D=E.current)==null||D.focus(),E.current=null},[e,t]),t4(e&&!t),x.useEffect(()=>{if(t)return;const O=$.current;if(!O||!e)return;const D=L=>{if(L.key==="Escape"){if(G3(L)||Eb())return;L.preventDefault(),T&&n(!1)}};return O.addEventListener("keydown",D),()=>O.removeEventListener("keydown",D)},[e,t,T,n]);const N=x.useRef(!1);x.useEffect(()=>{var D;const O=((D=$.current)==null?void 0:D.querySelector(`#${CSS.escape(v)}`))!=null;e&&!t&&!j&&!O&&!N.current&&(N.current=!0,pa())},[e,t,j,v]);const z=O=>{O.target===O.currentTarget&&S&&n(!1)},M=O=>{O.preventDefault(),!Eb()&&T&&n(!1)},R=o.jsx("div",{...B(Hi.inner,...l4(b?{useThemeDefault:"dialog",maxHeight:k?void 0:typeof r=="number"?`${r}px`:r}:{paddingInnerX:g,paddingInnerY:g,paddingOuterX:g,paddingOuterY:g,maxHeight:k?void 0:typeof r=="number"?`${r}px`:r}),!b&&y!==4&&zl[y],!b&&y!==4&&Al[y],!b&&y!==4&&Nl[y],!b&&y!==4&&Ml[y]),children:o.jsx(O0,{value:w,children:u})}),I=i!=null&&!k,{open:A,..._}=m;return t?e?o.jsx("div",{..._,...U(P("dialog",{variant:a}),B(Hi.inlineWrapper,!k&&b1.sizing(s,r),k&&Hi.fullscreen,d),f,h),"data-testid":m["data-testid"],children:R}):null:o.jsx("dialog",{ref:it(p,C),..._,...U(P("dialog",{variant:a}),B(Hi.dialog,e&&Hi.open,Hi.backdrop,!k&&b1.sizing(s,r),I&&(()=>{const O=OM(i);return b1.position(O.top,O.insetInlineStart,O.insetInlineEnd,O.bottom)})(),k&&Hi.fullscreen,d),f,h),onClick:z,onCancel:M,"aria-modal":"true",...l==="required"?{role:"alertdialog"}:void 0,children:R})}vs.displayName="Dialog";const DM=x.lazy(async()=>u3(()=>Promise.resolve().then(()=>Y3),void 0).then(e=>({default:e.Tooltip}))),LM={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"};function Lr({level:e,type:t,accessibilityLevel:n,color:s="primary",display:r="block",maxLines:i=0,hasTruncateTooltip:a=!0,wordBreak:l,textWrap:c,justify:u="start",hasCapsize:d=!1,hasStrikethrough:f=!1,xstyle:h,className:p,style:m,children:b,ref:y,...g}){const k=LM[e],v=n&&n!==e?{"aria-level":n}:{},w=l??(i===1?"break-all":"break-word"),j=i>0||d?"block":r,$=k3({maxLines:i}),C=typeof a=="string"?a:"above",E=i>0&&a!==!1&&$.isTruncated,T=x.useRef(null),S=i>1?{WebkitLineClamp:i}:void 0;return o.jsxs(o.Fragment,{children:[o.jsx(k,{ref:it(y,$.ref,T),...U(P("heading",{level:e,color:s,...t&&{type:t}}),B(k0[b3(s)],t?b0[t]:AT[e],t&&d3[t],i===1?Uf.singleLine:i>1?Uf.multiLine:f3[j],i>0&&h3[w],c&&x3[c],u!=="start"&&m3[u],d&&p3.enabled,f&&g3.strikethrough,h),p,{...m,...S}),title:E?$.fullText:void 0,...v,...g,children:b}),E&&o.jsx(x.Suspense,{fallback:null,children:o.jsx(DM,{anchorRef:T,content:o.jsx("span",{...B(y3.content),children:$.fullText}),placement:C})})]})}Lr.displayName="Heading";const BM={titleFocusable:{kI3sdo:"x1a2a7pz",$$css:!0}};function ws({title:e,subtitle:t,onOpenChange:n,startContent:s,endContent:r,hasDivider:i,xstyle:a,className:l,style:c,ref:u,...d}){const f=be(),h=x.useRef(null),p=MM(),m=(p==null?void 0:p.isInline)!==!0,b=p==null?void 0:p.titleId;return x.useEffect(()=>{m&&h.current&&h.current.focus()},[m]),o.jsx(Hf,{ref:u,hasDivider:i,xstyle:a,className:l,style:c,...d,children:o.jsxs("div",{className:"x78zum5 x1cy8zhl x1qughib xjcht0a",children:[s&&o.jsx("div",{className:"x78zum5 x6s0dn4 x1txdalj x2lah0s",children:s}),o.jsxs("div",{className:"x98rzlu xeuugli xqixskq",children:[o.jsx(Lr,{ref:h,id:b,level:2,tabIndex:-1,xstyle:BM.titleFocusable,children:e}),t&&o.jsx(ee,{type:"body",size:"sm",color:"secondary",children:t})]}),(r||n)&&o.jsxs("div",{...{0:{className:"x78zum5 x6s0dn4 x1txdalj x2lah0s"},1:{className:"x78zum5 x6s0dn4 x1txdalj x2lah0s xhzvc8f x3kzqx6"}}[!!n<<0],children:[r,n&&o.jsx(re,{variant:"ghost",label:f("@astryx.dialog.close"),tooltip:f("@astryx.dialog.close"),icon:o.jsx(Ce,{icon:"close",color:"inherit"}),onClick:()=>{n==null||n(!1)},isIconOnly:!0})]})]})})}ws.displayName="DialogHeader";const qM={scrollable:{kVQacm:"xysyzu8",$$css:!0}};function D0({direction:e="vertical",hAlign:t,vAlign:n,justify:s,align:r,gap:i,padding:a,paddingInline:l,paddingBlock:c,isScrollable:u,width:d,height:f,maxWidth:h,minHeight:p,wrap:m,as:b="div",xstyle:y,className:g,style:k,children:v,ref:w,...j}){const $=t??(e==="horizontal"?s:r),C=n??(e==="horizontal"?r:s),E=e==="horizontal"?$:C,T=e==="horizontal"?C:$,S=l??a,N=c??a,z=B(..._p({direction:e,crossAlign:T,mainAlign:E,gap:i,wrap:m}),S!=null&&BE[S],N!=null&&qE[N],u&&qM.scrollable,y),M={...d!=null&&{width:typeof d=="number"?`${d}px`:d},...f!=null&&{height:typeof f=="number"?`${f}px`:f},...h!=null&&{maxWidth:typeof h=="number"?`${h}px`:h},...p!=null&&{minHeight:typeof p=="number"?`${p}px`:p}};return x.createElement(b,{ref:w,...U(P("stack",{direction:e,gap:i,wrap:m}),z,g,{...k,...M}),...j},v)}D0.displayName="Stack";function we({ref:e,justify:t,align:n,hAlign:s,vAlign:r,...i}){return o.jsx(D0,{...i,direction:"horizontal",hAlign:s??t,vAlign:r??n,ref:e})}we.displayName="HStack";function fe({ref:e,justify:t,align:n,hAlign:s,vAlign:r,...i}){return o.jsx(D0,{...i,direction:"vertical",hAlign:s??n,vAlign:r??t,ref:e})}fe.displayName="VStack";const xd={footer:{kmuXW:"x2lah0s",$$css:!0},inner:{kB7OPa:"x9f619",ks0D6T:"xjl2t3p",kUOVxO:"xvueqy4",kZCmMZ:"x139j0dd",kwRFfy:"xpc6k2p",kLKAdn:"xqty4a",kGO01o:"xon7vh3","--container-padding-inline-start":"xdvaxxn","--container-padding-inline-end":"xqpvj4r","--container-padding-block-start":"xjmgx01","--container-padding-block-end":"x1xjq73n",$$css:!0},fullBleed:{kZCmMZ:"x1c1uobl",kwRFfy:"xyri2b",kLKAdn:"xexx8yu",kGO01o:"x18d9i69","--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0},divider:{kEafiO:"x178xt8z",kPef9Z:"x13fuv20",kLZC3w:"x1pc3f07",$$css:!0}},HM={sizing:e=>[{kZKoxP:e!=null?"x16ye13r":e,$$css:!0},{"--x-height":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function Ga({children:e,hasDivider:t,height:n,label:s,padding:r,role:i,xstyle:a,className:l,style:c,ref:u,...d}){const f=x.use(Kh),h=t??(f==null?void 0:f.defaultHasDividers)??!1,p=r===0;return o.jsx("div",{ref:u,role:i,"aria-label":s,"data-divider":h||void 0,...U(P("layout-footer"),B(xd.footer,HM.sizing(n??null),h&&xd.divider,a),l,c),...d,children:o.jsx("div",{...B(xd.inner,p&&xd.fullBleed,r!=null&&zl[r],r!=null&&Al[r],r!=null&&Nl[r],r!=null&&Ml[r]),children:e})})}Ga.displayName="LayoutFooter";const w4=x.createContext({direction:"vertical"});w4.displayName="FormLayoutContext";const v1={container:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",$$css:!0},containerGap:{kOIVth:"xzye2dw",$$css:!0},horizontalLabels:{k1xSpc:"xjp7ctv",$$css:!0}},PM={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function Ll({label:e,isLabelHidden:t=!1,description:n,inputID:s,labelID:r,isGroupLabel:i=!1,descriptionID:a,isOptional:l=!1,isRequired:c=!1,isDisabled:u=!1,labelIcon:d,status:f,labelTooltip:h,statusVariant:p="attached",width:m,xstyle:b,children:y,className:g,style:k,ref:v,...w}){const{direction:j}=x.use(w4),$=j==="horizontal-labels",C=a??(n?`${s}-desc`:void 0),E=(f==null?void 0:f.messageID)??(f!=null&&f.message?`${s}-status`:void 0);Il("Field","isOptional and isRequired are mutually exclusive. isOptional takes precedence.",l&&c);const T=o.jsx(ix,{label:e,inputID:s,labelID:r,isGroupLabel:i,isLabelHidden:t,isDisabled:u,isOptional:l,isRequired:c,labelIcon:d,labelTooltip:h,description:$?void 0:n,descriptionID:$?void 0:C}),S=f!=null&&f.message&&p!=="tooltip"?o.jsx(ax,{type:f.type,message:f.message,id:E,variant:p}):null;return $?o.jsxs("div",{ref:v,...U(P("field",{layout:"horizontal-labels"}),B(v1.horizontalLabels,b),g,k),...w,children:[o.jsx("div",{className:"x1enrzb7",children:T}),o.jsxs("div",{className:"x78zum5 xdt5ytf xc8icb0",children:[n&&o.jsx(ee,{type:"supporting",display:"block",id:C,children:n}),y,S]})]}):o.jsxs("div",{ref:v,...U(P("field"),B(v1.container,!t&&v1.containerGap,m!=null&&PM.width(m),b),g,k),...w,children:[T,p==="attached"?o.jsxs("div",{className:"x78zum5 xdt5ytf xc8icb0",children:[y,S]}):o.jsxs(o.Fragment,{children:[y,S]})]})}Ll.displayName="Field";const dl={base:{kB7OPa:"x9f619",kVAEAm:"x1n2onr6",kY2c9j:"x1vjfegm",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kVAM5u:"xvy26l8 x6q1khz","--_field-radius":"x1832zxr",kaIpWk:"xvdfih8",kWkggS:"x10xzikg",k1ekBW:"x12zzom9",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kGVxlE:"x1gnnqk1 x12y27fx xuihb5h",kI3sdo:"x1a2a7pz",$$css:!0},disabled:{kkrTdU:"x1h6gzvc",kSiTet:"xbyyjgo",kVAM5u:"xvy26l8",kGVxlE:"x1gnnqk1",$$css:!0}},L0={warning:{kVAM5u:"x8wg1ba",$$css:!0},error:{kVAM5u:"x1ofxpqo",$$css:!0},success:{kVAM5u:"x16m2moy",$$css:!0}},B0={warning:{kGVxlE:"x1gnnqk1 xnoa3fc",$$css:!0},error:{kGVxlE:"x1gnnqk1 xl68szm",$$css:!0},success:{kGVxlE:"x1gnnqk1 xig9bu2",$$css:!0}},j4={warning:{kVAM5u:"x8wg1ba xa1yw2k",$$css:!0},error:{kVAM5u:"x1ofxpqo xk2sxw7",$$css:!0},success:{kVAM5u:"x16m2moy xyq33ac",$$css:!0}},S4={inGroup:{kUk6DE:"x98rzlu",k7Eaqz:"xeuugli",kZKoxP:"x5yr21d",keTefX:"xd10s4z x1pwwqoy",krdFHd:"x15mokao x8eehn2",kVL7Gh:"xbiv7yw x1xrp5p4",kfmiAY:"x1ga7v0g x11xp8u1 xpufgd0 x1ir7nn6",kT0f0o:"x16uus16 x747jw7 xxd14kb x1vej5at",kXnDq0:"x1rm9qnc",$$css:!0}},$4=x.createContext(null);$4.displayName="InputGroupContext";function C4(){return x.use($4)}const UM={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}};function xs({type:e="text",label:t,isLabelHidden:n=!1,description:s,isOptional:r=!1,isRequired:i=!1,isDisabled:a=!1,disabledMessage:l,startIcon:c,status:u,statusVariant:d="attached",size:f,onChange:h,changeAction:p,isLoading:m=!1,value:b,placeholder:y,labelTooltip:g,hasClear:k=!1,hasAutoFocus:v=!1,htmlName:w,onEnter:j,onKeyDown:$,width:C,xstyle:E,className:T,style:S,ref:N,...z}){const M=be(),R=Ha(f,"md"),I=x.useId(),A=x.useId(),_=x.useId(),O=x.useId(),D=x.useRef(null),L=x.useRef(null),q=C4(),[,F]=x.useTransition(),[X,Y]=x.useOptimistic(b),Z=m||X!==b,ne=a&&!!l,J=ms({placement:"above",focusTrigger:"always",isEnabled:ne}),{statusIcon:K,describedBy:ie}=s4({status:u,statusVariant:d,isInGroup:!!q}),{ariaLabelledBy:le,ariaDescribedBy:ve}=W5(A,[s?_:null,!q&&d!=="tooltip"&&(u!=null&&u.message)?O:null,ie,ne?J.describedBy:null],q),ge=ue=>{if(a)return;const pe=ue.target.value;h==null||h(pe,ue),p&&!ue.defaultPrevented&&F(async()=>{Y(pe),await p(pe,ue)})},xe=x.useCallback(()=>{var ue;h==null||h("",null),(ue=D.current)==null||ue.focus()},[h]),{onClick:ce,onMouseUp:Q}=z0({containerRef:L,inputRef:D,disabled:a}),ye=o.jsxs("div",{ref:ue=>{L.current=ue,J.ref(ue)},onClick:ce,onMouseUp:Q,...U(P("text-input",{size:R,status:(u==null?void 0:u.type)??null}),B(dl.base,UM[R],a&&dl.disabled,u&&L0[u.type],u&&!a&&B0[u.type],u&&j4[u.type],q&&S4.inGroup,E),T,S),children:[c&&qs(c,{size:"sm",color:"secondary"}),q&&o.jsx(Mi,{id:A,children:t}),o.jsx("input",{...z,ref:it(N,D),id:I,name:w,type:e,value:X,onChange:ge,onKeyDown:j||$?ue=>{ue.key==="Enter"&&(j==null||j()),$==null||$(ue)}:void 0,placeholder:y,disabled:a&&!ne,"aria-disabled":ne?"true":void 0,readOnly:ne||void 0,autoFocus:v,"data-autofocus":v||void 0,"aria-describedby":ve,"aria-required":i===!0?"true":void 0,"aria-invalid":(u==null?void 0:u.type)==="error"?"true":void 0,"aria-busy":Z||void 0,"aria-labelledby":le,...{0:{className:"x1lliihq x98rzlu xeuugli xc342km xng3xce x1717udv x9ynric xjm74w1 x6pjikd xw6l6zx x1tgivj0 xjbqb8w x1a2a7pz xeyghm5"},1:{className:"x1lliihq x98rzlu xeuugli xc342km xng3xce x1717udv x9ynric xjm74w1 x6pjikd xw6l6zx x1tgivj0 xjbqb8w x1a2a7pz xeyghm5 x1h6gzvc"}}[!!a<<0]}),k&&b!==""&&!a&&o.jsx("button",{type:"button",onClick:xe,"aria-label":M("@astryx.textInput.clearLabel",{label:t}),className:"x78zum5 x6s0dn4 xl56j7k x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1ypdohk xh6dtrn x1a2a7pz x1p25gnr x1y3gkto",children:o.jsx(Ce,{icon:"close",size:"sm",color:"secondary"})}),Z&&o.jsx(on,{size:"sm"}),K]});return q?o.jsxs(o.Fragment,{children:[ye,ne&&J.renderTooltip(l)]}):o.jsxs(Ll,{label:t,isLabelHidden:n,description:s,inputID:I,descriptionID:s?_:void 0,isOptional:r,isRequired:i,isDisabled:a,status:u?{type:u.type,message:u.message,messageID:u.message?O:void 0}:void 0,statusVariant:d,labelTooltip:g,width:C,children:[ye,ne&&J.renderTooltip(l)]})}xs.displayName="TextInput";function E4(e){return typeof e=="string"?!0:!("type"in e)}function FM(e){return typeof e=="object"&&"type"in e&&e.type==="divider"}function T4(e){return typeof e=="object"&&"type"in e&&e.type==="section"}function Vf(e){return typeof e=="string"?{value:e,label:e}:{...e,label:e.label??e.value}}function GM(e){const t=[];for(const n of e)if(E4(n))t.push(Vf(n));else if(T4(n))for(const s of n.options)t.push(Vf(s));return t}function VM({isOpen:e,selectedItemIndex:t,listboxId:n,listboxRef:s,triggerRef:r}){const[i,a]=x.useState(0),[l,c]=x.useState(!1),u=x.useCallback((d,f)=>{a(d),c(f)},[]);return ir(()=>{if(!e){u(0,!1);return}if(!s.current||!r.current){u(0,!0);return}const d=t>=0?t:0,f=`${n}-item-${d}`,h=document.getElementById(f);if(!h){u(0,!0);return}const p=s.current.getBoundingClientRect(),m=h.getBoundingClientRect(),b=r.current.getBoundingClientRect(),y=p.height;if(y<=0){u(0,!0);return}const g=m.top-p.top+m.height/2,v=b.top+b.height/2-g,w=window.innerHeight,j=Math.max(0,w-y),$=Math.min(Math.max(v,0),j),C=Math.max(0,b.bottom-$);u(C,!0)},[e,t,n,s,r,u]),{offset:i,isPositioned:l}}function WM({selectableItems:e,value:t,isDisabled:n=!1,isOpen:s,hasSearch:r=!1,onOpen:i,onClose:a,onSelect:l,onClear:c,listboxId:u}){const[d,f]=x.useState(-1),[h,p]=x.useState(""),m=x.useRef(void 0),b=x.useCallback(C=>`${u}-item-${C}`,[u]),y=x.useCallback(()=>e.map((C,E)=>C.disabled?-1:E).filter(C=>C>=0),[e]),g=x.useCallback(()=>e.findIndex(C=>C.value===t),[e,t]),k=x.useCallback(()=>{f(-1),a()},[a]),v=x.useCallback(C=>{C.disabled||(l==null||l(C.value),k())},[l,k]),w=x.useCallback(()=>{if(!n){if(s)k();else if(i(),!r){const C=g();f(C>=0?C:0)}}},[n,s,i,k,g,r]),j=x.useCallback((C,E)=>{C.disabled||f(E)},[]),$=x.useCallback(C=>{if(n)return;const E=y();switch(C.key){case"ArrowDown":if(C.preventDefault(),!s)i(),f(0);else{const T=E.indexOf(d),S=Math.min(T+1,E.length-1);f(E[S]??d)}break;case"ArrowUp":if(C.preventDefault(),!s)i(),f(e.length-1);else{const T=E.indexOf(d),S=Math.max(T-1,0);f(E[S]??d)}break;case" ":if(r)break;case"Enter":if(C.preventDefault(),s&&d>=0){const T=e[d];T&&!T.disabled&&v(T)}else if(!s&&(i(),!r)){const T=g();f(T>=0?T:0)}break;case"Escape":s&&(C.preventDefault(),k());break;case"Tab":s&&k();break;case"Home":C.preventDefault(),s&&E.length>0&&f(E[0]);break;case"End":C.preventDefault(),s&&E.length>0&&f(E[E.length-1]);break;case"PageUp":C.preventDefault(),s&&E.length>0&&f(E[0]);break;case"PageDown":C.preventDefault(),s&&E.length>0&&f(E[E.length-1]);break;case"Delete":case"Backspace":!r&&!s&&c!=null&&t!=null&&(C.preventDefault(),c());break;default:if(!r&&C.key.length===1&&!C.ctrlKey&&!C.metaKey){const T=h+C.key.toLowerCase();p(T),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{p("")},500);const S=e.findIndex(N=>{var z;return!N.disabled&&((z=N.label)==null?void 0:z.toLowerCase().startsWith(T))});S>=0&&(s||i(),f(S))}break}},[n,s,i,k,e,d,v,g,y,h,r,c,t]);return{highlightedIndex:d,setHighlightedIndex:f,getItemId:b,onTriggerClick:w,onKeyDown:$,onItemSelect:v,onItemMouseEnter:j}}const KM={root:{k8WAf4:"xt970qd",kg3NbH:"xnjsko4",kaIpWk:"x2u8bby",$$css:!0}};function z4({icon:e,label:t,description:n,endContent:s,xstyle:r,className:i,style:a}){return o.jsx(Ua,{startContent:e?qs(e,{size:"sm",color:"secondary"}):void 0,label:t,description:n,endContent:s,xstyle:[KM.root,r],...U(P("selector-option"),{className:i,style:a})})}z4.displayName="SelectorOption";const $s={triggerContainer:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kOIVth:"x1txdalj",kzqmXN:"xh8yej3",k8WAf4:"xce4md1",kg3NbH:"xrrkdod",kMv6JI:"x9ynric",kGuDYH:"xcr08ib xdk3u5w",kLWn49:"x1kq96og",kMwMTN:"x1tgivj0",kkrTdU:"x1ypdohk",$$css:!0},triggerPlaceholder:{kMwMTN:"xv1l7n4",$$css:!0},triggerGhost:{kzqmXN:"x14atkfc",kMzoRj:"xc342km",kWkggS:"xjbqb8w",kKwaWg:"x1ilzqfv xq8i9tn",kGVxlE:"x1gnnqk1 x1irk71m x15ysqaf",k63SB2:"x1e4wzip",kI3sdo:"x1a2a7pz x1irc7jg",kInvED:"x1wfwxd8 xscfbxq",k1ekBW:"xrafxwg",k3aq6I:"x3oybdh xk4oym4",$$css:!0},triggerGhostDisabled:{kKwaWg:"x18o3ruo",k3aq6I:"x1c071of x1pdlv7q",$$css:!0},popover:{k7Eaqz:"xrzjruh",$$css:!0},sectionDivider:{kqGvvJ:"xsq74q5",$$css:!0},divider:{kqGvvJ:"xsq74q5",$$css:!0},item:{kB7OPa:"x9f619",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kOIVth:"x1txdalj",kzqmXN:"xh8yej3",kmVPX3:"xlsj2fj",kaIpWk:"xh6dtrn",kMv6JI:"x9ynric",kGuDYH:"xcr08ib",kMwMTN:"x1tgivj0",kWkggS:"xjbqb8w",kkrTdU:"x1ypdohk",k9WMMc:"x1yc453h",kI3sdo:"x1a2a7pz",$$css:!0},itemHighlighted:{kWkggS:"x1lmrjuc",$$css:!0},itemSelected:{k63SB2:"x1e4wzip",$$css:!0},itemDisabled:{kSiTet:"xbyyjgo",kkrTdU:"x1h6gzvc",$$css:!0}},XM={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},ZM={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}},Wb={warning:"warning",error:"error",success:"success"},Kb={warning:"warning",error:"error",success:"success"},YM={warning:"@astryx.input.statusButton.warning",error:"@astryx.input.statusButton.error",success:"@astryx.input.statusButton.success"};function QM({option:e}){return o.jsx(z4,{icon:e.icon,label:e.label??e.value})}function Kp(e,t){return t?(e.label??e.value).toLowerCase().includes(t.toLowerCase()):!0}function Xb(e,t){return t?e.filter(n=>Kp(n,t)):e}function Xc(e){const t=be(),{label:n,isLabelHidden:s=!1,description:r,isOptional:i=!1,isRequired:a=!1,isDisabled:l=!1,disabledMessage:c,options:u,value:d,onChange:f,changeAction:h,isLoading:p=!1,placeholder:m,size:b,variant:y="input",status:g,statusVariant:k="attached",labelTooltip:v,startIcon:w,htmlName:j,renderOption:$,hasSearch:C=!1,searchPlaceholder:E,placement:T,isDefaultOpen:S=!1,"data-testid":N,width:z,xstyle:M,className:R,style:I,hasClear:A,..._}=e,O=m??t("@astryx.selector.placeholder"),D=E??t("@astryx.selector.searchPlaceholder"),L=A===!0,q=Ha(b,"md"),F=y==="ghost"&&k==="attached"?"detached":k,X=d===null?void 0:d,Y=x.useId(),Z=x.useId(),ne=x.useId(),J=x.useId(),K=x.useId(),ie=x.useId(),le=x.useRef(null),ve=x.useRef(null),ge=C4(),[xe,ce]=x.useState(""),Q=xe.length>0,[,ye]=x.useTransition(),[ue,pe]=x.useOptimistic(X),De=p||ue!==X,se=l&&!!c,en=ms({placement:"above",focusTrigger:"always",isEnabled:se}),un=ms({placement:"above",isEnabled:F==="tooltip"&&!!(g!=null&&g.message)}),{ariaLabelledBy:js,ariaDescribedBy:Mn}=W5(K,[r?ne:null,!ge&&F!=="tooltip"&&(g!=null&&g.message)?J:null,F==="tooltip"&&(g!=null&&g.message)?un.describedBy:null,se?en.describedBy:null],ge),Rn=x.useMemo(()=>GM(u),[u]),Xl=x.useMemo(()=>Xb(Rn,xe),[Rn,xe]),to=x.useMemo(()=>Rn.findIndex(de=>de.value===ue),[Rn,ue]),Qu=x.useMemo(()=>to>=0?Rn[to]:void 0,[Rn,to]),Zx=x.useRef(null),Zl=Dl(),yC=x.useCallback(()=>{var de;ce(""),Zl(""),(de=le.current)==null||de.focus()},[Zl]),Ht=_l({onHide:yC,hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"});x.useEffect(()=>{S&&Ht.show()},[]);const Fk=x.useCallback(de=>{if(ce(de),de.length===0){Zl("");return}const dn=Xb(Rn,de).length;Zl(dn===0?"No results found":`${dn} result${dn===1?"":"s"}`)},[Zl,Rn]),Yx=T==null&&!C,{offset:kC,isPositioned:bC}=VM({isOpen:Ht.isOpen&&Yx,selectedItemIndex:to,listboxId:Z,listboxRef:Zx,triggerRef:le}),Gk=Yx?kC:0,vC=Yx?bC:!0,Vk=T??"below",wC=Gk>0?{marginBlockStart:`-${Gk}px`}:void 0,Qx=x.useCallback(()=>{f==null||f(null),h&&ye(async()=>{pe(void 0),await h(null)})},[f,h,ye,pe]),{highlightedIndex:Us,getItemId:Di,onTriggerClick:jC,onKeyDown:Yl,onItemSelect:Wk,onItemMouseEnter:Kk}=WM({selectableItems:Xl,value:X,isDisabled:l,isOpen:Ht.isOpen,hasSearch:C,onOpen:x.useCallback(()=>{Ht.show(),C&&requestAnimationFrame(()=>{var de;(de=ve.current)==null||de.focus()})},[Ht,C]),onClose:Ht.hide,onSelect:x.useCallback(de=>{f==null||f(de),h&&ye(async()=>{pe(de),await h(de)})},[f,h,ye,pe]),onClear:L?Qx:void 0,listboxId:Z});x.useEffect(()=>{var de,dn;!Ht.isOpen||Us<0||(dn=(de=document.getElementById(Di(Us)))==null?void 0:de.scrollIntoView)==null||dn.call(de,{block:"nearest"})},[Ht.isOpen,Us,Di]);const SC=x.useCallback(de=>{de.stopPropagation(),Qx()},[Qx]),$C=x.useCallback(()=>C?o.jsx("div",{className:"x78zum5 x6s0dn4 xf314gf xu0wf1k",onKeyDown:de=>{de.target!==ve.current&&de.key==="Tab"&&!de.shiftKey&&Yl(de)},children:o.jsx(xs,{ref:ve,id:ie,label:t("@astryx.selector.searchOptions"),isLabelHidden:!0,startIcon:"search",hasClear:!0,size:"sm",width:"100%",role:"combobox","aria-expanded":Ht.isOpen,"aria-controls":Z,"aria-autocomplete":"list","aria-activedescendant":Ht.isOpen&&Us>=0?Di(Us):void 0,value:xe,onChange:Fk,onKeyDown:de=>{if(de.key==="ArrowDown"||de.key==="ArrowUp"||de.key==="PageUp"||de.key==="PageDown"||de.key==="Enter"||de.key==="Escape"){Yl(de);return}de.key==="Tab"&&(de.shiftKey||!Q)&&Yl(de)},placeholder:D})}):null,[C,ie,Z,xe,Q,D,Fk,Yl,Ht.isOpen,Us,Di,t]),Jx=x.useCallback((de,dn)=>{const Li=dn===Us,Fs=de.value===X;return o.jsxs("div",{id:Di(dn),role:"option","aria-selected":Fs,"aria-disabled":de.disabled,onClick:()=>Wk(de),onMouseEnter:()=>Kk(de,dn),...B($s.item,ZM[q],Li&&$s.itemHighlighted,Fs&&$s.itemSelected,de.disabled&&$s.itemDisabled),children:[o.jsx("span",{className:"x78zum5 x6s0dn4 x1txdalj x98rzlu xeuugli",children:$?$(de):o.jsx(QM,{option:de})}),Fs&&o.jsx(Ce,{icon:"check",size:"sm",color:"accent"})]},de.value)},[$,Us,q,X,Di,Wk,Kk]),Xk=x.useCallback(()=>{const de=C&&!!xe;if(de&&Xl.length===0)return[o.jsx("div",{role:"presentation",className:"x1b2ylru x2b8uid xv1l7n4 x9ynric xcr08ib",children:"No results found"},"empty")];let dn=0;const Li=[];for(let Fs=0;Fs<u.length;Fs++){const Pr=u[Fs];if(FM(Pr)){if(de)continue;Li.push(o.jsx(Wc,{xstyle:$s.divider},`divider-${Fs}`))}else if(T4(Pr)){const no=[];for(const CC of Pr.options){const Qk=Vf(CC);de&&!Kp(Qk,xe)||(no.push(Jx(Qk,dn)),dn++)}if(no.length===0)continue;Pr.title&&Li.push(o.jsx(Wc,{label:Pr.title,xstyle:$s.sectionDivider},`section-divider-${Fs}`)),Li.push(o.jsx("div",{role:"group","aria-label":Pr.title,children:no},`section-${Fs}`))}else if(E4(Pr)){const no=Vf(Pr);if(de&&!Kp(no,xe))continue;Li.push(Jx(no,dn)),dn++}}return Li},[u,Jx,C,xe,Xl]),e1=g!=null&&F!=="detached",Zk=g!=null&&F==="tooltip"&&!!g.message,Yk=o.jsxs(o.Fragment,{children:[o.jsxs("div",{ref:de=>{Ht.triggerRef(de),en.ref(de)},onClick:jC,"data-testid":N,...U(P("selector",{variant:y,size:q,status:(g==null?void 0:g.type)??null}),B(dl.base,$s.triggerContainer,XM[q],y==="ghost"&&$s.triggerGhost,l&&dl.disabled,y==="ghost"&&l&&$s.triggerGhostDisabled,!Qu&&$s.triggerPlaceholder,y!=="ghost"&&g&&L0[g.type],y!=="ghost"&&g&&!l&&B0[g.type],y!=="ghost"&&ge&&S4.inGroup,M),R,I),children:[w&&qs(w,{size:"sm",color:"secondary"}),ge&&o.jsx(Mi,{id:K,children:n}),o.jsx("button",{ref:le,id:Y,type:"button",role:C?void 0:"combobox",..._,"aria-haspopup":"listbox","aria-expanded":Ht.isOpen,"aria-controls":Z,"aria-activedescendant":!C&&Ht.isOpen&&Us>=0?Di(Us):void 0,"aria-describedby":Mn,"aria-labelledby":js,"aria-required":a?"true":void 0,"aria-invalid":(g==null?void 0:g.type)==="error"?"true":void 0,"aria-busy":De||void 0,disabled:l&&!se,"aria-disabled":se?"true":void 0,onKeyDown:Yl,tabIndex:l&&!se?-1:0,className:"x78zum5 x6s0dn4 x1qughib x1txdalj x1iyjqo2 xs83m0k x1r8uery xeuugli x1717udv x1ghz6dp xc342km xng3xce xjbqb8w xjb2p0i x1qlqyl8 x15bjb6t x1heor9g x1ypdohk x1a2a7pz",children:o.jsx("span",{className:"x1iyjqo2 xeuugli xb3r6kr xlyipyv xuxw1ft x1yc453h",children:(Qu==null?void 0:Qu.label)??O})}),j!=null&&o.jsx("input",{type:"hidden",name:j,value:d??"",disabled:l}),De&&o.jsx(on,{size:"sm"}),L&&d!=null&&!l&&o.jsx("button",{type:"button",onClick:SC,"aria-label":t("@astryx.selector.clearLabel",{label:n}),className:"x78zum5 x6s0dn4 xl56j7k x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1ypdohk xh6dtrn x1a2a7pz x1p25gnr x1y3gkto",children:o.jsx(Ce,{icon:"close",size:"sm",color:"secondary",...P("selector-clear-icon")})}),o.jsx("span",{...{0:{className:"x2lah0s x78zum5 x6s0dn4 xl56j7k x1kky2od xlup9mm x11xpdln xuedmi6 xlr8y92 x1g0ag68 xv9yike"},2:{className:"x2lah0s x78zum5 x6s0dn4 xl56j7k x1kky2od xlup9mm x11xpdln xuedmi6 xlr8y92 x1g0ag68 xv9yike x19jd1h0"},1:{className:"x2lah0s x78zum5 x6s0dn4 xl56j7k x1kky2od xlup9mm x11xpdln xuedmi6 xlr8y92 x1g0ag68 xv9yike xq2gx43"},3:{className:"x2lah0s x78zum5 x6s0dn4 xl56j7k x1kky2od xlup9mm x11xpdln xuedmi6 xlr8y92 x1g0ag68 xv9yike x19jd1h0 xq2gx43"}}[!!(!e1&&Ht.isOpen)<<1|!!e1<<0],children:e1?Zk?o.jsx("button",{ref:un.ref,type:"button","aria-label":t(YM[g.type]),"aria-describedby":un.describedBy,onClick:de=>de.stopPropagation(),className:"x78zum5 x6s0dn4 xl56j7k x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1heor9g x1ypdohk xh6dtrn x1a2a7pz x1p25gnr x1y3gkto",children:o.jsx(Ce,{icon:Wb[g.type],size:"sm",color:Kb[g.type]})}):o.jsx(Ce,{icon:Wb[g.type],size:"sm",color:Kb[g.type]}):o.jsx(Ce,{icon:"chevronDown",size:"sm",color:"inherit",...P("selector-indicator-icon",{state:Ht.isOpen?"expanded":"collapsed"})})})]}),Ht.render(C?o.jsxs("div",{children:[$C(),o.jsx("div",{ref:Zx,id:Z,role:"listbox","aria-labelledby":Y,className:"x9f619 xuyqlj2 x1odjw0f x9epnlk x1hc1fzr x1ey1afo",children:Xk()})]}):o.jsx("div",{ref:Zx,id:Z,role:"listbox","aria-labelledby":Y,...{0:{className:"x9f619 xuyqlj2 x1odjw0f x9epnlk x1hc1fzr x1ey1afo"},1:{className:"x9f619 xuyqlj2 x1odjw0f x9epnlk xg01cxk xq2gx43"}}[!vC<<0],children:Xk()}),{placement:Vk,alignment:"start",xstyle:[$s.popover,rr[Vk]],style:wC}),Zk&&un.renderTooltip((g==null?void 0:g.message)??""),se&&en.renderTooltip(c)]});return ge?Yk:o.jsx(Ll,{label:n,isLabelHidden:s,description:r,inputID:Y,descriptionID:r?ne:void 0,isOptional:i,isRequired:a,isDisabled:l,status:g?{type:g.type,message:g.message,messageID:g.message?J:void 0}:void 0,statusVariant:F,labelTooltip:v,width:z,children:Yk})}Xc.displayName="Selector";var A4={exports:{}},cn={};/**
138
- * @license React
139
- * react-dom.production.js
140
- *
141
- * Copyright (c) Meta Platforms, Inc. and affiliates.
142
- *
143
- * This source code is licensed under the MIT license found in the
144
- * LICENSE file in the root directory of this source tree.
145
- */var JM=x;function N4(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 Vr(){}var bn={d:{f:Vr,r:function(){throw Error(N4(522))},D:Vr,C:Vr,L:Vr,m:Vr,X:Vr,S:Vr,M:Vr},p:0,findDOMNode:null},eR=Symbol.for("react.portal"),tR=Symbol.for("react.recoverable"),Zb=Symbol.for("react.optimistic_key");function nR(e,t,n){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:eR,key:s==null?null:s===Zb?Zb:""+s,children:e,containerInfo:t,implementation:n}}var Cc=JM.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function dx(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}cn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=bn;cn.browser=function(e){return{$$typeof:tR,_reason:e}};cn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(N4(299));return nR(e,t,null,n)};cn.flushSync=function(e){var t=Cc.T,n=bn.p;try{if(Cc.T=null,bn.p=2,e)return e()}finally{Cc.T=t,bn.p=n,bn.d.f()}};cn.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,bn.d.C(e,t))};cn.prefetchDNS=function(e){typeof e=="string"&&bn.d.D(e)};cn.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,s=dx(n,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?bn.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:s,integrity:r,fetchPriority:i}):n==="script"&&bn.d.X(e,{crossOrigin:s,integrity:r,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};cn.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=dx(t.as,t.crossOrigin);bn.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==null&&bn.d.M(e)};cn.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,s=dx(n,t.crossOrigin);bn.d.L(e,n,{crossOrigin:s,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})}};cn.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=dx(t.as,t.crossOrigin);bn.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 bn.d.m(e)};cn.requestFormReset=function(e){bn.d.r(e)};cn.unstable_batchedUpdates=function(e,t){return e(t)};cn.useFormState=function(e,t,n){return Cc.H.useFormState(e,t,n)};cn.useFormStatus=function(){return Cc.H.useHostTransitionStatus()};cn.version="19.3.0";function M4(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(M4)}catch(e){console.error(e)}}M4(),A4.exports=cn;var Zc=A4.exports;const Yb={popoverSurface:{k7Eaqz:"xfb3i0g",$$css:!0},popoverGap:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0}};function sR(e){const t=window.getSelection();if(!t||t.rangeCount===0)return null;const n=t.getRangeAt(0);if(!n.collapsed||!e.contains(n.startContainer))return null;const s=n.startContainer;return s.nodeType===Node.TEXT_NODE?(s.textContent??"").slice(0,n.startOffset):null}function rR(e,t){for(let n=e.length-1;n>=0;n--){const s=e[n];if(s===" "||s===`
146
- `)return null;for(const r of t)if(s===r.character){const i=n>0?e[n-1]:null;if(i===null||i===" "||i===`
147
- `){const a=e.slice(n+1);return{trigger:r,query:a,triggerStart:n}}}}return null}function iR(e,t){const n=window.getSelection();if(!n||n.rangeCount===0)return;const s=n.getRangeAt(0),r=s.startContainer;if(r.nodeType!==Node.TEXT_NODE)return;const i=r.textContent??"",a=s.startOffset,l=i.slice(0,t),c=i.slice(a);r.textContent=l+c;const u=document.createRange();u.setStart(r,t),u.collapse(!0),n.removeAllRanges(),n.addRange(u)}function aR(e){const t=be(),{triggers:n,editableRef:s,onInsertToken:r,onInsertText:i,onEmitChange:a,debounceMs:l=150}=e,c=x.useId(),[u,d]=x.useState({isActive:!1,activeTrigger:null,query:"",items:[],highlightedIndex:0,isLoading:!1}),f=x.useRef(-1),h=x.useRef(null),p=x.useRef(null),m=x.useCallback(()=>{p.current&&(p.current.remove(),p.current=null)},[]),b=_l({onHide:x.useCallback(()=>{m(),d(S=>({...S,isActive:!1,activeTrigger:null,query:"",items:[],highlightedIndex:0,isLoading:!1}))},[m]),hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"});x.useEffect(()=>()=>{h.current&&clearTimeout(h.current),m()},[m]);const y=x.useCallback(()=>{var N,z;h.current&&(clearTimeout(h.current),h.current=null);const S=u.activeTrigger;S!=null&&S.searchSource&&((z=(N=S.searchSource).cancel)==null||z.call(N)),m(),b.hide(),f.current=-1},[b,u.activeTrigger,m]),g=x.useCallback(()=>{const S=s.current;if(!S)return;const N=window.getSelection();if(!N||N.rangeCount===0){b.triggerRef(S);return}m();const z=N.getRangeAt(0).cloneRange();z.collapse(!0);const M=typeof z.getBoundingClientRect=="function"?z.getBoundingClientRect():null;if(!M||M.width===0&&M.height===0&&M.top===0&&M.left===0){b.triggerRef(S);return}const R=document.createElement("span");R.setAttribute("aria-hidden","true"),R.setAttribute("data-astryx-trigger-anchor",""),R.style.position="fixed",R.style.left=`${M.left}px`,R.style.top=`${M.top}px`,R.style.width=`${Math.max(M.width,1)}px`,R.style.height=`${M.height}px`,R.style.pointerEvents="none",R.style.opacity="0",document.body.appendChild(R),p.current=R,b.triggerRef(R)},[s,b,m]),k=x.useCallback((S,N)=>{h.current&&(clearTimeout(h.current),h.current=null);const z=()=>{var M,R;if(S.searchSource){(R=(M=S.searchSource).cancel)==null||R.call(M),d(A=>({...A,isLoading:!0}));const I=S.searchSource.search(N);Promise.resolve(I).then(A=>{d(_=>({..._,items:A,highlightedIndex:A.length>0?0:-1,isLoading:!1}))},()=>{d(A=>({...A,items:[],highlightedIndex:-1,isLoading:!1}))})}};S.searchSource&&(S.searchSource.search("")instanceof Promise&&l>0?(d(I=>({...I,isLoading:!0})),h.current=setTimeout(z,l)):z())},[l]),v=x.useCallback(S=>{const N=u.activeTrigger;if(!N)return;const z=s.current;if(!z)return;m(),iR(z,f.current);const M=N.onSelect(S);typeof M=="string"?i(M):r(M),a(),y()},[u.activeTrigger,s,m,i,r,a,y]),w=x.useCallback(()=>{if(!n||n.length===0)return;const S=s.current;if(!S)return;const N=sR(S);if(N===null){u.isActive&&y();return}const z=rR(N,n);if(!z){u.isActive&&y();return}const{trigger:M,query:R,triggerStart:I}=z;!u.isActive||u.activeTrigger!==M?(f.current=I,d(A=>({...A,isActive:!0,activeTrigger:M,query:R,highlightedIndex:0})),g(),k(M,R),b.show()):u.query!==R&&(d(A=>({...A,query:R})),k(M,R))},[n,s,u.isActive,u.activeTrigger,u.query,y,g,k,b]),j=x.useCallback(S=>{if(!u.isActive||!b.isOpen)return!1;switch(S.key){case"ArrowDown":return S.preventDefault(),d(N=>({...N,highlightedIndex:N.highlightedIndex<N.items.length-1?N.highlightedIndex+1:0})),!0;case"ArrowUp":return S.preventDefault(),d(N=>({...N,highlightedIndex:N.highlightedIndex>0?N.highlightedIndex-1:N.items.length-1})),!0;case"Enter":case"Tab":return u.highlightedIndex>=0&&u.highlightedIndex<u.items.length?(S.preventDefault(),v(u.items[u.highlightedIndex]),!0):!1;case"Escape":return S.preventDefault(),y(),!0;default:return!1}},[u.isActive,u.highlightedIndex,u.items,b.isOpen,v,y]),$=x.useCallback(S=>`${c}-option-${S}`,[c]);x.useEffect(()=>{if(!b.isOpen||u.highlightedIndex<0)return;const S=document.getElementById($(u.highlightedIndex));S==null||S.scrollIntoView({block:"nearest"})},[u.highlightedIndex,b.isOpen,$]);const E=((n==null?void 0:n.length)??0)>0?u.isActive&&b.isOpen?{role:"combobox","aria-expanded":!0,"aria-controls":c,"aria-activedescendant":u.highlightedIndex>=0?$(u.highlightedIndex):void 0,"aria-haspopup":"listbox"}:{role:"combobox","aria-expanded":!1,"aria-haspopup":"listbox"}:{role:"textbox"},T=x.useCallback(()=>{const S=u.activeTrigger,N=(S==null?void 0:S.emptySearchResultsText)??"No results",z=(S==null?void 0:S.loadingText)??"Searching…";let M;if(u.isLoading)M=o.jsx("div",{role:"status",className:"x1b2ylru x2b8uid x141an7d xv1l7n4",children:z});else if(u.items.length===0&&u.isActive)M=o.jsx("div",{className:"x1b2ylru x2b8uid x141an7d xv1l7n4",children:N});else{const R=EE(u.items);let I=0;M=R.map(A=>{const _=A.items.map(O=>{const D=I++;return o.jsx("div",{id:$(D),role:"option","aria-selected":D===u.highlightedIndex,tabIndex:-1,onMouseDown:L=>{L.preventDefault(),v(O)},onMouseEnter:()=>d(L=>({...L,highlightedIndex:D})),...{0:{className:"x9f619 x78zum5 x6s0dn4 xh8yej3 xlsj2fj xh6dtrn x1ypdohk x1a2a7pz xjbqb8w x1yc453h x9ynric xjm74w1 xw6l6zx x1tgivj0"},1:{className:"x9f619 x78zum5 x6s0dn4 xh8yej3 xlsj2fj xh6dtrn x1ypdohk x1a2a7pz x1yc453h x9ynric xjm74w1 xw6l6zx x1tgivj0 x1lmrjuc"}}[(D===u.highlightedIndex)<<0],children:S!=null&&S.renderItem?S.renderItem(O):o.jsx("span",{className:"x98rzlu xeuugli xb3r6kr xlyipyv xuxw1ft",children:O.label})},O.id)});return A.heading?o.jsxs("div",{role:"group","aria-label":A.heading,children:[o.jsx("div",{"aria-hidden":"true",className:"xf314gf x1xye8es xy143xn x141an7d x1ltkj2j xv1l7n4 x87ps6o",children:A.heading}),_]},`group-${A.heading}`):_})}return b.render(o.jsx("div",{id:c,role:"listbox","aria-label":(S==null?void 0:S.menuLabel)??t("@astryx.chatTriggerMenu.suggestions"),...U(P("trigger-menu"),{className:"x9f619 x1xiyphd x1odjw0f x9epnlk xfb3i0g"}),children:M}),{placement:"above",alignment:"start",xstyle:[Yb.popoverSurface,Yb.popoverGap]})},[b,c,u,v,$,t]);return{state:u,handleInput:w,handleKeyDown:j,renderMenu:T,reset:y,ariaProps:E}}function Wf(e){const t=window.getSelection();if(!t)return null;if(t.rangeCount>0){const s=t.getRangeAt(0);if(e.contains(s.startContainer))return t}const n=document.createRange();return n.selectNodeContents(e),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t}function Xp(e,t){const n=Wf(e);if(!n||n.rangeCount===0)return!1;const s=n.getRangeAt(0);s.deleteContents();const r=document.createTextNode(t);return s.insertNode(r),s.setStartAfter(r),s.collapse(!0),n.removeAllRanges(),n.addRange(s),!0}function oR(e){return"render"in e&&typeof e.render=="function"}function lR(e){let t=e;for(;t;){if(t instanceof HTMLElement&&t.hasAttribute("data-astryx-token"))return t;t=t.parentNode}return null}function cR({editableRef:e,onEmitChange:t}){const[n,s]=x.useState([]),r=x.useCallback(u=>{const d=e.current;if(!d)return;const f=Wf(d);if(!f||f.rangeCount===0)return;const h=f.getRangeAt(0),p=document.createElement("span"),m=`token-${Date.now()}-${Math.random().toString(36).slice(2,6)}`;p.setAttribute("data-astryx-token",""),p.setAttribute("data-astryx-token-value",u.value),p.setAttribute("data-astryx-token-id",m),p.contentEditable="false",p.style.display="inline-flex",p.style.verticalAlign="baseline",h.deleteContents(),h.insertNode(p);const b=document.createTextNode(" ");p.after(b);const y=document.createRange();return y.setStartAfter(b),y.collapse(!0),f.removeAllRanges(),f.addRange(y),s(g=>[...g,{id:m,span:p,token:u}]),m},[e]),i=x.useCallback(u=>{if(u.key!=="Backspace")return!1;const d=window.getSelection();if(!d||!d.isCollapsed||d.rangeCount===0)return!1;const f=d.getRangeAt(0),{startContainer:h,startOffset:p}=f;if(h.nodeType===Node.TEXT_NODE&&p===0&&h.previousSibling instanceof HTMLElement&&h.previousSibling.hasAttribute("data-astryx-token"))return!1;if(h.nodeType===Node.TEXT_NODE&&h.textContent===" "&&p<=1&&h.previousSibling instanceof HTMLElement&&h.previousSibling.hasAttribute("data-astryx-token")){u.preventDefault();const m=h.previousSibling,b=h.parentNode;return b&&(b.removeChild(h),b.removeChild(m)),t(),!0}return!1},[t]),a=x.useCallback(u=>{const d=e.current;if(!d)return!1;const f=Wf(d);if(!f||f.rangeCount===0)return!1;const h=f.getRangeAt(0),p=lR(h.startContainer);if(p){u.preventDefault();const m=u.clipboardData.getData("text/plain"),b=p.nextSibling,y=document.createRange();return b&&b.nodeType===Node.TEXT_NODE?y.setStartAfter(b):y.setStartAfter(p),y.collapse(!0),f.removeAllRanges(),f.addRange(y),Xp(d,m),t(),!0}return!1},[e,t]),l=x.useCallback(u=>{if(!e.current)return;const f=n.find(g=>g.id===u);if(!f)return;const{span:h}=f,p=h.getAttribute("data-astryx-token-value")??"",m=document.createTextNode(p),b=h.nextSibling;(b==null?void 0:b.nodeType)===Node.TEXT_NODE&&b.textContent===" "&&b.remove(),h.replaceWith(m);const y=window.getSelection();if(y){const g=document.createRange();g.setStartAfter(m),g.collapse(!0),y.removeAllRanges(),y.addRange(g)}s(g=>g.filter(k=>k.id!==u)),t()},[e,n,t]),c=x.useCallback(()=>{s(u=>u.filter(d=>{var f;return(f=e.current)==null?void 0:f.contains(d.span)}))},[e]);return{tokenPortals:n,expandToken:l,insertToken:r,handleKeyDown:i,handlePaste:a,cleanupPortals:c}}function uR(e){const t=e.split(`
148
- `).length,n=e.length;return t>1?`${t} lines, ${n} chars`:`${n} chars`}function R4({text:e,onExpand:t}){const n=be(),s=uR(e),r=o.jsxs("div",{className:"x78zum5 xdt5ytf x1txdalj x17fpy1y",children:[o.jsx("div",{className:"x9m5x89 x141an7d x1ltkj2j x1tgivj0 x126k92a x13faqbe x1xiyphd x1odjw0f",children:e}),o.jsxs("div",{className:"x78zum5 x6s0dn4 x1qughib x1txdalj",children:[o.jsx("span",{className:"x141an7d xv1l7n4",children:s}),t&&o.jsx(re,{label:n("@astryx.chat.pastedText.expand"),variant:"ghost",size:"sm",onClick:t})]})]});return o.jsx(g4,{content:r,placement:"above",alignment:"start",hasHoverIndication:!1,children:o.jsx(Ru,{label:s,variant:"neutral"})})}R4.displayName="ChatPastedTextToken";function dR(e){const t=e.split(`
149
- `).length,n=e.length,s=t>1?`${t} lines, ${n} chars`:`${n} chars`;return{value:e,label:s,variant:"neutral"}}function fR({inputRef:e,threshold:t=200,toToken:n=dR}){return{onPaste:x.useCallback((r,i)=>{var l;if(i.length<=t)return!1;const a=n(i);return(l=e.current)==null||l.insertToken(a),!0},[e,t,n])}}const q0=x.createContext(null);q0.displayName="ChatMessageContext";function hR(){return x.use(q0)}const H0=x.createContext(null);H0.displayName="ChatListContext";function xR(){return x.use(H0)}const P0=x.createContext(null);P0.displayName="ChatComposerContext";function I4(){return x.use(P0)}const U0=x.createContext(null);U0.displayName="ChatLayoutContext";function pR(){return x.use(U0)}const gR=22,Qb={root:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kAzted:"xe0957l",$$css:!0},disabled:{kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0}};function w1(e){const t=window.getSelection();if(!t)return;const n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}function yo(e){let t="";for(const n of Array.from(e.childNodes))n.nodeType===Node.TEXT_NODE?t+=n.textContent??"":n instanceof HTMLElement&&(n.hasAttribute("data-astryx-token")?t+=n.getAttribute("data-astryx-token-value")??"":n.tagName==="BR"?t+=`
150
- `:t+=yo(n));return t}function F0(e){const t=be(),n=I4(),s=e.value!==void 0,{ref:r,handleRef:i,value:a=n==null?void 0:n.value,onChange:l,placeholder:c,maxRows:u=8,triggers:d,debounceMs:f=150,hasHistory:h=!0,label:p,isDisabled:m=(n==null?void 0:n.isDisabled)??!1,onPaste:b,pasteAsToken:y,onFiles:g,onSubmit:k=n==null?void 0:n.onSubmit,onKeyDown:v,xstyle:w,className:j,style:$,...C}=e,E=p??t("@astryx.chat.composerInput.label"),T=c??(n==null?void 0:n.placeholder)??t("@astryx.chat.composer.placeholder"),S=n==null?void 0:n.onChange,N=x.useCallback(Q=>{if(s){l==null||l(Q);return}S==null||S(Q),l!==S&&(l==null||l(Q))},[S,s,l]),z=x.useRef(null),M=x.useRef(null),[R,I]=x.useState(!0),A=x.useRef([]),_=x.useRef(-1),O=x.useRef(""),D=x.useRef(void 0),L=x.useRef(()=>{}),q=x.useRef(()=>{}),F={insertToken:Q=>L.current(Q),expandToken:Q=>ne.expandToken(Q),insertText:Q=>q.current(Q),focus:()=>{var Q;return(Q=z.current)==null?void 0:Q.focus()},getValue:()=>yo(z.current??document.createElement("div"))};M.current=F,x.useImperativeHandle(i,()=>F);const X=n==null?void 0:n.inputControlRef;x.useEffect(()=>{if(X)return X.current={focus:()=>{var Q;return(Q=z.current)==null?void 0:Q.focus()}},()=>{X.current=null}},[X]),x.useEffect(()=>{if(a===void 0||!z.current)return;if(a===D.current){D.current=void 0;return}const Q=z.current;if(yo(Q)!==a){D.current=void 0;const ye=document.activeElement===Q;if(Q.textContent=a,ye){const ue=window.getSelection();if(ue){const pe=document.createRange();pe.selectNodeContents(Q),pe.collapse(!1),ue.removeAllRanges(),ue.addRange(pe)}}I(a.length===0)}else D.current=void 0},[a]);const Y=x.useRef(null),Z=x.useCallback(()=>{var De;if(!z.current)return;const Q=yo(z.current),ye=z.current.querySelector("[data-astryx-token], [data-astryx-dictation-interim]")!=null,ue=Q.trim().length===0&&!ye,pe=ue?"":Q;D.current=pe,I(ue),N==null||N(pe),(De=Y.current)==null||De.call(Y)},[N]),ne=cR({editableRef:z,onEmitChange:Z});Y.current=ne.cleanupPortals;const J=fR({inputRef:M}),K=y===!1?null:y??J,ie=x.useCallback(Q=>{const ye=z.current;ye&&Xp(ye,Q)},[]);L.current=ne.insertToken,q.current=ie;const le=aR({triggers:d,editableRef:z,onInsertToken:ne.insertToken,onInsertText:ie,onEmitChange:Z,debounceMs:f}),ve=x.useCallback(()=>{Z(),le.handleInput()},[Z,le]),ge=x.useCallback(Q=>{if(!le.handleKeyDown(Q)&&(v==null||v(Q),!Q.defaultPrevented)){if(Q.key==="Backspace"){const ye=window.getSelection();if(ye&&ye.isCollapsed&&ye.rangeCount>0){const ue=ye.getRangeAt(0),{startContainer:pe,startOffset:De}=ue;if(!(pe.nodeType===Node.TEXT_NODE&&De===0&&pe.previousSibling instanceof HTMLElement&&pe.previousSibling.hasAttribute("data-astryx-token"))){if(pe.nodeType===Node.TEXT_NODE&&pe.textContent===" "&&De<=1&&pe.previousSibling instanceof HTMLElement&&pe.previousSibling.hasAttribute("data-astryx-token")){Q.preventDefault();const se=pe.previousSibling,en=pe.parentNode;en&&(en.removeChild(pe),en.removeChild(se)),Z();return}}}}if(Q.key==="Enter"&&!Q.shiftKey){if(Q.nativeEvent.isComposing||Q.nativeEvent.keyCode===229||(Q.preventDefault(),!z.current))return;const ye=yo(z.current).trim();if(!ye)return;h&&(A.current.push(ye),_.current=-1,O.current=""),k==null||k(ye),z.current.textContent="",I(!0),N==null||N("");return}if(h&&(Q.key==="ArrowUp"||Q.key==="ArrowDown")){if(!z.current)return;const ye=yo(z.current),ue=A.current;if(ue.length===0)return;if(Q.key==="ArrowUp"){_.current===-1&&(O.current=ye);const pe=_.current===-1?ue.length-1:Math.max(0,_.current-1);_.current=pe,z.current.textContent=ue[pe],w1(z.current),Z(),Q.preventDefault()}else if(Q.key==="ArrowDown"&&_.current!==-1){const pe=_.current+1;pe>=ue.length?(_.current=-1,z.current.textContent=O.current,O.current&&w1(z.current)):(_.current=pe,z.current.textContent=ue[pe],w1(z.current)),Z(),Q.preventDefault()}}}},[h,k,N,Z,le,v]),xe=x.useCallback(Q=>{const ye=z.current;if(!ye||(Wf(ye),ne.handlePaste(Q)))return;const ue=Array.from(Q.clipboardData.files);if(ue.length>0){Q.preventDefault(),g==null||g(ue);return}Q.preventDefault();const pe=Q.clipboardData.getData("text/plain");if(K!=null&&K.onPaste(Q,pe)){Z();return}if(b==null?void 0:b(Q,pe)){Z();return}Xp(ye,pe),Z()},[g,b,Z,ne,K]),ce=u*gR;return o.jsxs("div",{ref:r,...U(P("chat-composer-input"),B(Qb.root,m&&Qb.disabled,w),j,$),...C,children:[R&&o.jsx("div",{className:"x10l6tqk x13vifvy x1o0tod xtijo5x x47corl xv1l7n4 xjm74w1 x6pjikd x19v9tvf x9ynric x87ps6o x9epnlk","aria-hidden":"true",children:T}),o.jsx("div",{ref:z,"aria-multiline":"true","aria-label":E,contentEditable:!m,suppressContentEditableWarning:!0,onInput:ve,onKeyDown:ge,onPaste:xe,...le.ariaProps,...U({className:"x1a2a7pz x126k92a x13faqbe x1odjw0f xjm74w1 x6pjikd x19v9tvf x9ynric x1tgivj0 xxugrtn x9epnlk"},{style:{maxHeight:`${ce}px`}})}),le.renderMenu(),ne.tokenPortals.filter(({span:Q})=>Q.isConnected).map(({id:Q,span:ye,token:ue})=>Zc.createPortal(oR(ue)?o.jsx("span",{children:ue.render()},Q):ue.value.length>(K===null?1/0:200)?o.jsx(R4,{text:ue.value,onExpand:()=>ne.expandToken(Q)},Q):o.jsx(Ru,{label:ue.label,variant:ue.variant,icon:ue.icon},Q),ye))]})}F0.displayName="ChatComposerInput";const mR={root:{kaIpWk:"xy0xnkn",kmuXW:"x2lah0s",$$css:!0}};function G0(e){const t=be(),n=I4(),{isStopShown:s=(n==null?void 0:n.isStopShown)??!1,isDisabled:r=!((n==null?void 0:n.canSend)??!1),onSend:i,onStop:a=n==null?void 0:n.onStop,sendIcon:l,stopIcon:c,size:u="md",xstyle:d,className:f,style:h,ref:p,...m}=e,b=i??(()=>n==null?void 0:n.onSubmit("")),y=Ca("stop"),g=Ca("arrowUp");return o.jsx(re,{ref:p,label:t(s?"@astryx.chatSendButton.stop":"@astryx.chatSendButton.send"),variant:s?"secondary":"primary",size:u,icon:s?c??y:l??g,isIconOnly:!0,isDisabled:!s&&r,onClick:s?a:b,...m,...P("chat-send-button"),className:f,style:h,xstyle:[mR.root,d]})}G0.displayName="ChatSendButton";const Jb={body:{kVAEAm:"x1n2onr6",kY2c9j:"xhtitgo",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kmVPX3:"x18oj4ui",kOIVth:"x1txdalj",kaIpWk:"x1xunbrq",kWkggS:"x1prclbq",kkrTdU:"x1ed109x",kmkexE:"xrg7dcy",$$css:!0},compact:{"--_chat-composer-padding":"x18zce08",kOIVth:"xzye2dw",$$css:!0}},yR={low:{kGVxlE:"x1i5ehqx xhouywz",knuKkz:"xyavpck",$$css:!0},none:{kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kVAM5u:"xvy26l8 x6q1khz",kmVPX3:"x1b50gpf",kGVxlE:"x1gnnqk1 x12y27fx xuihb5h",$$css:!0}};function _4(e){const t=be(),{ref:n,onSubmit:s,onStop:r,isStopShown:i=!1,value:a,onChange:l,placeholder:c,isDisabled:u=!1,density:d="balanced",elevation:f="low",drawer:h,headerActions:p,headerContext:m,input:b,footerActions:y,sendActions:g,sendButton:k,status:v,statusPosition:w="bottom",xstyle:j,className:$,style:C,...E}=e,T=c??t("@astryx.chat.composer.placeholder"),[S,N]=x.useState(""),z=a!==void 0,M=z?a:S,R=x.useCallback(F=>{z||N(F),l==null||l(F)},[z,l]),I=x.useCallback(()=>{const F=M.trim();!F||u||(s(F),R(""))},[M,u,s,R]),A=M.trim().length>0&&!u,_=x.useRef(null),O=x.useRef(null),D=x.useCallback(F=>{var Z;if(F.target.closest('button, a, [role="button"], [contenteditable="true"], [data-astryx-token]'))return;if(O.current){O.current.focus();return}const Y=(Z=_.current)==null?void 0:Z.querySelector('[contenteditable="true"], textarea');Y==null||Y.focus()},[]),L=v?o.jsxs("div",{role:v.type==="error"?"alert":"status",...{0:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x1htvmrp xvpcij2 xckg3cf xkvxy4d x6k0y1c"},4:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x2gtn7z x9jihrk x1z0f2p2 xy7p8pm xzc3kxz"},2:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x1htvmrp xvpcij2 xckg3cf xkvxy4d x6k0y1c x1pritpl x1joocv1"},6:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x2gtn7z x9jihrk x1z0f2p2 xy7p8pm xzc3kxz x1pritpl x1joocv1"},1:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x1htvmrp xvpcij2 xckg3cf xkvxy4d x6k0y1c x24i8r5 xdhq94a"},5:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x2gtn7z x9jihrk x1z0f2p2 xy7p8pm xzc3kxz x24i8r5 xdhq94a"},3:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x1htvmrp xvpcij2 xckg3cf xkvxy4d x6k0y1c x24i8r5 xdhq94a"},7:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x2gtn7z x9jihrk x1z0f2p2 xy7p8pm xzc3kxz x24i8r5 xdhq94a"}}[(w==="top")<<2|(v.type==="error")<<1|(v.type==="warning")<<0],children:[o.jsx(Ce,{icon:v.type==="error"?"error":"warning",size:"md",color:v.type==="error"?"error":"warning"}),v.message]}):null,q=x.useMemo(()=>({value:M,onChange:R,onSubmit:I,placeholder:T,isDisabled:u,isStopShown:i,canSend:A,onStop:r,inputControlRef:O}),[M,R,I,T,u,i,A,r]);return o.jsx(P0,{value:q,children:o.jsxs("div",{ref:n,...U(P("chat-composer",{density:d}),{0:{className:"x1n2onr6 x1ja2u2z xc8icb0 x78zum5 xdt5ytf xx161y6 xk0ittl xcw7vlg"},1:{className:"x1n2onr6 x1ja2u2z xc8icb0 x78zum5 xdt5ytf xx161y6 xk0ittl xcw7vlg x197sbye x47corl"}}[!!u<<0],$,C),...E,children:[w==="top"&&L,h,o.jsxs("div",{ref:_,onClick:D,...B(Jb.body,yR[f],d==="compact"&&Jb.compact,j),children:[(p||m)&&o.jsxs("div",{className:"x78zum5 x6s0dn4 x1qughib x1txdalj xe0p6wg",children:[o.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:p}),o.jsx("div",{className:"x78zum5 x6s0dn4 x1txdalj xvc5jky x141an7d x1ltkj2j xv1l7n4",children:m})]}),o.jsx("div",{className:"x78zum5 xdt5ytf",children:b??o.jsx(F0,{})}),o.jsxs("div",{className:"x78zum5 x6s0dn4 x1qughib x1txdalj x21xpn4",children:[o.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:y}),o.jsxs("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:[g,k??o.jsx(G0,{})]})]})]}),w==="bottom"&&L]})})}_4.displayName="ChatComposer";const kR={root:{kVAEAm:"x1n2onr6",kY2c9j:"x1vjfegm",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kVQacm:"xb3r6kr",kg3NbH:"x1pzlopt",kLKAdn:"x1vlblms",kGO01o:"xxbfulo",k1K539:"x1cdrix3",kWkggS:"x10xzikg",kKwaWg:"x1vrk509",krdFHd:"x1n70msy",kfmiAY:"xg0tfu",$$css:!0}};function O4({ref:e,children:t,count:n,label:s,isCollapsed:r,defaultIsCollapsed:i=!1,onCollapsedChange:a,xstyle:l,className:c,style:u,"data-testid":d,...f}){const h=be(),p=s??h("@astryx.chat.composerDrawer.label"),[m,b]=x.useState(i),y=r!==void 0,g=y?r:m,k=n!=null,v=x.useId(),w=()=>{const j=!g;y||b(j),a==null||a(j)};return o.jsxs("div",{ref:e,"data-testid":d,...U(P("chat-composer-drawer",{collapsed:g?"collapsed":null}),B(kR.root,l),c,u),...f,children:[k&&o.jsxs("div",{...{0:{className:"xrvj5dj x1y6fwsi x6s0dn4 x1grt7ep x1pzlopt x1ng9b9t x1ypdohk x87ps6o x-default-marker"},1:{className:"xrvj5dj x1y6fwsi x6s0dn4 x1grt7ep x1pzlopt x1ng9b9t x1ypdohk x87ps6o x-default-marker"}}[!!g<<0],role:"button",tabIndex:0,"aria-expanded":!g,"aria-controls":v,"aria-label":g?h("@astryx.chatComposerDrawer.expand",{label:p}):h("@astryx.chatComposerDrawer.collapse",{label:p}),onClick:w,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),w())},children:[o.jsxs("div",{...{0:{className:"x1ms6mhf xgkxs2y x1lqcxt8 x3nfvp2 x6s0dn4 x1grt7ep x1txdalj xjspbzw x1hc1fzr x19991ni xuedmi6 xlr8y92"},1:{className:"x1ms6mhf xgkxs2y x1lqcxt8 x3nfvp2 x6s0dn4 x1grt7ep x1txdalj xjspbzw x19991ni xuedmi6 xlr8y92 xg01cxk x47corl"}}[!g<<0],children:[o.jsx(Ru,{variant:"neutral",label:n}),o.jsx("span",{className:"xv1l7n4 x1t9gxa6 xjm74w1 x7acx1w xt3l3uh xuedmi6 xlr8y92",children:p})]}),o.jsx("div",{...{0:{className:"x1ms6mhf xgkxs2y x7v7x1q x1y8v6su xfyiiit x1b2l0oc xjspbzw x1q5y3ey x1pe4z86 x1hc1fzr x1e8aii2 xuedmi6 xlr8y92"},1:{className:"x1ms6mhf xgkxs2y x7v7x1q x1y8v6su xfyiiit x1b2l0oc xjspbzw x1q5y3ey x1pe4z86 x1e8aii2 xuedmi6 xlr8y92 xg01cxk x47corl"}}[!!g<<0]})]}),o.jsx("div",{id:v,...{0:{className:"xrvj5dj x1tu4anv x1qn9uv2 x80gvsz xlr8y92"},1:{className:"xrvj5dj x1qn9uv2 x80gvsz xlr8y92 xihq33y"}}[!!(k&&g)<<0],children:o.jsx("div",{...{0:{className:"x2lwn1j x78zum5 x1a02dak xzye2dw x1cy8zhl x1hc1fzr x19991ni x80gvsz x10b1n17 xlr8y92"},1:{className:"x2lwn1j x78zum5 x1a02dak xzye2dw x1cy8zhl x19991ni xlr8y92 xg01cxk x1ahifba xuedmi6"}}[!!(k&&g)<<0],children:t})})]})}O4.displayName="ChatComposerDrawer";const rc={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kUk6DE:"x98rzlu",kAzted:"x2lwn1j",$$css:!0},inner:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kUk6DE:"x98rzlu",kAzted:"x2lwn1j",$$css:!0},gapCompact:{kOIVth:"x1txdalj",k8WAf4:"xce4md1",kg3NbH:"xrrkdod",$$css:!0},gapBalanced:{kOIVth:"x18g69wz",k8WAf4:"x1na6nto",kg3NbH:"x1pzlopt",$$css:!0},gapSpacious:{kOIVth:"x1qh66ti",k8WAf4:"xq6koh6",kg3NbH:"xm7rs69",$$css:!0}},bR={0:{kOIVth:"xsn7fz1",$$css:!0},1:{kOIVth:"xzye2dw",$$css:!0},2:{kOIVth:"x1txdalj",$$css:!0},3:{kOIVth:"xjcht0a",$$css:!0},4:{kOIVth:"x18g69wz",$$css:!0},5:{kOIVth:"x9mgr7n",$$css:!0},6:{kOIVth:"x1qh66ti",$$css:!0},8:{kOIVth:"x4t41sb",$$css:!0},10:{kOIVth:"x3hoi3v",$$css:!0},"0.5":{kOIVth:"x1lsbc85",$$css:!0},"1.5":{kOIVth:"x1s4dlld",$$css:!0}};function D4({children:e,emptyState:t,scrollToTopAction:n,density:s="balanced",gap:r,isStreaming:i=!1,xstyle:a,className:l,style:c,"data-testid":u,ref:d,...f}){const h=pR(),p=x.useRef(null),m=x.useRef(null),[b,y]=x.useTransition();x.useEffect(()=>{if(h!=null&&h.contentRef&&m.current)return h.contentRef(m.current),()=>h.contentRef(null)},[h]);const g=e!=null&&e!==!1&&!(Array.isArray(e)&&e.length===0);x.useEffect(()=>{var C;const j=(C=h==null?void 0:h.scrollContainerRef)==null?void 0:C.current;if(!n||!p.current)return;const $=new IntersectionObserver(E=>{var T;(T=E[0])!=null&&T.isIntersecting&&y(async()=>{await n()})},{root:j??null,threshold:0});return $.observe(p.current),()=>$.disconnect()},[n,h]);const k=x.useMemo(()=>({density:s}),[s]),v=s==="compact"?rc.gapCompact:s==="spacious"?rc.gapSpacious:rc.gapBalanced,w=r==null?null:bR[r];return o.jsx(H0,{value:k,children:o.jsx("div",{...f,ref:d,role:"log","aria-live":"polite","aria-busy":i||void 0,tabIndex:0,"data-testid":u,...U(P("chat-message-list",{density:s}),B(rc.root,a),l,c),children:o.jsxs("div",{ref:m,...B(rc.inner,v,w),children:[n&&o.jsx("div",{ref:p,"aria-hidden":!0}),b&&o.jsx("div",{className:"x78zum5 xl56j7k x8o8v82",children:o.jsx(on,{size:"md"})}),o.jsx("div",{className:"x98rzlu x2lwn1j","aria-hidden":!0}),g?e:t?o.jsx("div",{className:"x78zum5 x6s0dn4 xl56j7k x98rzlu x2lwn1j",children:t}):null]})})})}D4.displayName="ChatMessageList";const Nt={root:{k1xSpc:"x78zum5",kGNEyG:"x1cy8zhl",ks0D6T:"x193iq5w",$$css:!0},rootGapCompact:{kOIVth:"x1s4dlld",$$css:!0},rootGapBalanced:{kOIVth:"x1txdalj",$$css:!0},rootGapSpacious:{kOIVth:"xjcht0a",$$css:!0},rootAssistant:{kXwgrk:"x1q0g3np",kjj79g:"x1nhvcw1",$$css:!0},rootUser:{kXwgrk:"x15zctf7",kjj79g:"x1nhvcw1",$$css:!0},rootSystem:{kXwgrk:"x1q0g3np",kjj79g:"xl56j7k",$$css:!0},contentColumn:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kUk6DE:"x98rzlu",k7Eaqz:"xeuugli",$$css:!0},contentColumnSystem:{ks0D6T:"xq8v1hd",kGNEyG:"x6s0dn4",$$css:!0},contentColumnAssistant:{kGNEyG:"x1cy8zhl",$$css:!0},contentColumnUser:{kGNEyG:"xuk3077",$$css:!0},childrenWrap:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",k7Eaqz:"xeuugli",kzqmXN:"xh8yej3",$$css:!0},childrenAssistant:{kGNEyG:"x1cy8zhl",$$css:!0},childrenUser:{kGNEyG:"xuk3077",$$css:!0},childrenSystem:{kGNEyG:"x6s0dn4",$$css:!0},childrenGapCompact:{kOIVth:"x1lsbc85",$$css:!0},childrenGapBalanced:{kOIVth:"xzye2dw",$$css:!0},childrenGapSpacious:{kOIVth:"x1s4dlld",$$css:!0}};function V0({sender:e,children:t,avatar:n,name:s,metadata:r,density:i,xstyle:a,className:l,style:c,"data-testid":u,ref:d,...f}){const h=be(),p=xR(),m=i??(p==null?void 0:p.density)??"balanced",b=x.useMemo(()=>({sender:e,density:m}),[e,m]),y=m==="compact"?Nt.rootGapCompact:m==="spacious"?Nt.rootGapSpacious:Nt.rootGapBalanced,g=m==="compact"?Nt.childrenGapCompact:m==="spacious"?Nt.childrenGapSpacious:Nt.childrenGapBalanced,k=e==="system"?Nt.rootSystem:e==="user"?Nt.rootUser:Nt.rootAssistant,v=e==="system"?Nt.contentColumnSystem:e==="user"?Nt.contentColumnUser:Nt.contentColumnAssistant,w=e==="system"?Nt.childrenSystem:e==="user"?Nt.childrenUser:Nt.childrenAssistant,j=e==="system",$=n!=null&&!j,C=s!=null&&!j,E=x.useId();return o.jsx(q0,{value:b,children:o.jsxs("article",{...f,ref:d,"data-testid":u,"aria-label":C?void 0:h("@astryx.chatMessage.messageFrom",{sender:e}),"aria-labelledby":C?E:void 0,...U(P("chat-message",{sender:e,density:m}),B(Nt.root,k,$&&y,a),l,c),children:[$&&o.jsx("div",{className:"x2lah0s x5du68j",children:n}),o.jsxs("div",{...B(Nt.contentColumn,v),children:[C&&o.jsx("div",{id:E,className:"x141an7d x2mo6ok xv1l7n4 x1ltkj2j x14cgwvg",children:s}),o.jsx("div",{...B(Nt.childrenWrap,w,g),children:t}),r!=null&&!j&&o.jsx("div",{children:r})]})]})})}V0.displayName="ChatMessage";const at={content:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",ks0D6T:"xl6temz",kaIpWk:"xashgol",kMv6JI:"x9ynric",kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",kHjlTd:"x1mzt3pk",kTgw9:"x13faqbe",$$css:!0},radiusCompact:{kaIpWk:"x1hviunn",$$css:!0},paddingCompact:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",$$css:!0},paddingBalanced:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",$$css:!0},paddingSpacious:{k8WAf4:"x1na6nto",kg3NbH:"xzz68wx",$$css:!0},paddingBlockNone:{k8WAf4:"xt970qd",$$css:!0},metadataPaddingCompact:{kg3NbH:"x1pzlopt",$$css:!0},metadataPaddingBalanced:{kg3NbH:"x1pzlopt",$$css:!0},metadataPaddingSpacious:{kg3NbH:"xzz68wx",$$css:!0},metadataReducedGap:{keoZOQ:"x1c40v9y",$$css:!0},headerReducedGap:{k1K539:"xdrfirk",$$css:!0},nameRow:{kZKoxP:"x1grt7ep",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",$$css:!0},alignEnd:{k9WMMc:"xp4054r",$$css:!0},assistant:{kWkggS:"x17x4s8c",kMwMTN:"x1tgivj0",$$css:!0},user:{kWkggS:"x17x4s8c",kMwMTN:"x1tgivj0",$$css:!0},ghost:{kWkggS:"xjbqb8w",kMwMTN:"x1tgivj0",$$css:!0},groupFirstAssistant:{kVL7Gh:"xrfs2vl",$$css:!0},groupMiddleAssistant:{krdFHd:"x3qb8m",kVL7Gh:"xrfs2vl",$$css:!0},groupLastAssistant:{krdFHd:"x3qb8m",$$css:!0},groupFirstUser:{kT0f0o:"x1whkvtz",$$css:!0},groupMiddleUser:{kfmiAY:"x126per9",kT0f0o:"x1whkvtz",$$css:!0},groupLastUser:{kfmiAY:"x126per9",$$css:!0}};function L4({children:e,variant:t="filled",name:n,metadata:s,group:r,xstyle:i,className:a,style:l,"data-testid":c,ref:u,...d}){const f=hR(),h=(f==null?void 0:f.sender)??"assistant",p=(f==null?void 0:f.density)??"balanced",m=p==="compact"?at.paddingCompact:p==="spacious"?at.paddingSpacious:at.paddingBalanced,b=h==="user",y=t==="ghost"?at.ghost:b?at.user:at.assistant,g=r==="first"?b?at.groupFirstUser:at.groupFirstAssistant:r==="middle"?b?at.groupMiddleUser:at.groupMiddleAssistant:r==="last"?b?at.groupLastUser:at.groupLastAssistant:null,k=p==="compact"?at.metadataPaddingCompact:p==="spacious"?at.metadataPaddingSpacious:at.metadataPaddingBalanced;return o.jsxs(o.Fragment,{children:[n&&o.jsx("div",{"data-chat-name":!0,...B(k,at.nameRow,at.headerReducedGap,b&&at.alignEnd),children:n}),o.jsx("div",{...d,ref:u,"data-testid":c,...U(P("chat-message-bubble",{sender:h,variant:t,density:p}),B(at.content,p==="compact"&&at.radiusCompact,y,m,t==="ghost"&&at.paddingBlockNone,g,i),a,l),children:e}),s&&o.jsx("div",{...B(k,at.metadataReducedGap,b&&at.alignEnd),children:s})]})}L4.displayName="ChatMessageBubble";const ev={root:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"x1txdalj",k8WAf4:"xu0wf1k",kMv6JI:"x9ynric",kGuDYH:"x141an7d",k63SB2:"x1sodnla",kMwMTN:"xv1l7n4",k9WMMc:"x2b8uid",$$css:!0},dividerWrap:{kzqmXN:"xh8yej3",$$css:!0}};function Kf({children:e,variant:t="default",icon:n,xstyle:s,className:r,style:i,ref:a,...l}){return t==="divider"?o.jsx("div",{ref:a,...U(P("chat-system-message",{variant:t}),B(ev.dividerWrap,s),r,i),...l,role:"status",children:o.jsx(Wc,{label:e})}):o.jsx("div",{ref:a,...U(P("chat-system-message",{variant:t}),B(ev.root,s),r,i),...l,role:"status",children:o.jsxs("span",{className:"x3nfvp2 x6s0dn4 x1s4dlld x2lah0s xuxw1ft",children:[n!=null&&o.jsx("span",{className:"x3nfvp2 x6s0dn4 x2lah0s",children:n}),e]})})}Kf.displayName="ChatSystemMessage";const vR=1e3/60;function wR({scrollRef:e,enabled:t=!0,lockThreshold:n=10,buttonThreshold:s=100,damping:r=.7,stiffness:i=.05,mass:a=1.25}){const[l,c]=x.useState(!1),[u,d]=x.useState(!0),f=x.useRef(!0),h=x.useRef(!0),p=x.useRef(0),m=x.useRef(!1),b=x.useRef(void 0),y=x.useRef(0),g=x.useRef(0),k=x.useRef(0),v=x.useCallback(()=>{const M=e.current;if(!M||!f.current){m.current=!1,b.current=void 0,p.current=0;return}if(M.scrollHeight<=M.clientHeight){m.current=!1,b.current=void 0,p.current=0;return}const R=M.scrollHeight-M.clientHeight,I=R-M.scrollTop;if(Math.abs(I)<.5&&Math.abs(p.current)<.1){M.scrollTop=R,m.current=!1,b.current=void 0,p.current=0;return}const A=performance.now(),_=b.current?(A-b.current)/vR:1;b.current=A,p.current=(r*p.current+i*I)/a,M.scrollTop+=p.current*_,requestAnimationFrame(v)},[e,r,i,a]),w=x.useCallback(()=>{const M=e.current;M&&(m.current=!1,p.current=0,b.current=void 0,M.scrollTop=M.scrollHeight-M.clientHeight,y.current=M.scrollTop)},[e]),j=qa("(prefers-reduced-motion: reduce)"),$=x.useCallback(()=>{if(f.current){if(j){w();return}m.current||(m.current=!0,b.current=void 0,requestAnimationFrame(v))}},[v,w,j]),C=x.useCallback(M=>{if(f.current=!0,d(!0),c(!1),h.current=!1,(M==null?void 0:M.behavior)==="instant"){w();return}$()},[$,w]),E=x.useCallback(M=>{const R=e.current;if(!R)return;const I=R.getBoundingClientRect(),_=M.getBoundingClientRect().top-I.top+R.scrollTop;R.scrollTo({top:_,behavior:"instant"}),y.current=R.scrollTop},[e]),T=x.useCallback(()=>{const M=e.current;if(!M)return;const R=M.getElementsByClassName("astryx-chat-message"),I=R[R.length-1];I instanceof HTMLElement&&E(I)},[e,E]),S=x.useCallback(()=>{f.current=!0,d(!0),c(!1),$()},[$]),N=x.useCallback(()=>{f.current=!1,m.current=!1,d(!1)},[]),z=x.useCallback(()=>{if(!t||!f.current)return;const M=e.current;if(h.current&&M&&M.scrollHeight>M.clientHeight){h.current=!1,w();return}$()},[t,$,w,e]);return x.useEffect(()=>{const M=e.current;if(!M||!t)return;y.current=M.scrollTop,g.current=M.scrollHeight,k.current=M.offsetHeight;const R=()=>{const{scrollTop:O,scrollHeight:D,offsetHeight:L}=M,q=D-O-L;c(q>s);const F=D!==g.current,X=L!==k.current;if(g.current=D,k.current=L,F||X){y.current=O;return}const Y=O<y.current;y.current=O,Y&&f.current&&(f.current=!1,m.current=!1,d(!1))},I=()=>{M.scrollHeight-M.scrollTop-M.offsetHeight<=n&&(f.current=!0,d(!0))},A=O=>{O.deltaY<0&&m.current&&(f.current=!1,m.current=!1,d(!1))},_=()=>{m.current&&(f.current=!1,m.current=!1,d(!1))};return M.addEventListener("scroll",R,{passive:!0}),M.addEventListener("scrollend",I),M.addEventListener("wheel",A,{passive:!0}),M.addEventListener("touchmove",_,{passive:!0}),requestAnimationFrame(()=>{M.scrollHeight>M.clientHeight&&(M.scrollTop=M.scrollHeight-M.clientHeight,y.current=M.scrollTop,h.current=!1)}),()=>{M.removeEventListener("scroll",R),M.removeEventListener("scrollend",I),M.removeEventListener("wheel",A),M.removeEventListener("touchmove",_)}},[e,t,n,s]),{isScrolledUp:l,isLocked:u,scrollToBottom:C,scrollToMessage:E,lock:S,unlock:N,scrollIfLocked:z,scrollToLastMessage:T}}function jR({isLocked:e,onResize:t}){const[n,s]=x.useState(!1),r=x.useRef(null),i=x.useRef(e);i.current=e;const a=x.useRef(t);a.current=t;const l=x.useRef(null),c=x.useRef(null),u=x.useCallback(p=>{h0(p,()=>{var y;(y=a.current)==null||y.call(a);const m=p.getElementsByClassName("astryx-chat-message"),b=m.length>0?m[m.length-1]:null;b&&b!==r.current&&(r.current=b,i.current||s(!0))}),c.current=()=>x0(p)},[]),d=x.useCallback(()=>{var p;(p=c.current)==null||p.call(c),c.current=null},[]),f=x.useCallback(p=>{p!==l.current&&(d(),l.current=p,p&&u(p))},[u,d]);x.useEffect(()=>()=>d(),[d]);const h=x.useCallback(()=>{s(!1)},[]);return{hasNewMessages:n,dismiss:h,contentRef:f}}const jr={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",keoZOQ:"xtbrsbv",$$css:!0},statusIcon:{kVAEAm:"x1n2onr6",k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",kaIpWk:"xjspbzw",$$css:!0},nodePill:{kmuXW:"x2lah0s",$$css:!0},colorPending:{kMwMTN:"xnbbluu",$$css:!0},colorRunning:{kMwMTN:"xqwr325",$$css:!0},colorComplete:{kMwMTN:"xtjic6",$$css:!0},colorError:{kMwMTN:"xjt36v0",$$css:!0}},B4={pending:"clock",running:null,complete:"check",error:"close"},q4={pending:jr.colorPending,running:jr.colorRunning,complete:jr.colorComplete,error:jr.colorError};function SR(e){return bE(e.key,()=>{var t,n;return[e.name,e.status??"complete",e.target??"",e.node??"",e.duration??"",((t=e.additions)==null?void 0:t.toString())??"",((n=e.deletions)==null?void 0:n.toString())??"",e.errorMessage??""].join("")})}function tv({call:e}){const t=be(),n=e.status??"complete",s=e.resultDetail!=null,[r,i]=x.useState(!1),a=x.useId(),l=s?()=>i(u=>!u):void 0,c=o.jsxs("div",{role:s?"button":void 0,tabIndex:s?0:void 0,"aria-expanded":s?r:void 0,"aria-controls":s&&r?a:void 0,onClick:l,onKeyDown:s?u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),l==null||l())}:void 0,...{0:{className:"x78zum5 x6s0dn4 x1s4dlld xjwf9q1 x13f7esw"},1:{className:"x78zum5 x6s0dn4 x1s4dlld xjwf9q1 x13f7esw x1ypdohk xh6dtrn x7a5moj xtedp8i xe9uy6x"}}[!!s<<0],children:[o.jsxs("span",{title:n==="error"?e.errorMessage:void 0,...B(jr.statusIcon,q4[n]),children:[n==="running"?o.jsx(on,{size:"sm",shade:"subtle"}):n==="pending"?o.jsx(on,{size:"sm",shade:"subtle"}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"x10l6tqk x10a8y8t x1pjcqnp xtwfq29 x1xyvc85"}),o.jsx("span",{className:"x1n2onr6 x3nfvp2",children:o.jsx(Ce,{icon:B4[n]??"check",size:"xsm",color:"inherit"})})]}),n==="error"&&e.errorMessage!=null&&o.jsx(Mi,{children:t("@astryx.chatToolCalls.error",{message:e.errorMessage??""})})]}),o.jsx("span",{className:"x141an7d x1ltkj2j x9m5x89 x1e4wzip xv1l7n4 xuxw1ft xb3r6kr xlyipyv xs83m0k x13n9wmd",children:e.name}),e.node!=null&&o.jsx(Ru,{label:e.node,variant:"neutral",xstyle:jr.nodePill}),e.target!=null&&o.jsx("span",{className:"x141an7d x1ltkj2j x9ynric xnbbluu xuxw1ft xb3r6kr xlyipyv x1g3ib7 xeuugli",children:e.target}),(e.additions!=null||e.deletions!=null||e.stats!=null)&&o.jsxs("span",{className:"x78zum5 x6s0dn4 xzye2dw x141an7d x1ltkj2j x9ynric xnbbluu x2lah0s",children:[e.additions!=null&&o.jsxs("span",{className:"xtjic6",children:["+",e.additions]}),e.deletions!=null&&o.jsxs("span",{className:"xjt36v0",children:["-",e.deletions]}),e.stats]}),e.duration!=null&&n==="complete"&&o.jsx("span",{className:"x141an7d x1ltkj2j x9ynric xnbbluu xuxw1ft x2lah0s",children:e.duration}),s&&o.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnbbluu x1ob6yzd x9kvfbb xvc5jky"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnbbluu x1ob6yzd x9kvfbb xvc5jky x19jd1h0"}}[!!r<<0],children:o.jsx(Ce,{icon:"chevronDown",size:"xsm",color:"inherit"})})]});return s?o.jsxs("div",{children:[c,r&&o.jsx("div",{id:a,className:"x1f43n9v x1wesfrj",children:e.resultDetail})]}):c}function H4(e){const t=be(),{calls:n,label:s,isExpanded:r,defaultIsExpanded:i,onExpandedChange:a,xstyle:l,className:c,style:u,ref:d,...f}=e,h=i??!1,[p,m]=x.useState(h),b=x.useId(),y=r!==void 0,g=y?r:p,k=x.useCallback(()=>{const j=!g;y||m(j),a==null||a(j)},[g,y,a]);if(n.length===0)return null;if(n.length===1)return o.jsx("div",{ref:d,...U(P("chat-tool-calls"),B(jr.root,l),c,u),...f,children:o.jsx(tv,{call:n[0]})});const v=n[n.length-1],w=v.status??"complete";return o.jsxs("div",{ref:d,...U(P("chat-tool-calls"),B(jr.root,l),c,u),...f,children:[o.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":g,"aria-controls":b,onClick:k,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),k())},className:"x78zum5 x6s0dn4 x1s4dlld xjwf9q1 x13f7esw x1ypdohk",children:[g?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x1kky2od xlup9mm xv1l7n4",children:o.jsx(Ce,{icon:"wrench",size:"sm",color:"inherit"})}),o.jsx("span",{className:"x141an7d x1ltkj2j x9ynric x1e4wzip xv1l7n4",children:t("@astryx.chatToolCalls.groupLabel",{count:n.length})})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{...B(jr.statusIcon,q4[w]),children:w==="running"?o.jsx(on,{size:"sm",shade:"subtle"}):w==="pending"?o.jsx(on,{size:"sm",shade:"subtle"}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"x10l6tqk x10a8y8t x1pjcqnp xtwfq29 x1xyvc85"}),o.jsx("span",{className:"x1n2onr6 x3nfvp2",children:o.jsx(Ce,{icon:B4[w]??"check",size:"xsm",color:"inherit"})})]})}),o.jsx("span",{className:"x141an7d x1ltkj2j x9m5x89 x1e4wzip xv1l7n4 xuxw1ft xb3r6kr xlyipyv xs83m0k x13n9wmd",children:v.name}),v.target!=null&&o.jsx("span",{className:"x141an7d x1ltkj2j x9ynric xnbbluu xuxw1ft xb3r6kr xlyipyv x1g3ib7 xeuugli",children:v.target})]}),o.jsx("span",{className:"x3nfvp2 x6s0dn4 x1lsbc85 x141an7d x1ltkj2j x9ynric xnbbluu x2lah0s",children:!g&&o.jsxs(o.Fragment,{children:[o.jsx(Ce,{icon:"wrench",size:"xsm",color:"inherit"}),n.length]})}),o.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnbbluu x1ob6yzd x9kvfbb"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnbbluu x1ob6yzd x9kvfbb x19jd1h0"}}[!!g<<0],children:o.jsx(Ce,{icon:"chevronDown",size:"xsm",color:"inherit"})})]}),o.jsx("div",{id:b,...{0:{className:"xrvj5dj xihq33y xb0j27v x9kvfbb"},1:{className:"xrvj5dj xb0j27v x9kvfbb x1tu4anv"}}[!!g<<0],children:o.jsx("div",{className:"xb3r6kr x2lwn1j",children:o.jsx("div",{className:"x78zum5 xdt5ytf x7a5moj xtedp8i",children:n.map(j=>o.jsx(tv,{call:j},SR(j)))})})})]})}H4.displayName="ChatToolCalls";const j1={wrapper:{k1xSpc:"x78zum5",kjj79g:"xl56j7k",kGO01o:"xvmdzux",$$css:!0},button:{"--radius-element":"xnpej1e",khDVqt:"xuxw1ft",kg3NbH:"xf314gf",$$css:!0},buttonWithLabel:{kwRFfy:"x1t818jl",$$css:!0}};function P4({ref:e,isVisible:t,label:n,onClick:s,xstyle:r,className:i,style:a,...l}){const c=be();return o.jsx("div",{ref:e,...U(B(j1.wrapper,r),i,a),...l,children:o.jsx("div",{...{0:{className:"xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x12w9bfk xg01cxk x47corl x1x67gh"},2:{className:"xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x12w9bfk x1hc1fzr x67bb7w x1x67gh"},1:{className:"xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x12w9bfk xg01cxk x47corl x1ncir08"},3:{className:"xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x12w9bfk x1hc1fzr x67bb7w x1ncir08"}}[!!t<<1|!!n<<0],children:o.jsx(re,{label:n??c("@astryx.chatLayoutScrollButton.scrollToBottom"),"aria-label":n??c("@astryx.chatLayoutScrollButton.scrollToBottom"),icon:o.jsx(Ce,{icon:"chevronDown",size:"md"}),variant:"ghost",size:"md",onClick:s,xstyle:[j1.button,n?j1.buttonWithLabel:null],children:n??void 0})})})}P4.displayName="ChatLayoutScrollButton";const Mt={root:{kVAEAm:"x1n2onr6",k9g6sI:"x12h1iku",kAzted:"x2lwn1j",kUk6DE:"x98rzlu",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",$$css:!0},rootScrollable:{kORKVm:"x1odjw0f",kXHlph:"x6ikm8r",k5wCbM:"x1mqgsch",$$css:!0},messageArea:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kUOVxO:"xvueqy4",kzQI83:"x1iyjqo2",kmuXW:"x2lah0s",kCS8Yb:"xdl72j9",kGO01o:"xjpqqx5",kzqmXN:"xh8yej3",ks0D6T:"x193iq5w",kg3NbH:"xnjsko4",$$css:!0},blurLayer:{kVAEAm:"x10l6tqk",krVfgx:"x1ey2m1c",kLqNvP:"x1o0tod",kt4wiu:"xtijo5x",kfzvcC:"x47corl",k6WDB:"xvn2z4z",keRtuK:"x67t5t6",kZKoxP:"xpyat2d",kX1K2I:"xw26lqc",kAExgp:"x1bv1mxo",$$css:!0},dock:{kVAEAm:"x1n2onr6",kY2c9j:"x1vjfegm",kfzvcC:"x67bb7w",kg3NbH:"xrrkdod",kGO01o:"xvmdzux",$$css:!0},dockInner:{kUOVxO:"xvueqy4",kzqmXN:"xh8yej3",ks0D6T:"x193iq5w",$$css:!0},messageAreaCompact:{ks0D6T:"x193iq5w",kg3NbH:"xnjsko4",$$css:!0},messageAreaBalanced:{ks0D6T:"x193iq5w",kg3NbH:"xnjsko4",$$css:!0},messageAreaSpacious:{ks0D6T:"x1ap80js",kg3NbH:"x1pzlopt",$$css:!0},blurLayerCompact:{kZKoxP:"xwzfr38",kX1K2I:"xkm2don",kAExgp:"xiy8rlo",$$css:!0},blurLayerBalanced:{kZKoxP:"xpyat2d",kX1K2I:"xw26lqc",kAExgp:"x1bv1mxo",$$css:!0},blurLayerSpacious:{kZKoxP:"x1wkxgih",kX1K2I:"xr5yg4x",kAExgp:"xo9xo30",$$css:!0},dockCompact:{kg3NbH:"xf314gf",kGO01o:"x1wesfrj",$$css:!0},dockBalanced:{kg3NbH:"xrrkdod",kGO01o:"xvmdzux",$$css:!0},dockSpacious:{kg3NbH:"x1pzlopt",kGO01o:"xvmdzux",$$css:!0},dockInnerCompact:{ks0D6T:"x193iq5w",$$css:!0},dockInnerBalanced:{ks0D6T:"x193iq5w",$$css:!0},dockInnerSpacious:{ks0D6T:"x1ap80js",$$css:!0}};function $R(e){return!(e==null||e===!1||Array.isArray(e)&&e.length===0)}function U4({children:e,composer:t,density:n="balanced",emptyState:s,scrollButton:r,scrollRef:i,xstyle:a,className:l,style:c,"data-testid":u,ref:d,...f}){const h=be(),p=x.useRef(null),m=i??p,b=!i,y=wR({scrollRef:m}),g=jR({isLocked:y.isLocked,onResize:y.scrollIfLocked}),k=o.jsx(P4,{isVisible:y.isScrolledUp||g.hasNewMessages,label:g.hasNewMessages?h("@astryx.chatLayout.newMessages"):void 0,onClick:()=>{g.dismiss(),y.scrollToBottom()}}),v=x.useMemo(()=>({scrollContainerRef:m,contentRef:g.contentRef}),[m,g.contentRef]),w=!$R(e),$={compact:{messageArea:Mt.messageAreaCompact,blurLayer:Mt.blurLayerCompact,dock:Mt.dockCompact,dockInner:Mt.dockInnerCompact},balanced:{messageArea:Mt.messageAreaBalanced,blurLayer:Mt.blurLayerBalanced,dock:Mt.dockBalanced,dockInner:Mt.dockInnerBalanced},spacious:{messageArea:Mt.messageAreaSpacious,blurLayer:Mt.blurLayerSpacious,dock:Mt.dockSpacious,dockInner:Mt.dockInnerSpacious}}[n];return o.jsx(U0,{value:v,children:o.jsxs("div",{...f,ref:it(d,p),"data-testid":u,...U(P("chat-layout",{density:n}),B(Mt.root,b&&Mt.rootScrollable,a),l,c),children:[o.jsx("div",{...B(Mt.messageArea,$.messageArea),children:w&&s?o.jsx("div",{className:"x78zum5 x6s0dn4 xl56j7k x98rzlu xz65tgg",children:s}):e}),o.jsxs("div",{...{0:{className:"x1ey2m1c x1o0tod xtijo5x x1ja2u2z xc8icb0 x47corl x2lah0s xixxii4"},1:{className:"x1ey2m1c x1o0tod xtijo5x x1ja2u2z xc8icb0 x47corl x2lah0s x7wzq59"}}[!!b<<0],children:[r===void 0?k:r,o.jsx("div",{...B(Mt.blurLayer,$.blurLayer)}),o.jsx("div",{...B(Mt.dock,$.dock),children:o.jsx("div",{...B(Mt.dockInner,$.dockInner),children:t})})]})]})})}U4.displayName="ChatLayout";const Yc=x.createContext(null);Yc.displayName="ListContext";const S1={list:{kogj98:"x1ghz6dp",kZCmMZ:"x1c1uobl",kH6xsr:"x3ct3a4",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1lsbc85",$$css:!0},withDividers:{kOIVth:"xxhr3t",$$css:!0},withCounter:{kt6KFK:"xif0320",$$css:!0}},CR={kt6KFK:"x1khind5",$$css:!0},ER={counterStart:e=>[CR,{"--x-counterReset":`astryx-list ${e}`!=null?`astryx-list ${e}`:void 0}]};function xt({children:e,density:t="balanced",hasDividers:n=!1,header:s,listStyle:r="none",start:i,xstyle:a,className:l,style:c,"data-testid":u,ref:d}){const f=x.useId(),h=r==="decimal",p=h?"ol":"ul",m=x.useMemo(()=>({density:t,hasDividers:n,listStyle:r}),[t,n,r]),b=o.jsx(p,{ref:d,"data-testid":u,"aria-labelledby":s!=null?f:void 0,...h&&i!=null&&i!==1?{start:i}:{},role:"list",...U(P("list",{density:t,listStyle:r}),B(S1.list,n&&S1.withDividers,r!=="none"&&(i!=null&&i!==1?ER.counterStart(i-1):S1.withCounter),a),l,c),children:e});return s==null?o.jsx(Yc,{value:m,children:b}):o.jsx(Yc,{value:m,children:o.jsxs("div",{className:"x78zum5 xdt5ytf",children:[o.jsx("div",{id:f,className:"x1p37lm5",children:s}),b]})})}xt.displayName="List";const TR=[];function W0({label:e,isLabelHidden:t=!1,description:n,status:s,value:r,onChange:i,changeAction:a,density:l="balanced",hasDividers:c=!1,isDisabled:u=!1,disabledMessage:d,isReadOnly:f=!1,children:h,ref:p,width:m,xstyle:b,className:y,style:g,"data-testid":k,...v}){const w=x.useId(),j=x.useId(),$=x.useId(),C=x.useId(),[,E]=x.useTransition(),T=r!==void 0,S=r??TR,[N,z]=x.useOptimistic(S),[M,R]=x.useOptimistic(null),I=u&&!!d,A=ms({placement:"above",focusTrigger:"always",isEnabled:I}),_=x.useCallback((D,L)=>{i==null||i(D),a&&E(async()=>{z(D),L!==void 0&&R(L),await a(D)})},[i,a,E,z,R]),O=x.useMemo(()=>({value:T?N:void 0,onChange:T?_:void 0,isDisabled:u,hasDisabledMessage:I,isReadOnly:f,loadingValue:M}),[T,N,_,u,I,f,M]);return o.jsxs(Ll,{...v,ref:p,"data-testid":k,label:e,isLabelHidden:t,description:n,inputID:w,labelID:j,isGroupLabel:!0,descriptionID:n?$:void 0,isDisabled:u,status:s?{type:s.type,message:s.message,messageID:s.message?C:void 0}:void 0,statusVariant:"detached",width:m,xstyle:b,...U(P("checkbox-list"),{className:y,style:g}),children:[o.jsx(ox,{value:O,children:o.jsx("div",{ref:D=>{A.ref(D)},role:"group","aria-labelledby":j,"aria-describedby":[n?$:null,s!=null&&s.message?C:null,I?A.describedBy:null].filter(Boolean).join(" ")||void 0,children:o.jsx(xt,{density:l,hasDividers:c,children:h})})}),I&&A.renderTooltip(d)]})}W0.displayName="CheckboxList";const nv={withCounter:{kAmcRD:"xfrknyr",$$css:!0},withDivider:{kt9PQ7:"x92x3c3",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},zR={noRadius:{kaIpWk:"x2u8bby",$$css:!0}};function He({label:e,description:t,startContent:n,endContent:s,onClick:r,interactiveRef:i,href:a,target:l,rel:c,isDisabled:u=!1,isSelected:d=!1,xstyle:f,className:h,style:p,ref:m,...b}){const y=x.use(Yc),g=(y==null?void 0:y.density)??"balanced",k=(y==null?void 0:y.hasDividers)??!1,v=(y==null?void 0:y.listStyle)??"none",w=v!=="none",j=v==="disc"?o.jsx("span",{className:"xoi2r2e x9f619 x78zum5 x6s0dn4 xl56j7k x2lah0s x12xnipv x1233pnv",children:o.jsx("span",{className:"x1v4s8kt xols6we x16rqkct x19aspcf"})}):v==="circle"?o.jsx("span",{className:"xoi2r2e x9f619 x78zum5 x6s0dn4 xl56j7k x2lah0s x12xnipv x1233pnv",children:o.jsx("span",{className:"x1v4s8kt xols6we x16rqkct xmkeg23 x1y0btm7 xqcx1ss xjbqb8w"})}):v==="decimal"?o.jsx("span",{className:"xoi2r2e x2lah0s x1tgivj0 xjm74w1 xw6l6zx x12xnipv xc2ndz5"}):null;return o.jsx(Ua,{as:"li",ref:m,marker:j,startContent:n,label:e,description:t,endContent:s,onClick:r,interactiveRef:i,href:a,target:l,rel:c,isDisabled:u,isSelected:d,density:g,xstyle:[w&&nv.withCounter,k&&nv.withDivider,k&&zR.noRadius,f],...U(P("list-item"),{className:h,style:p}),...b})}He.displayName="ListItem";const AR={selected:{kWkggS:"xgcxg3y",$$css:!0}};function K0({label:e,"aria-label":t,value:n,description:s,endContent:r,isDisabled:i=!1,isLoading:a=!1,isChecked:l,onCheck:c,ref:u,xstyle:d,className:f,style:h,onClick:p,...m}){const b=be(),y=x.use(ox);if(y&&y.value!==void 0&&n===void 0)throw new Error("CheckboxListItem requires a `value` prop when used inside CheckboxList with a value array.");const g=t??(typeof e=="string"?e:b("@astryx.checkboxList.item.checkbox"));Il("CheckboxListItem",'`label` is a ReactNode, so the checkbox falls back to the generic accessible name "Checkbox". Pass `aria-label` with a concise string equivalent of the visible label so screen readers can tell items apart.',typeof e!="string"&&t==null);const k=x.use(Yc),w=((k==null?void 0:k.density)??"balanced")==="compact"?"sm":"md",j=((y==null?void 0:y.isDisabled)??!1)||i,$=(y==null?void 0:y.isReadOnly)??!1,C=a||((y==null?void 0:y.loadingValue)!=null&&n!==void 0?y.loadingValue===n:!1);let E=!1;y&&y.value!==void 0&&n!==void 0?E=y.value.includes(n):l!==void 0&&(E=l);const T=!$&&(y!=null||c!=null),S=x.useRef(null),N=T||p!=null,z=()=>{var M,R;if(!(j||$||C))if(y&&y.value!==void 0&&n!==void 0)y.value.includes(n)?(M=y.onChange)==null||M.call(y,y.value.filter(A=>A!==n),n):(R=y.onChange)==null||R.call(y,[...y.value,n],n);else{const I=E!==!0;c==null||c(I)}};return o.jsx(He,{...m,ref:u,label:e,description:s,endContent:r,isDisabled:j,interactiveRef:N?S:void 0,"aria-busy":C||void 0,xstyle:[E===!0&&!j&&!$&&AR.selected,d],className:f,style:h,startContent:o.jsx(i4,{ref:S,label:g,isLabelHidden:!0,value:E,onChange:()=>z(),onClick:p,isDisabled:j,isReadOnly:$,isLoading:C,size:w})})}K0.displayName="CheckboxListItem";const Zp=120;function NR(e){let t=0,n=0;const s=[];for(const l of e){const c=l.width;if((c==null?void 0:c.type)==="pixel")n+=c.value;else{const u=(c==null?void 0:c.value)??1,d=c!=null?c.minWidth??Zp:0;t+=u,s.push({key:l.key,proportion:u,minWidth:d})}}let r=0;if(t>0)for(const l of s){const c=l.minWidth*t/l.proportion;c>r&&(r=c)}const i=n+r,a=new Map;for(const l of e){const c=l.width,u={};if((c==null?void 0:c.type)==="pixel")u.width=`${c.value}px`,u.minWidth=`${c.value}px`;else{const d=(c==null?void 0:c.value)??1;if(t>0&&(u.width=`${d/t*100}%`),c!=null){const f=c.minWidth??Zp;u.minWidth=`${f}px`}}a.set(l.key,{style:u})}return{columns:a,tableMinWidth:i}}function MR(e=1,t){return{type:"proportional",value:e,minWidth:(t==null?void 0:t.minWidth)??Zp}}function sv(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function RR(e,t){const n=e[t];return n==null?"":n instanceof Date?n.toISOString():typeof n=="string"||typeof n=="number"||typeof n=="boolean"||typeof n=="bigint"?String(n):""}function IR(e){return e==null?0:typeof e=="string"?e.length:typeof e=="number"||typeof e=="boolean"?String(e).length:0}function _R(e){if(e==null||typeof e!="string"&&typeof e!="number"&&typeof e!="boolean")return 0;const t=String(e);let n=0,s=0;for(let r=0;r<=t.length;r++)r===t.length||t[r]===" "||t[r]===" "||t[r]===`
151
- `?(s>n&&(n=s),s=0):s++;return n}const OR=60,DR=8;function LR(e){if(e.length===0)return[];const t=e[0],n=Object.keys(t),s=e.slice(0,Math.min(5,e.length));return n.map(i=>{const a=sv(i).length;let l=a,c=a;for(const u of s){const d=IR(u[i]);d>l&&(l=d);const f=_R(u[i]);f>c&&(c=f)}return{key:i,headerLen:a,maxContentLen:l,maxWordLen:c}}).map(i=>{const a=i.maxContentLen<=6?1:i.maxContentLen<=15?2:3,l=Math.max(Math.max(i.headerLen,i.maxWordLen)*DR,OR);return{key:i.key,header:sv(i.key),width:MR(a,{minWidth:l})}})}const rv={x139im0d:"x139im0d",$$css:!0},F4={cell:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",ks0D6T:"x1m189uc",$$css:!0}},BR={cell:{kVQacm:"xb3r6kr",kHjlTd:"x1mzt3pk",kTgw9:"x13faqbe",ks0D6T:"x1m189uc",$$css:!0}},G4={compact:{kZCmMZ:"x5uh4xs",kwRFfy:"xbg7gas",$$css:!0},balanced:{kZCmMZ:"x9bi00s",kwRFfy:"xpilulx",$$css:!0},spacious:{kZCmMZ:"x18c6q21",kwRFfy:"x1wzlfcn",$$css:!0}},fx=x.createContext(null);fx.displayName="TableContext";const qR={row:{kWkggS:"x1dnou9g","--table-row-overlay":"x1rht92",$$css:!0}},HR={row:{kWkggS:"xe9uy6x","--table-row-overlay":"x1pkcbo2",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0}},PR={row:{kWkggS:"x1dnou9g xe9uy6x","--table-row-overlay":"x1rht92 x1pkcbo2",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0}};function Xf({children:e,xstyle:t,ref:n,isHeaderRow:s=!1,...r}){const i=x.use(fx);if(!i)return o.jsx("tr",{ref:n,...r,...U(P("table-row"),B(rv,t)),children:e});const a=[];return s||(i.isStriped&&i.hasHover?a.push(PR.row):i.isStriped?a.push(qR.row):i.hasHover&&a.push(HR.row)),i.dividers==="rows"||i.dividers,t&&a.push(...t),o.jsx("tr",{ref:n,...r,...U(P("table-row"),B(rv,...a)),children:e})}Xf.displayName="TableRow";const pd={trigger:{kVAEAm:"x1n2onr6",k7VYTy:"xpdipgo",$$css:!0},menu:{kB7OPa:"x9f619",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1lsbc85",kskxy:"xuyqlj2",kORKVm:"x1odjw0f","--_dropdown-menu-radius":"x1fcsqxe","--_dropdown-menu-padding":"xgory14",kmVPX3:"x9epnlk",kaIpWk:"x1n97fys",kWkggS:"x1prclbq",kGVxlE:"x1i5ehqx",kSiTet:"x1hc1fzr",k1ekBW:"x19991ni",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kfSwDN:"x87ps6o",$$css:!0},popover:{k7Eaqz:"x5w4yej",$$css:!0},popoverCustomWidth:e=>[{k7Eaqz:(typeof e=="number"?`${e}px`:e)!=null?"xkj4a21":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(typeof e=="number"?`${e}px`:e)}]};function X0({children:e,menuWidth:t,size:n="md",label:s,isDisabled:r=!1,onOpenChange:i,ref:a,className:l,style:c,xstyle:u,triggerXstyle:d,"data-testid":f,...h}){const p=be(),m=s??p("@astryx.contextMenu.label"),{items:b,menuContent:y,...g}=h,k=b??[],v=y,w=x.useId(),j=x.useRef({x:0,y:0}),$=x.useRef(null),C=x.useRef(null),E=x.useRef(null),[T,S]=x.useState(!1),N=Rl({mode:"context",onHide:x.useCallback(()=>{S(!1),i==null||i(!1);const J=E.current;E.current=null,J&&document.contains(J)&&J.focus()},[i]),onShow:x.useCallback(()=>{S(!0),i==null||i(!0)},[i]),lightDismiss:!1}),z=x.useCallback(()=>{N.hide()},[N]),{listRef:M,handleKeyDown:R,focusFirst:I,focusItem:A,ownsEvent:_,getItems:O}=Pa({itemSelector:nx,boundarySelector:sx,wrap:!1,onEscape:z}),D=tx({getItemLabels:()=>O().map(J=>J.textContent),onMatch:A,getCurrentIndex:()=>O().findIndex(J=>J===document.activeElement||J.contains(document.activeElement))});x.useEffect(()=>{if(!T)return;const J=K=>{const ie=M.current;ie&&!ie.contains(K.target)&&z()};return document.addEventListener("mousedown",J),()=>{document.removeEventListener("mousedown",J)}},[T,z,M]),x.useEffect(()=>{if(!T)return;const J=K=>{K.key==="Escape"&&(K.isComposing||K.keyCode===229||(K.preventDefault(),z()))};return document.addEventListener("keydown",J),()=>{document.removeEventListener("keydown",J)}},[T,z]);const L=x.useCallback(J=>{if(_(J)){if(J.key==="Enter"||J.key===" "){J.preventDefault();const K=document.activeElement;K&&Iu.has(K.getAttribute("role")??"")&&K.click();return}if(J.key==="Tab"){z();return}if(D.onKeyDown(J)){J.preventDefault();return}R(J)}},[R,z,D,_]),q=x.useCallback((J,K,ie)=>{j.current={x:J,y:K};const le=$.current;le&&(le.style.left=`${J}px`,le.style.top=`${K}px`),E.current=document.activeElement instanceof HTMLElement?document.activeElement:ie,N.show(),requestAnimationFrame(()=>I())},[N,I]),F=x.useCallback(J=>{if(r)return;J.preventDefault();const K=C.current,ie=K==null?void 0:K.getBoundingClientRect(),le=J.clientX===0&&J.clientY===0&&J.detail===0,ve=le||!ie?0:J.clientX-ie.left,ge=le||!ie?(ie==null?void 0:ie.height)??0:J.clientY-ie.top;q(ve,ge,J.currentTarget)},[r,q]),X=cN({disabled:r,onLongPress:x.useCallback(J=>{var ie;const K=(ie=C.current)==null?void 0:ie.getBoundingClientRect();q(K?J.x-K.left:J.x,K?J.y-K.top:J.y,C.current)},[q])}),Y=t?pd.popoverCustomWidth(t):pd.popover,Z=x.useMemo(()=>({closeMenu:z,menuSize:n}),[z,n]),ne=b!==void 0?rx(k):v;return o.jsxs(o.Fragment,{children:[o.jsxs("div",{ref:it(a,C),onContextMenu:F,...X,...g,"data-testid":f,...B(pd.trigger,...d?Array.isArray(d)?d:[d]:[]),children:[e,o.jsx("span",{ref:it($,N.ref),"aria-hidden":"true",...U({className:"x10l6tqk xnalus7 xqtp20y x47corl"},{style:{left:`${j.current.x}px`,top:`${j.current.y}px`}})})]}),N.render(o.jsx("div",{ref:M,id:w,role:"menu","aria-label":m,onKeyDown:L,onContextMenu:J=>J.preventDefault(),...U(P("context-menu"),B(pd.menu,u),l,c),children:o.jsx(Ol,{value:Z,children:ne})}),{placement:"below",alignment:"start",xstyle:[Y,rr.below]})]})}X0.displayName="ContextMenu";function V4(e){const t=[],n=new Map;for(const r of e){const i=r.group??"__ungrouped__";let a=n.get(i);a||(a=[],n.set(i,a),t.push(i)),a.push(r)}const s=[];return t.forEach((r,i)=>{i>0&&s.push({type:"divider"});for(const a of n.get(r)??[])s.push({label:typeof a.label=="string"?a.label:a.id,icon:a.checked?o.jsx(Ce,{icon:"check",size:"xsm","aria-hidden":!0}):a.icon,isDisabled:a.disabled,onClick:a.onSelect})}),s}function UR({element:e,getActions:t,triggerXstyle:n}){const[s,r]=x.useState(null);return o.jsx(X0,{items:s??[],triggerXstyle:n,onOpenChange:i=>{r(i?V4(t()):null)},children:e})}function W4(e,t,n){return typeof t=="function"?o.jsx(UR,{element:e,getActions:t,triggerXstyle:n}):!t||t.length===0?e:o.jsx(X0,{items:V4(t),triggerXstyle:n,children:e})}function FR(e,t,n){const s=[];return(e.dividers==="rows"||e.dividers==="grid")&&s.push(t),(e.dividers==="columns"||e.dividers==="grid")&&s.push(n),s}function K4(e,t){return t?Array.isArray(t)?[...e,...t]:[...e,t]:e}function X4(){return x.use(fx)}const GR={compact:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},balanced:{k8WAf4:"xce4md1",kg3NbH:"xrrkdod",kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0}},VR={compact:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},balanced:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},spacious:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0}},WR={compact:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},balanced:{k8WAf4:"xce4md1",kg3NbH:"xrrkdod",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",$$css:!0}},iv={fill:{k1xSpc:"x1lliihq",kB7OPa:"x9f619",kZKoxP:"x5yr21d",kzqmXN:"xh8yej3",$$css:!0}},KR={cell:{kZKoxP:"x5yr21d",$$css:!0}},XR={cell:{kt9PQ7:"x92x3c3 x1wp2rvj",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},ZR={cell:{ke9TFa:"xw8tdv1 x1qlsc9e",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",$$css:!0}},YR={middle:{kXLuUW:"xxymvpz",$$css:!0},top:{kXLuUW:"x16dsc37",$$css:!0},bottom:{kXLuUW:"x3ajldb",$$css:!0}};function Z0({children:e,xstyle:t,ref:n,className:s,style:r,contextMenuActions:i,...a}){const l=X4(),c=typeof i=="function"||Array.isArray(i)&&i.length>0,u=l?[c?VR[l.density]:GR[l.density],l.textOverflow==="truncate"?F4.cell:BR.cell,G4[l.density],YR[l.verticalAlign],...FR(l,XR.cell,ZR.cell),...c?[KR.cell]:[]]:[],d=c&&l?[iv.fill,WR[l.density]]:c?iv.fill:void 0,f=W4(e,i,d);return o.jsx("td",{ref:n,...a,...U(P("table-cell",{density:l==null?void 0:l.density}),B(...K4(u,t)),s,r),children:f})}Z0.displayName="TableCell";const QR={compact:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",kGuDYH:"xcr08ib",kB7OPa:"x9f619",$$css:!0},balanced:{k8WAf4:"xce4md1",kg3NbH:"xrrkdod",kGuDYH:"xcr08ib",kB7OPa:"x9f619",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",kGuDYH:"xcr08ib",kB7OPa:"x9f619",$$css:!0}},JR={cell:{k63SB2:"x2mo6ok",kMwMTN:"xv1l7n4",k9WMMc:"x1yc453h",$$css:!0}},eI={cell:{kt9PQ7:"x92x3c3",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},tI={cell:{ke9TFa:"xw8tdv1 x1qlsc9e",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",$$css:!0}};function Y0({children:e,xstyle:t,ref:n,className:s,style:r,contextMenuActions:i,...a}){const l=X4(),c=[];l&&(c.push(JR.cell,QR[l.density],eI.cell,F4.cell,G4[l.density]),(l.dividers==="columns"||l.dividers==="grid")&&c.push(tI.cell));const u=W4(e,i);return o.jsx("th",{ref:n,...a,...U(P("table-header-cell",{density:l==null?void 0:l.density}),B(...K4(c,t)),s,r),children:u})}Y0.displayName="TableHeaderCell";function Q0({ref:e,children:t,xstyle:n,className:s,style:r,...i}){return o.jsx("thead",{ref:e,...U(P("table-header"),B(n),s,r),...i,children:t})}Q0.displayName="TableHeader";function J0({ref:e,children:t,xstyle:n,className:s,style:r,...i}){return o.jsx("tbody",{ref:e,...U(P("table-body"),B(n),s,r),...i,children:t})}J0.displayName="TableBody";const av={container:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",k9WMMc:"x2b8uid",kOIVth:"x18g69wz",k8WAf4:"xmfvnks",kg3NbH:"xm7rs69",$$css:!0},containerCompact:{kOIVth:"x1txdalj",k8WAf4:"x1na6nto",kg3NbH:"x1pzlopt",$$css:!0}};function Si({title:e,description:t,icon:n,actions:s,headingLevel:r=3,isCompact:i=!1,xstyle:a,className:l,style:c,ref:u,...d}){const f=`h${r}`;return o.jsxs("div",{ref:u,role:"status",...U(P("empty-state",{variant:i?"compact":null}),B(av.container,i&&av.containerCompact,a),l,c),...d,children:[n!=null&&o.jsx("div",{"aria-hidden":"true",children:n}),o.jsxs("div",{className:"x78zum5 xdt5ytf x6s0dn4 xxc7z9f",children:[x.createElement(f,{0:{className:"x1ghz6dp xjb2p0i x18juvz8 x2mo6ok xf74fhv x1tgivj0"},1:{className:"x1ghz6dp xjb2p0i x2mo6ok xf74fhv x1tgivj0 xcr08ib"}}[!!i<<0],e),t!=null&&o.jsx("div",{...{0:{className:"x1ghz6dp xjb2p0i xjm74w1 x1sodnla xw6l6zx xv1l7n4"},1:{className:"x1ghz6dp xjb2p0i x1sodnla xw6l6zx xv1l7n4 x141an7d"}}[!!i<<0],children:t})]}),s!=null&&o.jsx("div",{...{0:{className:"x78zum5 x1q0g3np x6s0dn4 x1txdalj xcsaf9d"},1:{className:"x78zum5 x6s0dn4 x1txdalj xcsaf9d xdt5ytf"}}[!!i<<0],children:s})]})}Si.displayName="EmptyState";const $1={table:{kzqmXN:"xh8yej3",kLvRdT:"x1mwwwfo",kheTzg:"x1gukg7c",kPzzVL:"x140o2bo",$$css:!0},tableAutoLayout:{kPzzVL:"x1drmoe9",$$css:!0}};function ea(e,t,n,...s){return e.reduce((r,i,a)=>{const l=t(i);if(!l)return r;try{return l(r,...s)}catch(c){return K5("Table",`Plugin at index ${a} threw in transform:`,c),r}},n)}const nI=[];function sI(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function rI({item:e,rowIndex:t,rowKey:n,columns:s,plugins:r,textOverflow:i,RowComponent:a,CellComponent:l,ariaRowIndex:c}){const u=s.map((h,p)=>{var w;const m={};h.align&&(m.style={textAlign:h.align});const y=ea(r,j=>j.transformBodyCell,{htmlProps:m,xstyle:[],columnIndex:p,columns:s},h,e,p,s),g=!h.renderCell,k=g?RR(e,h.key):((w=h.renderCell)==null?void 0:w.call(h,e))??null;let v;return g&&i==="truncate"&&typeof k=="string"&&k.length>0?v=o.jsx(ee,{type:"body",maxLines:1,children:k}):v=k,o.jsx(l,{...y.htmlProps,contextMenuActions:y.contextMenuActions,xstyle:y.xstyle,children:v},h.key)}),d=ea(r,h=>h.transformBodyRow,{htmlProps:c==null?{}:{"aria-rowindex":c},xstyle:[],children:o.jsx(o.Fragment,{children:u})},e,t);return o.jsx(a,{ref:d.ref,...d.htmlProps,xstyle:d.xstyle,children:d.children},n)}function iI(e,t){if(e.rowKey!==t.rowKey||e.rowIndex!==t.rowIndex||e.ariaRowIndex!==t.ariaRowIndex||e.columns!==t.columns||e.plugins!==t.plugins||e.textOverflow!==t.textOverflow||e.RowComponent!==t.RowComponent||e.CellComponent!==t.CellComponent)return!1;if(e.item===t.item)return!0;const n=e.item,s=t.item,r=Object.keys(s);if(Object.keys(n).length!==r.length)return!1;for(const i of r)if(n[i]!==s[i])return!1;return!0}const aI=x.memo(rI,iI);function oI({data:e,columns:t,idKey:n,plugins:s,children:r,textOverflow:i="wrap",scrollWrapper:a,emptyState:l,rowIndexStart:c,rowCount:u,xstyle:d,className:f,style:h,ref:p,...m}){const b=be(),y=s??nI,g=c!=null||u!=null,k=c??1,v=g?u??-1:void 0,w=Xf,j=Z0,$=Y0,C=t??(e?LR(e):[]),E=ea(y,D=>D.transformColumns,C),T=x.useRef(E);sI(T.current,E)||(T.current=E);const S=T.current,N=NR(S),z=ea(y,D=>D.transformTable,{htmlProps:{},xstyle:r?[$1.table,$1.tableAutoLayout]:[$1.table]}),M=S.map((D,L)=>{var ye;const q=D.header??D.key,F={"data-column-key":D.key,scope:"col"};D.align&&(F.style={textAlign:D.align});const Y=ea(y,ue=>ue.transformHeaderCell,{htmlProps:F,xstyle:[],content:q,columnIndex:L,columns:S},D,L,S),Z=((ye=N.columns.get(D.key))==null?void 0:ye.style)??{},ne=Y.htmlProps.style,J={...Y.htmlProps,style:ne?{...Z,...ne}:Z},K=Y.content??q,ie=typeof K=="string"&&K.length>0?{title:K}:{},{before:le,after:ve,overlay:ge,below:xe}=Y,Q=le!=null||ve!=null||ge!=null||xe!=null?o.jsxs(o.Fragment,{children:[le,ve!=null?o.jsxs("div",{className:"x3nfvp2 x6s0dn4 xzye2dw xeuugli",children:[K,ve]}):K,ge,xe]}):K;return o.jsx($,{...J,...ie,contextMenuActions:Y.contextMenuActions,xstyle:Y.xstyle,children:Q},D.key)}),R=ea(y,D=>D.transformHeaderRow,{htmlProps:{},xstyle:[],children:o.jsx(o.Fragment,{children:M})}),I=e!=null&&e.length>0,A=S.length>0,_={...z.htmlProps.style,...h,...N.tableMinWidth>0?{minWidth:`${N.tableMinWidth}px`}:null};let O=o.jsx("table",{ref:p,...v!=null?{"aria-rowcount":v}:null,...z.htmlProps,...U(P("base-table"),B(...z.xstyle,d),[z.htmlProps.className,f].filter(Boolean).join(" ")||void 0,_),...m,children:r||o.jsxs(o.Fragment,{children:[A&&o.jsx(Q0,{children:o.jsx(w,{...R.htmlProps,isHeaderRow:!0,xstyle:R.xstyle,children:R.children})}),o.jsx(J0,{children:I?e.map((D,L)=>{const q=n==null?L:typeof n=="function"?n(D):String(D[n]);return o.jsx(aI,{item:D,rowIndex:L,rowKey:q,columns:S,plugins:y,textOverflow:i,RowComponent:w,CellComponent:j,ariaRowIndex:g?k+L:void 0},q)}):e!=null&&l!==!1&&o.jsx("tr",{children:o.jsx("td",{colSpan:S.length,children:l??o.jsx(Si,{title:b("@astryx.table.noData"),isCompact:!0})})})})]})});if(a){const D=ea(y,L=>L.transformScrollWrapper,{htmlProps:{},xstyle:[]});O=o.jsx(a,{htmlProps:D.htmlProps,xstyle:D.xstyle,beforeTable:D.beforeTable,afterTable:D.afterTable,children:O})}for(let D=y.length-1;D>=0;D--){const L=y[D];if(L.transformTableContext)try{O=L.transformTableContext(O)}catch(q){K5("Table","Plugin threw in transformTableContext:",q)}}return O}const Z4=oI;Z4.displayName="BaseTable";const Y4=["columnSettings","sort","tree","selection","pagination"],ov=new Map(Y4.map((e,t)=>[e,t]));function lI(e){const t=Y4.length;return e.sort(([n],[s])=>{const r=ov.get(n)??t,i=ov.get(s)??t;return r-i})}const gd=new Set(["transformColumns","transformTable","transformHeaderRow","transformHeaderCell","transformBodyRow","transformBodyCell","transformScrollWrapper","transformTableContext"]);function cI(e,t){const n=Object.keys(t);for(const r of n)gd.has(r)||pa("Table",`Plugin "${e}" has unknown key "${r}". Valid keys: ${[...gd].join(", ")}. This key will be ignored.`);for(const r of n)if(gd.has(r)){const i=t[r];i!=null&&typeof i!="function"&&pa()}n.some(r=>gd.has(r)&&typeof t[r]=="function")||pa()}function uI(e,t){const n=x.useRef(null);if(n.current!=null){const i=n.current;if(i.basePlugins===e&&i.userPlugins===t)return i.result;if(i.basePlugins===e&&dI(i.userPlugins,t))return i.userPlugins=t,i.result}const s=t?lI(Object.entries(t)).map(([,i])=>i):[],r=[...e,...s];if(t)for(const[i,a]of Object.entries(t))cI(i,a);return n.current={basePlugins:e,userPlugins:t,result:r},r}function dI(e,t){if(e===t)return!0;if(e==null||t==null)return!1;const n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}const fI={base:{kMv6JI:"xjb2p0i",kMwMTN:"x1tgivj0",$$css:!0}},lv={base:{kXHlph:"xw2csxc",kuHK5b:"x5lxg6s",$$css:!0},containerBleed:{keTefX:"xojxgvx",k71WvV:"x1fcf3bl",kzqmXN:"xx6qvi6",keoZOQ:"xkibk3",k1K539:"xlayyun",$$css:!0}};function hI({children:e,htmlProps:t,xstyle:n,beforeTable:s,afterTable:r}){const i=be(),{ref:a,...l}=t??{};return o.jsxs("div",{ref:a,tabIndex:0,role:"group","aria-label":i("@astryx.table.label"),...l,...U(P("table-scroll-wrapper"),B(lv.base,lv.containerBleed,...n??[])),children:[s,e,r]})}function xI(){return{transformTable(e){const t=e.htmlProps.className??"",n=P("table").className;return{...e,htmlProps:{...e.htmlProps,className:t?`${t} ${n}`:n},xstyle:[...e.xstyle,fI.base]}}}}function pI({density:e="balanced",dividers:t="rows",isStriped:n=!1,hasHover:s=!1,verticalAlign:r="middle",textOverflow:i="wrap",plugins:a,columns:l,data:c,ref:u,...d}){const f=x.useMemo(()=>xI(),[]),h=x.useMemo(()=>[f],[f]),p=uI(h,a),m=x.useMemo(()=>({density:e,dividers:t,isStriped:n,hasHover:s,verticalAlign:r,textOverflow:i}),[e,t,n,s,r,i]);return o.jsx(fx,{value:m,children:o.jsx(Z4,{ref:u,data:c,columns:l,plugins:p,textOverflow:i,scrollWrapper:hI,...d})})}const Q4=pI;Q4.displayName="Table";function gI(e,t,n){if(e.length===0||t>e[e.length-1]){const s=[...e,t];for(;s.length>n;)s.shift();return s}return e}function mI(e,t,n,s){const r=t+e.length;if(n.length===0)return null;const i=n[0];if(r<=i)return null;const a=[];let l=t;l<i&&i<r&&(a.push({key:`settled-${s}`,text:e.slice(0,i-t),fading:!1}),l=i);for(let c=0;c<n.length;c++){const u=n[c],d=c+1<n.length?n[c+1]:r;if(u>=r||d<=l)continue;const f=Math.max(u,l),h=Math.min(d,r);f>=h||(a.push({key:`fade-${s}-b${u}`,text:e.slice(f-t,h-t),fading:!0}),l=h)}return a.length>0?a:null}const Pi={label:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"xzye2dw",kXLuUW:"x11njtxf",kZKoxP:"x1grt7ep",kGuDYH:"x141an7d",k63SB2:"xv8on6e",kLWn49:"x1ltkj2j",kMwMTN:"xv1l7n4",kaIpWk:"xh6dtrn",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kVAM5u:"x14i3s5s",kg3NbH:"xf314gf",keTefX:"xladpz9",kybGjl:"x1hl2dhg",k1ekBW:"x1eaenvl",kIyJzY:"x2rcmwa",kAMwcw:"xlr8y92",ks0D6T:"x55n99s",kVQacm:"xb3r6kr",$$css:!0},labelWithIcon:{kZCmMZ:"x138rykx",$$css:!0},labelInteractive:{kkrTdU:"x1ypdohk",$$css:!0},labelHover:{kWkggS:"xe9uy6x",kMwMTN:"xv1l7n4 x140uwzg",$$css:!0},number:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kXLuUW:"x1v0h343",kGuDYH:"x141an7d",k63SB2:"x2mo6ok",kLWn49:"x1ltkj2j",kMwMTN:"xv1l7n4",kWkggS:"xgcxg3y",kaIpWk:"xjspbzw",k7Eaqz:"x16asifk",kZKoxP:"x1grt7ep",kg3NbH:"x7a5moj",kybGjl:"x1hl2dhg",k1ekBW:"x15406qy",kIyJzY:"x2rcmwa",kAMwcw:"xlr8y92",$$css:!0},numberInteractive:{kkrTdU:"x1ypdohk",$$css:!0},numberHover:{kWkggS:"xgcxg3y xe9uy6x",$$css:!0}};function J4({ref:e,source:t,number:n,variant:s="label",xstyle:r,className:i,style:a,"data-testid":l,...c}){const u=be(),d=t.title??String(n),f=t.url,h=t.icon!=null&&typeof t.icon!="string"?t.icon:null,p=t.src??(typeof t.icon=="string"?t.icon:void 0),m=h!=null||p!=null,b=f?"a":"span",y=f?"doc-noteref":void 0,g=f?{href:f,target:"_blank",rel:"noopener noreferrer",title:d}:{title:d},k=e;return s==="number"?o.jsx(b,{...c,ref:k,role:y,"aria-label":u("@astryx.citation.label",{number:n,title:d}),"data-testid":l,...g,...U(P("citation",{variant:s}),B(Pi.number,f!=null&&Pi.numberHover,f!=null&&Pi.numberInteractive,r),i,a),children:n}):o.jsxs(b,{...c,ref:k,role:y,"aria-label":u("@astryx.citation.label",{number:n,title:d}),"data-testid":l,...g,...U(P("citation",{variant:s}),B(Pi.label,m&&Pi.labelWithIcon,f!=null&&Pi.labelHover,f!=null&&Pi.labelInteractive,r),i,a),children:[m&&o.jsx("span",{"aria-hidden":"true",className:"x3nfvp2 x6s0dn4 xl56j7k x12xnipv x6b6gus xjspbzw x10xzikg x1litavf x1y0btm7 x14i3s5s xb3r6kr x2lah0s",children:h!=null?qs(h,{size:"sm"}):o.jsx("img",{src:p,alt:"",className:"x1ad1g3v x9gl9lo"})}),o.jsx("span",{className:"xb3r6kr xlyipyv xuxw1ft xeuugli",children:d})]})}J4.displayName="Citation";const yI={sourceIds:void 0,autolink:void 0};function ey(e){if(e==null)return yI;if(typeof e.has=="function")return{sourceIds:e,autolink:void 0};const t=e;return{sourceIds:t.sourceIds,autolink:t.autolink}}const kI=/^ {0,3}\[([^\]^](?:\\.|[^\]\\])*)\]:[ \t]*(?:<([^<>\n]*)>|(\S+))([ \t]+(?:"[^"\n]*"|'[^'\n]*'|\([^()\n]*\)))?[ \t]*$/,bI=/^ {0,3}(?:"[^"\n]*"|'[^'\n]*'|\([^()\n]*\))[ \t]*$/;function Qc(e){return e.trim().replace(/\s+/g," ").toLowerCase()}function vI(e){const t=kI.exec(e);if(t==null)return null;const n=Qc(t[1]),s=t[2]!=null?t[2]:t[3];return n===""||s==null?null:{label:n,destination:s,hasTitle:t[4]!=null}}function e6(e){const t=e.split(`
152
- `),n=new Map,s=new Array(t.length).fill(!0);let r=!0,i=!1,a="";for(let c=0;c<t.length;c++){const u=t[c];if(i){u.startsWith(a)?(i=!1,a="",r=!0):r=!1;continue}const d=u.match(/^(`{3,}|~{3,})/);if(d){i=!0,a=d[1],r=!1;continue}if(u.trim()===""){r=!0;continue}if(r){const f=vI(u);if(f!=null){n.has(f.label)||n.set(f.label,f.destination),s[c]=!1,!f.hasTitle&&c+1<t.length&&bI.test(t[c+1])&&(s[c+1]=!1,c++);continue}}r=/^ {0,3}#{1,6}(?: |\t|$)/.test(u)||ty(u)}if(n.size===0)return{defs:n,cleaned:e};const l=t.filter((c,u)=>s[u]).join(`
153
- `);return{defs:n,cleaned:l}}function wI(e){return e.size===0?"":[...e].sort((t,n)=>t[0]<n[0]?-1:t[0]>n[0]?1:0).map(([t,n])=>`${t}\0${n}`).join("")}function jI(e,t,n,s){const r=e.indexOf("]",t+1);if(r===-1)return null;const i=e.slice(t+1,r);if(e[r+1]==="["){const l=e.indexOf("]",r+2);if(l!==-1){const c=e.slice(r+2,l),u=c===""?i:c,d=n.get(Qc(u));if(d!=null)return{node:{type:"link",href:d,children:si(i,s)},end:l+1}}}if(i.trim()==="")return null;const a=n.get(Qc(i));return a==null?null:{node:{type:"link",href:a,children:si(i,s)},end:r+1}}function SI(e,t,n){const s=e.indexOf("]",t+2);if(s===-1)return null;const r=e.slice(t+2,s);if(e[s+1]==="["){const a=e.indexOf("]",s+2);if(a!==-1){const l=e.slice(s+2,a),c=l===""?r:l,u=n.get(Qc(c));if(u!=null)return{node:{type:"image",src:u,alt:r},end:a+1}}}if(r.trim()==="")return null;const i=n.get(Qc(r));return i==null?null:{node:{type:"image",src:i,alt:r},end:s+1}}function cv(e,t){let n=1;for(let s=t;s<e.length;s++)if(e[s]==="(")n++;else if(e[s]===")"&&(n--,n===0))return s;return-1}function oo(e){return e==null?!1:/\w/.test(e)}function $I(e,t,n){if(!n.sourceIds||e[t]!=="【")return null;const s=e.indexOf("】",t+1);if(s===-1)return null;const r=e.slice(t+1,s);return r.length===0||!n.sourceIds.has(r)?null:{sourceId:r,end:s+1}}function CI(e,t,n){if(!n.sourceIds||e[t]!=="[")return null;const s=e.indexOf("]",t+1);if(s===-1||e[s+1]==="(")return null;const r=e.slice(t+1,s);return r.length===0||!n.sourceIds.has(r)?null:{sourceId:r,end:s+1}}function EI(e,t){return Jc(e,ey(t))}function Jc(e,t){const n=si(e,t);return t.autolink==="gfm"?r6(n):n}function si(e,t){const n=[];let s=0;for(;s<e.length;){if(e[s]==="\\"&&s+1<e.length){n.push({type:"text",content:e[s+1]}),s+=2;continue}if(e[s]==="`"){const l=e[s+1]==="`"?e[s+2]==="`"?3:2:1,c=s+l,u=e.indexOf("`".repeat(l),c);if(u!==-1){n.push({type:"code",content:e.slice(c,u)}),s=u+l;continue}}{const l=$I(e,s,t);if(l){n.push({type:"citation",sourceId:l.sourceId}),s=l.end;continue}}if(e[s]==="!"&&e[s+1]==="["){const l=e.indexOf("]",s+2);if(l!==-1&&e[l+1]==="("){const c=cv(e,l+2);if(c!==-1){n.push({type:"image",src:e.slice(l+2,c),alt:e.slice(s+2,l)}),s=c+1;continue}}}if(t.linkDefs!=null&&e[s]==="!"&&e[s+1]==="["){const l=SI(e,s,t.linkDefs);if(l){n.push(l.node),s=l.end;continue}}{const l=CI(e,s,t);if(l){n.push({type:"citation",sourceId:l.sourceId}),s=l.end;continue}}if(e[s]==="["){const l=e.indexOf("]",s+1);if(l!==-1&&e[l+1]==="("){const c=cv(e,l+2);if(c!==-1){n.push({type:"link",href:e.slice(l+2,c),children:si(e.slice(s+1,l),t)}),s=c+1;continue}}}if(t.linkDefs!=null&&e[s]==="["){const l=jI(e,s,t.linkDefs,t);if(l){n.push(l.node),s=l.end;continue}}if(e[s]==="*"&&e[s+1]==="*"&&e[s+2]==="*"||e[s]==="_"&&e[s+1]==="_"&&e[s+2]==="_"){const l=e.slice(s,s+3),c=e[s]==="_";if(!(c&&oo(e[s-1]))){const u=e.indexOf(l,s+3);if(u!==-1&&(!c||!oo(e[u+3]))){n.push({type:"bold",children:[{type:"italic",children:si(e.slice(s+3,u),t)}]}),s=u+3;continue}}}if(e[s]==="*"&&e[s+1]==="*"||e[s]==="_"&&e[s+1]==="_"){const l=e.slice(s,s+2),c=e[s]==="_";if(!(c&&oo(e[s-1]))){const u=e.indexOf(l,s+2);if(u!==-1&&(!c||!oo(e[u+2]))){n.push({type:"bold",children:si(e.slice(s+2,u),t)}),s=u+2;continue}}}if(e[s]==="~"&&e[s+1]==="~"){const l=e.indexOf("~~",s+2);if(l!==-1){n.push({type:"strikethrough",children:si(e.slice(s+2,l),t)}),s=l+2;continue}}if(e[s]==="*"||e[s]==="_"){const l=e[s]==="_";if(!(l&&oo(e[s-1]))){const c=e.indexOf(e[s],s+1);if(c!==-1&&c>s+1&&(!l||!oo(e[c+1]))){n.push({type:"italic",children:si(e.slice(s+1,c),t)}),s=c+1;continue}}}let r=s+1;for(;r<e.length&&!"*_~`[!\\\n【".includes(e[r]);)r++;const i=e.slice(s,r);if(r<e.length&&e[r]===`
154
- `){const l=i.replace(/ +$/,"");if(i.length-l.length>=2){if(l.length>0){const c=n[n.length-1];(c==null?void 0:c.type)==="text"?c.content+=l:n.push({type:"text",content:l})}n.push({type:"break"}),s=r+1;continue}}const a=n[n.length-1];(a==null?void 0:a.type)==="text"?a.content+=i:n.push({type:"text",content:i}),s=r}return n}const t6="[^\\s<]+",TI="https?:\\/\\/",n6="[A-Za-z0-9._%+-]+",uv="[A-Za-z0-9-]+",s6=`${uv}(?:\\.${uv})+`,zI="[a-zA-Z][a-zA-Z0-9+.-]*",AI="[^<>\\s]*",NI=new RegExp(`${TI}${t6}`,"g"),MI=new RegExp(`www\\.${t6}`,"g"),RI=new RegExp(`${n6}@${s6}`,"g"),II=new RegExp(`<(${zI}:${AI})>`,"g"),_I=new RegExp(`<(${n6}@${s6})>`,"g"),dv=new Set("?!.,:*_~"),OI=new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._%+-@");function fv(e){let t=e;for(;t.length>0;){if(dv.has(t[t.length-1])){let n=t.length-1;for(;n>0&&dv.has(t[n-1]);)n--;t=t.slice(0,n);continue}if(t.endsWith(")")){let n=0,s=0;for(let r=0;r<t.length;r++)t[r]==="("?n++:t[r]===")"&&s++;if(s>n){t=t.slice(0,-1);continue}}break}return t}const DI=new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/=");function hv(e){return e==null?!0:!DI.has(e)}function LI(e){const t=[];{const r=new RegExp(II.source,"g");let i;for(;(i=r.exec(e))!==null;){const a=i[1];t.push({start:i.index,end:i.index+i[0].length,href:a,display:a})}}{const r=new RegExp(_I.source,"g");let i;for(;(i=r.exec(e))!==null;){const a=i[1];t.push({start:i.index,end:i.index+i[0].length,href:`mailto:${a}`,display:a})}}{const r=new RegExp(NI.source,"g");let i;for(;(i=r.exec(e))!==null;){const a=e[i.index-1];if(!hv(a)||e.slice(i.index-2,i.index)==="](")continue;const l=fv(i[0]);l.length!==0&&t.push({start:i.index,end:i.index+l.length,href:l,display:l})}}{const r=new RegExp(MI.source,"g");let i;for(;(i=r.exec(e))!==null;){const a=e[i.index-1];if(!hv(a)||e.slice(i.index-3,i.index)==="://")continue;const l=fv(i[0]);l.length!==0&&t.push({start:i.index,end:i.index+l.length,href:`http://${l}`,display:l})}}{const r=new RegExp(RI.source,"g");let i;for(;(i=r.exec(e))!==null;){const a=e[i.index-1];a!=null&&OI.has(a)||e.slice(Math.max(0,i.index-7),i.index)!=="mailto:"&&t.push({start:i.index,end:i.index+i[0].length,href:`mailto:${i[0]}`,display:i[0]})}}t.sort((r,i)=>r.start-i.start);const n=[];let s=0;for(const r of t)r.start>=s&&(n.push(r),s=r.end);return n}function BI(e){const t=LI(e);if(t.length===0)return[{type:"text",content:e}];const n=[];let s=0;for(const r of t)r.start>s&&n.push({type:"text",content:e.slice(s,r.start)}),n.push({type:"link",href:r.href,children:[{type:"text",content:r.display}]}),s=r.end;return s<e.length&&n.push({type:"text",content:e.slice(s)}),n}function r6(e){const t=[];for(const n of e)if(n.type==="text"){const s=BI(n.content);for(const r of s){const i=t[t.length-1];r.type==="text"&&(i==null?void 0:i.type)==="text"?i.content+=r.content:t.push(r)}}else n.type==="bold"||n.type==="italic"||n.type==="strikethrough"?t.push({...n,children:r6(n.children)}):t.push(n);return t}function C1(e){let t=0;for(;t<e.length&&e[t]===" ";)t++;return t}function ty(e){const t=e.trim();if(t.length<3)return!1;const n=t.replace(/ /g,"");if(n.length<3)return!1;const s=n[0];if(s!=="-"&&s!=="*"&&s!=="_")return!1;for(let r=1;r<n.length;r++)if(n[r]!==s)return!1;return!0}function sf(e){if(!e.includes("|"))return!1;const n=e.split("|").map(s=>s.trim()).filter(s=>s.length>0);return n.length>0&&n.every(s=>/^:?-+:?$/.test(s))}function qI(e){return!!(/^#{1,6} /.test(e)||/^(`{3,}|~{3,})/.test(e)||ty(e)||e.startsWith("> ")||e===">"||/^ {0,9}[-*+] /.test(e)||/^ {0,9}0*1[.)] /.test(e)||e.includes("|"))}function E1(e){let t=0,n=e.length;if(e.startsWith("|"))for(t=1;t<n&&e[t]===" ";)t++;for(;n>t&&e[n-1]===" ";)n--;n>t&&e[n-1]==="|"&&n--;const s=e.slice(t,n),r=[];let i="";for(let a=0;a<s.length;a++)s[a]==="\\"&&a+1<s.length&&s[a+1]==="|"?(i+="\\|",a++):s[a]==="|"?(r.push(i.trim()),i=""):i+=s[a];return r.push(i.trim()),r}function HI(e,t,n){const s=E1(e[t]).map(l=>({children:Jc(l,n)})),r=E1(e[t+1]).map(l=>{const c=l.trim(),u=c.startsWith(":"),d=c.endsWith(":");return u&&d?"center":d?"right":u?"left":null}),i=[];let a=t+2;for(;a<e.length&&e[a].includes("|")&&e[a].trim()!=="";)i.push(E1(e[a]).map(l=>({children:Jc(l,n)}))),a++;return{node:{type:"table",headers:s,alignments:r,rows:i},nextIndex:a}}function xv(e,t,n,s){const r=[],i=C1(e[t]),a=n?e[t].match(/^ *(\d+)([.)]) /):null,l=a?a[2]:".",c=`\\${l}`,u=n?new RegExp(`^ {${i}}\\d+${c} `):new RegExp(`^ {${i}}[-*+] `),d=a?parseInt(a[1],10):void 0;let f=!1,h=t;for(;h<e.length&&u.test(e[h]);){const p=n?e[h].replace(new RegExp(`^ *\\d+${c} `),""):e[h].replace(/^ *[-*+] /,""),m=p.match(/^\[([ xX])\] (.*)/);let b,y;m?(b=m[1].toLowerCase()==="x",y=m[2]):y=p,h++;const g=[];for(;h<e.length&&e[h].trim()!==""&&C1(e[h])>i;)g.push(e[h]),h++;if(g.length>0){const v=Math.min(...g.map(j=>C1(j))),w=g.map(j=>j.slice(v));y+=`
155
- `+w.join(`
156
- `)}r.push({checked:b,children:ia(y,s)});let k=h;for(;k<e.length&&e[k].trim()==="";)k++;k>h&&k<e.length&&u.test(e[k])&&(f=!0,h=k)}return{node:{type:"list",ordered:n,start:d,delimiter:n?l:void 0,loose:f||void 0,items:r},nextIndex:h}}function PI(e,t){return ia(e,ey(t))}function ia(e,t){const{defs:n,cleaned:s}=e6(e),r=t.linkDefs;let i;n.size===0?i=r:r==null?i=n:i=new Map([...n,...r]);const a=i!=null?{...t,linkDefs:i}:t,l=s.split(`
157
- `),c=[];let u=0;for(;u<l.length;){const d=l[u];if(d.trim()===""){u++;continue}const f=d.match(/^(`{3,}|~{3,})(\w*)/);if(f){const b=f[1],y=f[2]||"plaintext",g=[];for(u++;u<l.length&&!l[u].startsWith(b);)g.push(l[u]),u++;u++,c.push({type:"codeblock",language:y,content:g.join(`
158
- `)});continue}const h=d.match(/^(#{1,6}) +(.*)/);if(h){c.push({type:"heading",level:h[1].length,children:Jc(h[2],a)}),u++;continue}if(ty(d)){c.push({type:"hr"}),u++;continue}const p=d.match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(p&&d.trim()===p[0]){c.push({type:"image",alt:p[1],src:p[2]}),u++;continue}if(u+1<l.length&&d.includes("|")&&sf(l[u+1])){const b=HI(l,u,a);c.push(b.node),u=b.nextIndex;continue}if(d.startsWith("> ")||d===">"){const b=[];for(;u<l.length&&(l[u].startsWith("> ")||l[u]===">");)b.push(l[u].replace(/^> ?/,"")),u++;c.push({type:"blockquote",children:ia(b.join(`
159
- `),a)});continue}if(/^ {0,9}[-*+] /.test(d)){const b=xv(l,u,!1,a);c.push(b.node),u=b.nextIndex;continue}if(/^ {0,9}\d+[.)] /.test(d)){const b=xv(l,u,!0,a);c.push(b.node),u=b.nextIndex;continue}const m=[d];for(u++;u<l.length&&!qI(l[u])&&l[u].trim()!=="";)m.push(l[u]),u++;c.push({type:"paragraph",children:Jc(m.join(`
160
- `),a)})}return c}function T1(){return{prevInput:"",settledText:"",settledBlocks:[],settledUpTo:0}}function UI(e){let t=!1,n="",s=-1;for(let r=0;r<e.length;r++){const i=e[r],a=i.match(/^(`{3,}|~{3,})/);a&&(t?a[1].startsWith(n[0])&&a[1].length>=n.length&&(t=!1,n=""):(t=!0,n=a[1])),!t&&i.trim()===""&&r>0&&(s=r)}return t?-1:s}function pv(e){const t=e.lastIndexOf(`
161
- `),n=t===-1?"":e.slice(0,t+1);let s=t===-1?e:e.slice(t+1);const r=s.lastIndexOf("[");if(r!==-1){const a=s.slice(r);if(!(a.includes("](")&&a.includes(")"))){const c=r>0&&s[r-1]==="!"?r-1:r;s=s.slice(0,c)}}let i=s.length;for(;i>0&&s[i-1]==="`";)i--;if(i<s.length&&i>0){const a=s.length-i;s.lastIndexOf("`".repeat(a),i-1)===-1&&(s=s.slice(0,i))}for(i=s.length;i>0&&s[i-1]==="*";)i--;if(i<s.length&&i>0){const a=s.length-i;a<=3&&s.lastIndexOf("*".repeat(a),i-1)===-1&&(s=s.slice(0,i))}{let a=0;const l=[];for(;a<s.length;){const u=s.indexOf("*",a);if(u===-1)break;let d=1;for(;u+d<s.length&&s[u+d]==="*";)d++;if(d>3){a=u+d;continue}l.push({pos:u,len:d}),a=u+d}const c=new Set;for(let u=0;u<l.length;u++)if(!c.has(u)){for(let d=u+1;d<l.length;d++)if(!c.has(d)&&l[d].len===l[u].len){c.add(u),c.add(d);break}}for(let u=l.length-1;u>=0;u--)if(!c.has(u)){const d=l[u];d.pos+d.len<s.length?s=s+"*".repeat(d.len):s=s.slice(0,d.pos)}}if(s.length>=2&&s.endsWith("~~"))s.lastIndexOf("~~",s.length-3)===-1&&(s=s.slice(0,-2));else if(s.endsWith("~")){const a=s.length-2;a>=0&&s[a]!=="~"&&(s=s.slice(0,-1))}{let a=0,l=0;const c=[];for(;;){const u=s.indexOf("~~",l);if(u===-1)break;c.push(u),a++,l=u+2}a%2===1&&(s=s.slice(0,c[c.length-1]))}return n+s}function FI(e){const t=e.split(`
162
- `);for(;t.length>0;){const n=t[t.length-1],s=n.trim();if(s===""){t.pop();continue}if(/^ {0,9}[-*+] $/.test(n)||/^ {0,9}\d+[.)] $/.test(n)){t.pop();continue}if(s.includes("|")&&!sf(n)){let r=!1;for(let i=t.length-2;i>=1;i--)if(sf(t[i])&&t[i-1].includes("|")){r=!0;break}if(!r){t.pop();continue}}if(sf(n)&&(t.length<2||!t[t.length-2].includes("|"))){t.pop();continue}break}return t.join(`
163
- `)}function gv(e,t){if(e.length===0||t.length===0)return[...e,...t];const n=e[e.length-1],s=t[0];if(n.type==="list"&&s.type==="list"&&n.ordered===s.ordered&&n.delimiter===s.delimiter){const r={type:"list",ordered:n.ordered,start:n.start,delimiter:n.delimiter,loose:!0,items:[...n.items,...s.items]};return[...e.slice(0,-1),r,...t.slice(1)]}return[...e,...t]}function GI(e,t,n){const s=ey(n);if(t.autolink!==s.autolink&&(t.prevInput="",t.settledText="",t.settledBlocks=[],t.settledUpTo=0,t.autolink=s.autolink),e==="")return t.prevInput="",t.settledText="",t.settledBlocks=[],t.settledUpTo=0,t.linkDefsKey=void 0,[];const{defs:r}=e6(e),i=wI(r);t.linkDefsKey!==i&&(t.prevInput="",t.settledText="",t.settledBlocks=[],t.settledUpTo=0,t.linkDefsKey=i);const a=r.size>0?{...s,linkDefs:r}:s,l=e.split(`
164
- `),c=UI(l);if(c<0)return t.prevInput=e,ia(e,a);const u=l.slice(0,c).join(`
165
- `),d=l.slice(c).join(`
166
- `).trim(),f=FI(d);let h;if(u===t.settledText)h=t.settledBlocks;else if(t.settledText.length>0&&u.startsWith(t.settledText)){const m=u.slice(t.settledText.length),b=ia(m,a);h=gv(t.settledBlocks,b)}else h=ia(u,a);const p=f?ia(f,a):[];return t.settledText=u,t.settledBlocks=h,t.settledUpTo=c,t.prevInput=e,gv(h,p)}const md={start:"0",center:"auto"},z1={start:null,center:"auto"},VI={k7Eaqz:"xkj4a21",$$css:!0},In={proseWidth:e=>[{ks0D6T:e!=null?"xf68679":e,$$css:!0},{"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],proseAlign:e=>[{kUOVxO:e!=null?"xvlecxo":e,$$css:!0},{"--x-marginInline":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],blockWidth:e=>[VI,{"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(`min(${e}, 100%)`)}],blockAlign:e=>[{kUOVxO:e!=null?"xvlecxo":e,$$css:!0},{"--x-marginInline":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],cellMinWidth:e=>[{k7Eaqz:e!=null?"xkj4a21":e,$$css:!0},{"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]},yd={center:{k9WMMc:"x2b8uid",$$css:!0},end:{k9WMMc:"xp4054r",$$css:!0}},he={root:{kMv6JI:"x9ynric",kMwMTN:"x1tgivj0",kLWn49:"xw6l6zx",kGuDYH:"xjm74w1",kzqmXN:"xh8yej3",ks0D6T:"x193iq5w",k7Eaqz:"xeuugli",kHjlTd:"x1mzt3pk",$$css:!0},inlineRoot:{k1xSpc:"xt0psk2",kzqmXN:"x14atkfc",ks0D6T:"x1x1rfll",kMv6JI:"xjb2p0i",kMwMTN:"x1heor9g",kLWn49:"x15bjb6t",kGuDYH:"x1qlqyl8",$$css:!0},headingBase:{kMv6JI:"x1g81bgm",kMwMTN:"x1tgivj0",$$css:!0},h1:{kGuDYH:"xcg7oai",k63SB2:"x1v68xuy",kLWn49:"xfmsba7",$$css:!0},h2:{kGuDYH:"x1xvnhcw",k63SB2:"x12yy4cs",kLWn49:"x1cpk1wn",$$css:!0},h3:{kGuDYH:"xii13ha",k63SB2:"x1jcxfy8",kLWn49:"xwjzt0u",$$css:!0},h4:{kGuDYH:"x8tkxat",k63SB2:"x2hcmsi",kLWn49:"xqerer",$$css:!0},h5:{kGuDYH:"xsgqta0",k63SB2:"xno150v",kLWn49:"xo3gurs",$$css:!0},h6:{kGuDYH:"xw5ohdf",k63SB2:"x1pw4frv",kLWn49:"xeixjfn",$$css:!0},spacingHeadingMajorDefault:{keoZOQ:"x13rv44w",k1K539:"xep27e5",$$css:!0},spacingHeadingMinorDefault:{keoZOQ:"x1s1qpeq",k1K539:"x1p37lm5",$$css:!0},spacingParagraphDefault:{keoZOQ:"xj6sv8s",k1K539:"xep27e5",$$css:!0},spacingCodeblockDefault:{keoZOQ:"x1s1qpeq",k1K539:"xwh1t77",$$css:!0},spacingBlockquoteDefault:{keoZOQ:"x1s1qpeq",k1K539:"xwh1t77",$$css:!0},spacingListDefault:{keoZOQ:"xj6sv8s",k1K539:"xep27e5",$$css:!0},spacingTableDefault:{keoZOQ:"x1s1qpeq",k1K539:"xwh1t77",$$css:!0},spacingHrDefault:{keoZOQ:"x13rv44w",k1K539:"x4d5cxa",$$css:!0},spacingImageDefault:{keoZOQ:"xj6sv8s",k1K539:"xep27e5",$$css:!0},spacingHeadingMajorCompact:{keoZOQ:"x1s1qpeq",k1K539:"x1p37lm5",$$css:!0},spacingHeadingMinorCompact:{keoZOQ:"xj6sv8s",k1K539:"x14cgwvg",$$css:!0},spacingParagraphCompact:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0},spacingCodeblockCompact:{keoZOQ:"xtbrsbv",k1K539:"x1p37lm5",$$css:!0},spacingBlockquoteCompact:{keoZOQ:"xtbrsbv",k1K539:"x1p37lm5",$$css:!0},spacingListCompact:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0},spacingTableCompact:{keoZOQ:"xtbrsbv",k1K539:"x1p37lm5",$$css:!0},spacingHrCompact:{keoZOQ:"xj6sv8s",k1K539:"xep27e5",$$css:!0},spacingImageCompact:{keoZOQ:"xtbrsbv",k1K539:"x1p37lm5",$$css:!0},noMarginBlockStart:{keoZOQ:"xdj266r",$$css:!0},noMarginBlockEnd:{k1K539:"xat24cr",$$css:!0},codeBlockWrapper:{ks0D6T:"x193iq5w",$$css:!0},tableWrapper:{kXHlph:"xw2csxc",ks0D6T:"x193iq5w","--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0},blockIndent:{kUOVxO:"x1ho7dyk",$$css:!0},hr:{kMzoRj:"xc342km",kEafiO:"x11xkdxz",kPef9Z:"x13fuv20",kLZC3w:"x1pc3f07",$$css:!0}};function mv(e){const t=e.match(/^([\d.]+)ms$/);if(t)return parseFloat(t[1]);const n=e.match(/^([\d.]+)s$/);return n?parseFloat(n[1])*1e3:null}function ga(e){let t=0;for(const n of e)switch(n.type){case"text":t+=n.content.length;break;case"code":t+=n.content.length;break;case"image":t+=n.alt.length;break;case"bold":case"italic":case"strikethrough":case"link":t+=ga(n.children);break;case"break":t+=1;break;case"citation":t+=1;break}return t}function Yp(e){let t=0;for(const n of e)switch(n.type){case"heading":case"paragraph":t+=ga(n.children);break;case"codeblock":t+=n.content.length;break;case"blockquote":t+=Yp(n.children);break;case"list":for(const s of n.items)t+=Yp(s.children);break;case"table":for(const s of n.headers)t+=ga(s.children);for(const s of n.rows)for(const r of s)t+=ga(r.children);break;case"hr":break;case"image":t+=n.alt.length;break}return t}const WI={1:he.h1,2:he.h2,3:he.h3,4:he.h4,5:he.h5,6:he.h6},KI=/^(javascript|data|vbscript):/i;function Qp(e){const t=e.trim();return t.length===0||KI.test(t)?null:t}function XI(e,t){const n=[];for(const l of t){l.pattern.lastIndex=0;let c;for(;(c=l.pattern.exec(e))!==null;){let u;if(l.getEndIndex){const d=l.getEndIndex(e,c);if(d===!1)continue;u=d}else u=c.index+c[0].length;n.push({start:c.index,end:u,match:c,plugin:l})}}n.sort((l,c)=>l.start-c.start);const s=[];let r=0;for(const l of n)l.start>=r&&(s.push(l),r=l.end);if(s.length===0)return[{type:"text",content:e}];const i=[];let a=0;for(let l=0;l<s.length;l++){const c=s[l];c.start>a&&i.push({type:"text",content:e.slice(a,c.start)}),i.push({type:"plugin",element:c.plugin.render(c.match,`plugin-${l}`),matchLength:c.end-c.start}),a=c.end}return a<e.length&&i.push({type:"text",content:e.slice(a)}),i}function yv(e,t,n){const s=t.offset;if(t.offset+=e.length,!t.active)return e;const r=mI(e,s,t.boundaries,n);if(r==null)return e;const i=r.map(a=>a.fading?o.jsx("span",{className:"x1hc1fzr x19991ni x80gvsz x12w9bfk xlr8y92 x4itv7f",children:a.text},a.key):o.jsx("span",{children:a.text},a.key));return o.jsx("span",{children:i},`wrap-${n}`)}function ZI(e,t){let n=e.numberMap.get(t);return n==null&&(n=e.nextNumber++,e.numberMap.set(t,n)),n}function qn(e,t,n,s,r,i="a",a,l){switch(e.type){case"text":{if(a&&a.length>0){const c=XI(e.content,a);if(!(c.length===1&&c[0].type==="text")){const u=[];for(let d=0;d<c.length;d++){const f=c[d];f.type==="text"?u.push(yv(f.content,s,`${t}-seg-${d}`)):(s.offset+=f.matchLength,u.push(o.jsx(x.Fragment,{children:f.element},`plugin-${t}-${d}`)))}return o.jsx(x.Fragment,{children:u},t)}}return yv(e.content,s,t)}case"bold":return o.jsx("strong",{className:"x2mo6ok",children:e.children.map((c,u)=>qn(c,u,n,s,r,i,a,l))},t);case"italic":return o.jsx("em",{children:e.children.map((c,u)=>qn(c,u,n,s,r,i,a,l))},t);case"strikethrough":return o.jsx("del",{className:"xv1l7n4",children:e.children.map((c,u)=>qn(c,u,n,s,r,i,a,l))},t);case"code":{s.offset+=e.content.length;const c=l==null?void 0:l.inlineCode;return c?o.jsx(c,{children:e.content},t):o.jsx(_0,{children:e.content},t)}case"link":{const c=Qp(e.href);if(c==null)return o.jsx("span",{children:e.children.map((p,m)=>qn(p,m,n,s,r,i,a,l))},t);const u=l==null?void 0:l.link;if(u)return o.jsx(u,{href:c,children:e.children.map((p,m)=>qn(p,m,n,s,r,i,a,l))},t);const d=c.startsWith("https://")||c.startsWith("http://"),f=n?p=>{n(c,p)===!1&&p.preventDefault()}:void 0,h=d?"a":i;return o.jsx(h,{href:c,onClick:f,...d?{target:"_blank",rel:"noopener noreferrer"}:{},className:"xjse4m1 x1bvjpef",children:e.children.map((p,m)=>qn(p,m,n,s,r,i,a,l))},t)}case"image":{const c=Qp(e.src);if(c==null)return o.jsxs("span",{children:["[",e.alt,"]"]},t);const u=l==null?void 0:l.image;return u?o.jsx(u,{src:c,alt:e.alt},t):o.jsx("img",{src:c,alt:e.alt,className:"x193iq5w xh6dtrn"},t)}case"break":return s.offset+=1,o.jsx("br",{},t);case"citation":{if(s.offset+=1,!r)return o.jsxs("span",{children:["[",e.sourceId,"]"]},t);const c=ZI(r,e.sourceId),u=r.sources[e.sourceId]??{title:e.sourceId},d=r.style==="number"?"number":"label",f=l==null?void 0:l.citation;return f?o.jsx(f,{source:u,number:c,variant:d},t):o.jsx(J4,{source:u,number:c,variant:d},t)}}}function YI(e,t){const n=t==="compact";switch(e.type){case"heading":return e.level<=3?n?he.spacingHeadingMajorCompact:he.spacingHeadingMajorDefault:n?he.spacingHeadingMinorCompact:he.spacingHeadingMinorDefault;case"paragraph":return n?he.spacingParagraphCompact:he.spacingParagraphDefault;case"codeblock":return n?he.spacingCodeblockCompact:he.spacingCodeblockDefault;case"blockquote":return n?he.spacingBlockquoteCompact:he.spacingBlockquoteDefault;case"list":return n?he.spacingListCompact:he.spacingListDefault;case"table":return n?he.spacingTableCompact:he.spacingTableDefault;case"hr":return n?he.spacingHrCompact:he.spacingHrDefault;case"image":return n?he.spacingImageCompact:he.spacingImageDefault}}function QI(e){return e.headers.map((t,n)=>{let s=ga(t.children);for(const r of e.rows)if(r[n]){const i=ga(r[n].children);i>s&&(s=i)}return s<=6?60:s<=15?80:120})}function mc(e,t,n,s,r,i,a,l,c,u,d="a",f,h,p){const m=z1[u],b=m!=null?In.blockAlign(m):null,y=YI(e,s),g=t===0,k=t===n-1;switch(e.type){case"heading":{const v=Math.min(e.level+r-1,6),w=e.children.map((C,E)=>qn(C,E,i,a,l,d,f,h)),j=h==null?void 0:h.heading;if(j)return o.jsx(j,{level:v,children:w},t);const $=`h${v}`;return o.jsx($,{...U(P("markdown-heading",{density:s,level:v}),B(he.headingBase,WI[v],y,c!=null?In.proseWidth(c):null,u!=="start"?In.proseAlign(md[u]):null,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd)),children:w},t)}case"paragraph":{const v=e.children.map((j,$)=>qn(j,$,i,a,l,d,f,h)),w=h==null?void 0:h.paragraph;return w?o.jsx(w,{children:v},t):o.jsx("div",{role:"paragraph",...U(P("markdown-paragraph",{density:s}),B(y,c!=null?In.proseWidth(c):null,u!=="start"?In.proseAlign(md[u]):null,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd)),children:v},t)}case"codeblock":{a.offset+=e.content.length;const v=h==null?void 0:h.code;return v?o.jsx(v,{code:e.content,language:e.language},t):o.jsx("div",{...U(P("markdown-codeblock",{density:s}),B(y,he.codeBlockWrapper,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd)),children:o.jsx(I0,{code:e.content,language:e.language,isCollapsible:!0,xstyle:[c!=null?In.blockWidth(c):void 0,b]})},t)}case"blockquote":{const v=h==null?void 0:h.blockquote;if(v){const w=e.children.map((j,$)=>mc(j,$,e.children.length,s,r,i,a,l,c,u,d,f,h,p));return o.jsx(v,{children:w},t)}return o.jsx(U3,{...P("markdown-blockquote",{density:s}),xstyle:[y,c!=null?In.proseWidth(c):void 0,u!=="start"?In.proseAlign(md[u]):void 0,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd],children:e.children.map((w,j)=>mc(w,j,e.children.length,s,r,i,a,l,c,u,d,f,h,p))},t)}case"list":{if(e.items.length>0&&e.items.every(w=>w.checked!=null)){const w=e.items.map((j,$)=>({item:j,key:`task-${$}`})).filter(({item:j})=>j.checked).map(({key:j})=>j);return o.jsx("div",{...U(P("markdown-list",{density:s}),B(y,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd)),children:o.jsx(W0,{label:p("@astryx.markdown.taskList"),isLabelHidden:!0,value:w,xstyle:he.blockIndent,isReadOnly:!0,density:"compact",children:e.items.map((j,$)=>{const C=j.children[0],T=j.children.length===1&&(C==null?void 0:C.type)==="paragraph"?o.jsx(o.Fragment,{children:C.children.map((S,N)=>qn(S,N,i,a,l,d,f,h))}):o.jsx(o.Fragment,{children:j.children.map((S,N)=>mc(S,N,j.children.length,s,r,i,a,l,c,u,d,f,h,p))});return o.jsx(K0,{value:`task-${$}`,label:T},$)})})},t)}return o.jsx("div",{...U(P("markdown-list",{density:s}),B(y,c!=null?In.proseWidth(c):null,u!=="start"?In.proseAlign(md[u]):null,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd)),children:o.jsx(xt,{listStyle:e.ordered?"decimal":"disc",density:"compact",start:e.ordered?e.start:void 0,xstyle:he.blockIndent,children:e.items.map((w,j)=>{const $=w.children[0],E=w.children.length===1&&($==null?void 0:$.type)==="paragraph"?o.jsx(o.Fragment,{children:$.children.map((T,S)=>qn(T,S,i,a,l,d,f,h))}):o.jsx(o.Fragment,{children:w.children.map((T,S)=>mc(T,S,w.children.length,s,r,i,a,l,c,u,d,f,h,p))});return o.jsx(He,{label:E},j)})})},t)}case"table":{const v=QI(e);return o.jsx("div",{tabIndex:0,role:"group","aria-label":p("@astryx.markdown.table"),...U(P("markdown-table",{density:s}),B(he.tableWrapper,y,c!=null?In.blockWidth(c):null,z1[u]!=null?In.blockAlign(z1[u]):null,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd)),children:o.jsxs(Q4,{dividers:"rows",textOverflow:"wrap",children:[o.jsx(Q0,{children:o.jsx(Xf,{children:e.headers.map((w,j)=>o.jsx(Y0,{xstyle:[In.cellMinWidth(`${v[j]}px`),e.alignments[j]==="center"&&yd.center,e.alignments[j]==="right"&&yd.end],children:w.children.map(($,C)=>qn($,C,i,a,l,d,f,h))},j))})}),o.jsx(J0,{children:e.rows.map((w,j)=>{const $=w.map((C,E)=>o.jsx(Z0,{xstyle:[e.alignments[E]==="center"&&yd.center,e.alignments[E]==="right"&&yd.end],children:C.children.map((T,S)=>qn(T,S,i,a,l,d,f,h))},E));return o.jsx(Xf,{children:$},j)})})]})},t)}case"hr":{const v=h==null?void 0:h.hr;return v?o.jsx(v,{},t):o.jsx("hr",{...U(P("markdown-hr",{density:s}),B(he.hr,y,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd))},t)}case"image":{const v=Qp(e.src);if(v==null)return o.jsxs("div",{...U(P("markdown-image",{density:s}),B(y,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd)),children:["[",e.alt,"]"]},t);const w=h==null?void 0:h.image;return w?o.jsx(w,{src:v,alt:e.alt},t):o.jsx("div",{...U(P("markdown-image",{density:s}),B(y,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd)),children:o.jsx("img",{src:v,alt:e.alt,className:"x193iq5w xh6dtrn"})},t)}}}function ny({ref:e,children:t,display:n="block",density:s="default",headingLevelStart:r=1,isStreaming:i=!1,onLinkClick:a,sources:l,citationStyle:c="label",contentWidth:u=680,contentAlign:d="start",components:f,inlinePlugins:h,autolink:p,xstyle:m,className:b,style:y,"data-testid":g}){const k=be(),v=Ri(),w=x.useMemo(()=>l?new Set(Object.keys(l)):void 0,[l]),j=x.useMemo(()=>({sourceIds:w,autolink:p}),[w,p]),$=eN(t,i),C=x.useRef(T1()),E=x.useRef(p);E.current!==p&&(C.current=T1(),E.current=p);const T=x.useMemo(()=>{if(n==="inline")return[];if(i){if($==="")return C.current=T1(),[];const q=pv($);return GI(q,C.current,j)}return PI(t,j)},[n,$,t,i,j]),S=x.useMemo(()=>{if(n!=="inline")return[];const q=i?pv($):t;return EI(q,j)},[n,$,t,i,j]),{token:N}=Qh(),z=x.useMemo(()=>{const q=mv(N("--duration-fast-max"))??230,F=mv(N("--duration-fast-min")),X=F!=null?Math.max(4,Math.round(F/10)):50;return Math.min(Math.ceil(q/X),12)},[N]),M=x.useRef([]),R=x.useRef([]),I=x.useRef([]),A=$.length,O={offset:0,boundaries:x.useMemo(()=>{const q=n==="inline"?ga(R.current):Yp(M.current),F=gI(I.current,q,z);return I.current=F,F},[n,A,z]),active:i},D=l?{sources:l,numberMap:new Map,nextNumber:1,style:c}:null;if(n==="inline"){const q=o.jsx("span",{ref:e,"data-testid":g,...U(P("markdown",{density:s}),B(he.root,he.inlineRoot,m),b,y),children:S.map((F,X)=>qn(F,X,a,O,D,v,h,f))});return R.current=S,M.current=[],q}const L=o.jsx("div",{role:"document",ref:e,"data-testid":g,...U(P("markdown",{density:s}),B(he.root,m),b,y),children:T.map((q,F)=>mc(q,F,T.length,s,r,a,O,D,u?typeof u=="number"?`${u}px`:u:null,d,v,h,f,k))});return M.current=T,R.current=[],L}ny.displayName="Markdown";const i6=x.createContext(null);i6.displayName="CollapsibleGroupContext";const Jp=x.createContext(null);Jp.displayName="CollapsibleGroupPresentationContext";function JI(e){const{isCollapsible:t,value:n}=e,s=x.use(i6),r=s!=null&&n!=null,i=t===!0?{}:t||null,a=i!=null,[l,c]=x.useState(()=>r?!0:(i==null?void 0:i.isOpen)!==void 0?i.isOpen:(i==null?void 0:i.defaultIsOpen)??!0);let u;return r&&n!=null?u=s.isOpen(n):(i==null?void 0:i.isOpen)!==void 0?u=i.isOpen:u=l,{isEnabled:a,isOpen:u,toggle:()=>{var h;if(r&&n!=null){s.toggle(n);return}const f=!u;(i==null?void 0:i.isOpen)===void 0&&c(f),(h=i==null?void 0:i.onOpenChange)==null||h.call(i,f)}}}const lo={root:{kzqmXN:"xh8yej3",$$css:!0},trigger:{kB7OPa:"x9f619",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kzqmXN:"xh8yej3",kkrTdU:"x1ypdohk",kMv6JI:"x9ynric",kGuDYH:"x18juvz8",k63SB2:"x2mo6ok",kMwMTN:"x1tgivj0",k9WMMc:"x1yc453h",k8WAf4:"xt970qd",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},triggerDisabled:{kkrTdU:"x1h6gzvc",kSiTet:"xbyyjgo",$$css:!0},contentHidden:{k1xSpc:"x1s85apg",$$css:!0},content:{kLKAdn:"xfsso4q",kMv6JI:"x9ynric",kGuDYH:"xjm74w1",k63SB2:"xxovm9e",kLWn49:"xw6l6zx",kMwMTN:"x1tgivj0",$$css:!0},divided:{kEafiO:"x11xkdxz x1g31smg",kPef9Z:"x13fuv20",kLZC3w:"x1pc3f07",$$css:!0}},Do={triggerCompact:{k8WAf4:"xu0wf1k",$$css:!0},triggerBalanced:{k8WAf4:"xce4md1",$$css:!0},triggerSpacious:{k8WAf4:"x8o8v82",$$css:!0},contentCompact:{kGO01o:"xy143xn",$$css:!0},contentBalanced:{kGO01o:"x1wesfrj",$$css:!0},contentSpacious:{kGO01o:"xvmdzux",$$css:!0}},e_={compact:Do.triggerCompact,balanced:Do.triggerBalanced,spacious:Do.triggerSpacious},t_={compact:Do.contentCompact,balanced:Do.contentBalanced,spacious:Do.contentSpacious};function a6({trigger:e,children:t,defaultIsOpen:n,isOpen:s,isDisabled:r=!1,onOpenChange:i,value:a,ref:l,xstyle:c,className:u,style:d,...f}){const h=s!==void 0?{isOpen:s,onOpenChange:i}:{defaultIsOpen:n??!0,onOpenChange:i},{isOpen:p,toggle:m}=JI({isCollapsible:h,value:a}),b=()=>{r||m()},y=x.use(Jp),g=(y==null?void 0:y.hasDividers)??!1,k=(y==null?void 0:y.density)??null,v=Ca("chevronDown"),w=x.useId();return o.jsxs("div",{ref:l,...U(P("collapsible",{density:k??void 0}),B(lo.root,g&&lo.divided,c),u,d),...f,children:[o.jsxs("button",{type:"button",onClick:b,"aria-disabled":r||void 0,"aria-expanded":p,"aria-controls":w,tabIndex:r?-1:void 0,...U(P("collapsible-trigger",{density:k??void 0}),B(lo.trigger,k!=null&&e_[k],r&&lo.triggerDisabled)),children:[o.jsx("span",{className:"x1b2iylo xwgcxoh",children:e}),o.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x11xpdln xuedmi6 xlr8y92 xv9yike x7p49u4"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x11xpdln xuedmi6 xlr8y92 xv9yike x19jd1h0"}}[!!p<<0],children:v})]}),o.jsx("div",{id:w,...U(P("collapsible-content",{density:k??void 0}),B(lo.content,k!=null&&t_[k],!p&&lo.contentHidden)),children:y!=null?o.jsx(Jp,{value:null,children:t}):t})]})}a6.displayName="Collapsible";const sy=x.createContext(null);sy.displayName="RadioListContext";function o6({ref:e,label:t,isLabelHidden:n=!1,description:s,value:r,onChange:i,orientation:a="vertical",isDisabled:l=!1,disabledMessage:c,isRequired:u=!1,isOptional:d=!1,size:f="md",status:h,labelTooltip:p,width:m,xstyle:b,className:y,style:g,"data-testid":k,htmlName:v,children:w}){const j=x.useId(),$=v??j,C=x.useId(),E=x.useId(),T=x.useId(),S=x.useId(),N=x.useRef(null),z=l&&!!c,M=ms({placement:"above",focusTrigger:"always",isEnabled:z}),R=x.useMemo(()=>({name:$,value:r,onChange:i,isDisabled:l,hasDisabledMessage:z,isRequired:u,size:f,status:h}),[$,r,i,l,z,u,f,h]),I=x.useCallback(A=>{if(r!=="")return;const _=N.current;if(!_)return;const O=A.relatedTarget;if(O){if(_.contains(O))return}else if(document.activeElement&&document.activeElement!==A.target&&_.contains(document.activeElement))return;const D=Array.from(_.querySelectorAll('input[type="radio"]:not([disabled])'));if(D.length===0)return;const L=A.target,q=D.findIndex(Y=>Y===L);if(q===-1)return;const X=q===D.length-1?D[D.length-1]:D[0];L!==X&&X.focus()},[r]);return o.jsxs(Ll,{ref:e,"data-testid":k,label:t,isLabelHidden:n,description:s,inputID:C,labelID:E,isGroupLabel:!0,descriptionID:s?T:void 0,isOptional:d,isRequired:u,isDisabled:l,status:h?{type:h.type,message:h.message,messageID:h.message?S:void 0}:void 0,labelTooltip:p,statusVariant:"detached",width:m,xstyle:b,className:y,style:g,children:[o.jsx("div",{ref:A=>{N.current=A,M.ref(A)},role:"radiogroup","aria-labelledby":E,onFocus:I,"aria-describedby":[s?T:null,h!=null&&h.message?S:null,z?M.describedBy:null].filter(Boolean).join(" ")||void 0,"aria-invalid":(h==null?void 0:h.type)==="error"?!0:void 0,"aria-required":u||void 0,...U(P("radio-list",{orientation:a,size:f}),{0:{className:"x78zum5 x1q0g3np x9mgr7n"},1:{className:"x78zum5 xdt5ytf x1txdalj"}}[(a==="vertical")<<0]),children:o.jsx(sy,{value:R,children:w})}),z&&M.renderTooltip(c)]})}o6.displayName="RadioList";const n_={xklqth5:"xklqth5",$$css:!0},Cs={container:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",$$css:!0},radioWrapper:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",kHBbk8:"xc8icb0",$$css:!0},input:{kVAEAm:"x10l6tqk",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",kSiTet:"xg01cxk",kkrTdU:"x1ypdohk",kY2c9j:"x1vjfegm",$$css:!0},inputDisabled:{kkrTdU:"x1h6gzvc",$$css:!0},radio:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kaIpWk:"x16rqkct",k1ekBW:"xts7igz",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kB7OPa:"x9f619",$$css:!0},radioUnchecked:{kVAM5u:"xvy26l8 x70talc",kWkggS:"x10xzikg xy1ay1n",$$css:!0},radioChecked:{kVAM5u:"xad5do xaq2ahg",kWkggS:"x1ewilqj xwnx32n",$$css:!0},radioWrapperFocus:{kI3sdo:"x1a2a7pz x1irc7jg",kInvED:"x1wfwxd8 xdjuwb3",kaIpWk:"x16rqkct",$$css:!0},radioDisabled:{kSiTet:"xbyyjgo",kVAM5u:"x14i3s5s",$$css:!0},radioDisabledUnchecked:{kWkggS:"xwmxj5m",$$css:!0},innerDot:{kaIpWk:"x16rqkct",kWkggS:"x1azo05 xwvh9j7",$$css:!0}},kv={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},s_={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},r_={sm:{kzqmXN:"x1xc55vz",kZKoxP:"xdk7pt",$$css:!0},md:{kzqmXN:"x1fsd2vl",kZKoxP:"x170jfvy",$$css:!0}},i_={root:{k8WAf4:"xt970qd",kg3NbH:"xnjsko4",kaIpWk:"x2u8bby",kUk6DE:"x98rzlu",k7Eaqz:"xeuugli",$$css:!0}};function l6({ref:e,label:t,value:n,description:s,isDisabled:r=!1,startContent:i,endContent:a,xstyle:l,className:c,style:u,...d}){const f=x.use(sy);if(!f)throw new Error("RadioListItem must be used within an RadioList");const h=x.useId(),p=x.useId(),m=f.isDisabled||r,b=f.hasDisabledMessage&&!r,y=f.value===n,g=f.size,k=o.jsxs("div",{...B(Cs.radioWrapper,kv[g],!m&&Cs.radioWrapperFocus),children:[o.jsx("input",{id:h,type:"radio",name:f.name,value:n,checked:y,disabled:m&&!b,"aria-disabled":b?"true":void 0,form:b?"":void 0,required:f.isRequired,onChange:()=>{m||f.onChange(n)},"aria-describedby":s?p:void 0,...B(Cs.input,kv[g],m&&Cs.inputDisabled)}),o.jsx("div",{"aria-hidden":"true",...U(P("radio",{size:g,checked:y?"checked":null,disabled:m?"disabled":null}),B(Cs.radio,s_[g],y?Cs.radioChecked:Cs.radioUnchecked,m&&Cs.radioDisabled,m&&!y&&Cs.radioDisabledUnchecked)),children:y&&o.jsx("div",{...U(P("radio-dot",{size:g}),B(Cs.innerDot,r_[g]))})})]}),v=i!=null?o.jsxs(o.Fragment,{children:[k,i]}):k;return o.jsx("div",{ref:e,...U(P("radio-list-item"),B(Cs.container,!m&&n_,l),c,u),...d,children:o.jsx(Ua,{startContent:v,label:o.jsx("label",{htmlFor:h,...{0:{},1:{className:"xnbbluu x1h6gzvc"}}[!!m<<0],children:t}),description:s!=null?o.jsx("span",{id:p,children:s}):void 0,endContent:a,xstyle:i_.root})})}l6.displayName="RadioListItem";const a_=50,o_=40,c6="astryx-resizable:";function kd(e,t,n,s){const r=Math.min(n,Math.max(t,e));if(s.length>0){let i=s[0],a=Math.abs(r-i);for(let l=1;l<s.length;l++){const c=Math.abs(r-s[l]);c<a&&(i=s[l],a=c)}return Math.min(n,Math.max(t,i))}return r}function l_(e){if(typeof window>"u")return null;try{const t=localStorage.getItem(c6+e);if(t!=null){const n=JSON.parse(t);if(typeof n=="number")return n}}catch{}return null}function c_(e,t){if(!(typeof window>"u"))try{localStorage.setItem(c6+e,JSON.stringify(t))}catch{}}function u_(e){if(e==null)return 250;if(typeof e=="number")return e;if(e.endsWith("%")){const t=parseFloat(e);if(!isNaN(t)){const n=typeof window<"u"?window.innerWidth:1200;return Math.round(t/100*n)}}return 250}function u6(e){const{defaultSize:t,minSizePx:n=a_,maxSizePx:s=1/0,collapsible:r=!1,collapsedSize:i=o_,snaps:a=[],autoSaveId:l,onSizeChange:c,onCollapseChange:u}=e,d=u_(t),f=l?l_(l):null,h=f??d,[p,m]=x.useState(()=>kd(h,n,s,a)),[b,y]=x.useState(()=>f===0&&r),g=x.useRef(p),k=x.useRef(p);x.useEffect(()=>{l&&c_(l,b?0:p)},[p,b,l]);const v=x.useCallback(()=>{r&&(g.current=p,y(!0),m(0),u==null||u(!0),c==null||c(0))},[r,p,u,c]),w=x.useCallback(()=>{y(!1);const S=g.current||d,N=kd(S,n,s,a);m(N),u==null||u(!1),c==null||c(N)},[d,n,s,a,u,c]),j=x.useCallback(S=>{const N=kd(S,n,s,a);m(N),y(!1),c==null||c(N)},[n,s,a,c]),$=x.useCallback(()=>{k.current=b?0:p},[p,b]),C=x.useCallback(S=>{const N=k.current+S;if(r&&N<i){b||(g.current=p,u==null||u(!0)),y(!0),m(0),c==null||c(0);return}b&&N>=i&&(y(!1),u==null||u(!1));const z=kd(N,n,s,a);m(z),c==null||c(z)},[r,i,b,p,n,s,a,c,u]),E=x.useCallback(()=>{},[]);return{size:b?0:p,isCollapsed:b,collapse:v,expand:w,resize:j,props:{_size:b?0:p,_isCollapsed:b,_onResizeStart:$,_onResizeMove:C,_onResizeEnd:E,_minSizePx:n,_maxSizePx:s,_snaps:a,_collapsedSize:i,_collapsible:r,_isResizableProps:!0}}}function d_(e){const{regions:t,autoSaveId:n}=e,s=Object.entries(t),r=s.map(([a,l])=>u6({...l,autoSaveId:n?`${n}:${a}`:void 0})),i={};return s.forEach(([a],l)=>{i[a]=r[l]}),i}function d6(e){return"regions"in e?d_(e):u6(e)}const f_=10,h_=50;function x_(e,t,n){if(e!=="auto")return e;const s=t?"end":"start";return n?s==="start"?"end":"start":s}function p_(e){return e==="center"?null:e==="start"?-1:1}const ot={handle:{kVAEAm:"x1n2onr6",kmuXW:"x2lah0s",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kWkggS:"x1m4xfpy",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kI3sdo:"x1a2a7pz x17nn4n9",kInvED:"xh2nty3",$$css:!0},overlay:{kVAEAm:"x10l6tqk",kY2c9j:"xhtitgo",kWkggS:"xjbqb8w",$$css:!0},overlayHorizontal:{kt4wiu:"xtijo5x",k87sOh:"x13vifvy",krVfgx:"x1ey2m1c",kzqmXN:"xkhob8h",$$css:!0},overlayVertical:{krVfgx:"x1ey2m1c",kLqNvP:"x1o0tod",kt4wiu:"xtijo5x",kZKoxP:"x5kfih4",$$css:!0},horizontal:{kzqmXN:"x1i1rx1s",kZKoxP:"x5yr21d",kkrTdU:"xicojor",$$css:!0},vertical:{kZKoxP:"xjm9jq1",kzqmXN:"xh8yej3",kkrTdU:"xyozgr7",$$css:!0},noDividerHorizontal:{kWkggS:"xjbqb8w",kzqmXN:"xnalus7",$$css:!0},noDividerVertical:{kWkggS:"xjbqb8w",kZKoxP:"xqtp20y",$$css:!0},handleHover:{kWkggS:"x1m4xfpy",$$css:!0},handleActive:{kWkggS:"x7njt3n",$$css:!0},disabled:{kkrTdU:"xt0e3qv",kfzvcC:"x47corl",$$css:!0},hitArea:{kVAEAm:"x10l6tqk",kY2c9j:"x1vjfegm",kFalU9:"x5ve5x3",kfSwDN:"x87ps6o",$$css:!0},hitAreaHorizontal:{kzqmXN:"x12xnipv",k87sOh:"x13vifvy",krVfgx:"x1ey2m1c",kkrTdU:"xicojor",$$css:!0},hitAreaVertical:{kZKoxP:"x6b6gus",kLqNvP:"x1o0tod",kt4wiu:"xtijo5x",kkrTdU:"xyozgr7",$$css:!0},hitAreaCenteredY:{k87sOh:"xwa60dl",k3aq6I:"x1cb1t30",$$css:!0},pill:{kVAEAm:"x10l6tqk",kY2c9j:"xhtitgo",kfzvcC:"x47corl",kaIpWk:"xjspbzw",kWkggS:"x1m4xfpy",k1ekBW:"x1wbls7o",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",k87sOh:"xwa60dl",$$css:!0},pillHorizontal:{kzqmXN:"x1g8rjiy",kZKoxP:"x18to7ep",$$css:!0},pillVertical:{kzqmXN:"xgc8j7m",kZKoxP:"xuoj239",$$css:!0},pillHidden:{kSiTet:"xg01cxk",$$css:!0},pillVisible:{kSiTet:"x1hc1fzr",$$css:!0},pillHover:{kSiTet:"x1hc1fzr",kWkggS:"x1m4xfpy",$$css:!0},pillActive:{kSiTet:"x1hc1fzr",kWkggS:"x7njt3n",$$css:!0}},g_={kLqNvP:"x1o0tod",k3aq6I:"x11wx31z x75qhwu",$$css:!0},m_={k87sOh:"x13vifvy",k3aq6I:"xsqj5wx",$$css:!0},y_={kLqNvP:"x1o0tod",k3aq6I:"xsqj5wx",$$css:!0},k_={k87sOh:"x13vifvy",k3aq6I:"xsqj5wx",$$css:!0},bd={hitAreaOffsetX:e=>[g_,{"--x-qthpiu":`translate(calc(${e} * (3px + ${rs["--spacing-1"]}) - 6.5px), -50%)`!=null?`translate(calc(${e} * (3px + ${rs["--spacing-1"]}) - 6.5px), -50%)`:void 0,"--x-sj6hyi":`translate(calc(${e} * (3px + ${rs["--spacing-1"]}) + 6.5px), -50%)`!=null?`translate(calc(${e} * (3px + ${rs["--spacing-1"]}) + 6.5px), -50%)`:void 0}],hitAreaOffsetY:e=>[m_,{"--x-transform":`translate(-50%, calc(${e} * (3px + ${rs["--spacing-1"]}) - 6.5px))`!=null?`translate(-50%, calc(${e} * (3px + ${rs["--spacing-1"]}) - 6.5px))`:void 0}],pillOffsetX:e=>[y_,{"--x-transform":`translate(calc(${e} * (100% + ${rs["--spacing-1"]})), -50%)`!=null?`translate(calc(${e} * (100% + ${rs["--spacing-1"]})), -50%)`:void 0}],pillOffsetY:e=>[k_,{"--x-transform":`translate(-50%, calc(${e} * (100% + ${rs["--spacing-1"]})))`!=null?`translate(-50%, calc(${e} * (100% + ${rs["--spacing-1"]})))`:void 0}]};function ry({direction:e="horizontal",position:t="inline",isReversed:n=!1,isDisabled:s=!1,hasDivider:r=!1,isAlwaysVisible:i=!0,pillPlacement:a="auto",label:l,resizable:c,children:u,xstyle:d,className:f,ref:h,...p}){const m=be(),b=l??m("@astryx.resizable.handle.label"),y=x.useRef(null),g=x.useRef(null),[k,v]=x.useState(!1),[w,j]=x.useState(!1),[$,C]=x.useState(!1),E=e==="horizontal",T=t==="overlay",S=n?-1:1,N=x_(a,n,(c==null?void 0:c._isCollapsed)??!1),z=p_(N),M=x.useCallback(()=>{const X=y.current;return X&&getComputedStyle(X).direction==="rtl"?-1:1},[]),R=w||$,I=x.useCallback(X=>{if(s||!c)return;X.preventDefault(),X.stopPropagation(),v(!0),c._onResizeStart();const Y=E?X.clientX:X.clientY,Z=E?M():1;document.body.style.cursor=E?"col-resize":"row-resize",document.body.style.userSelect="none";const ne=le=>{const ge=((E?le.clientX:le.clientY)-Y)*Z*S;c._onResizeMove(ge)},J=()=>{ie(),v(!1),c._onResizeEnd(),document.body.style.cursor="",document.body.style.userSelect=""},K=()=>{ie(),v(!1),document.body.style.cursor="",document.body.style.userSelect=""};function ie(){window.removeEventListener("pointermove",ne),window.removeEventListener("pointerup",J),window.removeEventListener("pointercancel",K),g.current=null}window.addEventListener("pointermove",ne),window.addEventListener("pointerup",J),window.addEventListener("pointercancel",K),g.current=ie},[s,c,E,M,S]),A=x.useCallback(X=>{if(s||!c)return;const Y=X.shiftKey?h_:f_,Z=E?M():1;switch(X.key){case"ArrowRight":case"ArrowDown":{X.preventDefault(),c._onResizeStart(),c._onResizeMove(Y*(E?Z:1)*S),c._onResizeEnd();break}case"ArrowLeft":case"ArrowUp":{X.preventDefault(),c._onResizeStart(),c._onResizeMove(-Y*(E?Z:1)*S),c._onResizeEnd();break}case"Home":{X.preventDefault(),c._onResizeStart(),c._onResizeMove(c._minSizePx-c._size),c._onResizeEnd();break}case"End":{X.preventDefault(),c._maxSizePx!==1/0&&(c._onResizeStart(),c._onResizeMove(c._maxSizePx-c._size),c._onResizeEnd());break}case"Enter":{X.preventDefault(),c._collapsible&&(c._onResizeStart(),c._onResizeMove(c._isCollapsed?c._minSizePx:-c._size),c._onResizeEnd());break}}},[s,c,E,M,S]),_=x.useCallback(()=>{s||!c||!c._collapsible||(c._onResizeStart(),c._onResizeMove(c._isCollapsed?c._minSizePx:-c._size),c._onResizeEnd())},[s,c]);x.useEffect(()=>()=>{g.current&&(g.current(),document.body.style.cursor="",document.body.style.userSelect="")},[]);const O=(c==null?void 0:c._isCollapsed)??!1,D=c?O?Math.max(c._size,c._minSizePx):c._size:void 0,L=c?c._minSizePx:void 0,q=c&&c._maxSizePx!==1/0?c._maxSizePx:void 0,F=c&&O?m("@astryx.resizable.collapsed"):void 0;return o.jsxs("div",{ref:it(h,y),role:"separator","aria-orientation":E?"vertical":"horizontal","aria-valuenow":D,"aria-valuemin":L,"aria-valuemax":q,"aria-valuetext":F,"aria-label":b,"aria-disabled":s||void 0,tabIndex:s?-1:0,onDoubleClick:_,onFocus:()=>C(!0),onBlur:()=>C(!1),"data-resizing":k||void 0,...U(P("resize-handle"),B(ot.handle,T&&ot.overlay,T&&(E?ot.overlayHorizontal:ot.overlayVertical),!T&&(E?ot.horizontal:ot.vertical),!T&&!r&&(E?ot.noDividerHorizontal:ot.noDividerVertical),!T&&r&&R&&!k&&ot.handleHover,!T&&r&&k&&ot.handleActive,s&&ot.disabled,d),f),...p,onKeyDown:X=>{var Y;(Y=p.onKeyDown)==null||Y.call(p,X),A(X)},children:[o.jsx("div",{...B(ot.hitArea,E?ot.hitAreaHorizontal:ot.hitAreaVertical,z==null?E?ul.centerInline("0px"):ot.hitAreaCenteredY:E?bd.hitAreaOffsetX(z):bd.hitAreaOffsetY(z),s&&ot.disabled),onPointerDown:I,onPointerEnter:()=>j(!0),onPointerLeave:()=>{k||j(!1)}}),u??o.jsx("div",{...U(P("resize-handle-pill"),B(ot.pill,E?ot.pillHorizontal:ot.pillVertical,N==="center"?ul.centerInline("-50%"):E?bd.pillOffsetX(N==="start"?-1:1):bd.pillOffsetY(N==="start"?-1:1),i?ot.pillVisible:ot.pillHidden,R&&!k&&ot.pillHover,k&&ot.pillActive))})]})}ry.displayName="ResizeHandle";const co={dialog:{kVAEAm:"xixxii4",kpwlN0:"x10a8y8t",kzqmXN:"xn9wirt",kZKoxP:"x1dr59a3",ks0D6T:"x1x1rfll",kskxy:"x7ab17h",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",kWkggS:"xjbqb8w",kVQacm:"xb3r6kr",kI3sdo:"x1a2a7pz",kGyWv1:"xnixb3f",kba3nw:"x1abwkk1",$$css:!0},image:{ks0D6T:"x193iq5w",kskxy:"xmz0i5r",kVIFPx:"x19kjcj4",kfzvcC:"x47corl",k1ekBW:"x11xpdln",kIyJzY:"x13dflua x12w9bfk",kAMwcw:"x9lcvmn",$$css:!0},imageDragging:{k1ekBW:"x13b0p5u",$$css:!0},controlButton:{kMwMTN:"x9e3rv5",$$css:!0}},b_={imageTransform:e=>[{k3aq6I:e!=null?"xsqj5wx":e,$$css:!0},{"--x-transform":e??void 0}]},vd=50,bv={ArrowLeft:[vd,0],ArrowRight:[-vd,0],ArrowUp:[0,vd],ArrowDown:[0,-vd]};function f6({isOpen:e,onOpenChange:t,media:n,index:s,defaultIndex:r=0,onIndexChange:i,hasZoom:a=!1,hasAutoPlay:l=!1,xstyle:c,className:u,style:d,ref:f,onClick:h,onKeyDown:p,...m}){const b=be(),y=x.useRef(null),g=x.useRef(null),k=x.useRef(null),v=x.useRef(null),w=s!==void 0,[j,$]=x.useState(r),C=w?s:j,E=x.useCallback(se=>{w||$(se),i==null||i(se)},[w,i,$]),[T,S]=x.useState(1),[N,z]=x.useState({x:0,y:0}),[M,R]=x.useState(!1),I=x.useRef({x:0,y:0,panX:0,panY:0}),A=x.useMemo(()=>Array.isArray(n)?n:[n],[n]),_=A.length>1,O=A.length>0?A[Math.min(C,A.length-1)]:null,L=((O==null?void 0:O.type)??"image")==="video",q=_&&C>0,F=_&&C<A.length-1;t4(e),x.useEffect(()=>{S(1),z({x:0,y:0})},[C,O==null?void 0:O.src]);const X=Dl(),Y=x.useRef(C),Z=x.useRef(e);x.useEffect(()=>{const se=Y.current!==C,en=Z.current;if(Y.current=C,Z.current=e,!se||!e||!en)return;const un=A[Math.min(C,A.length-1)],js=`${C+1} of ${A.length}`;X(un!=null&&un.alt?`${un.alt}, ${js}`:`Image ${js}`)},[C,e,X,A]),ir(()=>{const se=y.current;se&&(e&&!se.open?(v.current=document.activeElement,se.showModal()):!e&&se.open&&(se.close(),v.current instanceof HTMLElement&&v.current.focus()))},[e]);const ne=x.useCallback(()=>{t(!1)},[t]),J=x.useCallback(se=>{se.preventDefault(),ne()},[ne]),K=x.useRef(!1),ie=x.useCallback(se=>{if(K.current){K.current=!1;return}(se.target===se.currentTarget||se.target===g.current)&&ne()},[ne]),le=x.useCallback(()=>{q&&E(C-1)},[q,C,E]),ve=x.useCallback(()=>{F&&E(C+1)},[F,C,E]),ge=x.useCallback(se=>{!a||L||se===T||(S(se),z({x:0,y:0}),X(se>1?b("@astryx.lightbox.zoomedIn"):b("@astryx.lightbox.zoomedOut")))},[a,L,T,X,b]),xe=x.useCallback(()=>{ge(T===1?2:1)},[ge,T]),ce=x.useCallback(se=>{if(a&&!L){if(se.key==="+"||se.key==="="){se.preventDefault(),ge(2);return}if(se.key==="-"){se.preventDefault(),ge(1);return}if(T>1&&bv[se.key]!==void 0){se.preventDefault();const[en,un]=bv[se.key];z(js=>({x:js.x+en,y:js.y+un}));return}}se.key==="ArrowLeft"?(se.preventDefault(),le()):se.key==="ArrowRight"&&(se.preventDefault(),ve())},[a,L,T,ge,le,ve]),Q=x.useCallback(se=>{(se.key==="Enter"||se.key===" ")&&(se.preventDefault(),xe())},[xe]),ye=x.useCallback(se=>{T<=1||!a||(R(!0),K.current=!1,I.current={x:se.clientX,y:se.clientY,panX:N.x,panY:N.y})},[T,a,N]);x.useEffect(()=>{if(!M)return;const se=un=>{K.current=!0;const js=un.clientX-I.current.x,Mn=un.clientY-I.current.y;z({x:I.current.panX+js,y:I.current.panY+Mn})},en=()=>{R(!1)};return window.addEventListener("pointermove",se),window.addEventListener("pointerup",en),()=>{window.removeEventListener("pointermove",se),window.removeEventListener("pointerup",en)}},[M]);const ue=T>1,pe=a&&!L,De=T===1?null:`scale(${T}) translate(${N.x/T}px, ${N.y/T}px)`;return O?o.jsx("dialog",{ref:it(f,y),onCancel:J,onClick:se=>{ie(se),h==null||h(se)},onKeyDown:se=>{ce(se),p==null||p(se)},"aria-label":O.alt||b("@astryx.lightbox.mediaViewer"),...U(P("lightbox"),B(co.dialog,c),u,d),...m,children:o.jsxs("div",{ref:g,className:"x78zum5 xdt5ytf x6s0dn4 xl56j7k xh8yej3 x5yr21d x1n2onr6",children:[o.jsx("div",{className:"x10l6tqk xyx6v2t x1mcfs9z x1vjfegm",children:o.jsx(kn,{icon:o.jsx(Ce,{icon:"close",size:"sm",color:"inherit"}),label:b("@astryx.lightbox.close"),variant:"ghost",onClick:ne,xstyle:co.controlButton})}),_&&o.jsx("div",{className:"x10l6tqk xwa60dl x1cb1t30 x1vjfegm x1ybfrjj",children:o.jsx(kn,{icon:o.jsx("span",{...B(ul.mirror),children:o.jsx(Ce,{icon:"chevronLeft",size:"sm",color:"inherit"})}),label:b("@astryx.lightbox.previous"),variant:"ghost",isDisabled:!q,onClick:le,xstyle:co.controlButton})}),o.jsxs("div",{className:"x78zum5 xdt5ytf x6s0dn4 x193iq5w xmz0i5r xb3r6kr",children:[o.jsx("div",{ref:k,role:pe?"button":void 0,tabIndex:pe?0:void 0,"aria-pressed":pe?ue:void 0,"aria-label":pe?b("@astryx.lightbox.zoom"):void 0,...{0:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr xt0e3qv x87ps6o x2lwn1j"},8:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr xt0e3qv x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk"},4:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1huxd7x x2dt3px"},12:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x1huxd7x x2dt3px"},2:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1jm3nie"},10:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x1jm3nie"},6:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1jm3nie"},14:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x1jm3nie"},1:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j xi9pz9s"},9:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xi9pz9s"},5:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j xi9pz9s"},13:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xi9pz9s"},3:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j xi9pz9s"},11:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xi9pz9s"},7:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j xi9pz9s"},15:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xi9pz9s"}}[!!pe<<3|!!(!L&&a&&!ue)<<2|!!(!L&&ue)<<1|!!(!L&&M)<<0],onDoubleClick:L?void 0:xe,onKeyDown:pe?Q:void 0,onPointerDown:L?void 0:ye,children:L?o.jsx("video",{src:O.src,"aria-label":O.alt,controls:!0,autoPlay:l,className:"x193iq5w xmz0i5r x19kjcj4 x1a2a7pz"}):o.jsx("img",{src:O.src,alt:O.alt,draggable:!1,...B(co.image,M&&co.imageDragging,De!=null&&b_.imageTransform(De))})}),O.caption&&o.jsx("div",{className:"x9e3rv5 x18juvz8 xf74fhv x2b8uid x1xye8es x18d9i69 xrrkdod xrlsmeg x2lah0s",children:O.caption})]}),_&&o.jsx("div",{className:"x10l6tqk xwa60dl x1cb1t30 x1vjfegm x1mcfs9z",children:o.jsx(kn,{icon:o.jsx("span",{...B(ul.mirror),children:o.jsx(Ce,{icon:"chevronRight",size:"sm",color:"inherit"})}),label:b("@astryx.lightbox.next"),variant:"ghost",isDisabled:!F,onClick:ve,xstyle:co.controlButton})}),_&&A.length>1&&o.jsxs("div",{className:"x10l6tqk xyx6v2t x1ybfrjj x9e3rv5 xjm74w1 xw6l6zx x1vjfegm",children:[C+1," / ",A.length]})]})}):null}f6.displayName="Lightbox";const _n={base:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"x1lsbc85",kMv6JI:"xjb2p0i",kGuDYH:"x1qlqyl8",kLWn49:"x15bjb6t",k63SB2:"x1pd3egz",kybGjl:"x1hl2dhg x4ohgrr",kkrTdU:"x1ypdohk",k1ekBW:"x1mpt4pi",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},buttonReset:{kWkggS:"xjbqb8w",ksu8eU:"xng3xce",kmVPX3:"x1717udv",kfzvcC:"x67bb7w",kVAEAm:"x1n2onr6",$$css:!0},hasUnderline:{kybGjl:"x1bvjpef",$$css:!0},disabled:{kkrTdU:"x1h6gzvc",kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0},standalone:{kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",$$css:!0}},A1={primary:{kMwMTN:"x1tgivj0 x4z56r7",$$css:!0},secondary:{kMwMTN:"xv1l7n4 x7ruf5d",$$css:!0},disabled:{kMwMTN:"xnbbluu",$$css:!0},placeholder:{kMwMTN:"xv1l7n4",$$css:!0},accent:{kMwMTN:"xjse4m1 x17qfo7y",$$css:!0},inherit:{kMwMTN:"x1heor9g",$$css:!0}};function v_(e){e.preventDefault()}function h6({as:e,label:t,href:n,hasUnderline:s=!1,isDisabled:r=!1,isExternalLink:i=!1,newTabLabel:a,target:l,onClick:c,tooltip:u,isStandalone:d=!1,type:f="body",size:h,weight:p,color:m="accent",display:b="inline",maxLines:y=0,children:g,rel:k,xstyle:v,className:w,style:j,ref:$,...C}){const E=be(),T=a??E("@astryx.link.newTab"),S=Ri(e),N=r4({href:n,onClick:c,isDisabled:r}),{target:z,rel:M}=W3(i?"_blank":l,k),R=N==="button"||N==="inert"&&n==null,I=o.jsxs(o.Fragment,{children:[o.jsx(ee,{type:f,size:h,weight:p,color:m,display:b,maxLines:y,children:g}),i&&!R&&o.jsxs(o.Fragment,{children:[o.jsx(Ce,{icon:"externalLink",size:"xsm",color:"inherit"}),o.jsx(Mi,{children:T})]})]});let A;return R?A=o.jsx("button",{ref:$,type:"button",onClick:c,"aria-label":t||void 0,"aria-disabled":r||void 0,tabIndex:r?-1:void 0,disabled:r,...U(P("link",{color:m}),B(_n.base,_n.buttonReset,A1[m],s&&_n.hasUnderline,d&&_n.standalone,r&&_n.disabled,v),w,j),...C,children:I}):r?A=o.jsx("a",{ref:$,onClick:v_,"aria-label":t||void 0,"aria-disabled":!0,tabIndex:-1,...U(P("link",{color:m}),B(_n.base,A1[m],s&&_n.hasUnderline,d&&_n.standalone,_n.disabled,v),w,j),...C,children:I}):A=o.jsx(S,{ref:$,href:n,target:z,rel:M,onClick:c,"aria-label":t||void 0,"aria-disabled":r||void 0,tabIndex:r?-1:void 0,...U(P("link",{color:m}),B(_n.base,A1[m],s&&_n.hasUnderline,d&&_n.standalone,r&&_n.disabled,v),w,j),...C,children:I}),u?o.jsx(Fa,{content:u,placement:"above",children:A}):A}h6.displayName="Link";const w_={x1iwu4tg:"x1iwu4tg",$$css:!0},j_={sm:{kzqmXN:"x1td3qas",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"x100vrsf",kZKoxP:"xxk0z11",$$css:!0}},S_={sm:{kzqmXN:"x1td3qas",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"x100vrsf",kZKoxP:"xxk0z11",$$css:!0}},$_={sm:{kzqmXN:"x1td3qas",kZKoxP:"x1qx5ct2",kmVPX3:"x1i3ajwb",$$css:!0},md:{kzqmXN:"x100vrsf",kZKoxP:"xxk0z11",kmVPX3:"xfawy5m",$$css:!0}},C_={sm:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",k3aq6I:"xbryuvx",$$css:!0},md:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",k3aq6I:"xbryuvx",$$css:!0}},E_={sm:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",k3aq6I:"xv5t66b xi9aj42",$$css:!0},md:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",k3aq6I:"x15481yp x12xz5k6",$$css:!0}},T_={sm:{kAzted:"xisnujt",$$css:!0},md:{kAzted:"xjwf9q1",$$css:!0}},tn={container:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",$$css:!0},containerSpread:{kjj79g:"x1qughib",kzqmXN:"xh8yej3",$$css:!0},switchWrapper:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kmuXW:"x2lah0s",kHBbk8:"xc8icb0",$$css:!0},input:{kVAEAm:"x10l6tqk",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",kSiTet:"xg01cxk",kkrTdU:"x1ypdohk",kY2c9j:"x1vjfegm",$$css:!0},inputDisabled:{kkrTdU:"x1h6gzvc",$$css:!0},inputBusy:{kfzvcC:"x47corl",$$css:!0},track:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kaIpWk:"xjspbzw",k1ekBW:"x15406qy",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kB7OPa:"x9f619",kMzoRj:"xc342km x13rsnn2",ksu8eU:"xng3xce xx61lck",kVAM5u:"x1w1tqly",$$css:!0},trackFocus:{kI3sdo:"x1a2a7pz x1gj1ihy",kInvED:"x1edzap1",$$css:!0},trackOff:{kWkggS:"xspzpui x1a8ae7b x9yvj25",$$css:!0},trackOn:{kWkggS:"x1ewilqj xcgwt1n x1jzqe4",$$css:!0},trackDisabled:{kSiTet:"xbyyjgo",kVAM5u:"xmnqt3w",$$css:!0},trackDisabledOff:{kWkggS:"xspzpui",$$css:!0},thumb:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kaIpWk:"xjspbzw",k1ekBW:"xh3q6i0",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",$$css:!0},thumbOff:{kWkggS:"x10xzikg xwvh9j7",$$css:!0},thumbOn:{kWkggS:"x10xzikg x1sir5s4",$$css:!0},labelWrapper:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1lsbc85",kjj79g:"xl56j7k",$$css:!0}},z_={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function x6({label:e,isLabelHidden:t=!1,description:n,onChange:s,changeAction:r,isLoading:i=!1,value:a,isDisabled:l=!1,htmlName:c,disabledMessage:u,isOptional:d=!1,isRequired:f=!1,onFocus:h,onBlur:p,labelIcon:m,labelTooltip:b,labelPosition:y="end",labelSpacing:g="hug",status:k,size:v="md",width:w,xstyle:j,className:$,style:C,ref:E,...T}){const S=x.useId(),N=x.useId(),z=x.useId(),[,M]=x.useTransition(),[R,I]=x.useOptimistic(a),A=i||R!==a,_=R===!0,O=l&&!!u,D=ms({placement:"above",focusTrigger:"always",isEnabled:O}),L=[];n&&L.push(N),k!=null&&k.message&&L.push(z),O&&L.push(D.describedBy);const q=L.length>0?L.join(" "):void 0,F=o.jsxs("div",{...B(tn.switchWrapper,j_[v]),children:[o.jsx("input",{ref:it(E,D.positionRef),id:S,type:"checkbox",role:"switch",name:l?void 0:c,checked:_,disabled:l&&!O,"aria-disabled":O?"true":void 0,required:f,onChange:Y=>{if(l||A)return;const Z=Y.target.checked;s==null||s(Z,Y),r&&!Y.defaultPrevented&&M(async()=>{I(Z),await r(Z,Y)})},onFocus:h,onBlur:p,"aria-describedby":q,"aria-invalid":(k==null?void 0:k.type)==="error"?!0:void 0,"aria-busy":A||void 0,...B(tn.input,S_[v],l&&tn.inputDisabled,A&&tn.inputBusy)}),o.jsx("div",{"aria-hidden":"true",...U(P("switch",{checked:_?"checked":null,disabled:l?"disabled":null,size:v}),B(tn.track,$_[v],_?tn.trackOn:tn.trackOff,!l&&tn.trackFocus,l&&tn.trackDisabled,l&&!_&&tn.trackDisabledOff)),children:o.jsx("div",{...U(P("switch-thumb",{checked:_?"checked":null,size:v}),B(tn.thumb,_?E_[v]:C_[v],_?tn.thumbOn:tn.thumbOff)),children:A&&o.jsx(on,{size:"sm"})})}),A&&o.jsx(Mi,{role:"status",children:"Loading"})]}),X=o.jsx("div",{...B(tn.labelWrapper,T_[v]),children:o.jsx(ix,{label:e,inputID:S,isLabelHidden:t,isDisabled:l,isOptional:d,isRequired:f,labelIcon:m,labelTooltip:b,description:n,descriptionID:N})});return o.jsxs("div",{...U(P("switch-field",{labelPosition:y!=="end"?y:void 0,labelSpacing:g!=="hug"?g:void 0}),B(w!=null&&z_.width(w),j),$,C),...T,children:[o.jsxs("div",{ref:Y=>{D.interactionRef(Y)},...B(tn.container,g==="spread"&&tn.containerSpread,!l&&w_),children:[" ",y==="start"?o.jsxs(o.Fragment,{children:[X,F]}):o.jsxs(o.Fragment,{children:[F,X]})]}),(k==null?void 0:k.message)&&o.jsx("div",{className:"xtbrsbv",children:o.jsx(ax,{type:k.type,message:k.message,id:z,variant:"detached"})}),O&&D.renderTooltip(u)]})}x6.displayName="Switch";const iy=x.createContext(null);iy.displayName="SegmentedControlContext";function A_(){const e=x.use(iy);if(e==null)throw new Error("useSegmentedControlContext must be used within SegmentedControl. Wrap your SegmentedControlItem in <SegmentedControl>.");return e}const wd={container:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"x1lsbc85","--_segmented-control-padding":"x18jk3ff",kmVPX3:"xpoxszi",kWkggS:"x17x4s8c",$$css:!0},fill:{k1xSpc:"x78zum5",kzqmXN:"xh8yej3",$$css:!0},disabled:{kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0},disabledWithMessage:{kSiTet:"xbyyjgo",$$css:!0}},N_={sm:{"--_segmented-control-radius":"x9icjy1",kaIpWk:"x1hapoqb",$$css:!0},md:{"--_segmented-control-radius":"x9icjy1",kaIpWk:"x1hapoqb",$$css:!0},lg:{"--_segmented-control-radius":"x9icjy1",kaIpWk:"x1hapoqb",$$css:!0}};function p6({ref:e,value:t,onChange:n,label:s,size:r,layout:i="hug",isDisabled:a=!1,disabledMessage:l,children:c,xstyle:u,className:d,style:f,onKeyDown:h,onFocus:p,onBlur:m,...b}){const y=Ha(r,"md"),g=a&&!!l,k=ms({placement:"above",focusTrigger:"always",isEnabled:g}),{listRef:v,handleKeyDown:w,handleFocus:j}=Pa({itemSelector:'[role="radio"]:not([aria-disabled="true"])',hasRovingTabIndex:!0,wrap:!0,orientation:"horizontal"}),$=e4({orientation:"horizontal",isEnabled:!a}),C=x.useCallback(S=>{h==null||h(S),!S.defaultPrevented&&($.onKeyDown(S),w(S))},[h,$,w]),E=x.useCallback(S=>{var M;if(p==null||p(S),S.defaultPrevented||($.onFocus(S),j(S),a)||!S.currentTarget.contains(S.relatedTarget))return;const N=(M=S.target)==null?void 0:M.closest('[role="radio"][data-value]');if(!N||N.getAttribute("aria-disabled")==="true")return;const z=N.dataset.value;z!=null&&z!==t&&n(z)},[p,$,j,a,n,t]),T=x.useMemo(()=>({value:t,onChange:n,size:y,layout:i,isDisabled:a,hasDisabledMessage:g}),[t,n,y,i,a,g]);return o.jsxs(iy,{value:T,children:[o.jsxs("div",{ref:it(e,v,k.ref),...b,role:"radiogroup","aria-label":s,"aria-disabled":a||void 0,"aria-describedby":g?k.describedBy:void 0,onKeyDown:C,onFocus:E,onBlur:Xh(m,$.onBlur),...U(P("segmented-control",{size:y}),B(wd.container,N_[y],i==="fill"&&wd.fill,a&&(g?wd.disabledWithMessage:wd.disabled),u),d,f),children:[c,$.hintElement]}),g&&k.renderTooltip(l)]})}p6.displayName="SegmentedControl";const uo={base:{kVAEAm:"x1n2onr6",k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"xzye2dw",kg3NbH:"xrrkdod",kWkggS:"xjbqb8w",kMzoRj:"xc342km",ksu8eU:"xng3xce",kMv6JI:"xjb2p0i",kGuDYH:"xcr08ib",kLWn49:"x1kq96og",k63SB2:"x1e4wzip",kMwMTN:"xv1l7n4",kkrTdU:"x1ypdohk",k1ekBW:"x1vix5yk",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},hover:{kWkggS:"xe9uy6x",$$css:!0},selected:{kAXs8y:"x1kzknox",kMwMTN:"x1tgivj0 x1k5gbb1",k63SB2:"x2mo6ok",kWkggS:"x10xzikg x1jzqe4",kGVxlE:"x1i5ehqx",$$css:!0},disabled:{kkrTdU:"xt0e3qv",kMwMTN:"xnbbluu",$$css:!0},fill:{kUk6DE:"x98rzlu",kjj79g:"xl56j7k",$$css:!0},icon:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",$$css:!0}},M_={sm:{kZKoxP:"xzj98nu",kaIpWk:"xc910v0",kg3NbH:"xf314gf",kGuDYH:"x141an7d",$$css:!0},md:{kZKoxP:"x184gfjb",kaIpWk:"xc910v0",kg3NbH:"xrrkdod",$$css:!0},lg:{kZKoxP:"x1uiybsj",kaIpWk:"xc910v0",kg3NbH:"xrrkdod",$$css:!0}},R_={sm:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",$$css:!0},md:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",$$css:!0},lg:{kzqmXN:"x1xp8n7a",kZKoxP:"xmix8c7",$$css:!0}};function eg({ref:e,value:t,label:n,isLabelHidden:s=!1,icon:r,isDisabled:i=!1,onClick:a,xstyle:l,...c}){const u=A_(),d=u.value===t,f=i||u.isDisabled,h=d&&(u.hasDisabledMessage??!1)&&!i,p=u.size,m=u.layout==="fill",b=Xh(a,()=>{!f&&!d&&u.onChange(t)}),y=r?o.jsx("span",{...B(uo.icon,R_[p]),children:r}):null;return o.jsxs("button",{ref:e,...c,type:"button",role:"radio","aria-checked":d,"aria-disabled":f||void 0,"aria-label":s?n:void 0,"data-value":t,tabIndex:d&&!f||h?0:-1,onClick:b,...U(P("segmented-control-item",{size:p,selected:d?"selected":null,disabled:f?"disabled":null}),B(uo.base,M_[p],m&&uo.fill,d&&uo.selected,!d&&!f&&uo.hover,f&&uo.disabled,l)),children:[y,!s&&o.jsx("span",{children:n})]})}eg.displayName="SegmentedControlItem";const ay=x.createContext(null);ay.displayName="TabListContext";function I_(){const e=x.use(ay);if(e==null)throw new Error("useTabListContext must be used within TabList. Wrap your Tab/TabMenu in <TabList>.");return e}const __="[data-tab-value],[data-tab-menu]",N1={nav:{k1xSpc:"x78zum5",kGNEyG:"x1qjc9v5",kOIVth:"x1lsbc85",ks0D6T:"x193iq5w",k7Eaqz:"xeuugli",$$css:!0},fill:{kzqmXN:"xh8yej3",$$css:!0},divider:{kt9PQ7:"x92x3c3",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",kGO01o:"xy143xn","--_tab-indicator-bottom":"xficto1",$$css:!0}};function g6({ref:e,value:t,onChange:n,size:s,layout:r="hug",hasDivider:i=!1,xstyle:a,className:l,style:c,children:u,onKeyDown:d,onFocus:f,onBlur:h,"aria-label":p,"aria-orientation":m,[Ff]:b,...y}){const g=be(),k=p??g("@astryx.tabList.label"),v=Ha(s,"md"),{listRef:w,handleKeyDown:j,handleFocus:$}=Pa({itemSelector:__,orientation:"both",hasRovingTabIndex:!0}),{hintElement:C,onKeyDown:E,onFocus:T,onBlur:S}=e4(),N=x.useMemo(()=>({value:t,onChange:n,size:v,layout:r}),[t,n,v,r]),z=x.useCallback(I=>{d==null||d(I),!I.defaultPrevented&&(E(I),j(I))},[d,E,j]),M=x.useCallback(I=>{f==null||f(I),!I.defaultPrevented&&(T(I),$(I))},[f,T,$]),R=x.useCallback(I=>{h==null||h(I),!I.defaultPrevented&&S(I)},[h,S]);return o.jsx(ay,{value:N,children:o.jsxs("nav",{ref:it(e,w),...y,"aria-label":k,onKeyDown:z,onFocus:M,onBlur:R,[Ff]:"",...U(P("tab-list",{size:v}),B(N1.nav,r==="fill"&&N1.fill,i&&N1.divider,a),l,c),children:[u,C]})})}g6.displayName="TabList";const O_={x1u3b27q:"x1u3b27q",$$css:!0},jd={base:{kVAEAm:"x1n2onr6",k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"xzye2dw",kg3NbH:"xrrkdod",kWkggS:"xjbqb8w",kMzoRj:"xc342km",ksu8eU:"xng3xce",kaIpWk:"xh6dtrn",kMv6JI:"xjb2p0i",kGuDYH:"xcr08ib",kLWn49:"x1kq96og",k63SB2:"x1sodnla",kMwMTN:"xv1l7n4",kkrTdU:"x1ypdohk",kybGjl:"x1hl2dhg",khDVqt:"xuxw1ft",k1ekBW:"xt3l3uh",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},hoverBg:{kVAEAm:"x10l6tqk",kpwlN0:"x10a8y8t",kogj98:"x1bpp3o7",kzqmXN:"xh8yej3",kaIpWk:"xh6dtrn",kfzvcC:"x47corl",kWkggS:"xjbqb8w x1a1zr74",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0},selected:{kMwMTN:"x1tgivj0",k63SB2:"x2mo6ok",$$css:!0},icon:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",$$css:!0}},D_={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},L_={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},B_={fill:{kUk6DE:"x98rzlu",kjj79g:"xl56j7k",$$css:!0}},q_={sm:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",$$css:!0},md:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",$$css:!0},lg:{kzqmXN:"x1xp8n7a",kZKoxP:"xmix8c7",$$css:!0}};function rf({as:e,ref:t,value:n,label:s,isLabelHidden:r=!1,href:i,icon:a,selectedIcon:l,endContent:c,xstyle:u,className:d,style:f,...h}){const p=I_(),m=Ri(e),b=p.value===n,y=p.size,g=p.layout==="fill",k=b&&l?l:a,v=!r&&s!=="",w=x.useCallback(()=>{p.onChange(n)},[p,n]),j=k?o.jsx("span",{...B(jd.icon,q_[y]),children:k}):null,$={...h,...r?{"aria-label":s}:{},[Ff]:"","data-tab-value":n,"aria-current":b?"page":void 0,tabIndex:b?0:-1,...U(P("tab",{selected:b?"selected":null}),B(jd.base,D_[y],b&&jd.selected,g&&B_.fill,O_,u),d,f)},C=o.jsx("span",{"aria-hidden":"true",...B(jd.hoverBg,L_[y])}),E=o.jsx("span",{...U(P("tab-indicator",{selected:b?"selected":null}),{0:{className:"x10l6tqk xyi47jn x1ybfrjj x1mcfs9z x36qwtl xjspbzw x47corl xnpjden xuedmi6 xlr8y92 xjbqb8w xg01cxk"},1:{className:"x10l6tqk xyi47jn x1ybfrjj x1mcfs9z x36qwtl xjspbzw x47corl xnpjden xuedmi6 xlr8y92 x1ewilqj x1hc1fzr"}}[!!b<<0])}),T=v?o.jsxs("span",{className:"xwz0xwf",children:[o.jsx("span",{className:"x1agbcgv xcrlgei",children:s}),o.jsx("span",{"aria-hidden":"true",className:"x1agbcgv xcrlgei xlshs6z x47corl x2mo6ok",children:s})]}):null,S=c?o.jsx("span",{className:"x3nfvp2 x6s0dn4 x2lah0s",children:c}):null;return i!=null?o.jsxs(m,{ref:t,href:i,onClick:w,...$,children:[C,j,T,S,E]}):o.jsxs("button",{ref:t,type:"button",onClick:w,...$,children:[C,j,T,S,E]})}rf.displayName="Tab";const H_=.8,Ui={wrapper:{kY2c9j:"x1vjfegm",k1xSpc:"x1lliihq",kmVPX3:"x1717udv","--_textarea-inline-padding":"x1kdpo6e",$$css:!0},textarea:{k1xSpc:"x1lliihq",kzqmXN:"xh8yej3",kB7OPa:"x9f619",k7Eaqz:"xeuugli",kMzoRj:"xc342km",ksu8eU:"xng3xce",k8WAf4:"xu0wf1k",kg3NbH:"x1w6f3ag",kMv6JI:"x9ynric",kGuDYH:"xjm74w1 x6pjikd",kLWn49:"xw6l6zx",kMwMTN:"x1tgivj0",kWkggS:"xjbqb8w",kI3sdo:"x1a2a7pz",k8Qsv1:"xeyghm5",kHenm0:"x288g5",$$css:!0},textareaDisabled:{kkrTdU:"x1h6gzvc",$$css:!0},textareaWithStartIcon:{kZCmMZ:"x1b6te9z",$$css:!0},textareaWithStatus:{kwRFfy:"xp2dy4z",$$css:!0},textareaWithBusyStatus:{kwRFfy:"x1g2apga",$$css:!0},textareaWithCounter:{kGO01o:"xekm6fs",$$css:!0}},P_={sm:{$$css:!0},md:{$$css:!0},lg:{k8WAf4:"xce4md1",$$css:!0}};function m6({label:e,isLabelHidden:t=!1,description:n,isOptional:s=!1,isRequired:r=!1,onChange:i,changeAction:a,isLoading:l=!1,value:c,placeholder:u,rows:d=3,isDisabled:f=!1,disabledMessage:h,status:p,statusVariant:m="attached",labelTooltip:b,startIcon:y,hasSpellCheck:g=!0,onPaste:k,maxLength:v,hasAutoFocus:w=!1,size:j,htmlName:$,onFocus:C,onBlur:E,width:T,xstyle:S,className:N,style:z,ref:M,...R}){const I=Ha(j,"md"),A=be(),_=Dl(),O=x.useId(),D=x.useId(),L=x.useId(),q=x.useId(),F=x.useRef(null),X=x.useRef(null),Y=x.useRef(null),[,Z]=x.useTransition(),[ne,J]=x.useOptimistic(c),K=l||ne!==c,ie=f&&!!h,le=ms({placement:"above",focusTrigger:"always",isEnabled:ie}),{statusIcon:ve,describedBy:ge}=s4({status:p,statusVariant:m}),xe=[n?D:null,m!=="tooltip"&&(p!=null&&p.message)?L:null,ge,v!=null?q:null,ie?le.describedBy:null].filter(Boolean).join(" ")||void 0,ce=x.useCallback(De=>{if(v==null)return;const se=De>v?"over":De>=v*H_?"near":"under";se!==Y.current&&(Y.current=se,se==="over"?_(A("@astryx.textArea.charactersOverLimit",{count:De-v}),"assertive"):se==="near"&&_(A("@astryx.textArea.charactersRemaining",{count:v-De})))},[_,A,v]),Q=De=>{if(f)return;const se=De.target.value;ce(se.length),i==null||i(se,De),a&&!De.defaultPrevented&&Z(async()=>{J(se),await a(se,De)})},ye=f||K,{onClick:ue,onMouseUp:pe}=z0({containerRef:X,inputRef:F,disabled:ye});return o.jsxs(Ll,{label:e,isLabelHidden:t,description:n,inputID:O,descriptionID:n?D:void 0,isOptional:s,isRequired:r,isDisabled:f,status:p?{type:p.type,message:p.message,messageID:p.message?L:void 0}:void 0,statusVariant:m,labelTooltip:b,width:T,children:[o.jsxs("div",{ref:De=>{X.current=De,le.ref(De)},onClick:ue,onMouseUp:pe,...U(P("textarea",{size:I,status:(p==null?void 0:p.type)??null}),B(dl.base,Ui.wrapper,f&&dl.disabled,p&&L0[p.type],p&&!f&&B0[p.type],p&&j4[p.type],S),N,z),children:[y&&o.jsx("span",{className:"x10l6tqk xctzyg x1kiyvbf x47corl x78zum5",children:qs(y,{size:"sm",color:"secondary"})}),o.jsx("textarea",{...R,ref:it(M,F),id:O,name:$,value:ne,onChange:Q,onPaste:k,onFocus:C,onBlur:E,placeholder:u,rows:d,disabled:f&&!ie,"aria-disabled":ie?"true":void 0,readOnly:ie||void 0,spellCheck:g,autoFocus:w,"data-autofocus":w||void 0,"aria-describedby":xe,"aria-required":r&&!s?"true":void 0,"aria-invalid":(p==null?void 0:p.type)==="error"||v!=null&&ne.length>v?"true":void 0,"aria-busy":K||void 0,...B(Ui.textarea,P_[I],f&&Ui.textareaDisabled,!!y&&Ui.textareaWithStartIcon,(p||K)&&Ui.textareaWithStatus,K&&!!ve&&Ui.textareaWithBusyStatus,v!=null&&Ui.textareaWithCounter)}),(K||ve)&&o.jsxs("span",{className:"x10l6tqk xctzyg x13oyzgk x47corl x78zum5 x6s0dn4 x1txdalj",children:[K&&o.jsx(on,{size:"sm"}),ve]}),v!=null&&o.jsxs("div",{id:q,...{0:{className:"x10l6tqk x112dmjn x13oyzgk x47corl x78zum5 x6s0dn4 xzye2dw x9ynric x141an7d x1ltkj2j xv1l7n4"},1:{className:"x10l6tqk x112dmjn x13oyzgk x47corl x78zum5 x6s0dn4 xzye2dw x9ynric x141an7d x1ltkj2j xjt36v0"}}[(ne.length>v)<<0],children:[ne.length>v&&o.jsx(Ce,{icon:"warning",size:"sm"}),ne.length,"/",v]})]}),ie&&le.renderTooltip(h)]})}m6.displayName="TextArea";function y6({ref:e,href:t,isDisabled:n,LinkComponent:s,linkStyleProps:r,labelContent:i,icon:a,endContent:l,removeButton:c,...u}){const d=x.useRef(null),f=x.useRef(null),{onClick:h,onMouseUp:p}=$0({containerRef:d,interactiveRef:f,href:t,disabled:n});return o.jsxs("span",{ref:it(e,d),onClick:n?void 0:h,onMouseUp:n?void 0:p,...u,children:[a,o.jsx(s,{ref:f,href:t,"aria-disabled":n||void 0,...r,children:i}),l,c]})}y6.displayName="TokenLink";const On={base:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"xzye2dw",k8WAf4:"xt970qd",kMzoRj:"xc342km",ksu8eU:"xng3xce",kaIpWk:"xx3sua9",kMv6JI:"xjb2p0i",kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",k63SB2:"x1e4wzip",khDVqt:"xuxw1ft",kybGjl:"x1hl2dhg",ks0D6T:"x193iq5w",kVQacm:"xb3r6kr",$$css:!0},interactive:{kkrTdU:"x1ypdohk",k1ekBW:"x12qzo2w",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kKwaWg:"x1ilzqfv xq8i9tn",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},disabled:{kkrTdU:"x1h6gzvc",kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0},focusVisibleOutline:{kI3sdo:"x1irc7jg",kInvED:"x1wfwxd8 xdjuwb3",$$css:!0}},Sd={sm:{kZKoxP:"xzydfjl",kGuDYH:"x141an7d",kg3NbH:"xf314gf",$$css:!0},md:{kZKoxP:"xrmxcn7",kg3NbH:"xf314gf",$$css:!0},lg:{kZKoxP:"x102lyln",kg3NbH:"xf314gf",$$css:!0}},$d={default:{kWkggS:"x17x4s8c",kMwMTN:"x1tgivj0",$$css:!0},red:{kWkggS:"x1cibrc5",kMwMTN:"x1joocv1",$$css:!0},orange:{kWkggS:"x1e9xt6e",kMwMTN:"xm47u9q",$$css:!0},yellow:{kWkggS:"x1bo7t0x",kMwMTN:"xdhq94a",$$css:!0},green:{kWkggS:"x1sqjeoo",kMwMTN:"xltfdvo",$$css:!0},teal:{kWkggS:"x1jtji5o",kMwMTN:"x9x0lbs",$$css:!0},cyan:{kWkggS:"x1rgj867",kMwMTN:"x1txnczv",$$css:!0},blue:{kWkggS:"x1o0wnni",kMwMTN:"x1vvqiwl",$$css:!0},purple:{kWkggS:"x16i6n6f",kMwMTN:"x1m9wyeb",$$css:!0},pink:{kWkggS:"xnpoty2",kMwMTN:"xiuofww",$$css:!0},gray:{kWkggS:"xspzpui",kMwMTN:"xru1t7f",$$css:!0}};function vn({label:e,size:t="md",color:n="default",icon:s,isDisabled:r=!1,onRemove:i,onClick:a,href:l,description:c,endContent:u,isLabelHidden:d=!1,xstyle:f,className:h,style:p,"data-testid":m,ref:b}){const y=be(),g=Ri(),k=r4({href:l,onClick:a,isDisabled:r}),v=a??(k==="button"?()=>{}:null),w=i!=null&&o.jsx("button",{type:"button","aria-label":y("@astryx.token.remove",{label:e}),onClick:C=>{C.stopPropagation(),i(C)},disabled:r,className:"x3nfvp2 x6s0dn4 xl56j7k x1n2onr6 x1717udv xkd40ry x1ypdohk xjspbzw x1kky2od xlup9mm x1heor9g x17nn4n9 x1s928wv x1j6awrg x1xsm0q9",children:o.jsx(Ce,{icon:"close",size:"xsm",color:"inherit"})}),j=o.jsxs(o.Fragment,{children:[s,o.jsx("span",{...{0:{className:"xb3r6kr xlyipyv xuxw1ft xeuugli"},1:{className:"xlyipyv xeuugli x10l6tqk x1i1rx1s xjm9jq1 x1717udv xkdpibf xb3r6kr x1hyvwdk xuxw1ft xc342km"}}[!!d<<0],children:e}),u,w]}),$={"data-testid":m,"aria-label":d?e:void 0,"aria-description":c};if(k==="link")return i==null?o.jsx(g,{ref:b,href:l,"aria-disabled":r||void 0,...$,...U(P("token",{color:n,size:t}),B(On.base,Sd[t],$d[n],On.interactive,r&&On.disabled,f),h,p),children:j}):o.jsx(y6,{ref:b,href:l,isDisabled:r,LinkComponent:g,icon:s,endContent:u,removeButton:w,linkStyleProps:{className:"xmper1u xln7xf2 x1heor9g x1a2a7pz xb3r6kr xeuugli"},labelContent:o.jsx("span",{...{0:{className:"xb3r6kr xlyipyv xuxw1ft xeuugli"},1:{className:"xlyipyv xeuugli x10l6tqk x1i1rx1s xjm9jq1 x1717udv xkdpibf xb3r6kr x1hyvwdk xuxw1ft xc342km"}}[!!d<<0],children:e}),...$,...U(P("token",{color:n,size:t}),B(On.base,Sd[t],$d[n],On.interactive,On.focusVisibleOutline,r&&On.disabled,f),h,p)});if(v!=null){const C=E=>{E.target.closest("button, a")||v(E)};return o.jsxs("span",{ref:b,onClick:r?void 0:C,...$,...U(P("token",{color:n,size:t}),B(On.base,Sd[t],$d[n],On.interactive,On.focusVisibleOutline,r&&On.disabled,f),h,p),children:[s,o.jsx("button",{type:"button",onClick:v,disabled:r,className:"xmper1u xln7xf2 x1heor9g x1a2a7pz xb3r6kr xeuugli",children:o.jsx("span",{...{0:{className:"xb3r6kr xlyipyv xuxw1ft xeuugli"},1:{className:"xlyipyv xeuugli x10l6tqk x1i1rx1s xjm9jq1 x1717udv xkdpibf xb3r6kr x1hyvwdk xuxw1ft xc342km"}}[!!d<<0],children:e})}),u,w]})}return o.jsx("span",{ref:b,...$,...U(P("token",{color:n,size:t}),B(On.base,Sd[t],$d[n],r&&On.disabled,f),h,p),children:j})}vn.displayName="Token";const U_=1e3,F_=100,vv={root:{kWkggS:"xprdx6m x1j0df82 x1o55y2u",kSiTet:"xvpkmg4 x1tbh5bv",$$css:!0},animate:{kILWW9:"xpz12be",k44tkh:"xqgcaz",ko0y90:"xa4qsjk",kKVMdj:"xeuoslp x1aquc0h",kyAemX:"x193epu2",$$css:!0}},G_={0:{kaIpWk:"xwksslw",$$css:!0},1:{kaIpWk:"xx3sua9",$$css:!0},2:{kaIpWk:"xh6dtrn",$$css:!0},3:{kaIpWk:"x1hviunn",$$css:!0},4:{kaIpWk:"x1hviunn",$$css:!0},none:{kaIpWk:"x2u8bby",$$css:!0},rounded:{kaIpWk:"xjspbzw",$$css:!0}},V_={kKxzle:"xvo38ju",$$css:!0},wv={animationDelay:e=>[V_,{"--x-animationDelay":(t=>typeof t=="number"?t+"ms":t??void 0)(`${U_+F_*e}ms`)}],dimensions:(e,t)=>[{kzqmXN:(typeof e=="number"?`${e}px`:e)!=null?"x5lhr3w":typeof e=="number"?`${e}px`:e,kZKoxP:(typeof t=="number"?`${t}px`:t)!=null?"x16ye13r":typeof t=="number"?`${t}px`:t,$$css:!0},{"--x-width":(n=>typeof n=="number"?n+"px":n??void 0)(typeof e=="number"?`${e}px`:e),"--x-height":(n=>typeof n=="number"?n+"px":n??void 0)(typeof t=="number"?`${t}px`:t)}]};function k6({width:e="100%",height:t="100%",radius:n=3,index:s=0,"data-testid":r,xstyle:i,className:a,style:l,ref:c,...u}){return o.jsx("div",{ref:c,"aria-hidden":"true","data-testid":r,...U(P("skeleton"),B(vv.root,vv.animate,G_[n],wv.dimensions(e,t),wv.animationDelay(s),i),a,l),...u})}k6.displayName="Skeleton";const M1={root:{kVAEAm:"x1n2onr6",k1xSpc:"x3nfvp2",kXwgrk:"xdt5ytf",kzqmXN:"x1fu8urw",kmuXW:"x2lah0s",kHBbk8:"xc8icb0",$$css:!0},removeButtonOverrides:{"--_button-radius":"xh8ntw8",kZKoxP:"x1qx5ct2",k7Eaqz:"xt4ypqs",kWkggS:"x1u4601x",kMwMTN:"x9e3rv5",$$css:!0},disabled:{kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0}};function W_(){return o.jsx("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:o.jsx("path",{d:"M21 19V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2M8.5 13.5l2.5 3 3.5-4.5 4.5 6H5l3.5-5.5z"})})}function Zf({src:e,alt:t,label:n,onRemove:s,onClick:r,isLoading:i=!1,isDisabled:a=!1,showRemoveOn:l="hover",xstyle:c,className:u,style:d,"data-testid":f,ref:h,...p}){const m=be(),[b,y]=x.useState(void 0),g=e!=null,k=g&&b===e,v=i&&!g,w=g&&!v&&!k,j=i&&g,$=!i&&!g||k,C=r!=null&&!a&&!i,E=s!=null&&!a,T=E&&l==="hover",{getContainerProps:S,getContentRevealProps:N}=kN({isEnabled:T}),z=n&&t?`${n} — ${t}`:n??t??m("@astryx.thumbnail.fallbackName"),M=!t,R=t!=null||n!=null||p["aria-label"]!=null||p["aria-labelledby"]!=null;Il("Thumbnail",'`src` is set without `alt` or `label`. The image is treated as decorative and hidden from assistive technology, and the thumbnail falls back to a generic "thumbnail" name. Pass `alt` to describe the image content, or `label` (file name) to name the thumbnail.',g&&!R);const I=o.jsxs(o.Fragment,{children:[w&&o.jsx("img",{src:e,alt:t??"",role:M?"presentation":void 0,"aria-hidden":M||void 0,onError:()=>y(e),className:"xh8yej3 x5yr21d xl1xv1r x1lliihq"}),v&&o.jsx(k6,{radius:2}),$&&o.jsx("div",{className:"x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d xv9yike",children:o.jsx(W_,{})})]}),A=E?o.jsx("div",{...U({className:"x10l6tqk x8d4r5l xy3asu9 x1vjfegm x14ju556"},T?N({isLayoutPreserved:!0}):{}),children:o.jsx(re,{icon:o.jsx(Ce,{icon:"close",size:"xsm"}),label:m("@astryx.thumbnail.remove",{accessibleName:z}),variant:"secondary",size:"sm",isIconOnly:!0,onClick:O=>{O.stopPropagation(),s(O)},xstyle:M1.removeButtonOverrides})}):null,_=o.jsx("div",{ref:h,"data-testid":f,role:"group","aria-label":z,...U(P("thumbnail"),B(M1.root,a&&M1.disabled,c),u,d),...p,children:o.jsxs("div",{...U({0:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c"},4:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1ypdohk x1irc7jg x1wfwxd8 xdjuwb3"},2:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1s928wv x1j6awrg xarstr8 x1k48kgn x2q1x1w x1ywzrc5 x97pup0 x1dlmc9c xyhc2n1 x1k7wiig"},6:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1ypdohk x1irc7jg x1wfwxd8 xdjuwb3 x1s928wv x1j6awrg xarstr8 x1k48kgn x2q1x1w x1ywzrc5 x97pup0 x1dlmc9c xyhc2n1 x1k7wiig"},1:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c xi14tyy"},5:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1ypdohk x1irc7jg x1wfwxd8 xdjuwb3 xi14tyy"},3:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1s928wv x1j6awrg xarstr8 x1k48kgn x2q1x1w x1ywzrc5 x97pup0 x1dlmc9c xyhc2n1 x1k7wiig xi14tyy"},7:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1ypdohk x1irc7jg x1wfwxd8 xdjuwb3 x1s928wv x1j6awrg xarstr8 x1k48kgn x2q1x1w x1ywzrc5 x97pup0 x1dlmc9c xyhc2n1 x1k7wiig xi14tyy"}}[!!C<<2|!!C<<1|!!C<<0],T?S():{}),children:[C?o.jsx("button",{type:"button",onClick:r,"aria-label":m("@astryx.thumbnail.open",{accessibleName:z}),className:"x1ypdohk x1lliihq xh8yej3 x5yr21d xh6dtrn xb3r6kr",children:I}):I,w&&o.jsx("div",{className:"x10l6tqk x10a8y8t x1pjcqnp x1er153n x47corl"}),j&&o.jsx("div",{className:"x10l6tqk x10a8y8t x78zum5 x6s0dn4 xl56j7k x1u4601x x1pjcqnp x1vjfegm x14ju556",children:o.jsx(on,{size:"sm",shade:"onMedia"})}),A]})});return n!=null?o.jsx(Fa,{content:n,children:_}):_}Zf.displayName="Thumbnail";const ic={dropdown:{kB7OPa:"x9f619",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1lsbc85",kskxy:"xuyqlj2",kORKVm:"x1odjw0f","--_dropdown-menu-radius":"x1fcsqxe","--_dropdown-menu-padding":"xgory14",kmVPX3:"x9epnlk",kaIpWk:"x1n97fys",kSiTet:"x1hc1fzr",k1ekBW:"x19991ni",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0},popover:{k7Eaqz:"xrzjruh",$$css:!0},popoverBlockGap:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0},popoverInlineGap:{keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0},popoverCustomWidth:e=>[{k7Eaqz:(typeof e=="number"?`${e}px`:e)!=null?"xkj4a21":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(typeof e=="number"?`${e}px`:e)}]},K_="@astryx.dropdownMenu.label";function Va({button:e,isMenuOpen:t,onOpenChange:n,menuWidth:s,onClick:r,hasChevron:i=!0,placement:a="below",alignment:l="start",className:c,style:u,xstyle:d,"data-testid":f,...h}){const p=be(),m=e??{label:p(K_)},b=("items"in h?h.items:void 0)??[],y=h.children,{items:g,children:k,...v}=h,w=x.useId(),j=m.size??"md",$=x.useRef(null),[C,E]=x.useState(!1),T=t!==void 0,S=T?t:C,N=x.useRef(0),z=x.useCallback(()=>{var ce;N.current=Date.now(),n==null||n(!1),T||E(!1),(ce=$.current)==null||ce.focus()},[T,n]),M=x.useRef(!1),R=x.useCallback(()=>{n==null||n(!0),T||E(!0)},[T,n]),I=_l({onHide:z,onShow:R,hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"}),A=x.useCallback(()=>{I.hide()},[I]),{listRef:_,handleKeyDown:O,focusFirst:D,focusItem:L,ownsEvent:q,getItems:F}=Pa({itemSelector:nx,boundarySelector:sx,wrap:!1,onEscape:A}),X=tx({getItemLabels:()=>F().map(ce=>ce.textContent),onMatch:L,getCurrentIndex:()=>F().findIndex(ce=>ce===document.activeElement||ce.contains(document.activeElement))});x.useEffect(()=>{T&&(t&&!I.isOpen?(M.current=!0,I.show()):!t&&I.isOpen&&I.hide())},[t,T,I]),x.useEffect(()=>{!I.isOpen||!M.current||(M.current=!1,requestAnimationFrame(()=>D()))},[I.isOpen,D]);const Y=x.useCallback(ce=>{if(q(ce)){if(ce.key==="Enter"||ce.key===" "){ce.preventDefault();const Q=document.activeElement;Q&&Iu.has(Q.getAttribute("role")??"")&&Q.click();return}if(ce.key==="Tab"){A();return}if(X.onKeyDown(ce)){ce.preventDefault();return}O(ce)}},[O,A,X,q]),Z=x.useCallback(()=>{M.current=!0,I.show()},[I]),ne=x.useCallback(()=>{Date.now()-N.current<50||(r==null||r(),T?n==null||n(!t):I.isOpen?I.hide():Z())},[r,T,n,t,I,Z]),J=x.useCallback(ce=>{I.isOpen||(ce.key==="ArrowDown"||ce.key==="Enter"||ce.key===" ")&&(ce.preventDefault(),Z())},[I.isOpen,Z]),K=m.isIconOnly===!0,ie=m.endContent??(i&&!K?o.jsx(Ce,{icon:"chevronDown",size:"sm",color:"inherit"}):void 0),le=s?ic.popoverCustomWidth(s):ic.popover,ve=a==="above"||a==="below"?ic.popoverBlockGap:ic.popoverInlineGap,ge=x.useMemo(()=>({closeMenu:A,menuSize:j}),[A,j]),xe=h.items!==void 0?rx(b):y;return o.jsxs(o.Fragment,{children:[o.jsx(re,{...m,ref:ce=>{$.current=ce,I.triggerRef(ce);const Q=m.ref;typeof Q=="function"?Q(ce):Q&&(Q.current=ce)},tooltip:S?void 0:m.tooltip,endContent:ie,onClick:ne,onKeyDown:J,"aria-haspopup":"menu","aria-expanded":S,"aria-controls":w,"data-testid":f}),I.render(o.jsx("div",{...v,ref:_,id:w,role:"menu","aria-label":m.label,onKeyDown:Y,...U(P("dropdown-menu"),B(ic.dropdown,d),c,u),children:o.jsx(Ol,{value:ge,children:xe})}),{placement:a,alignment:l,xstyle:[le,ve,rr[a]]})]})}Va.displayName="DropdownMenu";function hx({items:e,label:t,variant:n="ghost",size:s,icon:r,isDisabled:i=!1,isMenuOpen:a,onOpenChange:l,xstyle:c,className:u,style:d,"data-testid":f,ref:h}){const p=be(),m=t??p("@astryx.moreMenu.label"),b=Ha(s,"md"),y=Ca("moreHorizontal");return o.jsx(Va,{className:u?`${Op("more-menu")} ${u}`:Op("more-menu"),xstyle:c,style:d,isMenuOpen:a,onOpenChange:l,button:{label:m,icon:r??y,variant:n,size:b,isDisabled:i,tooltip:m,isIconOnly:!0,ref:h},items:e,hasChevron:!1,"data-testid":f})}hx.displayName="MoreMenu";const fr={dialog:{kVAEAm:"xixxii4",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",ks0D6T:"x1x1rfll",kskxy:"x7ab17h",kpwlN0:"x10a8y8t",kzqmXN:"xn9wirt",kZKoxP:"xtdtrs8",kWkggS:"xjbqb8w",kVQacm:"xb3r6kr",kZeWKH:"xish69e",kFalU9:"x5ve5x3",kI3sdo:"x1a2a7pz",k1xSpc:"x1s85apg",$$css:!0},open:{k1xSpc:"x78zum5",$$css:!0},backdrop:{kGyWv1:"xnixb3f",kba3nw:"x1abwkk1",k5sjJv:"xph5o2a",kND0Po:"x167zut7",k9an0g:"xft5bk6",kb4ib:"x15h3t91",kA5Tbj:"x1viac0w",$$css:!0},backdropOpen:{k5sjJv:"xb3n6bw",$$css:!0},drawer:{kVAEAm:"x10l6tqk",k87sOh:"x13vifvy",krVfgx:"x1ey2m1c",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kWkggS:"x10xzikg",kB7OPa:"x9f619",kVQacm:"xb3r6kr",k1ekBW:"x11xpdln",kIyJzY:"x80gvsz",kAMwcw:"xlr8y92",kI3sdo:"x1a2a7pz",k6CgDc:"xzg1mie",$$css:!0},drawerStart:{kLqNvP:"x1o0tod",ke9TFa:"xw8tdv1",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",k3aq6I:"x5i6ehr xttggg",$$css:!0},drawerStartOpen:{k3aq6I:"xbryuvx",$$css:!0},drawerEnd:{kt4wiu:"xtijo5x",k2ei4v:"xgbv0en",kVhnKS:"x1t7ytsu",kGJrpR:"x1j92z86",k3aq6I:"xumwmo6 x1df3fe5",$$css:!0},drawerEndOpen:{k3aq6I:"xbryuvx",$$css:!0}},X_={kzqmXN:"xn9wirt",ks0D6T:"xf68679",$$css:!0},Z_={width:e=>[X_,{"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(`${e}px`)}]};function oy({isOpen:e,onOpenChange:t,children:n,header:s,width:r=320,side:i="auto",label:a,"data-testid":l,xstyle:c,className:u,style:d,onClick:f,ref:h,...p}){const m=be(),b=ex(),y=e??b.isMobileNavOpen,g=x.useId(),k=b.mobileNavId||g,v=x.useMemo(()=>t??(N=>{N?b.openMobileNav():b.closeMobileNav()}),[t,b]),w=x.useRef(null),j=x.useRef(null),[$,C]=x.useState(i==="auto"?"end":i);x.useEffect(()=>{const N=w.current;if(N){if(j.current&&(clearTimeout(j.current),j.current=null),y){if(i==="auto"){const z=document.activeElement;if(z&&z!==document.body){const M=z.getBoundingClientRect(),R=M.left+M.width/2;C(R<window.innerWidth/2?"start":"end")}}else C(i);N.open||N.showModal(),document.documentElement.style.overflow="clip"}else if(N.open){document.documentElement.style.overflow="";const z=window.matchMedia("(prefers-reduced-motion: reduce)").matches?10:250;j.current=setTimeout(()=>{N.close()},z)}return()=>{j.current&&(clearTimeout(j.current),j.current=null),document.documentElement.style.overflow="",N.open&&N.close()}}},[y,i]);const E=x.useCallback(N=>{N.preventDefault(),v(!1)},[v]),T=x.useCallback(N=>{N.target===N.currentTarget&&v(!1)},[v]),S=$==="start";return o.jsx("dialog",{ref:it(h,w),id:k,...U(P("mobile-nav",{side:$}),B(fr.dialog,y&&fr.open,fr.backdrop,y&&fr.backdropOpen,c),u,d),...p,"data-testid":l,"aria-label":a??(typeof s=="string"?s:m("@astryx.mobileNav.navigation")),onClick:Xh(f,T),onCancel:E,children:o.jsxs("div",{tabIndex:-1,...B(fr.drawer,Z_.width(r),S&&fr.drawerStart,S&&y&&fr.drawerStartOpen,!S&&fr.drawerEnd,!S&&y&&fr.drawerEndOpen),children:[o.jsxs("div",{...{0:{className:"x78zum5 x6s0dn4 x1qughib x1k15mir xf314gf x2lah0s x92x3c3 x1q0q8m5 xw8gpjh"},1:{className:"x78zum5 x6s0dn4 x1k15mir xf314gf x2lah0s x92x3c3 x1q0q8m5 xw8gpjh x13a6bvl"}}[!s<<0],children:[typeof s=="string"?o.jsx("span",{className:"x11g1kdw",children:o.jsx(Lr,{level:2,children:s})}):s??null,o.jsx(re,{variant:"ghost",label:m("@astryx.mobileNav.closeNavigation"),icon:o.jsx(Ce,{icon:"close",color:"inherit"}),onClick:()=>v(!1),isIconOnly:!0})]}),o.jsx("div",{className:"x98rzlu x1odjw0f x6ikm8r xish69e xx69xxh xf314gf xce4md1",children:n})]})})}oy.displayName="MobileNav";const Wr={item:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",kzqmXN:"xh8yej3",kZKoxP:"x1ueg155",kg3NbH:"xf314gf",k8WAf4:"xt970qd",kaIpWk:"xh6dtrn",kMzoRj:"xc342km",ksu8eU:"xng3xce",kWkggS:"xjbqb8w",kMwMTN:"x1tgivj0",kybGjl:"x1hl2dhg",kkrTdU:"x1ypdohk",kMv6JI:"xjb2p0i",kGuDYH:"xcr08ib",k63SB2:"x1sodnla",kLWn49:"x1kq96og",k9WMMc:"x1yc453h",kB7OPa:"x9f619",kHE3J0:"xe9uy6x",kSReZ0:"xyxi2l3",$$css:!0},selected:{kWkggS:"x17x4s8c",k63SB2:"x1e4wzip",kHE3J0:"x1sua13m",kSReZ0:"xjtnuge",$$css:!0},disabled:{kMwMTN:"xnbbluu",kkrTdU:"x1h6gzvc",kfzvcC:"x47corl",$$css:!0},sm:{kZKoxP:"x6k0iem",kg3NbH:"x7a5moj",$$css:!0},md:{kZKoxP:"x1ueg155",kg3NbH:"xf314gf",$$css:!0},lg:{kZKoxP:"xssyfek",kg3NbH:"xf314gf",$$css:!0}},xx=x.createContext({isCollapsed:!1,toggle:()=>{},isCollapsible:!1});xx.displayName="SideNavCollapseContext";function ly(){return x.use(xx)}function b6({ref:e,handleRef:t,label:n,children:s,onClick:r,...i}){const a=be(),l=Ca("chevronLeft"),{isCollapsed:c,toggle:u,isCollapsible:d}=Y_(t),{isMobile:f}=ex();return!d||f?null:o.jsx(re,{ref:e,label:n??a(c?"@astryx.sideNavCollapseButton.expandSidebar":"@astryx.sideNavCollapseButton.collapseSidebar"),variant:"ghost",...i,onClick:Xh(r,u),icon:s??o.jsx("span",{...B(ul.mirror),children:o.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 x11xpdln xuedmi6 xlr8y92"},1:{className:"x3nfvp2 x6s0dn4 x11xpdln xuedmi6 xlr8y92 x19jd1h0"}}[!!c<<0],children:l})}),isIconOnly:!0})}b6.displayName="SideNavCollapseButton";function Y_(e){var s;const t=ly();if(e==null)return t;const n=((s=e.current)==null?void 0:s.getCollapseState())??null;return{isCollapsed:(n==null?void 0:n.isCollapsed)??!1,toggle:()=>{var r,i;(i=(r=e.current)==null?void 0:r.getCollapseState())==null||i.toggle()},isCollapsible:(n==null?void 0:n.isCollapsible)??!0}}const Q_=160,R1={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kZKoxP:"x5yr21d",kzqmXN:"x1hfn5x7",kWkggS:"xgcd1z6",kB7OPa:"x9f619",kVQacm:"xb3r6kr",$$css:!0},rootCollapsed:{kzqmXN:"xhgvbfk",$$css:!0},topbar:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kZKoxP:"xsdox4t",kzqmXN:"xh8yej3",kWkggS:"xgcd1z6",kB7OPa:"x9f619",kVQacm:"xb3r6kr",$$css:!0}};function cy({header:e,topContent:t,children:n,footer:s,footerIcons:r,collapsible:i=!1,resizable:a=!1,xstyle:l,className:c,style:u,"data-testid":d,ref:f,handleRef:h,...p}){const m=be(),b=typeof i=="object"?i:{},y=!!i,g=b.hasButton??!0,k=b.defaultIsCollapsed??!1,v=b.isCollapsed,w=b.onCollapsedChange,j=typeof a=="object"?a:{},$=!!a,C=v!==void 0,[E,T]=x.useState(k),S=C?v:E,N=x.useRef(null),z=x.useRef({isCollapsed:S,toggle:()=>{},isCollapsible:y}),M=x.useCallback(ne=>{C||T(ne),w==null||w(ne)},[C,w]),R=d6({defaultSize:j.defaultWidth??260,minSizePx:j.minWidth??180,maxSizePx:j.maxWidth??480,collapsible:y,collapsedSize:Q_,autoSaveId:j.autoSaveId,onSizeChange:j.onWidthChange,onCollapseChange:y?M:void 0}),I=x.useCallback(()=>{const ne=!S;z.current={...z.current,isCollapsed:ne},M(ne),$&&(ne?R.collapse():R.expand())},[S,M,$,R]),A=$&&!S;z.current={isCollapsed:S,toggle:I,isCollapsible:y};const _={isCollapsed:S,toggle:I,isCollapsible:y};x.useImperativeHandle(h,()=>({getCollapseState:()=>z.current}),[]);const O=H3();if(O==="topbar")return o.jsxs("div",{"data-testid":d,...U(P("side-nav",{mode:"topbar"}),B(R1.topbar,l),c,u),children:[e,o.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw xvc5jky",children:r})]});const D=!!(s||r);if(O==="drawer")return o.jsxs(oy,{header:e,"data-testid":d,children:[t,n,D&&o.jsxs("div",{className:"x78zum5 xdt5ytf xr1yuqi x1txdalj x1xye8es",children:[s,r&&o.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:r})]})]});if(O==="drawer-content")return o.jsxs(o.Fragment,{children:[t,n,D&&o.jsxs("div",{className:"x78zum5 xdt5ytf xr1yuqi x1txdalj x1xye8es",children:[s,r&&o.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:r})]})]});const L=!!(e||t),q=!!(s||r),F=y&&g,X=$?{...u??{},width:S?void 0:R.size}:u,Y=o.jsxs("nav",{ref:it(f,N),role:"navigation","aria-label":m("@astryx.sideNav.label"),"data-testid":d,...U(P("side-nav"),B(R1.root,S&&R1.rootCollapsed,l),c,X),...p,children:[L&&o.jsxs("div",{...{0:{className:"x78zum5 xdt5ytf x2lah0s x7wzq59 x13vifvy x1vjfegm xgcd1z6 x1xye8es x1wesfrj xf314gf x1txdalj"},1:{className:"x78zum5 xdt5ytf x2lah0s x7wzq59 x13vifvy x1vjfegm xgcd1z6 x1xye8es x1wesfrj xf314gf x1txdalj x6s0dn4"}}[!!S<<0],children:[e,t&&o.jsx("div",{children:t})]}),o.jsx("div",{...{0:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x1xye8es x1wesfrj"},4:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x78zum5 xdt5ytf x6s0dn4 x1xye8es x1wesfrj"},2:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf xfsso4q x1wesfrj"},6:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x78zum5 xdt5ytf x6s0dn4 xfsso4q x1wesfrj"},1:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x1xye8es xy143xn"},5:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x78zum5 xdt5ytf x6s0dn4 x1xye8es xy143xn"},3:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf xfsso4q xy143xn"},7:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x78zum5 xdt5ytf x6s0dn4 xfsso4q xy143xn"}}[!!S<<2|!!L<<1|!!q<<0],children:n}),(q||F)&&o.jsxs("div",{...{0:{className:"x78zum5 xdt5ytf x2lah0s xr1yuqi x7wzq59 x1ey2m1c xgcd1z6 x1txdalj xf314gf xfsso4q x1wesfrj"},1:{className:"x78zum5 xdt5ytf x2lah0s xr1yuqi x7wzq59 x1ey2m1c xgcd1z6 x1txdalj xf314gf x1wesfrj xexx8yu"}}[!!S<<0],children:[s,o.jsxs("div",{...{0:{className:"x78zum5 x6s0dn4 xzye2dw"},1:{className:"x78zum5 x6s0dn4 xzye2dw x3ieub6"}}[!!S<<0],children:[F&&o.jsx(b6,{}),r]})]})]}),Z=A?o.jsxs("div",{className:"x1n2onr6 x78zum5 x2lah0s x5yr21d",children:[Y,o.jsx(ry,{"data-testid":"astryx-sidenav-resize-handle",direction:"horizontal",position:"overlay",pillPlacement:"end",isAlwaysVisible:!1,resizable:R.props,label:m("@astryx.sideNav.resizeSidebar")})]}):Y;return y?o.jsx(xx,{value:_,children:Z}):Z}cy.displayName="SideNav";const fo={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kzqmXN:"xh8yej3",$$css:!0},itemCollapsed:{kjj79g:"xl56j7k",kzqmXN:"x805d0l",kg3NbH:"xnjsko4",$$css:!0},itemCollapsedSm:{kzqmXN:"x1fvqzum",$$css:!0},itemCollapsedLg:{kzqmXN:"x1m747yf",$$css:!0}},J_={isCollapsed:!1,toggle:()=>{},isCollapsible:!1};function I1({href:e,as:t,isDisabled:n,onClick:s,ref:r,children:i,...a}){const l=Ri(t);return e&&!n?o.jsx(l,{ref:r,href:e,onClick:s,...a,children:i}):o.jsx("button",{ref:r,type:"button",onClick:s,disabled:n,...a,children:i})}function _s({as:e,label:t,icon:n,selectedIcon:s,isSelected:r=!1,isDisabled:i=!1,href:a,onClick:l,endContent:c,children:u,collapsible:d,size:f="md","data-testid":h,ref:p,xstyle:m}){const b=be(),y=Ca("chevronDown"),{isCollapsed:g}=ly(),k=H3(),{closeMobileNav:v}=ex(),w=k==="drawer"||k==="drawer-content",j=x.useId(),$=!!u,C=x.useRef(null),E=_l({hasLightDismiss:!0,hasAutoFocus:!0,hasCloseButton:!1,dialogLabel:`${t} submenu`}),T=x.useMemo(()=>typeof d=="object"?d:{},[d]),S=$&&d!==!1,N=T.isCollapsed,z=N!==void 0,[M,R]=x.useState(T.defaultIsCollapsed??!1),I=z?N:M,A=x.useCallback(()=>{var ce;const xe=!I;z||R(xe),(ce=T.onCollapsedChange)==null||ce.call(T,xe)},[I,z,T]),_=r&&s?s:n,D=S&&(!!a||!!l)&&!g,L=xe=>{if(i){xe.preventDefault();return}if(S&&!D&&!g){xe.preventDefault(),A();return}l==null||l(xe),w&&v()},q=xe=>{xe.preventDefault(),xe.stopPropagation(),A()},F=x.useRef(null),X=x.useRef(null),Y=x.useCallback(()=>{F.current&&(clearTimeout(F.current),F.current=null),X.current&&(clearTimeout(X.current),X.current=null)},[]),Z=x.useCallback(()=>{Y(),F.current=setTimeout(()=>{E.show({skipAutoFocus:!0})},150)},[Y,E]),ne=x.useCallback(()=>{Y(),X.current=setTimeout(()=>{E.hide()},200)},[Y,E]),J=x.useCallback(()=>{Z()},[Z]),K=x.useCallback(()=>{ne()},[ne]);if(g&&!n)return null;if(g){const xe=_&&qs(_,{size:"sm",color:r?"primary":i?"disabled":"secondary"}),ce=U(P("side-nav-item",{size:f,selected:r?"selected":null}),B(Wr.item,Wr[f],fo.itemCollapsed,f==="sm"&&fo.itemCollapsedSm,f==="lg"&&fo.itemCollapsedLg,r&&Wr.selected,i&&Wr.disabled));if($)return o.jsxs("div",{...B(fo.root,m),children:[o.jsx("button",{ref:it(p,E.triggerRef),type:"button",onClick:E.toggle,onMouseEnter:J,onMouseLeave:K,"aria-label":t,"data-testid":h,...E.triggerProps,...ce,children:xe}),E.render(o.jsxs("div",{className:"x1litavf x1y0btm7 x14i3s5s xu0wf1k x7a5moj x11g1kdw xfb3i0g",onMouseEnter:J,onMouseLeave:K,onClick:()=>E.hide(),children:[o.jsx("div",{className:"xf314gf xu0wf1k x141an7d x2mo6ok xv1l7n4 x1ltkj2j",children:t}),o.jsx(xx,{value:J_,children:u})]}),{placement:"end",alignment:"start"})]});const Q={"aria-current":r?"page":void 0,"aria-disabled":i||void 0,"aria-label":t,"data-testid":h},ye=o.jsx(I1,{ref:p,href:a,as:e,isDisabled:i,onClick:L,...Q,...ce,children:xe});return o.jsxs("div",{ref:C,...B(fo.root,m),children:[ye,o.jsx(Fa,{content:t,placement:"end",anchorRef:C})]})}const ie=o.jsxs(o.Fragment,{children:[_&&qs(_,{size:"sm",color:r?"primary":i?"disabled":"secondary"}),!g&&o.jsx("span",{className:"x98rzlu xeuugli xb3r6kr xlyipyv xuxw1ft",children:t}),!g&&c&&o.jsx("span",{className:"x2lah0s x78zum5 x6s0dn4",children:c}),!g&&S&&!D&&o.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf x11xpdln xuedmi6 xlr8y92 x2lah0s"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf x11xpdln xuedmi6 xlr8y92 x2lah0s x19jd1h0"}}[!I<<0],children:y})]}),le=U(P("side-nav-item",{size:f,selected:r?"selected":null}),B(Wr.item,Wr[f],r&&Wr.selected,i&&Wr.disabled));let ve;if(D)ve=o.jsxs("div",{"data-testid":h,...le,children:[o.jsx(I1,{ref:p,href:a,as:e,isDisabled:i,onClick:L,"aria-current":r?"page":void 0,className:"x78zum5 x6s0dn4 x1txdalj x98rzlu xeuugli x1heor9g x1hl2dhg x1717udv x1ghz6dp xc342km xng3xce xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x1yc453h x1ypdohk",children:ie}),o.jsx("button",{type:"button",onClick:q,"aria-label":I?b("@astryx.sideNavItem.expand",{label:t}):b("@astryx.sideNavItem.collapse",{label:t}),"aria-expanded":!I,"aria-controls":`${j}-children`,className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1heor9g x1ypdohk xh6dtrn xe9uy6x xyxi2l3",children:o.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf x11xpdln xuedmi6 xlr8y92 x2lah0s"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf x11xpdln xuedmi6 xlr8y92 x2lah0s x19jd1h0"}}[!I<<0],children:y})})]});else{const xe={"aria-current":r?"page":void 0,"aria-disabled":i||void 0,"aria-expanded":S?!I:void 0,"aria-controls":S?`${j}-children`:void 0,"data-testid":h};ve=o.jsx(I1,{ref:p,href:a,as:e,isDisabled:i,onClick:L,...xe,...le,children:ie})}return o.jsxs("div",{ref:C,...B(fo.root,m),children:[ve,$&&!g&&o.jsx("div",{id:`${j}-children`,role:"group","aria-labelledby":`${j}-label`,"aria-hidden":I,inert:I?!0:void 0,...{0:{className:"xrvj5dj x1tu4anv x1qn9uv2 x80gvsz xlr8y92"},1:{className:"xrvj5dj x1qn9uv2 x80gvsz xlr8y92 xihq33y"}}[!!I<<0],children:o.jsxs("div",{className:"xb3r6kr x2lwn1j x31w388",children:[o.jsx("span",{id:`${j}-label`,hidden:!0,children:t}),u]})})]})}_s.displayName="SideNavItem";const eO={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",k8WAf4:"xu0wf1k",$$css:!0}};function af({ref:e,title:t,subtitle:n,children:s,endContent:r,isHeaderHidden:i=!1,xstyle:a,className:l,style:c,"data-testid":u,...d}){const{isCollapsed:f}=ly(),p=`${x.useId()}-title`,m=o.jsxs(o.Fragment,{children:[o.jsxs("span",{className:"x78zum5 xdt5ytf x98rzlu xeuugli",children:[o.jsx("span",{id:p,className:"x141an7d x2mo6ok x1ltkj2j xv1l7n4 xb3r6kr xlyipyv xuxw1ft",children:t}),n&&o.jsx("span",{className:"x141an7d x1ltkj2j xv1l7n4 xb3r6kr xlyipyv xuxw1ft",children:n})]}),r&&o.jsx("span",{className:"x2lah0s x78zum5 x6s0dn4",children:r})]}),b=i||f,y=b?{position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:0}:{};return o.jsxs("div",{ref:e,...U(P("side-nav-section"),B(eO.root,a),l,c),...d,role:"group","aria-labelledby":p,"data-testid":u,children:[o.jsx("div",{...U({className:"x78zum5 x6s0dn4 x1txdalj xf314gf xu0wf1k xt0e3qv x87ps6o"},{style:b?y:void 0}),children:m}),o.jsx("div",{className:"x78zum5 xdt5ytf x1lsbc85",children:s})]})}af.displayName="SideNavSection";var v6={exports:{}},px={},w6={exports:{}},j6={};/**
167
- * @license React
168
- * scheduler.production.js
169
- *
170
- * Copyright (c) Meta Platforms, Inc. and affiliates.
171
- *
172
- * This source code is licensed under the MIT license found in the
173
- * LICENSE file in the root directory of this source tree.
174
- */(function(e){function t(A,_){var O=A.length;A.push(_);e:for(;0<O;){var D=O-1>>>1,L=A[D];if(0<r(L,_))A[D]=_,A[O]=L,O=D;else break e}}function n(A){return A.length===0?null:A[0]}function s(A){if(A.length===0)return null;var _=A[0],O=A.pop();if(O!==_){A[0]=O;e:for(var D=0,L=A.length,q=L>>>1;D<q;){var F=2*(D+1)-1,X=A[F],Y=F+1,Z=A[Y];if(0>r(X,O))Y<L&&0>r(Z,X)?(A[D]=Z,A[Y]=O,D=Y):(A[D]=X,A[F]=O,D=F);else if(Y<L&&0>r(Z,O))A[D]=Z,A[Y]=O,D=Y;else break e}}return _}function r(A,_){var O=A.sortIndex-_.sortIndex;return O!==0?O:A.id-_.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,f=null,h=3,p=!1,m=!1,b=!1,y=!1,g=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;function w(A){for(var _=n(u);_!==null;){if(_.callback===null)s(u);else if(_.startTime<=A)s(u),_.sortIndex=_.expirationTime,t(c,_);else break;_=n(u)}}function j(A){if(b=!1,w(A),!m)if(n(c)!==null)m=!0,$||($=!0,z());else{var _=n(u);_!==null&&I(j,_.startTime-A)}}var $=!1,C=-1,E=5,T=-1;function S(){return y?!0:!(e.unstable_now()-T<E)}function N(){if(y=!1,$){var A=e.unstable_now();T=A;var _=!0;try{e:{m=!1,b&&(b=!1,k(C),C=-1),p=!0;var O=h;try{t:{for(w(A),f=n(c);f!==null&&!(f.expirationTime>A&&S());){var D=f.callback;if(typeof D=="function"){f.callback=null,h=f.priorityLevel;var L=D(f.expirationTime<=A);if(A=e.unstable_now(),typeof L=="function"){f.callback=L,w(A),_=!0;break t}f===n(c)&&s(c),w(A)}else s(c);f=n(c)}if(f!==null)_=!0;else{var q=n(u);q!==null&&I(j,q.startTime-A),_=!1}}break e}finally{f=null,h=O,p=!1}_=void 0}}finally{_?z():$=!1}}}var z;if(typeof v=="function")z=function(){v(N)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,R=M.port2;M.port1.onmessage=N,z=function(){R.postMessage(null)}}else z=function(){g(N,0)};function I(A,_){C=g(function(){A(e.unstable_now())},_)}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(A){A.callback=null},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_next=function(A){switch(h){case 1:case 2:case 3:var _=3;break;default:_=h}var O=h;h=_;try{return A()}finally{h=O}},e.unstable_requestPaint=function(){y=!0},e.unstable_runWithPriority=function(A,_){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var O=h;h=A;try{return _()}finally{h=O}},e.unstable_scheduleCallback=function(A,_,O){var D=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?D+O:D):O=D,A){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=O+L,A={id:d++,callback:_,priorityLevel:A,startTime:O,expirationTime:L,sortIndex:-1},O>D?(A.sortIndex=O,t(u,A),n(c)===null&&A===n(u)&&(b?(k(C),C=-1):b=!0,I(j,O-D))):(A.sortIndex=L,t(c,A),m||p||(m=!0,$||($=!0,z()))),A},e.unstable_shouldYield=S,e.unstable_wrapCallback=function(A){var _=h;return function(){var O=h;h=_;try{return A.apply(this,arguments)}finally{h=O}}}})(j6);w6.exports=j6;var tO=w6.exports;/**
175
- * @license React
176
- * react-dom-client.production.js
177
- *
178
- * Copyright (c) Meta Platforms, Inc. and affiliates.
179
- *
180
- * This source code is licensed under the MIT license found in the
181
- * LICENSE file in the root directory of this source tree.
182
- */var Ct=tO,S6=x,nO=Zc;function W(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 $6(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _u(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 C6(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 E6(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 jv(e){if(_u(e)!==e)throw Error(W(188))}function sO(e){var t=e.alternate;if(!t){if(t=_u(e),t===null)throw Error(W(188));return t!==e?null:e}for(var n=e,s=t;;){var r=n.return;if(r===null)break;var i=r.alternate;if(i===null){if(s=r.return,s!==null){n=s;continue}break}if(r.child===i.child){for(i=r.child;i;){if(i===n)return jv(r),e;if(i===s)return jv(r),t;i=i.sibling}throw Error(W(188))}if(n.return!==s.return)n=r,s=i;else{for(var a=!1,l=r.child;l;){if(l===n){a=!0,n=r,s=i;break}if(l===s){a=!0,s=r,n=i;break}l=l.sibling}if(!a){for(l=i.child;l;){if(l===n){a=!0,n=i,s=r;break}if(l===s){a=!0,s=i,n=r;break}l=l.sibling}if(!a)throw Error(W(189))}}if(n.alternate!==s)throw Error(W(190))}if(n.tag!==3)throw Error(W(188));return n.stateNode.current===n?e:t}function T6(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=T6(e),t!==null)return t;e=e.sibling}return null}function An(e,t,n,s,r,i){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,s,r,i)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&An(e.child,t,n,s,r,i))return!0;e=e.sibling}return!1}function Wa(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 Sv(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 z6(e){var t=[null,null],n=Wa(e);return n===null||A6(t,e,n.child,{foundSelf:!1}),t}function A6(e,t,n,s){for(;n!==null;){if(n===t)s.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(s.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&A6(e,t,n.child,s))return!0;n=n.sibling}return!1}function $t(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(W(559))}}var jo=null,tg=null;function rO(e,t,n){return e===n?!0:e===t?(jo=e,!0):!1}function iO(e,t,n){return e===n?(tg=e,!1):e===t?(tg!==null&&(jo=e),!0):!1}function $v(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 ng(e,t,n){for(var s=0,r=e;r;r=n(r))s++;r=0;for(var i=t;i;i=n(i))r++;for(;0<s-r;)e=n(e),s--;for(;0<r-s;)t=n(t),r--;for(;s--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var Xe=Object.assign,aO=Symbol.for("react.element"),Cd=Symbol.for("react.transitional.element"),yc=Symbol.for("react.portal"),So=Symbol.for("react.fragment"),N6=Symbol.for("react.strict_mode"),sg=Symbol.for("react.profiler"),M6=Symbol.for("react.consumer"),er=Symbol.for("react.context"),uy=Symbol.for("react.forward_ref"),rg=Symbol.for("react.suspense"),ig=Symbol.for("react.suspense_list"),dy=Symbol.for("react.memo"),ti=Symbol.for("react.lazy"),ag=Symbol.for("react.activity"),oO=Symbol.for("react.legacy_hidden"),lO=Symbol.for("react.memo_cache_sentinel"),og=Symbol.for("react.view_transition"),cO=Symbol.for("react.recoverable"),Cv=Symbol.iterator;function ac(e){return e===null||typeof e!="object"?null:(e=Cv&&e[Cv]||e["@@iterator"],typeof e=="function"?e:null)}var uO=Symbol.for("react.client.reference");function lg(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===uO?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case So:return"Fragment";case sg:return"Profiler";case N6:return"StrictMode";case rg:return"Suspense";case ig:return"SuspenseList";case ag:return"Activity";case og:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case yc:return"Portal";case er:return e.displayName||"Context";case M6:return(e._context.displayName||"Context")+".Consumer";case uy:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case dy:return t=e.displayName||null,t!==null?t:lg(e.type)||"Memo";case ti:t=e._payload,e=e._init;try{return lg(e(t))}catch{}}return null}var kc=Array.isArray,me=S6.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Oe=nO.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ma={pending:!1,data:null,method:null,action:null},cg=[],$o=-1;function ur(e){return{current:e}}function Xt(e){0>$o||(e.current=cg[$o],cg[$o]=null,$o--)}function Je(e,t){$o++,cg[$o]=e.current,e.current=t}var ar=ur(null),eu=ur(null),hi=ur(null),Yf=ur(null);function Qf(e,t){switch(Je(hi,t),Je(eu,e),Je(ar,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?B2(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=B2(t),e=eS(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Xt(ar),Je(ar,e)}function fl(){Xt(ar),Xt(eu),Xt(hi)}function ug(e){var t=e.memoizedState;t!==null&&(wl._currentValue=t.memoizedState,Je(Yf,e)),t=ar.current;var n=eS(t,e.type);t!==n&&(Je(eu,e),Je(ar,n))}function Jf(e){eu.current===e&&(Xt(ar),Xt(eu)),Yf.current===e&&(Xt(Yf),wl._currentValue=ma)}var _1,Ev;function Qr(e){if(_1===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);_1=t&&t[1]||"",Ev=-1<n.stack.indexOf(`
183
- at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
184
- `+_1+e+Ev}var O1=!1;function D1(e,t){if(!e||O1)return"";O1=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(m){var h=m}Reflect.construct(e,[],f)}else{try{f.call()}catch(m){h=m}f=!1;try{var p=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),f=!0,new e}finally{f&&(p!==void 0?Object.defineProperty(e.prototype,"props",p):delete e.prototype.props)}}}else{try{throw Error()}catch(m){h=m}(f=e())&&typeof f.catch=="function"&&f.catch(function(){})}}catch(m){if(m&&h&&typeof m.stack=="string")return[m.stack,h.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=s.DetermineComponentFrameRoot(),a=i[0],l=i[1];if(a&&l){var c=a.split(`
185
- `),u=l.split(`
186
- `);for(r=s=0;s<c.length&&!c[s].includes("DetermineComponentFrameRoot");)s++;for(;r<u.length&&!u[r].includes("DetermineComponentFrameRoot");)r++;if(s===c.length||r===u.length)for(s=c.length-1,r=u.length-1;1<=s&&0<=r&&c[s]!==u[r];)r--;for(;1<=s&&0<=r;s--,r--)if(c[s]!==u[r]){if(s!==1||r!==1)do if(s--,r--,0>r||c[s]!==u[r]){var d=`
187
- `+c[s].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=s&&0<=r);break}}}finally{O1=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Qr(n):""}function dO(e,t){switch(e.tag){case 26:case 27:case 5:return Qr(e.type);case 16:return Qr("Lazy");case 13:return e.child!==t&&t!==null?Qr("Suspense Fallback"):Qr("Suspense");case 19:return Qr("SuspenseList");case 0:case 15:return D1(e.type,!1);case 11:return D1(e.type.render,!1);case 1:return D1(e.type,!0);case 31:return Qr("Activity");case 30:return Qr("ViewTransition");default:return""}}function Tv(e){try{var t="",n=null;do t+=dO(e,n),n=e,e=e.return;while(e);return t}catch(s){return`
188
- Error generating stack: `+s.message+`
189
- `+s.stack}}var dg=Object.prototype.hasOwnProperty,fy=Ct.unstable_scheduleCallback,L1=Ct.unstable_cancelCallback,fO=Ct.unstable_shouldYield,hO=Ct.unstable_requestPaint,Vn=Ct.unstable_now,xO=Ct.unstable_getCurrentPriorityLevel,R6=Ct.unstable_ImmediatePriority,I6=Ct.unstable_UserBlockingPriority,eh=Ct.unstable_NormalPriority,pO=Ct.unstable_LowPriority,_6=Ct.unstable_IdlePriority,gO=Ct.log,mO=Ct.unstable_setDisableYieldValue,Ou=null,Wn=null;function oi(e){if(typeof gO=="function"&&mO(e),Wn&&typeof Wn.setStrictMode=="function")try{Wn.setStrictMode(Ou,e)}catch{}}var Kn=Math.clz32?Math.clz32:bO,yO=Math.log,kO=Math.LN2;function bO(e){return e>>>=0,e===0?32:31-(yO(e)/kO|0)|0}var Ed=256,Td=262144,zd=4194304;function Xi(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 gx(e,t,n){var s=e.pendingLanes;if(s===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var l=s&134217727;return l!==0?(s=l&~i,s!==0?r=Xi(s):(a&=l,a!==0?r=Xi(a):n||(n=l&~e,n!==0&&(r=Xi(n))))):(l=s&~i,l!==0?r=Xi(l):a!==0?r=Xi(a):n||(n=s&~e,n!==0&&(r=Xi(n)))),r===0?0:t!==0&&t!==r&&!(t&i)&&(i=r&-r,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:r}function Du(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function O6(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var s=31-Kn(n),r=1<<s;t|=e[s],n&=~r}return t}function vO(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 D6(){var e=zd;return zd<<=1,!(zd&62914560)&&(zd=4194304),e}function B1(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Lu(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function wO(e,t,n,s,r,i){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var l=e.entanglements,c=e.expirationTimes,u=e.hiddenUpdates;for(n=a&~n;0<n;){var d=31-Kn(n),f=1<<d;l[d]=0,c[d]=-1;var h=u[d];if(h!==null)for(u[d]=null,d=0;d<h.length;d++){var p=h[d];p!==null&&(p.lane&=-536870913)}n&=~f}s!==0&&L6(e,s,0),i!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=i&~(a&~t))}function L6(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Kn(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|n&261930}function B6(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var s=31-Kn(n),r=1<<s;r&t|e[s]&t&&(e[s]|=t),n&=~r}}function q6(e,t){var n=t&-t;return n=n&42?1:hy(n),n&(e.suspendedLanes|t)?0:n}function hy(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 xy(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function H6(){var e=Oe.p;return e!==0?e:(e=window.event,e===void 0?32:vS(e.type))}function zv(e,t){var n=Oe.p;try{return Oe.p=e,t()}finally{Oe.p=n}}var Br=Math.random().toString(36).slice(2),Wt="__reactFiber$"+Br,Nn="__reactProps$"+Br,Bl="__reactContainer$"+Br,Av="__reactEvents$"+Br,jO="__reactListeners$"+Br,SO="__reactHandles$"+Br,Nv="__reactResources$"+Br,Bu="__reactMarker$"+Br,th="__reactLoad$"+Br;function mx(e){delete e[Wt],delete e[Nn],delete e[jO],delete e[SO]}function aa(e){var t;if(t=e[Wt])return t;for(var n=e.parentNode;n;){if(t=n[Bl]||n[Wt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=W2(e);e!==null;){if(n=e[Wt])return n;e=W2(e)}return t}e=n,n=e.parentNode}return null}function ql(e){if(e=e[Wt]||e[Bl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function bc(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(W(33))}function Lo(e){var t=e[Nv];return t||(t=e[Nv]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ot(e){e[Bu]=!0}function P6(e){e[th]=void 0}var U6=new Set,F6={};function Ka(e,t){hl(e,t),hl(e+"Capture",t)}function hl(e,t){for(F6[e]=t,e=0;e<t.length;e++)U6.add(t[e])}var $O=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]*$"),Mv={},Rv={};function CO(e){return dg.call(Rv,e)?!0:dg.call(Mv,e)?!1:$O.test(e)?Rv[e]=!0:(Mv[e]=!0,!1)}var Ie=!1;function Iv(){var e=Ie;return Ie=!1,e}function of(e,t,n){if(CO(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,n)}}function Ad(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 hr(e,t,n,s){if(s===null)e.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,s)}}function Bn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function G6(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function EO(e,t,n){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,i=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fg(e){if(!e._valueTracker){var t=G6(e)?"checked":"value";e._valueTracker=EO(e,t,""+e[t])}}function V6(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),s="";return e&&(s=G6(e)?e.checked?"true":"false":e.value),e=s,e!==n?(t.setValue(e),!0):!1}var TO=/[\n"\\]/g;function us(e){return e.replace(TO,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function hg(e,t,n,s,r,i,a,l){e.name="",a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.type=a:e.removeAttribute("type"),t!=null?a==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Bn(t)):e.value!==""+Bn(t)&&(e.value=""+Bn(t)):a!=="submit"&&a!=="reset"||e.removeAttribute("value"),t!=null?a==="number"&&e.value==t?q1(e,Bn(e.value)):q1(e,Bn(t)):n!=null?q1(e,Bn(n)):s!=null&&e.removeAttribute("value"),r==null&&i!=null&&(e.defaultChecked=!!i),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.name=""+Bn(l):e.removeAttribute("name")}function W6(e,t,n,s,r,i,a,l){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){fg(e);return}n=n!=null?""+Bn(n):"",t=t!=null?""+Bn(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=l?e.checked:!!s,e.defaultChecked=!!s,a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.name=a),fg(e)}function q1(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Bo(e,t,n,s){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&s&&(e[n].defaultSelected=!0)}else{for(n=""+Bn(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function K6(e,t,n){if(t!=null&&(t=""+Bn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Bn(n):""}function X6(e,t,n,s){if(t==null){if(s!=null){if(n!=null)throw Error(W(92));if(kc(s)){if(1<s.length)throw Error(W(93));s=s[0]}n=s}n==null&&(n=""),t=n}n=Bn(t),e.defaultValue=n,s=e.textContent,s===n&&s!==""&&s!==null&&(e.value=s),fg(e)}function xl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zO=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 _v(e,t,n){var s=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,n):typeof n!="number"||n===0||zO.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Z6(e,t,n){if(t!=null&&typeof t!="object")throw Error(W(62));if(e=e.style,n!=null){for(var s in n)!n.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="",Ie=!0);for(var r in t)s=t[r],t.hasOwnProperty(r)&&n[r]!==s&&(_v(e,r,s),Ie=!0)}else for(var i in t)t.hasOwnProperty(i)&&_v(e,i,t[i])}function py(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 AO=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"]]),NO=/^[\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 lf(e){return NO.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function tr(){}var xg=null;function gy(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Co=null,qo=null;function Ov(e){var t=ql(e);if(t&&(e=t.stateNode)){var n=e[Nn]||null;e:switch(e=t.stateNode,t.type){case"input":if(hg(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="'+us(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var s=n[t];if(s!==e&&s.form===e.form){var r=s[Nn]||null;if(!r)throw Error(W(90));hg(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<n.length;t++)s=n[t],s.form===e.form&&V6(s)}break e;case"textarea":K6(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Bo(e,!!n.multiple,t,!1)}}}var H1=!1;function Y6(e,t,n){if(H1)return e(t,n);H1=!0;try{var s=e(t);return s}finally{if(H1=!1,(Co!==null||qo!==null)&&(Nx(),Co&&(t=Co,e=qo,qo=Co=null,Ov(t),e)))for(t=0;t<e.length;t++)Ov(e[t])}}function tu(e,t){var n=e.stateNode;if(n===null)return null;var s=n[Nn]||null;if(s===null)return null;n=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(W(231,t,typeof n));return n}var Nr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pg=!1;if(Nr)try{var oc={};Object.defineProperty(oc,"passive",{get:function(){pg=!0}}),window.addEventListener("test",oc,oc),window.removeEventListener("test",oc,oc)}catch{pg=!1}var li=null,my=null,cf=null;function Q6(){if(cf)return cf;var e,t=my,n=t.length,s,r="value"in li?li.value:li.textContent,i=r.length;for(e=0;e<n&&t[e]===r[e];e++);var a=n-e;for(s=1;s<=a&&t[n-s]===r[i-s];s++);return cf=r.slice(e,1<s?1-s:void 0)}function uf(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 Nd(){return!0}function Dv(){return!1}function jn(e){function t(n,s,r,i,a){this._reactName=n,this._targetInst=r,this.type=s,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Nd:Dv,this.isPropagationStopped=Dv,this}return Xe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Nd)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Nd)},persist:function(){},isPersistent:Nd}),t}var Ii={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yx=jn(Ii),qu=Xe({},Ii,{view:0,detail:0}),MO=jn(qu),P1,U1,lc,kx=Xe({},qu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yy,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!==lc&&(lc&&e.type==="mousemove"?(P1=e.screenX-lc.screenX,U1=e.screenY-lc.screenY):U1=P1=0,lc=e),P1)},movementY:function(e){return"movementY"in e?e.movementY:U1}}),Lv=jn(kx),RO=Xe({},kx,{dataTransfer:0}),IO=jn(RO),_O=Xe({},qu,{relatedTarget:0}),F1=jn(_O),OO=Xe({},Ii,{animationName:0,elapsedTime:0,pseudoElement:0}),DO=jn(OO),LO=Xe({},Ii,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),BO=jn(LO),qO=Xe({},Ii,{data:0}),Bv=jn(qO),HO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},PO={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"},UO={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function FO(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=UO[e])?!!t[e]:!1}function yy(){return FO}var GO=Xe({},qu,{key:function(e){if(e.key){var t=HO[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=uf(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?PO[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yy,charCode:function(e){return e.type==="keypress"?uf(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?uf(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),VO=jn(GO),WO=Xe({},kx,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qv=jn(WO),KO=Xe({},Ii,{submitter:0}),XO=jn(KO),ZO=Xe({},qu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yy}),YO=jn(ZO),QO=Xe({},Ii,{propertyName:0,elapsedTime:0,pseudoElement:0}),JO=jn(QO),eD=Xe({},kx,{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}),tD=jn(eD),nD=Xe({},Ii,{newState:0,oldState:0,source:0}),sD=jn(nD),rD=[9,13,27,32],ky=Nr&&"CompositionEvent"in window,Ec=null;Nr&&"documentMode"in document&&(Ec=document.documentMode);var iD=Nr&&"TextEvent"in window&&!Ec,J6=Nr&&(!ky||Ec&&8<Ec&&11>=Ec),Hv=" ",Pv=!1;function ej(e,t){switch(e){case"keyup":return rD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tj(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Eo=!1;function aD(e,t){switch(e){case"compositionend":return tj(t);case"keypress":return t.which!==32?null:(Pv=!0,Hv);case"textInput":return e=t.data,e===Hv&&Pv?null:e;default:return null}}function oD(e,t){if(Eo)return e==="compositionend"||!ky&&ej(e,t)?(e=Q6(),cf=my=li=null,Eo=!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 J6&&t.locale!=="ko"?null:t.data;default:return null}}var lD={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 Uv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!lD[e.type]:t==="textarea"}function nj(e,t,n,s){Co?qo?qo.push(s):qo=[s]:Co=s,t=jh(t,"onChange"),0<t.length&&(n=new yx("onChange","change",null,n,s),e.push({event:n,listeners:t}))}var Tc=null,nu=null;function cD(e){Y8(e,0)}function bx(e){var t=bc(e);if(V6(t))return e}function Fv(e,t){if(e==="change")return t}var sj=!1;if(Nr){var G1;if(Nr){var V1="oninput"in document;if(!V1){var Gv=document.createElement("div");Gv.setAttribute("oninput","return;"),V1=typeof Gv.oninput=="function"}G1=V1}else G1=!1;sj=G1&&(!document.documentMode||9<document.documentMode)}function Vv(){Tc&&(Tc.detachEvent("onpropertychange",rj),nu=Tc=null)}function rj(e){if(e.propertyName==="value"&&bx(nu)){var t=[];nj(t,nu,e,gy(e)),Y6(cD,t)}}function uD(e,t,n){e==="focusin"?(Vv(),Tc=t,nu=n,Tc.attachEvent("onpropertychange",rj)):e==="focusout"&&Vv()}function dD(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bx(nu)}function fD(e,t){if(e==="click")return bx(t)}function hD(e,t){if(e==="input"||e==="change")return bx(t)}function xD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zn=typeof Object.is=="function"?Object.is:xD;function su(e,t){if(Zn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(s=0;s<n.length;s++){var r=n[s];if(!dg.call(t,r)||!Zn(e[r],t[r]))return!1}return!0}function gg(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Wv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kv(e,t){var n=Wv(e);e=0;for(var s;n;){if(n.nodeType===3){if(s=e+n.textContent.length,e<=t&&s>=t)return{node:n,offset:t-e};e=s}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Wv(n)}}function ij(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ij(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function aj(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=gg(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=gg(e.document)}return t}function by(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 pD=Nr&&"documentMode"in document&&11>=document.documentMode,To=null,mg=null,zc=null,yg=!1;function Xv(e,t,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yg||To==null||To!==gg(s)||(s=To,"selectionStart"in s&&by(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),zc&&su(zc,s)||(zc=s,s=jh(mg,"onSelect"),0<s.length&&(t=new yx("onSelect","select",null,t,n),e.push({event:t,listeners:s}),t.target=To)))}function Fi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var zo={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionrun:Fi("Transition","TransitionRun"),transitionstart:Fi("Transition","TransitionStart"),transitioncancel:Fi("Transition","TransitionCancel"),transitionend:Fi("Transition","TransitionEnd")},W1={},oj={};Nr&&(oj=document.createElement("div").style,"AnimationEvent"in window||(delete zo.animationend.animation,delete zo.animationiteration.animation,delete zo.animationstart.animation),"TransitionEvent"in window||delete zo.transitionend.transition);function Xa(e){if(W1[e])return W1[e];if(!zo[e])return e;var t=zo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in oj)return W1[e]=t[n];return e}var lj=Xa("animationend"),cj=Xa("animationiteration"),uj=Xa("animationstart"),gD=Xa("transitionrun"),mD=Xa("transitionstart"),yD=Xa("transitioncancel"),dj=Xa("transitionend"),fj=new Map,kg="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(" ");kg.push("scrollEnd");function Ps(e,t){fj.set(e,t),Ka(t,[e])}var kD=0;function Mr(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Ls.identifierPrefix;var n=kD++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function Zv(e){if(e==null||typeof e=="string")return e;var t=null,n=Wo;if(n!==null)for(var s=0;s<n.length;s++){var r=e[n[s]];if(r!=null){if(r==="none")return"none";t=t==null?r:t+(" "+r)}}return t??e.default}function qr(e,t){return e=Zv(e),t=Zv(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var nh=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},os=[],Ao=0,vy=0;function vx(){for(var e=Ao,t=vy=Ao=0;t<e;){var n=os[t];os[t++]=null;var s=os[t];os[t++]=null;var r=os[t];os[t++]=null;var i=os[t];if(os[t++]=null,s!==null&&r!==null){var a=s.pending;a===null?r.next=r:(r.next=a.next,a.next=r),s.pending=r}i!==0&&hj(n,r,i)}}function wx(e,t,n,s){os[Ao++]=e,os[Ao++]=t,os[Ao++]=n,os[Ao++]=s,vy|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function wy(e,t,n,s){return wx(e,t,n,s),sh(e)}function Za(e,t){return wx(e,null,null,t),sh(e)}function hj(e,t,n){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n);for(var r=!1,i=e.return;i!==null;)i.childLanes|=n,s=i.alternate,s!==null&&(s.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(r=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,r&&t!==null&&(r=31-Kn(n),e=i.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=n|536870912),i):null}function sh(e){if(50<Bc)throw Bc=0,bf=null,Error(W(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var No={};function bD(e,t,n,s){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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tn(e,t,n,s){return new bD(e,t,n,s)}function jy(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Tr(e,t){var n=e.alternate;return n===null?(n=Tn(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 xj(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 df(e,t,n,s,r,i){var a=0;if(s=e,typeof s=="function")jy(s)&&(a=1);else if(typeof s=="string")a=KL(e,n,ar.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(s){case ag:return e=Tn(31,n,t,r),e.elementType=ag,e.lanes=i,e;case So:return ya(n.children,r,i,t);case N6:a=8,r|=24;break;case sg:return e=Tn(12,n,t,r|2),e.elementType=sg,e.lanes=i,e;case rg:return e=Tn(13,n,t,r),e.elementType=rg,e.lanes=i,e;case ig:return e=Tn(19,n,t,r),e.elementType=ig,e.lanes=i,e;case oO:case og:return e=r|32,e=Tn(30,n,t,e),e.elementType=og,e.lanes=i,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case er:a=10;break e;case M6:a=9;break e;case uy:a=11;break e;case dy:a=14;break e;case ti:a=16,s=null;break e}a=29,n=Error(W(130,e===null?"null":typeof e,"")),s=null}return t=Tn(a,n,t,r),t.elementType=e,t.type=s,t.lanes=i,t}function ya(e,t,n,s){return e=Tn(7,e,s,t),e.lanes=n,e}function K1(e,t,n){return e=Tn(6,e,null,t),e.lanes=n,e}function pj(e){var t=Tn(18,null,null,0);return t.stateNode=e,t}function X1(e,t,n){return t=Tn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Yv=new WeakMap;function ds(e,t){if(typeof e=="object"&&e!==null){var n=Yv.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Tv(t)},Yv.set(e,t),t)}return{value:e,source:t,stack:Tv(t)}}var Mo=[],Ro=0,rh=null,ru=0,ls=[],cs=0,$i=null,nr=1,sr="";function yr(e,t){Mo[Ro++]=ru,Mo[Ro++]=rh,rh=e,ru=t}function gj(e,t,n){ls[cs++]=nr,ls[cs++]=sr,ls[cs++]=$i,$i=e;var s=nr;e=sr;var r=32-Kn(s)-1;s&=~(1<<r),n+=1;var i=32-Kn(t)+r;if(30<i){var a=r-r%5;i=(s&(1<<a)-1).toString(32),s>>=a,r-=a,nr=1<<32-Kn(t)+r|n<<r|s,sr=i+e}else nr=1<<i|n<<r|s,sr=e}function jx(e){e.return!==null&&(yr(e,1),gj(e,1,0))}function Sy(e){for(;e===rh;)rh=Mo[--Ro],Mo[Ro]=null,ru=Mo[--Ro],Mo[Ro]=null;for(;e===$i;)$i=ls[--cs],ls[cs]=null,sr=ls[--cs],ls[cs]=null,nr=ls[--cs],ls[cs]=null}function mj(e,t){ls[cs++]=nr,ls[cs++]=sr,ls[cs++]=$i,nr=t.id,sr=t.overflow,$i=e}var Lt=null,Ye=null,$e=!1,xi=null,fs=!1,bg=Error(W(519));function Ci(e){var t=Error(W(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw iu(ds(t,e)),bg}function Qv(e){var t=e.stateNode,n=e.type,s=e.memoizedProps;switch(t[Wt]=e,t[Nn]=s,n){case"dialog":Ee("cancel",t),Ee("close",t);break;case"iframe":case"object":case"embed":Ee("load",t);break;case"video":case"audio":for(n=0;n<cu.length;n++)Ee(cu[n],t);break;case"source":Ee("error",t);break;case"img":case"image":case"link":Ee("error",t),Ee("load",t);break;case"details":Ee("toggle",t);break;case"input":Ee("invalid",t),W6(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ee("invalid",t);break;case"textarea":Ee("invalid",t),X6(t,s.value,s.defaultValue,s.children)}n=s.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||s.suppressHydrationWarning===!0||J8(t.textContent,n)?(s.popover!=null&&(Ee("beforetoggle",t),Ee("toggle",t)),s.onScroll!=null&&Ee("scroll",t),s.onScrollEnd!=null&&Ee("scrollend",t),s.onClick!=null&&(t.onclick=tr),t=!0):t=!1,t||Ci(e,!0)}function ih(e){for(Lt=e.return;Lt;)switch(Lt.tag){case 5:case 31:case 13:fs=!1;return;case 27:case 3:fs=!0;return;default:Lt=Lt.return}}function ho(e){if(e!==Lt)return!1;if(!$e)return ih(e),$e=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||rm(e.type,e.memoizedProps)),n=!n),n&&Ye&&Ci(e),ih(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));Ye=V2(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));Ye=V2(e)}else t===27?(t=Ye,_i(e.type)?(e=lm,lm=null,Ye=e):Ye=t):Ye=Lt?ps(e.stateNode.nextSibling):null;return!0}function Ea(){Ye=Lt=null,$e=!1}function Z1(){var e=xi;return e!==null&&($n===null?$n=e:$n.push.apply($n,e),xi=null),e}function iu(e){xi===null?xi=[e]:xi.push(e)}var vg=ur(null),Ya=null,Sr=null;function ci(e,t,n){Je(vg,t._currentValue),t._currentValue=n}function zr(e){e._currentValue=vg.current,Xt(vg)}function ff(e,t,n){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===n)break;e=e.return}}function wg(e,t,n,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var i=r.dependencies;if(i!==null){var a=r.child;i=i.firstContext;e:for(;i!==null;){var l=i;i=r;for(var c=0;c<t.length;c++)if(l.context===t[c]){i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),ff(i.return,n,e),s||(a=null);break e}i=l.next}}else if(r.tag===18){if(a=r.return,a===null)throw Error(W(341));a.lanes|=n,i=a.alternate,i!==null&&(i.lanes|=n),ff(a,n,e),a=null}else r.tag===13&&r.memoizedState!==null&&r.memoizedState.dehydrated===null?(r.lanes|=n,a=r.alternate,a!==null&&(a.lanes|=n),ff(r.return,n,e),a=r.child,a=a!==null?a.sibling:null):a=r.child;if(a!==null)a.return=r;else for(a=r;a!==null;){if(a===e){a=null;break}if(r=a.sibling,r!==null){r.return=a.return,a=r;break}a=a.return}r=a}}function Ta(e,t,n,s){e=null;for(var r=t,i=!1;r!==null;){if(!i){if(r.flags&524288)i=!0;else if(r.flags&262144)break}if(r.tag===10){var a=r.alternate;if(a===null)throw Error(W(387));if(a=a.memoizedProps,a!==null){var l=r.type;Zn(r.pendingProps.value,a.value)||(e!==null?e.push(l):e=[l])}}else if(r===Yf.current){if(a=r.alternate,a===null)throw Error(W(387));a.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(wl):e=[wl])}r=r.return}return e!==null&&wg(t,e,n,s),t.flags|=262144,e!==null}function ah(e){for(e=e.firstContext;e!==null;){if(!Zn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function za(e){Ya=e,Sr=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Kt(e){return yj(Ya,e)}function Md(e,t){return Ya===null&&za(e),yj(e,t)}function yj(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Sr===null){if(e===null)throw Error(W(308));Sr=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Sr=Sr.next=t;return n}var vD=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},wD=Ct.unstable_scheduleCallback,jD=Ct.unstable_NormalPriority,bt={$$typeof:er,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $y(){return{controller:new vD,data:new Map,refCount:0}}function Hu(e){e.refCount--,e.refCount===0&&wD(jD,function(){e.controller.abort()})}function Jv(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var s=t[e];n.indexOf(s)===-1&&n.push(s)}}}var vc=null;function SD(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ac=null,jg=0,Aa=0,Ho=null;function $D(e,t){if(Ac===null){var n=Ac=[];jg=0,Aa=Jy(),Ho={status:"pending",value:void 0,then:function(s){n.push(s)}}}return jg++,t.then(e2,e2),t}function e2(){if(--jg===0&&(vc=null,Ac!==null)){Ho!==null&&(Ho.status="fulfilled");var e=Ac;Ac=null,Aa=0,Ho=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function CD(e,t){var n=[],s={status:"pending",value:null,reason:null,then:function(r){n.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<n.length;r++)(0,n[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<n.length;r++)(0,n[r])(void 0)}),s}var t2=me.S;me.S=function(e,t){if(O8=Vn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&$D(e,t),vc!==null)for(var n=kl;n!==null;)Jv(n,vc),n=n.next;if(n=e.types,n!==null){for(var s=kl;s!==null;)Jv(s,n),s=s.next;if(Aa!==0){s=vc,s===null&&(s=vc=[]);for(var r=0;r<n.length;r++){var i=n[r];s.indexOf(i)===-1&&s.push(i)}}}t2!==null&&t2(e,t)};var ka=ur(null);function Cy(){var e=ka.current;return e!==null?e:Ke.pooledCache}function hf(e,t){t===null?Je(ka,ka.current):Je(ka,t.pool)}function kj(){var e=Cy();return e===null?null:{parent:bt._currentValue,pool:e}}var Hl=Error(W(460)),Ey=Error(W(474)),Sx=Error(W(542)),oh={then:function(){}};function n2(e){return e=e.status,e==="fulfilled"||e==="rejected"}function bj(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(tr,tr),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,r2(e),e===void 0&&!("reason"in t)?Error(W(600)):e;default:if(typeof t.status=="string")t.then(tr,tr);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(W(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,r2(e),e}throw ba=t,Hl}}function Zi(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ba=n,Hl):n}}var ba=null;function s2(){if(ba===null)throw Error(W(459));var e=ba;return ba=null,e}function r2(e){if(e===Hl||e===Sx)throw Error(W(483))}var Po=null,au=0;function Rd(e){var t=au;return au+=1,Po===null&&(Po=[]),bj(Po,e,t)}function Kr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Id(e,t){throw t.$$typeof===aO?Error(W(525)):(e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function vj(e){function t(g,k){if(e){var v=g.deletions;v===null?(g.deletions=[k],g.flags|=16):v.push(k)}}function n(g,k){if(!e)return null;for(;k!==null;)t(g,k),k=k.sibling;return null}function s(g){for(var k=new Map;g!==null;)g.key===null?k.set(g.index,g):k.set(g.key,g),g=g.sibling;return k}function r(g,k){return g=Tr(g,k),g.index=0,g.sibling=null,g}function i(g,k,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<k?(g.flags|=2,k):v):(g.flags|=134217730,k)):(g.flags|=1048576,k)}function a(g){return e&&g.alternate===null&&(g.flags|=134217730),g}function l(g,k,v,w){return k===null||k.tag!==6?(k=K1(v,g.mode,w),k.return=g,k):(k=r(k,v),k.return=g,k)}function c(g,k,v,w){var j=v.type;return j===So?(g=d(g,k,v.props.children,w,v.key),Kr(g,v),g):k!==null&&(k.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===ti&&Zi(j)===k.type)?(k=r(k,v.props),Kr(k,v),k.return=g,k):(k=df(v.type,v.key,v.props,null,g.mode,w),Kr(k,v),k.return=g,k)}function u(g,k,v,w){return k===null||k.tag!==4||k.stateNode.containerInfo!==v.containerInfo||k.stateNode.implementation!==v.implementation?(k=X1(v,g.mode,w),k.return=g,k):(k=r(k,v.children||[]),k.return=g,k)}function d(g,k,v,w,j){return k===null||k.tag!==7?(k=ya(v,g.mode,w,j),k.return=g,k):(k=r(k,v),k.return=g,k)}function f(g,k,v){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=K1(""+k,g.mode,v),k.return=g,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Cd:return v=df(k.type,k.key,k.props,null,g.mode,v),Kr(v,k),v.return=g,v;case yc:return k=X1(k,g.mode,v),k.return=g,k;case ti:return k=Zi(k),f(g,k,v)}if(kc(k)||ac(k))return k=ya(k,g.mode,v,null),k.return=g,k;if(typeof k.then=="function")return f(g,Rd(k),v);if(k.$$typeof===er)return f(g,Md(g,k),v);Id(g,k)}return null}function h(g,k,v,w){var j=k!==null?k.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return j!==null?null:l(g,k,""+v,w);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Cd:return v.key===j?c(g,k,v,w):null;case yc:return v.key===j?u(g,k,v,w):null;case ti:return v=Zi(v),h(g,k,v,w)}if(kc(v)||ac(v))return j!==null?null:d(g,k,v,w,null);if(typeof v.then=="function")return h(g,k,Rd(v),w);if(v.$$typeof===er)return h(g,k,Md(g,v),w);Id(g,v)}return null}function p(g,k,v,w,j){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return g=g.get(v)||null,l(k,g,""+w,j);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Cd:return g=g.get(w.key===null?v:w.key)||null,c(k,g,w,j);case yc:return g=g.get(w.key===null?v:w.key)||null,u(k,g,w,j);case ti:return w=Zi(w),p(g,k,v,w,j)}if(kc(w)||ac(w))return g=g.get(v)||null,d(k,g,w,j,null);if(typeof w.then=="function")return p(g,k,v,Rd(w),j);if(w.$$typeof===er)return p(g,k,v,Md(k,w),j);Id(k,w)}return null}function m(g,k,v,w){for(var j=null,$=null,C=k,E=k=0,T=null;C!==null&&E<v.length;E++){C.index>E?(T=C,C=null):T=C.sibling;var S=h(g,C,v[E],w);if(S===null){C===null&&(C=T);break}e&&C&&S.alternate===null&&t(g,C),k=i(S,k,E),$===null?j=S:$.sibling=S,$=S,C=T}if(E===v.length)return n(g,C),$e&&yr(g,E),j;if(C===null){for(;E<v.length;E++)C=f(g,v[E],w),C!==null&&(k=i(C,k,E),$===null?j=C:$.sibling=C,$=C);return $e&&yr(g,E),j}for(C=s(C);E<v.length;E++)T=p(C,g,E,v[E],w),T!==null&&(e&&(S=T.alternate,S!==null&&C.delete(S.key===null?E:S.key)),k=i(T,k,E),$===null?j=T:$.sibling=T,$=T);return e&&C.forEach(function(N){return t(g,N)}),$e&&yr(g,E),j}function b(g,k,v,w){if(v==null)throw Error(W(151));for(var j=null,$=null,C=k,E=k=0,T=null,S=v.next();C!==null&&!S.done;E++,S=v.next()){C.index>E?(T=C,C=null):T=C.sibling;var N=h(g,C,S.value,w);if(N===null){C===null&&(C=T);break}e&&C&&N.alternate===null&&t(g,C),k=i(N,k,E),$===null?j=N:$.sibling=N,$=N,C=T}if(S.done)return n(g,C),$e&&yr(g,E),j;if(C===null){for(;!S.done;E++,S=v.next())S=f(g,S.value,w),S!==null&&(k=i(S,k,E),$===null?j=S:$.sibling=S,$=S);return $e&&yr(g,E),j}for(C=s(C);!S.done;E++,S=v.next())S=p(C,g,E,S.value,w),S!==null&&(e&&(T=S.alternate,T!==null&&C.delete(T.key===null?E:T.key)),k=i(S,k,E),$===null?j=S:$.sibling=S,$=S);return e&&C.forEach(function(z){return t(g,z)}),$e&&yr(g,E),j}function y(g,k,v,w){if(typeof v=="object"&&v!==null&&v.type===So&&v.key===null&&v.props.ref===void 0&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Cd:e:{for(var j=v.key;k!==null;){if(k.key===j){if(j=v.type,j===So){if(k.tag===7){n(g,k.sibling),w=r(k,v.props.children),Kr(w,v),w.return=g,g=w;break e}}else if(k.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===ti&&Zi(j)===k.type){n(g,k.sibling),w=r(k,v.props),Kr(w,v),w.return=g,g=w;break e}n(g,k);break}else t(g,k);k=k.sibling}v.type===So?(w=ya(v.props.children,g.mode,w,v.key),Kr(w,v),w.return=g,g=w):(w=df(v.type,v.key,v.props,null,g.mode,w),Kr(w,v),w.return=g,g=w)}return a(g);case yc:e:{for(j=v.key;k!==null;){if(k.key===j)if(k.tag===4&&k.stateNode.containerInfo===v.containerInfo&&k.stateNode.implementation===v.implementation){n(g,k.sibling),w=r(k,v.children||[]),w.return=g,g=w;break e}else{n(g,k);break}else t(g,k);k=k.sibling}w=X1(v,g.mode,w),w.return=g,g=w}return a(g);case ti:return v=Zi(v),y(g,k,v,w)}if(kc(v))return m(g,k,v,w);if(ac(v)){if(j=ac(v),typeof j!="function")throw Error(W(150));return v=j.call(v),b(g,k,v,w)}if(typeof v.then=="function")return y(g,k,Rd(v),w);if(v.$$typeof===er)return y(g,k,Md(g,v),w);Id(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,k!==null&&k.tag===6?(n(g,k.sibling),w=r(k,v),w.return=g,g=w):(n(g,k),w=K1(v,g.mode,w),w.return=g,g=w),a(g)):n(g,k)}return function(g,k,v,w){try{au=0;var j=y(g,k,v,w);return Po=null,j}catch(C){if(C===Hl||C===Sx)throw C;var $=Tn(29,C,null,g.mode);return $.lanes=w,$.return=g,$}finally{}}}var Na=vj(!0),wj=vj(!1),ni=!1;function Ty(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sg(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 pi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function gi(e,t,n){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,_e&2){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=sh(e),hj(e,null,n),t}return wx(e,s,t,n),sh(e)}function Nc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,B6(e,n)}}function Y1(e,t){var n=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var r=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?r=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?r=i=t:i=i.next=t}else r=i=t;n={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:i,shared:s.shared,callbacks:s.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var $g=!1;function Mc(){if($g){var e=Ho;if(e!==null)throw e}}function Rc(e,t,n,s){$g=!1;var r=e.updateQueue;ni=!1;var i=r.firstBaseUpdate,a=r.lastBaseUpdate,l=r.shared.pending;if(l!==null){r.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?i=u:a.next=u,a=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(i!==null){var f=r.baseState;a=0,d=u=c=null,l=i;do{var h=l.lane&-536870913,p=h!==l.lane;if(p?(Ae&h)===h:(s&h)===h){h!==0&&h===Aa&&($g=!0),d!==null&&(d=d.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var m=e,b=l;h=t;var y=n;switch(b.tag){case 1:if(m=b.payload,typeof m=="function"){f=m.call(y,f,h);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=b.payload,h=typeof m=="function"?m.call(y,f,h):m,h==null)break e;f=Xe({},f,h);break e;case 2:ni=!0}}h=l.callback,h!==null&&(e.flags|=64,p&&(e.flags|=8192),p=r.callbacks,p===null?r.callbacks=[h]:p.push(h))}else p={lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=p,c=f):d=d.next=p,a|=h;if(l=l.next,l===null){if(l=r.shared.pending,l===null)break;p=l,l=p.next,p.next=null,r.lastBaseUpdate=p,r.shared.pending=null}}while(!0);d===null&&(c=f),r.baseState=c,r.firstBaseUpdate=u,r.lastBaseUpdate=d,i===null&&(r.shared.lanes=0),zi|=a,e.lanes=a,e.memoizedState=f}}function jj(e,t){if(typeof e!="function")throw Error(W(191,e));e.call(t)}function Sj(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)jj(n[e],t)}var Ei=ur(null),lh=ur(0);function i2(e,t){e=Or,Je(lh,e),Je(Ei,t),Or=e|t.baseLanes}function Cg(){Je(lh,Or),Je(Ei,Ei.current)}function zy(){Or=lh.current,Xt(Ei),Xt(lh)}var Qt=ur(null),rn=null;function mi(e){var t=e.alternate;Je(Zt,Zt.current&1),Je(Qt,e),rn===null&&(t===null||Ei.current!==null||t.memoizedState!==null)&&(rn=e)}function Eg(e){Je(Zt,Zt.current),Je(Qt,e),rn===null&&(rn=e)}function $j(e){e.tag===22?(Je(Zt,Zt.current),Je(Qt,e),rn===null&&(rn=e)):yi()}function yi(){Je(Zt,Zt.current),Je(Qt,Qt.current)}function Hn(e){Xt(Qt),rn===e&&(rn=null),Xt(Zt)}var Zt=ur(0);function ou(e,t){Je(Qt,Qt.current),Je(Zt,t)}function Ay(e){Xt(Zt),Xt(Qt),rn===e&&(rn=null)}function ch(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||om(n)||sk(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 Rr=0,je=null,Ge=null,kt=null,uh=!1,Uo=!1,Ma=!1,dh=0,lu=0,Fo=null,ED=0;function ft(){throw Error(W(321))}function Ny(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Zn(e[n],t[n]))return!1;return!0}function My(e,t,n,s,r,i){return Rr=i,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,me.H=e===null||e.memoizedState===null?n8:s8,Ma=!1,i=n(s,r),Ma=!1,Uo&&(i=Ej(t,n,s,r)),Cj(e),i}function Cj(e){me.H=fh;var t=Ge!==null&&Ge.next!==null;if(Rr=0,kt=Ge=je=null,uh=!1,lu=0,Fo=null,t)throw Error(W(300));e===null||vt||(e=e.dependencies,e!==null&&ah(e)&&(vt=!0))}function Ej(e,t,n,s){je=e;var r=0;do{if(Uo&&(Fo=null),lu=0,Uo=!1,25<=r)throw Error(W(301));if(r+=1,kt=Ge=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}me.H=_D,i=t(n,s)}while(Uo);return i}function TD(){var e=me.H,t=e.useState()[0];return t=typeof t.then=="function"?Pu(t):t,e=e.useState()[0],(Ge!==null?Ge.memoizedState:null)!==e&&(je.flags|=1024),t}function Ry(){var e=dh!==0;return dh=0,e}function Iy(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function _y(e){if(uh){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uh=!1}Rr=0,kt=Ge=je=null,Uo=!1,lu=dh=0,Fo=null}function yn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kt===null?je.memoizedState=kt=e:kt=kt.next=e,kt}function mt(){if(Ge===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var t=kt===null?je.memoizedState:kt.next;if(t!==null)kt=t,Ge=e;else{if(e===null)throw je.alternate===null?Error(W(467)):Error(W(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},kt===null?je.memoizedState=kt=e:kt=kt.next=e}return kt}function $x(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Pu(e){var t=lu;return lu+=1,Fo===null&&(Fo=[]),e=bj(Fo,e,t),t=je,(kt===null?t.memoizedState:kt.next)===null&&(t=t.alternate,me.H=t===null||t.memoizedState===null?n8:s8),e}function Cx(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Pu(e);if(e.$$typeof===cO)return;if(e.$$typeof===er)return Kt(e)}throw Error(W(438,String(e)))}function Oy(e){var t=null,n=je.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var s=je.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=$x(),je.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),s=0;s<e;s++)n[s]=lO;return t.index++,n}function Ir(e,t){return typeof t=="function"?t(e):t}function xf(e){var t=mt();return Dy(t,Ge,e)}function Dy(e,t,n){var s=e.queue;if(s===null)throw Error(W(311));s.lastRenderedReducer=n;var r=e.baseQueue,i=s.pending;if(i!==null){if(r!==null){var a=r.next;r.next=i.next,i.next=a}t.baseQueue=r=i,s.pending=null}if(i=e.baseState,r===null)e.memoizedState=i;else{t=r.next;var l=a=null,c=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f!==u.lane?(Ae&f)===f:(Rr&f)===f){var h=u.revertLane;if(h===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Aa&&(d=!0);else if((Rr&h)===h){u=u.next,h===Aa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(l=c=f,a=i):c=c.next=f,je.lanes|=h,zi|=h;f=u.action,Ma&&n(i,f),i=u.hasEagerState?u.eagerState:n(i,f)}else h={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(l=c=h,a=i):c=c.next=h,je.lanes|=f,zi|=f;u=u.next}while(u!==null&&u!==t);if(c===null?a=i:c.next=l,!Zn(i,e.memoizedState)&&(vt=!0,d&&(n=Ho,n!==null)))throw n;e.memoizedState=i,e.baseState=a,e.baseQueue=c,s.lastRenderedState=i}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Q1(e){var t=mt(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var s=n.dispatch,r=n.pending,i=t.memoizedState;if(r!==null){n.pending=null;var a=r=r.next;do i=e(i,a.action),a=a.next;while(a!==r);Zn(i,t.memoizedState)||(vt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,s]}function Tj(e,t,n){var s=je,r=mt(),i=$e;if(i){if(n===void 0)throw Error(W(407));n=n()}else n=t();var a=!Zn((Ge||r).memoizedState,n);if(a&&(r.memoizedState=n,vt=!0),r=r.queue,Ly(Nj.bind(null,s,r,e),[e]),e=r.getSnapshot!==t||a||kt!==null&&(kt.memoizedState.tag&1)!==0,pl(e?9:8,{destroy:void 0},Aj.bind(null,s,r,n,t),null),e){if(s.flags|=2048,Ke===null)throw Error(W(349));i||Rr&127||zj(s,t,n)}return n}function zj(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=je.updateQueue,t===null?(t=$x(),je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Aj(e,t,n,s){t.value=n,t.getSnapshot=s,Mj(t)&&Rj(e)}function Nj(e,t,n){return n(function(){Mj(t)&&Rj(e)})}function Mj(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Zn(e,n)}catch{return!0}}function Rj(e){var t=Za(e,2);t!==null&&zn(t,e,2)}function Tg(e){var t=yn();if(typeof e=="function"){var n=e;if(e=n(),Ma){oi(!0);try{n()}finally{oi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ir,lastRenderedState:e},t}function Ij(e,t,n,s){return e.baseState=n,Dy(e,Ge,typeof s=="function"?s:Ir)}function zD(e,t,n,s,r){if(Tx(e))throw Error(W(485));if(e=t.action,e!==null){var i={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(a){i.listeners.push(a)}};me.T!==null?n(!0):i.isTransition=!1,s(i),n=t.pending,n===null?(i.next=t.pending=i,_j(t,i)):(i.next=n.next,t.pending=n.next=i)}}function _j(e,t){var n=t.action,s=t.payload,r=e.state;if(t.isTransition){var i=me.T,a={};a.types=i!==null?i.types:null,me.T=a;try{var l=n(r,s),c=me.S;c!==null&&c(a,l),a2(e,t,l)}catch(u){zg(e,t,u)}finally{i!==null&&a.types!==null&&(i.types=a.types),me.T=i}}else try{i=n(r,s),a2(e,t,i)}catch(u){zg(e,t,u)}}function a2(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(s){o2(e,t,s)},function(s){return zg(e,t,s)}):o2(e,t,n)}function o2(e,t,n){t.status="fulfilled",t.value=n,Oj(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,_j(e,n)))}function zg(e,t,n){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=n,Oj(t),t=t.next;while(t!==s)}e.action=null}function Oj(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Dj(e,t){return t}function l2(e,t){if($e){var n=Ke.formState;if(n!==null){e:{var s=je;if($e){if(Ye){t:{for(var r=Ye,i=fs;r.nodeType!==8;){if(!i){r=null;break t}if(r=ps(r.nextSibling),r===null){r=null;break t}}i=r.data,r=i==="F!"||i==="F"?r:null}if(r){Ye=ps(r.nextSibling),s=r.data==="F!";break e}}Ci(s)}s=!1}s&&(t=n[0])}}return n=yn(),n.memoizedState=n.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dj,lastRenderedState:t},n.queue=s,n=Jj.bind(null,je,s),s.dispatch=n,s=Tg(!1),i=Py.bind(null,je,!1,s.queue),s=yn(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,n=zD.bind(null,je,r,i,n),r.dispatch=n,s.memoizedState=e,[t,n,!1]}function c2(e){var t=mt();return Lj(t,Ge,e)}function Lj(e,t,n){if(t=Dy(e,t,Dj)[0],e=xf(Ir)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Pu(t)}catch(a){throw a===Hl?Sx:a}else s=t;t=mt();var r=t.queue,i=r.dispatch;return n!==t.memoizedState&&(je.flags|=2048,pl(9,{destroy:void 0},AD.bind(null,r,n),null)),[s,i,e]}function AD(e,t){e.action=t}function u2(e){var t=mt(),n=Ge;if(n!==null)return Lj(t,n,e);mt(),t=t.memoizedState,n=mt();var s=n.queue.dispatch;return n.memoizedState=e,[t,s,!1]}function pl(e,t,n,s){return e={tag:e,create:n,deps:s,inst:t,next:null},t=je.updateQueue,t===null&&(t=$x(),je.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(s=n.next,n.next=e,e.next=s,t.lastEffect=e),e}function Bj(){return mt().memoizedState}function pf(e,t,n,s){var r=yn();je.flags|=e,r.memoizedState=pl(1|t,{destroy:void 0},n,s===void 0?null:s)}function Ex(e,t,n,s){var r=mt();s=s===void 0?null:s;var i=r.memoizedState.inst;Ge!==null&&s!==null&&Ny(s,Ge.memoizedState.deps)?r.memoizedState=pl(t,i,n,s):(je.flags|=e,r.memoizedState=pl(1|t,i,n,s))}function d2(e,t){pf(8390656,8,e,t)}function Ly(e,t){Ex(2048,8,e,t)}function ND(e){je.flags|=4;var t=je.updateQueue;if(t===null)t=$x(),je.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function qj(e){var t=mt().memoizedState;return ND({ref:t,nextImpl:e}),function(){if(_e&2)throw Error(W(440));return t.impl.apply(void 0,arguments)}}function Hj(e,t){return Ex(4,2,e,t)}function Pj(e,t){return Ex(4,4,e,t)}function Uj(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 Fj(e,t,n){n=n!=null?n.concat([e]):null,Ex(4,4,Uj.bind(null,t,e),n)}function By(){}function Gj(e,t){var n=mt();t=t===void 0?null:t;var s=n.memoizedState;return t!==null&&Ny(t,s[1])?s[0]:(n.memoizedState=[e,t],e)}function Vj(e,t){var n=mt();t=t===void 0?null:t;var s=n.memoizedState;if(t!==null&&Ny(t,s[1]))return s[0];if(s=e(),Ma){oi(!0);try{e()}finally{oi(!1)}}return n.memoizedState=[s,t],s}function qy(e,t,n){return n===void 0||Rr&1073741824&&!(Ae&261930)?e.memoizedState=t:(e.memoizedState=n,e=L8(),je.lanes|=e,zi|=e,n)}function Wj(e,t,n,s){return Zn(n,t)?n:Ei.current!==null?(e=qy(e,n,s),Zn(e,t)||(vt=!0),e):!(Rr&106)||Rr&1073741824&&!(Ae&261930)?(vt=!0,e.memoizedState=n):(e=L8(),je.lanes|=e,zi|=e,t)}function Kj(e,t,n,s,r){var i=Oe.p;Oe.p=i!==0&&8>i?i:8;var a=me.T,l={};l.types=a!==null?a.types:null,me.T=l,Py(e,!1,t,n);try{var c=r(),u=me.S;if(u!==null&&u(l,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=CD(c,s);Ic(e,t,d,Xn(e))}else Ic(e,t,s,Xn(e))}catch(f){Ic(e,t,{then:function(){},status:"rejected",reason:f},Xn())}finally{Oe.p=i,a!==null&&l.types!==null&&(a.types=l.types),me.T=a}}function MD(){}function Ag(e,t,n,s){if(e.tag!==5)throw Error(W(476));var r=Xj(e).queue;Kj(e,r,t,ma,n===null?MD:function(){return Zj(e),n(s)})}function Xj(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ma,baseState:ma,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ir,lastRenderedState:ma},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ir,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Zj(e){var t=Xj(e);t.next===null&&(t=e.alternate.memoizedState),Ic(e,t.next.queue,{},Xn())}function Hy(){return Kt(wl)}function Yj(){return mt().memoizedState}function Qj(){return mt().memoizedState}function RD(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Xn();e=pi(n);var s=gi(t,e,n);s!==null&&(zn(s,t,n),Nc(s,t,n)),t={cache:$y()},e.payload=t;return}t=t.return}}function ID(e,t,n){var s=Xn();n={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Tx(e)?e8(t,n):(n=wy(e,t,n,s),n!==null&&(zn(n,e,s),t8(n,t,s)))}function Jj(e,t,n){var s=Xn();Ic(e,t,n,s)}function Ic(e,t,n,s){var r={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Tx(e))e8(t,r);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,l=i(a,n);if(r.hasEagerState=!0,r.eagerState=l,Zn(l,a))return wx(e,t,r,0),Ke===null&&vx(),!1}catch{}finally{}if(n=wy(e,t,r,s),n!==null)return zn(n,e,s),t8(n,t,s),!0}return!1}function Py(e,t,n,s){if(s={lane:2,revertLane:Jy(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Tx(e)){if(t)throw Error(W(479))}else t=wy(e,n,s,2),t!==null&&zn(t,e,2)}function Tx(e){var t=e.alternate;return e===je||t!==null&&t===je}function e8(e,t){Uo=uh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function t8(e,t,n){if(n&4194048){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,B6(e,n)}}var fh={readContext:Kt,use:Cx,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft,useEffectEvent:ft},n8={readContext:Kt,use:Cx,useCallback:function(e,t){return yn().memoizedState=[e,t===void 0?null:t],e},useContext:Kt,useEffect:d2,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,pf(4194308,4,Uj.bind(null,t,e),n)},useLayoutEffect:function(e,t){return pf(4194308,4,e,t)},useInsertionEffect:function(e,t){pf(4,2,e,t)},useMemo:function(e,t){var n=yn();t=t===void 0?null:t;var s=e();if(Ma){oi(!0);try{e()}finally{oi(!1)}}return n.memoizedState=[s,t],s},useReducer:function(e,t,n){var s=yn();if(n!==void 0){var r=n(t);if(Ma){oi(!0);try{n(t)}finally{oi(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=ID.bind(null,je,e),[s.memoizedState,e]},useRef:function(e){var t=yn();return e={current:e},t.memoizedState=e},useState:function(e){e=Tg(e);var t=e.queue,n=Jj.bind(null,je,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:By,useDeferredValue:function(e,t){var n=yn();return qy(n,e,t)},useTransition:function(){var e=Tg(!1);return e=Kj.bind(null,je,e.queue,!0,!1),yn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var s=je,r=yn();if($e){if(n===void 0)throw Error(W(407));n=n()}else{if(n=t(),Ke===null)throw Error(W(349));Ae&127||zj(s,t,n)}r.memoizedState=n;var i={value:n,getSnapshot:t};return r.queue=i,d2(Nj.bind(null,s,i,e),[e]),s.flags|=2048,pl(9,{destroy:void 0},Aj.bind(null,s,i,n,t),null),n},useId:function(){var e=yn(),t=Ke.identifierPrefix;if($e){var n=sr,s=nr;n=(s&~(1<<32-Kn(s)-1)).toString(32)+n,t="_"+t+"R_"+n,n=dh++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=ED++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Hy,useFormState:l2,useActionState:l2,useOptimistic:function(e){var t=yn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Py.bind(null,je,!0,n),n.dispatch=t,[e,t]},useMemoCache:Oy,useCacheRefresh:function(){return yn().memoizedState=RD.bind(null,je)},useEffectEvent:function(e){var t=yn(),n={impl:e};return t.memoizedState=n,function(){if(_e&2)throw Error(W(440));return n.impl.apply(void 0,arguments)}}},s8={readContext:Kt,use:Cx,useCallback:Gj,useContext:Kt,useEffect:Ly,useImperativeHandle:Fj,useInsertionEffect:Hj,useLayoutEffect:Pj,useMemo:Vj,useReducer:xf,useRef:Bj,useState:function(){return xf(Ir)},useDebugValue:By,useDeferredValue:function(e,t){var n=mt();return Wj(n,Ge.memoizedState,e,t)},useTransition:function(){var e=xf(Ir)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:Pu(e),t]},useSyncExternalStore:Tj,useId:Yj,useHostTransitionStatus:Hy,useFormState:c2,useActionState:c2,useOptimistic:function(e,t){var n=mt();return Ij(n,Ge,e,t)},useMemoCache:Oy,useCacheRefresh:Qj,useEffectEvent:qj},_D={readContext:Kt,use:Cx,useCallback:Gj,useContext:Kt,useEffect:Ly,useImperativeHandle:Fj,useInsertionEffect:Hj,useLayoutEffect:Pj,useMemo:Vj,useReducer:Q1,useRef:Bj,useState:function(){return Q1(Ir)},useDebugValue:By,useDeferredValue:function(e,t){var n=mt();return Ge===null?qy(n,e,t):Wj(n,Ge.memoizedState,e,t)},useTransition:function(){var e=Q1(Ir)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:Pu(e),t]},useSyncExternalStore:Tj,useId:Yj,useHostTransitionStatus:Hy,useFormState:u2,useActionState:u2,useOptimistic:function(e,t){var n=mt();return Ge!==null?Ij(n,Ge,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Oy,useCacheRefresh:Qj,useEffectEvent:qj};function J1(e,t,n,s){t=e.memoizedState,n=n(s,t),n=n==null?t:Xe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ng={enqueueSetState:function(e,t,n){e=e._reactInternals;var s=Xn(),r=pi(s);r.payload=t,n!=null&&(r.callback=n),t=gi(e,r,s),t!==null&&(zn(t,e,s),Nc(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var s=Xn(),r=pi(s);r.tag=1,r.payload=t,n!=null&&(r.callback=n),t=gi(e,r,s),t!==null&&(zn(t,e,s),Nc(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Xn(),s=pi(n);s.tag=2,t!=null&&(s.callback=t),t=gi(e,s,n),t!==null&&(zn(t,e,n),Nc(t,e,n))}};function f2(e,t,n,s,r,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,i,a):t.prototype&&t.prototype.isPureReactComponent?!su(n,s)||!su(r,i):!0}function h2(e,t,n,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,s),t.state!==e&&Ng.enqueueReplaceState(t,t.state,null)}function Ra(e,t){var n=t;if("ref"in t){n={};for(var s in t)s!=="ref"&&(n[s]=t[s])}if(e=e.defaultProps){n===t&&(n=Xe({},n));for(var r in e)n[r]===void 0&&(n[r]=e[r])}return n}function r8(e){nh(e)}function i8(e){console.error(e)}function a8(e){nh(e)}function hh(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function x2(e,t,n){try{var s=e.onCaughtError;s(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Mg(e,t,n){return n=pi(n),n.tag=3,n.payload={element:null},n.callback=function(){hh(e,t)},n}function o8(e){return e=pi(e),e.tag=3,e}function l8(e,t,n,s){var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var i=s.value;e.payload=function(){return r(i)},e.callback=function(){x2(t,n,s)}}var a=n.stateNode;a!==null&&typeof a.componentDidCatch=="function"&&(e.callback=function(){x2(t,n,s),typeof r!="function"&&(ki===null?ki=new Set([this]):ki.add(this));var l=s.stack;this.componentDidCatch(s.value,{componentStack:l!==null?l:""})})}function OD(e,t,n,s,r){if(n.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=n.alternate,t!==null&&Ta(t,n,r,!0),n=Qt.current,n!==null){switch(n.tag){case 31:case 13:case 19:return rn===null?vh():n.alternate===null&&ht===0&&(ht=3),n.flags&=-257,n.flags|=65536,n.lanes=r,s===oh?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([s]):t.add(s),ap(e,s,r)),!1;case 22:return n.flags|=65536,s===oh?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([s]):n.add(s)),ap(e,s,r)),!1}throw Error(W(435,n.tag))}return ap(e,s,r),vh(),!1}if($e)return t=Qt.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==bg&&(e=Error(W(422),{cause:s}),iu(ds(e,n)))):(s!==bg&&(t=Error(W(423),{cause:s}),iu(ds(t,n))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=ds(s,n),r=Mg(e.stateNode,s,r),Y1(e,r),ht!==4&&(ht=2)),!1;var i=Error(W(520),{cause:s});if(i=ds(i,n),Lc===null?Lc=[i]:Lc.push(i),ht!==4&&(ht=2),t===null)return!0;s=ds(s,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=r&-r,n.lanes|=e,e=Mg(n.stateNode,s,e),Y1(n,e),!1;case 1:if(t=n.type,i=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(ki===null||!ki.has(i))))return n.flags|=65536,r&=-r,n.lanes|=r,r=o8(r),l8(r,e,n,s),Y1(n,r),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Uy=Error(W(461)),vt=!1;function St(e,t,n,s){t.child=e===null?wj(t,null,n,s):Na(t,e.child,n,s)}function p2(e,t,n,s,r){n=n.render;var i=t.ref;if("ref"in s){var a={};for(var l in s)l!=="ref"&&(a[l]=s[l])}else a=s;return za(t),s=My(e,t,n,a,i,r),l=Ry(),e!==null&&!vt?(Iy(e,t,r),_r(e,t,r)):($e&&l&&jx(t),t.flags|=1,St(e,t,s,r),t.child)}function g2(e,t,n,s,r){if(e===null){var i=n.type;return typeof i=="function"&&!jy(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,c8(e,t,i,s,r)):(e=df(n.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Gy(e,r)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:su,n(a,s)&&e.ref===t.ref)return _r(e,t,r)}return t.flags|=1,e=Tr(i,s),e.ref=t.ref,e.return=t,t.child=e}function c8(e,t,n,s,r){if(e!==null){var i=e.memoizedProps;if(su(i,s)&&e.ref===t.ref)if(vt=!1,t.pendingProps=s=i,Gy(e,r))e.flags&131072&&(vt=!0);else return t.lanes=e.lanes,_r(e,t,r)}return Rg(e,t,n,s,r)}function u8(e,t,n,s){var r=s.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if(t.flags&128){if(i=i!==null?i.baseLanes|n:n,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~i}else s=0,t.child=null;return m2(e,t,i,n,s)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&hf(t,i!==null?i.cachePool:null),i!==null?i2(t,i):Cg(),$j(t);else return s=t.lanes=536870912,m2(e,t,i!==null?i.baseLanes|n:n,n,s)}else i!==null?(hf(t,i.cachePool),i2(t,i),yi(),t.memoizedState=null):(e!==null&&hf(t,null),Cg(),yi());return St(e,t,r,n),t.child}function _c(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function m2(e,t,n,s,r){var i=Cy();return i=i===null?null:{parent:bt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&hf(t,null),Cg(),$j(t),e!==null&&Ta(e,t,s,!0),t.childLanes=r,null}function gf(e,t){return t=zx({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function y2(e,t,n){return Na(t,e.child,null,n),e=gf(t,t.pendingProps),e.flags|=2,Hn(t),t.memoizedState=null,e}function DD(e,t,n){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if($e){if(s.mode==="hidden")return e=gf(t,s),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},_c(null,e);if(Eg(t),(e=Ye)?(e=cS(e,fs),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:$i!==null?{id:nr,overflow:sr}:null,retryLane:536870912,hydrationErrors:null},n=pj(e),n.return=t,t.child=n,Lt=t,Ye=null)):e=null,e===null)throw Ci(t);return t.lanes=536870912,null}return gf(t,s)}var i=e.memoizedState;if(i!==null){var a=i.dehydrated;if(Eg(t),r)if(t.flags&256)t.flags&=-257,t=y2(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(W(558));else if(vt||Ta(e,t,n,!1),r=(n&e.childLanes)!==0,vt||r){if(Ei.current===null){if(s=Ke,s!==null&&(a=q6(s,n),a!==0&&a!==i.retryLane))throw i.retryLane=a,Za(e,a),zn(s,e,a),Uy;vh()}t=y2(e,t,n)}else e=i.treeContext,Ye=ps(a.nextSibling),Lt=t,$e=!0,xi=null,fs=!1,e!==null&&mj(t,e),t=gf(t,s),t.flags|=134221824;return t}return e=Tr(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ko(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(W(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Rg(e,t,n,s,r){return za(t),n=My(e,t,n,s,void 0,r),s=Ry(),e!==null&&!vt?(Iy(e,t,r),_r(e,t,r)):($e&&s&&jx(t),t.flags|=1,St(e,t,n,r),t.child)}function k2(e,t,n,s,r,i){return za(t),t.updateQueue=null,n=Ej(t,s,n,r),Cj(e),s=Ry(),e!==null&&!vt?(Iy(e,t,i),_r(e,t,i)):($e&&s&&jx(t),t.flags|=1,St(e,t,n,i),t.child)}function b2(e,t,n,s,r){if(za(t),t.stateNode===null){var i=No,a=n.contextType;typeof a=="object"&&a!==null&&(i=Kt(a)),i=new n(s,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Ng,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=s,i.state=t.memoizedState,i.refs={},Ty(t),a=n.contextType,i.context=typeof a=="object"&&a!==null?Kt(a):No,i.state=t.memoizedState,a=n.getDerivedStateFromProps,typeof a=="function"&&(J1(t,n,a,s),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(a=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),a!==i.state&&Ng.enqueueReplaceState(i,i.state,null),Rc(t,s,i,r),Mc(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){i=t.stateNode;var l=t.memoizedProps,c=Ra(n,l);i.props=c;var u=i.context,d=n.contextType;a=No,typeof d=="object"&&d!==null&&(a=Kt(d));var f=n.getDerivedStateFromProps;d=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function",l=t.pendingProps!==l,d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l||u!==a)&&h2(t,i,s,a),ni=!1;var h=t.memoizedState;i.state=h,Rc(t,s,i,r),Mc(),u=t.memoizedState,l||h!==u||ni?(typeof f=="function"&&(J1(t,n,f,s),u=t.memoizedState),(c=ni||f2(t,n,c,s,h,u,a))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=u),i.props=s,i.state=u,i.context=a,s=c):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{i=t.stateNode,Sg(e,t),a=t.memoizedProps,d=Ra(n,a),i.props=d,f=t.pendingProps,h=i.context,u=n.contextType,c=No,typeof u=="object"&&u!==null&&(c=Kt(u)),l=n.getDerivedStateFromProps,(u=typeof l=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||h!==c)&&h2(t,i,s,c),ni=!1,h=t.memoizedState,i.state=h,Rc(t,s,i,r),Mc();var p=t.memoizedState;a!==f||h!==p||ni||e!==null&&e.dependencies!==null&&ah(e.dependencies)?(typeof l=="function"&&(J1(t,n,l,s),p=t.memoizedState),(d=ni||f2(t,n,d,s,h,p,c)||e!==null&&e.dependencies!==null&&ah(e.dependencies))?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(s,p,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(s,p,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=p),i.props=s,i.state=p,i.context=c,s=d):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),s=!1)}return i=s,ko(e,t),s=(t.flags&128)!==0,i||s?(i=t.stateNode,n=s&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&s?(t.child=Na(t,e.child,null,r),t.child=Na(t,null,n,r)):St(e,t,n,r),t.memoizedState=i.state,e=t.child):e=_r(e,t,r),e}function v2(e,t,n,s){return Ea(),t.flags|=256,St(e,t,n,s),t.child}var Ig={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _g(e){return{baseLanes:e,cachePool:kj()}}function Og(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Un),e}function d8(e,t,n){var s=t.pendingProps,r=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(Zt.current&2)!==0),a&&(r=!0,t.flags&=-129),a=(t.flags&32)!==0,t.flags&=-33,e===null){if($e){if(r?mi(t):yi(),(e=Ye)?(e=cS(e,fs),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:$i!==null?{id:nr,overflow:sr}:null,retryLane:536870912,hydrationErrors:null},n=pj(e),n.return=t,t.child=n,Lt=t,Ye=null)):e=null,e===null)throw Ci(t);return sk(e)?t.lanes=32:t.lanes=536870912,null}return i=s.children,s=s.fallback,r?(yi(),r=t.mode,i=zx({mode:"hidden",children:i},r),s=ya(s,r,n,null),i.return=t,s.return=t,i.sibling=s,t.child=i,s=t.child,s.memoizedState=_g(n),s.childLanes=Og(e,a,n),t.memoizedState=Ig,_c(null,s)):(mi(t),Fy(t,i))}var l=e.memoizedState;if(l!==null){var c=l.dehydrated;if(c!==null)return LD(e,t,i,a,s,c,l,n)}return r?(yi(),r=s.fallback,i=t.mode,l=e.child,c=l.sibling,s=Tr(l,{mode:"hidden",children:s.children}),s.subtreeFlags=l.subtreeFlags&1206910976,c!==null?r=Tr(c,r):(r=ya(r,i,n,null),r.flags|=2),r.return=t,s.return=t,s.sibling=r,t.child=s,_c(null,s),s=t.child,r=e.child.memoizedState,r===null?r=_g(n):(i=r.cachePool,i!==null?(l=bt._currentValue,i=i.parent!==l?{parent:l,pool:l}:i):i=kj(),r={baseLanes:r.baseLanes|n,cachePool:i}),s.memoizedState=r,s.childLanes=Og(e,a,n),t.memoizedState=Ig,_c(e.child,s)):(mi(t),n=e.child,e=n.sibling,n=Tr(n,{mode:"visible",children:s.children}),n.return=t,n.sibling=null,e!==null&&(a=t.deletions,a===null?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=n,t.memoizedState=null,n)}function Fy(e,t){return t=zx({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function zx(e,t){return e=Tn(22,e,null,t),e.lanes=0,e}function _d(e,t,n){return Na(t,e.child,null,n),e=Fy(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function LD(e,t,n,s,r,i,a,l){if(n)return t.flags&256?(mi(t),t.flags&=-257,_d(e,t,l)):t.memoizedState!==null?(yi(),t.child=e.child,t.flags|=128,null):(yi(),i=r.fallback,a=t.mode,r=zx({mode:"visible",children:r.children},a),i=ya(i,a,l,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,Na(t,e.child,null,l),r=t.child,r.memoizedState=_g(l),r.childLanes=Og(e,s,l),t.memoizedState=Ig,_c(null,r));if(mi(t),sk(i)){if(s=i.nextSibling&&i.nextSibling.dataset,s)var c=s.dgst;return s=c,s!==""&&(r=Error(W(419)),r.stack="",r.digest=s,iu({value:r,source:null,stack:null})),_d(e,t,l)}if(vt||Ta(e,t,l,!1),s=(l&e.childLanes)!==0,vt||s){if(Ei.current!==null)return _d(e,t,l);if(s=Ke,s!==null&&(r=q6(s,l),r!==0&&r!==a.retryLane))throw a.retryLane=r,Za(e,r),zn(s,e,r),Uy;return om(i)||vh(),_d(e,t,l)}return om(i)?(t.flags|=192,t.child=e.child,null):(e=a.treeContext,Ye=ps(i.nextSibling),Lt=t,$e=!0,xi=null,fs=!1,e!==null&&mj(t,e),t=Fy(t,r.children),t.flags|=134221824,t)}function w2(e,t,n){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),ff(e.return,t,n)}function j2(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&ch(n)===null&&(t=e),e=e.sibling}return t}function Od(e,t,n,s,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:r,treeForkCount:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=s,a.tail=n,a.tailMode=r,a.treeForkCount=i)}function ep(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 Dg(e,t,n){var s=t.pendingProps,r=s.revealOrder,i=s.tail;s=s.children;var a=Zt.current;if(t.flags&128)return ou(t,a),null;var l=(a&2)!==0;if(l?(a=a&1|2,t.flags|=128):a&=1,ou(t,a),r==="backwards"&&e!==null?(ep(e),St(e,t,s,n),ep(e)):St(e,t,s,n),s=$e?ru:0,!l&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&w2(e,n,t);else if(e.tag===19)w2(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"backwards":n=j2(t.child),n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null,ep(t)),Od(t,!0,r,null,i,s);break;case"unstable_legacy-backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&ch(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Od(t,!0,n,null,i,s);break;case"together":Od(t,!1,null,null,void 0,s);break;case"independent":t.memoizedState=null;break;default:n=j2(t.child),n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Od(t,!1,r,n,i,s)}return t.child}function S2(e,t,n){var s=t.pendingProps;return ci(t,t.type,s.value),St(e,t,s.children,n),t.child}function _r(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),zi|=t.lanes,!(n&t.childLanes))if(e!==null){if(Ta(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(W(153));if(t.child!==null){for(e=t.child,n=Tr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Tr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Gy(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&ah(e)))}function BD(e,t,n){switch(t.tag){case 3:Qf(t,t.stateNode.containerInfo),ci(t,bt,e.memoizedState.cache),Ea();break;case 27:case 5:ug(t);break;case 4:Qf(t,t.stateNode.containerInfo);break;case 10:ci(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Eg(t),null;break;case 13:var s=t.memoizedState;if(s!==null){if(s.dehydrated!==null)return mi(t),t.flags|=128,null;s=Ta(e,t,n,!1);var r=t.child.childLanes;return s||n&r?d8(e,t,n):(mi(t),e=_r(e,t,n),e!==null?e.sibling:null)}mi(t);break;case 19:if(t.flags&128)return Dg(e,t,n);if(r=(e.flags&128)!==0,s=(n&t.childLanes)!==0,s||(Ta(e,t,n,!1),s=(n&t.childLanes)!==0),r){if(s)return Dg(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),ou(t,Zt.current),s)break;return null;case 22:return t.lanes=0,u8(e,t,n,t.pendingProps);case 24:ci(t,bt,e.memoizedState.cache)}return _r(e,t,n)}function f8(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)vt=!0;else{if(!Gy(e,n)&&!(t.flags&128))return vt=!1,BD(e,t,n);vt=!!(e.flags&131072)}else vt=!1,$e&&t.flags&1048576&&gj(t,ru,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=Zi(t.elementType),t.type=e,typeof e=="function")jy(e)?(s=Ra(e,s),t.tag=1,t=b2(null,t,e,s,n)):(t.tag=0,t=Rg(null,t,e,s,n));else{if(e!=null){var r=e.$$typeof;if(r===uy){t.tag=11,t=p2(null,t,e,s,n);break e}else if(r===dy){t.tag=14,t=g2(null,t,e,s,n);break e}else if(r===er){t.tag=10,t.type=e,t=S2(null,t,n);break e}}throw t=lg(e)||e,Error(W(306,t,""))}}return t;case 0:return Rg(e,t,t.type,t.pendingProps,n);case 1:return s=t.type,r=Ra(s,t.pendingProps),b2(e,t,s,r,n);case 3:e:{if(Qf(t,t.stateNode.containerInfo),e===null)throw Error(W(387));s=t.pendingProps;var i=t.memoizedState;r=i.element,Sg(e,t),Rc(t,s,null,n);var a=t.memoizedState;if(s=a.cache,ci(t,bt,s),s!==i.cache&&wg(t,[bt],n,!0),Mc(),s=a.element,i.isDehydrated)if(i={element:s,isDehydrated:!1,cache:a.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=v2(e,t,s,n);break e}else if(s!==r){r=ds(Error(W(424)),t),iu(r),t=v2(e,t,s,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ye=ps(e.firstChild),Lt=t,$e=!0,xi=null,fs=!0,n=wj(t,null,s,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(Ea(),s===r){t=_r(e,t,n);break e}St(e,t,s,n)}t=t.child}return t;case 26:return ko(e,t),e===null?(n=X2(t.type,null,t.pendingProps,null))?t.memoizedState=n:$e||(t.stateNode=tS(t.type,t.pendingProps,hi.current,t)):t.memoizedState=X2(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ug(t),e===null&&$e&&(s=t.stateNode=uS(t.type,t.pendingProps,hi.current),Lt=t,fs=!0,r=Ye,_i(t.type)?(lm=r,Ye=ps(s.firstChild)):Ye=r),St(e,t,t.pendingProps.children,n),ko(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&$e&&((r=s=Ye)&&(s=RL(s,t.type,t.pendingProps,fs),s!==null?(t.stateNode=s,Lt=t,Ye=ps(s.firstChild),fs=!1,r=!0):r=!1),r||Ci(t)),ug(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,s=i.children,rm(r,i)?s=null:a!==null&&rm(r,a)&&(t.flags|=32),t.memoizedState!==null&&(r=My(e,t,TD,null,null,n),wl._currentValue=r),ko(e,t),St(e,t,s,n),t.child;case 6:return e===null&&$e&&((e=n=Ye)&&(n=IL(n,t.pendingProps,fs),n!==null?(t.stateNode=n,Lt=t,Ye=null,e=!0):e=!1),e||Ci(t)),null;case 13:return d8(e,t,n);case 4:return Qf(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Na(t,null,s,n):St(e,t,s,n),t.child;case 11:return p2(e,t,t.type,t.pendingProps,n);case 7:return s=t.pendingProps,ko(e,t),St(e,t,s,n),t.child;case 8:return St(e,t,t.pendingProps.children,n),t.child;case 12:return St(e,t,t.pendingProps.children,n),t.child;case 10:return S2(e,t,n);case 9:return r=t.type._context,s=t.pendingProps.children,za(t),r=Kt(r),s=s(r),t.flags|=1,St(e,t,s,n),t.child;case 14:return g2(e,t,t.type,t.pendingProps,n);case 15:return c8(e,t,t.type,t.pendingProps,n);case 19:return Dg(e,t,n);case 31:return DD(e,t,n);case 22:return u8(e,t,n,t.pendingProps);case 24:return za(t),s=Kt(bt),e===null?(r=Cy(),r===null&&(r=Ke,i=$y(),r.pooledCache=i,i.refCount++,i!==null&&(r.pooledCacheLanes|=n),r=i),t.memoizedState={parent:s,cache:r},Ty(t),ci(t,bt,r)):(e.lanes&n&&(Sg(e,t),Rc(t,null,null,n),Mc()),r=e.memoizedState,i=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),ci(t,bt,s)):(s=i.cache,ci(t,bt,s),s!==r.cache&&wg(t,[bt],n,!0))),St(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),s=t.pendingProps,s.name!=null&&s.name!=="auto"?t.flags|=e===null?18882560:18874368:$e&&jx(t),e!==null&&e.memoizedProps.name!==s.name?t.flags|=4194816:ko(e,t),St(e,t,s.children,n),t.child;case 29:throw t.pendingProps}throw Error(W(156,t.tag))}function xr(e){e.flags|=4}function tp(e,t,n,s,r){var i;if((i=(e.mode&32)!==0)&&(i=n===null?Q2(t,s):Q2(t,s)&&(s.src!==n.src||s.srcSet!==n.srcSet)),i){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(H8())e.flags|=8192;else throw ba=oh,Ey}else e.flags&=-16777217}function $2(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!xS(t))if(H8())e.flags|=8192;else throw ba=oh,Ey}function Dd(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?D6():536870912,e.lanes|=t,gl|=t)}function cc(e,t){if(!$e)switch(e.tailMode){case"visible":break;case"collapsed":for(var n=e.tail,s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.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 Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,s=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,s|=r.subtreeFlags&1206910976,s|=r.flags&1206910976,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=n,t}function qD(e,t,n){var s=t.pendingProps;switch(Sy(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return Ze(t),null;case 3:return n=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),zr(bt),fl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ho(t)?xr(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Z1())),Ze(t),null;case 26:var r=t.type,i=t.memoizedState;return e===null?(xr(t),i!==null?(Ze(t),$2(t,i)):(Ze(t),tp(t,r,null,s,n))):i?i!==e.memoizedState?(xr(t),Ze(t),$2(t,i)):(Ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&xr(t),Ze(t),tp(t,r,e,s,n)),null;case 27:if(Jf(t),n=hi.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&xr(t);else{if(!s){if(t.stateNode===null)throw Error(W(166));return Ze(t),t.subtreeFlags&=-33554433,null}e=ar.current,ho(t)?Qv(t):(e=uS(r,s,n),t.stateNode=e,xr(t))}return Ze(t),t.subtreeFlags&=-33554433,null;case 5:if(Jf(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&xr(t);else{if(!s){if(t.stateNode===null)throw Error(W(166));return Ze(t),t.subtreeFlags&=-33554433,null}if(i=ar.current,ho(t))Qv(t);else{var a=du(hi.current);switch(i){case 1:i=a.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:i=a.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":i=a.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":i=a.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":i=a.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof s.is=="string"?a.createElement("select",{is:s.is}):a.createElement("select"),s.multiple?i.multiple=!0:s.size&&(i.size=s.size);break;default:i=typeof s.is=="string"?a.createElement(r,{is:s.is}):a.createElement(r)}}i[Wt]=t,i[Nn]=s;e:for(a=t.child;a!==null;){if(a.tag===5||a.tag===6)i.appendChild(a.stateNode);else if(a.tag!==4&&a.tag!==27&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=i;e:switch(Yt(i,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&xr(t)}}return Ze(t),t.subtreeFlags&=-33554433,tp(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&xr(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(W(166));if(e=hi.current,ho(t)){if(e=t.stateNode,n=t.memoizedProps,s=null,r=Lt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[Wt]=t,e=!!(e.nodeValue===n||s!==null&&s.suppressHydrationWarning===!0||J8(e.nodeValue,n)),e||Ci(t,!0)}else e=du(e).createTextNode(s),e[Wt]=t,t.stateNode=e}return Ze(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(s=ho(t),n!==null){if(e===null){if(!s)throw Error(W(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(557));e[Wt]=t}else Ea(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),e=!1}else n=Z1(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Hn(t),t):(Hn(t),null);if(t.flags&128)throw Error(W(558))}return Ze(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=ho(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(W(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(W(317));r[Wt]=t}else Ea(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),r=!1}else r=Z1(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Hn(t),t):(Hn(t),null)}return Hn(t),t.flags&128?(t.lanes=n,t):(n=s!==null,e=e!==null&&e.memoizedState!==null,n&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==r&&(s.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Dd(t,t.updateQueue),Ze(t),null);case 4:return fl(),e===null&&ek(t.stateNode.containerInfo),t.flags|=67108864,Ze(t),null;case 10:return zr(t.type),Ze(t),null;case 19:if(Ay(t),s=t.memoizedState,s===null)return Ze(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)cc(s,!1);else{if(ht!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=ch(e),i!==null){for(t.flags|=128,cc(s,!1),e=i.updateQueue,t.updateQueue=e,Dd(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)xj(n,e),n=n.sibling;return ou(t,Zt.current&1|2),$e&&yr(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Vn()>kh&&(t.flags|=128,r=!0,cc(s,!1),t.lanes=4194304)}else{if(!r)if(e=ch(i),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Dd(t,e),cc(s,!0),s.tail===null&&s.tailMode!=="collapsed"&&s.tailMode!=="visible"&&!i.alternate&&!$e)return Ze(t),null}else 2*Vn()-s.renderingStartTime>kh&&n!==536870912&&(t.flags|=128,r=!0,cc(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(e=s.last,e!==null?e.sibling=i:t.child=i,s.last=i)}if(s.tail!==null){e=s.tail;e:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Vn(),e.sibling=null,i=Zt.current,i=r?i&1|2:i&1,s.tailMode==="visible"||s.tailMode==="collapsed"||!n||$e?ou(t,i):(n=i,Je(Qt,t),Je(Zt,n),rn===null&&(rn=t)),$e&&yr(t,s.treeForkCount),e}return Ze(t),null;case 22:case 23:return Hn(t),zy(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?n&536870912&&!(t.flags&128)&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),n=t.updateQueue,n!==null&&Dd(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==n&&(t.flags|=2048),e!==null&&Xt(ka),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),zr(bt),Ze(t),null;case 25:return null;case 30:return t.flags|=33554432,Ze(t),null}throw Error(W(156,t.tag))}function HD(e,t){switch(Sy(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zr(bt),fl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Jf(t),null;case 31:if(t.memoizedState!==null){if(Hn(t),t.alternate===null)throw Error(W(340));Ea()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Hn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));Ea()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ay(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 fl(),null;case 10:return zr(t.type),null;case 22:case 23:return Hn(t),zy(),e!==null&&Xt(ka),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return zr(bt),null;case 25:return null;default:return null}}function h8(e,t){switch(Sy(t),t.tag){case 3:zr(bt),fl();break;case 26:case 27:case 5:Jf(t);break;case 4:fl();break;case 31:t.memoizedState!==null&&Hn(t);break;case 13:Hn(t);break;case 19:Ay(t);break;case 10:zr(t.type);break;case 22:case 23:Hn(t),zy(),e!==null&&Xt(ka);break;case 24:zr(bt)}}function Uu(e,t){try{var n=t.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var r=s.next;n=r;do{if((n.tag&e)===e){s=void 0;var i=n.create,a=n.inst;s=i(),a.destroy=s}n=n.next}while(n!==r)}}catch(l){Pe(t,t.return,l)}}function Ti(e,t,n){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var i=r.next;s=i;do{if((s.tag&e)===e){var a=s.inst,l=a.destroy;if(l!==void 0){a.destroy=void 0,r=t;var c=n,u=l;try{u()}catch(d){Pe(r,c,d)}}}s=s.next}while(s!==i)}}catch(d){Pe(t,t.return,d)}}function x8(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Sj(t,n)}catch(s){Pe(e,e.return,s)}}}function p8(e,t,n){n.props=Ra(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(s){Pe(e,t,s)}}function Qs(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:var r=e.stateNode,i=Mr(e.memoizedProps,r);(r.ref===null||r.ref.name!==i)&&(r.ref=rS(i)),s=r.ref;break;case 7:if(e.stateNode===null){var a=new es(e);An(e.child,!1,NL,a,void 0,void 0),e.stateNode=a}s=e.stateNode;break;default:s=e.stateNode}typeof n=="function"?e.refCleanup=n(s):n.current=s}}catch(l){Pe(e,t,l)}}function Vt(e,t){var n=e.ref,s=e.refCleanup;if(n!==null)if(typeof s=="function")try{s()}catch(r){Pe(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){Pe(e,t,r)}else n.current=null}function xh(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++)lS(e.stateNode,t[n])}function C2(e){for(var t=e.return;t!==null&&(Wy(t)&&lS(e.stateNode,t.stateNode),!Vy(t));)t=t.return}function Oc(e){for(var t=e.return;t!==null&&(Wy(t)&&ML(e.stateNode,t.stateNode),!Vy(t));)t=t.return}function Vy(e){return e.tag===5||e.tag===3||e.tag===27}function Wy(e){return e&&e.tag===7&&e.stateNode!==null}function Lg(e){var t=e.type,n=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&s.focus();break e;case"img":n.src?s.src=n.src:n.srcSet&&(s.srcset=n.srcSet)}}catch(r){Pe(e,e.return,r)}}function np(e,t,n){try{var s=e.stateNode;hL(s,e.type,n,t),s[Nn]=t}catch(r){Pe(e,e.return,r)}}function g8(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&_i(e.type)||e.tag===4}function sp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||g8(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&&_i(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Bg(e,t,n,s){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(r,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(r),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=tr)),xh(e,s),Ie=!0;else if(r!==4&&(r===27&&(xh(e,s),s=null,_i(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Bg(e,t,n,s),e=e.sibling;e!==null;)Bg(e,t,n,s),e=e.sibling}function ph(e,t,n,s){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?n.insertBefore(r,t):n.appendChild(r),xh(e,s),Ie=!0;else if(r!==4&&(r===27&&(xh(e,s),s=null,_i(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(ph(e,t,n,s),e=e.sibling;e!==null;)ph(e,t,n,s),e=e.sibling}function m8(e){var t=e.stateNode,n=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Yt(t,s,n),t[Wt]=e,t[Nn]=n}catch(i){Pe(e,e.return,i)}}var gh=!1,Pn=null;function E2(e){(e.tag===30||e.subtreeFlags&33554432)&&(gh=!0)}var Js=null;function T2(){var e=Js;return Js=null,e}var En=0;function Pl(e,t,n,s,r){return En=0,y8(e.child,t,n,s,r)}function y8(e,t,n,s,r){for(var i=!1;e!==null;){if(e.tag===5){var a=e.stateNode;if(s!==null){var l=im(a);s.push(l),l.view&&(i=!0)}else i||im(a).view&&(i=!0);gh=!0,nS(a,En===0?t:t+"_"+En,n),En++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&r||y8(e.child,t,n,s,r)&&(i=!0));e=e.sibling}return i}function lr(e,t){for(;e!==null;)e.tag===5?sS(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||lr(e.child,t)),e=e.sibling}function mf(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(mf(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(W(544));var n=t.name;t=qr(t.default,t.share),t!=="none"&&(Pl(e,n,t,null,!1)||lr(e.child,!1))}e=e.sibling}}function qg(e,t){if(e.tag===30){var n=e.stateNode,s=e.memoizedProps,r=Mr(s,n),i=qr(s.default,n.paired?s.share:s.enter);i!=="none"?Pl(e,r,i,null,!1)?(mf(e),n.paired||t||ml(e,s.onEnter)):lr(e.child,!1):mf(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)qg(e,t),e=e.sibling;else mf(e)}function Hg(e){if(Pn!==null&&Pn.size!==0){var t=Pn;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,s=n.name;if(s!=null&&s!=="auto"){var r=t.get(s);if(r!==void 0){var i=qr(n.default,n.share);if(i!=="none"&&(Pl(e,s,i,null,!1)?(i=e.stateNode,r.paired=i,i.paired=r,ml(e,n.onShare)):lr(e.child,!1)),t.delete(s),t.size===0)break}}}Hg(e)}e=e.sibling}}}function Pg(e){if(e.tag===30){var t=e.memoizedProps,n=Mr(t,e.stateNode),s=Pn!==null?Pn.get(n):void 0,r=qr(t.default,s!==void 0?t.share:t.exit);r!=="none"&&(Pl(e,n,r,null,!1)?s!==void 0?(r=e.stateNode,s.paired=r,r.paired=s,Pn.delete(n),ml(e,t.onShare)):ml(e,t.onExit):lr(e.child,!1)),Pn!==null&&Hg(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Pg(e),e=e.sibling;else Pn!==null&&Hg(e)}function k8(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=Mr(t,e.stateNode);t=qr(t.default,t.update),e.flags&=-5,t!=="none"&&Pl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&k8(e);e=e.sibling}}function Ug(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,lr(e.child,!1))}Ug(e)}e=e.sibling}}function yf(e){if(e.tag===30)e.stateNode.paired=null,lr(e.child,!1),Ug(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)yf(e),e=e.sibling;else Ug(e)}function b8(e){for(e=e.child;e!==null;)e.tag===30?lr(e.child,!1):e.subtreeFlags&33554432&&b8(e),e=e.sibling}function Ky(e,t,n,s,r,i,a){for(var l=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(i!==null&&En<i.length){var u=i[En],d=im(c);(u.view||d.view)&&(l=!0);var f;if(f=(e.flags&4)===0)if(d.clip)f=!0;else{f=u.rect;var h=d.rect;f=f.y!==h.y||f.x!==h.x||f.height!==h.height||f.width!==h.width}f&&(e.flags|=4),d.abs?d=!u.abs:(u=u.rect,d=d.rect,d=u.height!==d.height||u.width!==d.width),d&&(e.flags|=32)}else e.flags|=32;e.flags&4&&nS(c,En===0?n:n+"_"+En,r),l&&e.flags&4||(Js===null&&(Js=[]),Js.push(c,En===0?s:s+"_"+En,t.memoizedProps)),En++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&a?e.flags|=t.flags&32:Ky(e,t.child,n,s,r,i,a)&&(l=!0));t=t.sibling}return l}function v8(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,s=e.stateNode,r=Mr(n,s),i=qr(n.default,n.update),a;a=e.memoizedState,e.memoizedState=null,s=e;var l=e.child;En=0,r=Ky(s,l,r,r,i,a,!1),e.flags&4&&r&&ml(e,n.onUpdate)}else e.subtreeFlags&33554432&&v8(e);e=e.sibling}}var It=!1,Le=!1,Gs=!1,rp=!1,z2=typeof WeakSet=="function"?WeakSet:Set,_t=null,Vs=!1,wc=!1,mh=!1,Fg=!1;function PD(e,t,n){if(e=e.containerInfo,nm=jl,e=aj(e),by(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var r=s.getSelection&&s.getSelection();if(r&&r.rangeCount!==0){s=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{s.nodeType,a.nodeType}catch{s=null;break e}var l=0,c=-1,u=-1,d=0,f=0,h=e,p=null;t:for(;;){for(var m;h!==s||i!==0&&h.nodeType!==3||(c=l+i),h!==a||r!==0&&h.nodeType!==3||(u=l+r),h.nodeType===3&&(l+=h.nodeValue.length),(m=h.firstChild)!==null;)p=h,h=m;for(;;){if(h===e)break t;if(p===s&&++d===i&&(c=l),p===a&&++f===r&&(u=l),(m=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=m}s=c===-1||u===-1?null:{start:c,end:u}}else s=null}s=s||{start:0,end:0}}else s=null;for(sm={focusedElem:e,selectionRange:s},jl=!1,n=(n&335544064)===n,_t=t,t=n?9270:1024;_t!==null;){if(e=_t,n&&(s=e.deletions,s!==null))for(i=0;i<s.length;i++)n&&Pg(s[i]);if(e.alternate===null&&e.flags&2)n&&E2(e),Ld(n);else{if(e.tag===22){if(s=e.alternate,e.memoizedState!==null){s!==null&&s.memoizedState===null&&n&&Pg(s),Ld(n);continue}else if(s!==null&&s.memoizedState!==null){n&&E2(e),Ld(n);continue}}s=e.child,e.subtreeFlags&t&&s!==null?(s.return=e,_t=s):(n&&k8(e),Ld(n))}}Pn=null}function Ld(e){for(;_t!==null;){var t=_t,n=e,s=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(r&1024&&s!==null){n=void 0,r=s.memoizedProps,s=s.memoizedState;var i=t.stateNode;try{var a=Ra(t.type,r);n=i.getSnapshotBeforeUpdate(a,s),i.__reactInternalSnapshotBeforeUpdate=n}catch(l){Pe(t,t.return,l)}}break;case 3:if(r&1024){if(s=t.stateNode.containerInfo,n=s.nodeType,n===9)am(s);else if(n===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":am(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&s!==null&&(n=Mr(s.memoizedProps,s.stateNode),r=t.memoizedProps,r=qr(r.default,r.update),r!=="none"&&Pl(s,n,r,s.memoizedState=[],!0));break;default:if(r&1024)throw Error(W(163))}if(s=t.sibling,s!==null){s.return=t.return,_t=s;break}_t=t.return}}function w8(e,t,n){var s=n.flags;switch(n.tag){case 0:case 11:case 15:Ws(e,n),s&4&&Uu(5,n);break;case 1:if(Ws(e,n),s&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(a){Pe(n,n.return,a)}else{var r=Ra(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(a){Pe(n,n.return,a)}}s&64&&x8(n),s&512&&Qs(n,n.return);break;case 3:if(Ws(e,n),s&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{Sj(e,t)}catch(a){Pe(n,n.return,a)}}break;case 27:t===null&&s&4&&m8(n);case 26:case 5:Ws(e,n),t===null&&s&4&&Lg(n),s&512&&Qs(n,n.return);break;case 12:Ws(e,n);break;case 31:Ws(e,n),s&4&&C8(e,n);break;case 13:Ws(e,n),s&4&&E8(e,n),s&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=eL.bind(null,n),_L(e,n))));break;case 22:if(s=n.memoizedState!==null||It,!s){var i=t!==null&&t.memoizedState!==null||Le;t=It,r=Le,It=s,(Le=i)&&!r?(s=2,n.subtreeFlags&8772&&(s|=1),Ts(e,n,s)):Ws(e,n),It=t,Le=r}break;case 30:Ws(e,n),s&512&&Qs(n,n.return);break;case 7:s&512&&Qs(n,n.return);default:Ws(e,n)}}function Gg(e,t){for(e=e.child;e!==null;)j8(e,t),e=e.sibling}function j8(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var s=n.style;typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"}else{var r=e.stateNode,i=e.memoizedProps.style,a=i!=null&&i.hasOwnProperty("display")?i.display:null;r.style.display=a==null||typeof a=="boolean"?"":(""+a).trim()}}catch(c){Pe(e,e.return,c)}Vg(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Ie=!0}catch(c){Pe(e,e.return,c)}break;case 18:try{var l=e.stateNode;t?U2(l,!0):U2(e.stateNode,!1)}catch(c){Pe(e,e.return,c)}break;case 22:case 23:e.memoizedState===null&&Gg(e,t);break;default:Gg(e,t)}}function Vg(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,s=t;switch(n.tag){case 4:j8(n,s);break e;case 22:n.memoizedState===null&&Vg(n,s);break e;default:Vg(n,s)}}e=e.sibling}}function S8(e){var t=e.alternate;t!==null&&(e.alternate=null,S8(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&mx(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 nt=null,Sn=!1;function Es(e,t,n){for(n=n.child;n!==null;)$8(e,t,n),n=n.sibling}function $8(e,t,n){if(Wn&&typeof Wn.onCommitFiberUnmount=="function")try{Wn.onCommitFiberUnmount(Ou,n)}catch{}switch(n.tag){case 26:Le||Vt(n,t),Es(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!Le&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Le||Vt(n,t),Oc(n);var s=nt,r=Sn;_i(n.type)&&(nt=n.stateNode,Sn=!1),Es(e,t,n),dS(n.stateNode,n.type,n.memoizedProps),nt=s,Sn=r;break;case 5:Le||Vt(n,t),Oc(n);case 6:if(n.tag===6&&Oc(n),s=nt,r=Sn,nt=null,Es(e,t,n),nt=s,Sn=r,nt!==null)if(Sn)try{(nt.nodeType===9?nt.body:nt.nodeName==="HTML"?nt.ownerDocument.body:nt).removeChild(n.stateNode),Ie=!0}catch(i){Pe(n,t,i)}else try{nt.removeChild(n.stateNode),Ie=!0}catch(i){Pe(n,t,i)}break;case 18:nt!==null&&(Sn?(e=nt,P2(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Sl(e)):P2(nt,n.stateNode));break;case 4:s=nt,r=Sn,nt=n.stateNode.containerInfo,Sn=!0,Es(e,t,n),nt=s,Sn=r;break;case 0:case 11:case 14:case 15:Ti(2,n,t),Le||Ti(4,n,t),Es(e,t,n);break;case 1:Le||(Vt(n,t),s=n.stateNode,typeof s.componentWillUnmount=="function"&&p8(n,t,s)),Es(e,t,n);break;case 21:Es(e,t,n);break;case 22:Le=(s=Le)||n.memoizedState!==null,Es(e,t,n),Le=s;break;case 30:Vt(n,t),Es(e,t,n);break;case 7:Le||Vt(n,t),Es(e,t,n);break;default:Es(e,t,n)}}function C8(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Sl(e)}catch(n){Pe(t,t.return,n)}}}function E8(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Sl(e)}catch(n){Pe(t,t.return,n)}}function UD(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new z2),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new z2),t;default:throw Error(W(435,e.tag))}}function Bd(e,t){var n=UD(e);t.forEach(function(s){if(!n.has(s)){n.add(s);var r=tL.bind(null,e,s);s.then(r,r)}})}function xn(e,t,n){var s=t.deletions;if(s!==null)for(var r=0;r<s.length;r++){var i=s[r],a=e,l=t,c=l;e:for(;c!==null;){switch(c.tag){case 27:if(_i(c.type)){nt=c.stateNode,Sn=!1;break e}break;case 5:nt=c.stateNode,Sn=!1;break e;case 3:case 4:nt=c.stateNode.containerInfo,Sn=!0;break e}c=c.return}if(nt===null)throw Error(W(160));$8(a,l,i),nt=null,Sn=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)T8(t,e,n),t=t.sibling}var Is=null;function T8(e,t,n){var s=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(r&4&&(s=e.updateQueue,s=s!==null?s.events:null,s!==null))for(var i=0;i<s.length;i++){var a=s[i];a.ref.impl=a.nextImpl}xn(t,e,n),pn(e),r&4&&(Ti(3,e,e.return),Uu(3,e),Ti(5,e,e.return));break;case 1:xn(t,e,n),pn(e),r&512&&(Le||s===null||Vt(s,s.return)),r&64&&It&&(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(i=Is,xn(t,e,n),pn(e),r&512&&(Le||s===null||Vt(s,s.return)),r&4)if(r=s!==null?s.memoizedState:null,n=e.memoizedState,s===null)if(n===null)if(e.stateNode===null)if(It)e.stateNode=tS(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,n=e.memoizedProps,r=i.ownerDocument||i;t:switch(t){case"title":s=r.getElementsByTagName("title")[0],(!s||s[Bu]||s[Wt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=r.createElement(t),r.head.insertBefore(s,r.querySelector("head > title"))),Yt(s,t,n),s[Wt]=e,Ot(s),t=s;break e;case"link":if(i=Y2("link","href",r).get(t+(n.href||""))){for(a=0;a<i.length;a++)if(s=i[a],s.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){i.splice(a,1);break t}}s=r.createElement(t),Yt(s,t,n),r.head.appendChild(s);break;case"meta":if(i=Y2("meta","content",r).get(t+(n.content||""))){for(a=0;a<i.length;a++)if(s=i[a],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){i.splice(a,1);break t}}s=r.createElement(t),Yt(s,t,n),r.head.appendChild(s);break;default:throw Error(W(468,t))}s[Wt]=e,Ot(s),t=s}e.stateNode=t}else It||cm(i,e.type,e.stateNode);else e.stateNode=Z2(i,n,e.memoizedProps);else r!==n?(r===null?(t=s.stateNode,t===null||Le||t.parentNode.removeChild(t)):r.count--,n===null?It||cm(i,e.type,e.stateNode):Z2(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&np(e,e.memoizedProps,s.memoizedProps);break;case 27:xn(t,e,n),pn(e),r&512&&(Le||s===null||Vt(s,s.return)),s!==null&&r&4&&np(e,e.memoizedProps,s.memoizedProps);break;case 5:if(i=Gs,Gs=!1,xn(t,e,n),Gs=i,pn(e),r&512&&(Le||s===null||Vt(s,s.return)),e.flags&32){t=e.stateNode;try{xl(t,""),Ie=!0}catch(d){Pe(e,e.return,d)}}r&4&&e.stateNode!=null&&(t=e.memoizedProps,np(e,t,s!==null?s.memoizedProps:t)),r&1024&&(rp=!0);break;case 6:if(xn(t,e,n),pn(e),r&4){if(e.stateNode===null)throw Error(W(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Ie=!0}catch(d){Pe(e,e.return,d)}}break;case 3:if(Ie=!1,wf=null,i=Is,Is=fu(t.containerInfo),xn(t,e,n),Is=i,pn(e),r&4&&s!==null&&s.memoizedState.isDehydrated)try{Sl(t.containerInfo)}catch(d){Pe(e,e.return,d)}rp&&(rp=!1,z8(e)),Ie=!1;break;case 4:r=Gs,Gs=It,s=Iv(),i=Is,Is=fu(e.stateNode.containerInfo),xn(t,e,n),pn(e),Is=i,Ie&&wc&&(mh=!0),Ie=s,Gs=r;break;case 12:xn(t,e,n),pn(e);break;case 31:xn(t,e,n),pn(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Bd(e,t)));break;case 13:xn(t,e,n),pn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Ax=Vn()),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Bd(e,t)));break;case 22:i=e.memoizedState!==null,a=s!==null&&s.memoizedState!==null;var l=It,c=Le,u=Gs;It=l||i,Gs=u||i,Le=c||a,xn(t,e,n),Le=c,Gs=u,It=l,pn(e),r&8192&&(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,!i||s===null||a||It||Le||(t=a||Le,n=It,s=Le,It=i||It,Le=t,Jr(e,2),It=n,Le=s),!i&&Gs||Gg(e,i)),r&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Bd(e,n))));break;case 19:xn(t,e,n),pn(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Bd(e,t)));break;case 30:r&512&&(Le||s===null||Vt(s,s.return)),r=Iv(),i=wc,a=(n&335544064)===n,l=e.memoizedProps,wc=a&&qr(l.default,l.update)!=="none",xn(t,e,n),pn(e),a&&s!==null&&Ie&&(e.flags|=4),wc=i,Ie=r;break;case 21:break;case 7:r&512&&(Le||s===null||Vt(s,s.return)),s&&s.stateNode!==null&&(s.stateNode._fragmentFiber=e);default:xn(t,e,n),pn(e)}}function pn(e){var t=e.flags;if(t&2){try{for(var n,s=e.return;s!==null;){if(g8(s)){n=s;break}s=s.return}s=null;for(var r=e.return;r!==null;){if(Wy(r)){var i=r.stateNode;s===null?s=[i]:s.push(i)}if(Vy(r))break;r=r.return}var a=s;if(n==null)throw Error(W(160));switch(n.tag){case 27:var l=n.stateNode,c=sp(e);ph(e,c,l,a);break;case 5:var u=n.stateNode;n.flags&32&&(xl(u,""),n.flags&=-33);var d=sp(e);ph(e,d,u,a);break;case 3:case 4:var f=n.stateNode.containerInfo,h=sp(e);Bg(e,h,f,a);break;default:throw Error(W(161))}}catch(p){Pe(e,e.return,p)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function z8(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;z8(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,jl=!0,t.reset(),jl=!1),e=e.sibling}}function xo(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)A8(t,e),t=t.sibling;else v8(t)}function A8(e,t){var n=e.alternate;if(n===null)qg(e,!1);else switch(e.tag){case 3:if(Fg=Vs=!1,T2(),xo(t,e),!Vs&&!mh){if(e=Js,e!==null)for(var s=0;s<e.length;s+=3){n=e[s];var r=e[s+1];sS(n,e[s+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+r+")"})}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"})),Fg=!0}Js=null;break;case 5:xo(t,e);break;case 4:s=Vs,Vs=!1,xo(t,e),Vs&&(mh=!0),Vs=s;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?qg(e,!1):xo(t,e));break;case 30:s=Vs,r=T2(),Vs=!1,xo(t,e),Vs&&(e.flags|=4);var i=e.memoizedProps,a=e.stateNode;t=Mr(i,a),a=Mr(n.memoizedProps,a);var l=qr(i.default,i.update);l==="none"?t=!1:(i=n.memoizedState,n.memoizedState=null,n=e.child,En=0,t=Ky(e,n,t,a,l,i,!0),En!==(i===null?0:i.length)&&(e.flags|=32)),e.flags&4&&t?(ml(e,e.memoizedProps.onUpdate),Js=r):r!==null&&(r.push.apply(r,Js),Js=r),Vs=e.flags&32?!0:s;break;default:xo(t,e)}}function Ws(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)w8(e,t.alternate,t),t=t.sibling}function Jr(e,t){for(e=e.child;e!==null;){var n=e,s=t;switch(n.tag){case 0:case 11:case 14:case 15:Ti(4,n,n.return),Jr(n,s);break;case 1:Vt(n,n.return);var r=n.stateNode;typeof r.componentWillUnmount=="function"&&p8(n,n.return,r),Jr(n,s);break;case 27:s&2&&dS(n.stateNode,n.type,n.memoizedProps);case 5:Vt(n,n.return),n.tag!==5&&n.tag!==27||Oc(n),Jr(n,s);break;case 6:Oc(n);break;case 26:Vt(n,n.return),r=n.stateNode,n.memoizedState!==null||r===null||Le||r.parentNode.removeChild(r),Jr(n,s);break;case 22:n.memoizedState===null&&Jr(n,s);break;case 30:Vt(n,n.return),Jr(n,s);break;case 7:Vt(n,n.return);default:Jr(n,s)}e=e.sibling}}function Ts(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var s=t.alternate,r=e,i=t,a=i.flags,l=(n&1)!==0;switch(i.tag){case 0:case 11:case 15:Ts(r,i,n),Uu(4,i);break;case 1:if(Ts(r,i,n),s=i,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(d){Pe(s,s.return,d)}if(s=i,r=s.updateQueue,r!==null){var c=s.stateNode;try{var u=r.shared.hiddenCallbacks;if(u!==null)for(r.shared.hiddenCallbacks=null,r=0;r<u.length;r++)jj(u[r],c)}catch(d){Pe(s,s.return,d)}}l&&a&64&&x8(i),Qs(i,i.return);break;case 27:n&2&&m8(i);case 5:i.tag!==5&&i.tag!==27||C2(i),Ts(r,i,n),l&&s===null&&a&4&&Lg(i),Qs(i,i.return);break;case 6:C2(i);break;case 26:c=i.stateNode,i.memoizedState!==null||c===null||It||cm(fu(c.ownerDocument),i.type,c),Ts(r,i,n),l&&s===null&&a&4&&Lg(i),Qs(i,i.return);break;case 12:Ts(r,i,n);break;case 31:Ts(r,i,n),l&&a&4&&C8(r,i);break;case 13:Ts(r,i,n),l&&a&4&&E8(r,i);break;case 22:i.memoizedState===null&&Ts(r,i,n),Qs(i,i.return);break;case 30:Ts(r,i,n),Qs(i,i.return);break;case 7:Qs(i,i.return);default:Ts(r,i,n)}t=t.sibling}}function Xy(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&&Hu(n))}function Zy(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Hu(e))}function ts(e,t,n,s){var r=(n&335544064)===n;if(t.subtreeFlags&(r?10262:10256))for(t=t.child;t!==null;)N8(e,t,n,s),t=t.sibling;else r&&b8(t)}function N8(e,t,n,s){var r=(n&335544064)===n;r&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&yf(t);var i=t.flags;switch(t.tag){case 0:case 11:case 15:ts(e,t,n,s),i&2048&&Uu(9,t);break;case 1:ts(e,t,n,s);break;case 3:ts(e,t,n,s),r&&Fg&&(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="")),i&2048&&(i=null,t.alternate!==null&&(i=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==i&&(t.refCount++,i!=null&&Hu(i)));break;case 12:if(i&2048){ts(e,t,n,s),i=t.stateNode;try{var a=t.memoizedProps,l=a.id,c=a.onPostCommit;typeof c=="function"&&c(l,t.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(u){Pe(t,t.return,u)}}else ts(e,t,n,s);break;case 31:ts(e,t,n,s);break;case 13:ts(e,t,n,s);break;case 23:break;case 22:a=t.stateNode,l=t.alternate,t.memoizedState!==null?(r&&l!==null&&l.memoizedState===null&&yf(l),a._visibility&2?ts(e,t,n,s):Dc(e,t)):(r&&l!==null&&l.memoizedState!==null&&yf(t),a._visibility&2?ts(e,t,n,s):(a._visibility|=2,bo(e,t,n,s,(t.subtreeFlags&10256)!==0||!1))),i&2048&&Xy(l,t);break;case 24:ts(e,t,n,s),i&2048&&Zy(t.alternate,t);break;case 30:r&&(i=t.alternate,i!==null&&(lr(i.child,!0),lr(t.child,!0))),ts(e,t,n,s);break;default:ts(e,t,n,s)}}function bo(e,t,n,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,a=t,l=n,c=s,u=a.flags;switch(a.tag){case 0:case 11:case 15:bo(i,a,l,c,r),Uu(8,a);break;case 23:break;case 22:var d=a.stateNode;a.memoizedState!==null?d._visibility&2?bo(i,a,l,c,r):Dc(i,a):(d._visibility|=2,bo(i,a,l,c,r)),r&&u&2048&&Xy(a.alternate,a);break;case 24:bo(i,a,l,c,r),r&&u&2048&&Zy(a.alternate,a);break;default:bo(i,a,l,c,r)}t=t.sibling}}function Dc(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,s=t,r=s.flags;switch(s.tag){case 22:Dc(n,s),r&2048&&Xy(s.alternate,s);break;case 24:Dc(n,s),r&2048&&Zy(s.alternate,s);break;default:Dc(n,s)}t=t.sibling}}var Yi=8192;function Gi(e,t,n){if(e.subtreeFlags&Yi)for(e=e.child;e!==null;)M8(e,t,n),e=e.sibling}function M8(e,t,n){switch(e.tag){case 26:Gi(e,t,n),e.flags&Yi&&(e.memoizedState!==null?XL(n,Is,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&J2(n,e)));break;case 5:Gi(e,t,n),e.flags&Yi&&(e=e.stateNode,(t&335544128)===t&&J2(n,e));break;case 3:case 4:var s=Is;Is=fu(e.stateNode.containerInfo),Gi(e,t,n),Is=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Yi,Yi=16777216,Gi(e,t,n),Yi=s):Gi(e,t,n));break;case 30:if(e.flags&Yi&&(s=e.memoizedProps.name,s!=null&&s!=="auto")){var r=e.stateNode;r.paired=null,Pn===null&&(Pn=new Map),Pn.set(s,r)}Gi(e,t,n);break;default:Gi(e,t,n)}}function R8(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 uc(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var s=t[n];_t=s,_8(s,e)}R8(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)I8(e),e=e.sibling}function I8(e){switch(e.tag){case 0:case 11:case 15:uc(e),e.flags&2048&&Ti(9,e,e.return);break;case 3:uc(e);break;case 12:uc(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,kf(e)):uc(e);break;default:uc(e)}}function kf(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var s=t[n];_t=s,_8(s,e)}R8(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ti(8,t,t.return),kf(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,kf(t));break;default:kf(t)}e=e.sibling}}function _8(e,t){for(;_t!==null;){var n=_t;switch(n.tag){case 0:case 11:case 15:Ti(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var s=n.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Hu(n.memoizedState.cache)}if(s=n.child,s!==null)s.return=n,_t=s;else e:for(n=e;_t!==null;){s=_t;var r=s.sibling,i=s.return;if(S8(s),s===n){_t=null;break e}if(r!==null){r.return=i,_t=r;break e}_t=i}}}var FD={getCacheForType:function(e){var t=Kt(bt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Kt(bt).controller.signal}},GD=typeof WeakMap=="function"?WeakMap:Map,_e=0,Ke=null,Te=null,Ae=0,Be=0,Ln=null,ui=!1,Ul=!1,Yy=!1,Or=0,ht=0,zi=0,va=0,yh=0,Un=0,gl=0,Lc=null,$n=null,Wg=!1,Ax=0,O8=0,kh=1/0,bh=null,ki=null,ct=0,Ls=null,Ia=null,or=0,Kg=0,Xg=null,D8=null,Go=null,Vo=null,Wo=null,Bc=0,bf=null;function Xn(){return _e&2&&Ae!==0?Ae&-Ae:me.T!==null?Jy():H6()}function L8(){if(Un===0)if(!(Ae&536870912)||$e){var e=Td;Td<<=1,!(Td&3932160)&&(Td=262144),Un=e}else Un=536870912;return e=Qt.current,e!==null&&(e.flags|=32),Un}function ml(e,t){if(t!=null){var n=e.stateNode,s=n.ref;s===null&&(s=n.ref=rS(Mr(e.memoizedProps,n))),Vo===null&&(Vo=[]),Vo.push(t.bind(null,s))}}function zn(e,t,n){(e===Ke&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(yl(e,0),di(e,Ae,Un,!1)),Lu(e,n),(!(_e&2)||e!==Ke)&&(e===Ke&&(!(_e&2)&&(va|=n),ht===4&&di(e,Ae,Un,!1)),dr(e))}function B8(e,t,n){if(_e&6)throw Error(W(327));var s=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Du(e,t),r=s?KD(e,t):ip(e,t,!0),i=s;do{if(r===0){Ul&&!s&&di(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!VD(n)){r=ip(e,t,!1),i=!1;continue}if(r===2){if(i=t,e.errorRecoveryDisabledLanes&i)var a=0;else a=e.pendingLanes&-536870913,a=a!==0?a:a&536870912?536870912:0;if(a!==0){t=a;e:{var l=e;r=Lc;var c=l.current.memoizedState.isDehydrated;if(c&&(yl(l,a).flags|=256),a=ip(l,a,!1),a!==2&&a!==6){if(Yy&&!c){l.errorRecoveryDisabledLanes|=i,va|=i,r=4;break e}i=$n,$n=r,i!==null&&($n===null?$n=i:$n.push.apply($n,i))}r=a}if(i=!1,r!==2)continue}}if(r===1){yl(e,0),di(e,t,0,!0);break}e:{switch(s=e,i=r,i){case 0:case 1:throw Error(W(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:di(s,t,Un,!ui);break e;case 2:$n=null;break;case 3:case 5:break;default:throw Error(W(329))}if((t&62914560)===t&&(r=Ax+300-Vn(),10<r)){if(di(s,t,Un,!ui),gx(s,0,!0)!==0)break e;or=t,s.timeoutHandle=tk(A2.bind(null,s,n,$n,bh,Wg,t,Un,va,gl,ui,i,"Throttled",-0,0),r);break e}A2(s,n,$n,bh,Wg,t,Un,va,gl,ui,i,null,-0,0)}}break}while(!0);dr(e)}function A2(e,t,n,s,r,i,a,l,c,u,d,f,h,p){e.timeoutHandle=-1;var m=t.subtreeFlags,b=(i&335544064)===i;if(f=null,(b||m&8192||(m&16785408)===16785408)&&(f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:tr},Pn=null,M8(t,i,f),b&&(m=f,b=e.containerInfo,b=(b.nodeType===9?b:b.ownerDocument).__reactViewTransition,b!=null&&(m.count++,m.waitingForViewTransition=!0,m=hu.bind(m),b.finished.then(m,m))),m=(i&62914560)===i?Ax-Vn():(i&4194048)===i?O8-Vn():0,m=ZL(f,m),m!==null)){or=i,e.cancelPendingCommit=m(M2.bind(null,e,t,i,n,s,r,a,l,c,u,d,f,null,h,p)),di(e,i,a,!u);return}M2(e,t,i,n,s,r,a,l,c,u,d,f)}function VD(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 s=0;s<n.length;s++){var r=n[s],i=r.getSnapshot;r=r.value;try{if(!Zn(i(),r))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 di(e,t,n,s){t=O6(e,t),t&=~yh,t&=~va,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var i=31-Kn(r),a=1<<i;s[i]=-1,r&=~a}n!==0&&L6(e,n,t)}function Nx(){return _e&6?!0:(Fu(0),!1)}function Qy(){if(Te!==null){if(Be===0)var e=Te.return;else e=Te,Sr=Ya=null,_y(e),Po=null,au=0,e=Te;for(;e!==null;)h8(e.alternate,e),e=e.return;Te=null}}function yl(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,gL(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),or=0,Qy(),Ke=e,Te=n=Tr(e.current,null),Ae=t,Be=0,Ln=null,ui=!1,Ul=Du(e,t),Yy=!1,gl=Un=yh=va=zi=ht=0,$n=Lc=null,Wg=!1,Or=O6(e,t),vx(),n}function q8(e,t){je=null,me.H=fh,t===Hl||t===Sx?(t=s2(),Be=3):t===Ey?(t=s2(),Be=4):Be=t===Uy?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ln=t,Te===null&&(ht=1,hh(e,ds(t,e.current)))}function H8(){var e=Qt.current;return e===null?!0:(Ae&4194048)===Ae?rn===null:(Ae&62914560)===Ae||Ae&536870912?e===rn:!1}function P8(){var e=me.H;return me.H=fh,e===null?fh:e}function U8(){var e=me.A;return me.A=FD,e}function vh(){ht=4,ui||(Ae&4194048)!==Ae&&Qt.current!==null||(Ul=!0),!(zi&134217727)&&!(va&134217727)||Ke===null||di(Ke,Ae,Un,!1)}function ip(e,t,n){var s=_e;_e|=2;var r=P8(),i=U8();(Ke!==e||Ae!==t)&&(bh=null,yl(e,t)),t=!1;var a=ht;e:do try{if(Be!==0&&Te!==null){var l=Te,c=Ln;switch(Be){case 8:Qy(),a=6;break e;case 3:case 2:case 9:case 6:Qt.current===null&&(t=!0);var u=Be;if(Be=0,Ln=null,Io(e,l,c,u),n&&Ul){a=0;break e}break;default:u=Be,Be=0,Ln=null,Io(e,l,c,u)}}WD(),a=ht;break}catch(d){q8(e,d)}while(!0);return t&&e.shellSuspendCounter++,Sr=Ya=null,_e=s,me.H=r,me.A=i,Te===null&&(Ke=null,Ae=0,vx()),a}function WD(){for(;Te!==null;)F8(Te)}function KD(e,t){var n=_e;_e|=2;var s=P8(),r=U8();Ke!==e||Ae!==t?(bh=null,kh=Vn()+500,yl(e,t)):Ul=Du(e,t);e:do try{if(Be!==0&&Te!==null){t=Te;var i=Ln;t:switch(Be){case 1:Be=0,Ln=null,Io(e,t,i,1);break;case 2:case 9:if(n2(i)){Be=0,Ln=null,N2(t);break}t=function(){Be!==2&&Be!==9||Ke!==e||(Be=7),dr(e)},i.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:n2(i)?(Be=0,Ln=null,N2(t)):(Be=0,Ln=null,Io(e,t,i,7));break;case 5:var a=null;switch(Te.tag){case 26:a=Te.memoizedState;case 5:case 27:var l=Te;if(a?xS(a):l.stateNode.complete){Be=0,Ln=null;var c=l.sibling;if(c!==null)Te=c;else{var u=l.return;u!==null?(Te=u,Mx(u)):Te=null}break t}}Be=0,Ln=null,Io(e,t,i,5);break;case 6:Be=0,Ln=null,Io(e,t,i,6);break;case 8:Qy(),ht=6;break e;default:throw Error(W(462))}}XD();break}catch(d){q8(e,d)}while(!0);return Sr=Ya=null,me.H=s,me.A=r,_e=n,Te!==null?0:(Ke=null,Ae=0,vx(),ht)}function XD(){for(;Te!==null&&!fO();)F8(Te)}function F8(e){var t=f8(e.alternate,e,Or);e.memoizedProps=e.pendingProps,t===null?Mx(e):Te=t}function N2(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=k2(n,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=k2(n,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:_y(t);var s=t;s===Lt&&($e?(ih(s),s.tag===5&&s.stateNode!=null&&(Ye=s.stateNode)):(ih(s),$e=!0));default:h8(n,t),t=Te=xj(t,Or),t=f8(n,t,Or)}e.memoizedProps=e.pendingProps,t===null?Mx(e):Te=t}function Io(e,t,n,s){Sr=Ya=null,_y(t),Po=null,au=0;var r=t.return;try{if(OD(e,r,t,n,Ae)){ht=1,hh(e,ds(n,e.current)),Te=null;return}}catch(i){if(r!==null)throw Te=r,i;ht=1,hh(e,ds(n,e.current)),Te=null;return}t.flags&32768?($e||s===1?e=!0:Ul||Ae&536870912?e=!1:(ui=e=!0,(s===2||s===9||s===3||s===6)&&(s=Qt.current,s!==null&&s.tag===13&&(s.flags|=16384))),G8(t,e)):Mx(t)}function Mx(e){var t=e;do{if(t.flags&32768){G8(t,ui);return}e=t.return;var n=qD(t.alternate,t,Or);if(n!==null){Te=n;return}if(t=t.sibling,t!==null){Te=t;return}Te=t=e}while(t!==null);ht===0&&(ht=5)}function G8(e,t){do{var n=HD(e.alternate,e);if(n!==null){n.flags&=32767,Te=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Te=e;return}Te=e=n}while(e!==null);ht=6,Te=null}function M2(e,t,n,s,r,i,a,l,c,u,d,f){e.cancelPendingCommit=null;do Rx();while(ct!==0);if(_e&6)throw Error(W(327));if(t!==null){if(t===e.current)throw Error(W(177));e===Ke&&(Te=Ke=null,Ae=0),Ia=t,Ls=e,or=n,Xg=r,D8=s,ZD(e,t,n,a,l,c,f)}}function ZD(e,t,n,s,r,i,a){var l=t.lanes|t.childLanes;if(Kg=l,l|=vy,wO(e,n,l,s,r,i),Vo=null,(n&335544064)===n?(Wo=SD(e),s=10262):(Wo=null,s=10256),t.subtreeFlags&s||t.flags&s?(e.callbackNode=null,e.callbackPriority=0,nL(eh,function(){return Jg(),null})):(e.callbackNode=null,e.callbackPriority=0),gh=!1,s=(t.flags&13878)!==0,t.subtreeFlags&13878||s){s=me.T,me.T=null,r=Oe.p,Oe.p=2,i=_e,_e|=4;try{PD(e,t,n)}finally{_e=i,Oe.p=r,me.T=s}}ct=1,gh?Go=wL(a,e.containerInfo,Wo,Zg,Yg,QD,Qg,Jg,YD):(Zg(),Yg(),Qg())}function YD(e){if(ct!==0){var t=Ls.onRecoverableError;t(e,{componentStack:null})}}function QD(){ct===3&&(ct=0,A8(Ia,Ls),ct=4)}function Zg(){if(ct===1){ct=0;var e=Ls,t=Ia,n=or,s=(t.flags&13878)!==0;if(t.subtreeFlags&13878||s){s=me.T,me.T=null;var r=Oe.p;Oe.p=2;var i=_e;_e|=4;try{wc=mh=!1,T8(t,e,n),n=sm;var a=aj(e.containerInfo),l=n.focusedElem,c=n.selectionRange;if(a!==l&&l&&l.ownerDocument&&ij(l.ownerDocument.documentElement,l)){if(c!==null&&by(l)){var u=c.start,d=c.end;if(d===void 0&&(d=u),"selectionStart"in l)l.selectionStart=u,l.selectionEnd=Math.min(d,l.value.length);else{var f=l.ownerDocument||document,h=f&&f.defaultView||window;if(h.getSelection){var p=h.getSelection(),m=l.textContent.length,b=Math.min(c.start,m),y=c.end===void 0?b:Math.min(c.end,m);!p.extend&&b>y&&(a=y,y=b,b=a);var g=Kv(l,b),k=Kv(l,y);if(g&&k&&(p.rangeCount!==1||p.anchorNode!==g.node||p.anchorOffset!==g.offset||p.focusNode!==k.node||p.focusOffset!==k.offset)){var v=f.createRange();v.setStart(g.node,g.offset),p.removeAllRanges(),b>y?(p.addRange(v),p.extend(k.node,k.offset)):(v.setEnd(k.node,k.offset),p.addRange(v))}}}}for(f=[],p=l;p=p.parentNode;)p.nodeType===1&&f.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<f.length;l++){var w=f[l];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}jl=!!nm,sm=nm=null}finally{_e=i,Oe.p=r,me.T=s}}e.current=t,ct=2}}function Yg(){if(ct===2){ct=0;var e=Ls,t=Ia,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=me.T,me.T=null;var s=Oe.p;Oe.p=2;var r=_e;_e|=4;try{w8(e,t.alternate,t)}finally{_e=r,Oe.p=s,me.T=n}}ct=3}}function Qg(){if(ct===4||ct===3){ct=0;var e=Go;Go=null,hO();var t=Ls,n=Ia,s=or,r=D8,i=(s&335544064)===s?10262:10256;if(n.subtreeFlags&i||n.flags&i?ct=5:(ct=0,Ia=Ls=null,V8(t,t.pendingLanes)),i=t.pendingLanes,i===0&&(ki=null),xy(s),n=n.stateNode,Wn&&typeof Wn.onCommitFiberRoot=="function")try{Wn.onCommitFiberRoot(Ou,n,void 0,(n.current.flags&128)===128)}catch{}if(r!==null){n=me.T,i=Oe.p,Oe.p=2,me.T=null;try{for(var a=t.onRecoverableError,l=0;l<r.length;l++){var c=r[l];a(c.value,{componentStack:c.stack})}}finally{me.T=n,Oe.p=i}}if(r=Vo,a=Wo,Wo=null,r!==null&&(Vo=null,a===null&&(a=[]),e!==null))for(c=0;c<r.length;c++)n=(0,r[c])(a),n!==void 0&&e.finished.finally(n);or&3&&Rx(),dr(t),i=t.pendingLanes,s&261930&&i&42?t===bf?Bc++:(Bc=0,bf=t):(Bc=0,bf=null),Fu(0)}}function V8(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Hu(t)))}function Rx(){return Go!==null&&(Go.skipTransition(),Go=null),Zg(),Yg(),Qg(),Jg()}function Jg(){if(ct!==5)return!1;var e=Ls,t=Kg;Kg=0;var n=xy(or),s=me.T,r=Oe.p;try{Oe.p=32>n?32:n,me.T=null,n=Xg,Xg=null;var i=Ls,a=or;if(ct=0,Ia=Ls=null,or=0,_e&6)throw Error(W(331));var l=_e;if(_e|=4,I8(i.current),N8(i,i.current,a,n),_e=l,Fu(0,!1),Wn&&typeof Wn.onPostCommitFiberRoot=="function")try{Wn.onPostCommitFiberRoot(Ou,i)}catch{}return!0}finally{Oe.p=r,me.T=s,V8(e,t)}}function R2(e,t,n){t=ds(n,t),t=Mg(e.stateNode,t,2),e=gi(e,t,2),e!==null&&(Lu(e,2),dr(e))}function Pe(e,t,n){if(e.tag===3)R2(e,e,n);else for(;t!==null;){if(t.tag===3){R2(t,e,n);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ki===null||!ki.has(s))){e=ds(n,e),n=o8(2),s=gi(t,n,2),s!==null&&(l8(n,s,t,e),Lu(s,2),dr(s));break}}t=t.return}}function ap(e,t,n){var s=e.pingCache;if(s===null){s=e.pingCache=new GD;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(n)||(Yy=!0,r.add(n),e=JD.bind(null,e,t,n),t.then(e,e))}function JD(e,t,n){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ke===e&&(Ae&n)===n&&(ht===4||ht===3&&(Ae&62914560)===Ae&&300>Vn()-Ax?_e&2?yh|=n:yl(e,0):yh|=n,gl===Ae&&(gl=0)),dr(e)}function W8(e,t){t===0&&(t=D6()),e=Za(e,t),e!==null&&(Lu(e,t),dr(e))}function eL(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),W8(e,n)}function tL(e,t){var n=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(W(314))}s!==null&&s.delete(t),W8(e,n)}function nL(e,t){return fy(e,t)}var kl=null,vo=null,em=!1,wh=!1,op=!1,fi=0;function dr(e){e!==vo&&e.next===null&&(vo===null?kl=vo=e:vo=vo.next=e),wh=!0,em||(em=!0,rL())}function Fu(e,t){if(!op&&wh){op=!0;do for(var n=!1,s=kl;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var i=0;else{var a=s.suspendedLanes,l=s.pingedLanes;i=(1<<31-Kn(42|e)+1)-1,i&=r&~(a&~l),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,I2(s,i))}else i=Ae,i=gx(s,s===Ke?i:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),!(i&3)||Du(s,i)||(n=!0,I2(s,i));s=s.next}while(n);op=!1}}function sL(){K8()}function K8(){wh=em=!1;var e=0;fi!==0&&pL()&&(e=fi);for(var t=Vn(),n=null,s=kl;s!==null;){var r=s.next,i=X8(s,t);i===0?(s.next=null,n===null?kl=r:n.next=r,r===null&&(vo=n)):(n=s,(e!==0||i&3)&&(wh=!0)),s=r}ct!==0&&ct!==5||Fu(e),fi!==0&&(fi=0)}function X8(e,t){for(var n=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var a=31-Kn(i),l=1<<a,c=r[a];c===-1?(!(l&n)||l&s)&&(r[a]=vO(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}if(t=Ke,n=Ae,n=gx(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,n===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&L1(s),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Du(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(s!==null&&L1(s),xy(n)){case 2:case 8:n=I6;break;case 32:n=eh;break;case 268435456:n=_6;break;default:n=eh}return s=Z8.bind(null,e),n=fy(n,s),e.callbackPriority=t,e.callbackNode=n,t}return s!==null&&s!==null&&L1(s),e.callbackPriority=2,e.callbackNode=null,2}function Z8(e,t){if(ct!==0&&ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Rx()&&e.callbackNode!==n)return null;var s=Ae;return s=gx(e,e===Ke?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(B8(e,s,t),X8(e,Vn()),e.callbackNode!=null&&e.callbackNode===n?Z8.bind(null,e):null)}function I2(e,t){if(Rx())return null;B8(e,t,!0)}function rL(){mL(function(){_e&6?fy(R6,sL):K8()})}function Jy(){if(fi===0){var e=Aa;e===0&&(e=Ed,Ed<<=1,!(Ed&261888)&&(Ed=256)),fi=e}return fi}function _2(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:lf(e)}function iL(e,t,n,s,r){if(t==="submit"&&n&&n.stateNode===r){var i=_2((r[Nn]||null).action),a=s.submitter;a&&(t=(t=a[Nn]||null)?_2(t.formAction):a.getAttribute("formAction"),t!==null&&(i=t,a=null));var l=new yx("action","action",null,s,r);e.push({event:l,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(fi!==0){var c=new FormData(r,a);Ag(n,{pending:!0,data:c,method:r.method,action:i},null,c)}}else typeof i=="function"&&(l.preventDefault(),c=new FormData(r,a),Ag(n,{pending:!0,data:c,method:r.method,action:i},i,c))},currentTarget:r}]})}}for(var lp=0;lp<kg.length;lp++){var cp=kg[lp],aL=cp.toLowerCase(),oL=cp[0].toUpperCase()+cp.slice(1);Ps(aL,"on"+oL)}Ps(lj,"onAnimationEnd");Ps(cj,"onAnimationIteration");Ps(uj,"onAnimationStart");Ps("dblclick","onDoubleClick");Ps("focusin","onFocus");Ps("focusout","onBlur");Ps(gD,"onTransitionRun");Ps(mD,"onTransitionStart");Ps(yD,"onTransitionCancel");Ps(dj,"onTransitionEnd");hl("onMouseEnter",["mouseout","mouseover"]);hl("onMouseLeave",["mouseout","mouseover"]);hl("onPointerEnter",["pointerout","pointerover"]);hl("onPointerLeave",["pointerout","pointerover"]);Ka("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ka("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ka("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ka("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ka("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ka("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cu="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(" "),lL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(cu));function Y8(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var s=e[n],r=s.event;s=s.listeners;e:{var i=void 0;if(t)for(var a=s.length-1;0<=a;a--){var l=s[a],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&r.isPropagationStopped())break e;i=l,r.currentTarget=u;try{i(r)}catch(d){nh(d)}r.currentTarget=null,i=c}else for(a=0;a<s.length;a++){if(l=s[a],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&r.isPropagationStopped())break e;i=l,r.currentTarget=u;try{i(r)}catch(d){nh(d)}r.currentTarget=null,i=c}}}}function Ee(e,t){var n=t[Av];n===void 0&&(n=t[Av]=new Set);var s=e+"__bubble";n.has(s)||(Q8(t,e,2,!1),n.add(s))}function up(e,t,n){var s=0;t&&(s|=4),Q8(n,e,s,t)}var qd="_reactListening"+Math.random().toString(36).slice(2);function ek(e){if(!e[qd]){e[qd]=!0,U6.forEach(function(n){n!=="selectionchange"&&(lL.has(n)||up(n,!1,e),up(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qd]||(t[qd]=!0,up("selectionchange",!1,t))}}function Q8(e,t,n,s){switch(vS(t)){case 2:var r=eB;break;case 8:r=tB;break;default:r=ok}n=r.bind(null,t,n,e),r=void 0,!pg||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function dp(e,t,n,s,r){var i=s;if(!(t&1)&&!(t&2)&&s!==null)e:for(;;){if(s===null)return;var a=s.tag;if(a===3||a===4){var l=s.stateNode.containerInfo;if(l===r)break;if(a===4)for(a=s.return;a!==null;){var c=a.tag;if((c===3||c===4)&&a.stateNode.containerInfo===r)return;a=a.return}for(;l!==null;){if(a=aa(l),a===null)return;if(c=a.tag,c===5||c===6||c===26||c===27){s=i=a;continue e}l=l.parentNode}}s=s.return}Y6(function(){var u=i,d=gy(n),f=[];e:{var h=fj.get(e);if(h!==void 0){var p=yx,m=e;switch(e){case"keypress":if(uf(n)===0)break e;case"keydown":case"keyup":p=VO;break;case"focusin":m="focus",p=F1;break;case"focusout":m="blur",p=F1;break;case"beforeblur":case"afterblur":p=F1;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Lv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=IO;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=YO;break;case lj:case cj:case uj:p=DO;break;case dj:p=JO;break;case"scroll":case"scrollend":p=MO;break;case"wheel":p=tD;break;case"copy":case"cut":case"paste":p=BO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=qv;break;case"submit":p=XO;break;case"toggle":case"beforetoggle":p=sD}var b=(t&4)!==0,y=!b&&(e==="scroll"||e==="scrollend"),g=b?h!==null?h+"Capture":null:h;b=[];for(var k=u,v;k!==null;){var w=k;if(v=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||v===null||g===null||(w=tu(k,g),w!=null&&b.push(uu(k,w,v))),y)break;k=k.return}0<b.length&&(h=new p(h,m,null,n,d),f.push({event:h,listeners:b}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==xg&&(m=n.relatedTarget||n.fromElement)&&(aa(m)||m[Bl]))break e;(h||p)&&(m=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=u,p=p?aa(p):null,p!==null&&(y=_u(p),b=p.tag,p!==y||b!==5&&b!==27&&b!==6)&&(p=null)):(h=null,p=u),h!==p&&(b=Lv,w="onMouseLeave",g="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(b=qv,w="onPointerLeave",g="onPointerEnter",k="pointer"),y=h==null?m:bc(h),v=p==null?m:bc(p),m=new b(w,k+"leave",h,n,d),m.target=y,m.relatedTarget=v,w=null,aa(d)===u&&(b=new b(g,k+"enter",p,n,d),b.target=v,b.relatedTarget=y,w=b),y=w,b=h&&p?ng(h,p,cL):null,h!==null&&O2(f,m,h,b,!1),p!==null&&y!==null&&O2(f,y,p,b,!0)))}e:{if(h=u?bc(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var j=Fv;else if(Uv(h))if(sj)j=hD;else{j=dD;var $=uD}else p=h.nodeName,!p||p.toLowerCase()!=="input"||h.type!=="checkbox"&&h.type!=="radio"?u&&py(u.elementType)&&(j=Fv):j=fD;if(j&&(j=j(e,u))){nj(f,j,n,d);break e}$&&$(e,h,u)}switch($=u?bc(u):window,e){case"focusin":(Uv($)||$.contentEditable==="true")&&(To=$,mg=u,zc=null);break;case"focusout":zc=mg=To=null;break;case"mousedown":yg=!0;break;case"contextmenu":case"mouseup":case"dragend":yg=!1,Xv(f,n,d);break;case"selectionchange":if(pD)break;case"keydown":case"keyup":Xv(f,n,d)}var C;if(ky)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Eo?ej(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(J6&&n.locale!=="ko"&&(Eo||E!=="onCompositionStart"?E==="onCompositionEnd"&&Eo&&(C=Q6()):(li=d,my="value"in li?li.value:li.textContent,Eo=!0)),$=jh(u,E),0<$.length&&(E=new Bv(E,e,null,n,d),f.push({event:E,listeners:$}),C?E.data=C:(C=tj(n),C!==null&&(E.data=C)))),(C=iD?aD(e,n):oD(e,n))&&(E=jh(u,"onBeforeInput"),0<E.length&&($=new Bv("onBeforeInput","beforeinput",null,n,d),f.push({event:$,listeners:E}),$.data=C)),iL(f,e,u,n,d)}Y8(f,t)})}function uu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jh(e,t){for(var n=t+"Capture",s=[];e!==null;){var r=e,i=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||i===null||(r=tu(e,n),r!=null&&s.unshift(uu(e,r,i)),r=tu(e,t),r!=null&&s.push(uu(e,r,i))),e.tag===3)return s;e=e.return}return[]}function cL(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function O2(e,t,n,s,r){for(var i=t._reactName,a=[];n!==null&&n!==s;){var l=n,c=l.alternate,u=l.stateNode;if(l=l.tag,c!==null&&c===s)break;l!==5&&l!==26&&l!==27||u===null||(c=u,r?(u=tu(n,i),u!=null&&a.unshift(uu(n,u,c))):r||(u=tu(n,i),u!=null&&a.push(uu(n,u,c)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var uL=/\r\n?/g,dL=/\u0000|\uFFFD/g;function D2(e){return(typeof e=="string"?e:""+e).replace(uL,`
190
- `).replace(dL,"")}function J8(e,t){return t=D2(t),D2(e)===t}function qe(e,t,n,s,r,i){switch(n){case"children":if(typeof s=="string")t==="body"||t==="textarea"&&s===""||xl(e,s);else if(typeof s=="number"||typeof s=="bigint")t!=="body"&&xl(e,""+s);else return;break;case"className":Ad(e,"class",s);break;case"tabIndex":Ad(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Ad(e,n,s);break;case"style":Z6(e,s,i);return;case"data":if(t!=="object"){Ad(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(n);break}s=lf(s),e.setAttribute(n,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&qe(e,t,"name",r.name,r,null),qe(e,t,"formEncType",r.formEncType,r,null),qe(e,t,"formMethod",r.formMethod,r,null),qe(e,t,"formTarget",r.formTarget,r,null)):(qe(e,t,"encType",r.encType,r,null),qe(e,t,"method",r.method,r,null),qe(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(n);break}s=lf(s),e.setAttribute(n,s);break;case"onClick":s!=null&&(e.onclick=tr);return;case"onScroll":s!=null&&Ee("scroll",e);return;case"onScrollEnd":s!=null&&Ee("scrollend",e);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(W(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(W(60));(i!=null?i.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}n=lf(s),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":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(n,s):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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":s===!0?e.setAttribute(n,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(n,s):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(n,s):e.removeAttribute(n);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(n):e.setAttribute(n,s);break;case"popover":Ee("beforetoggle",e),Ee("toggle",e),of(e,"popover",s);break;case"xlinkActuate":hr(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":hr(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":hr(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":hr(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":hr(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":hr(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":hr(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":hr(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":hr(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":of(e,"is",s);break;case"innerText":case"textContent":return;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=AO.get(n)||n,of(e,n,s);else return}Ie=!0}function tm(e,t,n,s,r,i){switch(n){case"style":Z6(e,s,i);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(W(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(W(60));(i!=null?i.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"children":if(typeof s=="string")xl(e,s);else if(typeof s=="number"||typeof s=="bigint")xl(e,""+s);else return;break;case"onScroll":s!=null&&Ee("scroll",e);return;case"onScrollEnd":s!=null&&Ee("scrollend",e);return;case"onClick":s!=null&&(e.onclick=tr);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!F6.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),i=n.slice(2,r?n.length-7:void 0),t=e[Nn]||null,t=t!=null?t[n]:null,typeof t=="function"&&e.removeEventListener(i,t,r),typeof s=="function")){typeof t!="function"&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(i,s,r);break e}Ie=!0,n in e?e[n]=s:s===!0?e.setAttribute(n,""):of(e,n,s)}return}Ie=!0}function Yt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",e),Ee("load",e);var s=!1,r=!1,i;for(i in n)if(n.hasOwnProperty(i)){var a=n[i];if(a!=null)switch(i){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(W(137,t));default:qe(e,t,i,a,n,null)}}r&&qe(e,t,"srcSet",n.srcSet,n,null),s&&qe(e,t,"src",n.src,n,null);return;case"input":Ee("invalid",e);var l=i=a=r=null,c=null,u=null;for(s in n)if(n.hasOwnProperty(s)){var d=n[s];if(d!=null)switch(s){case"name":r=d;break;case"type":a=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":i=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(W(137,t));break;default:qe(e,t,s,d,n,null)}}W6(e,i,l,c,u,a,r,!1);return;case"select":Ee("invalid",e),s=a=i=null;for(r in n)if(n.hasOwnProperty(r)&&(l=n[r],l!=null))switch(r){case"value":i=l;break;case"defaultValue":a=l;break;case"multiple":s=l;default:qe(e,t,r,l,n,null)}t=i,n=a,e.multiple=!!s,t!=null?Bo(e,!!s,t,!1):n!=null&&Bo(e,!!s,n,!0);return;case"textarea":Ee("invalid",e),i=r=s=null;for(a in n)if(n.hasOwnProperty(a)&&(l=n[a],l!=null))switch(a){case"value":s=l;break;case"defaultValue":r=l;break;case"children":i=l;break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(W(91));break;default:qe(e,t,a,l,n,null)}X6(e,s,r,i);return;case"option":for(c in n)if(n.hasOwnProperty(c)&&(s=n[c],s!=null))switch(c){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:qe(e,t,c,s,n,null)}return;case"dialog":Ee("beforetoggle",e),Ee("toggle",e),Ee("cancel",e),Ee("close",e);break;case"iframe":case"object":Ee("load",e);break;case"video":case"audio":for(s=0;s<cu.length;s++)Ee(cu[s],e);break;case"image":Ee("error",e),Ee("load",e);break;case"details":Ee("toggle",e);break;case"embed":case"source":case"link":Ee("error",e),Ee("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)&&(s=n[u],s!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(W(137,t));default:qe(e,t,u,s,n,null)}return;default:if(py(t)){for(d in n)n.hasOwnProperty(d)&&(s=n[d],s!==void 0&&tm(e,t,d,s,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(s=n[l],s!=null&&qe(e,t,l,s,n,null))}var fL={};function hL(e,t,n,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,i=null,a=null,l=null,c=null,u=null,d=null;for(p in n){var f=n[p];if(n.hasOwnProperty(p)&&f!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":c=f;default:s.hasOwnProperty(p)||qe(e,t,p,null,s,f)}}for(var h in s){var p=s[h];if(f=n[h],s.hasOwnProperty(h)&&(p!=null||f!=null))switch(h){case"type":p!==f&&(Ie=!0),i=p;break;case"name":p!==f&&(Ie=!0),r=p;break;case"checked":p!==f&&(Ie=!0),u=p;break;case"defaultChecked":p!==f&&(Ie=!0),d=p;break;case"value":p!==f&&(Ie=!0),a=p;break;case"defaultValue":p!==f&&(Ie=!0),l=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(W(137,t));break;default:p!==f&&qe(e,t,h,p,s,f)}}hg(e,a,l,c,u,d,i,r);return;case"select":p=a=l=h=null;for(i in n)if(c=n[i],n.hasOwnProperty(i)&&c!=null)switch(i){case"value":break;case"multiple":p=c;default:s.hasOwnProperty(i)||qe(e,t,i,null,s,c)}for(r in s)if(i=s[r],c=n[r],s.hasOwnProperty(r)&&(i!=null||c!=null))switch(r){case"value":i!==c&&(Ie=!0),h=i;break;case"defaultValue":i!==c&&(Ie=!0),l=i;break;case"multiple":i!==c&&(Ie=!0),a=i;default:i!==c&&qe(e,t,r,i,s,c)}t=l,n=a,s=p,h!=null?Bo(e,!!n,h,!1):!!s!=!!n&&(t!=null?Bo(e,!!n,t,!0):Bo(e,!!n,n?[]:"",!1));return;case"textarea":p=h=null;for(l in n)if(r=n[l],n.hasOwnProperty(l)&&r!=null&&!s.hasOwnProperty(l))switch(l){case"value":break;case"children":break;default:qe(e,t,l,null,s,r)}for(a in s)if(r=s[a],i=n[a],s.hasOwnProperty(a)&&(r!=null||i!=null))switch(a){case"value":r!==i&&(Ie=!0),h=r;break;case"defaultValue":r!==i&&(Ie=!0),p=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(W(91));break;default:r!==i&&qe(e,t,a,r,s,i)}K6(e,h,p);return;case"option":for(var m in n)if(h=n[m],n.hasOwnProperty(m)&&h!=null&&!s.hasOwnProperty(m))switch(m){case"selected":e.selected=!1;break;default:qe(e,t,m,null,s,h)}for(c in s)if(h=s[c],p=n[c],s.hasOwnProperty(c)&&h!==p&&(h!=null||p!=null))switch(c){case"selected":h!==p&&(Ie=!0),e.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:qe(e,t,c,h,s,p)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var b in n)h=n[b],n.hasOwnProperty(b)&&h!=null&&!s.hasOwnProperty(b)&&qe(e,t,b,null,s,h);for(u in s)if(h=s[u],p=n[u],s.hasOwnProperty(u)&&h!==p&&(h!=null||p!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(W(137,t));break;default:qe(e,t,u,h,s,p)}return;default:if(py(t)){for(var y in n)h=n[y],n.hasOwnProperty(y)&&h!==void 0&&!s.hasOwnProperty(y)&&tm(e,t,y,void 0,s,h);for(d in s)h=s[d],p=n[d],!s.hasOwnProperty(d)||h===p||h===void 0&&p===void 0||tm(e,t,d,h,s,p);return}}for(var g in n)h=n[g],n.hasOwnProperty(g)&&h!=null&&!s.hasOwnProperty(g)&&qe(e,t,g,null,s,h);for(f in s)h=s[f],p=n[f],!s.hasOwnProperty(f)||h===p||h==null&&p==null||qe(e,t,f,h,s,p)}function L2(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function xL(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),s=0;s<n.length;s++){var r=n[s],i=r.transferSize,a=r.initiatorType,l=r.duration;if(i&&l&&L2(a)){for(a=0,l=r.responseEnd,s+=1;s<n.length;s++){var c=n[s],u=c.startTime;if(u>l)break;var d=c.transferSize,f=c.initiatorType;d&&L2(f)&&(c=c.responseEnd,a+=d*(c<l?1:(l-u)/(c-u)))}if(--s,t+=8*(i+a)/(r.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 nm=null,sm=null;function du(e){return e.nodeType===9?e:e.ownerDocument}function B2(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 eS(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 tS(e,t,n,s){return n=du(n).createElement(e),n[Wt]=s,n[Nn]=t,Yt(n,e,t),Ot(n),n}function rm(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 fp=null;function pL(){var e=window.event;return e&&e.type==="popstate"?e===fp?!1:(fp=e,!0):(fp=null,!1)}var tk=typeof setTimeout=="function"?setTimeout:void 0,gL=typeof clearTimeout=="function"?clearTimeout:void 0,q2=typeof Promise=="function"?Promise:void 0,H2=typeof requestAnimationFrame=="function"?requestAnimationFrame:tk,mL=typeof queueMicrotask=="function"?queueMicrotask:typeof q2<"u"?function(e){return q2.resolve(null).then(e).catch(yL)}:tk;function yL(e){setTimeout(function(){throw e})}function _i(e){return e==="head"}function P2(e,t){var n=t,s=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"||n==="/&"){if(s===0){e.removeChild(r),Sl(t);return}s--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")s++;else if(n==="html")xp(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,xp(n);for(var i=n.firstChild;i;){var a=i.nextSibling,l=i.nodeName;i[Bu]||l==="SCRIPT"||l==="STYLE"||l==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=a}}else n==="body"&&xp(e.ownerDocument.body);n=r}while(n);Sl(t)}function U2(e,t){var n=e;e=0;do{var s=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||""),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=s}while(n)}function nS(e,t,n){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display==="inline"){if(t=e.getClientRects(),t.length===1)var s=1;else for(var r=s=0;r<t.length;r++){var i=t[r];0<i.width&&0<i.height&&s++}s===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+n.paddingTop,e.marginBottom="-"+n.paddingBottom)}}function sS(e,t){e=e.style,t=t.style;var n=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=n==null||typeof n=="boolean"?"":(""+n).trim(),n=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null: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?e.margin=n:(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)))}function kL(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 im(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return kL(t,n,e)}function bL(e){return e.documentElement.clientHeight}function vL(e){this.addEventListener("load",e),this.addEventListener("error",e)}function wL(e,t,n,s,r,i,a,l,c){var u=t.nodeType===9?t:t.ownerDocument;try{var d=u.startViewTransition({update:function(){var h=u.defaultView,p=h.navigation&&h.navigation.transition,m=u.fonts.status;s();var b=[];if(m==="loaded"&&(bL(u),u.fonts.status==="loading"&&b.push(u.fonts.ready)),m=b.length,e!==null)for(var y=e.suspenseyImages,g=0,k=0;k<y.length;k++){var v=y[k];if(!v.complete){var w=v.getBoundingClientRect();if(0<w.bottom&&0<w.right&&w.top<h.innerHeight&&w.left<h.innerWidth){if(g+=pS(v),g>jf){b.length=m;break}v=new Promise(vL.bind(v)),b.push(v)}}}if(0<b.length)return h=Promise.race([Promise.all(b),new Promise(function(j){return setTimeout(j,500)})]).then(r,r),(p?Promise.allSettled([p.finished,h]):h).then(i,i);if(r(),p)return p.finished.then(i,i);i()},types:n});u.__reactViewTransition=d;var f=[];return d.ready.then(function(){for(var h=u.documentElement.getAnimations({subtree:!0}),p=0;p<h.length;p++){var m=h[p],b=m.effect,y=b.pseudoElement;if(y!=null&&y.startsWith("::view-transition")){f.push(m),m=b.getKeyframes();for(var g=y=void 0,k=!0,v=0;v<m.length;v++){var w=m[v],j=w.width;if(y===void 0)y=j;else if(y!==j){k=!1;break}if(j=w.height,g===void 0)g=j;else if(g!==j){k=!1;break}delete w.width,delete w.height,w.transform==="none"&&delete w.transform}k&&y!==void 0&&g!==void 0&&(b.setKeyframes(m),k=getComputedStyle(b.target,b.pseudoElement),k.width!==y||k.height!==g)&&(k=m[0],k.width=y,k.height=g,k=m[m.length-1],k.width=y,k.height=g,b.setKeyframes(m))}}a()},function(h){u.__reactViewTransition===d&&(u.__reactViewTransition=null);try{if(typeof h=="object"&&h!==null)switch(h.name){case"InvalidStateError":(h.message==="View transition was skipped because document visibility state is hidden."||h.message==="Skipping view transition because document visibility state has become hidden."||h.message==="Skipping view transition because viewport size changed."||h.message==="Transition was aborted because of invalid state")&&(h=null)}h!==null&&c(h)}finally{s(),r(),a()}}),d.finished.finally(function(){for(var h=0;h<f.length;h++)f[h].cancel();u.__reactViewTransition===d&&(u.__reactViewTransition=null),l()}),d}catch{return s(),r(),a(),null}}function oa(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}oa.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:Xe({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)};oa.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),s=[],r=0;r<n.length;r++){var i=n[r].effect;i!==null&&i.target===e&&i.pseudoElement===t&&s.push(n[r])}return s};oa.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function rS(e){return{name:e,group:new oa("group",e),imagePair:new oa("image-pair",e),old:new oa("old",e),new:new oa("new",e)}}function es(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}es.prototype.addEventListener=function(e,t,n){var s=null,r=null;if(!(n!=null&&typeof n!="boolean"&&(s=n.signal||null,s!==null&&s.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var i=this._eventListeners;if(iS(i,e,t,n)===-1){var a=this,l=t;n!=null&&typeof n!="boolean"&&n.once===!0&&(l=function(c){a.removeEventListener(e,t,n),typeof t=="function"?t.call(this,c):t.handleEvent(c)}),s!==null&&(r=a.removeEventListener.bind(a,e,t,n),s.addEventListener("abort",r,{once:!0}),r=s.removeEventListener.bind(s,"abort",r)),s=bl(n),i.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:l,cleanup:r}),An(this._fragmentFiber.child,!1,jL,e,l,s)}this._eventListeners=i}};function jL(e,t,n,s){return $t(e).addEventListener(t,n,s),!1}es.prototype.removeEventListener=function(e,t,n){var s=this._eventListeners;if(s!==null&&(t=iS(s,e,t,n),t!==-1)){var r=s[t];n=r.attachedListener;var i=r.cleanup;r=bl(r.optionsOrUseCapture),An(this._fragmentFiber.child,!1,SL,e,n,r),s.splice(t,1),i!==null&&i()}};function SL(e,t,n,s){return $t(e).removeEventListener(t,n,s),!1}function bl(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function F2(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function iS(e,t,n,s){if(e.length===0)return-1;s=F2(s);for(var r=0;r<e.length;r++){var i=e[r];if(i.type===t&&i.listener===n&&F2(i.optionsOrUseCapture)===s)return r}return-1}es.prototype.dispatchEvent=function(e){var t=Wa(this._fragmentFiber);if(t===null)return!0;t=$t(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var s=t.nodeType===9?t.createComment(""):document.createTextNode("");if(n)for(var r=0;r<n.length;r++){var i=n[r];s.addEventListener(i.type,i.attachedListener,bl(i.optionsOrUseCapture))}if(t.appendChild(s),e=s.dispatchEvent(e),n)for(r=0;r<n.length;r++)i=n[r],s.removeEventListener(i.type,i.attachedListener,bl(i.optionsOrUseCapture));return t.removeChild(s),e}return t.dispatchEvent(e)};es.prototype.focus=function(e){An(this._fragmentFiber.child,!0,aS,e,void 0,void 0)};function aS(e,t){return e.tag===6?!1:(e=$t(e),OL(e,t))}es.prototype.focusLast=function(e){var t=[];An(this._fragmentFiber.child,!0,nk,t,void 0,void 0);for(var n=t.length-1;0<=n&&!aS(t[n],e);n--);};function nk(e,t){return t.push(e),!1}es.prototype.blur=function(){var e=Wa(this._fragmentFiber);e!==null&&(e=$t(e),e=du(e).activeElement,e!==null&&An(this._fragmentFiber.child,!1,$L,e,void 0,void 0))};function $L(e,t){return e.tag===6?!1:(e=$t(e),e===t||e.contains(t)?(t.blur(),!0):!1)}es.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),An(this._fragmentFiber.child,!1,CL,e,void 0,void 0)};function CL(e,t){return e.tag===6||(e=$t(e),t.observe(e)),!1}es.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),An(this._fragmentFiber.child,!1,EL,e,void 0,void 0);for(var n=t=0;n<Os.length;n++){var s=Os[n];s.fragmentInstance===this&&s.observer===e?e.unobserve(s.instance):Os[t++]=s}Os.length=t}};function EL(e,t){return e.tag===6||(e=$t(e),t.unobserve(e)),!1}var Os=[],hp=!1;function TL(e,t,n){Os.push({fragmentInstance:e,observer:t,instance:n}),hp||(hp=!0,DL(function(){hp=!1;var s=Os;Os=[];for(var r=0;r<s.length;r++){var i=s[r];i.observer.unobserve(i.instance)}}))}es.prototype.getClientRects=function(){var e=[];return An(this._fragmentFiber.child,!1,zL,e,void 0,void 0),e};function zL(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=$t(e),t.push.apply(t,e.getClientRects());return!1}es.prototype.getRootNode=function(e){var t=Wa(this._fragmentFiber);return t===null?this:$t(t).getRootNode(e)};es.prototype.compareDocumentPosition=function(e){var t=Wa(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];An(this._fragmentFiber.child,!1,nk,n,void 0,void 0);var s=$t(t);if(n.length===0){if(n=s,Sv(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var r=s=n.compareDocumentPosition(e);return n===e?r=Node.DOCUMENT_POSITION_CONTAINS:s&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=z6(t)[1],n===null?r=Node.DOCUMENT_POSITION_PRECEDING:(e=$t(n).compareDocumentPosition(e),r=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),r|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=$t(n[0]),r=$t(n[n.length-1]);var i=Sv(this._fragmentFiber)?t.parentElement:s;if(i==null)return Node.DOCUMENT_POSITION_DISCONNECTED;s=i.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,i=i.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY;var a=t.compareDocumentPosition(e),l=r.compareDocumentPosition(e),c=a&Node.DOCUMENT_POSITION_CONTAINED_BY||l&Node.DOCUMENT_POSITION_CONTAINED_BY;return l=s&&i&&a&Node.DOCUMENT_POSITION_FOLLOWING&&l&Node.DOCUMENT_POSITION_PRECEDING,t=s&&t===e||i&&r===e||c||l?Node.DOCUMENT_POSITION_CONTAINED_BY:!s&&t===e||!i&&r===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:a,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||AL(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function AL(e,t,n,s,r){var i=aa(r);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!i)e:{for(;i!==null;){if(i.tag===7&&(i===t||i.alternate===t)){n=!0;break e}i=i.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(i===null)return i=r.ownerDocument,r===i||r===i.documentElement||r===i.body;e:{for(i=t,t=Wa(t);i!==null;){if(!(i.tag!==5&&i.tag!==3&&i.tag!==27||i!==t&&i.alternate!==t)){i=!0;break e}i=i.return}i=!1}return i}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!i)&&!(t=i===n)&&(t=ng(n,i,$v),t===null?t=!1:(An(t,!0,rO,i,n),i=jo,jo=null,t=i!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!i)&&!(t=i===s)&&(t=ng(s,i,$v),t===null?t=!1:(An(t,!0,iO,i,s),i=jo,tg=jo=null,t=i!==null)),t):!1}function G2(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)}es.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(W(566));var t=[];An(this._fragmentFiber.child,!1,nk,t,void 0,void 0);var n=e!==!1;if(t.length===0){var s=z6(this._fragmentFiber);if(s=n?s[1]||s[0]||Wa(this._fragmentFiber):s[0]||s[1],s===null)return;if(s.tag===6){e=$t(s),G2(e,n);return}if(s=$t(s),s.nodeType!==9){if(s.nodeType===11){n="host"in s?s.host:null,n!==null&&n.scrollIntoView(e);return}s.scrollIntoView(e)}}for(s=n?t.length-1:0;s!==(n?-1:t.length);){var r=t[s];r.tag===6?(r=$t(r),G2(r,n)):$t(r).scrollIntoView(e),s+=n?-1:1}};function NL(e,t){return e=$t(e),oS(e,t),!1}function oS(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function lS(e,t){var n=t._eventListeners;if(n!==null)for(var s=0;s<n.length;s++){var r=n[s];e.addEventListener(r.type,r.attachedListener,bl(r.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(i){for(var a=0,l=0;l<Os.length;l++){var c=Os[l];(c.fragmentInstance!==t||c.observer!==i||c.instance!==e)&&(Os[a++]=c)}Os.length=a,i.observe(e)}),oS(e,t))}function ML(e,t){var n=t._eventListeners;if(n!==null)for(var s=0;s<n.length;s++){var r=n[s];e.removeEventListener(r.type,r.attachedListener,bl(r.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(i){typeof i.rootMargin=="string"?TL(t,i,e):i.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function am(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":am(n),mx(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function RL(e,t,n,s){for(;e.nodeType===1;){var r=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Bu])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=ps(e.nextSibling),e===null)break}return null}function IL(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=ps(e.nextSibling),e===null))return null;return e}function cS(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ps(e.nextSibling),e===null))return null;return e}function om(e){return e.data==="$?"||e.data==="$~"}function sk(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function _L(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var s=function(){t(),n.removeEventListener("DOMContentLoaded",s)};n.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function ps(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 lm=null;function V2(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return ps(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function W2(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 OL(e,t){function n(){s=!0}if(e.ownerDocument.activeElement===e)return!0;var s=!1;try{e.ownerDocument.addEventListener("focus",n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",n,!0)}return s}function DL(e){H2(function(){H2(function(t){return e(t)})})}function uS(e,t,n){switch(t=du(n),e){case"html":if(e=t.documentElement,!e)throw Error(W(452));return e;case"head":if(e=t.head,!e)throw Error(W(453));return e;case"body":if(e=t.body,!e)throw Error(W(454));return e;default:throw Error(W(451))}}function dS(e,t,n){for(var s in n){var r=n[s];n.hasOwnProperty(s)&&r!=null&&qe(e,t,s,null,fL,r)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===tr&&(e.onclick=null),mx(e)}function xp(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);mx(e)}var ys=new Map,K2=new Set;function fu(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 Hr=Oe.d;Oe.d={f:LL,r:BL,D:qL,C:HL,L:PL,m:UL,X:GL,S:FL,M:VL};function LL(){var e=Hr.f(),t=Nx();return e||t}function BL(e){var t=ql(e);t!==null&&t.tag===5&&t.type==="form"?Zj(t):Hr.r(e)}var Fl=typeof document>"u"?null:document;function fS(e,t,n){var s=Fl;if(s&&typeof t=="string"&&t){var r=us(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),K2.has(r)||(K2.add(r),e={rel:e,crossOrigin:n,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),Yt(t,"link",e),Ot(t),s.head.appendChild(t)))}}function qL(e){Hr.D(e),fS("dns-prefetch",e,null)}function HL(e,t){Hr.C(e,t),fS("preconnect",e,t)}function PL(e,t,n){Hr.L(e,t,n);var s=Fl;if(s&&e&&t){var r='link[rel="preload"][as="'+us(t)+'"]';t==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+us(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+us(n.imageSizes)+'"]')):r+='[href="'+us(e)+'"]';var i=r;switch(t){case"style":i=vl(e);break;case"script":i=Gl(e)}if(!(ys.has(i)||(e=Xe({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),ys.set(i,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Gu(i))||t==="script"&&s.querySelector(Vu(i))))){var a=s.createElement("link");Yt(a,"link",e),t==="style"&&(a[th]=!0,a.onload=a.onerror=function(){P6(a)}),Ot(a),s.head.appendChild(a)}}}function UL(e,t){Hr.m(e,t);var n=Fl;if(n&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+us(s)+'"][href="'+us(e)+'"]',i=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Gl(e)}if(!ys.has(i)&&(e=Xe({rel:"modulepreload",href:e},t),ys.set(i,e),n.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Vu(i)))return}s=n.createElement("link"),Yt(s,"link",e),Ot(s),n.head.appendChild(s)}}}function FL(e,t,n){Hr.S(e,t,n);var s=Fl;if(s&&e){var r=Lo(s).hoistableStyles,i=vl(e);t=t||"default";var a=r.get(i);if(!a){var l={loading:0,preload:null};if(a=s.querySelector(Gu(i)))l.loading=5;else{e=Xe({rel:"stylesheet",href:e,"data-precedence":t},n),(n=ys.get(i))&&rk(e,n);var c=a=s.createElement("link");Ot(c),Yt(c,"link",e),c._p=new Promise(function(u,d){c.onload=u,c.onerror=d}),c.addEventListener("load",function(){l.loading|=1}),c.addEventListener("error",function(){l.loading|=2}),l.loading|=4,vf(a,t,s)}a={type:"stylesheet",instance:a,count:1,state:l},r.set(i,a)}}}function GL(e,t){Hr.X(e,t);var n=Fl;if(n&&e){var s=Lo(n).hoistableScripts,r=Gl(e),i=s.get(r);i||(i=n.querySelector(Vu(r)),i||(e=Xe({src:e,async:!0},t),(t=ys.get(r))&&ik(e,t),i=n.createElement("script"),Ot(i),Yt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},s.set(r,i))}}function VL(e,t){Hr.M(e,t);var n=Fl;if(n&&e){var s=Lo(n).hoistableScripts,r=Gl(e),i=s.get(r);i||(i=n.querySelector(Vu(r)),i||(e=Xe({src:e,async:!0,type:"module"},t),(t=ys.get(r))&&ik(e,t),i=n.createElement("script"),Ot(i),Yt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},s.set(r,i))}}function X2(e,t,n,s){var r=(r=hi.current)?fu(r):null;if(!r)throw Error(W(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=vl(n.href),t=Lo(r).hoistableStyles,s=t.get(n),s||(s={type:"style",instance:null,count:0,state:null},t.set(n,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=vl(n.href);var i=Lo(r).hoistableStyles,a=i.get(e);if(a||(r=r.ownerDocument||r,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,a),(i=r.querySelector(Gu(e)))?i._p||(a.instance=i,a.state.loading=5):(i=ys.get(e),i||(i={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},ys.set(e,i)),WL(r,e,i,a.state))),t&&s===null)throw Error(W(528,""));return a}if(t&&s!==null)throw Error(W(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=Gl(n),t=Lo(r).hoistableScripts,s=t.get(n),s||(s={type:"script",instance:null,count:0,state:null},t.set(n,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(W(444,e))}}function vl(e){return'href="'+us(e)+'"'}function Gu(e){return'link[rel="stylesheet"]['+e+"]"}function hS(e){return Xe({},e,{"data-precedence":e.precedence,precedence:null})}function WL(e,t,n,s){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[th]!==!0){s.loading=1;return}}else t=e.createElement("link"),t[th]=!0,t.onload=t.onerror=P6.bind(null,t),Yt(t,"link",n),Ot(t),e.head.appendChild(t);s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2})}function Gl(e){return'[src="'+us(e)+'"]'}function Vu(e){return"script[async]"+e}function Z2(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+us(n.href)+'"]');if(s)return t.instance=s,Ot(s),s;var r=Xe({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Ot(s),Yt(s,"style",r),vf(s,n.precedence,e),t.instance=s;case"stylesheet":r=vl(n.href);var i=e.querySelector(Gu(r));if(i)return t.state.loading|=4,t.instance=i,Ot(i),i;s=hS(n),(r=ys.get(r))&&rk(s,r),i=(e.ownerDocument||e).createElement("link"),Ot(i);var a=i;return a._p=new Promise(function(l,c){a.onload=l,a.onerror=c}),Yt(i,"link",s),t.state.loading|=4,vf(i,n.precedence,e),t.instance=i;case"script":return i=Gl(n.src),(r=e.querySelector(Vu(i)))?(t.instance=r,Ot(r),r):(s=n,(r=ys.get(i))&&(s=Xe({},n),ik(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),Ot(r),Yt(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(W(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(s=t.instance,t.state.loading|=4,vf(s,n.precedence,e));return t.instance}function vf(e,t,n){for(var s=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,i=r,a=0;a<s.length;a++){var l=s[a];if(l.dataset.precedence===t)i=l;else if(i!==r)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function rk(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ik(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var wf=null;function Y2(e,t,n){if(wf===null){var s=new Map,r=wf=new Map;r.set(n,s)}else r=wf,s=r.get(n),s||(s=new Map,r.set(n,s));if(s.has(e))return s;for(s.set(e,null),n=n.getElementsByTagName(e),r=0;r<n.length;r++){var i=n[r];if(!(i[Bu]||i[Wt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var a=i.getAttribute(t)||"";a=e+a;var l=s.get(a);l?l.push(i):s.set(a,[i])}}return s}function cm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function KL(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 Q2(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function xS(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function pS(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function J2(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=pS(t),e.suspenseyImages.push(t)),e=YL.bind(e),t.decode().then(e,e))}function XL(e,t,n,s){if(n.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var r=vl(s.href),i=t.querySelector(Gu(r));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=hu.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,Ot(i);return}i=t.ownerDocument||t,s=hS(s),(r=ys.get(r))&&rk(s,r),i=i.createElement("link"),Ot(i);var a=i;a._p=new Promise(function(l,c){a.onload=l,a.onerror=c}),Yt(i,"link",s),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=hu.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var jf=0;function ZL(e,t){return e.stylesheets&&e.count===0&&Sf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var s=setTimeout(function(){if(e.stylesheets&&Sf(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&jf===0&&(jf=62500*xL());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Sf(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>jf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function gS(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Sf(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function hu(){this.count--,gS(this)}function YL(){this.imgCount--,gS(this)}var Sh=null;function Sf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Sh=new Map,t.forEach(QL,e),Sh=null,hu.call(e))}function QL(e,t){if(!(t.state.loading&4)){var n=Sh.get(e);if(n)var s=n.get(null);else{n=new Map,Sh.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<r.length;i++){var a=r[i];(a.nodeName==="LINK"||a.getAttribute("media")!=="not all")&&(n.set(a.dataset.precedence,a),s=a)}s&&n.set(null,s)}r=t.instance,a=r.getAttribute("data-precedence"),i=n.get(a)||s,i===s&&n.set(null,r),n.set(a,r),this.count++,s=hu.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),i?i.parentNode.insertBefore(r,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var wl={$$typeof:er,Provider:null,Consumer:null,_currentValue:ma,_currentValue2:ma,_threadCount:0};function JL(e,t,n,s,r,i,a,l,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=B1(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=B1(0),this.hiddenUpdates=B1(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=i,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function mS(e,t,n,s,r,i,a,l,c,u,d,f){return e=new JL(e,t,n,a,c,u,d,f,l),t=1,i===!0&&(t|=24),i=Tn(3,null,null,t),e.current=i,i.stateNode=e,t=$y(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:s,isDehydrated:n,cache:t},Ty(i),e}function yS(e){return e?(e=No,e):No}function kS(e,t,n,s,r,i){r=yS(r),s.context===null?s.context=r:s.pendingContext=r,s=pi(t),s.payload={element:n},i=i===void 0?null:i,i!==null&&(s.callback=i),n=gi(e,s,t),n!==null&&(zn(n,e,t),Nc(n,e,t))}function ew(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ak(e,t){ew(e,t),(e=e.alternate)&&ew(e,t)}function bS(e){if(e.tag===13||e.tag===31){var t=Za(e,67108864);t!==null&&zn(t,e,67108864),ak(e,67108864)}}function tw(e){if(e.tag===13||e.tag===31){var t=Xn();t=hy(t);var n=Za(e,t);n!==null&&zn(n,e,t),ak(e,t)}}var jl=!0;function eB(e,t,n,s){var r=me.T;me.T=null;var i=Oe.p;try{Oe.p=2,ok(e,t,n,s)}finally{Oe.p=i,me.T=r}}function tB(e,t,n,s){var r=me.T;me.T=null;var i=Oe.p;try{Oe.p=8,ok(e,t,n,s)}finally{Oe.p=i,me.T=r}}function ok(e,t,n,s){if(jl){var r=um(s);if(r===null)dp(e,t,s,$h,n),nw(e,s);else if(sB(r,e,t,n,s))s.stopPropagation();else if(nw(e,s),t&4&&-1<nB.indexOf(e)){for(;r!==null;){var i=ql(r);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var a=Xi(i.pendingLanes);if(a!==0){var l=i;for(l.pendingLanes|=2,l.entangledLanes|=2;a;){var c=1<<31-Kn(a);l.entanglements[1]|=c,a&=~c}dr(i),!(_e&6)&&(kh=Vn()+500,Fu(0))}}break;case 31:case 13:l=Za(i,2),l!==null&&zn(l,i,2),Nx(),ak(i,2)}if(i=um(s),i===null&&dp(e,t,s,$h,n),i===r)break;r=i}r!==null&&s.stopPropagation()}else dp(e,t,s,null,n)}}function um(e){return e=gy(e),lk(e)}var $h=null;function lk(e){if($h=null,e=aa(e),e!==null){var t=_u(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=C6(t),e!==null)return e;e=null}else if(n===31){if(e=E6(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 $h=e,null}function vS(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(xO()){case R6:return 2;case I6:return 8;case eh:case pO:return 32;case _6:return 268435456;default:return 32}default:return 32}}var dm=!1,bi=null,vi=null,wi=null,xu=new Map,pu=new Map,ri=[],nB="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 nw(e,t){switch(e){case"focusin":case"focusout":bi=null;break;case"dragenter":case"dragleave":vi=null;break;case"mouseover":case"mouseout":wi=null;break;case"pointerover":case"pointerout":xu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":pu.delete(t.pointerId)}}function dc(e,t,n,s,r,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:s,nativeEvent:i,targetContainers:[r]},t!==null&&(t=ql(t),t!==null&&bS(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function sB(e,t,n,s,r){switch(t){case"focusin":return bi=dc(bi,e,t,n,s,r),!0;case"dragenter":return vi=dc(vi,e,t,n,s,r),!0;case"mouseover":return wi=dc(wi,e,t,n,s,r),!0;case"pointerover":var i=r.pointerId;return xu.set(i,dc(xu.get(i)||null,e,t,n,s,r)),!0;case"gotpointercapture":return i=r.pointerId,pu.set(i,dc(pu.get(i)||null,e,t,n,s,r)),!0}return!1}function wS(e){var t=aa(e.target);if(t!==null){var n=_u(t);if(n!==null){if(t=n.tag,t===13){if(t=C6(n),t!==null){e.blockedOn=t,zv(e.priority,function(){tw(n)});return}}else if(t===31){if(t=E6(n),t!==null){e.blockedOn=t,zv(e.priority,function(){tw(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 $f(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=um(e.nativeEvent);if(n===null){n=e.nativeEvent;var s=new n.constructor(n.type,n);xg=s,n.target.dispatchEvent(s),xg=null}else return t=ql(n),t!==null&&bS(t),e.blockedOn=n,!1;t.shift()}return!0}function sw(e,t,n){$f(e)&&n.delete(t)}function rB(){dm=!1,bi!==null&&$f(bi)&&(bi=null),vi!==null&&$f(vi)&&(vi=null),wi!==null&&$f(wi)&&(wi=null),xu.forEach(sw),pu.forEach(sw)}function Hd(e,t){e.blockedOn===t&&(e.blockedOn=null,dm||(dm=!0,Ct.unstable_scheduleCallback(Ct.unstable_NormalPriority,rB)))}var Pd=null;function rw(e){Pd!==e&&(Pd=e,Ct.unstable_scheduleCallback(Ct.unstable_NormalPriority,function(){Pd===e&&(Pd=null);for(var t=0;t<e.length;t+=3){var n=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(lk(s||n)===null)continue;break}var i=ql(n);i!==null&&(e.splice(t,3),t-=3,Ag(i,{pending:!0,data:r,method:n.method,action:s},s,r))}}))}function Sl(e){function t(c){return Hd(c,e)}bi!==null&&Hd(bi,e),vi!==null&&Hd(vi,e),wi!==null&&Hd(wi,e),xu.forEach(t),pu.forEach(t);for(var n=0;n<ri.length;n++){var s=ri[n];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ri.length&&(n=ri[0],n.blockedOn===null);)wS(n),n.blockedOn===null&&ri.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(s=0;s<n.length;s+=3){var r=n[s],i=n[s+1],a=r[Nn]||null;if(typeof i=="function")a||rw(n);else if(a){var l=null;if(i&&i.hasAttribute("formAction")){if(r=i,a=i[Nn]||null)l=a.formAction;else if(lk(r)!==null)continue}else l=a.action;typeof l=="function"?n[s+1]=l:(n.splice(s,3),s-=3),rw(n)}}}function jS(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(a){return r=a})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(n,20)}function n(){if(!s&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function ck(e){this._internalRoot=e}Ix.prototype.render=ck.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));var n=t.current,s=Xn();kS(n,s,e,t,null,null)};Ix.prototype.unmount=ck.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;kS(e.current,2,null,e,null,null),Nx(),t[Bl]=null}};function Ix(e){this._internalRoot=e}Ix.prototype.unstable_scheduleHydration=function(e){if(e){var t=H6();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ri.length&&t!==0&&t<ri[n].priority;n++);ri.splice(n,0,e),n===0&&wS(e)}};var iw=S6.version;if(iw!=="19.3.0")throw Error(W(527,iw,"19.3.0"));Oe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(W(188)):(e=Object.keys(e).join(","),Error(W(268,e)));return e=sO(t),e=e!==null?T6(e):null,e=e===null?null:e.stateNode,e};var iB={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:me,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ud=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ud.isDisabled&&Ud.supportsFiber)try{Ou=Ud.inject(iB),Wn=Ud}catch{}}px.createRoot=function(e,t){if(!$6(e))throw Error(W(299));var n=!1,s="",r=r8,i=i8,a=a8;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=mS(e,1,!1,null,null,n,s,null,r,i,a,jS),e[Bl]=t.current,ek(e),new ck(t)};px.hydrateRoot=function(e,t,n){if(!$6(e))throw Error(W(299));var s=!1,r="",i=r8,a=i8,l=a8,c=null;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(a=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(c=n.formState)),t=mS(e,1,!0,t,n??null,s,r,c,i,a,l,jS),t.context=yS(null),n=t.current,s=Xn(),s=hy(s),r=pi(s),r.callback=null,gi(n,r,s),n=s,t.current.lanes=n,Lu(t,n),dr(t),e[Bl]=t.current,ek(e),new Ix(t)};px.version="19.3.0";function SS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(SS)}catch(e){console.error(e)}}SS(),v6.exports=px;var $S=v6.exports;let Dn=null,aw=null;const ow=["data-theme",Cn("theme")];function aB(e){const t=()=>{let s=null;for(const r of ow){const i=document.documentElement.getAttribute(r);i==null?e.removeAttribute(r):(e.setAttribute(r,i),r==="data-theme"&&(s=i))}s==="light"||s==="dark"?e.style.colorScheme=s:e.style.removeProperty("color-scheme")};t(),new MutationObserver(t).observe(document.documentElement,{attributes:!0,attributeFilter:[...ow]})}function oB(){if(Dn)return Dn;if(typeof document>"u")throw new Error("useToast: Cannot create fallback viewport during SSR. Wrap your app with <LayerProvider> or <AppShell>.");p0();const e=document.createElement("div");e.setAttribute("data-astryx-toast-fallback",""),document.body.appendChild(e),aB(e);let t;const n=new Promise(a=>{t=a}),s=()=>{const a=x.use(cx),l=x.useRef(!1);return x.useEffect(()=>{a&&!l.current&&(l.current=!0,Dn=a,t==null||t(a))},[a]),null};aw=$S.createRoot(e),aw.render(o.jsx(M0,{children:o.jsx(s,{})}));const r=[],i={addToast:a=>{Dn&&Dn!==i?Dn.addToast(a):(r.push(a),n.then(l=>{for(const c of r)l.addToast(c);r.length=0}))},removeToast:(a,l)=>{Dn&&Dn!==i&&Dn.removeToast(a,l)},findByUniqueID:a=>{if(Dn&&Dn!==i)return Dn.findByUniqueID(a)}};return Dn=i,i}let lB=0;function cB(){return`astryx-toast-${++lB}`}function uB(){const e=x.use(cx);return x.useCallback(n=>{const s=e??oB(),r=cB(),i={id:r,options:n,createdAt:Date.now()};return s.addToast(i),()=>s.removeToast(r,"manual")},[e])}const pp={base:{k1xSpc:"x1rg5ohu",kaIpWk:"x16rqkct",kmuXW:"x2lah0s",kzqmXN:"x1xc55vz",kZKoxP:"xdk7pt",$$css:!0},pulsing:{kKVMdj:"x1mta51n",k44tkh:"x1c74tu6",kyAemX:"x4hg4is",ko0y90:"xa4qsjk",$$css:!0},reducedMotion:{kjO2d4:"x1aquc0h",$$css:!0}},dB={success:{kWkggS:"xdsz4j9",$$css:!0},warning:{kWkggS:"x1q8g9m5",$$css:!0},error:{kWkggS:"x1pjz0fi",$$css:!0},accent:{kWkggS:"x1ewilqj",$$css:!0},neutral:{kWkggS:"x1q5y3ey",$$css:!0}};function cr({variant:e,label:t,isPulsing:n=!1,tooltip:s,xstyle:r,className:i,style:a,ref:l,...c}){const u=o.jsx("span",{ref:l,role:"img","aria-label":t,...U(P("statusdot",{variant:e}),B(pp.base,dB[e],n&&pp.pulsing,n&&pp.reducedMotion,r),i,a),...c});return s?o.jsx(Fa,{content:s,children:u}):u}cr.displayName="StatusDot";/**
191
- * @license lucide-react v1.52.0 - ISC
192
- *
193
- * This source code is licensed under the ISC license.
194
- * See the LICENSE file in the root directory of this source tree.
195
- */const fB=e=>e==null?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
196
- * @license lucide-react v1.52.0 - ISC
197
- *
198
- * This source code is licensed under the ISC license.
199
- * See the LICENSE file in the root directory of this source tree.
200
- */function hB(e,t,n=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:fB(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}/**
201
- * @license lucide-react v1.52.0 - ISC
202
- *
203
- * This source code is licensed under the ISC license.
204
- * See the LICENSE file in the root directory of this source tree.
205
- */const xB=e=>{let t="",n=!1;for(const s of e){if(s==="-"||s==="_"||s<=" "){n=t.length>0;continue}t.length===0?t+=s.toLowerCase():t+=n?s.toUpperCase():s,n=!1}return t};/**
206
- * @license lucide-react v1.52.0 - ISC
207
- *
208
- * This source code is licensed under the ISC license.
209
- * See the LICENSE file in the root directory of this source tree.
210
- */const pB=e=>{const t=xB(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
211
- * @license lucide-react v1.52.0 - ISC
212
- *
213
- * This source code is licensed under the ISC license.
214
- * See the LICENSE file in the root directory of this source tree.
215
- */const fm=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim();/**
216
- * @license lucide-react v1.52.0 - ISC
217
- *
218
- * This source code is licensed under the ISC license.
219
- * See the LICENSE file in the root directory of this source tree.
220
- */const Vi={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"};/**
221
- * @license lucide-react v1.52.0 - ISC
222
- *
223
- * This source code is licensed under the ISC license.
224
- * See the LICENSE file in the root directory of this source tree.
225
- */function gp(e){return e!=null}function gB(e,t={}){var h,p;const n=t.attributeNames??{},s=m=>n[m]??m,r=e.size??e.width??Vi.width,i=e.size??e.height??Vi.height,a=((h=e.aliases)==null?void 0:h.filter(m=>typeof m=="string"&&m.trim()!=="").map(m=>`lucide-${m}`))??[],l=[...e.name?[`lucide-${e.name}`]:[],...a],c=((p=t.className)==null?void 0:p.split(" ").filter(Boolean))??[],u=t.includeDefaultClasses===!1?fm(...c):fm("lucide",...l,...c),d=t.absoluteStrokeWidth?Number(t.strokeWidth??Vi["stroke-width"])*Number(e.size??e.width??Vi.width)/Number(t.size??t.width??Vi.width):t.strokeWidth??Vi["stroke-width"];return["svg",{...Object.entries(Vi).reduce((m,[b,y])=>(m[s(b)]=y,m),{}),..."color"in t&&t.color&&{[s("stroke")]:t.color},..."size"in t&&gp(t.size)&&{[s("width")]:t.size,[s("height")]:t.size},..."width"in t&&gp(t.width)&&{[s("width")]:t.width},..."height"in t&&gp(t.height)&&{[s("height")]:t.height},[s("stroke-width")]:d,...u&&{[s("class")]:u},[s("viewBox")]:`0 0 ${r} ${i}`,...t.hasA11yProp===!1?{[s("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(m=>{const[b,y,g]=m,k=t.nonScalingStroke?{[s("vector-effect")]:"non-scaling-stroke",...y}:y;return g?[b,k,g]:[b,k]})]}/**
226
- * @license lucide-react v1.52.0 - ISC
227
- *
228
- * This source code is licensed under the ISC license.
229
- * See the LICENSE file in the root directory of this source tree.
230
- */function mB(e,t={}){return gB(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
231
- * @license lucide-react v1.52.0 - ISC
232
- *
233
- * This source code is licensed under the ISC license.
234
- * See the LICENSE file in the root directory of this source tree.
235
- */const yB=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},kB=x.createContext({}),bB=()=>x.useContext(kB),vB=x.forwardRef(({color:e,size:t,width:n,height:s,strokeWidth:r,absoluteStrokeWidth:i,nonScalingStroke:a,className:l="",children:c,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},h)=>{const{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:b=!1,nonScalingStroke:y=!1,color:g="currentColor",className:k=""}=bB()??{},v=!!c||yB(f),[w,j,$=[]]=mB(d,{color:e??g,width:n??t??p,height:s??t??p,strokeWidth:r??m,absoluteStrokeWidth:i??b,nonScalingStroke:a??y,className:fm(k,l),hasA11yProp:v,attributes:f});return x.createElement(w,{ref:h,...j},[...$.map(([C,E])=>x.createElement(C,E)),...Array.isArray(c)?c:[c]])});/**
236
- * @license lucide-react v1.52.0 - ISC
237
- *
238
- * This source code is licensed under the ISC license.
239
- * See the LICENSE file in the root directory of this source tree.
240
- */function Ve(e,t=[],n=[]){const s=typeof e=="string"?hB(e,t,n):e,r=x.forwardRef(({className:i,...a},l)=>x.createElement(vB,{ref:l,icon:s,className:i,...a}));return s.name&&(r.displayName=pB(s.name)),r}/**
241
- * @license lucide-react v1.52.0 - ISC
242
- *
243
- * This source code is licensed under the ISC license.
244
- * See the LICENSE file in the root directory of this source tree.
245
- */const CS={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};CS.node;const wB=Ve(CS);/**
246
- * @license lucide-react v1.52.0 - ISC
247
- *
248
- * This source code is licensed under the ISC license.
249
- * See the LICENSE file in the root directory of this source tree.
250
- */const ES={name:"arrow-up-down",size:24,node:[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]};ES.node;const jB=Ve(ES);/**
251
- * @license lucide-react v1.52.0 - ISC
252
- *
253
- * This source code is licensed under the ISC license.
254
- * See the LICENSE file in the root directory of this source tree.
255
- */const TS={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};TS.node;const SB=Ve(TS);/**
256
- * @license lucide-react v1.52.0 - ISC
257
- *
258
- * This source code is licensed under the ISC license.
259
- * See the LICENSE file in the root directory of this source tree.
260
- */const zS={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"}]]};zS.node;const $B=Ve(zS);/**
261
- * @license lucide-react v1.52.0 - ISC
262
- *
263
- * This source code is licensed under the ISC license.
264
- * See the LICENSE file in the root directory of this source tree.
265
- */const AS={name:"check-check",size:24,node:[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]};AS.node;const CB=Ve(AS);/**
266
- * @license lucide-react v1.52.0 - ISC
267
- *
268
- * This source code is licensed under the ISC license.
269
- * See the LICENSE file in the root directory of this source tree.
270
- */const NS={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};NS.node;const EB=Ve(NS);/**
271
- * @license lucide-react v1.52.0 - ISC
272
- *
273
- * This source code is licensed under the ISC license.
274
- * See the LICENSE file in the root directory of this source tree.
275
- */const MS={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};MS.node;const TB=Ve(MS);/**
276
- * @license lucide-react v1.52.0 - ISC
277
- *
278
- * This source code is licensed under the ISC license.
279
- * See the LICENSE file in the root directory of this source tree.
280
- */const RS={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};RS.node;const zB=Ve(RS);/**
281
- * @license lucide-react v1.52.0 - ISC
282
- *
283
- * This source code is licensed under the ISC license.
284
- * See the LICENSE file in the root directory of this source tree.
285
- */const IS={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};IS.node;const AB=Ve(IS);/**
286
- * @license lucide-react v1.52.0 - ISC
287
- *
288
- * This source code is licensed under the ISC license.
289
- * See the LICENSE file in the root directory of this source tree.
290
- */const _S={name:"chevrons-left",size:24,node:[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]};_S.node;const NB=Ve(_S);/**
291
- * @license lucide-react v1.52.0 - ISC
292
- *
293
- * This source code is licensed under the ISC license.
294
- * See the LICENSE file in the root directory of this source tree.
295
- */const OS={name:"chevrons-right",size:24,node:[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]};OS.node;const MB=Ve(OS);/**
296
- * @license lucide-react v1.52.0 - ISC
297
- *
298
- * This source code is licensed under the ISC license.
299
- * See the LICENSE file in the root directory of this source tree.
300
- */const DS={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"]};DS.node;const RB=Ve(DS);/**
301
- * @license lucide-react v1.52.0 - ISC
302
- *
303
- * This source code is licensed under the ISC license.
304
- * See the LICENSE file in the root directory of this source tree.
305
- */const LS={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"]};LS.node;const IB=Ve(LS);/**
306
- * @license lucide-react v1.52.0 - ISC
307
- *
308
- * This source code is licensed under the ISC license.
309
- * See the LICENSE file in the root directory of this source tree.
310
- */const BS={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};BS.node;const _B=Ve(BS);/**
311
- * @license lucide-react v1.52.0 - ISC
312
- *
313
- * This source code is licensed under the ISC license.
314
- * See the LICENSE file in the root directory of this source tree.
315
- */const qS={name:"columns-2",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],aliases:["columns"]};qS.node;const OB=Ve(qS);/**
316
- * @license lucide-react v1.52.0 - ISC
317
- *
318
- * This source code is licensed under the ISC license.
319
- * See the LICENSE file in the root directory of this source tree.
320
- */const HS={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"}]]};HS.node;const DB=Ve(HS);/**
321
- * @license lucide-react v1.52.0 - ISC
322
- *
323
- * This source code is licensed under the ISC license.
324
- * See the LICENSE file in the root directory of this source tree.
325
- */const PS={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"]};PS.node;const LB=Ve(PS);/**
326
- * @license lucide-react v1.52.0 - ISC
327
- *
328
- * This source code is licensed under the ISC license.
329
- * See the LICENSE file in the root directory of this source tree.
330
- */const US={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"}]]};US.node;const BB=Ve(US);/**
331
- * @license lucide-react v1.52.0 - ISC
332
- *
333
- * This source code is licensed under the ISC license.
334
- * See the LICENSE file in the root directory of this source tree.
335
- */const FS={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"}]]};FS.node;const qB=Ve(FS);/**
336
- * @license lucide-react v1.52.0 - ISC
337
- *
338
- * This source code is licensed under the ISC license.
339
- * See the LICENSE file in the root directory of this source tree.
340
- */const GS={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"]};GS.node;const HB=Ve(GS);/**
341
- * @license lucide-react v1.52.0 - ISC
342
- *
343
- * This source code is licensed under the ISC license.
344
- * See the LICENSE file in the root directory of this source tree.
345
- */const VS={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"}]]};VS.node;const PB=Ve(VS);/**
346
- * @license lucide-react v1.52.0 - ISC
347
- *
348
- * This source code is licensed under the ISC license.
349
- * See the LICENSE file in the root directory of this source tree.
350
- */const WS={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};WS.node;const UB=Ve(WS);/**
351
- * @license lucide-react v1.52.0 - ISC
352
- *
353
- * This source code is licensed under the ISC license.
354
- * See the LICENSE file in the root directory of this source tree.
355
- */const KS={name:"mic",size:24,node:[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]};KS.node;const FB=Ve(KS);/**
356
- * @license lucide-react v1.52.0 - ISC
357
- *
358
- * This source code is licensed under the ISC license.
359
- * See the LICENSE file in the root directory of this source tree.
360
- */const XS={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};XS.node;const GB=Ve(XS);/**
361
- * @license lucide-react v1.52.0 - ISC
362
- *
363
- * This source code is licensed under the ISC license.
364
- * See the LICENSE file in the root directory of this source tree.
365
- */const ZS={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};ZS.node;const VB=Ve(ZS);/**
366
- * @license lucide-react v1.52.0 - ISC
367
- *
368
- * This source code is licensed under the ISC license.
369
- * See the LICENSE file in the root directory of this source tree.
370
- */const YS={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"]};YS.node;const WB=Ve(YS);/**
371
- * @license lucide-react v1.52.0 - ISC
372
- *
373
- * This source code is licensed under the ISC license.
374
- * See the LICENSE file in the root directory of this source tree.
375
- */const QS={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};QS.node;const KB=Ve(QS);/**
376
- * @license lucide-react v1.52.0 - ISC
377
- *
378
- * This source code is licensed under the ISC license.
379
- * See the LICENSE file in the root directory of this source tree.
380
- */const JS={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};JS.node;const XB=Ve(JS);var Fe={size:"1em","aria-hidden":!0},ZB={close:o.jsx(XB,{...Fe}),chevronDown:o.jsx(TB,{...Fe}),chevronLeft:o.jsx(zB,{...Fe}),chevronRight:o.jsx(AB,{...Fe}),chevronsLeft:o.jsx(NB,{...Fe}),chevronsRight:o.jsx(MB,{...Fe}),check:o.jsx(EB,{...Fe}),success:o.jsx(RB,{...Fe}),error:o.jsx(IB,{...Fe}),warning:o.jsx(WB,{...Fe}),info:o.jsx(PB,{...Fe}),calendar:o.jsx($B,{...Fe}),clock:o.jsx(_B,{...Fe}),externalLink:o.jsx(BB,{...Fe}),menu:o.jsx(UB,{...Fe}),moreHorizontal:o.jsx(LB,{...Fe}),search:o.jsx(GB,{...Fe}),arrowUp:o.jsx(SB,{...Fe}),arrowDown:o.jsx(wB,{...Fe}),arrowsUpDown:o.jsx(jB,{...Fe}),funnel:o.jsx(HB,{...Fe}),eyeSlash:o.jsx(qB,{...Fe}),viewColumns:o.jsx(OB,{...Fe}),copy:o.jsx(DB,{...Fe}),checkDouble:o.jsx(CB,{...Fe}),wrench:o.jsx(KB,{...Fe}),stop:o.jsx(VB,{...Fe}),microphone:o.jsx(FB,{...Fe})};const YB={name:"neutral",__built:!0,tokens:{"--font-size-4xs":"0.375rem","--font-size-3xs":"0.4375rem","--font-size-2xs":"0.5rem","--font-size-xs":"0.625rem","--font-size-sm":"0.75rem","--font-size-base":"0.875rem","--font-size-lg":"1.0625rem","--font-size-xl":"1.25rem","--font-size-2xl":"1.5rem","--font-size-3xl":"1.8125rem","--font-size-4xl":"2.1875rem","--font-size-5xl":"2.625rem","--text-heading-1-size":"var(--font-size-2xl)","--text-heading-1-weight":"var(--font-weight-semibold)","--text-heading-1-leading":"1.3333","--text-heading-2-size":"var(--font-size-xl)","--text-heading-2-weight":"var(--font-weight-semibold)","--text-heading-2-leading":"1.4","--text-heading-3-size":"var(--font-size-lg)","--text-heading-3-weight":"var(--font-weight-bold)","--text-heading-3-leading":"1.4118","--text-heading-4-size":"var(--font-size-base)","--text-heading-4-weight":"var(--font-weight-bold)","--text-heading-4-leading":"1.4286","--text-heading-5-size":"var(--font-size-sm)","--text-heading-5-weight":"var(--font-weight-semibold)","--text-heading-5-leading":"1.6667","--text-heading-6-size":"var(--font-size-xs)","--text-heading-6-weight":"var(--font-weight-semibold)","--text-heading-6-leading":"1.6","--text-body-size":"var(--font-size-base)","--text-body-weight":"var(--font-weight-normal)","--text-body-leading":"1.4286","--text-large-size":"var(--font-size-lg)","--text-large-weight":"var(--font-weight-semibold)","--text-large-leading":"1.4118","--text-label-size":"var(--font-size-base)","--text-label-weight":"var(--font-weight-medium)","--text-label-leading":"1.4286","--text-code-size":"var(--font-size-base)","--text-code-weight":"var(--font-weight-normal)","--text-code-leading":"1.4286","--text-supporting-size":"var(--font-size-sm)","--text-supporting-weight":"var(--font-weight-normal)","--text-supporting-leading":"1.6667","--text-display-1-size":"var(--font-size-5xl)","--text-display-1-weight":"var(--font-weight-normal)","--text-display-1-leading":"1.2381","--text-display-2-size":"var(--font-size-4xl)","--text-display-2-weight":"var(--font-weight-normal)","--text-display-2-leading":"1.2571","--text-display-3-size":"var(--font-size-3xl)","--text-display-3-weight":"var(--font-weight-normal)","--text-display-3-leading":"1.3793","--duration-fast-min":"95ms","--duration-fast":"125ms","--duration-fast-max":"165ms","--duration-medium-min":"225ms","--duration-medium":"300ms","--duration-medium-max":"400ms","--duration-slow-min":"525ms","--duration-slow":"700ms","--duration-slow-max":"935ms","--font-family-body":'Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',"--font-family-heading":'Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',"--font-family-code":'ui-monospace, "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace',"--color-syntax-keyword":"light-dark(#700084, #efa8ff)","--color-syntax-string":"light-dark(#005600, #a6d2a2)","--color-syntax-comment":"light-dark(#737373, #a3a3a3)","--color-syntax-number":"light-dark(#6e3500, #ffb37f)","--color-syntax-function":"light-dark(#00458c, #a0caff)","--color-syntax-type":"light-dark(#700084, #efa8ff)","--color-syntax-variable":"light-dark(#171717, #e5e5e5)","--color-syntax-operator":"light-dark(#737373, #a3a3a3)","--color-syntax-constant":"light-dark(#6e3500, #ffb37f)","--color-syntax-tag":"light-dark(#89001a, #ffaeaa)","--color-syntax-attribute":"light-dark(#584400, #eec12f)","--color-syntax-property":"light-dark(#005348, #83dac9)","--color-syntax-punctuation":"light-dark(#a3a3a3, #525252)","--color-syntax-background":"light-dark(#fafafa, #0a0a0a)","--color-background-surface":"light-dark(#ffffff, #262626)","--color-background-body":"light-dark(#f1f1f1, #1b1b1b)","--color-background-card":"light-dark(#ffffff, #1b1b1b)","--color-background-popover":"light-dark(#ffffff, #1b1b1b)","--color-background-muted":"light-dark(#f1f1f1, #1b1b1b)","--color-accent":"light-dark(#262626, #ebebeb)","--color-accent-muted":"light-dark(#f1f1f1, #262626)","--color-neutral":"light-dark(#0000000F, #FFFFFF1A)","--color-overlay":"light-dark(#00000080, #000000CC)","--color-overlay-hover":"light-dark(#0000000D, #FFFFFF0D)","--color-overlay-pressed":"light-dark(#0000001A, #FFFFFF1A)","--color-text-primary":"light-dark(#171717, #fafafa)","--color-text-secondary":"light-dark(#525252, #a3a3a3)","--color-text-disabled":"light-dark(#a3a3a3, #525252)","--color-text-accent":"light-dark(#262626, #ebebeb)","--color-on-dark":"#ffffff","--color-on-light":"#171717","--color-on-accent":"light-dark(#ffffff, #171717)","--color-on-success":"light-dark(#ffffff, #171717)","--color-on-error":"light-dark(#ffffff, #171717)","--color-on-warning":"#171717","--color-icon-accent":"light-dark(#262626, #ebebeb)","--color-icon-primary":"light-dark(#171717, #fafafa)","--color-icon-secondary":"light-dark(#737373, #a3a3a3)","--color-icon-disabled":"light-dark(#a3a3a3, #525252)","--color-success":"light-dark(#007004, #9fe59b)","--color-error":"light-dark(#a50c25, #ffc6c1)","--color-warning":"light-dark(#745b00, #fdcf4f)","--color-success-muted":"light-dark(#c5e5c0, #84c9803D)","--color-error-muted":"light-dark(#facecb, #ff9e973D)","--color-warning-muted":"light-dark(#f8da9d, #deb4333D)","--color-border":"light-dark(#00000014, #FFFFFF1A)","--color-border-emphasized":"light-dark(#d4d4d4, #525252)","--color-skeleton":"light-dark(#ebebeb, #525252)","--color-shadow":"light-dark(#0000001A, #0000004D)","--color-tint-hover":"light-dark(black, white)","--color-background-red":"light-dark(#facecb, #ff9e973D)","--color-border-red":"light-dark(#e6bab8, #ff6f6c)","--color-icon-red":"light-dark(#89001a, #ff9e97)","--color-text-red":"light-dark(#89001a, #ffc6c1)","--color-background-orange":"light-dark(#fad0b5, #ffa2583D)","--color-border-orange":"light-dark(#e6bda2, #e2883e)","--color-icon-orange":"light-dark(#6e3500, #ffa258)","--color-text-orange":"light-dark(#6e3500, #ffc9a2)","--color-background-yellow":"light-dark(#f8da9d, #deb4333D)","--color-border-yellow":"light-dark(#e4c279, #c0990e)","--color-icon-yellow":"light-dark(#584400, #deb433)","--color-text-yellow":"light-dark(#584400, #fdcf4f)","--color-background-green":"light-dark(#c5e5c0, #84c9803D)","--color-border-green":"light-dark(#b2d1ac, #69ad67)","--color-icon-green":"light-dark(#0c5700, #84c980)","--color-text-green":"light-dark(#0c5700, #9fe59b)","--color-background-teal":"light-dark(#a5e3d6, #7ec6b83D)","--color-border-teal":"light-dark(#94d6c8, #63ab9d)","--color-icon-teal":"light-dark(#005348, #7ec6b8)","--color-text-teal":"light-dark(#005348, #99e2d3)","--color-background-cyan":"light-dark(#a3e0ef, #83c2d43D)","--color-border-cyan":"light-dark(#91d3e3, #67a7b8)","--color-icon-cyan":"light-dark(#00505f, #83c2d4)","--color-text-cyan":"light-dark(#00505f, #9edef0)","--color-background-blue":"light-dark(#c4ddfb, #9eb7ff3D)","--color-border-blue":"light-dark(#b1c9e7, #6d9cfe)","--color-icon-blue":"light-dark(#00458c, #9eb7ff)","--color-text-blue":"light-dark(#00458c, #c7d3ff)","--color-background-purple":"light-dark(#eccef3, #f297ff3D)","--color-border-purple":"light-dark(#d8bbdf, #dd74f0)","--color-icon-purple":"light-dark(#700084, #f297ff)","--color-text-purple":"light-dark(#700084, #fac1ff)","--color-background-pink":"light-dark(#fccadc, #ff99c33D)","--color-border-pink":"light-dark(#e7b7c8, #f273aa)","--color-icon-pink":"light-dark(#83004b, #ff99c3)","--color-text-pink":"light-dark(#83004b, #ffc3da)","--color-background-gray":"light-dark(#e5e5e5, var(--color-neutral))","--color-border-gray":"light-dark(#d4d4d4, #262626)","--color-icon-gray":"light-dark(#525252, #a3a3a3)","--color-text-gray":"light-dark(#262626, #e5e5e5)","--radius-none":"0.25rem","--radius-inner":"0.375rem","--radius-element":"0.625rem","--radius-container":"0.75rem","--radius-page":"1.75rem","--radius-full":"9999px","--shadow-low":"0 2px 4px light-dark(oklch(0 0 0 / 5%), oklch(0 0 0 / 25%)), 0 4px 8px light-dark(oklch(0 0 0 / 10%), oklch(0 0 0 / 40%)), inset 0 0 0 1px light-dark(transparent, oklch(1 0 0 / 8%))","--shadow-med":"0 2px 4px light-dark(oklch(0 0 0 / 5%), oklch(0 0 0 / 35%)), 0 4px 12px light-dark(oklch(0 0 0 / 10%), oklch(0 0 0 / 50%)), inset 0 0 0 1px light-dark(transparent, oklch(1 0 0 / 12%))","--shadow-high":"0 4px 6px light-dark(oklch(0 0 0 / 10%), oklch(0 0 0 / 50%)), 0 12px 24px light-dark(oklch(0 0 0 / 15%), oklch(0 0 0 / 70%)), inset 0 0 0 1px light-dark(transparent, oklch(1 0 0 / 15%))","--shadow-inset-hover":"inset 0px 0px 0px 2px #0074e24D","--shadow-inset-selected":"inset 0px 0px 0px 2px #0074e280","--shadow-inset-success":"inset 0px 0px 0px 2px #1981004D","--shadow-inset-warning":"inset 0px 0px 0px 2px #ffce2f4D","--shadow-inset-error":"inset 0px 0px 0px 2px #e33f4a4D"},icons:ZB};function QB(e,t){const n=new Map(t.map(d=>[d.id,d])),s=new Map,r=new Map;for(const d of e.conversations){const f=d.home;if(f.kind==="project"&&!e.projects.some(p=>p.path===f.path))continue;const h=n.get(d.id);h!==void 0&&(r.set(d.id,d),s.set(d.id,{summary:h,children:[]}))}for(const d of t){const f=[d];let h=d;for(;!r.has(h.id);){const p=h.parent===void 0?void 0:n.get(h.parent);if(p===void 0||f.includes(p))break;f.push(p),h=p}if(r.has(h.id))for(let p=f.length-1;p>=0;p--){const m=f[p];if(s.has(m.id)||s.set(m.id,{summary:m,children:[]}),p<f.length-1){const b=s.get(f[p+1].id),y=s.get(m.id);b.children.includes(y)||b.children.push(y)}}}const i=(d,f)=>d.summary.id-f.summary.id,a=d=>l(s.get(d.id)),l=d=>({summary:d.summary,children:[...d.children].sort(i).map(l)}),c=[...r.values()].sort((d,f)=>f.createdAt-d.createdAt),u=c.filter(d=>d.archived!==!0);return{chats:u.filter(d=>d.home.kind==="chat").map(a),projects:[...e.projects].sort((d,f)=>f.addedAt-d.addedAt).map(d=>({project:d,conversations:u.filter(f=>f.home.kind==="project"&&f.home.path===d.path).map(a)})),archived:c.filter(d=>d.archived===!0).map(d=>{const f=d.home,h=f.kind==="project"?e.projects.find(p=>p.path===f.path):void 0;return{node:a(d),...h===void 0?{}:{project:h}}})}}function Ar(e,t){const n=s=>{for(const r of s){if(r.summary.id===t)return r;const i=n(r.children);if(i!==void 0)return i}};return n([...e.chats,...e.projects.flatMap(s=>s.conversations)])}function JB(e,t,n){var l,c;const s=(l=e.checkouts)==null?void 0:l.find(u=>u.conversationId===n);if(s!==void 0)return s;const r=new Map(t.map(u=>[u.id,u])),i=new Set;let a=r.get(n);for(;a!==void 0&&!i.has(a.id);){i.add(a.id);const u=(c=e.checkouts)==null?void 0:c.find(d=>d.conversationId===a.id);if(u!==void 0)return u;a=a.parent===void 0?void 0:r.get(a.parent)}}function eq(e,t,n){const s=e.conversations.find(l=>l.id===n);if(s!==void 0)return s.home;const r=new Map(t.map(l=>[l.id,l])),i=new Set;let a=r.get(n);for(;a!==void 0&&!i.has(a.id);){i.add(a.id);const l=e.conversations.find(c=>c.id===a.id);if(l!==void 0)return l.home;a=a.parent===void 0?void 0:r.get(a.parent)}}const lw={"needs-answer":3,failed:2,running:1};function tq(e){let t;const n=s=>{const r=s.summary.status;r!==void 0&&(t===void 0||lw[r]>lw[t])&&(t=r);for(const i of s.children)n(i)};return n(e),t}function e7(e){let t;const n=s=>{const r=s.summary.updatedAt;r!==void 0&&(t===void 0||r>t)&&(t=r);for(const i of s.children)n(i)};return n(e),t}function _x(e,t){const n=Math.max(0,Math.floor((t-e)/1e3));if(n<60)return"now";const s=Math.floor(n/60);if(s<60)return`${s}m`;const r=Math.floor(s/60);return r<24?`${r}h`:`${Math.floor(r/24)}d`}const nq=/^\s*in the working directory\s+\S+,\s*/i;function ks(e){var n;if(e===void 0)return"Conversation";if(e.kind!=="subagent")return e.title??"New conversation";if(e.label!==void 0)return e.label;const t=(n=e.title)==null?void 0:n.replace(nq,"").trim();return t===void 0||t===""?"Subagent":t}function t7(e,t){let n=Ar(e,t);for(let s=0;n!==void 0&&n.summary.parent!==void 0&&s<4;s++)n=Ar(e,n.summary.parent);return n}function n7(e){const t=[],n=s=>{for(const r of s.children)r.summary.kind==="fork"&&(t.push(r),n(r))};return n(e),t}function sq(e){const t=[],n=e.children.filter(s=>s.summary.kind==="subagent");n.length>0&&t.push({owner:e.summary,label:"This conversation",tasks:[...n]});for(const s of n7(e)){const r=s.children.filter(i=>i.summary.kind==="subagent");r.length>0&&t.push({owner:s.summary,label:ks(s.summary),tasks:[...r]})}return t}function s7(e,t,n){var s;return(((s=Ar(e,t))==null?void 0:s.children)??[]).filter(r=>r.summary.forkedAt===n).map(r=>r.summary.id)}function $l(){typeof Notification>"u"||Notification.permission!=="default"||Notification.requestPermission()}const rq=e=>{const t=[],n=s=>{t.push(s.summary);for(const r of s.children)n(r)};for(const s of[...e.chats,...e.projects.flatMap(r=>r.conversations)])n(s);return t};function iq(e,t){const n=[],s=[],r=new Map;for(const i of rq(t)){if(r.set(i.id,i.status),e===void 0)continue;const a=e.get(i.id);if(a!==i.status&&s.push(i.id),i.status==="needs-answer"&&a!=="needs-answer"){n.push({id:i.id,title:ks(i),body:"Waiting for your answer"});continue}(a==="running"||a==="needs-answer")&&(i.status===void 0||i.status==="failed")&&i.kind!=="subagent"&&n.push({id:i.id,title:ks(i),body:i.status==="failed"?"Failed":"Finished"})}if(e!==void 0)for(const i of e.keys())r.has(i)||s.push(i);return{notices:n,changed:s,baseline:r}}function aq(e,t){const n=x.useRef(void 0),s=x.useRef(new Map),r=x.useRef(t);r.current=t,x.useEffect(()=>{var c;if(e.connection!=="connected")return;const{notices:i,changed:a,baseline:l}=iq(n.current,e.organized);n.current=l;for(const u of a)(c=s.current.get(u))==null||c.close(),s.current.delete(u);if(!(typeof Notification>"u"||Notification.permission!=="granted"))for(const u of i){if(document.visibilityState==="visible"&&document.hasFocus())continue;const d=new Notification(u.title,{body:u.body,tag:`pinomad-conversation-${u.id}`});s.current.set(u.id,d),d.onclose=()=>{s.current.get(u.id)===d&&s.current.delete(u.id)},d.onclick=()=>{window.focus(),r.current(u.id),d.close(),s.current.get(u.id)===d&&s.current.delete(u.id)}}},[e.connection,e.organized])}function oq(e){return typeof e=="string"?e:e.flatMap(t=>t.type==="text"&&t.text!==void 0?[t.text]:[]).join("")}function lq(e){return typeof e=="string"||!Array.isArray(e)?0:e.filter(t=>t.type==="image").length}const cq=e=>e.docs["pi.live"]??{},r7=e=>e.docs["pi.agent"]??{};function uq(e){var r;const t=cq(e),n=t.generation,s=(r=t.compactions)==null?void 0:r[0];return(n==null?void 0:n.retry)!==void 0?`Retrying (attempt ${n.attempt+1}): ${n.retry.error}`:(n==null?void 0:n.deferred)!==void 0?"Waiting for deferred response...":s!==void 0?s.retry?`Retrying ${s.reason} compaction (attempt ${s.attempt+1})...`:`Compacting (${s.reason})...`:""}function dq(e){return(e.docs["pi.inbox"]??{items:[]}).items.map(n=>({id:n.id,mode:n.mode,text:n.mode==="write"?`<${String(n.entry.kind)}>`:oq(n.content),imageCount:n.mode==="write"?0:lq(n.content)}))}function fq(e){const t=e.state,n=t.status==="waiting"?`waiting on ${t.on.join(", ")}`:t.status==="completing"?`completing (${t.outcome})`:`${t.status} ${t.phase}`,s=[e.background?"background":"",e.abortRequested?"aborting":""].filter(Boolean),r=e.conversations.length>0?` owns conversation ${e.conversations.join(", ")}`:"";return`${e.kind} #${e.id}: ${n}${s.length>0?` [${s.join(", ")}]`:""}${r}`}function hq(e){const t=e.docs["pi.usage"];return t===void 0?[]:[...Object.entries(t.models),...Object.entries(t.tools)].map(([n,s])=>({key:n,input:s.input,output:s.output,cost:s.cost.total}))}function i7(e){const t=Object.values(e.tasks),n=new Set(t.flatMap(a=>a.conversations)),s=a=>t.filter(l=>l.owner===a.id||l.owner===void 0&&a.conversations.includes(l.conversationId)),r=[],i=(a,l)=>{r.push({id:a.id,depth:l,label:fq(a)});for(const c of s(a))i(c,l+1)};for(const a of t)a.owner===void 0&&!n.has(a.conversationId)&&i(a,0);return r}const xq="92px";function pq(e){var n;return(typeof document>"u"||(n=document.documentElement)==null?void 0:n.dataset.pinomadPlatform)==="darwin"?"darwin":"other"}function a7(e=pq()){return e==="darwin"?{platform:e,reserveMacTrafficLights:!0,safeLeft:xq}:{platform:e,reserveMacTrafficLights:!1,safeLeft:"0px"}}const gq={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none"},o7=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n,absoluteStrokeWidth:s=!1,className:r="",altIcon:i,showAlt:a=!1,icon:l,primaryColor:c,secondaryColor:u,disableSecondaryOpacity:d=!1,...f},h)=>{const p=n!==void 0?s?Number(n)*24/Number(t):n:void 0,m=p!==void 0?{strokeWidth:p,stroke:"currentColor"}:{},b={ref:h,...gq,width:t,height:t,color:c||e,className:r,...m,...f},g=[...a&&i?i:l].sort(([,k],[,v])=>{const w=k.opacity!==void 0;return v.opacity!==void 0?1:w?-1:0}).map(([k,v])=>{const w=v.opacity!==void 0,j=w&&!d?v.opacity:void 0,$=u?{...v.stroke!==void 0?{stroke:w?u:c||e}:{fill:w?u:c||e}}:{};return x.createElement(k,{...v,...m,...$,opacity:j,key:v.key})});return x.createElement("svg",b,g)});o7.displayName="HugeiconsIcon";const mq=[["path",{d:"M12.001 5.00003V19.002",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19.002 12.002L4.99998 12.002",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],yq=[["path",{d:"M13 2H11C7.22876 2 5.34315 2 4.17157 3.17157C3 4.34315 3 6.22876 3 10V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H13C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V10C21 6.22876 21 4.34315 19.8284 3.17157C18.6569 2 16.7712 2 13 2Z",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M21 12H3",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M15 7H9",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M15 17H9",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"3"}]],kq=[["path",{d:"M15 6C15 6 9.00001 10.4189 9 12C8.99999 13.5812 15 18 15 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],bq=[["path",{d:"M12 5.5V19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M18 11C18 11 13.5811 5.00001 12 5C10.4188 4.99999 6 11 6 11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],vq=[["path",{d:"M21.5 12C21.5 17.2467 17.2467 21.5 12 21.5C10.3719 21.5 8.8394 21.0904 7.5 20.3687C5.63177 19.362 4.37462 20.2979 3.26592 20.4658C3.09774 20.4913 2.93024 20.4302 2.80997 20.31C2.62741 20.1274 2.59266 19.8451 2.6935 19.6074C3.12865 18.5818 3.5282 16.6382 2.98341 15C2.6698 14.057 2.5 13.0483 2.5 12C2.5 6.75329 6.75329 2.5 12 2.5C17.2467 2.5 21.5 6.75329 21.5 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12.1257 12H12.0007M8.125 12H8M16.125 12H16M12.2507 12C12.2507 12.1381 12.1388 12.25 12.0007 12.25C11.8627 12.25 11.7507 12.1381 11.7507 12C11.7507 11.8619 11.8627 11.75 12.0007 11.75C12.1388 11.75 12.2507 11.8619 12.2507 12ZM8.25 12C8.25 12.1381 8.13807 12.25 8 12.25C7.86193 12.25 7.75 12.1381 7.75 12C7.75 11.8619 7.86193 11.75 8 11.75C8.13807 11.75 8.25 11.8619 8.25 12ZM16.25 12C16.25 12.1381 16.1381 12.25 16 12.25C15.8619 12.25 15.75 12.1381 15.75 12C15.75 11.8619 15.8619 11.75 16 11.75C16.1381 11.75 16.25 11.8619 16.25 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],wq=[["path",{d:"M2 10.5C2 9.72921 2.01346 8.97679 2.03909 8.2503C2.12282 5.87683 2.16469 4.69009 3.13007 3.71745C4.09545 2.74481 5.3157 2.6926 7.7562 2.58819C9.09517 2.5309 10.5209 2.5 12 2.5C13.4791 2.5 14.9048 2.5309 16.2438 2.58819C18.6843 2.6926 19.9046 2.74481 20.8699 3.71745C21.8353 4.69009 21.8772 5.87683 21.9609 8.2503C21.9865 8.97679 22 9.72921 22 10.5C22 11.2708 21.9865 12.0232 21.9609 12.7497C21.8772 15.1232 21.8353 16.3099 20.8699 17.2826C19.9046 18.2552 18.6843 18.3074 16.2437 18.4118C15.5098 18.4432 14.7498 18.4667 13.9693 18.4815C13.2282 18.4955 12.8576 18.5026 12.532 18.6266C12.2064 18.7506 11.9325 18.9855 11.3845 19.4553L9.20503 21.3242C9.07273 21.4376 8.90419 21.5 8.72991 21.5C8.32679 21.5 8 21.1732 8 20.7701V18.4219C7.91842 18.4186 7.83715 18.4153 7.75619 18.4118C5.31569 18.3074 4.09545 18.2552 3.13007 17.2825C2.16469 16.3099 2.12282 15.1232 2.03909 12.7497C2.01346 12.0232 2 11.2708 2 10.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15.5 10.5H8.5M12 7V14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],jq=[["path",{d:"M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Sq=[["path",{d:"M9.00005 18C9.00005 18 15 13.5811 15 12C15 10.4188 9 6 9 6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],$q=[["path",{d:"M14 21H16M14 21C13.1716 21 12.5 20.3284 12.5 19.5V17L12 17M14 21H10M10 21H8M10 21C10.8284 21 11.5 20.3284 11.5 19.5V17L12 17M12 17V21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16 3H8C5.17157 3 3.75736 3 2.87868 3.87868C2 4.75736 2 6.17157 2 9V11C2 13.8284 2 15.2426 2.87868 16.1213C3.75736 17 5.17157 17 8 17H16C18.8284 17 20.2426 17 21.1213 16.1213C22 15.2426 22 13.8284 22 11V9C22 6.17157 22 4.75736 21.1213 3.87868C20.2426 3 18.8284 3 16 3Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Cq=[["path",{d:"M7.5 7.5L8.72654 8.55719C9.24218 9.00163 9.5 9.22386 9.5 9.5C9.5 9.77614 9.24218 9.99836 8.72654 10.4428L7.5 11.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M11.5 12.5H15.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12 21C15.7497 21 17.6246 21 18.9389 20.0451C19.3634 19.7367 19.7367 19.3634 20.0451 18.9389C21 17.6246 21 15.7497 21 12C21 8.25027 21 6.3754 20.0451 5.06107C19.7367 4.6366 19.3634 4.26331 18.9389 3.95491C17.6246 3 15.7497 3 12 3C8.25027 3 6.3754 3 5.06107 3.95491C4.6366 4.26331 4.26331 4.6366 3.95491 5.06107C3 6.3754 3 8.25027 3 12C3 15.7497 3 17.6246 3.95491 18.9389C4.26331 19.3634 4.6366 19.7367 5.06107 20.0451C6.3754 21 8.25027 21 12 21Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Eq=[["path",{d:"M9 15C9 12.1716 9 10.7574 9.87868 9.87868C10.7574 9 12.1716 9 15 9L16 9C18.8284 9 20.2426 9 21.1213 9.87868C22 10.7574 22 12.1716 22 15V16C22 18.8284 22 20.2426 21.1213 21.1213C20.2426 22 18.8284 22 16 22H15C12.1716 22 10.7574 22 9.87868 21.1213C9 20.2426 9 18.8284 9 16L9 15Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16.9999 9C16.9975 6.04291 16.9528 4.51121 16.092 3.46243C15.9258 3.25989 15.7401 3.07418 15.5376 2.90796C14.4312 2 12.7875 2 9.5 2C6.21252 2 4.56878 2 3.46243 2.90796C3.25989 3.07417 3.07418 3.25989 2.90796 3.46243C2 4.56878 2 6.21252 2 9.5C2 12.7875 2 14.4312 2.90796 15.5376C3.07417 15.7401 3.25989 15.9258 3.46243 16.092C4.51121 16.9528 6.04291 16.9975 9 16.9999",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Tq=[["path",{d:"M19.5 5.5L18.8803 15.5251C18.7219 18.0864 18.6428 19.3671 18.0008 20.2879C17.6833 20.7431 17.2747 21.1273 16.8007 21.416C15.8421 22 14.559 22 11.9927 22C9.42312 22 8.1383 22 7.17905 21.4149C6.7048 21.1257 6.296 20.7408 5.97868 20.2848C5.33688 19.3626 5.25945 18.0801 5.10461 15.5152L4.5 5.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3 5.5H21M16.0557 5.5L15.3731 4.09173C14.9196 3.15626 14.6928 2.68852 14.3017 2.39681C14.215 2.3321 14.1231 2.27454 14.027 2.2247C13.5939 2 13.0741 2 12.0345 2C10.9688 2 10.436 2 9.99568 2.23412C9.8981 2.28601 9.80498 2.3459 9.71729 2.41317C9.32164 2.7167 9.10063 3.20155 8.65861 4.17126L8.05292 5.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M9.5 16.5L9.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M14.5 16.5L14.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"3"}]],zq=[["path",{d:"M8 7L16 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 11L12 11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M13 21.5V21C13 18.1716 13 16.7574 13.8787 15.8787C14.7574 15 16.1716 15 19 15H19.5M20 13.3431V10C20 6.22876 20 4.34315 18.8284 3.17157C17.6569 2 15.7712 2 12 2C8.22877 2 6.34315 2 5.17157 3.17157C4 4.34314 4 6.22876 4 10L4 14.5442C4 17.7892 4 19.4117 4.88607 20.5107C5.06508 20.7327 5.26731 20.9349 5.48933 21.1139C6.58831 22 8.21082 22 11.4558 22C12.1614 22 12.5141 22 12.8372 21.886C12.9044 21.8623 12.9702 21.835 13.0345 21.8043C13.3436 21.6564 13.593 21.407 14.0919 20.9081L18.8284 16.1716C19.4065 15.5935 19.6955 15.3045 19.8478 14.9369C20 14.5694 20 14.1606 20 13.3431Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Aq=[["path",{d:"M5.9925 12V18M9 14.9925L3 14.9925",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3 22H9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M13 22C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V10.6569C21 9.83935 21 9.4306 20.8478 9.06306C20.6955 8.69552 20.4065 8.40649 19.8284 7.82843L15.0919 3.09188C14.593 2.593 14.3436 2.34355 14.0345 2.19575C13.9702 2.165 13.9044 2.13772 13.8372 2.11401C13.5141 2 13.1614 2 12.4558 2C9.21082 2 7.58831 2 6.48933 2.88607C6.26732 3.06508 6.06508 3.26731 5.88608 3.48933C5.14374 4.41003 5.02332 5.69818 5.00378 8M14 2.5V3C14 5.82843 14 7.24264 14.8787 8.12132C15.7574 9 17.1716 9 20 9H20.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Nq=[["path",{d:"M8 7H16.75C18.8567 7 19.91 7 20.6667 7.50559C20.9943 7.72447 21.2755 8.00572 21.4944 8.33329C22 9.08996 22 10.1433 22 12.25C22 15.7612 22 17.5167 21.1573 18.7779C20.7926 19.3238 20.3238 19.7926 19.7779 20.1573C18.5167 21 16.7612 21 13.25 21H12C7.28595 21 4.92893 21 3.46447 19.5355C2 18.0711 2 15.714 2 11V7.94427C2 6.1278 2 5.21956 2.38032 4.53806C2.65142 4.05227 3.05227 3.65142 3.53806 3.38032C4.21956 3 5.1278 3 6.94427 3C8.10802 3 8.6899 3 9.19926 3.19101C10.3622 3.62712 10.8418 4.68358 11.3666 5.73313L12 7",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}]],Mq=[["path",{d:"M2 19V7.54902C2 6.10516 2 5.38322 2.24332 4.81647C2.5467 4.10985 3.10985 3.5467 3.81647 3.24332C4.38322 3 5.09805 3 6.54902 3H7.04311C7.64819 3 8.22075 3.27394 8.60041 3.74509L10.4175 6M10.4175 6H16C17.4001 6 18.1002 6 18.635 6.27248C19.1054 6.51217 19.4878 6.89462 19.7275 7.36502C20 7.8998 20 8.59987 20 10V11M10.4175 6H7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3.15802 15.5144L3.45643 14.7717C4.19029 12.9449 4.55723 12.0316 5.3224 11.5158C6.08757 11 7.07557 11 9.05157 11H17.1119C19.8004 11 21.1446 11 21.7422 11.8787C22.3397 12.7575 21.8405 14.0002 20.842 16.4856L20.5436 17.2283C19.8097 19.0551 19.4428 19.9684 18.6776 20.4842C17.9124 21 16.9244 21 14.9484 21H6.88812C4.19961 21 2.85535 21 2.25782 20.1213C1.66029 19.2425 2.15953 17.9998 3.15802 15.5144Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Rq=[["path",{d:"M16.2627 10.5H7.73725C5.15571 10.5 3.86494 10.5 3.27143 11.3526C2.67793 12.2052 3.11904 13.4258 4.00126 15.867L5.08545 18.867C5.54545 20.1398 5.77545 20.7763 6.2889 21.1381C6.80235 21.5 7.47538 21.5 8.82143 21.5H15.1786C16.5246 21.5 17.1976 21.5 17.7111 21.1381C18.2245 20.7763 18.4545 20.1398 18.9146 18.867L19.9987 15.867C20.881 13.4258 21.3221 12.2052 20.7286 11.3526C20.1351 10.5 18.8443 10.5 16.2627 10.5Z",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"1.5",key:"0"}],["path",{d:"M19 8C19 7.53406 19 7.30109 18.9239 7.11732C18.8224 6.87229 18.6277 6.67761 18.3827 6.57612C18.1989 6.5 17.9659 6.5 17.5 6.5H6.5C6.03406 6.5 5.80109 6.5 5.61732 6.57612C5.37229 6.67761 5.17761 6.87229 5.07612 7.11732C5 7.30109 5 7.53406 5 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M16.5 4C16.5 3.53406 16.5 3.30109 16.4239 3.11732C16.3224 2.87229 16.1277 2.67761 15.8827 2.57612C15.6989 2.5 15.4659 2.5 15 2.5H9C8.53406 2.5 8.30109 2.5 8.11732 2.57612C7.87229 2.67761 7.67761 2.87229 7.57612 3.11732C7.5 3.30109 7.5 3.53406 7.5 4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Iq=[["path",{d:"M7 19H13C15.8284 19 17.2426 19 18.1213 18.1213C19 17.2426 19 15.8284 19 13V10M19 10C19.7002 10 21.0085 11.9943 21.5 12.5M19 10C18.2998 10 16.9915 11.9943 16.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M5 7L5 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["circle",{cx:"5",cy:"5",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"2"}],["circle",{cx:"19",cy:"5",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"3"}],["circle",{cx:"5",cy:"19",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"4"}]],_q=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 12C8 18 12 22 12 22C12 22 16 18 16 12C16 6 12 2 12 2C12 2 8 6 8 12Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M21 15H3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M21 9H3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],Oq=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 16V12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12.125 8.25H12M12.25 8.25C12.25 8.11193 12.1381 8 12 8C11.8619 8 11.75 8.11193 11.75 8.25C11.75 8.38807 11.8619 8.5 12 8.5C12.1381 8.5 12.25 8.38807 12.25 8.25Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Dq=[["path",{d:"M15.5 14.5C18.8137 14.5 21.5 11.8137 21.5 8.5C21.5 5.18629 18.8137 2.5 15.5 2.5C12.1863 2.5 9.5 5.18629 9.5 8.5C9.5 9.38041 9.68962 10.2165 10.0303 10.9697L2.5 18.5V21.5H5.5V19.5H7.5V17.5H9.5L13.0303 13.9697C13.7835 14.3104 14.6196 14.5 15.5 14.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M17.5 6.5L16.5 7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Lq=[["path",{d:"M12 8H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 12H17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12 20H17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M12 16H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M3 4V11C3 12.8692 3 13.8038 3.40192 14.5C3.66523 14.9561 4.04394 15.3348 4.5 15.5981C5.19615 16 6.13077 16 8 16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M8 8H7C6.07003 8 5.60504 8 5.22354 7.89778C4.18827 7.62038 3.37962 6.81173 3.10222 5.77646C3 5.39496 3 4.92997 3 4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}]],Bq=[["path",{d:"M6.00449 12.5V12M18.0045 12.5V12M12.0045 12.5V12M7.00449 12.5C7.00449 11.9477 6.55677 11.5 6.00449 11.5C5.4522 11.5 5.00449 11.9477 5.00449 12.5C5.00449 13.0523 5.4522 13.5 6.00449 13.5C6.55677 13.5 7.00449 13.0523 7.00449 12.5ZM19.0045 12.5C19.0045 11.9477 18.5568 11.5 18.0045 11.5C17.4522 11.5 17.0045 11.9477 17.0045 12.5C17.0045 13.0523 17.4522 13.5 18.0045 13.5C18.5568 13.5 19.0045 13.0523 19.0045 12.5ZM13.0045 12.5C13.0045 11.9477 12.5568 11.5 12.0045 11.5C11.4522 11.5 11.0045 11.9477 11.0045 12.5C11.0045 13.0523 11.4522 13.5 12.0045 13.5C12.5568 13.5 13.0045 13.0523 13.0045 12.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],qq=[["path",{d:"M15.2141 5.98239L16.6158 4.58063C17.39 3.80646 18.6452 3.80646 19.4194 4.58063C20.1935 5.3548 20.1935 6.60998 19.4194 7.38415L18.0176 8.78591M15.2141 5.98239L6.98023 14.2163C5.93493 15.2616 5.41226 15.7842 5.05637 16.4211C4.70047 17.058 4.3424 18.5619 4 20C5.43809 19.6576 6.94199 19.2995 7.57889 18.9436C8.21579 18.5877 8.73844 18.0651 9.78375 17.0198L18.0176 8.78591M15.2141 5.98239L18.0176 8.78591",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M11 20H17",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}]],Hq=[["path",{d:"M12.828 6.00096C12.9388 5.68791 12.999 5.35099 12.999 5C12.999 3.34315 11.6559 2 9.99904 2C8.34219 2 6.99904 3.34315 6.99904 5C6.99904 5.35099 7.05932 5.68791 7.17008 6.00096C4.88532 6.0093 3.66601 6.09039 2.87772 6.87868C2.08951 7.66689 2.00836 8.88603 2 11.1704C2.31251 11.06 2.64876 11 2.99904 11C4.6559 11 5.99904 12.3431 5.99904 14C5.99904 15.6569 4.6559 17 2.99904 17C2.64876 17 2.31251 16.94 2 16.8296C2.00836 19.114 2.08951 20.3331 2.87772 21.1213C3.66593 21.9095 4.88508 21.9907 7.16941 21.999C7.05908 21.6865 6.99904 21.3503 6.99904 21C6.99904 19.3431 8.34219 18 9.99904 18C11.6559 18 12.999 19.3431 12.999 21C12.999 21.3503 12.939 21.6865 12.8287 21.999C15.113 21.9907 16.3322 21.9095 17.1204 21.1213C17.9086 20.333 17.9897 19.1137 17.9981 16.829C18.3111 16.9397 18.648 17 18.999 17C20.6559 17 21.999 15.6569 21.999 14C21.999 12.3431 20.6559 11 18.999 11C18.648 11 18.3111 11.0603 17.9981 11.171C17.9897 8.88627 17.9086 7.66697 17.1204 6.87868C16.3321 6.09039 15.1128 6.0093 12.828 6.00096Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Pq=[["path",{d:"M20.0092 2V5.13219C20.0092 5.42605 19.6418 5.55908 19.4537 5.33333C17.6226 3.2875 14.9617 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Uq=[["path",{d:"M12 4V2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M20 22C20 17.5817 16.4183 14 12 14C7.58172 14 4 17.5817 4 22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M9.375 8.25H9.25M9.5 8.25C9.5 8.38807 9.38807 8.5 9.25 8.5C9.11193 8.5 9 8.38807 9 8.25C9 8.11193 9.11193 8 9.25 8C9.38807 8 9.5 8.11193 9.5 8.25Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M14.875 8.25H14.75M15 8.25C15 8.38807 14.8881 8.5 14.75 8.5C14.6119 8.5 14.5 8.38807 14.5 8.25C14.5 8.11193 14.6119 8 14.75 8C14.8881 8 15 8.11193 15 8.25Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M15.1538 4H8.84615C7.59095 4 6.96334 4 6.47397 4.22025C5.91693 4.47095 5.47095 4.91693 5.22025 5.47397C5 5.96334 5 6.59095 5 7.84615C5 9.85448 5 10.8586 5.3524 11.6417C5.75353 12.5329 6.46709 13.2465 7.35835 13.6476C8.14135 14 9.14552 14 11.1538 14H12.8462C14.8545 14 15.8586 14 16.6417 13.6476C17.5329 13.2465 18.2465 12.5329 18.6476 11.6417C19 10.8586 19 9.85448 19 7.84615C19 6.59095 19 5.96334 18.7797 5.47397C18.529 4.91693 18.0831 4.47095 17.526 4.22025C17.0367 4 16.4091 4 15.1538 4Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}]],Fq=[["path",{d:"M17 17L21 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19C15.4183 19 19 15.4183 19 11Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Gq=[["path",{d:"M21.3175 7.14139L20.8239 6.28479C20.4506 5.63696 20.264 5.31305 19.9464 5.18388C19.6288 5.05472 19.2696 5.15664 18.5513 5.36048L17.3311 5.70418C16.8725 5.80994 16.3913 5.74994 15.9726 5.53479L15.6357 5.34042C15.2766 5.11043 15.0004 4.77133 14.8475 4.37274L14.5136 3.37536C14.294 2.71534 14.1842 2.38533 13.9228 2.19657C13.6615 2.00781 13.3143 2.00781 12.6199 2.00781H11.5051C10.8108 2.00781 10.4636 2.00781 10.2022 2.19657C9.94085 2.38533 9.83106 2.71534 9.61149 3.37536L9.27753 4.37274C9.12465 4.77133 8.84845 5.11043 8.48937 5.34042L8.15249 5.53479C7.73374 5.74994 7.25259 5.80994 6.79398 5.70418L5.57375 5.36048C4.85541 5.15664 4.49625 5.05472 4.17867 5.18388C3.86109 5.31305 3.67445 5.63696 3.30115 6.28479L2.80757 7.14139C2.45766 7.74864 2.2827 8.05227 2.31666 8.37549C2.35061 8.69871 2.58483 8.95918 3.05326 9.48012L4.0843 10.6328C4.3363 10.9518 4.51521 11.5078 4.51521 12.0077C4.51521 12.5078 4.33636 13.0636 4.08433 13.3827L3.05326 14.5354C2.58483 15.0564 2.35062 15.3168 2.31666 15.6401C2.2827 15.9633 2.45766 16.2669 2.80757 16.8741L3.30114 17.7307C3.67443 18.3785 3.86109 18.7025 4.17867 18.8316C4.49625 18.9608 4.85542 18.8589 5.57377 18.655L6.79394 18.3113C7.25263 18.2055 7.73387 18.2656 8.15267 18.4808L8.4895 18.6752C8.84851 18.9052 9.12464 19.2442 9.2775 19.6428L9.61149 20.6403C9.83106 21.3003 9.94085 21.6303 10.2022 21.8191C10.4636 22.0078 10.8108 22.0078 11.5051 22.0078H12.6199C13.3143 22.0078 13.6615 22.0078 13.9228 21.8191C14.1842 21.6303 14.294 21.3003 14.5136 20.6403L14.8476 19.6428C15.0004 19.2442 15.2765 18.9052 15.6356 18.6752L15.9724 18.4808C16.3912 18.2656 16.8724 18.2055 17.3311 18.3113L18.5513 18.655C19.2696 18.8589 19.6288 18.9608 19.9464 18.8316C20.264 18.7025 20.4506 18.3785 20.8239 17.7307L21.3175 16.8741C21.6674 16.2669 21.8423 15.9633 21.8084 15.6401C21.7744 15.3168 21.5402 15.0564 21.0718 14.5354L20.0407 13.3827C19.7887 13.0636 19.6098 12.5078 19.6098 12.0077C19.6098 11.5078 19.7888 10.9518 20.0407 10.6328L21.0718 9.48012C21.5402 8.95918 21.7744 8.69871 21.8084 8.37549C21.8423 8.05227 21.6674 7.74864 21.3175 7.14139Z",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15.5195 12C15.5195 13.933 13.9525 15.5 12.0195 15.5C10.0865 15.5 8.51953 13.933 8.51953 12C8.51953 10.067 10.0865 8.5 12.0195 8.5C13.9525 8.5 15.5195 10.067 15.5195 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}]],Vq=[["path",{d:"M15 2L15.5387 4.39157C15.9957 6.42015 17.5798 8.00431 19.6084 8.46127L22 9L19.6084 9.53873C17.5798 9.99569 15.9957 11.5798 15.5387 13.6084L15 16L14.4613 13.6084C14.0043 11.5798 12.4202 9.99569 10.3916 9.53873L8 9L10.3916 8.46127C12.4201 8.00431 14.0043 6.42015 14.4613 4.39158L15 2Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M7 12L7.38481 13.7083C7.71121 15.1572 8.84275 16.2888 10.2917 16.6152L12 17L10.2917 17.3848C8.84275 17.7112 7.71121 18.8427 7.38481 20.2917L7 22L6.61519 20.2917C6.28879 18.8427 5.15725 17.7112 3.70827 17.3848L2 17L3.70827 16.6152C5.15725 16.2888 6.28879 15.1573 6.61519 13.7083L7 12Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Wq=[["path",{d:"M2 11.5C2 12.6046 2.89543 13.5 4 13.5C5.65685 13.5 7 12.1569 7 10.5V6.5C7 4.84315 5.65685 3.5 4 3.5C2.89543 3.5 2 4.39543 2 5.5V11.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15.4787 16.1937L15.2124 15.3337C14.9942 14.6289 14.8851 14.2765 14.969 13.9982C15.0369 13.7731 15.1859 13.579 15.389 13.4513C15.64 13.2935 16.0197 13.2935 16.7791 13.2935H17.1831C19.7532 13.2935 21.0382 13.2935 21.6452 12.5327C21.7145 12.4458 21.7762 12.3533 21.8296 12.2563C22.2965 11.4079 21.7657 10.2649 20.704 7.9789C19.7297 5.88111 19.2425 4.83222 18.338 4.21485C18.2505 4.15508 18.1605 4.0987 18.0683 4.04586C17.116 3.5 15.9362 3.5 13.5764 3.5H13.0646C10.2057 3.5 8.77628 3.5 7.88814 4.36053C7 5.22106 7 6.60607 7 9.37607V10.3497C7 11.8054 7 12.5332 7.25834 13.1994C7.51668 13.8656 8.01135 14.4134 9.00069 15.5089L13.0921 20.0394C13.1947 20.1531 13.246 20.2099 13.2913 20.2493C13.7135 20.6167 14.3652 20.5754 14.7344 20.1577C14.774 20.1129 14.8172 20.0501 14.9036 19.9245C15.0388 19.728 15.1064 19.6297 15.1654 19.5323C15.6928 18.6609 15.8524 17.6256 15.6108 16.6429C15.5838 16.5331 15.5488 16.4199 15.4787 16.1937Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Kq=[["path",{d:"M2 12.5C2 11.3954 2.89543 10.5 4 10.5C5.65685 10.5 7 11.8431 7 13.5V17.5C7 19.1569 5.65685 20.5 4 20.5C2.89543 20.5 2 19.6046 2 18.5V12.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15.4787 7.80626L15.2124 8.66634C14.9942 9.37111 14.8851 9.72349 14.969 10.0018C15.0369 10.2269 15.1859 10.421 15.389 10.5487C15.64 10.7065 16.0197 10.7065 16.7791 10.7065H17.1831C19.7532 10.7065 21.0382 10.7065 21.6452 11.4673C21.7145 11.5542 21.7762 11.6467 21.8296 11.7437C22.2965 12.5921 21.7657 13.7351 20.704 16.0211C19.7297 18.1189 19.2425 19.1678 18.338 19.7852C18.2505 19.8449 18.1605 19.9013 18.0683 19.9541C17.116 20.5 15.9362 20.5 13.5764 20.5H13.0646C10.2057 20.5 8.77628 20.5 7.88814 19.6395C7 18.7789 7 17.3939 7 14.6239V13.6503C7 12.1946 7 11.4668 7.25834 10.8006C7.51668 10.1344 8.01135 9.58664 9.00069 8.49112L13.0921 3.96056C13.1947 3.84694 13.246 3.79012 13.2913 3.75075C13.7135 3.38328 14.3652 3.42464 14.7344 3.84235C14.774 3.8871 14.8172 3.94991 14.9036 4.07554C15.0388 4.27205 15.1064 4.37031 15.1654 4.46765C15.6928 5.33913 15.8524 6.37436 15.6108 7.35715C15.5838 7.46692 15.5488 7.5801 15.4787 7.80626Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Xq=[["path",{d:"M5 14L8.5 17.5L19 6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Zq=[["path",{d:"M17 8.5C17 5.73858 14.7614 3.5 12 3.5C9.23858 3.5 7 5.73858 7 8.5C7 11.2614 9.23858 13.5 12 13.5C14.7614 13.5 17 11.2614 17 8.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19 20.5C19 16.634 15.866 13.5 12 13.5C8.13401 13.5 5 16.634 5 20.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Yq=[["path",{d:"M20.3584 13.3567C19.1689 14.546 16.9308 14.4998 13.4992 14.4998C11.2914 14.4998 9.50138 12.7071 9.50024 10.4993C9.50024 7.07001 9.454 4.83065 10.6435 3.64138C11.8329 2.45212 12.3583 2.50027 17.6274 2.50027C18.1366 2.49809 18.3929 3.11389 18.0329 3.47394L15.3199 6.18714C14.6313 6.87582 14.6294 7.99233 15.3181 8.68092C16.0068 9.36952 17.1234 9.36959 17.8122 8.68109L20.5259 5.96855C20.886 5.60859 21.5019 5.86483 21.4997 6.37395C21.4997 11.6422 21.5479 12.1675 20.3584 13.3567Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M13.5 14.5L7.32842 20.6716C6.22386 21.7761 4.433 21.7761 3.32843 20.6716C2.22386 19.567 2.22386 17.7761 3.32843 16.6716L9.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M5.50896 18.5H5.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",key:"2"}]],Qq=1.5;function Me(e){return function(n){return o.jsx(o7,{color:"currentColor",icon:e,strokeWidth:Qq,...n})}}const l7=Me(yq),c7=Me(kq),u7=Me(bq),Jq=Me(Uq),Cf=Me(wq),eH=Me(vq),d7=Me(jq),Ai=Me(Sq),cw=Me(Xq),gu=Me($q),tH=Me(Eq),f7=Me(zq),h7=Me(Aq),mu=Me(Nq),hm=Me(Rq),nH=Me(Mq),xm=Me(Iq),sH=Me(_q),rH=Me(Oq),iH=Me(Dq),aH=Me(Lq),Wu=Me(Bq),x7=Me(qq),Ko=Me(mq),oH=Me(Hq),lH=Me(Pq),cH=Me(Fq),uH=Me(Gq),dH=Me(Vq),p7=Me(Cq),fH=Me(Wq),hH=Me(Kq),xH=Me(Tq),pH=Me(Zq),g7=Me(Yq);function uk(e,t){return function({size:s=24,isAnimated:r=!0,className:i,ref:a,...l}){const c=x.useRef(null);return x.useImperativeHandle(a,()=>c.current,[]),x.useLayoutEffect(()=>{const u=c.current,d=u==null?void 0:u.closest("button, a, [role='menuitem']");if(!r||!u||!d)return;let f=d.matches(":hover");const h=b=>{b.relatedTarget instanceof Node&&!b.relatedTarget.isConnected&&(f=!0)},p=b=>{f||b.pointerType!=="mouse"||b.buttons!==0||d.matches(":disabled, [aria-disabled='true']")||(f=!0,u.setAttribute("data-icon-hover",""))},m=()=>{f=!1,u.removeAttribute("data-icon-hover")};return d.addEventListener("pointerenter",h),d.addEventListener("pointermove",p),d.addEventListener("pointerleave",m),()=>{d.removeEventListener("pointerenter",h),d.removeEventListener("pointermove",p),d.removeEventListener("pointerleave",m),u.removeAttribute("data-icon-hover")}},[r]),o.jsx("svg",{ref:c,xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:`pigui-animated-icon ${i??""}`.trim(),"data-icon-motion":r?e:void 0,...l,children:t})}}const gH=uk("new-chat",o.jsxs(o.Fragment,{children:[o.jsxs("g",{"data-icon-part":"bubble",children:[o.jsx("path",{d:"M12.5 3.00372C11.6049 2.99039 10.7047 3.01289 9.8294 3.07107C5.64639 3.34913 2.31441 6.72838 2.04024 10.9707C1.98659 11.8009 1.98659 12.6607 2.04024 13.4909C2.1401 15.036 2.82343 16.4666 3.62791 17.6746C4.09501 18.5203 3.78674 19.5758 3.30021 20.4978C2.94941 21.1626 2.77401 21.495 2.91484 21.7351C3.05568 21.9752 3.37026 21.9829 3.99943 21.9982C5.24367 22.0285 6.08268 21.6757 6.74868 21.1846C7.1264 20.9061 7.31527 20.7668 7.44544 20.7508C7.5756 20.7348 7.83177 20.8403 8.34401 21.0513C8.8044 21.2409 9.33896 21.3579 9.8294 21.3905C11.2536 21.4852 12.7435 21.4854 14.1706 21.3905C18.3536 21.1125 21.6856 17.7332 21.9598 13.4909C22.0021 12.836 22.011 12.1627 21.9866 11.5"}),o.jsx("path",{d:"M8.5 15H15.5M8.5 10H12"})]}),o.jsx("path",{"data-icon-part":"add",d:"M15 5.5H22M18.5 2L18.5 9"})]})),m7=o.jsxs(o.Fragment,{children:[o.jsx("path",{d:"M13 3H11C7.22876 3 5.34315 3 4.17157 4.17157C3 5.34315 3 7.22876 3 11V13C3 16.7712 3 18.6569 4.17157 19.8284C5.34315 21 7.22876 21 11 21H13C16.7712 21 18.6569 21 19.8284 19.8284C21 18.6569 21 16.7712 21 13V11C21 7.22876 21 5.34315 19.8284 4.17157C18.6569 3 16.7712 3 13 3Z"}),o.jsx("path",{"data-icon-part":"divider",d:"M9 3V21"})]}),pm=uk("sidebar",m7),mH=uk("sidebar",o.jsx("g",{transform:"translate(24 0) scale(-1 1)",children:m7}));function y7(){var s;const e=(s=window.pinomadDesktop)==null?void 0:s.updates,[t,n]=x.useState();if(x.useEffect(()=>{if(e===void 0)return;let r=!0;e.status().then(a=>{r&&n(a)});const i=e.onStatus(a=>{r&&n(a)});return()=>{r=!1,i()}},[e]),!(e===void 0||t===void 0))return{status:t,check:()=>void e.check(),install:()=>void e.install()}}function Vl(e){const[t,n]=x.useState(()=>Date.now());return x.useEffect(()=>{const s=setInterval(()=>n(Date.now()),e);return()=>clearInterval(s)},[e]),t}function yH(e,t){const n=t!=="/"&&(e===t||e.startsWith(`${t}/`)),s=n?t:"/",r=[{label:n?"~":"/",path:s}];let i=s==="/"?"":s;for(const a of e.slice(s.length).split("/"))a!==""&&(i=`${i}/${a}`,r.push({label:a,path:i}));return r}function kH(e){if(e==="/")return;const t=e.lastIndexOf("/");return t===0?"/":e.slice(0,t)}const uw=e=>e instanceof Error?e.message:String(e);function bH({remote:e,connected:t,onAdded:n,onClose:s}){const[r,i]=x.useState(void 0),[a,l]=x.useState(!0),[c,u]=x.useState(void 0),[d,f]=x.useState(void 0),[h,p]=x.useState(!1),m=x.useRef(!1);x.useEffect(()=>(m.current=!0,()=>{m.current=!1}),[]);const b=x.useRef(0),y=x.useRef(void 0),g=x.useCallback(j=>{const $=++b.current;y.current=j,l(!0),u(void 0),f(void 0),e.controller.listFolders(j).then(C=>{!m.current||$!==b.current||(i(C),l(!1))},C=>{!m.current||$!==b.current||(u(uw(C)),l(!1))})},[e]);x.useEffect(()=>g(),[g]);const k=()=>{r!==void 0&&(p(!0),f(void 0),e.controller.addProject(r.path).then(j=>{m.current&&n(j)},j=>{m.current&&(p(!1),f(uw(j)))}))},v=r===void 0?[]:yH(r.path,r.home),w=r===void 0?void 0:kH(r.path);return o.jsx(vs,{isOpen:!0,onOpenChange:j=>j?void 0:s(),purpose:"form",width:480,children:o.jsx(Qn,{header:o.jsx(ws,{title:"Add project",subtitle:"Choose a folder on the host.",onOpenChange:()=>s()}),content:o.jsxs(Jn,{children:[o.jsxs(we,{gap:1,vAlign:"center",children:[o.jsx(kn,{icon:o.jsx(u7,{"aria-hidden":"true"}),label:"Parent folder",tooltip:"Parent folder",size:"sm",variant:"ghost",isDisabled:w===void 0||h,onClick:()=>g(w)}),v.length===0?null:o.jsx(F3,{variant:"supporting",label:"Folders",separator:o.jsx(Ai,{"aria-hidden":"true",className:"size-3"}),children:v.map((j,$)=>o.jsx(Z3,{isCurrent:$===v.length-1,onClick:$===v.length-1||h?void 0:()=>g(j.path),children:j.label},j.path))})]}),o.jsx("div",{className:"flex h-80 flex-col overflow-y-auto",children:a?o.jsx("div",{className:"flex flex-1 items-center justify-center",children:o.jsx(on,{"aria-label":"Loading folders"})}):c!==void 0?o.jsxs(fe,{gap:2,hAlign:"start",children:[o.jsx(ee,{type:"supporting",children:c}),o.jsx(re,{label:"Try again",variant:"secondary",isDisabled:h,onClick:()=>g(y.current)})]}):r===void 0?null:r.folders.length===0?o.jsx(ee,{type:"supporting",children:"No subfolders"}):o.jsx(xt,{density:"compact",children:r.folders.map(j=>o.jsx(He,{label:j.name,startContent:o.jsx(mu,{"aria-hidden":"true"}),endContent:o.jsx(Ai,{"aria-hidden":"true"}),isDisabled:h,onClick:()=>g(j.path)},j.path))})})]}),footer:o.jsx(Ga,{children:o.jsxs(we,{gap:2,vAlign:"center",hAlign:"between",children:[d===void 0?o.jsx(ee,{type:"supporting",maxLines:1,wordBreak:"break-all","data-testid":"picker-path",children:r==null?void 0:r.path}):o.jsx(ee,{type:"supporting",role:"alert",maxLines:1,style:{color:"var(--danger)"},children:d}),o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(re,{label:"Cancel",variant:"secondary",onClick:s}),o.jsx(re,{label:"Add project",variant:"primary",isDisabled:!t||r===void 0||a||h,onClick:k})]})]})})})})}function vH({project:e,remote:t,connected:n,onClose:s}){const r=()=>{t.controller.removeProject(e.path),s()};return o.jsx(vs,{isOpen:!0,onOpenChange:i=>i?void 0:s(),purpose:"form",width:480,children:o.jsx(Qn,{header:o.jsx(ws,{title:`Remove project ${e.name}?`,subtitle:"The directory and its conversations are kept; only the registration is removed.",onOpenChange:()=>s()}),content:o.jsx(Jn,{}),footer:o.jsx(Ga,{children:o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(re,{label:"Cancel",variant:"secondary",onClick:s}),o.jsx(re,{label:"Remove project",variant:"primary",isDisabled:!n,onClick:r})]})})})})}function wH({summary:e,remote:t,connected:n,onClose:s}){const r=ks(e),[i,a]=x.useState(r),[l,c]=x.useState(!1),[u,d]=x.useState(void 0),f=x.useRef(null);x.useEffect(()=>{var m;return(m=f.current)==null?void 0:m.select()},[]);const h=i.trim(),p=()=>{h===""||h===r||l||(c(!0),d(void 0),t.controller.renameConversation(e.id,h).then(()=>s(),m=>{c(!1),d(m instanceof Error?m.message:String(m))}))};return o.jsx(vs,{isOpen:!0,onOpenChange:m=>m?void 0:s(),purpose:"form",width:480,children:o.jsx(Qn,{header:o.jsx(ws,{title:"Rename conversation",onOpenChange:()=>s()}),content:o.jsxs(Jn,{children:[o.jsx(xs,{ref:f,label:"Title",value:i,onChange:a,onEnter:p,hasAutoFocus:!0,isDisabled:l}),u===void 0?null:o.jsx(ee,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:u})]}),footer:o.jsx(Ga,{children:o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(re,{label:"Cancel",variant:"secondary",onClick:s}),o.jsx(re,{label:"Save",variant:"primary",isDisabled:!n||l||h===""||h===r,onClick:p})]})})})})}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function gm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const Ch=e=>e?`"${e}" `:"";function mm(e,t=""){if(typeof e!="boolean")throw new TypeError(Ch(t)+"expected boolean, got type="+typeof e);return e}function Xo(e,t=""){if(typeof e!="number")throw new TypeError(Ch(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(Ch(t)+"expected integer >= 0, got "+e);return e}function Dt(e,t,n=""){if(gm(e)&&(t===void 0||e.length===t))return e;t!==void 0&&Xo(t,"length");const s=gm(e),r=t!==void 0?` of length ${t}`:"",i=s?`length=${e.length}`:`type=${typeof e}`,a=Ch(n)+"expected Uint8Array"+r+", got "+i;throw s?new RangeError(a):new TypeError(a)}const dw=(e,t)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(t==="object"?"expected valid options object":`"${t}" expected object, got type=${typeof e}`)};function fw(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function jH(e,t){Dt(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function $r(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ji(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function SH(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const Zo=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function $H(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function CH(e){for(let t=0;t<e.length;t++)e[t]=$H(e[t]);return e}const la=Zo?e=>e:CH;function EH(e,t){return!e.byteLength||!t.byteLength?!1:e.buffer===t.buffer&&e.byteOffset<t.byteOffset+t.byteLength&&t.byteOffset<e.byteOffset+e.byteLength}function TH(e,t){if(EH(e,t)&&e.byteOffset<t.byteOffset)throw new Error("complex overlap of input and output is not supported")}function zH(e,t){return dw(e,"defaults"),dw(t,"opts"),Object.assign(e,t)}function AH(e,t){if(e=Dt(e),t=Dt(t),e.length!==t.length)return!1;let n=0;for(let s=0;s<e.length;s++)n|=e[s]^t[s];return n===0}function NH(e,t,n){const s=t,r=()=>[],i=(l,c)=>s(c,...r(l)).update(l).digest(),a=s(new Uint8Array(e),...r(new Uint8Array(0)));return i.outputLen=a.outputLen,i.blockLen=a.blockLen,i.create=(l,...c)=>s(l,...c),i}const MH=(e,t)=>{function n(s,...r){if(Dt(s,void 0,"key"),e.nonceLength!==void 0){const f=r[0];Dt(f,e.varSizeNonce?void 0:e.nonceLength,"nonce")}const i=e.tagLength,a=e.nonceLength!==void 0?1:0;if(!e.withAAD){for(let f=a;f<r.length;f++)if(gm(r[f]))throw new Error("AAD not supported")}e.withAAD&&r[a]!==void 0&&Dt(r[a],void 0,"AAD");const l=t(s,...r),c=(f,h)=>{if(h!==void 0){if(f!==2)throw new Error("cipher output not supported");Dt(h,void 0,"output")}};let u=!1;return{encrypt(f,h){if(u)throw new Error("cannot encrypt() twice with same key + nonce");return u=!0,Dt(f,void 0,"data"),c(l.encrypt.length,h),l.encrypt(f,h)},decrypt(f,h){if(Dt(f,void 0,"data"),i&&f.length<i)throw new Error('"ciphertext" expected length >= tagLength='+i);return c(l.decrypt.length,h),l.decrypt(f,h)}}}return Object.assign(n,e),n};function ym(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(Dt(t,e,"output"),n&&!Eh(t))throw new Error("invalid output, must be aligned");return t}function RH(e,t,n){Xo(e),Xo(t),mm(n);const s=new Uint8Array(16),r=SH(s);return r.setBigUint64(0,BigInt(t),n),r.setBigUint64(8,BigInt(e),n),s}function Eh(e){return e.byteOffset%4===0}function Th(e){return Uint8Array.from(Dt(e))}const k7=e=>Uint8Array.from(e.split(""),t=>t.charCodeAt(0)),IH=la($r(k7("expand 16-byte k"))),_H=la($r(k7("expand 32-byte k")));function Re(e,t){return e<<t|e>>>32-t}const fc=64,OH=16,km=2**32-1,hw=Uint32Array.of();function DH(e,t,n,s,r,i,a,l){const c=r.length,u=new Uint8Array(fc),d=$r(u),f=Zo&&Eh(r)&&Eh(i),h=f?$r(r):hw,p=f?$r(i):hw;if(!Zo){for(let m=0;m<c;a++){if(e(t,n,s,d,a,l),la(d),a>=km)throw new Error("arx: counter overflow");const b=Math.min(fc,c-m);for(let y=0,g;y<b;y++)g=m+y,i[g]=r[g]^u[y];m+=b}return}for(let m=0;m<c;a++){if(e(t,n,s,d,a,l),a>=km)throw new Error("arx: counter overflow");const b=Math.min(fc,c-m);if(f&&b===fc){const y=m/4;if(m%4!==0)throw new Error("arx: invalid block position");for(let g=0,k;g<OH;g++)k=y+g,p[k]=h[k]^d[g];m+=fc;continue}for(let y=0,g;y<b;y++)g=m+y,i[g]=r[g]^u[y];m+=b}}function LH(e,t){const{allowShortKeys:n,extendNonceFn:s,counterLength:r,counterRight:i,rounds:a}=zH({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return Xo(r),Xo(a),mm(i),mm(n),(l,c,u,d,f=0)=>{Dt(l,void 0,"key"),Dt(c,void 0,"nonce"),Dt(u,void 0,"data");const h=u.length,p=d!==void 0;if(d=ym(h,d,!1),p&&TH(u,d),Xo(f),f<0||f>=km)throw new Error("arx: counter overflow");const m=[];let b=l.length,y,g;if(b===32)m.push(y=Th(l)),g=_H;else if(b===16&&n)y=new Uint8Array(32),y.set(l),y.set(l,16),g=IH,m.push(y);else throw Dt(l,32,"arx key"),new Error("invalid key size");(!Zo||!Eh(c))&&m.push(c=Th(c));let k=$r(y);if(s){if(c.length!==24)throw new Error("arx: extended nonce must be 24 bytes");const j=c.subarray(0,16);if(Zo)s(g,k,$r(j),k);else{const $=la(Uint32Array.from(g));s($,k,$r(j),k),ji($),la(k)}c=c.subarray(16)}else Zo||la(k);const v=16-r;if(v!==c.length)throw new Error(`arx: nonce must be ${v} or 16 bytes`);if(v!==12){const j=new Uint8Array(12);j.set(c,i?0:12-c.length),c=j,m.push(c)}const w=la($r(c));try{return DH(e,g,k,w,u,d,f,a),d}finally{ji(...m)}}}function Pt(e,t){return e[t++]&255|(e[t++]&255)<<8}class BH{constructor(t){te(this,"blockLen",16);te(this,"outputLen",16);te(this,"buffer",new Uint8Array(16));te(this,"r",new Uint16Array(10));te(this,"h",new Uint16Array(10));te(this,"pad",new Uint16Array(8));te(this,"pos",0);te(this,"finished",!1);te(this,"destroyed",!1);t=Th(Dt(t,32,"key"));const n=Pt(t,0),s=Pt(t,2),r=Pt(t,4),i=Pt(t,6),a=Pt(t,8),l=Pt(t,10),c=Pt(t,12),u=Pt(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|s<<3)&8191,this.r[2]=(s>>>10|r<<6)&7939,this.r[3]=(r>>>7|i<<9)&8191,this.r[4]=(i>>>4|a<<12)&255,this.r[5]=a>>>1&8190,this.r[6]=(a>>>14|l<<2)&8191,this.r[7]=(l>>>11|c<<5)&8065,this.r[8]=(c>>>8|u<<8)&8191,this.r[9]=u>>>5&127;for(let d=0;d<8;d++)this.pad[d]=Pt(t,16+2*d)}process(t,n,s=!1){const r=s?0:2048,{h:i,r:a}=this,l=a[0],c=a[1],u=a[2],d=a[3],f=a[4],h=a[5],p=a[6],m=a[7],b=a[8],y=a[9],g=Pt(t,n+0),k=Pt(t,n+2),v=Pt(t,n+4),w=Pt(t,n+6),j=Pt(t,n+8),$=Pt(t,n+10),C=Pt(t,n+12),E=Pt(t,n+14);let T=i[0]+(g&8191),S=i[1]+((g>>>13|k<<3)&8191),N=i[2]+((k>>>10|v<<6)&8191),z=i[3]+((v>>>7|w<<9)&8191),M=i[4]+((w>>>4|j<<12)&8191),R=i[5]+(j>>>1&8191),I=i[6]+((j>>>14|$<<2)&8191),A=i[7]+(($>>>11|C<<5)&8191),_=i[8]+((C>>>8|E<<8)&8191),O=i[9]+(E>>>5|r),D=0,L=D+T*l+S*(5*y)+N*(5*b)+z*(5*m)+M*(5*p);D=L>>>13,L&=8191,L+=R*(5*h)+I*(5*f)+A*(5*d)+_*(5*u)+O*(5*c),D+=L>>>13,L&=8191;let q=D+T*c+S*l+N*(5*y)+z*(5*b)+M*(5*m);D=q>>>13,q&=8191,q+=R*(5*p)+I*(5*h)+A*(5*f)+_*(5*d)+O*(5*u),D+=q>>>13,q&=8191;let F=D+T*u+S*c+N*l+z*(5*y)+M*(5*b);D=F>>>13,F&=8191,F+=R*(5*m)+I*(5*p)+A*(5*h)+_*(5*f)+O*(5*d),D+=F>>>13,F&=8191;let X=D+T*d+S*u+N*c+z*l+M*(5*y);D=X>>>13,X&=8191,X+=R*(5*b)+I*(5*m)+A*(5*p)+_*(5*h)+O*(5*f),D+=X>>>13,X&=8191;let Y=D+T*f+S*d+N*u+z*c+M*l;D=Y>>>13,Y&=8191,Y+=R*(5*y)+I*(5*b)+A*(5*m)+_*(5*p)+O*(5*h),D+=Y>>>13,Y&=8191;let Z=D+T*h+S*f+N*d+z*u+M*c;D=Z>>>13,Z&=8191,Z+=R*l+I*(5*y)+A*(5*b)+_*(5*m)+O*(5*p),D+=Z>>>13,Z&=8191;let ne=D+T*p+S*h+N*f+z*d+M*u;D=ne>>>13,ne&=8191,ne+=R*c+I*l+A*(5*y)+_*(5*b)+O*(5*m),D+=ne>>>13,ne&=8191;let J=D+T*m+S*p+N*h+z*f+M*d;D=J>>>13,J&=8191,J+=R*u+I*c+A*l+_*(5*y)+O*(5*b),D+=J>>>13,J&=8191;let K=D+T*b+S*m+N*p+z*h+M*f;D=K>>>13,K&=8191,K+=R*d+I*u+A*c+_*l+O*(5*y),D+=K>>>13,K&=8191;let ie=D+T*y+S*b+N*m+z*p+M*h;D=ie>>>13,ie&=8191,ie+=R*f+I*d+A*u+_*c+O*l,D+=ie>>>13,ie&=8191,D=(D<<2)+D|0,D=D+L|0,L=D&8191,D=D>>>13,q+=D,i[0]=L,i[1]=q,i[2]=F,i[3]=X,i[4]=Y,i[5]=Z,i[6]=ne,i[7]=J,i[8]=K,i[9]=ie}finalize(){const{h:t,pad:n}=this,s=new Uint16Array(10);let r=t[1]>>>13;t[1]&=8191;for(let l=2;l<10;l++)t[l]+=r,r=t[l]>>>13,t[l]&=8191;t[0]+=r*5,r=t[0]>>>13,t[0]&=8191,t[1]+=r,r=t[1]>>>13,t[1]&=8191,t[2]+=r,s[0]=t[0]+5,r=s[0]>>>13,s[0]&=8191;for(let l=1;l<10;l++)s[l]=t[l]+r,r=s[l]>>>13,s[l]&=8191;s[9]-=8192;let i=(r^1)-1;for(let l=0;l<10;l++)s[l]&=i;i=~i;for(let l=0;l<10;l++)t[l]=t[l]&i|s[l];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let a=t[0]+n[0];t[0]=a&65535;for(let l=1;l<8;l++)a=(t[l]+n[l]|0)+(a>>>16)|0,t[l]=a&65535;ji(s)}update(t){fw(this),Dt(t),t=Th(t);const{buffer:n,blockLen:s}=this,r=t.length;for(let i=0;i<r;){const a=Math.min(s-this.pos,r-i);if(a===s){for(;s<=r-i;i+=s)this.process(t,i);continue}n.set(t.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===s&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){this.destroyed=!0,ji(this.h,this.r,this.buffer,this.pad)}digestInto(t){fw(this),jH(t,this),this.finished=!0;const{buffer:n,h:s}=this;let{pos:r}=this;if(r){for(n[r++]=1;r<16;r++)n[r]=0;this.process(n,0,!0)}this.finalize();let i=0;for(let a=0;a<8;a++)t[i++]=s[a]>>>0,t[i++]=s[a]>>>8}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const s=t.slice(0,n);return this.destroy(),s}}const qH=NH(32,e=>new BH(e));function HH(e,t,n,s,r,i=20){let a=e[0],l=e[1],c=e[2],u=e[3],d=t[0],f=t[1],h=t[2],p=t[3],m=t[4],b=t[5],y=t[6],g=t[7],k=r,v=n[0],w=n[1],j=n[2],$=a,C=l,E=c,T=u,S=d,N=f,z=h,M=p,R=m,I=b,A=y,_=g,O=k,D=v,L=w,q=j;for(let X=0;X<i;X+=2)$=$+S|0,O=Re(O^$,16),R=R+O|0,S=Re(S^R,12),$=$+S|0,O=Re(O^$,8),R=R+O|0,S=Re(S^R,7),C=C+N|0,D=Re(D^C,16),I=I+D|0,N=Re(N^I,12),C=C+N|0,D=Re(D^C,8),I=I+D|0,N=Re(N^I,7),E=E+z|0,L=Re(L^E,16),A=A+L|0,z=Re(z^A,12),E=E+z|0,L=Re(L^E,8),A=A+L|0,z=Re(z^A,7),T=T+M|0,q=Re(q^T,16),_=_+q|0,M=Re(M^_,12),T=T+M|0,q=Re(q^T,8),_=_+q|0,M=Re(M^_,7),$=$+N|0,q=Re(q^$,16),A=A+q|0,N=Re(N^A,12),$=$+N|0,q=Re(q^$,8),A=A+q|0,N=Re(N^A,7),C=C+z|0,O=Re(O^C,16),_=_+O|0,z=Re(z^_,12),C=C+z|0,O=Re(O^C,8),_=_+O|0,z=Re(z^_,7),E=E+M|0,D=Re(D^E,16),R=R+D|0,M=Re(M^R,12),E=E+M|0,D=Re(D^E,8),R=R+D|0,M=Re(M^R,7),T=T+S|0,L=Re(L^T,16),I=I+L|0,S=Re(S^I,12),T=T+S|0,L=Re(L^T,8),I=I+L|0,S=Re(S^I,7);let F=0;s[F++]=a+$|0,s[F++]=l+C|0,s[F++]=c+E|0,s[F++]=u+T|0,s[F++]=d+S|0,s[F++]=f+N|0,s[F++]=h+z|0,s[F++]=p+M|0,s[F++]=m+R|0,s[F++]=b+I|0,s[F++]=y+A|0,s[F++]=g+_|0,s[F++]=k+O|0,s[F++]=v+D|0,s[F++]=w+L|0,s[F++]=j+q|0}const PH=LH(HH,{counterRight:!1,counterLength:4,allowShortKeys:!1}),UH=new Uint8Array(16),xw=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(UH.subarray(n))},FH=new Uint8Array(32);function pw(e,t,n,s,r){r!==void 0&&Dt(r,void 0,"AAD");const i=e(t,n,FH),a=RH(s.length,r?r.length:0,!0),l=qH.create(i);r&&xw(l,r),xw(l,s),l.update(a);const c=l.digest();return ji(i,a),c}const GH=e=>(t,n,s)=>({encrypt(i,a){const l=i.length;a=ym(l+16,a,!1),a.set(i);const c=a.subarray(0,-16);e(t,n,c,c,1);const u=pw(e,t,n,c,s);return a.set(u,l),ji(u),a},decrypt(i,a){a=ym(i.length-16,a,!1);const l=i.subarray(0,-16),c=i.subarray(-16),u=pw(e,t,n,l,s);if(!AH(c,u))throw ji(u),new Error("invalid tag");return a.set(i.subarray(0,-16)),e(t,n,a,a,1),ji(u),a}}),gw=MH({blockSize:64,nonceLength:12,tagLength:16,withAAD:!0},GH(PH)),VH=e=>e/2**32|0,WH=e=>e>>>0;function bm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const vm=e=>e?`"${e}" `:"";function Dr(e,t=""){if(typeof e!="number")throw new TypeError(vm(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(vm(t)+"expected integer >= 0, got "+e);return e}function gs(e,t,n=""){if(bm(e)&&(t===void 0||e.length===t))return e;t!==void 0&&Dr(t,"length");const s=bm(e),r=t!==void 0?` of length ${t}`:"",i=s?`length=${e.length}`:`type=${typeof e}`,a=vm(n)+"expected Uint8Array"+r+", got "+i;throw s?new RangeError(a):new TypeError(a)}function mw(e){return Uint8Array.from(gs(e))}function KH(e){if(typeof e!="function"||typeof e.create!="function")throw new TypeError("expected hash wrapped by utils.createHasher");if(Dr(e.outputLen),Dr(e.blockLen),e.outputLen<1||e.blockLen<1)throw new Error("hash blockLen / outputLen must be >= 1")}const XH=(e,t)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError((t==="object"?"":`"${t}" `)+"expected object, got type="+typeof e)},yw=(e,t)=>{XH(e,t);const n=Object.getPrototypeOf(e);if(n!==Object.prototype&&n!==null)throw new TypeError(`"${t}" expected plain object`);if(Object.hasOwn(e,"__proto__"))throw new TypeError(`"${t}.__proto__" is not allowed`)};function zh(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function b7(e,t){gs(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function Ah(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function wm(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Nh(e,t){return e<<32-t|e>>>t}const v7=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function w7(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const jc=v7?e=>e:e=>w7(e)>>>0;function ZH(e){for(let t=0;t<e.length;t++)e[t]=w7(e[t]);return e}const po=v7?e=>e:ZH,j7=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",YH=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function dk(e){if(gs(e),j7)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=YH[e[n]];return t}function kw(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function S7(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);if(j7)try{return Uint8Array.fromHex(e)}catch(r){throw r instanceof SyntaxError?new RangeError(r.message):r}const t=e.length,n=t/2;if(t%2)throw new RangeError("hex string expected, got unpadded hex of length "+t);const s=new Uint8Array(n);for(let r=0,i=0;r<n;r++,i+=2){const a=kw(e.charCodeAt(i)),l=kw(e.charCodeAt(i+1));if(a===void 0||l===void 0){const c=e[i]+e[i+1];throw new RangeError('hex string expected, got non-hex character "'+c+'" at index '+i)}s[r]=a*16+l}return s}function $7(e,t,n="opts"){return yw(e,"defaults"),t!==void 0&&yw(t,n),Object.assign(Object.create(null),e,t)}function QH(e,t={}){if(typeof e!="function")throw new TypeError('"hashCons" expected function, got type='+typeof e);t=$7({},t,"info");const n=(r,i)=>e(i).update(r).digest(),s=e(void 0);return n.outputLen=s.outputLen,n.blockLen=s.blockLen,n.canXOF=s.canXOF,n.create=r=>e(r),Object.assign(n,t),Object.freeze(n)}function JH(e=32){Dr(e,"bytesLength");const t=typeof globalThis=="object"?globalThis.crypto:null;if(typeof(t==null?void 0:t.getRandomValues)!="function")throw new Error("crypto.getRandomValues must be defined");if(e>65536)throw new RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}const eP=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function C7(e,t,n=()=>{}){if(!Array.isArray(e))throw new TypeError(`"${t}" expected array, got type=${typeof e}`);for(let s=0;s<e.length;s++)n(e[s],`${t}[${s}]`);return e}const Yo=(e,t,n)=>gs(e,t,n),E7=Dr;function Qo(e,t="object"){if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(t==="object"?"expected valid options object":`"${t}" expected object, got type=${typeof e}`);return e}function qc(e,t){if(typeof e!="function")throw new TypeError(`"${t}" is invalid: expected function, got ${typeof e}`);return e}const tP=dk,nP=e=>S7(e),T7=bm,z7=e=>JH(e),Mh=BigInt(0),bw=BigInt(1),sP=e=>e?`"${e}" `:"";function Ox(e,t=""){if(typeof e!="boolean")throw new TypeError(sP(t)+"expected boolean, got type="+typeof e);return e}function rP(e){if(typeof e=="bigint"){if(!wa(e))throw new RangeError("positive bigint expected, got "+e)}else E7(e);return e}function jm(e,t=""){if(typeof e!="number"){const n=t&&`"${t}" `;throw new TypeError(n+"expected number, got type="+typeof e)}if(!Number.isSafeInteger(e)){const n=t&&`"${t}" `;throw new RangeError(n+"expected safe integer, got "+e)}}function A7(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);return e===""?Mh:BigInt("0x"+e)}function N7(e){return A7(dk(e))}function Rh(e){return A7(dk(yu(gs(e)).reverse()))}function M7(e,t){if(Dr(t),t===0)throw new Error("zero output length is invalid");e=rP(e);const n=t*2,s=e.toString(16);if(s.length>n)throw new RangeError("number is too large");return S7(s.padStart(n,"0"))}function R7(e,t){return M7(e,t).reverse()}function yu(e){return Uint8Array.from(Yo(e))}function wa(e){return typeof e=="bigint"&&Mh<=e}function I7(e,t,n){return wa(e)&&wa(t)&&wa(n)&&t<=e&&e<n}function Hc(e,t,n,s){if(!I7(t,n,s))throw new RangeError("expected valid "+e+": "+n+" <= n < "+s+", got "+t)}function iP(e){if(e<Mh)throw new Error("expected non-negative bigint, got "+e);return e===Mh?0:e.toString(2).length}const aP=e=>(jm(e,"n"),(bw<<BigInt(e))-bw);function Ih(e,t={},n={},s="object"){Qo(e,s),Qo(t,"fields"),Qo(n,"optFields");function r(a,l,c){const u=s==="object"?`param "${String(a)}"`:`"${s}.${String(a)}"`,d=e[a];if(!Object.hasOwn(e,a)&&(c?d!==void 0:l!=="function"))throw new TypeError(`${u} is invalid: expected own property`);if(c&&d===void 0)return;const f=typeof d;if(f!==l||d===null)throw new TypeError(`${u} is invalid: expected ${l}, got ${f}`)}const i=(a,l)=>Object.entries(a).forEach(([c,u])=>r(c,u,l));i(t,!1),i(n,!0)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Bt=BigInt(0),rt=BigInt(1),ca=BigInt(2),_7=BigInt(3),fk=BigInt(4),O7=BigInt(5),oP=BigInt(7),D7=BigInt(8),lP=BigInt(9),cP=BigInt(15),L7=BigInt(16),uP=BigInt("0x10000000000000000");function st(e,t){if(t<=Bt)throw new Error("mod: expected positive modulus, got "+t);const n=e%t;return n>=Bt?n:t+n}function dP(e,t,n){if(n<=rt)throw new Error("pow: expected modulus > 1, got "+n);if(typeof t!="bigint")throw new TypeError("invalid exponent: expected bigint, got "+typeof t);if(t<Bt)throw new Error("invalid exponent, negatives unsupported");if(t===Bt)return rt;if(t===rt)return e;let s=e%n;if(s<Bt&&(s+=n),t<uP){let l=rt;for(;t>Bt;)t&rt&&(l=l*s%n),s=s*s%n,t>>=rt;return l}const r=[];for(;t>Bt;)r.push(Number(t&cP)),t>>=fk;const i=new Array(16);i[0]=rt,i[1]=s;for(let l=2;l<16;l++)i[l]=i[l-1]*s%n;let a=i[r[r.length-1]];for(let l=r.length-2;l>=0;l--){a=a*a%n,a=a*a%n,a=a*a%n,a=a*a%n;const c=r[l];c!==0&&(a=a*i[c]%n)}return a}function zs(e,t,n){if(n<=rt)throw new Error("pow2: expected modulus > 1, got "+n);if(t<Bt)throw new Error("pow2: expected non-negative exponent, got "+t);let s=e;for(;t-- >Bt;)s*=s,s%=n;return s}function vw(e,t){if(e===Bt)throw new Error("invert: expected non-zero number");if(t<=rt)throw new Error("invert: expected modulus > 1, got "+t);let n=st(e,t),s=t,r=Bt,i=rt;for(;n!==Bt;){const l=s/n,c=s-n*l,u=r-i*l;s=n,n=c,r=i,i=u}if(s!==rt)throw new Error("invert: does not exist");return st(r,t)}function hk(e,t,n){const s=e;if(!s.eql(s.sqr(t),n))throw new Error("Cannot find square root")}function xk(e,t){if((e&rt)===Bt)throw new Error(t+": expected odd modulus, got "+e)}function B7(e,t){const n=e,s=(n.ORDER+rt)/fk,r=n.pow(t,s);return hk(n,r,t),r}function fP(e,t){const n=e,s=(n.ORDER-O7)/D7,r=n.mul(t,ca),i=n.pow(r,s),a=n.mul(t,i),l=n.mul(n.mul(a,ca),i),c=n.mul(a,n.sub(l,n.ONE));return hk(n,c,t),c}function hP(e){const t=pk(e),n=q7(e),s=n(t,t.neg(t.ONE)),r=n(t,s),i=n(t,t.neg(s)),a=(e+oP)/L7;return(l,c)=>{const u=l;let d=u.pow(c,a),f=u.mul(d,s);const h=u.mul(d,r),p=u.mul(d,i),m=u.eql(u.sqr(f),c),b=u.eql(u.sqr(h),c);d=u.cmov(d,f,m),f=u.cmov(p,h,b);const y=u.eql(u.sqr(f),c),g=u.cmov(d,f,y);return hk(u,g,c),g}}function q7(e){if(e<_7)throw new Error("sqrt is not defined for small field");xk(e,"tonelliShanks");let t=e-rt,n=0;for(;t%ca===Bt;)t/=ca,n++;let s=ca;const r=pk(e);for(;_h(r,s)===1;)if(s++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return B7;let i=r.pow(s,t);const a=(t+rt)/ca;return function(c,u){const d=c;if(d.is0(u))return u;if(_h(d,u)!==1)throw new Error("Cannot find square root");let f=n,h=d.mul(d.ONE,i),p=d.pow(u,t),m=d.pow(u,a);for(;!d.eql(p,d.ONE);){if(d.is0(p))throw new Error("Cannot find square root: probably non-prime P");let b=1,y=d.sqr(p);for(;!d.eql(y,d.ONE);)if(b++,y=d.sqr(y),b===f)throw new Error("Cannot find square root");const g=rt<<BigInt(f-b-1),k=d.pow(h,g);f=b,h=d.sqr(k),p=d.mul(p,h),m=d.mul(m,k)}return m}}function xP(e){return xk(e,"Fp.sqrt"),e%fk===_7?B7:e%D7===O7?fP:e%L7===lP?hP(e):q7(e)}const pP=(e,t)=>(st(e,t)&rt)===rt,gP=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function ku(e){if(Qo(e,"field"),typeof e.ORDER!="bigint")throw new TypeError('param "ORDER" is invalid: expected bigint, got '+typeof e.ORDER);jm(e.BYTES,"BYTES"),jm(e.BITS,"BITS");for(const t of gP)qc(e[t],"field."+t);if(e.BYTES<1||e.BITS<1)throw new Error("invalid field: expected BYTES/BITS > 0");if(e.ORDER<=rt)throw new Error("invalid field: expected ORDER > 1, got "+e.ORDER);return e}function H7(e,t,n=!1){ku(e),C7(t,"nums"),Ox(n,"passZero");const s=e,r=new Array(t.length).fill(n?s.ZERO:void 0),i=t.reduce((l,c,u)=>s.is0(c)?l:(r[u]=l,s.mul(l,c)),s.ONE),a=s.inv(i);return t.reduceRight((l,c,u)=>s.is0(c)?l:(r[u]=s.mul(l,r[u]),s.mul(l,c)),a),r}function _h(e,t){ku(e);const n=e;xk(n.ORDER,"FpLegendre");const s=(n.ORDER-rt)/ca,r=n.pow(t,s),i=n.eql(r,n.ONE),a=n.eql(r,n.ZERO),l=n.eql(r,n.neg(n.ONE));if(!i&&!a&&!l)throw new Error("invalid Legendre symbol result");return i?1:a?0:-1}function mP(e,t){if(t!==void 0&&E7(t),e<=Bt)throw new Error("invalid n length: expected positive n, got "+e);if(t!==void 0&&t<1)throw new Error("invalid n length: expected positive bit length, got "+t);const n=iP(e);if(t!==void 0&&t<n)throw new Error(`invalid n length: expected nBitLength (${t}) >= bitLen(n) (${n})`);const s=t!==void 0?t:n,r=Math.ceil(s/8);return{nBitLength:s,nByteLength:r}}const ww=new WeakMap;class jw{constructor(t,n={}){te(this,"ORDER");te(this,"BITS");te(this,"BYTES");te(this,"isLE");te(this,"ZERO",Bt);te(this,"ONE",rt);te(this,"_lengths");te(this,"_mod");if(t<=rt)throw new Error("invalid field: expected ORDER > 1, got "+t);let s;this.isLE=!1,n!=null&&typeof n=="object"&&(typeof n.BITS=="number"&&(s=n.BITS),typeof n.sqrt=="function"&&Object.defineProperty(this,"sqrt",{value:n.sqrt,enumerable:!0}),typeof n.isLE=="boolean"&&(this.isLE=n.isLE),n.allowedLengths&&(this._lengths=Object.freeze(n.allowedLengths.slice())),typeof n.modFromBytes=="boolean"&&(this._mod=n.modFromBytes));const{nBitLength:r,nByteLength:i}=mP(t,s);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=t,this.BITS=r,this.BYTES=i,Object.freeze(this)}create(t){return st(t,this.ORDER)}isValid(t){if(typeof t!="bigint")throw new TypeError("invalid field element: expected bigint, got "+typeof t);return Bt<=t&&t<this.ORDER}is0(t){return t===Bt}isValidNot0(t){return!this.is0(t)&&this.isValid(t)}isOdd(t){return(t&rt)===rt}neg(t){return st(-t,this.ORDER)}eql(t,n){return t===n}sqr(t){return st(t*t,this.ORDER)}add(t,n){return st(t+n,this.ORDER)}sub(t,n){return st(t-n,this.ORDER)}mul(t,n){return st(t*n,this.ORDER)}pow(t,n){return dP(t,n,this.ORDER)}div(t,n){return st(t*vw(n,this.ORDER),this.ORDER)}sqrN(t){return t*t}addN(t,n){return t+n}subN(t,n){return t-n}mulN(t,n){return t*n}inv(t){return vw(t,this.ORDER)}sqrt(t){let n=ww.get(this);return n||ww.set(this,n=xP(this.ORDER)),n(this,t)}toBytes(t){return this.isLE?R7(t,this.BYTES):M7(t,this.BYTES)}fromBytes(t,n=!1){Yo(t);const{_lengths:s,BYTES:r,isLE:i,ORDER:a,_mod:l}=this;if(s){if(t.length<1||!s.includes(t.length)||t.length>r)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+t.length);const u=new Uint8Array(r);u.set(t,i?0:u.length-t.length),t=u}if(t.length!==r)throw new Error("Field.fromBytes: expected "+r+" bytes, got "+t.length);let c=i?Rh(t):N7(t);if(l&&(c=st(c,a)),!n&&!this.isValid(c))throw new Error("invalid field element: outside of range 0..ORDER");return c}invertBatch(t){return H7(this,t,!0)}cmov(t,n,s){return Ox(s,"condition"),s?n:t}}function pk(e,t={}){return Object.freeze(jw.prototype),new jw(e,t)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const gk=BigInt(0),bu=BigInt(1),yP=BigInt(4),mp=16,Sw=128,kP=5,$w=2**31;function mk(e){const t=e;if(typeof t!="function")throw new TypeError('"Point" expected constructor, got type='+typeof e);qc(t.fromAffine,"Point.fromAffine"),qc(t.fromBytes,"Point.fromBytes"),qc(t.fromHex,"Point.fromHex"),Qo(t.BASE,"Point.BASE"),Qo(t.ZERO,"Point.ZERO"),ku(t.Fp),ku(t.Fn)}function bP(e,t){mk(e),P7(t,e);const n=H7(e.Fp,t.map(s=>s.Z));return t.map((s,r)=>e.fromAffine(s.toAffine(n[r])))}function vP(e,t,n=1){if(!Number.isSafeInteger(e)||e<n||e>t)throw new Error("invalid window size, expected ["+n+".."+t+"], got W="+e)}function wP(e,t){const n=e*(4*t+128);if(n>$w)throw new Error("invalid window size: table would need ~"+Math.ceil(n/2**20)+" MiB, max "+$w/2**20+" MiB")}function jP(e,t){if(e!==void 0){qc(e,"randomBytes");try{const n=e(t);if(!T7(n)||n.length!==t)return}catch{return}return e}}function P7(e,t){C7(e,"points"),e.forEach((n,s)=>{if(!(n instanceof t))throw new Error("invalid point at index "+s)})}function SP(e,t,n){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((s,r)=>{if(!(n===void 0?t.isValid(s):wa(s)&&s<n))throw new Error("invalid scalar at index "+r)})}const U7=new WeakMap;function yp(e){return U7.get(e)||1}function $P(e,t){const n=e.double(),s=[e];for(let r=1;r<t;r++)s.push(s[r-1].add(n));return s}function CP(e,t){const n=2**t,s=n/2,r=BigInt(n-1),i=[];for(;e>gk;){let a=0;e&bu&&(a=Number(e&r),a>=s&&(a-=n),e-=BigInt(a)),i.push(a),e>>=bu}return i}function EP(e,t,n){const s=2**t,r=s/2,i=BigInt(s-1),a=BigInt(t),l=[];for(let c=0;c<n;c++){let u=Number(e&i);e>>=a,u>r&&(u-=s,e+=bu),l.push(u)}if(e!==gk)throw new Error("invalid wnaf");return l}function TP(e,t,n){let s=0;for(const i of n)s=Math.max(s,i.length);let r=e;for(let i=s-1;i>=0;i--){i!==s-1&&(r=r.double());for(let a=0;a<n.length;a++){const l=n[a][i];if(l){const c=t[a][Math.abs(l)-1>>1];r=r.add(l<0?c.negate():c)}}}return r}class zP{constructor(t,n){te(this,"Point");te(this,"BASE");te(this,"ZERO");te(this,"randomBytes");te(this,"wnafPrecomputes",new WeakMap);te(this,"baseCanBeBlinded");te(this,"bits");mk(t),this.randomBytes=jP(n,mp),this.Point=t,this.BASE=t.BASE,this.ZERO=t.ZERO,this.bits=t.Fn.BITS}buildWnafTable(t,n,s){const r=Math.ceil(s/n)+1,i=2**(n-1),a=[];let l=t;for(let c=0;c<r;c++){let u=l;for(let d=0;d<i;d++)a.push(u),u=u.add(l);l=a[a.length-1].double()}return{W:n,bits:s,windows:r,comp:a}}wnafCachedCT(t,n){const{W:s,windows:r,comp:i}=t,a=2**(s-1),l=EP(n,s,r);let c=this.ZERO,u=this.BASE;for(let d=0;d<r;d++){const f=l[d],h=d*a,p=Math.abs(f)-1;let m=i[h];for(let y=1;y<a;y++)m=y===p?i[h+y]:m;const b=m.negate();f===0?u=u.add(i[h]):c=c.add(f<0?b:m)}return{p:c,f:u}}getWnafPrecomputes(t,n,s,r){let i=this.wnafPrecomputes.get(n),a=i==null?void 0:i.find(l=>l.W===t&&l.bits===s);return a||(a=this.buildWnafTable(n,t,s),typeof r=="function"&&(a={...a,comp:r(a.comp)}),i||(i=[],this.wnafPrecomputes.set(n,i)),i.push(a)),a}assertPoint(t){if(!(t instanceof this.Point))throw new TypeError('"point" expected Point instance, got type='+typeof t)}validateMulInput(t,n){if(this.assertPoint(t),!I7(n,bu,this.Point.Fn.ORDER))throw new Error("invalid scalar")}runCT(t,n,s,r){const i=yp(t);return i===1?this.fixedWindowCT(t,n,s):this.wnafCachedCT(this.getWnafPrecomputes(i,t,s,r),n)}mulCT(t,n,s){return this.validateMulInput(t,n),this.runCT(t,n,this.bits,s)}mulCTBlinded(t,n,s){if(this.validateMulInput(t,n),this.randomBytes===void 0)throw new Error("randomBytes is required for scalar blinding");const r=this.Point.Fn.BITS+Sw,i=this.randomBytes(mp);if(!T7(i)||i.length!==mp)throw new Error("randomBytes returned invalid byte array");i[0]=i[0]&63|128;const a=n+N7(i)*this.Point.Fn.ORDER;return this.runCT(t,a,r,s)}fixedWindowCT(t,n,s){const r=kP,i=1<<r,a=aP(r),l=new Array(i);l[0]=this.ZERO;for(let d=1;d<i;d++)l[d]=l[d-1].add(t);const c=Math.ceil(s/r);let u=this.ZERO;for(let d=c-1;d>=0;d--){if(d!==c-1)for(let p=0;p<r;p++)u=u.double();const f=Number(n>>BigInt(d*r)&a);let h=l[0];for(let p=1;p<i;p++)h=p===f?l[p]:h;u=u.add(h)}return{p:u,f:u}}shouldBlind(t,n){return this.randomBytes===void 0?!1:n===bu?!0:t!==this.BASE?!1:(this.baseCanBeBlinded===void 0&&(this.baseCanBeBlinded=this.mulUnsafe(this.BASE,this.Point.Fn.ORDER).is0()),this.baseCanBeBlinded)}mulSecret(t,n,s,r){return this.shouldBlind(t,s)?this.mulCTBlinded(t,n,r):this.mulCT(t,n,r)}mulUnsafe(t,n,s){if(this.assertPoint(t),!wa(n))throw new Error("invalid scalar");const r=yp(t);if(r===1||n>=this.Point.Fn.ORDER)return AP(this.Point,[t],[n],!0);const i=this.getWnafPrecomputes(r,t,this.bits,s);return this.wnafCachedCT(i,n).p}setWindowSize(t,n){this.assertPoint(t),vP(n,this.bits);const s=Math.ceil((this.bits+Sw)/n)+1;wP(s*2**(n-1),this.Point.Fp.BYTES),U7.set(t,n),this.wnafPrecomputes.delete(t)}hasWindowSize(t){return yp(t)!==1}}function AP(e,t,n,s=!1){if(mk(e),P7(t,e),Ox(s,"allowOversized"),SP(n,e.Fn,s?e.Fn.ORDER**yP:void 0),t.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const r=t.map(a=>$P(a,4)),i=n.map(a=>CP(a,4));return TP(e.ZERO,r,i)}function Cw(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return ku(t),t}else return pk(e,{isLE:n})}function NP(e,t,n={},s){if(s===void 0&&(s=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);Ih(n);for(const c of["p","n","h"]){const u=t[c];if(!(wa(u)&&u!==gk))throw new Error(`CURVE.${c} must be positive bigint`)}const r=Cw(t.p,n.Fp,s),i=Cw(t.n,n.Fn,s),l=["Gx","Gy","a","d"];for(const c of l)if(!r.isValid(t[c]))throw new Error(`CURVE.${c} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:r,Fn:i}}function MP(e,t){return function(s){const r=e(s);return{secretKey:r,publicKey:t(r)}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Fd=BigInt(0),Gd=BigInt(1),Vd=BigInt(2),RP=BigInt(4),Ew=BigInt(8);function IP(e,t,n,s){const r=e.sqr(n),i=e.sqr(s),a=e.add(e.mul(t.a,r),i),l=e.add(e.ONE,e.mul(t.d,e.mul(r,i)));return e.eql(a,l)}function _P(e,t={}){Ih(t,{},{},"extraOpts");const n=t,s=NP("edwards",e,n,n.FpFnLE),{Fp:r,Fn:i}=s;let a=s.CURVE;const{h:l}=a;if(_h(r,a.a)!==1)throw new Error("edwards: CURVE.a must be a square in Fp for complete addition formulas");if(_h(r,a.d)!==-1)throw new Error("edwards: CURVE.d must be a non-square in Fp for complete addition formulas");Ih(n,{},{uvRatio:"function",randomBytes:"function"});const c=n.randomBytes===void 0?z7:n.randomBytes,u=Vd<<BigInt(r.BYTES*8)-Gd;function d(v){if(!r.isOdd)throw new Error("Field does not have .isOdd()");return r.isOdd(v)}const f=n.uvRatio===void 0?(v,w)=>{try{return{isValid:!0,value:r.sqrt(r.div(v,w))}}catch{return{isValid:!1,value:Fd}}}:n.uvRatio;if(!IP(r,a,a.Gx,a.Gy))throw new Error("bad curve params: generator point");const h=r.eql(a.a,r.neg(r.ONE))?v=>r.neg(v):r.eql(a.a,r.ONE)?v=>v:v=>r.mul(a.a,v);function p(v,w,j=!1){const $=j?Gd:Fd;return Hc("coordinate "+v,w,$,u),w}function m(v){if(!(v instanceof b))throw new Error("EdwardsPoint expected")}const k=class k{constructor(w,j,$,C){te(this,"X");te(this,"Y");te(this,"Z");te(this,"T");this.X=p("x",w),this.Y=p("y",j),this.Z=p("z",$,!0),this.T=p("t",C),Object.freeze(this)}static CURVE(){return a}static fromAffine(w){if(w instanceof k)throw new Error("extended point not allowed");const{x:j,y:$}=w||{};return p("x",j),p("y",$),new k(j,$,r.ONE,r.mul(j,$))}static fromBytes(w,j=!1){const $=r.BYTES,{a:C,d:E}=a;w=yu(Yo(w,$,"point")),Ox(j,"zip215");const T=yu(w),S=w[$-1];T[$-1]=S&-129;const N=Rh(T),z=j?u:r.ORDER;Hc("point.y",N,Fd,z);const M=r.sqr(N),R=r.sub(M,r.ONE),I=r.sub(r.mulN(E,M),C);let{isValid:A,value:_}=f(R,I);if(!A)throw new Error("bad point: invalid y coordinate");const O=d(_),D=(S&128)!==0;if(!j&&r.is0(_)&&D)throw new Error("bad point: x=0 and x_0=1");return D!==O&&(_=r.neg(_)),k.fromAffine({x:_,y:N})}static fromHex(w,j=!1){return k.fromBytes(nP(w),j)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(w=6,j=!0){return g.setWindowSize(this,w),j||this.multiply(Vd),this}assertValidity(){const w=this,{a:j,d:$}=a;if(w.is0())throw new Error("bad point: ZERO");const{X:C,Y:E,Z:T,T:S}=w,N=r.sqr(C),z=r.sqr(E),M=r.sqr(T),R=r.sqr(M),I=r.mul(N,j),A=r.mul(r.add(I,z),M),_=r.add(R,r.mul($,r.mul(N,z)));if(!r.eql(A,_))throw new Error("bad point: equation left != right (1)");const O=r.mul(C,E),D=r.mul(T,S);if(!r.eql(O,D))throw new Error("bad point: equation left != right (2)")}equals(w){m(w);const{X:j,Y:$,Z:C}=this,{X:E,Y:T,Z:S}=w,N=r.mul(j,S),z=r.mul(E,C),M=r.mul($,S),R=r.mul(T,C);return r.eql(N,z)&&r.eql(M,R)}is0(){return this.equals(k.ZERO)}negate(){return new k(r.neg(this.X),this.Y,this.Z,r.neg(this.T))}double(){const{X:w,Y:j,Z:$}=this,C=r.sqr(w),E=r.sqr(j),T=r.mul(r.sqr($),Vd),S=h(C),N=r.addN(w,j),z=r.sub(r.subN(r.sqr(N),C),E),M=r.addN(S,E),R=r.subN(M,T),I=r.subN(S,E),A=r.mul(z,R),_=r.mul(M,I),O=r.mul(z,I),D=r.mul(R,M);return new k(A,_,D,O)}add(w){m(w);const{d:j}=a,{X:$,Y:C,Z:E,T}=this,{X:S,Y:N,Z:z,T:M}=w,R=r.mul($,S),I=r.mul(C,N),A=r.mul(r.mulN(T,j),M),_=r.mul(E,z),O=r.sub(r.subN(r.mulN(r.addN($,C),r.addN(S,N)),R),I),D=r.subN(_,A),L=r.addN(_,A),q=r.sub(I,h(R)),F=r.mul(O,D),X=r.mul(L,q),Y=r.mul(O,q),Z=r.mul(D,L);return new k(F,X,Z,Y)}subtract(w){return m(w),this.add(w.negate())}multiply(w){if(!i.isValidNot0(w))throw new RangeError("invalid scalar: expected 1 <= sc < curve.n");const{p:j,f:$}=g.mulSecret(this,w,l,y);return y([j,$])[0]}multiplyUnsafe(w){if(!i.isValid(w))throw new RangeError("invalid scalar: expected 0 <= sc < curve.n");return w===Fd?k.ZERO:this.is0()||w===Gd?this:g.mulUnsafe(this,w,y)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){return g.mulUnsafe(this,a.n).is0()}toAffine(w){const j=this;let $=w;if($!=null&&typeof $!="bigint")throw new TypeError('"invertedZ" expected bigint, got type='+typeof $);const{X:C,Y:E,Z:T}=j,S=j.is0();$==null&&($=S?r.create(Ew):r.inv(T));const N=r.mul(C,$),z=r.mul(E,$),M=r.mul(T,$);if(S)return{x:r.ZERO,y:r.ONE};if(!r.eql(M,r.ONE))throw new Error("invZ was invalid");return{x:N,y:z}}clearCofactor(){return l===Gd?this:l===Vd?this.double():l===RP?this.double().double():l===Ew?this.double().double().double():this.multiplyUnsafe(l)}toBytes(){const{x:w,y:j}=this.toAffine(),$=r.toBytes(j);return $[$.length-1]|=d(w)?128:0,$}toHex(){return tP(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}};te(k,"BASE",new k(a.Gx,a.Gy,r.ONE,r.mul(a.Gx,a.Gy))),te(k,"ZERO",new k(r.ZERO,r.ONE,r.ONE,r.ZERO)),te(k,"Fp",r),te(k,"Fn",i);let b=k;const y=v=>bP(b,v),g=new zP(b,c);return g.bits>=6&&b.BASE.precompute(6),Object.freeze(b.prototype),Object.freeze(b),b}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Wi=BigInt(0),is=BigInt(1),Wd=BigInt(2);function Tw(e,t){return e+t-(t>>is<<is)}function OP(e){const t=BigInt(6)*e;return(n,s,r)=>{const i=s+r,l=((t+r-s)*n+s)%e;return{x_2:l,x_3:i-l}}}function DP(e){return Ih(e,{P:"bigint",type:"string",adjustScalarBytes:"function",powPminus2:"function"},{randomBytes:"function",scalarMultBase:"function"}),Object.freeze({...e})}function LP(e){const t=DP(e),{P:n,type:s,adjustScalarBytes:r,powPminus2:i,randomBytes:a}=t,l=t.scalarMultBase,c=s==="x25519";if(!c&&s!=="x448")throw new Error("invalid type");const u=a===void 0?z7:a,d=c?255:448,f=OP(n),h=c?32:56,p=BigInt(c?9:5),m=BigInt(c?121665:39081),b=c?Wd**BigInt(254):Wd**BigInt(447),y=c?BigInt(8)*(Wd**BigInt(251)-is):BigInt(4)*(Wd**BigInt(445)-is),g=b+y+is,k=A=>st(A,n),v=w(p);function w(A){return R7(k(A),h)}function j(A){const _=yu(Yo(A,h,"uCoordinate"));return c&&(_[31]&=127),k(Rh(_))}function $(A){return Rh(r(yu(Yo(A,h,"scalar"))))}const C=new Set(c?[Wi,is,n-is,BigInt("325606250916557431795983626356110631294008115727848805560023387167927233504"),BigInt("39382357235489614581723060781553021112529911719440698176882885853963445705823")]:[Wi,is,n-is]);function E(A,_){const O=j(_);if(C.has(O))throw new Error("invalid private or public key received");const D=z(O,$(A));if(D===Wi)throw new Error("invalid private or public key received");return w(D)}function T(A){if(l===void 0)return E(A,v);const _=$(A);Hc("scalar",_,b,g);const O=k(l(_));if(O===Wi)throw new Error("invalid private or public key received");return w(O)}const S=T,N=E;function z(A,_){Hc("u",A,Wi,n),Hc("scalar",_,b,g);const O=_,D=A;let L=is,q=Wi,F=A,X=is;const Y=O^O>>is;for(let J=BigInt(d-1);J>=Wi;J--){const K=Tw(n,Y>>J);({x_2:L,x_3:F}=f(K,L,F)),{x_2:q,x_3:X}=f(K,q,X);const ie=L+q,le=k(ie*ie),ve=L-q,ge=k(ve*ve),xe=le-ge,ce=F+X,Q=F-X,ye=k(Q*ie),ue=k(ce*ve),pe=ye+ue,De=ye-ue;F=k(pe*pe),X=k(D*k(De*De)),L=k(le*ge),q=k(xe*(le+k(m*xe)))}const Z=Tw(n,O);({x_2:L,x_3:F}=f(Z,L,F)),{x_2:q,x_3:X}=f(Z,q,X);const ne=i(q);return k(L*ne)}const M={secretKey:h,publicKey:h,seed:h},R=A=>(A=A===void 0?u(h):A,Yo(A,M.seed,"seed"),A),I={randomSecretKey:R};return Object.freeze(M),Object.freeze(I),Object.freeze({keygen:MP(R,S),getSharedSecret:N,getPublicKey:S,scalarMult:E,scalarMultBase:T,utils:I,GuBytes:v.slice(),lengths:M})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const zw=BigInt(0),BP=BigInt(1),Aw=BigInt(2),qP=BigInt(3),HP=BigInt(5),PP=BigInt(8),Dx=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),UP={p:Dx,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:PP,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function F7(e){const t=BigInt(10),n=BigInt(20),s=BigInt(40),r=BigInt(80),i=Dx,l=e*e%i*e%i,c=zs(l,Aw,i)*l%i,u=zs(c,BP,i)*e%i,d=zs(u,HP,i)*u%i,f=zs(d,t,i)*d%i,h=zs(f,n,i)*f%i,p=zs(h,s,i)*h%i,m=zs(p,r,i)*p%i,b=zs(m,r,i)*p%i,y=zs(b,t,i)*d%i;return{pow_p_5_8:zs(y,Aw,i)*e%i,b2:l}}function FP(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Nw=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function GP(e,t){const n=Dx,s=st(t*t*t,n),r=st(s*s*t,n),i=F7(e*r).pow_p_5_8;let a=st(e*s*i,n);const l=st(t*a*a,n),c=a,u=st(a*Nw,n),d=l===e,f=l===st(-e,n),h=l===st(-e*Nw,n);return d&&(a=c),(f||h)&&(a=u),pP(a,n)&&(a=st(-a,n)),{isValid:d||f,value:a}}const Mw=_P(UP,{uvRatio:GP}),yk=(()=>{const e=Dx,t=n=>{const{pow_p_5_8:s,b2:r}=F7(n);return st(zs(s,qP,e)*r,e)};return LP({P:e,type:"x25519",powPminus2:t,adjustScalarBytes:FP,scalarMultBase:n=>{const s=st(n,Mw.Fn.ORDER);if(s===zw)return zw;const r=Mw.BASE.multiply(s);return st((r.Z+r.Y)*t(st(r.Z-r.Y,e)),e)}})})(),VP=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]);function Xr(e,t,n,s,r){return e=e+t+r|0,s=Nh(s^e,16),n=n+s|0,t=Nh(t^n,12),{a:e,b:t,c:n,d:s}}function Zr(e,t,n,s,r){return e=e+t+r|0,s=Nh(s^e,8),n=n+s|0,t=Nh(t^n,7),{a:e,b:t,c:n,d:s}}function WP(e,t={},n,s,r){if(Dr(n),e<=0||e>n)throw new Error('"dkLen" must be 1..'+n+", got "+e);const{key:i,salt:a,personalization:l}=t;if(i!==void 0&&(i.length<1||i.length>n))throw new Error('"key" expected to be undefined or of length=1..'+n);a!==void 0&&gs(a,s,"salt"),l!==void 0&&gs(l,r,"personalization")}class KP{constructor(t,n){te(this,"buffer");te(this,"buffer32");te(this,"finished",!1);te(this,"destroyed",!1);te(this,"length",0);te(this,"pos",0);te(this,"blockLen");te(this,"outputLen");te(this,"canXOF",!1);Dr(t),Dr(n),this.blockLen=t,this.outputLen=n,this.buffer=new Uint8Array(t),this.buffer32=Ah(this.buffer)}update(t){zh(this),gs(t);const{blockLen:n,buffer:s,buffer32:r}=this,i=t.length,a=t.byteOffset,l=t.buffer;for(let c=0;c<i;){this.pos===n&&(po(r),this.compress(r,0,!1),po(r),this.pos=0);const u=Math.min(n-this.pos,i-c),d=a+c;if(u===n&&!(d%4)&&c+u<i){const f=new Uint32Array(l,d,Math.floor((i-c)/4));po(f);for(let h=0;c+n<i;h+=r.length,c+=n)this.length+=n,this.compress(f,h,!1);po(f);continue}s.set(c===0&&u===i?t:t.subarray(c,c+u),this.pos),this.pos+=u,this.length+=u,c+=u}return this}digestInto(t){if(zh(this),b7(t,this),t.byteOffset&3)throw new RangeError('"output" expected 4-byte aligned byteOffset, got '+t.byteOffset);const{pos:n,buffer32:s}=this;this.finished=!0,this.buffer.fill(0,n),po(s),this.compress(s,0,!0),po(s);const r=this.get(),i=t===this.buffer?s:Ah(t),a=Math.floor(this.outputLen/4);for(let d=0;d<a;d++)i[d]=jc(r[d]);const l=this.outputLen%4;if(!l)return;const c=a*4,u=r[a];for(let d=0;d<l;d++)t[c+d]=u>>>8*d}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const s=t.slice(0,n);return this.destroy(),s}_cloneInto(t){const{buffer:n,length:s,finished:r,destroyed:i,outputLen:a,pos:l}=this;return t||(t=new this.constructor({dkLen:a})),t.set(...this.get()),t.buffer.set(n),t.destroyed=i,t.finished=r,t.length=s,t.pos=l,t.outputLen=a,t}clone(){return this._cloneInto()}}function XP(e,t,n,s,r,i,a,l,c,u,d,f,h,p,m,b,y,g,k,v){let w=0;for(let j=0;j<s;j++)({a:r,b:c,c:h,d:y}=Xr(r,c,h,y,n[t+e[w++]])),{a:r,b:c,c:h,d:y}=Zr(r,c,h,y,n[t+e[w++]]),{a:i,b:u,c:p,d:g}=Xr(i,u,p,g,n[t+e[w++]]),{a:i,b:u,c:p,d:g}=Zr(i,u,p,g,n[t+e[w++]]),{a,b:d,c:m,d:k}=Xr(a,d,m,k,n[t+e[w++]]),{a,b:d,c:m,d:k}=Zr(a,d,m,k,n[t+e[w++]]),{a:l,b:f,c:b,d:v}=Xr(l,f,b,v,n[t+e[w++]]),{a:l,b:f,c:b,d:v}=Zr(l,f,b,v,n[t+e[w++]]),{a:r,b:u,c:m,d:v}=Xr(r,u,m,v,n[t+e[w++]]),{a:r,b:u,c:m,d:v}=Zr(r,u,m,v,n[t+e[w++]]),{a:i,b:d,c:b,d:y}=Xr(i,d,b,y,n[t+e[w++]]),{a:i,b:d,c:b,d:y}=Zr(i,d,b,y,n[t+e[w++]]),{a,b:f,c:h,d:g}=Xr(a,f,h,g,n[t+e[w++]]),{a,b:f,c:h,d:g}=Zr(a,f,h,g,n[t+e[w++]]),{a:l,b:c,c:p,d:k}=Xr(l,c,p,k,n[t+e[w++]]),{a:l,b:c,c:p,d:k}=Zr(l,c,p,k,n[t+e[w++]]);return{v0:r,v1:i,v2:a,v3:l,v4:c,v5:u,v6:d,v7:f,v8:h,v9:p,v10:m,v11:b,v12:y,v13:g,v14:k,v15:v}}const Ut=eP.slice();class ZP extends KP{constructor(n={}){n=$7({},n);const s=n.dkLen===void 0?32:n.dkLen;super(64,s);te(this,"v0",Ut[0]|0);te(this,"v1",Ut[1]|0);te(this,"v2",Ut[2]|0);te(this,"v3",Ut[3]|0);te(this,"v4",Ut[4]|0);te(this,"v5",Ut[5]|0);te(this,"v6",Ut[6]|0);te(this,"v7",Ut[7]|0);WP(s,n,32,8,8);let{key:r,personalization:i,salt:a}=n,l=0;if(r!==void 0&&(gs(r,void 0,"key"),l=r.length),this.v0^=this.outputLen|l<<8|65536|1<<24,a!==void 0){gs(a,void 0,"salt");const c=Ah(mw(a));this.v4^=jc(c[0]),this.v5^=jc(c[1])}if(i!==void 0){gs(i,void 0,"personalization");const c=Ah(mw(i));this.v6^=jc(c[0]),this.v7^=jc(c[1])}if(r!==void 0){const c=new Uint8Array(this.blockLen);c.set(r),this.update(c),wm(c)}}get(){const{v0:n,v1:s,v2:r,v3:i,v4:a,v5:l,v6:c,v7:u}=this;return[n,s,r,i,a,l,c,u]}set(n,s,r,i,a,l,c,u){this.v0=n|0,this.v1=s|0,this.v2=r|0,this.v3=i|0,this.v4=a|0,this.v5=l|0,this.v6=c|0,this.v7=u|0}compress(n,s,r){const i=WH(this.length),a=VH(this.length),{v0:l,v1:c,v2:u,v3:d,v4:f,v5:h,v6:p,v7:m,v8:b,v9:y,v10:g,v11:k,v12:v,v13:w,v14:j,v15:$}=XP(VP,s,n,10,this.v0,this.v1,this.v2,this.v3,this.v4,this.v5,this.v6,this.v7,Ut[0],Ut[1],Ut[2],Ut[3],i^Ut[4],a^Ut[5],r?~Ut[6]:Ut[6],Ut[7]);this.v0^=l^b,this.v1^=c^y,this.v2^=u^g,this.v3^=d^k,this.v4^=f^v,this.v5^=h^w,this.v6^=p^j,this.v7^=m^$}destroy(){this.destroyed=!0,wm(this.buffer32),this.set(0,0,0,0,0,0,0,0)}}const Ef=QH(e=>new ZP(e));class Rw{constructor(t,n){te(this,"oHash");te(this,"iHash");te(this,"blockLen");te(this,"outputLen");te(this,"canXOF",!1);te(this,"finished",!1);te(this,"destroyed",!1);if(KH(t),gs(n,void 0,"key"),this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("expected Hash instance");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,r=new Uint8Array(s);r.set(n.length>s?t.create().update(n).digest():n);for(let i=0;i<r.length;i++)r[i]^=54;this.iHash.update(r),this.oHash=t.create();for(let i=0;i<r.length;i++)r[i]^=106;this.oHash.update(r),wm(r)}update(t){return zh(this),this.iHash.update(t),this}digestInto(t){zh(this),b7(t,this),this.finished=!0;const n=t.subarray(0,this.outputLen);this.iHash.digestInto(n),this.oHash.update(n),this.oHash.digestInto(n),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:s,finished:r,destroyed:i,blockLen:a,outputLen:l,canXOF:c}=this;return t=t,t.finished=r,t.destroyed=i,t.blockLen=a,t.outputLen=l,t.canXOF=c,t.oHash=n._cloneInto(t.oHash),t.iHash=s._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const kp=(()=>{const e=(t,n,s)=>new Rw(t,n).update(s).digest();return e.create=(t,n)=>new Rw(t,n),e})(),YP=new TextEncoder().encode("Noise_IK_25519_ChaChaPoly_BLAKE2s"),br=32,Iw=65535,QP=2n**64n-1n,_w=e=>Ef(e,{dkLen:br}),Oh=(...e)=>{const t=new Uint8Array(e.reduce((s,r)=>s+r.length,0));let n=0;for(const s of e)t.set(s,n),n+=s.length;return t};function Ow(e,t,n){const s=kp(Ef,e,t),r=kp(Ef,s,new Uint8Array([1])),i=kp(Ef,s,Oh(r,new Uint8Array([2])));return[r,i]}function kk(){return Sm(yk.utils.randomSecretKey())}function Sm(e){if(e.length!==br)throw new Error(`X25519 private key must be ${br} bytes`);return{publicKey:yk.getPublicKey(e),privateKey:e}}const Dh=(e,t)=>yk.getSharedSecret(e.privateKey,t);var nl,fa,$u,$m;class bp{constructor(){ze(this,$u);ze(this,nl);ze(this,fa,0n)}setKey(t){Se(this,nl,t),Se(this,fa,0n)}encrypt(t,n=new Uint8Array(0)){const s=G(this,nl);return s===void 0?t:gw(s,V(this,$u,$m).call(this),n).encrypt(t)}decrypt(t,n=new Uint8Array(0)){const s=G(this,nl);return s===void 0?t:gw(s,V(this,$u,$m).call(this),n).decrypt(t)}}nl=new WeakMap,fa=new WeakMap,$u=new WeakSet,$m=function(){if(G(this,fa)===QP)throw new Error("nonce exhausted");const t=new Uint8Array(12);return new DataView(t.buffer).setBigUint64(4,G(this,fa),!0),Se(this,fa,G(this,fa)+1n),t};var ha,Ys;class JP{constructor(){ze(this,ha);ze(this,Ys);te(this,"cipher",new bp);const t=YP;Se(this,Ys,t.length<=br?Oh(t,new Uint8Array(br-t.length)):_w(t)),Se(this,ha,G(this,Ys).slice())}mixKey(t){const[n,s]=Ow(G(this,ha),t);Se(this,ha,n),this.cipher.setKey(s.subarray(0,br))}mixHash(t){Se(this,Ys,_w(Oh(G(this,Ys),t)))}encryptAndHash(t){const n=this.cipher.encrypt(t,G(this,Ys));return this.mixHash(n),n}decryptAndHash(t){const n=this.cipher.decrypt(t,G(this,Ys));return this.mixHash(t),n}get handshakeHash(){return G(this,Ys)}split(){const[t,n]=Ow(G(this,ha),new Uint8Array(0)),s=new bp;s.setKey(t.subarray(0,br));const r=new bp;return r.setKey(n.subarray(0,br)),[s,r]}}ha=new WeakMap,Ys=new WeakMap;function G7(e,t){if(e.offset+t>e.buffer.length)throw new Error("malformed Noise message");const n=e.buffer.subarray(e.offset,e.offset+t);return e.offset+=t,n}function eU(e,t,n,s){t.push(n.ephemeral.publicKey),e.mixHash(n.ephemeral.publicKey),e.mixKey(Dh(n.ephemeral,s)),t.push(e.encryptAndHash(n.static.publicKey)),e.mixKey(Dh(n.static,s))}function tU(e,t,n){const s=G7(t,br).slice();return e.mixHash(s),e.mixKey(Dh(n.ephemeral,s)),e.mixKey(Dh(n.static,s)),s}const Dw=(e,t)=>{if(e.length>Iw)throw new Error(`${t} exceeds ${Iw} bytes`)};function nU(e,t){const n=new JP;return n.mixHash(e),n.mixHash(t),n}function sU(e){const t=e.ephemeral??kk(),n=nU(e.prologue,e.remoteStatic);return{writeMessage1(s){const r=[];eU(n,r,{static:e.static,ephemeral:t},e.remoteStatic),r.push(n.encryptAndHash(s));const i=Oh(...r);return Dw(i,"handshake message"),i},readMessage2(s){Dw(s,"handshake message");const r={buffer:s,offset:0};tU(n,r,{ephemeral:t,static:e.static});const i=n.decryptAndHash(G7(r,s.length-r.offset)),[a,l]=n.split();return{payload:i,result:{send:a,receive:l,handshakeHash:n.handshakeHash}}}}}const rU=new TextEncoder().encode("pinomad/1"),V7=new TextEncoder,W7=new TextDecoder("utf-8",{fatal:!0}),iU=e=>V7.encode(JSON.stringify(e));function aU(e){try{return JSON.parse(W7.decode(e))}catch{throw new Error("handshake payload is not JSON")}}function oU(e){const t=aU(e);if((t==null?void 0:t.v)!==1)throw new Error("unsupported host hello");return{v:1}}const Sc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function bk(e){let t="";for(let n=0;n<e.length;n+=3){const s=e[n],r=e[n+1],i=e[n+2];t+=Sc[s>>2]+Sc[(s&3)<<4|(r??0)>>4],r!==void 0&&(t+=Sc[(r&15)<<2|(i??0)>>6]),i!==void 0&&(t+=Sc[i&63])}return t}function ja(e){if(e.length%4===1)throw new Error("invalid base64url");const t=new Map(Array.from(Sc,(s,r)=>[s,r])),n=[];for(let s=0;s<e.length;s+=4){const i=[...e.slice(s,s+4)].map(l=>{const c=t.get(l);if(c===void 0)throw new Error("invalid base64url");return c}),a=i.reduce((l,c,u)=>l|c<<18-u*6,0);n.push(a>>16&255),i.length>2&&n.push(a>>8&255),i.length>3&&n.push(a&255)}return new Uint8Array(n)}const Kd=65518;var Cu,Eu,sl;class lU{constructor(t){ze(this,Cu);ze(this,Eu);ze(this,sl,[]);Se(this,Cu,t.send),Se(this,Eu,t.receive)}seal(t){const n=V7.encode(t),s=[];for(let r=0;r<=n.length;r+=Kd){const i=r+Kd>=n.length,a=new Uint8Array(1+Math.min(Kd,n.length-r));if(a[0]=i?0:1,a.set(n.subarray(r,r+Kd),1),s.push(G(this,Cu).encrypt(a)),i)break}return s}open(t){const n=G(this,Eu).decrypt(t),s=n[0];if(s!==0&&s!==1)throw new Error("bad record flag");if(G(this,sl).push(n.subarray(1)),s===1)return;const r=cU(G(this,sl));return Se(this,sl,[]),W7.decode(r)}}Cu=new WeakMap,Eu=new WeakMap,sl=new WeakMap;function cU(e){const t=new Uint8Array(e.reduce((s,r)=>s+r.length,0));let n=0;for(const s of e)t.set(s,n),n+=s.length;return t}function K7(e){let t=e.pairing;return{label:e.url,open(n){const s=new WebSocket(e.url);s.binaryType="arraybuffer";const r=sU({prologue:rU,static:e.device,remoteStatic:e.hostKey});let i,a=[],l=!1;const c=(d,f)=>{l||(l=!0,n.closed(d,f))},u=d=>{s.close(),c(1008,d)};return s.onopen=()=>{const d=t===void 0?{v:1}:{v:1,pair:t};s.send(r.writeMessage1(iU(d)))},s.onmessage=d=>{var f;try{const h=d.data instanceof ArrayBuffer?new Uint8Array(d.data):new Uint8Array(d.data);if(i===void 0){const{payload:p,result:m}=r.readMessage2(h);oU(p),i=new lU(m),t!==void 0&&(t=void 0,(f=e.onPaired)==null||f.call(e));const b=a;a=[];for(const y of b)for(const g of i.seal(y))s.send(g)}else{const p=i.open(h);p!==void 0&&n.message(p)}}catch(h){u(h instanceof Error?h.message:"secure channel failure")}},s.onclose=d=>c(d.code,d.reason===""?void 0:d.reason),s.onerror=()=>{},{send(d){if(i===void 0){a.push(d);return}for(const f of i.seal(d))s.send(f)},close(){s.close()}}}}}const Cm=e=>{if(typeof e!="string")return!1;try{return ja(e).length===32}catch{return!1}},uU=e=>{if(typeof e!="string")return!1;try{const t=new URL(e).protocol;return t==="ws:"||t==="wss:"}catch{return!1}},dU=e=>{if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.serverOrigin=="string"&&t.serverOrigin!==""&&Cm(t.hostId)};function X7(e){if(typeof e!="object"||e===null)return;const t=e;if(!uU(t.url)||!Cm(t.hostKey)||!Cm(t.privateKey))return;const n=dU(t.account)?t.account:void 0;return{url:t.url,hostKey:t.hostKey,privateKey:t.privateKey,...n===void 0?{}:{account:n}}}function fU(e){const t=r=>{try{return new URL(r.url).host}catch{return r.url}},n=new Map;for(const r of e)n.set(t(r),(n.get(t(r))??0)+1);const s=new Map;for(const r of e){const i=t(r);s.set(r.hostKey,n.get(i)>1?`${i} · ${r.hostKey.slice(0,6)}`:i)}return s}function vk(e){const t=e.indexOf(".");if(t<=0||e.indexOf(".",t+1)!==-1)return;const n=e.slice(0,t),s=e.slice(t+1);try{if(ja(n).length!==32||ja(s).length===0)return}catch{return}return{hostKey:n,secret:s}}function Z7(e){let t;try{t=new URL(e.trim())}catch{return}const n=new URLSearchParams(t.hash.replace(/^#/,"")),s=n.get("pair");if(s===null||s===""||vk(s)===void 0)return;let r=n.get("url");if(r===null||r==="")if(t.protocol==="http:")r=`ws://${t.host}/`;else if(t.protocol==="https:")r=`wss://${t.host}/`;else return;else try{const i=new URL(r).protocol;if(i!=="ws:"&&i!=="wss:")return}catch{return}return`pair=${s}&url=${encodeURIComponent(r)}`}const Y7=(e,t)=>fetch(e,t),gr=e=>({ok:!0,value:e}),Ns=(e,t)=>({ok:!1,error:{code:e,...t===void 0?{}:{status:t}}}),Xd=e=>e.code==="unauthenticated";async function hU(e,t=Y7){const n=new AbortController,s=setTimeout(()=>n.abort(),5e3);try{const r=await t(`${e.replace(/\/+$/,"")}/api/me`,{signal:n.signal});if(r.status===401)return"enabled";if(r.status===200){const i=await r.text();let a;try{a=JSON.parse(i)}catch{return"disabled"}return typeof(a==null?void 0:a.user)=="object"&&a.user!==null?"enabled":"disabled"}return r.status===404?"disabled":"unreachable"}catch{return"unreachable"}finally{clearTimeout(s)}}function xU(e){let t;try{t=new URL(e)}catch{return!1}const n=t.hostname,s=n==="localhost"||n.endsWith(".localhost")||n.startsWith("127.")||n==="::1"||n==="[::1]";return t.protocol==="https:"||t.protocol==="http:"&&s}function Lh(e){try{return new URL(e).origin}catch{return e.replace(/\/+$/,"")}}const ta=e=>typeof e=="object"&&e!==null,Lw=e=>{if(!(!ta(e)||!ta(e.user)||typeof e.user.username!="string"))return{user:{username:e.user.username}}};function hc(e){const t=e.fetch??Y7,n=Lh(e.origin),s=e.credentials.mode==="bearer"?e.credentials.token:void 0,r=e.credentials.mode==="cookie"?{credentials:"same-origin"}:{},i=async(a,l,c)=>{let u;try{u=await t(`${n}${a}`,{...r,method:l,headers:{...s===void 0?{}:{authorization:`Bearer ${s}`},...c===void 0?{}:{"content-type":"application/json"}},...c===void 0?{}:{body:JSON.stringify(c)}})}catch{return Ns("network")}const d=await u.json().catch(()=>{});if(u.status>=200&&u.status<300)return gr(d);const f=ta(d)&&typeof d.error=="string"?d.error:u.status===401?"unauthenticated":"unknown";return Ns(f,u.status)};return{origin:n,login:async(a,l)=>{const c=await i("/api/login","POST",{username:a,password:l});if(!c.ok)return c;const u=Lw(c.value);if(u===void 0||!ta(c.value)||typeof c.value.expiresAt!="number")return Ns("invalid_response");const d=c.value.token;return gr({...u,expiresAt:c.value.expiresAt,...typeof d=="string"?{token:d}:{}})},me:async()=>{const a=await i("/api/me","GET");if(!a.ok)return a;const l=Lw(a.value);return l===void 0?Ns("invalid_response"):gr(l)},logout:async()=>{const a=await i("/api/logout","POST");return a.ok?gr(void 0):a},revokeAllSessions:async()=>{const a=await i("/api/sessions/revoke-all","POST");return a.ok?gr(void 0):a},createJoinToken:async()=>{const a=await i("/api/join-tokens","POST");if(!a.ok)return a;const l=a.value;return!ta(l)||typeof l.token!="string"||typeof l.expiresAt!="number"||typeof l.command!="string"?Ns("invalid_response"):gr({token:l.token,expiresAt:l.expiresAt,command:l.command})},listHosts:async()=>{const a=await i("/api/hosts","GET");if(!a.ok)return a;if(!Array.isArray(a.value))return Ns("invalid_response");const l=[];for(const c of a.value){if(!ta(c)||typeof c.hostId!="string"||typeof c.name!="string"||typeof c.noisePublicKey!="string"||typeof c.online!="boolean"||typeof c.lastSeenAt!="number"||c.pairing!=="available"&&c.pairing!=="offline"&&c.pairing!=="host_too_old"&&c.pairing!=="key_mismatch")return Ns("invalid_response");l.push({hostId:c.hostId,name:c.name,noisePublicKey:c.noisePublicKey,online:c.online,lastSeenAt:c.lastSeenAt,pairing:c.pairing})}return gr(l)},requestPairing:async a=>{const l=await i(`/api/hosts/${encodeURIComponent(a)}/pairing`,"POST");if(!l.ok)return l;const c=l.value;return!ta(c)||typeof c.url!="string"||typeof c.hostKey!="string"||typeof c.secret!="string"||typeof c.expiresAt!="number"?Ns("invalid_response"):gr({url:c.url,hostKey:c.hostKey,secret:c.secret,expiresAt:c.expiresAt})}}}function pU(e){return Z7(`https://server.invalid/#pair=${e.hostKey}.${e.secret}&url=${encodeURIComponent(e.url)}`)}function gU(e,t,n){const s=Lh(e);return t.map(r=>{const i=n.filter(c=>c.account!==void 0&&Lh(c.account.serverOrigin)===s&&c.account.hostId===r.hostId),a=i.find(c=>c.hostKey===r.noisePublicKey);if(a!==void 0)return{host:r,status:"paired",stored:a,linkable:!1};if(i.length>0)return{host:r,status:"key_changed",stored:i[0],linkable:!1};const l=n.find(c=>c.hostKey===r.noisePublicKey);return l!==void 0?{host:r,status:"paired",stored:l,linkable:l.account===void 0}:{host:r,status:"unpaired",linkable:!1}})}function mU(e){return new Promise((t,n)=>{let s;s=K7({url:e.url,hostKey:e.hostKey,device:e.device,pairing:{secret:e.secret,name:e.name},onPaired:()=>{t(),s==null||s.close()}}).open({message:()=>{},closed:i=>n(new Error(`pairing connection closed (${i})`))})})}async function yU(e,t,n,s=mU){const r=await e.requestPairing(t);if(!r.ok)return r;const i=pU(r.value);if(i===void 0)return Ns("invalid_offer");const a=new URLSearchParams(i),l=vk(a.get("pair")),c=a.get("url");if(l===void 0||c===null)return Ns("invalid_offer");const u=kk();try{await s({url:c,hostKey:ja(l.hostKey),device:u,secret:l.secret,name:n})}catch{return Ns("pair_rejected")}return gr({url:c,hostKey:l.hostKey,privateKey:bk(u.privateKey),account:{serverOrigin:e.origin,hostId:t}})}const kU="ws://127.0.0.1:7420",Sa="pinomad.device";function wk(e){if(e!==null)try{return X7(JSON.parse(e))}catch{return}}function bU(e,t,n,s){const r=new URLSearchParams(e.replace(/^#/,"")),i=r.get("token");if(i!==null&&i!=="")return{kind:"token",url:r.get("url")??kU,token:i};const a=r.get("pair");if(a!==null){const c=vk(a);return c===void 0?void 0:{kind:"pair",url:r.get("url")??`${t.protocol==="https:"?"wss":"ws"}://${t.host}/`,hostKey:c.hostKey,secret:c.secret}}if(e.replace(/^#/,"")!=="")return;const l=n.find(c=>c.hostKey===s)??n[0];return l===void 0?void 0:{kind:"device",...l}}function vU(e,t){return new URL(e).host===t.host}function Q7(e){const t=/iPhone/.test(e)?"iPhone":/iPad/.test(e)?"iPad":/Android/.test(e)?"Android":/Windows/.test(e)?"Windows":/Mac/.test(e)?"Mac":/Linux/.test(e)?"Linux":void 0,n=/Edg(?:e|A|iOS)?\//.test(e)?"Edge":/Firefox\//.test(e)?"Firefox":/Chrome\//.test(e)||/HeadlessChrome\//.test(e)?"Chrome":/Safari\//.test(e)?"Safari":void 0,s=[t,n].filter(r=>r!==void 0).join(" ");return s===""?"Browser":s}const vu="pinomad.activeHost",J7="pinomad.hosts",wU=()=>{const e=localStorage.getItem(J7);if(e===null)return[];let t;try{t=JSON.parse(e)}catch{return[]}return Array.isArray(t)?t.flatMap(n=>{const s=X7(n);return s===void 0?[]:[s]}):[]},Em=e=>{localStorage.setItem(J7,JSON.stringify(e))};function vp(){const e=wU(),t=wk(localStorage.getItem(Sa));if(t===void 0)return e;if(e.some(n=>n.hostKey===t.hostKey))return localStorage.removeItem(Sa),e;try{Em([...e,t]),localStorage.removeItem(Sa)}catch{}return[...e,t]}const Tm={list:()=>Promise.resolve(vp()),save:e=>(Em([...vp().filter(t=>t.hostKey!==e.hostKey),e]),Promise.resolve()),remove:e=>{Em(vp().filter(n=>n.hostKey!==e));const t=wk(localStorage.getItem(Sa));return t!==void 0&&t.hostKey===e&&localStorage.removeItem(Sa),Promise.resolve()}};function jU(e){let t;const n=async()=>{const s=wk(localStorage.getItem(Sa));if(s!==void 0)try{(await e.hosts.list()).some(i=>i.hostKey===s.hostKey)||await e.hosts.save(s),localStorage.removeItem(Sa);return}catch(r){return console.error("Could not migrate the stored device into the desktop host list",r),s}};return{list:async()=>{const s=await(t??(t=n())),r=await e.hosts.list();return s===void 0||r.some(i=>i.hostKey===s.hostKey)?r:[...r,s]},save:s=>e.hosts.save(s),remove:s=>e.hosts.remove(s)}}function SU(){const e=window.pinomadDesktop;return e===void 0?Tm:jU(e)}const $U={store:Tm,hosts:[],activeHostKey:null,paired:e=>Tm.save(e)},e9=x.createContext($U),Lx=()=>x.useContext(e9);function Ku(e){localStorage.setItem(vu,e),history.replaceState(null,"",window.location.pathname+window.location.search),window.location.reload()}const Ks=e=>({ok:!1,error:{code:e}});function CU(e){const t=new Set;let n={status:"checking"},s,r=e.bridge===void 0?"cookie":"bearer",i;const a=new Set,l=f=>{n=f;for(const h of t)h()},c=()=>{s=void 0,l({status:"signed-out",mode:r,...i===void 0?{}:{serverOrigin:i}})},u=async(f,h)=>{var y,g;const p=await f.listHosts();if(s!==f)return{ok:!1,error:{code:"stale"}};if(!p.ok){if(Xd(p.error))return r==="bearer"&&((g=(y=e.bridge)==null?void 0:y.account)==null||g.clear().catch(()=>{})),c(),p;const k=n.status==="signed-in"?n.hosts:[];return l({status:"signed-in",mode:r,user:h,serverOrigin:f.origin,hosts:k,hostsError:p.error,rejectedHostKeys:[...a]}),p}const m=await e.hosts.list().catch(()=>[]);if(s!==f)return{ok:!1,error:{code:"stale"}};const b=gU(f.origin,p.value,m);for(const k of b)if(k.linkable&&k.stored!==void 0){const v=k.stored;e.hosts.save({...v,account:{serverOrigin:f.origin,hostId:k.host.hostId}}).catch(()=>{})}return l({status:"signed-in",mode:r,user:h,serverOrigin:f.origin,hosts:b,rejectedHostKeys:[...a]}),{ok:!0,value:b}};return(async()=>{var m,b;const f=e.bridge;if(f!==void 0){const y=await((m=f.account)==null?void 0:m.get().catch(()=>{}));if(y===void 0){c();return}i=y.serverOrigin;const g=hc({origin:y.serverOrigin,credentials:{mode:"bearer",token:y.token},fetch:e.fetch}),k=await g.me();if(!k.ok){Xd(k.error)&&((b=f.account)==null||b.clear().catch(()=>{})),c();return}s=g,await u(g,k.value.user.username);return}if(await hU(e.origin,e.fetch)!=="enabled"){l({status:"unavailable"});return}const h=hc({origin:e.origin,credentials:{mode:"cookie"},fetch:e.fetch}),p=await h.me();if(!p.ok){i=e.origin,c();return}s=h,i=e.origin,await u(h,p.value.user.username)})(),{get state(){return n},subscribe:f=>(t.add(f),()=>{t.delete(f)}),login:async({username:f,password:h,serverOrigin:p})=>{var y,g;let m;if(r==="cookie")m=hc({origin:e.origin,credentials:{mode:"cookie"},fetch:e.fetch});else{const k=p??i;if(k===void 0)return Ks("origin_required");if(!xU(k))return Ks("insecure_origin");m=hc({origin:k,credentials:{mode:"bearer"},fetch:e.fetch})}const b=await m.login(f,h);if(!b.ok)return b;if(r==="bearer"){if(b.value.token===void 0)return Ks("invalid_response");m=hc({origin:m.origin,credentials:{mode:"bearer",token:b.value.token},fetch:e.fetch}),i=m.origin,(g=(y=e.bridge)==null?void 0:y.account)==null||g.save({serverOrigin:m.origin,token:b.value.token}).catch(k=>console.error("Could not persist the account session",k))}return s=m,await u(m,b.value.user.username),{ok:!0,value:void 0}},logout:async()=>{var h,p;if(s===void 0)return Ks("unauthenticated");const f=await s.logout();return r==="bearer"&&((p=(h=e.bridge)==null?void 0:h.account)==null||p.clear().catch(()=>{})),c(),f.ok?{ok:!0,value:void 0}:f},revokeAll:async()=>{var h,p;if(s===void 0)return Ks("unauthenticated");const f=await s.revokeAllSessions();return r==="bearer"&&((p=(h=e.bridge)==null?void 0:h.account)==null||p.clear().catch(()=>{})),c(),f.ok?{ok:!0,value:void 0}:f},refreshHosts:async()=>s===void 0||n.status!=="signed-in"?Ks("unauthenticated"):u(s,n.user),createJoinToken:async()=>{if(s===void 0)return Ks("unauthenticated");const f=await s.createJoinToken();return!f.ok&&Xd(f.error)&&c(),f},pairHost:async f=>{if(s===void 0)return Ks("unauthenticated");const h=e.name??(()=>"This device"),p=await yU(s,f,h(),e.connect);if(!p.ok)return Xd(p.error)&&c(),p;a.delete(p.value.hostKey);try{await e.paired(p.value)}catch{return n.status==="signed-in"&&l({...n,unsavedHost:p.value}),{ok:!1,error:{code:"pairing_not_saved"}}}const m=await e.hosts.list().catch(()=>[]);for(const b of m)b.account!==void 0&&Lh(b.account.serverOrigin)===s.origin&&b.account.hostId===f&&b.hostKey!==p.value.hostKey&&e.hosts.remove(b.hostKey).catch(()=>{});return n.status==="signed-in"&&s!==void 0&&await u(s,n.user),p},retryUnsavedHost:async()=>{const f=n.status==="signed-in"?n.unsavedHost:void 0;if(f===void 0)return Ks("nothing_pending");try{await e.paired(f)}catch{return Ks("pairing_not_saved")}return n.status==="signed-in"&&l({...n,unsavedHost:void 0}),{ok:!0,value:void 0}},hostRejected:f=>{a.add(f),n.status==="signed-in"&&l({...n,rejectedHostKeys:[...a]})}}}function EU(){const{store:e,paired:t}=Lx(),[n]=x.useState(()=>CU({origin:window.location.origin,bridge:window.pinomadDesktop,hosts:e,paired:t,name:()=>Q7(navigator.userAgent)}));return x.useSyncExternalStore(n.subscribe,()=>n.state),n}const Ki=()=>Promise.reject(new Error("no AccountProvider")),TU={state:{status:"unavailable"},subscribe:()=>()=>{},login:Ki,logout:Ki,revokeAll:Ki,refreshHosts:Ki,createJoinToken:Ki,pairHost:Ki,retryUnsavedHost:Ki,hostRejected:()=>{}},t9=x.createContext(TU);function zU({children:e}){const t=EU();return o.jsx(t9.Provider,{value:t,children:e})}function Bx(){const e=x.useContext(t9);return x.useSyncExternalStore(e.subscribe,()=>e.state),e}function zm(){const[e,t]=x.useState(""),[n,s]=x.useState(),r=()=>{const i=Z7(e);if(i===void 0){s(/[#?&]token=/.test(e)?"Token links can't pair a device — paste a pairing link instead (pinomad pair, or Devices → Pair a device).":"That isn't a pairing link — paste one like http://<host>/#pair=… or pinomad://pair#pair=…");return}window.location.hash=i,window.location.reload()};return o.jsxs(o.Fragment,{children:[o.jsxs(we,{gap:2,vAlign:"end",style:{width:"100%"},children:[o.jsx("div",{className:"min-w-0 flex-1",children:o.jsx(xs,{label:"Pairing link",isLabelHidden:!0,placeholder:"http://…/#pair=… or pinomad://pair#…",value:e,onChange:i=>{s(void 0),t(i)},onEnter:r,width:"100%"})}),o.jsx(re,{label:"Connect",variant:"primary",isDisabled:e.trim()==="",onClick:r})]}),n===void 0?null:o.jsx(yt,{status:"error",title:"Not a pairing link",description:n})]})}function Xu(e){switch(e.code){case"invalid_credentials":return"Wrong username or password.";case"rate_limited":return"Too many attempts. Wait a few minutes and try again.";case"network":return"Can't reach the server. Check the address and your connection.";case"origin_required":return"Enter the server address.";case"insecure_origin":return"The server address must start with https://.";case"unauthenticated":return"You were signed out. Sign in again.";case"accounts_disabled":return"This server doesn't have accounts turned on.";case"host_offline":return"The host is offline.";case"host_too_old":return"The host needs an update (run pinomad upgrade on it).";case"key_mismatch":return"The host's key doesn't match its account record. Run pinomad join on it again.";case"disabled":return"The host doesn't accept account devices. Turn it on in Devices, or pair with a QR code.";case"not_joined":case"rebinding":return"The host is moving between servers. Try again after it restarts.";case"host_timeout":return"The host didn't answer in time. Try again.";case"pair_rejected":return"The host refused this device. If you revoked it before, pair it with a QR code instead.";case"pairing_not_saved":return"Paired, but this device couldn't save the pairing.";default:return`Something went wrong (${e.code}).`}}function n9(){const e=Bx(),{state:t}=e,[n,s]=x.useState();switch(t.status){case"unavailable":return null;case"checking":return o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(on,{size:"sm"}),o.jsx(ee,{type:"supporting",children:"Checking for an account…"})]});case"signed-out":return o.jsxs(fe,{gap:3,style:{width:"100%"},children:[n===void 0?null:o.jsx(yt,{status:"warning",title:"Sign-out not confirmed",description:n}),o.jsx(AU,{account:e,state:t})]});case"signed-in":return o.jsx(NU,{account:e,state:t,onSignOutWarning:s})}}function AU({account:e,state:t}){const n=t.mode==="bearer",[s,r]=x.useState(t.serverOrigin??""),[i,a]=x.useState(""),[l,c]=x.useState(""),[u,d]=x.useState(!1),[f,h]=x.useState(),p=i.trim()!==""&&l!==""&&(!n||s.trim()!==""),m=()=>{!p||u||(d(!0),h(void 0),e.login({username:i.trim(),password:l,...n?{serverOrigin:s.trim()}:{}}).then(b=>{d(!1),b.ok||h(b.error)}))};return o.jsxs(fe,{gap:3,style:{width:"100%"},children:[o.jsxs(fe,{gap:1,children:[o.jsx(Lr,{level:3,children:"Sign in"}),o.jsx(ee,{type:"supporting",children:"See the hosts on your account and connect without a QR code."})]}),n?o.jsx(xs,{label:"Server",placeholder:"https://nomad.example.com",value:s,onChange:r,onEnter:m,width:"100%"}):null,o.jsx(xs,{label:"Username",value:i,onChange:a,onEnter:m,width:"100%"}),o.jsx(xs,{label:"Password",type:"password",value:l,onChange:c,onEnter:m,width:"100%"}),f===void 0?null:o.jsx(yt,{status:"error",title:"Couldn't sign in",description:Xu(f)}),o.jsx(re,{label:"Sign in",variant:"primary",isLoading:u,isDisabled:!p,onClick:m})]})}function NU({account:e,state:t,onSignOutWarning:n}){const[s,r]=x.useState(),i=new URL(t.serverOrigin).host,a=l=>{r(void 0),e.retryUnsavedHost().then(c=>{c.ok?Ku(l.hostKey):r(c.error)})};return o.jsxs(fe,{gap:4,style:{width:"100%"},children:[o.jsxs(fe,{gap:1,children:[o.jsx(Lr,{level:3,children:t.user}),o.jsxs(ee,{type:"supporting",children:["Signed in to ",i]})]}),t.unsavedHost===void 0?null:o.jsx(yt,{status:"warning",title:"This pairing wasn't saved",description:"It will be lost when the app restarts.",endContent:o.jsx(re,{label:"Retry",variant:"ghost",onClick:()=>a(t.unsavedHost)})}),o.jsx(MU,{account:e,state:t,onError:r}),s===void 0?null:o.jsx(yt,{status:"error",title:"Couldn't pair",description:Xu(s)}),o.jsx(_U,{account:e}),o.jsx(DU,{account:e,onWarning:n})]})}function MU({account:e,state:t,onError:n}){const s=Vl(3e4),{activeHostKey:r}=Lx(),[i,a]=x.useState(),l=c=>{a(c),n(void 0),e.pairHost(c).then(u=>{a(void 0),u.ok?Ku(u.value.hostKey):n(u.error)})};return o.jsxs(fe,{gap:2,children:[o.jsxs(we,{gap:2,vAlign:"center",hAlign:"between",children:[o.jsx(ee,{weight:"semibold",children:"Hosts"}),o.jsx(re,{label:"Refresh",variant:"ghost",size:"sm",onClick:()=>void e.refreshHosts()})]}),t.hostsError===void 0?null:o.jsx(yt,{status:"warning",title:"Couldn't refresh hosts",description:Xu(t.hostsError)}),t.hosts.length===0?o.jsx(ee,{type:"supporting",children:"No hosts yet. Add one below."}):o.jsx(xt,{density:"compact",children:t.hosts.map(c=>{var u;return o.jsx(IU,{match:c,now:s,isCurrent:c.status==="paired"&&((u=c.stored)==null?void 0:u.hostKey)===r,isRevoked:c.stored!==void 0&&t.rejectedHostKeys.includes(c.stored.hostKey),isPairing:i===c.host.hostId,isBusy:i!==void 0,onPair:()=>l(c.host.hostId)},c.host.hostId)})})]})}const RU={offline:"Offline",host_too_old:"Needs pinomad upgrade",key_mismatch:"Run pinomad join again"};function IU({match:e,now:t,isCurrent:n,isRevoked:s,isPairing:r,isBusy:i,onPair:a}){const{host:l,status:c,stored:u}=e,d=l.online?"Online":`Last seen ${_x(l.lastSeenAt,t)}`,f=l.pairing==="available",h=b=>o.jsx(re,{label:b,variant:"secondary",size:"sm",isLoading:r,isDisabled:!f||i,onClick:a});let p=d,m;return s?(p="This device was refused by the host",m=h("Pair again")):c==="key_changed"?(p="The host's identity changed. Pair again only if you reinstalled it.",m=o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(vn,{label:"Key changed",color:"orange",size:"sm"}),h("Pair again")]})):c==="paired"?m=n?o.jsx(vn,{label:"Connected",size:"sm"}):o.jsx(re,{label:"Connect",variant:"secondary",size:"sm",onClick:()=>Ku(u.hostKey)}):(f||(p=`${d} · ${RU[l.pairing]}`),m=h("Pair")),o.jsx(He,{label:l.name,description:p,startContent:o.jsx(cr,{variant:l.online?"success":"neutral",label:l.online?"Online":"Offline"}),endContent:m})}function _U({account:e}){const[t,n]=x.useState(),[s,r]=x.useState(),[i,a]=x.useState(!1),l=()=>{a(!0),r(void 0),e.createJoinToken().then(c=>{a(!1),c.ok?n(c.value):r(c.error)})};return o.jsxs(fe,{gap:2,children:[t===void 0?o.jsx(re,{label:"Add a host",variant:"secondary",isLoading:i,onClick:l}):o.jsx(OU,{token:t,onRenew:l,onDone:()=>{n(void 0),e.refreshHosts()}}),s===void 0?null:o.jsx(yt,{status:"error",title:"Couldn't create a join command",description:Xu(s)})]})}function OU({token:e,onRenew:t,onDone:n}){const s=Vl(1e3),r=Math.max(0,Math.ceil((e.expiresAt-s)/1e3));return o.jsxs(fe,{gap:2,children:[o.jsx(ee,{weight:"semibold",children:"Add a host"}),o.jsx(ee,{type:"supporting",children:"Run this on the machine you want to add. It installs PiNomad and joins it to your account."}),o.jsx(I0,{code:e.command,hasCopyButton:!0,isWrapped:!0}),o.jsxs(we,{gap:2,vAlign:"center",hAlign:"between",children:[r===0?o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(ee,{type:"supporting",children:"Expired"}),o.jsx(re,{label:"New command",variant:"secondary",size:"sm",onClick:t})]}):o.jsxs(ee,{type:"supporting",children:["Works once · expires in ",Math.floor(r/60),":",String(r%60).padStart(2,"0")]}),o.jsx(re,{label:"Done",variant:"ghost",size:"sm",onClick:n})]})]})}function DU({account:e,onWarning:t}){const[n,s]=x.useState(!1);return x.useEffect(()=>{if(!n)return;const r=setTimeout(()=>s(!1),5e3);return()=>clearTimeout(r)},[n]),o.jsxs(fe,{gap:1,children:[o.jsxs(we,{gap:2,children:[o.jsx(re,{label:"Sign out",variant:"ghost",onClick:()=>{t(void 0),e.logout().then(r=>{r.ok||t("Signed out on this device, but the server didn't confirm. The session ends on its own within 30 days.")})}}),o.jsx(re,{label:n?"Sign out everywhere?":"Sign out everywhere",variant:n?"destructive":"ghost",onClick:()=>{if(!n){s(!0);return}t(void 0),e.revokeAll().then(r=>{r.ok||t("Other devices may still be signed in. Sign in and try Sign out everywhere again.")})}})]}),o.jsx(ee,{type:"supporting",children:"Signing out doesn't unpair this device from its hosts. Revoke it in Devices."})]})}function s9({onClose:e}){return o.jsx(vs,{isOpen:!0,onOpenChange:t=>t?void 0:e(),width:480,children:o.jsx(Qn,{header:o.jsx(ws,{title:"Account",onOpenChange:()=>e()}),content:o.jsx(Jn,{children:o.jsx("div",{style:{padding:"var(--spacing-2)"},children:o.jsx(n9,{})})})})})}function r9({onPairAnother:e,onOpenAccount:t}){const{hosts:n,activeHostKey:s}=Lx(),r=Bx(),i=fU(n),a=n.find(l=>l.hostKey===s)??n[0];return o.jsxs(Va,{placement:"above",button:{label:a===void 0?"Hosts":i.get(a.hostKey)??"Hosts",icon:o.jsx(gu,{"aria-hidden":"true"}),variant:"ghost",size:"sm",width:"100%"},children:[o.jsx(a4,{label:"Hosts",value:a==null?void 0:a.hostKey,onChange:Ku,children:n.map(l=>o.jsx(o4,{value:l.hostKey,label:i.get(l.hostKey)},l.hostKey))}),o.jsx(Kc,{label:"Pair another host…",icon:o.jsx(Ko,{"aria-hidden":"true"}),onClick:e}),r.state.status==="unavailable"?null:o.jsx(Kc,{label:"Account…",icon:o.jsx(pH,{"aria-hidden":"true"}),onClick:t})]})}function i9({onClose:e}){return o.jsx(vs,{isOpen:!0,onOpenChange:t=>t?void 0:e(),purpose:"form",width:480,children:o.jsx(Qn,{header:o.jsx(ws,{title:"Pair another host",subtitle:"Paste a pairing link from pinomad pair or Devices → Pair a device.",onOpenChange:()=>e()}),content:o.jsx(Jn,{children:o.jsx(zm,{})})})})}function a9(){const[e,t]=x.useState(!1),[n,s]=x.useState(!1);return o.jsxs("div",{className:"mt-4 w-80",children:[o.jsx(r9,{onPairAnother:()=>t(!0),onOpenAccount:()=>s(!0)}),e?o.jsx(i9,{onClose:()=>t(!1)}):null,n?o.jsx(s9,{onClose:()=>s(!1)}):null]})}const o9="pinomad.projectSidebar.expanded",LU=()=>{const e=window.localStorage.getItem(o9);if(e===null)return{};try{const t=JSON.parse(e);return Object.fromEntries(Object.entries(t).filter(n=>typeof n[0]=="string"&&typeof n[1]=="boolean"))}catch{return{}}},Bw=e=>{window.localStorage.setItem(o9,JSON.stringify(e))},jk=e=>e.flatMap(t=>[t,...jk(t.children)]);function qw(e){const t=`pinomad.sidebarSection.${e}.expanded`,[n,s]=x.useState(()=>typeof window>"u"||window.localStorage.getItem(t)!=="false"),r=x.useId();return{expanded:n,contentId:r,toggle:()=>{const a=!n;window.localStorage.setItem(t,String(a)),s(a)}}}function l9({connection:e}){return e==="connected"?o.jsx(cr,{variant:"success",label:"Connected",tooltip:"Connected to the host"}):o.jsx(cr,{variant:e==="closed"?"error":"warning",label:e,tooltip:e,isPulsing:!0})}function BU({connection:e,onCollapse:t,safeLeft:n}){return o.jsxs("div",{className:"pinomad-drag flex h-6 items-center justify-between px-2",style:n===void 0?void 0:{paddingLeft:n},children:[o.jsx(kn,{icon:o.jsx(pm,{className:"size-4"}),label:"Collapse sidebar",size:"sm",variant:"ghost",onClick:t}),o.jsx(l9,{connection:e})]})}function Hw({view:e,onOpenDevices:t,onOpenSettings:n,onPairHost:s,onOpenAccount:r,onSelect:i}){const a=y7();return o.jsxs(o.Fragment,{children:[(a==null?void 0:a.status.state)==="ready"?o.jsx(_s,{icon:o.jsx(lH,{"aria-hidden":"true"}),label:"Restart to update","aria-label":`Restart to update${a.status.availableVersion===void 0?"":` to PiNomad ${a.status.availableVersion}`}`,onClick:()=>a.install()}):null,o.jsx(r9,{onPairAnother:()=>{i==null||i(),s()},onOpenAccount:()=>{i==null||i(),r()}}),o.jsx(_s,{icon:o.jsx(gu,{"aria-hidden":"true"}),label:"Devices",isDisabled:e.connection!=="connected",onClick:()=>{t(),i==null||i()}}),o.jsx(_s,{icon:o.jsx(uH,{"aria-hidden":"true"}),label:"Settings",isDisabled:e.connection!=="connected",onClick:()=>{n(),i==null||i()}})]})}function Pw({title:e,expanded:t,contentId:n,onToggle:s,actions:r,pinnedActions:i=!1}){return o.jsxs("div",{className:"pigui-sidenav-section-header",children:[o.jsxs("button",{type:"button",className:"pigui-sidenav-section-toggle","aria-label":t?`Collapse ${e}`:`Expand ${e}`,"aria-expanded":t,"aria-controls":n,onClick:s,children:[o.jsx("span",{className:"pigui-sidenav-section-toggle__title",children:e}),o.jsx(Ai,{"aria-hidden":"true",className:"pigui-sidenav-section-toggle__chevron","data-expanded":t?"true":"false"})]}),o.jsx(we,{className:i?void 0:"pigui-sidenav-hover-actions",gap:.5,vAlign:"center",children:r})]})}function Am(){return o.jsx("span",{className:"pigui-session-glyph","data-testid":"session-glyph"})}const c9={"needs-answer":"Waiting for your answer",failed:"Failed",running:"Running"};function qU({status:e}){const t=e==="needs-answer"?"warning":e==="failed"?"error":"success",n=c9[e];return o.jsx("span",{className:"pigui-session-glyph","aria-hidden":"true",children:o.jsx(cr,{variant:t,label:n,tooltip:n,isPulsing:e!=="failed"})})}function HU({expanded:e}){const t=e?nH:mu;return o.jsxs("span",{"aria-hidden":"true",className:"pigui-project-expansion-indicator","data-expanded":e?"true":"false",children:[o.jsx(t,{className:"pigui-project-expansion-indicator__state"}),o.jsx(Ai,{className:"pigui-project-expansion-indicator__chevron"})]})}function Uw({node:e,shown:t,disabled:n,remote:s,now:r,onSelect:i}){const{summary:a}=e,l=tq(e),c=e7(e),[u,d]=x.useState(!1),f=t!==void 0&&jk([e]).some(p=>p.summary.id===t),h=o.jsx(_s,{icon:l===void 0?o.jsx(Am,{}):o.jsx(qU,{status:l}),label:a.title??"New conversation",isSelected:f,isDisabled:n,endContent:o.jsxs(o.Fragment,{children:[c===void 0?null:o.jsx("span",{"aria-hidden":"true",className:"pigui-sidenav-session-meta ms-2 text-xs text-muted",children:_x(c,r)}),o.jsx("span",{"aria-hidden":"true",className:"pigui-sidenav-actions-spacer"})]}),onClick:()=>{s.controller.switchConversation(a.id),i==null||i()}});return o.jsxs("div",{className:"pigui-sidenav-row-with-actions pigui-sidenav-session-row",...l===void 0?{}:{"data-status":l},children:[h,l===void 0?null:o.jsx(Mi,{children:c9[l]}),o.jsx(we,{className:"pigui-sidenav-row-actions pigui-sidenav-hover-actions",gap:.5,vAlign:"center",children:o.jsx(Va,{hasChevron:!1,button:{icon:o.jsx(Wu,{"aria-hidden":"true"}),isIconOnly:!0,label:"Conversation actions",size:"sm",variant:"ghost",isDisabled:n},items:[{label:"Rename",icon:o.jsx(x7,{"aria-hidden":"true",size:16}),onClick:()=>d(!0)},{label:"Archive",icon:o.jsx(l7,{"aria-hidden":"true",size:16}),onClick:()=>void s.controller.archive(a.id,!0)}]})}),u?o.jsx(wH,{summary:a,remote:s,connected:!n,onClose:()=>d(!1)}):null]})}function PU({view:e,remote:t,draftingChat:n,shownId:s,onDraft:r,onSelect:i}){const a=e.connection!=="connected",l=Vl(6e4),[c,u]=x.useState(!1),[d,f]=x.useState(),[h,p]=x.useState(LU),m=qw("chats"),b=qw("projects"),y=v=>{r(v),i==null||i()},g=x.useMemo(()=>{var v;return s===void 0||(v=e.organized.projects.find(({conversations:w})=>jk(w).some(j=>j.summary.id===s)))==null?void 0:v.project.path},[s,e.organized.projects]);x.useEffect(()=>{g!==void 0&&p(v=>{if(v[g]!==!1)return v;const w={...v,[g]:!0};return Bw(w),w})},[g]);const k=v=>p(w=>{const j={...w,[v]:!(w[v]??!0)};return Bw(j),j});return o.jsxs(o.Fragment,{children:[o.jsx(af,{isHeaderHidden:!0,title:"New chat",children:o.jsx(_s,{icon:o.jsx(gH,{className:"size-4"}),label:"New chat",isSelected:n,isDisabled:a,onClick:()=>y({kind:"chat"})})}),o.jsxs(af,{isHeaderHidden:!0,title:"Chats",children:[o.jsx(Pw,{title:"Chats",expanded:m.expanded,contentId:m.contentId,onToggle:m.toggle,actions:o.jsx(kn,{icon:o.jsx(Ko,{"aria-hidden":"true"}),label:"New chat without a project",tooltip:"New chat",size:"sm",variant:"ghost",isDisabled:a,onClick:()=>y({kind:"chat"})})}),o.jsx(fe,{id:m.contentId,gap:.5,children:m.expanded?e.organized.chats.length===0?o.jsx(_s,{icon:o.jsx(Am,{}),isDisabled:!0,label:"No chats"}):e.organized.chats.map(v=>o.jsx(Uw,{node:v,shown:s,disabled:a,remote:t,now:l,onSelect:i},v.summary.id)):null})]}),o.jsxs(af,{isHeaderHidden:!0,title:"Projects",children:[o.jsx(Pw,{title:"Projects",expanded:b.expanded,contentId:b.contentId,onToggle:b.toggle,pinnedActions:!0,actions:o.jsx(kn,{icon:o.jsx(Ko,{"aria-hidden":"true"}),label:"Add project",tooltip:"Add project",size:"sm",variant:"ghost",isDisabled:a,onClick:()=>u(!0)})}),o.jsx(fe,{id:b.contentId,gap:.5,children:b.expanded?e.organized.projects.length===0?o.jsx(_s,{icon:o.jsx(mu,{"aria-hidden":"true"}),label:"Add project",isDisabled:a,onClick:()=>u(!0)}):e.organized.projects.map(({project:v,conversations:w})=>{const j=h[v.path]??!0;return o.jsxs("div",{className:"pigui-sidenav-row-with-actions",children:[o.jsx(_s,{collapsible:{isCollapsed:!j,onCollapsedChange:()=>k(v.path)},icon:o.jsx(HU,{expanded:j}),label:v.name,isDisabled:a,endContent:o.jsx("span",{"aria-hidden":"true",className:"pigui-sidenav-actions-spacer"}),children:w.length===0?o.jsx(_s,{icon:o.jsx(Am,{}),isDisabled:!0,label:"No conversations"}):w.map($=>o.jsx(Uw,{node:$,shown:s,disabled:a,remote:t,now:l,onSelect:i},$.summary.id))}),o.jsx(we,{className:"pigui-sidenav-row-actions",gap:.5,vAlign:"center",children:o.jsxs(we,{className:"pigui-sidenav-hover-actions",gap:.5,vAlign:"center",children:[o.jsx(kn,{icon:o.jsx(Ko,{"aria-hidden":"true"}),label:`New conversation in ${v.name}`,size:"sm",variant:"ghost",isDisabled:a,onClick:()=>y({kind:"project",path:v.path})}),o.jsx(Va,{hasChevron:!1,button:{icon:o.jsx(Wu,{"aria-hidden":"true"}),isIconOnly:!0,label:`Project actions for ${v.name}`,size:"sm",variant:"ghost",isDisabled:a},items:[{label:"Remove project",icon:o.jsx(xH,{"aria-hidden":"true",size:16}),onClick:()=>f(v)}]})]})})]},v.path)}):null})]}),c?o.jsx(bH,{remote:t,connected:!a,onAdded:v=>{u(!1),y({kind:"project",path:v.path})},onClose:()=>u(!1)}):null,d===void 0?null:o.jsx(vH,{project:d,remote:t,connected:!a,onClose:()=>f(void 0)})]})}var na=(e=>(e[e.Border=-1]="Border",e[e.Data=0]="Data",e[e.Function=1]="Function",e[e.Position=2]="Position",e[e.Timing=3]="Timing",e[e.Alignment=4]="Alignment",e))(na||{});const UU=[0,1],u9=[1,0],d9=[2,3],f9=[3,2],FU={L:UU,M:u9,Q:d9,H:f9},GU=/^\d*$/,VU=/^[A-Z0-9 $%*+./:-]*$/,wp="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Sk=1,$k=40,Fw=3,WU=3,Zd=40,KU=10,h9=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],x9=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];class XU{constructor(t,n,s,r){te(this,"size");te(this,"mask");te(this,"modules",[]);te(this,"types",[]);if(this.version=t,this.ecc=n,t<Sk||t>$k)throw new RangeError("Version value out of range");if(r<-1||r>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const i=Array.from({length:this.size}).fill(!1);for(let l=0;l<this.size;l++)this.modules.push(i.slice()),this.types.push(i.map(()=>0));this.drawFunctionPatterns();const a=this.addEccAndInterleave(s);if(this.drawCodewords(a),r===-1){let l=1e9;for(let c=0;c<8;c++){this.applyMask(c),this.drawFormatBits(c);const u=this.getPenaltyScore();u<l&&(r=c,l=u),this.applyMask(c)}}this.mask=r,this.applyMask(r),this.drawFormatBits(r)}getModule(t,n){return t>=0&&t<this.size&&n>=0&&n<this.size&&this.modules[n][t]}drawFunctionPatterns(){for(let s=0;s<this.size;s++)this.setFunctionModule(6,s,s%2===0,na.Timing),this.setFunctionModule(s,6,s%2===0,na.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),n=t.length;for(let s=0;s<n;s++)for(let r=0;r<n;r++)s===0&&r===0||s===0&&r===n-1||s===n-1&&r===0||this.drawAlignmentPattern(t[s],t[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const n=this.ecc[1]<<3|t;let s=n;for(let i=0;i<10;i++)s=s<<1^(s>>>9)*1335;const r=(n<<10|s)^21522;for(let i=0;i<=5;i++)this.setFunctionModule(8,i,pr(r,i));this.setFunctionModule(8,7,pr(r,6)),this.setFunctionModule(8,8,pr(r,7)),this.setFunctionModule(7,8,pr(r,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,pr(r,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,pr(r,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,pr(r,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let s=0;s<12;s++)t=t<<1^(t>>>11)*7973;const n=this.version<<12|t;for(let s=0;s<18;s++){const r=pr(n,s),i=this.size-11+s%3,a=Math.floor(s/3);this.setFunctionModule(i,a,r),this.setFunctionModule(a,i,r)}}drawFinderPattern(t,n){for(let s=-4;s<=4;s++)for(let r=-4;r<=4;r++){const i=Math.max(Math.abs(r),Math.abs(s)),a=t+r,l=n+s;a>=0&&a<this.size&&l>=0&&l<this.size&&this.setFunctionModule(a,l,i!==2&&i!==4,na.Position)}}drawAlignmentPattern(t,n){for(let s=-2;s<=2;s++)for(let r=-2;r<=2;r++)this.setFunctionModule(t+r,n+s,Math.max(Math.abs(r),Math.abs(s))!==1,na.Alignment)}setFunctionModule(t,n,s,r=na.Function){this.modules[n][t]=s,this.types[n][t]=r}addEccAndInterleave(t){const n=this.version,s=this.ecc;if(t.length!==Tf(n,s))throw new RangeError("Invalid argument");const r=x9[s[0]][n],i=h9[s[0]][n],a=Math.floor(Nm(n)/8),l=r-a%r,c=Math.floor(a/r),u=[],d=rF(i);for(let h=0,p=0;h<r;h++){const m=t.slice(p,p+c-i+(h<l?0:1));p+=m.length;const b=iF(m,d);h<l&&m.push(0),u.push(m.concat(b))}const f=[];for(let h=0;h<u[0].length;h++)u.forEach((p,m)=>{(h!==c-i||m>=l)&&f.push(p[h])});return f}drawCodewords(t){if(t.length!==Math.floor(Nm(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let s=this.size-1;s>=1;s-=2){s===6&&(s=5);for(let r=0;r<this.size;r++)for(let i=0;i<2;i++){const a=s-i,c=(s+1&2)===0?this.size-1-r:r;!this.types[c][a]&&n<t.length*8&&(this.modules[c][a]=pr(t[n>>>3],7-(n&7)),n++)}}}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let s=0;s<this.size;s++){let r;switch(t){case 0:r=(s+n)%2===0;break;case 1:r=n%2===0;break;case 2:r=s%3===0;break;case 3:r=(s+n)%3===0;break;case 4:r=(Math.floor(s/3)+Math.floor(n/2))%2===0;break;case 5:r=s*n%2+s*n%3===0;break;case 6:r=(s*n%2+s*n%3)%2===0;break;case 7:r=((s+n)%2+s*n%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[n][s]&&r&&(this.modules[n][s]=!this.modules[n][s])}}getPenaltyScore(){let t=0;for(let i=0;i<this.size;i++){let a=!1,l=0;const c=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[i][u]===a?(l++,l===5?t+=Fw:l>5&&t++):(this.finderPenaltyAddHistory(l,c),a||(t+=this.finderPenaltyCountPatterns(c)*Zd),a=this.modules[i][u],l=1);t+=this.finderPenaltyTerminateAndCount(a,l,c)*Zd}for(let i=0;i<this.size;i++){let a=!1,l=0;const c=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[u][i]===a?(l++,l===5?t+=Fw:l>5&&t++):(this.finderPenaltyAddHistory(l,c),a||(t+=this.finderPenaltyCountPatterns(c)*Zd),a=this.modules[u][i],l=1);t+=this.finderPenaltyTerminateAndCount(a,l,c)*Zd}for(let i=0;i<this.size-1;i++)for(let a=0;a<this.size-1;a++){const l=this.modules[i][a];l===this.modules[i][a+1]&&l===this.modules[i+1][a]&&l===this.modules[i+1][a+1]&&(t+=WU)}let n=0;for(const i of this.modules)n=i.reduce((a,l)=>a+(l?1:0),n);const s=this.size*this.size,r=Math.ceil(Math.abs(n*20-s*10)/s)-1;return t+=r*KU,t}getAlignmentPatternPositions(){if(this.version===1)return[];{const t=Math.floor(this.version/7)+2,n=this.version===32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,s=[6];for(let r=this.size-7;s.length<t;r-=n)s.splice(1,0,r);return s}}finderPenaltyCountPatterns(t){const n=t[1],s=n>0&&t[2]===n&&t[3]===n*3&&t[4]===n&&t[5]===n;return(s&&t[0]>=n*4&&t[6]>=n?1:0)+(s&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,s){return t&&(this.finderPenaltyAddHistory(n,s),n=0),n+=this.size,this.finderPenaltyAddHistory(n,s),this.finderPenaltyCountPatterns(s)}finderPenaltyAddHistory(t,n){n[0]===0&&(t+=this.size),n.pop(),n.unshift(t)}}function vr(e,t,n){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let s=t-1;s>=0;s--)n.push(e>>>s&1)}function pr(e,t){return(e>>>t&1)!==0}class Ck{constructor(t,n,s){if(this.mode=t,this.numChars=n,this.bitData=s,n<0)throw new RangeError("Invalid argument");this.bitData=s.slice()}getData(){return this.bitData.slice()}}const ZU=[1,10,12,14],YU=[2,9,11,13],QU=[4,8,16,16];function p9(e,t){return e[Math.floor((t+7)/17)+1]}function g9(e){const t=[];for(const n of e)vr(n,8,t);return new Ck(QU,e.length,t)}function JU(e){if(!m9(e))throw new RangeError("String contains non-numeric characters");const t=[];for(let n=0;n<e.length;){const s=Math.min(e.length-n,3);vr(Number.parseInt(e.substring(n,n+s),10),s*3+1,t),n+=s}return new Ck(ZU,e.length,t)}function eF(e){if(!y9(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");const t=[];let n;for(n=0;n+2<=e.length;n+=2){let s=wp.indexOf(e.charAt(n))*45;s+=wp.indexOf(e.charAt(n+1)),vr(s,11,t)}return n<e.length&&vr(wp.indexOf(e.charAt(n)),6,t),new Ck(YU,e.length,t)}function tF(e){return e===""?[]:m9(e)?[JU(e)]:y9(e)?[eF(e)]:[g9(sF(e))]}function m9(e){return GU.test(e)}function y9(e){return VU.test(e)}function nF(e,t){let n=0;for(const s of e){const r=p9(s.mode,t);if(s.numChars>=1<<r)return Number.POSITIVE_INFINITY;n+=4+r+s.bitData.length}return n}function sF(e){e=encodeURI(e);const t=[];for(let n=0;n<e.length;n++)e.charAt(n)!=="%"?t.push(e.charCodeAt(n)):(t.push(Number.parseInt(e.substring(n+1,n+3),16)),n+=2);return t}function Nm(e){if(e<Sk||e>$k)throw new RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){const n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}function Tf(e,t){return Math.floor(Nm(e)/8)-h9[t[0]][e]*x9[t[0]][e]}function rF(e){if(e<1||e>255)throw new RangeError("Degree out of range");const t=[];for(let s=0;s<e-1;s++)t.push(0);t.push(1);let n=1;for(let s=0;s<e;s++){for(let r=0;r<t.length;r++)t[r]=Mm(t[r],n),r+1<t.length&&(t[r]^=t[r+1]);n=Mm(n,2)}return t}function iF(e,t){const n=t.map(s=>0);for(const s of e){const r=s^n.shift();n.push(0),t.forEach((i,a)=>n[a]^=Mm(i,r))}return n}function Mm(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let n=0;for(let s=7;s>=0;s--)n=n<<1^(n>>>7)*285,n^=(t>>>s&1)*e;return n}function aF(e,t,n=1,s=40,r=-1,i=!0){if(!(Sk<=n&&n<=s&&s<=$k)||r<-1||r>7)throw new RangeError("Invalid value");let a,l;for(a=n;;a++){const f=Tf(a,t)*8,h=nF(e,a);if(h<=f){l=h;break}if(a>=s)throw new RangeError("Data too long")}for(const f of[u9,d9,f9])i&&l<=Tf(a,f)*8&&(t=f);const c=[];for(const f of e){vr(f.mode[0],4,c),vr(f.numChars,p9(f.mode,a),c);for(const h of f.getData())c.push(h)}const u=Tf(a,t)*8;vr(0,Math.min(4,u-c.length),c),vr(0,(8-c.length%8)%8,c);for(let f=236;c.length<u;f^=253)vr(f,8,c);const d=Array.from({length:Math.ceil(c.length/8)},()=>0);return c.forEach((f,h)=>d[h>>>3]|=f<<7-(h&7)),new XU(a,t,d,r)}function oF(e,t){var f;const{ecc:n="L",boostEcc:s=!1,minVersion:r=1,maxVersion:i=40,maskPattern:a=-1,border:l=1}=t||{},c=typeof e=="string"?tF(e):Array.isArray(e)?[g9(e)]:void 0;if(!c)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);const u=aF(c,FU[n],r,i,a,s),d=lF({version:u.version,maskPattern:u.mask,size:u.size,data:u.modules,types:u.types},l);return t!=null&&t.invert&&(d.data=d.data.map(h=>h.map(p=>!p))),(f=t==null?void 0:t.onEncoded)==null||f.call(t,d),d}function lF(e,t=1){if(!t)return e;const{size:n}=e,s=n+t*2;e.size=s,e.data.forEach(i=>{for(let a=0;a<t;a++)i.unshift(!1),i.push(!1)});for(let i=0;i<t;i++)e.data.unshift(Array.from({length:s},a=>!1)),e.data.push(Array.from({length:s},a=>!1));const r=na.Border;e.types.forEach(i=>{for(let a=0;a<t;a++)i.unshift(r),i.push(r)});for(let i=0;i<t;i++)e.types.unshift(Array.from({length:s},a=>r)),e.types.push(Array.from({length:s},a=>r));return e}const k9={off:!0,minimal:!0,low:!0,medium:!0,high:!0,xhigh:!0,max:!0},Rm=Object.keys(k9),cF=e=>typeof e=="string"&&Object.prototype.hasOwnProperty.call(k9,e),b9={conversations:0,index:0,devices:0,mcp:0,models:1,auth:1,settings:2,agents:6},Ek=Object.keys(b9);function Gw(e){return Ek.filter(t=>b9[t]<=e)}const jp=e=>`conversation:${e}`,Vw=(e,t)=>`doc:${e}:${t}`,Ww=4401,uF=4400,Sp={major:5},dF={logout:1,updateSettings:2,listFolders:3,renameConversation:4,createAgent:6,updateAgent:6,deleteAgent:6,setPushToken:7};function Yr(e,t){return e>=(dF[t]??0)}const fF={images:5,acceptAccountDevices:8};function zf(e,t){return e>=fF[t]}[...Ek];function hF({view:e,remote:t,self:n,onClose:s}){const r=e.connection==="connected",i=n===void 0?void 0:bk(n.publicKey),[a,l]=x.useState(),[c,u]=x.useState(),d=()=>{u(void 0),t.controller.createPairing().then(l,f=>{u(f instanceof Error?f.message:String(f))})};return o.jsx(vs,{isOpen:!0,onOpenChange:f=>f?void 0:s(),width:440,children:o.jsx(Qn,{header:o.jsx(ws,{title:"Devices",subtitle:"Paired devices can reach this host over the secure channel.",onOpenChange:()=>s()}),content:o.jsx(Jn,{children:o.jsxs(fe,{gap:4,padding:2,children:[e.devices.length===0?o.jsx(ee,{type:"supporting",children:"No paired devices."}):o.jsx(xt,{density:"compact",children:e.devices.map(f=>o.jsx(gF,{device:f,isSelf:f.publicKey===i,connected:r,remote:t},f.publicKey))}),o.jsx(xF,{view:e,remote:t}),c===void 0?null:o.jsx(yt,{status:"error",title:"Could not create a pairing offer",description:c}),a===void 0?o.jsx(re,{label:"Pair a device",variant:"secondary",isDisabled:!r,onClick:d}):o.jsx(mF,{url:a.url,expiresAt:a.expiresAt,onRenew:d})]})})})})}function xF({view:e,remote:t}){var s;const n=(s=e.host)==null?void 0:s.protocol.minor;return e.settings===null||n===void 0||!zf(n,"acceptAccountDevices")?null:o.jsx(x6,{label:"Accept devices from your account",description:"Devices signed in to the server this host joined can pair without a QR code. Turn off to allow QR codes only.",value:e.settings.acceptAccountDevices,isDisabled:e.connection!=="connected",onChange:r=>void t.controller.updateSettings({acceptAccountDevices:r})})}const pF={account:"via account",qr:"via QR code",local:"on this machine"};function gF({device:e,isSelf:t,connected:n,remote:s}){const r=e.source===void 0?"":` ${pF[e.source]}`;return o.jsx(He,{label:e.name,description:`Paired${r} · ${new Date(e.pairedAt).toLocaleDateString()}`,endContent:o.jsxs(we,{gap:2,vAlign:"center",children:[t?o.jsx(vn,{label:"This device",size:"sm"}):null,o.jsx(re,{label:"Revoke",variant:"ghost",size:"sm",isDisabled:!n,onClick:()=>void s.controller.revokeDevice(e.publicKey)})]})})}function mF({url:e,expiresAt:t,onRenew:n}){const[s,r]=x.useState(Date.now());x.useEffect(()=>{const l=setInterval(()=>r(Date.now()),1e3);return()=>clearInterval(l)},[]);const i=Math.max(0,Math.ceil((t-s)/1e3));if(i===0)return o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(ee,{type:"supporting",children:"Expired"}),o.jsx(re,{label:"New code",variant:"secondary",size:"sm",onClick:n})]});const a=new URL(e).hostname==="127.0.0.1";return o.jsxs(fe,{gap:3,hAlign:"center",children:[a?null:o.jsx(yF,{text:e}),o.jsx(ee,{type:"supporting",style:{wordBreak:"break-all",userSelect:"all"},children:e}),a?o.jsx(ee,{type:"supporting",children:"This link only works on this machine — paste it into the desktop app. To pair a phone, start the host with --remote-port or --relay."}):null,o.jsxs(ee,{type:"supporting",children:["Expires in ",Math.floor(i/60),":",String(i%60).padStart(2,"0")]})]})}const $p=2;function yF({text:e}){const t=x.useMemo(()=>oF(e,{border:0}),[e]),n=t.size+$p*2;return o.jsxs("svg",{role:"img","aria-label":"Pairing QR code",viewBox:`0 0 ${n} ${n}`,width:200,height:200,style:{display:"block"},children:[o.jsx("rect",{width:n,height:n,fill:"#ffffff"}),o.jsx("path",{shapeRendering:"crispEdges",fill:"#000000",d:t.data.flatMap((s,r)=>s.map((i,a)=>i?`M${a+$p} ${r+$p}h1v1h-1z`:"")).filter(s=>s!=="").join("")})]})}const Kw=32,Xw=1024,kF=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;function v9(e){return e.length>Kw||!kF.test(e)?`Name must be lowercase letters, digits and hyphens (max ${Kw})`:void 0}function bF(e){const t=v9(e.name);if(t!==void 0)return t;const n=e.description.trim();if(n==="")return"description is required";if(n.length>Xw)return`description is too long (max ${Xw})`;if(e.model!==void 0){const s=e.model.indexOf("/");if(s<=0||s===e.model.length-1)return"model must be provider/modelId"}if(e.thinkingLevel!==void 0&&!cF(e.thinkingLevel))return`thinkingLevel must be one of ${Rm.join(", ")}`}const wu={off:"Off",minimal:"Minimal",low:"Low",medium:"Medium",high:"High",xhigh:"X-High",max:"Max"},Cp=(e,t)=>e!==void 0&&t!==void 0&&e.provider===t.provider&&e.modelId===t.modelId,Zw=["off","minimal","low","medium","high","xhigh","max"],Im=(e,t)=>{if(e.includes(t))return t;const n=Zw.indexOf(t);return e.filter(s=>Zw.indexOf(s)<=n).at(-1)??"off"},Bs=(e,t)=>t===void 0?void 0:e.find(n=>n.provider===t.provider&&n.modelId===t.modelId);function vF(e,t){var i;const n=Bs(e,t.model),s=(n==null?void 0:n.thinkingLevels)??["off"],r=(n==null?void 0:n.name)??((i=t.model)==null?void 0:i.modelId)??"No model";return s.length>1?`${r} · ${wu[t.level]}`:r}function wF(e,t){const n=t.trim().toLowerCase();return n===""?e:e.filter(s=>s.name.toLowerCase().includes(n)||`${s.provider}/${s.modelId}`.toLowerCase().includes(n))}function jF(e,t,n){var i;const s=n.model!==void 0&&Bs(e,n.model)!==void 0?n.model:Bs(e,t.model)!==void 0?t.model:e[0]===void 0?void 0:{provider:e[0].provider,modelId:e[0].modelId},r=Im(((i=Bs(e,s))==null?void 0:i.thinkingLevels)??["off"],n.level);return{model:s,level:r}}function Tk({models:e,selected:t,isDisabled:n=!1,onModelChange:s,onLevelChange:r}){const[i,a]=x.useState(""),l=e.find(d=>Cp(d,t.model)),c=(l==null?void 0:l.thinkingLevels)??["off"],u=wF(e,i);return o.jsx(p4,{alignment:"start",label:"Model and Thinking",placement:"above",width:236,content:o.jsxs("div",{className:"flex w-full flex-col gap-1 p-1","data-testid":"model-thinking-popover",onClick:d=>d.stopPropagation(),onMouseDown:d=>d.stopPropagation(),onPointerDown:d=>d.stopPropagation(),children:[o.jsx(xs,{isLabelHidden:!0,label:"Search models",placeholder:"Search models",size:"sm",value:i,width:"100%",onChange:d=>a(d)}),o.jsx(xt,{"aria-label":"Model",className:"max-h-72 overflow-y-auto",density:"compact",children:u.map(d=>o.jsx(He,{description:d.provider,endContent:Cp(d,t.model)?o.jsx(cw,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,isSelected:Cp(d,t.model),label:d.name,onClick:()=>s({provider:d.provider,modelId:d.modelId})},`${d.provider}/${d.modelId}`))}),c.length>1?o.jsxs("div",{"aria-label":"Thinking",role:"group",children:[o.jsx("p",{className:"px-2 pt-1 text-xs text-muted",children:"Thinking"}),o.jsx(xt,{density:"compact",children:c.map(d=>o.jsx(He,{endContent:d===t.level?o.jsx(cw,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,label:wu[d],onClick:()=>r(d)},d))})]}):null]}),children:o.jsx(re,{className:"min-w-0 max-w-[19rem] flex-nowrap gap-1.5 px-2 text-muted","data-testid":"model-thinking-trigger",isDisabled:n||e.length===0,label:"Model and Thinking",size:"sm",variant:"ghost",children:o.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[o.jsx("span",{className:"truncate",children:vF(e,t)}),o.jsx(d7,{"aria-hidden":"true",className:"size-4 shrink-0"})]})})})}const ns="",Yw=e=>`${e.provider}/${e.modelId}`,Qw=e=>{const t=e.indexOf("/");if(!(t<=0||t===e.length-1))return{provider:e.slice(0,t),modelId:e.slice(t+1)}};function SF({view:e,remote:t,connected:n,role:s,onClose:r}){const i=s!==void 0,[a,l]=x.useState((s==null?void 0:s.name)??""),[c,u]=x.useState((s==null?void 0:s.description)??""),[d,f]=x.useState((s==null?void 0:s.model)??ns),[h,p]=x.useState((s==null?void 0:s.thinkingLevel)??ns),[m,b]=x.useState((s==null?void 0:s.prompt)??""),[y,g]=x.useState(!1),[k,v]=x.useState(void 0),w=d===ns?void 0:Bs(e.models,Qw(d)),j=[{value:ns,label:"Don't pin — use the caller's model"},...e.models.map(S=>({value:Yw(S),label:`${S.name} (${Yw(S)})`})),...d!==ns&&w===void 0?[{value:d,label:`${d} (not available)`}]:[]],$=w===void 0?Rm:w.thinkingLevels,C=[{value:ns,label:"Don't pin"},...$.map(S=>({value:S,label:wu[S]})),...h!==ns&&!$.includes(h)?[{value:h,label:`${wu[h]} (not supported by this model)`}]:[]],E=S=>{f(S);const N=S===ns?void 0:Bs(e.models,Qw(S)),z=N===void 0?Rm:N.thinkingLevels;h!==ns&&!z.includes(h)&&p(ns)},T=()=>{const S={name:a.trim(),description:c.trim(),...d===ns?{}:{model:d},...h===ns?{}:{thinkingLevel:h},prompt:m.trim()},N=bF(S);if(N!==void 0){v(N);return}g(!0),v(void 0),(i?t.controller.updateAgent(S):t.controller.createAgent(S)).then(()=>r(),z=>{g(!1),v(z instanceof Error?z.message:String(z))})};return o.jsx(vs,{isOpen:!0,onOpenChange:S=>S?void 0:r(),purpose:"form",width:480,"aria-label":i?`Edit ${s.name}`:"New agent",children:o.jsx(Qn,{header:o.jsx(ws,{title:i?`Edit ${s.name}`:"New agent",onOpenChange:()=>r()}),content:o.jsx(Jn,{children:o.jsxs(fe,{gap:4,children:[o.jsx(fe,{gap:1,children:o.jsx(xs,{label:"Name",value:a,onChange:l,isDisabled:y||i,hasAutoFocus:!i,description:i?"The name is the file name and can't be changed.":void 0})}),o.jsx(xs,{label:"Description",value:c,onChange:u,isDisabled:y}),o.jsx(Xc,{label:"Model",value:d,options:j,onChange:E,isDisabled:y}),o.jsx(Xc,{label:"Thinking level",value:h,options:C,onChange:S=>p(S),isDisabled:y}),o.jsx(m6,{label:"Prompt",value:m,onChange:b,isDisabled:y,rows:4}),k===void 0?null:o.jsx(ee,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:k})]})}),footer:o.jsx(Ga,{children:o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(re,{label:"Cancel",variant:"secondary",onClick:r}),o.jsx(re,{label:"Save",variant:"primary",isDisabled:!n||y,onClick:T})]})})})})}const _m=[{id:"providers",title:"Providers",icon:iH},{id:"models",title:"Models",icon:dH},{id:"agents",title:"Agents",icon:Jq},{id:"mcp",title:"MCP",icon:oH},{id:"chats",title:"Chats",icon:eH},{id:"archived",title:"Archived",icon:l7},{id:"about",title:"About",icon:rH}],$F=e=>_m.find(t=>t.id===e).title,Jw=e=>o.jsx(e,{"aria-hidden":"true",style:{width:"var(--spacing-4)",height:"var(--spacing-4)"}});function CF({view:e,remote:t,onClose:n}){const s=qa("(max-width: 640px)"),[r,i]=x.useState(void 0),a=e.connection==="connected",l=r??"providers",c=o.jsx(g0,{padding:2,width:"calc(var(--spacing-10) * 7)",hasDivider:!0,children:o.jsx(cy,{"aria-label":"Settings sections",style:{width:"100%"},children:o.jsx(fe,{gap:1,children:_m.map(d=>o.jsx(_s,{label:d.title,icon:Jw(d.icon),isSelected:d.id===l,onClick:()=>i(d.id)},d.id))})})}),u=o.jsx(xt,{density:"compact",children:_m.map(d=>o.jsx(He,{label:d.title,startContent:Jw(d.icon),endContent:o.jsx(Ai,{"aria-hidden":"true",style:{width:"var(--spacing-4)",height:"var(--spacing-4)"}}),onClick:()=>i(d.id)},d.id))});return o.jsx(vs,{"aria-label":"Settings",isOpen:!0,onOpenChange:d=>d?void 0:n(),purpose:"form",width:"calc(var(--spacing-10) * 22)",maxHeight:"90dvh",variant:s?"fullscreen":"standard",padding:4,children:o.jsx(Qn,{padding:4,style:{height:s?"100dvh":"min(85dvh, calc(var(--spacing-10) * 17))"},header:o.jsx(ws,{title:s&&r!==void 0?$F(r):"Settings",startContent:s&&r!==void 0?o.jsx(kn,{label:"Back",icon:o.jsx(c7,{}),variant:"ghost",style:{marginBlock:"calc(-1 * var(--spacing-2))"},onClick:()=>i(void 0)}):void 0,onOpenChange:()=>n(),hasDivider:!0}),start:s?void 0:c,content:o.jsx(Jn,{padding:s?4:6,children:s&&r===void 0?u:o.jsx(EF,{view:e,remote:t,connected:a,section:l,showTitle:!s})})})})}function EF({view:e,remote:t,connected:n,section:s,showTitle:r}){const{title:i,supporting:a,body:l}=TF(e,t,n,s),c=`settings-${s}-heading`;return o.jsxs(fe,{as:"section",...r?{"aria-labelledby":c}:{"aria-label":i},gap:3,children:[o.jsxs(fe,{gap:2,children:[r?o.jsx(Lr,{level:2,id:c,children:i}):null,a]}),l]})}function TF(e,t,n,s){switch(s){case"providers":return{title:"Providers",supporting:o.jsxs(ee,{as:"p",type:"supporting",children:["Logins are stored on the host in Pi's ",o.jsx("code",{children:"auth.json"}),". Log in with the Pi CLI on the host — logging out here signs the Pi CLI out too. Every device connected to this host sees the same logins."]}),body:o.jsx(zF,{view:e,remote:t,connected:n})};case"models":return{title:"Models",supporting:o.jsx(ee,{as:"p",type:"supporting",children:"Used when a new conversation doesn't pick its own model."}),body:o.jsx(AF,{view:e,remote:t,connected:n})};case"agents":return{title:"Agents",supporting:o.jsxs(ee,{as:"p",type:"supporting",children:["Named agents the model can delegate to with ",o.jsx("code",{children:"subagent"})," — mention one with ",o.jsx("code",{children:"@name"}),"."," ","Each is a Markdown file in"," ",o.jsxs("span",{style:{wordBreak:"break-all",userSelect:"all"},children:[e.session.directory,"/agents/"]}),"; edits to those files apply immediately."]}),body:o.jsx(_F,{view:e,remote:t,connected:n})};case"mcp":return{title:"MCP",body:o.jsx(RF,{view:e})};case"chats":return{title:"Chats",supporting:o.jsx(ee,{as:"p",type:"supporting",children:"How queued messages are delivered when the agent reaches the next turn."}),body:o.jsx(NF,{view:e,remote:t,connected:n})};case"archived":return{title:"Archived",supporting:o.jsx(ee,{as:"p",type:"supporting",children:"Archived conversations are hidden from the sidebar. Restoring one brings it back with its forks and subagents; a worktree removed on archive is checked out again from its branch."}),body:o.jsx(MF,{view:e,remote:t,connected:n})};case"about":return{title:"About",body:o.jsx(IF,{view:e})}}}function zF({view:e,remote:t,connected:n}){const s=e.auth;if(s===null)return o.jsx(yt,{status:"warning",title:"This host is too old for logins",description:"Run `pinomad upgrade` on the host."});const r=s.logins;return o.jsx(fe,{gap:3,children:r.length===0?o.jsx(ee,{as:"p",type:"supporting",children:"No stored logins. Log in with the Pi CLI on the host."}):o.jsxs(o.Fragment,{children:[o.jsx(ee,{as:"p",type:"supporting",children:`${r.length} provider${r.length===1?"":"s"} logged in`}),r.map(i=>o.jsx(qF,{login:i,connected:n,remote:t},i.providerId))]})})}function AF({view:e,remote:t,connected:n}){const s=e.settings;return s===null?o.jsx(yt,{status:"warning",title:"This host is too old for settings",description:"Run `pinomad upgrade` on the host."}):o.jsxs(we,{gap:2,vAlign:"center",wrap:"wrap",children:[o.jsx(Tk,{models:e.models,selected:{model:s.defaultModel??void 0,level:s.defaultThinkingLevel??"off"},isDisabled:!n,onModelChange:r=>void t.controller.updateSettings({defaultModel:r}),onLevelChange:r=>void t.controller.updateSettings({defaultThinkingLevel:r})}),s.custom.includes("defaultModel")||s.custom.includes("defaultThinkingLevel")?o.jsx(re,{label:"Use pi's defaults",variant:"ghost",size:"sm",isDisabled:!n,onClick:()=>void t.controller.updateSettings({defaultModel:null,defaultThinkingLevel:null})}):null]})}function NF({view:e,remote:t,connected:n}){const s=e.settings;return s===null?o.jsx(yt,{status:"warning",title:"This host is too old for settings",description:"Run `pinomad upgrade` on the host."}):o.jsxs(fe,{gap:4,children:[o.jsx(e5,{title:"Steer messages",value:s.steeringMode,customized:s.custom.includes("steeringMode"),disabled:!n,onChange:r=>void t.controller.updateSettings({steeringMode:r}),onReset:()=>void t.controller.updateSettings({steeringMode:null})}),o.jsx(e5,{title:"Follow-up messages",value:s.followUpMode,customized:s.custom.includes("followUpMode"),disabled:!n,onChange:r=>void t.controller.updateSettings({followUpMode:r}),onReset:()=>void t.controller.updateSettings({followUpMode:null})})]})}function MF({view:e,remote:t,connected:n}){const s=Vl(6e4),r=e.organized.archived;return r.length===0?o.jsx(ee,{as:"p",type:"supporting",children:"No archived conversations."}):o.jsx(xt,{density:"compact",children:r.map(({node:i,project:a})=>{const l=i.summary.title??"New conversation",c=e7(i);return o.jsx(He,{label:l,description:[(a==null?void 0:a.name)??"Chat",c===void 0?void 0:_x(c,s)].filter(u=>u!==void 0).join(" · "),endContent:o.jsx(re,{label:`Restore ${l}`,variant:"secondary",size:"sm",isDisabled:!n,onClick:()=>void t.controller.archive(i.summary.id,!1),children:"Restore"})},i.summary.id)})})}function RF({view:e}){const t=e.mcp;return t===null?o.jsx(ee,{as:"p",type:"supporting",children:"Loading…"}):o.jsxs(fe,{gap:3,children:[o.jsx(ee,{as:"p",type:"supporting",style:{userSelect:"all"},children:t.configPath}),t.servers.length===0?o.jsx(ee,{as:"p",type:"supporting",children:"No servers configured."}):o.jsx(xt,{density:"compact",children:t.servers.map(n=>o.jsx(He,{label:n.name,endContent:o.jsx(vn,{label:n.state,size:"sm"})},n.name))})]})}function IF({view:e}){const t=e.host;return o.jsxs(fe,{gap:3,children:[o.jsxs(xt,{density:"compact",children:[o.jsx(He,{label:"Host version",description:(t==null?void 0:t.version)??"Source checkout"}),o.jsx(He,{label:"Protocol",description:t===void 0?"—":`${t.protocol.major}.${t.protocol.minor}`}),o.jsx(He,{label:"Data directory",description:o.jsx("span",{style:{wordBreak:"break-all",userSelect:"all"},children:e.session.directory})}),o.jsx(He,{label:"Settings file",description:o.jsxs("span",{style:{wordBreak:"break-all",userSelect:"all"},children:[e.session.directory,"/settings.json"]})})]}),o.jsx(ee,{as:"p",type:"supporting",children:"Edit the settings file by hand only while the host is stopped."})]})}function e5({title:e,value:t,customized:n,disabled:s,onChange:r,onReset:i}){return o.jsxs(fe,{gap:1,children:[o.jsx(ee,{children:e}),o.jsxs(we,{gap:2,vAlign:"center",wrap:"wrap",children:[o.jsxs(p6,{className:"shrink-0",value:t,onChange:a=>r(a),label:e,size:"sm",isDisabled:s,children:[o.jsx(eg,{value:"one-at-a-time",label:"One at a time"}),o.jsx(eg,{value:"all",label:"All at once"})]}),n?o.jsx(re,{label:"Use pi's default",variant:"ghost",size:"sm",isDisabled:s,onClick:i}):null]})]})}function _F({view:e,remote:t,connected:n}){const s=e.agents,[r,i]=x.useState(void 0);return s===null?o.jsx(yt,{status:"warning",title:"This host is too old for named agents",description:"Run `pinomad upgrade` on the host."}):o.jsxs(fe,{gap:3,children:[o.jsx(we,{gap:2,vAlign:"center",children:o.jsx(re,{label:"New agent",variant:"secondary",size:"sm",isDisabled:!n,onClick:()=>i({mode:"create"})})}),s.roles.length===0&&s.problems.length===0?o.jsx(ee,{as:"p",type:"supporting",children:"No named agents yet."}):null,s.roles.map(a=>o.jsx(DF,{role:a,view:e,remote:t,connected:n,onEdit:()=>i({mode:"edit",role:a})},a.name)),s.problems.map(a=>o.jsx(LF,{problem:a,remote:t,connected:n},a.file)),r===void 0?null:o.jsx(SF,{view:e,remote:t,connected:n,...r.mode==="edit"?{role:r.role}:{},onClose:()=>i(void 0)})]})}const OF=e=>{const t=e.indexOf("/");return{provider:e.slice(0,t),modelId:e.slice(t+1)}};function DF({role:e,view:t,remote:n,connected:s,onEdit:r}){const[i,a]=x.useState(!1),[l,c]=x.useState(void 0),u=e.model===void 0?void 0:Bs(t.models,OF(e.model)),d=()=>{n.controller.deleteAgent(e.name).catch(f=>{c(f instanceof Error?f.message:String(f))})};return o.jsxs(lx,{padding:4,children:[o.jsxs(we,{gap:3,vAlign:"start",children:[o.jsxs(fe,{gap:1,style:{flex:1,minInlineSize:0},children:[o.jsx(Lr,{level:3,children:e.name}),o.jsx(ee,{as:"p",type:"supporting",children:e.description}),e.model===void 0&&e.thinkingLevel===void 0?null:o.jsxs(we,{gap:1,wrap:"wrap",children:[e.model===void 0?null:o.jsx(vn,{label:(u==null?void 0:u.name)??e.model,size:"sm"}),e.thinkingLevel===void 0?null:o.jsx(vn,{label:wu[e.thinkingLevel],size:"sm"}),e.model!==void 0&&u===void 0?o.jsx(vn,{label:"Model not available",color:"orange",size:"sm"}):null]})]}),i?null:o.jsx(we,{gap:1,vAlign:"center",children:o.jsx(hx,{icon:o.jsx(Wu,{"aria-hidden":"true"}),label:`${e.name} actions`,size:"sm",variant:"ghost",isDisabled:!s,items:[{label:"Edit…",onClick:r},{label:"Delete…",onClick:()=>a(!0)}]})})]}),i?o.jsxs(fe,{gap:2,style:{marginBlockStart:"var(--spacing-4)"},children:[o.jsx(ee,{as:"p",type:"supporting",children:"Conversations already using this agent keep their copy."}),o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(re,{label:"Delete",variant:"destructive",size:"sm",isDisabled:!s,onClick:d}),o.jsx(re,{label:"Cancel",variant:"ghost",size:"sm",onClick:()=>a(!1)})]})]}):null,l===void 0?null:o.jsx(ee,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:l})]})}function LF({problem:e,remote:t,connected:n}){const[s,r]=x.useState(!1),[i,a]=x.useState(void 0),l=v9(e.file.slice(0,-3))===void 0,c=()=>{t.controller.deleteAgent(e.file.slice(0,-3)).catch(u=>{a(u instanceof Error?u.message:String(u))})};return o.jsxs(lx,{padding:4,children:[o.jsxs(we,{gap:3,vAlign:"start",children:[o.jsxs(fe,{gap:1,style:{flex:1,minInlineSize:0},children:[o.jsx(Lr,{level:3,children:e.file}),o.jsx(we,{gap:1,wrap:"wrap",children:o.jsx(vn,{label:"Not loaded",color:"orange",size:"sm"})}),o.jsx(ee,{as:"p",type:"supporting",children:e.reason}),o.jsx(ee,{as:"p",type:"supporting",children:"Fix this file on the host."})]}),s||!l?null:o.jsx(we,{gap:1,vAlign:"center",children:o.jsx(hx,{icon:o.jsx(Wu,{"aria-hidden":"true"}),label:`${e.file} actions`,size:"sm",variant:"ghost",isDisabled:!n,items:[{label:"Delete…",onClick:()=>r(!0)}]})})]}),s?o.jsx(fe,{gap:2,style:{marginBlockStart:"var(--spacing-4)"},children:o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(re,{label:"Delete",variant:"destructive",size:"sm",isDisabled:!n,onClick:c}),o.jsx(re,{label:"Cancel",variant:"ghost",size:"sm",onClick:()=>r(!1)})]})}):null,i===void 0?null:o.jsx(ee,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:i})]})}const BF=e=>e.subscription?"Subscription connected":e.kind==="api_key"?"API key configured":"OAuth connected";function qF({login:e,connected:t,remote:n}){const[s,r]=x.useState(!1);return o.jsxs(lx,{padding:4,children:[o.jsxs(we,{gap:3,vAlign:"start",children:[o.jsxs(fe,{gap:1,style:{flex:1,minInlineSize:0},children:[o.jsx(Lr,{level:3,children:e.name}),o.jsx(ee,{as:"p",type:"supporting",children:BF(e)})]}),s?null:o.jsx(we,{gap:1,vAlign:"center",children:o.jsx(hx,{icon:o.jsx(Wu,{"aria-hidden":"true"}),label:`${e.name} actions`,size:"sm",variant:"ghost",isDisabled:!t,items:[{label:"Log out…",onClick:()=>r(!0)}]})})]}),s?o.jsxs(fe,{gap:2,style:{marginBlockStart:"var(--spacing-4)"},children:[o.jsx(ee,{as:"p",type:"supporting",children:`This also signs the Pi CLI on the host out of ${e.name}.`}),o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(re,{label:"Log out",variant:"destructive",size:"sm",isDisabled:!t,onClick:()=>void n.controller.logout(e.providerId)}),o.jsx(re,{label:"Cancel",variant:"ghost",size:"sm",onClick:()=>r(!1)})]})]}):null]})}function zk(e){const t=e.docs["pi.live"];return(t==null?void 0:t.run)!==void 0}function ua(e,t,n){return e>=t&&e<=n}function w9(e){return e===8205}function HF(e){return ua(e,55296,56319)}function t5(e){return ua(e,127462,127487)}function j9(e){return ua(e,65024,65039)}function S9(e){return ua(e,768,879)||ua(e,6832,6911)||ua(e,7616,7679)||ua(e,65056,65071)}function Af(e){return e>65535?2:1}function n5(e,t){for(;t<e.length;){const n=e.codePointAt(t);if(S9(n)||j9(n))t+=Af(n);else break}return t}function $9(e,t){const n=e.codePointAt(t);let s=t+Af(n);for(s=n5(e,s);s<e.length-1&&w9(e.codePointAt(s));){const r=e.codePointAt(s+1);s+=1+Af(r),s=n5(e,s)}return t5(n)&&s<e.length&&t5(e.codePointAt(s))&&(s+=Af(e.codePointAt(s))),s}function C9(e){return e>=768&&(HF(e)||S9(e)||j9(e)||w9(e))}function PF(e,t){let n=0,s=0;for(;s<e.length;)if(s=$9(e,s),++n>=t)return!0;return!1}function UF(e,t){let n=0,s=0;for(;s<e.length;)if(s=$9(e,s),++n>t)return!1;return!0}function FF(e,t){if(t===0)return!0;if(e.length<t)return!1;let n=0;for(;;){if(C9(e.charCodeAt(n)))return PF(e,t);if(++n>=t)return!0}}function GF(e,t){if(e.length<=t)return!0;let n=0;for(;;){if(C9(e.charCodeAt(n)))return UF(e,t);if(++n>t)return!1}}function Ue(e){return Array.isArray(e)}function bs(e){return oe(typeof e,"bigint")}function Qa(e){return oe(typeof e,"boolean")}function E9(e){if(wt(e)||!ju(e))return!1;const t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function ju(e){return oe(typeof e,"function")}function T9(e){return Number.isInteger(e)}function Zu(e){return oe(e,null)}function qt(e){return Number.isFinite(e)}function VF(e){return pt(e)&&!Ue(e)}function pt(e){return oe(typeof e,"object")&&!Zu(e)}function Et(e){return oe(typeof e,"string")}function z9(e){return oe(typeof e,"symbol")}function wt(e){return oe(e,void 0)}function oe(e,t){return e===t}function A9(e,t){return e>t}function N9(e,t){return e<t}function Wl(e,t){return e<=t}function qx(e,t){return e>=t}function WF(e,t){if(bs(e)||bs(t))return BigInt(e)%BigInt(t)===0n;const n=1e-10;if(!qt(e)||T9(e)&&1/t%1===0)return!0;const s=e%t;return Math.min(Math.abs(s),Math.abs(s-t),Math.abs(s+t))<n}function KF(e){if(!pt(e))return!1;const t=globalThis.Object.getPrototypeOf(e);return Zu(t)?!1:oe(typeof t.constructor,"function")&&!(oe(t.constructor,globalThis.Object)||oe(t.constructor.name,"Object"))}function M9(e){return bs(e)||Qa(e)||Zu(e)||qt(e)||Et(e)||wt(e)}function XF(e,t){return GF(e,t)}function ZF(e,t){return FF(e,t)}function Jt(e,t,n){return e.every((s,r)=>r<t||n(s,r))}function R9(e,t){return e.some((n,s)=>t(n,s))}function YF(e,t){let n=!1;return e.forEach((s,r)=>{t(s,r)&&(n=!0)}),n}function I9(e,t){return e.reduce((n,s,r)=>t(s,r)?++n:n,0)}function Hx(e){return oe(e,"__proto__")||oe(e,"constructor")||oe(e,"prototype")}function ae(e,t){return Hx(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function _a(e){return Object.entries(e)}function Tt(e){return Object.getOwnPropertyNames(e)}function QF(e){return Object.getOwnPropertySymbols(e)}function JF(e,t){if(!pt(t))return!1;const n=Tt(e);return oe(n.length,Tt(t).length)&&n.every(s=>Px(e[s],t[s]))}function eG(e,t){return Ue(t)&&oe(e.length,t.length)&&e.every((n,s)=>Px(e[s],t[s]))}function Px(e,t){return Ue(e)?eG(e,t):pt(e)?JF(e,t):oe(e,t)}function tG(e){return e instanceof Boolean}function nG(e){return e instanceof Number}function sG(e){return e instanceof String}function _9(e){return globalThis.ArrayBuffer.isView(e)}function O9(e){return e instanceof globalThis.RegExp}function rG(e){return e instanceof globalThis.Date}function iG(e){return e instanceof globalThis.Set}function aG(e){return e instanceof globalThis.Map}const oG={immutableTypes:!1,maxErrors:8,maxInstantiationCount:128,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function D9(){return oG}function lG(e){return ae(e,"~kind")||ae(e,"~unsafe")}function cG(e){const t={};for(const n of Tt(e)){if(Hx(n))continue;const s=Object.getOwnPropertyDescriptor(e,n);s.value=Oa(s.value),oe(s.enumerable,!0)?t[n]=s.value:Object.defineProperty(t,n,s)}return t}function uG(e){const t={};for(const n of Tt(e))Hx(n)||(t[n]=Oa(e[n]));for(const n of QF(e))t[n]=Oa(e[n]);return t}function dG(e){return KF(e)?e:lG(e)?cG(e):uG(e)}function fG(e){return e.map(t=>Oa(t))}function hG(e){return e.slice()}function xG(e){return new RegExp(e.source,e.flags)}function pG(e){return new Map(Oa([...e.entries()]))}function gG(e){return new Set(Oa([...e.values()]))}function Oa(e){return _9(e)?hG(e):O9(e)?xG(e):aG(e)?pG(e):iG(e)?gG(e):Ue(e)?fG(e):pt(e)?dG(e):e}function mG(e){return Oa(e)}function yG(e,t){for(const n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function kG(e,t){return{...e,...t}}function Oi(e,t,n={}){const s=kG(t,n),r=yG(s,e);return r}function L9(e,t,n){const s=D9(),r=mG(e);for(const i of Object.keys(t))Object.defineProperty(r,i,{configurable:!0,writable:!0,enumerable:s.enumerableKind,value:t[i]});for(const i of Object.keys(n))Object.defineProperty(r,i,{configurable:!0,enumerable:!0,writable:!0,value:n[i]});return r}function bG(e){return pt(e)}function vG(e){return L9(e,{"~optional":!0},{})}function wG(e,t){return L9(vG(e),{},t)}function Ja(e,t){return Oi({"~kind":"Array"},{type:"array",items:e},t)}function jG(e,t={}){return wG(e,t)}function Cr(e){return jG(e)}function SG(e){return bG(e)&&ae(e,"~optional")}function $G(e){return Tt(e).filter(t=>!SG(e[t]))}function wn(e,t={}){const n=$G(e),s=n.length>0?{required:n}:{};return Oi({"~kind":"Object"},{type:"object",...s,properties:e},t)}function Ak(e){return Oi({"~kind":"Unknown"},{},e)}function B9(e,t){var n;return((n=t[e.length])==null?void 0:n.call(t,...e))??(()=>{throw Error("Invalid Arguments")})()}function CG(){throw new Error("Unreachable")}function EG(e){const t=new Set;let n=e;for(;n&&n!==Object.prototype;){for(const s of Reflect.ownKeys(n))s!=="constructor"&&typeof s!="symbol"&&t.add(s);n=Object.getPrototypeOf(n)}return[...t]}function TG(e){return typeof e=="number"}var ln;(function(e){e[e.Array=0]="Array",e[e.BigInt=1]="BigInt",e[e.Boolean=2]="Boolean",e[e.Date=3]="Date",e[e.Constructor=4]="Constructor",e[e.Function=5]="Function",e[e.Null=6]="Null",e[e.Number=7]="Number",e[e.Object=8]="Object",e[e.RegExp=9]="RegExp",e[e.String=10]="String",e[e.Symbol=11]="Symbol",e[e.TypeArray=12]="TypeArray",e[e.Undefined=13]="Undefined"})(ln||(ln={}));let _o=BigInt("14695981039346656037");const[zG,AG]=[BigInt("1099511628211"),BigInt("18446744073709551616")],NG=Array.from({length:256}).map((e,t)=>BigInt(t)),q9=new Float64Array(1),H9=new DataView(q9.buffer),P9=new Uint8Array(q9.buffer);function zt(e){_o=_o^NG[e],_o=_o*zG%AG}function MG(e){zt(ln.Array);for(const t of e)Ni(t)}function RG(e){zt(ln.BigInt),H9.setBigInt64(0,e);for(const t of P9)zt(t)}function s5(e){zt(ln.Boolean),zt(e?1:0)}function IG(e){zt(ln.Constructor),Ni(e.toString())}function _G(e){zt(ln.Date),Ni(e.getTime())}function OG(e){zt(ln.Function),Ni(e.toString())}function DG(e){zt(ln.Null)}function r5(e){zt(ln.Number),H9.setFloat64(0,e,!0);for(const t of P9)zt(t)}function LG(e){zt(ln.Object);for(const t of EG(e).sort())Ni(t),Ni(e[t])}function BG(e){zt(ln.RegExp),Om(e.toString())}const qG=new TextEncoder;function Om(e){zt(ln.String);for(const t of qG.encode(e))zt(t)}function HG(e){zt(ln.Symbol),Ni(e.toString())}function PG(e){zt(ln.TypeArray);const t=new Uint8Array(e.buffer);for(let n=0;n<t.length;n++)zt(t[n])}function UG(e){return zt(ln.Undefined)}function Ni(e){return _9(e)?PG(e):rG(e)?_G(e):O9(e)?BG(e):tG(e)?s5(e.valueOf()):sG(e)?Om(e.valueOf()):nG(e)?r5(e.valueOf()):TG(e)?r5(e):Ue(e)?MG(e):Qa(e)?s5(e):bs(e)?RG(e):E9(e)?IG(e):Zu(e)?DG():pt(e)?LG(e):Et(e)?Om(e):z9(e)?HG(e):wt(e)?UG():ju(e)?OG(e):CG()}function FG(e){return _o=BigInt("14695981039346656037"),Ni(e),_o}function GG(e){return FG(e).toString(16).padStart(16,"0")}function VG(e){return Oi({"~kind":"Boolean"},{type:"boolean"},e)}class WG extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}}function KG(e){return bs(e)?"bigint":Qa(e)?"boolean":qt(e)?"number":Et(e)?"string":(()=>{throw new WG(e)})()}function Fn(e,t){return Oi({"~kind":"Literal"},{type:KG(e),const:e},t)}function Jo(e){return Oi({"~kind":"Number"},{type:"number"},e)}function an(e){return Oi({"~kind":"String"},{type:"string"},e)}function Ux(e,t={}){return Oi({"~kind":"Union"},{anyOf:e},t)}function Dm(e,t){return Array.from({length:t-e+1},(n,s)=>String.fromCharCode(e+s))}[...Dm(97,122),...Dm(65,90)];const XG="0",ZG=Dm(49,57);[...ZG];function YG(e){return ae(e,"~refine")&&Ue(e["~refine"])&&Jt(e["~refine"],0,t=>pt(t)&&ae(t,"check")&&ae(t,"error")&&ju(t.check)&&ju(t.error))}function Yn(e){return pt(e)&&!Ue(e)}function Bh(e){return Qa(e)}function ut(e){return Yn(e)||Bh(e)}function QG(e){return ae(e,"additionalItems")&&ut(e.additionalItems)}function JG(e){return ae(e,"additionalProperties")&&ut(e.additionalProperties)}function eV(e){return ae(e,"allOf")&&Ue(e.allOf)&&e.allOf.every(t=>ut(t))}function Lm(e){return ae(e,"$anchor")&&Et(e.$anchor)}function tV(e){return ae(e,"anyOf")&&Ue(e.anyOf)&&e.anyOf.every(t=>ut(t))}function nV(e){return ae(e,"const")}function Nk(e){return ae(e,"contains")&&ut(e.contains)}function sV(e){return ae(e,"dependencies")&&pt(e.dependencies)&&Object.values(e.dependencies).every(t=>ut(t)||Ue(t)&&t.every(n=>Et(n)))}function rV(e){return ae(e,"dependentRequired")&&pt(e.dependentRequired)&&Object.values(e.dependentRequired).every(t=>Ue(t)&&t.every(n=>Et(n)))}function iV(e){return ae(e,"dependentSchemas")&&pt(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(t=>ut(t))}function Da(e){return ae(e,"$dynamicAnchor")&&Et(e.$dynamicAnchor)}function aV(e){return ae(e,"$dynamicRef")&&Et(e.$dynamicRef)}function oV(e){return ae(e,"else")&&ut(e.else)}function lV(e){return ae(e,"enum")&&Ue(e.enum)}function cV(e){return ae(e,"exclusiveMaximum")&&(qt(e.exclusiveMaximum)||bs(e.exclusiveMaximum))}function uV(e){return ae(e,"exclusiveMinimum")&&(qt(e.exclusiveMinimum)||bs(e.exclusiveMinimum))}function dV(e){return ae(e,"format")&&Et(e.format)}function Hs(e){return ae(e,"$id")&&Et(e.$id)}function fV(e){return ae(e,"if")&&ut(e.if)}function Mk(e){return ae(e,"items")&&(ut(e.items)||Ue(e.items)&&e.items.every(t=>ut(t)))}function hV(e){return Mk(e)&&Ue(e.items)}function xV(e){return ae(e,"maximum")&&(qt(e.maximum)||bs(e.maximum))}function pV(e){return ae(e,"maxContains")&&qt(e.maxContains)}function gV(e){return ae(e,"maxItems")&&qt(e.maxItems)}function mV(e){return ae(e,"maxLength")&&qt(e.maxLength)}function yV(e){return ae(e,"maxProperties")&&qt(e.maxProperties)}function kV(e){return ae(e,"minimum")&&(qt(e.minimum)||bs(e.minimum))}function U9(e){return ae(e,"minContains")&&qt(e.minContains)}function bV(e){return ae(e,"minItems")&&qt(e.minItems)}function vV(e){return ae(e,"minLength")&&qt(e.minLength)}function wV(e){return ae(e,"minProperties")&&qt(e.minProperties)}function jV(e){return ae(e,"multipleOf")&&(qt(e.multipleOf)||bs(e.multipleOf))}function SV(e){return ae(e,"not")&&ut(e.not)}function $V(e){return ae(e,"oneOf")&&Ue(e.oneOf)&&e.oneOf.every(t=>ut(t))}function CV(e){return ae(e,"pattern")&&(Et(e.pattern)||e.pattern instanceof RegExp)}function F9(e){return ae(e,"patternProperties")&&pt(e.patternProperties)&&Object.values(e.patternProperties).every(t=>ut(t))}function G9(e){return ae(e,"prefixItems")&&Ue(e.prefixItems)&&e.prefixItems.every(t=>ut(t))}function V9(e){return ae(e,"properties")&&pt(e.properties)&&Object.values(e.properties).every(t=>ut(t))}function EV(e){return ae(e,"propertyNames")&&(pt(e.propertyNames)||ut(e.propertyNames))}function TV(e){return ae(e,"$recursiveAnchor")&&Qa(e.$recursiveAnchor)}function Bm(e){return TV(e)&&oe(e.$recursiveAnchor,!0)}function zV(e){return ae(e,"$recursiveRef")&&Et(e.$recursiveRef)}function AV(e){return ae(e,"$ref")&&Et(e.$ref)}function W9(e){return ae(e,"required")&&Ue(e.required)&&e.required.every(t=>Et(t))}function NV(e){return ae(e,"then")&&ut(e.then)}function MV(e){return ae(e,"type")&&(Et(e.type)||Ue(e.type)&&e.type.every(t=>Et(t)))}function RV(e){return ae(e,"uniqueItems")&&Qa(e.uniqueItems)}function IV(e){return ae(e,"unevaluatedItems")&&ut(e.unevaluatedItems)}function _V(e){return ae(e,"unevaluatedProperties")&&ut(e.unevaluatedProperties)}class Kl{constructor(){const t=new Set,n=new Set;this.stack=[{indices:t,keys:n}]}Push(){const t=new Set,n=new Set;return this.stack.push({indices:t,keys:n}),!0}Pop(){return this.stack.pop(),!0}AddIndex(t){return this.GetIndices().add(t),!0}AddKey(t){return this.GetKeys().add(t),!0}GetIndices(){return this.stack[this.stack.length-1].indices}GetKeys(){return this.stack[this.stack.length-1].keys}Merge(t){for(const n of t)n.GetIndices().forEach(s=>this.GetIndices().add(s)),n.GetKeys().forEach(s=>this.GetKeys().add(s));return!0}}function OV(e,t,n,s){return Jt(n["~refine"],0,(r,i)=>r.check(s))}function DV(e){return Mk(e)&&Ue(e.items)}function LV(e,t,n,s){return DV(n)?Jt(s,0,(i,a)=>N9(a,n.items.length)||eo(e,t,n.additionalItems,i)&&t.AddIndex(a)):!0}function Rk(e){return new RegExp(e,"u")}function BV(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`}function qV(e){const t=[];return F9(e)&&t.push(...Tt(e.patternProperties)),V9(e)&&t.push(...Tt(e.properties).map(BV)),oe(t.length,0)?"(?!)":`(${t.join("|")})`}function HV(e,t,n,s){const r=Rk(qV(n));return Jt(Tt(s),0,(a,l)=>r.test(a)||eo(e,t,n.additionalProperties,s[a])&&t.AddKey(a))}function PV(e,t,n,s){const r=n.allOf.reduce((i,a)=>{const l=new Kl;return jt(e,l,a,s)?[...i,l]:i},[]);return oe(r.length,n.allOf.length)&&t.Merge(r)}function UV(e,t,n,s){const r=n.anyOf.reduce((i,a)=>{const l=new Kl;return jt(e,l,a,s)?[...i,l]:i},[]);return A9(r.length,0)&&t.Merge(r)}function FV(e,t,n,s){return n}function GV(e,t,n,s){return M9(n.const)?oe(s,n.const):Px(s,n.const)}function VV(e){return!(U9(e)&&oe(e.minContains,0))}function WV(e,t,n,s){return VV(n)?!oe(s.length,0)&&YF(s,(r,i)=>jt(e,t,n.contains,r)&&t.AddIndex(i)):!0}function KV(e,t,n,s){const r=oe(Tt(s).length,0),i=Jt(_a(n.dependencies),0,([a,l])=>!ae(s,a)||(Ue(l)?l.every(c=>ae(s,c)):jt(e,t,l,s)));return r||i}function XV(e,t,n,s){const r=oe(Tt(s).length,0),i=Jt(_a(n.dependentRequired),0,([a,l])=>!ae(s,a)||l.every(c=>ae(s,c)));return r||i}function ZV(e,t,n,s){const r=oe(Tt(s).length,0),i=Jt(_a(n.dependentSchemas),0,([a,l])=>!ae(s,a)||jt(e,t,l,s));return r||i}function YV(e,t,n,s){const r=e.DynamicRef(n)??!1;return ut(r)&&jt(e,t,r,s)}function QV(e,t,n,s){return R9(n.enum,r=>M9(r)?oe(s,r):Px(s,r))}function JV(e,t,n,s){return N9(s,n.exclusiveMaximum)}function eW(e,t,n,s){return A9(s,n.exclusiveMinimum)}const tW=[0,31,28,31,30,31,30,31,31,30,31,30,31],nW=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function sW(e){return e%4===0&&(e%100!==0||e%400===0)}function K9(e){const t=nW.exec(e);if(!t)return!1;const n=+t[1],s=+t[2],r=+t[3];return s>=1&&s<=12&&r>=1&&r<=(s===2&&sW(n)?29:tW[s])}const rW=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:([Zz])|([+-])(\d\d):(\d\d))?$/;function X9(e,t=!0){const n=rW.exec(e);if(!n||t&&!n[4]&&!n[5])return!1;const s=+n[1],r=+n[2],i=+n[3];if(s>23||r>59||i>60)return!1;if(n[5]){const d=+n[6],f=+n[7];if(d>23||f>59)return!1}if(i<60)return!0;const a=n[5]==="-"?-1:1,l=+(n[6]||0),c=+(n[7]||0);return((s*60+r-a*(l*60+c))%1440+1440)%1440===1439}function iW(e){const t=e.split(/T/i);return t.length===2&&K9(t[0])&&X9(t[1])}const aW=/^P((\d+Y(\d+M(\d+D)?)?|\d+M(\d+D)?|\d+D)(T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S))?|T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S)|\d+W)$/;function oW(e){return aW.test(e)}const lW=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[^"\\]|\\[\x20-\x7e])*")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*|\[(?:IPv6:[a-f0-9:]+|(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3})\])$/i;function cW(e){return lW.test(e)}const uW=new RegExp("^(?!-).*(?<!-)$"),dW=/^(?!..--)/,fW=/^[a-zA-Z0-9-]*$/,Ik=/[^\p{ASCII}]/u,hW=/[0-9]/,xW=/[\u{0660}-\u{0669}]/u,pW=/[\u{06f0}-\u{06f9}]/u,gW=/[\u{002e}\u{002c}\u{003a}\u{002f}]/u,mW=/[\u{002d}\u{002b}]/u,Z9=new RegExp("\\p{Mn}","u"),yW=new RegExp("\\p{Mc}","u"),kW=/[\p{Mn}\p{Mc}\p{Me}]/u,Y9=new RegExp("\\p{L}","u"),bW=new RegExp("\\p{Nd}","u"),vW=new RegExp("\\p{Script=Greek}","u"),Q9=new RegExp("\\p{Script=Hebrew}","u"),wW=/[\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Han}]/u,jW=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Thaana}\p{Script=Mandaic}]/u,i5=/[\u{094d}\u{09cd}\u{0a4d}\u{0acd}\u{0b4d}\u{0bcd}\u{0c4d}\u{0ccd}\u{0d3b}\u{0d3c}\u{0d4d}\u{0dca}\u{1b44}\u{1baa}\u{1bab}\u{a9c0}\u{11046}\u{1107f}\u{110b9}\u{11133}\u{11134}\u{111c0}\u{11235}\u{1134d}\u{11442}\u{114c2}\u{115bf}\u{1163f}\u{116b6}\u{11c3f}\u{11d44}\u{11d45}]/u,SW=/[\u{0640}\u{07fa}\u{302e}\u{302f}\u{3031}\u{3032}\u{3033}\u{3034}\u{3035}\u{303b}]/u,$W=/[\u{00b7}\u{0375}\u{05f3}\u{05f4}\u{200c}\u{200d}\u{30fb}]/u,CW=/[\u{00df}\u{03c2}\u{06fd}\u{06fe}\u{0f0b}\u{3007}]/u,EW=new RegExp([hW,pW].map(e=>e.source).join("|"),"u"),TW=new RegExp([Y9,mW,gW,bW,Z9,yW,$W,CW].map(e=>e.source).join("|"),"u");function zW(e){return uW.test(e)&&dW.test(e)&&fW.test(e)}const Ds=36,Pc=1,Su=26,AW=38,NW=700,J9=72,e$=128;function Ep(){throw null}function t$(e){return e.toLowerCase().startsWith("xn--")}function n$(e,t,n){e=n?Math.floor(e/NW):e>>1,e+=Math.floor(e/t);let s=0;for(;e>(Ds-Pc)*Su>>1;)e=Math.floor(e/(Ds-Pc)),s+=Ds;return s+Math.floor((Ds-Pc+1)*e/(e+AW))}function s$(e){const t=[];let n=e$,s=0,r=J9;const i=e.lastIndexOf("-");if(i>0)for(let l=0;l<i;l++){const c=e.charCodeAt(l);c>=128&&Ep(),t.push(c)}let a=i<0?0:i+1;for(;a<e.length;){const l=s;let c=1,u=Ds;for(;;){a>=e.length&&Ep();const f=e.charCodeAt(a++);let h;f>=97&&f<=122?h=f-97:f>=48&&f<=57?h=f-48+26:Ep(),s+=h*c;const p=u<=r?Pc:u>=r+Su?Su:u-r;if(h<p)break;c*=Ds-p,u+=Ds}const d=t.length+1;r=n$(s-l,d,l===0),n+=Math.floor(s/d),s%=d,t.splice(s,0,n),s++}return String.fromCodePoint(...t)}function a5(e){return e<26?String.fromCharCode(e+97):String.fromCharCode(e-26+48)}const MW=new RegExp(Ik.source,"gu");function RW(e){const t=e.replace(MW,""),n=t.length,s=n>0?[t,"-"]:[],r=Array.from(e,u=>u.codePointAt(0));let i=e$,a=0,l=J9,c=n;for(;c<r.length;){let u=1/0;for(const d of r)d>=i&&d<u&&(u=d);a+=(u-i)*(c+1),i=u;for(const d of r)if(d<i&&a++,d===i){let f=a;for(let h=Ds;;h+=Ds){const p=h<=l?Pc:h>=l+Su?Su:h-l;if(f<p)break;const m=p+(f-p)%(Ds-p);s.push(a5(m)),f=Math.floor((f-p)/(Ds-p))}s.push(a5(f)),l=n$(a,c+1,c===n),a=0,c++}a++,i++}return s.join("")}const IW=/^(?:R|AL|AN|EN|ES|CS|ET|ON|BN|NSM)$/,o5=/^(?:L|EN|ES|CS|ET|ON|BN|NSM)$/,_W=/^(?:R|AL|AN)$/;function OW(e){if(t$(e))try{return qm(s$(e.slice(4).toLowerCase()))}catch{return!1}return qm(e)}function r$(e){const t=String.fromCodePoint(e);return EW.test(t)?"EN":xW.test(t)?"AN":Z9.test(t)?"NSM":Q9.test(t)?"R":jW.test(t)?"AL":Y9.test(t)?"L":"ON"}function qm(e){for(const t of e)if(_W.test(r$(t.codePointAt(0))))return!0;return!1}function i$(e){let t=!1,n=o5,s=!1,r=!1,i=!0;for(const a of e){const l=r$(a.codePointAt(0));if(i){if(l!=="L"&&l!=="R"&&l!=="AL")return!1;t=l==="R"||l==="AL",n=t?IW:o5,i=!1}if(!n.test(l))return!1;l==="EN"?s=!0:l==="AN"&&(r=!0)}return!(t&&s&&r)}function DW(e){return Ik.test(e)&&RW(e).length+4>63}function LW(e){return e[0]==="-"||e[e.length-1]==="-"?!0:e.slice(2).join("").startsWith("--")}function a$(e){if(DW(e)||qm(e)&&!i$(e))return!1;const t=[...e],n=t.map(i=>i.codePointAt(0)),s=n.length;if(LW(t)||kW.test(t[0]))return!1;let r=!1;for(let i=0;i<s;i++){const a=n[i],l=t[i];if(SW.test(l)||!TW.test(l))return!1;wW.test(l)&&(r=!0);const c=n[i-1],u=n[i+1];switch(a){case 183:if(c!==108||u!==108)return!1;break;case 885:if(!u||!vW.test(t[i+1]))return!1;break;case 1523:case 1524:if(!c||!Q9.test(t[i-1]))return!1;break;case 8204:if(!c||c<128&&!i5.test(t[i-1]))return!1;break;case 8205:if(!c||!i5.test(t[i-1]))return!1;break}}return!(e.includes("・")&&!r)}function o$(e){if(!t$(e))return!1;try{const t=e.slice(4).toLowerCase();if(t.lastIndexOf("-")===0)return!1;const n=s$(t);return Ik.test(n)?a$(n):!1}catch{return!1}}function BW(e){return e.length>0&&e.length<=63}function qW(e){return BW(e)&&(o$(e)||zW(e))}function HW(e){return e.length===0||e.length>253||e.charCodeAt(e.length-1)===46?!1:e.split(".").every(t=>qW(t))}function PW(e){return e.length>0&&e.length<=63}function UW(e){return PW(e)&&(o$(e)||a$(e))}function FW(e){return e.replace(/[\uff01-\uff5e]/g,t=>String.fromCharCode(t.charCodeAt(0)-65248)).normalize("NFC").replace(/[\u00ad\u034f\u180b-\u180d\u200b\ufe00-\ufe0f\u{e0100}-\u{e01ef}]/gu,"").replace(/[\u002E\u3002\uFF0E\uFF61]/g,".")}function GW(e){if(e.length===0||e.includes(" "))return!1;const t=FW(e);if(t.length>253)return!1;const n=t.split("."),s=n.some(r=>OW(r));return n.every(r=>UW(r)&&(!s||i$(r)))}function VW(e){return HW(e)}const WW=new RegExp('^(?:[A-Za-z0-9!#$%&\'*+\\/=?^_`{|}~\\u{0080}-\\u{10FFFF}-]+(?:\\.[A-Za-z0-9!#$%&\'*+\\/=?^_`{|}~\\u{0080}-\\u{10FFFF}-]+)*|"(?:[^"\\\\]|\\\\.)*")@[\\p{L}\\p{N}](?:[\\p{L}\\p{N}-]{0,62})(?<!-)(?:\\.[\\p{L}\\p{N}](?:[\\p{L}\\p{N}-]{0,62})(?<!-))*$',"iu");function KW(e){return WW.test(e.normalize("NFC"))}function XW(e){return GW(e)}const ZW=/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;function YW(e){return ZW.test(e)}const QW=/^(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:)?[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)$/i;function JW(e){return QW.test(e)}const eK=/[\x00-\x20\x7F\\]|%(?![0-9a-fA-F]{2})/,tK=/^[a-zA-Z][a-zA-Z0-9+\-.]*\/\//;function nK(e){return!eK.test(e)&&!tK.test(e)&&URL.canParse(e,"http://example.com")}const sK=2048,rK=/\[[vV][0-9a-fA-F]+\.[^\]]+\]/,iK=/[\x00-\x20<>\^`{|}\\]/,aK=/%(?![0-9a-fA-F]{2})/;function oK(e){return e.length<sK?e.replace(rK,"[::1]"):e}function lK(e){return iK.test(e)||aK.test(e)?!1:URL.canParse(oK(e))}const cK=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function uK(e){return cK.test(e)}const dK=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function fK(e){return dK.test(e)}function hK(e){try{return new RegExp(e,"u"),!0}catch{return!1}}const xK=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function pK(e){return xK.test(e)}const gK=/^(?:[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?)(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function mK(e){return gK.test(e)}const yK=/^(?:(?:[^\x00-\x20"<>%\\^`{|}\x7f]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?)*\})*$/i;function kK(e){return yK.test(e)}const bK=/^[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function vK(e){return bK.test(e)}function wK(e){return URL.canParse(e)}const jK=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function SK(e){return jK.test(e)}const lt=new Map;function $K(){lt.clear()}function CK(e,t){var n;return((n=lt.get(e))==null?void 0:n(t))??!0}function EK(){$K(),lt.set("date-time",iW),lt.set("date",K9),lt.set("duration",oW),lt.set("email",cW),lt.set("hostname",VW),lt.set("idn-email",KW),lt.set("idn-hostname",XW),lt.set("ipv4",YW),lt.set("ipv6",JW),lt.set("iri-reference",nK),lt.set("iri",lK),lt.set("json-pointer-uri-fragment",uK),lt.set("json-pointer",fK),lt.set("regex",hK),lt.set("relative-json-pointer",pK),lt.set("time",X9),lt.set("uri-reference",mK),lt.set("uri-template",kK),lt.set("uri",vK),lt.set("url",wK),lt.set("uuid",SK)}EK();function TK(e,t,n,s){return CK(n.format,s)}function zK(e,t,n,s){const r=NV(n)?n.then:!0,i=oV(n)?n.else:!0;return jt(e,t,n.if,s)?jt(e,t,r,s):jt(e,t,i,s)}function AK(e,t,n,s){return Jt(n.items,0,(r,i)=>Wl(s.length,i)||eo(e,t,r,s[i])&&t.AddIndex(i))}function NK(e,t,n,s){const r=G9(n)?n.prefixItems.length:0;return Jt(s,r,(i,a)=>eo(e,t,n.items,i)&&t.AddIndex(a))}function MK(e,t,n,s){return hV(n)?AK(e,t,n,s):NK(e,t,n,s)}function RK(e){return Nk(e)}function IK(e,t,n,s){if(!RK(n))return!0;const r=I9(s,i=>jt(e,t,n.contains,i));return Wl(r,n.maxContains)}function _K(e,t,n,s){return Wl(s,n.maximum)}function OK(e,t,n,s){return Wl(s.length,n.maxItems)}function DK(e,t,n,s){return XF(s,n.maxLength)}function LK(e,t,n,s){return Wl(Tt(s).length,n.maxProperties)}function BK(e){return Nk(e)}function qK(e,t,n,s){if(!BK(n))return!0;const r=I9(s,(i,a)=>jt(e,t,n.contains,i)&&t.AddIndex(a));return qx(r,n.minContains)}function HK(e,t,n,s){return qx(s,n.minimum)}function PK(e,t,n,s){return qx(s.length,n.minItems)}function UK(e,t,n,s){return ZF(s,n.minLength)}function FK(e,t,n,s){return qx(Tt(s).length,n.minProperties)}function GK(e,t,n,s){return WF(s,n.multipleOf)}function VK(e,t,n,s){const r=new Kl;return!jt(e,r,n.not,s)&&t.Merge([r])}function WK(e,t,n,s){const r=n.oneOf.reduce((i,a)=>{const l=new Kl;return jt(e,l,a,s)?[...i,l]:i},[]);return oe(r.length,1)&&t.Merge(r)}function KK(e,t,n,s){return(Et(n.pattern)?Rk(n.pattern):n.pattern).test(s)}function XK(e,t,n,s){return Jt(_a(n.patternProperties),0,([r,i])=>{const a=Rk(r);return Jt(_a(s),0,([l,c])=>!a.test(l)||eo(e,t,i,c)&&t.AddKey(l))})}function ZK(e,t,n,s){return oe(s.length,0)||Jt(n.prefixItems,0,(r,i)=>Wl(s.length,i)||eo(e,t,r,s[i])&&t.AddIndex(i))}function YK(e,t){return e.includes(t)||D9().exactOptionalPropertyTypes}function QK(e,t){return wt(e[t])}function JK(e,t,n,s){const r=W9(n)?n.required:[];return Jt(_a(n.properties),0,([a,l])=>{const c=!ae(s,a)||eo(e,t,l,s[a])&&t.AddKey(a);return YK(r,a)?c:QK(s,a)||c})}function eX(e,t,n,s){return Jt(Tt(s),0,(r,i)=>jt(e,t,n.propertyNames,r))}function tX(e,t,n,s){const r=e.RecursiveRef(n)??!1;return ut(r)&&jt(e,t,r,s)}function nX(e,t,n,s){const r=e.Ref(n)??!1,i=new Kl,a=ut(r)&&jt(e,i,r,s);return a&&t.Merge([i]),a}function sX(e,t,n,s){return Jt(n.required,0,r=>ae(s,r))}function l$(e,t,n,s,r){return oe(n,"object")?VF(r):oe(n,"array")?Ue(r):oe(n,"boolean")?Qa(r):oe(n,"integer")?T9(r):oe(n,"number")?qt(r):oe(n,"null")?Zu(r):oe(n,"string")?Et(r):oe(n,"bigint")?bs(r):oe(n,"constructor")?E9(r):oe(n,"function")?ju(r):oe(n,"symbol")?z9(r):oe(n,"undefined")||oe(n,"void")?wt(r):!0}function rX(e,t,n,s,r){return R9(n,i=>l$(e,t,i,s,r))}function iX(e,t,n,s){return Ue(n.type)?rX(e,t,n.type,n,s):l$(e,t,n.type,n,s)}function aX(e,t,n,s){const r=t.GetIndices();return Jt(s,0,(i,a)=>(r.has(a)||jt(e,t,n.unevaluatedItems,i))&&t.AddIndex(a))}function oX(e,t,n,s){const r=t.GetKeys();return Jt(_a(s),0,([i,a])=>r.has(i)||jt(e,t,n.unevaluatedProperties,a)&&t.AddKey(i))}function lX(e){return!oe(e.uniqueItems,!1)}function cX(e,t,n,s){if(!lX(n))return!0;const r=new Set(s.map(GG)).size,i=s.length;return oe(r,i)}function eo(e,t,n,s){return t.Push()&&jt(e,t,n,s)&&t.Pop()}function jt(e,t,n,s){e.Push(n);const r=Bh(n)?FV(e,t,n):(!MV(n)||iX(e,t,n,s))&&(!(pt(s)&&!Ue(s))||(!W9(n)||sX(e,t,n,s))&&(!JG(n)||HV(e,t,n,s))&&(!sV(n)||KV(e,t,n,s))&&(!rV(n)||XV(e,t,n,s))&&(!iV(n)||ZV(e,t,n,s))&&(!F9(n)||XK(e,t,n,s))&&(!V9(n)||JK(e,t,n,s))&&(!EV(n)||eX(e,t,n,s))&&(!wV(n)||FK(e,t,n,s))&&(!yV(n)||LK(e,t,n,s)))&&(!Ue(s)||(!QG(n)||LV(e,t,n,s))&&(!Nk(n)||WV(e,t,n,s))&&(!Mk(n)||MK(e,t,n,s))&&(!pV(n)||IK(e,t,n,s))&&(!gV(n)||OK(e,t,n,s))&&(!U9(n)||qK(e,t,n,s))&&(!bV(n)||PK(e,t,n,s))&&(!G9(n)||ZK(e,t,n,s))&&(!RV(n)||cX(e,t,n,s)))&&(!Et(s)||(!mV(n)||DK(e,t,n,s))&&(!vV(n)||UK(e,t,n,s))&&(!dV(n)||TK(e,t,n,s))&&(!CV(n)||KK(e,t,n,s)))&&(!(qt(s)||bs(s))||(!cV(n)||JV(e,t,n,s))&&(!uV(n)||eW(e,t,n,s))&&(!xV(n)||_K(e,t,n,s))&&(!kV(n)||HK(e,t,n,s))&&(!jV(n)||GK(e,t,n,s)))&&(!AV(n)||nX(e,t,n,s))&&(!zV(n)||tX(e,t,n,s))&&(!aV(n)||YV(e,t,n,s))&&(!nV(n)||GV(e,t,n,s))&&(!lV(n)||QV(e,t,n,s))&&(!fV(n)||zK(e,t,n,s))&&(!SV(n)||VK(e,t,n,s))&&(!eV(n)||PV(e,t,n,s))&&(!tV(n)||UV(e,t,n,s))&&(!$V(n)||WK(e,t,n,s))&&(!IV(n)||!Ue(s)||aX(e,t,n,s))&&(!_V(n)||!pt(s)||oX(e,t,n,s))&&(!YG(n)||OV(e,t,n,s));return e.Pop(n),r}function uX(e,t){return pt(t)&&!Hx(e)?t[e]:void 0}function dX(e,t){return e.reduce((n,s)=>uX(s,n),t)}function fX(e){if(oe(e.length,0))return[];const t=e.split("/").map(n=>n.replace(/~1/g,"/").replace(/~0/g,"~"));return t.length>0&&t[0]===""?t.slice(1):t}function hX(e,t){const n=fX(t);return dX(n,e)}const Fx="https://json-schema.org";function c$(e,t){if(pt(e)&&Da(e)&&oe(e.$dynamicAnchor,t))return e;if(pt(e))for(const n of Tt(e)){const s=c$(e[n],t);if(s)return s}}function Hm(e,t,n){if(oe(e,n))return t.href;const s=Yn(e)&&Hs(e)?new URL(e.$id,t.href):t;if(Ue(e))for(const r of e){const i=Hm(r,s,n);if(!wt(i))return i}else if(pt(e))for(const r of Tt(e)){const i=Hm(e[r],s,n);if(!wt(i))return i}}function xX(e,t,n){if(oe(e.$id,n.hash))return e;const s=new URL(n.href,t.href);if(oe(t.pathname,s.pathname))return n.hash.startsWith("#")?u$(e,n):e}function pX(e,t,n){const s=new URL(`#${e.$anchor}`,t.href),r=new URL(n.href,t.href);return oe(s.href,r.href)?e:void 0}function gX(e,t,n){const s=new URL(`#${e.$dynamicAnchor}`,t.href),r=new URL(n.href,t.href);return oe(s.href,r.href)?e:void 0}function u$(e,t){if(t.href.endsWith("#"))return e;if(!t.hash.startsWith("#"))return;const n=decodeURIComponent(t.hash.slice(1));return n.startsWith("/")?hX(e,n):void 0}function mX(e,t,n){if(Hs(e)){const s=xX(e,t,n);if(!wt(s))return s}if(Lm(e)){const s=pX(e,t,n);if(!wt(s))return s}if(Da(e)){const s=gX(e,t,n);if(!wt(s))return s}return u$(e,n)}function yX(e,t,n){return e.reduce((s,r)=>{const i=Gx(r,t,n);return wt(i)?s:i},void 0)}function kX(e){return oe(e,"const")||oe(e,"enum")}function bX(e,t,n){return Tt(e).reduce((s,r)=>{if(kX(r))return s;const i=Gx(e[r],t,n);return wt(i)?s:i},void 0)}function Gx(e,t,n){const s=Yn(e)&&Hs(e)?new URL(e.$id,t.href):t;if(Yn(e)){const r=mX(e,s,n);if(!wt(r))return r}if(Ue(e))return yX(e,s,n);if(pt(e))return bX(e,s,n)}function vX(e,t,n){return Hm(e,new URL(t||".",Fx),n)}function wX(e,t,n,s){const r=Vx(e,t,n,s,!1);return Yn(r)&&Hs(r)?r:void 0}function l5(e){return e.href.split("#")[0]}function jX(e,t){return ae(e,t)?e[t]:void 0}function SX(e,t,n){return Gx(e,t,n)}function $X(e,t,n){const s=l5(n);if(oe(s,l5(t))||!ae(e,s))return;const r=e[s],i=Yn(r)&&Hs(r)?new URL(r.$id,s):new URL(s);return oe(n.hash,"")?r:Gx(r,i,n)}function CX(e,t,n,s,r){if(!s.$ref.startsWith("#")||ae(e,"$schema"))return;const i=vX(t,n,r);if(!(wt(i)||oe(i,n)))return{target:r,base:i,root:t}}function EX(e,t,n){const s=e[t];if(Yn(s))return{target:n,base:t,root:s}}function TX(e,t,n,s,r){const i=r?EX(e.context,s,n):void 0;return wt(i)?CX(e.root,e.lexicalSchema,e.referenceBase,t,n):i}function zX(e,t,n,s,r,i){if(Hs(r))return;const a=wX(e,t,n,s);if(!(!a||i.includes(a)))return{target:r,resource:a}}function Vx(e,t,n,s,r=!0){const i=new URL(n||".",Fx),a=r&&Hs(t)?new URL(t.$id,i):i,l=new URL(s,a.href);return jX(e,s)??SX(t,a,l)??$X(e,a,l)}function AX(e,t,n,s,r,i){const a=new URL(n||".",Fx),l=r.$dynamicRef.startsWith("#")?s:t,c=Vx(e,l,n,r.$dynamicRef,!1);if(wt(c)){const f=new URL(r.$dynamicRef,a).hash;if(!f.startsWith("#/")&&f.startsWith("#")){const h=decodeURIComponent(f.slice(1));return i.find(m=>oe(m.$dynamicAnchor,h))??c$(t,h)}return}return!Yn(c)||!Da(c)||new URL(r.$dynamicRef,a).hash.startsWith("#/")?c:i.find(f=>oe(f.$dynamicAnchor,c.$dynamicAnchor))??c}function NX(e,t){const n=e.inRetrievedFrame?e.lexicalSchema:e.root,s=t.$ref.startsWith("#")?e.lexicalSchema:n,r=Vx(e.context,s,e.referenceBase,t.$ref,!1);if(!r||!Yn(r))return{schema:r};const i=new URL(t.$ref,e.referenceBase).href.split("#")[0],a=!oe(i,e.resourceBase),l=TX(e,t,r,i,a),c=a?zX(e.context,e.root,e.referenceBase,i,r,e.ids):void 0;return{schema:r,retrievedResource:l,resolvedResource:c}}function MX(e,t){const n=Bm(e.lexicalSchema)?e.recursiveAnchors[0]:e.lexicalSchema;return Vx(e.context,n,e.lexicalBase,t.$recursiveRef,!1)}function RX(e,t){return AX(e.context,e.root,e.lexicalBase,e.lexicalSchema,t,e.dynamicAnchors)}var et=function(e,t,n,s){if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?s:n==="a"?s.call(e):s?s.value:t.get(e)},We,Nf,d$,Pm,Yd,c5,u5,d5,f5,Tp,zp,Um,Fm,h5,f$;class IX{constructor(t,n){We.add(this),this.context=t,this.schema=n,this.ids=[],this.resourceIds=[],this.anchors=[],this.recursiveAnchors=[],this.dynamicAnchors=[],this.retrievedResources=new Map,this.retrievedFrames=[],this.resolvedResources=new Map,this.pendingResource=!0}LexicalBaseURL(){return et(this,We,"m",Pm).call(this,this.ids)}Push(t){if(!Yn(t))return;Hs(t)&&et(this,We,"m",Um).call(this,t),Lm(t)&&this.anchors.push(t),Bm(t)&&this.recursiveAnchors.push(t),Da(t)&&this.dynamicAnchors.push(t);const n=this.retrievedResources.get(t);n&&this.retrievedFrames.push({schema:n.root,base:n.base,idDepth:this.ids.length,resourceDepth:this.resourceIds.length})}Pop(t){Yn(t)&&(Hs(t)&&et(this,We,"m",Fm).call(this,t),Lm(t)&&this.anchors.pop(),Bm(t)&&this.recursiveAnchors.pop(),Da(t)&&this.dynamicAnchors.pop(),this.retrievedResources.has(t)&&this.retrievedFrames.pop(),et(this,We,"m",f$).call(this,t))}Ref(t){const n=NX(et(this,We,"m",Nf).call(this),t);return et(this,We,"m",d$).call(this,n),n.schema}RecursiveRef(t){const n=MX(et(this,We,"m",Nf).call(this),t);return n&&(this.pendingResource=!0),n}DynamicRef(t){const n=RX(et(this,We,"m",Nf).call(this),t);return n&&(this.pendingResource=!0),n}}We=new WeakSet,Nf=function(){return{context:this.context,root:this.schema,ids:this.ids,lexicalSchema:et(this,We,"m",u5).call(this),lexicalBase:this.LexicalBaseURL(),referenceBase:et(this,We,"m",c5).call(this),resourceBase:et(this,We,"m",Yd).call(this),recursiveAnchors:this.recursiveAnchors,dynamicAnchors:this.dynamicAnchors,inRetrievedFrame:this.retrievedFrames.length>0}},d$=function(t){wt(t.schema)||(this.pendingResource=!0),wt(t.resolvedResource)||et(this,We,"m",h5).call(this,t.resolvedResource.target,t.resolvedResource.resource),wt(t.retrievedResource)||this.retrievedResources.set(t.retrievedResource.target,{base:t.retrievedResource.base,root:t.retrievedResource.root})},Pm=function(t){const n=this.retrievedFrames[this.retrievedFrames.length-1],s=n?new URL(n.base):new URL(Fx);return(n?t.slice(n.idDepth):t).reduce((i,a)=>new URL(a.$id,i),s).href},Yd=function(){const t=this.retrievedFrames[this.retrievedFrames.length-1];return t?this.resourceIds.slice(t.resourceDepth).reduce((n,s)=>new URL(s.$id,n),new URL(t.base)).href:et(this,We,"m",Pm).call(this,this.resourceIds)},c5=function(){if(this.retrievedFrames.length>0)return et(this,We,"m",Yd).call(this);const t=this.ids[this.ids.length-1];return t&&!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(t.$id)?this.LexicalBaseURL():et(this,We,"m",Yd).call(this)},u5=function(){const t=this.retrievedFrames[this.retrievedFrames.length-1];return t?this.ids.length>t.idDepth?this.ids[this.ids.length-1]:t.schema:this.ids.length>0?this.ids[this.ids.length-1]:this.schema},d5=function(t){t.forEach(n=>et(this,We,"m",Tp).call(this,n,!1))},f5=function(t){t.forEach(n=>et(this,We,"m",zp).call(this,n,!1))},Tp=function e(t,n=!0){if(Bh(t))return;if(Ue(t))return et(this,We,"m",d5).call(this,t);if(!Yn(t))return;const s=t;if(!(!n&&Hs(s))){!n&&Da(s)&&this.dynamicAnchors.push(s);for(const r of Tt(s))et(this,We,"m",e).call(this,s[r],!1)}},zp=function e(t,n=!0){if(Bh(t))return;if(Ue(t))return et(this,We,"m",f5).call(this,t);if(!Yn(t))return;const s=t;if(!(!n&&Hs(s))){!n&&Da(s)&&this.dynamicAnchors.pop();for(const r of Tt(s))et(this,We,"m",e).call(this,s[r],!1)}},Um=function(t){this.ids.push(t);const n=this.pendingResource;this.pendingResource=!1,n&&this.resourceIds.push(t),et(this,We,"m",Tp).call(this,t,!0)},Fm=function(t){this.ids.pop(),this.resourceIds.length>0&&oe(this.resourceIds[this.resourceIds.length-1],t)&&this.resourceIds.pop(),et(this,We,"m",zp).call(this,t,!0)},h5=function(t,n){et(this,We,"m",Um).call(this,n),this.resolvedResources.set(t,n)},f$=function(t){if(!this.resolvedResources.has(t))return;const n=this.resolvedResources.get(t);et(this,We,"m",Fm).call(this,n),this.resolvedResources.delete(t)};function _X(...e){const[t,n,s]=B9(e,{3:(a,l,c)=>[a,l,c],2:(a,l)=>[{},a,l]}),r=new IX(t,n),i=new Kl;return jt(r,i,n,s)}function Qd(...e){const[t,n,s]=B9(e,{3:(r,i,a)=>[r,i,a],2:(r,i)=>[{},r,i]});return _X(t,n,s)}BigInt(Number.MAX_SAFE_INTEGER);BigInt(Number.MIN_SAFE_INTEGER);const OX=wn({type:Fn("insert"),path:an(),value:Ak()}),DX=Object({type:Fn("update"),path:an(),value:Ak()}),LX=wn({type:Fn("delete"),path:an()});Ux([OX,DX,LX]);const BX=wn({text:an({minLength:1}),status:Ux([Fn("pending"),Fn("in_progress"),Fn("completed")])}),qX=wn({items:Ja(BX)}),HX=wn({label:an({minLength:1}),description:Cr(an())}),PX=wn({question:an({minLength:1}),header:an({minLength:1,maxLength:16}),options:Ja(HX,{minItems:2,maxItems:4}),multiSelect:Cr(VG())}),UX=wn({selected:Ja(an()),other:Cr(an())}),FX=Ux([wn({outcome:Fn("answered"),answers:Ja(UX),at:Jo()}),wn({outcome:Fn("dismissed"),at:Jo()}),wn({outcome:Fn("cancelled"),at:Jo()})]),GX=wn({id:an({minLength:1}),questions:Ja(PX,{minItems:1,maxItems:4}),askedAt:Jo(),resolution:Cr(FX)}),VX=wn({requests:Ja(GX)}),WX=wn({patch:an()}),KX=wn({id:Cr(Jo()),name:an(),args:an(),status:Ux([Fn("running"),Fn("ok"),Fn("error"),Fn("cancelled")]),durationMs:Cr(Jo()),error:Cr(an()),details:Cr(Ak())}),XX=wn({code:Cr(an()),calls:Ja(KX)});function Wx(e,t){return e==="pinomad.todo"&&Qd(qX,t)?{type:"pinomad.todo",value:t}:e==="pinomad.question"&&Qd(VX,t)?{type:"pinomad.question",value:t}:e==="pinomad.diff"&&Qd(WX,t)?{type:"pinomad.diff",value:t}:e==="pinomad.codemode"&&Qd(XX,t)?{type:"pinomad.codemode",value:t}:{type:"fallback",value:t}}function ZX(e){return e.flatMap(t=>{const n=Wx(t.presentation,t.value);return n.type!=="pinomad.question"?[]:n.value.requests.filter(s=>s.resolution===void 0).map(s=>({kind:t.kind,request:s}))})}function YX(e,t,n){return Array.from({length:e},(s,r)=>({selected:t[r]??[],...n[r]===void 0||n[r].trim()===""?{}:{other:n[r]}}))}const QX={border:"1px solid var(--color-border-primary, var(--color-background-muted))",borderRadius:"var(--radius-md, 8px)",padding:"var(--space-3, 12px)",backgroundColor:"var(--color-background-surface)"};function h$({docs:e,remote:t,connected:n,target:s}){const r=ZX(e);return r.length===0?null:o.jsx(fe,{gap:2,padding:2,"data-testid":"pending-questions",children:r.map(({kind:i,request:a})=>o.jsx(JX,{kind:i,request:a,remote:t,connected:n,target:s},a.id))})}function JX({kind:e,request:t,remote:n,connected:s,target:r}){const[i,a]=x.useState(()=>t.questions.map(()=>[])),[l,c]=x.useState(()=>t.questions.map(()=>"")),u=(h,p)=>a(m=>m.map((b,y)=>y===h?p:b)),d=(h,p)=>c(m=>m.map((b,y)=>y===h?p:b)),f=()=>{const h=YX(t.questions.length,i,l);n.controller.answer(e,t.id,h,r)};return o.jsxs(fe,{gap:3,style:QX,children:[o.jsx(ee,{type:"label",weight:"semibold",children:"The agent asks"}),t.questions.map((h,p)=>{var m;return o.jsxs(fe,{gap:1,children:[o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(vn,{label:h.header,size:"sm"}),o.jsx(ee,{type:"body",children:h.question})]}),h.multiSelect===!0?o.jsx(W0,{label:h.header,isLabelHidden:!0,value:i[p]??[],onChange:b=>u(p,b),children:h.options.map(b=>o.jsx(K0,{label:b.label,value:b.label,...b.description===void 0?{}:{description:b.description}},b.label))}):o.jsx(o6,{label:h.header,isLabelHidden:!0,value:((m=i[p])==null?void 0:m[0])??"",onChange:b=>u(p,[b]),children:h.options.map(b=>o.jsx(l6,{label:b.label,value:b.label,...b.description===void 0?{}:{description:b.description}},b.label))}),o.jsx(xs,{label:"Other",value:l[p]??"",onChange:b=>d(p,b),placeholder:"Type a custom answer…"})]},p)}),o.jsx(we,{hAlign:"end",children:o.jsx(re,{label:"Submit",variant:"primary",isDisabled:!s,onClick:f})})]})}const eZ=e=>({id:e.name,label:e.name,auxiliaryData:{description:e.description}});function _k(e){const t=(e==null?void 0:e.roles)??[];return x.useMemo(()=>{if(t.length===0)return;const n=t.map(eZ);return[{character:"@",searchSource:{bootstrap:()=>n,search:r=>{const i=r.toLowerCase();return n.filter(a=>a.id.includes(i))}},menuLabel:"Named agents",emptySearchResultsText:"No matching agents",renderItem:r=>{var a;const i=(a=r.auxiliaryData)==null?void 0:a.description;return o.jsxs("span",{className:"flex min-w-0 flex-col",children:[o.jsx("span",{className:"truncate",children:r.id}),i===void 0?null:o.jsx("span",{className:"truncate text-xs text-muted",children:i})]})},onSelect:r=>`@${r.id} `}]},[t])}function x5(e){return(e==null?void 0:e.querySelector('[aria-multiline="true"]'))??null}function tZ({disabled:e=!1,placeholder:t,inputRef:n,onSubmitRequest:s,value:r,onValueChange:i,onFiles:a,triggers:l}){const c=x.useRef(null),u=x.useRef(null);x.useEffect(()=>{if(n)return n.current={focus:()=>{var f;return(f=u.current)==null?void 0:f.focus()},focusAtEnd:()=>{const f=x5(c.current);if(!f)return;f.focus();const h=window.getSelection();if(!h)return;const p=document.createRange();p.selectNodeContents(f),p.collapse(!1),h.removeAllRanges(),h.addRange(p)}},()=>{n.current=null}},[n]),x.useEffect(()=>{const f=x5(c.current);f&&(t?f.setAttribute("aria-placeholder",t):f.removeAttribute("aria-placeholder"),e?f.setAttribute("aria-disabled","true"):f.removeAttribute("aria-disabled"))},[t,e]);const d=f=>{f.nativeEvent.isComposing||f.nativeEvent.keyCode===229||f.key==="Enter"&&(f.shiftKey||(f.preventDefault(),s()))};return o.jsx(F0,{ref:c,className:"prompt-input__input",handleRef:u,hasHistory:!1,isDisabled:e,label:"Prompt",pasteAsToken:!1,placeholder:t,value:r,onChange:f=>i==null?void 0:i(f),onKeyDown:d,...a===void 0?{}:{onFiles:a},...l===void 0?{}:{triggers:[...l]}})}function Ok({value:e,status:t="ready",className:n="",placeholder:s,inputRef:r,isDisabled:i=!1,attachments:a,hasAttachments:l,onFiles:c,triggers:u,startActions:d,endActions:f,footer:h,error:p,accent:m,accentFocusRing:b=!1,onSubmit:y,onStop:g,onValueChange:k,...v}){const j=(t==="streaming"||t==="submitted")&&!e.trim()&&l!==!0&&!!g,$=!!e.trim()||l===!0,C=()=>{$&&(y==null||y())},E=S=>{c===void 0||!S.dataTransfer.types.includes("Files")||S.preventDefault()},T=S=>{if(c===void 0||!S.dataTransfer.types.includes("Files"))return;S.preventDefault();const N=[...S.dataTransfer.files];N.length>0&&c(N)};return o.jsxs("div",{className:`prompt-input ${n}`.trim(),"data-accent":m,"data-accent-focus":m&&b?"":void 0,"data-slot":"prompt-input","data-status":t,onDragOver:E,onDrop:T,...v,children:[o.jsx(_4,{elevation:"low",...a===void 0?{}:{drawer:o.jsx(O4,{children:a})},footerActions:d,input:o.jsx(tZ,{disabled:i,inputRef:r,placeholder:s,value:e,onValueChange:k,onSubmitRequest:C,onFiles:c,triggers:u}),isStopShown:j&&!i,placeholder:s,sendActions:f,sendButton:o.jsx(G0,{className:"pigui-pressable",isDisabled:i||!j&&!$,onSend:C}),status:p?{type:"error",message:p}:void 0,value:e,onChange:S=>k==null?void 0:k(S),onStop:g,onSubmit:C}),h?o.jsx("div",{className:"prompt-input__footer","data-slot":"prompt-input-footer",children:h}):null]})}const nZ=["path","file_path","filePath","command","cmd","query","pattern","url","name","description","task"],p5=120;function sZ(e){if(!(typeof e!="object"||e===null))for(const t of nZ){const n=e[t];if(typeof n=="string"&&n.length>0)return n.length>p5?`${n.slice(0,p5)}…`:n}}function $a(e){if(!(e!=null&&e.startsWith("mcp__")))return e;const t=e.slice(5),n=t.indexOf("__");return n===-1?t:`${t.slice(0,n)}/${t.slice(n+2)}`}function Dk(e){if(!e)return;let t;try{t=JSON.parse(e)}catch{return}return sZ(t)}function x$(e){if(!(e===void 0||!Number.isFinite(e)||e<0))return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}const rZ={bash:"shell",shell:"shell",sh:"shell",terminal:"shell",cmd:"shell",grep:"search",find:"search",glob:"search",ls:"search",search:"search",web_search:"web",websearch:"web",webfetch:"web",web_fetch:"web",web:"web",browser:"web",read:"file",read_file:"file",cat:"file",edit:"edit",write:"edit",write_file:"edit",str_replace:"edit"};function p$(e){return(e??"").trim().toLowerCase().replace(/-/g,"_")}function qh(e){return rZ[p$(e)]??"tool"}function iZ(e){const t=new Set(e.map(n=>qh(n.toolName)));return t.size===1?[...t][0]:"tool"}const aZ=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/,oZ=/^\+\s*\d+ /,lZ=/^-\s*\d+ /;function cZ(e){let t=0,n=0,s=0,r=0,i=!1;for(const a of e.split(`
381
- `)){const l=aZ.exec(a);if(l){s=Number.parseInt(l[2]??"1",10),r=Number.parseInt(l[4]??"1",10),i=!0;continue}if(!i)continue;if(s===0&&r===0){i=!1;continue}const c=a.charAt(0);c===" "?(s-=1,r-=1):c==="-"?(s-=1,n+=1):c==="+"&&(r-=1,t+=1)}return{additions:t,deletions:n}}function uZ(e){let t=0,n=0;for(const s of e.split(`
382
- `))oZ.test(s)?t+=1:lZ.test(s)&&(n+=1);return{additions:t,deletions:n}}function dZ(e){let t=e;if(typeof t=="string")try{t=JSON.parse(t)}catch{return}if(typeof t!="object"||t===null)return;const n=t.details;if(typeof n!="object"||n===null)return;const{patch:s,diff:r}=n,i=typeof s=="string"?cZ(s):typeof r=="string"?uZ(r):void 0;return i!==void 0&&(i.additions>0||i.deletions>0)?i:void 0}function Lk(e){return e.pinomad}function g$(e){return typeof e=="string"?e:e.flatMap(t=>t.type==="text"&&t.text!==void 0?[t.text]:[]).join("")}function m$(e){return typeof e=="string"?[]:e.flatMap(t=>t.type==="image"&&t.data!==void 0&&t.mimeType!==void 0?[{data:t.data,mimeType:t.mimeType}]:[])}const el=e=>e.type==="toolCall"&&e.id!==void 0;function fZ(e,t){if(e!==void 0){if(t==="codemode"&&typeof e=="object"&&e!==null){const n=e.code;if(typeof n=="string")return n}return JSON.stringify(e)}}function hZ(e){if(typeof e!="object"||e===null)return;const t=e.conversationId;return typeof t=="number"?t:void 0}function xZ(e,t){const n=e.status==="ok"?"output-available":(e.status==="error","output-error"),s=e.status==="error"?e.error:n==="output-error"?"Cancelled":void 0,r=e.details===void 0?void 0:Wx(t[e.name],e.details),i=(r==null?void 0:r.type)==="pinomad.diff"?{kind:"diff",patch:r.value.patch}:void 0;return{state:n,toolName:e.name,argsText:e.args,...s===void 0?{}:{output:s},...e.durationMs===void 0?{}:{durationMs:e.durationMs},...i===void 0?{}:{pinomad:i}}}function pZ(e){const t=e.summary;return{state:e.status!=="done"?"input-available":t===void 0||t.isError?"output-error":"output-available",toolCallId:e.callId,toolName:e.name,argsText:JSON.stringify(e.arguments),...(t==null?void 0:t.error)===void 0?{}:{output:t.error},...(t==null?void 0:t.durationMs)===void 0?{}:{durationMs:t.durationMs}}}function gZ(e,t,n,s,r){const i=e.id,a=t.results.get(i),l=t.partial?void 0:n.get(i),c=(l==null?void 0:l.name)??e.name,u=fZ(e.arguments,c);let d,f;a!==void 0?(d=a.isError===!0?"output-error":"output-available",f=g$(a.content)):(l==null?void 0:l.status)==="running"?(d="input-available",f=l.output):t.partial===!0?d="input-streaming":t.msg.stopReason!=="toolUse"?(d="output-error",f="Not run: the answer was interrupted."):(d="input-available",f=l==null?void 0:l.output);const h=(a==null?void 0:a.details)??(l==null?void 0:l.details),p=h===void 0?void 0:Wx(r[c??""],h),m=a!==void 0&&a.isError!==!0?dZ({details:a.details}):void 0,b=a===void 0?[]:m$(a.content),y=hZ(h);let g,k;if((p==null?void 0:p.type)==="pinomad.diff")g={kind:"diff",patch:p.value.patch};else if(y!==void 0){const v=h;g={kind:"subagent",conversationId:y,...f===void 0?{}:{output:f},...typeof v.model=="string"?{model:v.model}:{},...typeof v.startedAt=="number"?{startedAt:v.startedAt}:{},...typeof(a==null?void 0:a.timestamp)=="number"?{endedAt:a.timestamp}:{}}}return c==="codemode"&&a===void 0?k=(s.get(i)??[]).map(pZ):(p==null?void 0:p.type)==="pinomad.codemode"&&(k=p.value.calls.map(v=>xZ(v,r))),{state:d,toolCallId:i,...c===void 0?{}:{toolName:c},...u===void 0?{}:{argsText:u},...f===void 0?{}:{output:f},...m===void 0?{}:{diffStat:m},...b.length===0?{}:{images:b},...k===void 0||k.length===0?{}:{children:k},...g===void 0?{}:{pinomad:g}}}function mZ(e){const t=[];for(const n of e)if(el(n)){const s=t[t.length-1];(s==null?void 0:s.kind)==="tools"?s.blocks.push(n):t.push({kind:"tools",blocks:[n]})}else n.type==="thinking"?t.push({kind:"thinking",block:n}):n.type==="text"&&t.push({kind:"text",block:n});return t}function yZ(e,t,n,s,r){var N,z,M;const i=new Map(((N=s?n.tools:void 0)==null?void 0:N.map(R=>[R.callId,R]))??[]),a=new Map;if(s)for(const R of n.nestedTools??[]){if(R.name.startsWith("pi."))continue;const I=a.get(R.parentCallId);I===void 0?a.set(R.parentCallId,[R]):I.push(R)}const l=s?(z=n.generation)==null?void 0:z.message:void 0,c=new Map,u=[...t.assistants.map(({id:R,msg:I,results:A})=>({id:R,msg:I,results:A})),...l===void 0?[]:[{id:"live",msg:l,partial:!0,results:c}]],d=u[u.length-1],f=t.assistants[t.assistants.length-1],h=!s,m=(d===void 0?[]:d.msg.content.filter(R=>R.type==="text")).map(R=>R.text??"").join(""),b=(d==null?void 0:d.msg.content.some(el))===!0,y=m!==""&&(h||!b),g=(R,I)=>el(I)&&!R.results.has(I.id)&&(R.partial===!0||R.msg.stopReason==="toolUse"),k=u.some(R=>R.msg.content.some(I=>g(R,I))),v=d==null?void 0:d.msg.content[d.msg.content.length-1];let w;h?w="settled":y?w="answering":k||v!==void 0&&el(v)?w="acting":u.length>0?w="thinking":w="hidden";const j=w==="thinking"||w==="acting",$=[];for(const R of u){const I=R===d,A=R.msg.content;mZ(A).forEach((_,O)=>{if(_.kind==="tools"){const L=_.blocks.filter(F=>g(R,F)),q=j&&L.length>0;$.push({kind:"tools",id:`${R.id}-tools-${O}`,tools:_.blocks.map(F=>gZ(F,R,i,a,r)),live:q,...q&&L[0]!==void 0?{activeToolCallId:L[0].id}:{}});return}if(_.kind==="text"){I&&y||$.push({kind:"interim",id:`${R.id}-text-${O}`,text:_.block.text??""});return}const D=A.indexOf(_.block);$.push({kind:"thinking",id:`${R.id}-thinking-${O}`,text:_.block.thinking??"",live:j&&R.partial===!0&&D===A.length-1})})}const C=(f==null?void 0:f.msg.stopReason)==="aborted",E=h&&(f==null?void 0:f.msg.stopReason)==="error",T=(M=u[0])==null?void 0:M.msg.timestamp;let S;if(h&&T!==void 0){const R=y?d==null?void 0:d.msg.timestamp:t.lastTs??(d==null?void 0:d.msg.timestamp);S=R===void 0?void 0:R-T}return{kind:"run",id:e,cot:{phase:w,...E===!0?{outcome:"failed"}:{},...T===void 0?{}:{anchorMs:T},...S===void 0?{}:{elapsedMs:S},steps:$,...y?{answer:{text:m,streaming:(d==null?void 0:d.partial)===!0}}:{}},interrupted:C,...h&&!C&&E!==!0&&f!==void 0?{forkEntryId:f.id}:{},...E===!0?{failure:(f==null?void 0:f.msg.errorMessage)??"The run failed."}:{}}}function kZ(e,t,n){var c;const s=[],r=e.docs["pi.live"]??{};let i,a=0;const l=u=>{var d;if(i!==void 0){if(i.assistants.length>0||i.orphans.size>0||u){const f=((d=i.assistants[0])==null?void 0:d.id)??`open-${a++}`;s.push(yZ(`run-${f}`,i,r,u,t))}i=void 0}};for(const u of e.entries){const d=(c=u.model)==null?void 0:c[0],f=String(u.id);if(u.kind==="pi.user"&&(d==null?void 0:d.role)==="user")l(!1),s.push({kind:"user",id:f,text:g$(d.content),images:m$(d.content)});else if(u.kind==="pi.compaction")l(!1),s.push({kind:"compaction",id:f});else if(u.kind==="pi.reset")l(!1),s.push({kind:"reset",id:f});else if(u.kind==="pi.assistant"&&(d==null?void 0:d.role)==="assistant"){i??(i={assistants:[],orphans:new Map});const h=new Map;for(const p of d.content){if(!el(p))continue;const m=i.orphans.get(p.id);m!==void 0&&(i.orphans.delete(p.id),h.set(p.id,m))}i.assistants.push({id:f,msg:d,results:h}),i.lastTs=d.timestamp??i.lastTs}else if(u.kind==="pi.tool-result"&&(d==null?void 0:d.role)==="toolResult"&&d.toolCallId!==void 0){i??(i={assistants:[],orphans:new Map});const h=i.assistants.findLast(p=>!p.results.has(d.toolCallId)&&p.msg.content.some(m=>el(m)&&m.id===d.toolCallId));h===void 0?i.orphans.set(d.toolCallId,d):h.results.set(d.toolCallId,d),i.lastTs=d.timestamp??i.lastTs}}return i??(i=n?{assistants:[],orphans:new Map}:void 0),l(n),s}function bZ(e){const t=e[e.length-1];if(!((t==null?void 0:t.kind)!=="run"||t.failure===void 0))for(let n=e.length-2;n>=0;n--){const s=e[n];if(s.kind!=="compaction")return s.kind!=="user"||s.text.trim()===""&&s.images.length===0?void 0:{text:s.text,images:s.images,requestId:`retry:${t.id}`}}}function vZ(e){const t=[],n=[];for(const s of e.steps){if(s.kind!=="tools"){n.push(s);continue}const r=[];if(s.tools.forEach((i,a)=>{if(i.toolName!=="subagent"){r.push(i);return}t.push({key:`${s.id}/${i.toolCallId??a}`,tool:i})}),r.length!==0)if(s.activeToolCallId!==void 0&&!r.some(i=>i.toolCallId===s.activeToolCallId)){const i=r.find(a=>a.state==="input-streaming"||a.state==="input-available");if(i===void 0){const{activeToolCallId:a,...l}=s;n.push({...l,tools:r,live:!1})}else n.push({...s,tools:r,...i.toolCallId===void 0?{}:{activeToolCallId:i.toolCallId}})}else n.push({...s,tools:r})}return{view:{...e,steps:n},subagents:t}}const g5={};function Yu(e,t){const n=x.useRef(g5);return n.current===g5&&(n.current=e(t)),n}const Ap=G5[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],wZ=Ap&&Ap!==x.useLayoutEffect?Ap:e=>e();function La(e){const t=Yu(jZ).current;return t.next=e,wZ(t.effect),t.trampoline}function jZ(){const e={next:void 0,callback:SZ,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function SZ(){}function Bk(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(s=>n.searchParams.append("args[]",s)),`Base UI error #${e}; visit ${n} for the full message.`}function Gm(e,t,n,s){const r=Yu(y$).current;return CZ(r,e,t,n,s)&&k$(r,[e,t,n,s]),r.callback}function $Z(e){const t=Yu(y$).current;return EZ(t,e)&&k$(t,e),t.callback}function y$(){return{callback:null,cleanup:null,refs:[]}}function CZ(e,t,n,s,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==s||e.refs[3]!==r}function EZ(e,t){return e.refs.length!==t.length||e.refs.some((n,s)=>n!==t[s])}function k$(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const s=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){const i=t[r];if(i!=null)switch(typeof i){case"function":{const a=i(n);typeof a=="function"&&(s[r]=a);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){const i=t[r];if(i!=null)switch(typeof i){case"function":{const a=s[r];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}}}}}}}const TZ=parseInt(x.version,10);function zZ(e){return TZ>=e}function m5(e){if(!x.isValidElement(e))return null;const t=e,n=t.props;return(zZ(19)?n==null?void 0:n.ref:t.ref)??null}function Vm(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function AZ(e,t){const n={};for(const s in e){const r=e[s];if(t!=null&&t.hasOwnProperty(s)){const i=t[s](r);i!=null&&Object.assign(n,i);continue}r===!0?n[`data-${s.toLowerCase()}`]="":r&&(n[`data-${s.toLowerCase()}`]=r.toString())}return n}function NZ(e,t){return typeof e=="function"?e(t):e}function MZ(e,t){return typeof e=="function"?e(t):e}const Uc={};function b$(e,t,n,s,r){let i={...Wm(e,Uc)};return t&&(i=Mf(i,t)),n&&(i=Mf(i,n)),s&&(i=Mf(i,s)),i}function RZ(e){if(e.length===0)return Uc;if(e.length===1)return Wm(e[0],Uc);let t={...Wm(e[0],Uc)};for(let n=1;n<e.length;n+=1)t=Mf(t,e[n]);return t}function Mf(e,t){return v$(t)?t(e):IZ(e,t)}function IZ(e,t){if(!t)return e;for(const n in t){const s=t[n];switch(n){case"style":{e[n]=Vm(e.style,s);break}case"className":{e[n]=w$(e.className,s);break}default:_Z(n,s)?e[n]=OZ(e[n],s):e[n]=s}}return e}function _Z(e,t){const n=e.charCodeAt(0),s=e.charCodeAt(1),r=e.charCodeAt(2);return n===111&&s===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function v$(e){return typeof e=="function"}function Wm(e,t){return v$(e)?e(t):e??Uc}function OZ(e,t){return t?e?n=>{if(DZ(n)){const r=n;Km(r);const i=t(r);return r.baseUIHandlerPrevented||e==null||e(r),i}const s=t(n);return e==null||e(n),s}:t:e}function Km(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function w$(e,t){return t?e?t+" "+e:t:e}function DZ(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}const sa=Object.freeze({});function qk(e,t,n={}){const s=t.render,r=LZ(t,n);if(n.enabled===!1)return null;const i=n.state??sa;return BZ(e,s,r,i)}function LZ(e,t={}){const{className:n,style:s,render:r}=e,{state:i=sa,ref:a,props:l,stateAttributesMapping:c,enabled:u=!0}=t,d=u?NZ(n,i):void 0,f=u?MZ(s,i):void 0,h=u?AZ(i,c):sa,p=u?Vm(h,Array.isArray(l)?RZ(l):l)??sa:sa;return typeof document<"u"&&(u?Array.isArray(a)?p.ref=$Z([p.ref,m5(r),...a]):p.ref=Gm(p.ref,m5(r),a):Gm(null,null)),u?(d!==void 0&&(p.className=w$(p.className,d)),f!==void 0&&(p.style=Vm(p.style,f)),p):sa}function BZ(e,t,n,s){if(t){if(typeof t=="function")return t(n,s);const r=b$(n,t.props);return r.ref=n.ref,x.cloneElement(t,r)}if(e&&typeof e=="string")return qZ(e,n);throw new Error(Bk(8))}function qZ(e,t){return e==="button"?x.createElement("button",{type:"button",...t,key:t.key}):e==="img"?x.createElement("img",{alt:"",...t,key:t.key}):x.createElement(e,t)}function HZ({controlled:e,default:t,name:n,state:s="value"}){const{current:r}=x.useRef(e!==void 0),[i,a]=x.useState(t),l=r?e:i,c=x.useCallback(u=>{r||a(u)},[]);return[l,c]}const PZ=()=>{},Gn=typeof document<"u"?x.useLayoutEffect:PZ,UZ={...G5};let y5=0;function FZ(e,t="mui"){const[n,s]=x.useState(e),r=e||n;return x.useEffect(()=>{n==null&&(y5+=1,s(`${t}-${y5}`))},[n,t]),r}const k5=UZ.useId;function GZ(e,t){if(k5!==void 0){const n=k5();return`${t}-${n}`}return FZ(e,t)}function VZ(e){return GZ(e,"base-ui")}const WZ="none",KZ="trigger-press";function j$(e,t,n,s){let r=!1,i=!1;const a=sa;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){i=!0},get isCanceled(){return r},get isPropagationAllowed(){return i},trigger:n,...a}}const XZ=[];function S$(e){x.useEffect(e,XZ)}const Jd=null;class ZZ{constructor(){te(this,"callbacks",[]);te(this,"callbacksCount",0);te(this,"nextId",1);te(this,"startId",1);te(this,"isScheduled",!1);te(this,"tick",t=>{var r;this.isScheduled=!1;const n=this.callbacks,s=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,s>0)for(let i=0;i<n.length;i+=1)(r=n[i])==null||r.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const ef=new ZZ;class gt{constructor(){te(this,"currentId",Jd);te(this,"cancel",()=>{this.currentId!==Jd&&(ef.cancel(this.currentId),this.currentId=Jd)});te(this,"disposeEffect",()=>this.cancel)}static create(){return new gt}static request(t){return ef.request(t)}static cancel(t){return ef.cancel(t)}request(t){this.cancel(),this.currentId=ef.request(()=>{this.currentId=Jd,t()})}}function $$(){const e=Yu(gt.create).current;return S$(e.disposeEffect),e}function YZ(e){return e==null?e:"current"in e?e.current:e}function C$(e,t=!1,n=!0){const s=$$();return La((r,i=null)=>{s.cancel();const a=YZ(e);a!=null&&(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?r():s.request(()=>{function l(){a&&Promise.all(a.getAnimations().map(c=>c.finished)).then(()=>{i!=null&&i.aborted||Zc.flushSync(r)}).catch(()=>{if(n){if(i!=null&&i.aborted)return;Zc.flushSync(r)}else a.getAnimations().length>0&&a.getAnimations().some(c=>c.pending||c.playState!=="finished")&&l()})}t?s.request(l):l()}))})}function QZ(e,t=!1,n=!1){const[s,r]=x.useState(e&&t?"idle":void 0),[i,a]=x.useState(e);return e&&!i&&(a(!0),r("starting")),!e&&i&&s!=="ending"&&!n&&r("ending"),!e&&!i&&s==="ending"&&r(void 0),Gn(()=>{if(!e&&i&&s!=="ending"&&n){const l=gt.request(()=>{r("ending")});return()=>{gt.cancel(l)}}},[e,i,s,n]),Gn(()=>{if(!e||t)return;const l=gt.request(()=>{Zc.flushSync(()=>{r(void 0)})});return()=>{gt.cancel(l)}},[t,e]),Gn(()=>{if(!e||!t)return;e&&i&&s!=="idle"&&r("starting");const l=gt.request(()=>{r("idle")});return()=>{gt.cancel(l)}},[t,e,i,r,s]),x.useMemo(()=>({mounted:i,setMounted:a,transitionStatus:s}),[i,s])}function JZ(e){const{open:t,defaultOpen:n,onOpenChange:s,disabled:r}=e,i=t!==void 0,[a,l]=HZ({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:c,setMounted:u,transitionStatus:d}=QZ(a,!0,!0),[f,h]=x.useState(a),[{height:p,width:m},b]=x.useState({height:void 0,width:void 0}),y=VZ(),[g,k]=x.useState(),v=g??y,[w,j]=x.useState(!1),[$,C]=x.useState(!1),E=x.useRef(null),T=x.useRef(null),S=x.useRef(null),N=x.useRef(null),z=C$(N,!1),M=La(R=>{const I=!a,A=j$(KZ,R.nativeEvent);if(s(I,A),A.isCanceled)return;const _=N.current;T.current==="css-animation"&&_!=null&&_.style.removeProperty("animation-name"),!w&&!$&&(T.current!=null&&T.current!=="css-animation"&&!c&&I&&u(!0),T.current==="css-animation"&&(!f&&I&&h(!0),!c&&I&&u(!0))),l(I),T.current==="none"&&c&&!I&&u(!1)});return Gn(()=>{i&&T.current==="none"&&!$&&!a&&u(!1)},[i,$,a,t,u]),x.useMemo(()=>({abortControllerRef:E,animationTypeRef:T,disabled:r,handleTrigger:M,height:p,mounted:c,open:a,panelId:v,panelRef:N,runOnceAnimationsFinish:z,setDimensions:b,setHiddenUntilFound:j,setKeepMounted:C,setMounted:u,setOpen:l,setPanelIdState:k,setVisible:h,transitionDimensionRef:S,transitionStatus:d,visible:f,width:m}),[E,T,r,M,p,c,a,v,N,z,b,j,C,u,l,h,S,d,f,m])}const E$=x.createContext(void 0);function T$(){const e=x.useContext(E$);if(e===void 0)throw new Error(Bk(15));return e}let Hh=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const eY={[Hh.startingStyle]:""},tY={[Hh.endingStyle]:""},z$={transitionStatus(e){return e==="starting"?eY:e==="ending"?tY:null}};let Fc=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Hh.startingStyle]="startingStyle",e[e.endingStyle=Hh.endingStyle]="endingStyle",e}({}),nY=function(e){return e.panelOpen="data-panel-open",e}({});const sY={[Fc.open]:""},rY={[Fc.closed]:""},iY={open(e){return e?{[nY.panelOpen]:""}:null}},aY={open(e){return e?sY:rY}},A$={...aY,...z$},Hk=x.forwardRef(function(t,n){const{render:s,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:l,open:c,...u}=t,d=La(l),f=JZ({open:c,defaultOpen:i,onOpenChange:d,disabled:a}),h=x.useMemo(()=>({open:f.open,disabled:f.disabled,transitionStatus:f.transitionStatus}),[f.open,f.disabled,f.transitionStatus]),p=x.useMemo(()=>({...f,onOpenChange:d,state:h}),[f,d,h]),m=qk("div",t,{state:h,ref:n,props:u,stateAttributesMapping:A$});return o.jsx(E$.Provider,{value:p,children:m})});function oY(){return typeof window<"u"}function lY(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cY(e){return oY()?e instanceof HTMLElement||e instanceof lY(e).HTMLElement:!1}const uY=x.createContext(void 0);function dY(e=!1){const t=x.useContext(uY);if(t===void 0&&!e)throw new Error(Bk(16));return t}function fY(e){const{focusableWhenDisabled:t,disabled:n,composite:s=!1,tabIndex:r=0,isNativeButton:i}=e,a=s&&t!==!1,l=s&&t===!1;return{props:x.useMemo(()=>{const u={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return s||(u.tabIndex=r,!i&&n&&(u.tabIndex=t?r:-1)),(i&&(t||a)||!i&&n)&&(u["aria-disabled"]=n),i&&(!t||l)&&(u.disabled=n),u},[s,n,t,a,l,i,r])}}function hY(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:s=0,native:r=!0}=e,i=x.useRef(null),a=dY(!0)!==void 0,l=La(()=>{const h=i.current;return!!((h==null?void 0:h.tagName)==="A"&&(h!=null&&h.href))}),{props:c}=fY({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:s,isNativeButton:r}),u=x.useCallback(()=>{const h=i.current;xY(h)&&a&&t&&c.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,c.disabled,a]);Gn(u,[u]);const d=x.useCallback((h={})=>{const{onClick:p,onMouseDown:m,onKeyUp:b,onKeyDown:y,onPointerDown:g,...k}=h;return b$({type:r?"button":void 0,onClick(w){if(t){w.preventDefault();return}p==null||p(w)},onMouseDown(w){t||m==null||m(w)},onKeyDown(w){if(t||(Km(w),y==null||y(w)),w.baseUIHandlerPrevented)return;const j=w.target===w.currentTarget&&!r&&!l()&&!t,$=w.key==="Enter",C=w.key===" ";j&&((C||$)&&w.preventDefault(),$&&(p==null||p(w)))},onKeyUp(w){t||(Km(w),b==null||b(w)),!w.baseUIHandlerPrevented&&w.target===w.currentTarget&&!r&&!t&&w.key===" "&&(p==null||p(w))},onPointerDown(w){if(t){w.preventDefault();return}g==null||g(w)}},r?void 0:{role:"button"},c,k)},[t,c,r,l]),f=La(h=>{i.current=h,u()});return{getButtonProps:d,buttonRef:f}}function xY(e){return cY(e)&&e.tagName==="BUTTON"}const pY={...iY,...z$},Pk=x.forwardRef(function(t,n){const{panelId:s,open:r,handleTrigger:i,state:a,disabled:l}=T$(),{className:c,disabled:u=l,id:d,render:f,nativeButton:h=!0,...p}=t,{getButtonProps:m,buttonRef:b}=hY({disabled:u,focusableWhenDisabled:!0,native:h}),y=x.useMemo(()=>({"aria-controls":r?s:void 0,"aria-expanded":r,disabled:u,onClick:i}),[s,u,r,i]);return qk("button",t,{state:a,ref:[n,b],props:[y,p,m],stateAttributesMapping:pY})});let gY=function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e}({});function mY(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:s,height:r,hiddenUntilFound:i,keepMounted:a,id:l,mounted:c,onOpenChange:u,open:d,panelRef:f,runOnceAnimationsFinish:h,setDimensions:p,setMounted:m,setOpen:b,setVisible:y,transitionDimensionRef:g,visible:k,width:v}=e,w=x.useRef(!1),j=x.useRef(null),$=x.useRef(d),C=x.useRef(d),E=$$(),T=x.useMemo(()=>n.current==="css-animation"?!k:!d&&!c,[d,c,k,n]),S=La(z=>{if(!z)return;if(n.current==null||g.current==null){const I=getComputedStyle(z),A=I.animationName!=="none"&&I.animationName!=="",_=I.transitionDuration!=="0s"&&I.transitionDuration!=="";A&&_||(I.animationName==="none"&&I.transitionDuration!=="0s"?n.current="css-transition":I.animationName!=="none"&&I.transitionDuration==="0s"?n.current="css-animation":n.current="none"),z.getAttribute(gY.orientation)==="horizontal"||I.transitionProperty.indexOf("width")>-1?g.current="width":g.current="height"}if(n.current!=="css-transition")return;(r===void 0||v===void 0)&&(p({height:z.scrollHeight,width:z.scrollWidth}),C.current&&z.style.setProperty("transition-duration","0s"));let M=-1,R=-1;return M=gt.request(()=>{C.current=!1,R=gt.request(()=>{setTimeout(()=>{z.style.removeProperty("transition-duration")})})}),()=>{gt.cancel(M),gt.cancel(R)}}),N=Gm(s,f,S);return Gn(()=>{if(n.current!=="css-transition")return;const z=f.current;if(!z)return;let M=-1;if(t.current!=null&&(t.current.abort(),t.current=null),d){const R={"justify-content":z.style.justifyContent,"align-items":z.style.alignItems,"align-content":z.style.alignContent,"justify-items":z.style.justifyItems};Object.keys(R).forEach(I=>{z.style.setProperty(I,"initial","important")}),!C.current&&!a&&z.setAttribute(Fc.startingStyle,""),p({height:z.scrollHeight,width:z.scrollWidth}),M=gt.request(()=>{Object.entries(R).forEach(([I,A])=>{A===""?z.style.removeProperty(I):z.style.setProperty(I,A)})})}else{if(z.scrollHeight===0&&z.scrollWidth===0)return;p({height:z.scrollHeight,width:z.scrollWidth});const R=new AbortController;t.current=R;const I=R.signal;let A=null;const _=Fc.endingStyle;return A=new MutationObserver(O=>{O.some(L=>L.type==="attributes"&&L.attributeName===_)&&(A==null||A.disconnect(),A=null,h(()=>{p({height:0,width:0}),z.style.removeProperty("content-visibility"),m(!1),t.current===R&&(t.current=null)},I))}),A.observe(z,{attributes:!0,attributeFilter:[_]}),()=>{A==null||A.disconnect(),E.cancel(),t.current===R&&(R.abort(),t.current=null)}}return()=>{gt.cancel(M)}},[t,n,E,i,a,c,d,f,h,p,m]),Gn(()=>{if(n.current!=="css-animation")return;const z=f.current;z&&(j.current=z.style.animationName||j.current,z.style.setProperty("animation-name","none"),p({height:z.scrollHeight,width:z.scrollWidth}),!$.current&&!w.current&&z.style.removeProperty("animation-name"),d?(t.current!=null&&(t.current.abort(),t.current=null),m(!0),y(!0)):(t.current=new AbortController,h(()=>{m(!1),y(!1),t.current=null},t.current.signal)))},[t,n,d,f,h,p,m,y,k]),S$(()=>{const z=gt.request(()=>{$.current=!1});return()=>gt.cancel(z)}),Gn(()=>{if(!i)return;const z=f.current;if(!z)return;let M=-1,R=-1;return d&&w.current&&(z.style.transitionDuration="0s",p({height:z.scrollHeight,width:z.scrollWidth}),M=gt.request(()=>{w.current=!1,R=gt.request(()=>{setTimeout(()=>{z.style.removeProperty("transition-duration")})})})),()=>{gt.cancel(M),gt.cancel(R)}},[i,d,f,p]),Gn(()=>{const z=f.current;z&&i&&T&&(z.setAttribute("hidden","until-found"),n.current==="css-transition"&&z.setAttribute(Fc.startingStyle,""))},[i,T,n,f]),x.useEffect(function(){const M=f.current;if(!M)return;function R(I){w.current=!0,b(!0),u(!0,j$(WZ,I))}return M.addEventListener("beforematch",R),()=>{M.removeEventListener("beforematch",R)}},[u,f,b]),x.useMemo(()=>({props:{hidden:T,id:l,ref:N}}),[T,l,N])}let b5=function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e}({});function yY(e){const t=Yu(kY,e).current;return t.next=e,Gn(t.effect),t}function kY(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function bY(e){const{enabled:t=!0,open:n,ref:s,onComplete:r}=e,i=yY(n),a=La(r),l=C$(s,n);x.useEffect(()=>{t&&l(()=>{n===i.current&&a()})},[t,n,a,l,i])}const Uk=x.forwardRef(function(t,n){const{className:s,hiddenUntilFound:r,keepMounted:i,render:a,id:l,...c}=t,{abortControllerRef:u,animationTypeRef:d,height:f,mounted:h,onOpenChange:p,open:m,panelId:b,panelRef:y,runOnceAnimationsFinish:g,setDimensions:k,setHiddenUntilFound:v,setKeepMounted:w,setMounted:j,setPanelIdState:$,setOpen:C,setVisible:E,state:T,transitionDimensionRef:S,visible:N,width:z,transitionStatus:M}=T$(),R=r??!1,I=i??!1;Gn(()=>{if(l)return $(l),()=>{$(void 0)}},[l,$]),Gn(()=>{v(R)},[v,R]),Gn(()=>{w(I)},[w,I]);const{props:A}=mY({abortControllerRef:u,animationTypeRef:d,externalRef:n,height:f,hiddenUntilFound:R,id:b,keepMounted:I,mounted:h,onOpenChange:p,open:m,panelRef:y,runOnceAnimationsFinish:g,setDimensions:k,setMounted:j,setOpen:C,setVisible:E,transitionDimensionRef:S,visible:N,width:z});bY({open:m&&M==="idle",ref:y,onComplete(){m&&k({height:void 0,width:void 0})}});const _=x.useMemo(()=>({...T,transitionStatus:M}),[T,M]),O=qk("div",t,{state:_,ref:[n,y],props:[A,{style:{[b5.collapsiblePanelHeight]:f===void 0?"auto":`${f}px`,[b5.collapsiblePanelWidth]:z===void 0?"auto":`${z}px`}},c],stateAttributesMapping:A$});return I||R||!I&&h?O:null}),vY=860,wY=Array.from({length:9},(e,t)=>{const n=Math.floor(t/3);return(t%3+Math.abs(n-1))*90});function jY({className:e="",periodMs:t=vY,style:n,...s}){return o.jsx("span",{"aria-hidden":"true",className:`chat-pixel-loader ${e}`.trim(),"data-slot":"chat-pixel-loader",style:{"--chat-pixel-period":`${t}ms`,...n},...s,children:wY.map((r,i)=>o.jsx("span",{className:"chat-pixel-loader__cell",style:{animationDelay:`${r}ms`}},i))})}function Kx({children:e,className:t="",tone:n="default",...s}){const r=n==="brand"?" text-shimmer--brand":"";return o.jsx("span",{className:`text-shimmer${r} ${t}`.trim(),"data-slot":"text-shimmer","data-tone":n,...s,children:e})}function SY(e){const t=Math.max(0,e)/1e3;return t<60?`${t.toFixed(1)}s`:`${Math.floor(t/60)}m ${(t%60).toFixed(1)}s`}const $Y=["Thinking","Pondering","Mulling","Reasoning","Exploring","Connecting dots","Weighing options","Sketching a plan"],CY=["Working","Digging in","Checking","Poking around","Running things","Reading the room","Following the trail"],EY=4e3;function TY(e,t){const n=e==="thinking"?$Y:CY,r=Math.floor(Math.max(0,t)/EY)*1103515245+12345>>>0;return n[r%n.length]}function zY({className:e="",elapsedMs:t,phase:n,...s}){return o.jsxs("p",{className:`chat-status-line ${e}`.trim(),"data-slot":"chat-status-line",role:"status",...s,children:[o.jsx(jY,{}),o.jsxs(Kx,{className:"chat-status-line__word",children:[TY(n,t??0),"…"]}),t===void 0?null:o.jsx("span",{className:"chat-status-line__clock",children:SY(t)})]})}function AY(e){if(e===void 0||!Number.isFinite(e)||e<0)return"Worked";const t=Math.max(1,Math.round(e/1e3));if(t<60)return`Worked for ${t}s`;if(t<3600){const i=Math.floor(t/60),a=t%60;return`Worked for ${i}m ${a}s`}const n=Math.floor(t/3600),s=Math.floor(t%3600/60),r=t%60;return`Worked for ${n}h ${s}m ${r}s`}function NY(e,t){const[n,s]=x.useState(()=>Date.now());if(x.useEffect(()=>{if(!t)return;const r=window.setInterval(()=>s(Date.now()),100);return()=>window.clearInterval(r)},[t]),e!==void 0)return Math.max(0,n-e)}function Gc({children:e,className:t="",defaultOpen:n=!1,elapsedMs:s,hasSteps:r=!0,phase:i,outcome:a,startedAtMs:l,...c}){const[u,d]=x.useState(n),f=i==="thinking"||i==="acting",h=NY(l,f&&s===void 0);if(i==="hidden")return null;const p=i==="settled",m=AY(s),b=a==="failed"?m.replace("Worked for","Failed after").replace("Worked","Failed"):m;return o.jsxs("div",{className:`chain-of-thought ${t}`.trim(),"data-phase":i,"data-slot":"chain-of-thought",...c,children:[o.jsxs(Hk,{open:p?u:!0,onOpenChange:d,children:[p?r?o.jsxs(Pk,{className:"chain-of-thought__trigger","data-slot":"chain-of-thought-trigger",children:[b,o.jsx(Ai,{"aria-hidden":"true",className:"chat-step__chevron"})]}):o.jsx("p",{className:"chain-of-thought__label","data-slot":"chain-of-thought-label",children:b}):null,o.jsx(Uk,{keepMounted:!0,className:"chain-of-thought__content","data-slot":"chain-of-thought-content",children:e})]}),f?o.jsx(zY,{elapsedMs:s??h,phase:i}):null]})}function MY({children:e,className:t="",...n}){return o.jsx("ol",{className:`chain-of-thought__steps ${t}`.trim(),"data-slot":"chain-of-thought-steps",...n,children:e})}function RY({children:e,className:t="",...n}){return o.jsx("li",{className:`chain-of-thought__step ${t}`.trim(),"data-slot":"chain-of-thought-step",...n,children:e})}Gc.Steps=MY;Gc.Step=RY;const Xm=x.createContext(!1);function IY(e){var l;if(!e||/^[#?]/.test(e)||e.startsWith("//")||e.includes("\\")||/^(mailto|tel|data|javascript):/i.test(e)||/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//.test(e))return null;const[t,n=""]=e.split("#",2),s=/:(\d+)(?::\d+)?$/.exec(t??""),r=s?t.slice(0,s.index):t??"";if(!r||r.endsWith("/"))return null;const i=Number(((l=/^L(\d+)(?:-L?\d+)?$/.exec(n))==null?void 0:l[1])??(s==null?void 0:s[1])),a=r.slice(r.lastIndexOf("/")+1);return{path:r,name:a,...Number.isSafeInteger(i)&&i>0?{line:i}:{}}}function _Y(e){return typeof e=="string"?e:Array.isArray(e)&&e.every(t=>typeof t=="string")?e.join(""):null}function OY({href:e,children:t}){const n=IY(e);if(!n){const i=/^https?:\/\//.test(e);return o.jsx(h6,{color:"accent",hasUnderline:!0,href:e,type:"inherit",...i?{target:"_blank",rel:"noopener noreferrer"}:{},children:o.jsx(Xm.Provider,{value:!0,children:t})})}const s=_Y(t),r=s!==null&&(s===e||s===n.path||n.line!==void 0&&s===`${n.path}:${n.line}`);return o.jsxs("a",{className:"chat-file-link","data-slot":"chat-file-link",href:e,title:n.line?`${n.path}:${n.line}`:n.path,children:[o.jsx(f7,{"aria-hidden":!0,className:"chat-file-link__icon"}),o.jsx(Xm.Provider,{value:!0,children:r?n.line?`${n.name}:${n.line}`:n.name:t})]})}const N$=3,M$=x.createContext(void 0);function R$({children:e}){const t=x.useContext(M$),n=x.useContext(Xm),s=o.jsx(_0,{className:"chat-inline-code","data-slot":"chat-inline-code",children:e}),r=typeof e=="string"?e.trim():e;return!n&&typeof r=="string"&&(t!=null&&t.has(r))?o.jsx("a",{href:r,className:"chat-inline-code-link","data-slot":"chat-inline-code-link",title:r,children:s}):s}const I$={inlineCode:R$},_$={inlineCode:R$,link:OY};function DY({children:e,fileLinks:t=!1,linkedInlineCode:n,className:s="",...r}){return o.jsx("div",{className:`chat-markdown ${s}`.trim(),"data-slot":"chat-markdown","data-testid":"markdown-renderer",...r,children:o.jsx(M$.Provider,{value:t?n:void 0,children:o.jsx(ny,{components:t?_$:I$,density:"compact",headingLevelStart:N$,children:e})})})}function LY({children:e,isStreaming:t=!1,fileLinks:n=!1,className:s="",...r}){return o.jsx("div",{className:`chat-markdown chat-markdown--stream ${s}`.trim(),"data-is-streaming":String(!!t),"data-slot":"chat-stream-markdown","data-testid":"stream-markdown-renderer",...r,children:o.jsx(ny,{components:n?_$:I$,density:"compact",headingLevelStart:N$,isStreaming:t,children:e})})}function BY({children:e,className:t="",...n}){return o.jsx(V0,{className:`chat-message ${t}`.trim(),"data-slot":"chat-message-user",sender:"user",...n,children:e})}function qY({children:e,className:t="",...n}){return o.jsx(V0,{className:`chat-message ${t}`.trim(),"data-slot":"chat-message-assistant",sender:"assistant",...n,children:e})}function HY({children:e,className:t="",...n}){return o.jsx(L4,{className:t||void 0,"data-slot":"chat-message-bubble",...n,children:e})}function PY({children:e,className:t="",...n}){return o.jsx("div",{className:`chat-message__body ${t}`.trim(),"data-slot":"chat-message-body",...n,children:e})}function UY({children:e,className:t="",...n}){return o.jsx("div",{className:`chat-message__content ${t}`.trim(),"data-slot":"chat-message-content",...n,children:e})}function Xx({"aria-label":e,tooltip:t,onPress:n,children:s,className:r="",...i}){return o.jsx("button",{"aria-label":e,className:`chat-message__action ${r}`.trim(),"data-slot":"chat-message-action",title:t,type:"button",onClick:n,...i,children:s})}function Ba({children:e,className:t="",...n}){return o.jsx("div",{className:`chat-message__actions ${t}`.trim(),"data-slot":"chat-message-actions",...n,children:e})}function FY(e){return o.jsx(Xx,{...e,children:o.jsx(tH,{"aria-hidden":"true",size:16})})}function GY(e){return o.jsx(Xx,{...e,children:o.jsx(hH,{"aria-hidden":"true",size:16})})}function VY(e){return o.jsx(Xx,{...e,children:o.jsx(fH,{"aria-hidden":"true",size:16})})}Ba.Copy=FY;Ba.ThumbsUp=GY;Ba.ThumbsDown=VY;const da={User:BY,Assistant:qY,Bubble:HY,Body:PY,Content:UY,Action:Xx},WY=new Set(["ECONNREFUSED","ETIMEDOUT","ENOTFOUND","EAI_AGAIN","ECONNRESET","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_SOCKET"]);function KY(e){if(typeof e=="string")return e;if(e instanceof Error)return e.message;if(e&&typeof e=="object"&&"message"in e){const t=e.message;if(typeof t=="string")return t}return""}function O$(e,t=0){if(t>4)return{message:""};const n=KY(e);if(!e||typeof e!="object")return{message:n};const s=e,r=XY(s),i=typeof s.code=="string"&&WY.has(s.code)?s.code:void 0,a=O$(s.cause,t+1),l=a.message&&!n.includes(a.message)?a.message:"";return{status:r??a.status,networkCode:i??a.networkCode,message:[n,l].filter(Boolean).join(" ")}}function XY(e){if(typeof e.statusCode=="number")return e.statusCode;if(typeof e.status=="number")return e.status;const t=e.$metadata;if(v5(t)&&typeof t.httpStatusCode=="number")return t.httpStatusCode;const n=e.$response;if(v5(n)&&typeof n.statusCode=="number")return n.statusCode}function v5(e){return typeof e=="object"&&e!==null}const ZY=/network.?error|connection.?error|connection.?refused|connection.?lost|other side closed|fetch failed|getaddrinfo|ENOTFOUND|EAI_AGAIN|upstream.?connect|reset before headers|socket hang up|socket connection was closed|timed? out|timeout|terminated|websocket.?closed|websocket.?error|ended without|stream ended before message_stop|stream ended before a terminal response event|http2 request did not get a response|ECONNREFUSED|ETIMEDOUT|ECONNRESET|UND_ERR_/i,YY=/invalid_grant|oauth refresh failed|refresh.?token/i;function QY(e){return e.status===401||/\b401\b/.test(e.message)?"auth":e.status===403||/\b403\b/.test(e.message)||/\b(?:plan|subscription|entitlement)\b/i.test(e.message)?"entitlement":e.networkCode||ZY.test(e.message)?"network":/invalid.?api.?key|authentication_error|unauthorized/i.test(e.message)||YY.test(e.message)?"auth":"unknown"}function JY(e){return QY(O$(e))}function eQ(e){const t=JY(e);return t==="auth"?{title:"Provider authentication failed",description:"The provider rejected the credentials. Sign in again or update them in Provider settings, then retry. You can also choose another model."}:t==="entitlement"?{title:"This model is not included in your subscription plan",description:"Test the connection in Settings → Providers."}:/\b429\b|rate.?limit|quota.?exceeded/i.test(e)?{title:"Provider limit reached",description:"Wait a moment, or choose another model and retry."}:{title:"Run failed",description:/[{}\n]/.test(e)?"The provider could not complete this request. Check the error details, then retry or choose another model.":e}}function tQ({error:e,onRetry:t,onOpenProviderSettings:n,modelControl:s,className:r,...i}){const[a,l]=x.useState(!1),[c,u]=x.useState(!1),d=x.useRef(!1),[f,h]=x.useState(null),p=eQ(e),m=async()=>{if(!(!t||d.current)){d.current=!0,l(!0),h(null);try{await t()}catch(b){h(b instanceof Error?b.message:"Retry could not start.")}finally{d.current=!1,l(!1)}}};return o.jsxs(fe,{className:r,gap:2,...i,children:[o.jsx(yt,{status:"error",title:p.title,description:p.description}),o.jsxs(we,{gap:2,wrap:"wrap",children:[n?o.jsx(re,{label:"Provider settings",size:"sm",variant:"secondary",onClick:n}):null,s,t?o.jsx(re,{label:"Retry request",size:"sm",variant:"secondary",isDisabled:a,onClick:()=>void m()}):null]}),f?o.jsx(ee,{role:"alert",style:{color:"var(--danger)"},children:f}):null,o.jsx(a6,{trigger:o.jsx(ee,{type:"body",size:"sm",color:"secondary",children:"Error details"}),isOpen:c,onOpenChange:u,children:c?o.jsx(ee,{as:"div",type:"body",size:"sm",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:e}):null})]})}const Zm=e=>`data:${e.mimeType};base64,${e.data}`;function nQ({images:e}){const[t,n]=x.useState(void 0);return e.length===0?null:o.jsxs("div",{className:"flex flex-wrap justify-end gap-2","data-testid":"message-images",children:[e.map((s,r)=>o.jsx(Zf,{src:Zm(s),alt:`Image ${r+1}`,onClick:()=>n(r)},r)),t===void 0?null:o.jsx(f6,{isOpen:!0,media:e.map((s,r)=>({src:Zm(s),alt:`Image ${r+1}`})),index:t,onIndexChange:n,onOpenChange:s=>{s||n(void 0)}})]})}const sQ=/(\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`)/g;function rQ(e){if(/^\*{1,2}$/.test(e))return"";const t=e.split("**");return t.length%2===0?t.slice(0,-1).join("**")+t[t.length-1]:e}function iQ(e){return e.replace(/(^|\n)\*\*([^*\n]+)\*\*(?=\n|$)/g,"$1$2")}function aQ(e){return e.split(sQ).map((t,n)=>t.startsWith("**")&&t.endsWith("**")&&t.length>4?o.jsx("strong",{children:t.slice(2,-2)},n):t.startsWith("*")&&t.endsWith("*")&&t.length>2&&!t.startsWith("**")?o.jsx("em",{children:t.slice(1,-1)},n):t.startsWith("`")&&t.endsWith("`")&&t.length>2?o.jsx("code",{children:t.slice(1,-1)},n):t)}function D$({text:e,unwrapLines:t=!1,className:n,...s}){let r=rQ(e);return t&&(r=iQ(r)),o.jsx("span",{className:`chat-thought-md ${n??""}`.trim(),...s,children:aQ(r)})}const oQ=300,lQ=700;function cQ(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function L$({children:e,className:t="",dwellMs:n=lQ,pageKey:s="",...r}){const i=Math.max(n,oQ),[a,l]=x.useState({key:s,node:e}),[c,u]=x.useState(null),d=x.useRef({key:s,node:e}),f=x.useRef({key:s,node:e}),h=x.useRef(Date.now()),p=x.useRef(null);return x.useEffect(()=>{if(f.current={key:s,node:e},s===d.current.key){d.current=f.current;return}const m=()=>{const y=d.current;d.current=f.current,h.current=Date.now(),l(f.current),u(cQ()?null:y.node)};if(p.current!==null)return;const b=i-(Date.now()-h.current);if(b<=0){m();return}p.current=window.setTimeout(()=>{p.current=null,f.current.key!==d.current.key&&m()},b)},[e,i,s]),x.useEffect(()=>()=>{p.current!==null&&window.clearTimeout(p.current)},[]),o.jsx("span",{className:`chat-inline-pager ${t}`.trim(),"data-slot":"chat-inline-pager",...r,children:o.jsxs("span",{className:"chat-inline-pager__flip",children:[c?o.jsx("span",{className:"chat-inline-pager__page","data-motion":"out",children:c}):null,o.jsx("span",{className:"chat-inline-pager__page","data-motion":c?"in":void 0,onAnimationEnd:m=>{m.target===m.currentTarget&&u(null)},children:s===a.key?e:a.node})]})})}function uQ(e){if(!(e===void 0||!Number.isFinite(e)||e<0))return e<1e3?"briefly":`${Math.round(e/1e3)}s`}function dQ({className:e="",dwellMs:t,step:n,...s}){const r=n.text.trim(),i=uQ(n.durationMs),a=o.jsx(L$,{dwellMs:t,pageKey:n.live?"live":"settled",children:n.live?o.jsx(Kx,{className:"chat-step__label",children:"Thinking…"}):o.jsx("span",{className:"chat-step__label",children:i?o.jsxs(o.Fragment,{children:["Thought ",o.jsx("span",{className:"chat-step__meta",children:i})]}):"Thought"})});return r?o.jsxs(Hk,{className:`chat-step ${e}`.trim(),"data-slot":"chat-thought-step",...s,children:[o.jsxs(Pk,{className:"chat-step__trigger",children:[a,o.jsx(Ai,{"aria-hidden":"true",className:"chat-step__chevron"})]}),o.jsx(Uk,{keepMounted:!0,className:"chat-step__panel",children:o.jsx("div",{className:"chat-step__body",children:o.jsx(D$,{text:n.text})})})]}):o.jsx("p",{className:`chat-step chat-step--plain ${e}`.trim(),"data-slot":"chat-thought-step",...s,children:a})}const fQ={shell:p7,search:cH,web:sH,file:f7,edit:x7,tool:g7};function Rf({className:e="",kind:t,...n}){const s=fQ[t];return o.jsx("span",{"aria-hidden":"true",className:`chat-tool-kind ${e}`.trim(),"data-kind":t,"data-slot":"chat-tool-kind",...n,children:o.jsx(s,{})})}const hQ={"input-streaming":"running","input-available":"running","output-available":"complete","output-error":"error"};function B$(e){var t,n;return e.argsText!=null||e.output!=null||(((t=e.children)==null?void 0:t.length)??0)>0||e.detail!=null||(((n=e.images)==null?void 0:n.length)??0)>0}function q$({tool:e,className:t,...n}){var s,r;return o.jsxs("div",{className:t,...n,children:[e.detail!==void 0&&e.detail!==null?e.detail:o.jsxs(o.Fragment,{children:[e.argsText!=null?o.jsx("pre",{className:"chat-tool__section","data-slot":"chat-tool-args",children:e.argsText}):null,e.output!==void 0?o.jsx("pre",{className:"chat-tool__section","data-slot":"chat-tool-result",children:e.output}):null]}),(s=e.children)!=null&&s.length?o.jsx("ol",{className:"chat-tool-step__list","data-slot":"chat-tool-children",children:e.children.map((i,a)=>o.jsxs("li",{className:"chat-tool-step__item",children:[o.jsx(Rf,{kind:qh(i.toolName)}),o.jsx(H$,{tools:[i]})]},i.toolCallId??a))}):null,(r=e.images)==null?void 0:r.map((i,a)=>o.jsx("img",{src:`data:${i.mimeType};base64,${i.data}`,alt:"",style:{maxWidth:"100%"}},a))]})}function xQ(e,t){const n=B$(e)?o.jsx(q$,{tool:e}):void 0;return{name:$a(e.toolName)??"tool",status:hQ[e.state],target:Dk(e.argsText),...e.diffStat?{additions:e.diffStat.additions,deletions:e.diffStat.deletions}:{},duration:x$(e.durationMs),errorMessage:e.state==="output-error"?e.output:void 0,key:e.toolCallId??`tool-${t}`,resultDetail:n}}function H$({tools:e,className:t="",...n}){return e.length?o.jsx("div",{className:`chat-tool ${t}`.trim(),"data-slot":"chat-tool-group","data-tool-count":e.length,"data-state":e.length===1?e[0].state:void 0,...n,children:o.jsx(H4,{calls:e.map(xQ)})}):null}const xc={past:"Ran",noun:["command","commands"]},Np={past:"Read",noun:["file","files"]},w5={past:"Edited",noun:["file","files"]},j5={past:"Wrote",noun:["file","files"]},S5={past:"Searched",noun:["pattern","patterns"]},$5={past:"Searched",noun:["path","paths"]},pQ={past:"Listed",noun:["directory","directories"]},C5={past:"Searched",noun:["web page","web pages"]},tf={past:"Fetched",noun:["page","pages"]},gQ={bash:xc,shell:xc,sh:xc,terminal:xc,cmd:xc,read:Np,read_file:Np,cat:Np,edit:w5,str_replace:w5,write:j5,write_file:j5,grep:S5,find:$5,glob:$5,ls:pQ,search:S5,web_search:C5,websearch:C5,webfetch:tf,web_fetch:tf,web:tf,browser:tf},P$={past:"Used",noun:["tool","tools"]};function E5(e){return gQ[p$(e)]??P$}const T5=72;function mQ(e){return e.length<=T5?e:e.includes("/")&&!e.includes(" ")?`…${e.slice(-71)}`:`${e.slice(0,T5-1)}…`}function z5(e,[t,n]){return e!==1?`${e} ${n}`:`${t==="tool"?"a":"1"} ${t}`}function yQ(e){if(e.length===1){const[n]=e,s=E5(n.toolName),r=Dk(n.argsText);return r?`${s.past} ${mQ(r)}`:s===P$?`Used ${$a(n.toolName)??"a tool"}`:`${s.past} ${z5(1,s.noun)}`}const t=new Map;for(const n of e){const s=E5(n.toolName),r=`${s.past}:${s.noun[1]}`,i=t.get(r)??{verb:s,count:0};i.count+=1,t.set(r,i)}return[...t.values()].map(({verb:n,count:s},r)=>{const i=`${n.past} ${z5(s,n.noun)}`;return r===0?i:i.charAt(0).toLowerCase()+i.slice(1)}).join(", ")}function U$(e){const t=[];for(const n of e.children??[])t.push(n,...U$(n));return t}function kQ({className:e="",dwellMs:t,step:n,...s}){const{tools:r}=n,i=r.filter(y=>y.state==="output-error").length,a=r.flatMap(U$),l=a.length,c=a.filter(y=>y.state==="output-error").length,u=r.reduce((y,g)=>y+(g.durationMs??0),0),d=r.reduce((y,g)=>g.diffStat?{additions:((y==null?void 0:y.additions)??0)+g.diffStat.additions,deletions:((y==null?void 0:y.deletions)??0)+g.diffStat.deletions}:y,void 0),f=r.find(y=>y.toolCallId===n.activeToolCallId)??r[r.length-1];let h,p=f;for(;p;){const y=(p.children??[]).filter(k=>k.state==="input-available"),g=y[y.length-1];if(!g)break;h=g,p=g}const m=n.live?qh(f==null?void 0:f.toolName):iZ(r),b=n.live?`running:${(f==null?void 0:f.toolCallId)??"none"}`:"settled";return o.jsxs(Hk,{className:`chat-step chat-tool-step ${e}`.trim(),"data-slot":"chat-tool-step",...s,children:[o.jsxs(Pk,{className:"chat-step__trigger",children:[o.jsx(L$,{dwellMs:t,pageKey:b,children:n.live?o.jsxs("span",{className:"chat-tool-step__page",children:[o.jsx(Rf,{kind:m}),o.jsx(Kx,{className:"chat-step__label",children:f!=null&&f.toolName?h!=null&&h.toolName?`Running ${$a(f.toolName)} › ${$a(h.toolName)}…`:`Running ${$a(f.toolName)}…`:"Running…"})]}):o.jsxs("span",{className:"chat-tool-step__page",children:[o.jsx(Rf,{kind:m}),o.jsx("span",{className:"chat-step__label",children:yQ(r)}),l>0?o.jsx("span",{className:"chat-step__meta","data-slot":"chat-tool-nested-count",children:l===1?"1 nested call":`${l} nested calls`}):null,c>0?o.jsx("span",{className:"chat-step__meta chat-step__meta--error","data-slot":"chat-tool-nested-failed",children:c===1?"1 nested failed":`${c} nested failed`}):null,d?o.jsxs("span",{className:"chat-step__meta","data-slot":"chat-tool-diff-stat",children:[o.jsxs("span",{className:"text-success",children:["+",d.additions]})," ",o.jsxs("span",{className:"text-danger",children:["-",d.deletions]})]}):null,i>0?o.jsx("span",{className:"chat-step__meta chat-step__meta--error",children:i===1?"1 failed":`${i} failed`}):null,u>0?o.jsx("span",{className:"chat-step__meta",children:x$(u)}):null]})}),o.jsx(Ai,{"aria-hidden":"true",className:"chat-step__chevron"})]}),o.jsx(Uk,{keepMounted:!0,className:"chat-step__panel",children:r.length===1?B$(r[0])?o.jsx("div",{className:"chat-tool-step__detail","data-slot":"chat-tool-step-detail",children:o.jsx(q$,{tool:r[0]})}):null:o.jsx("ol",{className:"chat-tool-step__list",children:r.map((y,g)=>o.jsxs("li",{className:"chat-tool-step__item",children:[o.jsx(Rf,{kind:qh(y.toolName)}),o.jsx(H$,{tools:[y]})]},y.toolCallId??g))})})]})}const A5={done:"Done",failed:"Failed",running:"Running"};function F$(e){const t=Math.max(0,Math.floor(e/1e3));return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}function bQ({startedAt:e}){const t=Vl(1e3);return o.jsx(o.Fragment,{children:F$(t-e)})}function vQ({tool:e,summary:t,openInPanel:n}){const s=Lk(e),r=(s==null?void 0:s.kind)==="subagent"?s:void 0,i=e.state==="output-available"?"done":e.state==="output-error"?"failed":"running",a=t!==void 0?ks(t):Dk(e.argsText)??"Subagent",l=r==null?void 0:r.startedAt,c=r==null?void 0:r.endedAt,u=[A5[i],(t==null?void 0:t.role)===void 0?void 0:`@${t.role}`,r==null?void 0:r.model,l===void 0?void 0:i==="running"?o.jsx(bQ,{startedAt:l},"elapsed"):c===void 0?void 0:F$(c-l)];return o.jsxs(fe,{className:"pigui-subagent-card rounded-lg border border-border p-3",gap:1,"data-slot":"subagent-card","data-status":i,children:[o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(cr,{variant:i==="failed"?"error":i==="running"?"success":"neutral",label:A5[i],isPulsing:i==="running"}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:a}),r===void 0?null:o.jsx(re,{label:"View",variant:"ghost",size:"sm",onClick:()=>n(r.conversationId,"tasks")})]}),o.jsx("div",{className:"text-xs text-muted",children:u.map((d,f)=>d===void 0||d===""?null:f===0?o.jsx("span",{children:d},f):o.jsxs("span",{children:[" · ",d]},f))}),i==="running"&&(t==null?void 0:t.activity)!==void 0?o.jsxs("div",{className:"text-xs text-muted",children:["→ ",$a(t.activity.tool)??t.activity.tool,t.activity.target===void 0?"":` ${t.activity.target}`]}):null,i==="failed"&&e.output!==void 0&&e.output!==""?o.jsx("div",{className:"text-xs text-muted",children:e.output}):null]})}function wQ({tools:e,summaryOf:t,openInPanel:n}){return e.length===0?null:o.jsx(fe,{gap:2,className:"pigui-subagent-cards",children:e.map(({key:s,tool:r})=>{const i=Lk(r);return o.jsx(vQ,{tool:r,summary:(i==null?void 0:i.kind)==="subagent"?t==null?void 0:t(i.conversationId):void 0,openInPanel:n},s)})})}const Mp=(e,t,n)=>e.startsWith(`${t} ${n}`)?e.slice(t.length+1+n.length):e.slice(t.length+1);function jQ(e){const t=[];let n,s=0,r=0,i=!1;const a=c=>({path:c,isNew:!1,isDeleted:!1,binary:!1,additions:0,deletions:0,lines:[]}),l=()=>{n!==void 0&&(n.path===""&&n.oldPath!==void 0&&(n.path=n.oldPath),t.push(n))};for(const c of e.split(`
383
- `)){if((s>0||r>0)&&n!==void 0){c.startsWith("\\")?n.lines.push({kind:"ctx",text:c}):c.startsWith("+")?(n.additions+=1,n.lines.push({kind:"add",text:c}),r-=1):c.startsWith("-")?(n.deletions+=1,n.lines.push({kind:"del",text:c}),s-=1):(n.lines.push({kind:"ctx",text:c}),s-=1,r-=1);continue}if(c.startsWith("@@")){const u=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/.exec(c);n!==void 0&&u!==null&&(s=u[2]===void 0?1:Number(u[2]),r=u[4]===void 0?1:Number(u[4]),n.lines.push({kind:"meta",text:c}));continue}if(c.startsWith("diff --git ")){l();const u=/^diff --git a\/(\S+) b\/(\S+)$/.exec(c);n=a((u==null?void 0:u[2])??c.slice(11)),i=!0;continue}if(c.startsWith("--- ")){n!==void 0&&i?(i=!1,c==="--- /dev/null"?n.isNew=!0:n.oldPath=Mp(c,"---","a/")):(l(),n=a(""),c==="--- /dev/null"?n.isNew=!0:n.oldPath=Mp(c,"---","a/"));continue}n!==void 0&&(c.startsWith("+++ ")?c==="+++ /dev/null"?n.isDeleted=!0:n.path=Mp(c,"+++","b/"):c.startsWith("new file mode")?n.isNew=!0:c.startsWith("deleted file mode")?n.isDeleted=!0:c.startsWith("rename from ")?n.oldPath=c.slice(12):c.startsWith("rename to ")?n.path=c.slice(10):c.startsWith("copy from ")?n.oldPath=c.slice(10):c.startsWith("copy to ")?n.path=c.slice(8):(c.startsWith("Binary files")||c.startsWith("GIT binary patch"))&&(n.binary=!0))}return l(),t}const SQ={fontFamily:"var(--font-family-code)",fontSize:"var(--font-size-sm)",lineHeight:"var(--line-height-sm, 1.5)",overflowX:"auto",whiteSpace:"pre",borderRadius:"var(--radius-sm, 6px)"},$Q={add:{backgroundColor:"var(--color-success-muted)",color:"var(--color-text-primary)"},del:{backgroundColor:"var(--color-error-muted)",color:"var(--color-text-primary)"},ctx:{color:"var(--color-text-secondary)"},meta:{color:"var(--color-text-accent)",backgroundColor:"var(--color-background-muted)"}};function G$({patch:e}){const t=x.useMemo(()=>jQ(e),[e]);return t.length===0?o.jsx(ee,{type:"supporting",children:"No changes."}):o.jsx(fe,{gap:2,children:t.map((n,s)=>o.jsxs(fe,{gap:0,children:[o.jsxs(we,{gap:2,vAlign:"center",padding:1,children:[o.jsx(ee,{type:"supporting",weight:"semibold",maxLines:1,children:n.oldPath!==void 0&&n.oldPath!==n.path?`${n.oldPath} → ${n.path}`:n.path}),n.isNew?o.jsx(vn,{label:"new",color:"green",size:"sm"}):null,n.isDeleted?o.jsx(vn,{label:"deleted",color:"red",size:"sm"}):null,o.jsxs(ee,{type:"supporting",children:["+",n.additions," −",n.deletions]})]}),n.binary===!0?o.jsx(ee,{type:"supporting",children:"Binary file"}):n.lines.length===0?null:o.jsx("div",{style:SQ,children:n.lines.map((r,i)=>o.jsx("div",{style:$Q[r.kind],children:r.text},i))})]},`${n.path}-${s}`))})}function CQ(e){return e.kind==="diff"?o.jsx(G$,{patch:e.patch}):void 0}function EQ(e){const t=n=>{var a;const s=Lk(n),r=s===void 0?void 0:CQ(s),i=(a=n.children)==null?void 0:a.map(t);return r===void 0&&i===void 0?n:{...n,...r===void 0?{}:{detail:r},...i===void 0?{}:{children:i}}};return{...e,steps:e.steps.map(n=>n.kind==="tools"?{...n,tools:n.tools.map(t)}:n)}}function TQ({entry:e,connected:t,openInPanel:n,onFork:s,canFork:r=!0,forksAt:i,summaryOf:a,onRetry:l}){switch(e.kind){case"user":return o.jsx(da.User,{children:o.jsxs("div",{className:"flex flex-col items-end gap-1",children:[e.images.length===0?null:o.jsx(nQ,{images:e.images}),e.text===""?null:o.jsxs(o.Fragment,{children:[o.jsx(da.Bubble,{children:o.jsx(da.Content,{children:e.text})}),o.jsx(Ba,{className:"shrink-0",children:o.jsx(Ba.Copy,{"aria-label":"Copy",tooltip:"Copy",onPress:()=>{var c;(c=navigator.clipboard)==null||c.writeText(e.text)}})})]})]})});case"run":return o.jsx(zQ,{entry:e,connected:t,openInPanel:n,onFork:s,canFork:r,forksAt:i,summaryOf:a,onRetry:l});case"compaction":return o.jsx(Kf,{variant:"divider",children:"Earlier context summarized"});case"reset":return o.jsx(Kf,{variant:"divider",children:"New context"})}}function zQ({entry:e,connected:t,openInPanel:n,onFork:s,canFork:r=!0,forksAt:i,summaryOf:a,onRetry:l}){const{view:c,subagents:u}=x.useMemo(()=>vZ(e.cot),[e.cot]),d=x.useMemo(()=>EQ(c),[c]),f=d.answer,h=e.forkEntryId===void 0?[]:(i==null?void 0:i(e.forkEntryId))??[],p=d.phase==="settled"&&(f!==void 0||e.forkEntryId!==void 0&&(r||h.length>0));return o.jsx(da.Assistant,{children:o.jsxs(da.Body,{children:[e.interrupted?o.jsx("p",{className:"mb-1",children:o.jsx(vn,{label:"interrupted",color:"orange",size:"sm"})}):null,o.jsx(AQ,{view:d}),o.jsx(wQ,{tools:u,summaryOf:a,openInPanel:n}),f===void 0?null:o.jsx(da.Content,{children:f.streaming?o.jsx(LY,{isStreaming:!0,children:f.text}):o.jsx(DY,{children:f.text})}),e.failure===void 0?null:o.jsx(tQ,{error:e.failure,onRetry:l}),p?o.jsxs(Ba,{className:"chat-message__actions--persist",children:[f===void 0?null:o.jsx(Ba.Copy,{"aria-label":"Copy",tooltip:"Copy",onPress:()=>{var m;(m=navigator.clipboard)==null||m.writeText(f.text)}}),e.forkEntryId===void 0?null:h.length>0?o.jsxs("button",{type:"button",className:"pigui-fork-chip","aria-label":`${h.length} ${h.length===1?"fork":"forks"}`,title:"Open in Threads",disabled:!t,onClick:()=>n(h[0],"threads"),children:[o.jsx(xm,{"aria-hidden":"true"}),h.length," ",h.length===1?"fork":"forks"]}):r?o.jsx(da.Action,{"aria-label":"Fork",tooltip:"Continue from here in a new conversation",disabled:!t,onPress:()=>s(e.forkEntryId),children:o.jsx(xm,{"aria-hidden":"true",className:"size-4"})}):null]}):null]})})}function AQ({view:e}){if(e.phase==="hidden")return null;const t=e.phase==="thinking"||e.phase==="acting";return!t&&!e.steps.length&&e.elapsedMs===void 0?null:o.jsx(Gc,{...t?{startedAtMs:e.anchorMs}:{elapsedMs:e.elapsedMs},hasSteps:e.steps.length>0,phase:e.phase,outcome:e.outcome,children:o.jsx(Gc.Steps,{children:e.steps.map(n=>o.jsx(Gc.Step,{children:n.kind==="thinking"?o.jsx(dQ,{step:n}):n.kind==="tools"?o.jsx(kQ,{step:n}):o.jsx("div",{className:"chain-of-thought__interim","data-slot":"chat-interim-output",children:o.jsx(D$,{text:n.text})})},n.id))})})}function V$({conversation:e,toolPresentations:t,connected:n,canFork:s,openInPanel:r,onFork:i,forksAt:a,summaryOf:l,ownOnly:c,forkSource:u,onRetry:d}){const f=zk(e),h=x.useMemo(()=>c?{...e,entries:e.entries.filter(b=>b.conversationId===e.conversation.id)}:e,[e,c]),p=x.useMemo(()=>kZ(h,t,f),[h,t,f]),m=x.useMemo(()=>bZ(p),[p]);return p.length===0&&!c?null:o.jsx(D4,{isStreaming:f,gap:0,children:o.jsxs("div",{className:"mx-auto flex w-full max-w-[44rem] flex-col gap-8 px-4 pb-6 pt-2",children:[c?o.jsxs(Kf,{variant:"divider",children:["Forked from ",u]}):null,p.map((b,y)=>o.jsx(TQ,{entry:b,connected:n,openInPanel:r,onFork:i,canFork:s,forksAt:a,summaryOf:l,onRetry:d!==void 0&&n&&m!==void 0&&y===p.length-1?()=>d(m):void 0},b.id))]})})}const NQ={pending:"pending",in_progress:"in progress",completed:"completed"};function MQ({doc:e}){if(e.value===null)return null;const t=Wx(e.presentation,e.value),n=t.type==="pinomad.todo"?"Todo":t.type==="pinomad.question"?"Questions":e.kind,s=t.type==="pinomad.todo"?o.jsx(RQ,{doc:t.value}):t.type==="pinomad.question"?o.jsx(_Q,{doc:t.value}):o.jsx(OQ,{value:t.value});return o.jsxs(fe,{gap:1,children:[o.jsx(ee,{type:"label",weight:"semibold",children:n}),s]})}function RQ({doc:e}){return o.jsx(xt,{density:"compact",children:e.items.length===0?o.jsx(He,{label:"Empty"}):e.items.map((t,n)=>o.jsx(He,{label:t.text,startContent:o.jsx(vn,{label:NQ[t.status],size:"sm"})},n))})}function IQ(e,t){const n=e.resolution;if(n===void 0)return{label:"pending"};if(n.outcome==="dismissed")return{label:"answered in chat",color:"gray"};if(n.outcome==="cancelled")return{label:"cancelled",color:"gray"};const s=n.answers[t];if(s===void 0||s.selected.length===0&&s.other===void 0)return{label:"skipped",color:"gray"};const r=[s.selected.join(", "),...s.other===void 0?[]:[`other: "${s.other}"`]].filter(i=>i!=="").join("; ");return{label:r===""?"skipped":r,color:"green"}}function _Q({doc:e}){return o.jsx(xt,{density:"compact",children:e.requests.length===0?o.jsx(He,{label:"Empty"}):e.requests.flatMap(t=>t.questions.map((n,s)=>{const r=IQ(t,s);return o.jsx(He,{label:n.question,description:r.label,startContent:o.jsx(vn,{label:n.header,size:"sm"})},`${t.id}-${s}`)}))})}function OQ({value:e}){const t=typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.entries(e):[["value",e]];return o.jsx(xt,{density:"compact",children:t.map(([n,s])=>o.jsx(He,{label:n,description:DQ(s)},n))})}function DQ(e){const t=JSON.stringify(e);return t.length<=120?t:`${t.slice(0,117)}...`}function LQ({view:e,remote:t,conversation:n}){var c;const s=e.tasks===void 0?[]:i7(e.tasks),r=[...e.notices].reverse().slice(0,5),i=n===void 0?[]:hq(n),a=n===void 0||(c=e.checkout)==null?void 0:c.branch,l=n===void 0?void 0:r7(n).cwd;return o.jsxs(fe,{gap:4,children:[n===void 0||a===void 0&&l===void 0?null:o.jsxs(xt,{density:"compact",header:o.jsx(ee,{type:"label",weight:"semibold",children:"Workspace"}),children:[a===void 0?null:o.jsx(He,{label:"Branch",description:a}),l===void 0?null:o.jsx(He,{label:"Path",description:l})]}),e.docs.map(u=>o.jsx(MQ,{doc:u,remote:t,connected:e.connection==="connected"},u.kind)),o.jsx(xt,{density:"compact",header:o.jsx(ee,{type:"label",weight:"semibold",children:"Tasks"}),children:s.length===0?o.jsx(He,{label:"No live tasks"}):s.map(u=>o.jsx(He,{label:`${"  ".repeat(u.depth)}${u.depth>0?"└ ":""}${u.label}`},u.id))}),r.length===0?null:o.jsx(xt,{density:"compact",header:o.jsx(ee,{type:"label",weight:"semibold",children:"Notices"}),children:r.map(u=>o.jsx(He,{label:u.message,startContent:o.jsx(cr,{variant:u.level==="error"?"error":u.level==="warning"?"warning":"neutral",label:u.level})},u.id))}),i.length===0?null:o.jsx(xt,{density:"compact",header:o.jsx(ee,{type:"label",weight:"semibold",children:"Usage"}),children:i.map(u=>o.jsx(He,{label:u.key,description:`↑${u.input} ↓${u.output} · $${u.cost.toFixed(4)}`},u.key))}),o.jsx(qQ,{view:e})]})}const BQ={connecting:"warning",connected:"success",failed:"error",disabled:"neutral"};function qQ({view:e}){const t=e.mcp;return t===null||t.servers.length===0&&t.errors.length===0?null:o.jsxs(xt,{density:"compact",header:o.jsx(ee,{type:"label",weight:"semibold",children:"MCP"}),children:[t.servers.map(n=>o.jsx(He,{label:n.name,description:n.state==="connected"?`${n.tools} tool${n.tools===1?"":"s"}${n.error===void 0?"":` · ${n.error}`}`:n.error??n.state,startContent:o.jsx(cr,{variant:BQ[n.state],label:n.state,isPulsing:n.state==="connecting"})},n.name)),t.errors.map((n,s)=>o.jsx(He,{label:n,startContent:o.jsx(cr,{variant:"error",label:"config error"})},s))]})}const HQ={"needs-answer":"warning",failed:"error",running:"success"},PQ={"needs-answer":"Waiting for your answer",failed:"Failed",running:"Running"};function W$({status:e}){return e===void 0?null:o.jsx("span",{"aria-hidden":"true",children:o.jsx(cr,{variant:HQ[e],label:PQ[e],isPulsing:e!=="failed"})})}function N5({view:e,remote:t,conversation:n,tab:s,onTabChange:r,openInPanel:i,onOpenInMain:a}){var b;const l=Vl(6e4),c=e.side,u=c===void 0||(b=Ar(e.organized,c.id))==null?void 0:b.summary,d=n===void 0?void 0:t7(e.organized,n.conversation.id),f=d===void 0?[]:n7(d),h=d===void 0?[]:sq(d),p=h.reduce((y,g)=>y+g.tasks.length,0),m=()=>void t.controller.showSide(void 0);return o.jsxs(fe,{className:"h-full min-h-0",gap:0,children:[o.jsxs(g6,{value:s,onChange:y=>r(y),layout:"fill",hasDivider:!0,children:[o.jsx(rf,{value:"threads",label:"Threads",endContent:f.length===0?void 0:o.jsx("span",{"aria-hidden":"true",className:"text-xs text-muted",children:f.length})}),o.jsx(rf,{value:"tasks",label:"Tasks",endContent:p===0?void 0:o.jsx("span",{"aria-hidden":"true",className:"text-xs text-muted",children:p})}),o.jsx(rf,{value:"live",label:"Live"})]}),s==="threads"?c!==void 0&&(u==null?void 0:u.kind)==="fork"?o.jsx(UQ,{view:e,remote:t,side:c,summary:u,onBack:m,onOpenInMain:a,openInPanel:i},c.id):o.jsx(Rp,{children:f.length===0?o.jsx(ee,{type:"supporting",className:"p-3 text-muted",children:"No threads yet"}):o.jsx(xt,{density:"compact",children:f.map(y=>o.jsx(M5,{summary:y.summary,now:l,onOpen:()=>i(y.summary.id,"threads")},y.summary.id))})}):s==="tasks"?c!==void 0&&(u==null?void 0:u.kind)==="subagent"?o.jsx(FQ,{view:e,remote:t,side:c,summary:u,onBack:m,openInPanel:i}):o.jsx(Rp,{children:h.length===0?o.jsx(ee,{type:"supporting",className:"p-3 text-muted",children:"No tasks yet"}):h.map(y=>o.jsx(xt,{density:"compact",header:o.jsx("div",{className:"px-3 pt-2",children:o.jsx(ee,{type:"label",weight:"semibold",children:y.label})}),children:y.tasks.map(g=>o.jsx(M5,{summary:g.summary,now:l,onOpen:()=>i(g.summary.id,"tasks")},g.summary.id))},y.owner.id))}):o.jsx(Rp,{label:"Live state",children:o.jsx("div",{className:"p-3",children:o.jsx(LQ,{view:e,remote:t,conversation:n})})})]})}function Rp({children:e,label:t}){return o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",...t===void 0?{}:{"aria-label":t},children:e})}function M5({summary:e,now:t,onOpen:n}){return o.jsx(He,{label:ks(e),description:e.status==="running"&&e.activity!==void 0?`→ ${$a(e.activity.tool)??e.activity.tool}${e.activity.target===void 0?"":` ${e.activity.target}`}`:void 0,startContent:o.jsx(W$,{status:e.status}),endContent:e.updatedAt===void 0?void 0:o.jsx("span",{"aria-hidden":"true",className:"text-xs text-muted",children:_x(e.updatedAt,t)}),onClick:n})}function K$({back:e,title:t,status:n,onBack:s,extra:r}){return o.jsxs(we,{className:"shrink-0 gap-1 border-b border-border px-2 py-1",vAlign:"center",children:[o.jsx(kn,{icon:o.jsx(c7,{className:"size-4","aria-hidden":"true"}),label:e,size:"sm",variant:"ghost",onClick:s}),o.jsx(W$,{status:n}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:t}),r]})}function X$({view:e,remote:t,side:n,openInPanel:s,ownOnly:r,forkSource:i,onRetry:a}){return n.conversation===void 0?null:o.jsx(V$,{conversation:n.conversation,toolPresentations:e.toolPresentations,connected:e.connection==="connected",canFork:!1,openInPanel:s,onFork:()=>{},ownOnly:r,forkSource:i,summaryOf:l=>{var c;return(c=Ar(e.organized,l))==null?void 0:c.summary},forksAt:l=>s7(e.organized,n.id,l),onRetry:a})}function UQ({view:e,remote:t,side:n,summary:s,onBack:r,onOpenInMain:i,openInPanel:a}){var p;const l=n.conversation,c=l!==void 0&&zk(l),[u,d]=x.useState(""),f=()=>{const m=u.trim();m!==""&&($l(),t.controller.submit(m,"followUp",{target:n.id}),d(""))},h=s.parent===void 0||(p=Ar(e.organized,s.parent))==null?void 0:p.summary;return o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[o.jsx(K$,{back:"Back to threads",title:ks(s),status:s.status,onBack:r,extra:o.jsx(re,{label:"Open in main",variant:"secondary",size:"sm",onClick:()=>i(n.id)})}),o.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[o.jsx(X$,{view:e,remote:t,side:n,openInPanel:a,ownOnly:!0,forkSource:ks(h),onRetry:async({text:m,images:b,requestId:y})=>{$l(),await t.controller.submit(m,"followUp",{target:n.id,requestId:y,images:b})}}),o.jsx(h$,{docs:n.docs,remote:t,connected:e.connection==="connected",target:n.id})]}),o.jsx("div",{className:"shrink-0 border-t border-border p-2",children:o.jsx(Ok,{value:u,placeholder:"Reply in this thread…",status:c?"streaming":"ready",isDisabled:e.connection!=="connected",onSubmit:f,onStop:()=>void t.controller.abort(n.id),onValueChange:d,triggers:_k(e.agents)})})]})}function FQ({view:e,remote:t,side:n,summary:s,onBack:r,openInPanel:i}){return o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[o.jsx(K$,{back:"Back to tasks",title:ks(s),status:s.status,onBack:r}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o.jsx(X$,{view:e,remote:t,side:n,openInPanel:i})}),o.jsx("div",{className:"shrink-0 border-t border-border p-2 text-center text-xs text-muted",children:"Read-only · subagent"})]})}function R5({view:e,remote:t,conversation:n,narrow:s,open:r,onOpenChange:i,tab:a,onTabChange:l,openInPanel:c,onOpenInMain:u}){const d=d6({defaultSize:440,minSizePx:360,maxSizePx:720,autoSaveId:"pinomad-side-panel"});return s?o.jsx(vs,{isOpen:r,onOpenChange:i,variant:"fullscreen",children:o.jsx(Qn,{header:o.jsx(ws,{title:"Side panel",onOpenChange:i}),content:o.jsx(Jn,{padding:0,children:o.jsx(N5,{view:e,remote:t,conversation:n,tab:a,onTabChange:l,openInPanel:c,onOpenInMain:u})})})}):r?o.jsxs("div",{className:"relative h-full shrink-0 border-l border-border",style:{width:d.size},"aria-label":"Side panel",role:"complementary",children:[o.jsx("div",{className:"h-full min-h-0 overflow-hidden",children:o.jsx(N5,{view:e,remote:t,conversation:n,tab:a,onTabChange:l,openInPanel:c,onOpenInMain:u})}),o.jsx(ry,{direction:"horizontal",position:"overlay",isReversed:!0,label:"Resize side panel",resizable:d.props})]}):null}const Z$="pinomad.sidebar.open",GQ=()=>typeof window>"u"||window.localStorage.getItem(Z$)!=="false";function VQ({view:e,remote:t,device:n,narrow:s,drafting:r,draftingChat:i,draftLabel:a,conversation:l,summary:c,parentSummary:u,banner:d,onDraft:f,onOpenChanges:h,panelOpen:p,panelTab:m,onPanelOpen:b,onPanelTab:y,openInPanel:g,openInMain:k,children:v}){const[w,j]=x.useState(GQ),[$,C]=x.useState(!1),[E,T]=x.useState(!1),[S,N]=x.useState(!1),[z,M]=x.useState(!1),[R,I]=x.useState(!1),A=a7(),_=A.reserveMacTrafficLights&&!s&&w,O=()=>{window.localStorage.setItem(Z$,String(!w)),j(!w)},D=F=>void t.controller.switchConversation(F),L=e.tasks!==void 0&&i7(e.tasks).length>0,q=o.jsx(PU,{view:e,remote:t,draftingChat:i,shownId:l==null?void 0:l.conversation.id,onDraft:f,onSelect:()=>C(!1)});return o.jsxs(o.Fragment,{children:[o.jsx(P3,{className:"pigui-app-layout text-foreground",contentPadding:0,mobileNav:!1,variant:"elevated",sideNav:s||!w?void 0:o.jsx(cy,{resizable:{defaultWidth:260,minWidth:240,maxWidth:320,autoSaveId:"pinomad-app-shell"},header:o.jsx(BU,{connection:e.connection,onCollapse:O,safeLeft:_?A.safeLeft:void 0}),footer:o.jsx(Hw,{view:e,onOpenDevices:()=>T(!0),onOpenSettings:()=>N(!0),onPairHost:()=>M(!0),onOpenAccount:()=>I(!0)}),children:q}),children:o.jsxs("div",{className:"flex h-full min-h-0 min-w-0 flex-col",children:[o.jsx(KQ,{narrow:s,sidebarOpen:w,safeLeft:A.reserveMacTrafficLights&&!_?A.safeLeft:void 0,onToggleSidebar:O,onOpenNav:()=>C(!0),title:r?a:ks(c),parentSummary:u,onBackToParent:D,showChanges:l!==void 0,onOpenChanges:h,panelOpen:p,onPanelChange:b,liveActivity:L}),d,o.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1",children:[o.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:v}),s?null:o.jsx(R5,{view:e,remote:t,conversation:l,narrow:!1,open:p,onOpenChange:b,tab:m,onTabChange:y,openInPanel:g,onOpenInMain:k})]})]})}),s?o.jsxs(oy,{className:"pigui-app-layout text-foreground",isOpen:$,onOpenChange:C,header:o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-sm font-semibold",children:"PiNomad"}),o.jsx(l9,{connection:e.connection})]}),children:[q,o.jsx(Hw,{view:e,onOpenDevices:()=>T(!0),onOpenSettings:()=>N(!0),onPairHost:()=>M(!0),onOpenAccount:()=>I(!0),onSelect:()=>C(!1)})]}):null,s?o.jsx(R5,{view:e,remote:t,conversation:l,narrow:!0,open:p,onOpenChange:b,tab:m,onTabChange:y,openInPanel:g,onOpenInMain:k}):null,E?o.jsx(hF,{view:e,remote:t,self:n,onClose:()=>T(!1)}):null,S?o.jsx(CF,{view:e,remote:t,onClose:()=>N(!1)}):null,z?o.jsx(i9,{onClose:()=>M(!1)}):null,R?o.jsx(s9,{onClose:()=>I(!1)}):null,o.jsx(M0,{position:"topEnd",inset:{top:48},isTopLayer:!0,children:o.jsx(WQ,{notices:e.notices})})]})}function WQ({notices:e}){const t=uB(),n=x.useRef(void 0);return x.useEffect(()=>{var r;const s=(r=e[e.length-1])==null?void 0:r.id;if(n.current===void 0){n.current=s??-1;return}for(const i of e)i.id<=n.current||t({body:i.message,type:i.level==="error"?"error":"info",uniqueID:String(i.id)});s!==void 0&&(n.current=s)},[e,t]),null}function KQ({narrow:e,sidebarOpen:t,safeLeft:n,onToggleSidebar:s,onOpenNav:r,title:i,parentSummary:a,onBackToParent:l,showChanges:c,onOpenChanges:u,panelOpen:d,onPanelChange:f,liveActivity:h}){return o.jsxs("div",{className:"pinomad-drag flex h-10 shrink-0 items-center gap-1 border-b border-border px-3",style:n===void 0?void 0:{paddingLeft:n},children:[e?o.jsx(kn,{icon:o.jsx(pm,{className:"size-4"}),label:"Open navigation",size:"sm",variant:"ghost",onClick:r}):t?null:o.jsx(kn,{icon:o.jsx(pm,{className:"size-4"}),label:"Expand sidebar",size:"sm",variant:"ghost",onClick:s}),o.jsx("h1",{className:"min-w-0 flex-1 truncate text-sm font-normal",children:a===void 0?i:o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(re,{label:ks(a),"aria-label":`Back to ${ks(a)}`,variant:"ghost",size:"sm",onClick:()=>l(a.id)}),o.jsx("span",{"aria-hidden":"true",className:"text-muted",children:"›"}),o.jsx("span",{className:"truncate",children:i})]})}),c?o.jsx(kn,{icon:o.jsx(h7,{className:"size-4"}),label:"Changes",size:"sm",variant:"ghost",onClick:u}):null,o.jsxs("span",{className:"relative",children:[o.jsx(kn,{"aria-pressed":d,icon:o.jsx(mH,{className:"size-4"}),label:"Side panel",size:"sm",tooltip:d?"Hide side panel":"Show side panel",variant:"ghost",onClick:()=>f(!d)}),!d&&h?o.jsx("span",{"aria-label":"Live activity",className:"pointer-events-none absolute right-1 top-1 size-2 rounded-full bg-primary",role:"img"}):null]})]})}function $c({chrome:e,icon:t,label:n,testId:s}){const r=e==="selector";return o.jsxs("span",{className:`inline-flex h-7 min-w-0 max-w-[16rem] items-center text-sm font-medium ${r?"gap-2 px-3 text-foreground":"gap-1.5 px-2 text-muted"}`,"data-testid":s,children:[o.jsx(t,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}),o.jsx("span",{className:"truncate",children:n}),r?o.jsx(d7,{"aria-hidden":"true",className:"invisible size-4 shrink-0"}):null]})}function Y$({location:e,branch:t,meter:n}){return o.jsxs("span",{className:"flex w-full min-w-0 items-center gap-2",children:[e,t,o.jsx("span",{className:"ml-auto inline-flex shrink-0",children:n})]})}function XQ({value:e,onChange:t,isDisabled:n=!1}){return o.jsx("div",{className:"max-w-full","data-testid":"checkout-strategy-picker",children:o.jsx(Xc,{isLabelHidden:!0,label:"Where to work",placement:"below",isDisabled:n,options:[{value:"worktree",label:"Git worktree",icon:o.jsx(hm,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"})},{value:"local",label:"Project folder",icon:o.jsx(gu,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"})}],size:"sm",startIcon:e==="worktree"?o.jsx(hm,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}):o.jsx(gu,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}),value:e,variant:"ghost",onChange:s=>t(s==="worktree"?"worktree":"local")})})}function Q$({inputRef:e,onFiles:t}){return o.jsx("input",{ref:e,type:"file",accept:"image/*",multiple:!0,hidden:!0,"aria-hidden":!0,tabIndex:-1,onChange:n=>{t([...n.target.files??[]]),n.target.value=""}})}function J$({images:e,pending:t,onRemove:n}){if(!(e.length===0&&!t))return o.jsxs("div",{className:"flex flex-wrap gap-2","data-testid":"composer-attachments",children:[e.map((s,r)=>o.jsx(Zf,{src:Zm(s),alt:`Image ${r+1}`,onRemove:()=>n(r)},r)),t?o.jsx(Zf,{isLoading:!0,alt:"Preparing image"}):null]})}const ZQ=["image/jpeg","image/png","image/gif","image/webp"],Ym=4,YQ=5*1024*1024,QQ=/^[A-Za-z0-9+/]*={0,2}$/;function JQ(e){if(e.length>Ym)return`At most ${Ym} images per message`;for(let t=0;t<e.length;t++){const n=e[t];if(!ZQ.includes(n.mimeType))return`Unsupported image type: ${n.mimeType} (use JPEG, PNG, GIF or WebP)`;if(n.data===""||n.data.length%4!==0||!QQ.test(n.data))return`Image ${t+1} is not valid base64`;const s=n.data.endsWith("==")?2:n.data.endsWith("=")?1:0;if(n.data.length*3/4-s>YQ)return`Image ${t+1} is larger than 5 MB`}}const eJ=1568;function tJ(e){const t=new Uint8Array(e);let n="";for(let s=0;s<t.length;s+=32768)n+=String.fromCharCode(...t.subarray(s,s+32768));return btoa(n)}async function nJ(e){let t;try{t=await createImageBitmap(e)}catch{throw new Error(`Couldn't read ${e.name}`)}const n=Math.min(1,eJ/Math.max(t.width,t.height)),s=Math.max(1,Math.round(t.width*n)),r=Math.max(1,Math.round(t.height*n)),i=document.createElement("canvas");i.width=s,i.height=r;const a=i.getContext("2d");a.fillStyle="#ffffff",a.fillRect(0,0,s,r),a.drawImage(t,0,0,s,r),t.close();const l=await new Promise((d,f)=>i.toBlob(h=>h===null?f(new Error(`Couldn't read ${e.name}`)):d(h),"image/jpeg",.85)),c={data:tJ(await l.arrayBuffer()),mimeType:"image/jpeg"},u=JQ([c]);if(u!==void 0)throw new Error(u);return c}function eC(e){const[t,n]=x.useState([]),[s,r]=x.useState(0),[i,a]=x.useState(null),l=x.useRef(e);l.current=e;const c=x.useRef(0),u=x.useRef(0),d=p=>{if(!l.current){a("This model doesn't accept images");return}const m=p.filter(k=>k.type.startsWith("image/"));m.length<p.length&&a("Only images can be attached");const b=Math.max(0,Ym-u.current),y=m.slice(0,b);if(m.length>b?a("At most 4 images per message"):m.length===p.length&&a(null),y.length===0)return;u.current+=y.length;const g=c.current;r(k=>k+y.length),Promise.all(y.map(k=>nJ(k))).then(k=>{c.current===g&&(n(v=>[...v,...k]),r(v=>v-y.length))},k=>{c.current===g&&(u.current-=y.length,a(k instanceof Error?k.message:String(k)),r(v=>v-y.length))})},f=p=>{u.current-=1,n(m=>m.filter((b,y)=>y!==p))},h=()=>{c.current+=1,u.current=0,n([]),r(0),a(null)};return{images:t,pending:s>0,error:i,add:d,remove:f,clear:h}}const tC="pinomad.draft.model";function sJ(e){try{const t=localStorage.getItem(tC);if(t===null)return;const n=JSON.parse(t);if(typeof n.provider=="string"&&typeof n.modelId=="string"&&typeof n.thinkingLevel=="string"&&e.some(s=>s.provider===n.provider&&s.modelId===n.modelId))return n}catch{}}function rJ(e){const[t,n]=x.useState(()=>{var d;const a=sJ(e.models),l=a!==void 0?{provider:a.provider,modelId:a.modelId}:e.defaults.model??(e.models[0]===void 0?void 0:{provider:e.models[0].provider,modelId:e.models[0].modelId}),c=((d=Bs(e.models,l))==null?void 0:d.thinkingLevels)??["off"],u=(a==null?void 0:a.thinkingLevel)??e.defaults.thinkingLevel??"off";return{model:l,level:Im(c,u)}}),s=(a,l)=>{localStorage.setItem(tC,JSON.stringify({...a,thinkingLevel:l}))},r=jF(e.models,e.defaults,t),i=r.level;return{pick:r,setModel:a=>{var c;const l=Im(((c=Bs(e.models,a))==null?void 0:c.thinkingLevels)??["off"],i);n({model:a,level:l}),s(a,l)},setLevel:a=>{n(l=>({...l,level:a})),r.model!==void 0&&s(r.model,a)}}}function Vc({children:e,className:t="",...n}){return o.jsx("div",{className:`prompt-suggestion prompt-suggestion--pill ${t}`.trim(),"data-slot":"prompt-suggestion",...n,children:e})}function iJ({children:e,className:t="",...n}){return o.jsx("div",{className:`prompt-suggestion__items prompt-suggestion__items--pill ${t}`.trim(),"data-slot":"prompt-suggestion-items",...n,children:e})}function aJ({children:e,className:t="",showEndIcon:n=!0,onPress:s,...r}){return o.jsxs("button",{className:`prompt-suggestion__item ${t}`.trim(),"data-slot":"prompt-suggestion-item",type:"button",onClick:s,...r,children:[e,n?o.jsx("span",{"aria-hidden":"true",className:"prompt-suggestion__item-end-icon",children:o.jsx(u7,{size:14})}):null]})}Vc.Items=iJ;Vc.Item=aJ;const oJ=[{Icon:aH,label:"Explain this repo's architecture"},{Icon:g7,label:"Fix the failing test"},{Icon:p7,label:"Add a CLI flag with docs"},{Icon:h7,label:"Review my uncommitted changes"}];function lJ({view:e,remote:t,draft:n,onDraft:s,connected:r}){var S;const[i,a]=x.useState(""),[l,c]=x.useState(!1),u=x.useRef(!1),[d,f]=x.useState("worktree"),h=x.useRef(null),{pick:p,setModel:m,setLevel:b}=rJ(e),y=Bs(e.models,p.model),g=(y==null?void 0:y.images)===!0,{images:k,pending:v,error:w,add:j,remove:$}=eC(g),C=x.useRef(null),E=g||!r?"Add images…":`Add images… (${(y==null?void 0:y.name)??((S=p.model)==null?void 0:S.modelId)??"This model"} can't see images)`,T=n.kind==="project"?o.jsx(XQ,{value:d,onChange:f,isDisabled:!r}):o.jsx($c,{chrome:"selector",icon:Cf,label:"Chat",testId:"composer-location-label"});return o.jsx("section",{className:"flex h-full min-h-0 flex-col items-center overflow-y-auto px-6 py-8","data-testid":"draft-home",children:o.jsxs("div",{className:"mx-auto my-auto flex w-full max-w-[44rem] flex-col items-center justify-center gap-6",children:[o.jsxs("h2",{className:"text-center text-3xl font-normal tracking-tight text-foreground max-lg:text-2xl",children:["Build something useful with ",o.jsx(Kx,{tone:"brand",children:"PiNomad"})]}),o.jsx("div",{className:"flex w-full flex-wrap justify-center gap-2",children:o.jsx(Xc,{isLabelHidden:!0,label:"Project",placeholder:"No project",placement:"below",variant:"ghost",size:"sm",isDisabled:!r,value:n.kind==="chat"?"chat":n.path,startIcon:n.kind==="chat"?o.jsx(Cf,{"aria-hidden":"true",className:"size-4 shrink-0"}):o.jsx(mu,{"aria-hidden":"true",className:"size-4 shrink-0"}),options:[{value:"chat",label:"No project",icon:o.jsx(Cf,{"aria-hidden":"true",className:"size-4 shrink-0"})},...e.organized.projects.map(N=>({value:N.project.path,label:N.project.name,icon:o.jsx(mu,{"aria-hidden":"true",className:"size-4 shrink-0"})}))],onChange:N=>s(N==="chat"?{kind:"chat"}:{kind:"project",path:N})})}),o.jsxs("div",{className:"flex w-full flex-col gap-3",children:[o.jsx(Q$,{inputRef:C,onFiles:j}),o.jsx(Ok,{accent:"brand",accentFocusRing:!0,value:i,inputRef:h,onValueChange:a,triggers:_k(e.agents),status:l?"submitted":"ready",onSubmit:()=>{const N=i.trim();N===""&&k.length===0||v||u.current||($l(),u.current=!0,c(!0),t.controller.createConversation(n,N,{...n.kind==="project"&&d==="local"?{checkout:"project"}:{},...p.model===void 0?{}:{model:p.model},thinkingLevel:p.level,...k.length===0?{}:{images:k}}).finally(()=>{u.current=!1,c(!1)}))},isDisabled:!r,placeholder:"Do anything with Pi",attachments:J$({images:k,pending:v,onRemove:$}),hasAttachments:k.length>0,onFiles:j,error:w,startActions:o.jsxs(o.Fragment,{children:[o.jsx(Va,{button:{label:"More actions",variant:"ghost",size:"sm",isIconOnly:!0,icon:o.jsx(Ko,{"aria-hidden":"true"}),isDisabled:!r},items:[{label:E,isDisabled:!r||!g,onClick:()=>{var N;return(N=C.current)==null?void 0:N.click()}}]}),o.jsx(Tk,{models:e.models,selected:{model:p.model,level:p.level},isDisabled:!r,onModelChange:m,onLevelChange:b})]}),footer:o.jsx(Y$,{location:T})})]}),o.jsx(Vc,{className:"w-full max-w-[35rem]",children:o.jsx(Vc.Items,{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:oJ.map(({Icon:N,label:z})=>o.jsx(Vc.Item,{className:"items-center justify-start",showEndIcon:!1,onPress:()=>{var M;a(z),(M=h.current)==null||M.focusAtEnd()},children:o.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[o.jsx(N,{"aria-hidden":"true",className:"size-4 shrink-0"}),o.jsx("span",{className:"truncate",children:z})]})},z))})})]})})}function cJ({body:e,tag:t,className:n,...s}){return o.jsxs("div",{className:`chat-queued-message flex min-w-0 items-center gap-2 rounded-lg border border-border bg-surface py-1.5 pl-3 pr-2 text-sm ${n??""}`.trim(),"data-testid":"chat-queued-message",...s,children:[o.jsx("p",{className:"chat-queued-message__body min-w-0 flex-1 truncate","data-slot":"queued-message-body",title:e,children:e}),o.jsx("span",{className:"shrink-0 text-xs font-medium text-muted",children:t})]})}const uJ={steer:"Steer",followUp:"Follow-up",write:"Write"};function dJ({items:e}){if(e.length===0)return null;const t=n=>{if(n.imageCount===0)return n.text;const s=`${n.imageCount} ${n.imageCount===1?"image":"images"}`;return n.text===""?s:`${n.text} · ${s}`};return o.jsx("div",{className:"mx-auto mb-3 grid w-full gap-1.5","data-testid":"queued-message-list",children:e.map(n=>o.jsx(cJ,{body:t(n),tag:uJ[n.mode]},n.id))})}function fJ({view:e,remote:t,conversation:n,busy:s,narrow:r}){var S,N;const[i,a]=x.useState(""),l=r7(n),c=uq(n),u=e.connection!=="connected",d=dq(n),f=e.checkout,h=((S=e.home)==null?void 0:S.kind)==="project",p=Bs(e.models,l.model),m=(p==null?void 0:p.images)===!0,{images:b,pending:y,error:g,add:k,remove:v,clear:w}=eC(m),j=x.useRef(null),$=m||u?"Add images…":`Add images… (${(p==null?void 0:p.name)??((N=l.model)==null?void 0:N.modelId)??"This model"} can't see images)`,C=h?f!==void 0?o.jsx($c,{chrome:"selector",icon:hm,label:"Git worktree",testId:"composer-location-label"}):o.jsx($c,{chrome:"selector",icon:gu,label:"Project folder",testId:"composer-location-label"}):o.jsx($c,{chrome:"selector",icon:Cf,label:"Chat",testId:"composer-location-label"}),E=f===void 0?null:o.jsx($c,{chrome:"button",icon:xm,label:f.branch,testId:"composer-branch-label"}),T=z=>{const M=i.trim();M===""&&b.length===0||y||($l(),t.controller.submit(M,z,{images:b}),a(""),w())};return o.jsxs(o.Fragment,{children:[c===""?null:o.jsx(ee,{type:"supporting",children:c}),o.jsx(dJ,{items:d}),o.jsx(Q$,{inputRef:j,onFiles:k}),o.jsx(Ok,{value:i,status:s?"streaming":"ready",isDisabled:u,placeholder:s?"Steer the running turn…":"Ask the agent…",onValueChange:a,onSubmit:()=>T("steer"),triggers:_k(e.agents),onStop:s?()=>void t.controller.abort():void 0,attachments:J$({images:b,pending:y,onRemove:v}),hasAttachments:b.length>0,onFiles:k,error:g,startActions:o.jsxs(o.Fragment,{children:[o.jsx(Va,{button:{label:"More actions",variant:"ghost",size:"sm",isIconOnly:!0,icon:o.jsx(Ko,{"aria-hidden":"true"}),isDisabled:u},items:[{label:$,isDisabled:u||!m,onClick:()=>{var z;return(z=j.current)==null?void 0:z.click()}},{label:"Compact conversation",isDisabled:u,onClick:()=>void t.controller.compact(void 0)}]}),o.jsx(Tk,{models:e.models,selected:{model:l.model,level:l.thinkingLevel??"off"},isDisabled:u,onModelChange:z=>void t.controller.setModel(z),onLevelChange:z=>void t.controller.setThinkingLevel(z)})]}),endActions:s&&(i.trim()!==""||b.length>0)?o.jsx(re,{label:"Follow-up",variant:"ghost",size:r?"md":"sm",tooltip:"Queue after the running turn",isDisabled:u||y,onClick:()=>T("followUp")}):null,footer:o.jsx(Y$,{location:C,branch:E})})]})}function hJ({hostKey:e}){const t=Bx(),{state:n}=t,[s,r]=x.useState(!1),[i,a]=x.useState();if(x.useEffect(()=>t.hostRejected(e),[t,e]),n.status!=="signed-in")return null;const l=n.hosts.find(u=>{var d;return((d=u.stored)==null?void 0:d.hostKey)===e});if(l===void 0)return null;const c=()=>{r(!0),a(void 0),t.pairHost(l.host.hostId).then(u=>{r(!1),u.ok?Ku(u.value.hostKey):a(u.error)})};return o.jsxs(fe,{gap:2,hAlign:"center",children:[o.jsx(re,{label:"Pair again with your account",variant:"primary",isLoading:s,isDisabled:l.host.pairing!=="available",onClick:c}),i===void 0?null:o.jsx(yt,{status:"error",title:"Couldn't pair",description:Xu(i)})]})}const tl=e=>e!==null&&typeof e=="object",nC=new Set(["__proto__","constructor","prototype"]);class Cl extends Error{constructor(n){super(`unsafe path segment: ${String(n)}`);te(this,"segment");this.segment=n,this.name="UnsafePathError"}}function sC(e){if(!Array.isArray(e)||e.length===0)throw new TypeError("op is not a tuple");switch(e[0]){case"r":if(e.length!==2)throw new TypeError("r arity");return;case"s":if(e.length!==3)throw new TypeError("s arity");go(e[1],!0);return;case"d":if(e.length!==2)throw new TypeError("d arity");go(e[1],!0);return;case"a":if(e.length!==3||typeof e[2]!="string")throw new TypeError("a shape");go(e[1],!0);return;case"t":if(e.length!==3||!Number.isInteger(e[2])||e[2]<0)throw new TypeError("t shape");go(e[1],!0);return;case"p":{if(e.length!==5)throw new TypeError("p arity");if(go(e[1]),!Number.isInteger(e[2])||e[2]<0)throw new TypeError("p index");if(!Number.isInteger(e[3])||e[3]<0)throw new TypeError("p remove");if(!Array.isArray(e[4]))throw new TypeError("p items");return}case"m":if(e.length!==3)throw new TypeError("m arity");go(e[1]),xJ(e[2]);return;default:throw new TypeError(`unknown op verb: ${String(e[0])}`)}}function go(e,t=!1){if(!Array.isArray(e))throw new TypeError("path is not an array");if(t&&e.length===0)throw new TypeError("path is empty");rC(e)}function xJ(e){if(!Array.isArray(e))throw new TypeError("m permutation is not an array");const t=new Uint8Array(e.length);for(const n of e){if(!Number.isInteger(n)||n<0||n>=e.length||t[n]!==0)throw new TypeError("m permutation is not a bijection");t[n]=1}}function rC(e){for(const t of e)if(typeof t=="string"){if(nC.has(t))throw new Cl(t)}else if(!Number.isInteger(t)||t<0)throw new Cl(t)}function pJ(e,t){if(t>e.length)throw new Cl(t)}class hs extends Error{constructor(n){super(`unresolvable path: ${JSON.stringify(n)}`);te(this,"path");this.path=n,this.name="PathError"}}function gJ(e,t){let n=e;for(const s of t){if(sC(s),s[0]==="r"){n=s[1];continue}const r=s[1];if(rC(r),s[0]==="p"){const u=r.length===0?n:If(n,r);if(!Array.isArray(u))throw new hs(r);u.splice(s[2],s[3]);const d=1e4;for(let f=0;f<s[4].length;f+=d)u.splice(s[2]+f,0,...s[4].slice(f,f+d));continue}if(s[0]==="m"){const u=r.length===0?n:If(n,r);if(!Array.isArray(u)||u.length!==s[2].length)throw new hs(r);const d=u.slice();for(let f=0;f<s[2].length;f++)u[f]=d[s[2][f]];continue}const i=If(n,r.slice(0,-1)),a=r[r.length-1];if(Array.isArray(i)){if(typeof a!="number")throw new Cl(a);pJ(i,a)}const l=u=>{Object.defineProperty(i,a,{value:u,writable:!0,enumerable:!0,configurable:!0})},c=()=>Object.hasOwn(i,a)?i[a]:void 0;switch(s[0]){case"s":l(s[2]);break;case"d":if(Array.isArray(i)){if(typeof a!="number"||a>=i.length)throw new hs(r);i.splice(a,1)}else delete i[a];break;case"a":{const u=c();if(typeof u!="string")throw new hs(r);l(`${u}${s[2]}`);break}case"t":{const u=c();if(typeof u!="string")throw new hs(r);l(u.slice(s[2]));break}}}return n}function mJ(e,t){return yJ(e,[t])}function yJ(e,t){let n=e;const s=new WeakSet;for(const r of t)for(const i of r){if(sC(i),i[0]==="r"){n=i[1];continue}if(i[0]==="p"){const a=kJ(n,i,s);if(a!==void 0){n=a;continue}}n=iC(n,i[0]==="p"||i[0]==="m"?i[1]:i[1].slice(0,-1),s),n=gJ(n,[i])}return n}function kJ(e,t,n){const[,s,r,i,a]=t;if(i!==0)return;let l=e;for(const f of s){if(!(typeof f=="string"?!nC.has(f)&&tl(l)&&!Array.isArray(l):Number.isInteger(f)&&f>=0&&Array.isArray(l))||!Object.hasOwn(l,f))return;l=l[f]}if(!Array.isArray(l)||n.has(l)||r!==l.length)return;const c=l.concat(a);if(n.add(c),s.length===0)return c;const u=s.slice(0,-1),d=iC(e,u,n);return Object.defineProperty(If(d,u),s[s.length-1],{value:c,writable:!0,enumerable:!0,configurable:!0}),d}function iC(e,t,n){const s=a=>{if(Array.isArray(a))return a.slice();if(!tl(a))throw new hs(t);const l=Object.create(Object.getPrototypeOf(a)===null?null:Object.prototype);for(const c of Object.keys(a))Object.defineProperty(l,c,{value:a[c],writable:!0,enumerable:!0,configurable:!0});return l};if(!tl(e))throw new hs(t);let r;n.has(e)?r=e:(r=s(e),n.add(r));let i=r;for(const a of t){if(!Object.hasOwn(i,a))throw new hs(t);if(Array.isArray(i)&&typeof a!="number")throw new Cl(a);const l=i[a];if(!tl(l))throw new hs(t);if(n.has(l)){i=l;continue}const c=s(l);Object.defineProperty(i,a,{value:c,writable:!0,enumerable:!0,configurable:!0}),n.add(c),i=c}return r}function bJ(e,t){let n=e;for(const s of t){if(!tl(n))throw new hs(t);if(Array.isArray(n)&&typeof s!="number")throw new Cl(s);if(!Object.hasOwn(n,s))throw new hs(t);n=n[s]}return n}function If(e,t){const n=bJ(e,t);if(!tl(n))throw new hs(t);return n}function vJ(e,t){return{label:e,open(n){const s=new URL(e);s.searchParams.set("token",t);const r=new WebSocket(s);return r.onmessage=i=>n.message(String(i.data)),r.onclose=i=>n.closed(i.code),{send:i=>r.send(i),close:()=>r.close()}}}}function wJ(e){return new jJ(e).ready}class Qm extends Error{constructor(){super("Unauthorized: this client is not allowed (wrong token, or the device is not paired or was revoked)"),this.name="UnauthorizedError"}}class aC extends Error{constructor(n,s,r){const i=n>s?"client-older":"host-older";super(i==="client-older"?`Client out of date: the host speaks protocol major ${n}, this client speaks ${s}`:`Host out of date: this client speaks protocol major ${s}, the host speaks ${n}`);te(this,"hostMajor");te(this,"clientMajor");te(this,"hostVersion");te(this,"direction");this.name="ProtocolMismatchError",this.hostMajor=n,this.clientMajor=s,r!==void 0&&(this.hostVersion=r),this.direction=i}}var Tu,rl,Ft,Rt,kr,il,Ph,xa,ii,al,Ms,gn,mn,as,Uh,Fh,sn,zu,Au,ol,Nu,Rs,ll,ai,Mu,cl,H,Jm,oC,Qi,lC,cC,_f,Ji,e0,Of,ss,t0,n0,uC,s0,Xs,mr,ei,tt,nn,Zs,dC,fC,Df,hC,Lf,xC;class jJ{constructor(t){ze(this,H);te(this,"ready");ze(this,Tu);ze(this,rl,new Set);ze(this,Ft,new Map);ze(this,Rt,new Set);ze(this,kr,new Set);ze(this,il,[]);ze(this,Ph,{});ze(this,xa,new Map);ze(this,ii,new Map);ze(this,al);ze(this,Ms);ze(this,gn);ze(this,mn);ze(this,as);ze(this,Uh,1);ze(this,Fh,1);ze(this,sn,0);ze(this,zu,[]);ze(this,Au,{});ze(this,ol);ze(this,Nu,0);ze(this,Rs,!1);ze(this,ll,!1);ze(this,ai,Promise.resolve());ze(this,Mu);ze(this,cl);Se(this,Tu,t),Se(this,al,"transport"in t?t.transport:vJ(t.url,t.token)),this.ready=new Promise((n,s)=>{Se(this,Mu,n),Se(this,cl,s)}),V(this,H,Jm).call(this)}}Tu=new WeakMap,rl=new WeakMap,Ft=new WeakMap,Rt=new WeakMap,kr=new WeakMap,il=new WeakMap,Ph=new WeakMap,xa=new WeakMap,ii=new WeakMap,al=new WeakMap,Ms=new WeakMap,gn=new WeakMap,mn=new WeakMap,as=new WeakMap,Uh=new WeakMap,Fh=new WeakMap,sn=new WeakMap,zu=new WeakMap,Au=new WeakMap,ol=new WeakMap,Nu=new WeakMap,Rs=new WeakMap,ll=new WeakMap,ai=new WeakMap,Mu=new WeakMap,cl=new WeakMap,H=new WeakSet,Jm=function(){const t=G(this,al).open({message:n=>{G(this,Ms)===t&&V(this,H,lC).call(this,JSON.parse(n))},closed:(n,s)=>V(this,H,oC).call(this,t,n,s)});Se(this,Ms,t)},oC=function(t,n,s){if(G(this,Ms)!==t)return;Se(this,Ms,void 0);for(const l of G(this,ii).values())l.reject(new Error("Disconnected from host"));if(G(this,ii).clear(),G(this,gn)===void 0){Se(this,Rs,!0),G(this,cl).call(this,n===Ww?new Qm:new Error(s??`Could not connect to ${G(this,al).label}`));return}if(G(this,Rs))return;if(n===Ww){Se(this,Rs,!0),V(this,H,mr).call(this,{connection:"closed",unauthorized:!0}),V(this,H,ei).call(this,"error",new Qm().message);return}if(n===uF){Se(this,Rs,!0),V(this,H,mr).call(this,{connection:"closed"}),V(this,H,ei).call(this,"error",`The host rejected a malformed frame from this client${s===void 0?"":`: ${s}`}`);return}V(this,H,mr).call(this,{connection:"reconnecting"});const{min:r,max:i}=G(this,Tu).reconnectDelayMs??{min:200,max:2e3},a=Math.min(i,r*2**Ju(this,Nu)._++);setTimeout(()=>{G(this,Rs)||V(this,H,Jm).call(this)},a)},Qi=function(t){var n;(n=G(this,Ms))==null||n.send(JSON.stringify(t))},lC=function(t){var n,s,r;if(!(t===null||typeof t!="object"))switch(t.type){case"hello":{const i=t.protocol,a=typeof i=="number"?i:i!==null&&typeof i=="object"?i.major:void 0;if(a!==Sp.major){const u=new aC(typeof a=="number"?a:Number.NaN,Sp.major,t.hostVersion);Se(this,Rs,!0),G(this,gn)===void 0?G(this,cl).call(this,u):(V(this,H,mr).call(this,{connection:"outdated",protocolMismatch:{hostMajor:u.hostMajor,clientMajor:u.clientMajor,...u.hostVersion===void 0?{}:{hostVersion:u.hostVersion},direction:u.direction}}),V(this,H,ei).call(this,"error",u.message)),(n=G(this,Ms))==null||n.close();return}const l=i!==null&&typeof i=="object"&&typeof i.minor=="number"?i.minor:0;Se(this,sn,l),Se(this,Nu,0),Se(this,il,t.docs),Se(this,Ph,t.toolPresentations),Se(this,zu,t.models),Se(this,Au,t.defaults??{}),Se(this,ol,t.hostVersion),G(this,kr).clear();const c=new Set(Gw(l));for(const u of Ek)c.has(u)?G(this,Rt).add(u):(G(this,Rt).delete(u),G(this,Ft).delete(u),G(this,kr).delete(u));if(G(this,mn)!==void 0)for(const u of V(this,H,Ji).call(this,G(this,mn)))G(this,Rt).add(u);if(G(this,as)!==void 0)for(const u of V(this,H,Ji).call(this,G(this,as)))G(this,Rt).add(u);for(const u of G(this,Rt))V(this,H,Qi).call(this,{type:"subscribe",stream:u});G(this,gn)!==void 0?(V(this,H,mr).call(this,{session:t.session,toolPresentations:t.toolPresentations,connection:"connected",host:V(this,H,t0).call(this)}),V(this,H,Xs).call(this)):V(this,H,cC).call(this,t,l);return}case"snapshot":if(!G(this,Rt).has(t.stream))return;G(this,Ft).set(t.stream,t.value),G(this,kr).add(t.stream),V(this,H,Xs).call(this);for(const i of((s=G(this,xa).get(t.stream))==null?void 0:s.splice(0))??[])i.resolve();return;case"ops":if(!G(this,Rt).has(t.stream)||!G(this,Ft).has(t.stream))return;G(this,Ft).set(t.stream,mJ(G(this,Ft).get(t.stream),t.ops)),V(this,H,Xs).call(this);return;case"ended":G(this,Rt).delete(t.stream),G(this,Ft).delete(t.stream),G(this,kr).delete(t.stream);for(const i of((r=G(this,xa).get(t.stream))==null?void 0:r.splice(0))??[])i.reject(new Error(`Stream ${t.stream} ended: ${t.reason}`));V(this,H,Xs).call(this);return;case"result":{const i=G(this,ii).get(t.id);G(this,ii).delete(t.id),t.ok?i==null||i.resolve(t.value):i==null||i.reject(new Error(t.error));return}case"notice":V(this,H,ei).call(this,t.level,t.message);return}},cC=function(t,n){Promise.all(Gw(n).map(s=>V(this,H,_f).call(this,s))).then(()=>{Se(this,gn,{session:t.session,organized:{chats:[],projects:[],archived:[]},models:V(this,H,ss).call(this,"models")??t.models,defaults:V(this,H,n0).call(this,t.defaults??{}),notices:[],connection:"connected",docs:[],toolPresentations:t.toolPresentations,devices:[],mcp:null,auth:null,settings:null,agents:null,host:V(this,H,t0).call(this)}),V(this,H,Xs).call(this),G(this,Mu).call(this,{view:V(this,H,dC).call(this),controller:V(this,H,fC).call(this),close:()=>V(this,H,xC).call(this)})})},_f=function(t){return new Promise((n,s)=>{const r=G(this,xa).get(t)??[];r.push({resolve:n,reject:s}),G(this,xa).set(t,r)})},Ji=function(t){return[jp(t),...G(this,il).map(n=>Vw(n.kind,t))]},e0=async function(t){const n=V(this,H,Ji).call(this,t).filter(i=>!G(this,Rt).has(i)),s=V(this,H,Ji).call(this,t).filter(i=>G(this,Rt).has(i)&&!G(this,kr).has(i)),r=Promise.all([...n,...s].map(i=>V(this,H,_f).call(this,i)));for(const i of n)G(this,Rt).add(i),V(this,H,Qi).call(this,{type:"subscribe",stream:i});await r},Of=function(t,n){const s=new Set(n===void 0?[]:V(this,H,Ji).call(this,n));for(const r of V(this,H,Ji).call(this,t))s.has(r)||(G(this,Rt).delete(r),G(this,Ft).delete(r),G(this,kr).delete(r),V(this,H,Qi).call(this,{type:"unsubscribe",stream:r}))},ss=function(t){return G(this,Ft).get(t)},t0=function(){return{protocol:{major:Sp.major,minor:G(this,sn)},...G(this,ol)===void 0?{}:{version:G(this,ol)}}},n0=function(t){const n=V(this,H,ss).call(this,"settings");return n===void 0?t:{...n.defaultModel===null?{}:{model:n.defaultModel},...n.defaultThinkingLevel===null?{}:{thinkingLevel:n.defaultThinkingLevel}}},uC=function(t,n){const s=V(this,H,ss).call(this,"conversations")??[],r=new Map(s.map(a=>[a.id,a.parent]));let i=t;for(let a=0;i!==void 0&&a<8;a++){if(i===n)return!0;i=r.get(i)}return!1},s0=function(t){return G(this,il).flatMap(n=>{const s=Vw(n.kind,t);return G(this,Ft).has(s)?[{kind:n.kind,presentation:n.presentation,value:G(this,Ft).get(s)}]:[]})},Xs=function(){var c;if(G(this,gn)===void 0)return;const t=G(this,mn),n=G(this,as),s=t===void 0?void 0:G(this,Ft).get(jp(t)),r=V(this,H,ss).call(this,"conversations")??[],i=V(this,H,ss).call(this,"index")??{projects:[],conversations:[]},a=((c=V(this,H,ss).call(this,"devices"))==null?void 0:c.devices)??[],l=G(this,Rt).has("tasks")?G(this,Ft).get("tasks"):void 0;V(this,H,mr).call(this,{conversation:s,models:V(this,H,ss).call(this,"models")??G(this,zu),organized:QB(i,r),home:t===void 0?void 0:eq(i,r,t),checkout:t===void 0?void 0:JB(i,r,t),tasks:l,docs:t===void 0?[]:V(this,H,s0).call(this,t),side:n===void 0?void 0:{id:n,conversation:G(this,Ft).get(jp(n)),docs:V(this,H,s0).call(this,n)},devices:a,mcp:V(this,H,ss).call(this,"mcp")??null,auth:V(this,H,ss).call(this,"auth")??null,settings:V(this,H,ss).call(this,"settings")??null,agents:V(this,H,ss).call(this,"agents")??null,defaults:V(this,H,n0).call(this,G(this,Au))})},mr=function(t){G(this,gn)!==void 0&&(Se(this,gn,{...G(this,gn),...t}),!G(this,ll)&&(Se(this,ll,!0),queueMicrotask(()=>{Se(this,ll,!1);for(const n of G(this,rl))n()})))},ei=function(t,n){G(this,gn)!==void 0&&V(this,H,mr).call(this,{notices:[...G(this,gn).notices,{id:Ju(this,Fh)._++,level:t,message:n}].slice(-20)})},tt=function(t,n){var r;if(G(this,Ms)===void 0||((r=G(this,gn))==null?void 0:r.connection)!=="connected")return Promise.reject(new Error("Not connected to the host"));const s=Ju(this,Uh)._++;return new Promise((i,a)=>{G(this,ii).set(s,{resolve:i,reject:a}),V(this,H,Qi).call(this,{type:"call",id:s,method:t,args:n})})},nn=function(t){return Se(this,ai,G(this,ai).then(t).then(()=>{},n=>V(this,H,ei).call(this,"error",n instanceof Error?n.message:String(n)))),G(this,ai)},Zs=function(t){const n=G(this,ai).then(t);return Se(this,ai,n.then(()=>{},()=>{})),n},dC=function(){return{current:()=>G(this,gn),subscribe:t=>(G(this,rl).add(t),()=>G(this,rl).delete(t))}},fC=function(){const t=()=>Array.from(crypto.getRandomValues(new Uint8Array(16)),s=>s.toString(16).padStart(2,"0")).join(""),n=()=>{if(G(this,mn)===void 0)throw new Error("No conversation selected");return G(this,mn)};return{addProject:s=>V(this,H,Zs).call(this,()=>V(this,H,tt).call(this,"addProject",{path:s})),listFolders:s=>V(this,H,Zs).call(this,()=>{if(!Yr(G(this,sn),"listFolders"))throw new Error("The host is too old for this (needs protocol 5.3); run `pinomad upgrade` on the host");return V(this,H,tt).call(this,"listFolders",s===void 0?{}:{path:s})}),removeProject:s=>V(this,H,nn).call(this,()=>V(this,H,tt).call(this,"removeProject",{path:s})),renameConversation:(s,r)=>V(this,H,Zs).call(this,async()=>{if(!Yr(G(this,sn),"renameConversation"))throw new Error("The host is too old for this (needs protocol 5.4); run `pinomad upgrade` on the host");await V(this,H,tt).call(this,"renameConversation",{conversationId:s,title:r})}),createConversation:(s,r,i)=>V(this,H,nn).call(this,async()=>{const a=(i==null?void 0:i.images)??[];if(a.length>0&&!zf(G(this,sn),"images"))throw new Error("The host is too old for images (needs protocol 5.5); run `pinomad upgrade` on the host");const{conversationId:l}=await V(this,H,tt).call(this,"createConversation",{home:s,text:r,requestId:t(),...(i==null?void 0:i.checkout)===void 0?{}:{checkout:i.checkout},...(i==null?void 0:i.model)===void 0?{}:{model:i.model},...(i==null?void 0:i.thinkingLevel)===void 0?{}:{thinkingLevel:i.thinkingLevel},...a.length===0?{}:{images:a}});await V(this,H,Df).call(this,l)}),archive:(s,r)=>V(this,H,nn).call(this,async()=>{await V(this,H,tt).call(this,"archive",{conversationId:s,archived:r}),r&&s===G(this,mn)&&V(this,H,hC).call(this),r&&G(this,as)!==void 0&&V(this,H,uC).call(this,G(this,as),s)&&await V(this,H,Lf).call(this,void 0)}),submit:(s,r,i)=>V(this,H,nn).call(this,()=>{const a=(i==null?void 0:i.images)??[];if(a.length>0&&!zf(G(this,sn),"images"))throw new Error("The host is too old for images (needs protocol 5.5); run `pinomad upgrade` on the host");return V(this,H,tt).call(this,"submit",{conversationId:(i==null?void 0:i.target)??n(),text:s,whenBusy:r,requestId:(i==null?void 0:i.requestId)??t(),...a.length===0?{}:{images:a}})}),compact:s=>V(this,H,nn).call(this,()=>V(this,H,tt).call(this,"compact",{conversationId:n(),...s===void 0?{}:{instructions:s}})),abort:s=>{const r=s??G(this,mn);return r===void 0?(V(this,H,ei).call(this,"error","No conversation selected"),Promise.resolve()):V(this,H,tt).call(this,"abort",{conversationId:r}).then(()=>{},i=>V(this,H,ei).call(this,"error",i instanceof Error?i.message:String(i)))},setThinkingLevel:s=>V(this,H,nn).call(this,()=>V(this,H,tt).call(this,"setThinkingLevel",{conversationId:n(),level:s})),setModel:s=>V(this,H,nn).call(this,()=>V(this,H,tt).call(this,"setModel",{conversationId:n(),model:s})),toggleTasks:()=>V(this,H,nn).call(this,async()=>{if(G(this,Rt).delete("tasks")){V(this,H,Qi).call(this,{type:"unsubscribe",stream:"tasks"}),G(this,Ft).delete("tasks"),V(this,H,Xs).call(this);return}G(this,Rt).add("tasks");const s=V(this,H,_f).call(this,"tasks");V(this,H,Qi).call(this,{type:"subscribe",stream:"tasks"}),await s}),switchConversation:s=>V(this,H,nn).call(this,()=>V(this,H,Df).call(this,s)),showSide:s=>V(this,H,nn).call(this,()=>V(this,H,Lf).call(this,s)),fork:(s,r,i,a)=>V(this,H,nn).call(this,async()=>{const{conversationId:l}=await V(this,H,tt).call(this,"fork",{conversationId:n(),entryId:s,...i===void 0?{}:{removeTools:i}});(a==null?void 0:a.show)==="side"?await V(this,H,Lf).call(this,l):await V(this,H,Df).call(this,l),await V(this,H,tt).call(this,"submit",{conversationId:l,text:r,whenBusy:"followUp",requestId:t()})}),answer:(s,r,i,a)=>V(this,H,nn).call(this,()=>V(this,H,tt).call(this,"answer",{conversationId:a??n(),kind:s,requestId:r,answers:i})),changes:()=>V(this,H,Zs).call(this,()=>V(this,H,tt).call(this,"changes",{conversationId:n()})),createPairing:()=>V(this,H,Zs).call(this,()=>V(this,H,tt).call(this,"createPairing",{})),revokeDevice:s=>V(this,H,nn).call(this,()=>V(this,H,tt).call(this,"revokeDevice",{publicKey:s})),logout:s=>V(this,H,nn).call(this,()=>{if(!Yr(G(this,sn),"logout"))throw new Error("The host is too old for this (needs protocol 5.1); run `pinomad upgrade` on the host");return V(this,H,tt).call(this,"logout",{providerId:s})}),updateSettings:s=>V(this,H,nn).call(this,()=>{if(!Yr(G(this,sn),"updateSettings"))throw new Error("The host is too old for this (needs protocol 5.2); run `pinomad upgrade` on the host");if(s.acceptAccountDevices!==void 0&&!zf(G(this,sn),"acceptAccountDevices"))throw new Error("The host is too old for this (needs protocol 5.8); run `pinomad upgrade` on the host");return V(this,H,tt).call(this,"updateSettings",{patch:s})}),createAgent:s=>V(this,H,Zs).call(this,async()=>{if(!Yr(G(this,sn),"createAgent"))throw new Error("The host is too old for this (needs protocol 5.6); run `pinomad upgrade` on the host");await V(this,H,tt).call(this,"createAgent",{role:s})}),updateAgent:s=>V(this,H,Zs).call(this,async()=>{if(!Yr(G(this,sn),"updateAgent"))throw new Error("The host is too old for this (needs protocol 5.6); run `pinomad upgrade` on the host");await V(this,H,tt).call(this,"updateAgent",{role:s})}),deleteAgent:s=>V(this,H,Zs).call(this,async()=>{if(!Yr(G(this,sn),"deleteAgent"))throw new Error("The host is too old for this (needs protocol 5.6); run `pinomad upgrade` on the host");await V(this,H,tt).call(this,"deleteAgent",{name:s})}),setPushToken:s=>V(this,H,Zs).call(this,async()=>{if(!Yr(G(this,sn),"setPushToken"))throw new Error("The host is too old for this (needs protocol 5.7); run `pinomad upgrade` on the host");await V(this,H,tt).call(this,"setPushToken",{token:s})})}},Df=async function(t){const n=G(this,mn);t!==n&&(await V(this,H,e0).call(this,t),Se(this,mn,t),n!==void 0&&V(this,H,Of).call(this,n,G(this,as)),V(this,H,Xs).call(this))},hC=function(){const t=G(this,mn);t!==void 0&&(Se(this,mn,void 0),V(this,H,Of).call(this,t,G(this,as)),V(this,H,Xs).call(this))},Lf=async function(t){const n=G(this,as);t!==n&&(t!==void 0&&await V(this,H,e0).call(this,t),Se(this,as,t),n!==void 0&&V(this,H,Of).call(this,n,G(this,mn)),V(this,H,Xs).call(this))},xC=function(){var t;G(this,Rs)||(Se(this,Rs,!0),V(this,H,mr).call(this,{connection:"closed"}),(t=G(this,Ms))==null||t.close())};function SJ(e,t){const[n,s]=x.useState({status:"connecting"});return x.useEffect(()=>{let r,i=!1;return wJ({reconnectDelayMs:{min:200,max:2e3},...e}).then(a=>{if(i){a.close();return}r=a,a.controller.toggleTasks(),s({status:"ready",remote:a})},a=>{i||s({status:"failed",error:a instanceof Error?a.message:String(a),unauthorized:a instanceof Qm,...a instanceof aC?{mismatch:a}:{}})}),()=>{i=!0,r==null||r.close()}},[t]),n}function $J(e){return x.useSyncExternalStore(e.view.subscribe,e.view.current)}const CJ={height:"100dvh",width:"100%",backgroundColor:"var(--color-background-body)",color:"var(--color-text-primary)"},EJ={flex:1,minHeight:0};function TJ(){const[e]=x.useState(SU),[t,n]=x.useState();x.useEffect(()=>{let i=!0;return e.list().catch(a=>(console.error("Could not load the paired-host list",a),[])).then(a=>{if(!i)return;const l=localStorage.getItem(vu);n({hosts:a,activeHostKey:l,address:bU(window.location.hash,window.location,a,l)})}),()=>{i=!1}},[e]),x.useEffect(()=>{const i=()=>{window.location.hash!==""&&window.location.reload()};return window.addEventListener("hashchange",i),()=>window.removeEventListener("hashchange",i)},[]);const s=x.useMemo(()=>t===void 0?{store:e,hosts:[],activeHostKey:null,paired:()=>Promise.resolve()}:{store:e,hosts:t.hosts,activeHostKey:t.activeHostKey,paired:async i=>{await e.save(i),localStorage.setItem(vu,i.hostKey),n(a=>a===void 0?a:{...a,hosts:[...a.hosts.filter(l=>l.hostKey!==i.hostKey),i],activeHostKey:i.hostKey})}},[e,t]);if(t===void 0)return o.jsx(El,{children:null});const{address:r}=t;return o.jsx(e9.Provider,{value:s,children:o.jsx(zU,{children:r===void 0?o.jsx(El,{children:o.jsx(zJ,{})}):o.jsx(AJ,{address:r})})})}function zJ(){return Bx().state.status==="unavailable"?o.jsxs(fe,{gap:4,hAlign:"center",style:{width:"100%",maxWidth:420},children:[o.jsx(Si,{title:"No host link",description:"Paste a pairing link from pinomad pair or Devices → Pair a device."}),o.jsx(zm,{})]}):o.jsxs(fe,{gap:6,style:{width:"100%",maxWidth:420},children:[o.jsx(n9,{}),o.jsxs(fe,{gap:2,children:[o.jsx(ee,{type:"supporting",children:"Or paste a pairing link from pinomad pair or Devices → Pair a device."}),o.jsx(zm,{})]})]})}function El({children:e}){const t=a7().reserveMacTrafficLights;return o.jsxs(fe,{style:CJ,isScrollable:!0,children:[t?o.jsx("div",{"aria-hidden":"true",className:"pinomad-drag fixed inset-x-0 top-0 h-10"}):null,o.jsx(fe,{minHeight:"100%",style:{flexShrink:0},hAlign:"center",vAlign:"center",padding:6,children:e})]})}function AJ({address:e}){return e.kind==="token"?o.jsx(gC,{options:e,connectionKey:`${e.url} ${e.token}`,label:e.url}):e.kind==="pair"?o.jsx(NJ,{address:e}):o.jsx(pC,{address:e})}function NJ({address:e}){const[t,n]=x.useState(!1),s=()=>{history.replaceState(null,"",window.location.pathname+window.location.search),window.location.reload()};if(t)return o.jsx(pC,{address:e});const r=new URL(e.url);return o.jsx(El,{children:o.jsxs(fe,{gap:4,hAlign:"center",style:{maxWidth:420},children:[o.jsx(Si,{title:"Pair with this host?",description:`This device will pair with ${r.host}.`}),o.jsx(ee,{type:"supporting",style:{wordBreak:"break-all"},children:e.url}),o.jsxs(we,{gap:2,children:[o.jsx(re,{label:"Cancel",variant:"secondary",onClick:s}),o.jsx(re,{label:"Pair",variant:"primary",onClick:()=>n(!0)})]})]})})}function pC({address:e}){const{store:t,hosts:n,paired:s}=Lx(),r=x.useMemo(()=>n.find(f=>f.hostKey===e.hostKey),[n,e]),[i,a]=x.useState(),l=x.useMemo(()=>e.kind==="pair"&&r!==void 0?Sm(ja(r.privateKey)):e.kind==="device"?Sm(ja(e.privateKey)):kk(),[e,r]),c=x.useMemo(()=>({transport:K7({url:e.url,hostKey:ja(e.hostKey),device:l,...e.kind==="pair"?{pairing:{secret:e.secret,name:Q7(navigator.userAgent)},onPaired:()=>{const f={url:e.url,hostKey:e.hostKey,privateKey:bk(l.privateKey)};s(f).catch(h=>{console.error("Could not save the paired host",h),a(f)}),history.replaceState(null,"",window.location.pathname+window.location.search)}}:{}})}),[e,l,s]),u=e.kind==="pair"?o.jsxs(fe,{gap:4,hAlign:"center",children:[o.jsx(Si,{title:"This pairing code was used or has expired",description:"Generate a new QR on the host: run bun run pair, or open Devices → Pair a device."}),n.length===0?null:o.jsx(re,{label:"Use saved pairing",variant:"secondary",onClick:()=>{history.replaceState(null,"",window.location.pathname+window.location.search),window.location.reload()}})]}):o.jsxs(fe,{gap:4,hAlign:"center",children:[o.jsx(Si,{title:"This device isn't paired",description:"It isn't paired with the host, or was revoked."}),o.jsx(hJ,{hostKey:e.hostKey}),o.jsx(re,{label:"Forget this host",variant:"secondary",onClick:()=>{localStorage.getItem(vu)===e.hostKey&&localStorage.removeItem(vu),t.remove(e.hostKey).finally(()=>window.location.reload())}})]}),d=i===void 0?void 0:o.jsx(yt,{status:"warning",container:"section",title:"This pairing wasn't saved",description:"It will be lost when the app restarts.",endContent:o.jsx(re,{label:"Retry",variant:"ghost",onClick:()=>{s(i).then(()=>a(void 0),f=>console.error("Could not save the paired host",f))}})});return o.jsx(gC,{options:c,connectionKey:`${e.url} ${e.hostKey}`,label:e.url,rejected:u,device:l,notice:d})}function gC({options:e,connectionKey:t,label:n,rejected:s,device:r,notice:i}){const a=SJ(e,t);return a.status==="connecting"?o.jsx(El,{children:o.jsx(Si,{title:"Connecting",description:n})}):a.status==="failed"?o.jsxs(El,{children:[a.mismatch!==void 0?o.jsx(mC,{wsUrl:n,mismatch:a.mismatch}):s!==void 0&&a.unauthorized?s:o.jsx(yt,{status:"error",title:"Could not connect to the host",description:a.error}),o.jsx(a9,{})]}):o.jsx(RJ,{remote:a.remote,wsUrl:n,rejected:s,device:r,notice:i})}const r0="pinomad.reloadedForProtocol";function mC({wsUrl:e,mismatch:t}){var a;const n=y7(),s=((a=window.pinomadDesktop)==null?void 0:a.updates)!==void 0,[r]=x.useState(()=>t.direction==="client-older"&&s||!vU(e,window.location)||sessionStorage.getItem(r0)===String(t.hostMajor)?!1:(sessionStorage.setItem(r0,String(t.hostMajor)),window.location.reload(),!0));if(x.useEffect(()=>{var l,c;t.direction==="client-older"&&((c=(l=window.pinomadDesktop)==null?void 0:l.updates)==null||c.check())},[t.direction]),r)return null;const i=t.hostVersion===void 0?"":` Host version: ${t.hostVersion}.`;return t.direction==="client-older"?o.jsxs(fe,{gap:4,children:[o.jsx(yt,{status:"error",container:"section",title:"Client out of date",description:`The host speaks a newer protocol. ${s?"Update the app.":"Reload the page, or update the app."}${i}`}),s?o.jsx(MJ,{update:n}):null]}):o.jsx(yt,{status:"error",container:"section",title:"Host out of date",description:`This client speaks a newer protocol. Upgrade the host (pinomad upgrade).${i}`})}function MJ({update:e}){if(e===void 0)return o.jsx(ee,{type:"supporting",children:"Checking for updates…"});const{status:t}=e;switch(t.state){case"checking":return o.jsx(ee,{type:"supporting",children:"Checking for updates…"});case"available":case"downloading":{const n=t.progressPercent===void 0?"":` ${Math.round(t.progressPercent)}%`;return o.jsx(ee,{type:"supporting",children:`Downloading PiNomad ${t.availableVersion??""}…${n}`})}case"ready":return o.jsx(re,{label:"Restart to update",variant:"primary",onClick:()=>e.install()});case"error":return o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(ee,{type:"supporting",children:t.message}),o.jsx(re,{label:"Retry",variant:"secondary",onClick:()=>e.check()})]});case"disabled":return o.jsx(ee,{type:"supporting",children:t.reason??"Updates are unavailable in this build."});default:return o.jsx(ee,{type:"supporting",children:`PiNomad ${t.currentVersion} is up to date; no newer release found.`})}}function RJ({remote:e,wsUrl:t,rejected:n,device:s,notice:r}){var _,O,D,L;const i=$J(e),[a,l]=x.useState(!0),[c,u]=x.useState({kind:"chat"});x.useEffect(()=>l(i.conversation===void 0),[(_=i.conversation)==null?void 0:_.conversation.id]),aq(i,q=>{var F;q===((F=i.conversation)==null?void 0:F.conversation.id)?l(!1):e.controller.switchConversation(q)});const f=a?void 0:i.conversation,h=f!==void 0&&zk(f),p=qa("(max-width: 1023px)"),[m,b]=x.useState(!1),[y,g]=x.useState("live"),k=x.useCallback((q,F)=>{g(F),b(!0),e.controller.showSide(q)},[e]),v=x.useCallback(q=>{e.controller.switchConversation(q),e.controller.showSide(void 0),p&&b(!1)},[e,p]),w=f===void 0||(O=t7(i.organized,f.conversation.id))==null?void 0:O.summary.id;x.useEffect(()=>{e.controller.showSide(void 0)},[w]);const j=c.kind==="chat"?"New chat":`New conversation in ${DJ(i.organized,c.path)}`,$=f===void 0||(D=Ar(i.organized,f.conversation.id))==null?void 0:D.summary,C=$==null?void 0:$.parent,E=C===void 0||(L=Ar(i.organized,C))==null?void 0:L.summary,T=($==null?void 0:$.kind)==="conversation",S=x.useCallback(q=>$===void 0?[]:s7(i.organized,$.id,q),[i.organized,$]),N=x.useCallback(q=>{var F;return(F=Ar(i.organized,q))==null?void 0:F.summary},[i.organized]),z=q=>{u(q),l(!0)},[M,R]=x.useState(),[I,A]=x.useState(!1);return x.useEffect(()=>{i.connection==="connected"&&sessionStorage.removeItem(r0)},[i.connection]),i.unauthorized===!0&&n!==void 0?o.jsxs(El,{children:[n,o.jsx(a9,{})]}):o.jsxs(o.Fragment,{children:[o.jsx(VQ,{view:i,remote:e,device:s,narrow:p,drafting:a,draftingChat:a&&c.kind==="chat",draftLabel:j,conversation:f,summary:$,parentSummary:E,banner:o.jsxs(o.Fragment,{children:[r,o.jsx(OJ,{view:i,wsUrl:t})]}),onDraft:z,onOpenChanges:()=>A(!0),panelOpen:m,panelTab:y,onPanelOpen:b,onPanelTab:g,openInPanel:k,openInMain:v,children:f===void 0?o.jsx(lJ,{view:i,remote:e,draft:c,onDraft:z,connected:i.connection==="connected"}):o.jsx(U4,{style:EJ,composer:o.jsx("div",{className:"mx-auto w-full max-w-[44rem]",children:o.jsxs(fe,{gap:1,children:[o.jsx(h$,{docs:i.docs,remote:e,connected:i.connection==="connected"}),o.jsx(fJ,{view:i,remote:e,conversation:f,busy:h,narrow:p})]})}),emptyState:o.jsx(Si,{title:"Nothing here yet",description:"Ask the agent something. Every client sees it."}),children:o.jsx(V$,{conversation:f,toolPresentations:i.toolPresentations,connected:i.connection==="connected",canFork:T,openInPanel:k,onFork:R,forksAt:S,summaryOf:N,onRetry:($==null?void 0:$.kind)==="subagent"?void 0:async({text:q,images:F,requestId:X})=>{$l(),await e.controller.submit(q,"followUp",{requestId:X,images:F})}})},f.conversation.id)}),M===void 0?null:o.jsx(IJ,{entryId:M,remote:e,connected:i.connection==="connected",onClose:()=>R(void 0),onForked:()=>{g("threads"),b(!0)}}),I&&f!==void 0&&o.jsx(_J,{view:i,remote:e,busy:h,onClose:()=>A(!1)})]})}function IJ({entryId:e,remote:t,connected:n,onClose:s,onForked:r}){const[i,a]=x.useState("Continue from here."),l=()=>{$l(),t.controller.fork(e,i.trim(),void 0,{show:"side"}),r(),s()};return o.jsx(vs,{isOpen:!0,onOpenChange:c=>c?void 0:s(),purpose:"form",width:480,children:o.jsx(Qn,{header:o.jsx(ws,{title:"Fork from this answer",subtitle:"The fork sees the conversation up to here and works in the same files.",onOpenChange:()=>s()}),content:o.jsx(Jn,{children:o.jsx(xs,{label:"First message",value:i,onChange:a})}),footer:o.jsx(Ga,{children:o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(re,{label:"Cancel",variant:"secondary",onClick:s}),o.jsx(re,{label:"Fork",variant:"primary",isDisabled:!n||i.trim()==="",onClick:l})]})})})})}function _J({view:e,remote:t,busy:n,onClose:s}){const[r,i]=x.useState(),a=x.useMemo(()=>()=>void t.controller.changes().then(i).catch(()=>{}),[t]);x.useEffect(a,[a]);const l=x.useRef(n);x.useEffect(()=>{l.current&&!n&&a(),l.current=n},[n,a]);const c=e.checkout===void 0;return o.jsx(vs,{isOpen:!0,onOpenChange:u=>u?void 0:s(),width:720,children:o.jsx(Qn,{header:o.jsx(ws,{title:"Changes",onOpenChange:()=>s()}),content:o.jsx(Jn,{children:o.jsx(fe,{gap:2,padding:3,children:r===void 0?o.jsx(ee,{type:"supporting",children:"Loading…"}):r.available?o.jsxs(o.Fragment,{children:[c?o.jsx(ee,{type:"supporting",children:"These are the project directory's uncommitted changes, shared with other conversations working there."}):null,r.truncated?o.jsx(ee,{type:"supporting",children:"The diff is truncated; the rest is not shown."}):null,o.jsx(G$,{patch:r.patch})]}):o.jsx(ee,{type:"supporting",children:r.reason})})}),footer:o.jsx(Ga,{children:o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(re,{label:"Refresh",variant:"secondary",isDisabled:e.connection!=="connected",onClick:a}),o.jsx(re,{label:"Close",variant:"primary",onClick:s})]})})})})}function OJ({view:e,wsUrl:t}){return e.connection==="outdated"?e.protocolMismatch===void 0?null:o.jsx(mC,{wsUrl:t,mismatch:e.protocolMismatch}):e.connection==="reconnecting"?o.jsx(yt,{status:"warning",container:"section",title:"Host connection lost",description:"Reconnecting… the view keeps the last state the host sent."}):e.connection==="closed"?o.jsx(yt,{status:"error",container:"section",title:"Disconnected from the host"}):null}function DJ(e,t){var n;return((n=e.projects.find(s=>s.project.path===t))==null?void 0:n.project.name)??t.split("/").at(-1)??t}$S.createRoot(document.getElementById("root")).render(o.jsx(x.StrictMode,{children:o.jsx(c4,{theme:YB,children:o.jsx(TJ,{})})}));