pinomad 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -59
- package/dist/{chunk-wqvp1fwh.js → chunk-1r8a2434.js} +38 -15
- package/dist/{chunk-ywmm63ks.js → chunk-3p1eysm9.js} +4 -2
- package/dist/{chunk-d5ypmmr7.js → chunk-73vxwjs7.js} +2 -2
- package/dist/chunk-a4b61tx5.js +2984 -0
- package/dist/{chunk-k2s1hfq5.js → chunk-cytnycs9.js} +9 -9
- package/dist/{chunk-3dnnaz4j.js → chunk-ddh6wfv2.js} +8 -8
- package/dist/{chunk-jn7y815x.js → chunk-fes7wjw1.js} +5 -5
- package/dist/chunk-jgd38rna.js +622 -0
- package/dist/{chunk-4btj08we.js → chunk-jjtr7fr5.js} +5608 -2777
- package/dist/{chunk-7qb9tq54.js → chunk-khcpv54k.js} +64 -310
- package/dist/{chunk-7s1f4z4g.js → chunk-mv94ksvb.js} +22 -5
- package/dist/{chunk-367n9je8.js → chunk-p15hqqjz.js} +1 -1
- package/dist/{chunk-c8nxym2z.js → chunk-p56xf1r8.js} +1 -1
- package/dist/{chunk-ggb1taqy.js → chunk-ptjyk94f.js} +5 -5
- package/dist/{chunk-0xh6cy9v.js → chunk-r2ssa2ex.js} +1 -1
- package/dist/chunk-sygeb9qb.js +430 -0
- package/dist/{chunk-b1h374jr.js → chunk-v414b5pp.js} +8 -2
- package/dist/pinomad.js +10 -10
- package/package.json +2 -1
- package/web/assets/index-5DfEA9Zb.js +398 -0
- package/web/assets/index-D6qIPhPy.css +1 -0
- package/web/index.html +2 -2
- package/dist/chunk-d93kvxvc.js +0 -610
- package/dist/chunk-n4tjhcb7.js +0 -257
- package/dist/chunk-znhn8af7.js +0 -33
- package/web/assets/index-C_aU_ZiV.js +0 -383
- package/web/assets/index-DaPcXZPM.css +0 -1
- package/web/assets/montserrat-latin-ext-wght-normal-BsZE-iaG.woff2 +0 -0
- package/web/assets/montserrat-latin-wght-normal-l_AIctKy.woff2 +0 -0
|
@@ -1,383 +0,0 @@
|
|
|
1
|
-
var Q$=Object.defineProperty;var hb=e=>{throw TypeError(e)};var J$=(e,t,n)=>t in e?Q$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ee=(e,t,n)=>J$(e,typeof t!="symbol"?t+"":t,n),m1=(e,t,n)=>t.has(e)||hb("Cannot "+n);var G=(e,t,n)=>(m1(e,t,"read from private field"),n?n.call(e):t.get(e)),ze=(e,t,n)=>t.has(e)?hb("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Se=(e,t,n,s)=>(m1(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),W=(e,t,n)=>(m1(e,t,"access private method"),n);var rd=(e,t,n,s)=>({set _(r){Se(e,t,r,n)},get _(){return G(e,t,s)}});function eE(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 tE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t3={exports:{}},sx={};/**
|
|
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 nE=Symbol.for("react.transitional.element"),sE=Symbol.for("react.fragment");function n3(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:nE,type:e,key:s,ref:t!==void 0?t:null,props:n}}sx.Fragment=sE;sx.jsx=n3;sx.jsxs=n3;t3.exports=sx;var o=t3.exports,s3={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 k0=Symbol.for("react.transitional.element"),rE=Symbol.for("react.portal"),iE=Symbol.for("react.fragment"),aE=Symbol.for("react.strict_mode"),oE=Symbol.for("react.profiler"),lE=Symbol.for("react.consumer"),cE=Symbol.for("react.context"),uE=Symbol.for("react.forward_ref"),dE=Symbol.for("react.suspense"),fE=Symbol.for("react.memo"),r3=Symbol.for("react.lazy"),hE=Symbol.for("react.activity"),xE=Symbol.for("react.view_transition"),xb=Symbol.iterator;function pE(e){return e===null||typeof e!="object"?null:(e=xb&&e[xb]||e["@@iterator"],typeof e=="function"?e:null)}var i3={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},a3=Object.assign,o3={};function Rl(e,t,n){this.props=e,this.context=t,this.refs=o3,this.updater=n||i3}Rl.prototype.isReactComponent={};Rl.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")};Rl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function l3(){}l3.prototype=Rl.prototype;function b0(e,t,n){this.props=e,this.context=t,this.refs=o3,this.updater=n||i3}var v0=b0.prototype=new l3;v0.constructor=b0;a3(v0,Rl.prototype);v0.isPureReactComponent=!0;var pb=Array.isArray;function Xp(){}var Ye={H:null,A:null,T:null,S:null},c3=Object.prototype.hasOwnProperty;function w0(e,t,n){var s=n.ref;return{$$typeof:k0,type:e,key:t,ref:s!==void 0?s:null,props:n}}function gE(e,t){return w0(e.type,t,e.props)}function j0(e){return typeof e=="object"&&e!==null&&e.$$typeof===k0}function mE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var gb=/\/+/g;function y1(e,t){return typeof e=="object"&&e!==null&&e.key!=null?mE(""+e.key):t.toString(36)}function yE(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Xp,Xp):(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 wo(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 k0:case rE:a=!0;break;case r3:return a=e._init,wo(a(e._payload),t,n,s,r)}}if(a)return r=r(e),a=s===""?"."+y1(e,0):s,pb(r)?(n="",a!=null&&(n=a.replace(gb,"$&/")+"/"),wo(r,t,n,"",function(u){return u})):r!=null&&(j0(r)&&(r=gE(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(gb,"$&/")+"/")+a)),t.push(r)),1;a=0;var l=s===""?".":s+":";if(pb(e))for(var c=0;c<e.length;c++)s=e[c],i=l+y1(s,c),a+=wo(s,t,n,i,r);else if(c=pE(e),typeof c=="function")for(e=c.call(e),c=0;!(s=e.next()).done;)s=s.value,i=l+y1(s,c++),a+=wo(s,t,n,i,r);else if(i==="object"){if(typeof e.then=="function")return wo(yE(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 id(e,t,n){if(e==null)return e;var s=[],r=0;return wo(e,s,"","",function(i){return t.call(n,i,r++)}),s}function kE(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 mb=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 u3(e){var t=Ye.T,n={};n.types=t!==null?t.types:null,Ye.T=n;try{var s=e(),r=Ye.S;r!==null&&r(n,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(Xp,mb)}catch(i){mb(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),Ye.T=t}}function d3(e){var t=Ye.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else u3(d3.bind(null,e))}var bE={map:id,forEach:function(e,t,n){id(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return id(e,function(){t++}),t},toArray:function(e){return id(e,function(t){return t})||[]},only:function(e){if(!j0(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ke.Activity=hE;ke.Children=bE;ke.Component=Rl;ke.Fragment=iE;ke.Profiler=oE;ke.PureComponent=b0;ke.StrictMode=aE;ke.Suspense=dE;ke.ViewTransition=xE;ke.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ye;ke.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ye.H.useMemoCache(e)}};ke.addTransitionType=d3;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=a3({},e.props),r=e.key;if(t!=null)for(i in t.key!==void 0&&(r=""+t.key),t)!c3.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 w0(e.type,r,s)};ke.createContext=function(e){return e={$$typeof:cE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:lE,_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)c3.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 w0(e,i,r)};ke.createRef=function(){return{current:null}};ke.forwardRef=function(e){return{$$typeof:uE,render:e}};ke.isValidElement=j0;ke.lazy=function(e){return{$$typeof:r3,_payload:{_status:-1,_result:e},_init:kE}};ke.memo=function(e,t){return{$$typeof:fE,type:e,compare:t===void 0?null:t}};ke.startTransition=u3;ke.unstable_useCacheRefresh=function(){return Ye.H.useCacheRefresh()};ke.use=function(e){return Ye.H.use(e)};ke.useActionState=function(e,t,n){return Ye.H.useActionState(e,t,n)};ke.useCallback=function(e,t){return Ye.H.useCallback(e,t)};ke.useContext=function(e){return Ye.H.useContext(e)};ke.useDebugValue=function(){};ke.useDeferredValue=function(e,t){return Ye.H.useDeferredValue(e,t)};ke.useEffect=function(e,t){return Ye.H.useEffect(e,t)};ke.useEffectEvent=function(e){return Ye.H.useEffectEvent(e)};ke.useId=function(){return Ye.H.useId()};ke.useImperativeHandle=function(e,t,n){return Ye.H.useImperativeHandle(e,t,n)};ke.useInsertionEffect=function(e,t){return Ye.H.useInsertionEffect(e,t)};ke.useLayoutEffect=function(e,t){return Ye.H.useLayoutEffect(e,t)};ke.useMemo=function(e,t){return Ye.H.useMemo(e,t)};ke.useOptimistic=function(e,t){return Ye.H.useOptimistic(e,t)};ke.useReducer=function(e,t,n){return Ye.H.useReducer(e,t,n)};ke.useRef=function(e){return Ye.H.useRef(e)};ke.useState=function(e){return Ye.H.useState(e)};ke.useSyncExternalStore=function(e,t,n){return Ye.H.useSyncExternalStore(e,t,n)};ke.useTransition=function(){return Ye.H.useTransition()};ke.version="19.3.0";s3.exports=ke;var x=s3.exports;const rx=tE(x),f3=eE({__proto__:null,default:rx},[x]);var ic={},yb;function vE(){if(yb)return ic;yb=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.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,g=new Array(arguments.length),b=0;b<arguments.length;b++)g[b]=arguments[b];for(;g.length>0;){var k=g.pop();if(!(k==null||k===!1)){if(Array.isArray(k)){for(var m=0;m<k.length;m++)g.push(k[m]);continue}var y=l!=null?l(k):k;if(y.$$css!=null){var v="";if(p!=null&&p.has(y)){var w=p.get(y);w!=null&&(v=w[0],h=w[2],u.push.apply(u,w[1]),p=w[3])}else{var j=[];for(var C in y){var $=y[C];if(C===t){var E=y[C];E!==!0&&(h=h?E+"; "+h:E);continue}typeof $=="string"||$===null?u.includes(C)||(u.push(C),p!=null&&j.push(C),typeof $=="string"&&(v+=v?" "+$:$)):console.error("styleq: ".concat(C," typeof ").concat(String($),' is not "string" or "null".'))}if(p!=null){var N=new WeakMap;p.set(y,[v,j,h,N]),p=N}}v&&(d=d?v+" "+d:v)}else if(a)f==null&&(f={}),f=Object.assign({},y,f);else{var S=null;for(var A in y){var z=y[A];z!==void 0&&(u.includes(A)||(z!=null&&(f==null&&(f={}),S==null&&(S={}),S[A]=z),u.push(A),p=null))}S!=null&&(f=Object.assign(S,f))}}}var M=[d,f,h];return M}}var s=ic.styleq=n();return s.factory=n,ic}var wE=vE();function q(...e){const[t,n,s]=wE.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 jE={"--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)"},SE={"--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"},ls={"--spacing-1":"var(--spacing-1)","--spacing-2":"var(--spacing-2)"},CE={"--size-element-sm":"28px","--size-element-md":"32px","--size-element-lg":"36px"},$E={"--radius-none":"0px","--radius-inner":"4px","--radius-element":"8px","--radius-container":"12px","--radius-page":"28px","--radius-chat":"28px","--radius-full":"9999px"},EE={"--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)"},NE={"--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"},TE={"--ease-standard":"cubic-bezier(0.24, 1, 0.4, 1)"},zE={"--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"},ME={"--font-weight-normal":"400","--font-weight-medium":"500","--font-weight-semibold":"600","--font-weight-bold":"700"},RE={"--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"},S0=x.createContext(null);S0.displayName="LayoutAreaContext";const _E={hasHeader:!1,hasFooter:!1,hasStart:!1,hasEnd:!1},ix=x.createContext(_E);ix.displayName="LayoutSlotsContext";const ax=x.createContext(null);ax.displayName="LayoutDividerContext";const IE={center:{kGNEyG:"x6s0dn4",$$css:!0},end:{kGNEyG:"xuk3077",$$css:!0},start:{kGNEyG:"x1cy8zhl",$$css:!0},stretch:{kGNEyG:"x1qjc9v5",$$css:!0}},OE={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}},LE={horizontal:{kXwgrk:"x1q0g3np",$$css:!0},vertical:{kXwgrk:"xdt5ytf",$$css:!0}},DE={nowrap:{kwnvtZ:"xozqiw3",$$css:!0},wrap:{kwnvtZ:"x1a02dak",$$css:!0},"wrap-reverse":{kwnvtZ:"x8hhl5t",$$css:!0}},BE={stack:{k1xSpc:"x78zum5",$$css:!0}},qE={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 Zp({crossAlign:e,direction:t,gap:n,mainAlign:s,wrap:r}){return[BE.stack,LE[t],n!=null&&qE[n],e!=null&&IE[e],s!=null&&OE[s],r!=null&&DE[r]]}const HE={reset:{kAzted:"x2lwn1j",k7Eaqz:"xeuugli",$$css:!0}},PE={center:{kSGwAc:"xamitd3",$$css:!0},end:{kSGwAc:"xpvyfi4",$$css:!0},start:{kSGwAc:"xqcrz7y",$$css:!0},stretch:{kSGwAc:"xkh2ocl",$$css:!0}},UE={fill:{kzQI83:"x1iyjqo2",$$css:!0},static:{kzQI83:"x1c4vz4f",kmuXW:"x2lah0s",$$css:!0}};function FE({crossAlignSelf:e,size:t}={}){return[HE.reset,UE[t??"static"],e!=null&&PE[e]]}function C0(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 GE(e,t){return e!=null?`id:${e}`:`fallback:${typeof t=="function"?t():t}`}function ad(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 F(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=ad(e,typeof t=="string"?{className:t}:t??{});return typeof n=="string"?a=ad(a,{className:n}):n!=null&&(a=ad(a,{style:n})),s!=null&&(a=ad(a,{style:s})),a}function rt(...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 ox(...e){return t=>{for(const n of e)if(n==null||n(t),t.defaultPrevented)return}}const $0="astryx",h3=$0,lx=$0,VE=$0;function Yp(e){return`${h3}-${e}`}function Cn(e){return`data-${lx}-${e}`}function WE(e){return`--${VE}-${e}`}function KE(e){return`data-${e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`}function XE(e,t){return/^\d/.test(t)?`${e}-${t}`:t}function ZE(e,t){const n=[Yp(e)];if(t)for(const[s,r]of Object.entries(t))r!=null&&n.push(XE(s,String(r)));return n.join(" ")}function YE(e){const t={};if(e)for(const[n,s]of Object.entries(e))s!=null&&(t[KE(n)]=String(s));return t}function U(e,t){return{className:ZE(e,t),...YE(t)}}function kb(e){const t=e.auxiliaryData;return typeof(t==null?void 0:t.group)=="string"?t.group:void 0}function QE(e){var a;if(!e.some(l=>kb(l)!=null))return[{heading:null,items:e}];const n=[],s=new Map,r=[];for(const l of e){const c=kb(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 ua=null;const Wf=new Map;function JE(){return ua||(ua=new ResizeObserver(e=>{for(const t of e){const n=Wf.get(t.target);n&&n(t)}})),ua}function E0(e,t){Wf.set(e,t),JE().observe(e),t({target:e})}function N0(e){Wf.delete(e),ua&&(ua.unobserve(e),Wf.size===0&&(ua.disconnect(),ua=null))}function k1(e){return e!=null&&typeof e!="boolean"&&e!==""}function bb(...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 x3(e,t=[],n){return{ariaLabelledBy:n?bb(n.labelID,e):void 0,ariaDescribedBy:bb(n==null?void 0:n.describedByIDs,...t)}}const eN={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}},Kf=(e,t,n)=>Math.max(t,Math.min(n,e));function tN(e){return e.split("").map(t=>t+t).join("")}function nN(e){if(typeof e!="string")return null;const t=e.trim().replace(/^#/,""),n=t.length===3||t.length===4?tN(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 sN(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 Kf(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=Kf(c,0,1)}return{r:i,g:a,b:l,a:c}}function vb(e){const t=e.trim(),n=eN[t.toLowerCase()];return n?{...n}:t.startsWith("#")?nN(t):/^rgba?\(/i.test(t)?sN(t):null}function rN(e,t,n){const s=r=>Kf(Math.round(r),0,255).toString(16).padStart(2,"0").toUpperCase();return`#${s(e)}${s(t)}${s(n)}`}function iN({r:e,g:t,b:n,a:s}){if(s>=1)return rN(e,t,n);const r=i=>Kf(Math.round(i),0,255);return`rgba(${r(e)}, ${r(t)}, ${r(n)}, ${parseFloat(s.toFixed(4))})`}function aN(e,t){return`${e}: ${t}`}function va(e,t,...n){}function p3(e,t,...n){console.error(aN(e,t),...n)}function T0(e,t,n,...s){}const oN={kbCHJM:"x1nrll8i",k3aq6I:"xsqj5wx",$$css:!0},pl={mirror:{k3aq6I:"xgtlewx",$$css:!0},centerInline:e=>[oN,{"--x-transform":`translate(-50%, ${e})`!=null?`translate(-50%, ${e})`:void 0}]},g3={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"},_l={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}},Il={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}},Ol={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}},Ll={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}},lN={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}},cN={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}},uN={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}},dN={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}},Kr={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}},fN={kzqmXN:"xh8yej3",kUOVxO:"xvueqy4",$$css:!0},wb={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=>[fN,{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 ac({area:e,children:t}){return t==null?null:o.jsx(S0,{value:e,children:t})}const hN={"x-default-marker":"x-default-marker",$$css:!0};function Rn({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 g=l==="fill",b=t??e,k=x.useMemo(()=>s!=null?{defaultHasDividers:s}:null,[s]),m=a!=null,y=i!=null,v=d!=null,w=r!=null,j=x.useMemo(()=>({hasHeader:m,hasFooter:y,hasStart:v,hasEnd:w}),[m,y,v,w]),C=o.jsx(ix,{value:j,children:o.jsx("div",{ref:u,...F(U("layout",{height:l}),q(Kr.layoutOuter,g?Kr.fill:Kr.auto,f),h,p),children:o.jsxs("div",{...q(hN,Kr.layoutInner,...Zp({direction:"vertical"}),g?Kr.fill:Kr.auto,c===0&&Kr.fullBleed,c!=null&&lN[c],c!=null&&cN[c],n!=null&&wb.contentWidthVar(n)),children:[o.jsx(ac,{area:"header",children:a}),o.jsxs("div",{...q(...Zp({direction:"horizontal"}),Kr.middle,n!=null&&wb.contentWidth(n)),children:[o.jsx(ac,{area:"start",children:d}),o.jsx("div",{...q(...FE({size:"fill"})),children:o.jsx(ac,{area:"content",children:b})}),o.jsx(ac,{area:"end",children:r})]}),o.jsx(ac,{area:"footer",children:i})]})})});return k!=null?o.jsx(ax,{value:k,children:C}):C}Rn.displayName="Layout";const od={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}},xN={sizing:e=>[{kZKoxP:e!=null?"x16ye13r":e,$$css:!0},{"--x-height":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function Xf({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(ax),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,...F(U("layout-header"),q(od.header,xN.sizing(n??null),h&&od.divider,a),l,c),...d,children:o.jsx("div",{...q(od.inner,p&&od.fullBleed,r!=null&&_l[r],r!=null&&Il[r],r!=null&&Ol[r],r!=null&&Ll[r]),children:e})})}Xf.displayName="LayoutHeader";const Es={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}},pN={sizing:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function z0({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(S0),{hasHeader:g,hasFooter:b}=x.use(ix),k=l?l._size:a,m=p==="start",y=p==="end",v=r===0,w=!t&&!v&&r==null,j=m?Es.dividerEnd:y?Es.dividerStart:null,C=m?Es.collapseEnd:y?Es.collapseStart:null;return o.jsx("div",{ref:f,role:i,"aria-label":s,...F(U("layout-panel"),q(Es.panel,pN.sizing(k??null),m&&!v&&r==null&&Es.startPanel,y&&!v&&r==null&&Es.endPanel,!g&&!v&&r==null&&Es.noHeader,!b&&!v&&r==null&&Es.noFooter,n&&Es.scrollable,v&&Es.fullBleed,r!=null&&_l[r],r!=null&&Il[r],r!=null&&Ol[r],r!=null&&Ll[r],t&&j,w&&C,c),u,d),...h,children:e})}z0.displayName="LayoutPanel";const Gi={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 _n({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(ix),g=n===0;return o.jsx("div",{ref:c,role:r,"aria-label":s,...F(U("layout-content"),q(Gi.content,!h&&!g&&n==null&&Gi.noStart,!p&&!g&&n==null&&Gi.noEnd,!d&&!g&&n==null&&Gi.noHeader,!f&&!g&&n==null&&Gi.noFooter,t&&Gi.scrollable,g&&Gi.fullBleed,n!=null&&_l[n],n!=null&&Il[n],n!=null&&Ol[n],n!=null&&Ll[n],i),a,l),...u,children:e})}_n.displayName="LayoutContent";function m3(e){return(e.style.anchorName??"").split(",").map(n=>n.trim()).filter(Boolean)}function y3(e,t){e.style.anchorName=t.join(", ")}function gN(e,t){const n=m3(e);n.includes(t)||(n.push(t),y3(e,n))}function mN(e,t){y3(e,m3(e).filter(n=>n!==t))}const b1={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 yN(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 kN(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 Dl(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 C=u.current;C&&!f.current&&(typeof C.showPopover=="function"?C.showPopover():C.style.display="block",f.current=!0,c(!0),n==null||n())},[n]),p=x.useCallback(()=>{if(f.current){const C=u.current;C&&(typeof C.hidePopover=="function"?C.hidePopover():C.style.display="none"),f.current=!1,c(!1),s==null||s()}},[s]),g=t==="context"?C=>{d.current&&d.current!==C&&mN(d.current,a),C&&gN(C,a),d.current=C}:void 0,b=x.useCallback(C=>{C.newState==="closed"&&f.current&&(f.current=!1,c(!1),s==null||s())},[s]),k=x.useRef(null),m=x.useRef(null),y=x.useCallback((C,$)=>{k.current&&m.current&&(k.current!==C||m.current!==$)&&(k.current.removeEventListener("toggle",m.current),k.current=null,m.current=null),C&&k.current!==C&&(C.addEventListener("toggle",$),k.current=C,m.current=$)},[]),v=x.useCallback(C=>{u.current=C,y(C,b)},[b,y]);x.useEffect(()=>(u.current&&y(u.current,b),()=>{k.current&&m.current&&(k.current.removeEventListener("toggle",m.current),k.current=null,m.current=null)}),[b,y]);const w=x.useCallback((C,$)=>{const{placement:E="above",alignment:N="center",positioning:S="anchor",role:A,"aria-label":z,xstyle:M,className:L,style:R,as:T="div",onMouseEnter:I,onMouseLeave:_}=$||{},O=S==="custom"?{positionAnchor:a}:{positionAnchor:a,positionArea:yN(E,N),positionTryFallbacks:kN(E,N)},D=q(b1.base,M),B=L?`${L} ${D.className??""}`:D.className;return o.jsx(T,{ref:v,id:i,role:A,"aria-label":z,popover:r?"auto":"manual",className:B,style:{...D.style,...O,...R},onMouseEnter:I,onMouseLeave:_,children:C})},[a,i,r,v]),j=x.useCallback((C,$)=>{const{x:E,y:N,xstyle:S,className:A,style:z}=$,M={top:N,left:E},L=q(b1.base,b1.fixed,S),R=A?`${A} ${L.className??""}`:L.className;return o.jsx("div",{ref:v,id:i,popover:r?"auto":"manual",className:R,style:{...L.style,...M,...z},children:C})},[v,i,r]);return t==="context"?{ref:g,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 or={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}},bN=100,v1={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 vN(e){return e.hasAttribute("tabindex")?e.tabIndex>=0:["A","BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)?!e.disabled:!!e.isContentEditable}function js(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"?v1.marginBlock:v1.marginInline,h=Dl({mode:"context",onShow:u,onHide:d}),p=x.useMemo(()=>[v1.container,f],[f]),g=x.useRef(null),b=x.useRef(null),k=x.useRef(null),m=x.useCallback(()=>{g.current&&(clearTimeout(g.current),g.current=null),b.current&&(clearTimeout(b.current),b.current=null)},[]),y=x.useCallback(()=>{!a||l===!1||(m(),g.current=setTimeout(()=>{h.show()},s))},[a,l,m,h,s]),v=x.useCallback(()=>{if(l===!0)return;m();const M=r>0?r:bN;b.current=setTimeout(()=>{h.hide()},M)},[l,m,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||y()},[y]),C=x.useCallback(()=>{v()},[v]),$=x.useCallback(M=>{!a||!M.target.matches(":focus-visible")||(m(),h.show())},[a,m,h]),E=x.useCallback(()=>{v()},[v]),N=x.useCallback(()=>{l===void 0&&(m(),h.hide())},[l,m,h]),S=x.useCallback(M=>{k.current&&(k.current.removeEventListener("mouseenter",j),k.current.removeEventListener("mouseleave",C),k.current.removeEventListener("focusin",$),k.current.removeEventListener("focusout",E),k.current.removeEventListener("pointerdown",N)),M&&(M.addEventListener("mouseenter",j),M.addEventListener("mouseleave",C),M.addEventListener("pointerdown",N),(i==="always"||i==="auto"&&vN(M))&&(M.addEventListener("focusin",$),M.addEventListener("focusout",E))),k.current=M},[i,j,C,$,E,N]),A=x.useCallback(M=>{h.ref(M),S(M)},[h,S]);x.useEffect(()=>()=>{m()},[m]),x.useEffect(()=>{c&&h.show()},[]),x.useEffect(()=>{l!==void 0&&(l?(m(),h.show()):(m(),h.hide()))},[l,m,h]),x.useEffect(()=>{if(l!==void 0)return;const M=L=>{L.key==="Escape"&&(L.isComposing||L.keyCode===229||(m(),h.hide()))};return document.addEventListener("keydown",M),()=>{document.removeEventListener("keydown",M)}},[l,h,m]);const z=x.useCallback((M,L)=>{const R=(L==null?void 0:L.placement)??t,T={placement:R,alignment:(L==null?void 0:L.alignment)??n,role:"tooltip",xstyle:[p,or[R]],className:U("tooltip").className,onMouseEnter:w,onMouseLeave:v};return h.render(o.jsx("div",{className:"xfsso4q xy143xn x12gdq22 x1djylfy xw5ewwj x13faqbe",children:M}),T)},[h,t,n,p,w,v]);return{ref:A,positionRef:h.ref,interactionRef:S,anchorId:h.anchorId,describedBy:h.id,renderTooltip:z}}const A0={"--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)"},wN={"--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)"},jN={...A0,...wN},k3=new Map;function SN(e){k3.set(e.name,e)}function b3(e){return e==null||e===""?null:k3.get(e)??null}const CN={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 jb(e,t){const n=CN[e];return n?n.filter(s=>s.property===t):[]}function v3(e){return`[data-${lx}-theme="${e}"]`}const w3=`[data-${lx}-theme]`;function Sb(e){return`[data-${lx}-media="${e}"]`}function Ho(e,t){return`.${h3}-${e}${t}`}function j3(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 Zf(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const ld=new Set(["padding","paddingBlock","paddingInline","paddingBlockStart","paddingBlockEnd","paddingInlineStart","paddingInlineEnd"]);function $N(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 EN(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 NN(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&&TN(e.components,t),zN(s,t),AN(e.components||{},t),RN(e.components||{},t),t}function TN(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=C0(r),c=Ho(n,l),u=[],d=[];for(const[g,b]of a)g.startsWith(":")&&typeof b=="object"?d.push([g,b]):u.push([g,b]);let f=u;const h=[];let p=!1;for(const[g,b]of u){const k=jb(n,g),m=ld.has(g)&&g!=="padding"?jb(n,"padding"):[];for(const y of[...k,...m])if(y.expand==="container"&&ld.has(g)&&(p=!0),y.vars)for(const v of y.vars)h.push([v,b])}if(p){const g=u.filter(([y])=>ld.has(y)),b=u.filter(([y])=>!ld.has(y)),k=$N(g),m=EN(n,k);f=[...b,...m]}if(h.length>0&&(f=[...f,...h]),f.length>0){const g=f.map(([b,k])=>` ${Zf(b)}: ${k};`).join(`
|
|
21
|
-
`);t.push(` ${c} {
|
|
22
|
-
${g}
|
|
23
|
-
}`)}for(const[g,b]of d){const k=Object.entries(b);if(k.length>0){const m=k.map(([y,v])=>` ${Zf(y)}: ${v};`).join(`
|
|
24
|
-
`);t.push(` ${j3(c,g)} {
|
|
25
|
-
${m}
|
|
26
|
-
}`)}}}}function zN(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 AN(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(` ${Ho("text",`.${a}`)} { color: ${l}; }`),r&&t.push(` ${Ho("heading",`.${a}`)} { color: ${l}; }`),i&&t.push(` ${Ho("link",`.${a}`)} { color: ${l}; }`)}const MN={"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 RN(e,t){if("text"in e)for(const[n,s]of Object.entries(MN)){const r=C0(`size:${n}`);t.push(` ${Ho("text",r)} { font-size: ${s}; }`)}}function _N(e){const t=NN(e),n=[],s=[];for(const r of t)r.trimStart().startsWith(":where(")?n.push(r):s.push(r);return{component:s,prose:n}}function IN(e){const t=[],n=v3(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(` ${Sb(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=C0(u),p=`:is(${Sb(r)}) :is(${Ho(l,h)})`,g=[],b=[];for(const[k,m]of f)k.startsWith(":")&&typeof m=="object"?b.push([k,m]):g.push([k,m]);if(g.length>0){const k=g.map(([m,y])=>` ${Zf(m)}: ${y};`).join(`
|
|
55
|
-
`);t.push(` ${p} {
|
|
56
|
-
${k}
|
|
57
|
-
}`)}for(const[k,m]of b){const y=Object.entries(m);if(y.length>0){const v=y.map(([w,j])=>` ${Zf(w)}: ${j};`).join(`
|
|
58
|
-
`);t.push(` ${j3(p,k)} {
|
|
59
|
-
${v}
|
|
60
|
-
}`)}}}}if(t.length===0)return"";const s=t.join(`
|
|
61
|
-
|
|
62
|
-
`);return`@scope (${n}) to (${w3}) {
|
|
63
|
-
${s}
|
|
64
|
-
}`}function ON(e){const{component:t,prose:n}=_N(e),s=v3(e.name),r=w3;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=IN(e);return l&&(a=a?`${a}
|
|
73
|
-
|
|
74
|
-
${l}`:l),{prose:i,component:a}}const S3={...jE,...SE,...CE,...$E,...EE,...NE,...TE,...zE,...AE,...ME,...RE,...jN};function LN(e){return`var(${e})`}Object.fromEntries(Object.keys(S3).map(e=>[e,LN(e)]));function M0(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 DN(e){const t=e.trim(),n="light-dark(";if(!t.startsWith(n)||!t.endsWith(")"))return null;const s=t.slice(n.length,-1);return M0(s)}function w1(e,t){if(Array.isArray(e))return t==="dark"?e[1]:e[0];const n=DN(e);return n!==null?t==="dark"?n[1]:n[0]:e}function C3(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 Cb(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 BN(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=M0(s);if(r===null)return null;const i=Cb(r[0]),a=Cb(r[1]);if(i===null||a===null)return null;const l=vb(i.color),c=vb(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,g=f<100?f/100:1,b=h*l.a+p*c.a,k=(j,C)=>h*j*l.a+p*C*c.a,m=k(l.r,c.r),y=k(l.g,c.g),v=k(l.b,c.b),w=b===0?{r:0,g:0,b:0}:{r:m/b,g:y/b,b:v/b};return iN({...w,a:b*g})}function Qp(e){const t=e.indexOf("color-mix(");if(t===-1)return e;const n=t+9,s=C3(e,n);if(s===-1)return e;const r=Qp(e.slice(n+1,s)),a=BN(r)??`color-mix(${r})`;return e.slice(0,t)+a+Qp(e.slice(s+1))}function Jp(e,t,n,s){const r=e.indexOf("var(");if(r===-1)return e;const i=r+3,a=C3(e,i);if(a===-1)return e;const l=e.slice(i+1,a),c=M0(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=$3(u,t,n,s),s.delete(u)):d!==null?f=Jp(d.trim(),t,n,s):f=e.slice(r,a+1);const h=Jp(e.slice(a+1),t,n,s);return e.slice(0,r)+f+h}function qN(e,t,n,s){if(!e.includes("var(")&&!e.includes("color-mix("))return e;const r=Jp(e,t,n,s);return Qp(r)}function $3(e,t,n,s){if(e in n)return n[e];const r=t[e];if(r===void 0)return"";const i=qN(r,t,n,s);return n[e]=i,i}function $b(e){const t={};for(const n of Object.keys(e))$3(n,e,t,new Set);return t}function HN(e,t){const{mode:n}=t,s={};for(const[r,i]of Object.entries(S3))s[r]=w1(i,n);if(e==null)return $b(s);for(const[r,i]of Object.entries(e.tokens))s[r]=w1(i,n);if(e.__inputTokens)for(const[r,i]of Object.entries(e.__inputTokens))i!==void 0&&(s[r]=w1(i,n));return $b(s)}function Wa(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 cx=x.createContext(null);cx.displayName="ThemeContext";function PN(){if(typeof document>"u")return null;const e=document.documentElement.getAttribute("data-theme");return e==="light"||e==="dark"?e:null}function UN(){return null}function FN(){return typeof document>"u"?null:document.documentElement.getAttribute(Cn("theme"))}function GN(){return null}function E3(){return null}const wc=new Set;let oc=null;const jc=new Set;let lc=null;function VN(){for(const e of wc)e()}function WN(e){return wc.add(e),wc.size===1&&typeof MutationObserver<"u"&&(oc=new MutationObserver(VN),oc.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})),()=>{wc.delete(e),wc.size===0&&oc&&(oc.disconnect(),oc=null)}}function KN(){for(const e of jc)e()}function XN(e){return jc.add(e),jc.size===1&&typeof MutationObserver<"u"&&(lc=new MutationObserver(KN),lc.observe(document.documentElement,{attributes:!0,attributeFilter:[Cn("theme")]})),()=>{jc.delete(e),jc.size===0&&lc&&(lc.disconnect(),lc=null)}}function N3(){return()=>{}}function ZN(e){return x.useSyncExternalStore(e?N3:WN,e?E3:PN,UN)}function T3(e){return x.useSyncExternalStore(e?N3:XN,e?E3:FN,GN)}function z3(){const e=x.use(cx),t=e!=null,n=T3(t);return(e==null?void 0:e.theme.name)??n}function ux(){const e=x.use(cx),t=e!=null,n=ZN(t),s=T3(t),r=Wa("(prefers-color-scheme: dark)"),i=(e==null?void 0:e.mode)??n??"system",a=(e==null?void 0:e.theme)??b3(s),l=i==="system"?r?"dark":"light":i,c=x.useMemo(()=>HN(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 YN="modulepreload",QN=function(e){return"/"+e},Eb={},A3=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=QN(c),c in Eb)return;Eb[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":YN,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)})},R0={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}},JN={normal:{k63SB2:"x1sodnla",$$css:!0},medium:{k63SB2:"x1e4wzip",$$css:!0},semibold:{k63SB2:"x2mo6ok",$$css:!0},bold:{k63SB2:"x1lvx875",$$css:!0}},M3={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}},_0={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}},eT={"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}},tT={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}},R3={inline:{k1xSpc:"xt0psk2",$$css:!0},block:{k1xSpc:"x1lliihq",$$css:!0}},Yf={singleLine:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",k1xSpc:"x1lliihq",$$css:!0},multiLine:{kVQacm:"xb3r6kr",k1xSpc:"x104kibb",kgKLqz:"x1ua5tub",$$css:!0}},_3={"break-word":{kTgw9:"x1lldw8n",kHjlTd:"x1mzt3pk",$$css:!0},"break-all":{kTgw9:"x1yn0g08",$$css:!0}},I3={wrap:{kN2L0X:"xk4td0m",$$css:!0},nowrap:{kN2L0X:"xebhuq6",$$css:!0},balance:{kN2L0X:"x1w2vvpw",$$css:!0},pretty:{kN2L0X:"x1fzhlzt",$$css:!0}},O3={enabled:{kxwWH2:"x1b2iylo",kzeHkT:"xwgcxoh",k1xSpc:"x1lliihq",$$css:!0}},L3={strikethrough:{kybGjl:"xmqliwb",$$css:!0}},nT={enabled:{kcqcaj:"xss6m8b",$$css:!0}},D3={start:{k9WMMc:"x1yc453h",$$css:!0},center:{k9WMMc:"x2b8uid",$$css:!0},end:{k9WMMc:"xp4054r",$$css:!0}},B3={content:{ks0D6T:"xw5ewwj",kTgw9:"x13faqbe",$$css:!0}};function q3(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&&N0(a.current),a.current=u,u&&t>0?typeof ResizeObserver<"u"?E0(u,()=>{l(u)}):l(u):(s(!1),i(""))},[t,l]),isTruncated:n,fullText:r}}const sT=x.lazy(async()=>A3(()=>Promise.resolve().then(()=>y4),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 _0?e:"body"}function H3(e){return e in R0?e:"primary"}function se({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:g,style:b,as:k="span",children:m,ref:y,...v}){const w=n??rT[e]??"primary",j=iT(e),C=H3(w),$=l??(i===1?"break-all":"break-word"),E=i>0||d?"block":r,N=q3({maxLines:i}),S=typeof a=="string"?a:"above",A=i>0&&a!==!1&&N.isTruncated,z=x.useRef(null),M=i>1?{WebkitLineClamp:i}:void 0;return o.jsxs(o.Fragment,{children:[o.jsx(k,{ref:rt(y,N.ref,z),...F(U("text",{type:e,size:t,color:w}),q(R0[C],_0[j],t&&eT[t],M3[j],s&&JN[s],i===1?Yf.singleLine:i>1?Yf.multiLine:R3[E],i>0&&_3[$],c&&I3[c],u!=="start"&&D3[u],d&&O3.enabled,f&&L3.strikethrough,h&&nT.enabled,p),g,{...b,...M}),title:A?N.fullText:void 0,...v,children:m}),A&&o.jsx(x.Suspense,{fallback:null,children:o.jsx(sT,{anchorRef:z,content:o.jsx("span",{...q(B3.content),children:N.fullText}),placement:S})})]})}se.displayName="Text";const aT=.75,Nb=1.5,Tb={sm:{diameter:10,border:2},md:{diameter:14,border:3},lg:{diameter:18,border:3},xl:{diameter:28,border:4}},zb={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}=ux();x.useEffect(()=>{const w=d.current;if(w==null)return;const j=w.getContext("2d");if(!j)return;const{border:C,diameter:$}=Tb[e],E=window.devicePixelRatio||1,N=t==="inherit"?getComputedStyle(w).color:null,S=t==="inherit"?N:t==="onMedia"?f["--color-on-dark"]:t==="subtle"?f["--color-text-secondary"]:f["--color-accent"],A=t==="inherit"?N:t==="onMedia"?`${f["--color-on-dark"]}4D`:f["--color-track"],z=$+C*2,M=Math.round(z*E),L=M+M%2,R=L/z,T=$/2*R,I=C*R;w.height=w.width=L,w.style.width=w.style.height=z+"px",j.lineCap="round",j.lineWidth=I;const _=L/2;j.beginPath(),j.arc(_,_,T,0,2*Math.PI),j.strokeStyle=A,t==="inherit"&&(j.globalAlpha=.3),j.stroke(),j.globalAlpha=1,j.beginPath(),j.arc(_,_,T,Nb*Math.PI,(Nb+aT)%2*Math.PI),j.strokeStyle=S,j.stroke()},[t,e,f]);const{border:h,diameter:p}=Tb[e],g=p+h*2,b=n!=null,k=x.useId(),m=b&&typeof n=="string"&&a==null,y=a??(typeof n=="string"?n:void 0)??"Loading",v=o.jsx("span",{ref:b?void 0:c,role:"status","aria-label":m?void 0:y,"aria-labelledby":m?k:void 0,"data-testid":b?void 0:l,...b?{}:u,...F(b?"":U("spinner",{size:e,shade:t}),q(zb.spinner,!b&&s),b?void 0:r,{...b?{}:i,width:g,height:g}),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,...F(U("spinner",{size:e,shade:t}),q(zb.wrapper,s),r,i),children:[v,typeof n=="string"?o.jsx(se,{id:k,type:"body",weight:"bold",children:n}):n]}):v}on.displayName="Spinner";function Oi({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)}Oi.displayName="VisuallyHidden";const Qf="data-astryx-edge-comp",oT={keTefX:"x1kftj4p",k71WvV:"x92e2el",$$css:!0},lT={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})`)}]},I0=x.createContext(null);I0.displayName="SizeContext";function Ka(e,t="md"){const n=x.use(I0);return e??n??t}I0.Provider;const P3=x.createContext(null);P3.displayName="ButtonGroupContext";function cT(){return x.use(P3)}const U3=x.createContext(null);U3.displayName="LinkContext";function uT(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 Li(e){const t=x.use(U3),n=e??(t==null?void 0:t.component)??"a";return x.useMemo(()=>n==="a"?"a":uT(n),[n])}const F3=x.createContext({locale:"en",direction:"ltr",messages:{}});F3.displayName="InternationalizationContext";function j1(e,t){const n=t&&t.cache?t.cache:mT,s=t&&t.serializer?t.serializer:pT;return(t&&t.strategy?t.strategy:hT)(e,{cache:n,serializer:s})}function dT(e){return e==null||typeof e=="number"||typeof e=="boolean"}function fT(e,t,n,s){const r=dT(s)?s:n(s);let i=t.get(r);return typeof i>"u"&&(i=e.call(this,s),t.set(r,i)),i}function G3(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 V3(e,t,n,s,r){return n.bind(t,e,s,r)}function hT(e,t){const n=e.length===1?fT:G3;return V3(e,this,n,t.cache.create(),t.serializer)}function xT(e,t){return V3(e,this,G3,t.cache.create(),t.serializer)}const pT=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 mT={create:function(){return new gT}},S1={variadic:xT},yT=/(?:[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(yT,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 bT=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function vT(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");const t=e.split(bT).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 wT(e){return e.replace(/^(.*?)-/,"")}const Ab=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,W3=/^(@+)?(\+|#+)?[rs]?$/g,jT=/(\*)(0+)|(#+)(0+)|(0+)/g,K3=/^(0+)$/;function Mb(e){const t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(W3,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 X3(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 ST(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)),!K3.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Rb(e){const t={},n=X3(e);return n||t}function CT(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=wT(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,...Rb(a)}),{})};continue;case"engineering":t={...t,notation:"engineering",...n.options.reduce((i,a)=>({...i,...Rb(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(jT,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(K3.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(Ab.test(n.stem)){if(n.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");n.stem.replace(Ab,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,...Mb(i)});continue}if(W3.test(n.stem)){t={...t,...Mb(n.stem)};continue}const s=X3(n.stem);s&&(t={...t,...s});const r=ST(n.stem);r&&(t={...t,...r})}return t}let $T=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 _b(e){return e.type===0}function ET(e){return e.type===1}function Z3(e){return e.type===2}function Y3(e){return e.type===3}function Q3(e){return e.type===4}function J3(e){return e.type===5}function e4(e){return e.type===6}function NT(e){return e.type===7}function t4(e){return e.type===8}function n4(e){return!!(e&&typeof e=="object"&&e.type===0)}function eg(e){return!!(e&&typeof e=="object"&&e.type===1)}const s4=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,cc={"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 TT(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=zT(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 zT(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),(cc[`${n}-${s}`]||cc[s||""]||cc[n||""]||cc[`${n}-001`]||cc["001"])[0].charAt(0)}const AT=new RegExp(`^${s4.source}*`),MT=new RegExp(`${s4.source}*$`);function Me(e,t){return{start:e,end:t}}const RT=!!Object.fromEntries,_T=!!String.prototype.trimStart,IT=!!String.prototype.trimEnd,Ib=RT?Object.fromEntries:function(t){const n={};for(const[s,r]of t)n[s]=r;return n},OT=_T?function(t){return t.trimStart()}:function(t){return t.replace(AT,"")},LT=IT?function(t){return t.trimEnd()}:function(t){return t.replace(MT,"")},Ob=new RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");function DT(e,t){return Ob.lastIndex=t,Ob.exec(e)[1]??""}function BT(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 qT=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=BT(this.message);if(t){const n=this.clonePosition();return this.position=t,{val:[{type:0,value:this.message,location:Me(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:Me(i,this.clonePosition())})}else if(r===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(26,Me(this.clonePosition(),this.clonePosition()))}else if(r===60&&!this.ignoreTag&&tg(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:Me(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()||!tg(this.char()))return this.error(23,Me(a,this.clonePosition()));const l=this.clonePosition();return s!==this.parseTagName()?this.error(26,Me(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:8,value:s,children:i,location:Me(n,this.clonePosition())},err:null}:this.error(23,Me(a,this.clonePosition())))}else return this.error(27,Me(n,this.clonePosition()))}else return this.error(23,Me(n,this.clonePosition()))}parseTagName(){const e=this.offset();for(this.bump();!this.isEOF()&&PT(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=Me(n,this.clonePosition());return{val:{type:0,value:s,location:r},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!HT(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,Me(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(2,Me(n,this.clonePosition()));let s=this.parseIdentifierIfPossible().value;if(!s)return this.error(3,Me(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,Me(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:s,location:Me(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,Me(n,this.clonePosition())):this.parseArgumentOptions(e,t,s,n);default:return this.error(3,Me(n,this.clonePosition()))}}parseIdentifierIfPossible(){const e=this.clonePosition(),t=this.offset(),n=DT(this.message,t),s=t+n.length;return this.bumpTo(s),{value:n,location:Me(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,Me(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=LT(f.val);if(h.length===0)return this.error(6,Me(this.clonePosition(),this.clonePosition()));l={style:h,styleLocation:Me(d,this.clonePosition())}}const c=this.tryParseArgumentClose(s);if(c.err)return c;const u=Me(s,this.clonePosition());if(l&&l.style.startsWith("::")){let d=OT(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=TT(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,Me(l,{...l}));this.bumpSpace();let c=this.parseIdentifierIfPossible(),u=0;if(i!=="select"&&c.value==="offset"){if(!this.bumpIf(":"))return this.error(13,Me(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=Me(s,this.clonePosition());return i==="select"?{val:{type:5,value:n,options:Ib(d.val),location:h},err:null}:{val:{type:6,value:n,options:Ib(d.val),offset:u,pluralType:i==="plural"?"cardinal":"ordinal",location:h},err:null}}default:return this.error(5,Me(r,a))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(1,Me(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,Me(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=vT(e)}catch{return this.error(7,t)}return{val:{type:0,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?CT(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=Me(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,Me(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:Me(u,this.clonePosition())}]),a.add(l),this.bumpSpace(),{value:l,location:c}=this.parseIdentifierIfPossible()}return i.length===0?this.error(t==="select"?15:16,Me(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!r?this.error(22,Me(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=Me(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()&&UT(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 tg(e){return e>=97&&e<=122||e>=65&&e<=90}function HT(e){return tg(e)||e===47}function PT(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 UT(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ng(e){e.forEach(t=>{if(delete t.location,J3(t)||e4(t))for(const n in t.options)delete t.options[n].location,ng(t.options[n].value);else Z3(t)&&n4(t.style)||(Y3(t)||Q3(t))&&eg(t.style)?delete t.style.location:t4(t)&&ng(t.children)})}function FT(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};const n=new qT(e,t).parse();if(n.err){const s=SyntaxError($T[n.err.kind]);throw s.location=n.err.location,s.originalMessage=n.err.message,s}return t!=null&&t.captureLocation||ng(n.val),n.val}var dx=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},Lb=class extends dx{constructor(e,t,n,s){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join('", "')}"`,"INVALID_VALUE",s)}},GT=class extends dx{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,"INVALID_VALUE",n)}},VT=class extends dx{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,"MISSING_VALUE",t)}};function WT(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 KT(e){return typeof e=="function"}function df(e,t,n,s,r,i,a){if(e.length===1&&_b(e[0]))return[{type:0,value:e[0].value}];const l=[];for(const c of e){if(_b(c)){l.push({type:0,value:c.value});continue}if(NT(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 VT(u,a);let d=r[u];if(ET(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(Y3(c)){const f=typeof c.style=="string"?s.date[c.style]:eg(c.style)?c.style.parsedOptions:void 0;l.push({type:0,value:n.getDateTimeFormat(t,f).format(d)});continue}if(Q3(c)){const f=typeof c.style=="string"?s.time[c.style]:eg(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]:n4(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(t4(c)){const{children:f,value:h}=c,p=r[h];if(!KT(p))throw new GT(h,"function",a);let g=p(df(f,t,n,s,r,i).map(b=>b.value));Array.isArray(g)||(g=[g]),l.push(...g.map(b=>({type:typeof b=="string"?0:1,value:b})))}if(J3(c)){const f=d,h=(Object.prototype.hasOwnProperty.call(c.options,f)?c.options[f]:void 0)||c.options.other;if(!h)throw new Lb(c.value,d,Object.keys(c.options),a);l.push(...df(h.value,t,n,s,r));continue}if(e4(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 dx(`Intl.PluralRules is not available in this environment.
|
|
75
|
-
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
76
|
-
`,"MISSING_INTL_API",a);const g=typeof d=="bigint"?Number(d):d,b=n.getPluralRules(t,{type:c.pluralType}).select(g-(c.offset||0));h=(Object.prototype.hasOwnProperty.call(c.options,b)?c.options[b]:void 0)||c.options.other}if(!h)throw new Lb(c.value,d,Object.keys(c.options),a);const p=typeof d=="bigint"?Number(d):d;l.push(...df(h.value,t,n,s,r,p-(c.offset||0)));continue}}return WT(l)}function XT(e,t){return t?{...e,...t,...Object.keys(e).reduce((n,s)=>(n[s]={...e[s],...t[s]},n),{})}:e}function ZT(e,t){return t?Object.keys(e).reduce((n,s)=>(n[s]=XT(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 YT(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:j1((...t)=>new Intl.NumberFormat(...t),{cache:C1(e.number),strategy:S1.variadic}),getDateTimeFormat:j1((...t)=>new Intl.DateTimeFormat(...t),{cache:C1(e.dateTime),strategy:S1.variadic}),getPluralRules:j1((...t)=>new Intl.PluralRules(...t),{cache:C1(e.pluralRules),strategy:S1.variadic})}}var Vt,QT=(Vt=class{constructor(t,n=Vt.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=>df(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=Vt.resolveLocale(n),typeof t=="string"){if(this.message=t,!Vt.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const{...i}=r||{};this.ast=Vt.__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=ZT(Vt.formats,s),this.formatters=r&&r.formatters||YT(this.formatterCache)}static get defaultLocale(){return Vt.memoizedDefaultLocale||(Vt.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),Vt.memoizedDefaultLocale}},Vt.memoizedDefaultLocale=null,Vt.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])},Vt.__parse=FT,Vt.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"}}},Vt),JT=QT;const ez={"@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.'}},tz=ez,Db=new Map;function nz(e,t){const n=`${t}::${e}`;let s=Db.get(n);return s===void 0&&(s=new JT(e,t),Db.set(n,s)),s}function sz(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=sz(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=tz[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?(T0(),e):t===void 0?i:nz(i,n).format(t)}function be(){const e=x.use(F3);return x.useCallback((t,n)=>iz(t,n,e.locale,e.messages,e.overrides),[e.locale,e.messages,e.overrides])}const Xr={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}},az={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}},lz={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}},cz={none:{kGVxlE:"x1gnnqk1",$$css:!0},low:{kGVxlE:"x1i5ehqx",$$css:!0},med:{kGVxlE:"x14hfi27",$$css:!0},high:{kGVxlE:"x1kcpxr7",$$css:!0}},uz={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}},Bb={hiddenContent:{kMwMTN:"x19co3pv",$$css:!0},hiddenContentDelayed:{kKVMdj:"x1ffowhz",k44tkh:"xjlvqhv",kWV6AL:"x10e4vud",kKxzle:"x17yabm6 x14q22ui",$$css:!0}},cd={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 ne({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:g,href:b,as:k,target:m,rel:y,xstyle:v,className:w,style:j,ref:C,...$}){const E=be(),N=Ka(n,"md"),S=cT(),[A,z]=x.useTransition(),M=x.useRef(!1),L=i||A,R=A||a,T=(S==null?void 0:S.isDisabled)??!1,I=r||T||L&&!a,_=Li(k),O=b!=null&&!I,D=g!=null&&I,B=js({placement:"above",isEnabled:g!=null}),P=ce=>{var Q;if(I||M.current&&!a){ce.preventDefault();return}(Q=$.onClick)==null||Q.call($,ce),l&&!ce.defaultPrevented&&(M.current=!0,z(async()=>{try{await l(ce)}finally{M.current=!1}}))},V=D?ce=>{var Q;ce.key==="Enter"||ce.key===" "?ce.preventDefault():(Q=$.onKeyDown)==null||Q.call($,ce)}:void 0,Z=t==="ghost"?{[Qf]:""}:null,te=q(Xr.base,oz[N],uz[t],u&&Xr.iconOnly,I&&Xr.disabled,D&&Xr.ariaDisabled,O&&Xr.link,!S&&Xr.pressable,S&&(S.orientation==="horizontal"?cd.horizontal:cd.vertical),S&&(t==="primary"||t==="destructive")&&(S.orientation==="horizontal"?cd.onSolidHorizontal:cd.onSolidVertical),!S&&cz[f],d!=null&&az.width(d),v),J=F(U("button",{variant:t,size:N}),te,w,j),K=o.jsxs(o.Fragment,{children:[L&&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"}}[!!R<<0],"aria-hidden":"true",children:o.jsx(on,{size:"sm",shade:"inherit"})}),o.jsxs("span",{...q(Xr.contentWrapper,L&&(R?Bb.hiddenContentDelayed:Bb.hiddenContent)),"aria-hidden":L||void 0,children:[c&&o.jsx("span",{...q(Xr.iconWrapper,lz[N]),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(Oi,{role:"status","aria-live":"polite",children:L?E("@astryx.button.loading"):""})]}),le=u&&e!==""||L&&!u||h!=null&&h!==e?{"aria-label":e}:null,ve=g!=null?{"aria-describedby":[$["aria-describedby"],B.describedBy].filter(Boolean).join(" ")||void 0}:null,ge=rt(C,g!=null?B.ref:void 0);let xe;return O?xe=o.jsx(_,{ref:ge,href:b,target:m,rel:y,...J,...$,...le,...ve,...Z,"aria-busy":L||void 0,onClick:P,children:K}):xe=o.jsx("button",{ref:ge,type:s,disabled:D?void 0:I,...J,...$,...le,...ve,...Z,"aria-busy":L||void 0,"aria-disabled":D||void 0,onClick:P,...V?{onKeyDown:V}:null,children:K}),g?o.jsxs(o.Fragment,{children:[xe,B.renderTooltip(g)]}):xe}ne.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},lo={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-hidden":!0},dz={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",{...lo,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",{...lo,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",{...lo,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",{...lo,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",{...lo,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",{...lo,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 fz={};function hz(e){var t;return e==null?null:typeof e=="string"?((t=b3(e))==null?void 0:t.icons)??null:e.icons??null}function r4(e,t){const n=hz(t);return(n==null?void 0:n[e])??fz[e]??dz[e]}const i4={root:{kmuXW:"x2lah0s",$$css:!0},span:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",$$css:!0}},a4={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}},xz={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}},pz={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 $e({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(mz,{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,...F(U("icon",{size:n,color:t}),q(i4.root,a4[t],xz[n],l),i??void 0,a),...c})}$e.displayName="Icon";function mz({name:e,color:t,size:n,a11yProps:s,className:r,style:i,xstyle:a,spanProps:l}){const c=z3(),u=r4(e,c);if(u==null)return null;const d=l??{};return o.jsx("span",{...s,...d,...F(U("icon",{size:n,color:t}),q(i4.span,a4[t],pz[n],a),r??void 0,i),children:u})}function Hs(e,t){return typeof e=="string"?o.jsx($e,{icon:e,...t}):typeof e=="function"||typeof e=="object"&&e!==null&&"render"in e?o.jsx($e,{icon:e,...t}):e}function Aa(e){const t=z3();return r4(e,t)}const yz={isMobile:!1,isMobileNavOpen:!1,toggleMobileNav:()=>{},openMobileNav:()=>{},closeMobileNav:()=>{},isMobileNavEnabled:!1,hasAutoToggle:!0},O0=x.createContext(yz);O0.displayName="AppShellMobileContext";function fx(){return x.use(O0)}function o4({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}=fx();return!u||!d?null:o.jsx(ne,{ref:e,variant:"ghost",label:c,icon:t??o.jsx($e,{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})}o4.displayName="MobileNavToggle";const Eo=x.createContext("default");Eo.displayName="SideNavRenderContext";function l4(){return x.use(Eo)}const sg=x.createContext("default");sg.displayName="TopNavRenderContext";const rg=x.createContext(null);rg.displayName="TopNavMobileContentContext";const kz=typeof rx.Activity<"u",bz=kz?({mode:e,children:t})=>o.jsx(rx.Activity,{mode:e,children:t}):({children:e})=>o.jsx(o.Fragment,{children:e}),vz={sm:640,md:768,lg:1024,none:0},$1="astryx-app-shell-main",zt={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 c4({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 g=be(),b=a===!1,k=a!=null&&a!==!1&&typeof a=="object"&&!x.isValidElement(a)?a:null,m=(k==null?void 0:k.breakpoint)??"md",y=a!=null&&a!==!1&&(x.isValidElement(a)||typeof a=="string")?a:null,v=(k==null?void 0:k.content)??null,w=(k==null?void 0:k.hasToggle)!==!1,j=(k==null?void 0:k.isOpen)!==void 0,C=m==="none"?"(max-width: 0px)":`(max-width: ${vz[m]}px)`,$=Wa(C,k==null?void 0:k.defaultIsMobile),[E,N]=x.useState(!1),S=(k==null?void 0:k.isOpen)??E,A=x.useCallback(In=>{var On;j||N(In),(On=k==null?void 0:k.onOpenChange)==null||On.call(k,In)},[j,k]),z=x.useCallback(()=>{var In;(In=document.getElementById($1))==null||In.focus()},[]),M=i==="fill",L=i==="auto",R=k1(t),T=k1(c),I=k1(l),O=!b&&(T||I)&&y==null,D=e==="section",B=e==="elevated",P=e==="wash"||e==="elevated"?zt.navAreaWash:e==="surface"?zt.navAreaSurface:void 0,V=e==="wash"?zt.contentBgWash:e==="elevated"&&T&&I&&!$?zt.contentBgTransparent:e==="surface"||e==="elevated"?zt.contentBgSurface:void 0,Y=P??zt.navAreaSurface,Z=x.useRef(null),te=x.useRef(null);x.useEffect(()=>{if(!L||!Z.current||!te.current)return;const In=Z.current,On=te.current,nc=()=>{const ao=In.getBoundingClientRect().height;On.style.setProperty("--appshell-header-height",`${ao}px`)};return E0(In,()=>nc()),()=>N0(In)},[L]);const J=I&&!$,K=y!=null,re=O&&v!=null&&$,le=x.useId(),ve=x.useMemo(()=>({isMobile:$,isMobileNavOpen:S,mobileNavId:le,toggleMobileNav:()=>O&&A(!S),openMobileNav:()=>O&&A(!0),closeMobileNav:()=>A(!1),isMobileNavEnabled:O,hasAutoToggle:w}),[$,S,le,A,O,w]),ge=I&&w?o.jsx(Eo,{value:"drawer-content",children:l}):null,xe=I?o.jsx(Eo,{value:"drawer-content",children:l}):null,ce=T?$&&!b&&y==null?o.jsx(rg,{value:ge,children:o.jsx(sg,{value:"mobile-bar",children:c})}):c:null,Q=T||R?o.jsxs(Xf,{padding:0,hasDivider:D&&T,children:[R&&o.jsx("div",{...q(zt.banner,P),children:t}),T&&ce]}):void 0,ye=Q!=null?o.jsx("div",{ref:Z,role:"banner",...F(U("app-shell-header",{variant:e}),q(P,L&&zt.headerSticky)),children:Q}):void 0,ue=J?o.jsx(z0,{padding:0,hasDivider:D,isScrollable:M,...U("app-shell-sidenav",{variant:e}),xstyle:[P,L&&Y,L&&zt.panelAutoFill],children:l}):void 0,pe=ue!=null&&L?o.jsx("div",{className:"x2lah0s x7giv3 x7wzq59 xepuwc7 x16zugyo x78zum5 xdt5ytf",children:ue}):ue,Le=B&&T&&J,ie=o.jsx(_n,{padding:s??0,role:"main",id:$1,tabIndex:-1,isScrollable:M,xstyle:[V,zt.mainFocusTarget],children:n}),tn=Le?o.jsxs("div",{className:"x1n2onr6 x78zum5 x98rzlu x2lwn1j x5yr21d",children:[o.jsx("div",{className:"x10l6tqk x10a8y8t x10xzikg x183tx6i x47corl"}),ie]}):ie,$s=!b&&w&&$&&!T&&I?o.jsx("div",{...F(U("app-shell-header",{variant:e}),q(P,L&&zt.headerSticky)),children:o.jsx(Xf,{padding:0,hasDivider:D,children:o.jsxs("div",{className:"x78zum5 x6s0dn4 x1k15mir xf314gf",role:"navigation","aria-label":g("@astryx.appShell.mobileNavigation"),children:[o.jsx(Eo,{value:"topbar",children:l}),o.jsx(o4,{})]})})}):void 0;return o.jsx(O0,{value:ve,children:o.jsxs("div",{...p,ref:rt(h,te),"data-testid":r,...F(U("app-shell",{variant:e}),q(zt.root,e==="wash"?zt.variantWash:e==="surface"?zt.variantSurface:e==="section"?zt.variantSection:zt.variantElevated,M?zt.rootFill:zt.rootAuto,u),d,f),children:[o.jsx("a",{href:`#${$1}`,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:g("@astryx.appShell.skipToContent")}),o.jsx(Rn,{height:i,padding:0,header:o.jsxs(o.Fragment,{children:[ye,$s]}),start:pe,content:tn}),K&&y,re&&v,$&&!b&&y==null&&!v&&o.jsxs(bz,{mode:S?"visible":"hidden",children:[I&&!T&&o.jsx(Eo,{value:"drawer",children:l}),T&&o.jsx(rg,{value:xe,children:o.jsx(sg,{value:"drawer",children:c})})]})]})})}c4.displayName="AppShell";function wz(e){return!e||typeof window>"u"?!1:window.getComputedStyle(e).direction==="rtl"}const lr=typeof window<"u"?x.useLayoutEffect:x.useEffect,jz=new Set(["text","search","url","tel","email","password","number"]);function Sz(e){if(e.isContentEditable)return e;const t=e.closest("[contenteditable]");return t&&t.getAttribute("contenteditable")!=="false"?t:null}function qb(e,t){if(!(e instanceof HTMLElement))return!1;const n=Sz(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"&&jz.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 Xa(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 N=Array.from(E.querySelectorAll(t));return n?N.filter(S=>S.closest(n)===E):N},[t,n]),p=x.useCallback(E=>{const N=d.current;if(!N||!n)return!0;const S=E.target;return S?S.closest(n)===N:!0},[n]),g=x.useCallback((E,N,S,A)=>{const z=E.length;if(z===0)return-1;let M=N;for(let L=0;L<z;L++){if(M<0||M>=z){if(!A)return-1;M=(M+z)%z}const R=E[M];if(R&&!f(R))return M;M+=S}return-1},[f]),b=x.useCallback(()=>{const E=h(),N=document.activeElement;return E.findIndex(S=>S===N||S.contains(N))},[h]),k=x.useCallback((E,N)=>{E.getAttribute("tabindex")!==String(N)&&E.setAttribute("tabindex",String(N))},[]),m=x.useCallback(()=>{const E=h(),N=E.filter(z=>!f(z));if(N.length===0)return;const A=N.find(z=>z.getAttribute("tabindex")==="0")??N[0];for(const z of E)k(z,z===A?0:-1)},[h,f,k]);lr(()=>{c&&m()});const y=x.useCallback((E,N)=>{const S=E[N];if(S){if(c)for(const A of E)k(A,A===S?0:-1);S.focus()}},[c,k]),v=x.useCallback(E=>{const N=h();if(N.length===0)return;const S=Math.max(0,Math.min(E,N.length-1));y(N,S)},[h,y]),w=x.useCallback(()=>{const E=h(),N=g(E,0,1,!1);return N!==-1?(y(E,N),!0):!1},[h,g,y]),j=x.useCallback(()=>{const E=h(),N=g(E,E.length-1,-1,!1);return N!==-1?(y(E,N),!0):!1},[h,g,y]),C=x.useCallback(()=>{c&&m()},[c,m]),$=x.useCallback(E=>{if(E.ctrlKey||E.metaKey||E.altKey||!p(E))return;if(E.key==="Escape"){E.preventDefault(),r==null||r();return}const N=i==="horizontal"||i==="both",S=i==="vertical"||i==="both",A=[],z=[];if(N){const O=E.key==="ArrowLeft"||E.key==="ArrowRight"?l??wz(d.current):!1;A.push(O?"ArrowLeft":"ArrowRight"),z.push(O?"ArrowRight":"ArrowLeft")}S&&(A.push("ArrowDown"),z.push("ArrowUp"));const M=A.includes(E.key),L=z.includes(E.key),R=a&&E.key==="Home",T=a&&E.key==="End";if(!M&&!L&&!R&&!T||u&&(qb(E.target,E.key)||qb(document.activeElement,E.key)))return;const I=b(),_=h();if(M){const O=I===-1?0:I+1,D=g(_,O,1,s);D!==-1&&y(_,D)}else if(L){const O=I===-1?_.length-1:I-1,D=g(_,O,-1,s);D!==-1&&y(_,D)}else R?w():T&&j();E.preventDefault()},[b,h,s,i,l,a,u,g,y,w,j,r,p]);return{listRef:d,handleKeyDown:$,handleFocus:C,focusItem:v,focusFirst:w,focusLast:j,ownsEvent:p,getItems:h}}const Cz={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}},$z={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 Du({variant:e="neutral",label:t,icon:n,xstyle:s,className:r,style:i,ref:a,...l}){return o.jsxs("span",{ref:a,...F(U("badge",{variant:e}),q(Cz.base,$z[e],s),r,i),...l,children:[n,t]})}Du.displayName="Badge";const Ez={info:"info",warning:"warning",error:"error",success:"success"},Nz={info:"status",warning:"alert",error:"alert",success:"status"},Tz={info:"accent",warning:"warning",error:"error",success:"success"},Vi={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}},zz={info:{kWkggS:"xgcxg3y",$$css:!0},warning:{kWkggS:"x24i8r5",$$css:!0},error:{kWkggS:"x1pritpl",$$css:!0},success:{kWkggS:"xu13z74",$$css:!0}},Az={none:{kGVxlE:"x1gnnqk1",$$css:!0},low:{kGVxlE:"x1i5ehqx",$$css:!0},med:{kGVxlE:"x14hfi27",$$css:!0},high:{kGVxlE:"x1kcpxr7",$$css:!0}};function mt({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:g,...b}){const k=be(),[m,y]=x.useState(!1),[v,w]=x.useState(u),j=x.useId(),C=Ez[e],$=Nz[e],E=Tz[e],N=d!=null;if(m)return null;const S=()=>{y(!0),i==null||i()},A=()=>{w(I=>!I)},z=a!=null||r||N,M=a!=null||r,L=n==null&&M,R=N&&v,T=l==="card";return o.jsxs("div",{ref:g,role:$,...F(q(Vi.root,Az[c],T&&c!=="none"&&Vi.rootElevatedCard,f),h,p),...b,children:[o.jsxs("div",{...F(U("banner",{container:l,status:e}),q(Vi.header,L&&Vi.headerCentered,zz[e],T&&(R?Vi.headerCardWithContent:Vi.headerCardStandalone))),children:[o.jsx("div",{...F(U("banner-icon",{status:e}),{className:"x78zum5 x6s0dn4 x2lah0s"}),"aria-hidden":"true",children:s??o.jsx($e,{icon:C,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",{...q(Vi.endArea,lT.inset(ls["--spacing-2"])),children:[a,N&&o.jsx(ne,{variant:"ghost",size:"sm",label:k(v?"@astryx.banner.collapse":"@astryx.banner.expand"),tooltip:k(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($e,{icon:"chevronDown",size:"sm",color:"inherit"})}),onClick:A,"aria-expanded":v,"aria-controls":R?j:void 0,isIconOnly:!0}),r&&o.jsx(ne,{variant:"ghost",size:"sm",label:k("@astryx.banner.dismiss"),tooltip:k("@astryx.banner.dismiss"),icon:o.jsx($e,{icon:"close",size:"sm",color:"inherit"}),onClick:S,isIconOnly:!0})]})]}),R&&o.jsx("div",{id:j,...F(U("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"}}[!!T<<0]),children:d})]})}mt.displayName="Banner";const Mz={root:{k2ei4v:"xtpqe59",kVhnKS:"x1t7ytsu",kGJrpR:"x14ydlgx",kZCmMZ:"x1rey3nv",kMwMTN:"xv1l7n4",keTefX:"x1lziwak",k71WvV:"x14z9mp",keoZOQ:"xdj266r",k1K539:"xat24cr",$$css:!0}};function u4({children:e,cite:t,xstyle:n,className:s,style:r,ref:i,...a}){return o.jsxs("blockquote",{ref:i,...F(U("blockquote"),q(Mz.root,n),s,r),...a,children:[e,t!=null&&o.jsx("footer",{children:o.jsx("cite",{className:"x1lliihq xtbrsbv x141an7d x1ltkj2j x1j61x8r",children:t})})]})}u4.displayName="Blockquote";const L0=x.createContext({variant:"default",separator:"/"});L0.displayName="BreadcrumbContext";const Rz={root:{k1xSpc:"x1lliihq",$$css:!0}};function d4({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(L0,{value:f,children:o.jsx("nav",{ref:l,"aria-label":d,...F(U("breadcrumbs",{variant:n}),q(Rz.root,s),r,i),...c,children:o.jsx("ol",{className:"x78zum5 x6s0dn4 x1a02dak xe8uvvx x1ghz6dp x1717udv xzye2dw",children:e})})})}d4.displayName="Breadcrumbs";const _z='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',Cr=[];function Iz(e){Cr.push(e)}function Oz(e){for(let t=Cr.length-1;t>=0;t--)if(Cr[t].handler===e){Cr.splice(t,1);return}}function Lz(e){if(Cr.length===0)return!1;let t=Cr[0];for(let n=1;n<Cr.length;n++){const s=Cr[n],r=t.getContainer(),i=s.getContainer();r!=null&&i!=null&&i!==r&&i.contains(r)||(t=s)}return t.handler===e}function Hb(){return Cr.length>0}function f4(e){return e.isComposing===!0||e.keyCode===229}function Dz(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 D0(e){return Array.from(e.querySelectorAll(_z)).filter(Dz)}function h4(e){try{e.focus()}catch{}return document.activeElement===e}function Pb(e){const t=D0(e);for(const n of t)if(h4(n))return!0;return!1}function Bz(e){const t=D0(e);for(let n=t.length-1;n>=0;n--)if(h4(t[n]))return!0;return!1}function qz(e){const{isActive:t,onEscape:n}=e,s=x.useRef(null),r=x.useRef(null),i=x.useRef(!1),a=x.useCallback(()=>{s.current&&Pb(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&&(Pb(u),r.current===document.activeElement&&Bz(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&&Iz({handler:l,getContainer:()=>s.current});const c=u=>{const d=s.current;if(d){if(u.key==="Escape"&&n){if(u.defaultPrevented||f4(u)||!Lz(l))return;u.preventDefault(),u.stopPropagation(),n();return}if(u.key==="Tab"){i.current=!0;const f=D0(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&&Oz(l)}},[t,n]),{containerRef:s,focusFirst:a}}function Bl(e,t,n=!0){const s=x.useRef(!1);x.useEffect(()=>{n&&!s.current&&(s.current=!0,va())},[e,t,n])}const E1={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 ql(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(),g=u??p("@astryx.popover.close"),b=x.useRef(null),k=x.useRef(!1),m=Dl({mode:"context",lightDismiss:r,onShow:t,onHide:n}),{containerRef:y,focusFirst:v}=qz({isActive:m.isOpen,onEscape:i||r?m.hide:void 0});x.useEffect(()=>{m.isOpen&&a&&!k.current&&requestAnimationFrame(()=>{v()}),m.isOpen||(k.current=!1)},[m.isOpen,a,v]);const w=x.useCallback(N=>{b.current=N,m.ref(N)},[m]),j=x.useCallback(N=>{k.current=(N==null?void 0:N.skipAutoFocus)??!1,m.show()},[m]),C=x.useCallback(()=>{m.isOpen?m.hide():j()},[m,j]),$={"aria-haspopup":f==="dialog"?"dialog":"true","aria-expanded":m.isOpen,"aria-controls":m.id};Bl("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((N,S)=>m.render(o.jsxs("div",{ref:y,role:f==="dialog"?"dialog":void 0,"aria-modal":f==="dialog"&&h?!0:void 0,"aria-label":f==="dialog"?d:void 0,...q(E1.contentWrapper,l&&E1.surface,s),children:[N,c&&o.jsx("div",{...q(E1.closeButtonWrapper,pl.centerInline("100%")),children:o.jsx(ne,{variant:"secondary",label:g,onClick:m.hide})})]}),{...S,xstyle:S==null?void 0:S.xstyle}),[m,c,l,g,y,d,f,h,s]);return{triggerRef:w,contentRef:y,anchorId:m.anchorId,show:j,hide:m.hide,toggle:C,isOpen:m.isOpen,id:m.id,render:E,triggerProps:$}}function Hz(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key!==" "}function hx(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(!Hz(f)&&!h)return!1;const p=t();if(p.length===0)return!1;const g=f.key.toLowerCase(),b=a.current.length>0&&a.current.split("").every(w=>w===g),k=b?g:a.current+g;a.current=k,u();const m=(s==null?void 0:s())??-1,y=p.length,v=b?1:0;for(let w=0;w<y;w++){const j=(m+v+w+y)%y;if(i!=null&&i(j))continue;const C=p[j];if(C!=null&&C.trim().toLowerCase().startsWith(k))return n(j),!0}return!0},[t,n,s,u,i]),reset:c}}const Ub={horizontal:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kzqmXN:"xh8yej3",$$css:!0},vertical:{k1xSpc:"x3nfvp2",kXwgrk:"xdt5ytf",kGNEyG:"x6s0dn4",kZKoxP:"x5yr21d",$$css:!0}},co={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}},Fb={horizontal:{keTefX:"xojxgvx",k71WvV:"x1fcf3bl",kzqmXN:"xx6qvi6",$$css:!0},vertical:{keoZOQ:"x1sa9bsh",k1K539:"x6h7pi7",kZKoxP:"x12qplqi",$$css:!0}};function eu({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,...F(U("divider",{variant:n,orientation:e}),q(f?Ub.horizontal:Ub.vertical,s&&(f?Fb.horizontal:Fb.vertical),r),i,a),children:[o.jsx("div",{...q(f?co.horizontalLine:co.verticalLine,co[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",{...q(f?co.horizontalLine:co.verticalLine,co[n])})]})}eu.displayName="Divider";const Pz=["noopener","noreferrer"];function x4(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 Pz)n.includes(s)||n.push(s);return{target:e,rel:n.join(" ")}}const p4=["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(","),Uz='[aria-readonly="true"]';function Gb(e,t){let n=e;for(;n!=null&&n!==t&&n!==document.body;){if(n.matches(p4)&&!n.matches(Uz))return!0;n=n.parentElement}return!1}function Fz(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 B0({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||Fz(u))return;const d=c.target;if(d instanceof Element&&!(d!==c.currentTarget&&Gb(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||!Gb(d,u))&&window.open(s,"_blank","noopener")},[e,s,i]);return{onClick:a,onMouseUp:l}}const Gz=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}},Vb={lineClamp:e=>[{kJFfOR:e!=null?"x1yhjpo9":e,$$css:!0},{"--x-WebkitLineClamp":e??void 0}]},Vz={compact:{k8WAf4:"xu0wf1k",$$css:!0},balanced:{k8WAf4:"xce4md1",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"xrrkdod",$$css:!0}};function Za({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:g,isHighlighted:b=!1,isSelected:k=!1,isDisabled:m=!1,xstyle:y,className:v,style:w,ref:j,role:C,...$}){const E=Li(),N=f!=null,S=x.useRef(null),{onClick:A}=B0({containerRef:S,interactiveRef:f??void 0,disabled:m});Bl("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.",N&&(d!=null||h!=null));const z=d!=null||h!=null||N,{target:M,rel:L}=x4(p,g),R=C!=null,T=C!=null&&Gz.has(C),I=typeof s=="string",_=typeof r=="string",O=c!=null?c===1?fn.labelSingleTruncate:fn.labelMultiTruncate:I?fn.labelSingleTruncate:null,D=u!=null?u===1?fn.descriptionSingleTruncate:fn.descriptionMultiTruncate:_?fn.descriptionSingleTruncate:null,B=o.jsxs(o.Fragment,{children:[o.jsx("span",{...q(fn.label,O,c!=null&&c>1&&Vb.lineClamp(c)),children:s}),r!=null&&o.jsx("span",{...q(fn.description,D,u!=null&&u>1&&Vb.lineClamp(u)),children:r})]}),P=Y=>{m||Y.target.closest("button, a, input, select, textarea")||d==null||d(Y)},V=o.jsxs(o.Fragment,{children:[t,n!=null&&o.jsx("span",{className:"x3psx0u x78zum5",children:n}),R||N?o.jsx("span",{...{0:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h"},1:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo"}}[!!m<<0],children:B}):h!=null?o.jsx(E,{href:h,target:M,rel:L,"aria-disabled":m||void 0,tabIndex:m?-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"}}[!!m<<0],children:B}):d!=null?o.jsx("button",{type:"button",onClick:d,disabled:m,...{0:{className:"xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz"},1:{className:"xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz xbyyjgo"}}[!!m<<0],children:B}):o.jsx("span",{...{0:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h"},1:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo"}}[!!m<<0],children:B}),i!=null&&o.jsx("span",{...{0:{className:"x3psx0u x78zum5 xvc5jky"},1:{className:"x3psx0u x78zum5 xvc5jky xbyyjgo"}}[!!m<<0],children:i})]});return o.jsx(e,{ref:N?rt(j,S):j,...$,"aria-selected":T&&k||void 0,"aria-current":$["aria-current"]??(k&&!T?!0:void 0),"aria-disabled":m||void 0,...F(U("item",{density:l,align:a}),q(fn.root,Vz[l],a==="start"&&fn.alignStart,z&&fn.interactive,z&&fn.focusVisibleOutline,b&&fn.highlighted,k&&fn.selected,m&&!R&&fn.disabled,y),v,w),role:C,onClick:N?A:R?d:z?P:void 0,children:V})}Za.displayName="Item";const Hl=x.createContext(null);Hl.displayName="DropdownMenuContext";function q0(){return x.use(Hl)}const H0=x.createContext(null);H0.displayName="DropdownMenuRadioGroupContext";function Wz(){return x.use(H0)}function P0(e,t){if(t||e.pointerType!=="mouse")return;const n=e.currentTarget;n!==n.ownerDocument.activeElement&&n.focus()}const Wb={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}},Kz={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}};function Po({icon:e,label:t,description:n,onClick:s,isDisabled:r=!1,endContent:i,xstyle:a,className:l,style:c}){const u=q0(),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=>P0(p,r),[r]);return o.jsx(Za,{role:"menuitem",tabIndex:r?void 0:-1,onPointerMove:h,startContent:e?Hs(e,{size:"sm",color:"secondary"}):void 0,label:t,description:n,endContent:i,onClick:f,isDisabled:r,xstyle:[Wb.root,Kz[d],r&&Wb.disabled,a],...F(U("dropdown-menu-item",{size:d}),{className:l,style:c})})}Po.displayName="DropdownMenuItem";function Xz(e){const{show:t,hide:n,isOpen:s,isEnabled:r,showDelay:i=150,hideDelay:a=200}=e,l=Wa("(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 g=x.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null),u.current&&(clearTimeout(u.current),u.current=null)},[]),{listRef:b,handleKeyDown:k,focusFirst:m}=Xa({onEscape:()=>{g(),n()}});x.useEffect(()=>()=>g(),[g]);const y=x.useCallback(()=>{g(),s?(h.current=!0,n()):(h.current=!1,t(),requestAnimationFrame(()=>m()))},[s,g,t,n,m]),v=x.useCallback(()=>{if(l){if(h.current){h.current=!1;return}f.current=!0,g(),i>0?c.current=setTimeout(()=>{t({skipAutoFocus:!0})},i):t({skipAutoFocus:!0})}},[l,g,t,i]),w=x.useCallback(()=>{f.current&&(g(),u.current=setTimeout(()=>{n()},a))},[g,n,a]),j=x.useCallback(()=>{g()},[g]),C=x.useCallback(S=>{d.current=S},[]),$=x.useCallback(()=>{},[]),E=x.useCallback(S=>{},[]),N=x.useCallback(S=>{},[]);return r?{triggerProps:{onClick:y,onMouseEnter:v,onMouseLeave:w},contentProps:{onMouseEnter:j,onMouseLeave:w,onKeyDown:k},menuRef:b,focusFirst:m,setTriggerEl:C}:{triggerProps:{onClick:$,onMouseEnter:$,onMouseLeave:$},contentProps:{onMouseEnter:$,onMouseLeave:$,onKeyDown:N},menuRef:b,focusFirst:m,setTriggerEl:E}}const Bu=new Set(["menuitem","menuitemradio","menuitemcheckbox"]),xx=[...Bu].map(e=>`[role="${e}"]:not([aria-disabled="true"])`).join(","),px='[role="menu"]',N1={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}},Zz={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}},Yz={keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0},Kb={popover:{k7Eaqz:"x5w4yej",keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0},popoverCustomWidth:e=>[Yz,{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 g4(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,g=q0(),b=(g==null?void 0:g.menuSize)??"md",k=!r,m=x.useId(),y=x.useId(),v=x.useRef(null),[w,j]=x.useState(!1),C=Dl({mode:"context",lightDismiss:!1,onShow:x.useCallback(()=>{j(!0),l==null||l(!0)},[l]),onHide:x.useCallback(()=>{j(!1),l==null||l(!1)},[l])}),$=x.useCallback(()=>{k&&C.show()},[k,C]),E=x.useCallback(()=>{C.hide()},[C]),{listRef:N,handleKeyDown:S,focusFirst:A,focusItem:z,ownsEvent:M,getItems:L}=Xa({itemSelector:xx,boundarySelector:px,wrap:!1,onEscape:()=>O({focusTrigger:!0})}),R=hx({getItemLabels:()=>L().map(K=>K.textContent),onMatch:z,getCurrentIndex:()=>L().findIndex(K=>K===document.activeElement||K.contains(document.activeElement))}),{triggerProps:T,contentProps:I}=Xz({show:$,hide:E,isOpen:w,isEnabled:k}),_=x.useCallback(K=>{k&&(C.show(),K!=null&&K.focusFirst&&requestAnimationFrame(()=>{var le;A()||(le=N.current)==null||le.focus()}))},[k,C,A,N]),O=x.useCallback(K=>{var re;C.hide(),(K==null?void 0:K.focusTrigger)!==!1&&((re=v.current)==null||re.focus())},[C]),D=x.useCallback(K=>{v.current=K,C.ref(K)},[C]),B=x.useCallback(()=>{r||(w?O({focusTrigger:!0}):_({focusFirst:!0}))},[r,w,_,O]),P=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(),_({focusFirst:!0}))},[r,_]),V=x.useCallback(K=>P0(K,r),[r]),Y=x.useCallback(K=>{if(!M(K))return;if(K.key==="Escape"){K.preventDefault(),K.stopPropagation(),O({focusTrigger:!0});return}if(K.key==="Enter"||K.key===" "){K.preventDefault();const ve=document.activeElement;ve&&Bu.has(ve.getAttribute("role")??"")&&ve.click();return}const le=(typeof window<"u"&&N.current?window.getComputedStyle(N.current).direction==="rtl":!1)?"ArrowRight":"ArrowLeft";if(K.key===le){K.preventDefault(),O({focusTrigger:!0});return}if(R.onKeyDown(K)){K.preventDefault();return}S(K)},[M,O,S,R,N]),Z=x.useMemo(()=>({menuSize:b,closeMenu:()=>{O({focusTrigger:!1}),g==null||g.closeMenu()}}),[b,O,g]),te=i?o.jsx("span",{...F(U("dropdown-menu-indicator-icon"),{className:"x78zum5 x6s0dn4"}),children:o.jsx(on,{size:"sm"})}):o.jsx("span",{...F(U("dropdown-menu-indicator-icon"),{className:"x78zum5 x6s0dn4"}),children:o.jsx($e,{icon:"chevronRight",size:"sm",color:"secondary"})}),J=a?Kb.popoverCustomWidth(a):Kb.popover;return o.jsxs(o.Fragment,{children:[o.jsx(Za,{ref:K=>D(K),id:y,role:"menuitem",tabIndex:r?void 0:-1,"aria-haspopup":"menu","aria-expanded":w,"aria-controls":w?m:void 0,"aria-disabled":r||void 0,"data-testid":h,onMouseEnter:T.onMouseEnter,onMouseLeave:T.onMouseLeave,onPointerMove:V,startContent:t?Hs(t,{size:"sm",color:"secondary"}):void 0,label:n,description:s,endContent:te,onClick:B,onKeyDown:P,isDisabled:r,xstyle:[N1.root,Zz[b],w&&N1.open,r&&N1.disabled,u],...F(U("dropdown-menu-item",{size:b}),{className:d,style:f})}),C.render(o.jsx("div",{ref:N,id:m,role:"menu",tabIndex:-1,"aria-labelledby":y,onKeyDown:Y,onMouseEnter:I.onMouseEnter,onMouseLeave:I.onMouseLeave,"data-testid":p,...F(U("dropdown-menu"),{className:"x9f619 x78zum5 xdt5ytf x1lsbc85 xuyqlj2 x1odjw0f x1fcsqxe xgory14 x9epnlk x1n97fys x1prclbq x1i5ehqx x1hc1fzr x19991ni xuedmi6 xlr8y92"}),children:o.jsx(Hl,{value:Z,children:c})}),{placement:"end",alignment:"start",xstyle:[J,or.end]})]})}g4.displayName="DropdownMenuSubMenu";const Qz={divider:{kqGvvJ:"xsq74q5",$$css:!0}};function T1(e){return`item-${e.label}`}function Jz(e,t){return`section-${e.title??t}`}function gx(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(eu,{xstyle:Qz.divider,...U("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",...F(U("dropdown-menu-section-heading"),{className:"xu0wf1k xf314gf x9ynric x141an7d x1ltkj2j xv1l7n4 x87ps6o"}),children:s.title}),s.items.map(r=>o.jsx(Po,{icon:r.icon,label:r.label,onClick:r.onClick,isDisabled:r.isDisabled},T1(r)))]},Jz(s,n))):"type"in s||(s.items&&s.items.length>0?t.push(o.jsx(g4,{icon:s.icon,label:s.label,isDisabled:s.isDisabled,children:gx(s.items)},T1(s))):t.push(o.jsx(Po,{icon:s.icon,label:s.label,onClick:s.onClick,isDisabled:s.isDisabled},T1(s))))}return t}const uo={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}},eA={popover:{k7Eaqz:"x5w4yej",kqGvvJ:"xsq74q5",$$css:!0}};function m4({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 g=x.use(L0),b=Li(t),k=g.variant==="supporting",m=x.useRef(null),y=x.useRef(null),v=i===!0,w=i==null,j=l!=null,C=c??(k?"sm":"md");x.useEffect(()=>{},[j,s,r]),x.useEffect(()=>{if(!w)return;const E=m.current;if(!E)return;const N=E.parentElement;if(!N)return;const S=Array.from(N.children),A=S.length>0&&S[S.length-1]===E,z=N.querySelector('[aria-current="page"]');if(A&&!z){const M=y.current??E;return M.setAttribute("aria-current","page"),()=>{M.removeAttribute("aria-current")}}});const $=o.jsxs(o.Fragment,{children:[a&&o.jsx("span",{className:"x78zum5 x6s0dn4 x2lah0s",children:a}),n]});return v?o.jsxs("li",{ref:rt(e,m),...F(U("breadcrumb-item"),q(uo.root,k?uo.supportingSize:uo.defaultSize,u),d,f),"data-testid":h,...p,children:[o.jsx("span",{"aria-hidden":"true",className:"x11ke7fs x6s0dn4 xv1l7n4 xu0wf1k x87ps6o",children:g.separator}),j?o.jsx(ig,{ref:y,menu:l,menuSize:C,isSupporting:k,isCurrent:!0,label:n,children:$}):o.jsx("span",{...{0:{className:"x78zum5 x6s0dn4 xzye2dw x1pd3egz x1tgivj0"},1:{className:"x78zum5 x6s0dn4 xzye2dw x1pd3egz xv1l7n4"}}[!!k<<0],"aria-current":"page",children:$})]}):o.jsxs("li",{ref:rt(e,m),...F(U("breadcrumb-item"),q(uo.root,k?uo.supportingSize:uo.defaultSize,u),d,f),"data-testid":h,...p,children:[o.jsx("span",{"aria-hidden":"true",className:"x11ke7fs x6s0dn4 xv1l7n4 xu0wf1k x87ps6o",children:g.separator}),j?o.jsx(ig,{ref:y,menu:l,menuSize:C,isSupporting:k,label:n,children:$}):s!=null?o.jsx(b,{ref:y,href:s,onClick:r,...{0:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk xv1l7n4"},1:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk xv1l7n4"}}[!!k<<0],children:$}):r!=null?o.jsx("button",{ref:y,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"}}[!!k<<0],children:$}):o.jsx("span",{ref:y,...{0:{className:"x78zum5 x6s0dn4 xzye2dw x1pd3egz x1tgivj0"},1:{className:"x78zum5 x6s0dn4 xzye2dw x1pd3egz xv1l7n4"}}[!!k<<0],children:$})]})}m4.displayName="BreadcrumbItem";function ig({ref:e,children:t,label:n,menu:s,menuSize:r,isSupporting:i,isCurrent:a=!1}){const l=x.useId(),c=x.useRef(null),u=ql({onHide:x.useCallback(()=>{var N;(N=c.current)==null||N.focus()},[]),hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"}),d=Aa("chevronDown"),f=x.useCallback(()=>{u.hide()},[u]),{listRef:h,handleKeyDown:p,focusFirst:g,focusItem:b,ownsEvent:k,getItems:m}=Xa({itemSelector:xx,boundarySelector:px,wrap:!1,onEscape:f}),y=hx({getItemLabels:()=>m().map(N=>N.textContent),onMatch:b,getCurrentIndex:()=>m().findIndex(N=>N===document.activeElement||N.contains(document.activeElement))}),v=x.useCallback(N=>{if(k(N)){if(N.key==="Enter"||N.key===" "){N.preventDefault();const S=document.activeElement;S&&Bu.has(S.getAttribute("role")??"")&&S.click();return}if(N.key==="Tab"){f();return}if(y.onKeyDown(N)){N.preventDefault();return}p(N)}},[p,f,y,k]),w=x.useCallback(()=>{u.show(),requestAnimationFrame(()=>g())},[u,g]),j=x.useCallback(()=>{u.isOpen?u.hide():w()},[u,w]),C=x.useCallback(N=>{u.isOpen||(N.key==="ArrowDown"||N.key==="Enter"||N.key===" ")&&(N.preventDefault(),w())},[u.isOpen,w]),$=x.useMemo(()=>({closeMenu:f,menuSize:r}),[f,r]),E=Array.isArray(s)?gx(s):s;return o.jsxs(o.Fragment,{children:[o.jsxs("button",{ref:rt(e,c,u.triggerRef),type:"button",onClick:j,onKeyDown:C,...F(U("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,...F(U("breadcrumb-menu"),{className:"x9f619 x78zum5 xdt5ytf x1lsbc85 xuyqlj2 x1odjw0f x1fcsqxe xgory14 x9epnlk x1n97fys x87ps6o"}),children:o.jsx(Hl,{value:$,children:E})}),{placement:"below",alignment:"start",xstyle:[eA.popover,or.below]})]})}ig.displayName="BreadcrumbMenuTrigger";function tA(e){return typeof e=="string"||typeof e=="number"}function Xb(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function Di({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),g=e!=null?tA(e):!1,b=d===!0||d==="auto"&&g,k=x.useCallback(()=>{u==null||u(!0)},[u]),m=x.useCallback(()=>{u==null||u(!1)},[u]),y=js({placement:s,alignment:r,delay:i,hideDelay:a,focusTrigger:l,isEnabled:c,isOpen:f,isDefaultOpen:h,onShow:k,onHide:m});return lr(()=>{if(!t)return;const v=t.current;if(!v)return;y.ref(v);const w=v.getAttribute("aria-describedby");return v.setAttribute("aria-describedby",Xb(w,y.describedBy)??""),()=>{y.ref(null),w?v.setAttribute("aria-describedby",w):v.removeAttribute("aria-describedby")}},[t,y.ref,y.describedBy]),lr(()=>{if(t||g)return;const v=p.current;if(!v)return;const w=v.firstElementChild;if(!w)return;y.ref(w);const j=w.getAttribute("aria-describedby");return w.setAttribute("aria-describedby",Xb(j,y.describedBy)??""),()=>{y.ref(null),j?w.setAttribute("aria-describedby",j):w.removeAttribute("aria-describedby")}},[t,g,y.ref,y.describedBy]),t&&e==null?o.jsx(o.Fragment,{children:y.renderTooltip(n)}):g?o.jsxs(o.Fragment,{children:[o.jsx("span",{ref:y.ref,tabIndex:0,"aria-describedby":y.describedBy,...{0:{className:"xt0psk2"},1:{className:"xt0psk2 xujl8zx xev0dqp xycaml9 xrys4gj"}}[!!b<<0],children:e}),y.renderTooltip(n)]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:p,className:"xjp7ctv",children:e}),y.renderTooltip(n)]})}Di.displayName="Tooltip";const y4=Object.freeze(Object.defineProperty({__proto__:null,Tooltip:Di},Symbol.toStringTag,{value:"Module"})),nA="data-astryx-live-region",sA="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,Jf={polite:null,assertive:null};function k4(e){const t=Jf[e];t!=null&&(clearTimeout(t),Jf[e]=null)}function iA(e,t){k4(e),Jf[e]=setTimeout(()=>{Jf[e]=null,t.textContent=""},rA)}let Rs=null;function Zb(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=sA,document.body.appendChild(t),t}function aA(){return typeof document>"u"?null:Rs?(Rs.polite.isConnected||document.body.appendChild(Rs.polite),Rs.assertive.isConnected||document.body.appendChild(Rs.assertive),Rs):(Rs={polite:Zb("polite"),assertive:Zb("assertive")},Rs)}function oA(e,t){const n=aA();if(!n)return;const s=t==="assertive"?n.assertive:n.polite;s.textContent="",requestAnimationFrame(()=>{s.textContent=e}),iA(t,s)}function lA(e){if(k4(e),!Rs)return;const t=e==="assertive"?Rs.assertive:Rs.polite;t.textContent=""}function Pl(){return x.useCallback((e,t="polite")=>{if(!e){lA(t);return}oA(e,t)},[])}const cA={wrapper:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"xzye2dw",kmuXW:"x2lah0s",$$css:!0}},uA={ctrl:"⌃",alt:"⌥",shift:"⇧",enter:"↵",backspace:"⌫",escape:"Esc",tab:"⇥",up:"↑",down:"↓",left:"←",right:"→",plus:"+"};function dA(e,t){return e==="mod"?t?"⌘":"Ctrl":uA[e]??e.toUpperCase()}const fA={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 hA(e,t){return e==="mod"?t?"Command":"Control":fA[e]??e.toUpperCase()}function xA(){return()=>{}}function pA(){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 b4({keys:e,ref:t,xstyle:n,className:s,style:r,...i}){const a=x.useSyncExternalStore(xA,gA,pA),l=e.split("+").map(u=>u.trim().toLowerCase()),c=l.map(u=>hA(u,a)).join(" + ");return o.jsx("span",{...i,ref:t,role:"img","aria-label":c,...F(U("kbd"),q(cA.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:dA(u,a)},u))})}b4.displayName="Kbd";const mA=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),yA={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 v4(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=Dl({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]),g=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 C=w.currentTarget;w.relatedTarget instanceof Node&&C.contains(w.relatedTarget)||g(j)},[g,s]),k=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]),m=x.useCallback(w=>{l.current&&mA.has(w.key)&&p()},[p]),y=o.jsx("span",{className:"x3nfvp2 x6s0dn4 xzye2dw",children:yA[t].map(w=>o.jsx(b4,{keys:w},w))});return{hintElement:h.render(o.jsxs("span",{"aria-hidden":"true",children:[y,o.jsx("span",{className:"x11g1kdw",children:r("@astryx.keyboardHint.toNavigate")})]}),{placement:"below",alignment:"start",xstyle:kA.hint,style:{marginBlockStart:ls["--spacing-2"]}}),onFocus:b,onBlur:k,onKeyDown:m}}function w4(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 j4=!1;typeof window<"u"&&requestAnimationFrame(()=>{j4=!0});const bA={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 vA(e="slideDown"){const[t]=x.useState(()=>j4);return t?bA[e]:null}const wA=50;function jA(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 SA={natural:10,fast:4,instant:1/0};function CA(e,t,n){const s="natural",r=SA[s],{token:i}=ux(),a=x.useMemo(()=>{const k=jA(i("--duration-fast-min"));if(k==null)return wA;const m=k/10;return Math.max(4,Math.round(m))},[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 g=x.useRef(t);t!==g.current&&(g.current=t,!t&&e.length>0&&(d.current=e.length,c(e.length)));const b=Wa("(prefers-reduced-motion: reduce)");return x.useEffect(()=>{if(!t||s==="instant"||b)return;function k(m){if(m-f.current>=a){f.current=m;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(k)}return h.current=requestAnimationFrame(k),()=>{h.current!==null&&(cancelAnimationFrame(h.current),h.current=null)}},[t,r,a,s,b]),!t||s==="instant"||b?e:e.slice(0,l)}const $A=new Set(["text","password","email","number","search","tel","url","date","datetime-local","month","time","week"]),EA=new Set(["true","menu","listbox","tree","grid","dialog"]);function NA(e){if(e.getAttribute("role")==="combobox")return!0;const t=e.getAttribute("aria-haspopup");return t!=null&&EA.has(t)}function U0({containerRef:e,inputRef:t,disabled:n=!1}){const s=x.useCallback(()=>{const r=t.current;r!=null&&(r instanceof HTMLElement&&NA(r)?r.click():r instanceof HTMLInputElement&&$A.has(r.type)||r instanceof HTMLTextAreaElement?r.focus():r instanceof HTMLElement?r.click():"focus"in r&&r.focus())},[t]);return B0({containerRef:e,interactiveRef:t,onClick:s,disabled:n})}const TA={warning:"warning",error:"error",success:"success"},zA={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=js({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(g=>g!==!0)},[]);if(x.useEffect(()=>{if(l!==!0)return;const g=b=>{b.key==="Escape"&&c(void 0)};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[l]),!(!!e&&!n&&t!=="detached"))return{statusIcon:null,describedBy:void 0};const p=o.jsx($e,{icon:TA[e.type],size:s,color:e.type,...U("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(zA[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 F0=x.createContext(null);F0.displayName="InteractiveRoleContext";function AA(){return x.use(F0)}function C4({href:e,onClick:t,isDisabled:n=!1}){const s=AA();return e!=null&&!n?"link":t!=null?"button":s??"inert"}const MA=500,RA=10;function _A(e){const{onLongPress:t,disabled:n=!1,delayMs:s=MA,moveCancelPx:r=RA}=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 G0=6,IA={x177fznd:"x177fznd",$$css:!0},ud={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}},OA={x1e36hu2:"x1e36hu2",$$css:!0},dd={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}},LA={x10zkftw:"x10zkftw",$$css:!0},fd={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}},DA={xbjq1vy:"xbjq1vy",$$css:!0},hd={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}},BA={x3z7t8n:"x3z7t8n",$$css:!0},xd={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}},qA={x6dglqq:"x6dglqq",$$css:!0},pd={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}},HA=[{marker:IA,reveal:ud.reveal,revealLayoutPreserved:ud.revealLayoutPreserved,conceal:ud.conceal,concealLayoutPreserved:ud.concealLayoutPreserved},{marker:OA,reveal:dd.reveal,revealLayoutPreserved:dd.revealLayoutPreserved,conceal:dd.conceal,concealLayoutPreserved:dd.concealLayoutPreserved},{marker:LA,reveal:fd.reveal,revealLayoutPreserved:fd.revealLayoutPreserved,conceal:fd.conceal,concealLayoutPreserved:fd.concealLayoutPreserved},{marker:DA,reveal:hd.reveal,revealLayoutPreserved:hd.revealLayoutPreserved,conceal:hd.conceal,concealLayoutPreserved:hd.concealLayoutPreserved},{marker:BA,reveal:xd.reveal,revealLayoutPreserved:xd.revealLayoutPreserved,conceal:xd.conceal,concealLayoutPreserved:xd.concealLayoutPreserved},{marker:qA,reveal:pd.reveal,revealLayoutPreserved:pd.revealLayoutPreserved,conceal:pd.conceal,concealLayoutPreserved:pd.concealLayoutPreserved}],ag=new Array(G0).fill(!1);function PA(){for(let e=0;e<G0;e++)if(!ag[e])return ag[e]=!0,{index:e,isExhausted:!1};return{index:0,isExhausted:!0}}function UA(e,t){t||(ag[e]=!1)}const Yb=Object.freeze({});function FA(e={}){const{isEnabled:t=!0}=e,[n]=x.useState(()=>t?PA():null);if(x.useEffect(()=>{if(n!=null)return()=>UA(n.index,n.isExhausted)},[n]),Bl("useContainerReveal",`More than ${G0} 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:()=>Yb,getContentRevealProps:()=>Yb};const s=HA[n.index];return{getContainerProps:()=>q(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 q(l)}}}const z1={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 mx({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:g,ref:b,...k}){const m=be(),y=a?m("@astryx.field.optional"):l?m("@astryx.field.required"):null,v=s?"span":"label",w=!s&&t!=null,j=x.useRef(null),C=x.useMemo(()=>({get current(){var N;return t==null?null:((N=j.current)==null?void 0:N.ownerDocument.getElementById(t))??null},set current(N){}}),[t]),$=U0({containerRef:j,inputRef:C,disabled:!w}),E=o.jsxs(o.Fragment,{children:[c&&Hs(c,{size:"sm",color:"inherit"}),e,y&&o.jsxs("span",{className:"x1sodnla x141an7d x1ltkj2j xv1l7n4",children:[o.jsx("span",{"aria-hidden":"true",children:" ∙ "}),y]}),u&&o.jsx(Di,{content:u,placement:"above",children:o.jsx($e,{icon:"info",size:"sm",color:"inherit"})})]});return o.jsxs(o.Fragment,{children:[o.jsx(v,{ref:b,id:n,htmlFor:s?void 0:t,...k,...F(U("field-label"),q(z1.label,i&&z1.labelDisabled,r&&z1.srOnly,g),h,p),children:E}),d&&o.jsx("span",{ref:w?j:void 0,id:f,...w?$: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})]})}mx.displayName="FieldLabel";const GA={warning:"warning",error:"error",success:"success"},A1={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}},VA={warning:{kWkggS:"x24i8r5",kMwMTN:"xdhq94a",$$css:!0},error:{kWkggS:"x1pritpl",kMwMTN:"x1joocv1",$$css:!0},success:{kWkggS:"xu13z74",kMwMTN:"xltfdvo",$$css:!0}};function yx({ref:e,type:t,message:n,id:s,variant:r="attached",xstyle:i,className:a,style:l,...c}){const u=vA("slideDown"),d=Pl();return x.useEffect(()=>{n&&d(n,t==="error"?"assertive":"polite")},[d,n,t]),o.jsx("div",{ref:e,id:s,...c,...F(U("field-status",{type:t,variant:r}),q(A1.base,u,r==="attached"?A1.attached:A1.detached,VA[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($e,{icon:GA[t],size:"sm",color:"inherit",...U("field-status-icon",{type:t})})}),o.jsx("span",{children:n})]}):n})}yx.displayName="FieldStatus";const WA={x1tspnpo:"x1tspnpo",$$css:!0},kx=x.createContext(null);kx.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}},Qb={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},KA={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},XA={sm:{kzqmXN:"xsmyaan",kZKoxP:"x1kpxq89",$$css:!0},md:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",$$css:!0}},ZA={sm:{kzqmXN:"x1fsd2vl",kZKoxP:"x36qwtl",$$css:!0},md:{kzqmXN:"xsmyaan",kZKoxP:"x36qwtl",$$css:!0}},YA={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function $4({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:g,onBlur:b,labelIcon:k,status:m,width:y,xstyle:v,className:w,style:j,ref:C,...$}){const E=x.useId(),N=x.useId(),S=x.useId(),[,A]=x.useTransition(),[z,M]=x.useOptimistic(a),L=i||z!==a,R=l&&!!u,T=x.use(kx),I=l&&(R||((T==null?void 0:T.hasDisabledMessage)??!1)),_=js({placement:"above",focusTrigger:"always",isEnabled:R}),O=z==="indeterminate",D=z===!0,B=D||O,P=x.useCallback(Z=>{Z&&(Z.indeterminate=O)},[O]),V=[];n&&V.push(N),m!=null&&m.message&&V.push(S),R&&V.push(_.describedBy);const Y=V.length>0?V.join(" "):void 0;return o.jsxs("div",{...F(U("checkbox-input",{size:p}),q(y!=null&&YA.width(y),v),w,j),children:[o.jsxs("div",{ref:Z=>{_.interactionRef(Z)},...q(hn.container,t&&hn.containerLabelHidden,!l&&WA),children:[o.jsxs("div",{...q(hn.checkboxWrapper,Qb[p]),children:[o.jsx("input",{...$,ref:rt(C,P,_.positionRef),id:E,type:"checkbox",name:l?void 0:c,checked:D,disabled:l&&!I,"aria-disabled":I?"true":void 0,readOnly:d,required:h,onChange:Z=>{if(l||L||d)return;const te=Z.target.checked;s==null||s(te,Z),r&&!Z.defaultPrevented&&A(async()=>{M(te),await r(te,Z)})},onFocus:g,onBlur:b,"aria-readonly":d||void 0,"aria-describedby":Y,"aria-invalid":(m==null?void 0:m.type)==="error"?!0:void 0,"aria-busy":L||void 0,...q(hn.input,Qb[p],l&&hn.inputDisabled)}),o.jsx("div",{"aria-hidden":"true",...F(U("checkbox",{size:p,checked:D?"checked":O?"indeterminate":null,disabled:l?"disabled":null}),q(hn.checkbox,KA[p],!l&&hn.checkboxFocus,B?hn.checkboxChecked:hn.checkboxUnchecked,l&&hn.checkboxDisabled,l&&!B&&hn.checkboxDisabledUnchecked)),children:L?o.jsx(on,{size:"sm",shade:"inherit"}):o.jsxs(o.Fragment,{children:[o.jsx("svg",{viewBox:"0 0 10 10",...q(hn.checkmark,XA[p],D&&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",{...q(hn.indeterminateMark,ZA[p],O&&hn.indeterminateMarkVisible)})]})})]}),o.jsx("div",{className:"x78zum5 xdt5ytf x1lsbc85",children:o.jsx(mx,{label:e,inputID:E,isLabelHidden:t,isDisabled:l,isOptional:f,isRequired:h,labelIcon:k,description:n,descriptionID:N})})]}),(m==null?void 0:m.message)&&o.jsx(yx,{type:m.type,message:m.message,id:S,variant:"detached"}),R&&_.renderTooltip(u)]})}$4.displayName="CheckboxInput";function E4({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,...F({className:"x78zum5 xdt5ytf x1lsbc85"},{className:i,style:a}),children:o.jsx(H0,{value:c,children:r})})}E4.displayName="DropdownMenuRadioGroup";const fo={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}},QA={sm:{kzqmXN:"x1xp8n7a",kZKoxP:"xmix8c7",$$css:!0},md:{kzqmXN:"x17z2i9w",kZKoxP:"x17rw0jw",$$css:!0}},JA={sm:{kzqmXN:"x1v4s8kt",kZKoxP:"xols6we",$$css:!0},md:{kzqmXN:"x1xc55vz",kZKoxP:"xdk7pt",$$css:!0}};function N4({value:e,label:t,description:n,icon:s,isDisabled:r=!1,endContent:i,xstyle:a,className:l,style:c,...u}){const d=q0(),f=Wz();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",g=f.value===e,b=x.useCallback(()=>{r||(f.onChange(e),f.hasCloseOnSelect&&(d==null||d.closeMenu()))},[r,f,e,d]),k=x.useCallback(m=>P0(m,r),[r]);return o.jsx(Za,{...u,role:"menuitemradio","aria-checked":g,tabIndex:r?void 0:-1,onPointerMove:k,marker:o.jsx("span",{"aria-hidden":"true",...F(U("dropdown-menu-radio",{size:p,checked:g?"checked":null,disabled:r?"disabled":null}),q(fo.circle,QA[p],g?fo.checked:fo.unchecked)),children:g&&o.jsx("span",{...F(U("dropdown-menu-radio-dot",{size:p,checked:"checked",disabled:r?"disabled":null}),q(fo.dot,JA[p]))})}),startContent:s?Hs(s,{size:"sm",color:"secondary"}):void 0,label:t,description:n,endContent:i,onClick:b,isDisabled:r,xstyle:[fo.root,r&&fo.disabled,a],...F(U("dropdown-menu-item",{size:h}),{className:l,style:c})})}N4.displayName="DropdownMenuRadioItem";function kn({icon:e,...t}){return o.jsx(ne,{...t,icon:e,isIconOnly:!0})}kn.displayName="IconButton";const Jb={container:{kB7OPa:"x9f619",kZCmMZ:"x1c35znw",kwRFfy:"x64h4k7",kLKAdn:"x14m0hsi",kGO01o:"xc1wllq",$$css:!0}},eM={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}},tM={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}},nM={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}},sM={card:eM,section:tM,dialog:nM},rM={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}},iM={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}},aM={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}},oM={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}},lM={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}},cM={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}},uM={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}},dM={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}},fM={containerMaxHeight:e=>[{"--container-max-height":e!=null?"x18nyedi":e,$$css:!0},{"--x---container-max-height":e??void 0}]};function T4({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?fM.containerMaxHeight(a):null;if(i){const h=sM[i];return[Jb.container,h.containerPaddingInlineStart,h.containerPaddingInlineEnd,h.containerPaddingBlockStart,h.containerPaddingBlockEnd,h.layoutPaddingOuterX,h.layoutPaddingOuterY,h.layoutPaddingInnerX,h.layoutPaddingInnerY,f]}return[Jb.container,rM[l],iM[l],aM[c],oM[c],lM[l],cM[c],uM[u],dM[d],f]}const M1={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}},hM={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}},xM={none:{"--_card-elevation":"xw28qpl",$$css:!0},low:{"--_card-elevation":"x1nn8khe",$$css:!0},med:{"--_card-elevation":"x1ovzxg0",$$css:!0},high:{"--_card-elevation":"xnpe7fx",$$css:!0}},pM={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 bx({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",g=i==null,b=i??4,k=g3[b];return o.jsx("div",{ref:f,...F(U("card",{variant:a}),q(M1.card,hM[a],xM[l],p&&M1.scrollable,pM.sizing(e??null,t??null,n??null,s??null),...T4(g?{useThemeDefault:"card"}:{paddingInnerX:k,paddingInnerY:k,paddingOuterX:k,paddingOuterY:k}),!g&&b!==4&&_l[b],!g&&b!==4&&Il[b],!g&&b!==4&&Ol[b],!g&&b!==4&&Ll[b],a==="default"&&M1.withBorder,c),u,d),...h,children:r})}bx.displayName="Card";const gd={base:{k1xSpc:"xjp7ctv",kMwMTN:"x1tgivj0",kMv6JI:"x9ynric",$$css:!0},light:{kQNsl9:"x19aimcq",$$css:!0},dark:{kQNsl9:"xntwwlm",$$css:!0},system:{kQNsl9:"x108lcm5",$$css:!0}},og=rx.createContext(!1);og.displayName="ThemeNestingContext";const R1=new Set;function gM(e){const t=x.useId();x.useInsertionEffect(()=>{if(e.__built)return;const n=`astryx-theme-${e.name}`;if(R1.has(n))return;T0(`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}=ON(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 R1.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(),R1.delete(n)}}},[e,t])}function mM(e,t,n){lr(()=>{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 z4({theme:e,mode:t="system",children:n}){const s=x.use(og);SN(e),gM(e),mM(s,t,e.name);const r=t==="dark"?gd.dark:t==="light"?gd.light:gd.system,i=x.useMemo(()=>({theme:e,mode:t}),[e,t]);return o.jsx(cx,{value:i,children:o.jsx(og,{value:!0,children:o.jsx("div",{...q(gd.base,r),"data-astryx-theme":e.name,"data-theme":t==="system"?void 0:t,children:n})})})}z4.displayName="Theme";function A4({mode:e,children:t}){return o.jsx("div",{[Cn("media")]:e,className:"xjp7ctv x1tgivj0",children:t})}A4.displayName="MediaTheme";const M4="--color-syntax-";function yM(e){return M4+e}const kM=Object.keys(A0).map(e=>e.replace(M4,""));function bM(e){const t={};for(const n of kM)t[yM(n)]=e.tokens[n];return t}const R4=x.createContext(null);R4.displayName="SyntaxThemeContext";function _4({theme:e,children:t}){const n=x.useMemo(()=>bM(e),[e]),s=x.useMemo(()=>({theme:e}),[e]);return o.jsx(R4,{value:s,children:o.jsx("div",{style:n,"data-astryx-syntax-theme":e.name,children:t})})}_4.displayName="SyntaxTheme";function I4({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]),g=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",g),window.addEventListener("focus",b),()=>{window.removeEventListener("blur",g),window.removeEventListener("focus",b)}},[s,g,b]);const k=x.useCallback(()=>{a("manual")},[a]),m=e==="error",{mode:y}=ux(),v=m||y==="light"?"dark":"light";return o.jsx("div",{role:m?"alert":"status","aria-live":m?"assertive":"polite","aria-atomic":"true",onMouseEnter:g,onMouseLeave:b,onFocusCapture:g,onBlurCapture:b,...F(U("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"}}[!!m<<1|!!i<<0]),children:o.jsx(A4,{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(ne,{variant:"ghost",size:"sm",icon:o.jsx($e,{icon:"close",size:"sm",color:"inherit"}),label:l("@astryx.toast.dismiss"),onClick:k,isIconOnly:!0})]})]})})})}I4.displayName="Toast";const vx=x.createContext(null);vx.displayName="ToastContext";const uc={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 lg(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(lg).filter(Boolean).join(" ");if(x.isValidElement(e)){const{children:t}=e.props;return lg(t)}return""}function V0({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),g=x.useRef(null),b=x.useRef(null),k=x.useCallback(A=>{if(!A)return null;const z=A.querySelectorAll(p4);for(const M of z)if(!(M.getAttribute("tabindex")==="-1"||M.hasAttribute("disabled")||M.getAttribute("aria-disabled")==="true"))return M;return null},[]),m=Pl(),y=x.useCallback(A=>{const{uniqueID:z,collisionBehavior:M="overwrite"}=A.options;if(z&&M==="ignore"&&d.current.some(R=>R.options.uniqueID===z))return;const L=lg(A.options.body);L&&m(L,A.options.type==="error"?"assertive":"polite"),l(R=>z&&R.find(I=>I.options.uniqueID===z)?R.map(I=>I.options.uniqueID===z?A:I):[...R,A])},[m]),v=x.useCallback((A,z)=>{var I,_;if(h.current.has(A))return;h.current.add(A);const M=d.current.find(O=>O.id===A);M&&((_=(I=M.options).onHide)==null||_.call(I,z));const L=f.current,R=document.activeElement,T=(L==null?void 0:L.querySelector(`[data-toast-id="${A}"]`))??null;if(T&&R instanceof Node&&T.contains(R))if(g.current=A,d.current.filter(D=>D.id!==A).length>0){const D=d.current.findIndex(P=>P.id===A),B=d.current[D+1]??d.current[D-1];b.current=B?B.id:"restore"}else b.current="restore";u(O=>O.has(A)?O:new Set(O).add(A))},[]),w=x.useCallback(A=>{h.current.delete(A),u(z=>{if(!z.has(A))return z;const M=new Set(z);return M.delete(A),M}),l(z=>z.filter(M=>M.id!==A))},[]);x.useLayoutEffect(()=>{const A=g.current,z=b.current;if(A==null||z==null||a.some(R=>R.id===A))return;g.current=null,b.current=null;const M=f.current;if(z!=="restore"&&M){const R=M.querySelector(`[data-toast-id="${z}"]`),T=k(R)??R;if(T){T.focus();return}}const L=p.current;p.current=null,L&&L.isConnected?L.focus():M&&M.focus()},[a,k]);const j=x.useCallback(A=>d.current.find(z=>z.options.uniqueID===A),[]),C=x.useMemo(()=>({addToast:y,removeToast:v,findByUniqueID:j}),[y,v,j]),$=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 A=f.current;if(A&&typeof A.showPopover=="function")try{A.showPopover()}catch{}},[s]);const N=a.length>0;x.useEffect(()=>{if(!N)return;const A=z=>{if(z.key!=="F6")return;const M=f.current;if(!M)return;const L=document.activeElement;if(L instanceof Node&&M.contains(L))return;z.preventDefault(),L instanceof HTMLElement&&(p.current=L);const R=M.querySelectorAll("[data-toast-id]"),T=R[R.length-1]??null;(k(T)??T??M).focus()};return document.addEventListener("keydown",A),()=>{document.removeEventListener("keydown",A)}},[N,k]);const S=e==="topEnd"?uc.topEnd:e==="topStart"?uc.topStart:e==="bottomStart"?uc.bottomStart:uc.bottomEnd;return o.jsxs(vx,{value:C,children:[r,o.jsx("div",{ref:f,role:"region","aria-label":i("@astryx.toast.viewport"),tabIndex:-1,popover:s?"manual":void 0,...F(q(uc.viewport,S),{style:Object.keys(E).length>0?E:void 0}),children:$.map(A=>{const z=A.options,M=z.type??"info",L=z.isAutoHide??M!=="error",R=z.autoHideDuration??5e3,T=c.has(A.id);return o.jsx("div",{"data-toast-id":A.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"}}[!!T<<0],onTransitionEnd:T?I=>{I.propertyName==="grid-template-rows"&&w(A.id)}:void 0,children:o.jsx("div",{className:"xb3r6kr",children:o.jsx(I4,{type:M,body:z.body,endContent:z.endContent,isAutoHide:L,autoHideDuration:R,isExiting:T,onDismiss:I=>v(A.id,I)})})},A.id)})})]})}V0.displayName="ToastViewport";const ev='button, [role="button"]';function tv(e){return e.matches(ev)?e:e.querySelector(ev)}const Zr={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 W0({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:g,hasLightDismiss:b=!0,hasEscapeDismiss:k=!0,xstyle:m,className:y,style:v,"data-testid":w}){const j=x.useRef(null),C=i!==void 0,$=x.useRef(0),E=x.useCallback(()=>{a==null||a(!0)},[a]),N=x.useCallback(()=>{$.current=Date.now(),a==null||a(!1)},[a]),S=ql({dialogLabel:u,role:d,isModal:f,hasLightDismiss:b,hasEscapeDismiss:k,hasCloseButton:h,closeButtonLabel:p,hasAutoFocus:g,onShow:E,onHide:N}),A=x.useCallback(()=>{l&&(Date.now()-$.current<50||S.toggle())},[l,S]),z=x.useCallback(T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),A())},[A]),M=x.useCallback(T=>{T.setAttribute("aria-haspopup",S.triggerProps["aria-haspopup"]),T.setAttribute("aria-expanded",String(S.triggerProps["aria-expanded"])),T.setAttribute("aria-controls",S.triggerProps["aria-controls"]),T.addEventListener("click",A);const I=T.tagName!=="BUTTON"&&T.getAttribute("role")==="button";return I&&T.addEventListener("keydown",z),()=>{T.removeAttribute("aria-haspopup"),T.removeAttribute("aria-expanded"),T.removeAttribute("aria-controls"),T.removeEventListener("click",A),I&&T.removeEventListener("keydown",z)}},[S,A,z]);lr(()=>{if(!t)return;const T=t.current;if(!T)return;const I=tv(T);if(I||va(),!I)return;S.triggerRef(T);const _=M(I);return()=>{S.triggerRef(null),_()}},[t,S,M]),lr(()=>{if(t||typeof e=="function")return;const T=j.current;if(!T)return;S.triggerRef(T);const I=tv(T);if(I||va(),!I)return;const _=M(I);return()=>{S.triggerRef(null),_()}},[t,S,M]),lr(()=>{C&&(i&&!S.isOpen?S.show():!i&&S.isOpen&&S.hide())},[i,C,S]);const L=c?Zr.customWidth(c):Zr.matchTrigger;if(t&&e==null)return o.jsx(o.Fragment,{children:S.render(o.jsx("div",{"data-testid":w,...F(U("popover"),q(Zr.contentPadding,m),y,v),children:n}),{placement:s,alignment:r,xstyle:[L,Zr.gap,or[s]]})});if(typeof e=="function"){const T={ref:S.triggerRef,onClick:A,"aria-haspopup":"dialog","aria-expanded":S.isOpen,"aria-controls":S.id};return o.jsxs(o.Fragment,{children:[e(T),S.render(o.jsx("div",{"data-testid":w,...F(U("popover"),q(Zr.contentPadding,m),y,v),children:n}),{placement:s,alignment:r,xstyle:[L,Zr.gap,or[s]]})]})}return o.jsxs(o.Fragment,{children:[o.jsx(F0,{value:"button",children:o.jsx("div",{ref:j,className:"x3nfvp2",children:e})}),S.render(o.jsx("div",{"data-testid":w,...F(U("popover"),q(Zr.contentPadding,m),y,v),children:n}),{placement:s,alignment:r,xstyle:[L,Zr.gap,or[s]]})]})}W0.displayName="Popover";const _1={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 vM(e){return e.hasAttribute("tabindex")?e.tabIndex>=0:["A","BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)?!e.disabled:!!e.isContentEditable}function wM(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"?_1.marginBlock:_1.marginInline,p=Dl({mode:"context",onShow:d,onHide:f}),g=x.useMemo(()=>[_1.container,h],[h]),b=x.useRef(null),k=x.useRef(null),m=x.useRef(null),y=x.useRef(!1),v=x.useRef(!1),w=x.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),k.current&&(clearTimeout(k.current),k.current=null)},[]),j=x.useCallback(()=>{!a||c===!1||(w(),b.current=setTimeout(()=>{p.show()},s))},[a,c,w,p,s]),C=x.useCallback(()=>{c!==!0&&(w(),k.current=setTimeout(()=>{y.current||p.hide()},r))},[c,w,p,r]),$=x.useCallback(()=>{j()},[j]),E=x.useCallback(()=>{C()},[C]),N=x.useCallback(()=>{if(a){if(v.current){v.current=!1;return}w(),p.show()}},[a,w,p]),S=x.useCallback(R=>{const T=R.relatedTarget,I=document.getElementById(p.id);I!=null&&I.contains(T)||C()},[p.id,C]),A=x.useCallback(R=>{R.key==="Escape"&&(R.stopPropagation(),w(),p.hide())},[w,p]),z=x.useCallback(R=>{m.current&&(m.current.removeEventListener("mouseenter",$),m.current.removeEventListener("mouseleave",E),m.current.removeEventListener("focusin",N),m.current.removeEventListener("focusout",S),m.current.removeEventListener("keydown",A)),R&&(R.addEventListener("mouseenter",$),R.addEventListener("mouseleave",E),(i==="always"||i==="auto"&&vM(R))&&(R.addEventListener("focusin",N),R.addEventListener("focusout",S)),R.addEventListener("keydown",A)),m.current=R},[i,$,E,N,S,A]),M=x.useCallback(R=>{p.ref(R),z(R)},[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 L=x.useCallback((R,T)=>{const I=(T==null?void 0:T.placement)??t,_=U("hovercard").className,O={placement:I,alignment:(T==null?void 0:T.alignment)??n,role:l?"dialog":"group","aria-label":l||void 0,xstyle:[g,or[I],T==null?void 0:T.xstyle],className:T!=null&&T.className?`${_} ${T.className}`:_,style:T==null?void 0:T.style,as:"span"};return p.render(o.jsx("span",{className:"x1lliihq x1vlblms xvmdzux x126nfab x1t818jl",onMouseEnter:()=>{y.current=!0,w()},onMouseLeave:()=>{y.current=!1,C()},onKeyDown:D=>{var B;D.key==="Escape"&&(D.stopPropagation(),v.current=!0,w(),p.hide(),(B=m.current)==null||B.focus())},onBlur:D=>{var V;const B=D.relatedTarget;D.currentTarget.contains(B)||(V=m.current)!=null&&V.contains(B)||C()},children:R}),O)},[p,t,n,l,w,C,g]);return{ref:M,positionRef:p.ref,interactionRef:z,anchorId:p.anchorId,describedBy:p.id,renderHoverCard:L,show:p.show,hide:p.hide}}function jM(e){return typeof e=="string"||typeof e=="number"}function SM(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function O4({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:g,style:b}){const k=x.useRef(null),m=jM(e),y=d===!0||d==="auto"&&m,v=x.useCallback(()=>{u==null||u(!0)},[u]),w=x.useCallback(()=>{u==null||u(!1)},[u]),j=wM({placement:n,alignment:s,delay:r,hideDelay:i,focusTrigger:a,isEnabled:l,label:c,isOpen:f,isDefaultOpen:h,onShow:v,onHide:w});lr(()=>{if(m)return;const $=k.current;if(!$)return;const E=$.firstElementChild;if(!E)return;j.ref(E);const N=E.getAttribute("aria-describedby");return E.setAttribute("aria-describedby",SM(N,j.describedBy)??""),()=>{j.ref(null),N?E.setAttribute("aria-describedby",N):E.removeAttribute("aria-describedby")}},[m,j.ref,j.describedBy]);const C=j.renderHoverCard(t,{xstyle:p,className:g,style:b});return m?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"}}[!!y<<0],children:e}),C]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{ref:k,className:"xjp7ctv",children:e}),C]})}O4.displayName="HoverCard";const nv=new Map,CM=/\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/,$M=/\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/,EM=/\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/,NM=/\b(important|inherit|initial|unset|revert|auto|none)\b/,TM=/\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/,zM=/\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 L4(e){const t=nv.get(e);if(t!==void 0)return t;const n=AM(e);return nv.set(e,n),n}function AM(e){const t=MM(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 MM(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:CM},{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:NM},{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:$M},{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:EM},{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: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:"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:zM},{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 sv=2e3,RM=800;async function _M(){return typeof scheduler<"u"&&typeof scheduler.yield=="function"?scheduler.yield():new Promise(e=>setTimeout(e,0))}function D4(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 IM(e,t){const n=L4(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(D4(e,n,r,i)),r=i+1);return s}async function OM(e,t,n){const s=L4(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(D4(e,s,i,l)),a+=l-i+1,i=l+1,a>=RM&&l<e.length)){if(n!=null&&n.aborted)return r;a=0,await _M()}return r}function LM(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 DM=`:root {
|
|
89
|
-
${Object.entries(A0).map(([e,t])=>` ${e}: ${t};`).join(`
|
|
90
|
-
`)}
|
|
91
|
-
}`,BM=`
|
|
92
|
-
${DM}
|
|
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 rv=!1;function wx(){if(rv||typeof document>"u")return;const e=document.createElement("style");e.setAttribute("data-astryx-highlight-styles",""),e.textContent=BM,document.head.appendChild(e),rv=!0}const qM=["keyword","string","comment","number","function","type","tag","attribute","property","operator","constant","punctuation","variable"],iv=new Set(qM);let md=null;function HM(e){if(iv.has(e)||(iv.add(e),wx(),typeof document>"u"))return;if(!md){const s=document.createElement("style");if(s.setAttribute("data-astryx-highlight-dynamic",""),document.head.appendChild(s),md=s.sheet??null,!md)return}const t=`astryx-${e}`,n=`var(--color-syntax-${e}, currentColor)`;md.insertRule(`.astryx-codeblock code::highlight(${t}), .astryx-codeeditor code::highlight(${t}) { color: ${n}; }`)}function PM(){const e=new Map;return t=>{let n=e.get(t);if(n)return n;HM(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 B4(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 I1(e){for(const{range:t,highlight:n}of e)n.delete(t)}function UM(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&&B4(i[a],c,r,s)}return r}function FM(e,t){wx();const n=PM(),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&&B4(f[h],p,d,n)}return()=>I1(d)}const a=new Map,l=new Map;function c(d,f){if(a.has(d))return;const h=UM(d,t,r[f],n);a.set(d,h)}function u(d){const f=a.get(d);f&&(I1(f),a.delete(d))}for(let d=0;d<s.length;d++){const f=s[d],h=g=>{g.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())I1(f);a.clear()}}const GM={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},K0={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}]},zr={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,KM=100,av=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 q4(e,t,n,s,r=WM){if(r=Math.max(1,Math.floor(r)),e.length<KM)return o.jsx(av,{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",{...F({className:"xb5mbof"},{style:{containIntrinsicBlockSize:`auto ${u}`}}),children:o.jsx(av,{lines:c,startIndex:a,highlightSet:t,renderLineContent:n,lineNumbers:s})},a))}return i}function H4(){return typeof CSS<"u"&&"highlights"in CSS&&typeof Highlight<"u"}function XM(){if(typeof navigator>"u")return!1;const e=navigator.userAgent;return e.includes("AppleWebKit")&&!e.includes("Chrome")}function ZM(e,t,n){const[s,r]=x.useState(null),i=x.useMemo(()=>n?LM(n(e,t),e):e.length>=sv?null:IM(e,t),[e,t,n]);return x.useEffect(()=>{if(e.length<sv||n)return;const a=new AbortController;async function l(){try{const c=await OM(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 YM(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 QM({lines:e,tokenLines:t,highlightSet:n,isWrapped:s,sizeStyle:r,hasLineNumbers:i,maxDigits:a}){x.useInsertionEffect(()=>{wx()},[]);const l=x.useCallback((c,u)=>{const d=t[u]??[];return o.jsx("span",{className:"xeuugli",children:YM(c,d)})},[t]);return o.jsx("code",{...q(zr.code,r,s&&zr.codeWrapped,i&&zr.codeNumbered,i&&K0.gutterWidth(a)),children:q4(e,n,l,i)})}function JM({lines:e,tokenLines:t,highlightSet:n,isWrapped:s,sizeStyle:r,hasLineNumbers:i,maxDigits:a}){const l=x.useRef(null);x.useEffect(()=>{if(!H4())return;wx();const u=l.current;if(!(!u||t.length===0))return FM(u,t)},[t]);const c=x.useCallback(u=>u||"",[]);return o.jsx("code",{ref:l,...q(zr.code,r,s&&zr.codeWrapped,i&&zr.codeNumbered,i&&K0.gutterWidth(a)),children:q4(e,n,c,i)})}function X0({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:g="card",tokenizer:b,highlightMode:k="auto",syntaxTheme:m,xstyle:y,className:v,style:w,ref:j,...C}){const $=be(),[E,N]=x.useState(!1),S=x.useRef(null),A=Pl();x.useEffect(()=>()=>{S.current!=null&&clearTimeout(S.current)},[]);const z=k==="spans"||k==="auto"&&!H4()||k==="auto"&&XM(),M=x.useMemo(()=>{const ge=e.split(`
|
|
137
|
-
`);return ge.length>1&&ge[ge.length-1]===""&&ge.pop(),ge},[e]),L=ZM(e,t,b),R=x.useMemo(()=>i?new Set(i):null,[i]),T=x.useCallback(async()=>{try{await navigator.clipboard.writeText(e),N(!0),A($("@astryx.codeBlock.copied")),l==null||l(),S.current!=null&&clearTimeout(S.current),S.current=setTimeout(()=>{S.current=null,N(!1)},2e3)}catch{}},[e,l,A,$]),I=h==="sm"?zr.sizeSm:zr.sizeMd,_=String(M.length).length,O=s&&t!=="plaintext"?t:null,D=n!=null||O!=null,B=d&&M.length>=f,[P,V]=x.useState(!1),Y=x.useId(),Z=x.useRef(null),te=u?{maxHeight:typeof u=="number"?`${u}px`:u}:void 0,J=o.jsx($e,{icon:E?"check":"copy",size:"sm",color:"inherit"}),K=a?o.jsx("button",{type:"button",onClick:ge=>{ge.stopPropagation(),T()},"aria-label":$(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"}}[!D<<0],children:J}):null,re=D?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:B?"button":void 0,tabIndex:B?0:void 0,"aria-expanded":B?!P:void 0,"aria-controls":B?Y:void 0,onClick:B?()=>V(ge=>!ge):void 0,onKeyDown:B?ge=>{(ge.key==="Enter"||ge.key===" ")&&(ge.preventDefault(),V(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"}}[!!B<<0],children:o.jsxs("span",{className:"x78zum5 x6s0dn4 x141an7d x9m5x89 x1e4wzip x1mjzq1q x1ghz6dp x1ltkj2j",children:[B&&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"}}[!P<<0],children:o.jsx($e,{icon:"chevronRight",size:"xsm",color:"inherit"})}),n,n&&O?" — ":"",O]})}),K]}):null,le=o.jsx("div",{ref:Z,tabIndex:0,role:"group","aria-label":O??$("@astryx.codeBlock.code"),...F({className:"xw2csxc x1odjw0f"},{style:te}),children:o.jsx("div",{...{0:{className:"x78zum5 x1pshirs"},1:{className:"x78zum5 x1pshirs x1ajqlyv"}}[!!(D&&!r)<<0],children:z?o.jsx(QM,{lines:M,tokenLines:L,highlightSet:R,isWrapped:c,sizeStyle:I,hasLineNumbers:r,maxDigits:_}):o.jsx(JM,{lines:M,tokenLines:L,highlightSet:R,isWrapped:c,sizeStyle:I,hasLineNumbers:r,maxDigits:_})})}),ve=o.jsxs("pre",{ref:j,...F(U("codeblock",{size:h,language:t,container:g}),q(zr.root,K0.width(p),GM[g],y),v,w),...C,children:[re,B?o.jsx("div",{id:Y,inert:P?!0:void 0,...{0:{className:"xrvj5dj x1tu4anv x1qn9uv2 x80gvsz xlr8y92"},1:{className:"xrvj5dj x1qn9uv2 x80gvsz xlr8y92 xihq33y"}}[!!P<<0],children:o.jsx("div",{className:"xb3r6kr x2lwn1j",children:le})}):le,!D&&K]});return m?o.jsx(_4,{theme:m,children:ve}):ve}X0.displayName="CodeBlock";const eR={base:{kMv6JI:"x9m5x89",kGuDYH:"xp03k98",kLWn49:"x15bjb6t",kWkggS:"xwmxj5m",kg3NbH:"x7a5moj",k8WAf4:"x1hp7d8q",kaIpWk:"xx3sua9",kHjlTd:"x1mzt3pk",kTgw9:"x13faqbe",$$css:!0}},tR={primary:{kMwMTN:"x1tgivj0",$$css:!0},secondary:{kMwMTN:"xv1l7n4",$$css:!0},inherit:{kMwMTN:"x1heor9g",$$css:!0}},nR={inherit:{kGuDYH:"x1qlqyl8",kLWn49:"x15bjb6t",$$css:!0}};function Z0({children:e,color:t="primary",size:n,xstyle:s,className:r,style:i,ref:a,...l}){return o.jsx("code",{ref:a,...l,...F(U("code",{color:t}),q(eR.base,tR[t],n&&nR[n],s),r,i),children:e})}Z0.displayName="Code";const Y0=x.createContext(null);Y0.displayName="DialogContext";function sR(){return x.use(Y0)}function rR(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 Wi={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}},iR={ks0D6T:"x95b5qq",$$css:!0},aR={kogj98:"x1ghz6dp",$$css:!0},O1={sizing:(e,t)=>[iR,{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)=>[aR,{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 yd(e){return typeof e=="number"?`${e}px`:e}function oR(e){const{top:t,bottom:n,start:s,end:r}=e;return{top:t!==void 0?yd(t):"auto",bottom:n!==void 0?yd(n):"auto",insetInlineStart:s!==void 0?yd(s):"auto",insetInlineEnd:r!==void 0?yd(r):"auto"}}function ns({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,...g}){const b=c==null,k=c??4,m=g3[k],y=a==="fullscreen",v=x.useId(),w=x.useMemo(()=>({isInline:t,titleId:v}),[t,v]),j=g["aria-label"]!=null||g["aria-labelledby"]!=null,C=x.useRef(null),$=x.useCallback(_=>{if(C.current=_,!_||j)return;_.querySelector(`#${CSS.escape(v)}`)!=null?_.setAttribute("aria-labelledby",v):_.removeAttribute("aria-labelledby")},[v,j]),E=x.useRef(null),N=l!=="required",S=l==="info";x.useEffect(()=>{var O;if(t)return;const _=C.current;if(_)if(e){E.current=document.activeElement;const D=E.current;if(D&&D!==document.body){const B=rR(D);_.style.setProperty("--dialog-dir-x",`${B.x}px`),_.style.setProperty("--dialog-dir-y",`${B.y}px`)}else _.style.setProperty("--dialog-dir-x","0px"),_.style.setProperty("--dialog-dir-y","16px");if(!_.open){_.showModal();const B=_.querySelector("[data-autofocus]");B&&B.focus()}}else _.open&&_.close(),(O=E.current)==null||O.focus(),E.current=null},[e,t]),w4(e&&!t),x.useEffect(()=>{if(t)return;const _=C.current;if(!_||!e)return;const O=D=>{if(D.key==="Escape"){if(f4(D)||Hb())return;D.preventDefault(),N&&n(!1)}};return _.addEventListener("keydown",O),()=>_.removeEventListener("keydown",O)},[e,t,N,n]);const A=x.useRef(!1);x.useEffect(()=>{var O;const _=((O=C.current)==null?void 0:O.querySelector(`#${CSS.escape(v)}`))!=null;e&&!t&&!j&&!_&&!A.current&&(A.current=!0,va())},[e,t,j,v]);const z=_=>{_.target===_.currentTarget&&S&&n(!1)},M=_=>{_.preventDefault(),!Hb()&&N&&n(!1)},L=o.jsx("div",{...q(Wi.inner,...T4(b?{useThemeDefault:"dialog",maxHeight:y?void 0:typeof r=="number"?`${r}px`:r}:{paddingInnerX:m,paddingInnerY:m,paddingOuterX:m,paddingOuterY:m,maxHeight:y?void 0:typeof r=="number"?`${r}px`:r}),!b&&k!==4&&_l[k],!b&&k!==4&&Il[k],!b&&k!==4&&Ol[k],!b&&k!==4&&Ll[k]),children:o.jsx(Y0,{value:w,children:u})}),R=i!=null&&!y,{open:T,...I}=g;return t?e?o.jsx("div",{...I,...F(U("dialog",{variant:a}),q(Wi.inlineWrapper,!y&&O1.sizing(s,r),y&&Wi.fullscreen,d),f,h),"data-testid":g["data-testid"],children:L}):null:o.jsx("dialog",{ref:rt(p,$),...I,...F(U("dialog",{variant:a}),q(Wi.dialog,e&&Wi.open,Wi.backdrop,!y&&O1.sizing(s,r),R&&(()=>{const _=oR(i);return O1.position(_.top,_.insetInlineStart,_.insetInlineEnd,_.bottom)})(),y&&Wi.fullscreen,d),f,h),onClick:z,onCancel:M,"aria-modal":"true",...l==="required"?{role:"alertdialog"}:void 0,children:L})}ns.displayName="Dialog";const lR=x.lazy(async()=>A3(()=>Promise.resolve().then(()=>y4),void 0).then(e=>({default:e.Tooltip}))),cR={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"};function Ur({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:g,children:b,ref:k,...m}){const y=cR[e],v=n&&n!==e?{"aria-level":n}:{},w=l??(i===1?"break-all":"break-word"),j=i>0||d?"block":r,C=q3({maxLines:i}),$=typeof a=="string"?a:"above",E=i>0&&a!==!1&&C.isTruncated,N=x.useRef(null),S=i>1?{WebkitLineClamp:i}:void 0;return o.jsxs(o.Fragment,{children:[o.jsx(y,{ref:rt(k,C.ref,N),...F(U("heading",{level:e,color:s,...t&&{type:t}}),q(R0[H3(s)],t?_0[t]:tT[e],t&&M3[t],i===1?Yf.singleLine:i>1?Yf.multiLine:R3[j],i>0&&_3[w],c&&I3[c],u!=="start"&&D3[u],d&&O3.enabled,f&&L3.strikethrough,h),p,{...g,...S}),title:E?C.fullText:void 0,...v,...m,children:b}),E&&o.jsx(x.Suspense,{fallback:null,children:o.jsx(lR,{anchorRef:N,content:o.jsx("span",{...q(B3.content),children:C.fullText}),placement:$})})]})}Ur.displayName="Heading";const uR={titleFocusable:{kI3sdo:"x1a2a7pz",$$css:!0}};function ss({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=sR(),g=(p==null?void 0:p.isInline)!==!0,b=p==null?void 0:p.titleId;return x.useEffect(()=>{g&&h.current&&h.current.focus()},[g]),o.jsx(Xf,{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(Ur,{ref:h,id:b,level:2,tabIndex:-1,xstyle:uR.titleFocusable,children:e}),t&&o.jsx(se,{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(ne,{variant:"ghost",label:f("@astryx.dialog.close"),tooltip:f("@astryx.dialog.close"),icon:o.jsx($e,{icon:"close",color:"inherit"}),onClick:()=>{n==null||n(!1)},isIconOnly:!0})]})]})})}ss.displayName="DialogHeader";const dR={scrollable:{kVQacm:"xysyzu8",$$css:!0}};function Q0({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:g,as:b="div",xstyle:k,className:m,style:y,children:v,ref:w,...j}){const C=t??(e==="horizontal"?s:r),$=n??(e==="horizontal"?r:s),E=e==="horizontal"?C:$,N=e==="horizontal"?$:C,S=l??a,A=c??a,z=q(...Zp({direction:e,crossAlign:N,mainAlign:E,gap:i,wrap:g}),S!=null&&uN[S],A!=null&&dN[A],u&&dR.scrollable,k),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,...F(U("stack",{direction:e,gap:i,wrap:g}),z,m,{...y,...M}),...j},v)}Q0.displayName="Stack";function we({ref:e,justify:t,align:n,hAlign:s,vAlign:r,...i}){return o.jsx(Q0,{...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(Q0,{...i,direction:"vertical",hAlign:s??n,vAlign:r??t,ref:e})}fe.displayName="VStack";const kd={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}},fR={sizing:e=>[{kZKoxP:e!=null?"x16ye13r":e,$$css:!0},{"--x-height":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function Bi({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(ax),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,...F(U("layout-footer"),q(kd.footer,fR.sizing(n??null),h&&kd.divider,a),l,c),...d,children:o.jsx("div",{...q(kd.inner,p&&kd.fullBleed,r!=null&&_l[r],r!=null&&Il[r],r!=null&&Ol[r],r!=null&&Ll[r]),children:e})})}Bi.displayName="LayoutFooter";const P4=x.createContext({direction:"vertical"});P4.displayName="FormLayoutContext";const L1={container:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",$$css:!0},containerGap:{kOIVth:"xzye2dw",$$css:!0},horizontalLabels:{k1xSpc:"xjp7ctv",$$css:!0}},hR={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function Ul({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:g,xstyle:b,children:k,className:m,style:y,ref:v,...w}){const{direction:j}=x.use(P4),C=j==="horizontal-labels",$=a??(n?`${s}-desc`:void 0),E=(f==null?void 0:f.messageID)??(f!=null&&f.message?`${s}-status`:void 0);Bl("Field","isOptional and isRequired are mutually exclusive. isOptional takes precedence.",l&&c);const N=o.jsx(mx,{label:e,inputID:s,labelID:r,isGroupLabel:i,isLabelHidden:t,isDisabled:u,isOptional:l,isRequired:c,labelIcon:d,labelTooltip:h,description:C?void 0:n,descriptionID:C?void 0:$}),S=f!=null&&f.message&&p!=="tooltip"?o.jsx(yx,{type:f.type,message:f.message,id:E,variant:p}):null;return C?o.jsxs("div",{ref:v,...F(U("field",{layout:"horizontal-labels"}),q(L1.horizontalLabels,b),m,y),...w,children:[o.jsx("div",{className:"x1enrzb7",children:N}),o.jsxs("div",{className:"x78zum5 xdt5ytf xc8icb0",children:[n&&o.jsx(se,{type:"supporting",display:"block",id:$,children:n}),k,S]})]}):o.jsxs("div",{ref:v,...F(U("field"),q(L1.container,!t&&L1.containerGap,g!=null&&hR.width(g),b),m,y),...w,children:[N,p==="attached"?o.jsxs("div",{className:"x78zum5 xdt5ytf xc8icb0",children:[k,S]}):o.jsxs(o.Fragment,{children:[k,S]})]})}Ul.displayName="Field";const gl={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}},J0={warning:{kVAM5u:"x8wg1ba",$$css:!0},error:{kVAM5u:"x1ofxpqo",$$css:!0},success:{kVAM5u:"x16m2moy",$$css:!0}},ey={warning:{kGVxlE:"x1gnnqk1 xnoa3fc",$$css:!0},error:{kGVxlE:"x1gnnqk1 xl68szm",$$css:!0},success:{kGVxlE:"x1gnnqk1 xig9bu2",$$css:!0}},U4={warning:{kVAM5u:"x8wg1ba xa1yw2k",$$css:!0},error:{kVAM5u:"x1ofxpqo xk2sxw7",$$css:!0},success:{kVAM5u:"x16m2moy xyq33ac",$$css:!0}},F4={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}},G4=x.createContext(null);G4.displayName="InputGroupContext";function V4(){return x.use(G4)}const xR={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}};function Xn({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:g=!1,value:b,placeholder:k,labelTooltip:m,hasClear:y=!1,hasAutoFocus:v=!1,htmlName:w,onEnter:j,onKeyDown:C,width:$,xstyle:E,className:N,style:S,ref:A,...z}){const M=be(),L=Ka(f,"md"),R=x.useId(),T=x.useId(),I=x.useId(),_=x.useId(),O=x.useRef(null),D=x.useRef(null),B=V4(),[,P]=x.useTransition(),[V,Y]=x.useOptimistic(b),Z=g||V!==b,te=a&&!!l,J=js({placement:"above",focusTrigger:"always",isEnabled:te}),{statusIcon:K,describedBy:re}=S4({status:u,statusVariant:d,isInGroup:!!B}),{ariaLabelledBy:le,ariaDescribedBy:ve}=x3(T,[s?I:null,!B&&d!=="tooltip"&&(u!=null&&u.message)?_:null,re,te?J.describedBy:null],B),ge=ue=>{if(a)return;const pe=ue.target.value;h==null||h(pe,ue),p&&!ue.defaultPrevented&&P(async()=>{Y(pe),await p(pe,ue)})},xe=x.useCallback(()=>{var ue;h==null||h("",null),(ue=O.current)==null||ue.focus()},[h]),{onClick:ce,onMouseUp:Q}=U0({containerRef:D,inputRef:O,disabled:a}),ye=o.jsxs("div",{ref:ue=>{D.current=ue,J.ref(ue)},onClick:ce,onMouseUp:Q,...F(U("text-input",{size:L,status:(u==null?void 0:u.type)??null}),q(gl.base,xR[L],a&&gl.disabled,u&&J0[u.type],u&&!a&&ey[u.type],u&&U4[u.type],B&&F4.inGroup,E),N,S),children:[c&&Hs(c,{size:"sm",color:"secondary"}),B&&o.jsx(Oi,{id:T,children:t}),o.jsx("input",{...z,ref:rt(A,O),id:R,name:w,type:e,value:V,onChange:ge,onKeyDown:j||C?ue=>{ue.key==="Enter"&&(j==null||j()),C==null||C(ue)}:void 0,placeholder:k,disabled:a&&!te,"aria-disabled":te?"true":void 0,readOnly:te||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]}),y&&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($e,{icon:"close",size:"sm",color:"secondary"})}),Z&&o.jsx(on,{size:"sm"}),K]});return B?o.jsxs(o.Fragment,{children:[ye,te&&J.renderTooltip(l)]}):o.jsxs(Ul,{label:t,isLabelHidden:n,description:s,inputID:R,descriptionID:s?I:void 0,isOptional:r,isRequired:i,isDisabled:a,status:u?{type:u.type,message:u.message,messageID:u.message?_:void 0}:void 0,statusVariant:d,labelTooltip:m,width:$,children:[ye,te&&J.renderTooltip(l)]})}Xn.displayName="TextInput";function W4(e){return typeof e=="string"?!0:!("type"in e)}function pR(e){return typeof e=="object"&&"type"in e&&e.type==="divider"}function K4(e){return typeof e=="object"&&"type"in e&&e.type==="section"}function eh(e){return typeof e=="string"?{value:e,label:e}:{...e,label:e.label??e.value}}function gR(e){const t=[];for(const n of e)if(W4(n))t.push(eh(n));else if(K4(n))for(const s of n.options)t.push(eh(s));return t}function mR({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 lr(()=>{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(),g=h.getBoundingClientRect(),b=r.current.getBoundingClientRect(),k=p.height;if(k<=0){u(0,!0);return}const m=g.top-p.top+g.height/2,v=b.top+b.height/2-m,w=window.innerHeight,j=Math.max(0,w-k),C=Math.min(Math.max(v,0),j),$=Math.max(0,b.bottom-C);u($,!0)},[e,t,n,s,r,u]),{offset:i,isPositioned:l}}function yR({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(""),g=x.useRef(void 0),b=x.useCallback($=>`${u}-item-${$}`,[u]),k=x.useCallback(()=>e.map(($,E)=>$.disabled?-1:E).filter($=>$>=0),[e]),m=x.useCallback(()=>e.findIndex($=>$.value===t),[e,t]),y=x.useCallback(()=>{f(-1),a()},[a]),v=x.useCallback($=>{$.disabled||(l==null||l($.value),y())},[l,y]),w=x.useCallback(()=>{if(!n){if(s)y();else if(i(),!r){const $=m();f($>=0?$:0)}}},[n,s,i,y,m,r]),j=x.useCallback(($,E)=>{$.disabled||f(E)},[]),C=x.useCallback($=>{if(n)return;const E=k();switch($.key){case"ArrowDown":if($.preventDefault(),!s)i(),f(0);else{const N=E.indexOf(d),S=Math.min(N+1,E.length-1);f(E[S]??d)}break;case"ArrowUp":if($.preventDefault(),!s)i(),f(e.length-1);else{const N=E.indexOf(d),S=Math.max(N-1,0);f(E[S]??d)}break;case" ":if(r)break;case"Enter":if($.preventDefault(),s&&d>=0){const N=e[d];N&&!N.disabled&&v(N)}else if(!s&&(i(),!r)){const N=m();f(N>=0?N:0)}break;case"Escape":s&&($.preventDefault(),y());break;case"Tab":s&&y();break;case"Home":$.preventDefault(),s&&E.length>0&&f(E[0]);break;case"End":$.preventDefault(),s&&E.length>0&&f(E[E.length-1]);break;case"PageUp":$.preventDefault(),s&&E.length>0&&f(E[0]);break;case"PageDown":$.preventDefault(),s&&E.length>0&&f(E[E.length-1]);break;case"Delete":case"Backspace":!r&&!s&&c!=null&&t!=null&&($.preventDefault(),c());break;default:if(!r&&$.key.length===1&&!$.ctrlKey&&!$.metaKey){const N=h+$.key.toLowerCase();p(N),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{p("")},500);const S=e.findIndex(A=>{var z;return!A.disabled&&((z=A.label)==null?void 0:z.toLowerCase().startsWith(N))});S>=0&&(s||i(),f(S))}break}},[n,s,i,y,e,d,v,m,k,h,r,c,t]);return{highlightedIndex:d,setHighlightedIndex:f,getItemId:b,onTriggerClick:w,onKeyDown:C,onItemSelect:v,onItemMouseEnter:j}}const kR={root:{k8WAf4:"xt970qd",kg3NbH:"xnjsko4",kaIpWk:"x2u8bby",$$css:!0}};function X4({icon:e,label:t,description:n,endContent:s,xstyle:r,className:i,style:a}){return o.jsx(Za,{startContent:e?Hs(e,{size:"sm",color:"secondary"}):void 0,label:t,description:n,endContent:s,xstyle:[kR.root,r],...F(U("selector-option"),{className:i,style:a})})}X4.displayName="SelectorOption";const Ns={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}},bR={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},vR={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}},ov={warning:"warning",error:"error",success:"success"},lv={warning:"warning",error:"error",success:"success"},wR={warning:"@astryx.input.statusButton.warning",error:"@astryx.input.statusButton.error",success:"@astryx.input.statusButton.success"};function jR({option:e}){return o.jsx(X4,{icon:e.icon,label:e.label??e.value})}function cg(e,t){return t?(e.label??e.value).toLowerCase().includes(t.toLowerCase()):!0}function cv(e,t){return t?e.filter(n=>cg(n,t)):e}function tu(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:g,size:b,variant:k="input",status:m,statusVariant:y="attached",labelTooltip:v,startIcon:w,htmlName:j,renderOption:C,hasSearch:$=!1,searchPlaceholder:E,placement:N,isDefaultOpen:S=!1,"data-testid":A,width:z,xstyle:M,className:L,style:R,hasClear:T,...I}=e,_=g??t("@astryx.selector.placeholder"),O=E??t("@astryx.selector.searchPlaceholder"),D=T===!0,B=Ka(b,"md"),P=k==="ghost"&&y==="attached"?"detached":y,V=d===null?void 0:d,Y=x.useId(),Z=x.useId(),te=x.useId(),J=x.useId(),K=x.useId(),re=x.useId(),le=x.useRef(null),ve=x.useRef(null),ge=V4(),[xe,ce]=x.useState(""),Q=xe.length>0,[,ye]=x.useTransition(),[ue,pe]=x.useOptimistic(V),Le=p||ue!==V,ie=l&&!!c,tn=js({placement:"above",focusTrigger:"always",isEnabled:ie}),un=js({placement:"above",isEnabled:P==="tooltip"&&!!(m!=null&&m.message)}),{ariaLabelledBy:$s,ariaDescribedBy:In}=x3(K,[r?te:null,!ge&&P!=="tooltip"&&(m!=null&&m.message)?J:null,P==="tooltip"&&(m!=null&&m.message)?un.describedBy:null,ie?tn.describedBy:null],ge),On=x.useMemo(()=>gR(u),[u]),nc=x.useMemo(()=>cv(On,xe),[On,xe]),ao=x.useMemo(()=>On.findIndex(de=>de.value===ue),[On,ue]),sd=x.useMemo(()=>ao>=0?On[ao]:void 0,[On,ao]),f1=x.useRef(null),sc=Pl(),U$=x.useCallback(()=>{var de;ce(""),sc(""),(de=le.current)==null||de.focus()},[sc]),Pt=ql({onHide:U$,hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"});x.useEffect(()=>{S&&Pt.show()},[]);const rb=x.useCallback(de=>{if(ce(de),de.length===0){sc("");return}const dn=cv(On,de).length;sc(dn===0?"No results found":`${dn} result${dn===1?"":"s"}`)},[sc,On]),h1=N==null&&!$,{offset:F$,isPositioned:G$}=mR({isOpen:Pt.isOpen&&h1,selectedItemIndex:ao,listboxId:Z,listboxRef:f1,triggerRef:le}),ib=h1?F$:0,V$=h1?G$:!0,ab=N??"below",W$=ib>0?{marginBlockStart:`-${ib}px`}:void 0,x1=x.useCallback(()=>{f==null||f(null),h&&ye(async()=>{pe(void 0),await h(null)})},[f,h,ye,pe]),{highlightedIndex:Fs,getItemId:Ui,onTriggerClick:K$,onKeyDown:rc,onItemSelect:ob,onItemMouseEnter:lb}=yR({selectableItems:nc,value:V,isDisabled:l,isOpen:Pt.isOpen,hasSearch:$,onOpen:x.useCallback(()=>{Pt.show(),$&&requestAnimationFrame(()=>{var de;(de=ve.current)==null||de.focus()})},[Pt,$]),onClose:Pt.hide,onSelect:x.useCallback(de=>{f==null||f(de),h&&ye(async()=>{pe(de),await h(de)})},[f,h,ye,pe]),onClear:D?x1:void 0,listboxId:Z});x.useEffect(()=>{var de,dn;!Pt.isOpen||Fs<0||(dn=(de=document.getElementById(Ui(Fs)))==null?void 0:de.scrollIntoView)==null||dn.call(de,{block:"nearest"})},[Pt.isOpen,Fs,Ui]);const X$=x.useCallback(de=>{de.stopPropagation(),x1()},[x1]),Z$=x.useCallback(()=>$?o.jsx("div",{className:"x78zum5 x6s0dn4 xf314gf xu0wf1k",onKeyDown:de=>{de.target!==ve.current&&de.key==="Tab"&&!de.shiftKey&&rc(de)},children:o.jsx(Xn,{ref:ve,id:re,label:t("@astryx.selector.searchOptions"),isLabelHidden:!0,startIcon:"search",hasClear:!0,size:"sm",width:"100%",role:"combobox","aria-expanded":Pt.isOpen,"aria-controls":Z,"aria-autocomplete":"list","aria-activedescendant":Pt.isOpen&&Fs>=0?Ui(Fs):void 0,value:xe,onChange:rb,onKeyDown:de=>{if(de.key==="ArrowDown"||de.key==="ArrowUp"||de.key==="PageUp"||de.key==="PageDown"||de.key==="Enter"||de.key==="Escape"){rc(de);return}de.key==="Tab"&&(de.shiftKey||!Q)&&rc(de)},placeholder:O})}):null,[$,re,Z,xe,Q,O,rb,rc,Pt.isOpen,Fs,Ui,t]),p1=x.useCallback((de,dn)=>{const Fi=dn===Fs,Gs=de.value===V;return o.jsxs("div",{id:Ui(dn),role:"option","aria-selected":Gs,"aria-disabled":de.disabled,onClick:()=>ob(de),onMouseEnter:()=>lb(de,dn),...q(Ns.item,vR[B],Fi&&Ns.itemHighlighted,Gs&&Ns.itemSelected,de.disabled&&Ns.itemDisabled),children:[o.jsx("span",{className:"x78zum5 x6s0dn4 x1txdalj x98rzlu xeuugli",children:C?C(de):o.jsx(jR,{option:de})}),Gs&&o.jsx($e,{icon:"check",size:"sm",color:"accent"})]},de.value)},[C,Fs,B,V,Ui,ob,lb]),cb=x.useCallback(()=>{const de=$&&!!xe;if(de&&nc.length===0)return[o.jsx("div",{role:"presentation",className:"x1b2ylru x2b8uid xv1l7n4 x9ynric xcr08ib",children:"No results found"},"empty")];let dn=0;const Fi=[];for(let Gs=0;Gs<u.length;Gs++){const Wr=u[Gs];if(pR(Wr)){if(de)continue;Fi.push(o.jsx(eu,{xstyle:Ns.divider},`divider-${Gs}`))}else if(K4(Wr)){const oo=[];for(const Y$ of Wr.options){const fb=eh(Y$);de&&!cg(fb,xe)||(oo.push(p1(fb,dn)),dn++)}if(oo.length===0)continue;Wr.title&&Fi.push(o.jsx(eu,{label:Wr.title,xstyle:Ns.sectionDivider},`section-divider-${Gs}`)),Fi.push(o.jsx("div",{role:"group","aria-label":Wr.title,children:oo},`section-${Gs}`))}else if(W4(Wr)){const oo=eh(Wr);if(de&&!cg(oo,xe))continue;Fi.push(p1(oo,dn)),dn++}}return Fi},[u,p1,$,xe,nc]),g1=m!=null&&P!=="detached",ub=m!=null&&P==="tooltip"&&!!m.message,db=o.jsxs(o.Fragment,{children:[o.jsxs("div",{ref:de=>{Pt.triggerRef(de),tn.ref(de)},onClick:K$,"data-testid":A,...F(U("selector",{variant:k,size:B,status:(m==null?void 0:m.type)??null}),q(gl.base,Ns.triggerContainer,bR[B],k==="ghost"&&Ns.triggerGhost,l&&gl.disabled,k==="ghost"&&l&&Ns.triggerGhostDisabled,!sd&&Ns.triggerPlaceholder,k!=="ghost"&&m&&J0[m.type],k!=="ghost"&&m&&!l&&ey[m.type],k!=="ghost"&&ge&&F4.inGroup,M),L,R),children:[w&&Hs(w,{size:"sm",color:"secondary"}),ge&&o.jsx(Oi,{id:K,children:n}),o.jsx("button",{ref:le,id:Y,type:"button",role:$?void 0:"combobox",...I,"aria-haspopup":"listbox","aria-expanded":Pt.isOpen,"aria-controls":Z,"aria-activedescendant":!$&&Pt.isOpen&&Fs>=0?Ui(Fs):void 0,"aria-describedby":In,"aria-labelledby":$s,"aria-required":a?"true":void 0,"aria-invalid":(m==null?void 0:m.type)==="error"?"true":void 0,"aria-busy":Le||void 0,disabled:l&&!ie,"aria-disabled":ie?"true":void 0,onKeyDown:rc,tabIndex:l&&!ie?-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:(sd==null?void 0:sd.label)??_})}),j!=null&&o.jsx("input",{type:"hidden",name:j,value:d??"",disabled:l}),Le&&o.jsx(on,{size:"sm"}),D&&d!=null&&!l&&o.jsx("button",{type:"button",onClick:X$,"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($e,{icon:"close",size:"sm",color:"secondary",...U("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"}}[!!(!g1&&Pt.isOpen)<<1|!!g1<<0],children:g1?ub?o.jsx("button",{ref:un.ref,type:"button","aria-label":t(wR[m.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($e,{icon:ov[m.type],size:"sm",color:lv[m.type]})}):o.jsx($e,{icon:ov[m.type],size:"sm",color:lv[m.type]}):o.jsx($e,{icon:"chevronDown",size:"sm",color:"inherit",...U("selector-indicator-icon",{state:Pt.isOpen?"expanded":"collapsed"})})})]}),Pt.render($?o.jsxs("div",{children:[Z$(),o.jsx("div",{ref:f1,id:Z,role:"listbox","aria-labelledby":Y,className:"x9f619 xuyqlj2 x1odjw0f x9epnlk x1hc1fzr x1ey1afo",children:cb()})]}):o.jsx("div",{ref:f1,id:Z,role:"listbox","aria-labelledby":Y,...{0:{className:"x9f619 xuyqlj2 x1odjw0f x9epnlk x1hc1fzr x1ey1afo"},1:{className:"x9f619 xuyqlj2 x1odjw0f x9epnlk xg01cxk xq2gx43"}}[!V$<<0],children:cb()}),{placement:ab,alignment:"start",xstyle:[Ns.popover,or[ab]],style:W$}),ub&&un.renderTooltip((m==null?void 0:m.message)??""),ie&&tn.renderTooltip(c)]});return ge?db:o.jsx(Ul,{label:n,isLabelHidden:s,description:r,inputID:Y,descriptionID:r?te:void 0,isOptional:i,isRequired:a,isDisabled:l,status:m?{type:m.type,message:m.message,messageID:m.message?J:void 0}:void 0,statusVariant:P,labelTooltip:v,width:z,children:db})}tu.displayName="Selector";var Z4={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 SR=x;function Y4(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 Yr(){}var bn={d:{f:Yr,r:function(){throw Error(Y4(522))},D:Yr,C:Yr,L:Yr,m:Yr,X:Yr,S:Yr,M:Yr},p:0,findDOMNode:null},CR=Symbol.for("react.portal"),$R=Symbol.for("react.recoverable"),uv=Symbol.for("react.optimistic_key");function ER(e,t,n){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:CR,key:s==null?null:s===uv?uv:""+s,children:e,containerInfo:t,implementation:n}}var _c=SR.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function jx(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:$R,_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(Y4(299));return ER(e,t,null,n)};cn.flushSync=function(e){var t=_c.T,n=bn.p;try{if(_c.T=null,bn.p=2,e)return e()}finally{_c.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=jx(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=jx(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=jx(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=jx(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 _c.H.useFormState(e,t,n)};cn.useFormStatus=function(){return _c.H.useHostTransitionStatus()};cn.version="19.3.0";function Q4(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Q4)}catch(e){console.error(e)}}Q4(),Z4.exports=cn;var nu=Z4.exports;const dv={popoverSurface:{k7Eaqz:"xfb3i0g",$$css:!0},popoverGap:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0}};function NR(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 TR(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 zR(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),g=x.useCallback(()=>{p.current&&(p.current.remove(),p.current=null)},[]),b=ql({onHide:x.useCallback(()=>{g(),d(S=>({...S,isActive:!1,activeTrigger:null,query:"",items:[],highlightedIndex:0,isLoading:!1}))},[g]),hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"});x.useEffect(()=>()=>{h.current&&clearTimeout(h.current),g()},[g]);const k=x.useCallback(()=>{var A,z;h.current&&(clearTimeout(h.current),h.current=null);const S=u.activeTrigger;S!=null&&S.searchSource&&((z=(A=S.searchSource).cancel)==null||z.call(A)),g(),b.hide(),f.current=-1},[b,u.activeTrigger,g]),m=x.useCallback(()=>{const S=s.current;if(!S)return;const A=window.getSelection();if(!A||A.rangeCount===0){b.triggerRef(S);return}g();const z=A.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 L=document.createElement("span");L.setAttribute("aria-hidden","true"),L.setAttribute("data-astryx-trigger-anchor",""),L.style.position="fixed",L.style.left=`${M.left}px`,L.style.top=`${M.top}px`,L.style.width=`${Math.max(M.width,1)}px`,L.style.height=`${M.height}px`,L.style.pointerEvents="none",L.style.opacity="0",document.body.appendChild(L),p.current=L,b.triggerRef(L)},[s,b,g]),y=x.useCallback((S,A)=>{h.current&&(clearTimeout(h.current),h.current=null);const z=()=>{var M,L;if(S.searchSource){(L=(M=S.searchSource).cancel)==null||L.call(M),d(T=>({...T,isLoading:!0}));const R=S.searchSource.search(A);Promise.resolve(R).then(T=>{d(I=>({...I,items:T,highlightedIndex:T.length>0?0:-1,isLoading:!1}))},()=>{d(T=>({...T,items:[],highlightedIndex:-1,isLoading:!1}))})}};S.searchSource&&(S.searchSource.search("")instanceof Promise&&l>0?(d(R=>({...R,isLoading:!0})),h.current=setTimeout(z,l)):z())},[l]),v=x.useCallback(S=>{const A=u.activeTrigger;if(!A)return;const z=s.current;if(!z)return;g(),zR(z,f.current);const M=A.onSelect(S);typeof M=="string"?i(M):r(M),a(),k()},[u.activeTrigger,s,g,i,r,a,k]),w=x.useCallback(()=>{if(!n||n.length===0)return;const S=s.current;if(!S)return;const A=NR(S);if(A===null){u.isActive&&k();return}const z=TR(A,n);if(!z){u.isActive&&k();return}const{trigger:M,query:L,triggerStart:R}=z;!u.isActive||u.activeTrigger!==M?(f.current=R,d(T=>({...T,isActive:!0,activeTrigger:M,query:L,highlightedIndex:0})),m(),y(M,L),b.show()):u.query!==L&&(d(T=>({...T,query:L})),y(M,L))},[n,s,u.isActive,u.activeTrigger,u.query,k,m,y,b]),j=x.useCallback(S=>{if(!u.isActive||!b.isOpen)return!1;switch(S.key){case"ArrowDown":return S.preventDefault(),d(A=>({...A,highlightedIndex:A.highlightedIndex<A.items.length-1?A.highlightedIndex+1:0})),!0;case"ArrowUp":return S.preventDefault(),d(A=>({...A,highlightedIndex:A.highlightedIndex>0?A.highlightedIndex-1:A.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(),k(),!0;default:return!1}},[u.isActive,u.highlightedIndex,u.items,b.isOpen,v,k]),C=x.useCallback(S=>`${c}-option-${S}`,[c]);x.useEffect(()=>{if(!b.isOpen||u.highlightedIndex<0)return;const S=document.getElementById(C(u.highlightedIndex));S==null||S.scrollIntoView({block:"nearest"})},[u.highlightedIndex,b.isOpen,C]);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?C(u.highlightedIndex):void 0,"aria-haspopup":"listbox"}:{role:"combobox","aria-expanded":!1,"aria-haspopup":"listbox"}:{role:"textbox"},N=x.useCallback(()=>{const S=u.activeTrigger,A=(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:A});else{const L=QE(u.items);let R=0;M=L.map(T=>{const I=T.items.map(_=>{const O=R++;return o.jsx("div",{id:C(O),role:"option","aria-selected":O===u.highlightedIndex,tabIndex:-1,onMouseDown:D=>{D.preventDefault(),v(_)},onMouseEnter:()=>d(D=>({...D,highlightedIndex:O})),...{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"}}[(O===u.highlightedIndex)<<0],children:S!=null&&S.renderItem?S.renderItem(_):o.jsx("span",{className:"x98rzlu xeuugli xb3r6kr xlyipyv xuxw1ft",children:_.label})},_.id)});return T.heading?o.jsxs("div",{role:"group","aria-label":T.heading,children:[o.jsx("div",{"aria-hidden":"true",className:"xf314gf x1xye8es xy143xn x141an7d x1ltkj2j xv1l7n4 x87ps6o",children:T.heading}),I]},`group-${T.heading}`):I})}return b.render(o.jsx("div",{id:c,role:"listbox","aria-label":(S==null?void 0:S.menuLabel)??t("@astryx.chatTriggerMenu.suggestions"),...F(U("trigger-menu"),{className:"x9f619 x1xiyphd x1odjw0f x9epnlk xfb3i0g"}),children:M}),{placement:"above",alignment:"start",xstyle:[dv.popoverSurface,dv.popoverGap]})},[b,c,u,v,C,t]);return{state:u,handleInput:w,handleKeyDown:j,renderMenu:N,reset:k,ariaProps:E}}function th(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 ug(e,t){const n=th(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 MR(e){return"render"in e&&typeof e.render=="function"}function RR(e){let t=e;for(;t;){if(t instanceof HTMLElement&&t.hasAttribute("data-astryx-token"))return t;t=t.parentNode}return null}function _R({editableRef:e,onEmitChange:t}){const[n,s]=x.useState([]),r=x.useCallback(u=>{const d=e.current;if(!d)return;const f=th(d);if(!f||f.rangeCount===0)return;const h=f.getRangeAt(0),p=document.createElement("span"),g=`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",g),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 k=document.createRange();return k.setStartAfter(b),k.collapse(!0),f.removeAllRanges(),f.addRange(k),s(m=>[...m,{id:g,span:p,token:u}]),g},[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 g=h.previousSibling,b=h.parentNode;return b&&(b.removeChild(h),b.removeChild(g)),t(),!0}return!1},[t]),a=x.useCallback(u=>{const d=e.current;if(!d)return!1;const f=th(d);if(!f||f.rangeCount===0)return!1;const h=f.getRangeAt(0),p=RR(h.startContainer);if(p){u.preventDefault();const g=u.clipboardData.getData("text/plain"),b=p.nextSibling,k=document.createRange();return b&&b.nodeType===Node.TEXT_NODE?k.setStartAfter(b):k.setStartAfter(p),k.collapse(!0),f.removeAllRanges(),f.addRange(k),ug(d,g),t(),!0}return!1},[e,t]),l=x.useCallback(u=>{if(!e.current)return;const f=n.find(m=>m.id===u);if(!f)return;const{span:h}=f,p=h.getAttribute("data-astryx-token-value")??"",g=document.createTextNode(p),b=h.nextSibling;(b==null?void 0:b.nodeType)===Node.TEXT_NODE&&b.textContent===" "&&b.remove(),h.replaceWith(g);const k=window.getSelection();if(k){const m=document.createRange();m.setStartAfter(g),m.collapse(!0),k.removeAllRanges(),k.addRange(m)}s(m=>m.filter(y=>y.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 IR(e){const t=e.split(`
|
|
148
|
-
`).length,n=e.length;return t>1?`${t} lines, ${n} chars`:`${n} chars`}function J4({text:e,onExpand:t}){const n=be(),s=IR(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(ne,{label:n("@astryx.chat.pastedText.expand"),variant:"ghost",size:"sm",onClick:t})]})]});return o.jsx(O4,{content:r,placement:"above",alignment:"start",hasHoverIndication:!1,children:o.jsx(Du,{label:s,variant:"neutral"})})}J4.displayName="ChatPastedTextToken";function OR(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 LR({inputRef:e,threshold:t=200,toToken:n=OR}){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 ty=x.createContext(null);ty.displayName="ChatMessageContext";function DR(){return x.use(ty)}const ny=x.createContext(null);ny.displayName="ChatListContext";function BR(){return x.use(ny)}const sy=x.createContext(null);sy.displayName="ChatComposerContext";function e6(){return x.use(sy)}const ry=x.createContext(null);ry.displayName="ChatLayoutContext";function qR(){return x.use(ry)}const HR=22,fv={root:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kAzted:"xe0957l",$$css:!0},disabled:{kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0}};function D1(e){const t=window.getSelection();if(!t)return;const n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}function jo(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+=jo(n));return t}function iy(e){const t=be(),n=e6(),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:g=(n==null?void 0:n.isDisabled)??!1,onPaste:b,pasteAsToken:k,onFiles:m,onSubmit:y=n==null?void 0:n.onSubmit,onKeyDown:v,xstyle:w,className:j,style:C,...$}=e,E=p??t("@astryx.chat.composerInput.label"),N=c??(n==null?void 0:n.placeholder)??t("@astryx.chat.composer.placeholder"),S=n==null?void 0:n.onChange,A=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),[L,R]=x.useState(!0),T=x.useRef([]),I=x.useRef(-1),_=x.useRef(""),O=x.useRef(void 0),D=x.useRef(()=>{}),B=x.useRef(()=>{}),P={insertToken:Q=>D.current(Q),expandToken:Q=>te.expandToken(Q),insertText:Q=>B.current(Q),focus:()=>{var Q;return(Q=z.current)==null?void 0:Q.focus()},getValue:()=>jo(z.current??document.createElement("div"))};M.current=P,x.useImperativeHandle(i,()=>P);const V=n==null?void 0:n.inputControlRef;x.useEffect(()=>{if(V)return V.current={focus:()=>{var Q;return(Q=z.current)==null?void 0:Q.focus()}},()=>{V.current=null}},[V]),x.useEffect(()=>{if(a===void 0||!z.current)return;if(a===O.current){O.current=void 0;return}const Q=z.current;if(jo(Q)!==a){O.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)}}R(a.length===0)}else O.current=void 0},[a]);const Y=x.useRef(null),Z=x.useCallback(()=>{var Le;if(!z.current)return;const Q=jo(z.current),ye=z.current.querySelector("[data-astryx-token], [data-astryx-dictation-interim]")!=null,ue=Q.trim().length===0&&!ye,pe=ue?"":Q;O.current=pe,R(ue),A==null||A(pe),(Le=Y.current)==null||Le.call(Y)},[A]),te=_R({editableRef:z,onEmitChange:Z});Y.current=te.cleanupPortals;const J=LR({inputRef:M}),K=k===!1?null:k??J,re=x.useCallback(Q=>{const ye=z.current;ye&&ug(ye,Q)},[]);D.current=te.insertToken,B.current=re;const le=AR({triggers:d,editableRef:z,onInsertToken:te.insertToken,onInsertText:re,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:Le}=ue;if(!(pe.nodeType===Node.TEXT_NODE&&Le===0&&pe.previousSibling instanceof HTMLElement&&pe.previousSibling.hasAttribute("data-astryx-token"))){if(pe.nodeType===Node.TEXT_NODE&&pe.textContent===" "&&Le<=1&&pe.previousSibling instanceof HTMLElement&&pe.previousSibling.hasAttribute("data-astryx-token")){Q.preventDefault();const ie=pe.previousSibling,tn=pe.parentNode;tn&&(tn.removeChild(pe),tn.removeChild(ie)),Z();return}}}}if(Q.key==="Enter"&&!Q.shiftKey){if(Q.nativeEvent.isComposing||Q.nativeEvent.keyCode===229||(Q.preventDefault(),!z.current))return;const ye=jo(z.current).trim();if(!ye)return;h&&(T.current.push(ye),I.current=-1,_.current=""),y==null||y(ye),z.current.textContent="",R(!0),A==null||A("");return}if(h&&(Q.key==="ArrowUp"||Q.key==="ArrowDown")){if(!z.current)return;const ye=jo(z.current),ue=T.current;if(ue.length===0)return;if(Q.key==="ArrowUp"){I.current===-1&&(_.current=ye);const pe=I.current===-1?ue.length-1:Math.max(0,I.current-1);I.current=pe,z.current.textContent=ue[pe],D1(z.current),Z(),Q.preventDefault()}else if(Q.key==="ArrowDown"&&I.current!==-1){const pe=I.current+1;pe>=ue.length?(I.current=-1,z.current.textContent=_.current,_.current&&D1(z.current)):(I.current=pe,z.current.textContent=ue[pe],D1(z.current)),Z(),Q.preventDefault()}}}},[h,y,A,Z,le,v]),xe=x.useCallback(Q=>{const ye=z.current;if(!ye||(th(ye),te.handlePaste(Q)))return;const ue=Array.from(Q.clipboardData.files);if(ue.length>0){Q.preventDefault(),m==null||m(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}ug(ye,pe),Z()},[m,b,Z,te,K]),ce=u*HR;return o.jsxs("div",{ref:r,...F(U("chat-composer-input"),q(fv.root,g&&fv.disabled,w),j,C),...$,children:[L&&o.jsx("div",{className:"x10l6tqk x13vifvy x1o0tod xtijo5x x47corl xv1l7n4 xjm74w1 x6pjikd x19v9tvf x9ynric x87ps6o x9epnlk","aria-hidden":"true",children:N}),o.jsx("div",{ref:z,"aria-multiline":"true","aria-label":E,contentEditable:!g,suppressContentEditableWarning:!0,onInput:ve,onKeyDown:ge,onPaste:xe,...le.ariaProps,...F({className:"x1a2a7pz x126k92a x13faqbe x1odjw0f xjm74w1 x6pjikd x19v9tvf x9ynric x1tgivj0 xxugrtn x9epnlk"},{style:{maxHeight:`${ce}px`}})}),le.renderMenu(),te.tokenPortals.filter(({span:Q})=>Q.isConnected).map(({id:Q,span:ye,token:ue})=>nu.createPortal(MR(ue)?o.jsx("span",{children:ue.render()},Q):ue.value.length>(K===null?1/0:200)?o.jsx(J4,{text:ue.value,onExpand:()=>te.expandToken(Q)},Q):o.jsx(Du,{label:ue.label,variant:ue.variant,icon:ue.icon},Q),ye))]})}iy.displayName="ChatComposerInput";const PR={root:{kaIpWk:"xy0xnkn",kmuXW:"x2lah0s",$$css:!0}};function ay(e){const t=be(),n=e6(),{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,...g}=e,b=i??(()=>n==null?void 0:n.onSubmit("")),k=Aa("stop"),m=Aa("arrowUp");return o.jsx(ne,{ref:p,label:t(s?"@astryx.chatSendButton.stop":"@astryx.chatSendButton.send"),variant:s?"secondary":"primary",size:u,icon:s?c??k:l??m,isIconOnly:!0,isDisabled:!s&&r,onClick:s?a:b,...g,...U("chat-send-button"),className:f,style:h,xstyle:[PR.root,d]})}ay.displayName="ChatSendButton";const hv={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}},UR={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 t6(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:g,input:b,footerActions:k,sendActions:m,sendButton:y,status:v,statusPosition:w="bottom",xstyle:j,className:C,style:$,...E}=e,N=c??t("@astryx.chat.composer.placeholder"),[S,A]=x.useState(""),z=a!==void 0,M=z?a:S,L=x.useCallback(P=>{z||A(P),l==null||l(P)},[z,l]),R=x.useCallback(()=>{const P=M.trim();!P||u||(s(P),L(""))},[M,u,s,L]),T=M.trim().length>0&&!u,I=x.useRef(null),_=x.useRef(null),O=x.useCallback(P=>{var Z;if(P.target.closest('button, a, [role="button"], [contenteditable="true"], [data-astryx-token]'))return;if(_.current){_.current.focus();return}const Y=(Z=I.current)==null?void 0:Z.querySelector('[contenteditable="true"], textarea');Y==null||Y.focus()},[]),D=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($e,{icon:v.type==="error"?"error":"warning",size:"md",color:v.type==="error"?"error":"warning"}),v.message]}):null,B=x.useMemo(()=>({value:M,onChange:L,onSubmit:R,placeholder:N,isDisabled:u,isStopShown:i,canSend:T,onStop:r,inputControlRef:_}),[M,L,R,N,u,i,T,r]);return o.jsx(sy,{value:B,children:o.jsxs("div",{ref:n,...F(U("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"&&D,h,o.jsxs("div",{ref:I,onClick:O,...q(hv.body,UR[f],d==="compact"&&hv.compact,j),children:[(p||g)&&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:g})]}),o.jsx("div",{className:"x78zum5 xdt5ytf",children:b??o.jsx(iy,{})}),o.jsxs("div",{className:"x78zum5 x6s0dn4 x1qughib x1txdalj x21xpn4",children:[o.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:k}),o.jsxs("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:[m,y??o.jsx(ay,{})]})]})]}),w==="bottom"&&D]})})}t6.displayName="ChatComposer";const FR={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 n6({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"),[g,b]=x.useState(i),k=r!==void 0,m=k?r:g,y=n!=null,v=x.useId(),w=()=>{const j=!m;k||b(j),a==null||a(j)};return o.jsxs("div",{ref:e,"data-testid":d,...F(U("chat-composer-drawer",{collapsed:m?"collapsed":null}),q(FR.root,l),c,u),...f,children:[y&&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"}}[!!m<<0],role:"button",tabIndex:0,"aria-expanded":!m,"aria-controls":v,"aria-label":m?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"}}[!m<<0],children:[o.jsx(Du,{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"}}[!!m<<0]})]}),o.jsx("div",{id:v,...{0:{className:"xrvj5dj x1tu4anv x1qn9uv2 x80gvsz xlr8y92"},1:{className:"xrvj5dj x1qn9uv2 x80gvsz xlr8y92 xihq33y"}}[!!(y&&m)<<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"}}[!!(y&&m)<<0],children:t})})]})}n6.displayName="ChatComposerDrawer";const dc={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}},GR={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 s6({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=qR(),p=x.useRef(null),g=x.useRef(null),[b,k]=x.useTransition();x.useEffect(()=>{if(h!=null&&h.contentRef&&g.current)return h.contentRef(g.current),()=>h.contentRef(null)},[h]);const m=e!=null&&e!==!1&&!(Array.isArray(e)&&e.length===0);x.useEffect(()=>{var $;const j=($=h==null?void 0:h.scrollContainerRef)==null?void 0:$.current;if(!n||!p.current)return;const C=new IntersectionObserver(E=>{var N;(N=E[0])!=null&&N.isIntersecting&&k(async()=>{await n()})},{root:j??null,threshold:0});return C.observe(p.current),()=>C.disconnect()},[n,h]);const y=x.useMemo(()=>({density:s}),[s]),v=s==="compact"?dc.gapCompact:s==="spacious"?dc.gapSpacious:dc.gapBalanced,w=r==null?null:GR[r];return o.jsx(ny,{value:y,children:o.jsx("div",{...f,ref:d,role:"log","aria-live":"polite","aria-busy":i||void 0,tabIndex:0,"data-testid":u,...F(U("chat-message-list",{density:s}),q(dc.root,a),l,c),children:o.jsxs("div",{ref:g,...q(dc.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}),m?e:t?o.jsx("div",{className:"x78zum5 x6s0dn4 xl56j7k x98rzlu x2lwn1j",children:t}):null]})})})}s6.displayName="ChatMessageList";const At={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 oy({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=BR(),g=i??(p==null?void 0:p.density)??"balanced",b=x.useMemo(()=>({sender:e,density:g}),[e,g]),k=g==="compact"?At.rootGapCompact:g==="spacious"?At.rootGapSpacious:At.rootGapBalanced,m=g==="compact"?At.childrenGapCompact:g==="spacious"?At.childrenGapSpacious:At.childrenGapBalanced,y=e==="system"?At.rootSystem:e==="user"?At.rootUser:At.rootAssistant,v=e==="system"?At.contentColumnSystem:e==="user"?At.contentColumnUser:At.contentColumnAssistant,w=e==="system"?At.childrenSystem:e==="user"?At.childrenUser:At.childrenAssistant,j=e==="system",C=n!=null&&!j,$=s!=null&&!j,E=x.useId();return o.jsx(ty,{value:b,children:o.jsxs("article",{...f,ref:d,"data-testid":u,"aria-label":$?void 0:h("@astryx.chatMessage.messageFrom",{sender:e}),"aria-labelledby":$?E:void 0,...F(U("chat-message",{sender:e,density:g}),q(At.root,y,C&&k,a),l,c),children:[C&&o.jsx("div",{className:"x2lah0s x5du68j",children:n}),o.jsxs("div",{...q(At.contentColumn,v),children:[$&&o.jsx("div",{id:E,className:"x141an7d x2mo6ok xv1l7n4 x1ltkj2j x14cgwvg",children:s}),o.jsx("div",{...q(At.childrenWrap,w,m),children:t}),r!=null&&!j&&o.jsx("div",{children:r})]})]})})}oy.displayName="ChatMessage";const it={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 r6({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=DR(),h=(f==null?void 0:f.sender)??"assistant",p=(f==null?void 0:f.density)??"balanced",g=p==="compact"?it.paddingCompact:p==="spacious"?it.paddingSpacious:it.paddingBalanced,b=h==="user",k=t==="ghost"?it.ghost:b?it.user:it.assistant,m=r==="first"?b?it.groupFirstUser:it.groupFirstAssistant:r==="middle"?b?it.groupMiddleUser:it.groupMiddleAssistant:r==="last"?b?it.groupLastUser:it.groupLastAssistant:null,y=p==="compact"?it.metadataPaddingCompact:p==="spacious"?it.metadataPaddingSpacious:it.metadataPaddingBalanced;return o.jsxs(o.Fragment,{children:[n&&o.jsx("div",{"data-chat-name":!0,...q(y,it.nameRow,it.headerReducedGap,b&&it.alignEnd),children:n}),o.jsx("div",{...d,ref:u,"data-testid":c,...F(U("chat-message-bubble",{sender:h,variant:t,density:p}),q(it.content,p==="compact"&&it.radiusCompact,k,g,t==="ghost"&&it.paddingBlockNone,m,i),a,l),children:e}),s&&o.jsx("div",{...q(y,it.metadataReducedGap,b&&it.alignEnd),children:s})]})}r6.displayName="ChatMessageBubble";const xv={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 nh({children:e,variant:t="default",icon:n,xstyle:s,className:r,style:i,ref:a,...l}){return t==="divider"?o.jsx("div",{ref:a,...F(U("chat-system-message",{variant:t}),q(xv.dividerWrap,s),r,i),...l,role:"status",children:o.jsx(eu,{label:e})}):o.jsx("div",{ref:a,...F(U("chat-system-message",{variant:t}),q(xv.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]})})}nh.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),g=x.useRef(!1),b=x.useRef(void 0),k=x.useRef(0),m=x.useRef(0),y=x.useRef(0),v=x.useCallback(()=>{const M=e.current;if(!M||!f.current){g.current=!1,b.current=void 0,p.current=0;return}if(M.scrollHeight<=M.clientHeight){g.current=!1,b.current=void 0,p.current=0;return}const L=M.scrollHeight-M.clientHeight,R=L-M.scrollTop;if(Math.abs(R)<.5&&Math.abs(p.current)<.1){M.scrollTop=L,g.current=!1,b.current=void 0,p.current=0;return}const T=performance.now(),I=b.current?(T-b.current)/VR:1;b.current=T,p.current=(r*p.current+i*R)/a,M.scrollTop+=p.current*I,requestAnimationFrame(v)},[e,r,i,a]),w=x.useCallback(()=>{const M=e.current;M&&(g.current=!1,p.current=0,b.current=void 0,M.scrollTop=M.scrollHeight-M.clientHeight,k.current=M.scrollTop)},[e]),j=Wa("(prefers-reduced-motion: reduce)"),C=x.useCallback(()=>{if(f.current){if(j){w();return}g.current||(g.current=!0,b.current=void 0,requestAnimationFrame(v))}},[v,w,j]),$=x.useCallback(M=>{if(f.current=!0,d(!0),c(!1),h.current=!1,(M==null?void 0:M.behavior)==="instant"){w();return}C()},[C,w]),E=x.useCallback(M=>{const L=e.current;if(!L)return;const R=L.getBoundingClientRect(),I=M.getBoundingClientRect().top-R.top+L.scrollTop;L.scrollTo({top:I,behavior:"instant"}),k.current=L.scrollTop},[e]),N=x.useCallback(()=>{const M=e.current;if(!M)return;const L=M.getElementsByClassName("astryx-chat-message"),R=L[L.length-1];R instanceof HTMLElement&&E(R)},[e,E]),S=x.useCallback(()=>{f.current=!0,d(!0),c(!1),C()},[C]),A=x.useCallback(()=>{f.current=!1,g.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}C()},[t,C,w,e]);return x.useEffect(()=>{const M=e.current;if(!M||!t)return;k.current=M.scrollTop,m.current=M.scrollHeight,y.current=M.offsetHeight;const L=()=>{const{scrollTop:_,scrollHeight:O,offsetHeight:D}=M,B=O-_-D;c(B>s);const P=O!==m.current,V=D!==y.current;if(m.current=O,y.current=D,P||V){k.current=_;return}const Y=_<k.current;k.current=_,Y&&f.current&&(f.current=!1,g.current=!1,d(!1))},R=()=>{M.scrollHeight-M.scrollTop-M.offsetHeight<=n&&(f.current=!0,d(!0))},T=_=>{_.deltaY<0&&g.current&&(f.current=!1,g.current=!1,d(!1))},I=()=>{g.current&&(f.current=!1,g.current=!1,d(!1))};return M.addEventListener("scroll",L,{passive:!0}),M.addEventListener("scrollend",R),M.addEventListener("wheel",T,{passive:!0}),M.addEventListener("touchmove",I,{passive:!0}),requestAnimationFrame(()=>{M.scrollHeight>M.clientHeight&&(M.scrollTop=M.scrollHeight-M.clientHeight,k.current=M.scrollTop,h.current=!1)}),()=>{M.removeEventListener("scroll",L),M.removeEventListener("scrollend",R),M.removeEventListener("wheel",T),M.removeEventListener("touchmove",I)}},[e,t,n,s]),{isScrolledUp:l,isLocked:u,scrollToBottom:$,scrollToMessage:E,lock:S,unlock:A,scrollIfLocked:z,scrollToLastMessage:N}}function KR({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=>{E0(p,()=>{var k;(k=a.current)==null||k.call(a);const g=p.getElementsByClassName("astryx-chat-message"),b=g.length>0?g[g.length-1]:null;b&&b!==r.current&&(r.current=b,i.current||s(!0))}),c.current=()=>N0(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 $r={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}},i6={pending:"clock",running:null,complete:"check",error:"close"},a6={pending:$r.colorPending,running:$r.colorRunning,complete:$r.colorComplete,error:$r.colorError};function XR(e){return GE(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 pv({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,...q($r.statusIcon,a6[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($e,{icon:i6[n]??"check",size:"xsm",color:"inherit"})})]}),n==="error"&&e.errorMessage!=null&&o.jsx(Oi,{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(Du,{label:e.node,variant:"neutral",xstyle:$r.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($e,{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 o6(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,g]=x.useState(h),b=x.useId(),k=r!==void 0,m=k?r:p,y=x.useCallback(()=>{const j=!m;k||g(j),a==null||a(j)},[m,k,a]);if(n.length===0)return null;if(n.length===1)return o.jsx("div",{ref:d,...F(U("chat-tool-calls"),q($r.root,l),c,u),...f,children:o.jsx(pv,{call:n[0]})});const v=n[n.length-1],w=v.status??"complete";return o.jsxs("div",{ref:d,...F(U("chat-tool-calls"),q($r.root,l),c,u),...f,children:[o.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":m,"aria-controls":b,onClick:y,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),y())},className:"x78zum5 x6s0dn4 x1s4dlld xjwf9q1 x13f7esw x1ypdohk",children:[m?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x1kky2od xlup9mm xv1l7n4",children:o.jsx($e,{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",{...q($r.statusIcon,a6[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($e,{icon:i6[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:!m&&o.jsxs(o.Fragment,{children:[o.jsx($e,{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"}}[!!m<<0],children:o.jsx($e,{icon:"chevronDown",size:"xsm",color:"inherit"})})]}),o.jsx("div",{id:b,...{0:{className:"xrvj5dj xihq33y xb0j27v x9kvfbb"},1:{className:"xrvj5dj xb0j27v x9kvfbb x1tu4anv"}}[!!m<<0],children:o.jsx("div",{className:"xb3r6kr x2lwn1j",children:o.jsx("div",{className:"x78zum5 xdt5ytf x7a5moj xtedp8i",children:n.map(j=>o.jsx(pv,{call:j},XR(j)))})})})]})}o6.displayName="ChatToolCalls";const B1={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 l6({ref:e,isVisible:t,label:n,onClick:s,xstyle:r,className:i,style:a,...l}){const c=be();return o.jsx("div",{ref:e,...F(q(B1.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(ne,{label:n??c("@astryx.chatLayoutScrollButton.scrollToBottom"),"aria-label":n??c("@astryx.chatLayoutScrollButton.scrollToBottom"),icon:o.jsx($e,{icon:"chevronDown",size:"md"}),variant:"ghost",size:"md",onClick:s,xstyle:[B1.button,n?B1.buttonWithLabel:null],children:n??void 0})})})}l6.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 ZR(e){return!(e==null||e===!1||Array.isArray(e)&&e.length===0)}function c6({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),g=i??p,b=!i,k=WR({scrollRef:g}),m=KR({isLocked:k.isLocked,onResize:k.scrollIfLocked}),y=o.jsx(l6,{isVisible:k.isScrolledUp||m.hasNewMessages,label:m.hasNewMessages?h("@astryx.chatLayout.newMessages"):void 0,onClick:()=>{m.dismiss(),k.scrollToBottom()}}),v=x.useMemo(()=>({scrollContainerRef:g,contentRef:m.contentRef}),[g,m.contentRef]),w=!ZR(e),C={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(ry,{value:v,children:o.jsxs("div",{...f,ref:rt(d,p),"data-testid":u,...F(U("chat-layout",{density:n}),q(Mt.root,b&&Mt.rootScrollable,a),l,c),children:[o.jsx("div",{...q(Mt.messageArea,C.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?y:r,o.jsx("div",{...q(Mt.blurLayer,C.blurLayer)}),o.jsx("div",{...q(Mt.dock,C.dock),children:o.jsx("div",{...q(Mt.dockInner,C.dockInner),children:t})})]})]})})}c6.displayName="ChatLayout";const su=x.createContext(null);su.displayName="ListContext";const q1={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}},YR={kt6KFK:"x1khind5",$$css:!0},QR={counterStart:e=>[YR,{"--x-counterReset":`astryx-list ${e}`!=null?`astryx-list ${e}`:void 0}]};function qt({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",g=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",...F(U("list",{density:t,listStyle:r}),q(q1.list,n&&q1.withDividers,r!=="none"&&(i!=null&&i!==1?QR.counterStart(i-1):q1.withCounter),a),l,c),children:e});return s==null?o.jsx(su,{value:g,children:b}):o.jsx(su,{value:g,children:o.jsxs("div",{className:"x78zum5 xdt5ytf",children:[o.jsx("div",{id:f,className:"x1p37lm5",children:s}),b]})})}qt.displayName="List";const JR=[];function ly({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:g,xstyle:b,className:k,style:m,"data-testid":y,...v}){const w=x.useId(),j=x.useId(),C=x.useId(),$=x.useId(),[,E]=x.useTransition(),N=r!==void 0,S=r??JR,[A,z]=x.useOptimistic(S),[M,L]=x.useOptimistic(null),R=u&&!!d,T=js({placement:"above",focusTrigger:"always",isEnabled:R}),I=x.useCallback((O,D)=>{i==null||i(O),a&&E(async()=>{z(O),D!==void 0&&L(D),await a(O)})},[i,a,E,z,L]),_=x.useMemo(()=>({value:N?A:void 0,onChange:N?I:void 0,isDisabled:u,hasDisabledMessage:R,isReadOnly:f,loadingValue:M}),[N,A,I,u,R,f,M]);return o.jsxs(Ul,{...v,ref:p,"data-testid":y,label:e,isLabelHidden:t,description:n,inputID:w,labelID:j,isGroupLabel:!0,descriptionID:n?C:void 0,isDisabled:u,status:s?{type:s.type,message:s.message,messageID:s.message?$:void 0}:void 0,statusVariant:"detached",width:g,xstyle:b,...F(U("checkbox-list"),{className:k,style:m}),children:[o.jsx(kx,{value:_,children:o.jsx("div",{ref:O=>{T.ref(O)},role:"group","aria-labelledby":j,"aria-describedby":[n?C:null,s!=null&&s.message?$:null,R?T.describedBy:null].filter(Boolean).join(" ")||void 0,children:o.jsx(qt,{density:l,hasDividers:c,children:h})})}),R&&T.renderTooltip(d)]})}ly.displayName="CheckboxList";const gv={withCounter:{kAmcRD:"xfrknyr",$$css:!0},withDivider:{kt9PQ7:"x92x3c3",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},e_={noRadius:{kaIpWk:"x2u8bby",$$css:!0}};function ct({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:g,...b}){const k=x.use(su),m=(k==null?void 0:k.density)??"balanced",y=(k==null?void 0:k.hasDividers)??!1,v=(k==null?void 0:k.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(Za,{as:"li",ref:g,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:m,xstyle:[w&&gv.withCounter,y&&gv.withDivider,y&&e_.noRadius,f],...F(U("list-item"),{className:h,style:p}),...b})}ct.displayName="ListItem";const t_={selected:{kWkggS:"xgcxg3y",$$css:!0}};function sh({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,...g}){const b=be(),k=x.use(kx);if(k&&k.value!==void 0&&n===void 0)throw new Error("CheckboxListItem requires a `value` prop when used inside CheckboxList with a value array.");const m=t??(typeof e=="string"?e:b("@astryx.checkboxList.item.checkbox"));Bl("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 y=x.use(su),w=((y==null?void 0:y.density)??"balanced")==="compact"?"sm":"md",j=((k==null?void 0:k.isDisabled)??!1)||i,C=(k==null?void 0:k.isReadOnly)??!1,$=a||((k==null?void 0:k.loadingValue)!=null&&n!==void 0?k.loadingValue===n:!1);let E=!1;k&&k.value!==void 0&&n!==void 0?E=k.value.includes(n):l!==void 0&&(E=l);const N=!C&&(k!=null||c!=null),S=x.useRef(null),A=N||p!=null,z=()=>{var M,L;if(!(j||C||$))if(k&&k.value!==void 0&&n!==void 0)k.value.includes(n)?(M=k.onChange)==null||M.call(k,k.value.filter(T=>T!==n),n):(L=k.onChange)==null||L.call(k,[...k.value,n],n);else{const R=E!==!0;c==null||c(R)}};return o.jsx(ct,{...g,ref:u,label:e,description:s,endContent:r,isDisabled:j,interactiveRef:A?S:void 0,"aria-busy":$||void 0,xstyle:[E===!0&&!j&&!C&&t_.selected,d],className:f,style:h,startContent:o.jsx($4,{ref:S,label:m,isLabelHidden:!0,value:E,onChange:()=>z(),onClick:p,isDisabled:j,isReadOnly:C,isLoading:$,size:w})})}sh.displayName="CheckboxListItem";const dg=120;function n_(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??dg: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??dg;u.minWidth=`${f}px`}}a.set(l.key,{style:u})}return{columns:a,tableMinWidth:i}}function s_(e=1,t){return{type:"proportional",value:e,minWidth:(t==null?void 0:t.minWidth)??dg}}function mv(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function r_(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 i_(e){return e==null?0:typeof e=="string"?e.length:typeof e=="number"||typeof e=="boolean"?String(e).length:0}function a_(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 o_=60,l_=8;function c_(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=mv(i).length;let l=a,c=a;for(const u of s){const d=i_(u[i]);d>l&&(l=d);const f=a_(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)*l_,o_);return{key:i.key,header:mv(i.key),width:s_(a,{minWidth:l})}})}const yv={x139im0d:"x139im0d",$$css:!0},u6={cell:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",ks0D6T:"x1m189uc",$$css:!0}},u_={cell:{kVQacm:"xb3r6kr",kHjlTd:"x1mzt3pk",kTgw9:"x13faqbe",ks0D6T:"x1m189uc",$$css:!0}},d6={compact:{kZCmMZ:"x5uh4xs",kwRFfy:"xbg7gas",$$css:!0},balanced:{kZCmMZ:"x9bi00s",kwRFfy:"xpilulx",$$css:!0},spacious:{kZCmMZ:"x18c6q21",kwRFfy:"x1wzlfcn",$$css:!0}},Sx=x.createContext(null);Sx.displayName="TableContext";const d_={row:{kWkggS:"x1dnou9g","--table-row-overlay":"x1rht92",$$css:!0}},f_={row:{kWkggS:"xe9uy6x","--table-row-overlay":"x1pkcbo2",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0}},h_={row:{kWkggS:"x1dnou9g xe9uy6x","--table-row-overlay":"x1rht92 x1pkcbo2",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0}};function rh({children:e,xstyle:t,ref:n,isHeaderRow:s=!1,...r}){const i=x.use(Sx);if(!i)return o.jsx("tr",{ref:n,...r,...F(U("table-row"),q(yv,t)),children:e});const a=[];return s||(i.isStriped&&i.hasHover?a.push(h_.row):i.isStriped?a.push(d_.row):i.hasHover&&a.push(f_.row)),i.dividers==="rows"||i.dividers,t&&a.push(...t),o.jsx("tr",{ref:n,...r,...F(U("table-row"),q(yv,...a)),children:e})}rh.displayName="TableRow";const bd={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 cy({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(),g=s??p("@astryx.contextMenu.label"),{items:b,menuContent:k,...m}=h,y=b??[],v=k,w=x.useId(),j=x.useRef({x:0,y:0}),C=x.useRef(null),$=x.useRef(null),E=x.useRef(null),[N,S]=x.useState(!1),A=Dl({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(()=>{A.hide()},[A]),{listRef:M,handleKeyDown:L,focusFirst:R,focusItem:T,ownsEvent:I,getItems:_}=Xa({itemSelector:xx,boundarySelector:px,wrap:!1,onEscape:z}),O=hx({getItemLabels:()=>_().map(J=>J.textContent),onMatch:T,getCurrentIndex:()=>_().findIndex(J=>J===document.activeElement||J.contains(document.activeElement))});x.useEffect(()=>{if(!N)return;const J=K=>{const re=M.current;re&&!re.contains(K.target)&&z()};return document.addEventListener("mousedown",J),()=>{document.removeEventListener("mousedown",J)}},[N,z,M]),x.useEffect(()=>{if(!N)return;const J=K=>{K.key==="Escape"&&(K.isComposing||K.keyCode===229||(K.preventDefault(),z()))};return document.addEventListener("keydown",J),()=>{document.removeEventListener("keydown",J)}},[N,z]);const D=x.useCallback(J=>{if(I(J)){if(J.key==="Enter"||J.key===" "){J.preventDefault();const K=document.activeElement;K&&Bu.has(K.getAttribute("role")??"")&&K.click();return}if(J.key==="Tab"){z();return}if(O.onKeyDown(J)){J.preventDefault();return}L(J)}},[L,z,O,I]),B=x.useCallback((J,K,re)=>{j.current={x:J,y:K};const le=C.current;le&&(le.style.left=`${J}px`,le.style.top=`${K}px`),E.current=document.activeElement instanceof HTMLElement?document.activeElement:re,A.show(),requestAnimationFrame(()=>R())},[A,R]),P=x.useCallback(J=>{if(r)return;J.preventDefault();const K=$.current,re=K==null?void 0:K.getBoundingClientRect(),le=J.clientX===0&&J.clientY===0&&J.detail===0,ve=le||!re?0:J.clientX-re.left,ge=le||!re?(re==null?void 0:re.height)??0:J.clientY-re.top;B(ve,ge,J.currentTarget)},[r,B]),V=_A({disabled:r,onLongPress:x.useCallback(J=>{var re;const K=(re=$.current)==null?void 0:re.getBoundingClientRect();B(K?J.x-K.left:J.x,K?J.y-K.top:J.y,$.current)},[B])}),Y=t?bd.popoverCustomWidth(t):bd.popover,Z=x.useMemo(()=>({closeMenu:z,menuSize:n}),[z,n]),te=b!==void 0?gx(y):v;return o.jsxs(o.Fragment,{children:[o.jsxs("div",{ref:rt(a,$),onContextMenu:P,...V,...m,"data-testid":f,...q(bd.trigger,...d?Array.isArray(d)?d:[d]:[]),children:[e,o.jsx("span",{ref:rt(C,A.ref),"aria-hidden":"true",...F({className:"x10l6tqk xnalus7 xqtp20y x47corl"},{style:{left:`${j.current.x}px`,top:`${j.current.y}px`}})})]}),A.render(o.jsx("div",{ref:M,id:w,role:"menu","aria-label":g,onKeyDown:D,onContextMenu:J=>J.preventDefault(),...F(U("context-menu"),q(bd.menu,u),l,c),children:o.jsx(Hl,{value:Z,children:te})}),{placement:"below",alignment:"start",xstyle:[Y,or.below]})]})}cy.displayName="ContextMenu";function f6(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($e,{icon:"check",size:"xsm","aria-hidden":!0}):a.icon,isDisabled:a.disabled,onClick:a.onSelect})}),s}function x_({element:e,getActions:t,triggerXstyle:n}){const[s,r]=x.useState(null);return o.jsx(cy,{items:s??[],triggerXstyle:n,onOpenChange:i=>{r(i?f6(t()):null)},children:e})}function h6(e,t,n){return typeof t=="function"?o.jsx(x_,{element:e,getActions:t,triggerXstyle:n}):!t||t.length===0?e:o.jsx(cy,{items:f6(t),triggerXstyle:n,children:e})}function p_(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 x6(e,t){return t?Array.isArray(t)?[...e,...t]:[...e,t]:e}function p6(){return x.use(Sx)}const g_={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}},m_={compact:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},balanced:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},spacious:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0}},y_={compact:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},balanced:{k8WAf4:"xce4md1",kg3NbH:"xrrkdod",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",$$css:!0}},kv={fill:{k1xSpc:"x1lliihq",kB7OPa:"x9f619",kZKoxP:"x5yr21d",kzqmXN:"xh8yej3",$$css:!0}},k_={cell:{kZKoxP:"x5yr21d",$$css:!0}},b_={cell:{kt9PQ7:"x92x3c3 x1wp2rvj",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},v_={cell:{ke9TFa:"xw8tdv1 x1qlsc9e",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",$$css:!0}},w_={middle:{kXLuUW:"xxymvpz",$$css:!0},top:{kXLuUW:"x16dsc37",$$css:!0},bottom:{kXLuUW:"x3ajldb",$$css:!0}};function uy({children:e,xstyle:t,ref:n,className:s,style:r,contextMenuActions:i,...a}){const l=p6(),c=typeof i=="function"||Array.isArray(i)&&i.length>0,u=l?[c?m_[l.density]:g_[l.density],l.textOverflow==="truncate"?u6.cell:u_.cell,d6[l.density],w_[l.verticalAlign],...p_(l,b_.cell,v_.cell),...c?[k_.cell]:[]]:[],d=c&&l?[kv.fill,y_[l.density]]:c?kv.fill:void 0,f=h6(e,i,d);return o.jsx("td",{ref:n,...a,...F(U("table-cell",{density:l==null?void 0:l.density}),q(...x6(u,t)),s,r),children:f})}uy.displayName="TableCell";const j_={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}},S_={cell:{k63SB2:"x2mo6ok",kMwMTN:"xv1l7n4",k9WMMc:"x1yc453h",$$css:!0}},C_={cell:{kt9PQ7:"x92x3c3",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},$_={cell:{ke9TFa:"xw8tdv1 x1qlsc9e",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",$$css:!0}};function dy({children:e,xstyle:t,ref:n,className:s,style:r,contextMenuActions:i,...a}){const l=p6(),c=[];l&&(c.push(S_.cell,j_[l.density],C_.cell,u6.cell,d6[l.density]),(l.dividers==="columns"||l.dividers==="grid")&&c.push($_.cell));const u=h6(e,i);return o.jsx("th",{ref:n,...a,...F(U("table-header-cell",{density:l==null?void 0:l.density}),q(...x6(c,t)),s,r),children:u})}dy.displayName="TableHeaderCell";function fy({ref:e,children:t,xstyle:n,className:s,style:r,...i}){return o.jsx("thead",{ref:e,...F(U("table-header"),q(n),s,r),...i,children:t})}fy.displayName="TableHeader";function hy({ref:e,children:t,xstyle:n,className:s,style:r,...i}){return o.jsx("tbody",{ref:e,...F(U("table-body"),q(n),s,r),...i,children:t})}hy.displayName="TableBody";const bv={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 Ti({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",...F(U("empty-state",{variant:i?"compact":null}),q(bv.container,i&&bv.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})]})}Ti.displayName="EmptyState";const H1={table:{kzqmXN:"xh8yej3",kLvRdT:"x1mwwwfo",kheTzg:"x1gukg7c",kPzzVL:"x140o2bo",$$css:!0},tableAutoLayout:{kPzzVL:"x1drmoe9",$$css:!0}};function aa(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 p3("Table",`Plugin at index ${a} threw in transform:`,c),r}},n)}const E_=[];function N_(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 T_({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 g={};h.align&&(g.style={textAlign:h.align});const k=aa(r,j=>j.transformBodyCell,{htmlProps:g,xstyle:[],columnIndex:p,columns:s},h,e,p,s),m=!h.renderCell,y=m?r_(e,h.key):((w=h.renderCell)==null?void 0:w.call(h,e))??null;let v;return m&&i==="truncate"&&typeof y=="string"&&y.length>0?v=o.jsx(se,{type:"body",maxLines:1,children:y}):v=y,o.jsx(l,{...k.htmlProps,contextMenuActions:k.contextMenuActions,xstyle:k.xstyle,children:v},h.key)}),d=aa(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 z_(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 A_=x.memo(T_,z_);function M_({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,...g}){const b=be(),k=s??E_,m=c!=null||u!=null,y=c??1,v=m?u??-1:void 0,w=rh,j=uy,C=dy,$=t??(e?c_(e):[]),E=aa(k,O=>O.transformColumns,$),N=x.useRef(E);N_(N.current,E)||(N.current=E);const S=N.current,A=n_(S),z=aa(k,O=>O.transformTable,{htmlProps:{},xstyle:r?[H1.table,H1.tableAutoLayout]:[H1.table]}),M=S.map((O,D)=>{var ye;const B=O.header??O.key,P={"data-column-key":O.key,scope:"col"};O.align&&(P.style={textAlign:O.align});const Y=aa(k,ue=>ue.transformHeaderCell,{htmlProps:P,xstyle:[],content:B,columnIndex:D,columns:S},O,D,S),Z=((ye=A.columns.get(O.key))==null?void 0:ye.style)??{},te=Y.htmlProps.style,J={...Y.htmlProps,style:te?{...Z,...te}:Z},K=Y.content??B,re=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(C,{...J,...re,contextMenuActions:Y.contextMenuActions,xstyle:Y.xstyle,children:Q},O.key)}),L=aa(k,O=>O.transformHeaderRow,{htmlProps:{},xstyle:[],children:o.jsx(o.Fragment,{children:M})}),R=e!=null&&e.length>0,T=S.length>0,I={...z.htmlProps.style,...h,...A.tableMinWidth>0?{minWidth:`${A.tableMinWidth}px`}:null};let _=o.jsx("table",{ref:p,...v!=null?{"aria-rowcount":v}:null,...z.htmlProps,...F(U("base-table"),q(...z.xstyle,d),[z.htmlProps.className,f].filter(Boolean).join(" ")||void 0,I),...g,children:r||o.jsxs(o.Fragment,{children:[T&&o.jsx(fy,{children:o.jsx(w,{...L.htmlProps,isHeaderRow:!0,xstyle:L.xstyle,children:L.children})}),o.jsx(hy,{children:R?e.map((O,D)=>{const B=n==null?D:typeof n=="function"?n(O):String(O[n]);return o.jsx(A_,{item:O,rowIndex:D,rowKey:B,columns:S,plugins:k,textOverflow:i,RowComponent:w,CellComponent:j,ariaRowIndex:m?y+D:void 0},B)}):e!=null&&l!==!1&&o.jsx("tr",{children:o.jsx("td",{colSpan:S.length,children:l??o.jsx(Ti,{title:b("@astryx.table.noData"),isCompact:!0})})})})]})});if(a){const O=aa(k,D=>D.transformScrollWrapper,{htmlProps:{},xstyle:[]});_=o.jsx(a,{htmlProps:O.htmlProps,xstyle:O.xstyle,beforeTable:O.beforeTable,afterTable:O.afterTable,children:_})}for(let O=k.length-1;O>=0;O--){const D=k[O];if(D.transformTableContext)try{_=D.transformTableContext(_)}catch(B){p3("Table","Plugin threw in transformTableContext:",B)}}return _}const g6=M_;g6.displayName="BaseTable";const m6=["columnSettings","sort","tree","selection","pagination"],vv=new Map(m6.map((e,t)=>[e,t]));function R_(e){const t=m6.length;return e.sort(([n],[s])=>{const r=vv.get(n)??t,i=vv.get(s)??t;return r-i})}const vd=new Set(["transformColumns","transformTable","transformHeaderRow","transformHeaderCell","transformBodyRow","transformBodyCell","transformScrollWrapper","transformTableContext"]);function __(e,t){const n=Object.keys(t);for(const r of n)vd.has(r)||va("Table",`Plugin "${e}" has unknown key "${r}". Valid keys: ${[...vd].join(", ")}. This key will be ignored.`);for(const r of n)if(vd.has(r)){const i=t[r];i!=null&&typeof i!="function"&&va()}n.some(r=>vd.has(r)&&typeof t[r]=="function")||va()}function I_(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&&O_(i.userPlugins,t))return i.userPlugins=t,i.result}const s=t?R_(Object.entries(t)).map(([,i])=>i):[],r=[...e,...s];if(t)for(const[i,a]of Object.entries(t))__(i,a);return n.current={basePlugins:e,userPlugins:t,result:r},r}function O_(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 L_={base:{kMv6JI:"xjb2p0i",kMwMTN:"x1tgivj0",$$css:!0}},wv={base:{kXHlph:"xw2csxc",kuHK5b:"x5lxg6s",$$css:!0},containerBleed:{keTefX:"xojxgvx",k71WvV:"x1fcf3bl",kzqmXN:"xx6qvi6",keoZOQ:"xkibk3",k1K539:"xlayyun",$$css:!0}};function D_({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,...F(U("table-scroll-wrapper"),q(wv.base,wv.containerBleed,...n??[])),children:[s,e,r]})}function B_(){return{transformTable(e){const t=e.htmlProps.className??"",n=U("table").className;return{...e,htmlProps:{...e.htmlProps,className:t?`${t} ${n}`:n},xstyle:[...e.xstyle,L_.base]}}}}function q_({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(()=>B_(),[]),h=x.useMemo(()=>[f],[f]),p=I_(h,a),g=x.useMemo(()=>({density:e,dividers:t,isStriped:n,hasHover:s,verticalAlign:r,textOverflow:i}),[e,t,n,s,r,i]);return o.jsx(Sx,{value:g,children:o.jsx(g6,{ref:u,data:c,columns:l,plugins:p,textOverflow:i,scrollWrapper:D_,...d})})}const y6=q_;y6.displayName="Table";function H_(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 P_(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 Ki={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 k6({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),g=h!=null||p!=null,b=f?"a":"span",k=f?"doc-noteref":void 0,m=f?{href:f,target:"_blank",rel:"noopener noreferrer",title:d}:{title:d},y=e;return s==="number"?o.jsx(b,{...c,ref:y,role:k,"aria-label":u("@astryx.citation.label",{number:n,title:d}),"data-testid":l,...m,...F(U("citation",{variant:s}),q(Ki.number,f!=null&&Ki.numberHover,f!=null&&Ki.numberInteractive,r),i,a),children:n}):o.jsxs(b,{...c,ref:y,role:k,"aria-label":u("@astryx.citation.label",{number:n,title:d}),"data-testid":l,...m,...F(U("citation",{variant:s}),q(Ki.label,g&&Ki.labelWithIcon,f!=null&&Ki.labelHover,f!=null&&Ki.labelInteractive,r),i,a),children:[g&&o.jsx("span",{"aria-hidden":"true",className:"x3nfvp2 x6s0dn4 xl56j7k x12xnipv x6b6gus xjspbzw x10xzikg x1litavf x1y0btm7 x14i3s5s xb3r6kr x2lah0s",children:h!=null?Hs(h,{size:"sm"}):o.jsx("img",{src:p,alt:"",className:"x1ad1g3v x9gl9lo"})}),o.jsx("span",{className:"xb3r6kr xlyipyv xuxw1ft xeuugli",children:d})]})}k6.displayName="Citation";const U_={sourceIds:void 0,autolink:void 0};function xy(e){if(e==null)return U_;if(typeof e.has=="function")return{sourceIds:e,autolink:void 0};const t=e;return{sourceIds:t.sourceIds,autolink:t.autolink}}const F_=/^ {0,3}\[([^\]^](?:\\.|[^\]\\])*)\]:[ \t]*(?:<([^<>\n]*)>|(\S+))([ \t]+(?:"[^"\n]*"|'[^'\n]*'|\([^()\n]*\)))?[ \t]*$/,G_=/^ {0,3}(?:"[^"\n]*"|'[^'\n]*'|\([^()\n]*\))[ \t]*$/;function ru(e){return e.trim().replace(/\s+/g," ").toLowerCase()}function V_(e){const t=F_.exec(e);if(t==null)return null;const n=ru(t[1]),s=t[2]!=null?t[2]:t[3];return n===""||s==null?null:{label:n,destination:s,hasTitle:t[4]!=null}}function b6(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=V_(u);if(f!=null){n.has(f.label)||n.set(f.label,f.destination),s[c]=!1,!f.hasTitle&&c+1<t.length&&G_.test(t[c+1])&&(s[c+1]=!1,c++);continue}}r=/^ {0,3}#{1,6}(?: |\t|$)/.test(u)||py(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 W_(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 K_(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(ru(u));if(d!=null)return{node:{type:"link",href:d,children:oi(i,s)},end:l+1}}}if(i.trim()==="")return null;const a=n.get(ru(i));return a==null?null:{node:{type:"link",href:a,children:oi(i,s)},end:r+1}}function X_(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(ru(c));if(u!=null)return{node:{type:"image",src:u,alt:r},end:a+1}}}if(r.trim()==="")return null;const i=n.get(ru(r));return i==null?null:{node:{type:"image",src:i,alt:r},end:s+1}}function jv(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 ho(e){return e==null?!1:/\w/.test(e)}function Z_(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 Y_(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 Q_(e,t){return iu(e,xy(t))}function iu(e,t){const n=oi(e,t);return t.autolink==="gfm"?S6(n):n}function oi(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=Z_(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=jv(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=X_(e,s,t.linkDefs);if(l){n.push(l.node),s=l.end;continue}}{const l=Y_(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=jv(e,l+2);if(c!==-1){n.push({type:"link",href:e.slice(l+2,c),children:oi(e.slice(s+1,l),t)}),s=c+1;continue}}}if(t.linkDefs!=null&&e[s]==="["){const l=K_(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&&ho(e[s-1]))){const u=e.indexOf(l,s+3);if(u!==-1&&(!c||!ho(e[u+3]))){n.push({type:"bold",children:[{type:"italic",children:oi(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&&ho(e[s-1]))){const u=e.indexOf(l,s+2);if(u!==-1&&(!c||!ho(e[u+2]))){n.push({type:"bold",children:oi(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:oi(e.slice(s+2,l),t)}),s=l+2;continue}}if(e[s]==="*"||e[s]==="_"){const l=e[s]==="_";if(!(l&&ho(e[s-1]))){const c=e.indexOf(e[s],s+1);if(c!==-1&&c>s+1&&(!l||!ho(e[c+1]))){n.push({type:"italic",children:oi(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 v6="[^\\s<]+",J_="https?:\\/\\/",w6="[A-Za-z0-9._%+-]+",Sv="[A-Za-z0-9-]+",j6=`${Sv}(?:\\.${Sv})+`,eI="[a-zA-Z][a-zA-Z0-9+.-]*",tI="[^<>\\s]*",nI=new RegExp(`${J_}${v6}`,"g"),sI=new RegExp(`www\\.${v6}`,"g"),rI=new RegExp(`${w6}@${j6}`,"g"),iI=new RegExp(`<(${eI}:${tI})>`,"g"),aI=new RegExp(`<(${w6}@${j6})>`,"g"),Cv=new Set("?!.,:*_~"),oI=new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._%+-@");function $v(e){let t=e;for(;t.length>0;){if(Cv.has(t[t.length-1])){let n=t.length-1;for(;n>0&&Cv.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 lI=new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/=");function Ev(e){return e==null?!0:!lI.has(e)}function cI(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(aI.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(!Ev(a)||e.slice(i.index-2,i.index)==="](")continue;const l=$v(i[0]);l.length!==0&&t.push({start:i.index,end:i.index+l.length,href:l,display:l})}}{const r=new RegExp(sI.source,"g");let i;for(;(i=r.exec(e))!==null;){const a=e[i.index-1];if(!Ev(a)||e.slice(i.index-3,i.index)==="://")continue;const l=$v(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 uI(e){const t=cI(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 S6(e){const t=[];for(const n of e)if(n.type==="text"){const s=uI(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:S6(n.children)}):t.push(n);return t}function P1(e){let t=0;for(;t<e.length&&e[t]===" ";)t++;return t}function py(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 ff(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 dI(e){return!!(/^#{1,6} /.test(e)||/^(`{3,}|~{3,})/.test(e)||py(e)||e.startsWith("> ")||e===">"||/^ {0,9}[-*+] /.test(e)||/^ {0,9}0*1[.)] /.test(e)||e.includes("|"))}function U1(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 fI(e,t,n){const s=U1(e[t]).map(l=>({children:iu(l,n)})),r=U1(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(U1(e[a]).map(l=>({children:iu(l,n)}))),a++;return{node:{type:"table",headers:s,alignments:r,rows:i},nextIndex:a}}function Nv(e,t,n,s){const r=[],i=P1(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(/^ *[-*+] /,""),g=p.match(/^\[([ xX])\] (.*)/);let b,k;g?(b=g[1].toLowerCase()==="x",k=g[2]):k=p,h++;const m=[];for(;h<e.length&&e[h].trim()!==""&&P1(e[h])>i;)m.push(e[h]),h++;if(m.length>0){const v=Math.min(...m.map(j=>P1(j))),w=m.map(j=>j.slice(v));k+=`
|
|
155
|
-
`+w.join(`
|
|
156
|
-
`)}r.push({checked:b,children:da(k,s)});let y=h;for(;y<e.length&&e[y].trim()==="";)y++;y>h&&y<e.length&&u.test(e[y])&&(f=!0,h=y)}return{node:{type:"list",ordered:n,start:d,delimiter:n?l:void 0,loose:f||void 0,items:r},nextIndex:h}}function hI(e,t){return da(e,xy(t))}function da(e,t){const{defs:n,cleaned:s}=b6(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],k=f[2]||"plaintext",m=[];for(u++;u<l.length&&!l[u].startsWith(b);)m.push(l[u]),u++;u++,c.push({type:"codeblock",language:k,content:m.join(`
|
|
158
|
-
`)});continue}const h=d.match(/^(#{1,6}) +(.*)/);if(h){c.push({type:"heading",level:h[1].length,children:iu(h[2],a)}),u++;continue}if(py(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("|")&&ff(l[u+1])){const b=fI(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:da(b.join(`
|
|
159
|
-
`),a)});continue}if(/^ {0,9}[-*+] /.test(d)){const b=Nv(l,u,!1,a);c.push(b.node),u=b.nextIndex;continue}if(/^ {0,9}\d+[.)] /.test(d)){const b=Nv(l,u,!0,a);c.push(b.node),u=b.nextIndex;continue}const g=[d];for(u++;u<l.length&&!dI(l[u])&&l[u].trim()!=="";)g.push(l[u]),u++;c.push({type:"paragraph",children:iu(g.join(`
|
|
160
|
-
`),a)})}return c}function F1(){return{prevInput:"",settledText:"",settledBlocks:[],settledUpTo:0}}function xI(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 Tv(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 pI(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("|")&&!ff(n)){let r=!1;for(let i=t.length-2;i>=1;i--)if(ff(t[i])&&t[i-1].includes("|")){r=!0;break}if(!r){t.pop();continue}}if(ff(n)&&(t.length<2||!t[t.length-2].includes("|"))){t.pop();continue}break}return t.join(`
|
|
163
|
-
`)}function zv(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=xy(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}=b6(e),i=W_(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=xI(l);if(c<0)return t.prevInput=e,da(e,a);const u=l.slice(0,c).join(`
|
|
165
|
-
`),d=l.slice(c).join(`
|
|
166
|
-
`).trim(),f=pI(d);let h;if(u===t.settledText)h=t.settledBlocks;else if(t.settledText.length>0&&u.startsWith(t.settledText)){const g=u.slice(t.settledText.length),b=da(g,a);h=zv(t.settledBlocks,b)}else h=da(u,a);const p=f?da(f,a):[];return t.settledText=u,t.settledBlocks=h,t.settledUpTo=c,t.prevInput=e,zv(h,p)}const wd={start:"0",center:"auto"},G1={start:null,center:"auto"},mI={k7Eaqz:"xkj4a21",$$css:!0},Ln={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=>[mI,{"--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)}]},jd={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 Av(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 wa(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+=wa(n.children);break;case"break":t+=1;break;case"citation":t+=1;break}return t}function fg(e){let t=0;for(const n of e)switch(n.type){case"heading":case"paragraph":t+=wa(n.children);break;case"codeblock":t+=n.content.length;break;case"blockquote":t+=fg(n.children);break;case"list":for(const s of n.items)t+=fg(s.children);break;case"table":for(const s of n.headers)t+=wa(s.children);for(const s of n.rows)for(const r of s)t+=wa(r.children);break;case"hr":break;case"image":t+=n.alt.length;break}return t}const yI={1:he.h1,2:he.h2,3:he.h3,4:he.h4,5:he.h5,6:he.h6},kI=/^(javascript|data|vbscript):/i;function hg(e){const t=e.trim();return t.length===0||kI.test(t)?null:t}function bI(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 Mv(e,t,n){const s=t.offset;if(t.offset+=e.length,!t.active)return e;const r=P_(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 vI(e,t){let n=e.numberMap.get(t);return n==null&&(n=e.nextNumber++,e.numberMap.set(t,n)),n}function Un(e,t,n,s,r,i="a",a,l){switch(e.type){case"text":{if(a&&a.length>0){const c=bI(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(Mv(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 Mv(e.content,s,t)}case"bold":return o.jsx("strong",{className:"x2mo6ok",children:e.children.map((c,u)=>Un(c,u,n,s,r,i,a,l))},t);case"italic":return o.jsx("em",{children:e.children.map((c,u)=>Un(c,u,n,s,r,i,a,l))},t);case"strikethrough":return o.jsx("del",{className:"xv1l7n4",children:e.children.map((c,u)=>Un(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(Z0,{children:e.content},t)}case"link":{const c=hg(e.href);if(c==null)return o.jsx("span",{children:e.children.map((p,g)=>Un(p,g,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,g)=>Un(p,g,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,g)=>Un(p,g,n,s,r,i,a,l))},t)}case"image":{const c=hg(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=vI(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(k6,{source:u,number:c,variant:d},t)}}}function wI(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 jI(e){return e.headers.map((t,n)=>{let s=wa(t.children);for(const r of e.rows)if(r[n]){const i=wa(r[n].children);i>s&&(s=i)}return s<=6?60:s<=15?80:120})}function Sc(e,t,n,s,r,i,a,l,c,u,d="a",f,h,p){const g=G1[u],b=g!=null?Ln.blockAlign(g):null,k=wI(e,s),m=t===0,y=t===n-1;switch(e.type){case"heading":{const v=Math.min(e.level+r-1,6),w=e.children.map(($,E)=>Un($,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 C=`h${v}`;return o.jsx(C,{...F(U("markdown-heading",{density:s,level:v}),q(he.headingBase,yI[v],k,c!=null?Ln.proseWidth(c):null,u!=="start"?Ln.proseAlign(wd[u]):null,m&&he.noMarginBlockStart,y&&he.noMarginBlockEnd)),children:w},t)}case"paragraph":{const v=e.children.map((j,C)=>Un(j,C,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",...F(U("markdown-paragraph",{density:s}),q(k,c!=null?Ln.proseWidth(c):null,u!=="start"?Ln.proseAlign(wd[u]):null,m&&he.noMarginBlockStart,y&&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",{...F(U("markdown-codeblock",{density:s}),q(k,he.codeBlockWrapper,m&&he.noMarginBlockStart,y&&he.noMarginBlockEnd)),children:o.jsx(X0,{code:e.content,language:e.language,isCollapsible:!0,xstyle:[c!=null?Ln.blockWidth(c):void 0,b]})},t)}case"blockquote":{const v=h==null?void 0:h.blockquote;if(v){const w=e.children.map((j,C)=>Sc(j,C,e.children.length,s,r,i,a,l,c,u,d,f,h,p));return o.jsx(v,{children:w},t)}return o.jsx(u4,{...U("markdown-blockquote",{density:s}),xstyle:[k,c!=null?Ln.proseWidth(c):void 0,u!=="start"?Ln.proseAlign(wd[u]):void 0,m&&he.noMarginBlockStart,y&&he.noMarginBlockEnd],children:e.children.map((w,j)=>Sc(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,C)=>({item:j,key:`task-${C}`})).filter(({item:j})=>j.checked).map(({key:j})=>j);return o.jsx("div",{...F(U("markdown-list",{density:s}),q(k,m&&he.noMarginBlockStart,y&&he.noMarginBlockEnd)),children:o.jsx(ly,{label:p("@astryx.markdown.taskList"),isLabelHidden:!0,value:w,xstyle:he.blockIndent,isReadOnly:!0,density:"compact",children:e.items.map((j,C)=>{const $=j.children[0],N=j.children.length===1&&($==null?void 0:$.type)==="paragraph"?o.jsx(o.Fragment,{children:$.children.map((S,A)=>Un(S,A,i,a,l,d,f,h))}):o.jsx(o.Fragment,{children:j.children.map((S,A)=>Sc(S,A,j.children.length,s,r,i,a,l,c,u,d,f,h,p))});return o.jsx(sh,{value:`task-${C}`,label:N},C)})})},t)}return o.jsx("div",{...F(U("markdown-list",{density:s}),q(k,c!=null?Ln.proseWidth(c):null,u!=="start"?Ln.proseAlign(wd[u]):null,m&&he.noMarginBlockStart,y&&he.noMarginBlockEnd)),children:o.jsx(qt,{listStyle:e.ordered?"decimal":"disc",density:"compact",start:e.ordered?e.start:void 0,xstyle:he.blockIndent,children:e.items.map((w,j)=>{const C=w.children[0],E=w.children.length===1&&(C==null?void 0:C.type)==="paragraph"?o.jsx(o.Fragment,{children:C.children.map((N,S)=>Un(N,S,i,a,l,d,f,h))}):o.jsx(o.Fragment,{children:w.children.map((N,S)=>Sc(N,S,w.children.length,s,r,i,a,l,c,u,d,f,h,p))});return o.jsx(ct,{label:E},j)})})},t)}case"table":{const v=jI(e);return o.jsx("div",{tabIndex:0,role:"group","aria-label":p("@astryx.markdown.table"),...F(U("markdown-table",{density:s}),q(he.tableWrapper,k,c!=null?Ln.blockWidth(c):null,G1[u]!=null?Ln.blockAlign(G1[u]):null,m&&he.noMarginBlockStart,y&&he.noMarginBlockEnd)),children:o.jsxs(y6,{dividers:"rows",textOverflow:"wrap",children:[o.jsx(fy,{children:o.jsx(rh,{children:e.headers.map((w,j)=>o.jsx(dy,{xstyle:[Ln.cellMinWidth(`${v[j]}px`),e.alignments[j]==="center"&&jd.center,e.alignments[j]==="right"&&jd.end],children:w.children.map((C,$)=>Un(C,$,i,a,l,d,f,h))},j))})}),o.jsx(hy,{children:e.rows.map((w,j)=>{const C=w.map(($,E)=>o.jsx(uy,{xstyle:[e.alignments[E]==="center"&&jd.center,e.alignments[E]==="right"&&jd.end],children:$.children.map((N,S)=>Un(N,S,i,a,l,d,f,h))},E));return o.jsx(rh,{children:C},j)})})]})},t)}case"hr":{const v=h==null?void 0:h.hr;return v?o.jsx(v,{},t):o.jsx("hr",{...F(U("markdown-hr",{density:s}),q(he.hr,k,m&&he.noMarginBlockStart,y&&he.noMarginBlockEnd))},t)}case"image":{const v=hg(e.src);if(v==null)return o.jsxs("div",{...F(U("markdown-image",{density:s}),q(k,m&&he.noMarginBlockStart,y&&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",{...F(U("markdown-image",{density:s}),q(k,m&&he.noMarginBlockStart,y&&he.noMarginBlockEnd)),children:o.jsx("img",{src:v,alt:e.alt,className:"x193iq5w xh6dtrn"})},t)}}}function gy({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:g,className:b,style:k,"data-testid":m}){const y=be(),v=Li(),w=x.useMemo(()=>l?new Set(Object.keys(l)):void 0,[l]),j=x.useMemo(()=>({sourceIds:w,autolink:p}),[w,p]),C=CA(t,i),$=x.useRef(F1()),E=x.useRef(p);E.current!==p&&($.current=F1(),E.current=p);const N=x.useMemo(()=>{if(n==="inline")return[];if(i){if(C==="")return $.current=F1(),[];const B=Tv(C);return gI(B,$.current,j)}return hI(t,j)},[n,C,t,i,j]),S=x.useMemo(()=>{if(n!=="inline")return[];const B=i?Tv(C):t;return Q_(B,j)},[n,C,t,i,j]),{token:A}=ux(),z=x.useMemo(()=>{const B=Av(A("--duration-fast-max"))??230,P=Av(A("--duration-fast-min")),V=P!=null?Math.max(4,Math.round(P/10)):50;return Math.min(Math.ceil(B/V),12)},[A]),M=x.useRef([]),L=x.useRef([]),R=x.useRef([]),T=C.length,_={offset:0,boundaries:x.useMemo(()=>{const B=n==="inline"?wa(L.current):fg(M.current),P=H_(R.current,B,z);return R.current=P,P},[n,T,z]),active:i},O=l?{sources:l,numberMap:new Map,nextNumber:1,style:c}:null;if(n==="inline"){const B=o.jsx("span",{ref:e,"data-testid":m,...F(U("markdown",{density:s}),q(he.root,he.inlineRoot,g),b,k),children:S.map((P,V)=>Un(P,V,a,_,O,v,h,f))});return L.current=S,M.current=[],B}const D=o.jsx("div",{role:"document",ref:e,"data-testid":m,...F(U("markdown",{density:s}),q(he.root,g),b,k),children:N.map((B,P)=>Sc(B,P,N.length,s,r,a,_,O,u?typeof u=="number"?`${u}px`:u:null,d,v,h,f,y))});return M.current=N,L.current=[],D}gy.displayName="Markdown";const C6=x.createContext(null);C6.displayName="CollapsibleGroupContext";const xg=x.createContext(null);xg.displayName="CollapsibleGroupPresentationContext";function SI(e){const{isCollapsible:t,value:n}=e,s=x.use(C6),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 xo={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}},Uo={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}},CI={compact:Uo.triggerCompact,balanced:Uo.triggerBalanced,spacious:Uo.triggerSpacious},$I={compact:Uo.contentCompact,balanced:Uo.contentBalanced,spacious:Uo.contentSpacious};function $6({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:g}=SI({isCollapsible:h,value:a}),b=()=>{r||g()},k=x.use(xg),m=(k==null?void 0:k.hasDividers)??!1,y=(k==null?void 0:k.density)??null,v=Aa("chevronDown"),w=x.useId();return o.jsxs("div",{ref:l,...F(U("collapsible",{density:y??void 0}),q(xo.root,m&&xo.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,...F(U("collapsible-trigger",{density:y??void 0}),q(xo.trigger,y!=null&&CI[y],r&&xo.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,...F(U("collapsible-content",{density:y??void 0}),q(xo.content,y!=null&&$I[y],!p&&xo.contentHidden)),children:k!=null?o.jsx(xg,{value:null,children:t}):t})]})}$6.displayName="Collapsible";const my=x.createContext(null);my.displayName="RadioListContext";function E6({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:g,xstyle:b,className:k,style:m,"data-testid":y,htmlName:v,children:w}){const j=x.useId(),C=v??j,$=x.useId(),E=x.useId(),N=x.useId(),S=x.useId(),A=x.useRef(null),z=l&&!!c,M=js({placement:"above",focusTrigger:"always",isEnabled:z}),L=x.useMemo(()=>({name:C,value:r,onChange:i,isDisabled:l,hasDisabledMessage:z,isRequired:u,size:f,status:h}),[C,r,i,l,z,u,f,h]),R=x.useCallback(T=>{if(r!=="")return;const I=A.current;if(!I)return;const _=T.relatedTarget;if(_){if(I.contains(_))return}else if(document.activeElement&&document.activeElement!==T.target&&I.contains(document.activeElement))return;const O=Array.from(I.querySelectorAll('input[type="radio"]:not([disabled])'));if(O.length===0)return;const D=T.target,B=O.findIndex(Y=>Y===D);if(B===-1)return;const V=B===O.length-1?O[O.length-1]:O[0];D!==V&&V.focus()},[r]);return o.jsxs(Ul,{ref:e,"data-testid":y,label:t,isLabelHidden:n,description:s,inputID:$,labelID:E,isGroupLabel:!0,descriptionID:s?N: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:g,xstyle:b,className:k,style:m,children:[o.jsx("div",{ref:T=>{A.current=T,M.ref(T)},role:"radiogroup","aria-labelledby":E,onFocus:R,"aria-describedby":[s?N: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,...F(U("radio-list",{orientation:a,size:f}),{0:{className:"x78zum5 x1q0g3np x9mgr7n"},1:{className:"x78zum5 xdt5ytf x1txdalj"}}[(a==="vertical")<<0]),children:o.jsx(my,{value:L,children:w})}),z&&M.renderTooltip(c)]})}E6.displayName="RadioList";const EI={xklqth5:"xklqth5",$$css:!0},Ts={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}},Rv={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},NI={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},TI={sm:{kzqmXN:"x1xc55vz",kZKoxP:"xdk7pt",$$css:!0},md:{kzqmXN:"x1fsd2vl",kZKoxP:"x170jfvy",$$css:!0}},zI={root:{k8WAf4:"xt970qd",kg3NbH:"xnjsko4",kaIpWk:"x2u8bby",kUk6DE:"x98rzlu",k7Eaqz:"xeuugli",$$css:!0}};function pg({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(my);if(!f)throw new Error("RadioListItem must be used within an RadioList");const h=x.useId(),p=x.useId(),g=f.isDisabled||r,b=f.hasDisabledMessage&&!r,k=f.value===n,m=f.size,y=o.jsxs("div",{...q(Ts.radioWrapper,Rv[m],!g&&Ts.radioWrapperFocus),children:[o.jsx("input",{id:h,type:"radio",name:f.name,value:n,checked:k,disabled:g&&!b,"aria-disabled":b?"true":void 0,form:b?"":void 0,required:f.isRequired,onChange:()=>{g||f.onChange(n)},"aria-describedby":s?p:void 0,...q(Ts.input,Rv[m],g&&Ts.inputDisabled)}),o.jsx("div",{"aria-hidden":"true",...F(U("radio",{size:m,checked:k?"checked":null,disabled:g?"disabled":null}),q(Ts.radio,NI[m],k?Ts.radioChecked:Ts.radioUnchecked,g&&Ts.radioDisabled,g&&!k&&Ts.radioDisabledUnchecked)),children:k&&o.jsx("div",{...F(U("radio-dot",{size:m}),q(Ts.innerDot,TI[m]))})})]}),v=i!=null?o.jsxs(o.Fragment,{children:[y,i]}):y;return o.jsx("div",{ref:e,...F(U("radio-list-item"),q(Ts.container,!g&&EI,l),c,u),...d,children:o.jsx(Za,{startContent:v,label:o.jsx("label",{htmlFor:h,...{0:{},1:{className:"xnbbluu x1h6gzvc"}}[!!g<<0],children:t}),description:s!=null?o.jsx("span",{id:p,children:s}):void 0,endContent:a,xstyle:zI.root})})}pg.displayName="RadioListItem";const AI=50,MI=40,N6="astryx-resizable:";function Sd(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 RI(e){if(typeof window>"u")return null;try{const t=localStorage.getItem(N6+e);if(t!=null){const n=JSON.parse(t);if(typeof n=="number")return n}}catch{}return null}function _I(e,t){if(!(typeof window>"u"))try{localStorage.setItem(N6+e,JSON.stringify(t))}catch{}}function II(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 T6(e){const{defaultSize:t,minSizePx:n=AI,maxSizePx:s=1/0,collapsible:r=!1,collapsedSize:i=MI,snaps:a=[],autoSaveId:l,onSizeChange:c,onCollapseChange:u}=e,d=II(t),f=l?RI(l):null,h=f??d,[p,g]=x.useState(()=>Sd(h,n,s,a)),[b,k]=x.useState(()=>f===0&&r),m=x.useRef(p),y=x.useRef(p);x.useEffect(()=>{l&&_I(l,b?0:p)},[p,b,l]);const v=x.useCallback(()=>{r&&(m.current=p,k(!0),g(0),u==null||u(!0),c==null||c(0))},[r,p,u,c]),w=x.useCallback(()=>{k(!1);const S=m.current||d,A=Sd(S,n,s,a);g(A),u==null||u(!1),c==null||c(A)},[d,n,s,a,u,c]),j=x.useCallback(S=>{const A=Sd(S,n,s,a);g(A),k(!1),c==null||c(A)},[n,s,a,c]),C=x.useCallback(()=>{y.current=b?0:p},[p,b]),$=x.useCallback(S=>{const A=y.current+S;if(r&&A<i){b||(m.current=p,u==null||u(!0)),k(!0),g(0),c==null||c(0);return}b&&A>=i&&(k(!1),u==null||u(!1));const z=Sd(A,n,s,a);g(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:C,_onResizeMove:$,_onResizeEnd:E,_minSizePx:n,_maxSizePx:s,_snaps:a,_collapsedSize:i,_collapsible:r,_isResizableProps:!0}}}function OI(e){const{regions:t,autoSaveId:n}=e,s=Object.entries(t),r=s.map(([a,l])=>T6({...l,autoSaveId:n?`${n}:${a}`:void 0})),i={};return s.forEach(([a],l)=>{i[a]=r[l]}),i}function z6(e){return"regions"in e?OI(e):T6(e)}const LI=10,DI=50;function BI(e,t,n){if(e!=="auto")return e;const s=t?"end":"start";return n?s==="start"?"end":"start":s}function qI(e){return e==="center"?null:e==="start"?-1:1}const at={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}},HI={kLqNvP:"x1o0tod",k3aq6I:"x11wx31z x75qhwu",$$css:!0},PI={k87sOh:"x13vifvy",k3aq6I:"xsqj5wx",$$css:!0},UI={kLqNvP:"x1o0tod",k3aq6I:"xsqj5wx",$$css:!0},FI={k87sOh:"x13vifvy",k3aq6I:"xsqj5wx",$$css:!0},Cd={hitAreaOffsetX:e=>[HI,{"--x-qthpiu":`translate(calc(${e} * (3px + ${ls["--spacing-1"]}) - 6.5px), -50%)`!=null?`translate(calc(${e} * (3px + ${ls["--spacing-1"]}) - 6.5px), -50%)`:void 0,"--x-sj6hyi":`translate(calc(${e} * (3px + ${ls["--spacing-1"]}) + 6.5px), -50%)`!=null?`translate(calc(${e} * (3px + ${ls["--spacing-1"]}) + 6.5px), -50%)`:void 0}],hitAreaOffsetY:e=>[PI,{"--x-transform":`translate(-50%, calc(${e} * (3px + ${ls["--spacing-1"]}) - 6.5px))`!=null?`translate(-50%, calc(${e} * (3px + ${ls["--spacing-1"]}) - 6.5px))`:void 0}],pillOffsetX:e=>[UI,{"--x-transform":`translate(calc(${e} * (100% + ${ls["--spacing-1"]})), -50%)`!=null?`translate(calc(${e} * (100% + ${ls["--spacing-1"]})), -50%)`:void 0}],pillOffsetY:e=>[FI,{"--x-transform":`translate(-50%, calc(${e} * (100% + ${ls["--spacing-1"]})))`!=null?`translate(-50%, calc(${e} * (100% + ${ls["--spacing-1"]})))`:void 0}]};function yy({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 g=be(),b=l??g("@astryx.resizable.handle.label"),k=x.useRef(null),m=x.useRef(null),[y,v]=x.useState(!1),[w,j]=x.useState(!1),[C,$]=x.useState(!1),E=e==="horizontal",N=t==="overlay",S=n?-1:1,A=BI(a,n,(c==null?void 0:c._isCollapsed)??!1),z=qI(A),M=x.useCallback(()=>{const V=k.current;return V&&getComputedStyle(V).direction==="rtl"?-1:1},[]),L=w||C,R=x.useCallback(V=>{if(s||!c)return;V.preventDefault(),V.stopPropagation(),v(!0),c._onResizeStart();const Y=E?V.clientX:V.clientY,Z=E?M():1;document.body.style.cursor=E?"col-resize":"row-resize",document.body.style.userSelect="none";const te=le=>{const ge=((E?le.clientX:le.clientY)-Y)*Z*S;c._onResizeMove(ge)},J=()=>{re(),v(!1),c._onResizeEnd(),document.body.style.cursor="",document.body.style.userSelect=""},K=()=>{re(),v(!1),document.body.style.cursor="",document.body.style.userSelect=""};function re(){window.removeEventListener("pointermove",te),window.removeEventListener("pointerup",J),window.removeEventListener("pointercancel",K),m.current=null}window.addEventListener("pointermove",te),window.addEventListener("pointerup",J),window.addEventListener("pointercancel",K),m.current=re},[s,c,E,M,S]),T=x.useCallback(V=>{if(s||!c)return;const Y=V.shiftKey?DI:LI,Z=E?M():1;switch(V.key){case"ArrowRight":case"ArrowDown":{V.preventDefault(),c._onResizeStart(),c._onResizeMove(Y*(E?Z:1)*S),c._onResizeEnd();break}case"ArrowLeft":case"ArrowUp":{V.preventDefault(),c._onResizeStart(),c._onResizeMove(-Y*(E?Z:1)*S),c._onResizeEnd();break}case"Home":{V.preventDefault(),c._onResizeStart(),c._onResizeMove(c._minSizePx-c._size),c._onResizeEnd();break}case"End":{V.preventDefault(),c._maxSizePx!==1/0&&(c._onResizeStart(),c._onResizeMove(c._maxSizePx-c._size),c._onResizeEnd());break}case"Enter":{V.preventDefault(),c._collapsible&&(c._onResizeStart(),c._onResizeMove(c._isCollapsed?c._minSizePx:-c._size),c._onResizeEnd());break}}},[s,c,E,M,S]),I=x.useCallback(()=>{s||!c||!c._collapsible||(c._onResizeStart(),c._onResizeMove(c._isCollapsed?c._minSizePx:-c._size),c._onResizeEnd())},[s,c]);x.useEffect(()=>()=>{m.current&&(m.current(),document.body.style.cursor="",document.body.style.userSelect="")},[]);const _=(c==null?void 0:c._isCollapsed)??!1,O=c?_?Math.max(c._size,c._minSizePx):c._size:void 0,D=c?c._minSizePx:void 0,B=c&&c._maxSizePx!==1/0?c._maxSizePx:void 0,P=c&&_?g("@astryx.resizable.collapsed"):void 0;return o.jsxs("div",{ref:rt(h,k),role:"separator","aria-orientation":E?"vertical":"horizontal","aria-valuenow":O,"aria-valuemin":D,"aria-valuemax":B,"aria-valuetext":P,"aria-label":b,"aria-disabled":s||void 0,tabIndex:s?-1:0,onDoubleClick:I,onFocus:()=>$(!0),onBlur:()=>$(!1),"data-resizing":y||void 0,...F(U("resize-handle"),q(at.handle,N&&at.overlay,N&&(E?at.overlayHorizontal:at.overlayVertical),!N&&(E?at.horizontal:at.vertical),!N&&!r&&(E?at.noDividerHorizontal:at.noDividerVertical),!N&&r&&L&&!y&&at.handleHover,!N&&r&&y&&at.handleActive,s&&at.disabled,d),f),...p,onKeyDown:V=>{var Y;(Y=p.onKeyDown)==null||Y.call(p,V),T(V)},children:[o.jsx("div",{...q(at.hitArea,E?at.hitAreaHorizontal:at.hitAreaVertical,z==null?E?pl.centerInline("0px"):at.hitAreaCenteredY:E?Cd.hitAreaOffsetX(z):Cd.hitAreaOffsetY(z),s&&at.disabled),onPointerDown:R,onPointerEnter:()=>j(!0),onPointerLeave:()=>{y||j(!1)}}),u??o.jsx("div",{...F(U("resize-handle-pill"),q(at.pill,E?at.pillHorizontal:at.pillVertical,A==="center"?pl.centerInline("-50%"):E?Cd.pillOffsetX(A==="start"?-1:1):Cd.pillOffsetY(A==="start"?-1:1),i?at.pillVisible:at.pillHidden,L&&!y&&at.pillHover,y&&at.pillActive))})]})}yy.displayName="ResizeHandle";const po={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}},GI={imageTransform:e=>[{k3aq6I:e!=null?"xsqj5wx":e,$$css:!0},{"--x-transform":e??void 0}]},$d=50,_v={ArrowLeft:[$d,0],ArrowRight:[-$d,0],ArrowUp:[0,$d],ArrowDown:[0,-$d]};function A6({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,...g}){const b=be(),k=x.useRef(null),m=x.useRef(null),y=x.useRef(null),v=x.useRef(null),w=s!==void 0,[j,C]=x.useState(r),$=w?s:j,E=x.useCallback(ie=>{w||C(ie),i==null||i(ie)},[w,i,C]),[N,S]=x.useState(1),[A,z]=x.useState({x:0,y:0}),[M,L]=x.useState(!1),R=x.useRef({x:0,y:0,panX:0,panY:0}),T=x.useMemo(()=>Array.isArray(n)?n:[n],[n]),I=T.length>1,_=T.length>0?T[Math.min($,T.length-1)]:null,D=((_==null?void 0:_.type)??"image")==="video",B=I&&$>0,P=I&&$<T.length-1;w4(e),x.useEffect(()=>{S(1),z({x:0,y:0})},[$,_==null?void 0:_.src]);const V=Pl(),Y=x.useRef($),Z=x.useRef(e);x.useEffect(()=>{const ie=Y.current!==$,tn=Z.current;if(Y.current=$,Z.current=e,!ie||!e||!tn)return;const un=T[Math.min($,T.length-1)],$s=`${$+1} of ${T.length}`;V(un!=null&&un.alt?`${un.alt}, ${$s}`:`Image ${$s}`)},[$,e,V,T]),lr(()=>{const ie=k.current;ie&&(e&&!ie.open?(v.current=document.activeElement,ie.showModal()):!e&&ie.open&&(ie.close(),v.current instanceof HTMLElement&&v.current.focus()))},[e]);const te=x.useCallback(()=>{t(!1)},[t]),J=x.useCallback(ie=>{ie.preventDefault(),te()},[te]),K=x.useRef(!1),re=x.useCallback(ie=>{if(K.current){K.current=!1;return}(ie.target===ie.currentTarget||ie.target===m.current)&&te()},[te]),le=x.useCallback(()=>{B&&E($-1)},[B,$,E]),ve=x.useCallback(()=>{P&&E($+1)},[P,$,E]),ge=x.useCallback(ie=>{!a||D||ie===N||(S(ie),z({x:0,y:0}),V(ie>1?b("@astryx.lightbox.zoomedIn"):b("@astryx.lightbox.zoomedOut")))},[a,D,N,V,b]),xe=x.useCallback(()=>{ge(N===1?2:1)},[ge,N]),ce=x.useCallback(ie=>{if(a&&!D){if(ie.key==="+"||ie.key==="="){ie.preventDefault(),ge(2);return}if(ie.key==="-"){ie.preventDefault(),ge(1);return}if(N>1&&_v[ie.key]!==void 0){ie.preventDefault();const[tn,un]=_v[ie.key];z($s=>({x:$s.x+tn,y:$s.y+un}));return}}ie.key==="ArrowLeft"?(ie.preventDefault(),le()):ie.key==="ArrowRight"&&(ie.preventDefault(),ve())},[a,D,N,ge,le,ve]),Q=x.useCallback(ie=>{(ie.key==="Enter"||ie.key===" ")&&(ie.preventDefault(),xe())},[xe]),ye=x.useCallback(ie=>{N<=1||!a||(L(!0),K.current=!1,R.current={x:ie.clientX,y:ie.clientY,panX:A.x,panY:A.y})},[N,a,A]);x.useEffect(()=>{if(!M)return;const ie=un=>{K.current=!0;const $s=un.clientX-R.current.x,In=un.clientY-R.current.y;z({x:R.current.panX+$s,y:R.current.panY+In})},tn=()=>{L(!1)};return window.addEventListener("pointermove",ie),window.addEventListener("pointerup",tn),()=>{window.removeEventListener("pointermove",ie),window.removeEventListener("pointerup",tn)}},[M]);const ue=N>1,pe=a&&!D,Le=N===1?null:`scale(${N}) translate(${A.x/N}px, ${A.y/N}px)`;return _?o.jsx("dialog",{ref:rt(f,k),onCancel:J,onClick:ie=>{re(ie),h==null||h(ie)},onKeyDown:ie=>{ce(ie),p==null||p(ie)},"aria-label":_.alt||b("@astryx.lightbox.mediaViewer"),...F(U("lightbox"),q(po.dialog,c),u,d),...g,children:o.jsxs("div",{ref:m,className:"x78zum5 xdt5ytf x6s0dn4 xl56j7k xh8yej3 x5yr21d x1n2onr6",children:[o.jsx("div",{className:"x10l6tqk xyx6v2t x1mcfs9z x1vjfegm",children:o.jsx(kn,{icon:o.jsx($e,{icon:"close",size:"sm",color:"inherit"}),label:b("@astryx.lightbox.close"),variant:"ghost",onClick:te,xstyle:po.controlButton})}),I&&o.jsx("div",{className:"x10l6tqk xwa60dl x1cb1t30 x1vjfegm x1ybfrjj",children:o.jsx(kn,{icon:o.jsx("span",{...q(pl.mirror),children:o.jsx($e,{icon:"chevronLeft",size:"sm",color:"inherit"})}),label:b("@astryx.lightbox.previous"),variant:"ghost",isDisabled:!B,onClick:le,xstyle:po.controlButton})}),o.jsxs("div",{className:"x78zum5 xdt5ytf x6s0dn4 x193iq5w xmz0i5r xb3r6kr",children:[o.jsx("div",{ref:y,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|!!(!D&&a&&!ue)<<2|!!(!D&&ue)<<1|!!(!D&&M)<<0],onDoubleClick:D?void 0:xe,onKeyDown:pe?Q:void 0,onPointerDown:D?void 0:ye,children:D?o.jsx("video",{src:_.src,"aria-label":_.alt,controls:!0,autoPlay:l,className:"x193iq5w xmz0i5r x19kjcj4 x1a2a7pz"}):o.jsx("img",{src:_.src,alt:_.alt,draggable:!1,...q(po.image,M&&po.imageDragging,Le!=null&&GI.imageTransform(Le))})}),_.caption&&o.jsx("div",{className:"x9e3rv5 x18juvz8 xf74fhv x2b8uid x1xye8es x18d9i69 xrrkdod xrlsmeg x2lah0s",children:_.caption})]}),I&&o.jsx("div",{className:"x10l6tqk xwa60dl x1cb1t30 x1vjfegm x1mcfs9z",children:o.jsx(kn,{icon:o.jsx("span",{...q(pl.mirror),children:o.jsx($e,{icon:"chevronRight",size:"sm",color:"inherit"})}),label:b("@astryx.lightbox.next"),variant:"ghost",isDisabled:!P,onClick:ve,xstyle:po.controlButton})}),I&&T.length>1&&o.jsxs("div",{className:"x10l6tqk xyx6v2t x1ybfrjj x9e3rv5 xjm74w1 xw6l6zx x1vjfegm",children:[$+1," / ",T.length]})]})}):null}A6.displayName="Lightbox";const Dn={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}},V1={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 VI(e){e.preventDefault()}function M6({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:g="accent",display:b="inline",maxLines:k=0,children:m,rel:y,xstyle:v,className:w,style:j,ref:C,...$}){const E=be(),N=a??E("@astryx.link.newTab"),S=Li(e),A=C4({href:n,onClick:c,isDisabled:r}),{target:z,rel:M}=x4(i?"_blank":l,y),L=A==="button"||A==="inert"&&n==null,R=o.jsxs(o.Fragment,{children:[o.jsx(se,{type:f,size:h,weight:p,color:g,display:b,maxLines:k,children:m}),i&&!L&&o.jsxs(o.Fragment,{children:[o.jsx($e,{icon:"externalLink",size:"xsm",color:"inherit"}),o.jsx(Oi,{children:N})]})]});let T;return L?T=o.jsx("button",{ref:C,type:"button",onClick:c,"aria-label":t||void 0,"aria-disabled":r||void 0,tabIndex:r?-1:void 0,disabled:r,...F(U("link",{color:g}),q(Dn.base,Dn.buttonReset,V1[g],s&&Dn.hasUnderline,d&&Dn.standalone,r&&Dn.disabled,v),w,j),...$,children:R}):r?T=o.jsx("a",{ref:C,onClick:VI,"aria-label":t||void 0,"aria-disabled":!0,tabIndex:-1,...F(U("link",{color:g}),q(Dn.base,V1[g],s&&Dn.hasUnderline,d&&Dn.standalone,Dn.disabled,v),w,j),...$,children:R}):T=o.jsx(S,{ref:C,href:n,target:z,rel:M,onClick:c,"aria-label":t||void 0,"aria-disabled":r||void 0,tabIndex:r?-1:void 0,...F(U("link",{color:g}),q(Dn.base,V1[g],s&&Dn.hasUnderline,d&&Dn.standalone,r&&Dn.disabled,v),w,j),...$,children:R}),u?o.jsx(Di,{content:u,placement:"above",children:T}):T}M6.displayName="Link";const WI={x1iwu4tg:"x1iwu4tg",$$css:!0},KI={sm:{kzqmXN:"x1td3qas",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"x100vrsf",kZKoxP:"xxk0z11",$$css:!0}},XI={sm:{kzqmXN:"x1td3qas",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"x100vrsf",kZKoxP:"xxk0z11",$$css:!0}},ZI={sm:{kzqmXN:"x1td3qas",kZKoxP:"x1qx5ct2",kmVPX3:"x1i3ajwb",$$css:!0},md:{kzqmXN:"x100vrsf",kZKoxP:"xxk0z11",kmVPX3:"xfawy5m",$$css:!0}},YI={sm:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",k3aq6I:"xbryuvx",$$css:!0},md:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",k3aq6I:"xbryuvx",$$css:!0}},QI={sm:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",k3aq6I:"xv5t66b xi9aj42",$$css:!0},md:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",k3aq6I:"x15481yp x12xz5k6",$$css:!0}},JI={sm:{kAzted:"xisnujt",$$css:!0},md:{kAzted:"xjwf9q1",$$css:!0}},nn={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}},eO={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function R6({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:g,labelTooltip:b,labelPosition:k="end",labelSpacing:m="hug",status:y,size:v="md",width:w,xstyle:j,className:C,style:$,ref:E,...N}){const S=x.useId(),A=x.useId(),z=x.useId(),[,M]=x.useTransition(),[L,R]=x.useOptimistic(a),T=i||L!==a,I=L===!0,_=l&&!!u,O=js({placement:"above",focusTrigger:"always",isEnabled:_}),D=[];n&&D.push(A),y!=null&&y.message&&D.push(z),_&&D.push(O.describedBy);const B=D.length>0?D.join(" "):void 0,P=o.jsxs("div",{...q(nn.switchWrapper,KI[v]),children:[o.jsx("input",{ref:rt(E,O.positionRef),id:S,type:"checkbox",role:"switch",name:l?void 0:c,checked:I,disabled:l&&!_,"aria-disabled":_?"true":void 0,required:f,onChange:Y=>{if(l||T)return;const Z=Y.target.checked;s==null||s(Z,Y),r&&!Y.defaultPrevented&&M(async()=>{R(Z),await r(Z,Y)})},onFocus:h,onBlur:p,"aria-describedby":B,"aria-invalid":(y==null?void 0:y.type)==="error"?!0:void 0,"aria-busy":T||void 0,...q(nn.input,XI[v],l&&nn.inputDisabled,T&&nn.inputBusy)}),o.jsx("div",{"aria-hidden":"true",...F(U("switch",{checked:I?"checked":null,disabled:l?"disabled":null,size:v}),q(nn.track,ZI[v],I?nn.trackOn:nn.trackOff,!l&&nn.trackFocus,l&&nn.trackDisabled,l&&!I&&nn.trackDisabledOff)),children:o.jsx("div",{...F(U("switch-thumb",{checked:I?"checked":null,size:v}),q(nn.thumb,I?QI[v]:YI[v],I?nn.thumbOn:nn.thumbOff)),children:T&&o.jsx(on,{size:"sm"})})}),T&&o.jsx(Oi,{role:"status",children:"Loading"})]}),V=o.jsx("div",{...q(nn.labelWrapper,JI[v]),children:o.jsx(mx,{label:e,inputID:S,isLabelHidden:t,isDisabled:l,isOptional:d,isRequired:f,labelIcon:g,labelTooltip:b,description:n,descriptionID:A})});return o.jsxs("div",{...F(U("switch-field",{labelPosition:k!=="end"?k:void 0,labelSpacing:m!=="hug"?m:void 0}),q(w!=null&&eO.width(w),j),C,$),...N,children:[o.jsxs("div",{ref:Y=>{O.interactionRef(Y)},...q(nn.container,m==="spread"&&nn.containerSpread,!l&&WI),children:[" ",k==="start"?o.jsxs(o.Fragment,{children:[V,P]}):o.jsxs(o.Fragment,{children:[P,V]})]}),(y==null?void 0:y.message)&&o.jsx("div",{className:"xtbrsbv",children:o.jsx(yx,{type:y.type,message:y.message,id:z,variant:"detached"})}),_&&O.renderTooltip(u)]})}R6.displayName="Switch";const ky=x.createContext(null);ky.displayName="SegmentedControlContext";function tO(){const e=x.use(ky);if(e==null)throw new Error("useSegmentedControlContext must be used within SegmentedControl. Wrap your SegmentedControlItem in <SegmentedControl>.");return e}const Ed={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}},nO={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 _6({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:g,...b}){const k=Ka(r,"md"),m=a&&!!l,y=js({placement:"above",focusTrigger:"always",isEnabled:m}),{listRef:v,handleKeyDown:w,handleFocus:j}=Xa({itemSelector:'[role="radio"]:not([aria-disabled="true"])',hasRovingTabIndex:!0,wrap:!0,orientation:"horizontal"}),C=v4({orientation:"horizontal",isEnabled:!a}),$=x.useCallback(S=>{h==null||h(S),!S.defaultPrevented&&(C.onKeyDown(S),w(S))},[h,C,w]),E=x.useCallback(S=>{var M;if(p==null||p(S),S.defaultPrevented||(C.onFocus(S),j(S),a)||!S.currentTarget.contains(S.relatedTarget))return;const A=(M=S.target)==null?void 0:M.closest('[role="radio"][data-value]');if(!A||A.getAttribute("aria-disabled")==="true")return;const z=A.dataset.value;z!=null&&z!==t&&n(z)},[p,C,j,a,n,t]),N=x.useMemo(()=>({value:t,onChange:n,size:k,layout:i,isDisabled:a,hasDisabledMessage:m}),[t,n,k,i,a,m]);return o.jsxs(ky,{value:N,children:[o.jsxs("div",{ref:rt(e,v,y.ref),...b,role:"radiogroup","aria-label":s,"aria-disabled":a||void 0,"aria-describedby":m?y.describedBy:void 0,onKeyDown:$,onFocus:E,onBlur:ox(g,C.onBlur),...F(U("segmented-control",{size:k}),q(Ed.container,nO[k],i==="fill"&&Ed.fill,a&&(m?Ed.disabledWithMessage:Ed.disabled),u),d,f),children:[c,C.hintElement]}),m&&y.renderTooltip(l)]})}_6.displayName="SegmentedControl";const go={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}},sO={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}},rO={sm:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",$$css:!0},md:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",$$css:!0},lg:{kzqmXN:"x1xp8n7a",kZKoxP:"xmix8c7",$$css:!0}};function gg({ref:e,value:t,label:n,isLabelHidden:s=!1,icon:r,isDisabled:i=!1,onClick:a,xstyle:l,...c}){const u=tO(),d=u.value===t,f=i||u.isDisabled,h=d&&(u.hasDisabledMessage??!1)&&!i,p=u.size,g=u.layout==="fill",b=ox(a,()=>{!f&&!d&&u.onChange(t)}),k=r?o.jsx("span",{...q(go.icon,rO[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,...F(U("segmented-control-item",{size:p,selected:d?"selected":null,disabled:f?"disabled":null}),q(go.base,sO[p],g&&go.fill,d&&go.selected,!d&&!f&&go.hover,f&&go.disabled,l)),children:[k,!s&&o.jsx("span",{children:n})]})}gg.displayName="SegmentedControlItem";const by=x.createContext(null);by.displayName="TabListContext";function iO(){const e=x.use(by);if(e==null)throw new Error("useTabListContext must be used within TabList. Wrap your Tab/TabMenu in <TabList>.");return e}const aO="[data-tab-value],[data-tab-menu]",W1={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 I6({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":g,[Qf]:b,...k}){const m=be(),y=p??m("@astryx.tabList.label"),v=Ka(s,"md"),{listRef:w,handleKeyDown:j,handleFocus:C}=Xa({itemSelector:aO,orientation:"both",hasRovingTabIndex:!0}),{hintElement:$,onKeyDown:E,onFocus:N,onBlur:S}=v4(),A=x.useMemo(()=>({value:t,onChange:n,size:v,layout:r}),[t,n,v,r]),z=x.useCallback(R=>{d==null||d(R),!R.defaultPrevented&&(E(R),j(R))},[d,E,j]),M=x.useCallback(R=>{f==null||f(R),!R.defaultPrevented&&(N(R),C(R))},[f,N,C]),L=x.useCallback(R=>{h==null||h(R),!R.defaultPrevented&&S(R)},[h,S]);return o.jsx(by,{value:A,children:o.jsxs("nav",{ref:rt(e,w),...k,"aria-label":y,onKeyDown:z,onFocus:M,onBlur:L,[Qf]:"",...F(U("tab-list",{size:v}),q(W1.nav,r==="fill"&&W1.fill,i&&W1.divider,a),l,c),children:[u,$]})})}I6.displayName="TabList";const oO={x1u3b27q:"x1u3b27q",$$css:!0},Nd={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}},lO={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},cO={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},uO={fill:{kUk6DE:"x98rzlu",kjj79g:"xl56j7k",$$css:!0}},dO={sm:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",$$css:!0},md:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",$$css:!0},lg:{kzqmXN:"x1xp8n7a",kZKoxP:"xmix8c7",$$css:!0}};function mg({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=iO(),g=Li(e),b=p.value===n,k=p.size,m=p.layout==="fill",y=b&&l?l:a,v=!r&&s!=="",w=x.useCallback(()=>{p.onChange(n)},[p,n]),j=y?o.jsx("span",{...q(Nd.icon,dO[k]),children:y}):null,C={...h,...r?{"aria-label":s}:{},[Qf]:"","data-tab-value":n,"aria-current":b?"page":void 0,tabIndex:b?0:-1,...F(U("tab",{selected:b?"selected":null}),q(Nd.base,lO[k],b&&Nd.selected,m&&uO.fill,oO,u),d,f)},$=o.jsx("span",{"aria-hidden":"true",...q(Nd.hoverBg,cO[k])}),E=o.jsx("span",{...F(U("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])}),N=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(g,{ref:t,href:i,onClick:w,...C,children:[$,j,N,S,E]}):o.jsxs("button",{ref:t,type:"button",onClick:w,...C,children:[$,j,N,S,E]})}mg.displayName="Tab";const fO=.8,Xi={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}},hO={sm:{$$css:!0},md:{$$css:!0},lg:{k8WAf4:"xce4md1",$$css:!0}};function O6({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:g="attached",labelTooltip:b,startIcon:k,hasSpellCheck:m=!0,onPaste:y,maxLength:v,hasAutoFocus:w=!1,size:j,htmlName:C,onFocus:$,onBlur:E,width:N,xstyle:S,className:A,style:z,ref:M,...L}){const R=Ka(j,"md"),T=be(),I=Pl(),_=x.useId(),O=x.useId(),D=x.useId(),B=x.useId(),P=x.useRef(null),V=x.useRef(null),Y=x.useRef(null),[,Z]=x.useTransition(),[te,J]=x.useOptimistic(c),K=l||te!==c,re=f&&!!h,le=js({placement:"above",focusTrigger:"always",isEnabled:re}),{statusIcon:ve,describedBy:ge}=S4({status:p,statusVariant:g}),xe=[n?O:null,g!=="tooltip"&&(p!=null&&p.message)?D:null,ge,v!=null?B:null,re?le.describedBy:null].filter(Boolean).join(" ")||void 0,ce=x.useCallback(Le=>{if(v==null)return;const ie=Le>v?"over":Le>=v*fO?"near":"under";ie!==Y.current&&(Y.current=ie,ie==="over"?I(T("@astryx.textArea.charactersOverLimit",{count:Le-v}),"assertive"):ie==="near"&&I(T("@astryx.textArea.charactersRemaining",{count:v-Le})))},[I,T,v]),Q=Le=>{if(f)return;const ie=Le.target.value;ce(ie.length),i==null||i(ie,Le),a&&!Le.defaultPrevented&&Z(async()=>{J(ie),await a(ie,Le)})},ye=f||K,{onClick:ue,onMouseUp:pe}=U0({containerRef:V,inputRef:P,disabled:ye});return o.jsxs(Ul,{label:e,isLabelHidden:t,description:n,inputID:_,descriptionID:n?O:void 0,isOptional:s,isRequired:r,isDisabled:f,status:p?{type:p.type,message:p.message,messageID:p.message?D:void 0}:void 0,statusVariant:g,labelTooltip:b,width:N,children:[o.jsxs("div",{ref:Le=>{V.current=Le,le.ref(Le)},onClick:ue,onMouseUp:pe,...F(U("textarea",{size:R,status:(p==null?void 0:p.type)??null}),q(gl.base,Xi.wrapper,f&&gl.disabled,p&&J0[p.type],p&&!f&&ey[p.type],p&&U4[p.type],S),A,z),children:[k&&o.jsx("span",{className:"x10l6tqk xctzyg x1kiyvbf x47corl x78zum5",children:Hs(k,{size:"sm",color:"secondary"})}),o.jsx("textarea",{...L,ref:rt(M,P),id:_,name:C,value:te,onChange:Q,onPaste:y,onFocus:$,onBlur:E,placeholder:u,rows:d,disabled:f&&!re,"aria-disabled":re?"true":void 0,readOnly:re||void 0,spellCheck:m,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&&te.length>v?"true":void 0,"aria-busy":K||void 0,...q(Xi.textarea,hO[R],f&&Xi.textareaDisabled,!!k&&Xi.textareaWithStartIcon,(p||K)&&Xi.textareaWithStatus,K&&!!ve&&Xi.textareaWithBusyStatus,v!=null&&Xi.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:B,...{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"}}[(te.length>v)<<0],children:[te.length>v&&o.jsx($e,{icon:"warning",size:"sm"}),te.length,"/",v]})]}),re&&le.renderTooltip(h)]})}O6.displayName="TextArea";function L6({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}=B0({containerRef:d,interactiveRef:f,href:t,disabled:n});return o.jsxs("span",{ref:rt(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]})}L6.displayName="TokenLink";const Bn={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}},Td={sm:{kZKoxP:"xzydfjl",kGuDYH:"x141an7d",kg3NbH:"xf314gf",$$css:!0},md:{kZKoxP:"xrmxcn7",kg3NbH:"xf314gf",$$css:!0},lg:{kZKoxP:"x102lyln",kg3NbH:"xf314gf",$$css:!0}},zd={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 Nn({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":g,ref:b}){const k=be(),m=Li(),y=C4({href:l,onClick:a,isDisabled:r}),v=a??(y==="button"?()=>{}:null),w=i!=null&&o.jsx("button",{type:"button","aria-label":k("@astryx.token.remove",{label:e}),onClick:$=>{$.stopPropagation(),i($)},disabled:r,className:"x3nfvp2 x6s0dn4 xl56j7k x1n2onr6 x1717udv xkd40ry x1ypdohk xjspbzw x1kky2od xlup9mm x1heor9g x17nn4n9 x1s928wv x1j6awrg x1xsm0q9",children:o.jsx($e,{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]}),C={"data-testid":g,"aria-label":d?e:void 0,"aria-description":c};if(y==="link")return i==null?o.jsx(m,{ref:b,href:l,"aria-disabled":r||void 0,...C,...F(U("token",{color:n,size:t}),q(Bn.base,Td[t],zd[n],Bn.interactive,r&&Bn.disabled,f),h,p),children:j}):o.jsx(L6,{ref:b,href:l,isDisabled:r,LinkComponent:m,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}),...C,...F(U("token",{color:n,size:t}),q(Bn.base,Td[t],zd[n],Bn.interactive,Bn.focusVisibleOutline,r&&Bn.disabled,f),h,p)});if(v!=null){const $=E=>{E.target.closest("button, a")||v(E)};return o.jsxs("span",{ref:b,onClick:r?void 0:$,...C,...F(U("token",{color:n,size:t}),q(Bn.base,Td[t],zd[n],Bn.interactive,Bn.focusVisibleOutline,r&&Bn.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,...C,...F(U("token",{color:n,size:t}),q(Bn.base,Td[t],zd[n],r&&Bn.disabled,f),h,p),children:j})}Nn.displayName="Token";const xO=1e3,pO=100,Iv={root:{kWkggS:"xprdx6m x1j0df82 x1o55y2u",kSiTet:"xvpkmg4 x1tbh5bv",$$css:!0},animate:{kILWW9:"xpz12be",k44tkh:"xqgcaz",ko0y90:"xa4qsjk",kKVMdj:"xeuoslp x1aquc0h",kyAemX:"x193epu2",$$css:!0}},gO={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}},mO={kKxzle:"xvo38ju",$$css:!0},Ov={animationDelay:e=>[mO,{"--x-animationDelay":(t=>typeof t=="number"?t+"ms":t??void 0)(`${xO+pO*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 D6({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,...F(U("skeleton"),q(Iv.root,Iv.animate,gO[n],Ov.dimensions(e,t),Ov.animationDelay(s),i),a,l),...u})}D6.displayName="Skeleton";const K1={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 yO(){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 ih({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 g=be(),[b,k]=x.useState(void 0),m=e!=null,y=m&&b===e,v=i&&!m,w=m&&!v&&!y,j=i&&m,C=!i&&!m||y,$=r!=null&&!a&&!i,E=s!=null&&!a,N=E&&l==="hover",{getContainerProps:S,getContentRevealProps:A}=FA({isEnabled:N}),z=n&&t?`${n} — ${t}`:n??t??g("@astryx.thumbnail.fallbackName"),M=!t,L=t!=null||n!=null||p["aria-label"]!=null||p["aria-labelledby"]!=null;Bl("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.',m&&!L);const R=o.jsxs(o.Fragment,{children:[w&&o.jsx("img",{src:e,alt:t??"",role:M?"presentation":void 0,"aria-hidden":M||void 0,onError:()=>k(e),className:"xh8yej3 x5yr21d xl1xv1r x1lliihq"}),v&&o.jsx(D6,{radius:2}),C&&o.jsx("div",{className:"x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d xv9yike",children:o.jsx(yO,{})})]}),T=E?o.jsx("div",{...F({className:"x10l6tqk x8d4r5l xy3asu9 x1vjfegm x14ju556"},N?A({isLayoutPreserved:!0}):{}),children:o.jsx(ne,{icon:o.jsx($e,{icon:"close",size:"xsm"}),label:g("@astryx.thumbnail.remove",{accessibleName:z}),variant:"secondary",size:"sm",isIconOnly:!0,onClick:_=>{_.stopPropagation(),s(_)},xstyle:K1.removeButtonOverrides})}):null,I=o.jsx("div",{ref:h,"data-testid":f,role:"group","aria-label":z,...F(U("thumbnail"),q(K1.root,a&&K1.disabled,c),u,d),...p,children:o.jsxs("div",{...F({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"}}[!!$<<2|!!$<<1|!!$<<0],N?S():{}),children:[$?o.jsx("button",{type:"button",onClick:r,"aria-label":g("@astryx.thumbnail.open",{accessibleName:z}),className:"x1ypdohk x1lliihq xh8yej3 x5yr21d xh6dtrn xb3r6kr",children:R}):R,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"})}),T]})});return n!=null?o.jsx(Di,{content:n,children:I}):I}ih.displayName="Thumbnail";const fc={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)}]},kO="@astryx.dropdownMenu.label";function Ya({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(),g=e??{label:p(kO)},b=("items"in h?h.items:void 0)??[],k=h.children,{items:m,children:y,...v}=h,w=x.useId(),j=g.size??"md",C=x.useRef(null),[$,E]=x.useState(!1),N=t!==void 0,S=N?t:$,A=x.useRef(0),z=x.useCallback(()=>{var ce;A.current=Date.now(),n==null||n(!1),N||E(!1),(ce=C.current)==null||ce.focus()},[N,n]),M=x.useRef(!1),L=x.useCallback(()=>{n==null||n(!0),N||E(!0)},[N,n]),R=ql({onHide:z,onShow:L,hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"}),T=x.useCallback(()=>{R.hide()},[R]),{listRef:I,handleKeyDown:_,focusFirst:O,focusItem:D,ownsEvent:B,getItems:P}=Xa({itemSelector:xx,boundarySelector:px,wrap:!1,onEscape:T}),V=hx({getItemLabels:()=>P().map(ce=>ce.textContent),onMatch:D,getCurrentIndex:()=>P().findIndex(ce=>ce===document.activeElement||ce.contains(document.activeElement))});x.useEffect(()=>{N&&(t&&!R.isOpen?(M.current=!0,R.show()):!t&&R.isOpen&&R.hide())},[t,N,R]),x.useEffect(()=>{!R.isOpen||!M.current||(M.current=!1,requestAnimationFrame(()=>O()))},[R.isOpen,O]);const Y=x.useCallback(ce=>{if(B(ce)){if(ce.key==="Enter"||ce.key===" "){ce.preventDefault();const Q=document.activeElement;Q&&Bu.has(Q.getAttribute("role")??"")&&Q.click();return}if(ce.key==="Tab"){T();return}if(V.onKeyDown(ce)){ce.preventDefault();return}_(ce)}},[_,T,V,B]),Z=x.useCallback(()=>{M.current=!0,R.show()},[R]),te=x.useCallback(()=>{Date.now()-A.current<50||(r==null||r(),N?n==null||n(!t):R.isOpen?R.hide():Z())},[r,N,n,t,R,Z]),J=x.useCallback(ce=>{R.isOpen||(ce.key==="ArrowDown"||ce.key==="Enter"||ce.key===" ")&&(ce.preventDefault(),Z())},[R.isOpen,Z]),K=g.isIconOnly===!0,re=g.endContent??(i&&!K?o.jsx($e,{icon:"chevronDown",size:"sm",color:"inherit"}):void 0),le=s?fc.popoverCustomWidth(s):fc.popover,ve=a==="above"||a==="below"?fc.popoverBlockGap:fc.popoverInlineGap,ge=x.useMemo(()=>({closeMenu:T,menuSize:j}),[T,j]),xe=h.items!==void 0?gx(b):k;return o.jsxs(o.Fragment,{children:[o.jsx(ne,{...g,ref:ce=>{C.current=ce,R.triggerRef(ce);const Q=g.ref;typeof Q=="function"?Q(ce):Q&&(Q.current=ce)},tooltip:S?void 0:g.tooltip,endContent:re,onClick:te,onKeyDown:J,"aria-haspopup":"menu","aria-expanded":S,"aria-controls":w,"data-testid":f}),R.render(o.jsx("div",{...v,ref:I,id:w,role:"menu","aria-label":g.label,onKeyDown:Y,...F(U("dropdown-menu"),q(fc.dropdown,d),c,u),children:o.jsx(Hl,{value:ge,children:xe})}),{placement:a,alignment:l,xstyle:[le,ve,or[a]]})]})}Ya.displayName="DropdownMenu";function Cx({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(),g=t??p("@astryx.moreMenu.label"),b=Ka(s,"md"),k=Aa("moreHorizontal");return o.jsx(Ya,{className:u?`${Yp("more-menu")} ${u}`:Yp("more-menu"),xstyle:c,style:d,isMenuOpen:a,onOpenChange:l,button:{label:g,icon:r??k,variant:n,size:b,isDisabled:i,tooltip:g,isIconOnly:!0,ref:h},items:e,hasChevron:!1,"data-testid":f})}Cx.displayName="MoreMenu";const pr={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}},bO={kzqmXN:"xn9wirt",ks0D6T:"xf68679",$$css:!0},vO={width:e=>[bO,{"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(`${e}px`)}]};function vy({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 g=be(),b=fx(),k=e??b.isMobileNavOpen,m=x.useId(),y=b.mobileNavId||m,v=x.useMemo(()=>t??(A=>{A?b.openMobileNav():b.closeMobileNav()}),[t,b]),w=x.useRef(null),j=x.useRef(null),[C,$]=x.useState(i==="auto"?"end":i);x.useEffect(()=>{const A=w.current;if(A){if(j.current&&(clearTimeout(j.current),j.current=null),k){if(i==="auto"){const z=document.activeElement;if(z&&z!==document.body){const M=z.getBoundingClientRect(),L=M.left+M.width/2;$(L<window.innerWidth/2?"start":"end")}}else $(i);A.open||A.showModal(),document.documentElement.style.overflow="clip"}else if(A.open){document.documentElement.style.overflow="";const z=window.matchMedia("(prefers-reduced-motion: reduce)").matches?10:250;j.current=setTimeout(()=>{A.close()},z)}return()=>{j.current&&(clearTimeout(j.current),j.current=null),document.documentElement.style.overflow="",A.open&&A.close()}}},[k,i]);const E=x.useCallback(A=>{A.preventDefault(),v(!1)},[v]),N=x.useCallback(A=>{A.target===A.currentTarget&&v(!1)},[v]),S=C==="start";return o.jsx("dialog",{ref:rt(h,w),id:y,...F(U("mobile-nav",{side:C}),q(pr.dialog,k&&pr.open,pr.backdrop,k&&pr.backdropOpen,c),u,d),...p,"data-testid":l,"aria-label":a??(typeof s=="string"?s:g("@astryx.mobileNav.navigation")),onClick:ox(f,N),onCancel:E,children:o.jsxs("div",{tabIndex:-1,...q(pr.drawer,vO.width(r),S&&pr.drawerStart,S&&k&&pr.drawerStartOpen,!S&&pr.drawerEnd,!S&&k&&pr.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(Ur,{level:2,children:s})}):s??null,o.jsx(ne,{variant:"ghost",label:g("@astryx.mobileNav.closeNavigation"),icon:o.jsx($e,{icon:"close",color:"inherit"}),onClick:()=>v(!1),isIconOnly:!0})]}),o.jsx("div",{className:"x98rzlu x1odjw0f x6ikm8r xish69e xx69xxh xf314gf xce4md1",children:n})]})})}vy.displayName="MobileNav";const Qr={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}},$x=x.createContext({isCollapsed:!1,toggle:()=>{},isCollapsible:!1});$x.displayName="SideNavCollapseContext";function wy(){return x.use($x)}function B6({ref:e,handleRef:t,label:n,children:s,onClick:r,...i}){const a=be(),l=Aa("chevronLeft"),{isCollapsed:c,toggle:u,isCollapsible:d}=wO(t),{isMobile:f}=fx();return!d||f?null:o.jsx(ne,{ref:e,label:n??a(c?"@astryx.sideNavCollapseButton.expandSidebar":"@astryx.sideNavCollapseButton.collapseSidebar"),variant:"ghost",...i,onClick:ox(r,u),icon:s??o.jsx("span",{...q(pl.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 wO(e){var s;const t=wy();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 jO=160,X1={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 jy({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 g=be(),b=typeof i=="object"?i:{},k=!!i,m=b.hasButton??!0,y=b.defaultIsCollapsed??!1,v=b.isCollapsed,w=b.onCollapsedChange,j=typeof a=="object"?a:{},C=!!a,$=v!==void 0,[E,N]=x.useState(y),S=$?v:E,A=x.useRef(null),z=x.useRef({isCollapsed:S,toggle:()=>{},isCollapsible:k}),M=x.useCallback(te=>{$||N(te),w==null||w(te)},[$,w]),L=z6({defaultSize:j.defaultWidth??260,minSizePx:j.minWidth??180,maxSizePx:j.maxWidth??480,collapsible:k,collapsedSize:jO,autoSaveId:j.autoSaveId,onSizeChange:j.onWidthChange,onCollapseChange:k?M:void 0}),R=x.useCallback(()=>{const te=!S;z.current={...z.current,isCollapsed:te},M(te),C&&(te?L.collapse():L.expand())},[S,M,C,L]),T=C&&!S;z.current={isCollapsed:S,toggle:R,isCollapsible:k};const I={isCollapsed:S,toggle:R,isCollapsible:k};x.useImperativeHandle(h,()=>({getCollapseState:()=>z.current}),[]);const _=l4();if(_==="topbar")return o.jsxs("div",{"data-testid":d,...F(U("side-nav",{mode:"topbar"}),q(X1.topbar,l),c,u),children:[e,o.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw xvc5jky",children:r})]});const O=!!(s||r);if(_==="drawer")return o.jsxs(vy,{header:e,"data-testid":d,children:[t,n,O&&o.jsxs("div",{className:"x78zum5 xdt5ytf xr1yuqi x1txdalj x1xye8es",children:[s,r&&o.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:r})]})]});if(_==="drawer-content")return o.jsxs(o.Fragment,{children:[t,n,O&&o.jsxs("div",{className:"x78zum5 xdt5ytf xr1yuqi x1txdalj x1xye8es",children:[s,r&&o.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:r})]})]});const D=!!(e||t),B=!!(s||r),P=k&&m,V=C?{...u??{},width:S?void 0:L.size}:u,Y=o.jsxs("nav",{ref:rt(f,A),role:"navigation","aria-label":g("@astryx.sideNav.label"),"data-testid":d,...F(U("side-nav"),q(X1.root,S&&X1.rootCollapsed,l),c,V),...p,children:[D&&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|!!D<<1|!!B<<0],children:n}),(B||P)&&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:[P&&o.jsx(B6,{}),r]})]})]}),Z=T?o.jsxs("div",{className:"x1n2onr6 x78zum5 x2lah0s x5yr21d",children:[Y,o.jsx(yy,{"data-testid":"astryx-sidenav-resize-handle",direction:"horizontal",position:"overlay",pillPlacement:"end",isAlwaysVisible:!1,resizable:L.props,label:g("@astryx.sideNav.resizeSidebar")})]}):Y;return k?o.jsx($x,{value:I,children:Z}):Z}jy.displayName="SideNav";const mo={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}},SO={isCollapsed:!1,toggle:()=>{},isCollapsible:!1};function Z1({href:e,as:t,isDisabled:n,onClick:s,ref:r,children:i,...a}){const l=Li(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 Ls({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:g}){const b=be(),k=Aa("chevronDown"),{isCollapsed:m}=wy(),y=l4(),{closeMobileNav:v}=fx(),w=y==="drawer"||y==="drawer-content",j=x.useId(),C=!!u,$=x.useRef(null),E=ql({hasLightDismiss:!0,hasAutoFocus:!0,hasCloseButton:!1,dialogLabel:`${t} submenu`}),N=x.useMemo(()=>typeof d=="object"?d:{},[d]),S=C&&d!==!1,A=N.isCollapsed,z=A!==void 0,[M,L]=x.useState(N.defaultIsCollapsed??!1),R=z?A:M,T=x.useCallback(()=>{var ce;const xe=!R;z||L(xe),(ce=N.onCollapsedChange)==null||ce.call(N,xe)},[R,z,N]),I=r&&s?s:n,O=S&&(!!a||!!l)&&!m,D=xe=>{if(i){xe.preventDefault();return}if(S&&!O&&!m){xe.preventDefault(),T();return}l==null||l(xe),w&&v()},B=xe=>{xe.preventDefault(),xe.stopPropagation(),T()},P=x.useRef(null),V=x.useRef(null),Y=x.useCallback(()=>{P.current&&(clearTimeout(P.current),P.current=null),V.current&&(clearTimeout(V.current),V.current=null)},[]),Z=x.useCallback(()=>{Y(),P.current=setTimeout(()=>{E.show({skipAutoFocus:!0})},150)},[Y,E]),te=x.useCallback(()=>{Y(),V.current=setTimeout(()=>{E.hide()},200)},[Y,E]),J=x.useCallback(()=>{Z()},[Z]),K=x.useCallback(()=>{te()},[te]);if(m&&!n)return null;if(m){const xe=I&&Hs(I,{size:"sm",color:r?"primary":i?"disabled":"secondary"}),ce=F(U("side-nav-item",{size:f,selected:r?"selected":null}),q(Qr.item,Qr[f],mo.itemCollapsed,f==="sm"&&mo.itemCollapsedSm,f==="lg"&&mo.itemCollapsedLg,r&&Qr.selected,i&&Qr.disabled));if(C)return o.jsxs("div",{...q(mo.root,g),children:[o.jsx("button",{ref:rt(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($x,{value:SO,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(Z1,{ref:p,href:a,as:e,isDisabled:i,onClick:D,...Q,...ce,children:xe});return o.jsxs("div",{ref:$,...q(mo.root,g),children:[ye,o.jsx(Di,{content:t,placement:"end",anchorRef:$})]})}const re=o.jsxs(o.Fragment,{children:[I&&Hs(I,{size:"sm",color:r?"primary":i?"disabled":"secondary"}),!m&&o.jsx("span",{className:"x98rzlu xeuugli xb3r6kr xlyipyv xuxw1ft",children:t}),!m&&c&&o.jsx("span",{className:"x2lah0s x78zum5 x6s0dn4",children:c}),!m&&S&&!O&&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"}}[!R<<0],children:k})]}),le=F(U("side-nav-item",{size:f,selected:r?"selected":null}),q(Qr.item,Qr[f],r&&Qr.selected,i&&Qr.disabled));let ve;if(O)ve=o.jsxs("div",{"data-testid":h,...le,children:[o.jsx(Z1,{ref:p,href:a,as:e,isDisabled:i,onClick:D,"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:re}),o.jsx("button",{type:"button",onClick:B,"aria-label":R?b("@astryx.sideNavItem.expand",{label:t}):b("@astryx.sideNavItem.collapse",{label:t}),"aria-expanded":!R,"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"}}[!R<<0],children:k})})]});else{const xe={"aria-current":r?"page":void 0,"aria-disabled":i||void 0,"aria-expanded":S?!R:void 0,"aria-controls":S?`${j}-children`:void 0,"data-testid":h};ve=o.jsx(Z1,{ref:p,href:a,as:e,isDisabled:i,onClick:D,...xe,...le,children:re})}return o.jsxs("div",{ref:$,...q(mo.root,g),children:[ve,C&&!m&&o.jsx("div",{id:`${j}-children`,role:"group","aria-labelledby":`${j}-label`,"aria-hidden":R,inert:R?!0:void 0,...{0:{className:"xrvj5dj x1tu4anv x1qn9uv2 x80gvsz xlr8y92"},1:{className:"xrvj5dj x1qn9uv2 x80gvsz xlr8y92 xihq33y"}}[!!R<<0],children:o.jsxs("div",{className:"xb3r6kr x2lwn1j x31w388",children:[o.jsx("span",{id:`${j}-label`,hidden:!0,children:t}),u]})})]})}Ls.displayName="SideNavItem";const CO={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",k8WAf4:"xu0wf1k",$$css:!0}};function hf({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}=wy(),p=`${x.useId()}-title`,g=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,k=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,...F(U("side-nav-section"),q(CO.root,a),l,c),...d,role:"group","aria-labelledby":p,"data-testid":u,children:[o.jsx("div",{...F({className:"x78zum5 x6s0dn4 x1txdalj xf314gf xu0wf1k xt0e3qv x87ps6o"},{style:b?k:void 0}),children:g}),o.jsx("div",{className:"x78zum5 xdt5ytf x1lsbc85",children:s})]})}hf.displayName="SideNavSection";var q6={exports:{}},Ex={},H6={exports:{}},P6={};/**
|
|
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(T,I){var _=T.length;T.push(I);e:for(;0<_;){var O=_-1>>>1,D=T[O];if(0<r(D,I))T[O]=I,T[_]=D,_=O;else break e}}function n(T){return T.length===0?null:T[0]}function s(T){if(T.length===0)return null;var I=T[0],_=T.pop();if(_!==I){T[0]=_;e:for(var O=0,D=T.length,B=D>>>1;O<B;){var P=2*(O+1)-1,V=T[P],Y=P+1,Z=T[Y];if(0>r(V,_))Y<D&&0>r(Z,V)?(T[O]=Z,T[Y]=_,O=Y):(T[O]=V,T[P]=_,O=P);else if(Y<D&&0>r(Z,_))T[O]=Z,T[Y]=_,O=Y;else break e}}return I}function r(T,I){var _=T.sortIndex-I.sortIndex;return _!==0?_:T.id-I.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,g=!1,b=!1,k=!1,m=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;function w(T){for(var I=n(u);I!==null;){if(I.callback===null)s(u);else if(I.startTime<=T)s(u),I.sortIndex=I.expirationTime,t(c,I);else break;I=n(u)}}function j(T){if(b=!1,w(T),!g)if(n(c)!==null)g=!0,C||(C=!0,z());else{var I=n(u);I!==null&&R(j,I.startTime-T)}}var C=!1,$=-1,E=5,N=-1;function S(){return k?!0:!(e.unstable_now()-N<E)}function A(){if(k=!1,C){var T=e.unstable_now();N=T;var I=!0;try{e:{g=!1,b&&(b=!1,y($),$=-1),p=!0;var _=h;try{t:{for(w(T),f=n(c);f!==null&&!(f.expirationTime>T&&S());){var O=f.callback;if(typeof O=="function"){f.callback=null,h=f.priorityLevel;var D=O(f.expirationTime<=T);if(T=e.unstable_now(),typeof D=="function"){f.callback=D,w(T),I=!0;break t}f===n(c)&&s(c),w(T)}else s(c);f=n(c)}if(f!==null)I=!0;else{var B=n(u);B!==null&&R(j,B.startTime-T),I=!1}}break e}finally{f=null,h=_,p=!1}I=void 0}}finally{I?z():C=!1}}}var z;if(typeof v=="function")z=function(){v(A)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,L=M.port2;M.port1.onmessage=A,z=function(){L.postMessage(null)}}else z=function(){m(A,0)};function R(T,I){$=m(function(){T(e.unstable_now())},I)}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(T){T.callback=null},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_next=function(T){switch(h){case 1:case 2:case 3:var I=3;break;default:I=h}var _=h;h=I;try{return T()}finally{h=_}},e.unstable_requestPaint=function(){k=!0},e.unstable_runWithPriority=function(T,I){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var _=h;h=T;try{return I()}finally{h=_}},e.unstable_scheduleCallback=function(T,I,_){var O=e.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?O+_:O):_=O,T){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=_+D,T={id:d++,callback:I,priorityLevel:T,startTime:_,expirationTime:D,sortIndex:-1},_>O?(T.sortIndex=_,t(u,T),n(c)===null&&T===n(u)&&(b?(y($),$=-1):b=!0,R(j,_-O))):(T.sortIndex=D,t(c,T),g||p||(g=!0,C||(C=!0,z()))),T},e.unstable_shouldYield=S,e.unstable_wrapCallback=function(T){var I=h;return function(){var _=h;h=I;try{return T.apply(this,arguments)}finally{h=_}}}})(P6);H6.exports=P6;var $O=H6.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 $t=$O,U6=x,EO=nu;function X(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 F6(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function qu(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 G6(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 V6(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 Lv(e){if(qu(e)!==e)throw Error(X(188))}function NO(e){var t=e.alternate;if(!t){if(t=qu(e),t===null)throw Error(X(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 Lv(r),e;if(i===s)return Lv(r),t;i=i.sibling}throw Error(X(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(X(189))}}if(n.alternate!==s)throw Error(X(190))}if(n.tag!==3)throw Error(X(188));return n.stateNode.current===n?e:t}function W6(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=W6(e),t!==null)return t;e=e.sibling}return null}function zn(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)&&zn(e.child,t,n,s,r,i))return!0;e=e.sibling}return!1}function Qa(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 Dv(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 K6(e){var t=[null,null],n=Qa(e);return n===null||X6(t,e,n.child,{foundSelf:!1}),t}function X6(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)&&X6(e,t,n.child,s))return!0;n=n.sibling}return!1}function Ct(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(X(559))}}var No=null,yg=null;function TO(e,t,n){return e===n?!0:e===t?(No=e,!0):!1}function zO(e,t,n){return e===n?(yg=e,!1):e===t?(yg!==null&&(No=e),!0):!1}function Bv(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 kg(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 Ke=Object.assign,AO=Symbol.for("react.element"),Ad=Symbol.for("react.transitional.element"),Cc=Symbol.for("react.portal"),To=Symbol.for("react.fragment"),Z6=Symbol.for("react.strict_mode"),bg=Symbol.for("react.profiler"),Y6=Symbol.for("react.consumer"),sr=Symbol.for("react.context"),Sy=Symbol.for("react.forward_ref"),vg=Symbol.for("react.suspense"),wg=Symbol.for("react.suspense_list"),Cy=Symbol.for("react.memo"),ii=Symbol.for("react.lazy"),jg=Symbol.for("react.activity"),MO=Symbol.for("react.legacy_hidden"),RO=Symbol.for("react.memo_cache_sentinel"),Sg=Symbol.for("react.view_transition"),_O=Symbol.for("react.recoverable"),qv=Symbol.iterator;function hc(e){return e===null||typeof e!="object"?null:(e=qv&&e[qv]||e["@@iterator"],typeof e=="function"?e:null)}var IO=Symbol.for("react.client.reference");function Cg(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===IO?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case To:return"Fragment";case bg:return"Profiler";case Z6:return"StrictMode";case vg:return"Suspense";case wg:return"SuspenseList";case jg:return"Activity";case Sg:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case Cc:return"Portal";case sr:return e.displayName||"Context";case Y6:return(e._context.displayName||"Context")+".Consumer";case Sy:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Cy:return t=e.displayName||null,t!==null?t:Cg(e.type)||"Memo";case ii:t=e._payload,e=e._init;try{return Cg(e(t))}catch{}}return null}var $c=Array.isArray,me=U6.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Oe=EO.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ja={pending:!1,data:null,method:null,action:null},$g=[],zo=-1;function hr(e){return{current:e}}function Zt(e){0>zo||(e.current=$g[zo],$g[zo]=null,zo--)}function Qe(e,t){zo++,$g[zo]=e.current,e.current=t}var cr=hr(null),au=hr(null),yi=hr(null),ah=hr(null);function oh(e,t){switch(Qe(yi,t),Qe(au,e),Qe(cr,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?J2(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=J2(t),e=kS(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Zt(cr),Qe(cr,e)}function ml(){Zt(cr),Zt(au),Zt(yi)}function Eg(e){var t=e.memoizedState;t!==null&&(El._currentValue=t.memoizedState,Qe(ah,e)),t=cr.current;var n=kS(t,e.type);t!==n&&(Qe(au,e),Qe(cr,n))}function lh(e){au.current===e&&(Zt(cr),Zt(au)),ah.current===e&&(Zt(ah),El._currentValue=ja)}var Y1,Hv;function ni(e){if(Y1===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Y1=t&&t[1]||"",Hv=-1<n.stack.indexOf(`
|
|
183
|
-
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
184
|
-
`+Y1+e+Hv}var Q1=!1;function J1(e,t){if(!e||Q1)return"";Q1=!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(g){var h=g}Reflect.construct(e,[],f)}else{try{f.call()}catch(g){h=g}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(g){h=g}(f=e())&&typeof f.catch=="function"&&f.catch(function(){})}}catch(g){if(g&&h&&typeof g.stack=="string")return[g.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{Q1=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ni(n):""}function OO(e,t){switch(e.tag){case 26:case 27:case 5:return ni(e.type);case 16:return ni("Lazy");case 13:return e.child!==t&&t!==null?ni("Suspense Fallback"):ni("Suspense");case 19:return ni("SuspenseList");case 0:case 15:return J1(e.type,!1);case 11:return J1(e.type.render,!1);case 1:return J1(e.type,!0);case 31:return ni("Activity");case 30:return ni("ViewTransition");default:return""}}function Pv(e){try{var t="",n=null;do t+=OO(e,n),n=e,e=e.return;while(e);return t}catch(s){return`
|
|
188
|
-
Error generating stack: `+s.message+`
|
|
189
|
-
`+s.stack}}var Ng=Object.prototype.hasOwnProperty,$y=$t.unstable_scheduleCallback,ep=$t.unstable_cancelCallback,LO=$t.unstable_shouldYield,DO=$t.unstable_requestPaint,Zn=$t.unstable_now,BO=$t.unstable_getCurrentPriorityLevel,Q6=$t.unstable_ImmediatePriority,J6=$t.unstable_UserBlockingPriority,ch=$t.unstable_NormalPriority,qO=$t.unstable_LowPriority,ej=$t.unstable_IdlePriority,HO=$t.log,PO=$t.unstable_setDisableYieldValue,Hu=null,Yn=null;function di(e){if(typeof HO=="function"&&PO(e),Yn&&typeof Yn.setStrictMode=="function")try{Yn.setStrictMode(Hu,e)}catch{}}var Qn=Math.clz32?Math.clz32:GO,UO=Math.log,FO=Math.LN2;function GO(e){return e>>>=0,e===0?32:31-(UO(e)/FO|0)|0}var Md=256,Rd=262144,_d=4194304;function ta(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 Nx(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=ta(s):(a&=l,a!==0?r=ta(a):n||(n=l&~e,n!==0&&(r=ta(n))))):(l=s&~i,l!==0?r=ta(l):a!==0?r=ta(a):n||(n=s&~e,n!==0&&(r=ta(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 Pu(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tj(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-Qn(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 nj(){var e=_d;return _d<<=1,!(_d&62914560)&&(_d=4194304),e}function tp(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Uu(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-Qn(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&&sj(e,s,0),i!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=i&~(a&~t))}function sj(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Qn(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|n&261930}function rj(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var s=31-Qn(n),r=1<<s;r&t|e[s]&t&&(e[s]|=t),n&=~r}}function ij(e,t){var n=t&-t;return n=n&42?1:Ey(n),n&(e.suspendedLanes|t)?0:n}function Ey(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 Ny(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function aj(){var e=Oe.p;return e!==0?e:(e=window.event,e===void 0?32:qS(e.type))}function Uv(e,t){var n=Oe.p;try{return Oe.p=e,t()}finally{Oe.p=n}}var Fr=Math.random().toString(36).slice(2),Kt="__reactFiber$"+Fr,An="__reactProps$"+Fr,Fl="__reactContainer$"+Fr,Fv="__reactEvents$"+Fr,KO="__reactListeners$"+Fr,XO="__reactHandles$"+Fr,Gv="__reactResources$"+Fr,Fu="__reactMarker$"+Fr,uh="__reactLoad$"+Fr;function Tx(e){delete e[Kt],delete e[An],delete e[KO],delete e[XO]}function fa(e){var t;if(t=e[Kt])return t;for(var n=e.parentNode;n;){if(t=n[Fl]||n[Kt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ow(e);e!==null;){if(n=e[Kt])return n;e=ow(e)}return t}e=n,n=e.parentNode}return null}function Gl(e){if(e=e[Kt]||e[Fl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ec(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(X(33))}function Fo(e){var t=e[Gv];return t||(t=e[Gv]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ot(e){e[Fu]=!0}function oj(e){e[uh]=void 0}var lj=new Set,cj={};function Ja(e,t){yl(e,t),yl(e+"Capture",t)}function yl(e,t){for(cj[e]=t,e=0;e<t.length;e++)lj.add(t[e])}var ZO=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]*$"),Vv={},Wv={};function YO(e){return Ng.call(Wv,e)?!0:Ng.call(Vv,e)?!1:ZO.test(e)?Wv[e]=!0:(Vv[e]=!0,!1)}var _e=!1;function Kv(){var e=_e;return _e=!1,e}function xf(e,t,n){if(YO(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 Id(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 gr(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 Pn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function uj(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function QO(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 Tg(e){if(!e._valueTracker){var t=uj(e)?"checked":"value";e._valueTracker=QO(e,t,""+e[t])}}function dj(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),s="";return e&&(s=uj(e)?e.checked?"true":"false":e.value),e=s,e!==n?(t.setValue(e),!0):!1}var JO=/[\n"\\]/g;function gs(e){return e.replace(JO,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function zg(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=""+Pn(t)):e.value!==""+Pn(t)&&(e.value=""+Pn(t)):a!=="submit"&&a!=="reset"||e.removeAttribute("value"),t!=null?a==="number"&&e.value==t?np(e,Pn(e.value)):np(e,Pn(t)):n!=null?np(e,Pn(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=""+Pn(l):e.removeAttribute("name")}function fj(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)){Tg(e);return}n=n!=null?""+Pn(n):"",t=t!=null?""+Pn(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),Tg(e)}function np(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Go(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=""+Pn(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 hj(e,t,n){if(t!=null&&(t=""+Pn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Pn(n):""}function xj(e,t,n,s){if(t==null){if(s!=null){if(n!=null)throw Error(X(92));if($c(s)){if(1<s.length)throw Error(X(93));s=s[0]}n=s}n==null&&(n=""),t=n}n=Pn(t),e.defaultValue=n,s=e.textContent,s===n&&s!==""&&s!==null&&(e.value=s),Tg(e)}function kl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var eL=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 Xv(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||eL.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function pj(e,t,n){if(t!=null&&typeof t!="object")throw Error(X(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]="",_e=!0);for(var r in t)s=t[r],t.hasOwnProperty(r)&&n[r]!==s&&(Xv(e,r,s),_e=!0)}else for(var i in t)t.hasOwnProperty(i)&&Xv(e,i,t[i])}function Ty(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 tL=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"]]),nL=/^[\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 pf(e){return nL.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function rr(){}var Ag=null;function zy(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ao=null,Vo=null;function Zv(e){var t=Gl(e);if(t&&(e=t.stateNode)){var n=e[An]||null;e:switch(e=t.stateNode,t.type){case"input":if(zg(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="'+gs(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var s=n[t];if(s!==e&&s.form===e.form){var r=s[An]||null;if(!r)throw Error(X(90));zg(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&&dj(s)}break e;case"textarea":hj(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Go(e,!!n.multiple,t,!1)}}}var sp=!1;function gj(e,t,n){if(sp)return e(t,n);sp=!0;try{var s=e(t);return s}finally{if(sp=!1,(Ao!==null||Vo!==null)&&(Ux(),Ao&&(t=Ao,e=Vo,Vo=Ao=null,Zv(t),e)))for(t=0;t<e.length;t++)Zv(e[t])}}function ou(e,t){var n=e.stateNode;if(n===null)return null;var s=n[An]||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(X(231,t,typeof n));return n}var Ir=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mg=!1;if(Ir)try{var xc={};Object.defineProperty(xc,"passive",{get:function(){Mg=!0}}),window.addEventListener("test",xc,xc),window.removeEventListener("test",xc,xc)}catch{Mg=!1}var fi=null,Ay=null,gf=null;function mj(){if(gf)return gf;var e,t=Ay,n=t.length,s,r="value"in fi?fi.value:fi.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 gf=r.slice(e,1<s?1-s:void 0)}function mf(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 Od(){return!0}function Yv(){return!1}function wn(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)?Od:Yv,this.isPropagationStopped=Yv,this}return Ke(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=Od)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Od)},persist:function(){},isPersistent:Od}),t}var qi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zx=wn(qi),Gu=Ke({},qi,{view:0,detail:0}),sL=wn(Gu),rp,ip,pc,Ax=Ke({},Gu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:My,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!==pc&&(pc&&e.type==="mousemove"?(rp=e.screenX-pc.screenX,ip=e.screenY-pc.screenY):ip=rp=0,pc=e),rp)},movementY:function(e){return"movementY"in e?e.movementY:ip}}),Qv=wn(Ax),rL=Ke({},Ax,{dataTransfer:0}),iL=wn(rL),aL=Ke({},Gu,{relatedTarget:0}),ap=wn(aL),oL=Ke({},qi,{animationName:0,elapsedTime:0,pseudoElement:0}),lL=wn(oL),cL=Ke({},qi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),uL=wn(cL),dL=Ke({},qi,{data:0}),Jv=wn(dL),fL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hL={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"},xL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pL(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=xL[e])?!!t[e]:!1}function My(){return pL}var gL=Ke({},Gu,{key:function(e){if(e.key){var t=fL[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=mf(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hL[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:My,charCode:function(e){return e.type==="keypress"?mf(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?mf(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),mL=wn(gL),yL=Ke({},Ax,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),e2=wn(yL),kL=Ke({},qi,{submitter:0}),bL=wn(kL),vL=Ke({},Gu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:My}),wL=wn(vL),jL=Ke({},qi,{propertyName:0,elapsedTime:0,pseudoElement:0}),SL=wn(jL),CL=Ke({},Ax,{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}),$L=wn(CL),EL=Ke({},qi,{newState:0,oldState:0,source:0}),NL=wn(EL),TL=[9,13,27,32],Ry=Ir&&"CompositionEvent"in window,Ic=null;Ir&&"documentMode"in document&&(Ic=document.documentMode);var zL=Ir&&"TextEvent"in window&&!Ic,yj=Ir&&(!Ry||Ic&&8<Ic&&11>=Ic),t2=" ",n2=!1;function kj(e,t){switch(e){case"keyup":return TL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bj(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mo=!1;function AL(e,t){switch(e){case"compositionend":return bj(t);case"keypress":return t.which!==32?null:(n2=!0,t2);case"textInput":return e=t.data,e===t2&&n2?null:e;default:return null}}function ML(e,t){if(Mo)return e==="compositionend"||!Ry&&kj(e,t)?(e=mj(),gf=Ay=fi=null,Mo=!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 yj&&t.locale!=="ko"?null:t.data;default:return null}}var RL={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 s2(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!RL[e.type]:t==="textarea"}function vj(e,t,n,s){Ao?Vo?Vo.push(s):Vo=[s]:Ao=s,t=Mh(t,"onChange"),0<t.length&&(n=new zx("onChange","change",null,n,s),e.push({event:n,listeners:t}))}var Oc=null,lu=null;function _L(e){gS(e,0)}function Mx(e){var t=Ec(e);if(dj(t))return e}function r2(e,t){if(e==="change")return t}var wj=!1;if(Ir){var op;if(Ir){var lp="oninput"in document;if(!lp){var i2=document.createElement("div");i2.setAttribute("oninput","return;"),lp=typeof i2.oninput=="function"}op=lp}else op=!1;wj=op&&(!document.documentMode||9<document.documentMode)}function a2(){Oc&&(Oc.detachEvent("onpropertychange",jj),lu=Oc=null)}function jj(e){if(e.propertyName==="value"&&Mx(lu)){var t=[];vj(t,lu,e,zy(e)),gj(_L,t)}}function IL(e,t,n){e==="focusin"?(a2(),Oc=t,lu=n,Oc.attachEvent("onpropertychange",jj)):e==="focusout"&&a2()}function OL(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Mx(lu)}function LL(e,t){if(e==="click")return Mx(t)}function DL(e,t){if(e==="input"||e==="change")return Mx(t)}function BL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var es=typeof Object.is=="function"?Object.is:BL;function cu(e,t){if(es(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(!Ng.call(t,r)||!es(e[r],t[r]))return!1}return!0}function Rg(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 o2(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function l2(e,t){var n=o2(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=o2(n)}}function Sj(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sj(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cj(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Rg(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=Rg(e.document)}return t}function _y(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 qL=Ir&&"documentMode"in document&&11>=document.documentMode,Ro=null,_g=null,Lc=null,Ig=!1;function c2(e,t,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ig||Ro==null||Ro!==Rg(s)||(s=Ro,"selectionStart"in s&&_y(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}),Lc&&cu(Lc,s)||(Lc=s,s=Mh(_g,"onSelect"),0<s.length&&(t=new zx("onSelect","select",null,t,n),e.push({event:t,listeners:s}),t.target=Ro)))}function Zi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _o={animationend:Zi("Animation","AnimationEnd"),animationiteration:Zi("Animation","AnimationIteration"),animationstart:Zi("Animation","AnimationStart"),transitionrun:Zi("Transition","TransitionRun"),transitionstart:Zi("Transition","TransitionStart"),transitioncancel:Zi("Transition","TransitionCancel"),transitionend:Zi("Transition","TransitionEnd")},cp={},$j={};Ir&&($j=document.createElement("div").style,"AnimationEvent"in window||(delete _o.animationend.animation,delete _o.animationiteration.animation,delete _o.animationstart.animation),"TransitionEvent"in window||delete _o.transitionend.transition);function eo(e){if(cp[e])return cp[e];if(!_o[e])return e;var t=_o[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $j)return cp[e]=t[n];return e}var Ej=eo("animationend"),Nj=eo("animationiteration"),Tj=eo("animationstart"),HL=eo("transitionrun"),PL=eo("transitionstart"),UL=eo("transitioncancel"),zj=eo("transitionend"),Aj=new Map,Og="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(" ");Og.push("scrollEnd");function Us(e,t){Aj.set(e,t),Ja(t,[e])}var FL=0;function Or(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=qs.identifierPrefix;var n=FL++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function u2(e){if(e==null||typeof e=="string")return e;var t=null,n=Jo;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 Gr(e,t){return e=u2(e),t=u2(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var dh=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)},hs=[],Io=0,Iy=0;function Rx(){for(var e=Io,t=Iy=Io=0;t<e;){var n=hs[t];hs[t++]=null;var s=hs[t];hs[t++]=null;var r=hs[t];hs[t++]=null;var i=hs[t];if(hs[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&&Mj(n,r,i)}}function _x(e,t,n,s){hs[Io++]=e,hs[Io++]=t,hs[Io++]=n,hs[Io++]=s,Iy|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Oy(e,t,n,s){return _x(e,t,n,s),fh(e)}function to(e,t){return _x(e,null,null,t),fh(e)}function Mj(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-Qn(n),e=i.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=n|536870912),i):null}function fh(e){if(50<Wc)throw Wc=0,Ef=null,Error(X(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Oo={};function GL(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 En(e,t,n,s){return new GL(e,t,n,s)}function Ly(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ar(e,t){var n=e.alternate;return n===null?(n=En(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 Rj(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 yf(e,t,n,s,r,i){var a=0;if(s=e,typeof s=="function")Ly(s)&&(a=1);else if(typeof s=="string")a=kB(e,n,cr.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(s){case jg:return e=En(31,n,t,r),e.elementType=jg,e.lanes=i,e;case To:return Sa(n.children,r,i,t);case Z6:a=8,r|=24;break;case bg:return e=En(12,n,t,r|2),e.elementType=bg,e.lanes=i,e;case vg:return e=En(13,n,t,r),e.elementType=vg,e.lanes=i,e;case wg:return e=En(19,n,t,r),e.elementType=wg,e.lanes=i,e;case MO:case Sg:return e=r|32,e=En(30,n,t,e),e.elementType=Sg,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 sr:a=10;break e;case Y6:a=9;break e;case Sy:a=11;break e;case Cy:a=14;break e;case ii:a=16,s=null;break e}a=29,n=Error(X(130,e===null?"null":typeof e,"")),s=null}return t=En(a,n,t,r),t.elementType=e,t.type=s,t.lanes=i,t}function Sa(e,t,n,s){return e=En(7,e,s,t),e.lanes=n,e}function up(e,t,n){return e=En(6,e,null,t),e.lanes=n,e}function _j(e){var t=En(18,null,null,0);return t.stateNode=e,t}function dp(e,t,n){return t=En(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var d2=new WeakMap;function ms(e,t){if(typeof e=="object"&&e!==null){var n=d2.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Pv(t)},d2.set(e,t),t)}return{value:e,source:t,stack:Pv(t)}}var Lo=[],Do=0,hh=null,uu=0,xs=[],ps=0,zi=null,ir=1,ar="";function vr(e,t){Lo[Do++]=uu,Lo[Do++]=hh,hh=e,uu=t}function Ij(e,t,n){xs[ps++]=ir,xs[ps++]=ar,xs[ps++]=zi,zi=e;var s=ir;e=ar;var r=32-Qn(s)-1;s&=~(1<<r),n+=1;var i=32-Qn(t)+r;if(30<i){var a=r-r%5;i=(s&(1<<a)-1).toString(32),s>>=a,r-=a,ir=1<<32-Qn(t)+r|n<<r|s,ar=i+e}else ir=1<<i|n<<r|s,ar=e}function Ix(e){e.return!==null&&(vr(e,1),Ij(e,1,0))}function Dy(e){for(;e===hh;)hh=Lo[--Do],Lo[Do]=null,uu=Lo[--Do],Lo[Do]=null;for(;e===zi;)zi=xs[--ps],xs[ps]=null,ar=xs[--ps],xs[ps]=null,ir=xs[--ps],xs[ps]=null}function Oj(e,t){xs[ps++]=ir,xs[ps++]=ar,xs[ps++]=zi,ir=t.id,ar=t.overflow,zi=e}var Dt=null,Ze=null,Ce=!1,ki=null,ys=!1,Lg=Error(X(519));function Ai(e){var t=Error(X(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw du(ms(t,e)),Lg}function f2(e){var t=e.stateNode,n=e.type,s=e.memoizedProps;switch(t[Kt]=e,t[An]=s,n){case"dialog":Ne("cancel",t),Ne("close",t);break;case"iframe":case"object":case"embed":Ne("load",t);break;case"video":case"audio":for(n=0;n<pu.length;n++)Ne(pu[n],t);break;case"source":Ne("error",t);break;case"img":case"image":case"link":Ne("error",t),Ne("load",t);break;case"details":Ne("toggle",t);break;case"input":Ne("invalid",t),fj(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ne("invalid",t);break;case"textarea":Ne("invalid",t),xj(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||yS(t.textContent,n)?(s.popover!=null&&(Ne("beforetoggle",t),Ne("toggle",t)),s.onScroll!=null&&Ne("scroll",t),s.onScrollEnd!=null&&Ne("scrollend",t),s.onClick!=null&&(t.onclick=rr),t=!0):t=!1,t||Ai(e,!0)}function xh(e){for(Dt=e.return;Dt;)switch(Dt.tag){case 5:case 31:case 13:ys=!1;return;case 27:case 3:ys=!0;return;default:Dt=Dt.return}}function yo(e){if(e!==Dt)return!1;if(!Ce)return xh(e),Ce=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||vm(e.type,e.memoizedProps)),n=!n),n&&Ze&&Ai(e),xh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(X(317));Ze=aw(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(X(317));Ze=aw(e)}else t===27?(t=Ze,Hi(e.type)?(e=Cm,Cm=null,Ze=e):Ze=t):Ze=Dt?bs(e.stateNode.nextSibling):null;return!0}function Ma(){Ze=Dt=null,Ce=!1}function fp(){var e=ki;return e!==null&&(Sn===null?Sn=e:Sn.push.apply(Sn,e),ki=null),e}function du(e){ki===null?ki=[e]:ki.push(e)}var Dg=hr(null),no=null,Er=null;function hi(e,t,n){Qe(Dg,t._currentValue),t._currentValue=n}function Mr(e){e._currentValue=Dg.current,Zt(Dg)}function kf(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 Bg(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),kf(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(X(341));a.lanes|=n,i=a.alternate,i!==null&&(i.lanes|=n),kf(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),kf(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 Ra(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(X(387));if(a=a.memoizedProps,a!==null){var l=r.type;es(r.pendingProps.value,a.value)||(e!==null?e.push(l):e=[l])}}else if(r===ah.current){if(a=r.alternate,a===null)throw Error(X(387));a.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(El):e=[El])}r=r.return}return e!==null&&Bg(t,e,n,s),t.flags|=262144,e!==null}function ph(e){for(e=e.firstContext;e!==null;){if(!es(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function _a(e){no=e,Er=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Xt(e){return Lj(no,e)}function Ld(e,t){return no===null&&_a(e),Lj(e,t)}function Lj(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Er===null){if(e===null)throw Error(X(308));Er=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Er=Er.next=t;return n}var VL=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()})}},WL=$t.unstable_scheduleCallback,KL=$t.unstable_NormalPriority,bt={$$typeof:sr,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function By(){return{controller:new VL,data:new Map,refCount:0}}function Vu(e){e.refCount--,e.refCount===0&&WL(KL,function(){e.controller.abort()})}function h2(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 Nc=null;function XL(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Dc=null,qg=0,Ia=0,Wo=null;function ZL(e,t){if(Dc===null){var n=Dc=[];qg=0,Ia=hk(),Wo={status:"pending",value:void 0,then:function(s){n.push(s)}}}return qg++,t.then(x2,x2),t}function x2(){if(--qg===0&&(Nc=null,Dc!==null)){Wo!==null&&(Wo.status="fulfilled");var e=Dc;Dc=null,Ia=0,Wo=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function YL(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 p2=me.S;me.S=function(e,t){if(tS=Zn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ZL(e,t),Nc!==null)for(var n=Sl;n!==null;)h2(n,Nc),n=n.next;if(n=e.types,n!==null){for(var s=Sl;s!==null;)h2(s,n),s=s.next;if(Ia!==0){s=Nc,s===null&&(s=Nc=[]);for(var r=0;r<n.length;r++){var i=n[r];s.indexOf(i)===-1&&s.push(i)}}}p2!==null&&p2(e,t)};var Ca=hr(null);function qy(){var e=Ca.current;return e!==null?e:We.pooledCache}function bf(e,t){t===null?Qe(Ca,Ca.current):Qe(Ca,t.pool)}function Dj(){var e=qy();return e===null?null:{parent:bt._currentValue,pool:e}}var Vl=Error(X(460)),Hy=Error(X(474)),Ox=Error(X(542)),gh={then:function(){}};function g2(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(rr,rr),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,y2(e),e===void 0&&!("reason"in t)?Error(X(600)):e;default:if(typeof t.status=="string")t.then(rr,rr);else{if(e=We,e!==null&&100<e.shellSuspendCounter)throw Error(X(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,y2(e),e}throw $a=t,Vl}}function na(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?($a=n,Vl):n}}var $a=null;function m2(){if($a===null)throw Error(X(459));var e=$a;return $a=null,e}function y2(e){if(e===Vl||e===Ox)throw Error(X(483))}var Ko=null,fu=0;function Dd(e){var t=fu;return fu+=1,Ko===null&&(Ko=[]),Bj(Ko,e,t)}function Jr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Bd(e,t){throw t.$$typeof===AO?Error(X(525)):(e=Object.prototype.toString.call(t),Error(X(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function qj(e){function t(m,y){if(e){var v=m.deletions;v===null?(m.deletions=[y],m.flags|=16):v.push(y)}}function n(m,y){if(!e)return null;for(;y!==null;)t(m,y),y=y.sibling;return null}function s(m){for(var y=new Map;m!==null;)m.key===null?y.set(m.index,m):y.set(m.key,m),m=m.sibling;return y}function r(m,y){return m=Ar(m,y),m.index=0,m.sibling=null,m}function i(m,y,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<y?(m.flags|=2,y):v):(m.flags|=134217730,y)):(m.flags|=1048576,y)}function a(m){return e&&m.alternate===null&&(m.flags|=134217730),m}function l(m,y,v,w){return y===null||y.tag!==6?(y=up(v,m.mode,w),y.return=m,y):(y=r(y,v),y.return=m,y)}function c(m,y,v,w){var j=v.type;return j===To?(m=d(m,y,v.props.children,w,v.key),Jr(m,v),m):y!==null&&(y.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===ii&&na(j)===y.type)?(y=r(y,v.props),Jr(y,v),y.return=m,y):(y=yf(v.type,v.key,v.props,null,m.mode,w),Jr(y,v),y.return=m,y)}function u(m,y,v,w){return y===null||y.tag!==4||y.stateNode.containerInfo!==v.containerInfo||y.stateNode.implementation!==v.implementation?(y=dp(v,m.mode,w),y.return=m,y):(y=r(y,v.children||[]),y.return=m,y)}function d(m,y,v,w,j){return y===null||y.tag!==7?(y=Sa(v,m.mode,w,j),y.return=m,y):(y=r(y,v),y.return=m,y)}function f(m,y,v){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=up(""+y,m.mode,v),y.return=m,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ad:return v=yf(y.type,y.key,y.props,null,m.mode,v),Jr(v,y),v.return=m,v;case Cc:return y=dp(y,m.mode,v),y.return=m,y;case ii:return y=na(y),f(m,y,v)}if($c(y)||hc(y))return y=Sa(y,m.mode,v,null),y.return=m,y;if(typeof y.then=="function")return f(m,Dd(y),v);if(y.$$typeof===sr)return f(m,Ld(m,y),v);Bd(m,y)}return null}function h(m,y,v,w){var j=y!==null?y.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return j!==null?null:l(m,y,""+v,w);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ad:return v.key===j?c(m,y,v,w):null;case Cc:return v.key===j?u(m,y,v,w):null;case ii:return v=na(v),h(m,y,v,w)}if($c(v)||hc(v))return j!==null?null:d(m,y,v,w,null);if(typeof v.then=="function")return h(m,y,Dd(v),w);if(v.$$typeof===sr)return h(m,y,Ld(m,v),w);Bd(m,v)}return null}function p(m,y,v,w,j){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return m=m.get(v)||null,l(y,m,""+w,j);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Ad:return m=m.get(w.key===null?v:w.key)||null,c(y,m,w,j);case Cc:return m=m.get(w.key===null?v:w.key)||null,u(y,m,w,j);case ii:return w=na(w),p(m,y,v,w,j)}if($c(w)||hc(w))return m=m.get(v)||null,d(y,m,w,j,null);if(typeof w.then=="function")return p(m,y,v,Dd(w),j);if(w.$$typeof===sr)return p(m,y,v,Ld(y,w),j);Bd(y,w)}return null}function g(m,y,v,w){for(var j=null,C=null,$=y,E=y=0,N=null;$!==null&&E<v.length;E++){$.index>E?(N=$,$=null):N=$.sibling;var S=h(m,$,v[E],w);if(S===null){$===null&&($=N);break}e&&$&&S.alternate===null&&t(m,$),y=i(S,y,E),C===null?j=S:C.sibling=S,C=S,$=N}if(E===v.length)return n(m,$),Ce&&vr(m,E),j;if($===null){for(;E<v.length;E++)$=f(m,v[E],w),$!==null&&(y=i($,y,E),C===null?j=$:C.sibling=$,C=$);return Ce&&vr(m,E),j}for($=s($);E<v.length;E++)N=p($,m,E,v[E],w),N!==null&&(e&&(S=N.alternate,S!==null&&$.delete(S.key===null?E:S.key)),y=i(N,y,E),C===null?j=N:C.sibling=N,C=N);return e&&$.forEach(function(A){return t(m,A)}),Ce&&vr(m,E),j}function b(m,y,v,w){if(v==null)throw Error(X(151));for(var j=null,C=null,$=y,E=y=0,N=null,S=v.next();$!==null&&!S.done;E++,S=v.next()){$.index>E?(N=$,$=null):N=$.sibling;var A=h(m,$,S.value,w);if(A===null){$===null&&($=N);break}e&&$&&A.alternate===null&&t(m,$),y=i(A,y,E),C===null?j=A:C.sibling=A,C=A,$=N}if(S.done)return n(m,$),Ce&&vr(m,E),j;if($===null){for(;!S.done;E++,S=v.next())S=f(m,S.value,w),S!==null&&(y=i(S,y,E),C===null?j=S:C.sibling=S,C=S);return Ce&&vr(m,E),j}for($=s($);!S.done;E++,S=v.next())S=p($,m,E,S.value,w),S!==null&&(e&&(N=S.alternate,N!==null&&$.delete(N.key===null?E:N.key)),y=i(S,y,E),C===null?j=S:C.sibling=S,C=S);return e&&$.forEach(function(z){return t(m,z)}),Ce&&vr(m,E),j}function k(m,y,v,w){if(typeof v=="object"&&v!==null&&v.type===To&&v.key===null&&v.props.ref===void 0&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ad:e:{for(var j=v.key;y!==null;){if(y.key===j){if(j=v.type,j===To){if(y.tag===7){n(m,y.sibling),w=r(y,v.props.children),Jr(w,v),w.return=m,m=w;break e}}else if(y.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===ii&&na(j)===y.type){n(m,y.sibling),w=r(y,v.props),Jr(w,v),w.return=m,m=w;break e}n(m,y);break}else t(m,y);y=y.sibling}v.type===To?(w=Sa(v.props.children,m.mode,w,v.key),Jr(w,v),w.return=m,m=w):(w=yf(v.type,v.key,v.props,null,m.mode,w),Jr(w,v),w.return=m,m=w)}return a(m);case Cc:e:{for(j=v.key;y!==null;){if(y.key===j)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){n(m,y.sibling),w=r(y,v.children||[]),w.return=m,m=w;break e}else{n(m,y);break}else t(m,y);y=y.sibling}w=dp(v,m.mode,w),w.return=m,m=w}return a(m);case ii:return v=na(v),k(m,y,v,w)}if($c(v))return g(m,y,v,w);if(hc(v)){if(j=hc(v),typeof j!="function")throw Error(X(150));return v=j.call(v),b(m,y,v,w)}if(typeof v.then=="function")return k(m,y,Dd(v),w);if(v.$$typeof===sr)return k(m,y,Ld(m,v),w);Bd(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,y!==null&&y.tag===6?(n(m,y.sibling),w=r(y,v),w.return=m,m=w):(n(m,y),w=up(v,m.mode,w),w.return=m,m=w),a(m)):n(m,y)}return function(m,y,v,w){try{fu=0;var j=k(m,y,v,w);return Ko=null,j}catch($){if($===Vl||$===Ox)throw $;var C=En(29,$,null,m.mode);return C.lanes=w,C.return=m,C}finally{}}}var Oa=qj(!0),Hj=qj(!1),ai=!1;function Py(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hg(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 bi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function vi(e,t,n){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,Ie&2){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=fh(e),Mj(e,null,n),t}return _x(e,s,t,n),fh(e)}function Bc(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,rj(e,n)}}function hp(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 Pg=!1;function qc(){if(Pg){var e=Wo;if(e!==null)throw e}}function Hc(e,t,n,s){Pg=!1;var r=e.updateQueue;ai=!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===Ia&&(Pg=!0),d!==null&&(d=d.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var g=e,b=l;h=t;var k=n;switch(b.tag){case 1:if(g=b.payload,typeof g=="function"){f=g.call(k,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=b.payload,h=typeof g=="function"?g.call(k,f,h):g,h==null)break e;f=Ke({},f,h);break e;case 2:ai=!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),_i|=a,e.lanes=a,e.memoizedState=f}}function Pj(e,t){if(typeof e!="function")throw Error(X(191,e));e.call(t)}function Uj(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Pj(n[e],t)}var Mi=hr(null),mh=hr(0);function k2(e,t){e=qr,Qe(mh,e),Qe(Mi,t),qr=e|t.baseLanes}function Ug(){Qe(mh,qr),Qe(Mi,Mi.current)}function Uy(){qr=mh.current,Zt(Mi),Zt(mh)}var Jt=hr(null),rn=null;function wi(e){var t=e.alternate;Qe(Yt,Yt.current&1),Qe(Jt,e),rn===null&&(t===null||Mi.current!==null||t.memoizedState!==null)&&(rn=e)}function Fg(e){Qe(Yt,Yt.current),Qe(Jt,e),rn===null&&(rn=e)}function Fj(e){e.tag===22?(Qe(Yt,Yt.current),Qe(Jt,e),rn===null&&(rn=e)):ji()}function ji(){Qe(Yt,Yt.current),Qe(Jt,Jt.current)}function Fn(e){Zt(Jt),rn===e&&(rn=null),Zt(Yt)}var Yt=hr(0);function hu(e,t){Qe(Jt,Jt.current),Qe(Yt,t)}function Fy(e){Zt(Yt),Zt(Jt),rn===e&&(rn=null)}function yh(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Sm(n)||mk(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 Lr=0,je=null,Fe=null,kt=null,kh=!1,Xo=!1,La=!1,bh=0,xu=0,Zo=null,QL=0;function ft(){throw Error(X(321))}function Gy(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!es(e[n],t[n]))return!1;return!0}function Vy(e,t,n,s,r,i){return Lr=i,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,me.H=e===null||e.memoizedState===null?v8:w8,La=!1,i=n(s,r),La=!1,Xo&&(i=Vj(t,n,s,r)),Gj(e),i}function Gj(e){me.H=vh;var t=Fe!==null&&Fe.next!==null;if(Lr=0,kt=Fe=je=null,kh=!1,xu=0,Zo=null,t)throw Error(X(300));e===null||vt||(e=e.dependencies,e!==null&&ph(e)&&(vt=!0))}function Vj(e,t,n,s){je=e;var r=0;do{if(Xo&&(Zo=null),xu=0,Xo=!1,25<=r)throw Error(X(301));if(r+=1,kt=Fe=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=aD,i=t(n,s)}while(Xo);return i}function JL(){var e=me.H,t=e.useState()[0];return t=typeof t.then=="function"?Wu(t):t,e=e.useState()[0],(Fe!==null?Fe.memoizedState:null)!==e&&(je.flags|=1024),t}function Wy(){var e=bh!==0;return bh=0,e}function Ky(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Xy(e){if(kh){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}kh=!1}Lr=0,kt=Fe=je=null,Xo=!1,xu=bh=0,Zo=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 gt(){if(Fe===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=kt===null?je.memoizedState:kt.next;if(t!==null)kt=t,Fe=e;else{if(e===null)throw je.alternate===null?Error(X(467)):Error(X(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},kt===null?je.memoizedState=kt=e:kt=kt.next=e}return kt}function Lx(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wu(e){var t=xu;return xu+=1,Zo===null&&(Zo=[]),e=Bj(Zo,e,t),t=je,(kt===null?t.memoizedState:kt.next)===null&&(t=t.alternate,me.H=t===null||t.memoizedState===null?v8:w8),e}function Dx(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Wu(e);if(e.$$typeof===_O)return;if(e.$$typeof===sr)return Xt(e)}throw Error(X(438,String(e)))}function Zy(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=Lx(),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]=RO;return t.index++,n}function Dr(e,t){return typeof t=="function"?t(e):t}function vf(e){var t=gt();return Yy(t,Fe,e)}function Yy(e,t,n){var s=e.queue;if(s===null)throw Error(X(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:(Lr&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===Ia&&(d=!0);else if((Lr&h)===h){u=u.next,h===Ia&&(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,_i|=h;f=u.action,La&&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,_i|=f;u=u.next}while(u!==null&&u!==t);if(c===null?a=i:c.next=l,!es(i,e.memoizedState)&&(vt=!0,d&&(n=Wo,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 xp(e){var t=gt(),n=t.queue;if(n===null)throw Error(X(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);es(i,t.memoizedState)||(vt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,s]}function Wj(e,t,n){var s=je,r=gt(),i=Ce;if(i){if(n===void 0)throw Error(X(407));n=n()}else n=t();var a=!es((Fe||r).memoizedState,n);if(a&&(r.memoizedState=n,vt=!0),r=r.queue,Qy(Zj.bind(null,s,r,e),[e]),e=r.getSnapshot!==t||a||kt!==null&&(kt.memoizedState.tag&1)!==0,bl(e?9:8,{destroy:void 0},Xj.bind(null,s,r,n,t),null),e){if(s.flags|=2048,We===null)throw Error(X(349));i||Lr&127||Kj(s,t,n)}return n}function Kj(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=je.updateQueue,t===null?(t=Lx(),je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Xj(e,t,n,s){t.value=n,t.getSnapshot=s,Yj(t)&&Qj(e)}function Zj(e,t,n){return n(function(){Yj(t)&&Qj(e)})}function Yj(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!es(e,n)}catch{return!0}}function Qj(e){var t=to(e,2);t!==null&&Tn(t,e,2)}function Gg(e){var t=yn();if(typeof e=="function"){var n=e;if(e=n(),La){di(!0);try{n()}finally{di(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dr,lastRenderedState:e},t}function Jj(e,t,n,s){return e.baseState=n,Yy(e,Fe,typeof s=="function"?s:Dr)}function eD(e,t,n,s,r){if(qx(e))throw Error(X(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,e8(t,i)):(i.next=n.next,t.pending=n.next=i)}}function e8(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),b2(e,t,l)}catch(u){Vg(e,t,u)}finally{i!==null&&a.types!==null&&(i.types=a.types),me.T=i}}else try{i=n(r,s),b2(e,t,i)}catch(u){Vg(e,t,u)}}function b2(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(s){v2(e,t,s)},function(s){return Vg(e,t,s)}):v2(e,t,n)}function v2(e,t,n){t.status="fulfilled",t.value=n,t8(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,e8(e,n)))}function Vg(e,t,n){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=n,t8(t),t=t.next;while(t!==s)}e.action=null}function t8(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function n8(e,t){return t}function w2(e,t){if(Ce){var n=We.formState;if(n!==null){e:{var s=je;if(Ce){if(Ze){t:{for(var r=Ze,i=ys;r.nodeType!==8;){if(!i){r=null;break t}if(r=bs(r.nextSibling),r===null){r=null;break t}}i=r.data,r=i==="F!"||i==="F"?r:null}if(r){Ze=bs(r.nextSibling),s=r.data==="F!";break e}}Ai(s)}s=!1}s&&(t=n[0])}}return n=yn(),n.memoizedState=n.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n8,lastRenderedState:t},n.queue=s,n=y8.bind(null,je,s),s.dispatch=n,s=Gg(!1),i=nk.bind(null,je,!1,s.queue),s=yn(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,n=eD.bind(null,je,r,i,n),r.dispatch=n,s.memoizedState=e,[t,n,!1]}function j2(e){var t=gt();return s8(t,Fe,e)}function s8(e,t,n){if(t=Yy(e,t,n8)[0],e=vf(Dr)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Wu(t)}catch(a){throw a===Vl?Ox:a}else s=t;t=gt();var r=t.queue,i=r.dispatch;return n!==t.memoizedState&&(je.flags|=2048,bl(9,{destroy:void 0},tD.bind(null,r,n),null)),[s,i,e]}function tD(e,t){e.action=t}function S2(e){var t=gt(),n=Fe;if(n!==null)return s8(t,n,e);gt(),t=t.memoizedState,n=gt();var s=n.queue.dispatch;return n.memoizedState=e,[t,s,!1]}function bl(e,t,n,s){return e={tag:e,create:n,deps:s,inst:t,next:null},t=je.updateQueue,t===null&&(t=Lx(),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 r8(){return gt().memoizedState}function wf(e,t,n,s){var r=yn();je.flags|=e,r.memoizedState=bl(1|t,{destroy:void 0},n,s===void 0?null:s)}function Bx(e,t,n,s){var r=gt();s=s===void 0?null:s;var i=r.memoizedState.inst;Fe!==null&&s!==null&&Gy(s,Fe.memoizedState.deps)?r.memoizedState=bl(t,i,n,s):(je.flags|=e,r.memoizedState=bl(1|t,i,n,s))}function C2(e,t){wf(8390656,8,e,t)}function Qy(e,t){Bx(2048,8,e,t)}function nD(e){je.flags|=4;var t=je.updateQueue;if(t===null)t=Lx(),je.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function i8(e){var t=gt().memoizedState;return nD({ref:t,nextImpl:e}),function(){if(Ie&2)throw Error(X(440));return t.impl.apply(void 0,arguments)}}function a8(e,t){return Bx(4,2,e,t)}function o8(e,t){return Bx(4,4,e,t)}function l8(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 c8(e,t,n){n=n!=null?n.concat([e]):null,Bx(4,4,l8.bind(null,t,e),n)}function Jy(){}function u8(e,t){var n=gt();t=t===void 0?null:t;var s=n.memoizedState;return t!==null&&Gy(t,s[1])?s[0]:(n.memoizedState=[e,t],e)}function d8(e,t){var n=gt();t=t===void 0?null:t;var s=n.memoizedState;if(t!==null&&Gy(t,s[1]))return s[0];if(s=e(),La){di(!0);try{e()}finally{di(!1)}}return n.memoizedState=[s,t],s}function ek(e,t,n){return n===void 0||Lr&1073741824&&!(Ae&261930)?e.memoizedState=t:(e.memoizedState=n,e=sS(),je.lanes|=e,_i|=e,n)}function f8(e,t,n,s){return es(n,t)?n:Mi.current!==null?(e=ek(e,n,s),es(e,t)||(vt=!0),e):!(Lr&106)||Lr&1073741824&&!(Ae&261930)?(vt=!0,e.memoizedState=n):(e=sS(),je.lanes|=e,_i|=e,t)}function h8(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,nk(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=YL(c,s);Pc(e,t,d,Jn(e))}else Pc(e,t,s,Jn(e))}catch(f){Pc(e,t,{then:function(){},status:"rejected",reason:f},Jn())}finally{Oe.p=i,a!==null&&l.types!==null&&(a.types=l.types),me.T=a}}function sD(){}function Wg(e,t,n,s){if(e.tag!==5)throw Error(X(476));var r=x8(e).queue;h8(e,r,t,ja,n===null?sD:function(){return p8(e),n(s)})}function x8(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ja,baseState:ja,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dr,lastRenderedState:ja},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dr,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function p8(e){var t=x8(e);t.next===null&&(t=e.alternate.memoizedState),Pc(e,t.next.queue,{},Jn())}function tk(){return Xt(El)}function g8(){return gt().memoizedState}function m8(){return gt().memoizedState}function rD(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Jn();e=bi(n);var s=vi(t,e,n);s!==null&&(Tn(s,t,n),Bc(s,t,n)),t={cache:By()},e.payload=t;return}t=t.return}}function iD(e,t,n){var s=Jn();n={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},qx(e)?k8(t,n):(n=Oy(e,t,n,s),n!==null&&(Tn(n,e,s),b8(n,t,s)))}function y8(e,t,n){var s=Jn();Pc(e,t,n,s)}function Pc(e,t,n,s){var r={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(qx(e))k8(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,es(l,a))return _x(e,t,r,0),We===null&&Rx(),!1}catch{}finally{}if(n=Oy(e,t,r,s),n!==null)return Tn(n,e,s),b8(n,t,s),!0}return!1}function nk(e,t,n,s){if(s={lane:2,revertLane:hk(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},qx(e)){if(t)throw Error(X(479))}else t=Oy(e,n,s,2),t!==null&&Tn(t,e,2)}function qx(e){var t=e.alternate;return e===je||t!==null&&t===je}function k8(e,t){Xo=kh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function b8(e,t,n){if(n&4194048){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,rj(e,n)}}var vh={readContext:Xt,use:Dx,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},v8={readContext:Xt,use:Dx,useCallback:function(e,t){return yn().memoizedState=[e,t===void 0?null:t],e},useContext:Xt,useEffect:C2,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,wf(4194308,4,l8.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wf(4194308,4,e,t)},useInsertionEffect:function(e,t){wf(4,2,e,t)},useMemo:function(e,t){var n=yn();t=t===void 0?null:t;var s=e();if(La){di(!0);try{e()}finally{di(!1)}}return n.memoizedState=[s,t],s},useReducer:function(e,t,n){var s=yn();if(n!==void 0){var r=n(t);if(La){di(!0);try{n(t)}finally{di(!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=Gg(e);var t=e.queue,n=y8.bind(null,je,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Jy,useDeferredValue:function(e,t){var n=yn();return ek(n,e,t)},useTransition:function(){var e=Gg(!1);return e=h8.bind(null,je,e.queue,!0,!1),yn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var s=je,r=yn();if(Ce){if(n===void 0)throw Error(X(407));n=n()}else{if(n=t(),We===null)throw Error(X(349));Ae&127||Kj(s,t,n)}r.memoizedState=n;var i={value:n,getSnapshot:t};return r.queue=i,C2(Zj.bind(null,s,i,e),[e]),s.flags|=2048,bl(9,{destroy:void 0},Xj.bind(null,s,i,n,t),null),n},useId:function(){var e=yn(),t=We.identifierPrefix;if(Ce){var n=ar,s=ir;n=(s&~(1<<32-Qn(s)-1)).toString(32)+n,t="_"+t+"R_"+n,n=bh++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=QL++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:tk,useFormState:w2,useActionState:w2,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=nk.bind(null,je,!0,n),n.dispatch=t,[e,t]},useMemoCache:Zy,useCacheRefresh:function(){return yn().memoizedState=rD.bind(null,je)},useEffectEvent:function(e){var t=yn(),n={impl:e};return t.memoizedState=n,function(){if(Ie&2)throw Error(X(440));return n.impl.apply(void 0,arguments)}}},w8={readContext:Xt,use:Dx,useCallback:u8,useContext:Xt,useEffect:Qy,useImperativeHandle:c8,useInsertionEffect:a8,useLayoutEffect:o8,useMemo:d8,useReducer:vf,useRef:r8,useState:function(){return vf(Dr)},useDebugValue:Jy,useDeferredValue:function(e,t){var n=gt();return f8(n,Fe.memoizedState,e,t)},useTransition:function(){var e=vf(Dr)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:Wu(e),t]},useSyncExternalStore:Wj,useId:g8,useHostTransitionStatus:tk,useFormState:j2,useActionState:j2,useOptimistic:function(e,t){var n=gt();return Jj(n,Fe,e,t)},useMemoCache:Zy,useCacheRefresh:m8,useEffectEvent:i8},aD={readContext:Xt,use:Dx,useCallback:u8,useContext:Xt,useEffect:Qy,useImperativeHandle:c8,useInsertionEffect:a8,useLayoutEffect:o8,useMemo:d8,useReducer:xp,useRef:r8,useState:function(){return xp(Dr)},useDebugValue:Jy,useDeferredValue:function(e,t){var n=gt();return Fe===null?ek(n,e,t):f8(n,Fe.memoizedState,e,t)},useTransition:function(){var e=xp(Dr)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:Wu(e),t]},useSyncExternalStore:Wj,useId:g8,useHostTransitionStatus:tk,useFormState:S2,useActionState:S2,useOptimistic:function(e,t){var n=gt();return Fe!==null?Jj(n,Fe,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Zy,useCacheRefresh:m8,useEffectEvent:i8};function pp(e,t,n,s){t=e.memoizedState,n=n(s,t),n=n==null?t:Ke({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Kg={enqueueSetState:function(e,t,n){e=e._reactInternals;var s=Jn(),r=bi(s);r.payload=t,n!=null&&(r.callback=n),t=vi(e,r,s),t!==null&&(Tn(t,e,s),Bc(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var s=Jn(),r=bi(s);r.tag=1,r.payload=t,n!=null&&(r.callback=n),t=vi(e,r,s),t!==null&&(Tn(t,e,s),Bc(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Jn(),s=bi(n);s.tag=2,t!=null&&(s.callback=t),t=vi(e,s,n),t!==null&&(Tn(t,e,n),Bc(t,e,n))}};function $2(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?!cu(n,s)||!cu(r,i):!0}function E2(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&&Kg.enqueueReplaceState(t,t.state,null)}function Da(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=Ke({},n));for(var r in e)n[r]===void 0&&(n[r]=e[r])}return n}function j8(e){dh(e)}function S8(e){console.error(e)}function C8(e){dh(e)}function wh(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function N2(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 Xg(e,t,n){return n=bi(n),n.tag=3,n.payload={element:null},n.callback=function(){wh(e,t)},n}function $8(e){return e=bi(e),e.tag=3,e}function E8(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(){N2(t,n,s)}}var a=n.stateNode;a!==null&&typeof a.componentDidCatch=="function"&&(e.callback=function(){N2(t,n,s),typeof r!="function"&&(Si===null?Si=new Set([this]):Si.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&&Ra(t,n,r,!0),n=Jt.current,n!==null){switch(n.tag){case 31:case 13:case 19:return rn===null?zh():n.alternate===null&&ht===0&&(ht=3),n.flags&=-257,n.flags|=65536,n.lanes=r,s===gh?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([s]):t.add(s),wp(e,s,r)),!1;case 22:return n.flags|=65536,s===gh?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)),wp(e,s,r)),!1}throw Error(X(435,n.tag))}return wp(e,s,r),zh(),!1}if(Ce)return t=Jt.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Lg&&(e=Error(X(422),{cause:s}),du(ms(e,n)))):(s!==Lg&&(t=Error(X(423),{cause:s}),du(ms(t,n))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=ms(s,n),r=Xg(e.stateNode,s,r),hp(e,r),ht!==4&&(ht=2)),!1;var i=Error(X(520),{cause:s});if(i=ms(i,n),Vc===null?Vc=[i]:Vc.push(i),ht!==4&&(ht=2),t===null)return!0;s=ms(s,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=r&-r,n.lanes|=e,e=Xg(n.stateNode,s,e),hp(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"&&(Si===null||!Si.has(i))))return n.flags|=65536,r&=-r,n.lanes|=r,r=$8(r),E8(r,e,n,s),hp(n,r),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var sk=Error(X(461)),vt=!1;function St(e,t,n,s){t.child=e===null?Hj(t,null,n,s):Oa(t,e.child,n,s)}function T2(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 _a(t),s=Vy(e,t,n,a,i,r),l=Wy(),e!==null&&!vt?(Ky(e,t,r),Br(e,t,r)):(Ce&&l&&Ix(t),t.flags|=1,St(e,t,s,r),t.child)}function z2(e,t,n,s,r){if(e===null){var i=n.type;return typeof i=="function"&&!Ly(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,N8(e,t,i,s,r)):(e=yf(n.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!ik(e,r)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:cu,n(a,s)&&e.ref===t.ref)return Br(e,t,r)}return t.flags|=1,e=Ar(i,s),e.ref=t.ref,e.return=t,t.child=e}function N8(e,t,n,s,r){if(e!==null){var i=e.memoizedProps;if(cu(i,s)&&e.ref===t.ref)if(vt=!1,t.pendingProps=s=i,ik(e,r))e.flags&131072&&(vt=!0);else return t.lanes=e.lanes,Br(e,t,r)}return Zg(e,t,n,s,r)}function T8(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 A2(e,t,i,n,s)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&bf(t,i!==null?i.cachePool:null),i!==null?k2(t,i):Ug(),Fj(t);else return s=t.lanes=536870912,A2(e,t,i!==null?i.baseLanes|n:n,n,s)}else i!==null?(bf(t,i.cachePool),k2(t,i),ji(),t.memoizedState=null):(e!==null&&bf(t,null),Ug(),ji());return St(e,t,r,n),t.child}function Uc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function A2(e,t,n,s,r){var i=qy();return i=i===null?null:{parent:bt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&bf(t,null),Ug(),Fj(t),e!==null&&Ra(e,t,s,!0),t.childLanes=r,null}function jf(e,t){return t=Hx({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function M2(e,t,n){return Oa(t,e.child,null,n),e=jf(t,t.pendingProps),e.flags|=2,Fn(t),t.memoizedState=null,e}function lD(e,t,n){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ce){if(s.mode==="hidden")return e=jf(t,s),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Uc(null,e);if(Fg(t),(e=Ze)?(e=NS(e,ys),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zi!==null?{id:ir,overflow:ar}:null,retryLane:536870912,hydrationErrors:null},n=_j(e),n.return=t,t.child=n,Dt=t,Ze=null)):e=null,e===null)throw Ai(t);return t.lanes=536870912,null}return jf(t,s)}var i=e.memoizedState;if(i!==null){var a=i.dehydrated;if(Fg(t),r)if(t.flags&256)t.flags&=-257,t=M2(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(X(558));else if(vt||Ra(e,t,n,!1),r=(n&e.childLanes)!==0,vt||r){if(Mi.current===null){if(s=We,s!==null&&(a=ij(s,n),a!==0&&a!==i.retryLane))throw i.retryLane=a,to(e,a),Tn(s,e,a),sk;zh()}t=M2(e,t,n)}else e=i.treeContext,Ze=bs(a.nextSibling),Dt=t,Ce=!0,ki=null,ys=!1,e!==null&&Oj(t,e),t=jf(t,s),t.flags|=134221824;return t}return e=Ar(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function So(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(X(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Zg(e,t,n,s,r){return _a(t),n=Vy(e,t,n,s,void 0,r),s=Wy(),e!==null&&!vt?(Ky(e,t,r),Br(e,t,r)):(Ce&&s&&Ix(t),t.flags|=1,St(e,t,n,r),t.child)}function R2(e,t,n,s,r,i){return _a(t),t.updateQueue=null,n=Vj(t,s,n,r),Gj(e),s=Wy(),e!==null&&!vt?(Ky(e,t,i),Br(e,t,i)):(Ce&&s&&Ix(t),t.flags|=1,St(e,t,n,i),t.child)}function _2(e,t,n,s,r){if(_a(t),t.stateNode===null){var i=Oo,a=n.contextType;typeof a=="object"&&a!==null&&(i=Xt(a)),i=new n(s,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Kg,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=s,i.state=t.memoizedState,i.refs={},Py(t),a=n.contextType,i.context=typeof a=="object"&&a!==null?Xt(a):Oo,i.state=t.memoizedState,a=n.getDerivedStateFromProps,typeof a=="function"&&(pp(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&&Kg.enqueueReplaceState(i,i.state,null),Hc(t,s,i,r),qc(),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=Da(n,l);i.props=c;var u=i.context,d=n.contextType;a=Oo,typeof d=="object"&&d!==null&&(a=Xt(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)&&E2(t,i,s,a),ai=!1;var h=t.memoizedState;i.state=h,Hc(t,s,i,r),qc(),u=t.memoizedState,l||h!==u||ai?(typeof f=="function"&&(pp(t,n,f,s),u=t.memoizedState),(c=ai||$2(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,Hg(e,t),a=t.memoizedProps,d=Da(n,a),i.props=d,f=t.pendingProps,h=i.context,u=n.contextType,c=Oo,typeof u=="object"&&u!==null&&(c=Xt(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)&&E2(t,i,s,c),ai=!1,h=t.memoizedState,i.state=h,Hc(t,s,i,r),qc();var p=t.memoizedState;a!==f||h!==p||ai||e!==null&&e.dependencies!==null&&ph(e.dependencies)?(typeof l=="function"&&(pp(t,n,l,s),p=t.memoizedState),(d=ai||$2(t,n,d,s,h,p,c)||e!==null&&e.dependencies!==null&&ph(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,So(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=Oa(t,e.child,null,r),t.child=Oa(t,null,n,r)):St(e,t,n,r),t.memoizedState=i.state,e=t.child):e=Br(e,t,r),e}function I2(e,t,n,s){return Ma(),t.flags|=256,St(e,t,n,s),t.child}var Yg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qg(e){return{baseLanes:e,cachePool:Dj()}}function Jg(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Vn),e}function z8(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:(Yt.current&2)!==0),a&&(r=!0,t.flags&=-129),a=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ce){if(r?wi(t):ji(),(e=Ze)?(e=NS(e,ys),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zi!==null?{id:ir,overflow:ar}:null,retryLane:536870912,hydrationErrors:null},n=_j(e),n.return=t,t.child=n,Dt=t,Ze=null)):e=null,e===null)throw Ai(t);return mk(e)?t.lanes=32:t.lanes=536870912,null}return i=s.children,s=s.fallback,r?(ji(),r=t.mode,i=Hx({mode:"hidden",children:i},r),s=Sa(s,r,n,null),i.return=t,s.return=t,i.sibling=s,t.child=i,s=t.child,s.memoizedState=Qg(n),s.childLanes=Jg(e,a,n),t.memoizedState=Yg,Uc(null,s)):(wi(t),rk(t,i))}var l=e.memoizedState;if(l!==null){var c=l.dehydrated;if(c!==null)return cD(e,t,i,a,s,c,l,n)}return r?(ji(),r=s.fallback,i=t.mode,l=e.child,c=l.sibling,s=Ar(l,{mode:"hidden",children:s.children}),s.subtreeFlags=l.subtreeFlags&1206910976,c!==null?r=Ar(c,r):(r=Sa(r,i,n,null),r.flags|=2),r.return=t,s.return=t,s.sibling=r,t.child=s,Uc(null,s),s=t.child,r=e.child.memoizedState,r===null?r=Qg(n):(i=r.cachePool,i!==null?(l=bt._currentValue,i=i.parent!==l?{parent:l,pool:l}:i):i=Dj(),r={baseLanes:r.baseLanes|n,cachePool:i}),s.memoizedState=r,s.childLanes=Jg(e,a,n),t.memoizedState=Yg,Uc(e.child,s)):(wi(t),n=e.child,e=n.sibling,n=Ar(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 rk(e,t){return t=Hx({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Hx(e,t){return e=En(22,e,null,t),e.lanes=0,e}function qd(e,t,n){return Oa(t,e.child,null,n),e=rk(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function cD(e,t,n,s,r,i,a,l){if(n)return t.flags&256?(wi(t),t.flags&=-257,qd(e,t,l)):t.memoizedState!==null?(ji(),t.child=e.child,t.flags|=128,null):(ji(),i=r.fallback,a=t.mode,r=Hx({mode:"visible",children:r.children},a),i=Sa(i,a,l,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,Oa(t,e.child,null,l),r=t.child,r.memoizedState=Qg(l),r.childLanes=Jg(e,s,l),t.memoizedState=Yg,Uc(null,r));if(wi(t),mk(i)){if(s=i.nextSibling&&i.nextSibling.dataset,s)var c=s.dgst;return s=c,s!==""&&(r=Error(X(419)),r.stack="",r.digest=s,du({value:r,source:null,stack:null})),qd(e,t,l)}if(vt||Ra(e,t,l,!1),s=(l&e.childLanes)!==0,vt||s){if(Mi.current!==null)return qd(e,t,l);if(s=We,s!==null&&(r=ij(s,l),r!==0&&r!==a.retryLane))throw a.retryLane=r,to(e,r),Tn(s,e,r),sk;return Sm(i)||zh(),qd(e,t,l)}return Sm(i)?(t.flags|=192,t.child=e.child,null):(e=a.treeContext,Ze=bs(i.nextSibling),Dt=t,Ce=!0,ki=null,ys=!1,e!==null&&Oj(t,e),t=rk(t,r.children),t.flags|=134221824,t)}function O2(e,t,n){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),kf(e.return,t,n)}function L2(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&yh(n)===null&&(t=e),e=e.sibling}return t}function Hd(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 gp(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 em(e,t,n){var s=t.pendingProps,r=s.revealOrder,i=s.tail;s=s.children;var a=Yt.current;if(t.flags&128)return hu(t,a),null;var l=(a&2)!==0;if(l?(a=a&1|2,t.flags|=128):a&=1,hu(t,a),r==="backwards"&&e!==null?(gp(e),St(e,t,s,n),gp(e)):St(e,t,s,n),s=Ce?uu:0,!l&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&O2(e,n,t);else if(e.tag===19)O2(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=L2(t.child),n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null,gp(t)),Hd(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&&yh(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Hd(t,!0,n,null,i,s);break;case"together":Hd(t,!1,null,null,void 0,s);break;case"independent":t.memoizedState=null;break;default:n=L2(t.child),n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Hd(t,!1,r,n,i,s)}return t.child}function D2(e,t,n){var s=t.pendingProps;return hi(t,t.type,s.value),St(e,t,s.children,n),t.child}function Br(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),_i|=t.lanes,!(n&t.childLanes))if(e!==null){if(Ra(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(X(153));if(t.child!==null){for(e=t.child,n=Ar(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ar(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ik(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&ph(e)))}function uD(e,t,n){switch(t.tag){case 3:oh(t,t.stateNode.containerInfo),hi(t,bt,e.memoizedState.cache),Ma();break;case 27:case 5:Eg(t);break;case 4:oh(t,t.stateNode.containerInfo);break;case 10:hi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Fg(t),null;break;case 13:var s=t.memoizedState;if(s!==null){if(s.dehydrated!==null)return wi(t),t.flags|=128,null;s=Ra(e,t,n,!1);var r=t.child.childLanes;return s||n&r?z8(e,t,n):(wi(t),e=Br(e,t,n),e!==null?e.sibling:null)}wi(t);break;case 19:if(t.flags&128)return em(e,t,n);if(r=(e.flags&128)!==0,s=(n&t.childLanes)!==0,s||(Ra(e,t,n,!1),s=(n&t.childLanes)!==0),r){if(s)return em(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),hu(t,Yt.current),s)break;return null;case 22:return t.lanes=0,T8(e,t,n,t.pendingProps);case 24:hi(t,bt,e.memoizedState.cache)}return Br(e,t,n)}function A8(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)vt=!0;else{if(!ik(e,n)&&!(t.flags&128))return vt=!1,uD(e,t,n);vt=!!(e.flags&131072)}else vt=!1,Ce&&t.flags&1048576&&Ij(t,uu,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=na(t.elementType),t.type=e,typeof e=="function")Ly(e)?(s=Da(e,s),t.tag=1,t=_2(null,t,e,s,n)):(t.tag=0,t=Zg(null,t,e,s,n));else{if(e!=null){var r=e.$$typeof;if(r===Sy){t.tag=11,t=T2(null,t,e,s,n);break e}else if(r===Cy){t.tag=14,t=z2(null,t,e,s,n);break e}else if(r===sr){t.tag=10,t.type=e,t=D2(null,t,n);break e}}throw t=Cg(e)||e,Error(X(306,t,""))}}return t;case 0:return Zg(e,t,t.type,t.pendingProps,n);case 1:return s=t.type,r=Da(s,t.pendingProps),_2(e,t,s,r,n);case 3:e:{if(oh(t,t.stateNode.containerInfo),e===null)throw Error(X(387));s=t.pendingProps;var i=t.memoizedState;r=i.element,Hg(e,t),Hc(t,s,null,n);var a=t.memoizedState;if(s=a.cache,hi(t,bt,s),s!==i.cache&&Bg(t,[bt],n,!0),qc(),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=I2(e,t,s,n);break e}else if(s!==r){r=ms(Error(X(424)),t),du(r),t=I2(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(Ze=bs(e.firstChild),Dt=t,Ce=!0,ki=null,ys=!0,n=Hj(t,null,s,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(Ma(),s===r){t=Br(e,t,n);break e}St(e,t,s,n)}t=t.child}return t;case 26:return So(e,t),e===null?(n=cw(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ce||(t.stateNode=bS(t.type,t.pendingProps,yi.current,t)):t.memoizedState=cw(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Eg(t),e===null&&Ce&&(s=t.stateNode=TS(t.type,t.pendingProps,yi.current),Dt=t,ys=!0,r=Ze,Hi(t.type)?(Cm=r,Ze=bs(s.firstChild)):Ze=r),St(e,t,t.pendingProps.children,n),So(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ce&&((r=s=Ze)&&(s=rB(s,t.type,t.pendingProps,ys),s!==null?(t.stateNode=s,Dt=t,Ze=bs(s.firstChild),ys=!1,r=!0):r=!1),r||Ai(t)),Eg(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,s=i.children,vm(r,i)?s=null:a!==null&&vm(r,a)&&(t.flags|=32),t.memoizedState!==null&&(r=Vy(e,t,JL,null,null,n),El._currentValue=r),So(e,t),St(e,t,s,n),t.child;case 6:return e===null&&Ce&&((e=n=Ze)&&(n=iB(n,t.pendingProps,ys),n!==null?(t.stateNode=n,Dt=t,Ze=null,e=!0):e=!1),e||Ai(t)),null;case 13:return z8(e,t,n);case 4:return oh(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Oa(t,null,s,n):St(e,t,s,n),t.child;case 11:return T2(e,t,t.type,t.pendingProps,n);case 7:return s=t.pendingProps,So(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 D2(e,t,n);case 9:return r=t.type._context,s=t.pendingProps.children,_a(t),r=Xt(r),s=s(r),t.flags|=1,St(e,t,s,n),t.child;case 14:return z2(e,t,t.type,t.pendingProps,n);case 15:return N8(e,t,t.type,t.pendingProps,n);case 19:return em(e,t,n);case 31:return lD(e,t,n);case 22:return T8(e,t,n,t.pendingProps);case 24:return _a(t),s=Xt(bt),e===null?(r=qy(),r===null&&(r=We,i=By(),r.pooledCache=i,i.refCount++,i!==null&&(r.pooledCacheLanes|=n),r=i),t.memoizedState={parent:s,cache:r},Py(t),hi(t,bt,r)):(e.lanes&n&&(Hg(e,t),Hc(t,null,null,n),qc()),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),hi(t,bt,s)):(s=i.cache,hi(t,bt,s),s!==r.cache&&Bg(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:Ce&&Ix(t),e!==null&&e.memoizedProps.name!==s.name?t.flags|=4194816:So(e,t),St(e,t,s.children,n),t.child;case 29:throw t.pendingProps}throw Error(X(156,t.tag))}function mr(e){e.flags|=4}function mp(e,t,n,s,r){var i;if((i=(e.mode&32)!==0)&&(i=n===null?fw(t,s):fw(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(aS())e.flags|=8192;else throw $a=gh,Hy}else e.flags&=-16777217}function B2(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!RS(t))if(aS())e.flags|=8192;else throw $a=gh,Hy}function Pd(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?nj():536870912,e.lanes|=t,vl|=t)}function gc(e,t){if(!Ce)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 Xe(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 dD(e,t,n){var s=t.pendingProps;switch(Dy(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return Xe(t),null;case 3:return n=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Mr(bt),ml(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(yo(t)?mr(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,fp())),Xe(t),null;case 26:var r=t.type,i=t.memoizedState;return e===null?(mr(t),i!==null?(Xe(t),B2(t,i)):(Xe(t),mp(t,r,null,s,n))):i?i!==e.memoizedState?(mr(t),Xe(t),B2(t,i)):(Xe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&mr(t),Xe(t),mp(t,r,e,s,n)),null;case 27:if(lh(t),n=yi.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&mr(t);else{if(!s){if(t.stateNode===null)throw Error(X(166));return Xe(t),t.subtreeFlags&=-33554433,null}e=cr.current,yo(t)?f2(t):(e=TS(r,s,n),t.stateNode=e,mr(t))}return Xe(t),t.subtreeFlags&=-33554433,null;case 5:if(lh(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&mr(t);else{if(!s){if(t.stateNode===null)throw Error(X(166));return Xe(t),t.subtreeFlags&=-33554433,null}if(i=cr.current,yo(t))f2(t);else{var a=mu(yi.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[Kt]=t,i[An]=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(Qt(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&&mr(t)}}return Xe(t),t.subtreeFlags&=-33554433,mp(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&mr(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(X(166));if(e=yi.current,yo(t)){if(e=t.stateNode,n=t.memoizedProps,s=null,r=Dt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[Kt]=t,e=!!(e.nodeValue===n||s!==null&&s.suppressHydrationWarning===!0||yS(e.nodeValue,n)),e||Ai(t,!0)}else e=mu(e).createTextNode(s),e[Kt]=t,t.stateNode=e}return Xe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(s=yo(t),n!==null){if(e===null){if(!s)throw Error(X(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(X(557));e[Kt]=t}else Ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xe(t),e=!1}else n=fp(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Fn(t),t):(Fn(t),null);if(t.flags&128)throw Error(X(558))}return Xe(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=yo(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(X(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(X(317));r[Kt]=t}else Ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xe(t),r=!1}else r=fp(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Fn(t),t):(Fn(t),null)}return Fn(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),Pd(t,t.updateQueue),Xe(t),null);case 4:return ml(),e===null&&xk(t.stateNode.containerInfo),t.flags|=67108864,Xe(t),null;case 10:return Mr(t.type),Xe(t),null;case 19:if(Fy(t),s=t.memoizedState,s===null)return Xe(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)gc(s,!1);else{if(ht!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=yh(e),i!==null){for(t.flags|=128,gc(s,!1),e=i.updateQueue,t.updateQueue=e,Pd(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Rj(n,e),n=n.sibling;return hu(t,Yt.current&1|2),Ce&&vr(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Zn()>Nh&&(t.flags|=128,r=!0,gc(s,!1),t.lanes=4194304)}else{if(!r)if(e=yh(i),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Pd(t,e),gc(s,!0),s.tail===null&&s.tailMode!=="collapsed"&&s.tailMode!=="visible"&&!i.alternate&&!Ce)return Xe(t),null}else 2*Zn()-s.renderingStartTime>Nh&&n!==536870912&&(t.flags|=128,r=!0,gc(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=Zn(),e.sibling=null,i=Yt.current,i=r?i&1|2:i&1,s.tailMode==="visible"||s.tailMode==="collapsed"||!n||Ce?hu(t,i):(n=i,Qe(Jt,t),Qe(Yt,n),rn===null&&(rn=t)),Ce&&vr(t,s.treeForkCount),e}return Xe(t),null;case 22:case 23:return Fn(t),Uy(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?n&536870912&&!(t.flags&128)&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),n=t.updateQueue,n!==null&&Pd(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&&Zt(Ca),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Mr(bt),Xe(t),null;case 25:return null;case 30:return t.flags|=33554432,Xe(t),null}throw Error(X(156,t.tag))}function fD(e,t){switch(Dy(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Mr(bt),ml(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return lh(t),null;case 31:if(t.memoizedState!==null){if(Fn(t),t.alternate===null)throw Error(X(340));Ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Fn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(X(340));Ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Fy(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 ml(),null;case 10:return Mr(t.type),null;case 22:case 23:return Fn(t),Uy(),e!==null&&Zt(Ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Mr(bt),null;case 25:return null;default:return null}}function M8(e,t){switch(Dy(t),t.tag){case 3:Mr(bt),ml();break;case 26:case 27:case 5:lh(t);break;case 4:ml();break;case 31:t.memoizedState!==null&&Fn(t);break;case 13:Fn(t);break;case 19:Fy(t);break;case 10:Mr(t.type);break;case 22:case 23:Fn(t),Uy(),e!==null&&Zt(Ca);break;case 24:Mr(bt)}}function Ku(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){He(t,t.return,l)}}function Ri(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){He(r,c,d)}}}s=s.next}while(s!==i)}}catch(d){He(t,t.return,d)}}function R8(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Uj(t,n)}catch(s){He(e,e.return,s)}}}function _8(e,t,n){n.props=Da(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(s){He(e,t,s)}}function er(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=Or(e.memoizedProps,r);(r.ref===null||r.ref.name!==i)&&(r.ref=jS(i)),s=r.ref;break;case 7:if(e.stateNode===null){var a=new rs(e);zn(e.child,!1,nB,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){He(e,t,l)}}function Wt(e,t){var n=e.ref,s=e.refCleanup;if(n!==null)if(typeof s=="function")try{s()}catch(r){He(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){He(e,t,r)}else n.current=null}function jh(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++)ES(e.stateNode,t[n])}function q2(e){for(var t=e.return;t!==null&&(ok(t)&&ES(e.stateNode,t.stateNode),!ak(t));)t=t.return}function Fc(e){for(var t=e.return;t!==null&&(ok(t)&&sB(e.stateNode,t.stateNode),!ak(t));)t=t.return}function ak(e){return e.tag===5||e.tag===3||e.tag===27}function ok(e){return e&&e.tag===7&&e.stateNode!==null}function tm(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){He(e,e.return,r)}}function yp(e,t,n){try{var s=e.stateNode;DD(s,e.type,n,t),s[An]=t}catch(r){He(e,e.return,r)}}function I8(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Hi(e.type)||e.tag===4}function kp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||I8(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&&Hi(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 nm(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=rr)),jh(e,s),_e=!0;else if(r!==4&&(r===27&&(jh(e,s),s=null,Hi(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(nm(e,t,n,s),e=e.sibling;e!==null;)nm(e,t,n,s),e=e.sibling}function Sh(e,t,n,s){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?n.insertBefore(r,t):n.appendChild(r),jh(e,s),_e=!0;else if(r!==4&&(r===27&&(jh(e,s),s=null,Hi(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Sh(e,t,n,s),e=e.sibling;e!==null;)Sh(e,t,n,s),e=e.sibling}function O8(e){var t=e.stateNode,n=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Qt(t,s,n),t[Kt]=e,t[An]=n}catch(i){He(e,e.return,i)}}var Ch=!1,Gn=null;function H2(e){(e.tag===30||e.subtreeFlags&33554432)&&(Ch=!0)}var nr=null;function P2(){var e=nr;return nr=null,e}var $n=0;function Wl(e,t,n,s,r){return $n=0,L8(e.child,t,n,s,r)}function L8(e,t,n,s,r){for(var i=!1;e!==null;){if(e.tag===5){var a=e.stateNode;if(s!==null){var l=wm(a);s.push(l),l.view&&(i=!0)}else i||wm(a).view&&(i=!0);Ch=!0,vS(a,$n===0?t:t+"_"+$n,n),$n++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&r||L8(e.child,t,n,s,r)&&(i=!0));e=e.sibling}return i}function dr(e,t){for(;e!==null;)e.tag===5?wS(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||dr(e.child,t)),e=e.sibling}function Sf(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Sf(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(X(544));var n=t.name;t=Gr(t.default,t.share),t!=="none"&&(Wl(e,n,t,null,!1)||dr(e.child,!1))}e=e.sibling}}function sm(e,t){if(e.tag===30){var n=e.stateNode,s=e.memoizedProps,r=Or(s,n),i=Gr(s.default,n.paired?s.share:s.enter);i!=="none"?Wl(e,r,i,null,!1)?(Sf(e),n.paired||t||wl(e,s.onEnter)):dr(e.child,!1):Sf(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)sm(e,t),e=e.sibling;else Sf(e)}function rm(e){if(Gn!==null&&Gn.size!==0){var t=Gn;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=Gr(n.default,n.share);if(i!=="none"&&(Wl(e,s,i,null,!1)?(i=e.stateNode,r.paired=i,i.paired=r,wl(e,n.onShare)):dr(e.child,!1)),t.delete(s),t.size===0)break}}}rm(e)}e=e.sibling}}}function im(e){if(e.tag===30){var t=e.memoizedProps,n=Or(t,e.stateNode),s=Gn!==null?Gn.get(n):void 0,r=Gr(t.default,s!==void 0?t.share:t.exit);r!=="none"&&(Wl(e,n,r,null,!1)?s!==void 0?(r=e.stateNode,s.paired=r,r.paired=s,Gn.delete(n),wl(e,t.onShare)):wl(e,t.onExit):dr(e.child,!1)),Gn!==null&&rm(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)im(e),e=e.sibling;else Gn!==null&&rm(e)}function D8(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=Or(t,e.stateNode);t=Gr(t.default,t.update),e.flags&=-5,t!=="none"&&Wl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&D8(e);e=e.sibling}}function am(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,dr(e.child,!1))}am(e)}e=e.sibling}}function Cf(e){if(e.tag===30)e.stateNode.paired=null,dr(e.child,!1),am(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Cf(e),e=e.sibling;else am(e)}function B8(e){for(e=e.child;e!==null;)e.tag===30?dr(e.child,!1):e.subtreeFlags&33554432&&B8(e),e=e.sibling}function lk(e,t,n,s,r,i,a){for(var l=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(i!==null&&$n<i.length){var u=i[$n],d=wm(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&&vS(c,$n===0?n:n+"_"+$n,r),l&&e.flags&4||(nr===null&&(nr=[]),nr.push(c,$n===0?s:s+"_"+$n,t.memoizedProps)),$n++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&a?e.flags|=t.flags&32:lk(e,t.child,n,s,r,i,a)&&(l=!0));t=t.sibling}return l}function q8(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,s=e.stateNode,r=Or(n,s),i=Gr(n.default,n.update),a;a=e.memoizedState,e.memoizedState=null,s=e;var l=e.child;$n=0,r=lk(s,l,r,r,i,a,!1),e.flags&4&&r&&wl(e,n.onUpdate)}else e.subtreeFlags&33554432&&q8(e);e=e.sibling}}var _t=!1,De=!1,Vs=!1,bp=!1,U2=typeof WeakSet=="function"?WeakSet:Set,It=null,Ws=!1,Tc=!1,$h=!1,om=!1;function hD(e,t,n){if(e=e.containerInfo,km=Nl,e=Cj(e),_y(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 g;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),(g=h.firstChild)!==null;)p=h,h=g;for(;;){if(h===e)break t;if(p===s&&++d===i&&(c=l),p===a&&++f===r&&(u=l),(g=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=g}s=c===-1||u===-1?null:{start:c,end:u}}else s=null}s=s||{start:0,end:0}}else s=null;for(bm={focusedElem:e,selectionRange:s},Nl=!1,n=(n&335544064)===n,It=t,t=n?9270:1024;It!==null;){if(e=It,n&&(s=e.deletions,s!==null))for(i=0;i<s.length;i++)n&&im(s[i]);if(e.alternate===null&&e.flags&2)n&&H2(e),Ud(n);else{if(e.tag===22){if(s=e.alternate,e.memoizedState!==null){s!==null&&s.memoizedState===null&&n&&im(s),Ud(n);continue}else if(s!==null&&s.memoizedState!==null){n&&H2(e),Ud(n);continue}}s=e.child,e.subtreeFlags&t&&s!==null?(s.return=e,It=s):(n&&D8(e),Ud(n))}}Gn=null}function Ud(e){for(;It!==null;){var t=It,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=Da(t.type,r);n=i.getSnapshotBeforeUpdate(a,s),i.__reactInternalSnapshotBeforeUpdate=n}catch(l){He(t,t.return,l)}}break;case 3:if(r&1024){if(s=t.stateNode.containerInfo,n=s.nodeType,n===9)jm(s);else if(n===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":jm(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=Or(s.memoizedProps,s.stateNode),r=t.memoizedProps,r=Gr(r.default,r.update),r!=="none"&&Wl(s,n,r,s.memoizedState=[],!0));break;default:if(r&1024)throw Error(X(163))}if(s=t.sibling,s!==null){s.return=t.return,It=s;break}It=t.return}}function H8(e,t,n){var s=n.flags;switch(n.tag){case 0:case 11:case 15:Ks(e,n),s&4&&Ku(5,n);break;case 1:if(Ks(e,n),s&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(a){He(n,n.return,a)}else{var r=Da(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(a){He(n,n.return,a)}}s&64&&R8(n),s&512&&er(n,n.return);break;case 3:if(Ks(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{Uj(e,t)}catch(a){He(n,n.return,a)}}break;case 27:t===null&&s&4&&O8(n);case 26:case 5:Ks(e,n),t===null&&s&4&&tm(n),s&512&&er(n,n.return);break;case 12:Ks(e,n);break;case 31:Ks(e,n),s&4&&G8(e,n);break;case 13:Ks(e,n),s&4&&V8(e,n),s&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=CD.bind(null,n),aB(e,n))));break;case 22:if(s=n.memoizedState!==null||_t,!s){var i=t!==null&&t.memoizedState!==null||De;t=_t,r=De,_t=s,(De=i)&&!r?(s=2,n.subtreeFlags&8772&&(s|=1),As(e,n,s)):Ks(e,n),_t=t,De=r}break;case 30:Ks(e,n),s&512&&er(n,n.return);break;case 7:s&512&&er(n,n.return);default:Ks(e,n)}}function lm(e,t){for(e=e.child;e!==null;)P8(e,t),e=e.sibling}function P8(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){He(e,e.return,c)}cm(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,_e=!0}catch(c){He(e,e.return,c)}break;case 18:try{var l=e.stateNode;t?sw(l,!0):sw(e.stateNode,!1)}catch(c){He(e,e.return,c)}break;case 22:case 23:e.memoizedState===null&&lm(e,t);break;default:lm(e,t)}}function cm(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,s=t;switch(n.tag){case 4:P8(n,s);break e;case 22:n.memoizedState===null&&cm(n,s);break e;default:cm(n,s)}}e=e.sibling}}function U8(e){var t=e.alternate;t!==null&&(e.alternate=null,U8(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Tx(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 tt=null,jn=!1;function zs(e,t,n){for(n=n.child;n!==null;)F8(e,t,n),n=n.sibling}function F8(e,t,n){if(Yn&&typeof Yn.onCommitFiberUnmount=="function")try{Yn.onCommitFiberUnmount(Hu,n)}catch{}switch(n.tag){case 26:De||Wt(n,t),zs(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!De&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:De||Wt(n,t),Fc(n);var s=tt,r=jn;Hi(n.type)&&(tt=n.stateNode,jn=!1),zs(e,t,n),zS(n.stateNode,n.type,n.memoizedProps),tt=s,jn=r;break;case 5:De||Wt(n,t),Fc(n);case 6:if(n.tag===6&&Fc(n),s=tt,r=jn,tt=null,zs(e,t,n),tt=s,jn=r,tt!==null)if(jn)try{(tt.nodeType===9?tt.body:tt.nodeName==="HTML"?tt.ownerDocument.body:tt).removeChild(n.stateNode),_e=!0}catch(i){He(n,t,i)}else try{tt.removeChild(n.stateNode),_e=!0}catch(i){He(n,t,i)}break;case 18:tt!==null&&(jn?(e=tt,nw(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Tl(e)):nw(tt,n.stateNode));break;case 4:s=tt,r=jn,tt=n.stateNode.containerInfo,jn=!0,zs(e,t,n),tt=s,jn=r;break;case 0:case 11:case 14:case 15:Ri(2,n,t),De||Ri(4,n,t),zs(e,t,n);break;case 1:De||(Wt(n,t),s=n.stateNode,typeof s.componentWillUnmount=="function"&&_8(n,t,s)),zs(e,t,n);break;case 21:zs(e,t,n);break;case 22:De=(s=De)||n.memoizedState!==null,zs(e,t,n),De=s;break;case 30:Wt(n,t),zs(e,t,n);break;case 7:De||Wt(n,t),zs(e,t,n);break;default:zs(e,t,n)}}function G8(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Tl(e)}catch(n){He(t,t.return,n)}}}function V8(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Tl(e)}catch(n){He(t,t.return,n)}}function xD(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new U2),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new U2),t;default:throw Error(X(435,e.tag))}}function Fd(e,t){var n=xD(e);t.forEach(function(s){if(!n.has(s)){n.add(s);var r=$D.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(Hi(c.type)){tt=c.stateNode,jn=!1;break e}break;case 5:tt=c.stateNode,jn=!1;break e;case 3:case 4:tt=c.stateNode.containerInfo,jn=!0;break e}c=c.return}if(tt===null)throw Error(X(160));F8(a,l,i),tt=null,jn=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)W8(t,e,n),t=t.sibling}var Os=null;function W8(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&&(Ri(3,e,e.return),Ku(3,e),Ri(5,e,e.return));break;case 1:xn(t,e,n),pn(e),r&512&&(De||s===null||Wt(s,s.return)),r&64&&_t&&(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=Os,xn(t,e,n),pn(e),r&512&&(De||s===null||Wt(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(_t)e.stateNode=bS(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[Fu]||s[Kt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=r.createElement(t),r.head.insertBefore(s,r.querySelector("head > title"))),Qt(s,t,n),s[Kt]=e,Ot(s),t=s;break e;case"link":if(i=dw("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),Qt(s,t,n),r.head.appendChild(s);break;case"meta":if(i=dw("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),Qt(s,t,n),r.head.appendChild(s);break;default:throw Error(X(468,t))}s[Kt]=e,Ot(s),t=s}e.stateNode=t}else _t||$m(i,e.type,e.stateNode);else e.stateNode=uw(i,n,e.memoizedProps);else r!==n?(r===null?(t=s.stateNode,t===null||De||t.parentNode.removeChild(t)):r.count--,n===null?_t||$m(i,e.type,e.stateNode):uw(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&yp(e,e.memoizedProps,s.memoizedProps);break;case 27:xn(t,e,n),pn(e),r&512&&(De||s===null||Wt(s,s.return)),s!==null&&r&4&&yp(e,e.memoizedProps,s.memoizedProps);break;case 5:if(i=Vs,Vs=!1,xn(t,e,n),Vs=i,pn(e),r&512&&(De||s===null||Wt(s,s.return)),e.flags&32){t=e.stateNode;try{kl(t,""),_e=!0}catch(d){He(e,e.return,d)}}r&4&&e.stateNode!=null&&(t=e.memoizedProps,yp(e,t,s!==null?s.memoizedProps:t)),r&1024&&(bp=!0);break;case 6:if(xn(t,e,n),pn(e),r&4){if(e.stateNode===null)throw Error(X(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,_e=!0}catch(d){He(e,e.return,d)}}break;case 3:if(_e=!1,Tf=null,i=Os,Os=yu(t.containerInfo),xn(t,e,n),Os=i,pn(e),r&4&&s!==null&&s.memoizedState.isDehydrated)try{Tl(t.containerInfo)}catch(d){He(e,e.return,d)}bp&&(bp=!1,K8(e)),_e=!1;break;case 4:r=Vs,Vs=_t,s=Kv(),i=Os,Os=yu(e.stateNode.containerInfo),xn(t,e,n),pn(e),Os=i,_e&&Tc&&($h=!0),_e=s,Vs=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,Fd(e,t)));break;case 13:xn(t,e,n),pn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Px=Zn()),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Fd(e,t)));break;case 22:i=e.memoizedState!==null,a=s!==null&&s.memoizedState!==null;var l=_t,c=De,u=Vs;_t=l||i,Vs=u||i,De=c||a,xn(t,e,n),De=c,Vs=u,_t=l,pn(e),r&8192&&(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,!i||s===null||a||_t||De||(t=a||De,n=_t,s=De,_t=i||_t,De=t,si(e,2),_t=n,De=s),!i&&Vs||lm(e,i)),r&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Fd(e,n))));break;case 19:xn(t,e,n),pn(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Fd(e,t)));break;case 30:r&512&&(De||s===null||Wt(s,s.return)),r=Kv(),i=Tc,a=(n&335544064)===n,l=e.memoizedProps,Tc=a&&Gr(l.default,l.update)!=="none",xn(t,e,n),pn(e),a&&s!==null&&_e&&(e.flags|=4),Tc=i,_e=r;break;case 21:break;case 7:r&512&&(De||s===null||Wt(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(I8(s)){n=s;break}s=s.return}s=null;for(var r=e.return;r!==null;){if(ok(r)){var i=r.stateNode;s===null?s=[i]:s.push(i)}if(ak(r))break;r=r.return}var a=s;if(n==null)throw Error(X(160));switch(n.tag){case 27:var l=n.stateNode,c=kp(e);Sh(e,c,l,a);break;case 5:var u=n.stateNode;n.flags&32&&(kl(u,""),n.flags&=-33);var d=kp(e);Sh(e,d,u,a);break;case 3:case 4:var f=n.stateNode.containerInfo,h=kp(e);nm(e,h,f,a);break;default:throw Error(X(161))}}catch(p){He(e,e.return,p)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function K8(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;K8(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Nl=!0,t.reset(),Nl=!1),e=e.sibling}}function ko(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)X8(t,e),t=t.sibling;else q8(t)}function X8(e,t){var n=e.alternate;if(n===null)sm(e,!1);else switch(e.tag){case 3:if(om=Ws=!1,P2(),ko(t,e),!Ws&&!$h){if(e=nr,e!==null)for(var s=0;s<e.length;s+=3){n=e[s];var r=e[s+1];wS(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"})),om=!0}nr=null;break;case 5:ko(t,e);break;case 4:s=Ws,Ws=!1,ko(t,e),Ws&&($h=!0),Ws=s;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?sm(e,!1):ko(t,e));break;case 30:s=Ws,r=P2(),Ws=!1,ko(t,e),Ws&&(e.flags|=4);var i=e.memoizedProps,a=e.stateNode;t=Or(i,a),a=Or(n.memoizedProps,a);var l=Gr(i.default,i.update);l==="none"?t=!1:(i=n.memoizedState,n.memoizedState=null,n=e.child,$n=0,t=lk(e,n,t,a,l,i,!0),$n!==(i===null?0:i.length)&&(e.flags|=32)),e.flags&4&&t?(wl(e,e.memoizedProps.onUpdate),nr=r):r!==null&&(r.push.apply(r,nr),nr=r),Ws=e.flags&32?!0:s;break;default:ko(t,e)}}function Ks(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)H8(e,t.alternate,t),t=t.sibling}function si(e,t){for(e=e.child;e!==null;){var n=e,s=t;switch(n.tag){case 0:case 11:case 14:case 15:Ri(4,n,n.return),si(n,s);break;case 1:Wt(n,n.return);var r=n.stateNode;typeof r.componentWillUnmount=="function"&&_8(n,n.return,r),si(n,s);break;case 27:s&2&&zS(n.stateNode,n.type,n.memoizedProps);case 5:Wt(n,n.return),n.tag!==5&&n.tag!==27||Fc(n),si(n,s);break;case 6:Fc(n);break;case 26:Wt(n,n.return),r=n.stateNode,n.memoizedState!==null||r===null||De||r.parentNode.removeChild(r),si(n,s);break;case 22:n.memoizedState===null&&si(n,s);break;case 30:Wt(n,n.return),si(n,s);break;case 7:Wt(n,n.return);default:si(n,s)}e=e.sibling}}function As(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:As(r,i,n),Ku(4,i);break;case 1:if(As(r,i,n),s=i,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(d){He(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++)Pj(u[r],c)}catch(d){He(s,s.return,d)}}l&&a&64&&R8(i),er(i,i.return);break;case 27:n&2&&O8(i);case 5:i.tag!==5&&i.tag!==27||q2(i),As(r,i,n),l&&s===null&&a&4&&tm(i),er(i,i.return);break;case 6:q2(i);break;case 26:c=i.stateNode,i.memoizedState!==null||c===null||_t||$m(yu(c.ownerDocument),i.type,c),As(r,i,n),l&&s===null&&a&4&&tm(i),er(i,i.return);break;case 12:As(r,i,n);break;case 31:As(r,i,n),l&&a&4&&G8(r,i);break;case 13:As(r,i,n),l&&a&4&&V8(r,i);break;case 22:i.memoizedState===null&&As(r,i,n),er(i,i.return);break;case 30:As(r,i,n),er(i,i.return);break;case 7:er(i,i.return);default:As(r,i,n)}t=t.sibling}}function ck(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&&Vu(n))}function uk(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Vu(e))}function is(e,t,n,s){var r=(n&335544064)===n;if(t.subtreeFlags&(r?10262:10256))for(t=t.child;t!==null;)Z8(e,t,n,s),t=t.sibling;else r&&B8(t)}function Z8(e,t,n,s){var r=(n&335544064)===n;r&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Cf(t);var i=t.flags;switch(t.tag){case 0:case 11:case 15:is(e,t,n,s),i&2048&&Ku(9,t);break;case 1:is(e,t,n,s);break;case 3:is(e,t,n,s),r&&om&&(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&&Vu(i)));break;case 12:if(i&2048){is(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){He(t,t.return,u)}}else is(e,t,n,s);break;case 31:is(e,t,n,s);break;case 13:is(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&&Cf(l),a._visibility&2?is(e,t,n,s):Gc(e,t)):(r&&l!==null&&l.memoizedState!==null&&Cf(t),a._visibility&2?is(e,t,n,s):(a._visibility|=2,Co(e,t,n,s,(t.subtreeFlags&10256)!==0||!1))),i&2048&&ck(l,t);break;case 24:is(e,t,n,s),i&2048&&uk(t.alternate,t);break;case 30:r&&(i=t.alternate,i!==null&&(dr(i.child,!0),dr(t.child,!0))),is(e,t,n,s);break;default:is(e,t,n,s)}}function Co(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:Co(i,a,l,c,r),Ku(8,a);break;case 23:break;case 22:var d=a.stateNode;a.memoizedState!==null?d._visibility&2?Co(i,a,l,c,r):Gc(i,a):(d._visibility|=2,Co(i,a,l,c,r)),r&&u&2048&&ck(a.alternate,a);break;case 24:Co(i,a,l,c,r),r&&u&2048&&uk(a.alternate,a);break;default:Co(i,a,l,c,r)}t=t.sibling}}function Gc(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:Gc(n,s),r&2048&&ck(s.alternate,s);break;case 24:Gc(n,s),r&2048&&uk(s.alternate,s);break;default:Gc(n,s)}t=t.sibling}}var sa=8192;function Yi(e,t,n){if(e.subtreeFlags&sa)for(e=e.child;e!==null;)Y8(e,t,n),e=e.sibling}function Y8(e,t,n){switch(e.tag){case 26:Yi(e,t,n),e.flags&sa&&(e.memoizedState!==null?bB(n,Os,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&hw(n,e)));break;case 5:Yi(e,t,n),e.flags&sa&&(e=e.stateNode,(t&335544128)===t&&hw(n,e));break;case 3:case 4:var s=Os;Os=yu(e.stateNode.containerInfo),Yi(e,t,n),Os=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=sa,sa=16777216,Yi(e,t,n),sa=s):Yi(e,t,n));break;case 30:if(e.flags&sa&&(s=e.memoizedProps.name,s!=null&&s!=="auto")){var r=e.stateNode;r.paired=null,Gn===null&&(Gn=new Map),Gn.set(s,r)}Yi(e,t,n);break;default:Yi(e,t,n)}}function Q8(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 mc(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var s=t[n];It=s,eS(s,e)}Q8(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)J8(e),e=e.sibling}function J8(e){switch(e.tag){case 0:case 11:case 15:mc(e),e.flags&2048&&Ri(9,e,e.return);break;case 3:mc(e);break;case 12:mc(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,$f(e)):mc(e);break;default:mc(e)}}function $f(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var s=t[n];It=s,eS(s,e)}Q8(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ri(8,t,t.return),$f(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,$f(t));break;default:$f(t)}e=e.sibling}}function eS(e,t){for(;It!==null;){var n=It;switch(n.tag){case 0:case 11:case 15:Ri(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:Vu(n.memoizedState.cache)}if(s=n.child,s!==null)s.return=n,It=s;else e:for(n=e;It!==null;){s=It;var r=s.sibling,i=s.return;if(U8(s),s===n){It=null;break e}if(r!==null){r.return=i,It=r;break e}It=i}}}var pD={getCacheForType:function(e){var t=Xt(bt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Xt(bt).controller.signal}},gD=typeof WeakMap=="function"?WeakMap:Map,Ie=0,We=null,Te=null,Ae=0,Be=0,Hn=null,xi=!1,Kl=!1,dk=!1,qr=0,ht=0,_i=0,Ea=0,Eh=0,Vn=0,vl=0,Vc=null,Sn=null,um=!1,Px=0,tS=0,Nh=1/0,Th=null,Si=null,lt=0,qs=null,Ba=null,ur=0,dm=0,fm=null,nS=null,Yo=null,Qo=null,Jo=null,Wc=0,Ef=null;function Jn(){return Ie&2&&Ae!==0?Ae&-Ae:me.T!==null?hk():aj()}function sS(){if(Vn===0)if(!(Ae&536870912)||Ce){var e=Rd;Rd<<=1,!(Rd&3932160)&&(Rd=262144),Vn=e}else Vn=536870912;return e=Jt.current,e!==null&&(e.flags|=32),Vn}function wl(e,t){if(t!=null){var n=e.stateNode,s=n.ref;s===null&&(s=n.ref=jS(Or(e.memoizedProps,n))),Qo===null&&(Qo=[]),Qo.push(t.bind(null,s))}}function Tn(e,t,n){(e===We&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(jl(e,0),pi(e,Ae,Vn,!1)),Uu(e,n),(!(Ie&2)||e!==We)&&(e===We&&(!(Ie&2)&&(Ea|=n),ht===4&&pi(e,Ae,Vn,!1)),xr(e))}function rS(e,t,n){if(Ie&6)throw Error(X(327));var s=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Pu(e,t),r=s?kD(e,t):vp(e,t,!0),i=s;do{if(r===0){Kl&&!s&&pi(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!mD(n)){r=vp(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=Vc;var c=l.current.memoizedState.isDehydrated;if(c&&(jl(l,a).flags|=256),a=vp(l,a,!1),a!==2&&a!==6){if(dk&&!c){l.errorRecoveryDisabledLanes|=i,Ea|=i,r=4;break e}i=Sn,Sn=r,i!==null&&(Sn===null?Sn=i:Sn.push.apply(Sn,i))}r=a}if(i=!1,r!==2)continue}}if(r===1){jl(e,0),pi(e,t,0,!0);break}e:{switch(s=e,i=r,i){case 0:case 1:throw Error(X(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:pi(s,t,Vn,!xi);break e;case 2:Sn=null;break;case 3:case 5:break;default:throw Error(X(329))}if((t&62914560)===t&&(r=Px+300-Zn(),10<r)){if(pi(s,t,Vn,!xi),Nx(s,0,!0)!==0)break e;ur=t,s.timeoutHandle=pk(F2.bind(null,s,n,Sn,Th,um,t,Vn,Ea,vl,xi,i,"Throttled",-0,0),r);break e}F2(s,n,Sn,Th,um,t,Vn,Ea,vl,xi,i,null,-0,0)}}break}while(!0);xr(e)}function F2(e,t,n,s,r,i,a,l,c,u,d,f,h,p){e.timeoutHandle=-1;var g=t.subtreeFlags,b=(i&335544064)===i;if(f=null,(b||g&8192||(g&16785408)===16785408)&&(f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:rr},Gn=null,Y8(t,i,f),b&&(g=f,b=e.containerInfo,b=(b.nodeType===9?b:b.ownerDocument).__reactViewTransition,b!=null&&(g.count++,g.waitingForViewTransition=!0,g=ku.bind(g),b.finished.then(g,g))),g=(i&62914560)===i?Px-Zn():(i&4194048)===i?tS-Zn():0,g=vB(f,g),g!==null)){ur=i,e.cancelPendingCommit=g(V2.bind(null,e,t,i,n,s,r,a,l,c,u,d,f,null,h,p)),pi(e,i,a,!u);return}V2(e,t,i,n,s,r,a,l,c,u,d,f)}function mD(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(!es(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 pi(e,t,n,s){t=tj(e,t),t&=~Eh,t&=~Ea,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var i=31-Qn(r),a=1<<i;s[i]=-1,r&=~a}n!==0&&sj(e,n,t)}function Ux(){return Ie&6?!0:(Xu(0),!1)}function fk(){if(Te!==null){if(Be===0)var e=Te.return;else e=Te,Er=no=null,Xy(e),Ko=null,fu=0,e=Te;for(;e!==null;)M8(e.alternate,e),e=e.return;Te=null}}function jl(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,HD(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ur=0,fk(),We=e,Te=n=Ar(e.current,null),Ae=t,Be=0,Hn=null,xi=!1,Kl=Pu(e,t),dk=!1,vl=Vn=Eh=Ea=_i=ht=0,Sn=Vc=null,um=!1,qr=tj(e,t),Rx(),n}function iS(e,t){je=null,me.H=vh,t===Vl||t===Ox?(t=m2(),Be=3):t===Hy?(t=m2(),Be=4):Be=t===sk?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Hn=t,Te===null&&(ht=1,wh(e,ms(t,e.current)))}function aS(){var e=Jt.current;return e===null?!0:(Ae&4194048)===Ae?rn===null:(Ae&62914560)===Ae||Ae&536870912?e===rn:!1}function oS(){var e=me.H;return me.H=vh,e===null?vh:e}function lS(){var e=me.A;return me.A=pD,e}function zh(){ht=4,xi||(Ae&4194048)!==Ae&&Jt.current!==null||(Kl=!0),!(_i&134217727)&&!(Ea&134217727)||We===null||pi(We,Ae,Vn,!1)}function vp(e,t,n){var s=Ie;Ie|=2;var r=oS(),i=lS();(We!==e||Ae!==t)&&(Th=null,jl(e,t)),t=!1;var a=ht;e:do try{if(Be!==0&&Te!==null){var l=Te,c=Hn;switch(Be){case 8:fk(),a=6;break e;case 3:case 2:case 9:case 6:Jt.current===null&&(t=!0);var u=Be;if(Be=0,Hn=null,Bo(e,l,c,u),n&&Kl){a=0;break e}break;default:u=Be,Be=0,Hn=null,Bo(e,l,c,u)}}yD(),a=ht;break}catch(d){iS(e,d)}while(!0);return t&&e.shellSuspendCounter++,Er=no=null,Ie=s,me.H=r,me.A=i,Te===null&&(We=null,Ae=0,Rx()),a}function yD(){for(;Te!==null;)cS(Te)}function kD(e,t){var n=Ie;Ie|=2;var s=oS(),r=lS();We!==e||Ae!==t?(Th=null,Nh=Zn()+500,jl(e,t)):Kl=Pu(e,t);e:do try{if(Be!==0&&Te!==null){t=Te;var i=Hn;t:switch(Be){case 1:Be=0,Hn=null,Bo(e,t,i,1);break;case 2:case 9:if(g2(i)){Be=0,Hn=null,G2(t);break}t=function(){Be!==2&&Be!==9||We!==e||(Be=7),xr(e)},i.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:g2(i)?(Be=0,Hn=null,G2(t)):(Be=0,Hn=null,Bo(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?RS(a):l.stateNode.complete){Be=0,Hn=null;var c=l.sibling;if(c!==null)Te=c;else{var u=l.return;u!==null?(Te=u,Fx(u)):Te=null}break t}}Be=0,Hn=null,Bo(e,t,i,5);break;case 6:Be=0,Hn=null,Bo(e,t,i,6);break;case 8:fk(),ht=6;break e;default:throw Error(X(462))}}bD();break}catch(d){iS(e,d)}while(!0);return Er=no=null,me.H=s,me.A=r,Ie=n,Te!==null?0:(We=null,Ae=0,Rx(),ht)}function bD(){for(;Te!==null&&!LO();)cS(Te)}function cS(e){var t=A8(e.alternate,e,qr);e.memoizedProps=e.pendingProps,t===null?Fx(e):Te=t}function G2(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=R2(n,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=R2(n,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:Xy(t);var s=t;s===Dt&&(Ce?(xh(s),s.tag===5&&s.stateNode!=null&&(Ze=s.stateNode)):(xh(s),Ce=!0));default:M8(n,t),t=Te=Rj(t,qr),t=A8(n,t,qr)}e.memoizedProps=e.pendingProps,t===null?Fx(e):Te=t}function Bo(e,t,n,s){Er=no=null,Xy(t),Ko=null,fu=0;var r=t.return;try{if(oD(e,r,t,n,Ae)){ht=1,wh(e,ms(n,e.current)),Te=null;return}}catch(i){if(r!==null)throw Te=r,i;ht=1,wh(e,ms(n,e.current)),Te=null;return}t.flags&32768?(Ce||s===1?e=!0:Kl||Ae&536870912?e=!1:(xi=e=!0,(s===2||s===9||s===3||s===6)&&(s=Jt.current,s!==null&&s.tag===13&&(s.flags|=16384))),uS(t,e)):Fx(t)}function Fx(e){var t=e;do{if(t.flags&32768){uS(t,xi);return}e=t.return;var n=dD(t.alternate,t,qr);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 uS(e,t){do{var n=fD(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 V2(e,t,n,s,r,i,a,l,c,u,d,f){e.cancelPendingCommit=null;do Gx();while(lt!==0);if(Ie&6)throw Error(X(327));if(t!==null){if(t===e.current)throw Error(X(177));e===We&&(Te=We=null,Ae=0),Ba=t,qs=e,ur=n,fm=r,nS=s,vD(e,t,n,a,l,c,f)}}function vD(e,t,n,s,r,i,a){var l=t.lanes|t.childLanes;if(dm=l,l|=Iy,WO(e,n,l,s,r,i),Qo=null,(n&335544064)===n?(Jo=XL(e),s=10262):(Jo=null,s=10256),t.subtreeFlags&s||t.flags&s?(e.callbackNode=null,e.callbackPriority=0,ED(ch,function(){return gm(),null})):(e.callbackNode=null,e.callbackPriority=0),Ch=!1,s=(t.flags&13878)!==0,t.subtreeFlags&13878||s){s=me.T,me.T=null,r=Oe.p,Oe.p=2,i=Ie,Ie|=4;try{hD(e,t,n)}finally{Ie=i,Oe.p=r,me.T=s}}lt=1,Ch?Yo=WD(a,e.containerInfo,Jo,hm,xm,jD,pm,gm,wD):(hm(),xm(),pm())}function wD(e){if(lt!==0){var t=qs.onRecoverableError;t(e,{componentStack:null})}}function jD(){lt===3&&(lt=0,X8(Ba,qs),lt=4)}function hm(){if(lt===1){lt=0;var e=qs,t=Ba,n=ur,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=Ie;Ie|=4;try{Tc=$h=!1,W8(t,e,n),n=bm;var a=Cj(e.containerInfo),l=n.focusedElem,c=n.selectionRange;if(a!==l&&l&&l.ownerDocument&&Sj(l.ownerDocument.documentElement,l)){if(c!==null&&_y(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(),g=l.textContent.length,b=Math.min(c.start,g),k=c.end===void 0?b:Math.min(c.end,g);!p.extend&&b>k&&(a=k,k=b,b=a);var m=l2(l,b),y=l2(l,k);if(m&&y&&(p.rangeCount!==1||p.anchorNode!==m.node||p.anchorOffset!==m.offset||p.focusNode!==y.node||p.focusOffset!==y.offset)){var v=f.createRange();v.setStart(m.node,m.offset),p.removeAllRanges(),b>k?(p.addRange(v),p.extend(y.node,y.offset)):(v.setEnd(y.node,y.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}}Nl=!!km,bm=km=null}finally{Ie=i,Oe.p=r,me.T=s}}e.current=t,lt=2}}function xm(){if(lt===2){lt=0;var e=qs,t=Ba,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=Ie;Ie|=4;try{H8(e,t.alternate,t)}finally{Ie=r,Oe.p=s,me.T=n}}lt=3}}function pm(){if(lt===4||lt===3){lt=0;var e=Yo;Yo=null,DO();var t=qs,n=Ba,s=ur,r=nS,i=(s&335544064)===s?10262:10256;if(n.subtreeFlags&i||n.flags&i?lt=5:(lt=0,Ba=qs=null,dS(t,t.pendingLanes)),i=t.pendingLanes,i===0&&(Si=null),Ny(s),n=n.stateNode,Yn&&typeof Yn.onCommitFiberRoot=="function")try{Yn.onCommitFiberRoot(Hu,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=Qo,a=Jo,Jo=null,r!==null&&(Qo=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);ur&3&&Gx(),xr(t),i=t.pendingLanes,s&261930&&i&42?t===Ef?Wc++:(Wc=0,Ef=t):(Wc=0,Ef=null),Xu(0)}}function dS(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Vu(t)))}function Gx(){return Yo!==null&&(Yo.skipTransition(),Yo=null),hm(),xm(),pm(),gm()}function gm(){if(lt!==5)return!1;var e=qs,t=dm;dm=0;var n=Ny(ur),s=me.T,r=Oe.p;try{Oe.p=32>n?32:n,me.T=null,n=fm,fm=null;var i=qs,a=ur;if(lt=0,Ba=qs=null,ur=0,Ie&6)throw Error(X(331));var l=Ie;if(Ie|=4,J8(i.current),Z8(i,i.current,a,n),Ie=l,Xu(0,!1),Yn&&typeof Yn.onPostCommitFiberRoot=="function")try{Yn.onPostCommitFiberRoot(Hu,i)}catch{}return!0}finally{Oe.p=r,me.T=s,dS(e,t)}}function W2(e,t,n){t=ms(n,t),t=Xg(e.stateNode,t,2),e=vi(e,t,2),e!==null&&(Uu(e,2),xr(e))}function He(e,t,n){if(e.tag===3)W2(e,e,n);else for(;t!==null;){if(t.tag===3){W2(t,e,n);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Si===null||!Si.has(s))){e=ms(n,e),n=$8(2),s=vi(t,n,2),s!==null&&(E8(n,s,t,e),Uu(s,2),xr(s));break}}t=t.return}}function wp(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)||(dk=!0,r.add(n),e=SD.bind(null,e,t,n),t.then(e,e))}function SD(e,t,n){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,We===e&&(Ae&n)===n&&(ht===4||ht===3&&(Ae&62914560)===Ae&&300>Zn()-Px?Ie&2?Eh|=n:jl(e,0):Eh|=n,vl===Ae&&(vl=0)),xr(e)}function fS(e,t){t===0&&(t=nj()),e=to(e,t),e!==null&&(Uu(e,t),xr(e))}function CD(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),fS(e,n)}function $D(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(X(314))}s!==null&&s.delete(t),fS(e,n)}function ED(e,t){return $y(e,t)}var Sl=null,$o=null,mm=!1,Ah=!1,jp=!1,gi=0;function xr(e){e!==$o&&e.next===null&&($o===null?Sl=$o=e:$o=$o.next=e),Ah=!0,mm||(mm=!0,TD())}function Xu(e,t){if(!jp&&Ah){jp=!0;do for(var n=!1,s=Sl;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-Qn(42|e)+1)-1,i&=r&~(a&~l),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,K2(s,i))}else i=Ae,i=Nx(s,s===We?i:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),!(i&3)||Pu(s,i)||(n=!0,K2(s,i));s=s.next}while(n);jp=!1}}function ND(){hS()}function hS(){Ah=mm=!1;var e=0;gi!==0&&qD()&&(e=gi);for(var t=Zn(),n=null,s=Sl;s!==null;){var r=s.next,i=xS(s,t);i===0?(s.next=null,n===null?Sl=r:n.next=r,r===null&&($o=n)):(n=s,(e!==0||i&3)&&(Ah=!0)),s=r}lt!==0&<!==5||Xu(e),gi!==0&&(gi=0)}function xS(e,t){for(var n=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var a=31-Qn(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=We,n=Ae,n=Nx(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&&ep(s),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Pu(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(s!==null&&ep(s),Ny(n)){case 2:case 8:n=J6;break;case 32:n=ch;break;case 268435456:n=ej;break;default:n=ch}return s=pS.bind(null,e),n=$y(n,s),e.callbackPriority=t,e.callbackNode=n,t}return s!==null&&s!==null&&ep(s),e.callbackPriority=2,e.callbackNode=null,2}function pS(e,t){if(lt!==0&<!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Gx()&&e.callbackNode!==n)return null;var s=Ae;return s=Nx(e,e===We?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(rS(e,s,t),xS(e,Zn()),e.callbackNode!=null&&e.callbackNode===n?pS.bind(null,e):null)}function K2(e,t){if(Gx())return null;rS(e,t,!0)}function TD(){PD(function(){Ie&6?$y(Q6,ND):hS()})}function hk(){if(gi===0){var e=Ia;e===0&&(e=Md,Md<<=1,!(Md&261888)&&(Md=256)),gi=e}return gi}function X2(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:pf(e)}function zD(e,t,n,s,r){if(t==="submit"&&n&&n.stateNode===r){var i=X2((r[An]||null).action),a=s.submitter;a&&(t=(t=a[An]||null)?X2(t.formAction):a.getAttribute("formAction"),t!==null&&(i=t,a=null));var l=new zx("action","action",null,s,r);e.push({event:l,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(gi!==0){var c=new FormData(r,a);Wg(n,{pending:!0,data:c,method:r.method,action:i},null,c)}}else typeof i=="function"&&(l.preventDefault(),c=new FormData(r,a),Wg(n,{pending:!0,data:c,method:r.method,action:i},i,c))},currentTarget:r}]})}}for(var Sp=0;Sp<Og.length;Sp++){var Cp=Og[Sp],AD=Cp.toLowerCase(),MD=Cp[0].toUpperCase()+Cp.slice(1);Us(AD,"on"+MD)}Us(Ej,"onAnimationEnd");Us(Nj,"onAnimationIteration");Us(Tj,"onAnimationStart");Us("dblclick","onDoubleClick");Us("focusin","onFocus");Us("focusout","onBlur");Us(HL,"onTransitionRun");Us(PL,"onTransitionStart");Us(UL,"onTransitionCancel");Us(zj,"onTransitionEnd");yl("onMouseEnter",["mouseout","mouseover"]);yl("onMouseLeave",["mouseout","mouseover"]);yl("onPointerEnter",["pointerout","pointerover"]);yl("onPointerLeave",["pointerout","pointerover"]);Ja("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ja("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ja("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ja("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ja("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ja("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var pu="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(" "),RD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(pu));function gS(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){dh(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){dh(d)}r.currentTarget=null,i=c}}}}function Ne(e,t){var n=t[Fv];n===void 0&&(n=t[Fv]=new Set);var s=e+"__bubble";n.has(s)||(mS(t,e,2,!1),n.add(s))}function $p(e,t,n){var s=0;t&&(s|=4),mS(n,e,s,t)}var Gd="_reactListening"+Math.random().toString(36).slice(2);function xk(e){if(!e[Gd]){e[Gd]=!0,lj.forEach(function(n){n!=="selectionchange"&&(RD.has(n)||$p(n,!1,e),$p(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Gd]||(t[Gd]=!0,$p("selectionchange",!1,t))}}function mS(e,t,n,s){switch(qS(t)){case 2:var r=CB;break;case 8:r=$B;break;default:r=vk}n=r.bind(null,t,n,e),r=void 0,!Mg||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 Ep(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=fa(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}gj(function(){var u=i,d=zy(n),f=[];e:{var h=Aj.get(e);if(h!==void 0){var p=zx,g=e;switch(e){case"keypress":if(mf(n)===0)break e;case"keydown":case"keyup":p=mL;break;case"focusin":g="focus",p=ap;break;case"focusout":g="blur",p=ap;break;case"beforeblur":case"afterblur":p=ap;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=Qv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=iL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=wL;break;case Ej:case Nj:case Tj:p=lL;break;case zj:p=SL;break;case"scroll":case"scrollend":p=sL;break;case"wheel":p=$L;break;case"copy":case"cut":case"paste":p=uL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=e2;break;case"submit":p=bL;break;case"toggle":case"beforetoggle":p=NL}var b=(t&4)!==0,k=!b&&(e==="scroll"||e==="scrollend"),m=b?h!==null?h+"Capture":null:h;b=[];for(var y=u,v;y!==null;){var w=y;if(v=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||v===null||m===null||(w=ou(y,m),w!=null&&b.push(gu(y,w,v))),k)break;y=y.return}0<b.length&&(h=new p(h,g,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!==Ag&&(g=n.relatedTarget||n.fromElement)&&(fa(g)||g[Fl]))break e;(h||p)&&(g=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=u,p=p?fa(p):null,p!==null&&(k=qu(p),b=p.tag,p!==k||b!==5&&b!==27&&b!==6)&&(p=null)):(h=null,p=u),h!==p&&(b=Qv,w="onMouseLeave",m="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(b=e2,w="onPointerLeave",m="onPointerEnter",y="pointer"),k=h==null?g:Ec(h),v=p==null?g:Ec(p),g=new b(w,y+"leave",h,n,d),g.target=k,g.relatedTarget=v,w=null,fa(d)===u&&(b=new b(m,y+"enter",p,n,d),b.target=v,b.relatedTarget=k,w=b),k=w,b=h&&p?kg(h,p,_D):null,h!==null&&Z2(f,g,h,b,!1),p!==null&&k!==null&&Z2(f,k,p,b,!0)))}e:{if(h=u?Ec(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var j=r2;else if(s2(h))if(wj)j=DL;else{j=OL;var C=IL}else p=h.nodeName,!p||p.toLowerCase()!=="input"||h.type!=="checkbox"&&h.type!=="radio"?u&&Ty(u.elementType)&&(j=r2):j=LL;if(j&&(j=j(e,u))){vj(f,j,n,d);break e}C&&C(e,h,u)}switch(C=u?Ec(u):window,e){case"focusin":(s2(C)||C.contentEditable==="true")&&(Ro=C,_g=u,Lc=null);break;case"focusout":Lc=_g=Ro=null;break;case"mousedown":Ig=!0;break;case"contextmenu":case"mouseup":case"dragend":Ig=!1,c2(f,n,d);break;case"selectionchange":if(qL)break;case"keydown":case"keyup":c2(f,n,d)}var $;if(Ry)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 Mo?kj(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(yj&&n.locale!=="ko"&&(Mo||E!=="onCompositionStart"?E==="onCompositionEnd"&&Mo&&($=mj()):(fi=d,Ay="value"in fi?fi.value:fi.textContent,Mo=!0)),C=Mh(u,E),0<C.length&&(E=new Jv(E,e,null,n,d),f.push({event:E,listeners:C}),$?E.data=$:($=bj(n),$!==null&&(E.data=$)))),($=zL?AL(e,n):ML(e,n))&&(E=Mh(u,"onBeforeInput"),0<E.length&&(C=new Jv("onBeforeInput","beforeinput",null,n,d),f.push({event:C,listeners:E}),C.data=$)),zD(f,e,u,n,d)}gS(f,t)})}function gu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Mh(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=ou(e,n),r!=null&&s.unshift(gu(e,r,i)),r=ou(e,t),r!=null&&s.push(gu(e,r,i))),e.tag===3)return s;e=e.return}return[]}function _D(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Z2(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=ou(n,i),u!=null&&a.unshift(gu(n,u,c))):r||(u=ou(n,i),u!=null&&a.push(gu(n,u,c)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var ID=/\r\n?/g,OD=/\u0000|\uFFFD/g;function Y2(e){return(typeof e=="string"?e:""+e).replace(ID,`
|
|
190
|
-
`).replace(OD,"")}function yS(e,t){return t=Y2(t),Y2(e)===t}function qe(e,t,n,s,r,i){switch(n){case"children":if(typeof s=="string")t==="body"||t==="textarea"&&s===""||kl(e,s);else if(typeof s=="number"||typeof s=="bigint")t!=="body"&&kl(e,""+s);else return;break;case"className":Id(e,"class",s);break;case"tabIndex":Id(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Id(e,n,s);break;case"style":pj(e,s,i);return;case"data":if(t!=="object"){Id(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=pf(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=pf(s),e.setAttribute(n,s);break;case"onClick":s!=null&&(e.onclick=rr);return;case"onScroll":s!=null&&Ne("scroll",e);return;case"onScrollEnd":s!=null&&Ne("scrollend",e);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(X(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(X(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=pf(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":Ne("beforetoggle",e),Ne("toggle",e),xf(e,"popover",s);break;case"xlinkActuate":gr(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":gr(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":gr(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":gr(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":gr(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":gr(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":gr(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":gr(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":gr(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":xf(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=tL.get(n)||n,xf(e,n,s);else return}_e=!0}function ym(e,t,n,s,r,i){switch(n){case"style":pj(e,s,i);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(X(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(X(60));(i!=null?i.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"children":if(typeof s=="string")kl(e,s);else if(typeof s=="number"||typeof s=="bigint")kl(e,""+s);else return;break;case"onScroll":s!=null&&Ne("scroll",e);return;case"onScrollEnd":s!=null&&Ne("scrollend",e);return;case"onClick":s!=null&&(e.onclick=rr);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!cj.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[An]||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}_e=!0,n in e?e[n]=s:s===!0?e.setAttribute(n,""):xf(e,n,s)}return}_e=!0}function Qt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",e),Ne("load",e);var 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(X(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":Ne("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(X(137,t));break;default:qe(e,t,s,d,n,null)}}fj(e,i,l,c,u,a,r,!1);return;case"select":Ne("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?Go(e,!!s,t,!1):n!=null&&Go(e,!!s,n,!0);return;case"textarea":Ne("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(X(91));break;default:qe(e,t,a,l,n,null)}xj(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":Ne("beforetoggle",e),Ne("toggle",e),Ne("cancel",e),Ne("close",e);break;case"iframe":case"object":Ne("load",e);break;case"video":case"audio":for(s=0;s<pu.length;s++)Ne(pu[s],e);break;case"image":Ne("error",e),Ne("load",e);break;case"details":Ne("toggle",e);break;case"embed":case"source":case"link":Ne("error",e),Ne("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(s=n[u],s!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(X(137,t));default:qe(e,t,u,s,n,null)}return;default:if(Ty(t)){for(d in n)n.hasOwnProperty(d)&&(s=n[d],s!==void 0&&ym(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 LD={};function DD(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&&(_e=!0),i=p;break;case"name":p!==f&&(_e=!0),r=p;break;case"checked":p!==f&&(_e=!0),u=p;break;case"defaultChecked":p!==f&&(_e=!0),d=p;break;case"value":p!==f&&(_e=!0),a=p;break;case"defaultValue":p!==f&&(_e=!0),l=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(X(137,t));break;default:p!==f&&qe(e,t,h,p,s,f)}}zg(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&&(_e=!0),h=i;break;case"defaultValue":i!==c&&(_e=!0),l=i;break;case"multiple":i!==c&&(_e=!0),a=i;default:i!==c&&qe(e,t,r,i,s,c)}t=l,n=a,s=p,h!=null?Go(e,!!n,h,!1):!!s!=!!n&&(t!=null?Go(e,!!n,t,!0):Go(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&&(_e=!0),h=r;break;case"defaultValue":r!==i&&(_e=!0),p=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(X(91));break;default:r!==i&&qe(e,t,a,r,s,i)}hj(e,h,p);return;case"option":for(var g in n)if(h=n[g],n.hasOwnProperty(g)&&h!=null&&!s.hasOwnProperty(g))switch(g){case"selected":e.selected=!1;break;default:qe(e,t,g,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&&(_e=!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(X(137,t));break;default:qe(e,t,u,h,s,p)}return;default:if(Ty(t)){for(var k in n)h=n[k],n.hasOwnProperty(k)&&h!==void 0&&!s.hasOwnProperty(k)&&ym(e,t,k,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||ym(e,t,d,h,s,p);return}}for(var m in n)h=n[m],n.hasOwnProperty(m)&&h!=null&&!s.hasOwnProperty(m)&&qe(e,t,m,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 Q2(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function BD(){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&&Q2(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&&Q2(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 km=null,bm=null;function mu(e){return e.nodeType===9?e:e.ownerDocument}function J2(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 kS(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 bS(e,t,n,s){return n=mu(n).createElement(e),n[Kt]=s,n[An]=t,Qt(n,e,t),Ot(n),n}function vm(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 Np=null;function qD(){var e=window.event;return e&&e.type==="popstate"?e===Np?!1:(Np=e,!0):(Np=null,!1)}var pk=typeof setTimeout=="function"?setTimeout:void 0,HD=typeof clearTimeout=="function"?clearTimeout:void 0,ew=typeof Promise=="function"?Promise:void 0,tw=typeof requestAnimationFrame=="function"?requestAnimationFrame:pk,PD=typeof queueMicrotask=="function"?queueMicrotask:typeof ew<"u"?function(e){return ew.resolve(null).then(e).catch(UD)}:pk;function UD(e){setTimeout(function(){throw e})}function Hi(e){return e==="head"}function nw(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),Tl(t);return}s--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")s++;else if(n==="html")zp(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,zp(n);for(var i=n.firstChild;i;){var a=i.nextSibling,l=i.nodeName;i[Fu]||l==="SCRIPT"||l==="STYLE"||l==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=a}}else n==="body"&&zp(e.ownerDocument.body);n=r}while(n);Tl(t)}function sw(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 vS(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 wS(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 FD(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 wm(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return FD(t,n,e)}function GD(e){return e.documentElement.clientHeight}function VD(e){this.addEventListener("load",e),this.addEventListener("error",e)}function WD(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,g=u.fonts.status;s();var b=[];if(g==="loaded"&&(GD(u),u.fonts.status==="loading"&&b.push(u.fonts.ready)),g=b.length,e!==null)for(var k=e.suspenseyImages,m=0,y=0;y<k.length;y++){var v=k[y];if(!v.complete){var w=v.getBoundingClientRect();if(0<w.bottom&&0<w.right&&w.top<h.innerHeight&&w.left<h.innerWidth){if(m+=_S(v),m>zf){b.length=g;break}v=new Promise(VD.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 g=h[p],b=g.effect,k=b.pseudoElement;if(k!=null&&k.startsWith("::view-transition")){f.push(g),g=b.getKeyframes();for(var m=k=void 0,y=!0,v=0;v<g.length;v++){var w=g[v],j=w.width;if(k===void 0)k=j;else if(k!==j){y=!1;break}if(j=w.height,m===void 0)m=j;else if(m!==j){y=!1;break}delete w.width,delete w.height,w.transform==="none"&&delete w.transform}y&&k!==void 0&&m!==void 0&&(b.setKeyframes(g),y=getComputedStyle(b.target,b.pseudoElement),y.width!==k||y.height!==m)&&(y=g[0],y.width=k,y.height=m,y=g[g.length-1],y.width=k,y.height=m,b.setKeyframes(g))}}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 ha(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}ha.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:Ke({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)};ha.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};ha.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function jS(e){return{name:e,group:new ha("group",e),imagePair:new ha("image-pair",e),old:new ha("old",e),new:new ha("new",e)}}function rs(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}rs.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(SS(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=Cl(n),i.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:l,cleanup:r}),zn(this._fragmentFiber.child,!1,KD,e,l,s)}this._eventListeners=i}};function KD(e,t,n,s){return Ct(e).addEventListener(t,n,s),!1}rs.prototype.removeEventListener=function(e,t,n){var s=this._eventListeners;if(s!==null&&(t=SS(s,e,t,n),t!==-1)){var r=s[t];n=r.attachedListener;var i=r.cleanup;r=Cl(r.optionsOrUseCapture),zn(this._fragmentFiber.child,!1,XD,e,n,r),s.splice(t,1),i!==null&&i()}};function XD(e,t,n,s){return Ct(e).removeEventListener(t,n,s),!1}function Cl(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function rw(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function SS(e,t,n,s){if(e.length===0)return-1;s=rw(s);for(var r=0;r<e.length;r++){var i=e[r];if(i.type===t&&i.listener===n&&rw(i.optionsOrUseCapture)===s)return r}return-1}rs.prototype.dispatchEvent=function(e){var t=Qa(this._fragmentFiber);if(t===null)return!0;t=Ct(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,Cl(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,Cl(i.optionsOrUseCapture));return t.removeChild(s),e}return t.dispatchEvent(e)};rs.prototype.focus=function(e){zn(this._fragmentFiber.child,!0,CS,e,void 0,void 0)};function CS(e,t){return e.tag===6?!1:(e=Ct(e),oB(e,t))}rs.prototype.focusLast=function(e){var t=[];zn(this._fragmentFiber.child,!0,gk,t,void 0,void 0);for(var n=t.length-1;0<=n&&!CS(t[n],e);n--);};function gk(e,t){return t.push(e),!1}rs.prototype.blur=function(){var e=Qa(this._fragmentFiber);e!==null&&(e=Ct(e),e=mu(e).activeElement,e!==null&&zn(this._fragmentFiber.child,!1,ZD,e,void 0,void 0))};function ZD(e,t){return e.tag===6?!1:(e=Ct(e),e===t||e.contains(t)?(t.blur(),!0):!1)}rs.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),zn(this._fragmentFiber.child,!1,YD,e,void 0,void 0)};function YD(e,t){return e.tag===6||(e=Ct(e),t.observe(e)),!1}rs.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),zn(this._fragmentFiber.child,!1,QD,e,void 0,void 0);for(var n=t=0;n<Ds.length;n++){var s=Ds[n];s.fragmentInstance===this&&s.observer===e?e.unobserve(s.instance):Ds[t++]=s}Ds.length=t}};function QD(e,t){return e.tag===6||(e=Ct(e),t.unobserve(e)),!1}var Ds=[],Tp=!1;function JD(e,t,n){Ds.push({fragmentInstance:e,observer:t,instance:n}),Tp||(Tp=!0,lB(function(){Tp=!1;var s=Ds;Ds=[];for(var r=0;r<s.length;r++){var i=s[r];i.observer.unobserve(i.instance)}}))}rs.prototype.getClientRects=function(){var e=[];return zn(this._fragmentFiber.child,!1,eB,e,void 0,void 0),e};function eB(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=Ct(e),t.push.apply(t,e.getClientRects());return!1}rs.prototype.getRootNode=function(e){var t=Qa(this._fragmentFiber);return t===null?this:Ct(t).getRootNode(e)};rs.prototype.compareDocumentPosition=function(e){var t=Qa(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];zn(this._fragmentFiber.child,!1,gk,n,void 0,void 0);var s=Ct(t);if(n.length===0){if(n=s,Dv(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=K6(t)[1],n===null?r=Node.DOCUMENT_POSITION_PRECEDING:(e=Ct(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=Ct(n[0]),r=Ct(n[n.length-1]);var i=Dv(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||tB(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function tB(e,t,n,s,r){var i=fa(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=Qa(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=kg(n,i,Bv),t===null?t=!1:(zn(t,!0,TO,i,n),i=No,No=null,t=i!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!i)&&!(t=i===s)&&(t=kg(s,i,Bv),t===null?t=!1:(zn(t,!0,zO,i,s),i=No,yg=No=null,t=i!==null)),t):!1}function iw(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)}rs.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(X(566));var t=[];zn(this._fragmentFiber.child,!1,gk,t,void 0,void 0);var n=e!==!1;if(t.length===0){var s=K6(this._fragmentFiber);if(s=n?s[1]||s[0]||Qa(this._fragmentFiber):s[0]||s[1],s===null)return;if(s.tag===6){e=Ct(s),iw(e,n);return}if(s=Ct(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=Ct(r),iw(r,n)):Ct(r).scrollIntoView(e),s+=n?-1:1}};function nB(e,t){return e=Ct(e),$S(e,t),!1}function $S(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function ES(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,Cl(r.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(i){for(var a=0,l=0;l<Ds.length;l++){var c=Ds[l];(c.fragmentInstance!==t||c.observer!==i||c.instance!==e)&&(Ds[a++]=c)}Ds.length=a,i.observe(e)}),$S(e,t))}function sB(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,Cl(r.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(i){typeof i.rootMargin=="string"?JD(t,i,e):i.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function jm(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":jm(n),Tx(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function rB(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[Fu])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=bs(e.nextSibling),e===null)break}return null}function iB(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=bs(e.nextSibling),e===null))return null;return e}function NS(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=bs(e.nextSibling),e===null))return null;return e}function Sm(e){return e.data==="$?"||e.data==="$~"}function mk(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function aB(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 bs(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 Cm=null;function aw(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return bs(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function ow(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 oB(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 lB(e){tw(function(){tw(function(t){return e(t)})})}function TS(e,t,n){switch(t=mu(n),e){case"html":if(e=t.documentElement,!e)throw Error(X(452));return e;case"head":if(e=t.head,!e)throw Error(X(453));return e;case"body":if(e=t.body,!e)throw Error(X(454));return e;default:throw Error(X(451))}}function zS(e,t,n){for(var s in n){var r=n[s];n.hasOwnProperty(s)&&r!=null&&qe(e,t,s,null,LD,r)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===rr&&(e.onclick=null),Tx(e)}function zp(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Tx(e)}var Ss=new Map,lw=new Set;function yu(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 Vr=Oe.d;Oe.d={f:cB,r:uB,D:dB,C:fB,L:hB,m:xB,X:gB,S:pB,M:mB};function cB(){var e=Vr.f(),t=Ux();return e||t}function uB(e){var t=Gl(e);t!==null&&t.tag===5&&t.type==="form"?p8(t):Vr.r(e)}var Xl=typeof document>"u"?null:document;function AS(e,t,n){var s=Xl;if(s&&typeof t=="string"&&t){var r=gs(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),lw.has(r)||(lw.add(r),e={rel:e,crossOrigin:n,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),Qt(t,"link",e),Ot(t),s.head.appendChild(t)))}}function dB(e){Vr.D(e),AS("dns-prefetch",e,null)}function fB(e,t){Vr.C(e,t),AS("preconnect",e,t)}function hB(e,t,n){Vr.L(e,t,n);var s=Xl;if(s&&e&&t){var r='link[rel="preload"][as="'+gs(t)+'"]';t==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+gs(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+gs(n.imageSizes)+'"]')):r+='[href="'+gs(e)+'"]';var i=r;switch(t){case"style":i=$l(e);break;case"script":i=Zl(e)}if(!(Ss.has(i)||(e=Ke({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ss.set(i,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Zu(i))||t==="script"&&s.querySelector(Yu(i))))){var a=s.createElement("link");Qt(a,"link",e),t==="style"&&(a[uh]=!0,a.onload=a.onerror=function(){oj(a)}),Ot(a),s.head.appendChild(a)}}}function xB(e,t){Vr.m(e,t);var n=Xl;if(n&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+gs(s)+'"][href="'+gs(e)+'"]',i=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Zl(e)}if(!Ss.has(i)&&(e=Ke({rel:"modulepreload",href:e},t),Ss.set(i,e),n.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Yu(i)))return}s=n.createElement("link"),Qt(s,"link",e),Ot(s),n.head.appendChild(s)}}}function pB(e,t,n){Vr.S(e,t,n);var s=Xl;if(s&&e){var r=Fo(s).hoistableStyles,i=$l(e);t=t||"default";var a=r.get(i);if(!a){var l={loading:0,preload:null};if(a=s.querySelector(Zu(i)))l.loading=5;else{e=Ke({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ss.get(i))&&yk(e,n);var c=a=s.createElement("link");Ot(c),Qt(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,Nf(a,t,s)}a={type:"stylesheet",instance:a,count:1,state:l},r.set(i,a)}}}function gB(e,t){Vr.X(e,t);var n=Xl;if(n&&e){var s=Fo(n).hoistableScripts,r=Zl(e),i=s.get(r);i||(i=n.querySelector(Yu(r)),i||(e=Ke({src:e,async:!0},t),(t=Ss.get(r))&&kk(e,t),i=n.createElement("script"),Ot(i),Qt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},s.set(r,i))}}function mB(e,t){Vr.M(e,t);var n=Xl;if(n&&e){var s=Fo(n).hoistableScripts,r=Zl(e),i=s.get(r);i||(i=n.querySelector(Yu(r)),i||(e=Ke({src:e,async:!0,type:"module"},t),(t=Ss.get(r))&&kk(e,t),i=n.createElement("script"),Ot(i),Qt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},s.set(r,i))}}function cw(e,t,n,s){var r=(r=yi.current)?yu(r):null;if(!r)throw Error(X(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=$l(n.href),t=Fo(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=$l(n.href);var i=Fo(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(Zu(e)))?i._p||(a.instance=i,a.state.loading=5):(i=Ss.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},Ss.set(e,i)),yB(r,e,i,a.state))),t&&s===null)throw Error(X(528,""));return a}if(t&&s!==null)throw Error(X(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=Zl(n),t=Fo(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(X(444,e))}}function $l(e){return'href="'+gs(e)+'"'}function Zu(e){return'link[rel="stylesheet"]['+e+"]"}function MS(e){return Ke({},e,{"data-precedence":e.precedence,precedence:null})}function yB(e,t,n,s){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[uh]!==!0){s.loading=1;return}}else t=e.createElement("link"),t[uh]=!0,t.onload=t.onerror=oj.bind(null,t),Qt(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 Zl(e){return'[src="'+gs(e)+'"]'}function Yu(e){return"script[async]"+e}function uw(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+gs(n.href)+'"]');if(s)return t.instance=s,Ot(s),s;var r=Ke({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Ot(s),Qt(s,"style",r),Nf(s,n.precedence,e),t.instance=s;case"stylesheet":r=$l(n.href);var i=e.querySelector(Zu(r));if(i)return t.state.loading|=4,t.instance=i,Ot(i),i;s=MS(n),(r=Ss.get(r))&&yk(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}),Qt(i,"link",s),t.state.loading|=4,Nf(i,n.precedence,e),t.instance=i;case"script":return i=Zl(n.src),(r=e.querySelector(Yu(i)))?(t.instance=r,Ot(r),r):(s=n,(r=Ss.get(i))&&(s=Ke({},n),kk(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),Ot(r),Qt(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(X(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(s=t.instance,t.state.loading|=4,Nf(s,n.precedence,e));return t.instance}function Nf(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 yk(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function kk(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Tf=null;function dw(e,t,n){if(Tf===null){var s=new Map,r=Tf=new Map;r.set(n,s)}else r=Tf,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[Fu]||i[Kt]||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 $m(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function kB(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 fw(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function RS(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function _S(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function hw(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=_S(t),e.suspenseyImages.push(t)),e=wB.bind(e),t.decode().then(e,e))}function bB(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=$l(s.href),i=t.querySelector(Zu(r));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ku.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,Ot(i);return}i=t.ownerDocument||t,s=MS(s),(r=Ss.get(r))&&yk(s,r),i=i.createElement("link"),Ot(i);var a=i;a._p=new Promise(function(l,c){a.onload=l,a.onerror=c}),Qt(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=ku.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var zf=0;function vB(e,t){return e.stylesheets&&e.count===0&&Af(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var s=setTimeout(function(){if(e.stylesheets&&Af(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&zf===0&&(zf=62500*BD());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Af(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>zf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function IS(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Af(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ku(){this.count--,IS(this)}function wB(){this.imgCount--,IS(this)}var Rh=null;function Af(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rh=new Map,t.forEach(jB,e),Rh=null,ku.call(e))}function jB(e,t){if(!(t.state.loading&4)){var n=Rh.get(e);if(n)var s=n.get(null);else{n=new Map,Rh.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=ku.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 El={$$typeof:sr,Provider:null,Consumer:null,_currentValue:ja,_currentValue2:ja,_threadCount:0};function SB(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=tp(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tp(0),this.hiddenUpdates=tp(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 OS(e,t,n,s,r,i,a,l,c,u,d,f){return e=new SB(e,t,n,a,c,u,d,f,l),t=1,i===!0&&(t|=24),i=En(3,null,null,t),e.current=i,i.stateNode=e,t=By(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:s,isDehydrated:n,cache:t},Py(i),e}function LS(e){return e?(e=Oo,e):Oo}function DS(e,t,n,s,r,i){r=LS(r),s.context===null?s.context=r:s.pendingContext=r,s=bi(t),s.payload={element:n},i=i===void 0?null:i,i!==null&&(s.callback=i),n=vi(e,s,t),n!==null&&(Tn(n,e,t),Bc(n,e,t))}function xw(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function bk(e,t){xw(e,t),(e=e.alternate)&&xw(e,t)}function BS(e){if(e.tag===13||e.tag===31){var t=to(e,67108864);t!==null&&Tn(t,e,67108864),bk(e,67108864)}}function pw(e){if(e.tag===13||e.tag===31){var t=Jn();t=Ey(t);var n=to(e,t);n!==null&&Tn(n,e,t),bk(e,t)}}var Nl=!0;function CB(e,t,n,s){var r=me.T;me.T=null;var i=Oe.p;try{Oe.p=2,vk(e,t,n,s)}finally{Oe.p=i,me.T=r}}function $B(e,t,n,s){var r=me.T;me.T=null;var i=Oe.p;try{Oe.p=8,vk(e,t,n,s)}finally{Oe.p=i,me.T=r}}function vk(e,t,n,s){if(Nl){var r=Em(s);if(r===null)Ep(e,t,s,_h,n),gw(e,s);else if(NB(r,e,t,n,s))s.stopPropagation();else if(gw(e,s),t&4&&-1<EB.indexOf(e)){for(;r!==null;){var i=Gl(r);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var a=ta(i.pendingLanes);if(a!==0){var l=i;for(l.pendingLanes|=2,l.entangledLanes|=2;a;){var c=1<<31-Qn(a);l.entanglements[1]|=c,a&=~c}xr(i),!(Ie&6)&&(Nh=Zn()+500,Xu(0))}}break;case 31:case 13:l=to(i,2),l!==null&&Tn(l,i,2),Ux(),bk(i,2)}if(i=Em(s),i===null&&Ep(e,t,s,_h,n),i===r)break;r=i}r!==null&&s.stopPropagation()}else Ep(e,t,s,null,n)}}function Em(e){return e=zy(e),wk(e)}var _h=null;function wk(e){if(_h=null,e=fa(e),e!==null){var t=qu(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=G6(t),e!==null)return e;e=null}else if(n===31){if(e=V6(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 qS(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(BO()){case Q6:return 2;case J6:return 8;case ch:case qO:return 32;case ej:return 268435456;default:return 32}default:return 32}}var Nm=!1,Ci=null,$i=null,Ei=null,bu=new Map,vu=new Map,li=[],EB="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 gw(e,t){switch(e){case"focusin":case"focusout":Ci=null;break;case"dragenter":case"dragleave":$i=null;break;case"mouseover":case"mouseout":Ei=null;break;case"pointerover":case"pointerout":bu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vu.delete(t.pointerId)}}function yc(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=Gl(t),t!==null&&BS(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function NB(e,t,n,s,r){switch(t){case"focusin":return Ci=yc(Ci,e,t,n,s,r),!0;case"dragenter":return $i=yc($i,e,t,n,s,r),!0;case"mouseover":return Ei=yc(Ei,e,t,n,s,r),!0;case"pointerover":var i=r.pointerId;return bu.set(i,yc(bu.get(i)||null,e,t,n,s,r)),!0;case"gotpointercapture":return i=r.pointerId,vu.set(i,yc(vu.get(i)||null,e,t,n,s,r)),!0}return!1}function HS(e){var t=fa(e.target);if(t!==null){var n=qu(t);if(n!==null){if(t=n.tag,t===13){if(t=G6(n),t!==null){e.blockedOn=t,Uv(e.priority,function(){pw(n)});return}}else if(t===31){if(t=V6(n),t!==null){e.blockedOn=t,Uv(e.priority,function(){pw(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 Mf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Em(e.nativeEvent);if(n===null){n=e.nativeEvent;var s=new n.constructor(n.type,n);Ag=s,n.target.dispatchEvent(s),Ag=null}else return t=Gl(n),t!==null&&BS(t),e.blockedOn=n,!1;t.shift()}return!0}function mw(e,t,n){Mf(e)&&n.delete(t)}function TB(){Nm=!1,Ci!==null&&Mf(Ci)&&(Ci=null),$i!==null&&Mf($i)&&($i=null),Ei!==null&&Mf(Ei)&&(Ei=null),bu.forEach(mw),vu.forEach(mw)}function Vd(e,t){e.blockedOn===t&&(e.blockedOn=null,Nm||(Nm=!0,$t.unstable_scheduleCallback($t.unstable_NormalPriority,TB)))}var Wd=null;function yw(e){Wd!==e&&(Wd=e,$t.unstable_scheduleCallback($t.unstable_NormalPriority,function(){Wd===e&&(Wd=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(wk(s||n)===null)continue;break}var i=Gl(n);i!==null&&(e.splice(t,3),t-=3,Wg(i,{pending:!0,data:r,method:n.method,action:s},s,r))}}))}function Tl(e){function t(c){return Vd(c,e)}Ci!==null&&Vd(Ci,e),$i!==null&&Vd($i,e),Ei!==null&&Vd(Ei,e),bu.forEach(t),vu.forEach(t);for(var n=0;n<li.length;n++){var s=li[n];s.blockedOn===e&&(s.blockedOn=null)}for(;0<li.length&&(n=li[0],n.blockedOn===null);)HS(n),n.blockedOn===null&&li.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[An]||null;if(typeof i=="function")a||yw(n);else if(a){var l=null;if(i&&i.hasAttribute("formAction")){if(r=i,a=i[An]||null)l=a.formAction;else if(wk(r)!==null)continue}else l=a.action;typeof l=="function"?n[s+1]=l:(n.splice(s,3),s-=3),yw(n)}}}function PS(){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 jk(e){this._internalRoot=e}Vx.prototype.render=jk.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(X(409));var n=t.current,s=Jn();DS(n,s,e,t,null,null)};Vx.prototype.unmount=jk.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;DS(e.current,2,null,e,null,null),Ux(),t[Fl]=null}};function Vx(e){this._internalRoot=e}Vx.prototype.unstable_scheduleHydration=function(e){if(e){var t=aj();e={blockedOn:null,target:e,priority:t};for(var n=0;n<li.length&&t!==0&&t<li[n].priority;n++);li.splice(n,0,e),n===0&&HS(e)}};var kw=U6.version;if(kw!=="19.3.0")throw Error(X(527,kw,"19.3.0"));Oe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(X(188)):(e=Object.keys(e).join(","),Error(X(268,e)));return e=NO(t),e=e!==null?W6(e):null,e=e===null?null:e.stateNode,e};var zB={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:me,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Kd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kd.isDisabled&&Kd.supportsFiber)try{Hu=Kd.inject(zB),Yn=Kd}catch{}}Ex.createRoot=function(e,t){if(!F6(e))throw Error(X(299));var n=!1,s="",r=j8,i=S8,a=C8;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=OS(e,1,!1,null,null,n,s,null,r,i,a,PS),e[Fl]=t.current,xk(e),new jk(t)};Ex.hydrateRoot=function(e,t,n){if(!F6(e))throw Error(X(299));var s=!1,r="",i=j8,a=S8,l=C8,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=OS(e,1,!0,t,n??null,s,r,c,i,a,l,PS),t.context=LS(null),n=t.current,s=Jn(),s=Ey(s),r=bi(s),r.callback=null,vi(n,r,s),n=s,t.current.lanes=n,Uu(t,n),xr(t),e[Fl]=t.current,xk(e),new Vx(t)};Ex.version="19.3.0";function US(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(US)}catch(e){console.error(e)}}US(),q6.exports=Ex;var FS=q6.exports;let qn=null,bw=null;const vw=["data-theme",Cn("theme")];function AB(e){const t=()=>{let s=null;for(const r of vw){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:[...vw]})}function MB(){if(qn)return qn;if(typeof document>"u")throw new Error("useToast: Cannot create fallback viewport during SSR. Wrap your app with <LayerProvider> or <AppShell>.");T0();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(vx),l=x.useRef(!1);return x.useEffect(()=>{a&&!l.current&&(l.current=!0,qn=a,t==null||t(a))},[a]),null};bw=FS.createRoot(e),bw.render(o.jsx(V0,{children:o.jsx(s,{})}));const r=[],i={addToast:a=>{qn&&qn!==i?qn.addToast(a):(r.push(a),n.then(l=>{for(const c of r)l.addToast(c);r.length=0}))},removeToast:(a,l)=>{qn&&qn!==i&&qn.removeToast(a,l)},findByUniqueID:a=>{if(qn&&qn!==i)return qn.findByUniqueID(a)}};return qn=i,i}let RB=0;function _B(){return`astryx-toast-${++RB}`}function IB(){const e=x.use(vx);return x.useCallback(n=>{const s=e??MB(),r=_B(),i={id:r,options:n,createdAt:Date.now()};return s.addToast(i),()=>s.removeToast(r,"manual")},[e])}const Ap={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}},OB={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 fr({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,...F(U("statusdot",{variant:e}),q(Ap.base,OB[e],n&&Ap.pulsing,n&&Ap.reducedMotion,r),i,a),...c});return s?o.jsx(Di,{content:s,children:u}):u}fr.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 LB=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 DB(e,t,n=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:LB(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 BB=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 qB=e=>{const t=BB(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 Tm=(...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 Qi={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 Mp(e){return e!=null}function HB(e,t={}){var h,p;const n=t.attributeNames??{},s=g=>n[g]??g,r=e.size??e.width??Qi.width,i=e.size??e.height??Qi.height,a=((h=e.aliases)==null?void 0:h.filter(g=>typeof g=="string"&&g.trim()!=="").map(g=>`lucide-${g}`))??[],l=[...e.name?[`lucide-${e.name}`]:[],...a],c=((p=t.className)==null?void 0:p.split(" ").filter(Boolean))??[],u=t.includeDefaultClasses===!1?Tm(...c):Tm("lucide",...l,...c),d=t.absoluteStrokeWidth?Number(t.strokeWidth??Qi["stroke-width"])*Number(e.size??e.width??Qi.width)/Number(t.size??t.width??Qi.width):t.strokeWidth??Qi["stroke-width"];return["svg",{...Object.entries(Qi).reduce((g,[b,k])=>(g[s(b)]=k,g),{}),..."color"in t&&t.color&&{[s("stroke")]:t.color},..."size"in t&&Mp(t.size)&&{[s("width")]:t.size,[s("height")]:t.size},..."width"in t&&Mp(t.width)&&{[s("width")]:t.width},..."height"in t&&Mp(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(g=>{const[b,k,m]=g,y=t.nonScalingStroke?{[s("vector-effect")]:"non-scaling-stroke",...k}:k;return m?[b,y,m]:[b,y]})]}/**
|
|
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 PB(e,t={}){return HB(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 UB=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},FB=x.createContext({}),GB=()=>x.useContext(FB),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:g=2,absoluteStrokeWidth:b=!1,nonScalingStroke:k=!1,color:m="currentColor",className:y=""}=GB()??{},v=!!c||UB(f),[w,j,C=[]]=PB(d,{color:e??m,width:n??t??p,height:s??t??p,strokeWidth:r??g,absoluteStrokeWidth:i??b,nonScalingStroke:a??k,className:Tm(y,l),hasA11yProp:v,attributes:f});return x.createElement(w,{ref:h,...j},[...C.map(([$,E])=>x.createElement($,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 Ge(e,t=[],n=[]){const s=typeof e=="string"?DB(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=qB(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 GS={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};GS.node;const WB=Ge(GS);/**
|
|
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 VS={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"}]]};VS.node;const KB=Ge(VS);/**
|
|
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 WS={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};WS.node;const XB=Ge(WS);/**
|
|
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 KS={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"}]]};KS.node;const ZB=Ge(KS);/**
|
|
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 XS={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"}]]};XS.node;const YB=Ge(XS);/**
|
|
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 ZS={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};ZS.node;const QB=Ge(ZS);/**
|
|
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 YS={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};YS.node;const JB=Ge(YS);/**
|
|
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 QS={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};QS.node;const eq=Ge(QS);/**
|
|
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 JS={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};JS.node;const tq=Ge(JS);/**
|
|
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 e7={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"}]]};e7.node;const nq=Ge(e7);/**
|
|
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 t7={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"}]]};t7.node;const sq=Ge(t7);/**
|
|
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 n7={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"]};n7.node;const rq=Ge(n7);/**
|
|
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 s7={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"]};s7.node;const iq=Ge(s7);/**
|
|
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 r7={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};r7.node;const aq=Ge(r7);/**
|
|
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 i7={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"]};i7.node;const oq=Ge(i7);/**
|
|
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 a7={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"}]]};a7.node;const lq=Ge(a7);/**
|
|
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 o7={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"]};o7.node;const cq=Ge(o7);/**
|
|
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 l7={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"}]]};l7.node;const uq=Ge(l7);/**
|
|
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 c7={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"}]]};c7.node;const dq=Ge(c7);/**
|
|
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 u7={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"]};u7.node;const fq=Ge(u7);/**
|
|
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 d7={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"}]]};d7.node;const hq=Ge(d7);/**
|
|
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 f7={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};f7.node;const xq=Ge(f7);/**
|
|
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 h7={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"}]]};h7.node;const pq=Ge(h7);/**
|
|
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 x7={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};x7.node;const gq=Ge(x7);/**
|
|
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 p7={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};p7.node;const mq=Ge(p7);/**
|
|
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 g7={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"]};g7.node;const yq=Ge(g7);/**
|
|
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 m7={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"}]]};m7.node;const kq=Ge(m7);/**
|
|
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 y7={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};y7.node;const bq=Ge(y7);var Ue={size:"1em","aria-hidden":!0},vq={close:o.jsx(bq,{...Ue}),chevronDown:o.jsx(JB,{...Ue}),chevronLeft:o.jsx(eq,{...Ue}),chevronRight:o.jsx(tq,{...Ue}),chevronsLeft:o.jsx(nq,{...Ue}),chevronsRight:o.jsx(sq,{...Ue}),check:o.jsx(QB,{...Ue}),success:o.jsx(rq,{...Ue}),error:o.jsx(iq,{...Ue}),warning:o.jsx(yq,{...Ue}),info:o.jsx(hq,{...Ue}),calendar:o.jsx(ZB,{...Ue}),clock:o.jsx(aq,{...Ue}),externalLink:o.jsx(uq,{...Ue}),menu:o.jsx(xq,{...Ue}),moreHorizontal:o.jsx(cq,{...Ue}),search:o.jsx(gq,{...Ue}),arrowUp:o.jsx(XB,{...Ue}),arrowDown:o.jsx(WB,{...Ue}),arrowsUpDown:o.jsx(KB,{...Ue}),funnel:o.jsx(fq,{...Ue}),eyeSlash:o.jsx(dq,{...Ue}),viewColumns:o.jsx(oq,{...Ue}),copy:o.jsx(lq,{...Ue}),checkDouble:o.jsx(YB,{...Ue}),wrench:o.jsx(kq,{...Ue}),stop:o.jsx(mq,{...Ue}),microphone:o.jsx(pq,{...Ue})};const wq={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:vq};function jq(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 g=f[p];if(s.has(g.id)||s.set(g.id,{summary:g,children:[]}),p<f.length-1){const b=s.get(f[p+1].id),k=s.get(g.id);b.children.includes(k)||b.children.push(k)}}}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 Rr(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 Sq(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 Cq(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 ww={"needs-answer":3,failed:2,running:1};function $q(e){let t;const n=s=>{const r=s.summary.status;r!==void 0&&(t===void 0||ww[r]>ww[t])&&(t=r);for(const i of s.children)n(i)};return n(e),t}function Eq(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 Sk(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 Mn(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 Wx(e,t){let n=Rr(e,t);for(let s=0;n!==void 0&&n.summary.parent!==void 0&&s<4;s++)n=Rr(e,n.summary.parent);return n}function k7(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 Ck(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 k7(e)){const r=s.children.filter(i=>i.summary.kind==="subagent");r.length>0&&t.push({owner:s.summary,label:Mn(s.summary),tasks:[...r]})}return t}function b7(e,t,n){var s;return(((s=Rr(e,t))==null?void 0:s.children)??[]).filter(r=>r.summary.forkedAt===n).map(r=>r.summary.id)}function zl(){typeof Notification>"u"||Notification.permission!=="default"||Notification.requestPermission()}const Tq=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 zq(e,t){const n=[],s=[],r=new Map;for(const i of Tq(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:Mn(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:Mn(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}=zq(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 Kx(e){const t=e.docs["pi.live"];return(t==null?void 0:t.run)!==void 0}const Mq="92px";function Rq(e){var n;return(typeof document>"u"||(n=document.documentElement)==null?void 0:n.dataset.pinomadPlatform)==="darwin"?"darwin":"other"}function v7(e=Rq()){return e==="darwin"?{platform:e,reserveMacTrafficLights:!0,safeLeft:Mq}:{platform:e,reserveMacTrafficLights:!1,safeLeft:"0px"}}const _q={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none"},w7=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,g=p!==void 0?{strokeWidth:p,stroke:"currentColor"}:{},b={ref:h,..._q,width:t,height:t,color:c||e,className:r,...g,...f},m=[...a&&i?i:l].sort(([,y],[,v])=>{const w=y.opacity!==void 0;return v.opacity!==void 0?1:w?-1:0}).map(([y,v])=>{const w=v.opacity!==void 0,j=w&&!d?v.opacity:void 0,C=u?{...v.stroke!==void 0?{stroke:w?u:c||e}:{fill:w?u:c||e}}:{};return x.createElement(y,{...v,...g,...C,opacity:j,key:v.key})});return x.createElement("svg",b,m)});w7.displayName="HugeiconsIcon";const Iq=[["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"}]],Oq=[["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"}]],Lq=[["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"}]],Dq=[["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"}]],Bq=[["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"}]],qq=[["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"}]],Hq=[["path",{d:"M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 12.5L10.5 15L16 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Pq=[["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"}]],Uq=[["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"}]],Fq=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Gq=[["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"}]],Vq=[["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"}]],Wq=[["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"}]],Kq=[["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"}]],Xq=[["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"}]],Zq=[["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"}]],Yq=[["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"}]],Qq=[["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"}]],Jq=[["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"}]],eH=[["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"}]],tH=[["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"}]],nH=[["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"}]],sH=[["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"}]],rH=[["path",{d:"M8 5.5L20 5.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 12.5L20 12.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M8 19.5L20 19.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M4.375 5.5H4.25M4.5 5.5C4.5 5.63807 4.38807 5.75 4.25 5.75C4.11193 5.75 4 5.63807 4 5.5C4 5.36193 4.11193 5.25 4.25 5.25C4.38807 5.25 4.5 5.36193 4.5 5.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M4.375 12.5H4.25M4.5 12.5C4.5 12.6381 4.38807 12.75 4.25 12.75C4.11193 12.75 4 12.6381 4 12.5C4 12.3619 4.11193 12.25 4.25 12.25C4.38807 12.25 4.5 12.3619 4.5 12.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M4.375 19.5H4.25M4.5 19.5C4.5 19.6381 4.38807 19.75 4.25 19.75C4.11193 19.75 4 19.6381 4 19.5C4 19.3619 4.11193 19.25 4.25 19.25C4.38807 19.25 4.5 19.3619 4.5 19.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}]],iH=[["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"}]],aH=[["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"}]],oH=[["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"}]],lH=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M19.5 12C19.5 11.0151 19.306 10.0398 18.9291 9.12987C18.5522 8.21993 17.9997 7.39314 17.3033 6.6967C16.6069 6.00026 15.7801 5.44781 14.8701 5.0709C13.9602 4.69399 12.9849 4.5 12 4.5L12 12H19.5Z",fill:"currentColor",key:"1"}]],cH=[["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"}]],uH=[["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"}]],dH=[["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"}]],fH=[["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"}]],hH=[["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"}]],xH=[["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"}]],pH=[["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"}]],gH=[["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"}]],mH=[["path",{d:"M5 14L8.5 17.5L19 6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],yH=[["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"}]],kH=[["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"}]],bH=1.5;function Ee(e){return function(n){return o.jsx(w7,{color:"currentColor",icon:e,strokeWidth:bH,...n})}}const j7=Ee(Oq),S7=Ee(Lq),C7=Ee(Dq),Xx=Ee(dH),Rf=Ee(qq),vH=Ee(Bq),$k=Ee(Pq),Hr=Ee(Uq),Ih=Ee(mH),$7=Ee(Hq),wH=Ee(Fq),wu=Ee(Gq),jH=Ee(Wq),Ek=Ee(Xq),E7=Ee(Zq),Al=Ee(Yq),zm=Ee(Jq),SH=Ee(Qq),Oh=Ee(eH),CH=Ee(tH),$H=Ee(nH),EH=Ee(sH),NH=Ee(lH),TH=Ee(rH),zH=Ee(iH),Qu=Ee(aH),N7=Ee(oH),el=Ee(Iq),AH=Ee(cH),MH=Ee(uH),RH=Ee(fH),_H=Ee(hH),IH=Ee(xH),T7=Ee(Vq),OH=Ee(pH),LH=Ee(gH),z7=Ee(Kq),DH=Ee(yH),A7=Ee(kH);function Nk(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",""))},g=()=>{f=!1,u.removeAttribute("data-icon-hover")};return d.addEventListener("pointerenter",h),d.addEventListener("pointermove",p),d.addEventListener("pointerleave",g),()=>{d.removeEventListener("pointerenter",h),d.removeEventListener("pointermove",p),d.removeEventListener("pointerleave",g),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 BH=Nk("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"})]}),Am=Nk("sidebar",M7),qH=Nk("sidebar",o.jsx("g",{transform:"translate(24 0) scale(-1 1)",children:M7}));function R7(){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 HH(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 PH(e){if(e==="/")return;const t=e.lastIndexOf("/");return t===0?"/":e.slice(0,t)}const jw=e=>e instanceof Error?e.message:String(e);function UH({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),g=x.useRef(!1);x.useEffect(()=>(g.current=!0,()=>{g.current=!1}),[]);const b=x.useRef(0),k=x.useRef(void 0),m=x.useCallback(j=>{const C=++b.current;k.current=j,l(!0),u(void 0),f(void 0),e.controller.listFolders(j).then($=>{!g.current||C!==b.current||(i($),l(!1))},$=>{!g.current||C!==b.current||(u(jw($)),l(!1))})},[e]);x.useEffect(()=>m(),[m]);const y=()=>{r!==void 0&&(p(!0),f(void 0),e.controller.addProject(r.path).then(j=>{g.current&&n(j)},j=>{g.current&&(p(!1),f(jw(j)))}))},v=r===void 0?[]:HH(r.path,r.home),w=r===void 0?void 0:PH(r.path);return o.jsx(ns,{isOpen:!0,onOpenChange:j=>j?void 0:s(),purpose:"form",width:480,children:o.jsx(Rn,{header:o.jsx(ss,{title:"Add project",subtitle:"Choose a folder on the host.",onOpenChange:()=>s()}),content:o.jsxs(_n,{children:[o.jsxs(we,{gap:1,vAlign:"center",children:[o.jsx(kn,{icon:o.jsx(C7,{"aria-hidden":"true"}),label:"Parent folder",tooltip:"Parent folder",size:"sm",variant:"ghost",isDisabled:w===void 0||h,onClick:()=>m(w)}),v.length===0?null:o.jsx(d4,{variant:"supporting",label:"Folders",separator:o.jsx(Hr,{"aria-hidden":"true",className:"size-3"}),children:v.map((j,C)=>o.jsx(m4,{isCurrent:C===v.length-1,onClick:C===v.length-1||h?void 0:()=>m(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(se,{type:"supporting",children:c}),o.jsx(ne,{label:"Try again",variant:"secondary",isDisabled:h,onClick:()=>m(k.current)})]}):r===void 0?null:r.folders.length===0?o.jsx(se,{type:"supporting",children:"No subfolders"}):o.jsx(qt,{density:"compact",children:r.folders.map(j=>o.jsx(ct,{label:j.name,startContent:o.jsx(Al,{"aria-hidden":"true"}),endContent:o.jsx(Hr,{"aria-hidden":"true"}),isDisabled:h,onClick:()=>m(j.path)},j.path))})})]}),footer:o.jsx(Bi,{children:o.jsxs(we,{gap:2,vAlign:"center",hAlign:"between",children:[d===void 0?o.jsx(se,{type:"supporting",maxLines:1,wordBreak:"break-all","data-testid":"picker-path",children:r==null?void 0:r.path}):o.jsx(se,{type:"supporting",role:"alert",maxLines:1,style:{color:"var(--danger)"},children:d}),o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(ne,{label:"Cancel",variant:"secondary",onClick:s}),o.jsx(ne,{label:"Add project",variant:"primary",isDisabled:!t||r===void 0||a||h,onClick:y})]})]})})})})}function FH({project:e,remote:t,connected:n,onClose:s}){const r=()=>{t.controller.removeProject(e.path),s()};return o.jsx(ns,{isOpen:!0,onOpenChange:i=>i?void 0:s(),purpose:"form",width:480,children:o.jsx(Rn,{header:o.jsx(ss,{title:`Remove project ${e.name}?`,subtitle:"The directory and its conversations are kept; only the registration is removed.",onOpenChange:()=>s()}),content:o.jsx(_n,{}),footer:o.jsx(Bi,{children:o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(ne,{label:"Cancel",variant:"secondary",onClick:s}),o.jsx(ne,{label:"Remove project",variant:"primary",isDisabled:!n,onClick:r})]})})})})}function GH({summary:e,remote:t,connected:n,onClose:s}){const r=Mn(e),[i,a]=x.useState(r),[l,c]=x.useState(!1),[u,d]=x.useState(void 0),f=x.useRef(null);x.useEffect(()=>{var g;return(g=f.current)==null?void 0:g.select()},[]);const h=i.trim(),p=()=>{h===""||h===r||l||(c(!0),d(void 0),t.controller.renameConversation(e.id,h).then(()=>s(),g=>{c(!1),d(g instanceof Error?g.message:String(g))}))};return o.jsx(ns,{isOpen:!0,onOpenChange:g=>g?void 0:s(),purpose:"form",width:480,children:o.jsx(Rn,{header:o.jsx(ss,{title:"Rename conversation",onOpenChange:()=>s()}),content:o.jsxs(_n,{children:[o.jsx(Xn,{ref:f,label:"Title",value:i,onChange:a,onEnter:p,hasAutoFocus:!0,isDisabled:l}),u===void 0?null:o.jsx(se,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:u})]}),footer:o.jsx(Bi,{children:o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(ne,{label:"Cancel",variant:"secondary",onClick:s}),o.jsx(ne,{label:"Save",variant:"primary",isDisabled:!n||l||h===""||h===r,onClick:p})]})})})})}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function Mm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const Lh=e=>e?`"${e}" `:"";function Rm(e,t=""){if(typeof e!="boolean")throw new TypeError(Lh(t)+"expected boolean, got type="+typeof e);return e}function tl(e,t=""){if(typeof e!="number")throw new TypeError(Lh(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(Lh(t)+"expected integer >= 0, got "+e);return e}function Lt(e,t,n=""){if(Mm(e)&&(t===void 0||e.length===t))return e;t!==void 0&&tl(t,"length");const s=Mm(e),r=t!==void 0?` of length ${t}`:"",i=s?`length=${e.length}`:`type=${typeof e}`,a=Lh(n)+"expected Uint8Array"+r+", got "+i;throw s?new RangeError(a):new TypeError(a)}const Sw=(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 Cw(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function VH(e,t){Lt(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function Nr(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Ni(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function WH(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const nl=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function KH(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function XH(e){for(let t=0;t<e.length;t++)e[t]=KH(e[t]);return e}const xa=nl?e=>e:XH;function ZH(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 YH(e,t){if(ZH(e,t)&&e.byteOffset<t.byteOffset)throw new Error("complex overlap of input and output is not supported")}function QH(e,t){return Sw(e,"defaults"),Sw(t,"opts"),Object.assign(e,t)}function JH(e,t){if(e=Lt(e),t=Lt(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 eP(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 tP=(e,t)=>{function n(s,...r){if(Lt(s,void 0,"key"),e.nonceLength!==void 0){const f=r[0];Lt(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(Mm(r[f]))throw new Error("AAD not supported")}e.withAAD&&r[a]!==void 0&&Lt(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");Lt(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,Lt(f,void 0,"data"),c(l.encrypt.length,h),l.encrypt(f,h)},decrypt(f,h){if(Lt(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 _m(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(Lt(t,e,"output"),n&&!Dh(t))throw new Error("invalid output, must be aligned");return t}function nP(e,t,n){tl(e),tl(t),Rm(n);const s=new Uint8Array(16),r=WH(s);return r.setBigUint64(0,BigInt(t),n),r.setBigUint64(8,BigInt(e),n),s}function Dh(e){return e.byteOffset%4===0}function Bh(e){return Uint8Array.from(Lt(e))}const _7=e=>Uint8Array.from(e.split(""),t=>t.charCodeAt(0)),sP=xa(Nr(_7("expand 16-byte k"))),rP=xa(Nr(_7("expand 32-byte k")));function Re(e,t){return e<<t|e>>>32-t}const kc=64,iP=16,Im=2**32-1,$w=Uint32Array.of();function aP(e,t,n,s,r,i,a,l){const c=r.length,u=new Uint8Array(kc),d=Nr(u),f=nl&&Dh(r)&&Dh(i),h=f?Nr(r):$w,p=f?Nr(i):$w;if(!nl){for(let g=0;g<c;a++){if(e(t,n,s,d,a,l),xa(d),a>=Im)throw new Error("arx: counter overflow");const b=Math.min(kc,c-g);for(let k=0,m;k<b;k++)m=g+k,i[m]=r[m]^u[k];g+=b}return}for(let g=0;g<c;a++){if(e(t,n,s,d,a,l),a>=Im)throw new Error("arx: counter overflow");const b=Math.min(kc,c-g);if(f&&b===kc){const k=g/4;if(g%4!==0)throw new Error("arx: invalid block position");for(let m=0,y;m<iP;m++)y=k+m,p[y]=h[y]^d[m];g+=kc;continue}for(let k=0,m;k<b;k++)m=g+k,i[m]=r[m]^u[k];g+=b}}function oP(e,t){const{allowShortKeys:n,extendNonceFn:s,counterLength:r,counterRight:i,rounds:a}=QH({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return tl(r),tl(a),Rm(i),Rm(n),(l,c,u,d,f=0)=>{Lt(l,void 0,"key"),Lt(c,void 0,"nonce"),Lt(u,void 0,"data");const h=u.length,p=d!==void 0;if(d=_m(h,d,!1),p&&YH(u,d),tl(f),f<0||f>=Im)throw new Error("arx: counter overflow");const g=[];let b=l.length,k,m;if(b===32)g.push(k=Bh(l)),m=rP;else if(b===16&&n)k=new Uint8Array(32),k.set(l),k.set(l,16),m=sP,g.push(k);else throw Lt(l,32,"arx key"),new Error("invalid key size");(!nl||!Dh(c))&&g.push(c=Bh(c));let y=Nr(k);if(s){if(c.length!==24)throw new Error("arx: extended nonce must be 24 bytes");const j=c.subarray(0,16);if(nl)s(m,y,Nr(j),y);else{const C=xa(Uint32Array.from(m));s(C,y,Nr(j),y),Ni(C),xa(y)}c=c.subarray(16)}else nl||xa(y);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,g.push(c)}const w=xa(Nr(c));try{return aP(e,m,y,w,u,d,f,a),d}finally{Ni(...g)}}}function Ut(e,t){return e[t++]&255|(e[t++]&255)<<8}class lP{constructor(t){ee(this,"blockLen",16);ee(this,"outputLen",16);ee(this,"buffer",new Uint8Array(16));ee(this,"r",new Uint16Array(10));ee(this,"h",new Uint16Array(10));ee(this,"pad",new Uint16Array(8));ee(this,"pos",0);ee(this,"finished",!1);ee(this,"destroyed",!1);t=Bh(Lt(t,32,"key"));const n=Ut(t,0),s=Ut(t,2),r=Ut(t,4),i=Ut(t,6),a=Ut(t,8),l=Ut(t,10),c=Ut(t,12),u=Ut(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]=Ut(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],g=a[7],b=a[8],k=a[9],m=Ut(t,n+0),y=Ut(t,n+2),v=Ut(t,n+4),w=Ut(t,n+6),j=Ut(t,n+8),C=Ut(t,n+10),$=Ut(t,n+12),E=Ut(t,n+14);let N=i[0]+(m&8191),S=i[1]+((m>>>13|y<<3)&8191),A=i[2]+((y>>>10|v<<6)&8191),z=i[3]+((v>>>7|w<<9)&8191),M=i[4]+((w>>>4|j<<12)&8191),L=i[5]+(j>>>1&8191),R=i[6]+((j>>>14|C<<2)&8191),T=i[7]+((C>>>11|$<<5)&8191),I=i[8]+(($>>>8|E<<8)&8191),_=i[9]+(E>>>5|r),O=0,D=O+N*l+S*(5*k)+A*(5*b)+z*(5*g)+M*(5*p);O=D>>>13,D&=8191,D+=L*(5*h)+R*(5*f)+T*(5*d)+I*(5*u)+_*(5*c),O+=D>>>13,D&=8191;let B=O+N*c+S*l+A*(5*k)+z*(5*b)+M*(5*g);O=B>>>13,B&=8191,B+=L*(5*p)+R*(5*h)+T*(5*f)+I*(5*d)+_*(5*u),O+=B>>>13,B&=8191;let P=O+N*u+S*c+A*l+z*(5*k)+M*(5*b);O=P>>>13,P&=8191,P+=L*(5*g)+R*(5*p)+T*(5*h)+I*(5*f)+_*(5*d),O+=P>>>13,P&=8191;let V=O+N*d+S*u+A*c+z*l+M*(5*k);O=V>>>13,V&=8191,V+=L*(5*b)+R*(5*g)+T*(5*p)+I*(5*h)+_*(5*f),O+=V>>>13,V&=8191;let Y=O+N*f+S*d+A*u+z*c+M*l;O=Y>>>13,Y&=8191,Y+=L*(5*k)+R*(5*b)+T*(5*g)+I*(5*p)+_*(5*h),O+=Y>>>13,Y&=8191;let Z=O+N*h+S*f+A*d+z*u+M*c;O=Z>>>13,Z&=8191,Z+=L*l+R*(5*k)+T*(5*b)+I*(5*g)+_*(5*p),O+=Z>>>13,Z&=8191;let te=O+N*p+S*h+A*f+z*d+M*u;O=te>>>13,te&=8191,te+=L*c+R*l+T*(5*k)+I*(5*b)+_*(5*g),O+=te>>>13,te&=8191;let J=O+N*g+S*p+A*h+z*f+M*d;O=J>>>13,J&=8191,J+=L*u+R*c+T*l+I*(5*k)+_*(5*b),O+=J>>>13,J&=8191;let K=O+N*b+S*g+A*p+z*h+M*f;O=K>>>13,K&=8191,K+=L*d+R*u+T*c+I*l+_*(5*k),O+=K>>>13,K&=8191;let re=O+N*k+S*b+A*g+z*p+M*h;O=re>>>13,re&=8191,re+=L*f+R*d+T*u+I*c+_*l,O+=re>>>13,re&=8191,O=(O<<2)+O|0,O=O+D|0,D=O&8191,O=O>>>13,B+=O,i[0]=D,i[1]=B,i[2]=P,i[3]=V,i[4]=Y,i[5]=Z,i[6]=te,i[7]=J,i[8]=K,i[9]=re}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;Ni(s)}update(t){Cw(this),Lt(t),t=Bh(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,Ni(this.h,this.r,this.buffer,this.pad)}digestInto(t){Cw(this),VH(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 cP=eP(32,e=>new lP(e));function uP(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],g=t[4],b=t[5],k=t[6],m=t[7],y=r,v=n[0],w=n[1],j=n[2],C=a,$=l,E=c,N=u,S=d,A=f,z=h,M=p,L=g,R=b,T=k,I=m,_=y,O=v,D=w,B=j;for(let V=0;V<i;V+=2)C=C+S|0,_=Re(_^C,16),L=L+_|0,S=Re(S^L,12),C=C+S|0,_=Re(_^C,8),L=L+_|0,S=Re(S^L,7),$=$+A|0,O=Re(O^$,16),R=R+O|0,A=Re(A^R,12),$=$+A|0,O=Re(O^$,8),R=R+O|0,A=Re(A^R,7),E=E+z|0,D=Re(D^E,16),T=T+D|0,z=Re(z^T,12),E=E+z|0,D=Re(D^E,8),T=T+D|0,z=Re(z^T,7),N=N+M|0,B=Re(B^N,16),I=I+B|0,M=Re(M^I,12),N=N+M|0,B=Re(B^N,8),I=I+B|0,M=Re(M^I,7),C=C+A|0,B=Re(B^C,16),T=T+B|0,A=Re(A^T,12),C=C+A|0,B=Re(B^C,8),T=T+B|0,A=Re(A^T,7),$=$+z|0,_=Re(_^$,16),I=I+_|0,z=Re(z^I,12),$=$+z|0,_=Re(_^$,8),I=I+_|0,z=Re(z^I,7),E=E+M|0,O=Re(O^E,16),L=L+O|0,M=Re(M^L,12),E=E+M|0,O=Re(O^E,8),L=L+O|0,M=Re(M^L,7),N=N+S|0,D=Re(D^N,16),R=R+D|0,S=Re(S^R,12),N=N+S|0,D=Re(D^N,8),R=R+D|0,S=Re(S^R,7);let P=0;s[P++]=a+C|0,s[P++]=l+$|0,s[P++]=c+E|0,s[P++]=u+N|0,s[P++]=d+S|0,s[P++]=f+A|0,s[P++]=h+z|0,s[P++]=p+M|0,s[P++]=g+L|0,s[P++]=b+R|0,s[P++]=k+T|0,s[P++]=m+I|0,s[P++]=y+_|0,s[P++]=v+O|0,s[P++]=w+D|0,s[P++]=j+B|0}const dP=oP(uP,{counterRight:!1,counterLength:4,allowShortKeys:!1}),fP=new Uint8Array(16),Ew=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(fP.subarray(n))},hP=new Uint8Array(32);function Nw(e,t,n,s,r){r!==void 0&&Lt(r,void 0,"AAD");const i=e(t,n,hP),a=nP(s.length,r?r.length:0,!0),l=cP.create(i);r&&Ew(l,r),Ew(l,s),l.update(a);const c=l.digest();return Ni(i,a),c}const xP=e=>(t,n,s)=>({encrypt(i,a){const l=i.length;a=_m(l+16,a,!1),a.set(i);const c=a.subarray(0,-16);e(t,n,c,c,1);const u=Nw(e,t,n,c,s);return a.set(u,l),Ni(u),a},decrypt(i,a){a=_m(i.length-16,a,!1);const l=i.subarray(0,-16),c=i.subarray(-16),u=Nw(e,t,n,l,s);if(!JH(c,u))throw Ni(u),new Error("invalid tag");return a.set(i.subarray(0,-16)),e(t,n,a,a,1),Ni(u),a}}),Tw=tP({blockSize:64,nonceLength:12,tagLength:16,withAAD:!0},xP(dP)),pP=e=>e/2**32|0,gP=e=>e>>>0;function Om(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const Lm=e=>e?`"${e}" `:"";function Pr(e,t=""){if(typeof e!="number")throw new TypeError(Lm(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(Lm(t)+"expected integer >= 0, got "+e);return e}function vs(e,t,n=""){if(Om(e)&&(t===void 0||e.length===t))return e;t!==void 0&&Pr(t,"length");const s=Om(e),r=t!==void 0?` of length ${t}`:"",i=s?`length=${e.length}`:`type=${typeof e}`,a=Lm(n)+"expected Uint8Array"+r+", got "+i;throw s?new RangeError(a):new TypeError(a)}function zw(e){return Uint8Array.from(vs(e))}function mP(e){if(typeof e!="function"||typeof e.create!="function")throw new TypeError("expected hash wrapped by utils.createHasher");if(Pr(e.outputLen),Pr(e.blockLen),e.outputLen<1||e.blockLen<1)throw new Error("hash blockLen / outputLen must be >= 1")}const yP=(e,t)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError((t==="object"?"":`"${t}" `)+"expected object, got type="+typeof e)},Aw=(e,t)=>{yP(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 qh(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function I7(e,t){vs(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function Hh(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Dm(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Ph(e,t){return e<<32-t|e>>>t}const O7=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function L7(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const zc=O7?e=>e:e=>L7(e)>>>0;function kP(e){for(let t=0;t<e.length;t++)e[t]=L7(e[t]);return e}const bo=O7?e=>e:kP,D7=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",bP=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Tk(e){if(vs(e),D7)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=bP[e[n]];return t}function Mw(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function B7(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);if(D7)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=Mw(e.charCodeAt(i)),l=Mw(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 q7(e,t,n="opts"){return Aw(e,"defaults"),t!==void 0&&Aw(t,n),Object.assign(Object.create(null),e,t)}function vP(e,t={}){if(typeof e!="function")throw new TypeError('"hashCons" expected function, got type='+typeof e);t=q7({},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 wP(e=32){Pr(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 jP=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function H7(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 sl=(e,t,n)=>vs(e,t,n),P7=Pr;function rl(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 Kc(e,t){if(typeof e!="function")throw new TypeError(`"${t}" is invalid: expected function, got ${typeof e}`);return e}const SP=Tk,CP=e=>B7(e),U7=Om,F7=e=>wP(e),Uh=BigInt(0),Rw=BigInt(1),$P=e=>e?`"${e}" `:"";function Zx(e,t=""){if(typeof e!="boolean")throw new TypeError($P(t)+"expected boolean, got type="+typeof e);return e}function EP(e){if(typeof e=="bigint"){if(!Na(e))throw new RangeError("positive bigint expected, got "+e)}else P7(e);return e}function Bm(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 G7(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);return e===""?Uh:BigInt("0x"+e)}function V7(e){return G7(Tk(e))}function Fh(e){return G7(Tk(ju(vs(e)).reverse()))}function W7(e,t){if(Pr(t),t===0)throw new Error("zero output length is invalid");e=EP(e);const n=t*2,s=e.toString(16);if(s.length>n)throw new RangeError("number is too large");return B7(s.padStart(n,"0"))}function K7(e,t){return W7(e,t).reverse()}function ju(e){return Uint8Array.from(sl(e))}function Na(e){return typeof e=="bigint"&&Uh<=e}function X7(e,t,n){return Na(e)&&Na(t)&&Na(n)&&t<=e&&e<n}function Xc(e,t,n,s){if(!X7(t,n,s))throw new RangeError("expected valid "+e+": "+n+" <= n < "+s+", got "+t)}function NP(e){if(e<Uh)throw new Error("expected non-negative bigint, got "+e);return e===Uh?0:e.toString(2).length}const TP=e=>(Bm(e,"n"),(Rw<<BigInt(e))-Rw);function Gh(e,t={},n={},s="object"){rl(e,s),rl(t,"fields"),rl(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),st=BigInt(1),pa=BigInt(2),Z7=BigInt(3),zk=BigInt(4),Y7=BigInt(5),zP=BigInt(7),Q7=BigInt(8),AP=BigInt(9),MP=BigInt(15),J7=BigInt(16),RP=BigInt("0x10000000000000000");function nt(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 _P(e,t,n){if(n<=st)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 st;if(t===st)return e;let s=e%n;if(s<Bt&&(s+=n),t<RP){let l=st;for(;t>Bt;)t&st&&(l=l*s%n),s=s*s%n,t>>=st;return l}const r=[];for(;t>Bt;)r.push(Number(t&MP)),t>>=zk;const i=new Array(16);i[0]=st,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 Ms(e,t,n){if(n<=st)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 _w(e,t){if(e===Bt)throw new Error("invert: expected non-zero number");if(t<=st)throw new Error("invert: expected modulus > 1, got "+t);let n=nt(e,t),s=t,r=Bt,i=st;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!==st)throw new Error("invert: does not exist");return nt(r,t)}function Ak(e,t,n){const s=e;if(!s.eql(s.sqr(t),n))throw new Error("Cannot find square root")}function Mk(e,t){if((e&st)===Bt)throw new Error(t+": expected odd modulus, got "+e)}function e9(e,t){const n=e,s=(n.ORDER+st)/zk,r=n.pow(t,s);return Ak(n,r,t),r}function IP(e,t){const n=e,s=(n.ORDER-Y7)/Q7,r=n.mul(t,pa),i=n.pow(r,s),a=n.mul(t,i),l=n.mul(n.mul(a,pa),i),c=n.mul(a,n.sub(l,n.ONE));return Ak(n,c,t),c}function OP(e){const t=Rk(e),n=t9(e),s=n(t,t.neg(t.ONE)),r=n(t,s),i=n(t,t.neg(s)),a=(e+zP)/J7;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),g=u.eql(u.sqr(f),c),b=u.eql(u.sqr(h),c);d=u.cmov(d,f,g),f=u.cmov(p,h,b);const k=u.eql(u.sqr(f),c),m=u.cmov(d,f,k);return Ak(u,m,c),m}}function t9(e){if(e<Z7)throw new Error("sqrt is not defined for small field");Mk(e,"tonelliShanks");let t=e-st,n=0;for(;t%pa===Bt;)t/=pa,n++;let s=pa;const r=Rk(e);for(;Vh(r,s)===1;)if(s++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return e9;let i=r.pow(s,t);const a=(t+st)/pa;return function(c,u){const d=c;if(d.is0(u))return u;if(Vh(d,u)!==1)throw new Error("Cannot find square root");let f=n,h=d.mul(d.ONE,i),p=d.pow(u,t),g=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,k=d.sqr(p);for(;!d.eql(k,d.ONE);)if(b++,k=d.sqr(k),b===f)throw new Error("Cannot find square root");const m=st<<BigInt(f-b-1),y=d.pow(h,m);f=b,h=d.sqr(y),p=d.mul(p,h),g=d.mul(g,y)}return g}}function LP(e){return Mk(e,"Fp.sqrt"),e%zk===Z7?e9:e%Q7===Y7?IP:e%J7===AP?OP(e):t9(e)}const DP=(e,t)=>(nt(e,t)&st)===st,BP=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Su(e){if(rl(e,"field"),typeof e.ORDER!="bigint")throw new TypeError('param "ORDER" is invalid: expected bigint, got '+typeof e.ORDER);Bm(e.BYTES,"BYTES"),Bm(e.BITS,"BITS");for(const t of BP)Kc(e[t],"field."+t);if(e.BYTES<1||e.BITS<1)throw new Error("invalid field: expected BYTES/BITS > 0");if(e.ORDER<=st)throw new Error("invalid field: expected ORDER > 1, got "+e.ORDER);return e}function n9(e,t,n=!1){Su(e),H7(t,"nums"),Zx(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 Vh(e,t){Su(e);const n=e;Mk(n.ORDER,"FpLegendre");const s=(n.ORDER-st)/pa,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 qP(e,t){if(t!==void 0&&P7(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=NP(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 Iw=new WeakMap;class Ow{constructor(t,n={}){ee(this,"ORDER");ee(this,"BITS");ee(this,"BYTES");ee(this,"isLE");ee(this,"ZERO",Bt);ee(this,"ONE",st);ee(this,"_lengths");ee(this,"_mod");if(t<=st)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}=qP(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 nt(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&st)===st}neg(t){return nt(-t,this.ORDER)}eql(t,n){return t===n}sqr(t){return nt(t*t,this.ORDER)}add(t,n){return nt(t+n,this.ORDER)}sub(t,n){return nt(t-n,this.ORDER)}mul(t,n){return nt(t*n,this.ORDER)}pow(t,n){return _P(t,n,this.ORDER)}div(t,n){return nt(t*_w(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 _w(t,this.ORDER)}sqrt(t){let n=Iw.get(this);return n||Iw.set(this,n=LP(this.ORDER)),n(this,t)}toBytes(t){return this.isLE?K7(t,this.BYTES):W7(t,this.BYTES)}fromBytes(t,n=!1){sl(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?Fh(t):V7(t);if(l&&(c=nt(c,a)),!n&&!this.isValid(c))throw new Error("invalid field element: outside of range 0..ORDER");return c}invertBatch(t){return n9(this,t,!0)}cmov(t,n,s){return Zx(s,"condition"),s?n:t}}function Rk(e,t={}){return Object.freeze(Ow.prototype),new Ow(e,t)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _k=BigInt(0),Cu=BigInt(1),HP=BigInt(4),Rp=16,Lw=128,PP=5,Dw=2**31;function Ik(e){const t=e;if(typeof t!="function")throw new TypeError('"Point" expected constructor, got type='+typeof e);Kc(t.fromAffine,"Point.fromAffine"),Kc(t.fromBytes,"Point.fromBytes"),Kc(t.fromHex,"Point.fromHex"),rl(t.BASE,"Point.BASE"),rl(t.ZERO,"Point.ZERO"),Su(t.Fp),Su(t.Fn)}function UP(e,t){Ik(e),s9(t,e);const n=n9(e.Fp,t.map(s=>s.Z));return t.map((s,r)=>e.fromAffine(s.toAffine(n[r])))}function FP(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 GP(e,t){const n=e*(4*t+128);if(n>Dw)throw new Error("invalid window size: table would need ~"+Math.ceil(n/2**20)+" MiB, max "+Dw/2**20+" MiB")}function VP(e,t){if(e!==void 0){Kc(e,"randomBytes");try{const n=e(t);if(!U7(n)||n.length!==t)return}catch{return}return e}}function s9(e,t){H7(e,"points"),e.forEach((n,s)=>{if(!(n instanceof t))throw new Error("invalid point at index "+s)})}function WP(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):Na(s)&&s<n))throw new Error("invalid scalar at index "+r)})}const r9=new WeakMap;function _p(e){return r9.get(e)||1}function KP(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 XP(e,t){const n=2**t,s=n/2,r=BigInt(n-1),i=[];for(;e>_k;){let a=0;e&Cu&&(a=Number(e&r),a>=s&&(a-=n),e-=BigInt(a)),i.push(a),e>>=Cu}return i}function ZP(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+=Cu),l.push(u)}if(e!==_k)throw new Error("invalid wnaf");return l}function YP(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 QP{constructor(t,n){ee(this,"Point");ee(this,"BASE");ee(this,"ZERO");ee(this,"randomBytes");ee(this,"wnafPrecomputes",new WeakMap);ee(this,"baseCanBeBlinded");ee(this,"bits");Ik(t),this.randomBytes=VP(n,Rp),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=ZP(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 g=i[h];for(let k=1;k<a;k++)g=k===p?i[h+k]:g;const b=g.negate();f===0?u=u.add(i[h]):c=c.add(f<0?b:g)}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),!X7(n,Cu,this.Point.Fn.ORDER))throw new Error("invalid scalar")}runCT(t,n,s,r){const i=_p(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+Lw,i=this.randomBytes(Rp);if(!U7(i)||i.length!==Rp)throw new Error("randomBytes returned invalid byte array");i[0]=i[0]&63|128;const a=n+V7(i)*this.Point.Fn.ORDER;return this.runCT(t,a,r,s)}fixedWindowCT(t,n,s){const r=PP,i=1<<r,a=TP(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===Cu?!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),!Na(n))throw new Error("invalid scalar");const r=_p(t);if(r===1||n>=this.Point.Fn.ORDER)return JP(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),FP(n,this.bits);const s=Math.ceil((this.bits+Lw)/n)+1;GP(s*2**(n-1),this.Point.Fp.BYTES),r9.set(t,n),this.wnafPrecomputes.delete(t)}hasWindowSize(t){return _p(t)!==1}}function JP(e,t,n,s=!1){if(Ik(e),s9(t,e),Zx(s,"allowOversized"),WP(n,e.Fn,s?e.Fn.ORDER**HP:void 0),t.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const r=t.map(a=>KP(a,4)),i=n.map(a=>XP(a,4));return YP(e.ZERO,r,i)}function Bw(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return Su(t),t}else return Rk(e,{isLE:n})}function eU(e,t,n={},s){if(s===void 0&&(s=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);Gh(n);for(const c of["p","n","h"]){const u=t[c];if(!(Na(u)&&u!==_k))throw new Error(`CURVE.${c} must be positive bigint`)}const r=Bw(t.p,n.Fp,s),i=Bw(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 tU(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 Xd=BigInt(0),Zd=BigInt(1),Yd=BigInt(2),nU=BigInt(4),qw=BigInt(8);function sU(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 rU(e,t={}){Gh(t,{},{},"extraOpts");const n=t,s=eU("edwards",e,n,n.FpFnLE),{Fp:r,Fn:i}=s;let a=s.CURVE;const{h:l}=a;if(Vh(r,a.a)!==1)throw new Error("edwards: CURVE.a must be a square in Fp for complete addition formulas");if(Vh(r,a.d)!==-1)throw new Error("edwards: CURVE.d must be a non-square in Fp for complete addition formulas");Gh(n,{},{uvRatio:"function",randomBytes:"function"});const c=n.randomBytes===void 0?F7:n.randomBytes,u=Yd<<BigInt(r.BYTES*8)-Zd;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:Xd}}}:n.uvRatio;if(!sU(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 C=j?Zd:Xd;return Xc("coordinate "+v,w,C,u),w}function g(v){if(!(v instanceof b))throw new Error("EdwardsPoint expected")}const y=class y{constructor(w,j,C,$){ee(this,"X");ee(this,"Y");ee(this,"Z");ee(this,"T");this.X=p("x",w),this.Y=p("y",j),this.Z=p("z",C,!0),this.T=p("t",$),Object.freeze(this)}static CURVE(){return a}static fromAffine(w){if(w instanceof y)throw new Error("extended point not allowed");const{x:j,y:C}=w||{};return p("x",j),p("y",C),new y(j,C,r.ONE,r.mul(j,C))}static fromBytes(w,j=!1){const C=r.BYTES,{a:$,d:E}=a;w=ju(sl(w,C,"point")),Zx(j,"zip215");const N=ju(w),S=w[C-1];N[C-1]=S&-129;const A=Fh(N),z=j?u:r.ORDER;Xc("point.y",A,Xd,z);const M=r.sqr(A),L=r.sub(M,r.ONE),R=r.sub(r.mulN(E,M),$);let{isValid:T,value:I}=f(L,R);if(!T)throw new Error("bad point: invalid y coordinate");const _=d(I),O=(S&128)!==0;if(!j&&r.is0(I)&&O)throw new Error("bad point: x=0 and x_0=1");return O!==_&&(I=r.neg(I)),y.fromAffine({x:I,y:A})}static fromHex(w,j=!1){return y.fromBytes(CP(w),j)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(w=6,j=!0){return m.setWindowSize(this,w),j||this.multiply(Yd),this}assertValidity(){const w=this,{a:j,d:C}=a;if(w.is0())throw new Error("bad point: ZERO");const{X:$,Y:E,Z:N,T:S}=w,A=r.sqr($),z=r.sqr(E),M=r.sqr(N),L=r.sqr(M),R=r.mul(A,j),T=r.mul(r.add(R,z),M),I=r.add(L,r.mul(C,r.mul(A,z)));if(!r.eql(T,I))throw new Error("bad point: equation left != right (1)");const _=r.mul($,E),O=r.mul(N,S);if(!r.eql(_,O))throw new Error("bad point: equation left != right (2)")}equals(w){g(w);const{X:j,Y:C,Z:$}=this,{X:E,Y:N,Z:S}=w,A=r.mul(j,S),z=r.mul(E,$),M=r.mul(C,S),L=r.mul(N,$);return r.eql(A,z)&&r.eql(M,L)}is0(){return this.equals(y.ZERO)}negate(){return new y(r.neg(this.X),this.Y,this.Z,r.neg(this.T))}double(){const{X:w,Y:j,Z:C}=this,$=r.sqr(w),E=r.sqr(j),N=r.mul(r.sqr(C),Yd),S=h($),A=r.addN(w,j),z=r.sub(r.subN(r.sqr(A),$),E),M=r.addN(S,E),L=r.subN(M,N),R=r.subN(S,E),T=r.mul(z,L),I=r.mul(M,R),_=r.mul(z,R),O=r.mul(L,M);return new y(T,I,O,_)}add(w){g(w);const{d:j}=a,{X:C,Y:$,Z:E,T:N}=this,{X:S,Y:A,Z:z,T:M}=w,L=r.mul(C,S),R=r.mul($,A),T=r.mul(r.mulN(N,j),M),I=r.mul(E,z),_=r.sub(r.subN(r.mulN(r.addN(C,$),r.addN(S,A)),L),R),O=r.subN(I,T),D=r.addN(I,T),B=r.sub(R,h(L)),P=r.mul(_,O),V=r.mul(D,B),Y=r.mul(_,B),Z=r.mul(O,D);return new y(P,V,Z,Y)}subtract(w){return g(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:C}=m.mulSecret(this,w,l,k);return k([j,C])[0]}multiplyUnsafe(w){if(!i.isValid(w))throw new RangeError("invalid scalar: expected 0 <= sc < curve.n");return w===Xd?y.ZERO:this.is0()||w===Zd?this:m.mulUnsafe(this,w,k)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){return m.mulUnsafe(this,a.n).is0()}toAffine(w){const j=this;let C=w;if(C!=null&&typeof C!="bigint")throw new TypeError('"invertedZ" expected bigint, got type='+typeof C);const{X:$,Y:E,Z:N}=j,S=j.is0();C==null&&(C=S?r.create(qw):r.inv(N));const A=r.mul($,C),z=r.mul(E,C),M=r.mul(N,C);if(S)return{x:r.ZERO,y:r.ONE};if(!r.eql(M,r.ONE))throw new Error("invZ was invalid");return{x:A,y:z}}clearCofactor(){return l===Zd?this:l===Yd?this.double():l===nU?this.double().double():l===qw?this.double().double().double():this.multiplyUnsafe(l)}toBytes(){const{x:w,y:j}=this.toAffine(),C=r.toBytes(j);return C[C.length-1]|=d(w)?128:0,C}toHex(){return SP(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}};ee(y,"BASE",new y(a.Gx,a.Gy,r.ONE,r.mul(a.Gx,a.Gy))),ee(y,"ZERO",new y(r.ZERO,r.ONE,r.ONE,r.ZERO)),ee(y,"Fp",r),ee(y,"Fn",i);let b=y;const k=v=>UP(b,v),m=new QP(b,c);return m.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 Ji=BigInt(0),cs=BigInt(1),Qd=BigInt(2);function Hw(e,t){return e+t-(t>>cs<<cs)}function iU(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 aU(e){return Gh(e,{P:"bigint",type:"string",adjustScalarBytes:"function",powPminus2:"function"},{randomBytes:"function",scalarMultBase:"function"}),Object.freeze({...e})}function oU(e){const t=aU(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?F7:a,d=c?255:448,f=iU(n),h=c?32:56,p=BigInt(c?9:5),g=BigInt(c?121665:39081),b=c?Qd**BigInt(254):Qd**BigInt(447),k=c?BigInt(8)*(Qd**BigInt(251)-cs):BigInt(4)*(Qd**BigInt(445)-cs),m=b+k+cs,y=T=>nt(T,n),v=w(p);function w(T){return K7(y(T),h)}function j(T){const I=ju(sl(T,h,"uCoordinate"));return c&&(I[31]&=127),y(Fh(I))}function C(T){return Fh(r(ju(sl(T,h,"scalar"))))}const $=new Set(c?[Ji,cs,n-cs,BigInt("325606250916557431795983626356110631294008115727848805560023387167927233504"),BigInt("39382357235489614581723060781553021112529911719440698176882885853963445705823")]:[Ji,cs,n-cs]);function E(T,I){const _=j(I);if($.has(_))throw new Error("invalid private or public key received");const O=z(_,C(T));if(O===Ji)throw new Error("invalid private or public key received");return w(O)}function N(T){if(l===void 0)return E(T,v);const I=C(T);Xc("scalar",I,b,m);const _=y(l(I));if(_===Ji)throw new Error("invalid private or public key received");return w(_)}const S=N,A=E;function z(T,I){Xc("u",T,Ji,n),Xc("scalar",I,b,m);const _=I,O=T;let D=cs,B=Ji,P=T,V=cs;const Y=_^_>>cs;for(let J=BigInt(d-1);J>=Ji;J--){const K=Hw(n,Y>>J);({x_2:D,x_3:P}=f(K,D,P)),{x_2:B,x_3:V}=f(K,B,V);const re=D+B,le=y(re*re),ve=D-B,ge=y(ve*ve),xe=le-ge,ce=P+V,Q=P-V,ye=y(Q*re),ue=y(ce*ve),pe=ye+ue,Le=ye-ue;P=y(pe*pe),V=y(O*y(Le*Le)),D=y(le*ge),B=y(xe*(le+y(g*xe)))}const Z=Hw(n,_);({x_2:D,x_3:P}=f(Z,D,P)),{x_2:B,x_3:V}=f(Z,B,V);const te=i(B);return y(D*te)}const M={secretKey:h,publicKey:h,seed:h},L=T=>(T=T===void 0?u(h):T,sl(T,M.seed,"seed"),T),R={randomSecretKey:L};return Object.freeze(M),Object.freeze(R),Object.freeze({keygen:tU(L,S),getSharedSecret:A,getPublicKey:S,scalarMult:E,scalarMultBase:N,utils:R,GuBytes:v.slice(),lengths:M})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Pw=BigInt(0),lU=BigInt(1),Uw=BigInt(2),cU=BigInt(3),uU=BigInt(5),dU=BigInt(8),Yx=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),fU={p:Yx,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:dU,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function i9(e){const t=BigInt(10),n=BigInt(20),s=BigInt(40),r=BigInt(80),i=Yx,l=e*e%i*e%i,c=Ms(l,Uw,i)*l%i,u=Ms(c,lU,i)*e%i,d=Ms(u,uU,i)*u%i,f=Ms(d,t,i)*d%i,h=Ms(f,n,i)*f%i,p=Ms(h,s,i)*h%i,g=Ms(p,r,i)*p%i,b=Ms(g,r,i)*p%i,k=Ms(b,t,i)*d%i;return{pow_p_5_8:Ms(k,Uw,i)*e%i,b2:l}}function hU(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Fw=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function xU(e,t){const n=Yx,s=nt(t*t*t,n),r=nt(s*s*t,n),i=i9(e*r).pow_p_5_8;let a=nt(e*s*i,n);const l=nt(t*a*a,n),c=a,u=nt(a*Fw,n),d=l===e,f=l===nt(-e,n),h=l===nt(-e*Fw,n);return d&&(a=c),(f||h)&&(a=u),DP(a,n)&&(a=nt(-a,n)),{isValid:d||f,value:a}}const Gw=rU(fU,{uvRatio:xU}),Ok=(()=>{const e=Yx,t=n=>{const{pow_p_5_8:s,b2:r}=i9(n);return nt(Ms(s,cU,e)*r,e)};return oU({P:e,type:"x25519",powPminus2:t,adjustScalarBytes:hU,scalarMultBase:n=>{const s=nt(n,Gw.Fn.ORDER);if(s===Pw)return Pw;const r=Gw.BASE.multiply(s);return nt((r.Z+r.Y)*t(nt(r.Z-r.Y,e)),e)}})})(),pU=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 ei(e,t,n,s,r){return e=e+t+r|0,s=Ph(s^e,16),n=n+s|0,t=Ph(t^n,12),{a:e,b:t,c:n,d:s}}function ti(e,t,n,s,r){return e=e+t+r|0,s=Ph(s^e,8),n=n+s|0,t=Ph(t^n,7),{a:e,b:t,c:n,d:s}}function gU(e,t={},n,s,r){if(Pr(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&&vs(a,s,"salt"),l!==void 0&&vs(l,r,"personalization")}class mU{constructor(t,n){ee(this,"buffer");ee(this,"buffer32");ee(this,"finished",!1);ee(this,"destroyed",!1);ee(this,"length",0);ee(this,"pos",0);ee(this,"blockLen");ee(this,"outputLen");ee(this,"canXOF",!1);Pr(t),Pr(n),this.blockLen=t,this.outputLen=n,this.buffer=new Uint8Array(t),this.buffer32=Hh(this.buffer)}update(t){qh(this),vs(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&&(bo(r),this.compress(r,0,!1),bo(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));bo(f);for(let h=0;c+n<i;h+=r.length,c+=n)this.length+=n,this.compress(f,h,!1);bo(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(qh(this),I7(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),bo(s),this.compress(s,0,!0),bo(s);const r=this.get(),i=t===this.buffer?s:Hh(t),a=Math.floor(this.outputLen/4);for(let d=0;d<a;d++)i[d]=zc(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 yU(e,t,n,s,r,i,a,l,c,u,d,f,h,p,g,b,k,m,y,v){let w=0;for(let j=0;j<s;j++)({a:r,b:c,c:h,d:k}=ei(r,c,h,k,n[t+e[w++]])),{a:r,b:c,c:h,d:k}=ti(r,c,h,k,n[t+e[w++]]),{a:i,b:u,c:p,d:m}=ei(i,u,p,m,n[t+e[w++]]),{a:i,b:u,c:p,d:m}=ti(i,u,p,m,n[t+e[w++]]),{a,b:d,c:g,d:y}=ei(a,d,g,y,n[t+e[w++]]),{a,b:d,c:g,d:y}=ti(a,d,g,y,n[t+e[w++]]),{a:l,b:f,c:b,d:v}=ei(l,f,b,v,n[t+e[w++]]),{a:l,b:f,c:b,d:v}=ti(l,f,b,v,n[t+e[w++]]),{a:r,b:u,c:g,d:v}=ei(r,u,g,v,n[t+e[w++]]),{a:r,b:u,c:g,d:v}=ti(r,u,g,v,n[t+e[w++]]),{a:i,b:d,c:b,d:k}=ei(i,d,b,k,n[t+e[w++]]),{a:i,b:d,c:b,d:k}=ti(i,d,b,k,n[t+e[w++]]),{a,b:f,c:h,d:m}=ei(a,f,h,m,n[t+e[w++]]),{a,b:f,c:h,d:m}=ti(a,f,h,m,n[t+e[w++]]),{a:l,b:c,c:p,d:y}=ei(l,c,p,y,n[t+e[w++]]),{a:l,b:c,c:p,d:y}=ti(l,c,p,y,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:g,v11:b,v12:k,v13:m,v14:y,v15:v}}const Ft=jP.slice();class kU extends mU{constructor(n={}){n=q7({},n);const s=n.dkLen===void 0?32:n.dkLen;super(64,s);ee(this,"v0",Ft[0]|0);ee(this,"v1",Ft[1]|0);ee(this,"v2",Ft[2]|0);ee(this,"v3",Ft[3]|0);ee(this,"v4",Ft[4]|0);ee(this,"v5",Ft[5]|0);ee(this,"v6",Ft[6]|0);ee(this,"v7",Ft[7]|0);gU(s,n,32,8,8);let{key:r,personalization:i,salt:a}=n,l=0;if(r!==void 0&&(vs(r,void 0,"key"),l=r.length),this.v0^=this.outputLen|l<<8|65536|1<<24,a!==void 0){vs(a,void 0,"salt");const c=Hh(zw(a));this.v4^=zc(c[0]),this.v5^=zc(c[1])}if(i!==void 0){vs(i,void 0,"personalization");const c=Hh(zw(i));this.v6^=zc(c[0]),this.v7^=zc(c[1])}if(r!==void 0){const c=new Uint8Array(this.blockLen);c.set(r),this.update(c),Dm(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=gP(this.length),a=pP(this.length),{v0:l,v1:c,v2:u,v3:d,v4:f,v5:h,v6:p,v7:g,v8:b,v9:k,v10:m,v11:y,v12:v,v13:w,v14:j,v15:C}=yU(pU,s,n,10,this.v0,this.v1,this.v2,this.v3,this.v4,this.v5,this.v6,this.v7,Ft[0],Ft[1],Ft[2],Ft[3],i^Ft[4],a^Ft[5],r?~Ft[6]:Ft[6],Ft[7]);this.v0^=l^b,this.v1^=c^k,this.v2^=u^m,this.v3^=d^y,this.v4^=f^v,this.v5^=h^w,this.v6^=p^j,this.v7^=g^C}destroy(){this.destroyed=!0,Dm(this.buffer32),this.set(0,0,0,0,0,0,0,0)}}const _f=vP(e=>new kU(e));class Vw{constructor(t,n){ee(this,"oHash");ee(this,"iHash");ee(this,"blockLen");ee(this,"outputLen");ee(this,"canXOF",!1);ee(this,"finished",!1);ee(this,"destroyed",!1);if(mP(t),vs(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),Dm(r)}update(t){return qh(this),this.iHash.update(t),this}digestInto(t){qh(this),I7(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 Ip=(()=>{const e=(t,n,s)=>new Vw(t,n).update(s).digest();return e.create=(t,n)=>new Vw(t,n),e})(),bU=new TextEncoder().encode("Noise_IK_25519_ChaChaPoly_BLAKE2s"),jr=32,Ww=65535,vU=2n**64n-1n,Kw=e=>_f(e,{dkLen:jr}),Wh=(...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 Xw(e,t,n){const s=Ip(_f,e,t),r=Ip(_f,s,new Uint8Array([1])),i=Ip(_f,s,Wh(r,new Uint8Array([2])));return[r,i]}function Lk(){return qm(Ok.utils.randomSecretKey())}function qm(e){if(e.length!==jr)throw new Error(`X25519 private key must be ${jr} bytes`);return{publicKey:Ok.getPublicKey(e),privateKey:e}}const Kh=(e,t)=>Ok.getSharedSecret(e.privateKey,t);var ol,ya,zu,Hm;class Op{constructor(){ze(this,zu);ze(this,ol);ze(this,ya,0n)}setKey(t){Se(this,ol,t),Se(this,ya,0n)}encrypt(t,n=new Uint8Array(0)){const s=G(this,ol);return s===void 0?t:Tw(s,W(this,zu,Hm).call(this),n).encrypt(t)}decrypt(t,n=new Uint8Array(0)){const s=G(this,ol);return s===void 0?t:Tw(s,W(this,zu,Hm).call(this),n).decrypt(t)}}ol=new WeakMap,ya=new WeakMap,zu=new WeakSet,Hm=function(){if(G(this,ya)===vU)throw new Error("nonce exhausted");const t=new Uint8Array(12);return new DataView(t.buffer).setBigUint64(4,G(this,ya),!0),Se(this,ya,G(this,ya)+1n),t};var ka,Js;class wU{constructor(){ze(this,ka);ze(this,Js);ee(this,"cipher",new Op);const t=bU;Se(this,Js,t.length<=jr?Wh(t,new Uint8Array(jr-t.length)):Kw(t)),Se(this,ka,G(this,Js).slice())}mixKey(t){const[n,s]=Xw(G(this,ka),t);Se(this,ka,n),this.cipher.setKey(s.subarray(0,jr))}mixHash(t){Se(this,Js,Kw(Wh(G(this,Js),t)))}encryptAndHash(t){const n=this.cipher.encrypt(t,G(this,Js));return this.mixHash(n),n}decryptAndHash(t){const n=this.cipher.decrypt(t,G(this,Js));return this.mixHash(t),n}get handshakeHash(){return G(this,Js)}split(){const[t,n]=Xw(G(this,ka),new Uint8Array(0)),s=new Op;s.setKey(t.subarray(0,jr));const r=new Op;return r.setKey(n.subarray(0,jr)),[s,r]}}ka=new WeakMap,Js=new WeakMap;function a9(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 jU(e,t,n,s){t.push(n.ephemeral.publicKey),e.mixHash(n.ephemeral.publicKey),e.mixKey(Kh(n.ephemeral,s)),t.push(e.encryptAndHash(n.static.publicKey)),e.mixKey(Kh(n.static,s))}function SU(e,t,n){const s=a9(t,jr).slice();return e.mixHash(s),e.mixKey(Kh(n.ephemeral,s)),e.mixKey(Kh(n.static,s)),s}const Zw=(e,t)=>{if(e.length>Ww)throw new Error(`${t} exceeds ${Ww} bytes`)};function CU(e,t){const n=new wU;return n.mixHash(e),n.mixHash(t),n}function $U(e){const t=e.ephemeral??Lk(),n=CU(e.prologue,e.remoteStatic);return{writeMessage1(s){const r=[];jU(n,r,{static:e.static,ephemeral:t},e.remoteStatic),r.push(n.encryptAndHash(s));const i=Wh(...r);return Zw(i,"handshake message"),i},readMessage2(s){Zw(s,"handshake message");const r={buffer:s,offset:0};SU(n,r,{ephemeral:t,static:e.static});const i=n.decryptAndHash(a9(r,s.length-r.offset)),[a,l]=n.split();return{payload:i,result:{send:a,receive:l,handshakeHash:n.handshakeHash}}}}}const EU=new TextEncoder().encode("pinomad/1"),o9=new TextEncoder,l9=new TextDecoder("utf-8",{fatal:!0}),NU=e=>o9.encode(JSON.stringify(e));function TU(e){try{return JSON.parse(l9.decode(e))}catch{throw new Error("handshake payload is not JSON")}}function zU(e){const t=TU(e);if((t==null?void 0:t.v)!==1)throw new Error("unsupported host hello");return{v:1}}const Ac="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function Dk(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+=Ac[s>>2]+Ac[(s&3)<<4|(r??0)>>4],r!==void 0&&(t+=Ac[(r&15)<<2|(i??0)>>6]),i!==void 0&&(t+=Ac[i&63])}return t}function Ta(e){if(e.length%4===1)throw new Error("invalid base64url");const t=new Map(Array.from(Ac,(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 Jd=65518;var Au,Mu,ll;class AU{constructor(t){ze(this,Au);ze(this,Mu);ze(this,ll,[]);Se(this,Au,t.send),Se(this,Mu,t.receive)}seal(t){const n=o9.encode(t),s=[];for(let r=0;r<=n.length;r+=Jd){const i=r+Jd>=n.length,a=new Uint8Array(1+Math.min(Jd,n.length-r));if(a[0]=i?0:1,a.set(n.subarray(r,r+Jd),1),s.push(G(this,Au).encrypt(a)),i)break}return s}open(t){const n=G(this,Mu).decrypt(t),s=n[0];if(s!==0&&s!==1)throw new Error("bad record flag");if(G(this,ll).push(n.subarray(1)),s===1)return;const r=MU(G(this,ll));return Se(this,ll,[]),l9.decode(r)}}Au=new WeakMap,Mu=new WeakMap,ll=new WeakMap;function MU(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 Pm(e){let t=e.pairing;return{label:e.url,open(n){const s=new WebSocket(e.url);s.binaryType="arraybuffer";const r=$U({prologue:EU,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(NU(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:g}=r.readMessage2(h);zU(p),i=new AU(g),t!==void 0&&(t=void 0,(f=e.onPaired)==null||f.call(e));const b=a;a=[];for(const k of b)for(const m of i.seal(k))s.send(m)}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 Um=e=>{if(typeof e!="string")return!1;try{return Ta(e).length===32}catch{return!1}},RU=e=>{if(typeof e!="string")return!1;try{const t=new URL(e).protocol;return t==="ws:"||t==="wss:"}catch{return!1}},_U=e=>{if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.serverOrigin=="string"&&t.serverOrigin!==""&&Um(t.hostId)};function c9(e){if(typeof e!="object"||e===null)return;const t=e;if(!RU(t.url)||!Um(t.hostKey)||!Um(t.privateKey))return;const n=_U(t.account)?t.account:void 0,s=typeof t.name=="string"&&t.name!==""?t.name:void 0;return{url:t.url,hostKey:t.hostKey,privateKey:t.privateKey,...s===void 0?{}:{name:s},...n===void 0?{}:{account:n}}}function u9(e){const t=l=>{if(l.name!==void 0)return l.name;try{return new URL(l.url).host}catch{return l.url}},n=e.map(t),s=e.map(()=>0),r=new Map;for(const l of n)r.set(l,(r.get(l)??0)+1);n.forEach((l,c)=>{r.get(l)>1&&(s[c]=6)});const i=l=>s[l]===0?n[l]:`${n[l]} · ${e[l].hostKey.slice(0,s[l])}`;for(;;){const l=new Map,c=new Set;if(e.forEach((d,f)=>{const h=l.get(i(f));h===void 0?l.set(i(f),f):(c.add(h),c.add(f))}),c.size===0)break;let u=!1;for(const d of c)s[d]>0&&s[d]<e[d].hostKey.length&&(s[d]+=1,u=!0);if(!u)break}const a=new Map;return e.forEach((l,c)=>a.set(l.hostKey,i(c))),a}function Bk(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(Ta(n).length!==32||Ta(s).length===0)return}catch{return}return{hostKey:n,secret:s}}function d9(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===""||Bk(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 f9=(e,t)=>fetch(e,t),kr=e=>({ok:!0,value:e}),us=(e,t)=>({ok:!1,error:{code:e,...t===void 0?{}:{status:t}}}),ef=e=>e.code==="unauthenticated";async function IU(e,t=f9){const n=new AbortController,s=setTimeout(()=>n.abort(),5e3);try{const r=await t(`${e.replace(/\/+$/,"")}/api/me`,{signal:n.signal,redirect:"manual"});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 OU(e){let t;try{t=new URL(e)}catch{return!1}const n=t.hostname,s=/^127(?:\.\d{1,3}){3}$/.test(n),r=n==="localhost"||n.endsWith(".localhost")||s||n==="::1"||n==="[::1]";return t.protocol==="https:"||t.protocol==="http:"&&r}function Xh(e){try{return new URL(e).origin}catch{return e.replace(/\/+$/,"")}}const oa=e=>typeof e=="object"&&e!==null,Yw=e=>{if(!(!oa(e)||!oa(e.user)||typeof e.user.username!="string"))return{user:{username:e.user.username}}};function bc(e){const t=e.fetch??f9,n=Xh(e.origin),s=e.credentials.mode==="bearer"?e.credentials.token:void 0,r={redirect:"manual",...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 us("network")}if(u.status===0)return us("network");const d=await u.json().catch(()=>{});if(u.status>=200&&u.status<300)return kr(d);const f=oa(d)&&typeof d.error=="string"?d.error:u.status===401?"unauthenticated":"unknown";return us(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=Yw(c.value);if(u===void 0||!oa(c.value)||typeof c.value.expiresAt!="number")return us("invalid_response");const d=c.value.token;return kr({...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=Yw(a.value);return l===void 0?us("invalid_response"):kr(l)},logout:async()=>{const a=await i("/api/logout","POST");return a.ok?kr(void 0):a},revokeAllSessions:async()=>{const a=await i("/api/sessions/revoke-all","POST");return a.ok?kr(void 0):a},createJoinToken:async()=>{const a=await i("/api/join-tokens","POST");if(!a.ok)return a;const l=a.value;return!oa(l)||typeof l.token!="string"||typeof l.expiresAt!="number"||typeof l.command!="string"?us("invalid_response"):kr({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 us("invalid_response");const l=[];for(const c of a.value){if(!oa(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 us("invalid_response");l.push({hostId:c.hostId,name:c.name,noisePublicKey:c.noisePublicKey,online:c.online,lastSeenAt:c.lastSeenAt,pairing:c.pairing})}return kr(l)},requestPairing:async a=>{const l=await i(`/api/hosts/${encodeURIComponent(a)}/pairing`,"POST");if(!l.ok)return l;const c=l.value;return!oa(c)||typeof c.url!="string"||typeof c.hostKey!="string"||typeof c.secret!="string"||typeof c.expiresAt!="number"?us("invalid_response"):kr({url:c.url,hostKey:c.hostKey,secret:c.secret,expiresAt:c.expiresAt})}}}function LU(e){return d9(`https://server.invalid/#pair=${e.hostKey}.${e.secret}&url=${encodeURIComponent(e.url)}`)}function DU(e,t,n){const s=Xh(e);return t.map(r=>{const i=n.filter(c=>c.account!==void 0&&Xh(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 BU(e){return new Promise((t,n)=>{let s;s=Pm({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 qU(e,t,n,s=BU){const r=await e.requestPairing(t);if(!r.ok)return r;const i=LU(r.value);if(i===void 0)return us("invalid_offer");const a=new URLSearchParams(i),l=Bk(a.get("pair")),c=a.get("url");if(l===void 0||c===null)return us("invalid_offer");const u=Lk();try{await s({url:c,hostKey:Ta(l.hostKey),device:u,secret:l.secret,name:n})}catch{return us("pair_rejected")}return kr({url:c,hostKey:l.hostKey,privateKey:Dk(u.privateKey),account:{serverOrigin:e.origin,hostId:t}})}const HU="ws://127.0.0.1:7420",za="pinomad.device";function qk(e){if(e!==null)try{return c9(JSON.parse(e))}catch{return}}function PU(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")??HU,token:i};const a=r.get("pair");if(a!==null){const c=Bk(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 UU(e,t){return new URL(e).host===t.host}function FU(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}async function h9(){var e,t;try{const n=await((t=(e=window.pinomadDesktop)==null?void 0:e.deviceName)==null?void 0:t.call(e));if(typeof n=="string"&&n!=="")return n}catch{}return FU(navigator.userAgent)}const $u="pinomad.activeHost",x9="pinomad.hosts",GU=()=>{const e=localStorage.getItem(x9);if(e===null)return[];let t;try{t=JSON.parse(e)}catch{return[]}return Array.isArray(t)?t.flatMap(n=>{const s=c9(n);return s===void 0?[]:[s]}):[]},If=e=>{localStorage.setItem(x9,JSON.stringify(e))};function tf(){const e=GU(),t=qk(localStorage.getItem(za));if(t===void 0)return e;if(e.some(n=>n.hostKey===t.hostKey))return localStorage.removeItem(za),e;try{If([...e,t]),localStorage.removeItem(za)}catch{}return[...e,t]}const Of={list:()=>Promise.resolve(tf()),save:e=>(If([...tf().filter(t=>t.hostKey!==e.hostKey),e]),Promise.resolve()),remove:e=>{If(tf().filter(n=>n.hostKey!==e));const t=qk(localStorage.getItem(za));return t!==void 0&&t.hostKey===e&&localStorage.removeItem(za),Promise.resolve()},setName:(e,t)=>{const n=tf();return n.some(s=>s.hostKey===e)&&If(n.map(s=>s.hostKey===e?{...s,name:t}:s)),Promise.resolve()}};function VU(e){let t;const n=async()=>{const s=qk(localStorage.getItem(za));if(s!==void 0)try{(await e.hosts.list()).some(i=>i.hostKey===s.hostKey)||await e.hosts.save(s),localStorage.removeItem(za);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),setName:(s,r)=>e.hosts.setName(s,r)}}function WU(){const e=window.pinomadDesktop;return e===void 0?Of:VU(e)}const KU={store:Of,hosts:[],activeHostKey:null,paired:e=>Of.save(e),setName:(e,t)=>Of.setName(e,t)},p9=x.createContext(KU),Yl=()=>x.useContext(p9);function XU(e,t){const{hosts:n,setName:s}=Yl(),r=t==null?void 0:t.hostName;x.useEffect(()=>{if(e===void 0||r===void 0)return;const i=n.find(a=>a.hostKey===e);i===void 0||i.name===r||s(e,r).catch(a=>console.error("Could not store the host name",a))},[e,r,n,s])}function Ju(e){localStorage.setItem($u,e),history.replaceState(null,"",window.location.pathname+window.location.search),window.location.reload()}function g9(e,t){localStorage.getItem($u)===t&&localStorage.removeItem($u),history.replaceState(null,"",window.location.pathname+window.location.search),e.remove(t).finally(()=>window.location.reload())}const Xs=e=>({ok:!1,error:{code:e}});function ZU(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 k,m;const p=await f.listHosts();if(s!==f)return{ok:!1,error:{code:"stale"}};if(!p.ok){if(ef(p.error))return r==="bearer"&&((m=(k=e.bridge)==null?void 0:k.account)==null||m.clear().catch(()=>{})),c(),p;const y=n.status==="signed-in"?n.hosts:[];return l({status:"signed-in",mode:r,user:h,serverOrigin:f.origin,hosts:y,hostsError:p.error,rejectedHostKeys:[...a]}),p}const g=await e.hosts.list().catch(()=>[]);if(s!==f)return{ok:!1,error:{code:"stale"}};const b=DU(f.origin,p.value,g);for(const y of b)if(y.linkable&&y.stored!==void 0){const v=y.stored;e.hosts.save({...v,account:{serverOrigin:f.origin,hostId:y.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 g,b;const f=e.bridge;if(f!==void 0){const k=await((g=f.account)==null?void 0:g.get().catch(()=>{}));if(k===void 0){c();return}i=k.serverOrigin;const m=bc({origin:k.serverOrigin,credentials:{mode:"bearer",token:k.token},fetch:e.fetch}),y=await m.me();if(!y.ok){ef(y.error)&&((b=f.account)==null||b.clear().catch(()=>{})),c();return}s=m,await u(m,y.value.user.username);return}if(await IU(e.origin,e.fetch)!=="enabled"){l({status:"unavailable"});return}const h=bc({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 k,m;let g;if(r==="cookie")g=bc({origin:e.origin,credentials:{mode:"cookie"},fetch:e.fetch});else{const y=p??i;if(y===void 0)return Xs("origin_required");if(!OU(y))return Xs("insecure_origin");g=bc({origin:y,credentials:{mode:"bearer"},fetch:e.fetch})}const b=await g.login(f,h);if(!b.ok)return b;if(r==="bearer"){if(b.value.token===void 0)return Xs("invalid_response");g=bc({origin:g.origin,credentials:{mode:"bearer",token:b.value.token},fetch:e.fetch}),i=g.origin,(m=(k=e.bridge)==null?void 0:k.account)==null||m.save({serverOrigin:g.origin,token:b.value.token}).catch(y=>console.error("Could not persist the account session",y))}return s=g,await u(g,b.value.user.username),{ok:!0,value:void 0}},logout:async()=>{var h,p;if(s===void 0)return Xs("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 Xs("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"?Xs("unauthenticated"):u(s,n.user),createJoinToken:async()=>{if(s===void 0)return Xs("unauthenticated");const f=await s.createJoinToken();return!f.ok&&ef(f.error)&&c(),f},pairHost:async f=>{var m;if(s===void 0)return Xs("unauthenticated");const h=e.name??(()=>"This device"),p=await qU(s,f,await h(),e.connect);if(!p.ok)return ef(p.error)&&c(),p;const g=n.status==="signed-in"?(m=n.hosts.find(y=>y.host.hostId===f))==null?void 0:m.host.name:void 0,b=g===void 0||g===""?p.value:{...p.value,name:g};a.delete(b.hostKey);try{await e.paired(b)}catch{return n.status==="signed-in"&&l({...n,unsavedHost:b}),{ok:!1,error:{code:"pairing_not_saved"}}}const k=await e.hosts.list().catch(()=>[]);for(const y of k)y.account!==void 0&&Xh(y.account.serverOrigin)===s.origin&&y.account.hostId===f&&y.hostKey!==b.hostKey&&e.hosts.remove(y.hostKey).catch(()=>{});return n.status==="signed-in"&&s!==void 0&&await u(s,n.user),{ok:!0,value:b}},retryUnsavedHost:async()=>{const f=n.status==="signed-in"?n.unsavedHost:void 0;if(f===void 0)return Xs("nothing_pending");try{await e.paired(f)}catch{return Xs("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 YU(){const{store:e,paired:t}=Yl(),[n]=x.useState(()=>ZU({origin:window.location.origin,bridge:window.pinomadDesktop,hosts:e,paired:t,name:h9}));return x.useSyncExternalStore(n.subscribe,()=>n.state),n}const ea=()=>Promise.reject(new Error("no AccountProvider")),QU={state:{status:"unavailable"},subscribe:()=>()=>{},login:ea,logout:ea,revokeAll:ea,refreshHosts:ea,createJoinToken:ea,pairHost:ea,retryUnsavedHost:ea,hostRejected:()=>{}},m9=x.createContext(QU);function JU({children:e}){const t=YU();return o.jsx(m9.Provider,{value:t,children:e})}function Qx(){const e=x.useContext(m9);return x.useSyncExternalStore(e.subscribe,()=>e.state),e}function Fm(){const[e,t]=x.useState(""),[n,s]=x.useState(),r=()=>{const i=d9(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(Xn,{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(ne,{label:"Connect",variant:"primary",isDisabled:e.trim()==="",onClick:r})]}),n===void 0?null:o.jsx(mt,{status:"error",title:"Not a pairing link",description:n})]})}function Ql(e){const[t,n]=x.useState(()=>Date.now());return x.useEffect(()=>{const s=setInterval(()=>n(Date.now()),e);return()=>clearInterval(s)},[e]),t}function ed(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 y9(){const e=Qx(),{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(se,{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(mt,{status:"warning",title:"Sign-out not confirmed",description:n}),o.jsx(eF,{account:e,state:t})]});case"signed-in":return o.jsx(tF,{account:e,state:t,onSignOutWarning:s})}}function eF({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()!==""),g=()=>{!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(Ur,{level:3,children:"Sign in"}),o.jsx(se,{type:"supporting",children:"See the hosts on your account and connect without a QR code."})]}),n?o.jsx(Xn,{label:"Server",placeholder:"https://nomad.example.com",value:s,onChange:r,onEnter:g,width:"100%"}):null,o.jsx(Xn,{label:"Username",value:i,onChange:a,onEnter:g,width:"100%"}),o.jsx(Xn,{label:"Password",type:"password",value:l,onChange:c,onEnter:g,width:"100%"}),f===void 0?null:o.jsx(mt,{status:"error",title:"Couldn't sign in",description:ed(f)}),o.jsx(ne,{label:"Sign in",variant:"primary",isLoading:u,isDisabled:!p,onClick:g})]})}function tF({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?Ju(l.hostKey):r(c.error)})};return o.jsxs(fe,{gap:4,style:{width:"100%"},children:[o.jsxs(fe,{gap:1,children:[o.jsx(Ur,{level:3,children:t.user}),o.jsxs(se,{type:"supporting",children:["Signed in to ",i]})]}),t.unsavedHost===void 0?null:o.jsx(mt,{status:"warning",title:"This pairing wasn't saved",description:"It will be lost when the app restarts.",endContent:o.jsx(ne,{label:"Retry",variant:"ghost",onClick:()=>a(t.unsavedHost)})}),o.jsx(nF,{account:e,state:t,onError:r}),s===void 0?null:o.jsx(mt,{status:"error",title:"Couldn't pair",description:ed(s)}),o.jsx(iF,{account:e}),o.jsx(oF,{account:e,onWarning:n})]})}function nF({account:e,state:t,onError:n}){const s=Ql(3e4),{activeHostKey:r}=Yl(),[i,a]=x.useState(),l=c=>{a(c),n(void 0),e.pairHost(c).then(u=>{a(void 0),u.ok?Ju(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(se,{weight:"semibold",children:"Hosts"}),o.jsx(ne,{label:"Refresh",variant:"ghost",size:"sm",onClick:()=>void e.refreshHosts()})]}),t.hostsError===void 0?null:o.jsx(mt,{status:"warning",title:"Couldn't refresh hosts",description:ed(t.hostsError)}),t.hosts.length===0?o.jsx(se,{type:"supporting",children:"No hosts yet. Add one below."}):o.jsx(qt,{density:"compact",children:t.hosts.map(c=>{var u;return o.jsx(rF,{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 sF={offline:"Offline",host_too_old:"Needs pinomad upgrade",key_mismatch:"Run pinomad join again"};function rF({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 ${Sk(l.lastSeenAt,t)}`,f=l.pairing==="available",h=b=>o.jsx(ne,{label:b,variant:"secondary",size:"sm",isLoading:r,isDisabled:!f||i,onClick:a});let p=d,g;return s?(p="This device was refused by the host",g=h("Pair again")):c==="key_changed"?(p="The host's identity changed. Pair again only if you reinstalled it.",g=o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(Nn,{label:"Key changed",color:"orange",size:"sm"}),h("Pair again")]})):c==="paired"?g=n?o.jsx(Nn,{label:"Connected",size:"sm"}):o.jsx(ne,{label:"Connect",variant:"secondary",size:"sm",onClick:()=>Ju(u.hostKey)}):(f||(p=`${d} · ${sF[l.pairing]}`),g=h("Pair")),o.jsx(ct,{label:l.name,description:p,startContent:o.jsx(fr,{variant:l.online?"success":"neutral",label:l.online?"Online":"Offline"}),endContent:g})}function iF({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(ne,{label:"Add a host",variant:"secondary",isLoading:i,onClick:l}):o.jsx(aF,{token:t,onRenew:l,onDone:()=>{n(void 0),e.refreshHosts()}}),s===void 0?null:o.jsx(mt,{status:"error",title:"Couldn't create a join command",description:ed(s)})]})}function aF({token:e,onRenew:t,onDone:n}){const s=Ql(1e3),r=Math.max(0,Math.ceil((e.expiresAt-s)/1e3));return o.jsxs(fe,{gap:2,children:[o.jsx(se,{weight:"semibold",children:"Add a host"}),o.jsx(se,{type:"supporting",children:"Run this on the machine you want to add. It installs PiNomad and joins it to your account."}),o.jsx(X0,{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(se,{type:"supporting",children:"Expired"}),o.jsx(ne,{label:"New command",variant:"secondary",size:"sm",onClick:t})]}):o.jsxs(se,{type:"supporting",children:["Works once · expires in ",Math.floor(r/60),":",String(r%60).padStart(2,"0")]}),o.jsx(ne,{label:"Done",variant:"ghost",size:"sm",onClick:n})]})]})}function oF({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(ne,{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(ne,{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(se,{type:"supporting",children:"Signing out doesn't unpair this device from its hosts. Revoke it in Devices."})]})}function k9({onClose:e}){return o.jsx(ns,{isOpen:!0,onOpenChange:t=>t?void 0:e(),width:480,children:o.jsx(Rn,{header:o.jsx(ss,{title:"Account",onOpenChange:()=>e()}),content:o.jsx(_n,{children:o.jsx("div",{style:{padding:"var(--spacing-2)"},children:o.jsx(y9,{})})})})})}function b9({onPairAnother:e,onOpenAccount:t,onForgetHost:n}){const{hosts:s,activeHostKey:r}=Yl(),i=Qx(),a=u9(s),l=s.find(c=>c.hostKey===r)??s[0];return o.jsxs(Ya,{placement:"above",button:{label:l===void 0?"Hosts":a.get(l.hostKey)??"Hosts",icon:o.jsx(wu,{"aria-hidden":"true"}),variant:"ghost",size:"sm",width:"100%"},children:[o.jsx(E4,{label:"Hosts",value:l==null?void 0:l.hostKey,onChange:Ju,children:s.map(c=>o.jsx(N4,{value:c.hostKey,label:a.get(c.hostKey)},c.hostKey))}),o.jsx(Po,{label:"Pair another host…",icon:o.jsx(el,{"aria-hidden":"true"}),onClick:e}),l===void 0?null:o.jsx(Po,{label:o.jsx("span",{className:"text-danger",children:"Forget this host…"}),icon:o.jsx(z7,{"aria-hidden":"true"}),onClick:n}),i.state.status==="unavailable"?null:o.jsx(Po,{label:"Account…",icon:o.jsx(DH,{"aria-hidden":"true"}),onClick:t})]})}function v9({onClose:e}){return o.jsx(ns,{isOpen:!0,onOpenChange:t=>t?void 0:e(),purpose:"form",width:480,children:o.jsx(Rn,{header:o.jsx(ss,{title:"Pair another host",subtitle:"Paste a pairing link from pinomad pair or Devices → Pair a device.",onOpenChange:()=>e()}),content:o.jsx(_n,{children:o.jsx(Fm,{})})})})}function w9({onClose:e}){const{store:t,hosts:n,activeHostKey:s}=Yl(),r=n.find(a=>a.hostKey===s)??n[0];if(r===void 0)return null;const i=u9(n).get(r.hostKey)??r.url;return o.jsx(ns,{isOpen:!0,onOpenChange:a=>a?void 0:e(),purpose:"form",width:480,children:o.jsx(Rn,{header:o.jsx(ss,{title:`Forget ${i}?`,subtitle:"This computer needs a new pairing link to connect to it again.",onOpenChange:()=>e()}),content:o.jsx(_n,{children:o.jsx(se,{type:"supporting",children:"The host still lists this device — revoke it under Devices on that host to remove it completely."})}),footer:o.jsx(Bi,{children:o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(ne,{label:"Cancel",variant:"secondary",onClick:e}),o.jsx(ne,{label:"Forget this host",variant:"destructive",onClick:()=>g9(t,r.hostKey)})]})})})})}function j9(){const[e,t]=x.useState(!1),[n,s]=x.useState(!1),[r,i]=x.useState(!1);return o.jsxs("div",{className:"mt-4 w-80",children:[o.jsx(b9,{onPairAnother:()=>t(!0),onOpenAccount:()=>s(!0),onForgetHost:()=>i(!0)}),e?o.jsx(v9,{onClose:()=>t(!1)}):null,n?o.jsx(k9,{onClose:()=>s(!1)}):null,r?o.jsx(w9,{onClose:()=>i(!1)}):null]})}const S9="pinomad.projectSidebar.expanded",lF=()=>{const e=window.localStorage.getItem(S9);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{}}},Qw=e=>{window.localStorage.setItem(S9,JSON.stringify(e))},Hk=e=>e.flatMap(t=>[t,...Hk(t.children)]);function Jw(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 C9({connection:e}){return e==="connected"?o.jsx(fr,{variant:"success",label:"Connected",tooltip:"Connected to the host"}):o.jsx(fr,{variant:e==="closed"?"error":"warning",label:e,tooltip:e,isPulsing:!0})}function cF({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(Am,{className:"size-4"}),label:"Collapse sidebar",size:"sm",variant:"ghost",onClick:t}),o.jsx(C9,{connection:e})]})}function e5({view:e,onOpenDevices:t,onOpenSettings:n,onPairHost:s,onOpenAccount:r,onForgetHost:i,onSelect:a}){const l=R7();return o.jsxs(o.Fragment,{children:[(l==null?void 0:l.status.state)==="ready"?o.jsx(Ls,{icon:o.jsx(MH,{"aria-hidden":"true"}),label:"Restart to update","aria-label":`Restart to update${l.status.availableVersion===void 0?"":` to PiNomad ${l.status.availableVersion}`}`,onClick:()=>l.install()}):null,o.jsx(b9,{onPairAnother:()=>{a==null||a(),s()},onOpenAccount:()=>{a==null||a(),r()},onForgetHost:()=>{a==null||a(),i()}}),o.jsx(Ls,{icon:o.jsx(wu,{"aria-hidden":"true"}),label:"Devices",isDisabled:e.connection!=="connected",onClick:()=>{t(),a==null||a()}}),o.jsx(Ls,{icon:o.jsx(_H,{"aria-hidden":"true"}),label:"Settings",isDisabled:e.connection!=="connected",onClick:()=>{n(),a==null||a()}})]})}function t5({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(Hr,{"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 Gm(){return o.jsx("span",{className:"pigui-session-glyph","data-testid":"session-glyph"})}const $9={"needs-answer":"Waiting for your answer",failed:"Failed",running:"Running"};function uF({status:e}){const t=e==="needs-answer"?"warning":e==="failed"?"error":"success",n=$9[e];return o.jsx("span",{className:"pigui-session-glyph","aria-hidden":"true",children:o.jsx(fr,{variant:t,label:n,tooltip:n,isPulsing:e!=="failed"})})}function dF({expanded:e}){const t=e?SH:Al;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(Hr,{className:"pigui-project-expansion-indicator__chevron"})]})}function n5({node:e,shown:t,disabled:n,remote:s,onSelect:r}){const{summary:i}=e,a=$q(e),l=Ck(e).reduce((h,p)=>h+p.tasks.length,0),[c,u]=x.useState(!1),d=t!==void 0&&Hk([e]).some(h=>h.summary.id===t),f=o.jsx(Ls,{icon:a===void 0?o.jsx(Gm,{}):o.jsx(uF,{status:a}),label:i.title??"New conversation",isSelected:d,isDisabled:n,endContent:o.jsx("span",{"aria-hidden":"true",className:"pigui-sidenav-actions-spacer pigui-sidenav-actions-spacer--single",children:l===0?null:o.jsxs("span",{className:"pigui-sidenav-subagent-count",children:[o.jsx(Xx,{className:"size-3"}),l]})}),onClick:()=>{s.controller.switchConversation(i.id),r==null||r()}});return o.jsxs("div",{className:"pigui-sidenav-row-with-actions pigui-sidenav-session-row",...a===void 0?{}:{"data-status":a},children:[f,a===void 0?null:o.jsx(Oi,{children:$9[a]}),o.jsx(we,{className:"pigui-sidenav-row-actions pigui-sidenav-hover-actions",gap:.5,vAlign:"center",children:o.jsx(Ya,{hasChevron:!1,button:{icon:o.jsx(Qu,{"aria-hidden":"true"}),isIconOnly:!0,label:"Conversation actions",size:"sm",variant:"ghost",isDisabled:n},items:[{label:"Rename",icon:o.jsx(N7,{"aria-hidden":"true",size:16}),onClick:()=>u(!0)},{label:"Archive",icon:o.jsx(j7,{"aria-hidden":"true",size:16}),onClick:()=>void s.controller.archive(i.id,!0)}]})}),c?o.jsx(GH,{summary:i,remote:s,connected:!n,onClose:()=>u(!1)}):null]})}function fF({view:e,remote:t,draftingChat:n,shownId:s,onDraft:r,onSelect:i}){const a=e.connection!=="connected",[l,c]=x.useState(!1),[u,d]=x.useState(),[f,h]=x.useState(lF),p=Jw("chats"),g=Jw("projects"),b=y=>{r(y),i==null||i()},k=x.useMemo(()=>{var y;return s===void 0||(y=e.organized.projects.find(({conversations:v})=>Hk(v).some(w=>w.summary.id===s)))==null?void 0:y.project.path},[s,e.organized.projects]);x.useEffect(()=>{k!==void 0&&h(y=>{if(y[k]!==!1)return y;const v={...y,[k]:!0};return Qw(v),v})},[k]);const m=y=>h(v=>{const w={...v,[y]:!(v[y]??!0)};return Qw(w),w});return o.jsxs(o.Fragment,{children:[o.jsx(hf,{isHeaderHidden:!0,title:"New chat",children:o.jsx(Ls,{icon:o.jsx(BH,{className:"size-4"}),label:"New chat",isSelected:n,isDisabled:a,onClick:()=>b({kind:"chat"})})}),o.jsxs(hf,{isHeaderHidden:!0,title:"Chats",children:[o.jsx(t5,{title:"Chats",expanded:p.expanded,contentId:p.contentId,onToggle:p.toggle,actions:o.jsx(kn,{icon:o.jsx(el,{"aria-hidden":"true"}),label:"New chat without a project",tooltip:"New chat",size:"sm",variant:"ghost",isDisabled:a,onClick:()=>b({kind:"chat"})})}),o.jsx(fe,{id:p.contentId,gap:.5,children:p.expanded?e.organized.chats.length===0?o.jsx(Ls,{icon:o.jsx(Gm,{}),isDisabled:!0,label:"No chats"}):e.organized.chats.map(y=>o.jsx(n5,{node:y,shown:s,disabled:a,remote:t,onSelect:i},y.summary.id)):null})]}),o.jsxs(hf,{isHeaderHidden:!0,title:"Projects",children:[o.jsx(t5,{title:"Projects",expanded:g.expanded,contentId:g.contentId,onToggle:g.toggle,pinnedActions:!0,actions:o.jsx(kn,{icon:o.jsx(el,{"aria-hidden":"true"}),label:"Add project",tooltip:"Add project",size:"sm",variant:"ghost",isDisabled:a,onClick:()=>c(!0)})}),o.jsx(fe,{id:g.contentId,gap:.5,children:g.expanded?e.organized.projects.length===0?o.jsx(Ls,{icon:o.jsx(Al,{"aria-hidden":"true"}),label:"Add project",isDisabled:a,onClick:()=>c(!0)}):e.organized.projects.map(({project:y,conversations:v})=>{const w=f[y.path]??!0;return o.jsxs("div",{className:"pigui-sidenav-row-with-actions",children:[o.jsx(Ls,{collapsible:{isCollapsed:!w,onCollapsedChange:()=>m(y.path)},icon:o.jsx(dF,{expanded:w}),label:y.name,isDisabled:a,endContent:o.jsx("span",{"aria-hidden":"true",className:"pigui-sidenav-actions-spacer"}),children:v.length===0?o.jsx(Ls,{icon:o.jsx(Gm,{}),isDisabled:!0,label:"No conversations"}):v.map(j=>o.jsx(n5,{node:j,shown:s,disabled:a,remote:t,onSelect:i},j.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(el,{"aria-hidden":"true"}),label:`New conversation in ${y.name}`,size:"sm",variant:"ghost",isDisabled:a,onClick:()=>b({kind:"project",path:y.path})}),o.jsx(Ya,{hasChevron:!1,button:{icon:o.jsx(Qu,{"aria-hidden":"true"}),isIconOnly:!0,label:`Project actions for ${y.name}`,size:"sm",variant:"ghost",isDisabled:a},items:[{label:"Remove project",icon:o.jsx(z7,{"aria-hidden":"true",size:16}),onClick:()=>d(y)}]})]})})]},y.path)}):null})]}),l?o.jsx(UH,{remote:t,connected:!a,onAdded:y=>{c(!1),b({kind:"project",path:y.path})},onClose:()=>c(!1)}):null,u===void 0?null:o.jsx(FH,{project:u,remote:t,connected:!a,onClose:()=>d(void 0)})]})}var la=(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))(la||{});const hF=[0,1],E9=[1,0],N9=[2,3],T9=[3,2],xF={L:hF,M:E9,Q:N9,H:T9},pF=/^\d*$/,gF=/^[A-Z0-9 $%*+./:-]*$/,Lp="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Pk=1,Uk=40,s5=3,mF=3,nf=40,yF=10,z9=[[-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]],A9=[[-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 kF{constructor(t,n,s,r){ee(this,"size");ee(this,"mask");ee(this,"modules",[]);ee(this,"types",[]);if(this.version=t,this.ecc=n,t<Pk||t>Uk)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,la.Timing),this.setFunctionModule(s,6,s%2===0,la.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,yr(r,i));this.setFunctionModule(8,7,yr(r,6)),this.setFunctionModule(8,8,yr(r,7)),this.setFunctionModule(7,8,yr(r,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,yr(r,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,yr(r,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,yr(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=yr(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,la.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,la.Alignment)}setFunctionModule(t,n,s,r=la.Function){this.modules[n][t]=s,this.types[n][t]=r}addEccAndInterleave(t){const n=this.version,s=this.ecc;if(t.length!==Lf(n,s))throw new RangeError("Invalid argument");const r=A9[s[0]][n],i=z9[s[0]][n],a=Math.floor(Vm(n)/8),l=r-a%r,c=Math.floor(a/r),u=[],d=NF(i);for(let h=0,p=0;h<r;h++){const g=t.slice(p,p+c-i+(h<l?0:1));p+=g.length;const b=TF(g,d);h<l&&g.push(0),u.push(g.concat(b))}const f=[];for(let h=0;h<u[0].length;h++)u.forEach((p,g)=>{(h!==c-i||g>=l)&&f.push(p[h])});return f}drawCodewords(t){if(t.length!==Math.floor(Vm(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]=yr(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+=s5:l>5&&t++):(this.finderPenaltyAddHistory(l,c),a||(t+=this.finderPenaltyCountPatterns(c)*nf),a=this.modules[i][u],l=1);t+=this.finderPenaltyTerminateAndCount(a,l,c)*nf}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+=s5:l>5&&t++):(this.finderPenaltyAddHistory(l,c),a||(t+=this.finderPenaltyCountPatterns(c)*nf),a=this.modules[u][i],l=1);t+=this.finderPenaltyTerminateAndCount(a,l,c)*nf}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+=mF)}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*yF,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 Sr(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 yr(e,t){return(e>>>t&1)!==0}class Fk{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 bF=[1,10,12,14],vF=[2,9,11,13],wF=[4,8,16,16];function M9(e,t){return e[Math.floor((t+7)/17)+1]}function R9(e){const t=[];for(const n of e)Sr(n,8,t);return new Fk(wF,e.length,t)}function jF(e){if(!_9(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);Sr(Number.parseInt(e.substring(n,n+s),10),s*3+1,t),n+=s}return new Fk(bF,e.length,t)}function SF(e){if(!I9(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=Lp.indexOf(e.charAt(n))*45;s+=Lp.indexOf(e.charAt(n+1)),Sr(s,11,t)}return n<e.length&&Sr(Lp.indexOf(e.charAt(n)),6,t),new Fk(vF,e.length,t)}function CF(e){return e===""?[]:_9(e)?[jF(e)]:I9(e)?[SF(e)]:[R9(EF(e))]}function _9(e){return pF.test(e)}function I9(e){return gF.test(e)}function $F(e,t){let n=0;for(const s of e){const r=M9(s.mode,t);if(s.numChars>=1<<r)return Number.POSITIVE_INFINITY;n+=4+r+s.bitData.length}return n}function EF(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 Vm(e){if(e<Pk||e>Uk)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 Lf(e,t){return Math.floor(Vm(e)/8)-z9[t[0]][e]*A9[t[0]][e]}function NF(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]=Wm(t[r],n),r+1<t.length&&(t[r]^=t[r+1]);n=Wm(n,2)}return t}function TF(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]^=Wm(i,r))}return n}function Wm(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 zF(e,t,n=1,s=40,r=-1,i=!0){if(!(Pk<=n&&n<=s&&s<=Uk)||r<-1||r>7)throw new RangeError("Invalid value");let a,l;for(a=n;;a++){const f=Lf(a,t)*8,h=$F(e,a);if(h<=f){l=h;break}if(a>=s)throw new RangeError("Data too long")}for(const f of[E9,N9,T9])i&&l<=Lf(a,f)*8&&(t=f);const c=[];for(const f of e){Sr(f.mode[0],4,c),Sr(f.numChars,M9(f.mode,a),c);for(const h of f.getData())c.push(h)}const u=Lf(a,t)*8;Sr(0,Math.min(4,u-c.length),c),Sr(0,(8-c.length%8)%8,c);for(let f=236;c.length<u;f^=253)Sr(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 kF(a,t,d,r)}function AF(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"?CF(e):Array.isArray(e)?[R9(e)]:void 0;if(!c)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);const u=zF(c,xF[n],r,i,a,s),d=MF({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 MF(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=la.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 O9={off:!0,minimal:!0,low:!0,medium:!0,high:!0,xhigh:!0,max:!0},Km=Object.keys(O9),RF=e=>typeof e=="string"&&Object.prototype.hasOwnProperty.call(O9,e),_F=64,IF=e=>e<32||e>=127&&e<=159;function OF(e){let t=e;for(;;){const s=[...(t.endsWith(".local")?t.slice(0,-6):t).trim()].filter(r=>!IF(r.codePointAt(0))).join("").slice(0,_F);if(s===t)return s;t=s}}const L9={conversations:0,index:0,devices:0,mcp:0,models:1,auth:1,settings:2,agents:6},Gk=Object.keys(L9);function r5(e){return Gk.filter(t=>L9[t]<=e)}const Dp=e=>`conversation:${e}`,i5=(e,t)=>`doc:${e}:${t}`,a5=4401,LF=4400,Bp={major:5},DF={logout:1,updateSettings:2,listFolders:3,renameConversation:4,createAgent:6,updateAgent:6,deleteAgent:6,setPushToken:7,listFiles:10};function ds(e,t){return e>=(DF[t]??0)}const BF={images:5,acceptAccountDevices:8,apnsPush:9,agentConversations:10,liveBranch:11,hostName:12};function tr(e,t){return e>=BF[t]}[...Gk];function qF({view:e,remote:t,self:n,onClose:s}){const r=e.connection==="connected",i=n===void 0?void 0:Dk(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(ns,{isOpen:!0,onOpenChange:f=>f?void 0:s(),width:440,children:o.jsx(Rn,{header:o.jsx(ss,{title:"Devices",subtitle:"Paired devices can reach this host over the secure channel.",onOpenChange:()=>s()}),content:o.jsx(_n,{children:o.jsxs(fe,{gap:4,padding:2,children:[e.devices.length===0?o.jsx(se,{type:"supporting",children:"No paired devices."}):o.jsx(qt,{density:"compact",children:e.devices.map(f=>o.jsx(FF,{device:f,isSelf:f.publicKey===i,connected:r,remote:t},f.publicKey))}),o.jsx(HF,{view:e,remote:t}),c===void 0?null:o.jsx(mt,{status:"error",title:"Could not create a pairing offer",description:c}),a===void 0?o.jsx(ne,{label:"Pair a device",variant:"secondary",isDisabled:!r,onClick:d}):o.jsx(GF,{url:a.url,expiresAt:a.expiresAt,onRenew:d})]})})})})}function HF({view:e,remote:t}){var s;const n=(s=e.host)==null?void 0:s.protocol.minor;return e.settings===null||n===void 0||!tr(n,"acceptAccountDevices")?null:o.jsx(R6,{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"},UF=new Intl.DateTimeFormat(void 0,{dateStyle:"short",timeStyle:"short"});function FF({device:e,isSelf:t,connected:n,remote:s}){const r=e.source===void 0?"":` ${PF[e.source]}`;return o.jsx(ct,{label:e.name,description:`Paired ${UF.format(e.pairedAt)}${r}`,endContent:o.jsxs(we,{gap:2,vAlign:"center",children:[t?o.jsx(Nn,{label:"This device",size:"sm"}):null,o.jsx(ne,{label:"Revoke",variant:"ghost",size:"sm",isDisabled:!n,onClick:()=>void s.controller.revokeDevice(e.publicKey)})]})})}function GF({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(se,{type:"supporting",children:"Expired"}),o.jsx(ne,{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(VF,{text:e}),o.jsx(se,{type:"supporting",style:{wordBreak:"break-all",userSelect:"all"},children:e}),a?o.jsx(se,{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(se,{type:"supporting",children:["Expires in ",Math.floor(i/60),":",String(i%60).padStart(2,"0")]})]})}const qp=2;function VF({text:e}){const t=x.useMemo(()=>AF(e,{border:0}),[e]),n=t.size+qp*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+qp} ${r+qp}h1v1h-1z`:"")).filter(s=>s!=="").join("")})]})}const o5=32,l5=1024,WF=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;function D9(e){return e.length>o5||!WF.test(e)?`Name must be lowercase letters, digits and hyphens (max ${o5})`:void 0}function KF(e){const t=D9(e.name);if(t!==void 0)return t;const n=e.description.trim();if(n==="")return"description is required";if(n.length>l5)return`description is too long (max ${l5})`;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&&!RF(e.thinkingLevel))return`thinkingLevel must be one of ${Km.join(", ")}`}const Eu={off:"Off",minimal:"Minimal",low:"Low",medium:"Medium",high:"High",xhigh:"X-High",max:"Max"},Hp=(e,t)=>e!==void 0&&t!==void 0&&e.provider===t.provider&&e.modelId===t.modelId,c5=["off","minimal","low","medium","high","xhigh","max"],Zh=(e,t)=>{if(e.includes(t))return t;const n=c5.indexOf(t);return e.filter(s=>c5.indexOf(s)<=n).at(-1)??"off"},ws=(e,t)=>t===void 0?void 0:e.find(n=>n.provider===t.provider&&n.modelId===t.modelId);function XF(e,t){var i;const n=ws(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} · ${Eu[t.level]}`:r}function ZF(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 YF(e,t,n){var i;const s=n.model!==void 0&&ws(e,n.model)!==void 0?n.model:ws(e,t.model)!==void 0?t.model:e[0]===void 0?void 0:{provider:e[0].provider,modelId:e[0].modelId},r=Zh(((i=ws(e,s))==null?void 0:i.thinkingLevels)??["off"],n.level);return{model:s,level:r}}const QF=e=>{const t=e.indexOf("/");return{provider:e.slice(0,t),modelId:e.slice(t+1)}};function JF(e,t,n,s,r){var b;const i=t==null?void 0:t.roles.find(k=>k.name===e),a=i===void 0||i.model===void 0?void 0:QF(i.model),l=r.model??a??s.model,c=r.model!==void 0?"override":a!==void 0?"agent":s.model!==void 0?"default":void 0,u=r.level!==void 0?"override":(i==null?void 0:i.thinkingLevel)!==void 0?"agent":"default",d=r.level??(i==null?void 0:i.thinkingLevel)??s.thinkingLevel??"off",f=ws(n,l),h=f===void 0?d:Zh(f.thinkingLevels,d),p=(b=t==null?void 0:t.problems.find(k=>k.file===`${e}.md`))==null?void 0:b.reason,g=i===void 0?{kind:"agent-missing",agent:e,...p===void 0?{}:{reason:p}}:l===void 0?{kind:"model-missing",agent:e}:f===void 0?{kind:"model-unavailable",agent:e,model:l,source:c}:void 0;return{...l===void 0?{}:{model:l},level:h,...c===void 0?{}:{modelFrom:c},levelFrom:u,send:{agent:e,...r.model===void 0?{}:{model:r.model},...r.level===void 0?{}:{thinkingLevel:r.level}},...g===void 0?{}:{problem:g}}}function Vk({models:e,selected:t,isDisabled:n=!1,sourceHint:s,problem:r,onModelChange:i,onLevelChange:a}){const[l,c]=x.useState(""),u=e.find(h=>Hp(h,t.model)),d=(u==null?void 0:u.thinkingLevels)??["off"],f=ZF(e,l);return o.jsx(W0,{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:h=>h.stopPropagation(),onMouseDown:h=>h.stopPropagation(),onPointerDown:h=>h.stopPropagation(),children:[o.jsx(Xn,{isLabelHidden:!0,label:"Search models",placeholder:"Search models",size:"sm",value:l,width:"100%",onChange:h=>c(h)}),o.jsx(qt,{"aria-label":"Model",className:"max-h-72 overflow-y-auto",density:"compact",children:f.map(h=>o.jsx(ct,{description:h.provider,endContent:Hp(h,t.model)?o.jsx(Ih,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,isSelected:Hp(h,t.model),label:h.name,onClick:()=>i({provider:h.provider,modelId:h.modelId})},`${h.provider}/${h.modelId}`))}),d.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(qt,{density:"compact",children:d.map(h=>o.jsx(ct,{endContent:h===t.level?o.jsx(Ih,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,label:Eu[h],onClick:()=>a(h)},h))})]}):null]}),children:o.jsx(ne,{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",...r===void 0?{}:{tooltip:r.title},children:o.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[r===void 0?o.jsx("span",{className:"truncate",children:XF(e,t)}):o.jsx("span",{className:"truncate text-danger",children:r.label}),s===void 0||r!==void 0?null:o.jsx("span",{className:"shrink-0 truncate text-xs text-muted",children:s}),o.jsx($k,{"aria-hidden":"true",className:"size-4 shrink-0"})]})})})}const as="",u5=e=>`${e.provider}/${e.modelId}`,d5=e=>{const t=e.indexOf("/");if(!(t<=0||t===e.length-1))return{provider:e.slice(0,t),modelId:e.slice(t+1)}};function eG({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)??as),[h,p]=x.useState((s==null?void 0:s.thinkingLevel)??as),[g,b]=x.useState((s==null?void 0:s.prompt)??""),[k,m]=x.useState(!1),[y,v]=x.useState(void 0),w=d===as?void 0:ws(e.models,d5(d)),j=[{value:as,label:"Don't pin — use the caller's model"},...e.models.map(S=>({value:u5(S),label:`${S.name} (${u5(S)})`})),...d!==as&&w===void 0?[{value:d,label:`${d} (not available)`}]:[]],C=w===void 0?Km:w.thinkingLevels,$=[{value:as,label:"Don't pin"},...C.map(S=>({value:S,label:Eu[S]})),...h!==as&&!C.includes(h)?[{value:h,label:`${Eu[h]} (not supported by this model)`}]:[]],E=S=>{f(S);const A=S===as?void 0:ws(e.models,d5(S)),z=A===void 0?Km:A.thinkingLevels;h!==as&&!z.includes(h)&&p(as)},N=()=>{const S={name:a.trim(),description:c.trim(),...d===as?{}:{model:d},...h===as?{}:{thinkingLevel:h},prompt:g.trim()},A=KF(S);if(A!==void 0){v(A);return}m(!0),v(void 0),(i?t.controller.updateAgent(S):t.controller.createAgent(S)).then(()=>r(),z=>{m(!1),v(z instanceof Error?z.message:String(z))})};return o.jsx(ns,{isOpen:!0,onOpenChange:S=>S?void 0:r(),purpose:"form",width:480,"aria-label":i?`Edit ${s.name}`:"New agent",children:o.jsx(Rn,{header:o.jsx(ss,{title:i?`Edit ${s.name}`:"New agent",onOpenChange:()=>r()}),content:o.jsx(_n,{children:o.jsxs(fe,{gap:4,children:[o.jsx(fe,{gap:1,children:o.jsx(Xn,{label:"Name",value:a,onChange:l,isDisabled:k||i,hasAutoFocus:!i,description:i?"The name is the file name and can't be changed.":void 0})}),o.jsx(Xn,{label:"Description",value:c,onChange:u,isDisabled:k}),o.jsx(tu,{label:"Model",value:d,options:j,onChange:E,isDisabled:k}),o.jsx(tu,{label:"Thinking level",value:h,options:$,onChange:S=>p(S),isDisabled:k}),o.jsx(O6,{label:"Prompt",value:g,onChange:b,isDisabled:k,rows:4}),y===void 0?null:o.jsx(se,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:y})]})}),footer:o.jsx(Bi,{children:o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(ne,{label:"Cancel",variant:"secondary",onClick:r}),o.jsx(ne,{label:"Save",variant:"primary",isDisabled:!n||k,onClick:N})]})})})})}const Xm=[{id:"providers",title:"Providers",icon:EH},{id:"models",title:"Models",icon:IH},{id:"agents",title:"Agents",icon:Xx},{id:"mcp",title:"MCP",icon:AH},{id:"chats",title:"Chats",icon:vH},{id:"archived",title:"Archived",icon:j7},{id:"about",title:"About",icon:$H}],tG=e=>Xm.find(t=>t.id===e).title,f5=e=>o.jsx(e,{"aria-hidden":"true",style:{width:"var(--spacing-4)",height:"var(--spacing-4)"}});function nG({view:e,remote:t,onClose:n}){const s=Wa("(max-width: 640px)"),[r,i]=x.useState(void 0),a=e.connection==="connected",l=r??"providers",c=o.jsx(z0,{padding:2,width:"calc(var(--spacing-10) * 7)",hasDivider:!0,children:o.jsx(jy,{"aria-label":"Settings sections",style:{width:"100%"},children:o.jsx(fe,{gap:1,children:Xm.map(d=>o.jsx(Ls,{label:d.title,icon:f5(d.icon),isSelected:d.id===l,onClick:()=>i(d.id)},d.id))})})}),u=o.jsx(qt,{density:"compact",children:Xm.map(d=>o.jsx(ct,{label:d.title,startContent:f5(d.icon),endContent:o.jsx(Hr,{"aria-hidden":"true",style:{width:"var(--spacing-4)",height:"var(--spacing-4)"}}),onClick:()=>i(d.id)},d.id))});return o.jsx(ns,{"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(Rn,{padding:4,style:{height:s?"100dvh":"min(85dvh, calc(var(--spacing-10) * 17))"},header:o.jsx(ss,{title:s&&r!==void 0?tG(r):"Settings",startContent:s&&r!==void 0?o.jsx(kn,{label:"Back",icon:o.jsx(S7,{}),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(_n,{padding:s?4:6,children:s&&r===void 0?u:o.jsx(sG,{view:e,remote:t,connected:a,section:l,showTitle:!s})})})})}function sG({view:e,remote:t,connected:n,section:s,showTitle:r}){const{title:i,supporting:a,body:l}=rG(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(Ur,{level:2,id:c,children:i}):null,a]}),l]})}function rG(e,t,n,s){switch(s){case"providers":return{title:"Providers",supporting:o.jsxs(se,{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(iG,{view:e,remote:t,connected:n})};case"models":return{title:"Models",supporting:o.jsx(se,{as:"p",type:"supporting",children:"Used when a new conversation doesn't pick its own model."}),body:o.jsx(aG,{view:e,remote:t,connected:n})};case"agents":return{title:"Agents",supporting:o.jsxs(se,{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(fG,{view:e,remote:t,connected:n})};case"mcp":return{title:"MCP",body:o.jsx(cG,{view:e})};case"chats":return{title:"Chats",supporting:o.jsx(se,{as:"p",type:"supporting",children:"How queued messages are delivered when the agent reaches the next turn."}),body:o.jsx(oG,{view:e,remote:t,connected:n})};case"archived":return{title:"Archived",supporting:o.jsx(se,{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(lG,{view:e,remote:t,connected:n})};case"about":return{title:"About",body:o.jsx(uG,{view:e,remote:t,connected:n})}}}function iG({view:e,remote:t,connected:n}){const s=e.auth;if(s===null)return o.jsx(mt,{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(se,{as:"p",type:"supporting",children:"No stored logins. Log in with the Pi CLI on the host."}):o.jsxs(o.Fragment,{children:[o.jsx(se,{as:"p",type:"supporting",children:`${r.length} provider${r.length===1?"":"s"} logged in`}),r.map(i=>o.jsx(mG,{login:i,connected:n,remote:t},i.providerId))]})})}function aG({view:e,remote:t,connected:n}){const s=e.settings;return s===null?o.jsx(mt,{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(Vk,{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(ne,{label:"Use pi's defaults",variant:"ghost",size:"sm",isDisabled:!n,onClick:()=>void t.controller.updateSettings({defaultModel:null,defaultThinkingLevel:null})}):null]})}function oG({view:e,remote:t,connected:n}){const s=e.settings;return s===null?o.jsx(mt,{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(h5,{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(h5,{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 lG({view:e,remote:t,connected:n}){const s=Ql(6e4),r=e.organized.archived;return r.length===0?o.jsx(se,{as:"p",type:"supporting",children:"No archived conversations."}):o.jsx(qt,{density:"compact",children:r.map(({node:i,project:a})=>{const l=i.summary.title??"New conversation",c=Eq(i);return o.jsx(ct,{label:l,description:[(a==null?void 0:a.name)??"Chat",c===void 0?void 0:Sk(c,s)].filter(u=>u!==void 0).join(" · "),endContent:o.jsx(ne,{label:`Restore ${l}`,variant:"secondary",size:"sm",isDisabled:!n,onClick:()=>void t.controller.archive(i.summary.id,!1),children:"Restore"})},i.summary.id)})})}function cG({view:e}){const t=e.mcp;return t===null?o.jsx(se,{as:"p",type:"supporting",children:"Loading…"}):o.jsxs(fe,{gap:3,children:[o.jsx(se,{as:"p",type:"supporting",style:{userSelect:"all"},children:t.configPath}),t.servers.length===0?o.jsx(se,{as:"p",type:"supporting",children:"No servers configured."}):o.jsx(qt,{density:"compact",children:t.servers.map(n=>o.jsx(ct,{label:n.name,endContent:o.jsx(Nn,{label:n.state,size:"sm"})},n.name))})]})}function uG({view:e,remote:t,connected:n}){const s=e.host,r=e.settings,i=r!==null&&tr((s==null?void 0:s.protocol.minor)??0,"hostName");return o.jsxs(fe,{gap:3,children:[i?o.jsx(dG,{settings:r,remote:t,connected:n}):null,o.jsxs(qt,{density:"compact",children:[o.jsx(ct,{label:"Host version",description:(s==null?void 0:s.version)??"Source checkout"}),o.jsx(ct,{label:"Protocol",description:s===void 0?"—":`${s.protocol.major}.${s.protocol.minor}`}),o.jsx(ct,{label:"Data directory",description:o.jsx("span",{style:{wordBreak:"break-all",userSelect:"all"},children:e.session.directory})}),o.jsx(ct,{label:"Settings file",description:o.jsxs("span",{style:{wordBreak:"break-all",userSelect:"all"},children:[e.session.directory,"/settings.json"]})})]}),o.jsx(se,{as:"p",type:"supporting",children:"Edit the settings file by hand only while the host is stopped."})]})}function dG({settings:e,remote:t,connected:n}){const s=e.hostName??"",[r,i]=x.useState(s);x.useEffect(()=>i(s),[s]);const a=OF(r),l=n&&a!==""&&a!==s,c=()=>void t.controller.updateSettings({hostName:a});return o.jsxs(fe,{gap:1,children:[o.jsx(Xn,{label:"Host name",value:r,onChange:i,onEnter:l?c:void 0,isDisabled:!n,description:"How paired devices name this machine. Without a custom name the hostname is used.",status:r!==""&&a===""?{type:"error",message:"The name needs at least one displayable character"}:void 0,width:"100%"}),o.jsxs(we,{gap:2,hAlign:"end",children:[e.custom.includes("hostName")?o.jsx(ne,{label:"Use machine name",variant:"ghost",size:"sm",isDisabled:!n,onClick:()=>void t.controller.updateSettings({hostName:null})}):null,o.jsx(ne,{label:"Save",variant:"secondary",size:"sm",isDisabled:!l,onClick:c})]})]})}function h5({title:e,value:t,customized:n,disabled:s,onChange:r,onReset:i}){return o.jsxs(fe,{gap:1,children:[o.jsx(se,{children:e}),o.jsxs(we,{gap:2,vAlign:"center",wrap:"wrap",children:[o.jsxs(_6,{className:"shrink-0",value:t,onChange:a=>r(a),label:e,size:"sm",isDisabled:s,children:[o.jsx(gg,{value:"one-at-a-time",label:"One at a time"}),o.jsx(gg,{value:"all",label:"All at once"})]}),n?o.jsx(ne,{label:"Use pi's default",variant:"ghost",size:"sm",isDisabled:s,onClick:i}):null]})]})}function fG({view:e,remote:t,connected:n}){const s=e.agents,[r,i]=x.useState(void 0);return s===null?o.jsx(mt,{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(ne,{label:"New agent",variant:"secondary",size:"sm",isDisabled:!n,onClick:()=>i({mode:"create"})})}),s.roles.length===0&&s.problems.length===0?o.jsx(se,{as:"p",type:"supporting",children:"No named agents yet."}):null,s.roles.map(a=>o.jsx(xG,{role:a,view:e,remote:t,connected:n,onEdit:()=>i({mode:"edit",role:a})},a.name)),s.problems.map(a=>o.jsx(pG,{problem:a,remote:t,connected:n},a.file)),r===void 0?null:o.jsx(eG,{view:e,remote:t,connected:n,...r.mode==="edit"?{role:r.role}:{},onClose:()=>i(void 0)})]})}const hG=e=>{const t=e.indexOf("/");return{provider:e.slice(0,t),modelId:e.slice(t+1)}};function xG({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:ws(t.models,hG(e.model)),d=()=>{n.controller.deleteAgent(e.name).catch(f=>{c(f instanceof Error?f.message:String(f))})};return o.jsxs(bx,{padding:4,children:[o.jsxs(we,{gap:3,vAlign:"start",children:[o.jsxs(fe,{gap:1,style:{flex:1,minInlineSize:0},children:[o.jsx(Ur,{level:3,children:e.name}),o.jsx(se,{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(Nn,{label:(u==null?void 0:u.name)??e.model,size:"sm"}),e.thinkingLevel===void 0?null:o.jsx(Nn,{label:Eu[e.thinkingLevel],size:"sm"}),e.model!==void 0&&u===void 0?o.jsx(Nn,{label:"Model not available",color:"orange",size:"sm"}):null]})]}),i?null:o.jsx(we,{gap:1,vAlign:"center",children:o.jsx(Cx,{icon:o.jsx(Qu,{"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(se,{as:"p",type:"supporting",children:"Conversations already using this agent keep their copy."}),o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(ne,{label:"Delete",variant:"destructive",size:"sm",isDisabled:!s,onClick:d}),o.jsx(ne,{label:"Cancel",variant:"ghost",size:"sm",onClick:()=>a(!1)})]})]}):null,l===void 0?null:o.jsx(se,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:l})]})}function pG({problem:e,remote:t,connected:n}){const[s,r]=x.useState(!1),[i,a]=x.useState(void 0),l=D9(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(bx,{padding:4,children:[o.jsxs(we,{gap:3,vAlign:"start",children:[o.jsxs(fe,{gap:1,style:{flex:1,minInlineSize:0},children:[o.jsx(Ur,{level:3,children:e.file}),o.jsx(we,{gap:1,wrap:"wrap",children:o.jsx(Nn,{label:"Not loaded",color:"orange",size:"sm"})}),o.jsx(se,{as:"p",type:"supporting",children:e.reason}),o.jsx(se,{as:"p",type:"supporting",children:"Fix this file on the host."})]}),s||!l?null:o.jsx(we,{gap:1,vAlign:"center",children:o.jsx(Cx,{icon:o.jsx(Qu,{"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(ne,{label:"Delete",variant:"destructive",size:"sm",isDisabled:!n,onClick:c}),o.jsx(ne,{label:"Cancel",variant:"ghost",size:"sm",onClick:()=>r(!1)})]})}):null,i===void 0?null:o.jsx(se,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:i})]})}const gG=e=>e.subscription?"Subscription connected":e.kind==="api_key"?"API key configured":"OAuth connected";function mG({login:e,connected:t,remote:n}){const[s,r]=x.useState(!1);return o.jsxs(bx,{padding:4,children:[o.jsxs(we,{gap:3,vAlign:"start",children:[o.jsxs(fe,{gap:1,style:{flex:1,minInlineSize:0},children:[o.jsx(Ur,{level:3,children:e.name}),o.jsx(se,{as:"p",type:"supporting",children:gG(e)})]}),s?null:o.jsx(we,{gap:1,vAlign:"center",children:o.jsx(Cx,{icon:o.jsx(Qu,{"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(se,{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(ne,{label:"Log out",variant:"destructive",size:"sm",isDisabled:!t,onClick:()=>void n.controller.logout(e.providerId)}),o.jsx(ne,{label:"Cancel",variant:"ghost",size:"sm",onClick:()=>r(!1)})]})]}):null]})}function ga(e,t,n){return e>=t&&e<=n}function B9(e){return e===8205}function yG(e){return ga(e,55296,56319)}function x5(e){return ga(e,127462,127487)}function q9(e){return ga(e,65024,65039)}function H9(e){return ga(e,768,879)||ga(e,6832,6911)||ga(e,7616,7679)||ga(e,65056,65071)}function Df(e){return e>65535?2:1}function p5(e,t){for(;t<e.length;){const n=e.codePointAt(t);if(H9(n)||q9(n))t+=Df(n);else break}return t}function P9(e,t){const n=e.codePointAt(t);let s=t+Df(n);for(s=p5(e,s);s<e.length-1&&B9(e.codePointAt(s));){const r=e.codePointAt(s+1);s+=1+Df(r),s=p5(e,s)}return x5(n)&&s<e.length&&x5(e.codePointAt(s))&&(s+=Df(e.codePointAt(s))),s}function U9(e){return e>=768&&(yG(e)||H9(e)||q9(e)||B9(e))}function kG(e,t){let n=0,s=0;for(;s<e.length;)if(s=P9(e,s),++n>=t)return!0;return!1}function bG(e,t){let n=0,s=0;for(;s<e.length;)if(s=P9(e,s),++n>t)return!1;return!0}function vG(e,t){if(t===0)return!0;if(e.length<t)return!1;let n=0;for(;;){if(U9(e.charCodeAt(n)))return kG(e,t);if(++n>=t)return!0}}function wG(e,t){if(e.length<=t)return!0;let n=0;for(;;){if(U9(e.charCodeAt(n)))return bG(e,t);if(++n>t)return!1}}function Pe(e){return Array.isArray(e)}function Cs(e){return oe(typeof e,"bigint")}function so(e){return oe(typeof e,"boolean")}function F9(e){if(wt(e)||!Nu(e))return!1;const t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function Nu(e){return oe(typeof e,"function")}function G9(e){return Number.isInteger(e)}function td(e){return oe(e,null)}function Ht(e){return Number.isFinite(e)}function jG(e){return xt(e)&&!Pe(e)}function xt(e){return oe(typeof e,"object")&&!td(e)}function Et(e){return oe(typeof e,"string")}function V9(e){return oe(typeof e,"symbol")}function wt(e){return oe(e,void 0)}function oe(e,t){return e===t}function W9(e,t){return e>t}function K9(e,t){return e<t}function Jl(e,t){return e<=t}function Jx(e,t){return e>=t}function SG(e,t){if(Cs(e)||Cs(t))return BigInt(e)%BigInt(t)===0n;const n=1e-10;if(!Ht(e)||G9(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 CG(e){if(!xt(e))return!1;const t=globalThis.Object.getPrototypeOf(e);return td(t)?!1:oe(typeof t.constructor,"function")&&!(oe(t.constructor,globalThis.Object)||oe(t.constructor.name,"Object"))}function X9(e){return Cs(e)||so(e)||td(e)||Ht(e)||Et(e)||wt(e)}function $G(e,t){return wG(e,t)}function EG(e,t){return vG(e,t)}function en(e,t,n){return e.every((s,r)=>r<t||n(s,r))}function Z9(e,t){return e.some((n,s)=>t(n,s))}function NG(e,t){let n=!1;return e.forEach((s,r)=>{t(s,r)&&(n=!0)}),n}function Y9(e,t){return e.reduce((n,s,r)=>t(s,r)?++n:n,0)}function e1(e){return oe(e,"__proto__")||oe(e,"constructor")||oe(e,"prototype")}function ae(e,t){return e1(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function qa(e){return Object.entries(e)}function Nt(e){return Object.getOwnPropertyNames(e)}function TG(e){return Object.getOwnPropertySymbols(e)}function zG(e,t){if(!xt(t))return!1;const n=Nt(e);return oe(n.length,Nt(t).length)&&n.every(s=>t1(e[s],t[s]))}function AG(e,t){return Pe(t)&&oe(e.length,t.length)&&e.every((n,s)=>t1(e[s],t[s]))}function t1(e,t){return Pe(e)?AG(e,t):xt(e)?zG(e,t):oe(e,t)}function MG(e){return e instanceof Boolean}function RG(e){return e instanceof Number}function _G(e){return e instanceof String}function Q9(e){return globalThis.ArrayBuffer.isView(e)}function J9(e){return e instanceof globalThis.RegExp}function IG(e){return e instanceof globalThis.Date}function OG(e){return e instanceof globalThis.Set}function LG(e){return e instanceof globalThis.Map}const DG={immutableTypes:!1,maxErrors:8,maxInstantiationCount:128,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function eC(){return DG}function BG(e){return ae(e,"~kind")||ae(e,"~unsafe")}function qG(e){const t={};for(const n of Nt(e)){if(e1(n))continue;const s=Object.getOwnPropertyDescriptor(e,n);s.value=Ha(s.value),oe(s.enumerable,!0)?t[n]=s.value:Object.defineProperty(t,n,s)}return t}function HG(e){const t={};for(const n of Nt(e))e1(n)||(t[n]=Ha(e[n]));for(const n of TG(e))t[n]=Ha(e[n]);return t}function PG(e){return CG(e)?e:BG(e)?qG(e):HG(e)}function UG(e){return e.map(t=>Ha(t))}function FG(e){return e.slice()}function GG(e){return new RegExp(e.source,e.flags)}function VG(e){return new Map(Ha([...e.entries()]))}function WG(e){return new Set(Ha([...e.values()]))}function Ha(e){return Q9(e)?FG(e):J9(e)?GG(e):LG(e)?VG(e):OG(e)?WG(e):Pe(e)?UG(e):xt(e)?PG(e):e}function KG(e){return Ha(e)}function XG(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 ZG(e,t){return{...e,...t}}function Pi(e,t,n={}){const s=ZG(t,n),r=XG(s,e);return r}function tC(e,t,n){const s=eC(),r=KG(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 YG(e){return xt(e)}function QG(e){return tC(e,{"~optional":!0},{})}function JG(e,t){return tC(QG(e),{},t)}function ro(e,t){return Pi({"~kind":"Array"},{type:"array",items:e},t)}function eV(e,t={}){return JG(e,t)}function Tr(e){return eV(e)}function tV(e){return YG(e)&&ae(e,"~optional")}function nV(e){return Nt(e).filter(t=>!tV(e[t]))}function vn(e,t={}){const n=nV(e),s=n.length>0?{required:n}:{};return Pi({"~kind":"Object"},{type:"object",...s,properties:e},t)}function Wk(e){return Pi({"~kind":"Unknown"},{},e)}function nC(e,t){var n;return((n=t[e.length])==null?void 0:n.call(t,...e))??(()=>{throw Error("Invalid Arguments")})()}function sV(){throw new Error("Unreachable")}function rV(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 iV(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 qo=BigInt("14695981039346656037");const[aV,oV]=[BigInt("1099511628211"),BigInt("18446744073709551616")],lV=Array.from({length:256}).map((e,t)=>BigInt(t)),sC=new Float64Array(1),rC=new DataView(sC.buffer),iC=new Uint8Array(sC.buffer);function Tt(e){qo=qo^lV[e],qo=qo*aV%oV}function cV(e){Tt(ln.Array);for(const t of e)Ii(t)}function uV(e){Tt(ln.BigInt),rC.setBigInt64(0,e);for(const t of iC)Tt(t)}function g5(e){Tt(ln.Boolean),Tt(e?1:0)}function dV(e){Tt(ln.Constructor),Ii(e.toString())}function fV(e){Tt(ln.Date),Ii(e.getTime())}function hV(e){Tt(ln.Function),Ii(e.toString())}function xV(e){Tt(ln.Null)}function m5(e){Tt(ln.Number),rC.setFloat64(0,e,!0);for(const t of iC)Tt(t)}function pV(e){Tt(ln.Object);for(const t of rV(e).sort())Ii(t),Ii(e[t])}function gV(e){Tt(ln.RegExp),Zm(e.toString())}const mV=new TextEncoder;function Zm(e){Tt(ln.String);for(const t of mV.encode(e))Tt(t)}function yV(e){Tt(ln.Symbol),Ii(e.toString())}function kV(e){Tt(ln.TypeArray);const t=new Uint8Array(e.buffer);for(let n=0;n<t.length;n++)Tt(t[n])}function bV(e){return Tt(ln.Undefined)}function Ii(e){return Q9(e)?kV(e):IG(e)?fV(e):J9(e)?gV(e):MG(e)?g5(e.valueOf()):_G(e)?Zm(e.valueOf()):RG(e)?m5(e.valueOf()):iV(e)?m5(e):Pe(e)?cV(e):so(e)?g5(e):Cs(e)?uV(e):F9(e)?dV(e):td(e)?xV():xt(e)?pV(e):Et(e)?Zm(e):V9(e)?yV(e):wt(e)?bV():Nu(e)?hV(e):sV()}function vV(e){return qo=BigInt("14695981039346656037"),Ii(e),qo}function wV(e){return vV(e).toString(16).padStart(16,"0")}function jV(e){return Pi({"~kind":"Boolean"},{type:"boolean"},e)}class SV extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}}function CV(e){return Cs(e)?"bigint":so(e)?"boolean":Ht(e)?"number":Et(e)?"string":(()=>{throw new SV(e)})()}function Wn(e,t){return Pi({"~kind":"Literal"},{type:CV(e),const:e},t)}function il(e){return Pi({"~kind":"Number"},{type:"number"},e)}function an(e){return Pi({"~kind":"String"},{type:"string"},e)}function n1(e,t={}){return Pi({"~kind":"Union"},{anyOf:e},t)}function Ym(e,t){return Array.from({length:t-e+1},(n,s)=>String.fromCharCode(e+s))}[...Ym(97,122),...Ym(65,90)];const $V="0",EV=Ym(49,57);[...EV];function NV(e){return ae(e,"~refine")&&Pe(e["~refine"])&&en(e["~refine"],0,t=>xt(t)&&ae(t,"check")&&ae(t,"error")&&Nu(t.check)&&Nu(t.error))}function ts(e){return xt(e)&&!Pe(e)}function Yh(e){return so(e)}function ut(e){return ts(e)||Yh(e)}function TV(e){return ae(e,"additionalItems")&&ut(e.additionalItems)}function zV(e){return ae(e,"additionalProperties")&&ut(e.additionalProperties)}function AV(e){return ae(e,"allOf")&&Pe(e.allOf)&&e.allOf.every(t=>ut(t))}function Qm(e){return ae(e,"$anchor")&&Et(e.$anchor)}function MV(e){return ae(e,"anyOf")&&Pe(e.anyOf)&&e.anyOf.every(t=>ut(t))}function RV(e){return ae(e,"const")}function Kk(e){return ae(e,"contains")&&ut(e.contains)}function _V(e){return ae(e,"dependencies")&&xt(e.dependencies)&&Object.values(e.dependencies).every(t=>ut(t)||Pe(t)&&t.every(n=>Et(n)))}function IV(e){return ae(e,"dependentRequired")&&xt(e.dependentRequired)&&Object.values(e.dependentRequired).every(t=>Pe(t)&&t.every(n=>Et(n)))}function OV(e){return ae(e,"dependentSchemas")&&xt(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(t=>ut(t))}function Pa(e){return ae(e,"$dynamicAnchor")&&Et(e.$dynamicAnchor)}function LV(e){return ae(e,"$dynamicRef")&&Et(e.$dynamicRef)}function DV(e){return ae(e,"else")&&ut(e.else)}function BV(e){return ae(e,"enum")&&Pe(e.enum)}function qV(e){return ae(e,"exclusiveMaximum")&&(Ht(e.exclusiveMaximum)||Cs(e.exclusiveMaximum))}function HV(e){return ae(e,"exclusiveMinimum")&&(Ht(e.exclusiveMinimum)||Cs(e.exclusiveMinimum))}function PV(e){return ae(e,"format")&&Et(e.format)}function Ps(e){return ae(e,"$id")&&Et(e.$id)}function UV(e){return ae(e,"if")&&ut(e.if)}function Xk(e){return ae(e,"items")&&(ut(e.items)||Pe(e.items)&&e.items.every(t=>ut(t)))}function FV(e){return Xk(e)&&Pe(e.items)}function GV(e){return ae(e,"maximum")&&(Ht(e.maximum)||Cs(e.maximum))}function VV(e){return ae(e,"maxContains")&&Ht(e.maxContains)}function WV(e){return ae(e,"maxItems")&&Ht(e.maxItems)}function KV(e){return ae(e,"maxLength")&&Ht(e.maxLength)}function XV(e){return ae(e,"maxProperties")&&Ht(e.maxProperties)}function ZV(e){return ae(e,"minimum")&&(Ht(e.minimum)||Cs(e.minimum))}function aC(e){return ae(e,"minContains")&&Ht(e.minContains)}function YV(e){return ae(e,"minItems")&&Ht(e.minItems)}function QV(e){return ae(e,"minLength")&&Ht(e.minLength)}function JV(e){return ae(e,"minProperties")&&Ht(e.minProperties)}function eW(e){return ae(e,"multipleOf")&&(Ht(e.multipleOf)||Cs(e.multipleOf))}function tW(e){return ae(e,"not")&&ut(e.not)}function nW(e){return ae(e,"oneOf")&&Pe(e.oneOf)&&e.oneOf.every(t=>ut(t))}function sW(e){return ae(e,"pattern")&&(Et(e.pattern)||e.pattern instanceof RegExp)}function oC(e){return ae(e,"patternProperties")&&xt(e.patternProperties)&&Object.values(e.patternProperties).every(t=>ut(t))}function lC(e){return ae(e,"prefixItems")&&Pe(e.prefixItems)&&e.prefixItems.every(t=>ut(t))}function cC(e){return ae(e,"properties")&&xt(e.properties)&&Object.values(e.properties).every(t=>ut(t))}function rW(e){return ae(e,"propertyNames")&&(xt(e.propertyNames)||ut(e.propertyNames))}function iW(e){return ae(e,"$recursiveAnchor")&&so(e.$recursiveAnchor)}function Jm(e){return iW(e)&&oe(e.$recursiveAnchor,!0)}function aW(e){return ae(e,"$recursiveRef")&&Et(e.$recursiveRef)}function oW(e){return ae(e,"$ref")&&Et(e.$ref)}function uC(e){return ae(e,"required")&&Pe(e.required)&&e.required.every(t=>Et(t))}function lW(e){return ae(e,"then")&&ut(e.then)}function cW(e){return ae(e,"type")&&(Et(e.type)||Pe(e.type)&&e.type.every(t=>Et(t)))}function uW(e){return ae(e,"uniqueItems")&&so(e.uniqueItems)}function dW(e){return ae(e,"unevaluatedItems")&&ut(e.unevaluatedItems)}function fW(e){return ae(e,"unevaluatedProperties")&&ut(e.unevaluatedProperties)}class ec{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 hW(e,t,n,s){return en(n["~refine"],0,(r,i)=>r.check(s))}function xW(e){return Xk(e)&&Pe(e.items)}function pW(e,t,n,s){return xW(n)?en(s,0,(i,a)=>K9(a,n.items.length)||io(e,t,n.additionalItems,i)&&t.AddIndex(a)):!0}function Zk(e){return new RegExp(e,"u")}function gW(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`}function mW(e){const t=[];return oC(e)&&t.push(...Nt(e.patternProperties)),cC(e)&&t.push(...Nt(e.properties).map(gW)),oe(t.length,0)?"(?!)":`(${t.join("|")})`}function yW(e,t,n,s){const r=Zk(mW(n));return en(Nt(s),0,(a,l)=>r.test(a)||io(e,t,n.additionalProperties,s[a])&&t.AddKey(a))}function kW(e,t,n,s){const r=n.allOf.reduce((i,a)=>{const l=new ec;return jt(e,l,a,s)?[...i,l]:i},[]);return oe(r.length,n.allOf.length)&&t.Merge(r)}function bW(e,t,n,s){const r=n.anyOf.reduce((i,a)=>{const l=new ec;return jt(e,l,a,s)?[...i,l]:i},[]);return W9(r.length,0)&&t.Merge(r)}function vW(e,t,n,s){return n}function wW(e,t,n,s){return X9(n.const)?oe(s,n.const):t1(s,n.const)}function jW(e){return!(aC(e)&&oe(e.minContains,0))}function SW(e,t,n,s){return jW(n)?!oe(s.length,0)&&NG(s,(r,i)=>jt(e,t,n.contains,r)&&t.AddIndex(i)):!0}function CW(e,t,n,s){const r=oe(Nt(s).length,0),i=en(qa(n.dependencies),0,([a,l])=>!ae(s,a)||(Pe(l)?l.every(c=>ae(s,c)):jt(e,t,l,s)));return r||i}function $W(e,t,n,s){const r=oe(Nt(s).length,0),i=en(qa(n.dependentRequired),0,([a,l])=>!ae(s,a)||l.every(c=>ae(s,c)));return r||i}function EW(e,t,n,s){const r=oe(Nt(s).length,0),i=en(qa(n.dependentSchemas),0,([a,l])=>!ae(s,a)||jt(e,t,l,s));return r||i}function NW(e,t,n,s){const r=e.DynamicRef(n)??!1;return ut(r)&&jt(e,t,r,s)}function TW(e,t,n,s){return Z9(n.enum,r=>X9(r)?oe(s,r):t1(s,r))}function zW(e,t,n,s){return K9(s,n.exclusiveMaximum)}function AW(e,t,n,s){return W9(s,n.exclusiveMinimum)}const MW=[0,31,28,31,30,31,30,31,31,30,31,30,31],RW=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function _W(e){return e%4===0&&(e%100!==0||e%400===0)}function dC(e){const t=RW.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&&_W(n)?29:MW[s])}const IW=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:([Zz])|([+-])(\d\d):(\d\d))?$/;function fC(e,t=!0){const n=IW.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 OW(e){const t=e.split(/T/i);return t.length===2&&dC(t[0])&&fC(t[1])}const LW=/^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 DW(e){return LW.test(e)}const BW=/^(?:[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 qW(e){return BW.test(e)}const HW=new RegExp("^(?!-).*(?<!-)$"),PW=/^(?!..--)/,UW=/^[a-zA-Z0-9-]*$/,Yk=/[^\p{ASCII}]/u,FW=/[0-9]/,GW=/[\u{0660}-\u{0669}]/u,VW=/[\u{06f0}-\u{06f9}]/u,WW=/[\u{002e}\u{002c}\u{003a}\u{002f}]/u,KW=/[\u{002d}\u{002b}]/u,hC=new RegExp("\\p{Mn}","u"),XW=new RegExp("\\p{Mc}","u"),ZW=/[\p{Mn}\p{Mc}\p{Me}]/u,xC=new RegExp("\\p{L}","u"),YW=new RegExp("\\p{Nd}","u"),QW=new RegExp("\\p{Script=Greek}","u"),pC=new RegExp("\\p{Script=Hebrew}","u"),JW=/[\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Han}]/u,eK=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Thaana}\p{Script=Mandaic}]/u,y5=/[\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,tK=/[\u{0640}\u{07fa}\u{302e}\u{302f}\u{3031}\u{3032}\u{3033}\u{3034}\u{3035}\u{303b}]/u,nK=/[\u{00b7}\u{0375}\u{05f3}\u{05f4}\u{200c}\u{200d}\u{30fb}]/u,sK=/[\u{00df}\u{03c2}\u{06fd}\u{06fe}\u{0f0b}\u{3007}]/u,rK=new RegExp([FW,VW].map(e=>e.source).join("|"),"u"),iK=new RegExp([xC,KW,WW,YW,hC,XW,nK,sK].map(e=>e.source).join("|"),"u");function aK(e){return HW.test(e)&&PW.test(e)&&UW.test(e)}const Bs=36,Zc=1,Tu=26,oK=38,lK=700,gC=72,mC=128;function Pp(){throw null}function yC(e){return e.toLowerCase().startsWith("xn--")}function kC(e,t,n){e=n?Math.floor(e/lK):e>>1,e+=Math.floor(e/t);let s=0;for(;e>(Bs-Zc)*Tu>>1;)e=Math.floor(e/(Bs-Zc)),s+=Bs;return s+Math.floor((Bs-Zc+1)*e/(e+oK))}function bC(e){const t=[];let n=mC,s=0,r=gC;const i=e.lastIndexOf("-");if(i>0)for(let l=0;l<i;l++){const c=e.charCodeAt(l);c>=128&&Pp(),t.push(c)}let a=i<0?0:i+1;for(;a<e.length;){const l=s;let c=1,u=Bs;for(;;){a>=e.length&&Pp();const f=e.charCodeAt(a++);let h;f>=97&&f<=122?h=f-97:f>=48&&f<=57?h=f-48+26:Pp(),s+=h*c;const p=u<=r?Zc:u>=r+Tu?Tu:u-r;if(h<p)break;c*=Bs-p,u+=Bs}const d=t.length+1;r=kC(s-l,d,l===0),n+=Math.floor(s/d),s%=d,t.splice(s,0,n),s++}return String.fromCodePoint(...t)}function k5(e){return e<26?String.fromCharCode(e+97):String.fromCharCode(e-26+48)}const cK=new RegExp(Yk.source,"gu");function uK(e){const t=e.replace(cK,""),n=t.length,s=n>0?[t,"-"]:[],r=Array.from(e,u=>u.codePointAt(0));let i=mC,a=0,l=gC,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=Bs;;h+=Bs){const p=h<=l?Zc:h>=l+Tu?Tu:h-l;if(f<p)break;const g=p+(f-p)%(Bs-p);s.push(k5(g)),f=Math.floor((f-p)/(Bs-p))}s.push(k5(f)),l=kC(a,c+1,c===n),a=0,c++}a++,i++}return s.join("")}const dK=/^(?:R|AL|AN|EN|ES|CS|ET|ON|BN|NSM)$/,b5=/^(?:L|EN|ES|CS|ET|ON|BN|NSM)$/,fK=/^(?:R|AL|AN)$/;function hK(e){if(yC(e))try{return e0(bC(e.slice(4).toLowerCase()))}catch{return!1}return e0(e)}function vC(e){const t=String.fromCodePoint(e);return rK.test(t)?"EN":GW.test(t)?"AN":hC.test(t)?"NSM":pC.test(t)?"R":eK.test(t)?"AL":xC.test(t)?"L":"ON"}function e0(e){for(const t of e)if(fK.test(vC(t.codePointAt(0))))return!0;return!1}function wC(e){let t=!1,n=b5,s=!1,r=!1,i=!0;for(const a of e){const l=vC(a.codePointAt(0));if(i){if(l!=="L"&&l!=="R"&&l!=="AL")return!1;t=l==="R"||l==="AL",n=t?dK:b5,i=!1}if(!n.test(l))return!1;l==="EN"?s=!0:l==="AN"&&(r=!0)}return!(t&&s&&r)}function xK(e){return Yk.test(e)&&uK(e).length+4>63}function pK(e){return e[0]==="-"||e[e.length-1]==="-"?!0:e.slice(2).join("").startsWith("--")}function jC(e){if(xK(e)||e0(e)&&!wC(e))return!1;const t=[...e],n=t.map(i=>i.codePointAt(0)),s=n.length;if(pK(t)||ZW.test(t[0]))return!1;let r=!1;for(let i=0;i<s;i++){const a=n[i],l=t[i];if(tK.test(l)||!iK.test(l))return!1;JW.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||!QW.test(t[i+1]))return!1;break;case 1523:case 1524:if(!c||!pC.test(t[i-1]))return!1;break;case 8204:if(!c||c<128&&!y5.test(t[i-1]))return!1;break;case 8205:if(!c||!y5.test(t[i-1]))return!1;break}}return!(e.includes("・")&&!r)}function SC(e){if(!yC(e))return!1;try{const t=e.slice(4).toLowerCase();if(t.lastIndexOf("-")===0)return!1;const n=bC(t);return Yk.test(n)?jC(n):!1}catch{return!1}}function gK(e){return e.length>0&&e.length<=63}function mK(e){return gK(e)&&(SC(e)||aK(e))}function yK(e){return e.length===0||e.length>253||e.charCodeAt(e.length-1)===46?!1:e.split(".").every(t=>mK(t))}function kK(e){return e.length>0&&e.length<=63}function bK(e){return kK(e)&&(SC(e)||jC(e))}function vK(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 wK(e){if(e.length===0||e.includes(" "))return!1;const t=vK(e);if(t.length>253)return!1;const n=t.split("."),s=n.some(r=>hK(r));return n.every(r=>bK(r)&&(!s||wC(r)))}function jK(e){return yK(e)}const SK=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 CK(e){return SK.test(e.normalize("NFC"))}function $K(e){return wK(e)}const EK=/^(?:(?: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 NK(e){return EK.test(e)}const TK=/^(?:(?:(?:[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 zK(e){return TK.test(e)}const AK=/[\x00-\x20\x7F\\]|%(?![0-9a-fA-F]{2})/,MK=/^[a-zA-Z][a-zA-Z0-9+\-.]*\/\//;function RK(e){return!AK.test(e)&&!MK.test(e)&&URL.canParse(e,"http://example.com")}const _K=2048,IK=/\[[vV][0-9a-fA-F]+\.[^\]]+\]/,OK=/[\x00-\x20<>\^`{|}\\]/,LK=/%(?![0-9a-fA-F]{2})/;function DK(e){return e.length<_K?e.replace(IK,"[::1]"):e}function BK(e){return OK.test(e)||LK.test(e)?!1:URL.canParse(DK(e))}const qK=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function HK(e){return qK.test(e)}const PK=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function UK(e){return PK.test(e)}function FK(e){try{return new RegExp(e,"u"),!0}catch{return!1}}const GK=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function VK(e){return GK.test(e)}const WK=/^(?:[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 KK(e){return WK.test(e)}const XK=/^(?:(?:[^\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 ZK(e){return XK.test(e)}const YK=/^[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 QK(e){return YK.test(e)}function JK(e){return URL.canParse(e)}const eX=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function tX(e){return eX.test(e)}const ot=new Map;function nX(){ot.clear()}function sX(e,t){var n;return((n=ot.get(e))==null?void 0:n(t))??!0}function rX(){nX(),ot.set("date-time",OW),ot.set("date",dC),ot.set("duration",DW),ot.set("email",qW),ot.set("hostname",jK),ot.set("idn-email",CK),ot.set("idn-hostname",$K),ot.set("ipv4",NK),ot.set("ipv6",zK),ot.set("iri-reference",RK),ot.set("iri",BK),ot.set("json-pointer-uri-fragment",HK),ot.set("json-pointer",UK),ot.set("regex",FK),ot.set("relative-json-pointer",VK),ot.set("time",fC),ot.set("uri-reference",KK),ot.set("uri-template",ZK),ot.set("uri",QK),ot.set("url",JK),ot.set("uuid",tX)}rX();function iX(e,t,n,s){return sX(n.format,s)}function aX(e,t,n,s){const r=lW(n)?n.then:!0,i=DV(n)?n.else:!0;return jt(e,t,n.if,s)?jt(e,t,r,s):jt(e,t,i,s)}function oX(e,t,n,s){return en(n.items,0,(r,i)=>Jl(s.length,i)||io(e,t,r,s[i])&&t.AddIndex(i))}function lX(e,t,n,s){const r=lC(n)?n.prefixItems.length:0;return en(s,r,(i,a)=>io(e,t,n.items,i)&&t.AddIndex(a))}function cX(e,t,n,s){return FV(n)?oX(e,t,n,s):lX(e,t,n,s)}function uX(e){return Kk(e)}function dX(e,t,n,s){if(!uX(n))return!0;const r=Y9(s,i=>jt(e,t,n.contains,i));return Jl(r,n.maxContains)}function fX(e,t,n,s){return Jl(s,n.maximum)}function hX(e,t,n,s){return Jl(s.length,n.maxItems)}function xX(e,t,n,s){return $G(s,n.maxLength)}function pX(e,t,n,s){return Jl(Nt(s).length,n.maxProperties)}function gX(e){return Kk(e)}function mX(e,t,n,s){if(!gX(n))return!0;const r=Y9(s,(i,a)=>jt(e,t,n.contains,i)&&t.AddIndex(a));return Jx(r,n.minContains)}function yX(e,t,n,s){return Jx(s,n.minimum)}function kX(e,t,n,s){return Jx(s.length,n.minItems)}function bX(e,t,n,s){return EG(s,n.minLength)}function vX(e,t,n,s){return Jx(Nt(s).length,n.minProperties)}function wX(e,t,n,s){return SG(s,n.multipleOf)}function jX(e,t,n,s){const r=new ec;return!jt(e,r,n.not,s)&&t.Merge([r])}function SX(e,t,n,s){const r=n.oneOf.reduce((i,a)=>{const l=new ec;return jt(e,l,a,s)?[...i,l]:i},[]);return oe(r.length,1)&&t.Merge(r)}function CX(e,t,n,s){return(Et(n.pattern)?Zk(n.pattern):n.pattern).test(s)}function $X(e,t,n,s){return en(qa(n.patternProperties),0,([r,i])=>{const a=Zk(r);return en(qa(s),0,([l,c])=>!a.test(l)||io(e,t,i,c)&&t.AddKey(l))})}function EX(e,t,n,s){return oe(s.length,0)||en(n.prefixItems,0,(r,i)=>Jl(s.length,i)||io(e,t,r,s[i])&&t.AddIndex(i))}function NX(e,t){return e.includes(t)||eC().exactOptionalPropertyTypes}function TX(e,t){return wt(e[t])}function zX(e,t,n,s){const r=uC(n)?n.required:[];return en(qa(n.properties),0,([a,l])=>{const c=!ae(s,a)||io(e,t,l,s[a])&&t.AddKey(a);return NX(r,a)?c:TX(s,a)||c})}function AX(e,t,n,s){return en(Nt(s),0,(r,i)=>jt(e,t,n.propertyNames,r))}function MX(e,t,n,s){const r=e.RecursiveRef(n)??!1;return ut(r)&&jt(e,t,r,s)}function RX(e,t,n,s){const r=e.Ref(n)??!1,i=new ec,a=ut(r)&&jt(e,i,r,s);return a&&t.Merge([i]),a}function _X(e,t,n,s){return en(n.required,0,r=>ae(s,r))}function CC(e,t,n,s,r){return oe(n,"object")?jG(r):oe(n,"array")?Pe(r):oe(n,"boolean")?so(r):oe(n,"integer")?G9(r):oe(n,"number")?Ht(r):oe(n,"null")?td(r):oe(n,"string")?Et(r):oe(n,"bigint")?Cs(r):oe(n,"constructor")?F9(r):oe(n,"function")?Nu(r):oe(n,"symbol")?V9(r):oe(n,"undefined")||oe(n,"void")?wt(r):!0}function IX(e,t,n,s,r){return Z9(n,i=>CC(e,t,i,s,r))}function OX(e,t,n,s){return Pe(n.type)?IX(e,t,n.type,n,s):CC(e,t,n.type,n,s)}function LX(e,t,n,s){const r=t.GetIndices();return en(s,0,(i,a)=>(r.has(a)||jt(e,t,n.unevaluatedItems,i))&&t.AddIndex(a))}function DX(e,t,n,s){const r=t.GetKeys();return en(qa(s),0,([i,a])=>r.has(i)||jt(e,t,n.unevaluatedProperties,a)&&t.AddKey(i))}function BX(e){return!oe(e.uniqueItems,!1)}function qX(e,t,n,s){if(!BX(n))return!0;const r=new Set(s.map(wV)).size,i=s.length;return oe(r,i)}function io(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=Yh(n)?vW(e,t,n):(!cW(n)||OX(e,t,n,s))&&(!(xt(s)&&!Pe(s))||(!uC(n)||_X(e,t,n,s))&&(!zV(n)||yW(e,t,n,s))&&(!_V(n)||CW(e,t,n,s))&&(!IV(n)||$W(e,t,n,s))&&(!OV(n)||EW(e,t,n,s))&&(!oC(n)||$X(e,t,n,s))&&(!cC(n)||zX(e,t,n,s))&&(!rW(n)||AX(e,t,n,s))&&(!JV(n)||vX(e,t,n,s))&&(!XV(n)||pX(e,t,n,s)))&&(!Pe(s)||(!TV(n)||pW(e,t,n,s))&&(!Kk(n)||SW(e,t,n,s))&&(!Xk(n)||cX(e,t,n,s))&&(!VV(n)||dX(e,t,n,s))&&(!WV(n)||hX(e,t,n,s))&&(!aC(n)||mX(e,t,n,s))&&(!YV(n)||kX(e,t,n,s))&&(!lC(n)||EX(e,t,n,s))&&(!uW(n)||qX(e,t,n,s)))&&(!Et(s)||(!KV(n)||xX(e,t,n,s))&&(!QV(n)||bX(e,t,n,s))&&(!PV(n)||iX(e,t,n,s))&&(!sW(n)||CX(e,t,n,s)))&&(!(Ht(s)||Cs(s))||(!qV(n)||zW(e,t,n,s))&&(!HV(n)||AW(e,t,n,s))&&(!GV(n)||fX(e,t,n,s))&&(!ZV(n)||yX(e,t,n,s))&&(!eW(n)||wX(e,t,n,s)))&&(!oW(n)||RX(e,t,n,s))&&(!aW(n)||MX(e,t,n,s))&&(!LV(n)||NW(e,t,n,s))&&(!RV(n)||wW(e,t,n,s))&&(!BV(n)||TW(e,t,n,s))&&(!UV(n)||aX(e,t,n,s))&&(!tW(n)||jX(e,t,n,s))&&(!AV(n)||kW(e,t,n,s))&&(!MV(n)||bW(e,t,n,s))&&(!nW(n)||SX(e,t,n,s))&&(!dW(n)||!Pe(s)||LX(e,t,n,s))&&(!fW(n)||!xt(s)||DX(e,t,n,s))&&(!NV(n)||hW(e,t,n,s));return e.Pop(n),r}function HX(e,t){return xt(t)&&!e1(e)?t[e]:void 0}function PX(e,t){return e.reduce((n,s)=>HX(s,n),t)}function UX(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 FX(e,t){const n=UX(t);return PX(n,e)}const s1="https://json-schema.org";function $C(e,t){if(xt(e)&&Pa(e)&&oe(e.$dynamicAnchor,t))return e;if(xt(e))for(const n of Nt(e)){const s=$C(e[n],t);if(s)return s}}function t0(e,t,n){if(oe(e,n))return t.href;const s=ts(e)&&Ps(e)?new URL(e.$id,t.href):t;if(Pe(e))for(const r of e){const i=t0(r,s,n);if(!wt(i))return i}else if(xt(e))for(const r of Nt(e)){const i=t0(e[r],s,n);if(!wt(i))return i}}function GX(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("#")?EC(e,n):e}function VX(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 WX(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 EC(e,t){if(t.href.endsWith("#"))return e;if(!t.hash.startsWith("#"))return;const n=decodeURIComponent(t.hash.slice(1));return n.startsWith("/")?FX(e,n):void 0}function KX(e,t,n){if(Ps(e)){const s=GX(e,t,n);if(!wt(s))return s}if(Qm(e)){const s=VX(e,t,n);if(!wt(s))return s}if(Pa(e)){const s=WX(e,t,n);if(!wt(s))return s}return EC(e,n)}function XX(e,t,n){return e.reduce((s,r)=>{const i=r1(r,t,n);return wt(i)?s:i},void 0)}function ZX(e){return oe(e,"const")||oe(e,"enum")}function YX(e,t,n){return Nt(e).reduce((s,r)=>{if(ZX(r))return s;const i=r1(e[r],t,n);return wt(i)?s:i},void 0)}function r1(e,t,n){const s=ts(e)&&Ps(e)?new URL(e.$id,t.href):t;if(ts(e)){const r=KX(e,s,n);if(!wt(r))return r}if(Pe(e))return XX(e,s,n);if(xt(e))return YX(e,s,n)}function QX(e,t,n){return t0(e,new URL(t||".",s1),n)}function JX(e,t,n,s){const r=i1(e,t,n,s,!1);return ts(r)&&Ps(r)?r:void 0}function v5(e){return e.href.split("#")[0]}function eZ(e,t){return ae(e,t)?e[t]:void 0}function tZ(e,t,n){return r1(e,t,n)}function nZ(e,t,n){const s=v5(n);if(oe(s,v5(t))||!ae(e,s))return;const r=e[s],i=ts(r)&&Ps(r)?new URL(r.$id,s):new URL(s);return oe(n.hash,"")?r:r1(r,i,n)}function sZ(e,t,n,s,r){if(!s.$ref.startsWith("#")||ae(e,"$schema"))return;const i=QX(t,n,r);if(!(wt(i)||oe(i,n)))return{target:r,base:i,root:t}}function rZ(e,t,n){const s=e[t];if(ts(s))return{target:n,base:t,root:s}}function iZ(e,t,n,s,r){const i=r?rZ(e.context,s,n):void 0;return wt(i)?sZ(e.root,e.lexicalSchema,e.referenceBase,t,n):i}function aZ(e,t,n,s,r,i){if(Ps(r))return;const a=JX(e,t,n,s);if(!(!a||i.includes(a)))return{target:r,resource:a}}function i1(e,t,n,s,r=!0){const i=new URL(n||".",s1),a=r&&Ps(t)?new URL(t.$id,i):i,l=new URL(s,a.href);return eZ(e,s)??tZ(t,a,l)??nZ(e,a,l)}function oZ(e,t,n,s,r,i){const a=new URL(n||".",s1),l=r.$dynamicRef.startsWith("#")?s:t,c=i1(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(g=>oe(g.$dynamicAnchor,h))??$C(t,h)}return}return!ts(c)||!Pa(c)||new URL(r.$dynamicRef,a).hash.startsWith("#/")?c:i.find(f=>oe(f.$dynamicAnchor,c.$dynamicAnchor))??c}function lZ(e,t){const n=e.inRetrievedFrame?e.lexicalSchema:e.root,s=t.$ref.startsWith("#")?e.lexicalSchema:n,r=i1(e.context,s,e.referenceBase,t.$ref,!1);if(!r||!ts(r))return{schema:r};const i=new URL(t.$ref,e.referenceBase).href.split("#")[0],a=!oe(i,e.resourceBase),l=iZ(e,t,r,i,a),c=a?aZ(e.context,e.root,e.referenceBase,i,r,e.ids):void 0;return{schema:r,retrievedResource:l,resolvedResource:c}}function cZ(e,t){const n=Jm(e.lexicalSchema)?e.recursiveAnchors[0]:e.lexicalSchema;return i1(e.context,n,e.lexicalBase,t.$recursiveRef,!1)}function uZ(e,t){return oZ(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)},Ve,Bf,NC,n0,sf,w5,j5,S5,C5,Up,Fp,s0,r0,$5,TC;class dZ{constructor(t,n){Ve.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,Ve,"m",n0).call(this,this.ids)}Push(t){if(!ts(t))return;Ps(t)&&et(this,Ve,"m",s0).call(this,t),Qm(t)&&this.anchors.push(t),Jm(t)&&this.recursiveAnchors.push(t),Pa(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){ts(t)&&(Ps(t)&&et(this,Ve,"m",r0).call(this,t),Qm(t)&&this.anchors.pop(),Jm(t)&&this.recursiveAnchors.pop(),Pa(t)&&this.dynamicAnchors.pop(),this.retrievedResources.has(t)&&this.retrievedFrames.pop(),et(this,Ve,"m",TC).call(this,t))}Ref(t){const n=lZ(et(this,Ve,"m",Bf).call(this),t);return et(this,Ve,"m",NC).call(this,n),n.schema}RecursiveRef(t){const n=cZ(et(this,Ve,"m",Bf).call(this),t);return n&&(this.pendingResource=!0),n}DynamicRef(t){const n=uZ(et(this,Ve,"m",Bf).call(this),t);return n&&(this.pendingResource=!0),n}}Ve=new WeakSet,Bf=function(){return{context:this.context,root:this.schema,ids:this.ids,lexicalSchema:et(this,Ve,"m",j5).call(this),lexicalBase:this.LexicalBaseURL(),referenceBase:et(this,Ve,"m",w5).call(this),resourceBase:et(this,Ve,"m",sf).call(this),recursiveAnchors:this.recursiveAnchors,dynamicAnchors:this.dynamicAnchors,inRetrievedFrame:this.retrievedFrames.length>0}},NC=function(t){wt(t.schema)||(this.pendingResource=!0),wt(t.resolvedResource)||et(this,Ve,"m",$5).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})},n0=function(t){const n=this.retrievedFrames[this.retrievedFrames.length-1],s=n?new URL(n.base):new URL(s1);return(n?t.slice(n.idDepth):t).reduce((i,a)=>new URL(a.$id,i),s).href},sf=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,Ve,"m",n0).call(this,this.resourceIds)},w5=function(){if(this.retrievedFrames.length>0)return et(this,Ve,"m",sf).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,Ve,"m",sf).call(this)},j5=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},S5=function(t){t.forEach(n=>et(this,Ve,"m",Up).call(this,n,!1))},C5=function(t){t.forEach(n=>et(this,Ve,"m",Fp).call(this,n,!1))},Up=function e(t,n=!0){if(Yh(t))return;if(Pe(t))return et(this,Ve,"m",S5).call(this,t);if(!ts(t))return;const s=t;if(!(!n&&Ps(s))){!n&&Pa(s)&&this.dynamicAnchors.push(s);for(const r of Nt(s))et(this,Ve,"m",e).call(this,s[r],!1)}},Fp=function e(t,n=!0){if(Yh(t))return;if(Pe(t))return et(this,Ve,"m",C5).call(this,t);if(!ts(t))return;const s=t;if(!(!n&&Ps(s))){!n&&Pa(s)&&this.dynamicAnchors.pop();for(const r of Nt(s))et(this,Ve,"m",e).call(this,s[r],!1)}},s0=function(t){this.ids.push(t);const n=this.pendingResource;this.pendingResource=!1,n&&this.resourceIds.push(t),et(this,Ve,"m",Up).call(this,t,!0)},r0=function(t){this.ids.pop(),this.resourceIds.length>0&&oe(this.resourceIds[this.resourceIds.length-1],t)&&this.resourceIds.pop(),et(this,Ve,"m",Fp).call(this,t,!0)},$5=function(t,n){et(this,Ve,"m",s0).call(this,n),this.resolvedResources.set(t,n)},TC=function(t){if(!this.resolvedResources.has(t))return;const n=this.resolvedResources.get(t);et(this,Ve,"m",r0).call(this,n),this.resolvedResources.delete(t)};function fZ(...e){const[t,n,s]=nC(e,{3:(a,l,c)=>[a,l,c],2:(a,l)=>[{},a,l]}),r=new dZ(t,n),i=new ec;return jt(r,i,n,s)}function rf(...e){const[t,n,s]=nC(e,{3:(r,i,a)=>[r,i,a],2:(r,i)=>[{},r,i]});return fZ(t,n,s)}BigInt(Number.MAX_SAFE_INTEGER);BigInt(Number.MIN_SAFE_INTEGER);const hZ=vn({type:Wn("insert"),path:an(),value:Wk()}),xZ=Object({type:Wn("update"),path:an(),value:Wk()}),pZ=vn({type:Wn("delete"),path:an()});n1([hZ,xZ,pZ]);const gZ=vn({text:an({minLength:1}),status:n1([Wn("pending"),Wn("in_progress"),Wn("completed")])}),mZ=vn({items:ro(gZ)}),yZ=vn({label:an({minLength:1}),description:Tr(an())}),kZ=vn({question:an({minLength:1}),header:an({minLength:1,maxLength:16}),options:ro(yZ,{minItems:2,maxItems:4}),multiSelect:Tr(jV())}),bZ=vn({selected:ro(an()),other:Tr(an())}),vZ=n1([vn({outcome:Wn("answered"),answers:ro(bZ),at:il()}),vn({outcome:Wn("dismissed"),at:il()}),vn({outcome:Wn("cancelled"),at:il()})]),wZ=vn({id:an({minLength:1}),questions:ro(kZ,{minItems:1,maxItems:4}),askedAt:il(),resolution:Tr(vZ)}),jZ=vn({requests:ro(wZ)}),SZ=vn({patch:an()}),CZ=vn({id:Tr(il()),name:an(),args:an(),status:n1([Wn("running"),Wn("ok"),Wn("error"),Wn("cancelled")]),durationMs:Tr(il()),error:Tr(an()),details:Tr(Wk())}),$Z=vn({code:Tr(an()),calls:ro(CZ)});function tc(e,t){return e==="pinomad.todo"&&rf(mZ,t)?{type:"pinomad.todo",value:t}:e==="pinomad.question"&&rf(jZ,t)?{type:"pinomad.question",value:t}:e==="pinomad.diff"&&rf(SZ,t)?{type:"pinomad.diff",value:t}:e==="pinomad.codemode"&&rf($Z,t)?{type:"pinomad.codemode",value:t}:{type:"fallback",value:t}}function EZ(e){return e.flatMap(t=>{const n=tc(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 NZ(e,t,n){return Array.from({length:e},(s,r)=>({selected:t[r]??[],...n[r]===void 0||n[r].trim()===""?{}:{other:n[r]}}))}const E5="cubic-bezier(0.32, 0.72, 0, 1)",N5=280,Mc=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches;function TZ(e){const t=x.useRef(null),[n,s]=x.useState(0),r=x.useRef(n);r.current=n;const i=x.useRef(!1),a=x.useRef(null),l=x.useRef(!1),c=x.useRef(void 0),u=x.useCallback(b=>{var k,m;return((m=(k=t.current)==null?void 0:k.children[b])==null?void 0:m.offsetHeight)??0},[]),d=x.useCallback((b,k)=>{if(Mc()||Math.abs(b.offsetHeight-k)<1){b.style.transition="",b.style.height=`${k}px`;return}b.style.height=`${b.offsetHeight}px`,b.style.transition=`height ${N5}ms ${E5}`,b.style.height=`${k}px`},[]),f=x.useCallback((b=!1)=>{const k=t.current;if(k===null||k.clientWidth===0||i.current)return;const m=Math.min(e-1,Math.max(0,k.scrollLeft/k.clientWidth)),y=Math.floor(m),v=u(y),w=u(Math.min(y+1,e-1)),j=v+(w-v)*(m-y);if(b&&l.current&&m===y){d(k,j);return}k.style.transition="",k.style.height=`${j}px`},[e,u,d]),h=x.useCallback(()=>{const b=t.current;a.current=null,b!==null&&!i.current&&s(Math.min(e-1,Math.max(0,Math.round(b.scrollLeft/Math.max(b.clientWidth,1)))))},[e]),p=x.useCallback(()=>{const b=t.current;if(b===null||b.clientWidth===0)return;window.clearTimeout(c.current),c.current=window.setTimeout(h,150),b.scrollTop!==0&&(b.scrollTop=0),f();const k=b.scrollLeft/b.clientWidth;if(a.current!==null){if(Math.abs(k-a.current)>.01)return;a.current=null}i.current||s(Math.min(e-1,Math.max(0,Math.round(k))))},[e,f,h]),g=x.useCallback(b=>{var w,j;const k=t.current;if(k===null)return;const m=Math.min(e-1,Math.max(0,b)),y=Math.abs(m-r.current);if(y<=1||Mc()){y>0&&!Mc()&&(a.current=m),k.scrollTo({left:m*k.clientWidth,behavior:Mc()?"instant":"smooth"}),s(m);return}const v=Math.sign(m-r.current);i.current=!0,k.style.height=`${k.offsetHeight}px`,k.scrollTo({left:m*k.clientWidth,behavior:"instant"}),s(m),d(k,u(m)),(j=(w=k.children[m])==null?void 0:w.firstElementChild)==null||j.animate([{opacity:0,transform:`translateX(${v*24}px)`},{opacity:1,transform:"none"}],{duration:220,easing:E5}),window.setTimeout(()=>{i.current=!1,f(!0)},N5)},[e,u,d,f]);return x.useLayoutEffect(()=>f(),[f]),x.useEffect(()=>{let b=!0;return document.fonts.ready.then(()=>requestAnimationFrame(()=>{b&&(l.current=!0)})),()=>{b=!1}},[]),x.useEffect(()=>{const b=t.current;if(b===null)return;let k=b.clientWidth;const m=new ResizeObserver(()=>{if(b.clientWidth!==k){k=b.clientWidth,b.scrollTo({left:r.current*k,behavior:"instant"}),f();return}f(!0)});for(const y of b.children)m.observe(y);return b.addEventListener("scrollend",h),()=>{m.disconnect(),b.removeEventListener("scrollend",h),window.clearTimeout(c.current)}},[f,h]),{ref:t,index:n,go:g,onScroll:p}}const Zs="\0other",zZ=250;function zC({docs:e,remote:t,connected:n,target:s}){const r=EZ(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(AZ,{kind:i,request:a,remote:t,connected:n,target:s},a.id))})}function AZ({kind:e,request:t,remote:n,connected:s,target:r}){const i=t.questions.length,[a,l]=x.useState(()=>t.questions.map(()=>[])),[c,u]=x.useState(()=>t.questions.map(()=>"")),[d,f]=x.useState(()=>t.questions.map(()=>!1)),[h,p]=x.useState(!1),g=x.useRef(!1),b=(I,_)=>l(O=>O.map((D,B)=>B===I?_:D)),k=(I,_)=>u(O=>O.map((D,B)=>B===I?_:D)),m=(I,_)=>f(O=>O.map((D,B)=>B===I?_:D)),y=I=>{var _;return(((_=a[I])==null?void 0:_.length)??0)>0||d[I]===!0&&(c[I]??"").trim()!==""},v=TZ(i),w=x.useRef(void 0);x.useEffect(()=>()=>window.clearTimeout(w.current),[]);const[j,C]=x.useState(null),$=v.index===i-1,E=t.questions.every((I,_)=>y(_)),N=$||E?"submit":y(v.index)?"next":"skip",S=j??N,A=()=>{window.clearTimeout(w.current),C(null)},z=I=>{A(),v.go(I)},M=x.useRef(null),L=()=>z(v.index+1),R=()=>{if(g.current||!s)return;g.current=!0,p(!0);const I=NZ(i,a,c.map((_,O)=>d[O]===!0?_:""));n.controller.answer(e,t.id,I,r).catch(()=>{g.current=!1,p(!1)})},T=I=>(_,O)=>{var D;if(O||((D=t.questions[I])==null?void 0:D.multiSelect)===!0||_===Zs||I+1>=i){A();return}window.clearTimeout(w.current),C(B=>B??N),w.current=window.setTimeout(()=>{v.go(I+1),C(null)},Mc()?0:zZ)};return o.jsxs("section",{className:"question-card","aria-label":"The agent asks",onKeyDown:RZ(v.index,z),children:[o.jsx("div",{ref:v.ref,className:"question-card__pager",onScroll:v.onScroll,onWheel:I=>{Math.abs(I.deltaX)>Math.abs(I.deltaY)&&A()},onTouchStart:I=>{var _;M.current=((_=I.touches[0])==null?void 0:_.clientX)??null},onTouchMove:I=>{var O;const _=(O=I.touches[0])==null?void 0:O.clientX;M.current!==null&&_!==void 0&&Math.abs(_-M.current)>8&&A()},children:t.questions.map((I,_)=>o.jsx("div",{className:"question-card__page",role:"group","aria-roledescription":"question","aria-label":`${_+1} of ${i}: ${I.header}`,inert:_!==v.index,children:o.jsx(MZ,{question:I,selected:a[_]??[],other:c[_]??"",otherOn:d[_]===!0,onSelect:O=>b(_,O),onOther:O=>k(_,O),onOtherOn:O=>m(_,O),onPointerPick:T(_),onOtherEnter:_+1<i?L:R})},_))}),o.jsxs("div",{className:"question-card__footer",children:[o.jsx("div",{className:"question-card__back",children:v.index>0?o.jsx(ne,{label:"Back",variant:"ghost",onClick:()=>z(v.index-1)}):null}),i>1?o.jsx("div",{className:"question-card__segments",role:"tablist","aria-label":"Questions",children:t.questions.map((I,_)=>o.jsx("button",{type:"button",role:"tab",className:"question-card__segment","aria-selected":_===v.index,"aria-label":`${I.header}, ${y(_)?"answered":"not answered"}`,"data-current":_===v.index||void 0,"data-answered":y(_)||void 0,tabIndex:_===v.index?0:-1,onClick:()=>z(_)},_))}):o.jsx("span",{}),o.jsx("div",{className:"question-card__action","data-ghost":S==="skip"||void 0,children:S==="submit"?o.jsx(ne,{label:"Submit",variant:"primary",isDisabled:!s||h,onClick:R}):S==="next"?o.jsx(ne,{label:"Next",variant:"secondary",onClick:L}):o.jsx(ne,{label:"Skip",variant:"ghost",onClick:L})})]})]})}function MZ({question:e,selected:t,other:n,otherOn:s,onSelect:r,onOther:i,onOtherOn:a,onPointerPick:l,onOtherEnter:c}){const u=e.multiSelect===!0,d=x.useRef(Number.NEGATIVE_INFINITY),f=x.useRef(null),h=g=>{a(g),g&&requestAnimationFrame(()=>{var k;const b=(k=f.current)==null?void 0:k.querySelector("input");b==null||b.focus({preventScroll:!0}),b==null||b.setSelectionRange(b.value.length,b.value.length)})},p=g=>g.description===void 0||g.description===""?{}:{description:g.description};return o.jsxs(fe,{gap:1,children:[o.jsx(se,{type:"body",weight:"medium",className:"question-card__question",children:e.question}),o.jsx("div",{className:"question-card__options",onPointerDown:()=>{d.current=performance.now()},onClick:g=>{const b=g.target;if(!(b instanceof HTMLInputElement)||b.type!=="radio"||performance.now()-d.current>1e3)return;d.current=Number.NEGATIVE_INFINITY;const k=b.value===Zs?s:t[0]===b.value;k&&(b.value===Zs?a(!1):r([])),l(b.value,k)},children:u?o.jsxs(ly,{label:e.header,isLabelHidden:!0,density:"compact",value:s?[...t,Zs]:t,onChange:g=>{r(g.filter(b=>b!==Zs)),g.includes(Zs)!==s&&h(!s)},children:[e.options.map(g=>o.jsx(sh,{label:g.label,value:g.label,...p(g)},g.label)),o.jsx(sh,{label:"Other",value:Zs})]}):o.jsxs(E6,{label:e.header,isLabelHidden:!0,size:"sm",value:s?Zs:t[0]??"",onChange:g=>{if(g===Zs){r([]),h(!0);return}r([g]),a(!1)},children:[e.options.map(g=>o.jsx(pg,{label:g.label,value:g.label,...p(g)},g.label)),o.jsx(pg,{label:"Other",value:Zs})]})}),s?o.jsx("div",{ref:f,className:"question-card__other",onKeyDown:g=>{g.key==="Enter"&&!g.nativeEvent.isComposing&&(g.preventDefault(),c())},children:o.jsx(Xn,{label:"Other answer",isLabelHidden:!0,value:n,onChange:i,placeholder:"Your answer…"})}):null]})}function RZ(e,t){return n=>{if(!(n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement)&&!(n.metaKey||n.ctrlKey||n.altKey)){if(n.key==="ArrowRight")t(e+1);else if(n.key==="ArrowLeft")t(e-1);else return;n.preventDefault()}}}const _Z=150,IZ=(e,t)=>`${e}${t}`;function OZ(e){let t=0,n;const s=new Map,r=a=>s.get(a)===t,i=(a,l)=>{s.get(a)===l&&s.delete(a)};return{request(a,l,c){if(n!==void 0&&(clearTimeout(n.timer),n=void 0),r(a))return;const u=t;n={cacheKey:a,timer:setTimeout(()=>{n=void 0,!(u!==t||r(a))&&(s.set(a,u),c().then(d=>{i(a,u),u===t&&e(a,l,d.files)},()=>{i(a,u)}))},_Z)}},cancel(){t+=1,n!==void 0&&(clearTimeout(n.timer),n=void 0)}}}const T5=5e3,LZ=e=>({id:`agent:${e.name}`,label:e.name,auxiliaryData:{kind:"agent",group:"Agents",description:e.description,insert:`@${e.name} `}}),z5=e=>({id:`file:${e}`,label:e,auxiliaryData:{kind:"file",group:"Files",insert:`@./${e} `}}),A5=e=>e.auxiliaryData;function Qk(e,t,n){const s=(e==null?void 0:e.roles)??[],[r,i]=x.useState({byKey:{}}),a=x.useRef(n);a.current=n;const l=x.useRef(void 0);l.current??(l.current=OZ((u,d,f)=>{i(h=>{const p=Date.now(),g={};for(const[b,k]of Object.entries(h.byKey))p-k.at<T5&&(g[b]=k);return g[u]={files:f,at:p},{byKey:g,latest:{scope:d,files:f}}})})),x.useEffect(()=>()=>{var u;return(u=l.current)==null?void 0:u.cancel()},[]),x.useEffect(()=>{var u;r.latest!==void 0&&((u=t.current)==null||u.emitInput())},[r]);const c=n!==void 0;return x.useMemo(()=>{if(s.length===0&&!c)return;const u=l.current,d={bootstrap:()=>[],search:h=>{const p=h.toLowerCase(),g=s.filter(v=>v.name.includes(p)).map(LZ),b=a.current;if(b===void 0)return g;const k=h.startsWith("./")?h.slice(2):h,m=IZ(b.key,k),y=r.byKey[m];return y!==void 0&&Date.now()-y.at<T5?[...g,...y.files.map(z5)]:(u.request(m,b.key,()=>b.list(k)),r.latest!==void 0&&r.latest.scope===b.key?[...g,...r.latest.files.map(z5)]:g)},cancel:()=>u.cancel()},f=s.length>0&&c?"Agents and files":s.length>0?"Named agents":"Files";return[{character:"@",searchSource:d,menuLabel:f,emptySearchResultsText:`No matching ${s.length>0&&c?"agents or files":s.length>0?"agents":"files"}`,renderItem:h=>{const p=A5(h),g=(p==null?void 0:p.kind)==="file"?Ek:Xx;return o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(g,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}),o.jsxs("span",{className:"min-w-0",children:[o.jsx("span",{className:"block truncate",children:h.label}),(p==null?void 0:p.description)===void 0?null:o.jsx("span",{className:"block truncate text-xs text-muted",children:p.description})]})]})},onSelect:h=>{var p;return((p=A5(h))==null?void 0:p.insert)??""}}]},[s,r,c])}function Gp(e){return(e==null?void 0:e.querySelector('[aria-multiline="true"]'))??null}function DZ({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=Gp(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)},emitInput:()=>{const f=Gp(c.current);f!==null&&(document.activeElement===f||f.contains(document.activeElement))&&f.dispatchEvent(new Event("input",{bubbles:!0}))}},()=>{n.current=null}},[n]),x.useEffect(()=>{const f=Gp(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(iy,{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 Jk({value:e,status:t="ready",className:n="",placeholder:s,inputRef:r,isDisabled:i=!1,submitDisabled:a=!1,attachments:l,hasAttachments:c,onFiles:u,triggers:d,startActions:f,endActions:h,footer:p,error:g,accent:b,accentFocusRing:k=!1,onSubmit:m,onStop:y,onValueChange:v,...w}){const C=(t==="streaming"||t==="submitted")&&!e.trim()&&c!==!0&&!!y,$=!a&&(!!e.trim()||c===!0),E=()=>{$&&(m==null||m())},N=A=>{u===void 0||!A.dataTransfer.types.includes("Files")||A.preventDefault()},S=A=>{if(u===void 0||!A.dataTransfer.types.includes("Files"))return;A.preventDefault();const z=[...A.dataTransfer.files];z.length>0&&u(z)};return o.jsxs("div",{className:`prompt-input ${n}`.trim(),"data-accent":b,"data-accent-focus":b&&k?"":void 0,"data-slot":"prompt-input","data-status":t,onDragOver:N,onDrop:S,...w,children:[o.jsx(t6,{elevation:"low",...l===void 0?{}:{drawer:o.jsx(n6,{children:l})},footerActions:f,input:o.jsx(DZ,{disabled:i,inputRef:r,placeholder:s,value:e,onValueChange:v,onSubmitRequest:E,onFiles:u,triggers:d}),isStopShown:C&&!i,placeholder:s,sendActions:h,sendButton:o.jsx(ay,{className:"pigui-pressable",isDisabled:i||!C&&!$,onSend:E}),status:g?{type:"error",message:g}:void 0,value:e,onChange:A=>v==null?void 0:v(A),onStop:y,onSubmit:E}),p?o.jsx("div",{className:"prompt-input__footer","data-slot":"prompt-input-footer",children:p}):null]})}const BZ=["path","file_path","filePath","command","cmd","query","pattern","url","name","description","task"],M5=120;function qZ(e){if(!(typeof e!="object"||e===null))for(const t of BZ){const n=e[t];if(typeof n=="string"&&n.length>0)return n.length>M5?`${n.slice(0,M5)}…`:n}}function _r(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 eb(e){if(!e)return;let t;try{t=JSON.parse(e)}catch{return}return qZ(t)}function AC(e){if(!(e===void 0||!Number.isFinite(e)||e<0))return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}const HZ={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 MC(e){return(e??"").trim().toLowerCase().replace(/-/g,"_")}function Qh(e){return HZ[MC(e)]??"tool"}function PZ(e){const t=new Set(e.map(n=>Qh(n.toolName)));return t.size===1?[...t][0]:"tool"}const UZ=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/,FZ=/^\+\s*\d+ /,GZ=/^-\s*\d+ /;function VZ(e){let t=0,n=0,s=0,r=0,i=!1;for(const a of e.split(`
|
|
381
|
-
`)){const l=UZ.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 WZ(e){let t=0,n=0;for(const s of e.split(`
|
|
382
|
-
`))FZ.test(s)?t+=1:GZ.test(s)&&(n+=1);return{additions:t,deletions:n}}function KZ(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"?VZ(s):typeof r=="string"?WZ(r):void 0;return i!==void 0&&(i.additions>0||i.deletions>0)?i:void 0}function tb(e){return e.pinomad}function RC(e){return typeof e=="string"?e:e.flatMap(t=>t.type==="text"&&t.text!==void 0?[t.text]:[]).join("")}function _C(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 ma=e=>e.type==="toolCall"&&e.id!==void 0;function XZ(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 ZZ(e){if(typeof e!="object"||e===null)return;const t=e.conversationId;return typeof t=="number"?t:void 0}function YZ(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:tc(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 QZ(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 JZ(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=XZ(e.arguments,c);let d,f;a!==void 0?(d=a.isError===!0?"output-error":"output-available",f=RC(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:tc(r[c??""],h),g=a!==void 0&&a.isError!==!0?KZ({details:a.details}):void 0,b=a===void 0?[]:_C(a.content),k=ZZ(h);let m,y;if((p==null?void 0:p.type)==="pinomad.diff")m={kind:"diff",patch:p.value.patch};else if(k!==void 0){const v=h;m={kind:"subagent",conversationId:k,...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?y=(s.get(i)??[]).map(QZ):(p==null?void 0:p.type)==="pinomad.codemode"&&(y=p.value.calls.map(v=>YZ(v,r))),{state:d,toolCallId:i,...c===void 0?{}:{toolName:c},...u===void 0?{}:{argsText:u},...f===void 0?{}:{output:f},...g===void 0?{}:{diffStat:g},...b.length===0?{}:{images:b},...y===void 0||y.length===0?{}:{children:y},...m===void 0?{}:{pinomad:m}}}function eY(e){const t=e==null?void 0:e.calls;return Array.isArray(t)&&t.some(n=>n.name==="todo_write"&&n.status==="ok")}function tY(e){const t=[];for(const n of e)if(ma(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 nY(e,t,n,s,r){var z,M,L;const i=new Map(((z=s?n.tools:void 0)==null?void 0:z.map(R=>[R.callId,R]))??[]),a=new Map;if(s)for(const R of n.nestedTools??[]){if(R.name.startsWith("pi."))continue;const T=a.get(R.parentCallId);T===void 0?a.set(R.parentCallId,[R]):T.push(R)}const l=s?(M=n.generation)==null?void 0:M.message:void 0,c=new Map,u=[...t.assistants.map(({id:R,msg:T,results:I})=>({id:R,msg:T,results:I})),...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,g=(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(ma))===!0,k=g!==""&&(h||!b),m=(R,T)=>ma(T)&&!R.results.has(T.id)&&(R.partial===!0||R.msg.stopReason==="toolUse"),y=u.some(R=>R.msg.content.some(T=>m(R,T))),v=d==null?void 0:d.msg.content[d.msg.content.length-1];let w;h?w="settled":k?w="answering":y||v!==void 0&&ma(v)?w="acting":u.length>0?w="thinking":w="hidden";const j=w==="thinking"||w==="acting",C=[];for(const R of u){const T=R===d,I=R.msg.content;tY(I).forEach((_,O)=>{if(_.kind==="tools"){const B=_.blocks.filter(V=>m(R,V)),P=j&&B.length>0;C.push({kind:"tools",id:`${R.id}-tools-${O}`,tools:_.blocks.map(V=>JZ(V,R,i,a,r)),live:P,...P&&B[0]!==void 0?{activeToolCallId:B[0].id}:{}});return}if(_.kind==="text"){T&&k||C.push({kind:"interim",id:`${R.id}-text-${O}`,text:_.block.text??""});return}const D=I.indexOf(_.block);C.push({kind:"thinking",id:`${R.id}-thinking-${O}`,text:_.block.thinking??"",live:j&&R.partial===!0&&D===I.length-1})})}let $;for(const R of u)for(const T of R.msg.content){if(!ma(T))continue;const I=R.results.get(T.id);I===void 0||typeof I.timestamp!="number"||(T.name==="todo_write"?I.isError!==!0:T.name==="codemode"&&eY(I.details))&&($=I.timestamp)}const E=(f==null?void 0:f.msg.stopReason)==="aborted",N=h&&(f==null?void 0:f.msg.stopReason)==="error",S=(L=u[0])==null?void 0:L.msg.timestamp;let A;if(h&&S!==void 0){const R=k?d==null?void 0:d.msg.timestamp:t.lastTs??(d==null?void 0:d.msg.timestamp);A=R===void 0?void 0:R-S}return{kind:"run",id:e,cot:{phase:w,...N===!0?{outcome:"failed"}:{},...S===void 0?{}:{anchorMs:S},...A===void 0?{}:{elapsedMs:A},...$===void 0?{}:{todoWrittenAtMs:$},steps:C,...k?{answer:{text:g,streaming:(d==null?void 0:d.partial)===!0}}:{}},interrupted:E,...h&&!E&&N!==!0&&f!==void 0?{forkEntryId:f.id}:{},...N===!0?{failure:(f==null?void 0:f.msg.errorMessage)??"The run failed."}:{}}}function sY(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(nY(`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:RC(d.content),images:_C(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(!ma(p))continue;const g=i.orphans.get(p.id);g!==void 0&&(i.orphans.delete(p.id),h.set(p.id,g))}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(g=>ma(g)&&g.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 rY(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 iY(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 R5={};function nd(e,t){const n=x.useRef(R5);return n.current===R5&&(n.current=e(t)),n}const Vp=f3[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],aY=Vp&&Vp!==x.useLayoutEffect?Vp:e=>e();function Ua(e){const t=nd(oY).current;return t.next=e,aY(t.effect),t.trampoline}function oY(){const e={next:void 0,callback:lY,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function lY(){}function nb(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 i0(e,t,n,s){const r=nd(IC).current;return uY(r,e,t,n,s)&&OC(r,[e,t,n,s]),r.callback}function cY(e){const t=nd(IC).current;return dY(t,e)&&OC(t,e),t.callback}function IC(){return{callback:null,cleanup:null,refs:[]}}function uY(e,t,n,s,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==s||e.refs[3]!==r}function dY(e,t){return e.refs.length!==t.length||e.refs.some((n,s)=>n!==t[s])}function OC(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 fY=parseInt(x.version,10);function hY(e){return fY>=e}function _5(e){if(!x.isValidElement(e))return null;const t=e,n=t.props;return(hY(19)?n==null?void 0:n.ref:t.ref)??null}function a0(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function xY(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 pY(e,t){return typeof e=="function"?e(t):e}function gY(e,t){return typeof e=="function"?e(t):e}const Yc={};function LC(e,t,n,s,r){let i={...o0(e,Yc)};return t&&(i=qf(i,t)),n&&(i=qf(i,n)),s&&(i=qf(i,s)),i}function mY(e){if(e.length===0)return Yc;if(e.length===1)return o0(e[0],Yc);let t={...o0(e[0],Yc)};for(let n=1;n<e.length;n+=1)t=qf(t,e[n]);return t}function qf(e,t){return DC(t)?t(e):yY(e,t)}function yY(e,t){if(!t)return e;for(const n in t){const s=t[n];switch(n){case"style":{e[n]=a0(e.style,s);break}case"className":{e[n]=BC(e.className,s);break}default:kY(n,s)?e[n]=bY(e[n],s):e[n]=s}}return e}function kY(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 DC(e){return typeof e=="function"}function o0(e,t){return DC(e)?e(t):e??Yc}function bY(e,t){return t?e?n=>{if(vY(n)){const r=n;l0(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 l0(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function BC(e,t){return t?e?t+" "+e:t:e}function vY(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}const ca=Object.freeze({});function sb(e,t,n={}){const s=t.render,r=wY(t,n);if(n.enabled===!1)return null;const i=n.state??ca;return jY(e,s,r,i)}function wY(e,t={}){const{className:n,style:s,render:r}=e,{state:i=ca,ref:a,props:l,stateAttributesMapping:c,enabled:u=!0}=t,d=u?pY(n,i):void 0,f=u?gY(s,i):void 0,h=u?xY(i,c):ca,p=u?a0(h,Array.isArray(l)?mY(l):l)??ca:ca;return typeof document<"u"&&(u?Array.isArray(a)?p.ref=cY([p.ref,_5(r),...a]):p.ref=i0(p.ref,_5(r),a):i0(null,null)),u?(d!==void 0&&(p.className=BC(p.className,d)),f!==void 0&&(p.style=a0(p.style,f)),p):ca}function jY(e,t,n,s){if(t){if(typeof t=="function")return t(n,s);const r=LC(n,t.props);return r.ref=n.ref,x.cloneElement(t,r)}if(e&&typeof e=="string")return SY(e,n);throw new Error(nb(8))}function SY(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 CY({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 $Y=()=>{},Kn=typeof document<"u"?x.useLayoutEffect:$Y,EY={...f3};let I5=0;function NY(e,t="mui"){const[n,s]=x.useState(e),r=e||n;return x.useEffect(()=>{n==null&&(I5+=1,s(`${t}-${I5}`))},[n,t]),r}const O5=EY.useId;function TY(e,t){if(O5!==void 0){const n=O5();return`${t}-${n}`}return NY(e,t)}function zY(e){return TY(e,"base-ui")}const AY="none",MY="trigger-press";function qC(e,t,n,s){let r=!1,i=!1;const a=ca;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 RY=[];function HC(e){x.useEffect(e,RY)}const af=null;class _Y{constructor(){ee(this,"callbacks",[]);ee(this,"callbacksCount",0);ee(this,"nextId",1);ee(this,"startId",1);ee(this,"isScheduled",!1);ee(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 of=new _Y;class pt{constructor(){ee(this,"currentId",af);ee(this,"cancel",()=>{this.currentId!==af&&(of.cancel(this.currentId),this.currentId=af)});ee(this,"disposeEffect",()=>this.cancel)}static create(){return new pt}static request(t){return of.request(t)}static cancel(t){return of.cancel(t)}request(t){this.cancel(),this.currentId=of.request(()=>{this.currentId=af,t()})}}function PC(){const e=nd(pt.create).current;return HC(e.disposeEffect),e}function IY(e){return e==null?e:"current"in e?e.current:e}function UC(e,t=!1,n=!0){const s=PC();return Ua((r,i=null)=>{s.cancel();const a=IY(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||nu.flushSync(r)}).catch(()=>{if(n){if(i!=null&&i.aborted)return;nu.flushSync(r)}else a.getAnimations().length>0&&a.getAnimations().some(c=>c.pending||c.playState!=="finished")&&l()})}t?s.request(l):l()}))})}function OY(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),Kn(()=>{if(!e&&i&&s!=="ending"&&n){const l=pt.request(()=>{r("ending")});return()=>{pt.cancel(l)}}},[e,i,s,n]),Kn(()=>{if(!e||t)return;const l=pt.request(()=>{nu.flushSync(()=>{r(void 0)})});return()=>{pt.cancel(l)}},[t,e]),Kn(()=>{if(!e||!t)return;e&&i&&s!=="idle"&&r("starting");const l=pt.request(()=>{r("idle")});return()=>{pt.cancel(l)}},[t,e,i,r,s]),x.useMemo(()=>({mounted:i,setMounted:a,transitionStatus:s}),[i,s])}function LY(e){const{open:t,defaultOpen:n,onOpenChange:s,disabled:r}=e,i=t!==void 0,[a,l]=CY({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:c,setMounted:u,transitionStatus:d}=OY(a,!0,!0),[f,h]=x.useState(a),[{height:p,width:g},b]=x.useState({height:void 0,width:void 0}),k=zY(),[m,y]=x.useState(),v=m??k,[w,j]=x.useState(!1),[C,$]=x.useState(!1),E=x.useRef(null),N=x.useRef(null),S=x.useRef(null),A=x.useRef(null),z=UC(A,!1),M=Ua(L=>{const R=!a,T=qC(MY,L.nativeEvent);if(s(R,T),T.isCanceled)return;const I=A.current;N.current==="css-animation"&&I!=null&&I.style.removeProperty("animation-name"),!w&&!C&&(N.current!=null&&N.current!=="css-animation"&&!c&&R&&u(!0),N.current==="css-animation"&&(!f&&R&&h(!0),!c&&R&&u(!0))),l(R),N.current==="none"&&c&&!R&&u(!1)});return Kn(()=>{i&&N.current==="none"&&!C&&!a&&u(!1)},[i,C,a,t,u]),x.useMemo(()=>({abortControllerRef:E,animationTypeRef:N,disabled:r,handleTrigger:M,height:p,mounted:c,open:a,panelId:v,panelRef:A,runOnceAnimationsFinish:z,setDimensions:b,setHiddenUntilFound:j,setKeepMounted:$,setMounted:u,setOpen:l,setPanelIdState:y,setVisible:h,transitionDimensionRef:S,transitionStatus:d,visible:f,width:g}),[E,N,r,M,p,c,a,v,A,z,b,j,$,u,l,h,S,d,f,g])}const FC=x.createContext(void 0);function GC(){const e=x.useContext(FC);if(e===void 0)throw new Error(nb(15));return e}let Jh=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const DY={[Jh.startingStyle]:""},BY={[Jh.endingStyle]:""},VC={transitionStatus(e){return e==="starting"?DY:e==="ending"?BY:null}};let Qc=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Jh.startingStyle]="startingStyle",e[e.endingStyle=Jh.endingStyle]="endingStyle",e}({}),qY=function(e){return e.panelOpen="data-panel-open",e}({});const HY={[Qc.open]:""},PY={[Qc.closed]:""},UY={open(e){return e?{[qY.panelOpen]:""}:null}},FY={open(e){return e?HY:PY}},WC={...FY,...VC},a1=x.forwardRef(function(t,n){const{render:s,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:l,open:c,...u}=t,d=Ua(l),f=LY({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]),g=sb("div",t,{state:h,ref:n,props:u,stateAttributesMapping:WC});return o.jsx(FC.Provider,{value:p,children:g})});function GY(){return typeof window<"u"}function VY(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function WY(e){return GY()?e instanceof HTMLElement||e instanceof VY(e).HTMLElement:!1}const KY=x.createContext(void 0);function XY(e=!1){const t=x.useContext(KY);if(t===void 0&&!e)throw new Error(nb(16));return t}function ZY(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 YY(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:s=0,native:r=!0}=e,i=x.useRef(null),a=XY(!0)!==void 0,l=Ua(()=>{const h=i.current;return!!((h==null?void 0:h.tagName)==="A"&&(h!=null&&h.href))}),{props:c}=ZY({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:s,isNativeButton:r}),u=x.useCallback(()=>{const h=i.current;QY(h)&&a&&t&&c.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,c.disabled,a]);Kn(u,[u]);const d=x.useCallback((h={})=>{const{onClick:p,onMouseDown:g,onKeyUp:b,onKeyDown:k,onPointerDown:m,...y}=h;return LC({type:r?"button":void 0,onClick(w){if(t){w.preventDefault();return}p==null||p(w)},onMouseDown(w){t||g==null||g(w)},onKeyDown(w){if(t||(l0(w),k==null||k(w)),w.baseUIHandlerPrevented)return;const j=w.target===w.currentTarget&&!r&&!l()&&!t,C=w.key==="Enter",$=w.key===" ";j&&(($||C)&&w.preventDefault(),C&&(p==null||p(w)))},onKeyUp(w){t||(l0(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}m==null||m(w)}},r?void 0:{role:"button"},c,y)},[t,c,r,l]),f=Ua(h=>{i.current=h,u()});return{getButtonProps:d,buttonRef:f}}function QY(e){return WY(e)&&e.tagName==="BUTTON"}const JY={...UY,...VC},o1=x.forwardRef(function(t,n){const{panelId:s,open:r,handleTrigger:i,state:a,disabled:l}=GC(),{className:c,disabled:u=l,id:d,render:f,nativeButton:h=!0,...p}=t,{getButtonProps:g,buttonRef:b}=YY({disabled:u,focusableWhenDisabled:!0,native:h}),k=x.useMemo(()=>({"aria-controls":r?s:void 0,"aria-expanded":r,disabled:u,onClick:i}),[s,u,r,i]);return sb("button",t,{state:a,ref:[n,b],props:[k,p,g],stateAttributesMapping:JY})});let eQ=function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e}({});function tQ(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:g,setOpen:b,setVisible:k,transitionDimensionRef:m,visible:y,width:v}=e,w=x.useRef(!1),j=x.useRef(null),C=x.useRef(d),$=x.useRef(d),E=PC(),N=x.useMemo(()=>n.current==="css-animation"?!y:!d&&!c,[d,c,y,n]),S=Ua(z=>{if(!z)return;if(n.current==null||m.current==null){const R=getComputedStyle(z),T=R.animationName!=="none"&&R.animationName!=="",I=R.transitionDuration!=="0s"&&R.transitionDuration!=="";T&&I||(R.animationName==="none"&&R.transitionDuration!=="0s"?n.current="css-transition":R.animationName!=="none"&&R.transitionDuration==="0s"?n.current="css-animation":n.current="none"),z.getAttribute(eQ.orientation)==="horizontal"||R.transitionProperty.indexOf("width")>-1?m.current="width":m.current="height"}if(n.current!=="css-transition")return;(r===void 0||v===void 0)&&(p({height:z.scrollHeight,width:z.scrollWidth}),$.current&&z.style.setProperty("transition-duration","0s"));let M=-1,L=-1;return M=pt.request(()=>{$.current=!1,L=pt.request(()=>{setTimeout(()=>{z.style.removeProperty("transition-duration")})})}),()=>{pt.cancel(M),pt.cancel(L)}}),A=i0(s,f,S);return Kn(()=>{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 L={"justify-content":z.style.justifyContent,"align-items":z.style.alignItems,"align-content":z.style.alignContent,"justify-items":z.style.justifyItems};Object.keys(L).forEach(R=>{z.style.setProperty(R,"initial","important")}),!$.current&&!a&&z.setAttribute(Qc.startingStyle,""),p({height:z.scrollHeight,width:z.scrollWidth}),M=pt.request(()=>{Object.entries(L).forEach(([R,T])=>{T===""?z.style.removeProperty(R):z.style.setProperty(R,T)})})}else{if(z.scrollHeight===0&&z.scrollWidth===0)return;p({height:z.scrollHeight,width:z.scrollWidth});const L=new AbortController;t.current=L;const R=L.signal;let T=null;const I=Qc.endingStyle;return T=new MutationObserver(_=>{_.some(D=>D.type==="attributes"&&D.attributeName===I)&&(T==null||T.disconnect(),T=null,h(()=>{p({height:0,width:0}),z.style.removeProperty("content-visibility"),g(!1),t.current===L&&(t.current=null)},R))}),T.observe(z,{attributes:!0,attributeFilter:[I]}),()=>{T==null||T.disconnect(),E.cancel(),t.current===L&&(L.abort(),t.current=null)}}return()=>{pt.cancel(M)}},[t,n,E,i,a,c,d,f,h,p,g]),Kn(()=>{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}),!C.current&&!w.current&&z.style.removeProperty("animation-name"),d?(t.current!=null&&(t.current.abort(),t.current=null),g(!0),k(!0)):(t.current=new AbortController,h(()=>{g(!1),k(!1),t.current=null},t.current.signal)))},[t,n,d,f,h,p,g,k,y]),HC(()=>{const z=pt.request(()=>{C.current=!1});return()=>pt.cancel(z)}),Kn(()=>{if(!i)return;const z=f.current;if(!z)return;let M=-1,L=-1;return d&&w.current&&(z.style.transitionDuration="0s",p({height:z.scrollHeight,width:z.scrollWidth}),M=pt.request(()=>{w.current=!1,L=pt.request(()=>{setTimeout(()=>{z.style.removeProperty("transition-duration")})})})),()=>{pt.cancel(M),pt.cancel(L)}},[i,d,f,p]),Kn(()=>{const z=f.current;z&&i&&N&&(z.setAttribute("hidden","until-found"),n.current==="css-transition"&&z.setAttribute(Qc.startingStyle,""))},[i,N,n,f]),x.useEffect(function(){const M=f.current;if(!M)return;function L(R){w.current=!0,b(!0),u(!0,qC(AY,R))}return M.addEventListener("beforematch",L),()=>{M.removeEventListener("beforematch",L)}},[u,f,b]),x.useMemo(()=>({props:{hidden:N,id:l,ref:A}}),[N,l,A])}let L5=function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e}({});function nQ(e){const t=nd(sQ,e).current;return t.next=e,Kn(t.effect),t}function sQ(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function rQ(e){const{enabled:t=!0,open:n,ref:s,onComplete:r}=e,i=nQ(n),a=Ua(r),l=UC(s,n);x.useEffect(()=>{t&&l(()=>{n===i.current&&a()})},[t,n,a,l,i])}const l1=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:g,panelId:b,panelRef:k,runOnceAnimationsFinish:m,setDimensions:y,setHiddenUntilFound:v,setKeepMounted:w,setMounted:j,setPanelIdState:C,setOpen:$,setVisible:E,state:N,transitionDimensionRef:S,visible:A,width:z,transitionStatus:M}=GC(),L=r??!1,R=i??!1;Kn(()=>{if(l)return C(l),()=>{C(void 0)}},[l,C]),Kn(()=>{v(L)},[v,L]),Kn(()=>{w(R)},[w,R]);const{props:T}=tQ({abortControllerRef:u,animationTypeRef:d,externalRef:n,height:f,hiddenUntilFound:L,id:b,keepMounted:R,mounted:h,onOpenChange:p,open:g,panelRef:k,runOnceAnimationsFinish:m,setDimensions:y,setMounted:j,setOpen:$,setVisible:E,transitionDimensionRef:S,visible:A,width:z});rQ({open:g&&M==="idle",ref:k,onComplete(){g&&y({height:void 0,width:void 0})}});const I=x.useMemo(()=>({...N,transitionStatus:M}),[N,M]),_=sb("div",t,{state:I,ref:[n,k],props:[T,{style:{[L5.collapsiblePanelHeight]:f===void 0?"auto":`${f}px`,[L5.collapsiblePanelWidth]:z===void 0?"auto":`${z}px`}},c],stateAttributesMapping:WC});return R||L||!R&&h?_:null});function iQ(e){const t=Math.floor(Math.max(0,e)/6e4);if(t<1)return"Updated just now";if(t<60)return`Updated ${t}m ago`;const n=Math.floor(t/60);return n<24?`Updated ${n}h ago`:`Updated ${Math.floor(n/24)}d ago`}function aQ({atMs:e}){const t=Ql(3e4);return o.jsx("span",{className:"todo-card__updated",children:iQ(t-e)})}const oQ={pending:"Not started",in_progress:"In progress",completed:"Done"};function lQ({status:e}){const t={"aria-label":oQ[e],role:"img",className:"todo-card__status"};return e==="completed"?o.jsx($7,{...t}):e==="in_progress"?o.jsx(NH,{...t}):o.jsx(wH,{...t})}function cQ(e){let t;for(const n of e){const s=n.kind==="run"?n.cot.todoWrittenAtMs:void 0;s!==void 0&&(t===void 0||s>t)&&(t=s)}return t}function uQ({todo:e,writtenThisRun:t,updatedAtMs:n}){const s=(e==null?void 0:e.items)??[],r=s.length,i=s.filter(f=>f.status==="completed").length,a=i===r,[l,c]=x.useState();if(r===0||!t&&a)return null;const u=l??!a,d=s.find(f=>f.status==="in_progress")??s.find(f=>f.status==="pending");return o.jsx("section",{className:"todo-card","data-slot":"todo-card","aria-label":"Todo",children:o.jsxs(a1,{open:u,onOpenChange:c,children:[o.jsxs("div",{className:"todo-card__header",children:[o.jsxs(o1,{className:"todo-card__trigger",children:[a?o.jsx($7,{"aria-label":"All done",role:"img",className:"todo-card__done"}):null,o.jsxs("span",{className:"todo-card__title",children:["Todo ",i,"/",r]}),!u&&d!==void 0?o.jsxs(o.Fragment,{children:[" ",o.jsxs("span",{className:"todo-card__current",children:["· ",d.text]})]}):null,o.jsx(Hr,{"aria-hidden":"true",className:"chat-step__chevron"})]}),n===void 0?null:o.jsx(aQ,{atMs:n})]}),o.jsx(l1,{className:"todo-card__panel",children:o.jsx("ol",{className:"todo-card__items",children:s.map((f,h)=>o.jsxs("li",{className:"todo-card__item","data-status":f.status,children:[o.jsx(lQ,{status:f.status}),f.status==="completed"?o.jsx("s",{children:f.text}):o.jsx("span",{children:f.text})]},h))})})]})})}function dQ(e){return e.toolName==="todo_write"&&e.state==="output-available"}function fQ(e){const t=[];let n;for(const s of e){if(s.kind==="interim"){n=void 0,t.push({kind:"interim",key:`segment-${t.length}`,text:s.text});continue}n===void 0&&(n={kind:"trace",key:`segment-${t.length}`,steps:[],counted:[],live:!1},t.push(n)),n.steps.push(s),n.live||(n.live=s.live),s.kind==="tools"&&n.counted.push(...s.tools.filter(r=>!dQ(r)))}return t}const hQ=300,xQ=700;function pQ(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function KC({children:e,className:t="",dwellMs:n=xQ,pageKey:s="",...r}){const i=Math.max(n,hQ),[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 g=()=>{const k=d.current;d.current=f.current,h.current=Date.now(),l(f.current),u(pQ()?null:k.node)};if(p.current!==null)return;const b=i-(Date.now()-h.current);if(b<=0){g();return}p.current=window.setTimeout(()=>{p.current=null,f.current.key!==d.current.key&&g()},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:g=>{g.target===g.currentTarget&&u(null)},children:s===a.key?e:a.node})]})})}const gQ=/(\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`)/g;function mQ(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 yQ(e){return e.replace(/(^|\n)\*\*([^*\n]+)\*\*(?=\n|$)/g,"$1$2")}function kQ(e){return e.split(gQ).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 bQ({text:e,unwrapLines:t=!1,className:n,...s}){let r=mQ(e);return t&&(r=yQ(r)),o.jsx("span",{className:`chat-thought-md ${n??""}`.trim(),...s,children:kQ(r)})}function c1({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 vQ(e){if(!(e===void 0||!Number.isFinite(e)||e<0))return e<1e3?"briefly":`${Math.round(e/1e3)}s`}function wQ({className:e="",dwellMs:t,step:n,...s}){const r=n.text.trim(),i=vQ(n.durationMs),a=o.jsx(KC,{dwellMs:t,pageKey:n.live?"live":"settled",children:n.live?o.jsx(c1,{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(a1,{className:`chat-step ${e}`.trim(),"data-slot":"chat-thought-step",...s,children:[o.jsxs(o1,{className:"chat-step__trigger",children:[a,o.jsx(Hr,{"aria-hidden":"true",className:"chat-step__chevron"})]}),o.jsx(l1,{keepMounted:!0,className:"chat-step__panel",children:o.jsx("div",{className:"chat-step__body",children:o.jsx(bQ,{text:n.text})})})]}):o.jsx("p",{className:`chat-step chat-step--plain ${e}`.trim(),"data-slot":"chat-thought-step",...s,children:a})}const jQ={shell:T7,search:RH,web:CH,file:Ek,edit:N7,tool:A7};function Hf({className:e="",kind:t,...n}){const s=jQ[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 SQ={"input-streaming":"running","input-available":"running","output-available":"complete","output-error":"error"};function XC(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 ZC({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(Hf,{kind:Qh(i.toolName)}),o.jsx(YC,{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 CQ(e,t){const n=XC(e)?o.jsx(ZC,{tool:e}):void 0;return{name:_r(e.toolName)??"tool",status:SQ[e.state],target:eb(e.argsText),...e.diffStat?{additions:e.diffStat.additions,deletions:e.diffStat.deletions}:{},duration:AC(e.durationMs),errorMessage:e.state==="output-error"?e.output:void 0,key:e.toolCallId??`tool-${t}`,resultDetail:n}}function YC({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(o6,{calls:e.map(CQ)})}):null}const vc={past:"Ran",noun:["command","commands"]},Wp={past:"Read",noun:["file","files"]},D5={past:"Edited",noun:["file","files"]},B5={past:"Wrote",noun:["file","files"]},q5={past:"Searched",noun:["pattern","patterns"]},H5={past:"Searched",noun:["path","paths"]},$Q={past:"Listed",noun:["directory","directories"]},P5={past:"Searched",noun:["web page","web pages"]},lf={past:"Fetched",noun:["page","pages"]},EQ={bash:vc,shell:vc,sh:vc,terminal:vc,cmd:vc,read:Wp,read_file:Wp,cat:Wp,edit:D5,str_replace:D5,write:B5,write_file:B5,grep:q5,find:H5,glob:H5,ls:$Q,search:q5,web_search:P5,websearch:P5,webfetch:lf,web_fetch:lf,web:lf,browser:lf},QC={past:"Used",noun:["tool","tools"]};function U5(e){return EQ[MC(e)]??QC}const F5=72;function NQ(e){return e.length<=F5?e:e.includes("/")&&!e.includes(" ")?`…${e.slice(-71)}`:`${e.slice(0,F5-1)}…`}function G5(e,[t,n]){return e!==1?`${e} ${n}`:`${t==="tool"?"a":"1"} ${t}`}function JC(e){if(e.length===1){const[n]=e,s=U5(n.toolName),r=eb(n.argsText);return r?`${s.past} ${NQ(r)}`:s===QC?`Used ${_r(n.toolName)??"a tool"}`:`${s.past} ${G5(1,s.noun)}`}const t=new Map;for(const n of e){const s=U5(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} ${G5(s,n.noun)}`;return r===0?i:i.charAt(0).toLowerCase()+i.slice(1)}).join(", ")}function e$(e){const t=e.filter(s=>s.state==="output-error").length,n=e.reduce((s,r)=>r.diffStat?{additions:((s==null?void 0:s.additions)??0)+r.diffStat.additions,deletions:((s==null?void 0:s.deletions)??0)+r.diffStat.deletions}:s,void 0);return{failed:t,diffStat:n}}function t$({failed:e,diffStat:t}){return o.jsxs(o.Fragment,{children:[t?o.jsxs(o.Fragment,{children:[" ",o.jsxs("span",{className:"chat-step__meta","data-slot":"chat-tool-diff-stat",children:[o.jsxs("span",{className:"text-success",children:["+",t.additions]})," ",o.jsxs("span",{className:"text-danger",children:["-",t.deletions]})]})]}):null,e>0?o.jsxs(o.Fragment,{children:[" ",o.jsx("span",{className:"chat-step__meta chat-step__meta--error",children:e===1?"1 failed":`${e} failed`})]}):null]})}function n$(e){const t=[];for(const n of e.children??[])t.push(n,...n$(n));return t}function TQ({className:e="",dwellMs:t,step:n,...s}){const{tools:r}=n,{failed:i,diffStat:a}=e$(r),l=r.flatMap(n$),c=l.length,u=l.filter(k=>k.state==="output-error").length,d=r.reduce((k,m)=>k+(m.durationMs??0),0),f=r.find(k=>k.toolCallId===n.activeToolCallId)??r[r.length-1];let h,p=f;for(;p;){const k=(p.children??[]).filter(y=>y.state==="input-available"),m=k[k.length-1];if(!m)break;h=m,p=m}const g=n.live?Qh(f==null?void 0:f.toolName):PZ(r),b=n.live?`running:${(f==null?void 0:f.toolCallId)??"none"}`:"settled";return o.jsxs(a1,{className:`chat-step chat-tool-step ${e}`.trim(),"data-slot":"chat-tool-step",...s,children:[o.jsxs(o1,{className:"chat-step__trigger",children:[o.jsx(KC,{dwellMs:t,pageKey:b,children:n.live?o.jsxs("span",{className:"chat-tool-step__page",children:[o.jsx(Hf,{kind:g}),o.jsx(c1,{className:"chat-step__label",children:f!=null&&f.toolName?h!=null&&h.toolName?`Running ${_r(f.toolName)} › ${_r(h.toolName)}…`:`Running ${_r(f.toolName)}…`:"Running…"})]}):o.jsxs("span",{className:"chat-tool-step__page",children:[o.jsx(Hf,{kind:g}),o.jsx("span",{className:"chat-step__label",children:JC(r)}),c>0?o.jsx("span",{className:"chat-step__meta","data-slot":"chat-tool-nested-count",children:c===1?"1 nested call":`${c} nested calls`}):null,u>0?o.jsx("span",{className:"chat-step__meta chat-step__meta--error","data-slot":"chat-tool-nested-failed",children:u===1?"1 nested failed":`${u} nested failed`}):null,o.jsx(t$,{failed:i,diffStat:a}),d>0?o.jsx("span",{className:"chat-step__meta",children:AC(d)}):null]})}),o.jsx(Hr,{"aria-hidden":"true",className:"chat-step__chevron"})]}),o.jsx(l1,{keepMounted:!0,className:"chat-step__panel",children:r.length===1?XC(r[0])?o.jsx("div",{className:"chat-tool-step__detail","data-slot":"chat-tool-step-detail",children:o.jsx(ZC,{tool:r[0]})}):null:o.jsx("ol",{className:"chat-tool-step__list",children:r.map((k,m)=>o.jsxs("li",{className:"chat-tool-step__item",children:[o.jsx(Hf,{kind:Qh(k.toolName)}),o.jsx(YC,{tools:[k]})]},k.toolCallId??m))})})]})}function zQ(e){if(e===void 0||!Number.isFinite(e)||e<0)return;const t=Math.max(1,Math.round(e/1e3));if(t<60)return`${t}s`;if(t<3600){const i=Math.floor(t/60),a=t%60;return`${i}m ${a}s`}const n=Math.floor(t/3600),s=Math.floor(t%3600/60),r=t%60;return`${n}h ${s}m ${r}s`}function AQ(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`}function MQ({children:e,className:t="",phase:n,...s}){return n==="hidden"?null:o.jsx("div",{className:`chain-of-thought ${t}`.trim(),"data-phase":n,"data-slot":"chain-of-thought",...s,children:e})}function RQ({startedAtMs:e,running:t}){const[n,s]=x.useState(()=>Date.now()),[r,i]=x.useState(t);return t&&!r&&i(!0),x.useEffect(()=>{if(!t)return;s(Date.now());const a=window.setInterval(()=>s(Date.now()),100);return()=>{window.clearInterval(a),s(Date.now())}},[t]),e===void 0||!r?null:o.jsxs(o.Fragment,{children:[" ",o.jsxs("span",{className:"chat-step__meta","data-slot":"chat-trace-clock",children:["· ",AQ(n-e)]})]})}function _Q(e){const t=e.findLast(s=>s.live);if((t==null?void 0:t.kind)==="thinking")return"Thinking…";if((t==null?void 0:t.kind)!=="tools")return;const n=t.tools.find(s=>s.toolCallId===t.activeToolCallId)??t.tools[t.tools.length-1];return n!=null&&n.toolName?`Running ${_r(n.toolName)}…`:"Running…"}function V5({className:e="",clock:t,counted:n,live:s=!1,steps:r,tail:i,waiting:a,...l}){const c=n.filter(p=>p.state==="output-available"||p.state==="output-error"),u=s?_Q(r)??a:void 0,d=r.some(p=>p.kind==="thinking"&&!p.live),f=c.length>0?JC(c):u!==void 0?void 0:d?"Thought":"Updated the todo list",h=o.jsxs(o.Fragment,{children:[f===void 0?null:o.jsx("span",{className:"chat-trace__label",children:f}),o.jsx(t$,{...e$(c)}),u===void 0?null:o.jsxs(o.Fragment,{children:[f===void 0?null:o.jsxs(o.Fragment,{children:[" ",o.jsx("span",{className:"chat-step__meta",children:"·"})," "]}),o.jsx(c1,{className:"chat-trace__label","data-slot":"chat-trace-current",children:u})]}),i===void 0?null:o.jsxs(o.Fragment,{children:[" ",o.jsxs("span",{className:"chat-step__meta","data-slot":"chat-trace-tail",children:["· ",i]})]}),t===void 0?null:o.jsx(RQ,{...t})]});return r.length===0?o.jsx("div",{className:`chat-trace ${e}`.trim(),"data-slot":"chat-trace",...l,children:o.jsx("p",{className:"chain-of-thought__label",children:h})}):o.jsxs(a1,{className:`chat-trace ${e}`.trim(),"data-slot":"chat-trace",...l,children:[o.jsxs(o1,{className:"chain-of-thought__trigger","data-slot":"chat-trace-trigger",children:[h,o.jsx(Hr,{"aria-hidden":"true",className:"chat-step__chevron"})]}),o.jsx(l1,{keepMounted:!0,className:"chain-of-thought__content","data-slot":"chain-of-thought-content",children:o.jsx("ol",{className:"chain-of-thought__steps","data-slot":"chain-of-thought-steps",children:r.map(p=>o.jsx("li",{className:"chain-of-thought__step","data-slot":"chain-of-thought-step",children:p.kind==="thinking"?o.jsx(wQ,{step:p}):o.jsx(TQ,{step:p})},p.id))})})]})}const c0=x.createContext(!1);function IQ(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 OQ(e){return typeof e=="string"?e:Array.isArray(e)&&e.every(t=>typeof t=="string")?e.join(""):null}function LQ({href:e,children:t}){const n=IQ(e);if(!n){const i=/^https?:\/\//.test(e);return o.jsx(M6,{color:"accent",hasUnderline:!0,href:e,type:"inherit",...i?{target:"_blank",rel:"noopener noreferrer"}:{},children:o.jsx(c0.Provider,{value:!0,children:t})})}const s=OQ(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(Ek,{"aria-hidden":!0,className:"chat-file-link__icon"}),o.jsx(c0.Provider,{value:!0,children:r?n.line?`${n.name}:${n.line}`:n.name:t})]})}const s$=3,r$=x.createContext(void 0);function i$({children:e}){const t=x.useContext(r$),n=x.useContext(c0),s=o.jsx(Z0,{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 a$={inlineCode:i$},o$={inlineCode:i$,link:LQ};function l$({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(r$.Provider,{value:t?n:void 0,children:o.jsx(gy,{components:t?o$:a$,density:"compact",headingLevelStart:s$,children:e})})})}function DQ({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(gy,{components:n?o$:a$,density:"compact",headingLevelStart:s$,isStreaming:t,children:e})})}function BQ({children:e,className:t="",...n}){return o.jsx(oy,{className:`chat-message ${t}`.trim(),"data-slot":"chat-message-user",sender:"user",...n,children:e})}function qQ({children:e,className:t="",...n}){return o.jsx(oy,{className:`chat-message ${t}`.trim(),"data-slot":"chat-message-assistant",sender:"assistant",...n,children:e})}function HQ({children:e,className:t="",...n}){return o.jsx(r6,{className:t||void 0,"data-slot":"chat-message-bubble",...n,children:e})}function PQ({children:e,className:t="",...n}){return o.jsx("div",{className:`chat-message__body ${t}`.trim(),"data-slot":"chat-message-body",...n,children:e})}function UQ({children:e,className:t="",...n}){return o.jsx("div",{className:`chat-message__content ${t}`.trim(),"data-slot":"chat-message-content",...n,children:e})}function u1({"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 Fa({children:e,className:t="",...n}){return o.jsx("div",{className:`chat-message__actions ${t}`.trim(),"data-slot":"chat-message-actions",...n,children:e})}function FQ(e){return o.jsx(u1,{...e,children:o.jsx(jH,{"aria-hidden":"true",size:16})})}function GQ(e){return o.jsx(u1,{...e,children:o.jsx(LH,{"aria-hidden":"true",size:16})})}function VQ(e){return o.jsx(u1,{...e,children:o.jsx(OH,{"aria-hidden":"true",size:16})})}Fa.Copy=FQ;Fa.ThumbsUp=GQ;Fa.ThumbsDown=VQ;const mi={User:BQ,Assistant:qQ,Bubble:HQ,Body:PQ,Content:UQ,Action:u1},WQ=new Set(["ECONNREFUSED","ETIMEDOUT","ENOTFOUND","EAI_AGAIN","ECONNRESET","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_SOCKET"]);function KQ(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 c$(e,t=0){if(t>4)return{message:""};const n=KQ(e);if(!e||typeof e!="object")return{message:n};const s=e,r=XQ(s),i=typeof s.code=="string"&&WQ.has(s.code)?s.code:void 0,a=c$(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 XQ(e){if(typeof e.statusCode=="number")return e.statusCode;if(typeof e.status=="number")return e.status;const t=e.$metadata;if(W5(t)&&typeof t.httpStatusCode=="number")return t.httpStatusCode;const n=e.$response;if(W5(n)&&typeof n.statusCode=="number")return n.statusCode}function W5(e){return typeof e=="object"&&e!==null}const ZQ=/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,YQ=/invalid_grant|oauth refresh failed|refresh.?token/i;function QQ(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||ZQ.test(e.message)?"network":/invalid.?api.?key|authentication_error|unauthorized/i.test(e.message)||YQ.test(e.message)?"auth":"unknown"}function JQ(e){return QQ(c$(e))}function eJ(e){const t=JQ(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 tJ({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=eJ(e),g=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(mt,{status:"error",title:p.title,description:p.description}),o.jsxs(we,{gap:2,wrap:"wrap",children:[n?o.jsx(ne,{label:"Provider settings",size:"sm",variant:"secondary",onClick:n}):null,s,t?o.jsx(ne,{label:"Retry request",size:"sm",variant:"secondary",isDisabled:a,onClick:()=>void g()}):null]}),f?o.jsx(se,{role:"alert",style:{color:"var(--danger)"},children:f}):null,o.jsx($6,{trigger:o.jsx(se,{type:"body",size:"sm",color:"secondary",children:"Error details"}),isOpen:c,onOpenChange:u,children:c?o.jsx(se,{as:"div",type:"body",size:"sm",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:e}):null})]})}const u0=e=>`data:${e.mimeType};base64,${e.data}`;function nJ({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(ih,{src:u0(s),alt:`Image ${r+1}`,onClick:()=>n(r)},r)),t===void 0?null:o.jsx(A6,{isOpen:!0,media:e.map((s,r)=>({src:u0(s),alt:`Image ${r+1}`})),index:t,onIndexChange:n,onOpenChange:s=>{s||n(void 0)}})]})}const K5={done:"Done",failed:"Failed",running:"Running"};function u$(e){const t=Math.max(0,Math.floor(e/1e3));return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}function sJ({startedAt:e}){const t=Ql(1e3);return o.jsx(o.Fragment,{children:u$(t-e)})}function rJ({tool:e,summary:t,openInPanel:n}){const s=tb(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?Mn(t):eb(e.argsText)??"Subagent",l=r==null?void 0:r.startedAt,c=r==null?void 0:r.endedAt,u=[K5[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(sJ,{startedAt:l},"elapsed"):c===void 0?void 0:u$(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(fr,{variant:i==="failed"?"error":i==="running"?"success":"neutral",label:K5[i],isPulsing:i==="running"}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:a}),r===void 0?null:o.jsx(ne,{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:["→ ",_r(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 iJ({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=tb(r);return o.jsx(rJ,{tool:r,summary:(i==null?void 0:i.kind)==="subagent"?t==null?void 0:t(i.conversationId):void 0,openInPanel:n},s)})})}const Kp=(e,t,n)=>e.startsWith(`${t} ${n}`)?e.slice(t.length+1+n.length):e.slice(t.length+1);function d$(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=Kp(c,"---","a/")):(l(),n=a(""),c==="--- /dev/null"?n.isNew=!0:n.oldPath=Kp(c,"---","a/"));continue}n!==void 0&&(c.startsWith("+++ ")?c==="+++ /dev/null"?n.isDeleted=!0:n.path=Kp(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 aJ={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)"},oJ={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 f$({patch:e}){const t=x.useMemo(()=>d$(e),[e]);return t.length===0?o.jsx(se,{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(se,{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(Nn,{label:"new",color:"green",size:"sm"}):null,n.isDeleted?o.jsx(Nn,{label:"deleted",color:"red",size:"sm"}):null,o.jsxs(se,{type:"supporting",children:["+",n.additions," −",n.deletions]})]}),n.binary===!0?o.jsx(se,{type:"supporting",children:"Binary file"}):n.lines.length===0?null:o.jsx("div",{style:aJ,children:n.lines.map((r,i)=>o.jsx("div",{style:oJ[r.kind],children:r.text},i))})]},`${n.path}-${s}`))})}function lJ(e){return e.kind==="diff"?o.jsx(f$,{patch:e.patch}):void 0}function cJ(e){const t=n=>{var a;const s=tb(n),r=s===void 0?void 0:lJ(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 uJ({entry:e,connected:t,openInPanel:n,onFork:s,canFork:r=!0,forksAt:i,summaryOf:a,onRetry:l,todo:c}){switch(e.kind){case"user":return o.jsx(mi.User,{children:o.jsxs("div",{className:"flex flex-col items-end gap-1",children:[e.images.length===0?null:o.jsx(nJ,{images:e.images}),e.text===""?null:o.jsxs(o.Fragment,{children:[o.jsx(mi.Bubble,{children:o.jsx(mi.Content,{children:e.text})}),o.jsx(Fa,{className:"shrink-0",children:o.jsx(Fa.Copy,{"aria-label":"Copy",tooltip:"Copy",onPress:()=>{var u;(u=navigator.clipboard)==null||u.writeText(e.text)}})})]})]})});case"run":return o.jsx(dJ,{entry:e,connected:t,openInPanel:n,onFork:s,canFork:r,forksAt:i,summaryOf:a,onRetry:l,todo:c});case"compaction":return o.jsx(nh,{variant:"divider",children:"Earlier context summarized"});case"reset":return o.jsx(nh,{variant:"divider",children:"New context"})}}function dJ({entry:e,connected:t,openInPanel:n,onFork:s,canFork:r=!0,forksAt:i,summaryOf:a,onRetry:l,todo:c}){const{view:u,subagents:d}=x.useMemo(()=>iY(e.cot),[e.cot]),f=x.useMemo(()=>cJ(u),[u]),h=f.answer,p=e.forkEntryId===void 0?[]:(i==null?void 0:i(e.forkEntryId))??[],g=f.phase==="settled"&&(h!==void 0||e.forkEntryId!==void 0&&(r||p.length>0));return o.jsx(mi.Assistant,{children:o.jsxs(mi.Body,{children:[e.interrupted?o.jsx("p",{className:"mb-1",children:o.jsx(Nn,{label:"interrupted",color:"orange",size:"sm"})}):null,o.jsx(fJ,{view:f}),o.jsx(iJ,{tools:d,summaryOf:a,openInPanel:n}),h===void 0?null:o.jsx(mi.Content,{children:h.streaming?o.jsx(DQ,{isStreaming:!0,children:h.text}):o.jsx(l$,{children:h.text})}),e.failure===void 0?null:o.jsx(tJ,{error:e.failure,onRetry:l}),g?o.jsxs(Fa,{className:"chat-message__actions--persist",children:[h===void 0?null:o.jsx(Fa.Copy,{"aria-label":"Copy",tooltip:"Copy",onPress:()=>{var b;(b=navigator.clipboard)==null||b.writeText(h.text)}}),e.forkEntryId===void 0?null:p.length>0?o.jsxs("button",{type:"button",className:"pigui-fork-chip","aria-label":`${p.length} ${p.length===1?"fork":"forks"}`,title:"Open in Threads",disabled:!t,onClick:()=>n(p[0],"threads"),children:[o.jsx(Oh,{"aria-hidden":"true"}),p.length," ",p.length===1?"fork":"forks"]}):r?o.jsx(mi.Action,{"aria-label":"Fork",tooltip:"Continue from here in a new conversation",disabled:!t,onPress:()=>s(e.forkEntryId),children:o.jsx(Oh,{"aria-hidden":"true",className:"size-4"})}):null]}):null,o.jsx(uQ,{todo:c==null?void 0:c.state,writtenThisRun:f.todoWrittenAtMs!==void 0,...(c==null?void 0:c.updatedAtMs)===void 0?{}:{updatedAtMs:c.updatedAtMs}})]})})}function fJ({view:e}){var d;const t=x.useMemo(()=>fQ(e.steps),[e.steps]);if(e.phase==="hidden")return null;const n=e.phase==="thinking"||e.phase==="acting";if(!n&&t.length===0)return null;const s=e.phase==="settled"?zQ(e.elapsedMs):void 0,r=s===void 0?void 0:e.outcome==="failed"?`Failed after ${s}`:s,i=n||e.phase==="answering"?{startedAtMs:e.anchorMs,running:n}:void 0,a=e.phase==="thinking"?"Thinking…":"Working…",l=n&&((d=t.at(-1))==null?void 0:d.kind)!=="trace",c=l?t.length:t.findLastIndex(f=>f.kind==="trace"),u={...n?{live:!0,waiting:a}:{},...r===void 0?{}:{tail:r},...i===void 0?{}:{clock:i}};return o.jsxs(MQ,{phase:e.phase,children:[t.map((f,h)=>f.kind==="interim"?o.jsx(mi.Content,{"data-slot":"chat-interim-output",children:o.jsx(l$,{children:f.text})},f.key):o.jsx(V5,{steps:f.steps,counted:f.counted,...h===c?u:{}},f.key)),l?o.jsx(V5,{steps:[],counted:[],...u},`segment-${c}`):null]})}function h$({conversation:e,toolPresentations:t,connected:n,canFork:s,openInPanel:r,onFork:i,forksAt:a,summaryOf:l,ownOnly:c,forkSource:u,onRetry:d,docs:f}){const h=Kx(e),p=x.useMemo(()=>c?{...e,entries:e.entries.filter(w=>w.conversationId===e.conversation.id)}:e,[e,c]),g=x.useMemo(()=>sY(p,t,h),[p,t,h]),b=x.useMemo(()=>rY(g),[g]),k=x.useMemo(()=>hJ(f),[f]),m=x.useMemo(()=>cQ(g),[g]),y=x.useMemo(()=>k===void 0?void 0:{state:k,...m===void 0?{}:{updatedAtMs:m}},[k,m]),v=g.findLastIndex(w=>w.kind==="run");return g.length===0&&!c?null:o.jsx(s6,{isStreaming:h,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(nh,{variant:"divider",children:["Forked from ",u]}):null,g.map((w,j)=>o.jsx(uJ,{entry:w,connected:n,openInPanel:r,onFork:i,canFork:s,forksAt:a,summaryOf:l,...j===v&&y!==void 0?{todo:y}:{},onRetry:d!==void 0&&n&&b!==void 0&&j===g.length-1?()=>d(b):void 0},w.id))]})})}function hJ(e){for(const t of e??[]){if(t.value===null)continue;const n=tc(t.presentation,t.value);if(n.type==="pinomad.todo")return n.value}}const xJ={"needs-answer":"warning",failed:"error",running:"success"},pJ={"needs-answer":"Waiting for your answer",failed:"Failed",running:"Running"};function x$({status:e}){return e===void 0?null:o.jsx("span",{"aria-hidden":"true",children:o.jsx(fr,{variant:xJ[e],label:pJ[e],isPulsing:e!=="failed"})})}function X5({view:e,remote:t,conversation:n,tab:s,onTabChange:r,openInPanel:i,onOpenInMain:a}){var b;const l=Ql(6e4),c=e.side,u=c===void 0||(b=Rr(e.organized,c.id))==null?void 0:b.summary,d=n===void 0?void 0:Wx(e.organized,n.conversation.id),f=d===void 0?[]:k7(d),h=d===void 0?[]:Ck(d),p=h.reduce((k,m)=>k+m.tasks.length,0),g=()=>void t.controller.showSide(void 0);return o.jsxs(fe,{className:"h-full min-h-0",gap:0,children:[o.jsxs(I6,{value:s,onChange:k=>r(k),layout:"fill",hasDivider:!0,children:[o.jsx(mg,{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(mg,{value:"tasks",label:"Tasks",endContent:p===0?void 0:o.jsx("span",{"aria-hidden":"true",className:"text-xs text-muted",children:p})})]}),s==="threads"?c!==void 0&&(u==null?void 0:u.kind)==="fork"?o.jsx(gJ,{view:e,remote:t,side:c,summary:u,onBack:g,onOpenInMain:a,openInPanel:i},c.id):o.jsx(Z5,{children:f.length===0?o.jsx(se,{type:"supporting",className:"p-3 text-muted",children:"No threads yet"}):o.jsx(qt,{density:"compact",children:f.map(k=>o.jsx(Y5,{summary:k.summary,now:l,onOpen:()=>i(k.summary.id,"threads")},k.summary.id))})}):c!==void 0&&(u==null?void 0:u.kind)==="subagent"?o.jsx(mJ,{view:e,remote:t,side:c,summary:u,onBack:g,openInPanel:i}):o.jsx(Z5,{children:h.length===0?o.jsx(se,{type:"supporting",className:"p-3 text-muted",children:"No tasks yet"}):h.map(k=>o.jsx(qt,{density:"compact",header:o.jsx("div",{className:"px-3 pt-2",children:o.jsx(se,{type:"label",weight:"semibold",children:k.label})}),children:k.tasks.map(m=>o.jsx(Y5,{summary:m.summary,now:l,onOpen:()=>i(m.summary.id,"tasks")},m.summary.id))},k.owner.id))})]})}function Z5({children:e}){return o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e})}function Y5({summary:e,now:t,onOpen:n}){return o.jsx(ct,{label:e.kind!=="fork"||e.role===void 0?Mn(e):o.jsxs("span",{className:"inline-flex min-w-0 items-baseline gap-1.5",children:[o.jsx("span",{className:"truncate",children:Mn(e)}),o.jsxs("span",{className:"shrink-0 text-xs text-muted",children:["@",e.role]})]}),description:e.status==="running"&&e.activity!==void 0?`→ ${_r(e.activity.tool)??e.activity.tool}${e.activity.target===void 0?"":` ${e.activity.target}`}`:void 0,startContent:o.jsx(x$,{status:e.status}),endContent:e.updatedAt===void 0?void 0:o.jsx("span",{"aria-hidden":"true",className:"text-xs text-muted",children:Sk(e.updatedAt,t)}),onClick:n})}function p$({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(S7,{className:"size-4","aria-hidden":"true"}),label:e,size:"sm",variant:"ghost",onClick:s}),o.jsx(x$,{status:n}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:t}),r]})}function g$({view:e,remote:t,side:n,openInPanel:s,ownOnly:r,forkSource:i,onRetry:a}){return n.conversation===void 0?null:o.jsx(h$,{conversation:n.conversation,docs:n.docs,toolPresentations:e.toolPresentations,connected:e.connection==="connected",canFork:!1,openInPanel:s,onFork:()=>{},ownOnly:r,forkSource:i,summaryOf:l=>{var c;return(c=Rr(e.organized,l))==null?void 0:c.summary},forksAt:l=>b7(e.organized,n.id,l),onRetry:a})}function gJ({view:e,remote:t,side:n,summary:s,onBack:r,onOpenInMain:i,openInPanel:a}){var g,b,k;const l=n.conversation,c=l!==void 0&&Kx(l),[u,d]=x.useState(""),f=x.useRef(null),h=()=>{const m=u.trim();m!==""&&(zl(),t.controller.submit(m,"followUp",{target:n.id}),d(""))},p=s.parent===void 0||(g=Rr(e.organized,s.parent))==null?void 0:g.summary;return o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[o.jsx(p$,{back:"Back to threads",title:Mn(s),status:s.status,onBack:r,extra:o.jsx(ne,{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(g$,{view:e,remote:t,side:n,openInPanel:a,ownOnly:!0,forkSource:Mn(p),onRetry:async({text:m,images:y,requestId:v})=>{zl(),await t.controller.submit(m,"followUp",{target:n.id,requestId:v,images:y})}}),o.jsx(zC,{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(Jk,{value:u,inputRef:f,placeholder:"Reply in this thread…",status:c?"streaming":"ready",isDisabled:e.connection!=="connected",onSubmit:h,onStop:()=>void t.controller.abort(n.id),onValueChange:d,triggers:Qk(e.agents,f,((b=e.home)==null?void 0:b.kind)!=="chat"&&ds(((k=e.host)==null?void 0:k.protocol.minor)??0,"listFiles")?{key:`conversation:${n.id}`,list:m=>t.controller.listFiles({kind:"conversation",conversationId:n.id},m)}:void 0)})})]})}function mJ({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(p$,{back:"Back to tasks",title:Mn(s),status:s.status,onBack:r}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o.jsx(g$,{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 Q5({view:e,remote:t,conversation:n,narrow:s,open:r,onOpenChange:i,tab:a,onTabChange:l,openInPanel:c,onOpenInMain:u}){const d=z6({defaultSize:440,minSizePx:360,maxSizePx:720,autoSaveId:"pinomad-side-panel"});return s?o.jsx(ns,{isOpen:r,onOpenChange:i,variant:"fullscreen",children:o.jsx(Rn,{header:o.jsx(ss,{title:"Side panel",onOpenChange:i}),content:o.jsx(_n,{padding:0,children:o.jsx(X5,{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(X5,{view:e,remote:t,conversation:n,tab:a,onTabChange:l,openInPanel:c,onOpenInMain:u})}),o.jsx(yy,{direction:"horizontal",position:"overlay",isReversed:!0,label:"Resize side panel",resizable:d.props})]}):null}function yJ(e){return typeof e=="string"?e:e.flatMap(t=>t.type==="text"&&t.text!==void 0?[t.text]:[]).join("")}function kJ(e){return typeof e=="string"||!Array.isArray(e)?0:e.filter(t=>t.type==="image").length}const bJ=e=>e.docs["pi.live"]??{},m$=e=>e.docs["pi.agent"]??{};function vJ(e){var r;const t=bJ(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 wJ(e){return(e.docs["pi.inbox"]??{items:[]}).items.map(n=>({id:n.id,mode:n.mode,text:n.mode==="write"?`<${String(n.entry.kind)}>`:yJ(n.content),imageCount:n.mode==="write"?0:kJ(n.content)}))}function jJ(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}))}const SJ={pending:"pending",in_progress:"in progress",completed:"completed"};function CJ({doc:e}){if(e.value===null)return null;const t=tc(e.presentation,e.value),n=t.type==="pinomad.todo"?"Todo":t.type==="pinomad.question"?"Questions":e.kind,s=t.type==="pinomad.todo"?o.jsx($J,{doc:t.value}):t.type==="pinomad.question"?o.jsx(NJ,{doc:t.value}):o.jsx(TJ,{value:t.value});return o.jsxs(fe,{gap:1,children:[o.jsx(se,{type:"label",weight:"semibold",children:n}),s]})}function $J({doc:e}){return o.jsx(qt,{density:"compact",children:e.items.length===0?o.jsx(ct,{label:"Empty"}):e.items.map((t,n)=>o.jsx(ct,{label:t.text,startContent:o.jsx(Nn,{label:SJ[t.status],size:"sm"})},n))})}function EJ(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 NJ({doc:e}){return o.jsx(qt,{density:"compact",children:e.requests.length===0?o.jsx(ct,{label:"Empty"}):e.requests.flatMap(t=>t.questions.map((n,s)=>{const r=EJ(t,s);return o.jsx(ct,{label:n.question,description:r.label,startContent:o.jsx(Nn,{label:n.header,size:"sm"})},`${t.id}-${s}`)}))})}function TJ({value:e}){const t=typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.entries(e):[["value",e]];return o.jsx(qt,{density:"compact",children:t.map(([n,s])=>o.jsx(ct,{label:n,description:zJ(s)},n))})}function zJ(e){const t=JSON.stringify(e);return t.length<=120?t:`${t.slice(0,117)}...`}const J5=3;function AJ(e,t,n,s,r){const[i,a]=x.useState({kind:"loading"}),l=x.useRef(0);return x.useEffect(()=>{if(!r||n||!s)return;const c=++l.current;e.controller.changes().then(u=>{if(c!==l.current)return;if(!u.available)return a({kind:"unavailable",branch:u.branch});const d=d$(u.patch);a({kind:"ready",files:d.length,additions:d.reduce((f,h)=>f+h.additions,0),deletions:d.reduce((f,h)=>f+h.deletions,0),truncated:u.truncated,branch:u.branch})},()=>{c===l.current&&a({kind:"failed"})})},[e,t,n,s,r]),x.useEffect(()=>a({kind:"loading"}),[t]),i}const cf=e=>e.toLocaleString("en-US");function d1({title:e,children:t}){return o.jsxs("section",{className:"flex flex-col gap-0.5 border-b border-border px-3 py-2.5 last:border-b-0",children:[e===void 0?null:o.jsx("h2",{className:"pb-1 text-xs font-medium text-muted",children:e}),t]})}function Ga({icon:e,children:t,end:n,title:s,onClick:r}){const i=o.jsxs(o.Fragment,{children:[o.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center text-muted",children:e}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:t}),n===void 0?null:o.jsx("span",{className:"shrink-0 tabular-nums",children:n})]}),a="-mx-1.5 flex h-8 items-center gap-2.5 rounded-md px-1.5 text-sm";return r===void 0?o.jsx("div",{className:a,title:s,children:i}):o.jsx("button",{type:"button",className:`${a} hover:bg-surface-hover focus-visible:bg-surface-hover`,title:s,onClick:r,children:i})}function MJ({view:e,remote:t,conversation:n,busy:s,onOpenChanges:r}){var d,f,h;const i=m$(n).cwd,a=((d=e.home)==null?void 0:d.kind)==="chat",l=AJ(t,n.conversation.id,s,e.connection==="connected",!a),c=(f=e.host)==null?void 0:f.protocol.minor,u=c!==void 0&&tr(c,"liveBranch")?l.kind==="ready"||l.kind==="unavailable"?l.branch:void 0:(h=e.checkout)==null?void 0:h.branch;return o.jsxs(d1,{title:"Workspace",children:[i===void 0?null:o.jsx(Ga,{icon:o.jsx(Al,{className:"size-4"}),title:i,children:o.jsx("span",{className:"block truncate text-left [direction:rtl]",children:`${i}`})}),u===void 0?null:o.jsx(Ga,{icon:o.jsx(Oh,{className:"size-4"}),children:u}),a?null:o.jsx(RJ,{stat:l,onOpen:r})]})}function RJ({stat:e,onOpen:t}){if(e.kind==="unavailable")return null;const n=e.kind==="loading"?o.jsx("span",{className:"text-muted",children:"…"}):e.kind==="failed"?o.jsx("span",{className:"text-muted",children:"—"}):e.files===0?o.jsx("span",{className:"text-muted",children:"None"}):e.additions===0&&e.deletions===0?o.jsxs("span",{className:"text-muted",children:[e.files," file",e.files===1?"":"s"]}):o.jsxs("span",{"aria-label":`${cf(e.additions)} added, ${cf(e.deletions)} removed${e.truncated?" at least":""}`,children:[o.jsxs("span",{className:"text-success",children:["+",cf(e.additions),e.truncated?"+":""]})," ",o.jsxs("span",{className:"text-danger",children:["−",cf(e.deletions),e.truncated?"+":""]})]});return o.jsx(Ga,{icon:o.jsx(E7,{className:"size-4"}),end:n,onClick:t,children:"Changes"})}const _J=new Set(["running","needs-answer"]);function IJ({view:e,conversation:t,onOpenTasks:n}){const s=Wx(e.organized,t.conversation.id),r=s===void 0?[]:Ck(s).flatMap(d=>d.tasks.map(f=>f.summary));if(r.length===0)return null;const i=r.filter(d=>_J.has(d.status)),a=r.filter(d=>d.status==="failed").length,l=r.length-i.length-a,c=i.length-J5,u=[c>0?`${c} more running`:void 0,l>0?`${l} done`:void 0,a>0?`${a} failed`:void 0].filter(d=>d!==void 0);return o.jsxs(d1,{title:"Subagents",children:[i.slice(0,J5).map(d=>o.jsx(Ga,{icon:o.jsx(fr,{variant:d.status==="needs-answer"?"warning":"success",label:d.status==="needs-answer"?"Waiting for your answer":"Running",isPulsing:!0}),end:d.activity===void 0?void 0:o.jsx("span",{className:"text-xs text-muted",children:_r(d.activity.tool)??d.activity.tool}),onClick:()=>n(d.id),children:Mn(d)},d.id)),u.length===0?null:o.jsx(Ga,{icon:null,onClick:()=>n(),children:o.jsx("span",{className:"text-muted",children:u.join(" · ")})})]})}const OJ={connecting:"warning",connected:"success",failed:"error",disabled:"neutral"};function LJ({view:e}){const t=e.mcp;return t===null||t.servers.length===0&&t.errors.length===0?null:o.jsxs(d1,{title:"Sources",children:[t.servers.map(n=>o.jsx(Ga,{icon:o.jsx(fr,{variant:OJ[n.state],label:n.state,isPulsing:n.state==="connecting"}),title:n.error,end:o.jsx("span",{className:"text-xs text-muted",children:n.state==="connected"?`${n.tools} tool${n.tools===1?"":"s"}`:n.state}),children:n.name},n.name)),t.errors.map((n,s)=>o.jsx(Ga,{icon:o.jsx(fr,{variant:"error",label:"config error"}),title:n,children:o.jsx("span",{className:"text-danger",children:n})},s))]})}function DJ({view:e,remote:t}){const n=e.docs.filter(s=>{if(s.value===null)return!1;const r=tc(s.presentation,s.value).type;return r!=="pinomad.todo"&&r!=="pinomad.question"});return n.length===0?null:o.jsx(o.Fragment,{children:n.map(s=>o.jsx(d1,{children:o.jsx(CJ,{doc:s,remote:t,connected:e.connection==="connected"})},s.kind))})}function BJ({view:e,remote:t,conversation:n,narrow:s,busy:r,onOpenChanges:i,onOpenTasks:a,onClose:l}){return o.jsxs("aside",{"aria-label":"Overview",className:`absolute end-3 top-3 z-20 flex max-h-[calc(100%-1.5rem)] ${s?"w-[min(20rem,calc(100%-1.5rem))]":"w-[var(--pigui-overview-width)]"} flex-col overflow-y-auto rounded-xl border border-border bg-[var(--color-background-popover)] shadow-[var(--shadow-med)]`,onKeyDown:c=>{c.key==="Escape"&&(c.stopPropagation(),l())},children:[o.jsx(MJ,{view:e,remote:t,conversation:n,busy:r,onOpenChanges:i}),o.jsx(IJ,{view:e,conversation:n,onOpenTasks:a}),o.jsx(LJ,{view:e}),o.jsx(DJ,{view:e,remote:t})]})}const y$="pinomad.sidebar.open",k$="pinomad.overview.open",qJ=()=>typeof window>"u"||window.localStorage.getItem(y$)!=="false",HJ=()=>typeof window<"u"&&window.localStorage.getItem(k$)==="true",b$=e=>e.some(t=>t.summary.status==="running"||t.summary.status==="needs-answer"||b$(t.children));function PJ({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:g,onPanelOpen:b,onPanelTab:k,openInPanel:m,openInMain:y,children:v}){const[w,j]=x.useState(qJ),[C,$]=x.useState(HJ),[E,N]=x.useState(!1),[S,A]=x.useState(!1),[z,M]=x.useState(!1),[L,R]=x.useState(!1),[T,I]=x.useState(!1),[_,O]=x.useState(!1),D=v7(),B=D.reserveMacTrafficLights&&!s&&w,P=()=>{window.localStorage.setItem(y$,String(!w)),j(!w)},V=re=>{window.localStorage.setItem(k$,String(re)),$(re)},Y=re=>void t.controller.switchConversation(re),Z=l===void 0?void 0:Wx(e.organized,l.conversation.id),te=Z!==void 0&&b$(Z.children),J=re=>{if(re!==void 0)return m(re,"tasks");t.controller.showSide(void 0),k("tasks"),b(!0)},K=o.jsx(fF,{view:e,remote:t,draftingChat:i,shownId:l==null?void 0:l.conversation.id,onDraft:f,onSelect:()=>N(!1)});return o.jsxs(o.Fragment,{children:[o.jsx(c4,{className:"pigui-app-layout text-foreground",contentPadding:0,mobileNav:!1,variant:"elevated",sideNav:s||!w?void 0:o.jsx(jy,{resizable:{defaultWidth:260,minWidth:240,maxWidth:320,autoSaveId:"pinomad-app-shell"},header:o.jsx(cF,{connection:e.connection,onCollapse:P,safeLeft:B?D.safeLeft:void 0}),footer:o.jsx(e5,{view:e,onOpenDevices:()=>A(!0),onOpenSettings:()=>M(!0),onPairHost:()=>R(!0),onOpenAccount:()=>I(!0),onForgetHost:()=>O(!0)}),children:K}),children:o.jsxs("div",{className:"flex h-full min-h-0 min-w-0 flex-col",children:[o.jsx(FJ,{narrow:s,sidebarOpen:w,safeLeft:D.reserveMacTrafficLights&&!B?D.safeLeft:void 0,onToggleSidebar:P,onOpenNav:()=>N(!0),title:r?a:Mn(c),role:c==null?void 0:c.role,parentSummary:u,onBackToParent:Y,showOverview:l!==void 0,overviewOpen:C,onOverviewChange:V,panelOpen:p,onPanelChange:b,liveActivity:te}),d,o.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1",children:[o.jsxs("div",{className:"@container relative flex min-h-0 min-w-0 flex-1 flex-col",children:[o.jsx("div",{className:`flex min-h-0 min-w-0 flex-1 flex-col motion-safe:transition-[padding] motion-safe:duration-200 motion-safe:ease-out${C&&l!==void 0&&!s?" pigui-overview-clearance":""}`,children:v}),C&&l!==void 0?o.jsx(BJ,{view:e,remote:t,conversation:l,narrow:s,busy:Kx(l),onOpenChanges:h,onOpenTasks:J,onClose:()=>V(!1)}):null]}),s?null:o.jsx(Q5,{view:e,remote:t,conversation:l,narrow:!1,open:p,onOpenChange:b,tab:g,onTabChange:k,openInPanel:m,onOpenInMain:y})]})]})}),s?o.jsxs(vy,{className:"pigui-app-layout text-foreground",isOpen:E,onOpenChange:N,header:o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-sm font-semibold",children:"PiNomad"}),o.jsx(C9,{connection:e.connection})]}),children:[K,o.jsx(e5,{view:e,onOpenDevices:()=>A(!0),onOpenSettings:()=>M(!0),onPairHost:()=>R(!0),onOpenAccount:()=>I(!0),onForgetHost:()=>O(!0),onSelect:()=>N(!1)})]}):null,s?o.jsx(Q5,{view:e,remote:t,conversation:l,narrow:!0,open:p,onOpenChange:b,tab:g,onTabChange:k,openInPanel:m,onOpenInMain:y}):null,S?o.jsx(qF,{view:e,remote:t,self:n,onClose:()=>A(!1)}):null,z?o.jsx(nG,{view:e,remote:t,onClose:()=>M(!1)}):null,L?o.jsx(v9,{onClose:()=>R(!1)}):null,T?o.jsx(k9,{onClose:()=>I(!1)}):null,_?o.jsx(w9,{onClose:()=>O(!1)}):null,o.jsx(V0,{position:"topEnd",inset:{top:48},isTopLayer:!0,children:o.jsx(UJ,{notices:e.notices})})]})}function UJ({notices:e}){const t=IB(),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 FJ({narrow:e,sidebarOpen:t,safeLeft:n,onToggleSidebar:s,onOpenNav:r,title:i,role:a,parentSummary:l,onBackToParent:c,showOverview:u,overviewOpen:d,onOverviewChange:f,panelOpen:h,onPanelChange:p,liveActivity:g}){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(Am,{className:"size-4"}),label:"Open navigation",size:"sm",variant:"ghost",onClick:r}):t?null:o.jsx(kn,{icon:o.jsx(Am,{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:l===void 0?o.jsxs("span",{className:"flex items-center gap-1.5",children:[o.jsx("span",{className:"truncate",children:i}),a===void 0?null:o.jsxs("span",{className:"shrink-0 text-muted",children:["@",a]})]}):o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(ne,{label:Mn(l),"aria-label":`Back to ${Mn(l)}`,variant:"ghost",size:"sm",onClick:()=>c(l.id)}),o.jsx("span",{"aria-hidden":"true",className:"text-muted",children:"›"}),o.jsx("span",{className:"truncate",children:i}),a===void 0?null:o.jsxs("span",{className:"shrink-0 text-muted",children:["@",a]})]})}),u?o.jsx(kn,{"aria-pressed":d,icon:o.jsx(TH,{className:"size-4"}),label:"Overview",size:"sm",tooltip:d?"Hide overview":"Show overview",variant:"ghost",onClick:()=>f(!d)}):null,o.jsxs("span",{className:"relative",children:[o.jsx(kn,{"aria-pressed":h,icon:o.jsx(qH,{className:"size-4"}),label:"Side panel",size:"sm",tooltip:h?"Hide side panel":"Show side panel",variant:"ghost",onClick:()=>p(!h)}),!h&&g?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 Rc({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($k,{"aria-hidden":"true",className:"invisible size-4 shrink-0"}):null]})}function v$({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 GJ({value:e,onChange:t,isDisabled:n=!1}){return o.jsx("div",{className:"max-w-full","data-testid":"checkout-strategy-picker",children:o.jsx(tu,{isLabelHidden:!0,label:"Where to work",placement:"below",isDisabled:n,options:[{value:"worktree",label:"Git worktree",icon:o.jsx(zm,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"})},{value:"local",label:"Project folder",icon:o.jsx(wu,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"})}],size:"sm",startIcon:e==="worktree"?o.jsx(zm,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}):o.jsx(wu,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}),value:e,variant:"ghost",onChange:s=>t(s==="worktree"?"worktree":"local")})})}function VJ({agents:e,value:t,isDisabled:n=!1,onChange:s}){const r=(e==null?void 0:e.roles)??[];return o.jsx(W0,{alignment:"start",label:"Named agent",placement:"above",width:236,content:o.jsx("div",{className:"flex w-full flex-col gap-1 p-1","data-testid":"agent-popover",onClick:i=>i.stopPropagation(),onMouseDown:i=>i.stopPropagation(),onPointerDown:i=>i.stopPropagation(),children:o.jsxs(qt,{"aria-label":"Named agent",className:"max-h-72 overflow-y-auto",density:"compact",children:[o.jsx(ct,{endContent:t===void 0?o.jsx(Ih,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,isSelected:t===void 0,label:"No agent",onClick:()=>s(void 0)}),r.map(i=>o.jsx(ct,{description:i.description,endContent:t===i.name?o.jsx(Ih,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,isSelected:t===i.name,label:i.name,onClick:()=>s(i.name)},i.name))]})}),children:o.jsx(ne,{className:"min-w-0 max-w-[12rem] flex-nowrap gap-1.5 px-2 text-muted","data-testid":"agent-trigger",isDisabled:n,label:"Named agent",size:"sm",variant:"ghost",children:o.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[o.jsx(Xx,{"aria-hidden":"true",className:"size-4 shrink-0"}),o.jsx("span",{className:"truncate",children:t===void 0?"No agent":`@${t}`}),o.jsx($k,{"aria-hidden":"true",className:"size-4 shrink-0"})]})})})}function w$({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(ih,{src:u0(s),alt:`Image ${r+1}`,onRemove:()=>n(r)},r)),t?o.jsx(ih,{isLoading:!0,alt:"Preparing image"}):null]})}const WJ=["image/jpeg","image/png","image/gif","image/webp"],d0=4,KJ=5*1024*1024,XJ=/^[A-Za-z0-9+/]*={0,2}$/;function ZJ(e){if(e.length>d0)return`At most ${d0} images per message`;for(let t=0;t<e.length;t++){const n=e[t];if(!WJ.includes(n.mimeType))return`Unsupported image type: ${n.mimeType} (use JPEG, PNG, GIF or WebP)`;if(n.data===""||n.data.length%4!==0||!XJ.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>KJ)return`Image ${t+1} is larger than 5 MB`}}const YJ=1568;function QJ(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 JJ(e){let t;try{t=await createImageBitmap(e)}catch{throw new Error(`Couldn't read ${e.name}`)}const n=Math.min(1,YJ/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:QJ(await l.arrayBuffer()),mimeType:"image/jpeg"},u=ZJ([c]);if(u!==void 0)throw new Error(u);return c}function S$(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 g=p.filter(y=>y.type.startsWith("image/"));g.length<p.length&&a("Only images can be attached");const b=Math.max(0,d0-u.current),k=g.slice(0,b);if(g.length>b?a("At most 4 images per message"):g.length===p.length&&a(null),k.length===0)return;u.current+=k.length;const m=c.current;r(y=>y+k.length),Promise.all(k.map(y=>JJ(y))).then(y=>{c.current===m&&(n(v=>[...v,...y]),r(v=>v-k.length))},y=>{c.current===m&&(u.current-=k.length,a(y instanceof Error?y.message:String(y)),r(v=>v-k.length))})},f=p=>{u.current-=1,n(g=>g.filter((b,k)=>k!==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 C$="pinomad.draft.model";function eee(e){try{const t=localStorage.getItem(C$);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 tee(e){const[t,n]=x.useState(()=>{var k;const h=eee(e.models),p=h!==void 0?{provider:h.provider,modelId:h.modelId}:e.defaults.model??(e.models[0]===void 0?void 0:{provider:e.models[0].provider,modelId:e.models[0].modelId}),g=((k=ws(e.models,p))==null?void 0:k.thinkingLevels)??["off"],b=(h==null?void 0:h.thinkingLevel)??e.defaults.thinkingLevel??"off";return{model:p,level:Zh(g,b)}}),[s,r]=x.useState(void 0),[i,a]=x.useState({}),l=(h,p)=>{localStorage.setItem(C$,JSON.stringify({...h,thinkingLevel:p}))},c=s===void 0?void 0:JF(s,e.agents,e.models,e.defaults,i),u=YF(e.models,e.defaults,t),d=c??u,f=d.level;return{pick:d,agent:s,resolution:c,setModel:h=>{var g;if(s!==void 0){a(b=>({...b,model:h}));return}const p=Zh(((g=ws(e.models,h))==null?void 0:g.thinkingLevels)??["off"],f);n({model:h,level:p}),l(h,p)},setLevel:h=>{if(s!==void 0){a(p=>({...p,level:h}));return}n(p=>({...p,level:h})),d.model!==void 0&&l(d.model,h)},setAgent:h=>{r(h),a({})}}}function Jc({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 nee({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 see({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(C7,{size:14})}):null]})}Jc.Items=nee;Jc.Item=see;const ree=[{Icon:zH,label:"Explain this repo's architecture"},{Icon:A7,label:"Fix the failing test"},{Icon:T7,label:"Add a CLI flag with docs"},{Icon:E7,label:"Review my uncommitted changes"}];function iee(e){switch(e.kind){case"agent-missing":return{label:`@${e.agent} unavailable`,title:`Agent @${e.agent} is not defined on this host${e.reason===void 0?"":` — ${e.reason}`}`};case"model-missing":return{label:`No model for @${e.agent}`,title:`Agent @${e.agent} pins no model and the host has no default`};case"model-unavailable":{const t=`${e.model.provider}/${e.model.modelId}`,n=e.source==="agent"?`@${e.agent}'s model`:e.source==="default"?"the host default":"the picked model";return{label:`${t} unavailable`,title:`${t} (${n}) is not in the host's model list`}}}}function aee({view:e,remote:t,draft:n,onDraft:s,connected:r}){var _,O,D;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:g,setLevel:b,agent:k,setAgent:m,resolution:y}=tee(e),v=ws(e.models,p.model),w=(v==null?void 0:v.images)===!0,{images:j,pending:C,error:$,add:E,remove:N}=S$(w),S=x.useRef(null),A=(_=e.host)==null?void 0:_.protocol.minor,z=((O=e.agents)==null?void 0:O.roles)??[],M=A!==void 0&&tr(A,"agentConversations")&&(z.length>0||k!==void 0),L=y==null?void 0:y.problem,R=k===void 0||y===void 0?void 0:y.modelFrom!=="override"&&y.levelFrom!=="override"?`from @${k}`:y.modelFrom!=="override"?`model from @${k}`:y.levelFrom!=="override"?`level from @${k}`:void 0,T=w||!r?"Add images…":`Add images… (${(v==null?void 0:v.name)??((D=p.model)==null?void 0:D.modelId)??"This model"} can't see images)`,I=n.kind==="project"?o.jsx(GJ,{value:d,onChange:f,isDisabled:!r}):o.jsx(Rc,{chrome:"selector",icon:Rf,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(c1,{tone:"brand",children:"PiNomad"})]}),o.jsx("div",{className:"flex w-full flex-wrap justify-center gap-2",children:o.jsx(tu,{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(Rf,{"aria-hidden":"true",className:"size-4 shrink-0"}):o.jsx(Al,{"aria-hidden":"true",className:"size-4 shrink-0"}),options:[{value:"chat",label:"No project",icon:o.jsx(Rf,{"aria-hidden":"true",className:"size-4 shrink-0"})},...e.organized.projects.map(B=>({value:B.project.path,label:B.project.name,icon:o.jsx(Al,{"aria-hidden":"true",className:"size-4 shrink-0"})}))],onChange:B=>s(B==="chat"?{kind:"chat"}:{kind:"project",path:B})})}),o.jsxs("div",{className:"flex w-full flex-col gap-3",children:[o.jsx(w$,{inputRef:S,onFiles:E}),o.jsx(Jk,{accent:"brand",accentFocusRing:!0,value:i,inputRef:h,onValueChange:a,triggers:Qk(e.agents,h,n.kind==="project"&&A!==void 0&&ds(A,"listFiles")?{key:`project:${n.path}:${d}`,list:B=>t.controller.listFiles({kind:"project",path:n.path,checkout:d==="local"?"project":"worktree"},B)}:void 0),status:l?"submitted":"ready",onSubmit:()=>{const B=i.trim();B===""&&j.length===0||C||u.current||L!==void 0||(zl(),u.current=!0,c(!0),t.controller.createConversation(n,B,{...n.kind==="project"&&d==="local"?{checkout:"project"}:{},...y===void 0?{...p.model===void 0?{}:{model:p.model},thinkingLevel:p.level}:y.send,...j.length===0?{}:{images:j}}).finally(()=>{u.current=!1,c(!1)}))},isDisabled:!r,submitDisabled:L!==void 0,placeholder:"Do anything with Pi",attachments:j$({images:j,pending:C,onRemove:N}),hasAttachments:j.length>0,onFiles:E,error:$,startActions:o.jsxs(o.Fragment,{children:[o.jsx(Ya,{button:{label:"More actions",variant:"ghost",size:"sm",isIconOnly:!0,icon:o.jsx(el,{"aria-hidden":"true"}),isDisabled:!r},items:[{label:T,isDisabled:!r||!w,onClick:()=>{var B;return(B=S.current)==null?void 0:B.click()}}]}),M?o.jsx(VJ,{agents:e.agents,value:k,isDisabled:!r,onChange:m}):null,o.jsx(Vk,{models:e.models,selected:{model:p.model,level:p.level},isDisabled:!r,sourceHint:R,...L===void 0?{}:{problem:iee(L)},onModelChange:g,onLevelChange:b})]}),footer:o.jsx(v$,{location:I})})]}),o.jsx(Jc,{className:"w-full max-w-[35rem]",children:o.jsx(Jc.Items,{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:ree.map(({Icon:B,label:P})=>o.jsx(Jc.Item,{className:"items-center justify-start",showEndIcon:!1,onPress:()=>{var V;a(P),(V=h.current)==null||V.focusAtEnd()},children:o.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[o.jsx(B,{"aria-hidden":"true",className:"size-4 shrink-0"}),o.jsx("span",{className:"truncate",children:P})]})},P))})})]})})}const oee=80,uf=e=>e>=1e6?`${+(e/1e6).toFixed(1)}M`:e>=1e3?`${Math.round(e/1e3)}k`:`${Math.round(e)}`,lee=e=>e<.01?"<$0.01":`$${e.toFixed(2)}`,e3=2*Math.PI*6;function cee({usage:e,cost:t}){const n=e===void 0?void 0:Math.round(e.used/e.window*100),s=n!==void 0&&n>=oee,r=n===void 0?"—":`${n}%`,i=e===void 0?"Context usage unknown":`Context ${n}% used, ${uf(e.used)} of ${uf(e.window)} tokens`,a=[e===void 0?"No usage data yet":`${uf(e.used)} / ${uf(e.window)}`,t===void 0||t<=0?void 0:lee(t)].filter(c=>c!==void 0).join(" · "),l=e===void 0?0:Math.min(1,e.used/e.window);return o.jsx(Di,{content:a,placement:"above",alignment:"end",children:o.jsxs("span",{className:`inline-flex h-7 items-center gap-1.5 px-1 text-xs ${s?"text-warning":"text-muted"}`,...n===void 0?{"aria-label":i}:{role:"meter","aria-label":i,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.min(100,n)},tabIndex:0,"data-testid":"context-meter",children:[o.jsxs("svg",{"aria-hidden":"true",className:"size-4 -rotate-90",viewBox:"0 0 16 16",children:[o.jsx("circle",{className:"stroke-current opacity-25",cx:"8",cy:"8",fill:"none",r:"6",strokeWidth:"2"}),o.jsx("circle",{className:"stroke-current",cx:"8",cy:"8",fill:"none",r:"6",strokeDasharray:e3,strokeDashoffset:e3*(1-l),strokeWidth:"2"})]}),o.jsx("span",{className:"tabular-nums",children:r})]})})}const uee=e=>e.totalTokens||e.input+e.output+e.cacheRead+e.cacheWrite;function dee(e,t){var n;if(!(t===void 0||!(t>0)))for(let s=e.entries.length-1;s>=0;s-=1){const r=e.entries[s];if(r.kind==="pi.compaction"||r.kind==="pi.reset")return;if(r.kind!=="pi.assistant")continue;const i=(n=r.model)==null?void 0:n[0];if((i==null?void 0:i.role)!=="assistant"||i.stopReason==="aborted"||i.stopReason==="error")continue;const a=i.usage?uee(i.usage):0;if(a>0)return{used:a,window:t}}}function fee({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 hee={steer:"Steer",followUp:"Follow-up",write:"Write"};function xee({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(fee,{body:t(n),tag:hee[n.mode]},n.id))})}function pee({view:e,remote:t,conversation:n,busy:s,narrow:r}){var A,z,M,L;const[i,a]=x.useState(""),l=m$(n),c=vJ(n),u=e.connection!=="connected",d=wJ(n),f=e.checkout,h=((A=e.home)==null?void 0:A.kind)==="project",p=ws(e.models,l.model),g=(p==null?void 0:p.images)===!0,{images:b,pending:k,error:m,add:y,remove:v,clear:w}=S$(g),j=x.useRef(null),C=x.useRef(null),$=g||u?"Add images…":`Add images… (${(p==null?void 0:p.name)??((z=l.model)==null?void 0:z.modelId)??"This model"} can't see images)`,E=h?f!==void 0?o.jsx(Rc,{chrome:"selector",icon:zm,label:"Git worktree",testId:"composer-location-label"}):o.jsx(Rc,{chrome:"selector",icon:wu,label:"Project folder",testId:"composer-location-label"}):o.jsx(Rc,{chrome:"selector",icon:Rf,label:"Chat",testId:"composer-location-label"}),N=f===void 0?null:o.jsx(Rc,{chrome:"button",icon:Oh,label:f.branch,testId:"composer-branch-label"}),S=R=>{const T=i.trim();T===""&&b.length===0||k||(zl(),t.controller.submit(T,R,{images:b}),a(""),w())};return o.jsxs(o.Fragment,{children:[c===""?null:o.jsx(se,{type:"supporting",children:c}),o.jsx(xee,{items:d}),o.jsx(w$,{inputRef:j,onFiles:y}),o.jsx(Jk,{value:i,inputRef:C,status:s?"streaming":"ready",isDisabled:u,placeholder:s?"Steer the running turn…":"Ask the agent…",onValueChange:a,onSubmit:()=>S("steer"),triggers:Qk(e.agents,C,((M=e.home)==null?void 0:M.kind)!=="chat"&&ds(((L=e.host)==null?void 0:L.protocol.minor)??0,"listFiles")?{key:`conversation:${n.conversation.id}`,list:R=>t.controller.listFiles({kind:"conversation",conversationId:n.conversation.id},R)}:void 0),onStop:s?()=>void t.controller.abort():void 0,attachments:j$({images:b,pending:k,onRemove:v}),hasAttachments:b.length>0,onFiles:y,error:m,startActions:o.jsxs(o.Fragment,{children:[o.jsx(Ya,{button:{label:"More actions",variant:"ghost",size:"sm",isIconOnly:!0,icon:o.jsx(el,{"aria-hidden":"true"}),isDisabled:u},items:[{label:$,isDisabled:u||!g,onClick:()=>{var R;return(R=j.current)==null?void 0:R.click()}},{label:"Compact conversation",isDisabled:u,onClick:()=>void t.controller.compact(void 0)}]}),o.jsx(Vk,{models:e.models,selected:{model:l.model,level:l.thinkingLevel??"off"},isDisabled:u,onModelChange:R=>void t.controller.setModel(R),onLevelChange:R=>void t.controller.setThinkingLevel(R)})]}),endActions:s&&(i.trim()!==""||b.length>0)?o.jsx(ne,{label:"Follow-up",variant:"ghost",size:r?"md":"sm",tooltip:"Queue after the running turn",isDisabled:u||k,onClick:()=>S("followUp")}):null,footer:o.jsx(v$,{location:E,branch:N,meter:o.jsx(cee,{usage:dee(n,p==null?void 0:p.contextWindow),cost:jJ(n).reduce((R,T)=>R+T.cost,0)})})})]})}function gee({hostKey:e}){const t=Qx(),{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?Ju(u.value.hostKey):a(u.error)})};return o.jsxs(fe,{gap:2,hAlign:"center",children:[o.jsx(ne,{label:"Pair again with your account",variant:"primary",isLoading:s,isDisabled:l.host.pairing!=="available",onClick:c}),i===void 0?null:o.jsx(mt,{status:"error",title:"Couldn't pair",description:ed(i)})]})}const al=e=>e!==null&&typeof e=="object",$$=new Set(["__proto__","constructor","prototype"]);class Ml extends Error{constructor(n){super(`unsafe path segment: ${String(n)}`);ee(this,"segment");this.segment=n,this.name="UnsafePathError"}}function E$(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");vo(e[1],!0);return;case"d":if(e.length!==2)throw new TypeError("d arity");vo(e[1],!0);return;case"a":if(e.length!==3||typeof e[2]!="string")throw new TypeError("a shape");vo(e[1],!0);return;case"t":if(e.length!==3||!Number.isInteger(e[2])||e[2]<0)throw new TypeError("t shape");vo(e[1],!0);return;case"p":{if(e.length!==5)throw new TypeError("p arity");if(vo(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");vo(e[1]),mee(e[2]);return;default:throw new TypeError(`unknown op verb: ${String(e[0])}`)}}function vo(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");N$(e)}function mee(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 N$(e){for(const t of e)if(typeof t=="string"){if($$.has(t))throw new Ml(t)}else if(!Number.isInteger(t)||t<0)throw new Ml(t)}function yee(e,t){if(t>e.length)throw new Ml(t)}class ks extends Error{constructor(n){super(`unresolvable path: ${JSON.stringify(n)}`);ee(this,"path");this.path=n,this.name="PathError"}}function kee(e,t){let n=e;for(const s of t){if(E$(s),s[0]==="r"){n=s[1];continue}const r=s[1];if(N$(r),s[0]==="p"){const u=r.length===0?n:Pf(n,r);if(!Array.isArray(u))throw new ks(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:Pf(n,r);if(!Array.isArray(u)||u.length!==s[2].length)throw new ks(r);const d=u.slice();for(let f=0;f<s[2].length;f++)u[f]=d[s[2][f]];continue}const i=Pf(n,r.slice(0,-1)),a=r[r.length-1];if(Array.isArray(i)){if(typeof a!="number")throw new Ml(a);yee(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 ks(r);i.splice(a,1)}else delete i[a];break;case"a":{const u=c();if(typeof u!="string")throw new ks(r);l(`${u}${s[2]}`);break}case"t":{const u=c();if(typeof u!="string")throw new ks(r);l(u.slice(s[2]));break}}}return n}function bee(e,t){return vee(e,[t])}function vee(e,t){let n=e;const s=new WeakSet;for(const r of t)for(const i of r){if(E$(i),i[0]==="r"){n=i[1];continue}if(i[0]==="p"){const a=wee(n,i,s);if(a!==void 0){n=a;continue}}n=T$(n,i[0]==="p"||i[0]==="m"?i[1]:i[1].slice(0,-1),s),n=kee(n,[i])}return n}function wee(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"?!$$.has(f)&&al(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=T$(e,u,n);return Object.defineProperty(Pf(d,u),s[s.length-1],{value:c,writable:!0,enumerable:!0,configurable:!0}),d}function T$(e,t,n){const s=a=>{if(Array.isArray(a))return a.slice();if(!al(a))throw new ks(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(!al(e))throw new ks(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 ks(t);if(Array.isArray(i)&&typeof a!="number")throw new Ml(a);const l=i[a];if(!al(l))throw new ks(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 jee(e,t){let n=e;for(const s of t){if(!al(n))throw new ks(t);if(Array.isArray(n)&&typeof s!="number")throw new Ml(s);if(!Object.hasOwn(n,s))throw new ks(t);n=n[s]}return n}function Pf(e,t){const n=jee(e,t);if(!al(n))throw new ks(t);return n}function z$(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 See(e){return new Cee(e).ready}class f0 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 A$ 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}`);ee(this,"hostMajor");ee(this,"clientMajor");ee(this,"hostVersion");ee(this,"direction");this.name="ProtocolMismatchError",this.hostMajor=n,this.clientMajor=s,r!==void 0&&(this.hostVersion=r),this.direction=i}}var Ru,cl,Gt,Rt,wr,ul,ex,ba,ci,dl,_s,gn,mn,fs,tx,nx,yt,_u,Iu,fl,Ou,Is,hl,ui,Lu,xl,H,h0,M$,ra,R$,_$,Uf,ia,x0,Ff,os,p0,g0,I$,m0,Ys,br,ri,Je,sn,Qs,O$,L$,Gf,D$,Vf,B$;class Cee{constructor(t){ze(this,H);ee(this,"ready");ze(this,Ru);ze(this,cl,new Set);ze(this,Gt,new Map);ze(this,Rt,new Set);ze(this,wr,new Set);ze(this,ul,[]);ze(this,ex,{});ze(this,ba,new Map);ze(this,ci,new Map);ze(this,dl);ze(this,_s);ze(this,gn);ze(this,mn);ze(this,fs);ze(this,tx,1);ze(this,nx,1);ze(this,yt,0);ze(this,_u,[]);ze(this,Iu,{});ze(this,fl);ze(this,Ou,0);ze(this,Is,!1);ze(this,hl,!1);ze(this,ui,Promise.resolve());ze(this,Lu);ze(this,xl);Se(this,Ru,t),Se(this,dl,"transport"in t?t.transport:z$(t.url,t.token)),this.ready=new Promise((n,s)=>{Se(this,Lu,n),Se(this,xl,s)}),W(this,H,h0).call(this)}}Ru=new WeakMap,cl=new WeakMap,Gt=new WeakMap,Rt=new WeakMap,wr=new WeakMap,ul=new WeakMap,ex=new WeakMap,ba=new WeakMap,ci=new WeakMap,dl=new WeakMap,_s=new WeakMap,gn=new WeakMap,mn=new WeakMap,fs=new WeakMap,tx=new WeakMap,nx=new WeakMap,yt=new WeakMap,_u=new WeakMap,Iu=new WeakMap,fl=new WeakMap,Ou=new WeakMap,Is=new WeakMap,hl=new WeakMap,ui=new WeakMap,Lu=new WeakMap,xl=new WeakMap,H=new WeakSet,h0=function(){const t=G(this,dl).open({message:n=>{G(this,_s)===t&&W(this,H,R$).call(this,JSON.parse(n))},closed:(n,s)=>W(this,H,M$).call(this,t,n,s)});Se(this,_s,t)},M$=function(t,n,s){if(G(this,_s)!==t)return;Se(this,_s,void 0);for(const l of G(this,ci).values())l.reject(new Error("Disconnected from host"));if(G(this,ci).clear(),G(this,gn)===void 0){Se(this,Is,!0),G(this,xl).call(this,n===a5?new f0:new Error(s??`Could not connect to ${G(this,dl).label}`));return}if(G(this,Is))return;if(n===a5){Se(this,Is,!0),W(this,H,br).call(this,{connection:"closed",unauthorized:!0}),W(this,H,ri).call(this,"error",new f0().message);return}if(n===LF){Se(this,Is,!0),W(this,H,br).call(this,{connection:"closed"}),W(this,H,ri).call(this,"error",`The host rejected a malformed frame from this client${s===void 0?"":`: ${s}`}`);return}W(this,H,br).call(this,{connection:"reconnecting"});const{min:r,max:i}=G(this,Ru).reconnectDelayMs??{min:200,max:2e3},a=Math.min(i,r*2**rd(this,Ou)._++);setTimeout(()=>{G(this,Is)||W(this,H,h0).call(this)},a)},ra=function(t){var n;(n=G(this,_s))==null||n.send(JSON.stringify(t))},R$=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!==Bp.major){const u=new A$(typeof a=="number"?a:Number.NaN,Bp.major,t.hostVersion);Se(this,Is,!0),G(this,gn)===void 0?G(this,xl).call(this,u):(W(this,H,br).call(this,{connection:"outdated",protocolMismatch:{hostMajor:u.hostMajor,clientMajor:u.clientMajor,...u.hostVersion===void 0?{}:{hostVersion:u.hostVersion},direction:u.direction}}),W(this,H,ri).call(this,"error",u.message)),(n=G(this,_s))==null||n.close();return}const l=i!==null&&typeof i=="object"&&typeof i.minor=="number"?i.minor:0;Se(this,yt,l),Se(this,Ou,0),Se(this,ul,t.docs),Se(this,ex,t.toolPresentations),Se(this,_u,t.models),Se(this,Iu,t.defaults??{}),Se(this,fl,t.hostVersion),G(this,wr).clear();const c=new Set(r5(l));for(const u of Gk)c.has(u)?G(this,Rt).add(u):(G(this,Rt).delete(u),G(this,Gt).delete(u),G(this,wr).delete(u));if(G(this,mn)!==void 0)for(const u of W(this,H,ia).call(this,G(this,mn)))G(this,Rt).add(u);if(G(this,fs)!==void 0)for(const u of W(this,H,ia).call(this,G(this,fs)))G(this,Rt).add(u);for(const u of G(this,Rt))W(this,H,ra).call(this,{type:"subscribe",stream:u});G(this,gn)!==void 0?(W(this,H,br).call(this,{session:t.session,toolPresentations:t.toolPresentations,connection:"connected",host:W(this,H,p0).call(this)}),W(this,H,Ys).call(this)):W(this,H,_$).call(this,t,l);return}case"snapshot":if(!G(this,Rt).has(t.stream))return;G(this,Gt).set(t.stream,t.value),G(this,wr).add(t.stream),W(this,H,Ys).call(this);for(const i of((s=G(this,ba).get(t.stream))==null?void 0:s.splice(0))??[])i.resolve();return;case"ops":if(!G(this,Rt).has(t.stream)||!G(this,Gt).has(t.stream))return;G(this,Gt).set(t.stream,bee(G(this,Gt).get(t.stream),t.ops)),W(this,H,Ys).call(this);return;case"ended":G(this,Rt).delete(t.stream),G(this,Gt).delete(t.stream),G(this,wr).delete(t.stream);for(const i of((r=G(this,ba).get(t.stream))==null?void 0:r.splice(0))??[])i.reject(new Error(`Stream ${t.stream} ended: ${t.reason}`));W(this,H,Ys).call(this);return;case"result":{const i=G(this,ci).get(t.id);G(this,ci).delete(t.id),t.ok?i==null||i.resolve(t.value):i==null||i.reject(new Error(t.error));return}case"notice":W(this,H,ri).call(this,t.level,t.message);return}},_$=function(t,n){Promise.all(r5(n).map(s=>W(this,H,Uf).call(this,s))).then(()=>{Se(this,gn,{session:t.session,organized:{chats:[],projects:[],archived:[]},models:W(this,H,os).call(this,"models")??t.models,defaults:W(this,H,g0).call(this,t.defaults??{}),notices:[],connection:"connected",docs:[],toolPresentations:t.toolPresentations,devices:[],mcp:null,auth:null,settings:null,agents:null,host:W(this,H,p0).call(this)}),W(this,H,Ys).call(this),G(this,Lu).call(this,{view:W(this,H,O$).call(this),controller:W(this,H,L$).call(this),close:()=>W(this,H,B$).call(this)})})},Uf=function(t){return new Promise((n,s)=>{const r=G(this,ba).get(t)??[];r.push({resolve:n,reject:s}),G(this,ba).set(t,r)})},ia=function(t){return[Dp(t),...G(this,ul).map(n=>i5(n.kind,t))]},x0=async function(t){const n=W(this,H,ia).call(this,t).filter(i=>!G(this,Rt).has(i)),s=W(this,H,ia).call(this,t).filter(i=>G(this,Rt).has(i)&&!G(this,wr).has(i)),r=Promise.all([...n,...s].map(i=>W(this,H,Uf).call(this,i)));for(const i of n)G(this,Rt).add(i),W(this,H,ra).call(this,{type:"subscribe",stream:i});await r},Ff=function(t,n){const s=new Set(n===void 0?[]:W(this,H,ia).call(this,n));for(const r of W(this,H,ia).call(this,t))s.has(r)||(G(this,Rt).delete(r),G(this,Gt).delete(r),G(this,wr).delete(r),W(this,H,ra).call(this,{type:"unsubscribe",stream:r}))},os=function(t){return G(this,Gt).get(t)},p0=function(){return{protocol:{major:Bp.major,minor:G(this,yt)},...G(this,fl)===void 0?{}:{version:G(this,fl)}}},g0=function(t){const n=W(this,H,os).call(this,"settings");return n===void 0?t:{...n.defaultModel===null?{}:{model:n.defaultModel},...n.defaultThinkingLevel===null?{}:{thinkingLevel:n.defaultThinkingLevel}}},I$=function(t,n){const s=W(this,H,os).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},m0=function(t){return G(this,ul).flatMap(n=>{const s=i5(n.kind,t);return G(this,Gt).has(s)?[{kind:n.kind,presentation:n.presentation,value:G(this,Gt).get(s)}]:[]})},Ys=function(){var c;if(G(this,gn)===void 0)return;const t=G(this,mn),n=G(this,fs),s=t===void 0?void 0:G(this,Gt).get(Dp(t)),r=W(this,H,os).call(this,"conversations")??[],i=W(this,H,os).call(this,"index")??{projects:[],conversations:[]},a=((c=W(this,H,os).call(this,"devices"))==null?void 0:c.devices)??[],l=G(this,Rt).has("tasks")?G(this,Gt).get("tasks"):void 0;W(this,H,br).call(this,{conversation:s,models:W(this,H,os).call(this,"models")??G(this,_u),organized:jq(i,r),home:t===void 0?void 0:Cq(i,r,t),checkout:t===void 0?void 0:Sq(i,r,t),tasks:l,docs:t===void 0?[]:W(this,H,m0).call(this,t),side:n===void 0?void 0:{id:n,conversation:G(this,Gt).get(Dp(n)),docs:W(this,H,m0).call(this,n)},devices:a,mcp:W(this,H,os).call(this,"mcp")??null,auth:W(this,H,os).call(this,"auth")??null,settings:W(this,H,os).call(this,"settings")??null,agents:W(this,H,os).call(this,"agents")??null,defaults:W(this,H,g0).call(this,G(this,Iu))})},br=function(t){G(this,gn)!==void 0&&(Se(this,gn,{...G(this,gn),...t}),!G(this,hl)&&(Se(this,hl,!0),queueMicrotask(()=>{Se(this,hl,!1);for(const n of G(this,cl))n()})))},ri=function(t,n){G(this,gn)!==void 0&&W(this,H,br).call(this,{notices:[...G(this,gn).notices,{id:rd(this,nx)._++,level:t,message:n}].slice(-20)})},Je=function(t,n){var r;if(G(this,_s)===void 0||((r=G(this,gn))==null?void 0:r.connection)!=="connected")return Promise.reject(new Error("Not connected to the host"));const s=rd(this,tx)._++;return new Promise((i,a)=>{G(this,ci).set(s,{resolve:i,reject:a}),W(this,H,ra).call(this,{type:"call",id:s,method:t,args:n})})},sn=function(t){return Se(this,ui,G(this,ui).then(t).then(()=>{},n=>W(this,H,ri).call(this,"error",n instanceof Error?n.message:String(n)))),G(this,ui)},Qs=function(t){const n=G(this,ui).then(t);return Se(this,ui,n.then(()=>{},()=>{})),n},O$=function(){return{current:()=>G(this,gn),subscribe:t=>(G(this,cl).add(t),()=>G(this,cl).delete(t))}},L$=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=>W(this,H,Qs).call(this,()=>W(this,H,Je).call(this,"addProject",{path:s})),listFolders:s=>W(this,H,Qs).call(this,()=>{if(!ds(G(this,yt),"listFolders"))throw new Error("The host is too old for this (needs protocol 5.3); run `pinomad upgrade` on the host");return W(this,H,Je).call(this,"listFolders",s===void 0?{}:{path:s})}),removeProject:s=>W(this,H,sn).call(this,()=>W(this,H,Je).call(this,"removeProject",{path:s})),renameConversation:(s,r)=>W(this,H,Qs).call(this,async()=>{if(!ds(G(this,yt),"renameConversation"))throw new Error("The host is too old for this (needs protocol 5.4); run `pinomad upgrade` on the host");await W(this,H,Je).call(this,"renameConversation",{conversationId:s,title:r})}),createConversation:(s,r,i)=>W(this,H,sn).call(this,async()=>{const a=(i==null?void 0:i.images)??[];if(a.length>0&&!tr(G(this,yt),"images"))throw new Error("The host is too old for images (needs protocol 5.5); run `pinomad upgrade` on the host");if((i==null?void 0:i.agent)!==void 0&&!tr(G(this,yt),"agentConversations"))throw new Error("The host is too old for named agents (needs protocol 5.10); run `pinomad upgrade` on the host");const{conversationId:l}=await W(this,H,Je).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},...(i==null?void 0:i.agent)===void 0?{}:{agent:i.agent},...a.length===0?{}:{images:a}});await W(this,H,Gf).call(this,l)}),archive:(s,r)=>W(this,H,sn).call(this,async()=>{await W(this,H,Je).call(this,"archive",{conversationId:s,archived:r}),r&&s===G(this,mn)&&W(this,H,D$).call(this),r&&G(this,fs)!==void 0&&W(this,H,I$).call(this,G(this,fs),s)&&await W(this,H,Vf).call(this,void 0)}),submit:(s,r,i)=>W(this,H,sn).call(this,()=>{const a=(i==null?void 0:i.images)??[];if(a.length>0&&!tr(G(this,yt),"images"))throw new Error("The host is too old for images (needs protocol 5.5); run `pinomad upgrade` on the host");return W(this,H,Je).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=>W(this,H,sn).call(this,()=>W(this,H,Je).call(this,"compact",{conversationId:n(),...s===void 0?{}:{instructions:s}})),abort:s=>{const r=s??G(this,mn);return r===void 0?(W(this,H,ri).call(this,"error","No conversation selected"),Promise.resolve()):W(this,H,Je).call(this,"abort",{conversationId:r}).then(()=>{},i=>W(this,H,ri).call(this,"error",i instanceof Error?i.message:String(i)))},setThinkingLevel:s=>W(this,H,sn).call(this,()=>W(this,H,Je).call(this,"setThinkingLevel",{conversationId:n(),level:s})),setModel:s=>W(this,H,sn).call(this,()=>W(this,H,Je).call(this,"setModel",{conversationId:n(),model:s})),toggleTasks:()=>W(this,H,sn).call(this,async()=>{if(G(this,Rt).delete("tasks")){W(this,H,ra).call(this,{type:"unsubscribe",stream:"tasks"}),G(this,Gt).delete("tasks"),W(this,H,Ys).call(this);return}G(this,Rt).add("tasks");const s=W(this,H,Uf).call(this,"tasks");W(this,H,ra).call(this,{type:"subscribe",stream:"tasks"}),await s}),switchConversation:s=>W(this,H,sn).call(this,()=>W(this,H,Gf).call(this,s)),showSide:s=>W(this,H,sn).call(this,()=>W(this,H,Vf).call(this,s)),fork:(s,r,i,a)=>W(this,H,sn).call(this,async()=>{const{conversationId:l}=await W(this,H,Je).call(this,"fork",{conversationId:n(),entryId:s,...i===void 0?{}:{removeTools:i}});(a==null?void 0:a.show)==="side"?await W(this,H,Vf).call(this,l):await W(this,H,Gf).call(this,l),await W(this,H,Je).call(this,"submit",{conversationId:l,text:r,whenBusy:"followUp",requestId:t()})}),answer:(s,r,i,a)=>W(this,H,sn).call(this,()=>W(this,H,Je).call(this,"answer",{conversationId:a??n(),kind:s,requestId:r,answers:i})),changes:()=>W(this,H,Qs).call(this,()=>W(this,H,Je).call(this,"changes",{conversationId:n()})),listFiles:(s,r)=>ds(G(this,yt),"listFiles")?W(this,H,Je).call(this,"listFiles",{scope:s,query:r}):Promise.reject(new Error("The host is too old for this (needs protocol 5.10); run `pinomad upgrade` on the host")),createPairing:()=>W(this,H,Qs).call(this,()=>W(this,H,Je).call(this,"createPairing",{})),revokeDevice:s=>W(this,H,sn).call(this,()=>W(this,H,Je).call(this,"revokeDevice",{publicKey:s})),logout:s=>W(this,H,sn).call(this,()=>{if(!ds(G(this,yt),"logout"))throw new Error("The host is too old for this (needs protocol 5.1); run `pinomad upgrade` on the host");return W(this,H,Je).call(this,"logout",{providerId:s})}),updateSettings:s=>W(this,H,sn).call(this,()=>{if(!ds(G(this,yt),"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&&!tr(G(this,yt),"acceptAccountDevices"))throw new Error("The host is too old for this (needs protocol 5.8); run `pinomad upgrade` on the host");if(s.hostName!==void 0&&!tr(G(this,yt),"hostName"))throw new Error("The host is too old for this (needs protocol 5.12); run `pinomad upgrade` on the host");return W(this,H,Je).call(this,"updateSettings",{patch:s})}),createAgent:s=>W(this,H,Qs).call(this,async()=>{if(!ds(G(this,yt),"createAgent"))throw new Error("The host is too old for this (needs protocol 5.6); run `pinomad upgrade` on the host");await W(this,H,Je).call(this,"createAgent",{role:s})}),updateAgent:s=>W(this,H,Qs).call(this,async()=>{if(!ds(G(this,yt),"updateAgent"))throw new Error("The host is too old for this (needs protocol 5.6); run `pinomad upgrade` on the host");await W(this,H,Je).call(this,"updateAgent",{role:s})}),deleteAgent:s=>W(this,H,Qs).call(this,async()=>{if(!ds(G(this,yt),"deleteAgent"))throw new Error("The host is too old for this (needs protocol 5.6); run `pinomad upgrade` on the host");await W(this,H,Je).call(this,"deleteAgent",{name:s})}),setPushToken:s=>W(this,H,Qs).call(this,async()=>{if(!ds(G(this,yt),"setPushToken"))throw new Error("The host is too old for this (needs protocol 5.7); run `pinomad upgrade` on the host");if(s!==null&&typeof s!="string"&&!tr(G(this,yt),"apnsPush"))throw new Error("The host is too old for this (needs protocol 5.9); run `pinomad upgrade` on the host");await W(this,H,Je).call(this,"setPushToken",{token:s})})}},Gf=async function(t){const n=G(this,mn);t!==n&&(await W(this,H,x0).call(this,t),Se(this,mn,t),n!==void 0&&W(this,H,Ff).call(this,n,G(this,fs)),W(this,H,Ys).call(this))},D$=function(){const t=G(this,mn);t!==void 0&&(Se(this,mn,void 0),W(this,H,Ff).call(this,t,G(this,fs)),W(this,H,Ys).call(this))},Vf=async function(t){const n=G(this,fs);t!==n&&(t!==void 0&&await W(this,H,x0).call(this,t),Se(this,fs,t),n!==void 0&&W(this,H,Ff).call(this,n,G(this,mn)),W(this,H,Ys).call(this))},B$=function(){var t;G(this,Is)||(Se(this,Is,!0),W(this,H,br).call(this,{connection:"closed"}),(t=G(this,_s))==null||t.close())};const $ee=15e3;function Eee(e,t,n){const[s,r]=x.useState({status:"connecting"});return x.useEffect(()=>{let i,a=!1;r({status:"connecting"});const l="transport"in e?e.transport:z$(e.url,e.token),c=new Set,u=()=>{for(const g of c)g.close();c.clear()},d={label:l.label,open(g){let b;b=l.open({message:g.message,closed:(m,y)=>{b!==void 0&&c.delete(b),g.closed(m,y)}});const k=b;return c.add(k),{send:m=>k.send(m),close:()=>{c.delete(k)&&k.close()}}}},f=See,h=$ee,p=setTimeout(()=>{a=!0,u(),r({status:"failed",error:`No response from ${l.label} within ${h/1e3} seconds. Check that the host is running and that this device can reach it (same network, or Tailscale connected).`,unauthorized:!1})},h);return f({reconnectDelayMs:{min:200,max:2e3},...e,transport:d}).then(g=>{if(clearTimeout(p),a){g.close();return}i=g,r({status:"ready",remote:g})},g=>{clearTimeout(p),a||r({status:"failed",error:g instanceof Error?g.message:String(g),unauthorized:g instanceof f0,...g instanceof A$?{mismatch:g}:{}})}),()=>{a=!0,clearTimeout(p),u(),i==null||i.close()}},[t]),s}function Nee(e){return x.useSyncExternalStore(e.view.subscribe,e.view.current)}const Tee={height:"100dvh",width:"100%",backgroundColor:"var(--color-background-body)",color:"var(--color-text-primary)"},zee={flex:1,minHeight:0};function Aee(){const[e]=x.useState(WU),[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($u);n({hosts:a,activeHostKey:l,address:PU(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(),setName:()=>Promise.resolve()}:{store:e,hosts:t.hosts,activeHostKey:t.activeHostKey,paired:async i=>{await e.save(i),localStorage.setItem($u,i.hostKey),n(a=>a===void 0?a:{...a,hosts:[...a.hosts.filter(l=>l.hostKey!==i.hostKey),i],activeHostKey:i.hostKey})},setName:async(i,a)=>{await e.setName(i,a),n(l=>l===void 0?l:{...l,hosts:l.hosts.map(c=>c.hostKey===i?{...c,name:a}:c)})}},[e,t]);if(t===void 0)return o.jsx(Va,{children:null});const{address:r}=t;return o.jsx(p9.Provider,{value:s,children:o.jsx(JU,{children:r===void 0?o.jsx(Va,{children:o.jsx(Mee,{})}):o.jsx(Ree,{address:r})})})}function Mee(){return Qx().state.status==="unavailable"?o.jsxs(fe,{gap:4,hAlign:"center",style:{width:"100%",maxWidth:420},children:[o.jsx(Ti,{title:"No host link",description:"Paste a pairing link from pinomad pair or Devices → Pair a device."}),o.jsx(Fm,{})]}):o.jsxs(fe,{gap:6,style:{width:"100%",maxWidth:420},children:[o.jsx(y9,{}),o.jsxs(fe,{gap:2,children:[o.jsx(se,{type:"supporting",children:"Or paste a pairing link from pinomad pair or Devices → Pair a device."}),o.jsx(Fm,{})]})]})}function Va({children:e}){const t=v7().reserveMacTrafficLights;return o.jsxs(fe,{style:Tee,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 Ree({address:e}){return e.kind==="token"?o.jsx(H$,{options:e,connectionKey:`${e.url} ${e.token}`,label:e.url}):e.kind==="pair"?o.jsx(_ee,{address:e}):o.jsx(q$,{address:e})}function _ee({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(q$,{address:e});const r=new URL(e.url);return o.jsx(Va,{children:o.jsxs(fe,{gap:4,hAlign:"center",style:{maxWidth:420},children:[o.jsx(Ti,{title:"Pair with this host?",description:`This device will pair with ${r.host}.`}),o.jsx(se,{type:"supporting",style:{wordBreak:"break-all"},children:e.url}),o.jsxs(we,{gap:2,children:[o.jsx(ne,{label:"Cancel",variant:"secondary",onClick:s}),o.jsx(ne,{label:"Pair",variant:"primary",onClick:()=>n(!0)})]})]})})}function q$({address:e}){const{store:t,hosts:n,paired:s}=Yl(),r=x.useMemo(()=>n.find(p=>p.hostKey===e.hostKey),[n,e]),[i,a]=x.useState(),l=x.useMemo(()=>e.kind==="pair"&&r!==void 0?qm(Ta(r.privateKey)):e.kind==="device"?qm(Ta(e.privateKey)):Lk(),[e,r]),[c,u]=x.useState();x.useEffect(()=>{if(e.kind!=="pair")return;let p=!0;return h9().then(g=>{p&&u(g)}),()=>{p=!1}},[e]);const d=x.useMemo(()=>{const p={url:e.url,hostKey:Ta(e.hostKey),device:l};if(e.kind!=="pair")return{transport:Pm(p)};if(c!==void 0)return{transport:Pm({...p,pairing:{secret:e.secret,name:c},onPaired:()=>{const g={url:e.url,hostKey:e.hostKey,privateKey:Dk(l.privateKey)};s(g).catch(b=>{console.error("Could not save the paired host",b),a(g)}),history.replaceState(null,"",window.location.pathname+window.location.search)}})}},[e,l,s,c]);if(d===void 0)return o.jsx(Va,{children:null});const f=e.kind==="pair"?o.jsxs(fe,{gap:4,hAlign:"center",children:[o.jsx(Ti,{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(ne,{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(Ti,{title:"This device isn't paired",description:"It isn't paired with the host, or was revoked."}),o.jsx(gee,{hostKey:e.hostKey}),o.jsx(ne,{label:"Forget this host",variant:"secondary",onClick:()=>g9(t,e.hostKey)})]}),h=i===void 0?void 0:o.jsx(mt,{status:"warning",container:"section",title:"This pairing wasn't saved",description:"It will be lost when the app restarts.",endContent:o.jsx(ne,{label:"Retry",variant:"ghost",onClick:()=>{s(i).then(()=>a(void 0),p=>console.error("Could not save the paired host",p))}})});return o.jsx(H$,{options:d,connectionKey:`${e.url} ${e.hostKey}`,label:e.url,rejected:f,device:l,notice:h,hostKey:e.hostKey})}function H$({options:e,connectionKey:t,label:n,rejected:s,device:r,notice:i,hostKey:a}){const[l,c]=x.useState(0),u=Eee(e,`${t} ${l}`);return u.status==="connecting"?o.jsx(Va,{children:o.jsx(Ti,{title:"Connecting",description:n})}):u.status==="failed"?o.jsxs(Va,{children:[u.mismatch!==void 0?o.jsx(P$,{wsUrl:n,mismatch:u.mismatch}):s!==void 0&&u.unauthorized?s:o.jsxs(fe,{gap:4,hAlign:"center",children:[o.jsx(mt,{status:"error",title:"Could not connect to the host",description:u.error}),o.jsx(ne,{label:"Retry",variant:"secondary",onClick:()=>c(l+1)})]}),o.jsx(j9,{})]}):o.jsx(Oee,{remote:u.remote,wsUrl:n,rejected:s,device:r,notice:i,hostKey:a})}const y0="pinomad.reloadedForProtocol";function P$({wsUrl:e,mismatch:t}){var a;const n=R7(),s=((a=window.pinomadDesktop)==null?void 0:a.updates)!==void 0,[r]=x.useState(()=>t.direction==="client-older"&&s||!UU(e,window.location)||sessionStorage.getItem(y0)===String(t.hostMajor)?!1:(sessionStorage.setItem(y0,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(mt,{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(Iee,{update:n}):null]}):o.jsx(mt,{status:"error",container:"section",title:"Host out of date",description:`This client speaks a newer protocol. Upgrade the host (pinomad upgrade).${i}`})}function Iee({update:e}){if(e===void 0)return o.jsx(se,{type:"supporting",children:"Checking for updates…"});const{status:t}=e;switch(t.state){case"checking":return o.jsx(se,{type:"supporting",children:"Checking for updates…"});case"available":case"downloading":{const n=t.progressPercent===void 0?"":` ${Math.round(t.progressPercent)}%`;return o.jsx(se,{type:"supporting",children:`Downloading PiNomad ${t.availableVersion??""}…${n}`})}case"ready":return o.jsx(ne,{label:"Restart to update",variant:"primary",onClick:()=>e.install()});case"error":return o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(se,{type:"supporting",children:t.message}),o.jsx(ne,{label:"Retry",variant:"secondary",onClick:()=>e.check()})]});case"disabled":return o.jsx(se,{type:"supporting",children:t.reason??"Updates are unavailable in this build."});default:return o.jsx(se,{type:"supporting",children:`PiNomad ${t.currentVersion} is up to date; no newer release found.`})}}function Oee({remote:e,wsUrl:t,rejected:n,device:s,notice:r,hostKey:i}){var _,O,D,B;const a=Nee(e);XU(i,a.settings);const[l,c]=x.useState(!0),[u,d]=x.useState({kind:"chat"});x.useEffect(()=>c(a.conversation===void 0),[(_=a.conversation)==null?void 0:_.conversation.id]),Aq(a,P=>{var V;P===((V=a.conversation)==null?void 0:V.conversation.id)?c(!1):e.controller.switchConversation(P)});const h=l?void 0:a.conversation,p=h!==void 0&&Kx(h),g=Wa("(max-width: 1023px)"),[b,k]=x.useState(!1),[m,y]=x.useState("threads"),v=x.useCallback((P,V)=>{y(V),k(!0),e.controller.showSide(P)},[e]),w=x.useCallback(P=>{e.controller.switchConversation(P),e.controller.showSide(void 0),g&&k(!1)},[e,g]),j=h===void 0||(O=Wx(a.organized,h.conversation.id))==null?void 0:O.summary.id;x.useEffect(()=>{e.controller.showSide(void 0)},[j]);const C=u.kind==="chat"?"New chat":`New conversation in ${qee(a.organized,u.path)}`,$=h===void 0||(D=Rr(a.organized,h.conversation.id))==null?void 0:D.summary,E=$==null?void 0:$.parent,N=E===void 0||(B=Rr(a.organized,E))==null?void 0:B.summary,S=($==null?void 0:$.kind)==="conversation",A=x.useCallback(P=>$===void 0?[]:b7(a.organized,$.id,P),[a.organized,$]),z=x.useCallback(P=>{var V;return(V=Rr(a.organized,P))==null?void 0:V.summary},[a.organized]),M=P=>{d(P),c(!0)},[L,R]=x.useState(),[T,I]=x.useState(!1);return x.useEffect(()=>{a.connection==="connected"&&sessionStorage.removeItem(y0)},[a.connection]),a.unauthorized===!0&&n!==void 0?o.jsxs(Va,{children:[n,o.jsx(j9,{})]}):o.jsxs(o.Fragment,{children:[o.jsx(PJ,{view:a,remote:e,device:s,narrow:g,drafting:l,draftingChat:l&&u.kind==="chat",draftLabel:C,conversation:h,summary:$,parentSummary:N,banner:o.jsxs(o.Fragment,{children:[r,o.jsx(Bee,{view:a,wsUrl:t})]}),onDraft:M,onOpenChanges:()=>I(!0),panelOpen:b,panelTab:m,onPanelOpen:k,onPanelTab:y,openInPanel:v,openInMain:w,children:h===void 0?o.jsx(aee,{view:a,remote:e,draft:u,onDraft:M,connected:a.connection==="connected"}):o.jsx(c6,{style:zee,composer:o.jsx("div",{className:"mx-auto w-full max-w-[44rem]",children:o.jsxs(fe,{gap:1,children:[o.jsx(zC,{docs:a.docs,remote:e,connected:a.connection==="connected"}),o.jsx(pee,{view:a,remote:e,conversation:h,busy:p,narrow:g})]})}),emptyState:o.jsx(Ti,{title:"Nothing here yet",description:"Ask the agent something. Every client sees it."}),children:o.jsx(h$,{conversation:h,docs:a.docs,toolPresentations:a.toolPresentations,connected:a.connection==="connected",canFork:S,openInPanel:v,onFork:R,forksAt:A,summaryOf:z,onRetry:($==null?void 0:$.kind)==="subagent"?void 0:async({text:P,images:V,requestId:Y})=>{zl(),await e.controller.submit(P,"followUp",{requestId:Y,images:V})}})},h.conversation.id)}),L===void 0?null:o.jsx(Lee,{entryId:L,remote:e,connected:a.connection==="connected",onClose:()=>R(void 0),onForked:()=>{y("threads"),k(!0)}}),T&&h!==void 0&&o.jsx(Dee,{view:a,remote:e,busy:p,onClose:()=>I(!1)})]})}function Lee({entryId:e,remote:t,connected:n,onClose:s,onForked:r}){const[i,a]=x.useState("Continue from here."),l=()=>{zl(),t.controller.fork(e,i.trim(),void 0,{show:"side"}),r(),s()};return o.jsx(ns,{isOpen:!0,onOpenChange:c=>c?void 0:s(),purpose:"form",width:480,children:o.jsx(Rn,{header:o.jsx(ss,{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(_n,{children:o.jsx(Xn,{label:"First message",value:i,onChange:a})}),footer:o.jsx(Bi,{children:o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(ne,{label:"Cancel",variant:"secondary",onClick:s}),o.jsx(ne,{label:"Fork",variant:"primary",isDisabled:!n||i.trim()==="",onClick:l})]})})})})}function Dee({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(ns,{isOpen:!0,onOpenChange:u=>u?void 0:s(),width:720,children:o.jsx(Rn,{header:o.jsx(ss,{title:"Changes",onOpenChange:()=>s()}),content:o.jsx(_n,{children:o.jsx(fe,{gap:2,padding:3,children:r===void 0?o.jsx(se,{type:"supporting",children:"Loading…"}):r.available?o.jsxs(o.Fragment,{children:[c?o.jsx(se,{type:"supporting",children:"These are the project directory's uncommitted changes, shared with other conversations working there."}):null,r.truncated?o.jsx(se,{type:"supporting",children:"The diff is truncated; the rest is not shown."}):null,o.jsx(f$,{patch:r.patch})]}):o.jsx(se,{type:"supporting",children:r.reason})})}),footer:o.jsx(Bi,{children:o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(ne,{label:"Refresh",variant:"secondary",isDisabled:e.connection!=="connected",onClick:a}),o.jsx(ne,{label:"Close",variant:"primary",onClick:s})]})})})})}function Bee({view:e,wsUrl:t}){return e.connection==="outdated"?e.protocolMismatch===void 0?null:o.jsx(P$,{wsUrl:t,mismatch:e.protocolMismatch}):e.connection==="reconnecting"?o.jsx(mt,{status:"warning",container:"section",title:"Host connection lost",description:"Reconnecting… the view keeps the last state the host sent."}):e.connection==="closed"?o.jsx(mt,{status:"error",container:"section",title:"Disconnected from the host"}):null}function qee(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}FS.createRoot(document.getElementById("root")).render(o.jsx(x.StrictMode,{children:o.jsx(z4,{theme:wq,children:o.jsx(Aee,{})})}));
|