codesesh 1.0.0 → 1.0.1
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 +27 -4
- package/dist/{chunk-BEF6LLRG.js → chunk-JHX5OLL4.js} +4010 -2248
- package/dist/chunk-JHX5OLL4.js.map +1 -0
- package/dist/{chunk-TIHF4T3K.js → chunk-OFTTM3UD.js} +80 -16
- package/dist/chunk-OFTTM3UD.js.map +1 -0
- package/dist/{dist-3F467V44.js → dist-N2PQATP2.js} +40 -4
- package/dist/index.js +1818 -454
- package/dist/index.js.map +1 -1
- package/dist/scan-refresh-worker.js +274 -95
- package/dist/scan-refresh-worker.js.map +1 -1
- package/dist/search-index-worker.js +112 -50
- package/dist/search-index-worker.js.map +1 -1
- package/dist/smart-tag-worker.js +5 -3
- package/dist/smart-tag-worker.js.map +1 -1
- package/dist/web/assets/ErrorBoundary-D11tWzfn.js +1 -0
- package/dist/web/assets/OverviewScreen-DriPmCam.js +1 -0
- package/dist/web/assets/Projects-BPDIcUBK.js +1 -0
- package/dist/web/assets/SearchFilterBar-Bx73B5e9.js +1 -0
- package/dist/web/assets/SearchResultsPanel-A6_3TPhW.js +1 -0
- package/dist/web/assets/SessionDetail-lQz99ARH.js +54 -0
- package/dist/web/assets/agents-BkRP_ww3.js +1 -0
- package/dist/web/assets/contract-V6QuD0UY.js +1 -0
- package/dist/web/assets/index-B2RqUgZ5.css +1 -0
- package/dist/web/assets/index-BgWoUD_4.js +1410 -0
- package/dist/web/assets/panel-C-gc79Gz.js +1 -0
- package/dist/web/assets/session-indexes-0oT5HSS5.js +4 -0
- package/dist/web/assets/utils-DgUgu15E.js +1 -0
- package/dist/web/index.html +10 -32
- package/dist/web/theme-bootstrap.js +19 -0
- package/package.json +10 -10
- package/dist/chunk-BEF6LLRG.js.map +0 -1
- package/dist/chunk-TIHF4T3K.js.map +0 -1
- package/dist/web/assets/ErrorBoundary-BY-N1QzJ.js +0 -1
- package/dist/web/assets/OverviewScreen-_ZaVjhxN.js +0 -1
- package/dist/web/assets/Projects-q6cEm2dc.js +0 -1
- package/dist/web/assets/SearchFilterBar-CrVBpo40.js +0 -1
- package/dist/web/assets/SearchResultsPanel-Cg5V8Ia6.js +0 -1
- package/dist/web/assets/SessionDetail-BSSuddsZ.js +0 -54
- package/dist/web/assets/chunk-62JRHF6Z-BWRsEBnL.js +0 -4
- package/dist/web/assets/index-C3KgxGwE.js +0 -1410
- package/dist/web/assets/index-DQX42cFQ.css +0 -1
- package/dist/web/assets/panel-B7kuE60V.js +0 -1
- package/dist/web/assets/session-indexes-DmnjZ_JL.js +0 -1
- package/dist/web/assets/utils-t2u9IbNT.js +0 -1
- /package/dist/{dist-3F467V44.js.map → dist-N2PQATP2.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,n as t,t as n}from"./jsx-runtime-B-hcVAMW.js";import{Kt as r,On as i,t as a,v as o,w as s,x as c,y as l}from"./utils-DgUgu15E.js";var u=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},d=new class extends u{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},f={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},p=new class{#e=f;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function m(e){setTimeout(e,0)}var h=typeof window>`u`||`Deno`in globalThis;function g(){}function _(e,t){return typeof e==`function`?e(t):e}function v(e){return typeof e==`number`&&e>=0&&e!==1/0}function y(e,t){return Math.max(e+(t||0)-Date.now(),0)}function b(e,t){return typeof e==`function`?e(t):e}function x(e,t){return typeof e==`function`?e(t):e}function S(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==te(o,t.options))return!1}else if(!w(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function ee(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(C(t.options.mutationKey)!==C(a))return!1}else if(!w(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function te(e,t){return(t?.queryKeyHashFn||C)(e)}function C(e){return JSON.stringify(e,(e,t)=>D(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function w(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!w(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!w(e[r],t[r]))return!1;return!0}return!1}var ne=Object.prototype.hasOwnProperty;function T(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=re(e)&&re(t);if(!r&&!(D(e)&&D(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ne.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=T(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function E(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function re(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function D(e){if(!O(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!O(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function O(e){return Object.prototype.toString.call(e)===`[object Object]`}function ie(e){return new Promise(t=>{p.setTimeout(t,e)})}function k(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:T(e,t)}function ae(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function oe(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var A=Symbol();function j(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===A?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function M(e,t){return typeof e==`function`?e(...t):!!e}function se(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var N=(()=>{let e=()=>h;return{isServer(){return e()},setIsServer(t){e=t}}})();function P(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var ce=m;function le(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ce,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var F=le(),I=new class extends u{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ue(e){return Math.min(1e3*2**e,3e4)}function L(e){return(e??`online`)!==`online`||I.isOnline()}var R=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function de(e){return e instanceof R}function z(e){let t=!1,n=0,r,i=P(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new R(t);p(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>d.isFocused()&&(e.networkMode===`always`||I.isOnline())&&e.canRun(),u=()=>L(e.networkMode)&&e.canRun(),f=e=>{a()||(r?.(),i.resolve(e))},p=e=>{a()||(r?.(),i.reject(e))},m=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),h=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(f).catch(r=>{if(a())return;let i=e.retry??(N.isServer()?0:3),o=e.retryDelay??ue,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){p(r);return}n++,e.onFail?.(n,r),ie(s).then(()=>l()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?h():m().then(h),i)}}var B=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),v(this.gcTime)&&(this.#e=p.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(N.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(p.clearTimeout(this.#e),this.#e=void 0)}};function fe(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{se(e,()=>t.signal,()=>n=!0)},u=j(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?oe:ae;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?pe:V,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:V(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function V(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function pe(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var me=class extends B{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=W(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=W(this.options);e.data!==void 0&&(this.setState(U(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=k(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(g).catch(g):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>x(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===A||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>b(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!y(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=j(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?fe(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=z({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof R&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof R){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...H(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...U(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),F.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function H(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:L(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function U(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function W(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var he=class extends u{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=P(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),G(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return K(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return K(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof x(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!E(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&q(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||x(this.options.enabled,this.#t)!==x(t.enabled,this.#t)||b(this.options.staleTime,this.#t)!==b(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||x(this.options.enabled,this.#t)!==x(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return _e(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(g)),t}#g(){this.#b();let e=b(this.options.staleTime,this.#t);if(N.isServer()||this.#r.isStale||!v(e))return;let t=y(this.#r.dataUpdatedAt,e)+1;this.#d=p.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(N.isServer()||x(this.options.enabled,this.#t)===!1||!v(this.#p)||this.#p===0)&&(this.#f=p.setInterval(()=>{(this.options.refetchIntervalInBackground||d.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(p.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(p.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&G(e,t),o=i&&q(e,n,t,r);(a||o)&&(l={...l,...H(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=k(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=k(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,S={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:J(e,t),refetch:this.refetch,promise:this.#o,isEnabled:x(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=S.data!==void 0,r=S.status===`error`&&!t,i=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},a=()=>{let e=this.#o=S.promise=P();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||S.data!==o.value)&&a();break;case`rejected`:(!r||S.error!==o.reason)&&a()}}return S}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!E(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){F.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function ge(e,t){return x(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||x(t.retryOnMount,e)!==!1)}function G(e,t){return ge(e,t)||e.state.data!==void 0&&K(e,t,t.refetchOnMount)}function K(e,t,n){if(x(t.enabled,e)!==!1&&b(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&J(e,t)}return!1}function q(e,t,n,r){return(e!==t||x(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&J(e,n)}function J(e,t){return x(t.enabled,e)!==!1&&e.isStaleByTime(b(t.staleTime,e))}function _e(e,t){return!E(e.getCurrentResult(),t)}var Y=e(t(),1),X=n(),ve=Y.createContext(void 0),ye=e=>{let t=Y.useContext(ve);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},be=({client:e,children:t})=>(Y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,X.jsx)(ve.Provider,{value:e,children:t})),xe=Y.createContext(!1),Se=()=>Y.useContext(xe);xe.Provider;function Ce(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var we=Y.createContext(Ce()),Te=()=>Y.useContext(we),Ee=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?M(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},De=e=>{Y.useEffect(()=>{e.clearReset()},[e])},Oe=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||M(n,[e.error,r])),ke=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Ae=(e,t)=>e.isLoading&&e.isFetching&&!t,je=(e,t)=>e?.suspense&&t.isPending,Me=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ne(e,t,n){let r=Se(),i=Te(),a=ye(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,ke(o),Ee(o,i,s),De(i);let l=!a.getQueryCache().get(o.queryHash),[u]=Y.useState(()=>new t(a,o)),d=u.getOptimisticResult(o),f=!r&&c;if(Y.useSyncExternalStore(Y.useCallback(e=>{let t=f?u.subscribe(F.batchCalls(e)):g;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),Y.useEffect(()=>{u.setOptions(o)},[o,u]),je(o,d))throw Me(o,u,i);if(Oe({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!N.isServer()&&Ae(d,r)&&(l?Me(o,u,i):s?.promise)?.catch(g).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function Pe(e,t){return Ne(e,he,t)}function Z(e){return{days:e.days,from:e.from,to:e.to}}var Fe={bookmarks:[`bookmarks`],config:[`config`],dashboards:[`dashboard`],dashboard:(e,t)=>[`dashboard`,Z(e),t],search:(e,t)=>[`search`,e,t],searches:[`search`],sessionDetails:[`session-detail`],sessionDetail:(e,t)=>[`session-detail`,e,t],sessionSnapshots:[`session-snapshot`],sessionSnapshot:e=>[`session-snapshot`,Z(e)],sessionSnapshotAggregateQueries:[`session-snapshot-aggregates`],sessionSnapshotAggregates:e=>[`session-snapshot-aggregates`,Z(e)]};function Q(e){let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`}function Ie(e){if(!e)return null;let{from:t,to:n,days:r}=e.window;if(r===0||t==null)return`All time`;let i=Q(t),a=Q(n??Date.now());return r?`Last ${r}d · ${i} → ${a}`:`${i} → ${a}`}function Le(e,t,n){return t?e?`Searching for "${e}"`:`Loading recent sessions`:e?`${n} matches for "${e}"`:`${n} recent sessions`}function Re(e){if(!e)return null;if(e.backfill?.active){let t=e.backfill.currentAgent,n=e.backfill.pendingAgents.length,r=e.backfill.progress,i=r?.total&&r.processed!=null?` · ${r.processed}/${r.total}`:``,a=r?.phase===`publish-queued`?`Full-history publication queued`:r?.phase===`publishing`||r?.phase===`indexing`?`Publishing full-history sessions`:r?.phase===`finalizing`?`Finalizing full-history metadata`:`Scanning full session history`;return t?`${a} · ${t}${i}${n>0?` · ${n} history scan queued`:``}`:`${a}${i}`}if(e.backfill?.failedAgents.length)return`Full-history refresh failed · ${e.backfill.failedAgents.join(`, `)}`;let t=Object.values(e.agentStatuses??{}).find(e=>e.status===`failed`);if(t)return`Session refresh failed · ${t.agentName}${t.error?` · ${t.error}`:``}`;if(e.active){let t=e.completedAgents.length,n=e.totalAgents,r=e.scanningAgents[0],i=r?e.agentStatuses[r]:null,a=i?.total&&i.processed!=null?` · ${i.processed}/${i.total}`:``,o=n>0?r?` · ${r}${a} · ${t}/${n} agents ready`:` · ${t}/${n} agents ready`:``,s=i?.status===`publish-queued`?`Session publication queued`:i?.status===`finalizing`?`Finalizing session metadata`:i?.status===`publishing`||i?.status===`indexing`||e.phase===`publishing`||e.phase===`indexing`?`Publishing session updates`:`Checking for new or changed sessions`;return e.phase===`initializing`?`Initializing recent sessions${o}`:e.phase===`publishing`||e.phase===`indexing`?`${s}${o}`:n>0?r?`${s} · ${r}${a} · ${t}/${n} agents ready`:`Checking for new or changed sessions · ${t}/${n} agents ready`:`Checking for new or changed sessions`}if(e.searchIndexMaintenance?.active){let t=e.searchIndexMaintenance.currentAgent,n=e.searchIndexMaintenance.remaining;return`Updating search index in background${t?` · ${t}`:``}${n==null?``:` · ${n} remaining`}`}return e.searchIndexMaintenance?.failedAgents.length?`Background search index maintenance paused · ${e.searchIndexMaintenance.failedAgents.join(`, `)}`:null}function ze({open:e,onOpenChange:t,window:n,customFrom:a,customTo:u,onSelectCustom:d}){let f=a??(n?.from==null?``:Q(n.from)),p=u??Q(n?.to??Date.now()),[m,h]=(0,Y.useState)(f),[g,_]=(0,Y.useState)(p);return(0,Y.useEffect)(()=>{e||(h(f),_(p))},[f,p,e]),(0,X.jsx)(l,{open:e,onOpenChange:t,children:(0,X.jsxs)(c,{children:[(0,X.jsx)(i,{className:`motion-backdrop fixed inset-0 z-50 bg-[var(--scrim)]`}),(0,X.jsxs)(s,{className:`motion-modal fixed top-1/2 left-1/2 z-50 w-[calc(100%-2rem)] max-w-sm -translate-x-1/2 -translate-y-1/2 rounded-lg border border-[var(--console-border)] bg-[var(--console-surface)] p-5 shadow-[var(--shadow-overlay)] outline-none`,children:[(0,X.jsx)(o,{className:`console-mono text-sm font-semibold text-[var(--console-text)]`,children:`Custom time range`}),(0,X.jsx)(`p`,{className:`mt-1 text-xs text-[var(--console-muted)]`,children:`Both dates are included.`}),(0,X.jsxs)(`div`,{className:`mt-4 grid grid-cols-2 gap-3`,children:[(0,X.jsxs)(`label`,{className:`console-mono text-[11px] uppercase tracking-wide text-[var(--console-muted)]`,children:[`From`,(0,X.jsx)(`input`,{type:`date`,value:m,max:g||void 0,onChange:e=>h(e.target.value),className:`mt-1.5 w-full rounded-sm border border-[var(--console-border-strong)] bg-[var(--console-surface)] px-2 py-2 text-xs normal-case tracking-normal text-[var(--console-text)] outline-none focus:border-[var(--brand)] focus:ring-2 focus:ring-[var(--brand)]/25`})]}),(0,X.jsxs)(`label`,{className:`console-mono text-[11px] uppercase tracking-wide text-[var(--console-muted)]`,children:[`To`,(0,X.jsx)(`input`,{type:`date`,value:g,min:m||void 0,onChange:e=>_(e.target.value),className:`mt-1.5 w-full rounded-sm border border-[var(--console-border-strong)] bg-[var(--console-surface)] px-2 py-2 text-xs normal-case tracking-normal text-[var(--console-text)] outline-none focus:border-[var(--brand)] focus:ring-2 focus:ring-[var(--brand)]/25`})]})]}),(0,X.jsxs)(`div`,{className:`mt-5 flex justify-end gap-2`,children:[(0,X.jsx)(r,{className:`rounded-sm border border-[var(--console-border)] px-3 py-1.5 text-xs text-[var(--console-text)] hover:bg-[var(--console-surface-muted)]`,children:`Cancel`}),(0,X.jsx)(`button`,{type:`button`,disabled:!m||!g||m>g,onClick:()=>{d(m,g),t(!1)},className:`rounded-sm border border-[var(--console-accent)] bg-[var(--console-accent)] px-3 py-1.5 text-xs text-[var(--console-accent-fg)] hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-40`,children:`Apply range`})]})]})]})})}var Be=(0,Y.createContext)(`light`),$=`(prefers-color-scheme: dark)`;function Ve(){return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia($).matches}function He(e){let[t,n]=(0,Y.useState)(Ve);(0,Y.useEffect)(()=>{if(typeof window>`u`||typeof window.matchMedia!=`function`)return;let e=window.matchMedia($),t=e=>n(e.matches);return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let r=e===`system`?t?`dark`:`light`:e;return(0,Y.useEffect)(()=>{document.documentElement.classList.toggle(`dark`,r===`dark`)},[r]),r}function Ue({className:e,children:t,...n}){return(0,X.jsx)(`section`,{className:a(`rounded-lg border border-[var(--console-border)] bg-[var(--console-surface)] shadow-[var(--shadow-raised)]`,e),...n,children:t})}function We({title:e,meta:t,action:n}){return(0,X.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,X.jsx)(`h3`,{className:`console-display min-w-0 truncate text-[15px] font-semibold text-[var(--console-text)]`,children:e}),(0,X.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-3`,children:[t===void 0?null:(0,X.jsx)(`span`,{className:`console-mono text-[10.5px] text-[var(--console-muted)]`,children:t}),n]})]})}export{d as A,S as C,E as D,b as E,M as O,ee as S,w as T,I as _,ze as a,C as b,Ie as c,be as d,ye as f,de as g,z as h,He as i,u as j,A as k,Fe as l,B as m,We as n,Re as o,me as p,Be as r,Le as s,Ue as t,Pe as u,F as v,g as w,te as x,_ as y};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as e,n as t}from"./jsx-runtime-B-hcVAMW.js";import{a as n,c as r,l as i,u as a}from"./contract-V6QuD0UY.js";var o=e(t(),1),s=`modulepreload`,c=function(e){return`/`+e},l={},u=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function u(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=c(t,n),t=u(t),t in l)return;l[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:s,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},d=e=>{throw TypeError(e)},f=(e,t,n)=>t.has(e)||d(`Cannot `+n),p=(e,t,n)=>(f(e,t,`read from private field`),n?n.call(e):t.get(e)),m=(e,t,n)=>t.has(e)?d(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),h=(e,t,n,r)=>(f(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),g=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,_=/^[\\/]{2}/;function v(e,t){return t+e.replace(/\\/g,`/`)}var y=`popstate`;function b(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function x(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return E(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:D(t)}return k(t,n,null,e)}function S(e,t){if(e===!1||e==null)throw Error(t)}function C(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function w(){return Math.random().toString(36).substring(2,10)}function T(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function E(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?O(t):t,state:n,key:t&&t.key||r||w(),mask:i}}function D({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function O(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function k(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=b(e)?e:E(h.location,e,t);n&&n(r,e),l=u()+1;let d=T(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=b(e)?e:E(h.location,e,t);n&&n(r,e),l=u();let i=T(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return A(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(y,d),c=e,()=>{i.removeEventListener(y,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function A(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),S(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:D(t);return i=i.replace(/ $/,`%20`),!n&&_.test(i)&&(i=r+i),new URL(i,r)}function j(e){return{defaultValue:e}}var M,ee=class{constructor(e){if(m(this,M,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(p(this,M).has(e))return p(this,M).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){p(this,M).set(e,t)}};M=new WeakMap;var N=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function P(e){return N.has(e)}var F=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function te(e){return F.has(e)}function ne(e){return e.index===!0}function re(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(S(e.index!==!0||!e.children,`Cannot specify children on an index route`),S(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),ne(e)){let n={...e,id:s};return r[s]=ie(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=ie(n,t(n)),e.children&&(n.children=re(e.children,t,o,r,i)),n}})}function ie(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function ae(e,t,n=`/`){return I(e,t,n,!1)}function I(e,t,n,r,i){let a=U((typeof t==`string`?O(t):t).pathname||`/`,n);if(a==null)return null;let o=i??L(e),s=null,c=ve(a);for(let e=0;s==null&&e<o.length;++e)s=he(o[e],c,r);return s}function oe(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function L(e){let t=se(e);return le(t),t}function se(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;S(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=W([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(S(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),se(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:pe(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=_e(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ce(e.path))a(e,t,!0,n)}),t}function ce(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ce(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function le(e){e.sort((e,t)=>e.score===t.score?me(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var R=/^:[\w-]+$/,ue=3,z=2,B=1,V=10,de=-2,fe=e=>e===`*`;function pe(e,t){let n=e.split(`/`),r=n.length;return n.some(fe)&&(r+=de),t&&(r+=z),n.filter(e=>!fe(e)).reduce((e,t)=>e+(R.test(t)?ue:t===``?B:V),r)}function me(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function he(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?ge(u,l,s.matcher,s.compiledParams):H(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=H({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:W([a,d.pathname]),pathnameBase:ke(W([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=W([a,d.pathnameBase]))}return o}function H(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=_e(e.path,e.caseSensitive,e.end);return ge(e,t,n,r)}function ge(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function _e(e,t=!1,n=!0){C(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ve(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return C(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function U(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function ye({basename:e,pathname:t}){return t===`/`?e:W([e,t])}var be=e=>g.test(e);function xe(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?O(e):e,a;return n?(n=De(n),a=n.startsWith(`/`)?Se(n.substring(1),`/`):Se(n,t)):a=t,{pathname:a,search:Ae(r),hash:G(i)}}function Se(e,t){let n=Oe(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Ce(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function we(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Te(e){let t=we(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ee(e,t,n,r=!1){let i;typeof e==`string`?i=O(e):(i={...e},S(!i.pathname||!i.pathname.includes(`?`),Ce(`?`,`pathname`,`search`,i)),S(!i.pathname||!i.pathname.includes(`#`),Ce(`#`,`pathname`,`hash`,i)),S(!i.search||!i.search.includes(`#`),Ce(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=xe(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var De=e=>e.replace(/[\\/]{2,}/g,`/`),W=e=>De(e.join(`/`)),Oe=e=>e.replace(/\/+$/,``),ke=e=>Oe(e).replace(/^\/*/,`/`),Ae=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,G=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,K=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],je=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Me(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ne(e){return W(e.map(e=>e.route.path).filter(Boolean))||`/`}var Pe=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Fe(e,t){let n=e;if(typeof n!=`string`||!g.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Pe)try{let e=new URL(window.location.href),r=_.test(n)?new URL(v(n,e.protocol)):new URL(n),a=U(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{C(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var q=Symbol(`Uninstrumented`);function Ie(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=Re(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=Re(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[q]??i,a=Re(n[e],t,(...e)=>Be(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[q]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[q]??e,r=Re(n.middleware,t,(...e)=>Be(e[0]));return r?(r[q]=t,r):e})),r}function Le(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[q]??e.navigate,r=Re(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?D(n):`.`,...Ve(e,r??{})}});r&&(r[q]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[q]??e.fetch,r=Re(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...Ve(e,i??{})}});r&&(r[q]=t,e.fetch=r)}return e}function Re(e,t,n){return e.length===0?null:async(...r)=>{let i=await ze(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function ze(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=ze(e,t,n,r-1),a=await o,S(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function Be(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:He(t),params:{...r},pattern:i,context:Ue(n)}}function Ve(e,t){return{currentUrl:D(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function He(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Ue(e){if(Ge(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var We=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Ge(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===We}var Ke=[`POST`,`PUT`,`PATCH`,`DELETE`],qe=new Set(Ke),Je=[`GET`,...Ke],Ye=new Set(Je),Xe=new Set([301,302,303,307,308]),Ze=new Set([307,308]),Qe={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$e={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},et={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},tt=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),nt=`remix-router-transitions`,rt=Symbol(`ResetLoaderData`),it,at,ot,st,ct=class{constructor(e){m(this,it),m(this,at),m(this,ot),m(this,st),h(this,it,e),h(this,at,L(e))}get stableRoutes(){return p(this,it)}get activeRoutes(){return p(this,ot)??p(this,it)}get branches(){return p(this,st)??p(this,at)}get hasHMRRoutes(){return p(this,ot)!=null}setRoutes(e){h(this,it,e),h(this,at,L(e))}setHmrRoutes(e){h(this,ot,e),h(this,st,L(e))}commitHmrRoutes(){p(this,ot)&&(h(this,it,p(this,ot)),h(this,at,p(this,st)),h(this,ot,void 0),h(this,st,void 0))}};it=new WeakMap,at=new WeakMap,ot=new WeakMap,st=new WeakMap;function lt(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;S(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||tt,a=i;if(e.instrumentations){let t=e.instrumentations;a=e=>({...i(e),...Ie(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new ct(re(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||Et,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=I(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,b=null,x,w;if(v==null&&!e.patchRoutesOnNavigation){let t=J(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Xt(s.activeRoutes);x=!0,w=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&Xe(v,s.activeRoutes,e.history.location.pathname).active&&(v=null),!v){x=!1,w=!x,v=[];let t=Xe(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))x=!1,w=!x;else if(!v.some(e=>mt(e.route)))x=!0,w=!x;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}w=!1,x=!0,r.forEach(e=>{let r=ht(e.route,t,n);w||=r.renderFallback,x&&=!r.shouldLoad})}let T,D={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,renderFallback:w,navigation:Qe,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},k=`POP`,j=null,M=!1,N,P=!1,F=new Map,te=null,ne=!1,ie=!1,ae=new Set,L=new Map,se=0,ce=-1,le=new Map,R=new Set,ue=new Map,z=new Map,B=new Set,V=new Map,de,fe=null;function pe(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(de){de(),de=void 0;return}C(V.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=We({currentLocation:D.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{de=e});e.history.go(r*-1),Ue(i,{state:`blocked`,location:n,proceed(){Ue(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(D.blockers);e.set(i,et),H({blockers:e})}}),j?.resolve(),j=null;return}return ye(t,n)}),n){vn(t,F);let e=()=>yn(t,F);t.addEventListener(`pagehide`,e),te=()=>t.removeEventListener(`pagehide`,e)}return D.initialized||ye(`POP`,D.location,{initialHydration:!0}),T}function me(){d&&d(),te&&te(),f.clear(),N&&N.abort(),D.fetchers.forEach((e,t)=>Pe(D.fetchers,t)),D.blockers.forEach((e,t)=>He(t))}function he(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(D,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function H(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),D={...D,...e};let n=[],r=[];D.fetchers.forEach((e,t)=>{e.state===`idle`&&(B.has(t)?n.push(t):r.push(t))}),B.forEach(e=>{!D.fetchers.has(e)&&!L.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(D,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Pe(D.fetchers,e)),r.forEach(e=>D.fetchers.delete(e))}function ge(t,n,{flushSync:r}={}){let i=D.actionData!=null&&D.navigation.formMethod!=null&&X(D.navigation.formMethod)&&D.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?D.actionData:null;let o=n.loaderData?qt(D.loaderData,n.loaderData,n.matches||[],n.errors):D.loaderData,c=D.blockers;c.size>0&&(c=new Map(c),c.forEach((e,t)=>c.set(t,et)));let l=!ne&&Ye(t,n.matches||D.matches),u=M===!0||D.navigation.formMethod!=null&&X(D.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),ne||k===`POP`||(k===`PUSH`?e.history.push(t,t.state):k===`REPLACE`&&e.history.replace(t,t.state));let d;if(k===`POP`){let e=F.get(D.location.pathname);e&&e.has(t.pathname)?d={currentLocation:D.location,nextLocation:t}:F.has(t.pathname)&&(d={currentLocation:t,nextLocation:D.location})}else if(P){let e=F.get(D.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),F.set(D.location.pathname,e)),d={currentLocation:D.location,nextLocation:t}}H({...n,actionData:a,loaderData:o,historyAction:k,location:t,initialized:!0,renderFallback:!1,navigation:Qe,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),k=`POP`,M=!1,P=!1,ne=!1,ie=!1,j?.resolve(),j=null,fe?.resolve(),fe=null}async function _e(t,n){if(j?.resolve(),j=null,typeof t==`number`){j||=bn();let n=j.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=ft(!1,dt(D.location,D.matches,c,t,n?.fromRouteId,n?.relative),n),o;n?.mask&&(o={pathname:``,search:``,hash:``,...typeof n.mask==`string`?O(n.mask):{...D.location.mask,...n.mask}});let s=D.location,l=E(s,r,n&&n.state,void 0,o);l={...l,...e.history.encodeLocation(l)};let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&X(i.formMethod)&&i.formAction===D.location.pathname+D.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=We({currentLocation:s,nextLocation:l,historyAction:d});if(m){Ue(m,{state:`blocked`,location:l,proceed(){Ue(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),_e(t,n)},reset(){let e=new Map(D.blockers);e.set(m,et),H({blockers:e})}});return}await ye(d,l,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})}function ve(){fe||=bn(),Ae(),H({revalidation:`loading`});let e=fe.promise;return D.navigation.state===`submitting`?e:D.navigation.state===`idle`?(ye(D.historyAction,D.location,{startUninterruptedRevalidation:!0}),e):(ye(k||D.historyAction,D.navigation.location,{overrideNavigation:D.navigation,enableViewTransition:P===!0}),e)}async function ye(t,n,r){N&&N.abort(),N=null,k=t,ne=(r&&r.startUninterruptedRevalidation)===!0,Je(D.location,D.matches),M=(r&&r.preventScrollReset)===!0,P=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&D.matches&&D.matches.length>0&&!y?D.matches:I(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&D.initialized&&!ie&&$t(D.location,n)&&!(r&&r.submission&&X(r.submission.formMethod))){ge(n,{matches:a},{flushSync:o});return}let l=Xe(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),!a){let{error:e,notFoundMatches:t,route:r}=Ge(n.pathname);ge(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;N=new AbortController;let d=Vt(e.history,n,N.signal,r&&r.submission),f=e.getContext?await e.getContext():new ee,p;if(r&&r.pendingError)p=[Yt(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&X(r.submission.formMethod)){let i=await xe(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(Y(t)&&Me(t.error)&&t.error.status===404){N=null,ge(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=mn(n,a,t,r.submission),o=!1,l.active=!1,d=Vt(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await Se(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(N=null,ge(n,{matches:h||a,...Jt(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function xe(t,n,i,l,u,d,f,p,m={}){if(Ae(),H({navigation:hn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await nt(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Xt(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=Yt(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=Ge(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=fn(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:J(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Oe(t,n,Mt(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(an(h)){let n;return n=m&&m.replace!=null?m.replace:Bt(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===D.location.pathname+D.location.search,await W(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(Y(h)){let e=Yt(l,g.route.id);return(m&&m.replace)!==!0&&(k=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function Se(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||mn(n,i,l,p),x=p||m||pn(b),S=!ne&&!g;if(d){if(S){let e=Ce(v);H({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await nt(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Xt(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Yt(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=Ge(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:w,revalidatingFetchers:T}=pt(t,u,a,o,e.history,D,i,x,n,g?[]:r,g===!0,ie,ae,B,ue,R,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(ce=++se,!e.dataStrategy&&!w.some(e=>e.shouldLoad)&&!w.some(e=>e.route.middleware&&e.route.middleware.length>0)&&T.length===0){let e=new Map(D.fetchers),t=ze(e);return ge(n,{matches:i,loaderData:{},errors:v&&Y(v[1])?{[v[0]]:v[1].error}:null,...Jt(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Ce(v);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=we(T)),H(e,{flushSync:_})}T.forEach(e=>{q(e.key),e.controller&&L.set(e.key,e.controller)});let E=()=>T.forEach(e=>q(e.key));N&&N.signal.addEventListener(`abort`,E);let{loaderResults:O,fetcherResults:k}=await ke(w,T,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener(`abort`,E),T.forEach(e=>L.delete(e.key));let A=Zt(O);if(A)return await W(t,A.result,!0,{replace:h}),{shortCircuited:!0};if(A=Zt(k),A)return R.add(A.key),await W(t,A.result,!0,{replace:h}),{shortCircuited:!0};let j=new Map(D.fetchers),{loaderData:M,errors:ee}=Kt(D,i,O,v,T,k,j);g&&D.errors&&(ee={...D.errors,...ee});let P=ze(j),F=Be(ce,j),te=P||F||T.length>0;return{matches:i,loaderData:M,errors:ee,...te?{workingFetchers:j}:{}}}function Ce(e){if(e&&!Y(e[1]))return{[e[0]]:e[1].data};if(D.actionData)return Object.keys(D.actionData).length===0?null:D.actionData}function we(e){let t=new Map(D.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=gn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Te(t,n,r,i){q(t);let a=(i&&i.flushSync)===!0,o=s.activeRoutes,l=dt(D.location,D.matches,c,r,n,i?.relative),u=I(o,l,c,!1,s.branches),d=Xe(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){K(t,n,J(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=ft(!0,l,i);if(m){K(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new ee,g=(i&&i.preventScrollReset)===!0;if(p&&X(p.formMethod)){await Ee(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate);return}ue.set(t,{routeId:n,path:f}),await De(t,n,f,u,h,d.active,a,g,p)}async function Ee(t,n,i,l,u,d,f,p,m,h){Ae(),ue.delete(t),G(t,_n(m,D.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=Vt(e.history,i,g.signal,m);if(d){let e=await nt(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){K(t,n,e.error,{flushSync:f});return}if(e.matches)l=e.matches;else{K(t,n,J(404,{pathname:i}),{flushSync:f});return}}let v=fn(l,i);if(!v.route.action&&!v.route.lazy){K(t,n,J(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}L.set(t,g);let y=se,b=Mt(a,o,_,i,l,v,r,u),x=await Oe(_,i,b,u,t),C=x[v.route.id];if(!C){for(let e of b)if(x[e.route.id]){C=x[e.route.id];break}}if(_.signal.aborted){L.get(t)===g&&L.delete(t);return}if(B.has(t)){if(an(C)||Y(C)){G(t,Z(void 0));return}}else{if(an(C)){if(L.delete(t),ce>y){G(t,Z(void 0));return}return R.add(t),G(t,gn(m)),W(_,C,!1,{fetcherSubmission:m,preventScrollReset:p})}if(Y(C)){K(t,n,C.error);return}}let w=D.navigation.location||D.location,T=Vt(e.history,w,g.signal),E=s.activeRoutes,O=D.navigation.state===`idle`?D.matches:I(E,D.navigation.location,c,!1,s.branches);S(O,`Didn't find any matches after fetcher action`);let A=++se;le.set(t,A);let{dsMatches:j,revalidatingFetchers:M}=pt(T,u,a,o,e.history,D,O,m,w,r,!1,ie,ae,B,ue,R,E,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,C],h),ee=gn(m,C.data),P=new Map(D.fetchers);P.set(t,ee),M.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=P.get(t),r=gn(void 0,n?n.data:void 0);P.set(t,r),q(t),e.controller&&L.set(t,e.controller)}),H({fetchers:P});let F=()=>M.forEach(e=>q(e.key));g.signal.addEventListener(`abort`,F);let{loaderResults:te,fetcherResults:ne}=await ke(j,M,T,w,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,F),le.delete(t),L.delete(t),M.forEach(e=>L.delete(e.key));let re=D.fetchers.has(t),oe=e=>{if(!re)return e;let n=new Map(e.fetchers);return n.set(t,Z(C.data)),{...e,fetchers:n}},z=Zt(te);if(z)return D=oe(D),W(T,z.result,!1,{preventScrollReset:p});if(z=Zt(ne),z)return R.add(z.key),D=oe(D),W(T,z.result,!1,{preventScrollReset:p});let V=new Map(D.fetchers);re&&V.set(t,Z(C.data));let{loaderData:de,errors:fe}=Kt(D,O,te,void 0,M,ne,V);Be(A,V),D.navigation.state===`loading`&&A>ce?(S(k,`Expected pending action`),N&&N.abort(),ge(D.navigation.location,{matches:O,loaderData:de,errors:fe,fetchers:V})):(H({errors:fe,loaderData:qt(D.loaderData,de,O,fe),fetchers:V}),ie=!1)}async function De(t,n,i,s,c,l,u,d,f){let p=D.fetchers.get(t);G(t,gn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Vt(e.history,i,m.signal);if(l){let e=await nt(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){K(t,n,e.error,{flushSync:u});return}if(e.matches)s=e.matches;else{K(t,n,J(404,{pathname:i}),{flushSync:u});return}}let g=fn(s,i);L.set(t,m);let _=se,v=await Oe(h,i,Mt(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(L.get(t)===m&&L.delete(t),!h.signal.aborted){if(B.has(t)){G(t,Z(void 0));return}if(an(y)){if(ce>_){G(t,Z(void 0));return}R.add(t),await W(h,y,!1,{preventScrollReset:d});return}if(Y(y)){K(t,n,y.error);return}G(t,Z(y.data))}}async function W(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(j?.resolve(),j=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ie=!0);let d=i.response.headers.get(`Location`);S(d,`Expected a Location header on the redirect Response`),d=Bt(d,new URL(r.url),c,e.history);let f=E(D.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(be(d)){let n=A(t,d,!0);e=n.origin!==t.location.origin||U(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}N=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=D.navigation;!o&&!s&&m&&h&&g&&(o=pn(D.navigation));let _=o||s;Ze.has(i.response.status)&&_&&X(_.formMethod)?await ye(p,f,{submission:{..._,formAction:d},preventScrollReset:l||M,enableViewTransition:a?P:void 0}):await ye(p,f,{overrideNavigation:mn(f,[],p,o),fetcherSubmission:s,preventScrollReset:l||M,enableViewTransition:a?P:void 0})}async function Oe(e,t,n,r,i){let a,o={};try{a=await Nt(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!X(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!D.loaderData.hasOwnProperty(e.route.id)&&(!D.errors||!D.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(rn(r)){let i=r.result;o[t]={type:`redirect`,response:Lt(i,e,t,n,c)}}else o[t]=await It(r);return o}async function ke(e,t,n,r,i){let a=Oe(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Oe(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:J(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Ae(){ie=!0,ue.forEach((e,t)=>{L.has(t)&&ae.add(t),q(t)})}function G(e,t,n={}){let r=new Map(D.fetchers);r.set(e,t),H({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function K(e,t,n,r={}){let i=Yt(D.matches,t),a=new Map(D.fetchers);Pe(a,e),H({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function je(e){return z.set(e,(z.get(e)||0)+1),B.has(e)&&B.delete(e),D.fetchers.get(e)||$e}function Ne(e,t){q(e,t?.reason),G(e,Z(null))}function Pe(e,t){let n=D.fetchers.get(t);L.has(t)&&!(n&&n.state===`loading`&&le.has(t))&&q(t),ue.delete(t),le.delete(t),R.delete(t),B.delete(t),ae.delete(t),e.delete(t)}function Fe(e){let t=(z.get(e)||0)-1;t<=0?(z.delete(e),B.add(e)):z.set(e,t),H({fetchers:new Map(D.fetchers)})}function q(e,t){let n=L.get(e);n&&(n.abort(t),L.delete(e))}function Re(e,t){for(let n of e){let e=t.get(n);S(e,`Expected fetcher: ${n}`);let r=Z(e.data);t.set(n,r)}}function ze(e){let t=[],n=!1;for(let r of R){let i=e.get(r);S(i,`Expected fetcher: ${r}`),i.state===`loading`&&(R.delete(r),t.push(r),n=!0)}return Re(t,e),n}function Be(e,t){let n=[];for(let[r,i]of le)if(i<e){let e=t.get(r);S(e,`Expected fetcher: ${r}`),e.state===`loading`&&(q(r),le.delete(r),n.push(r))}return Re(n,t),n.length>0}function Ve(e,t){let n=D.blockers.get(e)||et;return V.get(e)!==t&&V.set(e,t),n}function He(e){D.blockers.delete(e),V.delete(e)}function Ue(e,t){let n=D.blockers.get(e)||et;S(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(D.blockers);r.set(e,t),H({blockers:r})}function We({currentLocation:e,nextLocation:t,historyAction:n}){if(V.size===0)return;V.size>1&&C(!1,`A router only supports one blocker at a time`);let r=Array.from(V.entries()),[i,a]=r[r.length-1],o=D.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function Ge(e){let t=J(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=Xt(n);return{notFoundMatches:r,route:i,error:t}}function Ke(e,t,n){if(m=e,g=t,h=n||null,!_&&D.navigation===Qe){_=!0;let e=Ye(D.location,D.matches);e!=null&&H({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function qe(e,t){return h&&h(e,t.map(e=>oe(e,D.loaderData)))||e.key}function Je(e,t){if(m&&g){let n=qe(e,t);m[n]=g()}}function Ye(e,t){if(m){let n=qe(e,t),r=m[n];if(typeof r==`number`)return r}return null}function Xe(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:I(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:I(n,r,c,!0,e)}}return{active:!1,matches:null}}async function nt(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||yt(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=I(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=I(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&rt(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=I(s.activeRoutes,n,c,!0,u),!f||rt(l,f))return{type:`success`,matches:null};l=f}}function rt(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function it(e){o={},s.setHmrRoutes(re(e,a,void 0,o))}function at(e,t,n=!1){yt(e,t,s,o,a,n),s.hasHMRRoutes||H({})}return T={get basename(){return c},get future(){return u},get state(){return D},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:pe,subscribe:he,enableScrollRestoration:Ke,navigate:_e,fetch:Te,revalidate:ve,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:je,resetFetcher:Ne,deleteFetcher:Fe,dispose:me,getBlocker:Ve,deleteBlocker:He,patchRoutes:at,_internalFetchControllers:L,_internalSetRoutes:it,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){H(e)}},e.instrumentations&&(T=Le(T,e.instrumentations.map(e=>e.router).filter(Boolean))),T}function ut(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function dt(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Ee(r||`.`,Te(o),U(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=dn(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=ye({basename:n,pathname:c.pathname})),D(c)}function ft(e,t,n){if(!n||!ut(n))return{path:t};if(n.formMethod&&!un(n.formMethod))return{path:t,error:J(405,{method:n.formMethod})};let r=()=>({path:t,error:J(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=Qt(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!X(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}
|
|
2
|
+
`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!X(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}S(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=Ut(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Ut(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Wt(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Wt(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(X(c.formMethod))return{path:t,submission:c};let l=O(t);return e&&l.search&&dn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:D(l),submission:c}}function pt(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?Y(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&Y(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,O={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},k=Ne(o),A=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!mt(s))f=!1;else if(u){let{shouldLoad:e}=ht(s,a.loaderData,a.errors);f=e}else gt(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return jt(n,r,e,c,k,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?_t(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p},h=vt(i,m);return jt(n,r,e,c,k,i,l,t,h,m,x)}),j=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=I(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;j.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=fn(b,e.path),C=new AbortController,w=Vt(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=Mt(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=Mt(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};vt(S,a)&&(T=Mt(n,r,w,e.path,b,S,l,t,a))}T&&j.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:A,revalidatingFetchers:j}}function mt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function ht(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!mt(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function gt(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function _t(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function vt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function yt(e,t,n,r,i,a){let o;if(e){let t=r[e];S(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>bt(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=re(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=re([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function bt(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index!==t.index||e.path!==t.path||e.caseSensitive!==t.caseSensitive?!1:(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>bt(e,t)))??!1}var xt=new WeakMap,St=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(S(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=xt.get(i);o||(o={},xt.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=P(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)C(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)C(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},Ct=new WeakMap;function wt(e,t,n,r,i){let a=n[e.id];if(S(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=Ct.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{S(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=te(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?C(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?C(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return Ct.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=St({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function Tt(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Et(e){return e.matches.some(e=>e.route.middleware)?Dt(e,()=>Tt(e)):Tt(e)}function Dt(e,t){return Ot(e,t,e=>{if(ln(e))throw e;return e},tn,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=Yt(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function Ot(e,t,n,r,i){let{matches:a,...o}=e;return await kt(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function kt(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await kt(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function At(e,t,n,r,i){let a=St({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=wt(r.route,X(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function jt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=At(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?vt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?vt(a,{...l,defaultShouldRevalidate:e}):vt(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!X(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(X(n.method)||!p)?Pt({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function Mt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?jt(e,t,n,r,Ne(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:At(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Nt(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:Ht(t,n),pattern:Ne(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return Dt(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function Pt({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=X(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:Ht(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw J(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)c=await f(t);else{let t=new URL(e.url);throw J(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Ft(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function It(e){let{result:t,type:n}=e;if(sn(t)){let e;try{e=await Ft(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new je(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?on(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:en(t),statusCode:Me(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Me(t)?t.status:void 0}:on(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function Lt(e,t,n,r,i){let a=e.headers.get(`Location`);if(S(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!be(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=dt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Rt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function zt(e){try{return Rt.includes(new URL(e).protocol)}catch{return!1}}function Bt(e,t,n,r){if(be(e)){let r=e,i=_.test(r)?new URL(v(r,t.protocol)):new URL(r);if(zt(i.toString()))throw Error(`Invalid redirect location`);let a=U(i.pathname,n)!=null;if(i.origin===t.origin&&a)return De(i.pathname)+i.search+i.hash}try{if(zt(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function Vt(e,t,n,r){let i=e.createURL(Qt(t)).toString(),a={signal:n};if(r&&X(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?Ut(r.formData):r.formData}return new Request(i,a)}function Ht(e,t){let n=new URL(e.url),r=typeof t==`string`?O(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);n.search=e.size?`?${e.toString()}`:``}else n.search=``;return n.hash=r.hash||``,n}function Ut(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Wt(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Gt(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&Y(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(S(!an(f),`Cannot handle redirect results in processLoaderData`),Y(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=Yt(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=rt),c||(c=!0,s=Me(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function Kt(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=Gt(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(S(s,`Did not find corresponding fetcher result`),Y(s)){let t=Yt(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(an(s))S(!1,`Unhandled fetcher revalidation redirect`);else{let e=Z(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function qt(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==rt).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function Jt(e){return e?Y(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Yt(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function Xt(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function J(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new je(e||500,o,Error(s),!0)}function Zt(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(an(r))return{key:n,result:r}}}function Qt(e){return D({...typeof e==`string`?O(e):e,hash:``})}function $t(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function en(e){return new je(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function tn(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&nn(t))}function nn(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function rn(e){return sn(e.result)&&Xe.has(e.result.status)}function Y(e){return e.type===`error`}function an(e){return(e&&e.type)===`redirect`}function on(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function sn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function cn(e){return Xe.has(e)}function ln(e){return sn(e)&&cn(e.status)&&e.headers.has(`Location`)}function un(e){return Ye.has(e.toUpperCase())}function X(e){return qe.has(e.toUpperCase())}function dn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function fn(e,t){let n=typeof t==`string`?O(t).search:t.search;if(e[e.length-1].route.index&&dn(n||``))return e[e.length-1];let r=we(e);return r[r.length-1]}function pn(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function mn(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function hn(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function gn(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function _n(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Z(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function vn(e,t){try{let n=e.sessionStorage.getItem(nt);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function yn(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(nt,JSON.stringify(n))}catch(e){C(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function bn(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var xn=o.createContext(null);xn.displayName=`DataRouter`;var Sn=o.createContext(null);Sn.displayName=`DataRouterState`;var Cn=o.createContext(!1);function wn(){return o.useContext(Cn)}var Tn=o.createContext({isTransitioning:!1});Tn.displayName=`ViewTransition`;var En=o.createContext(new Map);En.displayName=`Fetchers`;var Dn=o.createContext(null);Dn.displayName=`Await`;var Q=o.createContext(null);Q.displayName=`Navigation`;var On=o.createContext(null);On.displayName=`Location`;var kn=o.createContext({outlet:null,matches:[],isDataRoute:!1});kn.displayName=`Route`;var An=o.createContext(null);An.displayName=`RouteError`;var jn=`REACT_ROUTER_ERROR`,Mn=`REDIRECT`,Nn=`ROUTE_ERROR_RESPONSE`;function Pn(e){if(e.startsWith(`${jn}:${Mn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Fn(e){if(e.startsWith(`${jn}:${Nn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new je(t.status,t.statusText,t.data)}catch{}}function In(e,{relative:t}={}){S(Ln(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=o.useContext(Q),{hash:i,pathname:a,search:s}=Hn(e,{relative:t}),c=a;return n!==`/`&&(c=a===`/`?n:W([n,a])),r.createHref({pathname:c,search:s,hash:i})}function Ln(){return o.useContext(On)!=null}function $(){return S(Ln(),`useLocation() may be used only in the context of a <Router> component.`),o.useContext(On).location}var Rn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function zn(e){o.useContext(Q).static||o.useLayoutEffect(e)}function Bn(){let{isDataRoute:e}=o.useContext(kn);return e?ar():Vn()}function Vn(){S(Ln(),`useNavigate() may be used only in the context of a <Router> component.`);let e=o.useContext(xn),{basename:t,navigator:n}=o.useContext(Q),{matches:r}=o.useContext(kn),{pathname:i}=$(),a=JSON.stringify(Te(r)),s=o.useRef(!1);return zn(()=>{s.current=!0}),o.useCallback((r,o={})=>{if(C(s.current,Rn),!s.current)return;if(typeof r==`number`){n.go(r);return}let c=Ee(r,JSON.parse(a),i,o.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:W([t,c.pathname])),(o.replace?n.replace:n.push)(c,o.state,o)},[t,n,a,i,e])}o.createContext(null);function Hn(e,{relative:t}={}){let{matches:n}=o.useContext(kn),{pathname:r}=$(),i=JSON.stringify(Te(n));return o.useMemo(()=>Ee(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Un(e,t,n){S(Ln(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=o.useContext(Q),{matches:i}=o.useContext(kn),a=i[i.length-1],s=a?a.params:{},c=a?a.pathname:`/`,l=a?a.pathnameBase:`/`,u=a&&a.route;{let e=u&&u.path||``;sr(c,!u||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
3
|
+
|
|
4
|
+
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=$(),f;if(t){let e=typeof t==`string`?O(t):t;S(l===`/`||e.pathname?.startsWith(l),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,m=p;if(l!==`/`){let e=l.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):ae(e,{pathname:m});C(u||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),C(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=Xn(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:W([l,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:W([l,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?o.createElement(On.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},g):g}function Wn(){let e=ir(),t=Me(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=o.createElement(o.Fragment,null,o.createElement(`p`,null,`💿 Hey developer 👋`),o.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,o.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,o.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),o.createElement(o.Fragment,null,o.createElement(`h2`,null,`Unexpected Application Error!`),o.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?o.createElement(`pre`,{style:i},n):null,s)}var Gn=o.createElement(Wn,null),Kn=class extends o.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Fn(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:o.createElement(kn.Provider,{value:this.props.routeContext},o.createElement(An.Provider,{value:e,children:this.props.component}));return this.context?o.createElement(Jn,{error:e},t):t}};Kn.contextType=Cn;var qn=new WeakMap;function Jn({children:e,error:t}){let{basename:n}=o.useContext(Q);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Pn(t.digest);if(e){let r=qn.get(t);if(r)throw r;let i=Fe(e.location,n),a=i.absoluteURL||i.to;if(zt(a))throw Error(`Invalid redirect location`);if(Pe&&!qn.get(t)){if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw qn.set(t,n),n}}return o.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function Yn({routeContext:e,match:t,children:n}){let r=o.useContext(xn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),o.createElement(kn.Provider,{value:e},n)}function Xn(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);S(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let s=!1,c=-1;if(n&&r){s=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:a}=r,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||o){n.isStatic&&(s=!0),i=c>=0?i.slice(0,c+1):[i[0]];break}}}}let l=n?.onError,u=r&&l?(e,t)=>{l(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Ne(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,l)=>{let d,f=!1,p=null,m=null;r&&(d=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||Gn,s&&(c<0&&l===0?(sr(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):c===l&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,l+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?o.createElement(n.route.Component,null):n.route.element?n.route.element:e,o.createElement(Yn,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||l===0)?o.createElement(Kn,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function Zn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Qn(e){let t=o.useContext(xn);return S(t,Zn(e)),t}function $n(e){let t=o.useContext(Sn);return S(t,Zn(e)),t}function er(e){let t=o.useContext(kn);return S(t,Zn(e)),t}function tr(e){let t=er(e),n=t.matches[t.matches.length-1];return S(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function nr(){return tr(`useRouteId`)}function rr(){let{matches:e,loaderData:t}=$n(`useMatches`);return o.useMemo(()=>e.map(e=>oe(e,t)),[e,t])}function ir(){let e=o.useContext(An),t=$n(`useRouteError`),n=tr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function ar(){let{router:e}=Qn(`useNavigate`),t=tr(`useNavigate`),n=o.useRef(!1);return zn(()=>{n.current=!0}),o.useCallback(async(r,i={})=>{C(n.current,Rn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var or={};function sr(e,t,n){!t&&!or[e]&&(or[e]=!0,C(!1,n))}var cr={};function lr(e,t){!e&&!cr[t]&&(cr[t]=!0,console.warn(t))}var ur=o.useOptimistic,dr=()=>void 0;function fr(e){return ur?ur(e):[e,dr]}function pr(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&C(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:o.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&C(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:o.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&C(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:o.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var mr=[`HydrateFallback`,`hydrateFallbackElement`],hr=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function gr({router:e,flushSync:t,onError:n,useTransitions:r}){r=wn()||r;let[i,a]=o.useState(e.state),[s,c]=fr(i),[l,u]=o.useState(),[d,f]=o.useState({isTransitioning:!1}),[p,m]=o.useState(),[h,g]=o.useState(),[_,v]=o.useState(),y=o.useRef(new Map),b=o.useCallback((i,{deletedFetchers:s,newErrors:l,flushSync:d,viewTransitionOpts:_})=>{l&&n&&Object.values(l).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:Ne(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),s.forEach(e=>y.current.delete(e)),lr(d===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(lr(_==null||b,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!_||!b){t&&d?t(()=>a(i)):r===!1?a(i):o.startTransition(()=>{r===!0&&c(e=>_r(e,i)),a(i)});return}if(t&&d){t(()=>{h&&(p?.resolve(),h.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})})}),t(()=>g(n));return}h?(p?.resolve(),h.skipTransition(),v({state:i,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(u(i),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,h,p,r,c,n]);o.useLayoutEffect(()=>e.subscribe(b),[e,b]),o.useEffect(()=>{d.isTransitioning&&!d.flushSync&&m(new hr)},[d]),o.useEffect(()=>{if(p&&l&&e.window){let t=l,n=p.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):o.startTransition(()=>{r===!0&&c(e=>_r(e,t)),a(t)}),await n});i.finished.finally(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})}),g(i)}},[l,p,e.window,r,c]),o.useEffect(()=>{p&&l&&s.location.key===l.location.key&&p.resolve()},[p,h,s.location,l]),o.useEffect(()=>{!d.isTransitioning&&_&&(u(_.state),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[d.isTransitioning,_]);let x=o.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),S=e.basename||`/`,C=o.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:n}),[e,x,S,n]);return o.createElement(o.Fragment,null,o.createElement(xn.Provider,{value:C},o.createElement(Sn.Provider,{value:s},o.createElement(En.Provider,{value:y.current},o.createElement(Tn.Provider,{value:d},o.createElement(br,{basename:S,location:s.location,navigationType:s.historyAction,navigator:x,useTransitions:r},o.createElement(vr,{routes:e.routes,manifest:e.manifest,future:e.future,state:s,isStatic:!1,onError:n})))))),null)}function _r(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var vr=o.memo(yr);function yr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Un(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function br({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:s}){S(!Ln(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=o.useMemo(()=>({basename:c,navigator:i,static:a,useTransitions:s,future:{}}),[c,i,a,s]);typeof n==`string`&&(n=O(n));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,mask:h}=n,g=o.useMemo(()=>{let e=U(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m,mask:h},navigationType:r}},[c,u,d,f,p,m,r,h]);return C(g!=null,`<Router basename="${c}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:o.createElement(Q.Provider,{value:l},o.createElement(On.Provider,{children:t,value:g}))}o.Component;var xr=`get`,Sr=`application/x-www-form-urlencoded`;function Cr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function wr(e){return Cr(e)&&e.tagName.toLowerCase()===`button`}function Tr(e){return Cr(e)&&e.tagName.toLowerCase()===`form`}function Er(e){return Cr(e)&&e.tagName.toLowerCase()===`input`}function Dr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Or(e,t){return e.button===0&&(!t||t===`_self`)&&!Dr(e)}function kr(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Ar(e,t){let n=kr(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var jr=null;function Mr(){if(jr===null)try{new FormData(document.createElement(`form`),0),jr=!1}catch{jr=!0}return jr}var Nr=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Pr(e){return e!=null&&!Nr.has(e)?(C(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Sr}"`),null):e}function Fr(e,t){let n,r,i,a,o;if(Tr(e)){let o=e.getAttribute(`action`);r=o?U(o,t):null,n=e.getAttribute(`method`)||xr,i=Pr(e.getAttribute(`enctype`))||Sr,a=new FormData(e)}else if(wr(e)||Er(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?U(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||xr,i=Pr(e.getAttribute(`formenctype`))||Pr(o.getAttribute(`enctype`))||Sr,a=new FormData(o,e),!Mr()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Cr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=xr,r=null,i=Sr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Ir(e,t){if(e===!1||e==null)throw Error(t)}function Lr(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&U(i.pathname,t)===`/`?`${Oe(t)}/_root.${r}`:`${Oe(i.pathname)}.${r}`,i}async function Rr(e,t){if(e.id in t)return t[e.id];try{let n=await u(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function zr(e){return e!=null&&typeof e.page==`string`}function Br(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Vr(e,t,n){return Kr((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Rr(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Br).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Hr(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Ur(e,t,{includeHydrateFallback:n}={}){return Wr(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Wr(e){return[...new Set(e)]}function Gr(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Kr(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!zr(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Gr(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function qr(){let e=o.useContext(xn);return Ir(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Jr(){let e=o.useContext(Sn);return Ir(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Yr=o.createContext(void 0);Yr.displayName=`FrameworkContext`;function Xr(){let e=o.useContext(Yr);return Ir(e,`You must render this element inside a <HydratedRouter> element`),e}function Zr(e,t){let n=o.useContext(Yr),[r,i]=o.useState(!1),[a,s]=o.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=o.useRef(null);o.useEffect(()=>{if(e===`render`&&s(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),o.useEffect(()=>{if(r){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),s(!1)};return n?e===`intent`?[a,p,{onFocus:Qr(c,m),onBlur:Qr(l,h),onMouseEnter:Qr(u,m),onMouseLeave:Qr(d,h),onTouchStart:Qr(f,m)}]:[a,p,{}]:[!1,p,{}]}function Qr(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function $r({page:e,...t}){let n=wn(),{nonce:r}=Xr(),{router:i}=qr(),a=o.useMemo(()=>ae(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?o.createElement(ti,{page:e,matches:a,...t}):o.createElement(ni,{page:e,matches:a,...t})):null}function ei(e){let{manifest:t,routeModules:n}=Xr(),[r,i]=o.useState([]);return o.useEffect(()=>{let r=!1;return Vr(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function ti({page:e,matches:t,...n}){let r=$(),{future:i}=Xr(),{basename:a}=qr(),s=o.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Lr(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return o.createElement(o.Fragment,null,s.map(e=>o.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function ni({page:e,matches:t,...n}){let r=$(),{future:i,manifest:a,routeModules:s}=Xr(),{basename:c}=qr(),{loaderData:l,matches:u}=Jr(),d=o.useMemo(()=>Hr(e,t,u,a,r,`data`),[e,t,u,a,r]),f=o.useMemo(()=>Hr(e,t,u,a,r,`assets`),[e,t,u,a,r]),p=o.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,o=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?o=!0:n.add(e.route.id))}),n.size===0)return[];let u=Lr(e,c,i.v8_trailingSlashAwareDataRequests,`data`);return o&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[c,i.v8_trailingSlashAwareDataRequests,l,r,a,d,t,e,s]),m=o.useMemo(()=>Ur(f,a),[f,a]),h=ei(f);return o.createElement(o.Fragment,null,p.map(e=>o.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>o.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>o.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function ri(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}o.Component;var ii=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{ii&&(window.__reactRouterVersion=`7.18.2`)}catch{}function ai(e,t){return lt({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:x({window:t?.window}),hydrationData:t?.hydrationData||oi(),routes:e,mapRouteProperties:pr,hydrationRouteProperties:mr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function oi(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:si(e.errors)}),e}function si(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new je(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&K.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}var ci=o.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:s,state:c,target:l,to:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h){let{basename:_,navigator:v,useTransitions:y}=o.useContext(Q),b=typeof u==`string`&&g.test(u),x=Fe(u,_);u=x.to;let S=In(u,{relative:r}),C=$(),w=null;if(s){let e=Ee(s,[],C.mask?C.mask.pathname:`/`,!0);_!==`/`&&(e.pathname=e.pathname===`/`?_:W([_,e.pathname])),w=v.createHref(e)}let[T,E,D]=Zr(n,m),O=pi(u,{replace:a,mask:s,state:c,target:l,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:y});function k(t){e&&e(t),t.defaultPrevented||O(t)}let A=!(x.isExternal||i),j=o.createElement(`a`,{...m,...D,href:(A?w:void 0)||x.absoluteURL||S,onClick:A?k:e,ref:ri(h,E),target:l,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?o.createElement(o.Fragment,null,j,o.createElement($r,{page:S})):j});ci.displayName=`Link`;var li=o.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:s,children:c,...l},u){let d=Hn(a,{relative:l.relative}),f=$(),p=o.useContext(Sn),{navigator:m,basename:h}=o.useContext(Q),g=p!=null&&yi(d)&&s===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=U(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return o.createElement(ci,{...l,"aria-current":w,className:T,ref:u,style:E,to:a,viewTransition:s},typeof c==`function`?c(C):c)});li.displayName=`NavLink`;var ui=o.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:s=xr,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:_}=o.useContext(Q),v=_i(),y=vi(c,{relative:u}),b=s.toLowerCase()===`get`?`get`:`post`,x=typeof c==`string`&&g.test(c);return o.createElement(`form`,{ref:h,method:b,action:y,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,c=r?.getAttribute(`formmethod`)||s,m=()=>v(r||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:i,state:a,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});_&&n!==!1?o.startTransition(()=>m()):m()},...m,"data-discover":!x&&e===`render`?`true`:void 0})});ui.displayName=`Form`;function di(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fi(e){let t=o.useContext(xn);return S(t,di(e)),t}function pi(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=Bn(),f=$(),p=Hn(e,{relative:s});return o.useCallback(m=>{if(Or(m,t)){m.preventDefault();let t=n===void 0?D(f)===D(p):n,h=()=>d(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:s,viewTransition:c,defaultShouldRevalidate:l});u?o.startTransition(()=>h()):h()}},[f,d,p,n,r,i,t,e,a,s,c,l,u])}function mi(e){C(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=o.useRef(kr(e)),n=o.useRef(!1),r=$(),i=o.useMemo(()=>Ar(r.search,n.current?null:t.current),[r.search]),a=Bn();return[i,o.useCallback((e,t)=>{let r=kr(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var hi=0,gi=()=>`__${String(++hi)}__`;function _i(){let{router:e}=fi(`useSubmit`),{basename:t}=o.useContext(Q),n=nr(),r=e.fetch,i=e.navigate;return o.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Fr(e,t);if(a.navigate===!1){let e=a.fetcherKey||gi();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function vi(e,{relative:t}={}){let{basename:n}=o.useContext(Q),r=o.useContext(kn);S(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Hn(e||`.`,{relative:t})},s=$();if(e==null){a.search=s.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:W([n,a.pathname])),D(a)}function yi(e,{relative:t}={}){let n=o.useContext(Tn);S(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=fi(`useViewTransitionState`),i=Hn(e,{relative:t});if(!n.isTransitioning)return!1;let a=U(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=U(n.nextLocation.pathname,r)||n.nextLocation.pathname;return H(i.pathname,s)!=null||H(i.pathname,a)!=null}function bi(e){return{kind:e.identityKind,key:e.identityKey}}function xi(e){return`/projects/${encodeURIComponent(e.kind)}/${encodeURIComponent(e.key)}`}function Si(e){return a(i(e),e.id)}function Ci(e,t,n){let r=e.get(t);if(r){r.push(n);return}e.set(t,[n])}function wi(e,t){let a=n(e),o=new Map,s=new Map,c=new Map,l=new Map,u=[],d=new Set(t.map(e=>e.name.toLowerCase()));for(let e of d)o.set(e,[]),s.set(e,[]);for(let t of e){let e=i(t),n={...t,agentKey:e,sessionId:t.id,reference:t.slug};u.push(n),d.has(e)&&s.get(e).push(n);let a=t.project_identity;if(!a?.key)continue;let o=r(a);Ci(c,o,n);let f=l.get(o);f?f.count+=1:l.set(o,{key:o,identityKind:a.kind,identityKey:a.key,label:a.displayName||t.directory,count:1})}for(let e of d)o.set(e,a.byAgent.get(e)??[]);return{byRouteKey:a.byRouteKey,byAgent:o,byProjectIdentityKey:a.byProjectIdentityKey,byProjectAgentKey:a.byProjectAgentKey,byLandingAgent:s,byLandingProjectIdentityKey:c,landingSessions:u,sessionsByActivity:a.sessionsByActivity,projectOptions:[...l.values()].toSorted((e,t)=>t.count-e.count).slice(0,8)}}function Ti(e){let t=new Map,n=new Map;for(let r=0;r<e.length;r+=1){let i=e[r],a=Si(i);t.has(a)||(t.set(a,i),n.set(a,r))}return{byReference:t,indexByReference:n}}export{xi as a,ai as c,$ as d,rr as f,u as g,mi as h,bi as i,j as l,ir as m,Ti as n,ci as o,Bn as p,Si as r,gr as s,wi as t,Me as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,n as t,r as n,t as r}from"./jsx-runtime-B-hcVAMW.js";import{g as i}from"./contract-V6QuD0UY.js";var a=n((e=>{var n=t();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.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(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.8`})),o=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s=`access_token`,c=`codesesh:remote-access-token`,l=null;function u(){if(typeof window>`u`)return;let e=new URL(window.location.href),t=e.searchParams.get(s);if(t){l=t;try{window.sessionStorage.setItem(c,t)}catch{}e.searchParams.delete(s),window.history.replaceState(window.history.state,``,`${e.pathname}${e.search}${e.hash}`);return}try{l=window.sessionStorage.getItem(c)}catch{l=null}}function d(e={}){if(!l)return e;let t=new Headers(e.headers);return t.set(`Authorization`,`Bearer ${l}`),{...e,headers:t}}function f(e){if(!l)return e;let t=new URL(e,window.location.origin);return t.searchParams.set(s,l),`${t.pathname}${t.search}`}var p=250,m=2;async function h(e,t){let n=await fetch(e,d(t));if(!n.ok)throw new g(`${t?.method??`GET`} ${e} failed: ${n.status} ${n.statusText}`,n.status);return n.json()}var g=class extends Error{status;constructor(e,t){super(e),this.status=t}};async function _(e){return h(`/api/config`,e)}async function v(){return h(`/api/status`)}function y(e,t){t?.from!=null&&e.set(`from`,new Date(t.from).toISOString()),t?.to!=null&&e.set(`to`,new Date(t.to).toISOString())}async function b(e,t){let n=new URLSearchParams;return y(n,e),h(`/api/agents?${n}`,t)}async function x(e,t){let n=new URLSearchParams;return y(n,e),h(`/api/projects?${n}`,t)}async function S(e={},t,n){let r=new URLSearchParams;e.agent&&r.set(`agent`,e.agent),e.projectKind&&r.set(`projectKind`,e.projectKind),e.projectKey&&r.set(`projectKey`,e.projectKey),y(r,e);let i=0;for(;;)try{let e=[],i;do{let a=new URLSearchParams(r);a.set(`limit`,String(p)),i&&a.set(`cursor`,i);let o=await h(`/api/sessions?${a}`,t);e.push(...o.sessions),i||n?.onFirstPage?.([...e]),i=o.nextCursor}while(i);return{sessions:e}}catch(e){if(!(e instanceof g)||e.status!==409||i>=m)throw e;i+=1}}async function C(e,t,n){let r=`/api/sessions${i({agentName:e,sessionId:t})}`,a=n?{signal:n.signal}:void 0;return n?.messageCursor?h(`${r}?${new URLSearchParams({messageCursor:n.messageCursor})}`,a):h(r,a)}async function w(e,t,n){let r=new URLSearchParams;e?.days!==0&&y(r,e),e?.days!=null&&r.set(`days`,String(e.days)),t.project&&(r.set(`projectKind`,t.project.kind),r.set(`projectKey`,t.project.key)),t.agent&&r.set(`agent`,t.agent);let i=r.toString();return h(i?`/api/dashboard?${i}`:`/api/dashboard`,n)}async function T(e,t={},n){let r=new URLSearchParams;return r.set(`q`,e),t.agent&&r.set(`agent`,t.agent),t.projectKind&&r.set(`projectKind`,t.projectKind),t.projectKey&&r.set(`projectKey`,t.projectKey),t.tag&&r.set(`tag`,t.tag),t.tool&&r.set(`tool`,t.tool),t.fileKind&&r.set(`fileActivity`,t.fileKind),t.costMin!=null&&r.set(`costMin`,String(t.costMin)),t.costMax!=null&&r.set(`costMax`,String(t.costMax)),y(r,t),h(`/api/search?${r}`,n)}async function ee(e){return h(`/api/bookmarks`,e)}async function te(e){return h(`/api/bookmarks`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({reference:e})})}async function E(e){return h(`/api/bookmarks/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}async function D(e){await h(`/api/bookmarks${i(e)}`,{method:`DELETE`})}async function O(e,t,n){await h(`/api/session-aliases${i({agentName:e,sessionId:t})}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({alias:n})})}async function k(e,t){await h(`/api/session-aliases${i({agentName:e,sessionId:t})}`,{method:`DELETE`})}function A(e,t={}){let n=JSON.stringify({event:e,data:t});try{if(!l&&typeof navigator<`u`&&navigator.sendBeacon){let e=new Blob([n],{type:`application/json`});if(navigator.sendBeacon(`/api/logs`,e))return}}catch{}fetch(`/api/logs`,d({method:`POST`,headers:{"Content-Type":`application/json`},body:n,keepalive:!0})).catch(()=>{})}var j=1e3,ne=3e4,M=5e3;function N(e){let t=e*.2;return e+(Math.random()*2-1)*t}function re(e,t,n,r){let i=!1,a,o,s=j,c=!1,l=!1,u,d=()=>{o!==void 0&&(clearTimeout(o),o=void 0)},p=()=>{l||(l=!0,r?.())},m=()=>{let r=new EventSource(f(`/api/events`));u=r,r.addEventListener(`sessions-updated`,t=>{try{e(JSON.parse(t.data))}catch(e){console.error(`Failed to parse session update event:`,e)}}),r.addEventListener(`scan-status`,e=>{if(t)try{t(JSON.parse(e.data))}catch(e){console.error(`Failed to parse scan status event:`,e)}}),r.onopen=()=>{d(),s=j;let e=l;l=!1,(c||e)&&n?.(),c=!0},r.onerror=()=>{if(r.readyState!==EventSource.CLOSED){o??=setTimeout(()=>{o=void 0,!i&&u===r&&p()},M);return}if(d(),r.close(),i)return;p();let e=N(s);s=Math.min(s*2,ne),a=setTimeout(m,e)}};return m(),()=>{i=!0,a!==void 0&&clearTimeout(a),d(),u?.close()}}var P=e(t(),1);function ie(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var ae=ie(`https://base-ui.com/production-error`,`Base UI`),F=P.createContext(void 0);function I(e){let t=P.useContext(F);if(!e&&t===void 0)throw Error(ae(27));return t}var L={};function R(e,t){let n=P.useRef(L);return n.current===L&&(n.current=e(t)),n}function z(e,t,n,r){let i=R(V).current;return oe(i,e,t,n,r)&&ce(i,[e,t,n,r]),i.callback}function B(e){let t=R(V).current;return se(t,e)&&ce(t,e),t.callback}function V(){return{callback:null,cleanup:null,refs:[]}}function oe(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function se(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function ce(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var le=19;function ue(e){return le>=e}function de(e){if(!P.isValidElement(e))return null;let t=e,n=t.props;return(ue(19)?n?.ref:t.ref)??null}function fe(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function pe(){}var me=Object.freeze([]),he=Object.freeze({});function ge(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function _e(e,t){return typeof e==`function`?e(t):e}function ve(e,t){return typeof e==`function`?e(t):e}var ye={};function be(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Se(t);let a=Se(e);return t&&(a=Ce(a,t)),n&&(a=Ce(a,n)),r&&(a=Ce(a,r)),i&&(a=Ce(a,i)),a}function xe(e){if(e.length===0)return ye;if(e.length===1)return Se(e[0]);let t=Se(e[0]);for(let n=1;n<e.length;n+=1)t=Ce(t,e[n]);return t}function Se(e){return De(e)?{...Oe(e,ye)}:we(e)}function Ce(e,t){return De(t)?Oe(t,e):Te(e,t)}function we(e){let t={...e};for(let e in t){let n=t[e];Ee(e,n)&&(t[e]=Ae(n))}return t}function Te(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=fe(e.style,r);break;case`className`:e[n]=Me(e.className,r);break;default:e[n]=Ee(n,r)?ke(e[n],r):r}}return e}function Ee(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function De(e){return typeof e==`function`}function Oe(e,t){return De(e)?e(t):e??ye}function ke(e,t){return t?e?(...n)=>{let r=n[0];if(Ne(r)){let i=r;je(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:Ae(t):e}function Ae(e){return e&&((...t)=>{let n=t[0];return Ne(n)&&je(n),e(...t)})}function je(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Me(e,t){return t?e?t+` `+e:t:e}function Ne(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function Pe(e,t,n={}){let r=t.render,i=Fe(t,n);return n.enabled===!1?null:Re(e,r,i,n.state??he)}function Fe(e,t={}){let{className:n,style:r,render:i}=e,{state:a=he,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?_e(n,a):void 0,d=l?ve(r,a):void 0,f=l?ge(a,c):he,p=l&&s?Ie(s):void 0,m=l?fe(f,p)??{}:he;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?B([m.ref,de(i),...o]):z(m.ref,de(i),o):z(null,null)),l?(u!==void 0&&(m.className=Me(m.className,u)),d!==void 0&&(m.style=fe(m.style,d)),m):he}function Ie(e){return Array.isArray(e)?xe(e):be(void 0,e)}var Le=Symbol.for(`react.lazy`);function Re(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=be(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===Le&&(i=P.Children.toArray(t)[0]),P.cloneElement(i,e)}if(e&&typeof e==`string`)return ze(e,n);throw Error(ae(8))}function ze(e,t){return e===`button`?(0,P.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,P.createElement)(`img`,{alt:``,...t,key:t.key}):P.createElement(e,t)}var Be=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),Ve={"data-starting-style":``},He={"data-ending-style":``},Ue={transitionStatus(e){return e===`starting`?Ve:e===`ending`?He:null}};(function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=Be.startingStyle]=`startingStyle`,e[e.endingStyle=Be.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e})({});var We={"data-popup-open":``,"data-pressed":``},Ge={"data-open":``},Ke={"data-closed":``},qe={"data-anchor-hidden":``},Je={open(e){return e?We:null}},Ye={open(e){return e?Ge:Ke},anchorHidden(e){return e?qe:null}},Xe={...Ye,...Ue},Ze=P.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=I(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return Pe(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:Xe,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})});function Qe(){return typeof window<`u`}function H(e){return tt(e)?(e.nodeName||``).toLowerCase():`#document`}function $e(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function et(e){return((tt(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function tt(e){return Qe()?e instanceof Node||e instanceof $e(e).Node:!1}function nt(e){return Qe()?e instanceof Element||e instanceof $e(e).Element:!1}function U(e){return Qe()?e instanceof HTMLElement||e instanceof $e(e).HTMLElement:!1}function rt(e){return!Qe()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof $e(e).ShadowRoot}function it(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ht(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function at(e){return/^(table|td|th)$/.test(H(e))}function ot(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var st=/transform|translate|scale|rotate|perspective|filter/,ct=/paint|layout|strict|content/,lt=e=>!!e&&e!==`none`,ut;function dt(e){let t=nt(e)?ht(e):e;return lt(t.transform)||lt(t.translate)||lt(t.scale)||lt(t.rotate)||lt(t.perspective)||!pt()&&(lt(t.backdropFilter)||lt(t.filter))||st.test(t.willChange||``)||ct.test(t.contain||``)}function ft(e){let t=_t(e);for(;U(t)&&!mt(t);){if(dt(t))return t;if(ot(t))return null;t=_t(t)}return null}function pt(){return ut??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ut}function mt(e){return/^(html|body|#document)$/.test(H(e))}function ht(e){return $e(e).getComputedStyle(e)}function gt(e){return nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _t(e){if(H(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||rt(e)&&e.host||et(e);return rt(t)?t.host:t}function vt(e){let t=_t(e);return mt(t)?(e.ownerDocument||e).body:U(t)&&it(t)?t:vt(t)}function yt(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=vt(e),i=r===e.ownerDocument?.body,a=$e(r);if(i){let e=bt(a);return t.concat(a,a.visualViewport||[],it(r)?r:[],e&&n?yt(e):[])}return t.concat(r,yt(r,[],n))}function bt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var xt={...P},St=xt.useInsertionEffect,Ct=St&&St!==xt.useLayoutEffect?St:e=>e();function W(e){let t=R(wt).current;return t.next=e,Ct(t.effect),t.trampoline}function wt(){let e={next:void 0,callback:Tt,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Tt(){}var G=typeof document<`u`?P.useLayoutEffect:()=>{},Et=P.createContext(void 0);function Dt(e=!1){let t=P.useContext(Et);if(t===void 0&&!e)throw Error(ae(16));return t}function Ot(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:P.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function K(e){return e?.ownerDocument||document}function kt(e,t,{detail:n=0}={}){e.dispatchEvent(new($e(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function At(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=P.useRef(null),s=Dt(!0),c=a??s!==void 0,{props:l}=Ot({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=P.useCallback(()=>{let e=o.current;jt(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return G(u,[u]),{getButtonProps:P.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return be({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(je(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=jt(r),s=!i&&Mt(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),kt(r,e));return}if(!l||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),kt(r,e)))},onKeyUp(e){if(!t){if(je(e),a?.(e),e.target===e.currentTarget&&i&&c&&jt(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),kt(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:W(e=>{o.current=e,u()})}}function jt(e){return U(e)&&e.tagName===`BUTTON`}function Mt(e){return U(e)&&e.tagName===`A`&&!!e.href}var Nt=`none`,Pt=`trigger-press`,Ft=`trigger-hover`,It=`trigger-focus`,Lt=`outside-press`,Rt=`item-press`,zt=`close-press`,Bt=`focus-out`,Vt=`escape-key`,Ht=`list-navigation`,Ut=`cancel-open`,Wt=`sibling-open`,Gt=`imperative-action`;function Kt(e,t,n,r){let i=!1,a=!1,o=r??he;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var qt=P.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=I(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=At({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,Kt(zt,e.nativeEvent))}return Pe(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),Jt=e(o(),1),q=r(),Yt=0;function Xt(e,t=`mui`){let[n,r]=P.useState(e),i=e||n;return P.useEffect(()=>{n??(Yt+=1,r(`${t}-${Yt}`))},[n,t]),i}var Zt=xt.useId;function Qt(e,t){if(Zt!==void 0){let n=Zt();return e??(t?`${t}-${n}`:n)}return Xt(e,t)}function $t(e){return Qt(e,`base-ui`)}function en(e){P.useEffect(e,me)}var tn=0,nn=class e{static create(){return new e}currentId=tn;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=tn,t()},e)}isStarted(){return this.currentId!==tn}clear=()=>{this.currentId!==tn&&(clearTimeout(this.currentId),this.currentId=tn)};disposeEffect=()=>this.clear};function rn(){let e=R(nn.create).current;return en(e.disposeEffect),e}function an(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:on,platform:sn,maxTouchPoints:cn}=an(),ln=on.toLowerCase(),un=sn.toLowerCase(),dn=/^i(os$|p)/.test(un)||un===`macintel`&&cn>1,fn=`android`,pn=un===fn||ln.includes(fn),mn=!dn&&un.startsWith(`mac`);un.startsWith(`win`),!pn&&/^(linux|chrome os)/.test(un);var hn=mn||dn,gn=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!gn&&ln.includes(`firefox`),!gn&&ln.includes(`chrom`);var _n=hn,vn=/jsdom|happydom/.test(ln);function yn(e){e.preventDefault(),e.stopPropagation()}function bn(e){return`nativeEvent`in e}function xn(e){return e.pointerType===``&&e.isTrusted?!0:pn&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Sn(e){return vn?!1:!pn&&e.width===0&&e.height===0||pn&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Cn(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function wn(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var Tn=`data-base-ui-focusable`,En=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Dn=`ArrowLeft`,On=`ArrowRight`,kn=`ArrowUp`,An=`ArrowDown`;function jn(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function J(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&rt(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Mn(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Nn(e,t){if(!nt(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(J(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function Pn(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Fn(e){return e.matches(`html,body`)}function In(e){return U(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Ln(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${En}`)!=null}function Rn(e){return e?e.getAttribute(`role`)===`combobox`&&In(e):!1}function zn(e){if(!e||vn)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Bn(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Y(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Vn(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function Hn(e){let t=R(Un,e).current;return t.next=e,G(t.effect),t}function Un(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Wn=null;globalThis.requestAnimationFrame;var Gn=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},Kn=class e{static create(){return new e}static request(e){return Gn.request(e)}static cancel(e){return Gn.cancel(e)}currentId=Wn;request(e){this.cancel(),this.currentId=Gn.request(()=>{this.currentId=Wn,e()})}cancel=()=>{this.currentId!==Wn&&(Gn.cancel(this.currentId),this.currentId=Wn)};disposeEffect=()=>this.cancel};function qn(){let e=R(Kn.create).current;return en(e.disposeEffect),e}var Jn={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Yn={...Jn,position:`fixed`,top:0,left:0};({...Jn});var Xn=P.forwardRef(function(e,t){let[n,r]=P.useState();G(()=>{_n&&gn&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,q.jsx)(`span`,{...e,ref:t,style:Yn,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function Zn(e,t){return t<0||t>=e.length}function Qn(e,t){return er(e.current,{disabledIndices:t})}function $n(e,t){return er(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function er(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&tr(e,a,r));return a}function tr(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!rr(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function nr(e){return e.visibility===`hidden`||e.visibility===`collapse`}function rr(e,t=e?ht(e):null){return!e||!e.isConnected||!t||nr(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var ir=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function ar(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return rt(n)?n.host:null}function or(e){for(let t of Array.from(e.children))if(H(t)===`summary`)return t;return null}function sr(e,t){let n=or(t);return!!n&&(e===n||J(n,e))}function cr(e){let t=e?H(e):``;return e!=null&&e.matches(ir)&&(t!==`summary`||e.parentElement!=null&&H(e.parentElement)===`details`&&or(e.parentElement)===e)&&(t!==`details`||or(e)==null)&&(t!==`input`||e.type!==`hidden`)}function lr(e){if(!cr(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=ar(t)){let n=t!==e,r=H(t)===`slot`;if(t.hasAttribute(`inert`)||n&&H(t)===`details`&&!t.open&&!sr(e,t)||t.hasAttribute(`hidden`)||!r&&!ur(t,n))return!1}return!0}function ur(e,t){let n=ht(e);return t?n.display!==`none`:rr(e,n)}function dr(e){let t=e.tabIndex;if(t<0){let t=H(e);if(t===`details`||t===`audio`||t===`video`||U(e)&&e.isContentEditable)return 0}return t}function fr(e){if(H(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function pr(e,t){let n=fr(e);if(!n)return!0;let r=t.find(e=>{let t=fr(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=fr(e);return t?.name===n.name&&t.form===n.form})===n}function mr(e){if(U(e)&&H(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return U(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function hr(e,t){mr(e).forEach(e=>{cr(e)&&t.push(e),hr(e,t)})}function gr(e,t,n){mr(e).forEach(e=>{U(e)&&e.matches(t)&&n.push(e),gr(e,t,n)})}function _r(e){return lr(e)&&dr(e)>=0}function vr(e){let t=[];return hr(e,t),t.filter(lr)}function yr(e){let t=vr(e);return t.filter(e=>dr(e)>=0&&pr(e,t))}function br(e,t){let n=yr(e),r=n.length;if(r===0)return;let i=jn(K(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function xr(e){return br(K(e).body,1)||e}function Sr(e){return br(K(e).body,-1)||e}function Cr(e,t){if(!e)return null;let n=yr(K(e).body),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function wr(e){return Cr(e,1)}function Tr(e){return Cr(e,-1)}function Er(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!J(n,r)}function Dr(e){yr(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Or(e){let t=[];gr(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function kr(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...kr(e,t.id,n)])}function Ar(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function jr(e){return`data-base-ui-${e}`}var Mr=0;function Nr(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Mr);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),pe;let o=requestAnimationFrame(a);return Mr=o,()=>{Mr===o&&(cancelAnimationFrame(o),Mr=0)}}var Pr={inert:new WeakMap,"aria-hidden":new WeakMap},Fr=`data-base-ui-inert`,Ir={inert:new WeakSet,"aria-hidden":new WeakSet},Lr=new WeakMap,Rr=0;function zr(e){return Ir[e]}function Br(e){return e?rt(e)?e.host:Br(e.parentNode):null}var Vr=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Br(t);return e.contains(n)?n:null}).filter(e=>e!=null),Hr=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Ur=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{H(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function Wr(e,t,n,r,{mark:i=!0}){let a=null;r?a=`inert`:n&&(a=`aria-hidden`);let o=null,s=null,c=Vr(t,e),l=i?Ur(t,Hr(c),new Set(c)):[],u=[],d=[];if(a){let e=Pr[a],n=zr(a);s=n,o=e;let r=Vr(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=c.concat(r);Ur(t,Hr(i),new Set(i)).forEach(t=>{let r=t.getAttribute(a),i=r!==null&&r!==`false`,o=(e.get(t)||0)+1;e.set(t,o),u.push(t),o===1&&i&&n.add(t),i||t.setAttribute(a,a===`inert`?``:`true`)})}return i&&l.forEach(e=>{let t=(Lr.get(e)||0)+1;Lr.set(e,t),d.push(e),t===1&&e.setAttribute(Fr,``)}),Rr+=1,()=>{o&&u.forEach(e=>{let t=(o.get(e)||0)-1;o.set(e,t),t||(!s?.has(e)&&a&&e.removeAttribute(a),s?.delete(e))}),i&&d.forEach(e=>{let t=(Lr.get(e)||0)-1;Lr.set(e,t),t||e.removeAttribute(Fr)}),--Rr,Rr||(Pr.inert=new WeakMap,Pr[`aria-hidden`]=new WeakMap,Ir.inert=new WeakSet,Ir[`aria-hidden`]=new WeakSet,Lr=new WeakMap)}}function Gr(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0}=t,a=K(e[0]).body;return Wr(e,a,n,r,{mark:i})}var Kr={style:{transition:`none`}},qr={fallbackAxisSide:`none`},Jr={fallbackAxisSide:`end`},Yr={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Xr=P.createContext(null),Zr=()=>P.useContext(Xr),Qr=jr(`portal`);function $r(e={}){let{ref:t,container:n,componentProps:r=he,elementProps:i}=e,a=Qt(),o=Zr()?.portalNode,[s,c]=P.useState(null),[l,u]=P.useState(null),d=W(e=>{e!==null&&u(e)}),f=P.useRef(null);G(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(tt(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=Pe(`div`,r,{ref:[t,d],props:[{id:a,[Qr]:``},i]}),m=s&&p?Jt.createPortal(p,s):null;return{node:l,nodeId:P.isValidElement(p)?p.props.id:void 0,subtree:m}}var ei=P.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,...s}=e,{node:c,nodeId:l,subtree:u}=$r({container:o,ref:t,componentProps:e,elementProps:s}),d=P.useRef(null),f=P.useRef(null),p=P.useRef(null),m=P.useRef(null),[h,g]=P.useState(null),_=P.useRef(!1),v=h?.modal,y=h?.open,b=!!h&&!h.modal&&h.open&&!!c;P.useEffect(()=>{if(!c||v)return;function e(e){c&&e.relatedTarget&&Er(e)&&(e.type===`focusin`?_.current&&=(Or(c),!1):(Dr(c),_.current=!0))}return Vn(Y(c,`focusin`,e,!0),Y(c,`focusout`,e,!0))},[c,v]),G(()=>{!c||y!==!0||!_.current||(Or(c),_.current=!1)},[y,c]);let x=P.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:m,portalNode:c,setFocusManagerState:g}),[c]);return(0,q.jsxs)(P.Fragment,{children:[u,(0,q.jsxs)(Xr.Provider,{value:x,children:[b&&c&&(0,q.jsx)(Xn,{"data-type":`outside`,ref:d,onFocus:e=>{Er(e,c)?p.current?.focus():Sr(h?h.domReference:null)?.focus()}}),b&&c&&(0,q.jsx)(`span`,{"aria-owns":l,style:Yr}),c&&Jt.createPortal(a,c),b&&c&&(0,q.jsx)(Xn,{"data-type":`outside`,ref:f,onFocus:e=>{Er(e,c)?m.current?.focus():(xr(h?h.domReference:null)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,Kt(`focus-out`,e.nativeEvent)))}})]})]})});function ti(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var ni=class{nodesRef={current:[]};events=ti();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},ri=P.createContext(null),ii=P.createContext(null),ai=()=>P.useContext(ri)?.id||null,oi=e=>{let t=P.useContext(ii);return e??t};function si(e){let t=Qt(),n=oi(e),r=ai();return G(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function ci(e){let{children:t,id:n}=e,r=ai();return(0,q.jsx)(ri.Provider,{value:P.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function li(e){let{children:t,externalTree:n}=e,r=R(()=>n??new ni).current;return(0,q.jsx)(ii.Provider,{value:r,children:t})}function ui(e){return e==null?e:`current`in e?e.current:e}function di(e,t){let n=$e(Mn(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var fi=20,pi=[];function mi(){pi=pi.filter(e=>e.deref()?.isConnected)}function hi(e){mi(),e&&H(e)!==`body`&&(pi.push(new WeakRef(e)),pi.length>fi&&(pi=pi.slice(-20)))}function gi(){return mi(),pi[pi.length-1]?.deref()}function _i(e){return e?_r(e)?e:yr(e)[0]||e:null}function vi(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=vr(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return _r(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function yi(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:b}=h.context,x=W(()=>b.current.floatingContext?.nodeId),S=i===!1,C=Rn(_)&&S,w=Hn(i),T=Hn(a),ee=Hn(l),te=Hn(g),E=oi(p),D=Zr(),O=P.useRef(!1),k=P.useRef(!1),A=P.useRef(!1),j=P.useRef(null),ne=P.useRef(``),M=P.useRef(``),N=P.useRef(null),re=P.useRef(null),ie=z(N,f,D?.beforeInsideRef),ae=z(re,D?.afterInsideRef),F=rn(),I=rn(),L=qn(),R=D!=null,B=Bn(v),V=W((e=B)=>e?yr(e):[]),oe=W(()=>m?.().filter(e=>e!=null)??[]);P.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&J(B,jn(K(B)))&&V().length===0&&!C&&yn(e)}return Y(K(B),`keydown`,e)},[r,B,s,C,V]),P.useEffect(()=>{if(r||!g)return;let e=K(B);function t(){A.current=!1}function n(e){let t=Mn(e),n=oe(),r=J(v,t)||J(_,t)||J(D?.portalNode,t)||n.some(e=>e===t||J(e,t));A.current=!r,M.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(k.current=!0,I.start(0,()=>{k.current=!1}))}function i(){M.current=`keyboard`}return Vn(Y(e,`pointerdown`,n,!0),Y(e,`pointerup`,t,!0),Y(e,`pointercancel`,t,!0),Y(e,`keydown`,i,!0),t)},[r,v,_,B,g,D,I,oe]),P.useEffect(()=>{if(r||!c)return;let e=K(B);function t(){k.current=!0,I.start(0,()=>{k.current=!1})}function n(e){let t=Mn(e);_r(t)&&(j.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=Mn(t);s&&n==null&&i!=null&&J(v,i)&&hi(i),queueMicrotask(()=>{let a=x(),c=h.context.triggerElements,l=oe(),f=n?.hasAttribute(jr(`focus-guard`))&&[N.current,re.current,D?.beforeInsideRef.current,D?.afterInsideRef.current,D?.beforeOutsideRef.current,D?.afterOutsideRef.current,ui(d),ui(u)].includes(n),p=!(J(_,n)||J(v,n)||J(n,v)||J(D?.portalNode,n)||l.some(e=>e===n||J(e,n))||c.hasMatchingElement(e=>J(e,n))||f||E&&(kr(E.nodesRef.current,a).find(e=>J(e.context?.elements.floating,n)||J(e.context?.elements.domReference,n))||Ar(E.nodesRef.current,a).find(e=>[e.context?.elements.floating,Bn(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&B&&vi(B),o&&r!==_&&!rr(i)&&jn(e)===e.body){if(U(B)&&(B.focus(),o===`popup`)){L.request(()=>{B.focus()});return}let e=V(),t=j.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||B;U(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!s)&&n&&p&&!k.current&&(C||n!==gi())&&(O.current=!0,h.setOpen(!1,Kt(Bt,t)))})}function a(){A.current||(b.current.insideReactTree=!0,F.start(0,()=>{b.current.insideReactTree=!1}))}let l=U(_)?_:null;if(!(!v&&!l))return Vn(l&&Y(l,`focusout`,i),l&&Y(l,`pointerdown`,t),v&&Y(v,`focusin`,n),v&&Y(v,`focusout`,i),v&&D&&Y(v,`focusout`,a,!0))},[r,_,v,B,s,E,D,h,c,o,V,C,x,b,F,I,L,u,d,oe]),P.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(D?.portalNode?.querySelectorAll(`[${jr(`portal`)}]`)||[]),t=(E?Ar(E.nodesRef.current,x()):[]).find(e=>Rn(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Gr([v,...e,N.current,re.current,D?.beforeOutsideRef.current,D?.afterOutsideRef.current,...oe(),t,ui(d),ui(u),C?_:null].filter(e=>e!=null),{ariaHidden:s||C,mark:!1}),i=Gr([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,D,C,E,x,u,d,oe]),G(()=>{if(!g||r||!U(B))return;ne.current=``,M.current=``;let e=K(B),t=jn(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(ee.current||``):n;if(r===void 0||r===!1||J(B,t))return;let i=null,a=()=>(i??=V(B),i[0]||B),o;o=r===!0||r===null?a():ui(r),o||=a();let s=J(B,jn(e));Nr(o,{preventScroll:o===B,shouldFocus(){if(!te.current)return!1;if(s)return!0;let t=jn(e);return!(t!==o&&J(B,t))}})})},[r,g,B,V,w,ee,te]),G(()=>{if(r||!B)return;let e=K(B),t=jn(e),n=ee.current==null;hi(t);function i(e){if(e.open||(ne.current=di(e.nativeEvent,M.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(O.current=!0),e.reason===`outside-press`){if(e.nested)O.current=!1;else if(xn(e.nativeEvent)||Sn(e.nativeEvent))O.current=!1;else{let e=!1;K(B).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?O.current=!1:O.current=!0}}}y.on(`openchange`,i);function a(e){let r=T.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&H(t)!==`body`?t:null,s=n?o||a:a||o;return s||=gi()||null,typeof i==`boolean`?s:ui(i)||s||null}return()=>{y.off(`openchange`,i);let t=jn(e),n=oe(),r=J(v,t)||n.some(e=>e===t||J(e,t))||E&&kr(E.nodesRef.current,x(),!1).some(e=>J(e.context?.elements.floating,t)),o=T.current,s=ne.current,c=a(s);queueMicrotask(()=>{let n=_i(c),i=typeof o!=`boolean`;if(o&&!O.current&&U(n)&&(!(!i&&n!==t&&t!==e.body)||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}O.current=!1})}},[r,v,B,T,ee,y,E,_,x,oe]),G(()=>{if(!gn||g||!v)return;let e=jn(K(v));!U(e)||!In(e)||J(v,e)&&e.blur()},[g,v]),G(()=>{if(!(r||!D))return D.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{D.setFocusManagerState(null)}},[r,D,s,g,h,c,_]),G(()=>{if(!(r||!B))return vi(B),()=>{queueMicrotask(mi)}},[r,B]);let se=!r&&(!s||!C)&&(R||s);return(0,q.jsxs)(P.Fragment,{children:[se&&(0,q.jsx)(Xn,{"data-type":`inside`,ref:ie,onFocus:e=>{if(s){let e=V();Nr(e[e.length-1])}else D?.portalNode&&(O.current=!1,Er(e,D.portalNode)?xr(_)?.focus():ui(d??D.beforeOutsideRef)?.focus())}}),n,se&&(0,q.jsx)(Xn,{"data-type":`inside`,ref:ae,onFocus:e=>{s?Nr(V()[0]):D?.portalNode&&(c&&(O.current=!0),Er(e,D.portalNode)?Sr(_)?.focus():ui(u??D.afterOutsideRef)?.focus())}})]})}function bi(){return!1}function xi(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Si(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=bi,bubbles:s,externalTree:c}=t,l=`rootStore`in e?e.rootStore:e,u=l.useState(`open`),d=l.useState(`floatingElement`),{dataRef:f}=l.context,p=oi(c),m=W(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=W(()=>a),{escapeKey:v,outsidePress:y}=xi(s),b=P.useRef(!1),x=P.useRef(!1),S=P.useRef(!1),C=P.useRef(!1),w=P.useRef(``),T=P.useRef(null),ee=rn(),te=rn(),E=W(()=>{te.clear(),f.current.insideReactTree=!1}),D=W(e=>{let t=f.current.floatingContext?.nodeId;return(p?kr(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),O=W(e=>Pn(e,l.select(`floatingElement`))||Pn(e,l.select(`domReferenceElement`))),k=W(e=>{o()&&l.setOpen(!1,Kt(Pt,e.nativeEvent))}),A=W(e=>{if(!u||!n||!r||e.key!==`Escape`||C.current||!v&&D(`__escapeKeyBubbles`))return;let t=Kt(Vt,bn(e)?e.nativeEvent:e);l.setOpen(!1,t),t.isCanceled||e.preventDefault(),!v&&!t.isPropagationAllowed&&e.stopPropagation()}),j=W(()=>{f.current.insideReactTree=!0,te.start(0,E)}),ne=W(e=>{if(!u||!n||e.button!==0)return;let t=Mn(e.nativeEvent);J(l.select(`floatingElement`),t)&&(b.current||(b.current=!0,x.current=!1))}),M=W(e=>{!u||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});P.useEffect(()=>{if(!u||!n)return E;f.current.__escapeKeyBubbles=v,f.current.__outsidePressBubbles=y;let e=new nn,t=new nn;function i(){e.clear(),C.current=!0}function a(){e.start(gn?5:0,()=>{C.current=!1})}function o(){S.current=!0,t.start(0,()=>{S.current=!1})}function s(){b.current=!1,x.current=!1}function c(){let e=w.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=c();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function te(e){let t=f.current.floatingContext?.nodeId,n=p&&kr(p.nodesRef.current,t).some(t=>Pn(e,t.context?.elements.floating));return O(e)||n}function k(e){if(m(e)){e.type!==`click`&&!O(e)&&(t.clear(),S.current=!1),E();return}if(f.current.insideReactTree){E();return}let n=Mn(e),r=`[${jr(`inert`)}]`,i=nt(n)?n.getRootNode():null,a=Array.from((rt(i)?i:K(l.select(`floatingElement`))).querySelectorAll(r)),o=l.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>J(e,n))))return;let s=nt(n)?n:null;for(;s&&!mt(s);){let e=_t(s);if(mt(e)||!nt(e))break;s=e}if(!(a.length&&nt(n)&&!Fn(n)&&!J(n,l.select(`floatingElement`))&&a.every(e=>!J(s,e)))){if(U(n)&&!(`touches`in e)){let t=mt(n),r=ht(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!te(e)){if(c()===`intentional`&&S.current){t.clear(),S.current=!1;return}typeof h==`function`&&!h(e)||D(`__outsidePressBubbles`)||(l.setOpen(!1,Kt(Lt,e)),E())}}}function j(e){c()!==`sloppy`||e.pointerType===`touch`||!l.select(`open`)||!n||O(e)||k(e)}function ne(e){if(c()!==`sloppy`||!l.select(`open`)||!n||O(e))return;let t=e.touches[0];t&&(T.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},ee.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}function M(e,t){let n=Mn(e);if(!n)return;let r=Y(n,e.type,()=>{t(e),r()})}function N(e){w.current=`touch`,M(e,ne)}function re(e){ee.clear(),e.type===`pointerdown`&&(w.current=e.pointerType),!(e.type===`mousedown`&&T.current&&!T.current.dismissOnMouseDown)&&M(e,e=>{e.type===`pointerdown`?j(e):k(e)})}function P(e){if(!b.current)return;let n=x.current;if(s(),c()===`intentional`){if(e.type===`pointercancel`){n&&o();return}if(!te(e)){if(n){o();return}typeof h==`function`&&!h(e)||(t.clear(),S.current=!0,E())}}}function ie(e){if(c()!==`sloppy`||!T.current||O(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-T.current.startX),r=Math.abs(t.clientY-T.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(T.current.dismissOnTouchEnd=!0),i>10&&(k(e),ee.clear(),T.current=null)}function ae(e){M(e,ie)}function F(e){c()!==`sloppy`||!T.current||O(e)||(T.current.dismissOnTouchEnd&&k(e),ee.clear(),T.current=null)}function I(e){M(e,F)}let L=K(d),R=Vn(r&&Vn(Y(L,`keydown`,A),Y(L,`compositionstart`,i),Y(L,`compositionend`,a)),g&&Vn(Y(L,`click`,re,!0),Y(L,`pointerdown`,re,!0),Y(L,`pointerup`,P,!0),Y(L,`pointercancel`,P,!0),Y(L,`mousedown`,re,!0),Y(L,`mouseup`,P,!0),Y(L,`touchstart`,N,!0),Y(L,`touchmove`,ae,!0),Y(L,`touchend`,I,!0)));return()=>{R(),e.clear(),t.clear(),s(),S.current=!1,E()}},[f,d,r,g,h,u,n,v,y,A,E,_,D,O,p,l,ee]);let N=P.useMemo(()=>({onKeyDown:A,onPointerDown:k,onClick:k}),[A,k]),re=P.useMemo(()=>({onKeyDown:A,onPointerDown:M,onMouseDown:M,onClickCapture:j,onMouseDownCapture(e){j(),ne(e)},onPointerDownCapture(e){j(),ne(e)},onMouseUpCapture:j,onTouchEndCapture:j,onTouchMoveCapture:j}),[A,j,ne,M]);return P.useMemo(()=>n?{reference:N,floating:re,trigger:N}:{},[n,N,re])}var Ci=n((e=>{var n=t();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),wi=n(((e,t)=>{t.exports=Ci()})),Ti=n((e=>{var n=t(),r=wi();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=r.useSyncExternalStore,s=n.useRef,c=n.useEffect,l=n.useMemo,u=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Ei=n(((e,t)=>{t.exports=Ti()})),Di=wi(),Oi=Ei(),ki=[],Ai=void 0;function ji(){return Ai}function Mi(e){ki.push(e)}function Ni(e){let t=(t,n)=>{let r=R(Fi).current,i;try{Ai=r;for(let e of ki)e.before(r);i=e(t,n);for(let e of ki)e.after(r);r.didInitialize=!0}finally{Ai=void 0}return i};return t.displayName=e.displayName||e.name,t}function Pi(e){return P.forwardRef(Ni(e))}function Fi(){return{didInitialize:!1}}var Ii=ue(19)?zi:Bi;function Li(e,t,n,r,i){return Ii(e,t,n,r,i)}function Ri(e,t,n,r,i){let a=P.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Di.useSyncExternalStore)(e.subscribe,a,a)}Mi({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Di.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function zi(e,t,n,r,i){let a=ji();if(!a)return Ri(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Bi(e,t,n,r,i){return(0,Oi.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Vi=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Li(this,e,t,n,r)}},Hi=class extends Vi{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){P.useDebugValue(e);let n=this;G(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;G(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;G(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){P.useDebugValue(e);let n=this,r=t!==void 0;G(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return P.useDebugValue(e),Li(this,this.selectors[e],t,n,r)}useContextCallback(e,t){P.useDebugValue(e);let n=W(t??pe);this.context[e]=n}useStateSetter(e){let t=P.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},Ui={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},Wi=class extends Hi{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:ti(),nested:n,triggerElements:i},Ui),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&wn(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Gi(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=P.useRef(null);r===void 0&&f.current===null&&(f.current=new Wi({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r??f.current;return t.useSyncedValue(`floatingId`,i),G(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};nt(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}function Ki(e,t=!1,n=!1){let[r,i]=P.useState(e&&t?`idle`:void 0),[a,o]=P.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),G(()=>{if(!e&&a&&r!==`ending`&&n){let e=Kn.request(()=>{i(`ending`)});return()=>{Kn.cancel(e)}}},[e,a,r,n]),G(()=>{if(!e||t)return;let n=Kn.request(()=>{i(void 0)});return()=>{Kn.cancel(n)}},[t,e]),G(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=Kn.request(()=>{i(`idle`)});return()=>{Kn.cancel(n)}},[t,e,a,r]),{mounted:a,setMounted:o,transitionStatus:r}}function qi(e,t=!1){let n=qn();return W((r,i=null)=>{n.cancel();let a=ui(e);if(a==null)return;let o=a,s=()=>{Jt.flushSync(r)};if(typeof o.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){r();return}function c(){Promise.all(o.getAnimations().map(e=>e.finished)).then(()=>{i?.aborted||s()},()=>{if(!i?.aborted){if(o.getAnimations().some(e=>e.pending||e.playState!==`finished`)){c();return}s()}})}if(t){let e=`data-starting-style`;if(!o.hasAttribute(e)){n.request(c);return}let t=new MutationObserver(()=>{o.hasAttribute(e)||(t.disconnect(),c())});t.observe(o,{attributes:!0,attributeFilter:[e]}),i?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}n.request(c)})}function Ji(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=W(i),o=qi(r,n);P.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}var Yi={tabIndex:-1,[Tn]:``};function Xi(e){return t=>t!==`touch`||e.current}function Zi(e,t=!1){let n=Qt(),r=ai()!=null,i=R(()=>e(n,r)).current;return Gi({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function Qi({handle:e,store:t}){return G(()=>e.attachStore(t),[e,t]),null}function $i(e,t){let n=P.useRef(null),r=P.useRef(null);return P.useCallback(i=>{if(e===void 0)return;let a=!1;if(n.current!==null){let e=n.current,i=r.current,o=t.context.triggerElements.getById(e);i&&o===i&&(t.context.triggerElements.delete(e),a=!0),n.current=null,r.current=null}if(i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i),a=!0),a){let e=t.context.triggerElements.size;t.select(`open`)&&t.state.triggerCount!==e&&t.set(`triggerCount`,e)}},[t,e])}function ea(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);let i=n?.id??null;(i||t)&&(e.activeTriggerId=i,e.activeTriggerElement=n??null)}function ta(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function na(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=$i(e,n),o=W(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){n.update({activeTriggerElement:t,...i?r:null});return}a==null&&i&&n.update({activeTriggerId:e,activeTriggerElement:t,...r})}),s=P.useCallback(e=>{a(e),e&&o(e)},[a,o]);return G(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function ra(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=P.useRef(null),i=e.useState(`open`);G(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=Kt(Nt);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function ia(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=Ki(e),o=t.useState(`preventUnmountingOnClose`),s=!e&&o;t.useSyncedValues({mounted:r,transitionStatus:a,preventUnmountingOnClose:s});let c=W(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return Ji({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:a}}function aa(e,t){e.useSyncedValues(t),G(()=>()=>{e.update({activeTriggerProps:he,inactiveTriggerProps:he,popupProps:he})},[e])}function oa(e,t){G(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),G(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var sa=class{constructor(){this.idMap=new Map}add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}};function ca(){return new Wi({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new sa,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function la(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:ca(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:he,inactiveTriggerProps:he,popupProps:he}}function ua(e,t,n=!1){return new Wi({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}var da=e=>e.triggerIdProp??e.activeTriggerId,fa=e=>e.openProp??e.open,pa=e=>(e.popupElement?.id??e.floatingId)||void 0;function ma(e,t){return t!==void 0&&fa(e)&&da(e)===t}function ha(e,t){return ma(e,t)?!0:t!==void 0&&fa(e)&&da(e)==null&&e.triggerCount===1}var ga={open:fa,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:da,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:pa,isTriggerActive:(e,t)=>t!==void 0&&da(e)===t,isOpenedByTrigger:(e,t)=>ma(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&da(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>ha(e,t)?pa(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement},_a=P.createContext(void 0);function va(){let e=P.useContext(_a);if(e===void 0)throw Error(ae(26));return e}var ya=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),ba={...Ye,...Ue,nestedDialogOpen(e){return e?{"data-nested-dialog-open":``}:null}},xa=P.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=I(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`);va(),Ji({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?Xi(c.context.popupRef):o,w=g>0,T=c.useStateSetter(`popupElement`),ee=Pe(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...Yi,hidden:!m,onKeyDown(e){ya.has(e.key)&&e.stopPropagation()},style:{"--nested-dialogs":g}},s],ref:[t,c.context.popupRef,T],stateAttributesMapping:ba});return(0,q.jsx)(yi,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:ee})});function Sa(e){return ue(19)?e:e?`true`:void 0}var Ca=P.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,q.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),wa=P.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=I(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,q.jsx)(_a.Provider,{value:n,children:(0,q.jsxs)(ei,{ref:t,...r,children:[a&&o===!0&&(0,q.jsx)(Ca,{ref:i.context.internalBackdropRef,inert:Sa(!s)}),e.children]})}):null}),Ta={},Ea={},Da=``;function Oa(e,t){return it(e)?e:t}function ka(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Oa(t,n)).overflowY)}function Aa(e){if(typeof document>`u`)return!1;let t=K(e);return $e(t).innerWidth-t.documentElement.clientWidth>0}function ja(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=K(e),n=t.documentElement,r=t.body,i=Oa(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Ma(e){let t=K(e),n=t.documentElement,r=t.body,i=Oa(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Na(e){let t=K(e),n=t.documentElement,r=t.body,i=$e(n),a=0,o=0,s=!1,c=Kn.create();if(gn&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Ta={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Da=n.style.scrollBehavior,Ea={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Oa(n,r);if(s=ja(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,Ta),Object.assign(r.style,Ea),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Da)}function d(){u(),c.request(l)}l();let f=Y(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Pa=new class{lockCount=0;restore=null;timeoutLock=nn.create();timeoutUnlock=nn.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=K(e),n=t.documentElement,r=t.body,i=$e(n);if(ka(i,n,r)){let t=new i.MutationObserver(()=>{ka(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=dn||!Aa(e);this.restore=a?Ma(e):Na(e)}};function Fa(e=!0,t=null){G(()=>{if(e)return Pa.acquire(t)},[e,t])}function Ia({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`disablePointerDismissal`),a=e.useState(`modal`),o=e.useState(`popupElement`),s=e.useState(`floatingRootContext`),[c,l]=P.useState(0),[u,d]=P.useState(0),f=c===0,p=Si(s,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:a===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=Mn(t);if(f&&!i){if(a){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||J(n,o)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:f});return Fa(r&&a===!0,o),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{l(e),d(t)}),G(()=>(t?.onNestedDialogOpen&&(r?t.onNestedDialogOpen(c+1,u+ +!!n):t.onNestedDialogOpen(0,0)),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,c,u,t]),aa(e,{activeTriggerProps:p.reference,inactiveTriggerProps:p.trigger,popupProps:p.floating,nestedOpenDialogCount:c,nestedOpenDrawerCount:u}),null}var La={...ga,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},Ra=class extends Hi{constructor(e,t,n){let r=new sa,i=za(e,r,t,n);super(i,Ba(r),La)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};ea(n,e,t.trigger),this.update(n)}};function za(e,t,n,r=!1){let i={...la(),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e};return i.floatingRootContext=ua(t,n,r),i}function Ba(e){return{popupRef:P.createRef(),backdropRef:P.createRef(),internalBackdropRef:P.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Va(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=I(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},b=Zi((e,t)=>new Ra({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`);oa(b,x),ra(b);let{forceUnmount:w}=ia(x,b);P.useImperativeHandle(l,()=>({unmount:w,close:()=>b.setOpen(!1,Kt(Gt))}),[w,b]);let T=x||S;return(0,q.jsxs)(F.Provider,{value:b,children:[u&&(0,q.jsx)(Qi,{handle:u,store:b}),T&&(0,q.jsx)(Ia,{store:b,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})}function Ha(e){return Va(`dialog`,e)}var Ua=P.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=I(),c=$t(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),Pe(`h2`,e,{ref:t,props:[{id:c},o]})});function Wa(e){if(!e)return`unknown`;let t=Date.now()-e;if(Number.isNaN(t)||t<0)return`just now`;let n=Math.floor(t/6e4);if(n<1)return`just now`;if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function Ga(e){return e.toLocaleString(`en-US`)}function Ka(e){return e===0?`$0.00`:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}function qa(e){if(e===`recorded`)return`recorded`;if(e===`estimated`)return`estimated`}function Ja(e){return e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function Ya(e){return Math.round(e).toLocaleString(`en-US`)}function Xa(e){return e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:Ya(e)}function Za(e){return`$${e.toLocaleString(`en-US`,{minimumFractionDigits:2,maximumFractionDigits:2})}`}function Qa(e){let t=Math.abs(e);return t>=1e6?`$${(e/1e6).toFixed(2)}M`:t>=1e3?`$${(e/1e3).toFixed(2)}k`:Za(e)}function $a(e,t){if(!Number.isFinite(e)||!Number.isFinite(t)||t<=0)return null;let n=(e-t)/t;return`${n<0?`▼`:`▲`} ${Math.round(Math.abs(n)*100)}%`}function eo(e,t=Date.now()){let n=t-e;if(n<6e4)return`just now`;let r=Math.floor(n/6e4);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=new Date(t);a.setDate(a.getDate()-1);let o=new Date(e);return io(o,a)?`Yesterday`:to(o.getTime())}function to(e){if(typeof e==`string`){let t=/^(\d{4})-(\d{2})-(\d{2})/.exec(e);if(t)return`${t[2]}-${t[3]}`}let t=new Date(e);return Number.isNaN(t.getTime())?``:`${ao(t.getMonth()+1)}-${ao(t.getDate())}`}function no(e){if(!Number.isFinite(e))return``;let t=new Date(e);return`${ao(t.getHours())}:${ao(t.getMinutes())}`}function ro(e){return Number.isFinite(e)?`${Math.round(e*100)}%`:`0%`}function io(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function ao(e){return String(e).padStart(2,`0`)}function oo(e){if(e==null||typeof e==`number`&&(!Number.isFinite(e)||e<=0))return null;let t=null;if(typeof e==`number`){let n=e<10**12?e*1e3:e;t=new Date(n)}else if(typeof e==`string`&&e.trim()){let n=Number(e);t=Number.isFinite(n)&&n>0?new Date(n<10**12?n*1e3:n):Number.isFinite(n)?null:new Date(e)}return!t||Number.isNaN(t.getTime())?null:t.toLocaleTimeString(`en-US`,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!0})}function so({icon:e,iconColored:t,alt:n,className:r}){if(t)return(0,q.jsx)(`img`,{src:e,alt:n,className:r});let i=`url("${e}") center / contain no-repeat`;return(0,q.jsx)(`span`,{role:`img`,"aria-label":n,className:`inline-block bg-current ${r??``}`,style:{mask:i,WebkitMask:i}})}function co(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=co(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function lo(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=co(e))&&(r&&(r+=` `),r+=t);return r}var uo=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},fo=(e,t)=>({classGroupId:e,validator:t}),po=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),mo=`-`,ho=[],go=`arbitrary..`,_o=e=>{let t=bo(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return yo(e);let n=e.split(mo);return vo(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?uo(i,t):t:i||ho}return n[e]||ho}}},vo=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=vo(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(mo):e.slice(t).join(mo),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},yo=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?go+r:void 0})(),bo=e=>{let{theme:t,classGroups:n}=e;return xo(n,t)},xo=(e,t)=>{let n=po();for(let r in e){let i=e[r];So(i,n,r,t)}return n},So=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Co(i,t,n,r)}},Co=(e,t,n,r)=>{if(typeof e==`string`){wo(e,t,n);return}if(typeof e==`function`){To(e,t,n,r);return}Eo(e,t,n,r)},wo=(e,t,n)=>{let r=e===``?t:Do(t,e);r.classGroupId=n},To=(e,t,n,r)=>{if(Oo(e)){So(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(fo(n,e))},Eo=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];So(o,Do(t,a),n,r)}},Do=(e,t)=>{let n=e,r=t.split(mo),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=po(),n.nextPart.set(t,i)),n=i}return n},Oo=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,ko=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Ao=`!`,jo=`:`,Mo=[],No=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Po=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===jo){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Ao)?(c=s.slice(0,-1),l=!0):s.startsWith(Ao)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return No(t,l,c,u)};if(t){let e=t+jo,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):No(Mo,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Fo=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Io=e=>({cache:ko(e.cacheSize),parseClassName:Po(e),sortModifiers:Fo(e),postfixLookupClassGroupIds:Lo(e),..._o(e)}),Lo=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Ro=/\s+/,zo=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Ro),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Ao:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Bo=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Vo(n))&&(i&&(i+=` `),i+=r);return i},Vo=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Vo(e[r]))&&(n&&(n+=` `),n+=t);return n},Ho=(e,...t)=>{let n,r,i,a,o=o=>(n=Io(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=zo(e,n);return i(e,a),a};return a=o,(...e)=>a(Bo(...e))},Uo=[],X=e=>{let t=t=>t[e]||Uo;return t.isThemeGetter=!0,t},Wo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Go=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ko=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,qo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Jo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Yo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Xo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qo=e=>Ko.test(e),Z=e=>!!e&&!Number.isNaN(Number(e)),$o=e=>!!e&&Number.isInteger(Number(e)),es=e=>e.endsWith(`%`)&&Z(e.slice(0,-1)),ts=e=>qo.test(e),ns=()=>!0,rs=e=>Jo.test(e)&&!Yo.test(e),is=()=>!1,as=e=>Xo.test(e),os=e=>Zo.test(e),ss=e=>!Q(e)&&!$(e),cs=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),ls=e=>ws(e,Os,is),Q=e=>Wo.test(e),us=e=>ws(e,ks,rs),ds=e=>ws(e,As,Z),fs=e=>ws(e,Ms,ns),ps=e=>ws(e,js,is),ms=e=>ws(e,Es,is),hs=e=>ws(e,Ds,os),gs=e=>ws(e,Ns,as),$=e=>Go.test(e),_s=e=>Ts(e,ks),vs=e=>Ts(e,js),ys=e=>Ts(e,Es),bs=e=>Ts(e,Os),xs=e=>Ts(e,Ds),Ss=e=>Ts(e,Ns,!0),Cs=e=>Ts(e,Ms,!0),ws=(e,t,n)=>{let r=Wo.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ts=(e,t,n=!1)=>{let r=Go.exec(e);return r?r[1]?t(r[1]):n:!1},Es=e=>e===`position`||e===`percentage`,Ds=e=>e===`image`||e===`url`,Os=e=>e===`length`||e===`size`||e===`bg-size`,ks=e=>e===`length`,As=e=>e===`number`,js=e=>e===`family-name`,Ms=e=>e===`number`||e===`weight`,Ns=e=>e===`shadow`,Ps=Ho(()=>{let e=X(`color`),t=X(`font`),n=X(`text`),r=X(`font-weight`),i=X(`tracking`),a=X(`leading`),o=X(`breakpoint`),s=X(`container`),c=X(`spacing`),l=X(`radius`),u=X(`shadow`),d=X(`inset-shadow`),f=X(`text-shadow`),p=X(`drop-shadow`),m=X(`blur`),h=X(`perspective`),g=X(`aspect`),_=X(`ease`),v=X(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),$,Q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[$,Q,c],T=()=>[Qo,`full`,`auto`,...w()],ee=()=>[$o,`none`,`subgrid`,$,Q],te=()=>[`auto`,{span:[`full`,$o,$,Q]},$o,$,Q],E=()=>[$o,`auto`,$,Q],D=()=>[`auto`,`min`,`max`,`fr`,$,Q],O=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],k=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],A=()=>[`auto`,...w()],j=()=>[Qo,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ne=()=>[Qo,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],M=()=>[Qo,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[e,$,Q],re=()=>[...b(),ys,ms,{position:[$,Q]}],P=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ie=()=>[`auto`,`cover`,`contain`,bs,ls,{size:[$,Q]}],ae=()=>[es,_s,us],F=()=>[``,`none`,`full`,l,$,Q],I=()=>[``,Z,_s,us],L=()=>[`solid`,`dashed`,`dotted`,`double`],R=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],z=()=>[Z,es,ys,ms],B=()=>[``,`none`,m,$,Q],V=()=>[`none`,Z,$,Q],oe=()=>[`none`,Z,$,Q],se=()=>[Z,$,Q],ce=()=>[Qo,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[ts],breakpoint:[ts],color:[ns],container:[ts],"drop-shadow":[ts],ease:[`in`,`out`,`in-out`],font:[ss],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[ts],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[ts],shadow:[ts],spacing:[`px`,Z],text:[ts],"text-shadow":[ts],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Qo,Q,$,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,$,Q]}],"container-named":[cs],columns:[{columns:[Z,Q,$,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[$o,`auto`,$,Q]}],basis:[{basis:[Qo,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Z,Qo,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,Z,$,Q]}],shrink:[{shrink:[``,Z,$,Q]}],order:[{order:[$o,`first`,`last`,`none`,$,Q]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...O(),`normal`]}],"justify-items":[{"justify-items":[...k(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...k()]}],"align-content":[{content:[`normal`,...O()]}],"align-items":[{items:[...k(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...k(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...k(),`baseline`]}],"place-self":[{"place-self":[`auto`,...k()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:j()}],"inline-size":[{inline:[`auto`,...ne()]}],"min-inline-size":[{"min-inline":[`auto`,...ne()]}],"max-inline-size":[{"max-inline":[`none`,...ne()]}],"block-size":[{block:[`auto`,...M()]}],"min-block-size":[{"min-block":[`auto`,...M()]}],"max-block-size":[{"max-block":[`none`,...M()]}],w:[{w:[s,`screen`,...j()]}],"min-w":[{"min-w":[s,`screen`,`none`,...j()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...j()]}],h:[{h:[`screen`,`lh`,...j()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...j()]}],"max-h":[{"max-h":[`screen`,`lh`,...j()]}],"font-size":[{text:[`base`,n,_s,us]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Cs,fs]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,es,Q]}],"font-family":[{font:[vs,ps,t]}],"font-features":[{"font-features":[Q]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,$,Q]}],"line-clamp":[{"line-clamp":[Z,`none`,$,ds]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,$,Q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,$,Q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...L(),`wavy`]}],"text-decoration-thickness":[{decoration:[Z,`from-font`,`auto`,$,us]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[Z,`auto`,$,Q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[$o,$,Q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,$,Q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,$,Q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},$o,$,Q],radial:[``,$,Q],conic:[$o,$,Q]},xs,hs]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...L(),`hidden`,`none`]}],"divide-style":[{divide:[...L(),`hidden`,`none`]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...L(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Z,$,Q]}],"outline-w":[{outline:[``,Z,_s,us]}],"outline-color":[{outline:N()}],shadow:[{shadow:[``,`none`,u,Ss,gs]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ss,gs]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[Z,us]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":[`none`,f,Ss,gs]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[Z,$,Q]}],"mix-blend":[{"mix-blend":[...R(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":R()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:B()}],brightness:[{brightness:[Z,$,Q]}],contrast:[{contrast:[Z,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Ss,gs]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:[``,Z,$,Q]}],"hue-rotate":[{"hue-rotate":[Z,$,Q]}],invert:[{invert:[``,Z,$,Q]}],saturate:[{saturate:[Z,$,Q]}],sepia:[{sepia:[``,Z,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":B()}],"backdrop-brightness":[{"backdrop-brightness":[Z,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[Z,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Z,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,Z,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[Z,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[Z,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,Z,$,Q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,$,Q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Z,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[Z,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:V()}],"rotate-x":[{"rotate-x":V()}],"rotate-y":[{"rotate-y":V()}],"rotate-z":[{"rotate-z":V()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":[`scale-3d`],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":[`translate-none`],zoom:[{zoom:[$o,$,Q]}],accent:[{accent:N()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,$,Q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":N()}],"scrollbar-track-color":[{"scrollbar-track":N()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,$,Q]}],fill:[{fill:[`none`,...N()]}],"stroke-w":[{stroke:[Z,_s,us,ds]}],stroke:[{stroke:[`none`,...N()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Fs(...e){return Ps(lo(e))}export{Kr as $,A as $n,Ht as $t,Qi as A,Xe as An,Dn as At,Hi as B,D as Bn,mn as Bt,Sa as C,mt as Cn,Rn as Ct,ga as D,pt as Dn,J as Dt,la as E,ot as En,jn as Et,aa as F,he as Fn,Sn as Ft,yi as G,w as Gn,Qt as Gt,Pi as H,b as Hn,rn as Ht,na as I,pe as In,yn as It,si as J,T as Jn,Ut as Jt,ci as K,x as Kn,qt as Kt,Ji as L,z as Ln,vn as Lt,ea as M,Pe as Mn,kn as Mt,ra as N,be as Nn,Cn as Nt,sa as O,Ze as On,Mn as Ot,ia as P,me as Pn,xn as Pt,ei as Q,u as Qn,Rt as Qt,qi as R,R as Rn,gn as Rt,Ca as S,U as Sn,Nn as St,ya as T,at as Tn,zn as Tt,wi as U,ee as Un,en as Ut,Ni as V,k as Vn,nn as Vt,Si as W,_ as Wn,$t as Wt,oi as X,S as Xn,Bt as Xt,ai as Y,C as Yn,Vt as Yt,ni as Z,E as Zn,Gt as Zt,Qa as _,yt as _n,Hn as _t,qa as a,At as an,xr as at,Fa as b,dt as bn,Bn as bt,oo as c,Dt as cn,Er as ct,Ga as d,ht as dn,Qn as dt,Lt as en,re as er,qr as et,ro as f,ft as fn,rr as ft,Za as g,gt as gn,qn as gt,Ja as h,H as hn,Xn as ht,Xa as i,Pt as in,kr as it,ta as j,Je as jn,On as jt,Yi as k,Ye as kn,An as kt,Ka as l,G as ln,er as lt,Wa as m,bt as mn,tr as mt,so as n,It as nn,O as nr,Nr as nt,$a as o,kt as on,wr as ot,eo as p,et as pn,Zn as pt,li as q,v as qn,Kt as qt,no as r,Ft as rn,o as rr,jr as rt,Ya as s,K as sn,Tr as st,Fs as t,Wt as tn,te as tr,Jr as tt,to as u,W as un,$n as ut,Ua as v,_t as vn,Vn as vt,xa as w,it as wn,In as wt,wa as x,nt as xn,Ln as xt,Ha as y,$e as yn,Y as yt,Gi as z,ae as zn,dn as zt};
|