@syncular/console 0.0.6-243 → 0.0.6-244
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.
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,d=globalThis,f=`10.47.0`;function p(){return m(d),d}function m(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`10.47.0`,t[f]=t[`10.47.0`]||{}}function h(e,t,n=d){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[f]=r[`10.47.0`]||{};return i[e]||(i[e]=t())}var g=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],_=`Sentry Logger `,v={};function y(e){if(!(`console`in d))return e();let t=d.console,n={},r=Object.keys(v);r.forEach(e=>{let r=v[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function b(){D().enabled=!0}function x(){D().enabled=!1}function S(){return D().enabled}function C(...e){E(`log`,...e)}function w(...e){E(`warn`,...e)}function T(...e){E(`error`,...e)}function E(e,...t){u&&S()&&y(()=>{d.console[e](`${_}[${e}]:`,...t)})}function D(){return u?h(`loggerSettings`,()=>({enabled:!1})):{enabled:!1}}var O={enable:b,disable:x,isEnabled:S,log:C,warn:w,error:T},k=50,A=/\(error: (.*)\)/,j=/captureMessage|captureException/;function M(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(`
|
|
2
|
+
`);for(let e=n;e<a.length;e++){let n=a[e];n.length>1024&&(n=n.slice(0,1024));let o=A.test(n)?n.replace(A,`$1`):n;if(!o.match(/\S*Error: /)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=k+r)break}}return P(i.slice(r))}}function N(e){return Array.isArray(e)?M(...e):e}function P(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(F(t).function||``)&&t.pop(),t.reverse(),j.test(F(t).function||``)&&(t.pop(),j.test(F(t).function||``)&&t.pop()),t.slice(0,k).map(e=>({...e,filename:e.filename||F(t).filename,function:e.function||`?`}))}function F(e){return e[e.length-1]||{}}var I=`<anonymous>`;function L(e){try{return!e||typeof e!=`function`?I:e.name||I}catch{return I}}function ee(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}function R(e){return`__v_isVNode`in e&&e.__v_isVNode?`[VueVNode]`:`[VueViewModel]`}var z={},B={};function V(e,t){z[e]=z[e]||[],z[e].push(t)}function H(e,t){if(!B[e]){B[e]=!0;try{t()}catch(t){u&&O.error(`Error while instrumenting ${e}`,t)}}}function U(e,t){let n=e&&z[e];if(n)for(let r of n)try{r(t)}catch(t){u&&O.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${L(r)}\nError:`,t)}}var te=null;function ne(e){let t=`error`;V(t,e),H(t,re)}function re(){te=d.onerror,d.onerror=function(e,t,n,r,i){return U(`error`,{column:r,error:i,line:n,msg:e,url:t}),te?te.apply(this,arguments):!1},d.onerror.__SENTRY_INSTRUMENTED__=!0}var ie=null;function ae(e){let t=`unhandledrejection`;V(t,e),H(t,oe)}function oe(){ie=d.onunhandledrejection,d.onunhandledrejection=function(e){return U(`unhandledrejection`,e),ie?ie.apply(this,arguments):!0},d.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var se=Object.prototype.toString;function ce(e){switch(se.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return Se(e,Error)}}function le(e,t){return se.call(e)===`[object ${t}]`}function ue(e){return le(e,`ErrorEvent`)}function de(e){return le(e,`DOMError`)}function fe(e){return le(e,`DOMException`)}function pe(e){return le(e,`String`)}function me(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function he(e){return e===null||me(e)||typeof e!=`object`&&typeof e!=`function`}function ge(e){return le(e,`Object`)}function _e(e){return typeof Event<`u`&&Se(e,Event)}function ve(e){return typeof Element<`u`&&Se(e,Element)}function ye(e){return le(e,`RegExp`)}function be(e){return!!(e?.then&&typeof e.then==`function`)}function xe(e){return ge(e)&&`nativeEvent`in e&&`preventDefault`in e&&`stopPropagation`in e}function Se(e,t){try{return e instanceof t}catch{return!1}}function Ce(e){return!!(typeof e==`object`&&e&&(e.__isVue||e._isVue||e.__v_isVNode))}function we(e){return typeof Request<`u`&&Se(e,Request)}var Te=d,Ee=80;function De(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||Ee;for(;n&&i++<5&&(o=Oe(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=n.parentNode;return r.reverse().join(` > `)}catch{return`<unknown>`}}function Oe(e,t){let n=e,r=[];if(!n?.tagName)return``;if(Te.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=t?.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(i?.length)i.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let e=n.className;if(e&&pe(e)){let t=e.split(/\s+/);for(let e of t)r.push(`.${e}`)}}for(let e of[`aria-label`,`type`,`name`,`title`,`alt`]){let t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join(``)}function ke(){try{return Te.document.location.href}catch{return``}}function Ae(e){if(!Te.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function je(e,t,n){if(!(t in e))return;let r=e[t];if(typeof r!=`function`)return;let i=n(r);typeof i==`function`&&Ne(i,r);try{e[t]=i}catch{u&&O.log(`Failed to replace method "${t}" in object`,e)}}function Me(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{u&&O.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Ne(e,t){try{e.prototype=t.prototype=t.prototype||{},Me(e,`__sentry_original__`,t)}catch{}}function Pe(e){return e.__sentry_original__}function Fe(e){if(ce(e))return{message:e.message,name:e.name,stack:e.stack,...Le(e)};if(_e(e)){let t={type:e.type,target:Ie(e.target),currentTarget:Ie(e.currentTarget),...Le(e)};return typeof CustomEvent<`u`&&Se(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Ie(e){try{return ve(e)?De(e):Object.prototype.toString.call(e)}catch{return`<unknown>`}}function Le(e){return typeof e==`object`&&e?Object.fromEntries(Object.entries(e)):{}}function Re(e){let t=Object.keys(Fe(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}var ze;function Be(e){if(ze!==void 0)return ze?ze(e):e();let t=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),n=d;return t in n&&typeof n[t]==`function`?(ze=n[t],ze(e)):(ze=null,e())}function Ve(){return Be(()=>Math.random())}function He(){return Be(()=>Date.now())}function Ue(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function We(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];try{Ce(r)?n.push(R(r)):n.push(String(r))}catch{n.push(`[value cannot be serialized]`)}}return n.join(t)}function Ge(e,t,n=!1){return pe(e)?ye(t)?t.test(e):pe(t)?n?e===t:e.includes(t):!1:!1}function Ke(e,t=[],n=!1){return t.some(t=>Ge(e,t,n))}function qe(){let e=d;return e.crypto||e.msCrypto}var Je;function Ye(){return Ve()*16}function Xe(e=qe()){try{if(e?.randomUUID)return Be(()=>e.randomUUID()).replace(/-/g,``)}catch{}return Je||=`10000000100040008000100000000000`,Je.replace(/[018]/g,e=>(e^(Ye()&15)>>e/4).toString(16))}function Ze(e){return e.exception?.values?.[0]}function Qe(e){let{message:t,event_id:n}=e;if(t)return t;let r=Ze(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function $e(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function et(e,t){let n=Ze(e);if(!n)return;let r={type:`generic`,handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&`data`in t){let e={...i?.data,...t.data};n.mechanism.data=e}}function tt(e){if(nt(e))return!0;try{Me(e,`__sentry_captured__`,!0)}catch{}return!1}function nt(e){try{return e.__sentry_captured__}catch{}}var rt=1e3;function it(){return He()/rt}function at(){let{performance:e}=d;if(!e?.now||!e.timeOrigin)return it;let t=e.timeOrigin;return()=>(t+Be(()=>e.now()))/rt}var ot;function st(){return(ot??=at())()}var ct=null;function lt(){let{performance:e}=d;if(!e?.now)return;let t=3e5,n=Be(()=>e.now()),r=He(),i=e.timeOrigin;if(typeof i==`number`&&Math.abs(i+n-r)<t)return i;let a=e.timing?.navigationStart;return typeof a==`number`&&Math.abs(a+n-r)<t?a:r-n}function ut(){return ct===null&&(ct=lt()),ct}function dt(e){let t=st(),n={sid:Xe(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>mt(n)};return e&&ft(n,e),n}function ft(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||st(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Xe()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function pt(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),ft(e,n)}function mt(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function ht(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=ht(r[e],t[e],n-1));return r}function gt(){return Xe()}function _t(){return Xe().substring(16)}var vt=`_sentrySpan`;function yt(e,t){t?Me(e,vt,t):delete e[vt]}function bt(e){return e[vt]}var xt=100,St=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:gt(),sampleRand:Ve()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,yt(t,bt(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&ft(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t==`function`?t(this):t,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof e?n.getScopeData():ge(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,yt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:gt(),sampleRand:Ve()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:xt;if(n<=0)return this;let r={timestamp:it(),...e,message:e.message?Ue(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent(`buffer_overflow`,`log_item`)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:bt(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=ht(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t?.event_id||Xe();if(!this._client)return u&&O.warn(`No client configured on scope - will not capture exception!`),n;let r=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n?.event_id||Xe();if(!this._client)return u&&O.warn(`No client configured on scope - will not capture message!`),r;let i=n?.syntheticException??Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){let n=e.event_id||t?.event_id||Xe();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(u&&O.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function Ct(){return h(`defaultCurrentScope`,()=>new St)}function wt(){return h(`defaultIsolationScope`,()=>new St)}var Tt=e=>e instanceof Promise&&!e[Et],Et=Symbol(`chained PromiseLike`),Dt=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Tt(r)&&Tt(e)?r:Ot(e,r)},Ot=(e,t)=>{let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Et]:!0}),t},kt=class{constructor(e,t){let n;n=e||new St;let r;r=t||new St,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return be(n)?Dt(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function At(){let e=m(p());return e.stack=e.stack||new kt(Ct(),wt())}function jt(e){return At().withScope(e)}function Mt(e,t){let n=At();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Nt(e){return At().withScope(()=>e(At().getIsolationScope()))}function Pt(){return{withIsolationScope:Nt,withScope:jt,withSetScope:Mt,withSetIsolationScope:(e,t)=>Nt(t),getCurrentScope:()=>At().getScope(),getIsolationScope:()=>At().getIsolationScope()}}function Ft(e){let t=m(e);return t.acs?t.acs:Pt()}var It;function Lt(){return It?.()}function Rt(){return It!==void 0}function zt(){return Ft(p()).getCurrentScope()}function Bt(){return Ft(p()).getIsolationScope()}function Vt(){return h(`globalScope`,()=>new St)}function Ht(...e){let t=Ft(p());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function Ut(){return zt().getClient()}function Wt(e){let t=Lt();if(t)return{trace_id:t.traceId,span_id:t.spanId};let{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),a={trace_id:n,span_id:i||_t()};return r&&(a.parent_span_id=r),a}var Gt=`sentry.source`,Kt=`sentry.sample_rate`,qt=`sentry.previous_trace_sample_rate`,Jt=`sentry.op`,Yt=`sentry.origin`,Xt=`sentry.idle_span_finish_reason`,Zt=`sentry.measurement_unit`,Qt=`sentry.measurement_value`,$t=`sentry.custom_span_name`,en=`sentry.profile_id`,tn=`sentry.exclusive_time`,nn=`sentry.link.type`,rn=`gen_ai.conversation.id`;function an(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:`unauthenticated`};case 403:return{code:2,message:`permission_denied`};case 404:return{code:2,message:`not_found`};case 409:return{code:2,message:`already_exists`};case 413:return{code:2,message:`failed_precondition`};case 429:return{code:2,message:`resource_exhausted`};case 499:return{code:2,message:`cancelled`};default:return{code:2,message:`invalid_argument`}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:`unimplemented`};case 503:return{code:2,message:`unavailable`};case 504:return{code:2,message:`deadline_exceeded`};default:return{code:2,message:`internal_error`}}return{code:2,message:`internal_error`}}function on(e,t){e.setAttribute(`http.response.status_code`,t);let n=an(t);n.message!==`unknown_error`&&e.setStatus(n)}var sn=`_sentryScope`,cn=`_sentryIsolationScope`;function ln(e){try{let t=d.WeakRef;if(typeof t==`function`)return new t(e)}catch{}return e}function un(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}function dn(e,t,n){e&&(Me(e,cn,ln(n)),Me(e,sn,t))}function fn(e){let t=e;return{scope:t[sn],isolationScope:un(t[cn])}}var pn=`sentry-`;function mn(e){let t=gn(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function hn(e){if(e)return vn(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${pn}${t}`]=n),e),{}))}function gn(e){if(!(!e||!pe(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=_n(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):_n(e)}function _n(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}function vn(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((e,[t,n],r)=>{let i=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,a=r===0?i:`${e},${i}`;return a.length>8192?(u&&O.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):a},``)}var yn=/^o(\d+)\./,bn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function xn(e){return e===`http`||e===`https`}function Sn(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function Cn(e){let t=bn.exec(e);if(!t){y(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return wn({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function wn(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function Tn(e){if(!u)return!0;let{port:t,projectId:n,protocol:r}=e;return[`protocol`,`publicKey`,`host`,`projectId`].find(t=>e[t]?!1:(O.error(`Invalid Sentry Dsn: ${t} missing`),!0))?!1:n.match(/^\d+$/)?xn(r)?t&&isNaN(parseInt(t,10))?(O.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(O.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(O.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function En(e){return e.match(yn)?.[1]}function Dn(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=En(n)),r}function On(e){let t=typeof e==`string`?Cn(e):wn(e);if(!(!t||!Tn(t)))return t}function kn(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var An=RegExp(`^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$`);function jn(e){if(!e)return;let t=e.match(An);if(!t)return;let n;return t[3]===`1`?n=!0:t[3]===`0`&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function Mn(e,t){let n=jn(e),r=mn(t);if(!n?.traceId)return{traceId:gt(),sampleRand:Ve()};let i=Fn(n,r);r&&(r.sample_rand=i.toString());let{traceId:a,parentSpanId:o,parentSampled:s}=n;return{traceId:a,parentSpanId:o,sampled:s,dsc:r||{},sampleRand:i}}function Nn(e=gt(),t=_t(),n){let r=``;return n!==void 0&&(r=n?`-1`:`-0`),`${e}-${t}${r}`}function Pn(e=gt(),t=_t(),n){return`00-${e}-${t}-${n?`01`:`00`}`}function Fn(e,t){let n=kn(t?.sample_rand);if(n!==void 0)return n;let r=kn(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Ve()*r:r+Ve()*(1-r):Ve()}var In=!1;function Ln(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:o,origin:s,links:c}=Wn(e);return{parent_span_id:a,span_id:t,trace_id:n,data:r,op:i,status:o,origin:s,links:c}}function Rn(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Wn(e).parent_span_id,a=fn(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||_t():t,trace_id:n}}function zn(e){let{traceId:t,spanId:n}=e.spanContext();return Nn(t,n,qn(e))}function Bn(e){let{traceId:t,spanId:n}=e.spanContext();return Pn(t,n,qn(e))}function Vn(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function Hn(e){return typeof e==`number`?Un(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Un(e.getTime()):st()}function Un(e){return e>9999999999?e/1e3:e}function Wn(e){if(Kn(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Gn(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?e.parentSpanContext?.spanId:void 0,start_timestamp:Hn(i),timestamp:Hn(o)||void 0,status:Jn(s),op:r[Jt],origin:r[Yt],links:Vn(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Gn(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Kn(e){return typeof e.getSpanJSON==`function`}function qn(e){let{traceFlags:t}=e.spanContext();return t===1}function Jn(e){if(!(!e||e.code===0))return e.code===1?`ok`:e.message||`internal_error`}var Yn=`_sentryChildSpans`,Xn=`_sentryRootSpan`;function Zn(e,t){Me(t,Xn,e[Xn]||e),e[Yn]?e[Yn].add(t):Me(e,Yn,new Set([t]))}function Qn(e,t){e[Yn]&&e[Yn].delete(t)}function $n(e){let t=new Set;function n(e){if(!t.has(e)&&qn(e)){t.add(e);let r=e[Yn]?Array.from(e[Yn]):[];for(let e of r)n(e)}}return n(e),Array.from(t)}function er(e){return e[Xn]||e}function tr(){let e=Ft(p());return e.getActiveSpan?e.getActiveSpan():bt(zt())}function nr(){In||=(y(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0)}var rr=!1;function ir(){if(rr)return;function e(){let e=tr(),t=e&&er(e);if(t){let e=`internal_error`;u&&O.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}e.tag=`sentry_tracingErrorCallback`,rr=!0,ne(e),ae(e)}function ar(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=e||Ut()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function or(e){O.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function sr(e,t){if(!t?.length||!e.description)return!1;for(let n of t){if(lr(n)){if(Ge(e.description,n))return u&&or(e),!0;continue}if(!n.name&&!n.op)continue;let t=n.name?Ge(e.description,n.name):!0,r=n.op?e.op&&Ge(e.op,n.op):!0;if(t&&r)return u&&or(e),!0}return!1}function cr(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function lr(e){return typeof e==`string`||e instanceof RegExp}var ur=`production`,dr=`_frozenDsc`;function fr(e,t){Me(e,dr,t)}function pr(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:Dn(t)};return t.emit(`createDsc`,i),i}function mr(e,t){let n=t.getPropagationContext();return n.dsc||pr(n.traceId,e)}function hr(e){let t=Ut();if(!t)return{};let n=er(e),r=Wn(n),i=r.data,a=n.spanContext().traceState,o=a?.get(`sentry.sample_rate`)??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[dr];if(c)return s(c);let l=a?.get(`sentry.dsc`),u=l&&mn(l);if(u)return s(u);let d=pr(e.spanContext().traceId,t),f=i[Gt],p=r.description;return f!==`url`&&p&&(d.transaction=p),ar()&&(d.sampled=String(qn(n)),d.sample_rand=a?.get(`sentry.sample_rand`)??fn(n).scope?.getPropagationContext().sampleRand.toString()),s(d),t.emit(`createDsc`,d,n),d}var gr=class{constructor(e={}){this._traceId=e.traceId||gt(),this._spanId=e.spanId||_t()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}};function _r(e,t=100,n=1/0){try{return yr(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function vr(e,t=3,n=100*1024){let r=_r(e,t);return Cr(r)>n?vr(e,t-1,n):r}function yr(e,t,n=1/0,r=1/0,i=wr()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=br(e,t);if(!s.startsWith(`[object `))return s;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__==`number`?t.__sentry_override_normalization_depth__:n;if(c===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let l=t;if(l&&typeof l.toJSON==`function`)try{return yr(``,l.toJSON(),c-1,r,i)}catch{}let u=Array.isArray(t)?[]:{},d=0,f=Fe(t);for(let e in f){if(!Object.prototype.hasOwnProperty.call(f,e))continue;if(d>=r){u[e]=`[MaxProperties ~]`;break}let t=f[e];u[e]=yr(e,t,c-1,r,i),d++}return o(t),u}function br(e,t){try{if(e===`domain`&&t&&typeof t==`object`&&t._events)return`[Domain]`;if(e===`domainEmitter`)return`[DomainEmitter]`;if(typeof global<`u`&&t===global)return`[Global]`;if(typeof window<`u`&&t===window)return`[Window]`;if(typeof document<`u`&&t===document)return`[Document]`;if(Ce(t))return R(t);if(xe(t))return`[SyntheticEvent]`;if(typeof t==`number`&&!Number.isFinite(t))return`[${t}]`;if(typeof t==`function`)return`[Function: ${L(t)}]`;if(typeof t==`symbol`)return`[${String(t)}]`;if(typeof t==`bigint`)return`[BigInt: ${String(t)}]`;let n=xr(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}function xr(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function Sr(e){return~-encodeURI(e).split(/%..|./).length}function Cr(e){return Sr(JSON.stringify(e))}function wr(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function Tr(e,t=[]){return[e,t]}function Er(e,t){let[n,r]=e;return[n,[...r,t]]}function Dr(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function Or(e,t){return Dr(e,(e,n)=>t.includes(n))}function kr(e){let t=m(d);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Ar(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[kr(r),e]:r.push(typeof e==`string`?kr(e):e)}for(let e of n){let[t,n]=e;if(i(`\n${JSON.stringify(t)}\n`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(_r(n))}i(e)}}return typeof r==`string`?r:jr(r)}function jr(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function Mr(e){return[{type:`span`},e]}function Nr(e){let t=typeof e.data==`string`?kr(e.data):e.data;return[{type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Pr={sessions:`session`,event:`error`,client_report:`internal`,user_report:`default`,profile_chunk:`profile`,replay_event:`replay`,replay_recording:`replay`,check_in:`monitor`,raw_security:`security`,log:`log_item`,trace_metric:`metric`};function Fr(e){return e in Pr}function Ir(e){return Fr(e)?Pr[e]:e}function Lr(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Rr(e,t,n,r){let i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Sn(r)},...i&&{trace:i}}}function zr(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function Br(e,t,n,r){let i=Lr(n);return Tr({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Sn(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function Vr(e,t,n,r){let i=Lr(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;zr(e,n?.sdk);let o=Rr(e,i,r,t);return delete e.sdkProcessingMetadata,Tr(o,[[{type:a},e]])}function Hr(e,t){function n(e){return!!e.trace_id&&!!e.public_key}let r=hr(e[0]),i=t?.getDsn(),a=t?.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!a&&i&&{dsn:Sn(i)}},{beforeSendSpan:s,ignoreSpans:c}=t?.getOptions()||{},l=c?.length?e.filter(e=>!sr(Wn(e),c)):e,u=e.length-l.length;u&&t?.recordDroppedEvent(`before_send`,`span`,u);let d=s?e=>{let t=Wn(e);return s(t)||(nr(),t)}:Wn,f=[];for(let e of l){let t=d(e);t&&f.push(Mr(t))}return Tr(o,f)}function Ur(e){if(!u)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`,parent_span_id:r}=Wn(e),{spanId:i}=e.spanContext(),a=qn(e),o=er(e),s=o===e,c=`[Tracing] Starting ${a?`sampled`:`unsampled`} ${s?`root `:``}span`,l=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&l.push(`parent ID: ${r}`),!s){let{op:e,description:t}=Wn(o);l.push(`root ID: ${o.spanContext().spanId}`),e&&l.push(`root op: ${e}`),t&&l.push(`root description: ${t}`)}O.log(`${c}
|
|
3
|
+
${l.join(`
|
|
4
|
+
`)}`)}function Wr(e){if(!u)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`}=Wn(e),{spanId:r}=e.spanContext(),i=`[Tracing] Finishing "${n}" ${er(e)===e?`root `:``}span "${t}" with ID ${r}`;O.log(i)}function Gr(e,t,n,r=tr()){let i=r&&er(r);i&&(u&&O.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[Qt]:t,[Zt]:n}))}function Kr(e){if(!e||e.length===0)return;let t={};return e.forEach(e=>{let n=e.attributes||{},r=n[Zt],i=n[Qt];typeof r==`string`&&typeof i==`number`&&(t[e.name]={value:i,unit:r})}),t}var qr=1e3,Jr=class{constructor(e={}){this._traceId=e.traceId||gt(),this._spanId=e.spanId||_t(),this._startTime=e.startTimestamp||st(),this._links=e.links,this._attributes={},this.setAttributes({[Yt]:`manual`,[Jt]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),`sampled`in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(e,t){return t===void 0?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=Hn(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(Gt,`custom`),this}end(e){this._endTime||(this._endTime=Hn(e),Wr(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Jt],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Jn(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Yt],profile_id:this._attributes[en],exclusive_time:this._attributes[tn],measurements:Kr(this._events),is_segment:this._isStandaloneSpan&&er(this)===this||void 0,segment_id:this._isStandaloneSpan?er(this).spanContext().spanId:void 0,links:Vn(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){u&&O.log(`[Tracing] Adding an event to span:`,e);let r=Yr(t)?t:n||st(),i=Yr(t)?{}:t||{},a={name:e,time:Hn(r),attributes:i};return this._events.push(a),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=Ut();if(e&&e.emit(`spanEnd`,this),!(this._isStandaloneSpan||this===er(this)))return;if(this._isStandaloneSpan){this._sampled?Qr(Hr([this],e)):(u&&O.log(`[Tracing] Discarding standalone span because its trace was not chosen to be sampled.`),e&&e.recordDroppedEvent(`sample_rate`,`span`));return}let t=this._convertSpanToTransaction();t&&(fn(this).scope||zt()).captureEvent(t)}_convertSpanToTransaction(){if(!Xr(Wn(this)))return;this._name||=(u&&O.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),`<unlabeled transaction>`);let{scope:e,isolationScope:t}=fn(this),n=e?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let r=$n(this).filter(e=>e!==this&&!Zr(e)).map(e=>Wn(e)).filter(Xr),i=this._attributes[Gt];delete this._attributes[$t],r.forEach(e=>{delete e.data[$t]});let a={contexts:{trace:Ln(this)},spans:r.length>qr?r.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,qr):r,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,dynamicSamplingContext:hr(this)},request:n,...i&&{transaction_info:{source:i}}},o=Kr(this._events);return o&&Object.keys(o).length&&(u&&O.log(`[Measurements] Adding measurements to transaction event`,JSON.stringify(o,void 0,2)),a.measurements=o),a}};function Yr(e){return e&&typeof e==`number`||e instanceof Date||Array.isArray(e)}function Xr(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Zr(e){return e instanceof Jr&&e.isStandaloneSpan()}function Qr(e){let t=Ut();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent(`before_send`,`span`);return}t.sendEnvelope(e)}function $r(e,t,n=()=>{},r=()=>{}){let i;try{i=e()}catch(e){throw t(e),n(),e}return ei(i,t,n,r)}function ei(e,t,n,r){return be(e)?Dt(e,e=>{n(),r(e)},e=>{t(e),n()}):(n(),r(e),e)}function ti(e,t,n){if(!ar(e))return[!1];let r,i;typeof e.tracesSampler==`function`?(i=e.tracesSampler({...t,inheritOrSampleWith:e=>typeof t.parentSampleRate==`number`?t.parentSampleRate:typeof t.parentSampled==`boolean`?Number(t.parentSampled):e}),r=!0):t.parentSampled===void 0?e.tracesSampleRate!==void 0&&(i=e.tracesSampleRate,r=!0):i=t.parentSampled;let a=kn(i);if(a===void 0)return u&&O.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!a)return u&&O.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler==`function`?`tracesSampler returned 0 or false`:`a negative sampling decision was inherited or tracesSampleRate is set to 0`}`),[!1,a,r];let o=n<a;return o||u&&O.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[o,a,r]}var ni=`__SENTRY_SUPPRESS_TRACING__`;function ri(e,t){let n=ci();if(n.startSpan)return n.startSpan(e,t);let r=si(e),{forceTransaction:i,parentSpan:a,scope:o}=e,s=o?.clone();return Ht(s,()=>fi(a)(()=>{let n=zt(),o=di(n,a),s=e.onlyIfParent&&!o?new gr:oi({parentSpan:o,spanArguments:r,forceTransaction:i,scope:n});return yt(n,s),$r(()=>t(s),()=>{let{status:e}=Wn(s);s.isRecording()&&(!e||e===`ok`)&&s.setStatus({code:2,message:`internal_error`})},()=>{s.end()})}))}function ii(e){let t=ci();if(t.startInactiveSpan)return t.startInactiveSpan(e);let n=si(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?t=>Ht(e.scope,t):i===void 0?e=>e():e=>ai(i,e))(()=>{let t=zt(),a=di(t,i);return e.onlyIfParent&&!a?new gr:oi({parentSpan:a,spanArguments:n,forceTransaction:r,scope:t})})}function ai(e,t){let n=ci();return n.withActiveSpan?n.withActiveSpan(e,t):Ht(n=>(yt(n,e||void 0),t(n)))}function oi({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!ar()){let r=new gr;return(n||!e)&&fr(r,{sampled:`false`,sample_rate:`0`,transaction:t.name,...hr(r)}),r}let i=Bt(),a;if(e&&!n)a=ui(e,r,t),Zn(e,a);else if(e){let n=hr(e),{traceId:i,spanId:o}=e.spanContext(),s=qn(e);a=li({traceId:i,parentSpanId:o,...t},r,s),fr(a,n)}else{let{traceId:e,dsc:n,parentSpanId:o,sampled:s}={...i.getPropagationContext(),...r.getPropagationContext()};a=li({traceId:e,parentSpanId:o,...t},r,s),n&&fr(a,n)}return Ur(a),dn(a,r,i),a}function si(e){let t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...t};return n.startTimestamp=Hn(e.startTime),delete n.startTime,n}return t}function ci(){return Ft(p())}function li(e,t,n){let r=Ut(),i=r?.getOptions()||{},{name:a=``}=e,o={spanAttributes:{...e.attributes},spanName:a,parentSampled:n};r?.emit(`beforeSampling`,o,{decision:!1});let s=o.parentSampled??n,c=o.spanAttributes,l=t.getPropagationContext(),[d,f,p]=t.getScopeData().sdkProcessingMetadata[ni]?[!1]:ti(i,{name:a,parentSampled:s,attributes:c,parentSampleRate:kn(l.dsc?.sample_rate)},l.sampleRand),m=new Jr({...e,attributes:{[Gt]:`custom`,[Kt]:f!==void 0&&p?f:void 0,...c},sampled:d});return!d&&r&&(u&&O.log(`[Tracing] Discarding root span because its trace was not chosen to be sampled.`),r.recordDroppedEvent(`sample_rate`,`transaction`)),r&&r.emit(`spanStart`,m),m}function ui(e,t,n){let{spanId:r,traceId:i}=e.spanContext(),a=t.getScopeData().sdkProcessingMetadata[ni]?!1:qn(e),o=a?new Jr({...n,parentSpanId:r,traceId:i,sampled:a}):new gr({traceId:i});Zn(e,o);let s=Ut();return s&&(s.emit(`spanStart`,o),n.endTimestamp&&s.emit(`spanEnd`,o)),o}function di(e,t){if(t)return t;if(t===null)return;let n=bt(e);if(!n)return;let r=Ut();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?er(n):n}function fi(e){return e===void 0?e=>e():t=>ai(e,t)}var pi={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},mi=`heartbeatFailed`,hi=`idleTimeout`,gi=`finalTimeout`,_i=`externalFinish`;function vi(e,t={}){let n=new Map,r=!1,i,a=_i,o=!t.disableAutoFinish,s=[],{idleTimeout:c=pi.idleTimeout,finalTimeout:l=pi.finalTimeout,childSpanTimeout:d=pi.childSpanTimeout,beforeSpanEnd:f,trimIdleSpanEndTimestamp:p=!0}=t,m=Ut();if(!m||!ar()){let e=new gr;return fr(e,{sample_rate:`0`,sampled:`false`,...hr(e)}),e}let h=zt(),g=tr(),_=yi(e);_.end=new Proxy(_.end,{apply(e,t,n){if(f&&f(_),t instanceof gr)return;let[r,...i]=n,a=Hn(r||st()),o=$n(_).filter(e=>e!==_),s=Wn(_);if(!o.length||!p)return C(a),Reflect.apply(e,t,[a,...i]);let c=m.getOptions().ignoreSpans,u=o?.reduce((e,t)=>{let n=Wn(t);return!n.timestamp||c&&sr(n,c)?e:e?Math.max(e,n.timestamp):n.timestamp},void 0),d=s.start_timestamp,h=Math.min(d?d+l/1e3:1/0,Math.max(d||-1/0,Math.min(a,u||1/0)));return C(h),Reflect.apply(e,t,[h,...i])}});function v(){i&&=(clearTimeout(i),void 0)}function y(e){v(),i=setTimeout(()=>{!r&&n.size===0&&o&&(a=hi,_.end(e))},c)}function b(e){i=setTimeout(()=>{!r&&o&&(a=mi,_.end(e))},d)}function x(e){v(),n.set(e,!0),b(st()+d/1e3)}function S(e){n.has(e)&&n.delete(e),n.size===0&&y(st()+c/1e3)}function C(e){r=!0,n.clear(),s.forEach(e=>e()),yt(h,g);let t=Wn(_),{start_timestamp:i}=t;if(!i)return;t.data[`sentry.idle_span_finish_reason`]||_.setAttribute(Xt,a);let o=t.status;(!o||o===`unknown`)&&_.setStatus({code:1}),O.log(`[Tracing] Idle span "${t.op}" finished`);let d=$n(_).filter(e=>e!==_),f=0;d.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:`cancelled`}),t.end(e),u&&O.log(`[Tracing] Cancelling span since span ended early`,JSON.stringify(t,void 0,2)));let{timestamp:n=0,start_timestamp:r=0}=Wn(t),i=r<=e,a=(l+c)/1e3,o=n-r<=a;if(u){let e=JSON.stringify(t,void 0,2);i?o||O.log(`[Tracing] Discarding span since it finished after idle span final timeout`,e):O.log(`[Tracing] Discarding span since it happened after idle span was finished`,e)}(!o||!i)&&(Qn(_,t),f++)}),f>0&&_.setAttribute(`sentry.idle_span_discarded_spans`,f)}return s.push(m.on(`spanStart`,e=>{r||e===_||Wn(e).timestamp||e instanceof Jr&&e.isStandaloneSpan()||$n(_).includes(e)&&x(e.spanContext().spanId)})),s.push(m.on(`spanEnd`,e=>{r||S(e.spanContext().spanId)})),s.push(m.on(`idleSpanEnableAutoFinish`,e=>{e===_&&(o=!0,y(),n.size&&b())})),t.disableAutoFinish||y(),setTimeout(()=>{r||(_.setStatus({code:2,message:`deadline_exceeded`}),a=gi,_.end())},l),_}function yi(e){let t=ii(e);return yt(zt(),t),u&&O.log(`[Tracing] Started span is an idle span`),t}var bi=0,xi=1,Si=2;function Ci(e){return new Ti(t=>{t(e)})}function wi(e){return new Ti((t,n)=>{n(e)})}var Ti=class e{constructor(e){this._state=bi,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}_executeHandlers(){if(this._state===bi)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===xi&&e[1](this._value),this._state===Si&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{if(this._state===bi){if(be(t)){t.then(n,r);return}this._state=e,this._value=t,this._executeHandlers()}},n=e=>{t(xi,e)},r=e=>{t(Si,e)};try{e(n,r)}catch(e){r(e)}}};function Ei(e,t,n,r=0){try{let i=Di(t,n,e,r);return be(i)?i:Ci(i)}catch(e){return wi(e)}}function Di(e,t,n,r){let i=n[r];if(!e||!i)return e;let a=i({...e},t);return u&&a===null&&O.log(`Event processor "${i.id||`?`}" dropped event`),be(a)?a.then(e=>Di(e,t,n,r+1)):Di(a,t,n,r+1)}var Oi,ki,Ai,ji;function Mi(e){let t=d._sentryDebugIds,n=d._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],i=n?Object.keys(n):[];if(ji&&r.length===ki&&i.length===Ai)return ji;ki=r.length,Ai=i.length,ji={},Oi||={};let a=(t,n)=>{for(let r of t){let t=n[r],i=Oi?.[r];if(i&&ji&&t)ji[i[0]]=t,Oi&&(Oi[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e]?.filename;if(i&&ji&&Oi){ji[i]=t,Oi[r]=[i,t];break}}}}};return t&&a(r,t),n&&a(i,n),ji}function Ni(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;Li(e,t),r&&Bi(e,r),Vi(e,n),Ri(e,i),zi(e,a)}function Pi(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m,span:h}=t;Fi(e,`extra`,n),Fi(e,`tags`,r),Fi(e,`attributes`,i),Fi(e,`user`,a),Fi(e,`contexts`,o),e.sdkProcessingMetadata=ht(e.sdkProcessingMetadata,c,2),s&&(e.level=s),m&&(e.transactionName=m),h&&(e.span=h),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function Fi(e,t,n){e[t]=ht(e[t],n,1)}function Ii(e,t){let n=Vt().getScopeData();return e&&Pi(n,e.getScopeData()),t&&Pi(n,t.getScopeData()),n}function Li(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function Ri(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function zi(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Bi(e,t){e.contexts={trace:Rn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:hr(t),...e.sdkProcessingMetadata};let n=Wn(er(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function Vi(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function Hi(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Xe(),timestamp:t.timestamp||it()},l=n.integrations||e.integrations.map(e=>e.name);Ui(c,e),Ki(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&Wi(c,e.stackParser);let u=Ji(r,n.captureContext);n.mechanism&&et(c,n.mechanism);let d=i?i.getEventProcessors():[],f=Ii(a,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),Ni(c,f);let m=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?Ci(c):Ei(m,c,n)).then(e=>(e&&Gi(e),typeof o==`number`&&o>0?qi(e,o,s):e))}function Ui(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;o?.url&&a&&(o.url=Ue(o.url,a)),a&&e.exception?.values?.forEach(e=>{e.value&&=Ue(e.value,a)})}function Wi(e,t){let n=Mi(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}function Gi(e){let t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}function Ki(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function qi(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:_r(e.data,t,n)}}))},...e.user&&{user:_r(e.user,t,n)},...e.contexts&&{contexts:_r(e.contexts,t,n)},...e.extra&&{extra:_r(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=_r(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:_r(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=_r(e.contexts.flags,3,n)),r}function Ji(e,t){if(!t)return e;let n=e?e.clone():new St;return n.update(t),n}function Yi(e){if(e)return Xi(e)||Qi(e)?{captureContext:e}:e}function Xi(e){return e instanceof St||typeof e==`function`}var Zi=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function Qi(e){return Object.keys(e).some(e=>Zi.includes(e))}function $i(e,t){return zt().captureException(e,Yi(t))}function ea(e,t){return zt().captureEvent(e,t)}function ta(e,t){Bt().setContext(e,t)}function na(){let e=Ut();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function ra(e){let t=Bt(),{user:n}=Ii(t,zt()),{userAgent:r}=d.navigator||{},i=dt({user:n,...r&&{userAgent:r},...e}),a=t.getSession();return a?.status===`ok`&&ft(a,{status:`exited`}),ia(),t.setSession(i),i}function ia(){let e=Bt(),t=zt().getSession()||e.getSession();t&&pt(t),aa(),e.setSession()}function aa(){let e=Bt(),t=Ut(),n=e.getSession();n&&t&&t.captureSession(n)}function oa(e=!1){if(e){ia();return}aa()}function sa(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function ca(e){return`${sa(e)}${e.projectId}/envelope/`}function la(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function ua(e,t,n){return t||`${ca(e)}?${la(e,n)}`}var da=[];function fa(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function pa(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return fa(r)}function ma(e,t){let n={};return t.forEach(t=>{t&&ga(e,t,n)}),n}function ha(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function ga(e,t,n){if(n[t.name]){u&&O.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!da.includes(t.name)&&typeof t.setupOnce==`function`&&(t.setupOnce(),da.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}u&&O.log(`Integration installed: ${t.name}`)}function _a(e){return e}function va(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).includes(`value`)}function ya(e,t){let{value:n,unit:r}=va(e)?e:{value:e,unit:void 0},i=xa(n),a=r&&typeof r==`string`?{unit:r}:{};if(i)return{...i,...a};if(!t||t===`skip-undefined`&&n===void 0)return;let o=``;try{o=JSON.stringify(n)??``}catch{}return{value:o,type:`string`,...a}}function ba(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let e=ya(i,t);e&&(n[r]=e)}return n}function xa(e){let t=typeof e==`string`?`string`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?Number.isInteger(e)?`integer`:`double`:null;if(t)return{value:e,type:t}}var Sa=`sentry.timestamp.sequence`,Ca=0,wa;function Ta(e){let t=Math.floor(e*1e3);wa!==void 0&&t!==wa&&(Ca=0);let n=Ca;return Ca++,wa=t,{key:Sa,value:{value:n,type:`integer`}}}function Ea(e,t){return t?Ht(t,()=>{let n=tr(),r=n?Rn(n):Wt(t);return[n?hr(n):mr(e,t),r]}):[void 0,void 0]}var Da={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function Oa(e){return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{items:e}]}function ka(e,t,n,r){let i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=Sn(r)),Tr(i,[Oa(e)])}var Aa=100;function ja(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function Ma(e,t){let n=Ia(),r=Fa(e);r===void 0?n.set(e,[t]):r.length>=Aa?(Pa(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Na(e,t=zt(),n=Ma){let r=t?.getClient()??Ut();if(!r){u&&O.warn(`No client available to capture log.`);return}let{release:i,environment:a,enableLogs:o=!1,beforeSendLog:s}=r.getOptions();if(!o){u&&O.warn(`logging option not enabled, log will not be captured.`);return}let[,c]=Ea(r,t),l={...e.attributes},{user:{id:d,email:f,username:p},attributes:m={}}=Ii(Bt(),t);ja(l,`user.id`,d,!1),ja(l,`user.email`,f,!1),ja(l,`user.name`,p,!1),ja(l,`sentry.release`,i),ja(l,`sentry.environment`,a);let{name:h,version:g}=r.getSdkMetadata()?.sdk??{};ja(l,`sentry.sdk.name`,h),ja(l,`sentry.sdk.version`,g);let _=r.getIntegrationByName(`Replay`),v=_?.getReplayId(!0);ja(l,`sentry.replay_id`,v),v&&_?.getRecordingMode()===`buffer`&&ja(l,`sentry._internal.replay_is_buffering`,!0);let b=e.message;if(me(b)){let{__sentry_template_string__:e,__sentry_template_values__:t=[]}=b;t?.length&&(l[`sentry.message.template`]=e),t.forEach((e,t)=>{l[`sentry.message.parameter.${t}`]=e})}ja(l,`sentry.trace.parent_span_id`,bt(t)?.spanContext().spanId);let x={...e,attributes:l};r.emit(`beforeCaptureLog`,x);let S=s?y(()=>s(x)):x;if(!S){r.recordDroppedEvent(`before_send`,`log_item`,1),u&&O.warn(`beforeSendLog returned null, log will not be captured.`);return}let{level:C,message:w,attributes:T={},severityNumber:E}=S,D=st(),k=Ta(D);n(r,{timestamp:D,level:C,body:w,trace_id:c?.trace_id,severity_number:E??Da[C],attributes:{...ba(m),...ba(T,!0),[k.key]:k.value}}),r.emit(`afterCaptureLog`,S)}function Pa(e,t){let n=t??Fa(e)??[];if(n.length===0)return;let r=e.getOptions(),i=ka(n,r._metadata,r.tunnel,e.getDsn());Ia().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function Fa(e){return Ia().get(e)}function Ia(){return h(`clientToLogBufferMap`,()=>new WeakMap)}function La(e){return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{items:e}]}function Ra(e,t,n,r){let i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=Sn(r)),Tr(i,[La(e)])}var za=1e3;function Ba(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function Va(e,t){let n=qa(),r=Ka(e);r===void 0?n.set(e,[t]):r.length>=za?(Ga(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Ha(e,t,n){let{release:r,environment:i}=t.getOptions(),a={...e.attributes};Ba(a,`user.id`,n.id,!1),Ba(a,`user.email`,n.email,!1),Ba(a,`user.name`,n.username,!1),Ba(a,`sentry.release`,r),Ba(a,`sentry.environment`,i);let{name:o,version:s}=t.getSdkMetadata()?.sdk??{};Ba(a,`sentry.sdk.name`,o),Ba(a,`sentry.sdk.version`,s);let c=t.getIntegrationByName(`Replay`),l=c?.getReplayId(!0);return Ba(a,`sentry.replay_id`,l),l&&c?.getRecordingMode()===`buffer`&&Ba(a,`sentry._internal.replay_is_buffering`,!0),{...e,attributes:a}}function Ua(e,t,n,r){let[,i]=Ea(t,n),a=bt(n),o=a?a.spanContext().traceId:i?.trace_id,s=a?a.spanContext().spanId:void 0,c=st(),l=Ta(c);return{timestamp:c,trace_id:o??``,span_id:s,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...ba(r),...ba(e.attributes,`skip-undefined`),[l.key]:l.value}}}function Wa(e,t){let n=t?.scope??zt(),r=t?.captureSerializedMetric??Va,i=n?.getClient()??Ut();if(!i){u&&O.warn(`No client available to capture metric.`);return}let{_experiments:a,enableMetrics:o,beforeSendMetric:s}=i.getOptions();if(!(o??a?.enableMetrics??!0)){u&&O.warn(`metrics option not enabled, metric will not be captured.`);return}let{user:c,attributes:l}=Ii(Bt(),n),d=Ha(e,i,c);i.emit(`processMetric`,d);let f=s||a?.beforeSendMetric,p=f?f(d):d;if(!p){u&&O.log("`beforeSendMetric` returned `null`, will not send metric.");return}let m=Ua(p,i,n,l);u&&O.log(`[Metric]`,m),r(i,m),i.emit(`afterCaptureMetric`,p)}function Ga(e,t){let n=t??Ka(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Ra(n,r._metadata,r.tunnel,e.getDsn());qa().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function Ka(e){return qa().get(e)}function qa(){return h(`clientToMetricBufferMap`,()=>new WeakMap)}function Ja(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}var Ya=Symbol.for(`SentryBufferFullError`);function Xa(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return wi(Ya);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return Ci(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>Ja(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var Za=60*1e3;function Qa(e,t=He()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?Za:r-t}function $a(e,t){return e[t]||e.all||0}function eo(e,t,n=He()){return $a(e,t)>n}function to(e,{statusCode:t,headers:n},r=He()){let i={...e},a=n?.[`x-sentry-rate-limits`],o=n?.[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+Qa(o,r):t===429&&(i.all=r+60*1e3);return i}function no(e,t,n=Xa(e.bufferSize||64)){let r={},i=e=>n.drain(e);function a(i){let a=[];if(Dr(i,(t,n)=>{let i=Ir(n);eo(r,i)?e.recordDroppedEvent(`ratelimit_backoff`,i):a.push(t)}),a.length===0)return Promise.resolve({});let o=Tr(i[0],a),s=t=>{if(Or(o,[`client_report`])){u&&O.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`);return}Dr(o,(n,r)=>{e.recordDroppedEvent(t,Ir(r))})};return n.add(()=>t({body:Ar(o)}).then(e=>e.statusCode===413?(u&&O.error(`Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.`),s(`send_error`),e):(u&&e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&O.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=to(r,e),e),e=>{throw s(`network_error`),u&&O.error(`Encountered error running transport request:`,e),e})).then(e=>e,e=>{if(e===Ya)return u&&O.error(`Skipped sending event because buffer is full.`),s(`queue_overflow`),Promise.resolve({});throw e})}return{send:a,flush:i}}function ro(e,t,n){let r=[{type:`client_report`},{timestamp:n||it(),discarded_events:e}];return Tr(t?{dsn:t}:{},[r])}function io(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function ao(e){let{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:o,op:s}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??``,start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??``,origin:a,profile_id:o?.[en],exclusive_time:o?.[tn],measurements:e.measurements,is_segment:!0}}function oo(e){return{type:`transaction`,timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}var so=`Not capturing exception because it's already been captured.`,co=`Discarded session because of missing or non-string release`,lo=Symbol.for(`SentryInternalError`),uo=Symbol.for(`SentryDoNotSendEventError`),fo=5e3;function po(e){return{message:e,[lo]:!0}}function mo(e){return{message:e,[uo]:!0}}function ho(e){return!!e&&typeof e==`object`&&lo in e}function go(e){return!!e&&typeof e==`object`&&uo in e}function _o(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{a+=r(t),a>=8e5?i(e):s||(s=!0,o=Ja(setTimeout(()=>{i(e)},fo)))}),e.on(`flush`,()=>{i(e)})}var vo=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Xa(e.transportOptions?.bufferSize??64),e.dsn?this._dsn=On(e.dsn):u&&O.warn(`No DSN provided, client will not send events.`),this._dsn){let t=ua(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&_o(this,`afterCaptureLog`,`flushLogs`,To,Pa),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&_o(this,`afterCaptureMetric`,`flushMetrics`,wo,Ga)}captureException(e,t,n){let r=Xe();if(tt(e))return u&&O.log(so),r;let i={event_id:r,...t};return this._process(()=>this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n)).then(e=>e),`error`),i.event_id}captureMessage(e,t,n,r){let i={event_id:Xe(),...n},a=me(e)?e:String(e),o=he(e),s=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(e,t,n){let r=Xe();if(t?.originalException&&tt(t.originalException))return u&&O.log(so),r;let i={event_id:r,...t},a=e.sdkProcessingMetadata||{},o=a.capturedSpanScope,s=a.capturedSpanIsolationScope,c=yo(e.type);return this._process(()=>this._captureEvent(e,i,o||n,s),c),i.event_id}captureSession(e){this.sendSession(e),ft(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(!t)return!0;this.emit(`flush`);let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){Pa(this);let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit(`close`),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith(`Spotlight`)))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];ga(this,e,this._integrations),t||ha(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=Vr(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=Er(n,Nr(e));this.sendEnvelope(n).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(e){let{release:t,environment:n=ur}=this._options;if(`aggregates`in e){let r=e.attrs||{};if(!r.release&&!t){u&&O.warn(co);return}r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t){u&&O.warn(co);return}e.release=e.release||t,e.environment=e.environment||n}this.emit(`beforeSendSession`,e);let r=Br(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){let r=`${e}:${t}`;u&&O.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:``}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(e){return u&&O.error(`Error while sending envelope:`,e),{}}return u&&O.error(`Transport disabled`),{}}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=ma(this,e),ha(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception?.values;if(i){r=!0,n=!1;for(let e of i)if(e.mechanism?.handled===!1){n=!0;break}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(ft(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a?.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Hi(i,e,t,n,this,r).then(e=>e===null?e:(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...e.contexts?.trace,...Wt(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:mr(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,t={},n=zt(),r=Bt()){return u&&So(e)&&O.log(`Captured error event \`${io(e)[0]||`<unknown>`}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{u&&(go(e)?O.log(e.message):ho(e)?O.warn(e.message):O.warn(e))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=Co(e),s=So(e),c=`before send for type \`${e.type||`error`}\``,l=a===void 0?void 0:kn(a);if(s&&typeof l==`number`&&Ve()>l)return this.recordDroppedEvent(`sample_rate`,`error`),wi(mo(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));let u=yo(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(e===null)throw this.recordDroppedEvent(`event_processor`,u),mo("An event processor returned `null`, will not send event.");return t.data?.__sentry__===!0?e:bo(xo(this,i,e,t),c)}).then(i=>{if(i===null){if(this.recordDroppedEvent(`before_send`,u),o){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw mo(`${c} returned \`null\`, will not send event.`)}let a=n.getSession()||r.getSession();if(s&&a&&this._updateSessionFromEvent(a,i),o){let e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let l=i.transaction_info;return o&&l&&i.transaction!==e.transaction&&(i.transaction_info={...l,source:`custom`}),this.sendEvent(i,t),i}).then(null,e=>{throw go(e)||ho(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),po(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===Ya&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){u&&O.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0){u&&O.log(`No outcomes to send`);return}if(!this._dsn){u&&O.log(`No dsn provided, will not send outcomes`);return}u&&O.log(`Sending outcomes:`,e);let t=ro(e,this._options.tunnel&&Sn(this._dsn));this.sendEnvelope(t)}};function yo(e){return e===`replay_event`?`replay`:e||`error`}function bo(e,t){let n=`${t} must return \`null\` or a valid event.`;if(be(e))return e.then(e=>{if(!ge(e)&&e!==null)throw po(n);return e},e=>{throw po(`${t} rejected with ${e}`)});if(!ge(e)&&e!==null)throw po(n);return e}function xo(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,beforeSendSpan:o,ignoreSpans:s}=t,c=n;if(So(c)&&i)return i(c,r);if(Co(c)){if(o||s){let t=ao(c);if(s?.length&&sr(t,s))return null;if(o){let e=o(t);e?c=ht(n,oo(e)):nr()}if(c.spans){let t=[],n=c.spans;for(let e of n){if(s?.length&&sr(e,s)){cr(n,e);continue}if(o){let n=o(e);n?t.push(n):(nr(),t.push(e))}else t.push(e)}let r=c.spans.length-t.length;r&&e.recordDroppedEvent(`before_send`,`span`,r),c.spans=t}}if(a){if(c.spans){let e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(c,r)}}return c}function So(e){return e.type===void 0}function Co(e){return e.type===`transaction`}function wo(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Eo(e.attributes)}function To(e){let t=0;return e.message&&(t+=e.message.length*2),t+Eo(e.attributes)}function Eo(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*Do(e[0]):he(e)?t+=Do(e):t+=100}),t}function Do(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function Oo(e){return ce(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function ko(e){return Oo(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function Ao(e,t){t.debug===!0&&(u?O.enable():y(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),zt().update(t.initialScope);let n=new e(t);return jo(n),n.init(),n}function jo(e){zt().setClient(e)}var Mo=`thismessage:/`;function No(e){return`isRelative`in e}function Po(e,t){let n=e.indexOf(`://`)<=0&&e.indexOf(`//`)!==0,r=t??(n?Mo:void 0);try{if(`canParse`in URL&&!URL.canParse(e,r))return;let t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function Fo(e){if(No(e))return e.pathname;let t=new URL(e);return t.search=``,t.hash=``,[`80`,`443`].includes(t.port)&&(t.port=``),t.password&&=`%filtered%`,t.username&&=`%filtered%`,t.toString()}function Io(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Lo(e){return e.split(/[?#]/,1)[0]}function Ro(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function zo(e,...t){let n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join(`\0`).replace(/%/g,`%%`).replace(/\0/g,`%s`),n.__sentry_template_values__=t,n}var Bo=zo;function Vo(e){`aggregates`in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:`{{auto}}`}):e.ipAddress===void 0&&(e.ipAddress=`{{auto}}`)}function Ho(e,t,n=[t],r=`npm`){let i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:f})),i.version=f)}function Uo(e={}){let t=e.client||Ut();if(!na()||!t)return{};let n=Ft(p());if(n.getTraceData)return n.getTraceData(e);let r=e.scope||zt(),i=e.span||tr();if(!i&&Rt())return{};let a=i?zn(i):Wo(r),o=hn(i?hr(i):mr(t,r));if(!An.test(a))return O.warn(`Invalid sentry-trace data. Cannot generate trace data`),{};let s={"sentry-trace":a,baggage:o};return e.propagateTraceparent&&(s.traceparent=i?Bn(i):Go(r)),s}function Wo(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Nn(t,r,n)}function Go(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Pn(t,r,n)}var Ko=100;function qo(e,t){let n=Ut(),r=Bt();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Ko}=n.getOptions();if(a<=0)return;let o={timestamp:it(),...e},s=i?y(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var Jo,Yo=`FunctionToString`,Xo=new WeakMap,Zo=_a((()=>({name:Yo,setupOnce(){Jo=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Pe(this),n=Xo.has(Ut())&&t!==void 0?t:this;return Jo.apply(n,e)}}catch{}},setup(e){Xo.set(e,!0)}}))),Qo=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],$o=`EventFilters`,es=_a((e={})=>{let t;return{name:$o,setup(n){t=ns(e,n.getOptions())},processEvent(n,r,i){return t||=ns(e,i.getOptions()),rs(n,t)?null:n}}}),ts=_a(((e={})=>({...es(e),name:`InboundFilters`})));function ns(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Qo],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function rs(e,t){if(!e.type){if(is(e,t.ignoreErrors))return u&&O.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Qe(e)}`),!0;if(us(e))return u&&O.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${Qe(e)}`),!0;if(os(e,t.denyUrls))return u&&O.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Qe(e)}.\nUrl: ${ls(e)}`),!0;if(!ss(e,t.allowUrls))return u&&O.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Qe(e)}.\nUrl: ${ls(e)}`),!0}else if(e.type===`transaction`&&as(e,t.ignoreTransactions))return u&&O.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${Qe(e)}`),!0;return!1}function is(e,t){return t?.length?io(e).some(e=>Ke(e,t)):!1}function as(e,t){if(!t?.length)return!1;let n=e.transaction;return n?Ke(n,t):!1}function os(e,t){if(!t?.length)return!1;let n=ls(e);return n?Ke(n,t):!1}function ss(e,t){if(!t?.length)return!0;let n=ls(e);return n?Ke(n,t):!0}function cs(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function ls(e){try{let t=[...e.exception?.values??[]].reverse().find(e=>e.mechanism?.parent_id===void 0&&e.stacktrace?.frames?.length)?.stacktrace?.frames;return t?cs(t):null}catch{return u&&O.error(`Cannot extract url for event ${Qe(e)}`),null}}function us(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}function ds(e,t,n,r,i,a){if(!i.exception?.values||!a||!Se(a.originalException,Error))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=fs(e,t,r,a.originalException,n,i.exception.values,o,0))}function fs(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(Se(r[i],Error)){ms(o,s,r);let a=e(t,r[i]),l=c.length;hs(a,i,l,s),c=fs(e,t,n,r[i],i,[a,...c],a,l)}return ps(r)&&r.errors.forEach((a,l)=>{if(Se(a,Error)){ms(o,s,r);let u=e(t,a),d=c.length;hs(u,`errors[${l}]`,d,s),c=fs(e,t,n,a,i,[u,...c],u,d)}}),c}function ps(e){return Array.isArray(e.errors)}function ms(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...ps(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function hs(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function gs(e){let t=`console`;V(t,e),H(t,_s)}function _s(){`console`in d&&g.forEach(function(e){e in d.console&&je(d.console,e,function(t){return v[e]=t,function(...t){U(`console`,{args:t,level:e}),v[e]?.apply(d.console,t)}})})}function vs(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var ys=`Dedupe`,bs=_a((()=>{let e;return{name:ys,processEvent(t){if(t.type)return t;try{if(xs(t,e))return u&&O.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}}));function xs(e,t){return t?!!(Ss(e,t)||Cs(e,t)):!1}function Ss(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Ts(e,t)||!ws(e,t))}function Cs(e,t){let n=Es(t),r=Es(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Ts(e,t)||!ws(e,t))}function ws(e,t){let n=ee(e),r=ee(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function Ts(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join(``)===r.join(``)}catch{return!1}}function Es(e){return e.exception?.values?.[0]}var Ds=`ConversationId`,Os=_a((()=>({name:Ds,setup(e){e.on(`spanStart`,e=>{let t=zt().getScopeData(),n=Bt().getScopeData(),r=t.conversationId||n.conversationId;r&&e.setAttribute(rn,r)})}})));function ks(e,t,n,r,i){if(!e.fetchData)return;let{method:a,url:o}=e.fetchData,s=ar()&&t(o);if(e.endTimestamp){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&(s&&(Ms(n,e),As(n,e,i)),delete r[t]);return}let{spanOrigin:c=`auto.http.browser`,propagateTraceparent:l=!1}=typeof i==`object`?i:{spanOrigin:i},u=!!tr(),d=s&&u?ii(Fs(o,a,c)):new gr;if(e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){let t=e.args[0],n={...e.args[1]||{}},r=js(t,n,ar()&&u?d:void 0,l);r&&(e.args[1]=n,n.headers=r)}let f=Ut();if(f){let t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit(`beforeOutgoingRequestSpan`,d,t)}return d}function As(e,t,n){(typeof n==`object`&&n?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function js(e,t,n,r){let i=Uo({span:n,propagateTraceparent:r}),a=i[`sentry-trace`],o=i.baggage,s=i.traceparent;if(!a)return;let c=t.headers||(we(e)?e.headers:void 0);if(!c)return{...i};if(Ps(c)){let e=new Headers(c);if(e.get(`sentry-trace`)||e.set(`sentry-trace`,a),r&&s&&!e.get(`traceparent`)&&e.set(`traceparent`,s),o){let t=e.get(`baggage`);t?Ns(t)||e.set(`baggage`,`${t},${o}`):e.set(`baggage`,o)}return e}else if(Array.isArray(c)){let e=[...c];c.find(e=>e[0]===`sentry-trace`)||e.push([`sentry-trace`,a]),r&&s&&!c.find(e=>e[0]===`traceparent`)&&e.push([`traceparent`,s]);let t=c.find(e=>e[0]===`baggage`&&Ns(e[1]));return o&&!t&&e.push([`baggage`,o]),e}else{let e=`sentry-trace`in c?c[`sentry-trace`]:void 0,t=`traceparent`in c?c.traceparent:void 0,n=`baggage`in c?c.baggage:void 0,i=n?Array.isArray(n)?[...n]:[n]:[],l=n&&(Array.isArray(n)?n.find(e=>Ns(e)):Ns(n));o&&!l&&i.push(o);let u={...c,"sentry-trace":e??a,baggage:i.length>0?i.join(`,`):void 0};return r&&s&&!t&&(u.traceparent=s),u}}function Ms(e,t){if(t.response){on(e,t.response.status);let n=t.response?.headers?.get(`content-length`);if(n){let t=parseInt(n);t>0&&e.setAttribute(`http.response_content_length`,t)}}else t.error&&e.setStatus({code:2,message:`internal_error`});e.end()}function Ns(e){return e.split(`,`).some(e=>e.trim().startsWith(pn))}function Ps(e){return typeof Headers<`u`&&Se(e,Headers)}function Fs(e,t,n){if(e.startsWith(`data:`))return{name:`${t} ${Ro(e)}`,attributes:Is(e,void 0,t,n)};let r=Po(e);return{name:`${t} ${r?Fo(r):e}`,attributes:Is(e,r,t,n)}}function Is(e,t,n,r){let i={url:Ro(e),type:`fetch`,"http.method":n,[Yt]:r,[Jt]:`http.client`};return t&&(No(t)||(i[`http.url`]=Ro(t.href),i[`server.address`]=t.host),t.search&&(i[`http.query`]=t.search),t.hash&&(i[`http.fragment`]=t.hash)),i}var Ls=s({debug:()=>Bs,error:()=>Us,fatal:()=>Ws,fmt:()=>Bo,info:()=>Vs,trace:()=>zs,warn:()=>Hs});function Rs(e,t,n,r,i){Na({level:e,message:t,attributes:n,severityNumber:i},r)}function zs(e,t,{scope:n}={}){Rs(`trace`,e,t,n)}function Bs(e,t,{scope:n}={}){Rs(`debug`,e,t,n)}function Vs(e,t,{scope:n}={}){Rs(`info`,e,t,n)}function Hs(e,t,{scope:n}={}){Rs(`warn`,e,t,n)}function Us(e,t,{scope:n}={}){Rs(`error`,e,t,n)}function Ws(e,t,{scope:n}={}){Rs(`fatal`,e,t,n)}function Gs(e,t,n,r){Wa({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function Ks(e,t=1,n){Gs(`counter`,e,t,n)}function qs(e,t,n){Gs(`gauge`,e,t,n)}function Js(e,t,n){Gs(`distribution`,e,t,n)}function Ys(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var Xs=d;function Zs(){return`history`in Xs&&!!Xs.history}function Qs(){if(!(`fetch`in Xs))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function $s(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function ec(){if(typeof EdgeRuntime==`string`)return!0;if(!Qs())return!1;if($s(Xs.fetch))return!0;let e=!1,t=Xs.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=$s(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){u&&O.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function tc(e,t){let n=`fetch`;V(n,e),H(n,()=>rc(void 0,t))}function nc(e){let t=`fetch-body-resolved`;V(t,e),H(t,()=>rc(ac))}function rc(e,t=!1){t&&!ec()||je(d,`fetch`,function(t){return function(...n){let r=Error(),{method:i,url:a}=cc(n),o={args:n,fetchData:{method:i,url:a},startTimestamp:st()*1e3,virtualError:r,headers:lc(n)};return e||U(`fetch`,{...o}),t.apply(d,n).then(async t=>(e?e(t):U(`fetch`,{...o,endTimestamp:st()*1e3,response:t}),t),e=>{U(`fetch`,{...o,endTimestamp:st()*1e3,error:e}),ce(e)&&e.stack===void 0&&(e.stack=r.stack,Me(e,`framesToPop`,1));let t=Ut()?.getOptions().enhanceFetchErrorMessages??`always`;if(t!==!1&&e instanceof TypeError&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{let n=new URL(o.fetchData.url).host;t===`always`?e.message=`${e.message} (${n})`:Me(e,`__sentry_fetch_url_host__`,n)}catch{}throw e})}})}async function ic(e,t){if(e?.body){let n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3),a=!0;for(;a;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);let{done:i}=await r.read();clearTimeout(e),i&&(t(),a=!1)}catch{a=!1}finally{clearTimeout(e)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function ac(e){let t;try{t=e.clone()}catch{return}ic(t,()=>{U(`fetch-body-resolved`,{endTimestamp:st()*1e3,response:e})})}function oc(e,t){return!!e&&typeof e==`object`&&!!e[t]}function sc(e){return typeof e==`string`?e:e?oc(e,`url`)?e.url:e.toString?e.toString():``:``}function cc(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:sc(t),method:oc(n,`method`)?String(n.method).toUpperCase():we(t)&&oc(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:sc(t),method:oc(t,`method`)?String(t.method).toUpperCase():`GET`}}function lc(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(we(t))return new Headers(t.headers)}catch{}}function uc(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function dc(){return`npm`}function fc(){return!uc()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function pc(){return typeof window<`u`&&(!fc()||mc())}function mc(){return d.process?.type===`renderer`}var hc=d,gc=0;function _c(){return gc>0}function vc(){gc++,setTimeout(()=>{gc--})}function yc(e,t={}){function n(e){return typeof e==`function`}if(!n(e))return e;try{let t=e.__sentry_wrapped__;if(t)return typeof t==`function`?t:e;if(Pe(e))return e}catch{return e}let r=function(...n){try{let r=n.map(e=>yc(e,t));return e.apply(this,r)}catch(e){throw vc(),Ht(r=>{r.addEventProcessor(e=>(t.mechanism&&($e(e,void 0,void 0),et(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),$i(e)}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}Ne(r,e),Me(e,`__sentry_wrapped__`,r);try{Object.getOwnPropertyDescriptor(r,`name`).configurable&&Object.defineProperty(r,`name`,{get(){return e.name}})}catch{}return r}function bc(){let e=ke(),{referrer:t}=hc.document||{},{userAgent:n}=hc.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function xc(e,t){let n=wc(e,t),r={type:kc(t),value:Ac(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function Sc(e,t,n,r){let i=Ut()?.getOptions().normalizeDepth,a=Lc(t),o={__serialized__:vr(t,i)};if(a)return{exception:{values:[xc(e,a)]},extra:o};let s={exception:{values:[{type:_e(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:Fc(t,{isUnhandledRejection:r})}]},extra:o};if(n){let t=wc(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}function Cc(e,t){return{exception:{values:[xc(e,t)]}}}function wc(e,t){let n=t.stacktrace||t.stack||``,r=Ec(t),i=Dc(t);try{return e(n,r,i)}catch{}return[]}var Tc=/Minified React error #\d+;/i;function Ec(e){return e&&Tc.test(e.message)?1:0}function Dc(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function Oc(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0?e instanceof WebAssembly.Exception:!1}function kc(e){let t=e?.name;return!t&&Oc(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function Ac(e){let t=e?.message;return Oc(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?ko(t.error):ko(e):`No error message`}function jc(e,t,n,r){let i=Nc(e,t,n?.syntheticException||void 0,r);return et(i),i.level=`error`,n?.event_id&&(i.event_id=n.event_id),Ci(i)}function Mc(e,t,n=`info`,r,i){let a=Pc(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),Ci(a)}function Nc(e,t,n,r,i){let a;if(ue(t)&&t.error)return Cc(e,t.error);if(de(t)||fe(t)){let i=t;if(`stack`in t)a=Cc(e,t);else{let t=i.name||(de(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=Pc(e,o,n,r),$e(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return ce(t)?Cc(e,t):ge(t)||_e(t)?(a=Sc(e,t,n,i),et(a,{synthetic:!0}),a):(a=Pc(e,t,n,r),$e(a,`${t}`,void 0),et(a,{synthetic:!0}),a)}function Pc(e,t,n,r){let i={};if(r&&n){let r=wc(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),et(i,{synthetic:!0})}if(me(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function Fc(e,{isUnhandledRejection:t}){let n=Re(e),r=t?`promise rejection`:`exception`;return ue(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:_e(e)?`Event \`${Ic(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Ic(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Lc(e){return Object.values(e).find(e=>e instanceof Error)}var Rc=class extends vo{constructor(e){let t=zc(e);Ho(t,`browser`,[`browser`],hc.SENTRY_SDK_SOURCE||dc()),t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:t.sendDefaultPii?`auto`:`never`,...t._metadata.sdk.settings}),super(t);let{sendDefaultPii:n,sendClientReports:r,enableLogs:i,_experiments:a,enableMetrics:o}=this._options,s=o??a?.enableMetrics??!0;hc.document&&(r||i||s)&&hc.document.addEventListener(`visibilitychange`,()=>{hc.document.visibilityState===`hidden`&&(r&&this._flushOutcomes(),i&&Pa(this),s&&Ga(this))}),n&&this.on(`beforeSendSession`,Vo)}eventFromException(e,t){return jc(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return Mc(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n,r)}};function zc(e){return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:hc.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var Bc=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Vc=d,Hc=(e,t)=>e>t[1]?`poor`:e>t[0]?`needs-improvement`:`good`,Uc=(e,t,n,r)=>{let i,a;return o=>{t.value>=0&&(o||r)&&(a=t.value-(i??0),(a||i===void 0)&&(i=t.value,t.delta=a,t.rating=Hc(t.value,n),e(t)))}},Wc=(e=!0)=>{let t=Vc.performance?.getEntriesByType?.(`navigation`)[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Gc=()=>Wc()?.activationStart??0;function Kc(e,t,n){Vc.document&&Vc.addEventListener(e,t,n)}function qc(e,t,n){Vc.document&&Vc.removeEventListener(e,t,n)}var Jc=-1,Yc=new Set,Xc=()=>Vc.document?.visibilityState===`hidden`&&!Vc.document?.prerendering?0:1/0,Zc=e=>{if($c(e)&&Jc>-1){if(e.type===`visibilitychange`||e.type===`pagehide`)for(let e of Yc)e();isFinite(Jc)||(Jc=e.type===`visibilitychange`?e.timeStamp:0,qc(`prerenderingchange`,Zc,!0))}},Qc=()=>{if(Vc.document&&Jc<0){let e=Gc();Jc=(Vc.document.prerendering?void 0:globalThis.performance.getEntriesByType(`visibility-state`).filter(t=>t.name===`hidden`&&t.startTime>e)[0]?.startTime)??Xc(),Kc(`visibilitychange`,Zc,!0),Kc(`pagehide`,Zc,!0),Kc(`prerenderingchange`,Zc,!0)}return{get firstHiddenTime(){return Jc},onHidden(e){Yc.add(e)}}};function $c(e){return e.type===`pagehide`||Vc.document?.visibilityState===`hidden`}var el=()=>`v5-${Date.now()}-${Math.floor(Math.random()*8999999999999)+0xe8d4a51000}`,tl=(e,t=-1)=>{let n=Wc(),r=`navigate`;return n&&(Vc.document?.prerendering||Gc()>0?r=`prerender`:Vc.document?.wasDiscarded?r=`restore`:n.type&&(r=n.type.replace(/_/g,`-`))),{name:e,value:t,rating:`good`,delta:0,entries:[],id:el(),navigationType:r}},nl=new WeakMap;function rl(e,t){try{return nl.get(e)||nl.set(e,new t),nl.get(e)}catch{return new t}}var il=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;let t=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}},al=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},ol=e=>{let t=!1;return()=>{t||=(e(),!0)}},sl=e=>{Vc.document?.prerendering?addEventListener(`prerenderingchange`,()=>e(),!0):e()},cl=[1800,3e3],ll=(e,t={})=>{sl(()=>{let n=Qc(),r=tl(`FCP`),i,a=al(`paint`,e=>{for(let t of e)t.name===`first-contentful-paint`&&(a.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Gc(),0),r.entries.push(t),i(!0)))});a&&(i=Uc(e,r,cl,t.reportAllChanges))})},ul=[.1,.25],dl=(e,t={})=>{ll(ol(()=>{let n=tl(`CLS`,0),r,i=Qc(),a=rl(t,il),o=e=>{for(let t of e)a._processEntry(t);a._sessionValue>n.value&&(n.value=a._sessionValue,n.entries=a._sessionEntries,r())},s=al(`layout-shift`,o);s&&(r=Uc(e,n,ul,t.reportAllChanges),i.onHidden(()=>{o(s.takeRecords()),r(!0)}),Vc?.setTimeout?.(r))}))},fl=0,pl=1/0,ml=0,hl=e=>{e.forEach(e=>{e.interactionId&&(pl=Math.min(pl,e.interactionId),ml=Math.max(ml,e.interactionId),fl=ml?(ml-pl)/7+1:0)})},gl,_l=()=>gl?fl:performance.interactionCount||0,vl=()=>{`interactionCount`in performance||gl||(gl=al(`event`,hl,{type:`event`,buffered:!0,durationThreshold:0}))},yl=10,bl=0,xl=()=>_l()-bl,Sl=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){bl=_l(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let e=Math.min(this._longestInteractionList.length-1,Math.floor(xl()/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!(e.interactionId||e.entryType===`first-input`))return;let t=this._longestInteractionList.at(-1),n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<yl||e.duration>t._latency){if(n?e.duration>n._latency?(n.entries=[e],n._latency=e.duration):e.duration===n._latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((e,t)=>t._latency-e._latency),this._longestInteractionList.length>yl){let e=this._longestInteractionList.splice(yl);for(let t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}},Cl=e=>{let t=Vc.requestIdleCallback||Vc.setTimeout;Vc.document?.visibilityState===`hidden`?e():(e=ol(e),Kc(`visibilitychange`,e,{once:!0,capture:!0}),Kc(`pagehide`,e,{once:!0,capture:!0}),t(()=>{e(),qc(`visibilitychange`,e,{capture:!0}),qc(`pagehide`,e,{capture:!0})}))},wl=[200,500],Tl=40,El=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype))return;let n=Qc();sl(()=>{vl();let r=tl(`INP`),i,a=rl(t,Sl),o=e=>{Cl(()=>{for(let t of e)a._processEntry(t);let t=a._estimateP98LongestInteraction();t&&t._latency!==r.value&&(r.value=t._latency,r.entries=t.entries,i())})},s=al(`event`,o,{durationThreshold:t.durationThreshold??Tl});i=Uc(e,r,wl,t.reportAllChanges),s&&(s.observe({type:`first-input`,buffered:!0}),n.onHidden(()=>{o(s.takeRecords()),i(!0)}))})},Dl=class{_processEntry(e){this._onBeforeProcessingEntry?.(e)}},Ol=[2500,4e3],kl=(e,t={})=>{sl(()=>{let n=Qc(),r=tl(`LCP`),i,a=rl(t,Dl),o=e=>{t.reportAllChanges||(e=e.slice(-1));for(let t of e)a._processEntry(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Gc(),0),r.entries=[t],i())},s=al(`largest-contentful-paint`,o);if(s){i=Uc(e,r,Ol,t.reportAllChanges);let n=ol(()=>{o(s.takeRecords()),s.disconnect(),i(!0)}),a=e=>{e.isTrusted&&(Cl(n),qc(e.type,a,{capture:!0}))};for(let e of[`keydown`,`click`,`visibilitychange`])Kc(e,a,{capture:!0})}})},Al=[800,1800],jl=e=>{Vc.document?.prerendering?sl(()=>jl(e)):Vc.document?.readyState===`complete`?setTimeout(e):addEventListener(`load`,()=>jl(e),!0)},Ml=(e,t={})=>{let n=tl(`TTFB`),r=Uc(e,n,Al,t.reportAllChanges);jl(()=>{let e=Wc();e&&(n.value=Math.max(e.responseStart-Gc(),0),n.entries=[e],r(!0))})},Nl={},Pl={},Fl,Il,Ll,Rl;function zl(e,t=!1){return Yl(`cls`,e,Gl,Fl,t)}function Bl(e,t=!1){return Yl(`lcp`,e,Kl,Il,t)}function Vl(e){return Yl(`ttfb`,e,ql,Ll)}function Hl(e){return Yl(`inp`,e,Jl,Rl)}function Ul(e,t){return Zl(e,t),Pl[e]||(Xl(e),Pl[e]=!0),Ql(e,t)}function Wl(e,t){let n=Nl[e];if(n?.length)for(let r of n)try{r(t)}catch(t){Bc&&O.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${L(r)}\nError:`,t)}}function Gl(){return dl(e=>{Wl(`cls`,{metric:e}),Fl=e},{reportAllChanges:!0})}function Kl(){return kl(e=>{Wl(`lcp`,{metric:e}),Il=e},{reportAllChanges:!0})}function ql(){return Ml(e=>{Wl(`ttfb`,{metric:e}),Ll=e})}function Jl(){return El(e=>{Wl(`inp`,{metric:e}),Rl=e})}function Yl(e,t,n,r,i=!1){Zl(e,t);let a;return Pl[e]||(a=n(),Pl[e]=!0),r&&t({metric:r}),Ql(e,t,i?a:void 0)}function Xl(e){let t={};e===`event`&&(t.durationThreshold=0),al(e,t=>{Wl(e,{entries:t})},t)}function Zl(e,t){Nl[e]=Nl[e]||[],Nl[e].push(t)}function Ql(e,t,n){return()=>{n&&n();let r=Nl[e];if(!r)return;let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function $l(e){return`duration`in e}var eu=e=>{let t=t=>{(t.type===`pagehide`||Vc.document?.visibilityState===`hidden`)&&e(t)};Kc(`visibilitychange`,t,{capture:!0,once:!0}),Kc(`pagehide`,t,{capture:!0,once:!0})};function tu(e){return typeof e==`number`&&isFinite(e)}function nu(e,t,n,{...r}){let i=Wn(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime==`function`&&e.updateStartTime(t),ai(e,()=>{let e=ii({startTime:t,...r});return e&&e.end(n),e})}function ru(e){let t=Ut();if(!t)return;let{name:n,transaction:r,attributes:i,startTime:a}=e,{release:o,environment:s,sendDefaultPii:c}=t.getOptions(),l=t.getIntegrationByName(`Replay`)?.getReplayId(),u=zt(),d=u.getUser(),f=d===void 0?void 0:d.email||d.id||d.ip_address,p;try{p=u.getScopeData().contexts.profile.profile_id}catch{}return ii({name:n,attributes:{release:o,environment:s,user:f||void 0,profile_id:p||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":Vc.navigator?.userAgent,"client.address":c?`{{auto}}`:void 0,...i},startTime:a,experimental:{standalone:!0}})}function iu(){return Vc.addEventListener&&Vc.performance}function au(e){return e/1e3}function ou(e){let t=`unknown`,n=`unknown`,r=``;for(let i of e){if(i===`/`){[t,n]=e.split(`/`);break}if(!isNaN(Number(i))){t=r===`h`?`http`:r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function su(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function cu(e,t){let n,r=!1;function i(e){!r&&n&&t(e,n),r=!0}eu(()=>{i(`pagehide`)});let a=e.on(`beforeStartNavigationSpan`,(e,t)=>{t?.isRedirect||(i(`navigation`),a(),o())}),o=e.on(`afterStartPageLoadSpan`,e=>{n=e.spanContext().spanId,o()})}function lu(e){let t=0,n;if(!su(`layout-shift`))return;let r=zl(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);cu(e,(e,i)=>{uu(t,n,i,e),r()})}function uu(e,t,n,r){Bc&&O.log(`Sending CLS span (${e})`);let i=t?au((ut()||0)+t.startTime):st(),a=zt().getScopeData().transactionName,o=t?De(t.sources[0]?.node):`Layout shift`,s={[Yt]:`auto.http.browser.cls`,[Jt]:`ui.webvital.cls`,[tn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((e,t)=>{s[`cls.source.${t+1}`]=De(e.node)});let c=ru({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`cls`,{[Zt]:``,[Qt]:e}),c.end(i))}function du(e){let t=0,n;if(!su(`largest-contentful-paint`))return;let r=Bl(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);cu(e,(e,i)=>{fu(t,n,i,e),r()})}function fu(e,t,n,r){Bc&&O.log(`Sending LCP span (${e})`);let i=au((ut()||0)+(t?.startTime||0)),a=zt().getScopeData().transactionName,o=t?De(t.element):`Largest contentful paint`,s={[Yt]:`auto.http.browser.lcp`,[Jt]:`ui.webvital.lcp`,[tn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(s[`lcp.element`]=De(t.element)),t.id&&(s[`lcp.id`]=t.id),t.url&&(s[`lcp.url`]=t.url),t.loadTime!=null&&(s[`lcp.loadTime`]=t.loadTime),t.renderTime!=null&&(s[`lcp.renderTime`]=t.renderTime),t.size!=null&&(s[`lcp.size`]=t.size));let c=ru({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`lcp`,{[Zt]:`millisecond`,[Qt]:e}),c.end(i))}function pu(e){return e&&((ut()||performance.timeOrigin)+e)/1e3}function mu(e){let t={};if(e.nextHopProtocol!=null){let{name:n,version:r}=ou(e.nextHopProtocol);t[`network.protocol.version`]=r,t[`network.protocol.name`]=n}return ut()||iu()?.timeOrigin?hu({...t,"http.request.redirect_start":pu(e.redirectStart),"http.request.redirect_end":pu(e.redirectEnd),"http.request.worker_start":pu(e.workerStart),"http.request.fetch_start":pu(e.fetchStart),"http.request.domain_lookup_start":pu(e.domainLookupStart),"http.request.domain_lookup_end":pu(e.domainLookupEnd),"http.request.connect_start":pu(e.connectStart),"http.request.secure_connection_start":pu(e.secureConnectionStart),"http.request.connection_end":pu(e.connectEnd),"http.request.request_start":pu(e.requestStart),"http.request.response_start":pu(e.responseStart),"http.request.response_end":pu(e.responseEnd),"http.request.time_to_first_byte":e.responseStart==null?void 0:e.responseStart/1e3}):t}function hu(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!=null))}var gu=2147483647,_u=0,vu={},yu,bu;function xu({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){let r=iu();if(r&&ut()){r.mark&&Vc.performance.mark(`sentry-tracing-init`);let i=t?du(n):Eu(),a=Du(),o=e?lu(n):Tu();return()=>{i?.(),a(),o?.()}}return()=>void 0}function Su(){Ul(`longtask`,({entries:e})=>{let t=tr();if(!t)return;let{op:n,start_timestamp:r}=Wn(t);for(let i of e){let e=au(ut()+i.startTime),a=au(i.duration);n===`navigation`&&r&&e<r||nu(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-task`,attributes:{[Yt]:`auto.ui.browser.metrics`}})}})}function Cu(){new PerformanceObserver(e=>{let t=tr();if(t)for(let n of e.getEntries()){if(!n.scripts[0])continue;let e=au(ut()+n.startTime),{start_timestamp:r,op:i}=Wn(t);if(i===`navigation`&&r&&e<r)continue;let a=au(n.duration),o={[Yt]:`auto.ui.browser.metrics`},{invoker:s,invokerType:c,sourceURL:l,sourceFunctionName:u,sourceCharPosition:d}=n.scripts[0];o[`browser.script.invoker`]=s,o[`browser.script.invoker_type`]=c,l&&(o[`code.filepath`]=l),u&&(o[`code.function`]=u),d!==-1&&(o[`browser.script.source_char_position`]=d),nu(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-animation-frame`,attributes:o})}}).observe({type:`long-animation-frame`,buffered:!0})}function wu(){Ul(`event`,({entries:e})=>{let t=tr();if(t){for(let n of e)if(n.name===`click`){let e=au(ut()+n.startTime),r=au(n.duration),i={name:De(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[Yt]:`auto.ui.browser.metrics`}},a=Ae(n.target);a&&(i.attributes[`ui.component_name`]=a),nu(t,e,e+r,i)}}})}function Tu(){return zl(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(vu.cls={value:e.value,unit:``},bu=t)},!0)}function Eu(){return Bl(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(vu.lcp={value:e.value,unit:`millisecond`},yu=t)},!0)}function Du(){return Vl(({metric:e})=>{e.entries[e.entries.length-1]&&(vu.ttfb={value:e.value,unit:`millisecond`})})}function Ou(e,t){let n=iu(),r=ut();if(!n?.getEntries||!r)return;let i=au(r),a=n.getEntries(),{op:o,start_timestamp:s}=Wn(e);a.slice(_u).forEach(n=>{let r=au(n.startTime),a=au(Math.max(0,n.duration));if(!(o===`navigation`&&s&&i+r<s))switch(n.entryType){case`navigation`:Mu(e,n,i);break;case`mark`:case`paint`:case`measure`:{Au(e,n,r,a,i,t.ignorePerformanceApiSpans);let o=Qc(),s=n.startTime<o.firstHiddenTime;n.name===`first-paint`&&s&&(vu.fp={value:n.startTime,unit:`millisecond`}),n.name===`first-contentful-paint`&&s&&(vu.fcp={value:n.startTime,unit:`millisecond`});break}case`resource`:Iu(e,n,n.name,r,a,i,t.ignoreResourceSpans);break}}),_u=Math.max(a.length-1,0),Lu(e),o===`pageload`&&(Bu(vu),t.recordClsOnPageloadSpan||delete vu.cls,t.recordLcpOnPageloadSpan||delete vu.lcp,Object.entries(vu).forEach(([e,t])=>{Gr(e,t.value,t.unit)}),e.setAttribute(`performance.timeOrigin`,i),e.setAttribute(`performance.activationStart`,Gc()),Ru(e,t)),yu=void 0,bu=void 0,vu={}}function ku(e){if(e?.entryType===`measure`)try{return e.detail.devtools.track===`Components ⚛`}catch{return}}function Au(e,t,n,r,i,a){if(ku(t)||[`mark`,`measure`].includes(t.entryType)&&Ke(t.name,a))return;let o=Wc(!1),s=au(o?o.requestStart:0),c=i+Math.max(n,s),l=i+n,u=l+r,d={[Yt]:`auto.resource.browser.metrics`};c!==l&&(d[`sentry.browser.measure_happened_before_request`]=!0,d[`sentry.browser.measure_start_time`]=c),ju(d,t),c<=u&&nu(e,c,u,{name:t.name,op:t.entryType,attributes:d})}function ju(e,t){try{let n=t.detail;if(!n)return;if(typeof n==`object`){for(let[t,r]of Object.entries(n))if(r&&he(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(r!==void 0)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(he(n)){e[`sentry.browser.measure.detail`]=n;return}try{e[`sentry.browser.measure.detail`]=JSON.stringify(n)}catch{}}catch{}}function Mu(e,t,n){[`unloadEvent`,`redirect`,`domContentLoadedEvent`,`loadEvent`,`connect`].forEach(r=>{Nu(e,t,r,n)}),Nu(e,t,`secureConnection`,n,`TLS/SSL`),Nu(e,t,`fetch`,n,`cache`),Nu(e,t,`domainLookup`,n,`DNS`),Fu(e,t,n)}function Nu(e,t,n,r,i=n){let a=t[Pu(n)],o=t[`${n}Start`];!o||!a||nu(e,r+au(o),r+au(a),{op:`browser.${i}`,name:t.name,attributes:{[Yt]:`auto.ui.browser.metrics`,...n===`redirect`&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function Pu(e){return e===`secureConnection`?`connectEnd`:e===`fetch`?`domainLookupStart`:`${e}End`}function Fu(e,t,n){let r=n+au(t.requestStart),i=n+au(t.responseEnd),a=n+au(t.responseStart);t.responseEnd&&(nu(e,r,i,{op:`browser.request`,name:t.name,attributes:{[Yt]:`auto.ui.browser.metrics`}}),nu(e,a,i,{op:`browser.response`,name:t.name,attributes:{[Yt]:`auto.ui.browser.metrics`}}))}function Iu(e,t,n,r,i,a,o){if(t.initiatorType===`xmlhttprequest`||t.initiatorType===`fetch`)return;let s=t.initiatorType?`resource.${t.initiatorType}`:`resource.other`;if(o?.includes(s))return;let c={[Yt]:`auto.resource.browser.metrics`},l=Io(n);l.protocol&&(c[`url.scheme`]=l.protocol.split(`:`).pop()),l.host&&(c[`server.address`]=l.host),c[`url.same_origin`]=n.includes(Vc.location.origin),zu(t,c,[[`responseStatus`,`http.response.status_code`],[`transferSize`,`http.response_transfer_size`],[`encodedBodySize`,`http.response_content_length`],[`decodedBodySize`,`http.decoded_response_content_length`],[`renderBlockingStatus`,`resource.render_blocking_status`],[`deliveryType`,`http.response_delivery_type`]]);let u={...c,...mu(t)},d=a+r;nu(e,d,d+i,{name:n.replace(Vc.location.origin,``),op:s,attributes:u})}function Lu(e){let t=Vc.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setAttribute(`effectiveConnectionType`,n.effectiveType),n.type&&e.setAttribute(`connectionType`,n.type),tu(n.rtt)&&(vu[`connection.rtt`]={value:n.rtt,unit:`millisecond`})),tu(t.deviceMemory)&&e.setAttribute(`deviceMemory`,`${t.deviceMemory} GB`),tu(t.hardwareConcurrency)&&e.setAttribute(`hardwareConcurrency`,String(t.hardwareConcurrency))}function Ru(e,t){yu&&t.recordLcpOnPageloadSpan&&(yu.element&&e.setAttribute(`lcp.element`,De(yu.element)),yu.id&&e.setAttribute(`lcp.id`,yu.id),yu.url&&e.setAttribute(`lcp.url`,yu.url.trim().slice(0,200)),yu.loadTime!=null&&e.setAttribute(`lcp.loadTime`,yu.loadTime),yu.renderTime!=null&&e.setAttribute(`lcp.renderTime`,yu.renderTime),e.setAttribute(`lcp.size`,yu.size)),bu?.sources&&t.recordClsOnPageloadSpan&&bu.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,De(t.node)))}function zu(e,t,n){n.forEach(([n,r])=>{let i=e[n];i!=null&&(typeof i==`number`&&i<gu||typeof i==`string`)&&(t[r]=i)})}function Bu(e){let t=Wc(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e[`ttfb.requestTime`]={value:n-r,unit:`millisecond`})}var Vu=1e3,Hu,Uu,Wu;function Gu(e){V(`dom`,e),H(`dom`,Ku)}function Ku(){if(!Vc.document)return;let e=U.bind(null,`dom`),t=Yu(e,!0);Vc.document.addEventListener(`click`,t,!1),Vc.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=Vc[t]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(je(n,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=Yu(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),je(n,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function qu(e){if(e.type!==Uu)return!1;try{if(!e.target||e.target._sentryId!==Wu)return!1}catch{}return!0}function Ju(e,t){return e===`keypress`?t?.tagName?!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!0:!1}function Yu(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=Xu(n);if(Ju(n.type,r))return;Me(n,`_sentryCaptured`,!0),r&&!r._sentryId&&Me(r,`_sentryId`,Xe());let i=n.type===`keypress`?`input`:n.type;qu(n)||(e({event:n,name:i,global:t}),Uu=n.type,Wu=r?r._sentryId:void 0),clearTimeout(Hu),Hu=Vc.setTimeout(()=>{Wu=void 0,Uu=void 0},Vu)}}function Xu(e){try{return e.target}catch{return null}}var Zu;function Qu(e){let t=`history`;V(t,e),H(t,$u)}function $u(){if(Vc.addEventListener(`popstate`,()=>{let e=Vc.location.href,t=Zu;Zu=e,t!==e&&U(`history`,{from:t,to:e})}),!Zs())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=Zu,i=ed(String(n));if(Zu=i,r===i)return e.apply(this,t);U(`history`,{from:r,to:i})}return e.apply(this,t)}}je(Vc.history,`pushState`,e),je(Vc.history,`replaceState`,e)}function ed(e){try{return new URL(e,Vc.location.origin).toString()}catch{return e}}var td={};function nd(e){let t=td[e];if(t)return t;let n=Vc[e];if($s(n))return td[e]=n.bind(Vc);let r=Vc.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){Bc&&O.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(td[e]=n.bind(Vc))}function rd(e){td[e]=void 0}var id=`__sentry_xhr_v3__`;function ad(e){V(`xhr`,e),H(`xhr`,od)}function od(){if(!Vc.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=st()*1e3,a=pe(n[0])?n[0].toUpperCase():void 0,o=sd(n[1]);if(!a||!o)return e.apply(t,n);t[id]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[id];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}U(`xhr`,{endTimestamp:st()*1e3,startTimestamp:i,xhr:t,virtualError:r})}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[id];return a&&pe(r)&&pe(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[id];return r?(n[0]!==void 0&&(r.body=n[0]),U(`xhr`,{startTimestamp:st()*1e3,xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function sd(e){if(pe(e))return e;try{return e.toString()}catch{}}function cd(e){let t;try{t=e.getAllResponseHeaders()}catch(t){return Bc&&O.error(t,`Failed to get xhr response headers`,e),{}}return t?t.split(`\r
|
|
5
|
+
`).reduce((e,t)=>{let[n,r]=t.split(`: `);return r&&(e[n.toLowerCase()]=r),e},{}):{}}var ld=[],ud=new Map,dd=new Map,fd=60;function pd(){if(iu()&&ut()){let e=hd();return()=>{e()}}return()=>void 0}var md={click:`click`,pointerdown:`click`,pointerup:`click`,mousedown:`click`,mouseup:`click`,touchstart:`click`,touchend:`click`,mouseover:`hover`,mouseout:`hover`,mouseenter:`hover`,mouseleave:`hover`,pointerover:`hover`,pointerout:`hover`,pointerenter:`hover`,pointerleave:`hover`,dragstart:`drag`,dragend:`drag`,drag:`drag`,dragenter:`drag`,dragleave:`drag`,dragover:`drag`,drop:`drag`,keydown:`press`,keyup:`press`,keypress:`press`,input:`press`};function hd(){return Hl(gd)}var gd=({metric:e})=>{if(e.value==null)return;let t=au(e.value);if(t>fd)return;let n=e.entries.find(t=>t.duration===e.value&&md[t.name]);if(!n)return;let{interactionId:r}=n,i=md[n.name],a=au(ut()+n.startTime),o=tr(),s=o?er(o):void 0,c=r==null?void 0:ud.get(r),l=c?.span||s,u=l?Wn(l).description:zt().getScopeData().transactionName,d=ru({name:c?.elementName||De(n.target),transaction:u,attributes:{[Yt]:`auto.http.browser.inp`,[Jt]:`ui.interaction.${i}`,[tn]:n.duration},startTime:a});d&&(d.addEvent(`inp`,{[Zt]:`millisecond`,[Qt]:e.value}),d.end(a+t))};function _d(){let e=Object.keys(md);pc()&&e.forEach(e=>{Vc.addEventListener(e,t,{capture:!0,passive:!0})});function t(e){let t=e.target;if(!t)return;let n=De(t),r=Math.round(e.timeStamp);if(dd.set(r,n),dd.size>50){let e=dd.keys().next().value;e!==void 0&&dd.delete(e)}}function n(e){let t=Math.round(e.startTime),n=dd.get(t);if(!n)for(let e=-5;e<=5;e++){let r=dd.get(t+e);if(r){n=r;break}}return n||`<unknown>`}let r=({entries:e})=>{let t=tr(),r=t&&er(t);e.forEach(e=>{if(!$l(e))return;let t=e.interactionId;if(t==null||ud.has(t))return;let i=e.target?De(e.target):n(e);if(ld.length>10){let e=ld.shift();ud.delete(e)}ld.push(t),ud.set(t,{span:r,elementName:i})})};Ul(`event`,r),Ul(`first-input`,r)}var vd=40;function yd(e,t=nd(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw rd(`fetch`),e}finally{n-=a,r--}}return no(e,i,Xa(e.bufferSize||vd))}var bd=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,xd=30,Sd=50;function Cd(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?`?`:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var wd=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Td=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ed=/\((\S*)(?::(\d+))(?::(\d+))\)/,Dd=/at (.+?) ?\(data:(.+?),/,Od=[xd,e=>{let t=e.match(Dd);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=wd.exec(e);if(n){let[,e,t,r]=n;return Cd(e,`?`,+t,+r)}let r=Td.exec(e);if(r){if(r[2]?.indexOf(`eval`)===0){let e=Ed.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=Md(r[1]||`?`,r[2]);return Cd(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],kd=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ad=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,jd=M(Od,[Sd,e=>{let t=kd.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=Ad.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||`?`;return[n,e]=Md(n,e),Cd(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Md=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Nd=1024,Pd=`Breadcrumbs`,Fd=_a(((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Pd,setup(e){t.console&&gs(Rd(e)),t.dom&&Gu(Ld(e,t.dom)),t.xhr&&ad(zd(e)),t.fetch&&tc(Bd(e)),t.history&&Qu(Vd(e)),t.sentry&&e.on(`beforeSendEvent`,Id(e))}}}));function Id(e){return function(t){Ut()===e&&qo({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:Qe(t)},{event:t})}}function Ld(e,t){return function(n){if(Ut()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>Nd&&(bd&&O.warn(`\`dom.maxStringLength\` cannot exceed ${Nd}, but a value of ${o} was configured. Sentry will use ${Nd} instead.`),o=Nd),typeof a==`string`&&(a=[a]);try{let e=n.event,t=Hd(e)?e.target:e;r=De(t,{keyAttrs:a,maxStringLength:o}),i=Ae(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),qo(s,{event:n.event,name:n.name,global:n.global})}}function Rd(e){return function(t){if(Ut()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:vs(t.level),message:We(t.args,` `)};if(t.level===`assert`)if(t.args[0]===!1)n.message=`Assertion failed: ${We(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1);else return;qo(n,{input:t.args,level:t.level})}}function zd(e){return function(t){if(Ut()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[id];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:Ys(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),qo(d,u)}}function Bd(e){return function(t){if(Ut()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`))if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:t.fetchData,level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),qo(a,i)}else{let i=t.response,a={...t.fetchData,status_code:i?.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:Ys(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),qo(s,o)}}}function Vd(e){return function(t){if(Ut()!==e)return;let n=t.from,r=t.to,i=Io(hc.location.href),a=n?Io(n):void 0,o=Io(r);a?.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),qo({category:`navigation`,data:{from:n,to:r}})}}function Hd(e){return!!e&&!!e.target}var Ud=`EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload`.split(`,`),Wd=`BrowserApiErrors`,Gd=_a(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:Wd,setupOnce(){t.setTimeout&&je(hc,`setTimeout`,Kd),t.setInterval&&je(hc,`setInterval`,Kd),t.requestAnimationFrame&&je(hc,`requestAnimationFrame`,qd),t.XMLHttpRequest&&`XMLHttpRequest`in hc&&je(XMLHttpRequest.prototype,`send`,Jd);let e=t.eventTarget;e&&(Array.isArray(e)?e:Ud).forEach(e=>Yd(e,t))}}}));function Kd(e){return function(...t){let n=t[0];return t[0]=yc(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${L(e)}`}}),e.apply(this,t)}}function qd(e){return function(t){return e.apply(this,[yc(t,{mechanism:{data:{handler:L(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function Jd(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&je(n,e,function(t){let n={mechanism:{data:{handler:L(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Pe(t);return r&&(n.mechanism.data.handler=L(r)),yc(t,n)})}),e.apply(this,t)}}function Yd(e,t){let n=hc[e]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(je(n,`addEventListener`,function(n){return function(r,i,a){try{Xd(i)&&(i.handleEvent=yc(i.handleEvent,{mechanism:{data:{handler:L(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&Zd(this,r,i),n.apply(this,[r,yc(i,{mechanism:{data:{handler:L(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),je(n,`removeEventListener`,function(e){return function(t,n,r){try{let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch{}return e.call(this,t,n,r)}}))}function Xd(e){return typeof e.handleEvent==`function`}function Zd(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var Qd=_a((e={})=>{let t=e.lifecycle??`route`;return{name:`BrowserSession`,setupOnce(){if(hc.document===void 0){bd&&O.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}ra({ignoreDuration:!0}),oa();let e=Bt(),n=e.getUser();e.addScopeListener(e=>{let t=e.getUser();(n?.id!==t?.id||n?.ip_address!==t?.ip_address)&&(oa(),n=t)}),t===`route`&&Qu(({from:e,to:t})=>{e!==t&&(ra({ignoreDuration:!0}),oa())})}}}),$d=`CultureContext`,ef=_a((()=>({name:$d,preprocessEvent(e){let t=tf();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})}})));function tf(){try{let e=hc.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var nf=`GlobalHandlers`,rf=_a(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:nf,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(af(e),uf(`onerror`)),t.onunhandledrejection&&(of(e),uf(`onunhandledrejection`))}}}));function af(e){ne(t=>{let{stackParser:n,attachStacktrace:r}=df();if(Ut()!==e||_c())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=lf(Nc(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,ea(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function of(e){ae(t=>{let{stackParser:n,attachStacktrace:r}=df();if(Ut()!==e||_c())return;let i=sf(t),a=he(i)?cf(i):Nc(n,i,void 0,r,!0);a.level=`error`,ea(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function sf(e){if(he(e))return e;try{if(`reason`in e)return e.reason;if(`detail`in e&&`reason`in e.detail)return e.detail.reason}catch{}return e}function cf(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function lf(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:ff(t)??ke(),function:`?`,in_app:!0}),e}function uf(e){bd&&O.log(`Global Handler attached: ${e}`)}function df(){return Ut()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function ff(e){if(!(!pe(e)||e.length===0))return e.startsWith(`data:`)?`<${Ro(e,!1)}>`:e}var pf=_a(()=>({name:`HttpContext`,preprocessEvent(e){if(!hc.navigator&&!hc.location&&!hc.document)return;let t=bc(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}})),mf=`cause`,hf=5,gf=`LinkedErrors`,_f=_a(((e={})=>{let t=e.limit||hf,n=e.key||mf;return{name:gf,preprocessEvent(e,r,i){ds(xc,i.getOptions().stackParser,n,t,e,r)}}}));function vf(){return yf()?(bd&&y(()=>{console.error(`[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/`)}),!0):!1}function yf(){if(hc.window===void 0)return!1;let e=hc;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let t=ke();return!(hc===hc.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}function bf(e){return[ts(),Zo(),Os(),Gd(),Fd(),rf(),_f(),bs(),pf(),ef(),Qd()]}function xf(e={}){let t=!e.skipBrowserExtensionCheck&&vf(),n=e.defaultIntegrations==null?bf():e.defaultIntegrations;return Ao(Rc,{...e,enabled:t?!1:e.enabled,stackParser:N(e.stackParser||jd),integrations:pa({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||yd})}function Sf(e){return e.split(`,`).some(e=>e.trim().startsWith(`sentry-`))}function Cf(e){try{return new URL(e,hc.location.origin).href}catch{return}}function wf(e){return e.entryType===`resource`&&`initiatorType`in e&&typeof e.nextHopProtocol==`string`&&(e.initiatorType===`fetch`||e.initiatorType===`xmlhttprequest`)}function Tf(e){try{return new Headers(e)}catch{return}}var Ef=new WeakMap,Df=new Map,Of={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function kf(e,t){let{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:a,enableHTTPTimings:o,tracePropagationTargets:s,onRequestSpanStart:c,onRequestSpanEnd:l}={...Of,...t},u=typeof a==`function`?a:e=>!0,d=e=>jf(e,s),f={},p=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(e=>(e.type===`transaction`&&e.spans&&e.spans.forEach(e=>{if(e.op===`http.client`){let t=Df.get(e.span_id);t&&(e.timestamp=t/1e3,Df.delete(e.span_id))}}),e)),i&&nc(e=>{if(e.response){let t=Ef.get(e.response);t&&e.endTimestamp&&Df.set(t,e.endTimestamp)}}),tc(e=>{let t=ks(e,u,d,f,{propagateTraceparent:p,onRequestSpanEnd:l});if(e.response&&e.fetchData.__span&&Ef.set(e.response,e.fetchData.__span),t){let n=Cf(e.fetchData.url),r=n?Io(n).host:void 0;t.setAttributes({"http.url":n?Ro(n):void 0,"server.address":r}),o&&Af(t),c?.(t,{headers:e.headers})}})),r&&ad(e=>{let t=Mf(e,u,d,f,p,l);t&&(o&&Af(t),c?.(t,{headers:Tf(e.xhr.__sentry_xhr_v3__?.request_headers)}))})}function Af(e){let{url:t}=Wn(e).data;if(!t||typeof t!=`string`)return;let n=Ul(`resource`,({entries:r})=>{r.forEach(r=>{wf(r)&&r.name.endsWith(t)&&(e.setAttributes(mu(r)),setTimeout(n))})})}function jf(e,t){let n=ke();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}let a=r.origin===i;return t?Ke(r.toString(),t)||a&&Ke(r.pathname,t):a}else{let n=!!e.match(/^\/(?!\/)/);return t?Ke(e,t):n}}function Mf(e,t,n,r,i,a){let o=e.xhr,s=o?.[id];if(!o||o.__sentry_own_request__||!s)return;let{url:c,method:l}=s,u=ar()&&t(c);if(e.endTimestamp){let t=o.__sentry_xhr_span_id__;if(!t)return;let n=r[t];n&&(u&&s.status_code!==void 0&&(on(n,s.status_code),n.end(),a?.(n,{headers:Tf(cd(o)),error:e.error})),delete r[t]);return}let d=Cf(c),f=Io(d||c),p=Ro(Lo(c)),m=!!tr(),h=u&&m?ii({name:`${l} ${p}`,attributes:{url:Ro(c),type:`xhr`,"http.method":l,"http.url":d?Ro(d):void 0,"server.address":f?.host,[Yt]:`auto.http.browser`,[Jt]:`http.client`,...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new gr;o.__sentry_xhr_span_id__=h.spanContext().spanId,r[o.__sentry_xhr_span_id__]=h,n(c)&&Nf(o,ar()&&m?h:void 0,i);let g=Ut();return g&&g.emit(`beforeOutgoingRequestSpan`,h,e),h}function Nf(e,t,n){let{"sentry-trace":r,baggage:i,traceparent:a}=Uo({span:t,propagateTraceparent:n});r&&Pf(e,r,i,a)}function Pf(e,t,n,r){let i=e.__sentry_xhr_v3__?.request_headers;if(!(i?.[`sentry-trace`]||!e.setRequestHeader))try{if(e.setRequestHeader(`sentry-trace`,t),r&&!i?.traceparent&&e.setRequestHeader(`traceparent`,r),n){let t=i?.baggage;(!t||!Sf(t))&&e.setRequestHeader(`baggage`,n)}}catch{}}function Ff(){hc.document?hc.document.addEventListener(`visibilitychange`,()=>{let e=tr();if(!e)return;let t=er(e);if(hc.document.hidden&&t){let e=`cancelled`,{op:n,status:r}=Wn(t);bd&&O.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:2,message:e}),t.setAttribute(`sentry.cancellation_reason`,`document.hidden`),t.end()}}):bd&&O.warn(`[Tracing] Could not set up background tab detection due to lack of global document`)}var If=`sentry_previous_trace`,Lf=`sentry.previous_trace`;function Rf(e,{linkPreviousTrace:t,consistentTraceSampling:n}){let r=t===`session-storage`,i=r?Vf():void 0;e.on(`spanStart`,e=>{if(er(e)!==e)return;let t=zt().getPropagationContext();i=zf(i,e,t),r&&Bf(i)});let a=!0;n&&e.on(`beforeSampling`,e=>{if(!i)return;let t=zt(),n=t.getPropagationContext();if(a&&n.parentSpanId){a=!1;return}t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(i.sampleRate),sampled:String(Hf(i.spanContext))},sampleRand:i.sampleRand}),e.parentSampled=Hf(i.spanContext),e.parentSampleRate=i.sampleRate,e.spanAttributes={...e.spanAttributes,[qt]:i.sampleRate}})}function zf(e,t,n){let r=Wn(t);function i(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[`sentry.sample_rate`])}catch{return 0}}let a={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return a;let o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&(bd&&O.log(`Adding previous_trace \`${JSON.stringify(o)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:o,attributes:{[nn]:`previous_trace`}}),t.setAttribute(Lf,`${o.traceId}-${o.spanId}-${Hf(o)?1:0}`)),a)}function Bf(e){try{hc.sessionStorage.setItem(If,JSON.stringify(e))}catch(e){bd&&O.warn(`Could not store previous trace in sessionStorage`,e)}}function Vf(){try{let e=hc.sessionStorage?.getItem(If);return JSON.parse(e)}catch{return}}function Hf(e){return e.traceFlags===1}var Uf=`BrowserTracing`,Wf=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function Gf(){let e=hc.navigator;return e?.userAgent?Wf.test(e.userAgent):!1}var Kf={...pi,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:`in-memory`,consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...Of},qf=((e={})=>{`enableElementTiming`in e&&y(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});let t={name:void 0,source:void 0},n=hc.document,{enableInp:r,enableLongTask:i,enableLongAnimationFrame:a,_experiments:{enableInteractions:o,enableStandaloneClsSpans:s,enableStandaloneLcpSpans:c},beforeStartSpan:l,idleTimeout:u,finalTimeout:f,childSpanTimeout:p,markBackgroundSpan:m,traceFetch:h,traceXHR:g,trackFetchStreamPerformance:_,shouldCreateSpanForRequest:v,enableHTTPTimings:b,ignoreResourceSpans:x,ignorePerformanceApiSpans:S,instrumentPageLoad:C,instrumentNavigation:w,detectRedirects:T,linkPreviousTrace:E,consistentTraceSampling:D,enableReportPageLoaded:k,onRequestSpanStart:A,onRequestSpanEnd:j}={...Kf,...e},M=Gf(),N,P,F;function I(e,r,i=!0){let a=r.op===`pageload`,o=r.name,d=l?l(r):r,m=d.attributes||{};if(o!==d.name&&(m[Gt]=`custom`,d.attributes=m),!i){let e=it();ii({...d,startTime:e}).end(e);return}t.name=d.name,t.source=m[Gt];let h=vi(d,{idleTimeout:u,finalTimeout:f,childSpanTimeout:p,disableAutoFinish:a,beforeSpanEnd:t=>{N?.(),Ou(t,{recordClsOnPageloadSpan:!s,recordLcpOnPageloadSpan:!c,ignoreResourceSpans:x,ignorePerformanceApiSpans:S}),tp(e,void 0);let n=zt(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:h.spanContext().traceId,sampled:qn(h),dsc:hr(t)}),a&&(F=void 0)},trimIdleSpanEndTimestamp:!k});a&&k&&(F=h),tp(e,h);function g(){n&&[`interactive`,`complete`].includes(n.readyState)&&e.emit(`idleSpanEnableAutoFinish`,h)}a&&!k&&n&&(n.addEventListener(`readystatechange`,()=>{g()}),g())}return{name:Uf,setup(e){if(M){bd&&O.log(`[Tracing] Skipping browserTracingIntegration setup for bot user agent.`);return}if(ir(),N=xu({recordClsStandaloneSpans:s||!1,recordLcpStandaloneSpans:c||!1,client:e}),r&&pd(),a&&d.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes(`long-animation-frame`)?Cu():i&&Su(),o&&wu(),T&&n){let e=()=>{P=st()};addEventListener(`click`,e,{capture:!0}),addEventListener(`keydown`,e,{capture:!0,passive:!0})}function t(){let t=ep(e);t&&!Wn(t).timestamp&&(bd&&O.log(`[Tracing] Finishing current active span with op: ${Wn(t).op}`),t.setAttribute(Xt,`cancelled`),t.end())}e.on(`startNavigationSpan`,(n,r)=>{if(Ut()!==e)return;if(r?.isRedirect){bd&&O.warn(`[Tracing] Detected redirect, navigation span will not be the root span, but a child span.`),I(e,{op:`navigation.redirect`,...n},!1);return}P=void 0,t(),Bt().setPropagationContext({traceId:gt(),sampleRand:Math.random(),propagationSpanId:ar()?void 0:_t()});let i=zt();i.setPropagationContext({traceId:gt(),sampleRand:Math.random(),propagationSpanId:ar()?void 0:_t()}),i.setSDKProcessingMetadata({normalizedRequest:void 0}),I(e,{op:`navigation`,...n,parentSpan:null,forceTransaction:!0})}),e.on(`startPageLoadSpan`,(n,r={})=>{if(Ut()!==e)return;t();let i=Mn(r.sentryTrace||Xf(`sentry-trace`)||Zf(`sentry-trace`),r.baggage||Xf(`baggage`)||Zf(`baggage`)),a=zt();a.setPropagationContext(i),ar()||(a.getPropagationContext().propagationSpanId=_t()),a.setSDKProcessingMetadata({normalizedRequest:bc()}),I(e,{op:`pageload`,...n})}),e.on(`endPageloadSpan`,()=>{k&&F&&(F.setAttribute(Xt,`reportPageLoaded`),F.end())})},afterAllSetup(e){if(M)return;let n=ke();if(E!==`off`&&Rf(e,{linkPreviousTrace:E,consistentTraceSampling:D}),hc.location){if(C){let t=ut();Jf(e,{name:hc.location.pathname,startTime:t?t/1e3:void 0,attributes:{[Gt]:`url`,[Yt]:`auto.pageload.browser`}})}w&&Qu(({to:t,from:r})=>{if(r===void 0&&n?.indexOf(t)!==-1){n=void 0;return}n=void 0;let i=Po(t),a=ep(e),o=a&&T&&rp(a,P);Yf(e,{name:i?.pathname||hc.location.pathname,attributes:{[Gt]:`url`,[Yt]:`auto.navigation.browser`}},{url:t,isRedirect:o})})}m&&Ff(),o&&Qf(e,u,f,p,t),r&&_d(),kf(e,{traceFetch:h,traceXHR:g,trackFetchStreamPerformance:_,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:v,enableHTTPTimings:b,onRequestSpanStart:A,onRequestSpanEnd:j})}}});function Jf(e,t,n){e.emit(`startPageLoadSpan`,t,n),zt().setTransactionName(t.name);let r=ep(e);return r&&e.emit(`afterStartPageLoadSpan`,r),r}function Yf(e,t,n){let{url:r,isRedirect:i}=n||{};e.emit(`beforeStartNavigationSpan`,t,{isRedirect:i}),e.emit(`startNavigationSpan`,t,{isRedirect:i});let a=zt();return a.setTransactionName(t.name),r&&!i&&a.setSDKProcessingMetadata({normalizedRequest:{...bc(),url:r}}),ep(e)}function Xf(e){return(hc.document?.querySelector(`meta[name=${e}]`))?.getAttribute(`content`)||void 0}function Zf(e){return(hc.performance?.getEntriesByType?.(`navigation`)[0])?.serverTiming?.find(t=>t.name===e)?.description}function Qf(e,t,n,r,i){let a=hc.document,o;a&&addEventListener(`click`,()=>{let a=`ui.action.click`,s=ep(e);if(s){let e=Wn(s).op;if([`navigation`,`pageload`].includes(e)){bd&&O.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`);return}}if(o&&=(o.setAttribute(Xt,`interactionInterrupted`),o.end(),void 0),!i.name){bd&&O.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}o=vi({name:i.name,op:a,attributes:{[Gt]:i.source||`url`}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})},{capture:!0})}var $f=`_sentry_idleSpan`;function ep(e){return e[$f]}function tp(e,t){Me(e,$f,t)}var np=1.5;function rp(e,t){let n=Wn(e),r=it();return!(r-n.start_timestamp>np||t&&r-t<=np)}var ip=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.4`})),ap=o(((e,t)=>{t.exports=ip()})),W=l(ap());function op(e){let t={...e};return Ho(t,`react`),ta(`react`,{version:W.version}),xf(t)}var sp={setAttribute(){},setAttributes(){},setStatus(){}},cp={startSpan(e,t){return t(sp)}},lp={count(){},gauge(){},distribution(){}};function up(){let e=globalThis,t=typeof globalThis<`u`&&typeof e.setImmediate==`function`?t=>e.setImmediate?.(t):e=>setTimeout(e,0);return e=>{t(()=>{let t=e.level??(e.error?`error`:`info`),n={timestamp:new Date().toISOString(),level:t,...e};console.log(JSON.stringify(n))})}}function dp(){let e=up();return{log(t){e(t)},tracer:cp,metrics:lp,captureException(t,n){e({event:`sync.exception`,level:`error`,error:t instanceof Error?t.message:`Unknown error: ${String(t)}`,...n??{}})}}}dp();var fp={setAttribute(){},setAttributes(){},setStatus(){}};function pp(e){return e.level?e.level:e.error?`error`:`info`}function mp(e,t){if(!e)return null;switch(t){case`trace`:return e.trace??e.debug??e.info??null;case`debug`:return e.debug??e.info??null;case`info`:return e.info??null;case`warn`:return e.warn??e.info??null;case`error`:return e.error??e.warn??e.info??null;case`fatal`:return e.fatal??e.error??e.warn??e.info??null;default:return e.info??null}}function hp(e){return{setAttribute(t,n){e.setAttribute?.(t,n)},setAttributes(t){if(e.setAttributes){e.setAttributes(t);return}for(let[n,r]of Object.entries(t))e.setAttribute?.(n,r)},setStatus(t){e.setStatus?.(t)}}}function gp(e){if(typeof e==`string`)return e;if(typeof e==`number`)return Number.isFinite(e)?e:void 0;if(typeof e==`boolean`)return e;if(typeof e==`bigint`){let t=Number(e);return Number.isFinite(t)?t:e.toString()}if(e instanceof Date)return e.toISOString();if(e!=null){if(Array.isArray(e)||typeof e==`object`)try{return JSON.stringify(e)}catch{return String(e)}return String(e)}}function _p(e){let t={};for(let[n,r]of Object.entries(e)){let e=gp(r);e!==void 0&&(t[n]=e)}return Object.keys(t).length>0?t:null}function vp(e){return{startSpan(t,n){return e.startSpan?e.startSpan(t,e=>n(hp(e))):n(fp)}}}function yp(e){return{count(t,n,r){e.metrics?.count?.(t,n??1,r)},gauge(t,n,r){e.metrics?.gauge?.(t,n,r)},distribution(t,n,r){e.metrics?.distribution?.(t,n,r)}}}function bp(e){return{log(t){let n=pp(t),{event:r,...i}=t,a=mp(e.logger,n);if(!a)return;let o=_p(i);if(!o){a(r);return}a(r,o)},tracer:vp(e),metrics:yp(e),captureException(t,n){if(e.captureException?.(t),!n)return;let r=mp(e.logger,`error`)??mp(e.logger,`info`);if(!r)return;let i=_p(n);if(!i){r(`sync.exception.context`);return}r(`sync.exception.context`,i)}}}function xp(e){if(e?.attributes)return{attributes:e.attributes}}function Sp(e){if(!e)return;let t=!!e.attributes,n=!!e.unit;if(!(!t&&!n))return{attributes:e.attributes,unit:e.unit}}function Cp(){return bp({logger:Ls,startSpan(e,t){return ri(e,e=>t({setAttribute(t,n){e.setAttribute(t,n)},setAttributes(t){e.setAttributes(t)},setStatus(t){e.setStatus({code:t===`ok`?1:2})}}))},metrics:{count(e,t,n){let r=xp(n);if(r){Ks(e,t,r);return}Ks(e,t)},gauge(e,t,n){let r=Sp(n);if(r){qs(e,t,r);return}qs(e,t)},distribution(e,t,n){let r=Sp(n);if(r){Js(e,t,r);return}Js(e,t)}},captureException(e){$i(e)}})}function wp(){return Cp()}function Tp(e){return op(Ep(e)),wp()}function Ep(e){let t=e.integrations;if(typeof t==`function`)return e;let n=t??[];return n.some(e=>e.name===`BrowserTracing`)?e:{...e,integrations:[qf(),...n]}}var Dp=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Op=o(((e,t)=>{t.exports=Dp()})),kp=o((e=>{var t=ap();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.4`})),Ap=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=kp()})),jp=o((e=>{var t=Op(),n=ap(),r=Ap();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function k(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var A=Symbol.for(`react.client.reference`);function j(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===A?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?j(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return j(e(t))}catch{}}return null}var M=Array.isArray,N=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},I=[],L=-1;function ee(e){return{current:e}}function R(e){0>L||(e.current=I[L],I[L]=null,L--)}function z(e,t){L++,I[L]=e.current,e.current=t}var B=ee(null),V=ee(null),H=ee(null),U=ee(null);function te(e,t){switch(z(H,t),z(V,e),z(B,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Jd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Jd(t),e=Yd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}R(B),z(B,e)}function ne(){R(B),R(V),R(H)}function re(e){e.memoizedState!==null&&z(U,e);var t=B.current,n=Yd(t,e.type);t!==n&&(z(V,e),z(B,n))}function ie(e){V.current===e&&(R(B),R(V)),U.current===e&&(R(U),W._currentValue=F)}var ae,oe;function se(e){if(ae===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ae=t&&t[1]||``,oe=-1<e.stack.indexOf(`
|
|
6
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
7
|
+
`+ae+e+oe}var ce=!1;function le(e,t){if(!e||ce)return``;ce=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
8
|
+
`),l=s.split(`
|
|
9
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
10
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ce=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?se(n):``}function ue(e,t){switch(e.tag){case 26:case 27:case 5:return se(e.type);case 16:return se(`Lazy`);case 13:return e.child!==t&&t!==null?se(`Suspense Fallback`):se(`Suspense`);case 19:return se(`SuspenseList`);case 0:case 15:return le(e.type,!1);case 11:return le(e.type.render,!1);case 1:return le(e.type,!0);case 31:return se(`Activity`);default:return``}}function de(e){try{var t=``,n=null;do t+=ue(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
11
|
+
Error generating stack: `+e.message+`
|
|
12
|
+
`+e.stack}}var fe=Object.prototype.hasOwnProperty,pe=t.unstable_scheduleCallback,me=t.unstable_cancelCallback,he=t.unstable_shouldYield,ge=t.unstable_requestPaint,_e=t.unstable_now,ve=t.unstable_getCurrentPriorityLevel,ye=t.unstable_ImmediatePriority,be=t.unstable_UserBlockingPriority,xe=t.unstable_NormalPriority,Se=t.unstable_LowPriority,Ce=t.unstable_IdlePriority,we=t.log,Te=t.unstable_setDisableYieldValue,Ee=null,De=null;function Oe(e){if(typeof we==`function`&&Te(e),De&&typeof De.setStrictMode==`function`)try{De.setStrictMode(Ee,e)}catch{}}var ke=Math.clz32?Math.clz32:Me,Ae=Math.log,je=Math.LN2;function Me(e){return e>>>=0,e===0?32:31-(Ae(e)/je|0)|0}var Ne=256,Pe=262144,Fe=4194304;function Ie(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Le(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ie(n))):i=Ie(o):i=Ie(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ie(n))):i=Ie(o)):i=Ie(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Re(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ze(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Be(){var e=Fe;return Fe<<=1,!(Fe&62914560)&&(Fe=4194304),e}function Ve(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function He(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ue(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-ke(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&We(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function We(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ke(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ge(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ke(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ke(e,t){var n=t&-t;return n=n&42?1:qe(n),(n&(e.suspendedLanes|t))===0?n:0}function qe(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Je(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ye(){var e=P.p;return e===0?(e=window.event,e===void 0?32:xp(e.type)):e}function Xe(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var Ze=Math.random().toString(36).slice(2),Qe=`__reactFiber$`+Ze,$e=`__reactProps$`+Ze,et=`__reactContainer$`+Ze,tt=`__reactEvents$`+Ze,nt=`__reactListeners$`+Ze,rt=`__reactHandles$`+Ze,it=`__reactResources$`+Ze,at=`__reactMarker$`+Ze;function ot(e){delete e[Qe],delete e[$e],delete e[tt],delete e[nt],delete e[rt]}function st(e){var t=e[Qe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[et]||n[Qe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=vf(e);e!==null;){if(n=e[Qe])return n;e=vf(e)}return t}e=n,n=e.parentNode}return null}function ct(e){if(e=e[Qe]||e[et]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function lt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function ut(e){var t=e[it];return t||=e[it]={hoistableStyles:new Map,hoistableScripts:new Map},t}function dt(e){e[at]=!0}var ft=new Set,pt={};function mt(e,t){ht(e,t),ht(e+`Capture`,t)}function ht(e,t){for(pt[e]=t,e=0;e<t.length;e++)ft.add(t[e])}var gt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),_t={},vt={};function yt(e){return fe.call(vt,e)?!0:fe.call(_t,e)?!1:gt.test(e)?vt[e]=!0:(_t[e]=!0,!1)}function bt(e,t,n){if(yt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function xt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function St(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Ct(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function wt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Tt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Et(e){if(!e._valueTracker){var t=wt(e)?`checked`:`value`;e._valueTracker=Tt(e,t,``+e[t])}}function Dt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=wt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ot(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var kt=/[\n"\\]/g;function At(e){return e.replace(kt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function jt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Ct(t)):e.value!==``+Ct(t)&&(e.value=``+Ct(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Nt(e,o,Ct(n)):Nt(e,o,Ct(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Ct(s):e.removeAttribute(`name`)}function Mt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Et(e);return}n=n==null?``:``+Ct(n),t=t==null?n:``+Ct(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Et(e)}function Nt(e,t,n){t===`number`&&Ot(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Pt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Ct(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ft(e,t,n){if(t!=null&&(t=``+Ct(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Ct(n)}function It(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(M(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Ct(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Et(e)}function Lt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Rt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function zt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Rt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Bt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&zt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&zt(e,o,t[o])}function Vt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Ht=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Ut=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Wt(e){return Ut.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Gt(){}var Kt=null;function qt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jt=null,Yt=null;function Xt(e){var t=ct(e);if(t&&(e=t.stateNode)){var n=e[$e]||null;a:switch(e=t.stateNode,t.type){case`input`:if(jt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+At(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[$e]||null;if(!a)throw Error(i(90));jt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Dt(r)}break a;case`textarea`:Ft(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Pt(e,!!n.multiple,t,!1)}}}var Zt=!1;function Qt(e,t,n){if(Zt)return e(t,n);Zt=!0;try{return e(t)}finally{if(Zt=!1,(Jt!==null||Yt!==null)&&(wu(),Jt&&(t=Jt,e=Yt,Yt=Jt=null,Xt(t),e)))for(t=0;t<e.length;t++)Xt(e[t])}}function $t(e,t){var n=e.stateNode;if(n===null)return null;var r=n[$e]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var en=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),tn=!1;if(en)try{var nn={};Object.defineProperty(nn,`passive`,{get:function(){tn=!0}}),window.addEventListener(`test`,nn,nn),window.removeEventListener(`test`,nn,nn)}catch{tn=!1}var rn=null,an=null,on=null;function sn(){if(on)return on;var e,t=an,n=t.length,r,i=`value`in rn?rn.value:rn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return on=i.slice(e,1<r?1-r:void 0)}function cn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ln(){return!0}function un(){return!1}function dn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?ln:un,this.isPropagationStopped=un,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=ln)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=ln)},persist:function(){},isPersistent:ln}),t}var fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=dn(fn),mn=f({},fn,{view:0,detail:0}),hn=dn(mn),gn,_n,vn,yn=f({},mn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:An,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==vn&&(vn&&e.type===`mousemove`?(gn=e.screenX-vn.screenX,_n=e.screenY-vn.screenY):_n=gn=0,vn=e),gn)},movementY:function(e){return`movementY`in e?e.movementY:_n}}),bn=dn(yn),xn=dn(f({},yn,{dataTransfer:0})),Sn=dn(f({},mn,{relatedTarget:0})),Cn=dn(f({},fn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=dn(f({},fn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Tn=dn(f({},fn,{data:0})),En={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Dn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},On={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=On[e])?!!t[e]:!1}function An(){return kn}var jn=dn(f({},mn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=cn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Dn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:An,charCode:function(e){return e.type===`keypress`?cn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?cn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Mn=dn(f({},yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=dn(f({},mn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:An})),Pn=dn(f({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Fn=dn(f({},yn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),In=dn(f({},fn,{newState:0,oldState:0})),Ln=[9,13,27,32],Rn=en&&`CompositionEvent`in window,zn=null;en&&`documentMode`in document&&(zn=document.documentMode);var Bn=en&&`TextEvent`in window&&!zn,Vn=en&&(!Rn||zn&&8<zn&&11>=zn),Hn=` `,Un=!1;function Wn(e,t){switch(e){case`keyup`:return Ln.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Gn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Kn=!1;function qn(e,t){switch(e){case`compositionend`:return Gn(t);case`keypress`:return t.which===32?(Un=!0,Hn):null;case`textInput`:return e=t.data,e===Hn&&Un?null:e;default:return null}}function Jn(e,t){if(Kn)return e===`compositionend`||!Rn&&Wn(e,t)?(e=sn(),on=an=rn=null,Kn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Vn&&t.locale!==`ko`?null:t.data;default:return null}}var Yn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Xn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Yn[e.type]:t===`textarea`}function Zn(e,t,n,r){Jt?Yt?Yt.push(r):Yt=[r]:Jt=r,t=Md(t,`onChange`),0<t.length&&(n=new pn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Qn=null,$n=null;function er(e){wd(e,0)}function tr(e){if(Dt(lt(e)))return e}function nr(e,t){if(e===`change`)return t}var rr=!1;if(en){var ir;if(en){var ar=`oninput`in document;if(!ar){var or=document.createElement(`div`);or.setAttribute(`oninput`,`return;`),ar=typeof or.oninput==`function`}ir=ar}else ir=!1;rr=ir&&(!document.documentMode||9<document.documentMode)}function sr(){Qn&&(Qn.detachEvent(`onpropertychange`,cr),$n=Qn=null)}function cr(e){if(e.propertyName===`value`&&tr($n)){var t=[];Zn(t,$n,e,qt(e)),Qt(er,t)}}function lr(e,t,n){e===`focusin`?(sr(),Qn=t,$n=n,Qn.attachEvent(`onpropertychange`,cr)):e===`focusout`&&sr()}function ur(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return tr($n)}function dr(e,t){if(e===`click`)return tr(t)}function fr(e,t){if(e===`input`||e===`change`)return tr(t)}function pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var mr=typeof Object.is==`function`?Object.is:pr;function hr(e,t){if(mr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!fe.call(t,i)||!mr(e[i],t[i]))return!1}return!0}function gr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _r(e,t){var n=gr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=gr(n)}}function vr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ot(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ot(e.document)}return t}function br(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var xr=en&&`documentMode`in document&&11>=document.documentMode,Sr=null,Cr=null,wr=null,Tr=!1;function Er(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Tr||Sr==null||Sr!==Ot(r)||(r=Sr,`selectionStart`in r&&br(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),wr&&hr(wr,r)||(wr=r,r=Md(Cr,`onSelect`),0<r.length&&(t=new pn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Sr)))}function Dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Or={animationend:Dr(`Animation`,`AnimationEnd`),animationiteration:Dr(`Animation`,`AnimationIteration`),animationstart:Dr(`Animation`,`AnimationStart`),transitionrun:Dr(`Transition`,`TransitionRun`),transitionstart:Dr(`Transition`,`TransitionStart`),transitioncancel:Dr(`Transition`,`TransitionCancel`),transitionend:Dr(`Transition`,`TransitionEnd`)},kr={},Ar={};en&&(Ar=document.createElement(`div`).style,`AnimationEvent`in window||(delete Or.animationend.animation,delete Or.animationiteration.animation,delete Or.animationstart.animation),`TransitionEvent`in window||delete Or.transitionend.transition);function jr(e){if(kr[e])return kr[e];if(!Or[e])return e;var t=Or[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ar)return kr[e]=t[n];return e}var Mr=jr(`animationend`),Nr=jr(`animationiteration`),Pr=jr(`animationstart`),Fr=jr(`transitionrun`),Ir=jr(`transitionstart`),Lr=jr(`transitioncancel`),Rr=jr(`transitionend`),zr=new Map,Br=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Br.push(`scrollEnd`);function Vr(e,t){zr.set(e,t),mt(t,[e])}var Hr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Ur=[],Wr=0,Gr=0;function Kr(){for(var e=Wr,t=Gr=Wr=0;t<e;){var n=Ur[t];Ur[t++]=null;var r=Ur[t];Ur[t++]=null;var i=Ur[t];Ur[t++]=null;var a=Ur[t];if(Ur[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Xr(n,i,a)}}function qr(e,t,n,r){Ur[Wr++]=e,Ur[Wr++]=t,Ur[Wr++]=n,Ur[Wr++]=r,Gr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Jr(e,t,n,r){return qr(e,t,n,r),Zr(e)}function Yr(e,t){return qr(e,null,null,t),Zr(e)}function Xr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-ke(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Zr(e){if(50<hu)throw hu=0,gu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qr={};function $r(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ei(e,t,n,r){return new $r(e,t,n,r)}function ti(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ni(e,t){var n=e.alternate;return n===null?(n=ei(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ri(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ii(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ti(e)&&(s=1);else if(typeof e==`string`)s=Xf(e,n,B.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=ei(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return ai(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=ei(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=ei(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=ei(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ei(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ai(e,t,n,r){return e=ei(7,e,r,t),e.lanes=n,e}function oi(e,t,n){return e=ei(6,e,null,t),e.lanes=n,e}function si(e){var t=ei(18,null,null,0);return t.stateNode=e,t}function ci(e,t,n){return t=ei(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var li=new WeakMap;function ui(e,t){if(typeof e==`object`&&e){var n=li.get(e);return n===void 0?(t={value:e,source:t,stack:de(t)},li.set(e,t),t):n}return{value:e,source:t,stack:de(t)}}var di=[],fi=0,pi=null,mi=0,hi=[],gi=0,_i=null,vi=1,yi=``;function bi(e,t){di[fi++]=mi,di[fi++]=pi,pi=e,mi=t}function xi(e,t,n){hi[gi++]=vi,hi[gi++]=yi,hi[gi++]=_i,_i=e;var r=vi;e=yi;var i=32-ke(r)-1;r&=~(1<<i),n+=1;var a=32-ke(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,vi=1<<32-ke(t)+i|n<<i|r,yi=a+e}else vi=1<<a|n<<i|r,yi=e}function Si(e){e.return!==null&&(bi(e,1),xi(e,1,0))}function Ci(e){for(;e===pi;)pi=di[--fi],di[fi]=null,mi=di[--fi],di[fi]=null;for(;e===_i;)_i=hi[--gi],hi[gi]=null,yi=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null}function wi(e,t){hi[gi++]=vi,hi[gi++]=yi,hi[gi++]=_i,vi=t.id,yi=t.overflow,_i=e}var Ti=null,Ei=null,Di=!1,Oi=null,ki=!1,Ai=Error(i(519));function ji(e){throw Li(ui(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ai}function Mi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Qe]=e,t[$e]=r,n){case`dialog`:Td(`cancel`,t),Td(`close`,t);break;case`iframe`:case`object`:case`embed`:Td(`load`,t);break;case`video`:case`audio`:for(n=0;n<Sd.length;n++)Td(Sd[n],t);break;case`source`:Td(`error`,t);break;case`img`:case`image`:case`link`:Td(`error`,t),Td(`load`,t);break;case`details`:Td(`toggle`,t);break;case`input`:Td(`invalid`,t),Mt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Td(`invalid`,t);break;case`textarea`:Td(`invalid`,t),It(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Rd(t.textContent,n)?(r.popover!=null&&(Td(`beforetoggle`,t),Td(`toggle`,t)),r.onScroll!=null&&Td(`scroll`,t),r.onScrollEnd!=null&&Td(`scrollend`,t),r.onClick!=null&&(t.onclick=Gt),t=!0):t=!1,t||ji(e,!0)}function Ni(e){for(Ti=e.return;Ti;)switch(Ti.tag){case 5:case 31:case 13:ki=!1;return;case 27:case 3:ki=!0;return;default:Ti=Ti.return}}function Pi(e){if(e!==Ti)return!1;if(!Di)return Ni(e),Di=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Xd(e.type,e.memoizedProps)),n=!n),n&&Ei&&ji(e),Ni(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ei=_f(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ei=_f(e)}else t===27?(t=Ei,af(e.type)?(e=gf,gf=null,Ei=e):Ei=t):Ei=Ti?hf(e.stateNode.nextSibling):null;return!0}function Fi(){Ei=Ti=null,Di=!1}function Ii(){var e=Oi;return e!==null&&(tu===null?tu=e:tu.push.apply(tu,e),Oi=null),e}function Li(e){Oi===null?Oi=[e]:Oi.push(e)}var Ri=ee(null),zi=null,Bi=null;function Vi(e,t,n){z(Ri,t._currentValue),t._currentValue=n}function Hi(e){e._currentValue=Ri.current,R(Ri)}function Ui(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Wi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ui(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ui(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Gi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;mr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===U.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[W]:e.push(W))}a=a.return}e!==null&&Wi(t,e,n,r),t.flags|=262144}function Ki(e){for(e=e.firstContext;e!==null;){if(!mr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function qi(e){zi=e,Bi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ji(e){return Xi(zi,e)}function Yi(e,t){return zi===null&&qi(e),Xi(e,t)}function Xi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Bi===null){if(e===null)throw Error(i(308));Bi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Bi=Bi.next=t;return n}var Zi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Qi=t.unstable_scheduleCallback,$i=t.unstable_NormalPriority,ea={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ta(){return{controller:new Zi,data:new Map,refCount:0}}function na(e){e.refCount--,e.refCount===0&&Qi($i,function(){e.controller.abort()})}var ra=null,ia=0,aa=0,oa=null;function sa(e,t){if(ra===null){var n=ra=[];ia=0,aa=gd(),oa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ia++,t.then(ca,ca),t}function ca(){if(--ia===0&&ra!==null){oa!==null&&(oa.status=`fulfilled`);var e=ra;ra=null,aa=0,oa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function la(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ua=N.S;N.S=function(e,t){iu=_e(),typeof t==`object`&&t&&typeof t.then==`function`&&sa(e,t),ua!==null&&ua(e,t)};var da=ee(null);function fa(){var e=da.current;return e===null?zl.pooledCache:e}function pa(e,t){t===null?z(da,da.current):z(da,t.pool)}function ma(){var e=fa();return e===null?null:{parent:ea._currentValue,pool:e}}var ha=Error(i(460)),ga=Error(i(474)),_a=Error(i(542)),va={then:function(){}};function ya(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ba(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Gt,Gt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,wa(e),e;default:if(typeof t.status==`string`)t.then(Gt,Gt);else{if(e=zl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,wa(e),e}throw Sa=t,ha}}function xa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Sa=e,ha):e}}var Sa=null;function Ca(){if(Sa===null)throw Error(i(459));var e=Sa;return Sa=null,e}function wa(e){if(e===ha||e===_a)throw Error(i(483))}var Ta=null,Ea=0;function Da(e){var t=Ea;return Ea+=1,Ta===null&&(Ta=[]),ba(Ta,e,t)}function Oa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ka(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Aa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ni(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=oi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&xa(i)===t.type)?(t=a(t,n.props),Oa(t,n),t.return=e,t):(t=ii(n.type,n.key,n.props,null,e.mode,r),Oa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ci(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ai(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=oi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=ii(t.type,t.key,t.props,null,e.mode,n),Oa(n,t),n.return=e,n;case h:return t=ci(t,e.mode,n),t.return=e,t;case T:return t=xa(t),f(e,t,n)}if(M(t)||k(t))return t=ai(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Da(t),n);if(t.$$typeof===b)return f(e,Yi(e,t),n);ka(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=xa(n),p(e,t,n,r)}if(M(n)||k(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Da(n),r);if(n.$$typeof===b)return p(e,t,Yi(e,n),r);ka(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=xa(r),_(e,t,n,r,i)}if(M(r)||k(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,Da(r),i);if(r.$$typeof===b)return _(e,t,n,Yi(t,r),i);ka(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Di&&bi(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return Di&&bi(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),Di&&bi(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Di&&bi(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Di&&bi(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Di&&bi(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&xa(l)===r.type){n(e,r.sibling),c=a(r,o.props),Oa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=ai(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ii(o.type,o.key,o.props,null,e.mode,c),Oa(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ci(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=xa(o),x(e,r,o,c)}if(M(o))return v(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Da(o),c);if(o.$$typeof===b)return x(e,r,Yi(e,o),c);ka(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=oi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ea=0;var i=x(e,t,n,r);return Ta=null,i}catch(t){if(t===ha||t===_a)throw t;var a=ei(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ja=Aa(!0),Ma=Aa(!1),Na=!1;function Pa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ia(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function La(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Rl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Zr(e),Xr(e,null,n),t}return qr(e,r,t,n),Zr(e)}function Ra(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ge(e,n)}}function za(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ba=!1;function Va(){if(Ba){var e=oa;if(e!==null)throw e}}function Ha(e,t,n,r){Ba=!1;var i=e.updateQueue;Na=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Vl&p)===p:(r&p)===p){p!==0&&p===aa&&(Ba=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Na=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Yl|=o,e.lanes=o,e.memoizedState=d}}function Ua(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Wa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ua(n[e],t)}var Ga=ee(null),Ka=ee(0);function qa(e,t){e=ql,z(Ka,e),z(Ga,t),ql=e|t.baseLanes}function Ja(){z(Ka,ql),z(Ga,Ga.current)}function Ya(){ql=Ka.current,R(Ga),R(Ka)}var Xa=ee(null),Za=null;function Qa(e){var t=e.alternate;z(ro,ro.current&1),z(Xa,e),Za===null&&(t===null||Ga.current!==null||t.memoizedState!==null)&&(Za=e)}function $a(e){z(ro,ro.current),z(Xa,e),Za===null&&(Za=e)}function eo(e){e.tag===22?(z(ro,ro.current),z(Xa,e),Za===null&&(Za=e)):to(e)}function to(){z(ro,ro.current),z(Xa,Xa.current)}function no(e){R(Xa),Za===e&&(Za=null),R(ro)}var ro=ee(0);function io(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||ff(n)||pf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ao=0,oo=null,so=null,co=null,lo=!1,uo=!1,fo=!1,po=0,mo=0,ho=null,go=0;function _o(){throw Error(i(321))}function vo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mr(e[n],t[n]))return!1;return!0}function yo(e,t,n,r,i,a){return ao=a,oo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?Is:Ls,fo=!1,a=n(r,i),fo=!1,uo&&(a=xo(t,n,r,i)),bo(e),a}function bo(e){N.H=Fs;var t=so!==null&&so.next!==null;if(ao=0,co=so=oo=null,lo=!1,mo=0,ho=null,t)throw Error(i(300));e===null||ec||(e=e.dependencies,e!==null&&Ki(e)&&(ec=!0))}function xo(e,t,n,r){oo=e;var a=0;do{if(uo&&(ho=null),mo=0,uo=!1,25<=a)throw Error(i(301));if(a+=1,co=so=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}N.H=Rs,o=t(n,r)}while(uo);return o}function So(){var e=N.H,t=e.useState()[0];return t=typeof t.then==`function`?ko(t):t,e=e.useState()[0],(so===null?null:so.memoizedState)!==e&&(oo.flags|=1024),t}function Co(){var e=po!==0;return po=0,e}function wo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function To(e){if(lo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}lo=!1}ao=0,co=so=oo=null,uo=!1,mo=po=0,ho=null}function Eo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return co===null?oo.memoizedState=co=e:co=co.next=e,co}function Do(){if(so===null){var e=oo.alternate;e=e===null?null:e.memoizedState}else e=so.next;var t=co===null?oo.memoizedState:co.next;if(t!==null)co=t,so=e;else{if(e===null)throw oo.alternate===null?Error(i(467)):Error(i(310));so=e,e={memoizedState:so.memoizedState,baseState:so.baseState,baseQueue:so.baseQueue,queue:so.queue,next:null},co===null?oo.memoizedState=co=e:co=co.next=e}return co}function Oo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ko(e){var t=mo;return mo+=1,ho===null&&(ho=[]),e=ba(ho,e,t),t=oo,(co===null?t.memoizedState:co.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?Is:Ls),e}function Ao(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ko(e);if(e.$$typeof===b)return Ji(e)}throw Error(i(438,String(e)))}function jo(e){var t=null,n=oo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=oo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Oo(),oo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=D;return t.index++,n}function Mo(e,t){return typeof t==`function`?t(e):t}function No(e){return Po(Do(),so,e)}function Po(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(ao&f)===f:(Vl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===aa&&(d=!0);else if((ao&p)===p){u=u.next,p===aa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,oo.lanes|=p,Yl|=p;f=u.action,fo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,oo.lanes|=f,Yl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!mr(o,e.memoizedState)&&(ec=!0,d&&(n=oa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Fo(e){var t=Do(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);mr(o,t.memoizedState)||(ec=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Io(e,t,n){var r=oo,a=Do(),o=Di;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!mr((so||a).memoizedState,n);if(s&&(a.memoizedState=n,ec=!0),a=a.queue,ss(zo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||co!==null&&co.memoizedState.tag&1){if(r.flags|=2048,ns(9,{destroy:void 0},Ro.bind(null,r,a,n,t),null),zl===null)throw Error(i(349));o||ao&127||Lo(r,t,n)}return n}function Lo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=oo.updateQueue,t===null?(t=Oo(),oo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ro(e,t,n,r){t.value=n,t.getSnapshot=r,Bo(t)&&Vo(e)}function zo(e,t,n){return n(function(){Bo(t)&&Vo(e)})}function Bo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mr(e,n)}catch{return!0}}function Vo(e){var t=Yr(e,2);t!==null&&yu(t,e,2)}function Ho(e){var t=Eo();if(typeof e==`function`){var n=e;if(e=n(),fo){Oe(!0);try{n()}finally{Oe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:e},t}function Uo(e,t,n,r){return e.baseState=n,Po(e,so,typeof r==`function`?r:Mo)}function Wo(e,t,n,r,a){if(Ms(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};N.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Go(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Go(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=N.T,o={};N.T=o;try{var s=n(i,r),c=N.S;c!==null&&c(o,s),Ko(e,t,s)}catch(n){Jo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),N.T=a}}else try{a=n(i,r),Ko(e,t,a)}catch(n){Jo(e,t,n)}}function Ko(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){qo(e,t,n)},function(n){return Jo(e,t,n)}):qo(e,t,n)}function qo(e,t,n){t.status=`fulfilled`,t.value=n,Yo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Go(e,n)))}function Jo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Yo(t),t=t.next;while(t!==r)}e.action=null}function Yo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Xo(e,t){return t}function Zo(e,t){if(Di){var n=zl.formState;if(n!==null){a:{var r=oo;if(Di){if(Ei){b:{for(var i=Ei,a=ki;i.nodeType!==8;){if(!a){i=null;break b}if(i=hf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ei=hf(i.nextSibling),r=i.data===`F!`;break a}}ji(r)}r=!1}r&&(t=n[0])}}return n=Eo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xo,lastRenderedState:t},n.queue=r,n=ks.bind(null,oo,r),r.dispatch=n,r=Ho(!1),a=js.bind(null,oo,!1,r.queue),r=Eo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Wo.bind(null,oo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Qo(e){return $o(Do(),so,e)}function $o(e,t,n){if(t=Po(e,t,Xo)[0],e=No(Mo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ko(t)}catch(e){throw e===ha?_a:e}else r=t;t=Do();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(oo.flags|=2048,ns(9,{destroy:void 0},es.bind(null,i,n),null)),[r,a,e]}function es(e,t){e.action=t}function ts(e){var t=Do(),n=so;if(n!==null)return $o(t,n,e);Do(),t=t.memoizedState,n=Do();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ns(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=oo.updateQueue,t===null&&(t=Oo(),oo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function rs(){return Do().memoizedState}function is(e,t,n,r){var i=Eo();oo.flags|=e,i.memoizedState=ns(1|t,{destroy:void 0},n,r===void 0?null:r)}function as(e,t,n,r){var i=Do();r=r===void 0?null:r;var a=i.memoizedState.inst;so!==null&&r!==null&&vo(r,so.memoizedState.deps)?i.memoizedState=ns(t,a,n,r):(oo.flags|=e,i.memoizedState=ns(1|t,a,n,r))}function os(e,t){is(8390656,8,e,t)}function ss(e,t){as(2048,8,e,t)}function cs(e){oo.flags|=4;var t=oo.updateQueue;if(t===null)t=Oo(),oo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ls(e){var t=Do().memoizedState;return cs({ref:t,nextImpl:e}),function(){if(Rl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function us(e,t){return as(4,2,e,t)}function ds(e,t){return as(4,4,e,t)}function fs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ps(e,t,n){n=n==null?null:n.concat([e]),as(4,4,fs.bind(null,t,e),n)}function ms(){}function hs(e,t){var n=Do();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&vo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gs(e,t){var n=Do();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&vo(t,r[1]))return r[0];if(r=e(),fo){Oe(!0);try{e()}finally{Oe(!1)}}return n.memoizedState=[r,t],r}function _s(e,t,n){return n===void 0||ao&1073741824&&!(Vl&261930)?e.memoizedState=t:(e.memoizedState=n,e=vu(),oo.lanes|=e,Yl|=e,n)}function vs(e,t,n,r){return mr(n,t)?n:Ga.current===null?!(ao&42)||ao&1073741824&&!(Vl&261930)?(ec=!0,e.memoizedState=n):(e=vu(),oo.lanes|=e,Yl|=e,t):(e=_s(e,n,r),mr(e,t)||(ec=!0),e)}function ys(e,t,n,r,i){var a=P.p;P.p=a!==0&&8>a?a:8;var o=N.T,s={};N.T=s,js(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?As(e,t,la(c,r),_u(e)):As(e,t,r,_u(e))}catch(n){As(e,t,{then:function(){},status:`rejected`,reason:n},_u())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function bs(){}function xs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ss(e).queue;ys(e,a,t,F,n===null?bs:function(){return Cs(e),n(r)})}function Ss(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:F},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Cs(e){var t=Ss(e);t.next===null&&(t=e.alternate.memoizedState),As(e,t.next.queue,{},_u())}function ws(){return Ji(W)}function Ts(){return Do().memoizedState}function Es(){return Do().memoizedState}function Ds(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=_u();e=Ia(n);var r=La(t,e,n);r!==null&&(yu(r,t,n),Ra(r,t,n)),t={cache:ta()},e.payload=t;return}t=t.return}}function Os(e,t,n){var r=_u();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ms(e)?Ns(t,n):(n=Jr(e,t,n,r),n!==null&&(yu(n,e,r),Ps(n,t,r)))}function ks(e,t,n){As(e,t,n,_u())}function As(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ms(e))Ns(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,mr(s,o))return qr(e,t,i,0),zl===null&&Kr(),!1}catch{}if(n=Jr(e,t,i,r),n!==null)return yu(n,e,r),Ps(n,t,r),!0}return!1}function js(e,t,n,r){if(r={lane:2,revertLane:gd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ms(e)){if(t)throw Error(i(479))}else t=Jr(e,n,r,2),t!==null&&yu(t,e,2)}function Ms(e){var t=e.alternate;return e===oo||t!==null&&t===oo}function Ns(e,t){uo=lo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ps(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ge(e,n)}}var Fs={readContext:Ji,use:Ao,useCallback:_o,useContext:_o,useEffect:_o,useImperativeHandle:_o,useLayoutEffect:_o,useInsertionEffect:_o,useMemo:_o,useReducer:_o,useRef:_o,useState:_o,useDebugValue:_o,useDeferredValue:_o,useTransition:_o,useSyncExternalStore:_o,useId:_o,useHostTransitionStatus:_o,useFormState:_o,useActionState:_o,useOptimistic:_o,useMemoCache:_o,useCacheRefresh:_o};Fs.useEffectEvent=_o;var Is={readContext:Ji,use:Ao,useCallback:function(e,t){return Eo().memoizedState=[e,t===void 0?null:t],e},useContext:Ji,useEffect:os,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),is(4194308,4,fs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return is(4194308,4,e,t)},useInsertionEffect:function(e,t){is(4,2,e,t)},useMemo:function(e,t){var n=Eo();t=t===void 0?null:t;var r=e();if(fo){Oe(!0);try{e()}finally{Oe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Eo();if(n!==void 0){var i=n(t);if(fo){Oe(!0);try{n(t)}finally{Oe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Os.bind(null,oo,e),[r.memoizedState,e]},useRef:function(e){var t=Eo();return e={current:e},t.memoizedState=e},useState:function(e){e=Ho(e);var t=e.queue,n=ks.bind(null,oo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ms,useDeferredValue:function(e,t){return _s(Eo(),e,t)},useTransition:function(){var e=Ho(!1);return e=ys.bind(null,oo,e.queue,!0,!1),Eo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=oo,a=Eo();if(Di){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),zl===null)throw Error(i(349));Vl&127||Lo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,os(zo.bind(null,r,o,e),[e]),r.flags|=2048,ns(9,{destroy:void 0},Ro.bind(null,r,o,n,t),null),n},useId:function(){var e=Eo(),t=zl.identifierPrefix;if(Di){var n=yi,r=vi;n=(r&~(1<<32-ke(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=po++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=go++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ws,useFormState:Zo,useActionState:Zo,useOptimistic:function(e){var t=Eo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=js.bind(null,oo,!0,n),n.dispatch=t,[e,t]},useMemoCache:jo,useCacheRefresh:function(){return Eo().memoizedState=Ds.bind(null,oo)},useEffectEvent:function(e){var t=Eo(),n={impl:e};return t.memoizedState=n,function(){if(Rl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ls={readContext:Ji,use:Ao,useCallback:hs,useContext:Ji,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:No,useRef:rs,useState:function(){return No(Mo)},useDebugValue:ms,useDeferredValue:function(e,t){return vs(Do(),so.memoizedState,e,t)},useTransition:function(){var e=No(Mo)[0],t=Do().memoizedState;return[typeof e==`boolean`?e:ko(e),t]},useSyncExternalStore:Io,useId:Ts,useHostTransitionStatus:ws,useFormState:Qo,useActionState:Qo,useOptimistic:function(e,t){return Uo(Do(),so,e,t)},useMemoCache:jo,useCacheRefresh:Es};Ls.useEffectEvent=ls;var Rs={readContext:Ji,use:Ao,useCallback:hs,useContext:Ji,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:Fo,useRef:rs,useState:function(){return Fo(Mo)},useDebugValue:ms,useDeferredValue:function(e,t){var n=Do();return so===null?_s(n,e,t):vs(n,so.memoizedState,e,t)},useTransition:function(){var e=Fo(Mo)[0],t=Do().memoizedState;return[typeof e==`boolean`?e:ko(e),t]},useSyncExternalStore:Io,useId:Ts,useHostTransitionStatus:ws,useFormState:ts,useActionState:ts,useOptimistic:function(e,t){var n=Do();return so===null?(n.baseState=e,[e,n.queue.dispatch]):Uo(n,so,e,t)},useMemoCache:jo,useCacheRefresh:Es};Rs.useEffectEvent=ls;function zs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Bs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_u(),i=Ia(r);i.payload=t,n!=null&&(i.callback=n),t=La(e,i,r),t!==null&&(yu(t,e,r),Ra(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_u(),i=Ia(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=La(e,i,r),t!==null&&(yu(t,e,r),Ra(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_u(),r=Ia(n);r.tag=2,t!=null&&(r.callback=t),t=La(e,r,n),t!==null&&(yu(t,e,n),Ra(t,e,n))}};function Vs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!hr(n,r)||!hr(i,a):!0}function Hs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Bs.enqueueReplaceState(t,t.state,null)}function Us(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ws(e){Hr(e)}function Gs(e){console.error(e)}function Ks(e){Hr(e)}function qs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Js(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ys(e,t,n){return n=Ia(n),n.tag=3,n.payload={element:null},n.callback=function(){qs(e,t)},n}function Xs(e){return e=Ia(e),e.tag=3,e}function Zs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Js(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Js(t,n,r),typeof i!=`function`&&(su===null?su=new Set([this]):su.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Qs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Gi(t,n,a,!0),n=Xa.current,n!==null){switch(n.tag){case 31:case 13:return Za===null?ju():n.alternate===null&&Jl===0&&(Jl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===va?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Xu(e,r,a)),!1;case 22:return n.flags|=65536,r===va?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Xu(e,r,a)),!1}throw Error(i(435,n.tag))}return Xu(e,r,a),ju(),!1}if(Di)return t=Xa.current,t===null?(r!==Ai&&(t=Error(i(423),{cause:r}),Li(ui(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ui(r,n),a=Ys(e.stateNode,r,a),za(e,a),Jl!==4&&(Jl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ai&&(e=Error(i(422),{cause:r}),Li(ui(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ui(o,n),eu===null?eu=[o]:eu.push(o),Jl!==4&&(Jl=2),t===null)return!0;r=ui(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ys(n.stateNode,r,e),za(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(su===null||!su.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Xs(a),Zs(a,e,n,r),za(n,a),!1}n=n.return}while(n!==null);return!1}var $s=Error(i(461)),ec=!1;function tc(e,t,n,r){t.child=e===null?Ma(t,null,n,r):ja(t,e.child,n,r)}function nc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return qi(t),r=yo(e,t,n,o,a,i),s=Co(),e!==null&&!ec?(wo(e,t,i),Ec(e,t,i)):(Di&&s&&Si(t),t.flags|=1,tc(e,t,r,i),t.child)}function rc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ti(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ic(e,t,a,r,i)):(e=ii(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Dc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?hr:n,n(o,r)&&e.ref===t.ref)return Ec(e,t,i)}return t.flags|=1,e=ni(a,r),e.ref=t.ref,e.return=t,t.child=e}function ic(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(hr(a,r)&&e.ref===t.ref)if(ec=!1,t.pendingProps=r=a,Dc(e,i))e.flags&131072&&(ec=!0);else return t.lanes=e.lanes,Ec(e,t,i)}return fc(e,t,n,r,i)}function ac(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return sc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&pa(t,a===null?null:a.cachePool),a===null?Ja():qa(t,a),eo(t);else return r=t.lanes=536870912,sc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&pa(t,null),Ja(),to(t)):(pa(t,a.cachePool),qa(t,a),to(t),t.memoizedState=null);return tc(e,t,i,n),t.child}function oc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function sc(e,t,n,r,i){var a=fa();return a=a===null?null:{parent:ea._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&pa(t,null),Ja(),eo(t),e!==null&&Gi(e,t,r,!0),t.childLanes=i,null}function cc(e,t){return t=xc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function lc(e,t,n){return ja(t,e.child,null,n),e=cc(t,t.pendingProps),e.flags|=2,no(t),t.memoizedState=null,e}function uc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Di){if(r.mode===`hidden`)return e=cc(t,r),t.lanes=536870912,oc(null,e);if($a(t),(e=Ei)?(e=df(e,ki),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i===null?null:{id:vi,overflow:yi},retryLane:536870912,hydrationErrors:null},n=si(e),n.return=t,t.child=n,Ti=t,Ei=null)):e=null,e===null)throw ji(t);return t.lanes=536870912,null}return cc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if($a(t),a)if(t.flags&256)t.flags&=-257,t=lc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(ec||Gi(e,t,n,!1),a=(n&e.childLanes)!==0,ec||a){if(r=zl,r!==null&&(s=Ke(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Yr(e,s),yu(r,e,s),$s;ju(),t=lc(e,t,n)}else e=o.treeContext,Ei=hf(s.nextSibling),Ti=t,Di=!0,Oi=null,ki=!1,e!==null&&wi(t,e),t=cc(t,r),t.flags|=4096;return t}return e=ni(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function dc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function fc(e,t,n,r,i){return qi(t),n=yo(e,t,n,r,void 0,i),r=Co(),e!==null&&!ec?(wo(e,t,i),Ec(e,t,i)):(Di&&r&&Si(t),t.flags|=1,tc(e,t,n,i),t.child)}function pc(e,t,n,r,i,a){return qi(t),t.updateQueue=null,n=xo(t,r,n,i),bo(e),r=Co(),e!==null&&!ec?(wo(e,t,a),Ec(e,t,a)):(Di&&r&&Si(t),t.flags|=1,tc(e,t,n,a),t.child)}function mc(e,t,n,r,i){if(qi(t),t.stateNode===null){var a=Qr,o=n.contextType;typeof o==`object`&&o&&(a=Ji(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Bs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Pa(t),o=n.contextType,a.context=typeof o==`object`&&o?Ji(o):Qr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(zs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Bs.enqueueReplaceState(a,a.state,null),Ha(t,r,a,i),Va(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Us(n,s);a.props=c;var l=a.context,u=n.contextType;o=Qr,typeof u==`object`&&u&&(o=Ji(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Hs(t,a,r,o),Na=!1;var f=t.memoizedState;a.state=f,Ha(t,r,a,i),Va(),l=t.memoizedState,s||f!==l||Na?(typeof d==`function`&&(zs(t,n,d,r),l=t.memoizedState),(c=Na||Vs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Fa(e,t),o=t.memoizedProps,u=Us(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Qr,typeof l==`object`&&l&&(c=Ji(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Hs(t,a,r,c),Na=!1,f=t.memoizedState,a.state=f,Ha(t,r,a,i),Va();var p=t.memoizedState;o!==d||f!==p||Na||e!==null&&e.dependencies!==null&&Ki(e.dependencies)?(typeof s==`function`&&(zs(t,n,s,r),p=t.memoizedState),(u=Na||Vs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ki(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,dc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=ja(t,e.child,null,i),t.child=ja(t,null,n,i)):tc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ec(e,t,i),e}function hc(e,t,n,r){return Fi(),t.flags|=256,tc(e,t,n,r),t.child}var gc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _c(e){return{baseLanes:e,cachePool:ma()}}function vc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Ql),e}function yc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(ro.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Di){if(a?Qa(t):to(t),(e=Ei)?(e=df(e,ki),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i===null?null:{id:vi,overflow:yi},retryLane:536870912,hydrationErrors:null},n=si(e),n.return=t,t.child=n,Ti=t,Ei=null)):e=null,e===null)throw ji(t);return pf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(to(t),a=t.mode,c=xc({mode:`hidden`,children:c},a),r=ai(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=_c(n),r.childLanes=vc(e,s,n),t.memoizedState=gc,oc(null,r)):(Qa(t),bc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Qa(t),t.flags&=-257,t=Sc(e,t,n)):t.memoizedState===null?(to(t),c=r.fallback,a=t.mode,r=xc({mode:`visible`,children:r.children},a),c=ai(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,ja(t,e.child,null,n),r=t.child,r.memoizedState=_c(n),r.childLanes=vc(e,s,n),t.memoizedState=gc,t=oc(null,r)):(to(t),t.child=e.child,t.flags|=128,t=null);else if(Qa(t),pf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Li({value:r,source:null,stack:null}),t=Sc(e,t,n)}else if(ec||Gi(e,t,n,!1),s=(n&e.childLanes)!==0,ec||s){if(s=zl,s!==null&&(r=Ke(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Yr(e,r),yu(s,e,r),$s;ff(c)||ju(),t=Sc(e,t,n)}else ff(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ei=hf(c.nextSibling),Ti=t,Di=!0,Oi=null,ki=!1,e!==null&&wi(t,e),t=bc(t,r.children),t.flags|=4096);return t}return a?(to(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ni(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ai(c,a,n,null),c.flags|=2):c=ni(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,oc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=_c(n):(a=c.cachePool,a===null?a=ma():(l=ea._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=vc(e,s,n),t.memoizedState=gc,oc(e.child,r)):(Qa(t),n=e.child,e=n.sibling,n=ni(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function bc(e,t){return t=xc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function xc(e,t){return e=ei(22,e,null,t),e.lanes=0,e}function Sc(e,t,n){return ja(t,e.child,null,n),e=bc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ui(e.return,t,n)}function wc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Tc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=ro.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,z(ro,o),tc(e,t,r,n),r=Di?mi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Cc(e,n,t);else if(e.tag===19)Cc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&io(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),wc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&io(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}wc(t,!0,n,null,a,r);break;case`together`:wc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ec(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Yl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Gi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ni(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ni(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Dc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Ki(e))):!0}function Oc(e,t,n){switch(t.tag){case 3:te(t,t.stateNode.containerInfo),Vi(t,ea,e.memoizedState.cache),Fi();break;case 27:case 5:re(t);break;case 4:te(t,t.stateNode.containerInfo);break;case 10:Vi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,$a(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Qa(t),e=Ec(e,t,n),e===null?null:e.sibling):yc(e,t,n):(Qa(t),t.flags|=128,null);Qa(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Gi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Tc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),z(ro,ro.current),r)break;return null;case 22:return t.lanes=0,ac(e,t,n,t.pendingProps);case 24:Vi(t,ea,e.memoizedState.cache)}return Ec(e,t,n)}function kc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ec=!0;else{if(!Dc(e,n)&&!(t.flags&128))return ec=!1,Oc(e,t,n);ec=!!(e.flags&131072)}else ec=!1,Di&&t.flags&1048576&&xi(t,mi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=xa(t.elementType),t.type=e,typeof e==`function`)ti(e)?(r=Us(e,r),t.tag=1,t=mc(null,t,e,r,n)):(t.tag=0,t=fc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=nc(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=rc(null,t,e,r,n);break a}}throw t=j(e)||e,Error(i(306,t,``))}}return t;case 0:return fc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Us(r,t.pendingProps),mc(e,t,r,a,n);case 3:a:{if(te(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Fa(e,t),Ha(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Vi(t,ea,r),r!==o.cache&&Wi(t,[ea],n,!0),Va(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=hc(e,t,r,n);break a}else if(r!==a){a=ui(Error(i(424)),t),Li(a),t=hc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ei=hf(e.firstChild),Ti=t,Di=!0,Oi=null,ki=!0,n=Ma(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Fi(),r===a){t=Ec(e,t,n);break a}tc(e,t,r,n)}t=t.child}return t;case 26:return dc(e,t),e===null?(n=If(t.type,null,t.pendingProps,null))?t.memoizedState=n:Di||(n=t.type,e=t.pendingProps,r=qd(H.current).createElement(n),r[Qe]=t,r[$e]=e,Vd(r,n,e),dt(r),t.stateNode=r):t.memoizedState=If(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return re(t),e===null&&Di&&(r=t.stateNode=yf(t.type,t.pendingProps,H.current),Ti=t,ki=!0,a=Ei,af(t.type)?(gf=a,Ei=hf(r.firstChild)):Ei=a),tc(e,t,t.pendingProps.children,n),dc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Di&&((a=r=Ei)&&(r=lf(r,t.type,t.pendingProps,ki),r===null?a=!1:(t.stateNode=r,Ti=t,Ei=hf(r.firstChild),ki=!1,a=!0)),a||ji(t)),re(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Xd(a,o)?r=null:s!==null&&Xd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=yo(e,t,So,null,null,n),W._currentValue=a),dc(e,t),tc(e,t,r,n),t.child;case 6:return e===null&&Di&&((e=n=Ei)&&(n=uf(n,t.pendingProps,ki),n===null?e=!1:(t.stateNode=n,Ti=t,Ei=null,e=!0)),e||ji(t)),null;case 13:return yc(e,t,n);case 4:return te(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ja(t,null,r,n):tc(e,t,r,n),t.child;case 11:return nc(e,t,t.type,t.pendingProps,n);case 7:return tc(e,t,t.pendingProps,n),t.child;case 8:return tc(e,t,t.pendingProps.children,n),t.child;case 12:return tc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Vi(t,t.type,r.value),tc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,qi(t),a=Ji(a),r=r(a),t.flags|=1,tc(e,t,r,n),t.child;case 14:return rc(e,t,t.type,t.pendingProps,n);case 15:return ic(e,t,t.type,t.pendingProps,n);case 19:return Tc(e,t,n);case 31:return uc(e,t,n);case 22:return ac(e,t,n,t.pendingProps);case 24:return qi(t),r=Ji(ea),e===null?(a=fa(),a===null&&(a=zl,o=ta(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Pa(t),Vi(t,ea,a)):((e.lanes&n)!==0&&(Fa(e,t),Ha(t,null,null,n),Va()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Vi(t,ea,r),r!==a.cache&&Wi(t,[ea],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Vi(t,ea,r))),tc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ac(e){e.flags|=4}function jc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Ou())e.flags|=8192;else throw Sa=va,ga}else e.flags&=-16777217}function Mc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Zf(t))if(Ou())e.flags|=8192;else throw Sa=va,ga}function Nc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Be(),e.lanes|=t,$l|=t)}function Pc(e,t){if(!Di)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Fc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ic(e,t,n){var r=t.pendingProps;switch(Ci(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fc(t),null;case 1:return Fc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Hi(ea),ne(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Pi(t)?Ac(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ii())),Fc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Ac(t),o===null?(Fc(t),jc(t,a,null,r,n)):(Fc(t),Mc(t,o))):o?o===e.memoizedState?(Fc(t),t.flags&=-16777217):(Ac(t),Fc(t),Mc(t,o)):(e=e.memoizedProps,e!==r&&Ac(t),Fc(t),jc(t,a,e,r,n)),null;case 27:if(ie(t),n=H.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Fc(t),null}e=B.current,Pi(t)?Mi(t,e):(e=yf(a,r,n),t.stateNode=e,Ac(t))}return Fc(t),null;case 5:if(ie(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Fc(t),null}if(o=B.current,Pi(t))Mi(t,o);else{var s=qd(H.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Qe]=t,o[$e]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Vd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ac(t)}}return Fc(t),jc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=H.current,Pi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ti,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Qe]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Rd(e.nodeValue,n)),e||ji(t,!0)}else e=qd(e).createTextNode(r),e[Qe]=t,t.stateNode=e}return Fc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Pi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Qe]=t}else Fi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),e=!1}else n=Ii(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(no(t),t):(no(t),null);if(t.flags&128)throw Error(i(558))}return Fc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Pi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Qe]=t}else Fi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),a=!1}else a=Ii(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(no(t),t):(no(t),null)}return no(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Nc(t,t.updateQueue),Fc(t),null);case 4:return ne(),e===null&&Od(t.stateNode.containerInfo),Fc(t),null;case 10:return Hi(t.type),Fc(t),null;case 19:if(R(ro),r=t.memoizedState,r===null)return Fc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Pc(r,!1);else{if(Jl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=io(e),o!==null){for(t.flags|=128,Pc(r,!1),e=o.updateQueue,t.updateQueue=e,Nc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ri(n,e),n=n.sibling;return z(ro,ro.current&1|2),Di&&bi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&_e()>au&&(t.flags|=128,a=!0,Pc(r,!1),t.lanes=4194304)}else{if(!a)if(e=io(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Nc(t,e),Pc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Di)return Fc(t),null}else 2*_e()-r.renderingStartTime>au&&n!==536870912&&(t.flags|=128,a=!0,Pc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Fc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=_e(),e.sibling=null,n=ro.current,z(ro,a?n&1|2:n&1),Di&&bi(t,r.treeForkCount),e);case 22:case 23:return no(t),Ya(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Fc(t),t.subtreeFlags&6&&(t.flags|=8192)):Fc(t),n=t.updateQueue,n!==null&&Nc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&R(da),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Hi(ea),Fc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Lc(e,t){switch(Ci(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hi(ea),ne(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ie(t),null;case 31:if(t.memoizedState!==null){if(no(t),t.alternate===null)throw Error(i(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(no(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return R(ro),null;case 4:return ne(),null;case 10:return Hi(t.type),null;case 22:case 23:return no(t),Ya(),e!==null&&R(da),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Hi(ea),null;case 25:return null;default:return null}}function Rc(e,t){switch(Ci(t),t.tag){case 3:Hi(ea),ne();break;case 26:case 27:case 5:ie(t);break;case 4:ne();break;case 31:t.memoizedState!==null&&no(t);break;case 13:no(t);break;case 19:R(ro);break;case 10:Hi(t.type);break;case 22:case 23:no(t),Ya(),e!==null&&R(da);break;case 24:Hi(ea)}}function zc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Yu(t,t.return,e)}}function Bc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Yu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Yu(t,t.return,e)}}function Vc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Wa(t,n)}catch(t){Yu(e,e.return,t)}}}function Hc(e,t,n){n.props=Us(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Yu(e,t,n)}}function Uc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Yu(e,t,n)}}function Wc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Yu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Yu(e,t,n)}else n.current=null}function Gc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Yu(e,e.return,t)}}function Kc(e,t,n){try{var r=e.stateNode;Hd(r,e.type,n,t),r[$e]=t}catch(t){Yu(e,e.return,t)}}function qc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&af(e.type)||e.tag===4}function Jc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||qc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&af(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gt));else if(r!==4&&(r===27&&af(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&af(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Vd(t,r,n),t[Qe]=e,t[$e]=n}catch(t){Yu(e,e.return,t)}}var Qc=!1,$c=!1,el=!1,tl=typeof WeakSet==`function`?WeakSet:Set,nl=null;function rl(e,t){if(e=e.containerInfo,Gd=mp,e=yr(e),br(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Kd={focusedElem:e,selectionRange:n},mp=!1,nl=t;nl!==null;)if(t=nl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,nl=e;else for(;nl!==null;){switch(t=nl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Us(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Yu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)cf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:cf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,nl=e;break}nl=t.return}}function il(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:yl(e,n),r&4&&zc(5,n);break;case 1:if(yl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Yu(n,n.return,e)}else{var i=Us(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Yu(n,n.return,e)}}r&64&&Vc(n),r&512&&Uc(n,n.return);break;case 3:if(yl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Wa(e,t)}catch(e){Yu(n,n.return,e)}}break;case 27:t===null&&r&4&&Zc(n);case 26:case 5:yl(e,n),t===null&&r&4&&Gc(n),r&512&&Uc(n,n.return);break;case 12:yl(e,n);break;case 31:yl(e,n),r&4&&ul(e,n);break;case 13:yl(e,n),r&4&&dl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=$u.bind(null,n),mf(e,n))));break;case 22:if(r=n.memoizedState!==null||Qc,!r){t=t!==null&&t.memoizedState!==null||$c,i=Qc;var a=$c;Qc=r,($c=t)&&!a?xl(e,n,(n.subtreeFlags&8772)!=0):yl(e,n),Qc=i,$c=a}break;case 30:break;default:yl(e,n)}}function al(e){var t=e.alternate;t!==null&&(e.alternate=null,al(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ot(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ol=null,sl=!1;function cl(e,t,n){for(n=n.child;n!==null;)ll(e,t,n),n=n.sibling}function ll(e,t,n){if(De&&typeof De.onCommitFiberUnmount==`function`)try{De.onCommitFiberUnmount(Ee,n)}catch{}switch(n.tag){case 26:$c||Wc(n,t),cl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:$c||Wc(n,t);var r=ol,i=sl;af(n.type)&&(ol=n.stateNode,sl=!1),cl(e,t,n),bf(n.stateNode),ol=r,sl=i;break;case 5:$c||Wc(n,t);case 6:if(r=ol,i=sl,ol=null,cl(e,t,n),ol=r,sl=i,ol!==null)if(sl)try{(ol.nodeType===9?ol.body:ol.nodeName===`HTML`?ol.ownerDocument.body:ol).removeChild(n.stateNode)}catch(e){Yu(n,t,e)}else try{ol.removeChild(n.stateNode)}catch(e){Yu(n,t,e)}break;case 18:ol!==null&&(sl?(e=ol,of(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hp(e)):of(ol,n.stateNode));break;case 4:r=ol,i=sl,ol=n.stateNode.containerInfo,sl=!0,cl(e,t,n),ol=r,sl=i;break;case 0:case 11:case 14:case 15:Bc(2,n,t),$c||Bc(4,n,t),cl(e,t,n);break;case 1:$c||(Wc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Hc(n,t,r)),cl(e,t,n);break;case 21:cl(e,t,n);break;case 22:$c=(r=$c)||n.memoizedState!==null,cl(e,t,n),$c=r;break;default:cl(e,t,n)}}function ul(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hp(e)}catch(e){Yu(t,t.return,e)}}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hp(e)}catch(e){Yu(t,t.return,e)}}function fl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new tl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new tl),t;default:throw Error(i(435,e.tag))}}function pl(e,t){var n=fl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=ed.bind(null,e,t);t.then(r,r)}})}function ml(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(af(c.type)){ol=c.stateNode,sl=!1;break a}break;case 5:ol=c.stateNode,sl=!1;break a;case 3:case 4:ol=c.stateNode.containerInfo,sl=!0;break a}c=c.return}if(ol===null)throw Error(i(160));ll(o,s,a),ol=null,sl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)gl(t,e),t=t.sibling}var hl=null;function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ml(t,e),_l(e),r&4&&(Bc(3,e,e.return),zc(3,e),Bc(5,e,e.return));break;case 1:ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),r&64&&Qc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=hl;if(ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[at]||o[Qe]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Vd(o,r,n),o[Qe]=e,dt(o),r=o;break a;case`link`:var s=Jf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Vd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Jf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Vd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[Qe]=e,dt(o),r=o}e.stateNode=r}else Yf(a,e.type,e.stateNode);else e.stateNode=Uf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Kc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Yf(a,e.type,e.stateNode):Uf(a,r,e.memoizedProps))}break;case 27:ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),n!==null&&r&4&&Kc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),e.flags&32){a=e.stateNode;try{Lt(a,``)}catch(t){Yu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Kc(e,a,n===null?a:n.memoizedProps)),r&1024&&(el=!0);break;case 6:if(ml(t,e),_l(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Yu(e,e.return,t)}}break;case 3:if(qf=null,a=hl,hl=Cf(t.containerInfo),ml(t,e),hl=a,_l(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Hp(t.containerInfo)}catch(t){Yu(e,e.return,t)}el&&(el=!1,vl(e));break;case 4:r=hl,hl=Cf(e.stateNode.containerInfo),ml(t,e),_l(e),hl=r;break;case 12:ml(t,e),_l(e);break;case 31:ml(t,e),_l(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,pl(e,r)));break;case 13:ml(t,e),_l(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ru=_e()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,pl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Qc,d=$c;if(Qc=u||a,$c=d||l,ml(t,e),$c=d,Qc=u,_l(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Qc||$c||bl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Yu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Yu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?sf(m,!0):sf(l.stateNode,!1)}catch(e){Yu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,pl(e,n))));break;case 19:ml(t,e),_l(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,pl(e,r)));break;case 30:break;case 21:break;default:ml(t,e),_l(e)}}function _l(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(qc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Xc(e,Jc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Lt(o,``),n.flags&=-33),Xc(e,Jc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Yc(e,Jc(e),s);break;default:throw Error(i(161))}}catch(t){Yu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;vl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function yl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)il(e,t.alternate,t),t=t.sibling}function bl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Bc(4,t,t.return),bl(t);break;case 1:Wc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Hc(t,t.return,n),bl(t);break;case 27:bf(t.stateNode);case 26:case 5:Wc(t,t.return),bl(t);break;case 22:t.memoizedState===null&&bl(t);break;case 30:bl(t);break;default:bl(t)}e=e.sibling}}function xl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:xl(i,a,n),zc(4,a);break;case 1:if(xl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Yu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ua(c[i],s)}catch(e){Yu(r,r.return,e)}}n&&o&64&&Vc(a),Uc(a,a.return);break;case 27:Zc(a);case 26:case 5:xl(i,a,n),n&&r===null&&o&4&&Gc(a),Uc(a,a.return);break;case 12:xl(i,a,n);break;case 31:xl(i,a,n),n&&o&4&&ul(i,a);break;case 13:xl(i,a,n),n&&o&4&&dl(i,a);break;case 22:a.memoizedState===null&&xl(i,a,n),Uc(a,a.return);break;case 30:break;default:xl(i,a,n)}t=t.sibling}}function Sl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&na(n))}function Cl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&na(e))}function wl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Tl(e,t,n,r),t=t.sibling}function Tl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:wl(e,t,n,r),i&2048&&zc(9,t);break;case 1:wl(e,t,n,r);break;case 3:wl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&na(e)));break;case 12:if(i&2048){wl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Yu(t,t.return,e)}}else wl(e,t,n,r);break;case 31:wl(e,t,n,r);break;case 13:wl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?wl(e,t,n,r):(a._visibility|=2,El(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?wl(e,t,n,r):Dl(e,t),i&2048&&Sl(o,t);break;case 24:wl(e,t,n,r),i&2048&&Cl(t.alternate,t);break;default:wl(e,t,n,r)}}function El(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:El(a,o,s,c,i),zc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,El(a,o,s,c,i)):u._visibility&2?El(a,o,s,c,i):Dl(a,o),i&&l&2048&&Sl(o.alternate,o);break;case 24:El(a,o,s,c,i),i&&l&2048&&Cl(o.alternate,o);break;default:El(a,o,s,c,i)}t=t.sibling}}function Dl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Dl(n,r),i&2048&&Sl(r.alternate,r);break;case 24:Dl(n,r),i&2048&&Cl(r.alternate,r);break;default:Dl(n,r)}t=t.sibling}}var Ol=8192;function kl(e,t,n){if(e.subtreeFlags&Ol)for(e=e.child;e!==null;)Al(e,t,n),e=e.sibling}function Al(e,t,n){switch(e.tag){case 26:kl(e,t,n),e.flags&Ol&&e.memoizedState!==null&&Qf(n,hl,e.memoizedState,e.memoizedProps);break;case 5:kl(e,t,n);break;case 3:case 4:var r=hl;hl=Cf(e.stateNode.containerInfo),kl(e,t,n),hl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ol,Ol=16777216,kl(e,t,n),Ol=r):kl(e,t,n));break;default:kl(e,t,n)}}function jl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ml(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nl=r,Fl(r,e)}jl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Nl(e),e=e.sibling}function Nl(e){switch(e.tag){case 0:case 11:case 15:Ml(e),e.flags&2048&&Bc(9,e,e.return);break;case 3:Ml(e);break;case 12:Ml(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Pl(e)):Ml(e);break;default:Ml(e)}}function Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nl=r,Fl(r,e)}jl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Bc(8,t,t.return),Pl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Pl(t));break;default:Pl(t)}e=e.sibling}}function Fl(e,t){for(;nl!==null;){var n=nl;switch(n.tag){case 0:case 11:case 15:Bc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:na(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,nl=r;else a:for(n=e;nl!==null;){r=nl;var i=r.sibling,a=r.return;if(al(r),r===n){nl=null;break a}if(i!==null){i.return=a,nl=i;break a}nl=a}}}var Il={getCacheForType:function(e){var t=Ji(ea),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ji(ea).controller.signal}},Ll=typeof WeakMap==`function`?WeakMap:Map,Rl=0,zl=null,Bl=null,Vl=0,Hl=0,Ul=null,Wl=!1,Gl=!1,Kl=!1,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=0,eu=null,tu=null,nu=!1,ru=0,iu=0,au=1/0,ou=null,su=null,cu=0,lu=null,uu=null,du=0,fu=0,pu=null,mu=null,hu=0,gu=null;function _u(){return Rl&2&&Vl!==0?Vl&-Vl:N.T===null?Ye():gd()}function vu(){if(Ql===0)if(!(Vl&536870912)||Di){var e=Pe;Pe<<=1,!(Pe&3932160)&&(Pe=262144),Ql=e}else Ql=536870912;return e=Xa.current,e!==null&&(e.flags|=32),Ql}function yu(e,t,n){(e===zl&&(Hl===2||Hl===9)||e.cancelPendingCommit!==null)&&(Eu(e,0),Cu(e,Vl,Ql,!1)),He(e,n),(!(Rl&2)||e!==zl)&&(e===zl&&(!(Rl&2)&&(Xl|=n),Jl===4&&Cu(e,Vl,Ql,!1)),cd(e))}function bu(e,t,n){if(Rl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Re(e,t),a=r?Pu(e,t):Mu(e,t,!0),o=r;do{if(a===0){Gl&&!r&&Cu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Su(n)){a=Mu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=eu;var l=c.current.memoizedState.isDehydrated;if(l&&(Eu(c,s).flags|=256),s=Mu(c,s,!1),s!==2){if(Kl&&!l){c.errorRecoveryDisabledLanes|=o,Xl|=o,a=4;break a}o=tu,tu=a,o!==null&&(tu===null?tu=o:tu.push.apply(tu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Eu(e,0),Cu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Cu(r,t,Ql,!Wl);break a;case 2:tu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=ru+300-_e(),10<a)){if(Cu(r,t,Ql,!Wl),Le(r,0,!0)!==0)break a;du=t,r.timeoutHandle=$d(xu.bind(null,r,n,tu,ou,nu,t,Ql,Xl,$l,Wl,o,`Throttled`,-0,0),a);break a}xu(r,n,tu,ou,nu,t,Ql,Xl,$l,Wl,o,null,-0,0)}}break}while(1);cd(e)}function xu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Gt},Al(t,a,d);var m=(a&62914560)===a?ru-_e():(a&4194048)===a?iu-_e():0;if(m=ep(d,m),m!==null){du=a,e.cancelPendingCommit=m(Vu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Cu(e,a,o,!l);return}}Vu(e,t,a,n,r,i,o,s,c)}function Su(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!mr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Cu(e,t,n,r){t&=~Zl,t&=~Xl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-ke(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&We(e,n,t)}function wu(){return Rl&6?!0:(ld(0,!1),!1)}function Tu(){if(Bl!==null){if(Hl===0)var e=Bl.return;else e=Bl,Bi=zi=null,To(e),Ta=null,Ea=0,e=Bl;for(;e!==null;)Rc(e.alternate,e),e=e.return;Bl=null}}function Eu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,ef(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),du=0,Tu(),zl=e,Bl=n=ni(e.current,null),Vl=t,Hl=0,Ul=null,Wl=!1,Gl=Re(e,t),Kl=!1,$l=Ql=Zl=Xl=Yl=Jl=0,tu=eu=null,nu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-ke(r),a=1<<i;t|=e[i],r&=~a}return ql=t,Kr(),n}function Du(e,t){oo=null,N.H=Fs,t===ha||t===_a?(t=Ca(),Hl=3):t===ga?(t=Ca(),Hl=4):Hl=t===$s?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ul=t,Bl===null&&(Jl=1,qs(e,ui(t,e.current)))}function Ou(){var e=Xa.current;return e===null?!0:(Vl&4194048)===Vl?Za===null:(Vl&62914560)===Vl||Vl&536870912?e===Za:!1}function ku(){var e=N.H;return N.H=Fs,e===null?Fs:e}function Au(){var e=N.A;return N.A=Il,e}function ju(){Jl=4,Wl||(Vl&4194048)!==Vl&&Xa.current!==null||(Gl=!0),!(Yl&134217727)&&!(Xl&134217727)||zl===null||Cu(zl,Vl,Ql,!1)}function Mu(e,t,n){var r=Rl;Rl|=2;var i=ku(),a=Au();(zl!==e||Vl!==t)&&(ou=null,Eu(e,t)),t=!1;var o=Jl;a:do try{if(Hl!==0&&Bl!==null){var s=Bl,c=Ul;switch(Hl){case 8:Tu(),o=6;break a;case 3:case 2:case 9:case 6:Xa.current===null&&(t=!0);var l=Hl;if(Hl=0,Ul=null,Ru(e,s,c,l),n&&Gl){o=0;break a}break;default:l=Hl,Hl=0,Ul=null,Ru(e,s,c,l)}}Nu(),o=Jl;break}catch(t){Du(e,t)}while(1);return t&&e.shellSuspendCounter++,Bi=zi=null,Rl=r,N.H=i,N.A=a,Bl===null&&(zl=null,Vl=0,Kr()),o}function Nu(){for(;Bl!==null;)Iu(Bl)}function Pu(e,t){var n=Rl;Rl|=2;var r=ku(),a=Au();zl!==e||Vl!==t?(ou=null,au=_e()+500,Eu(e,t)):Gl=Re(e,t);a:do try{if(Hl!==0&&Bl!==null){t=Bl;var o=Ul;b:switch(Hl){case 1:Hl=0,Ul=null,Ru(e,t,o,1);break;case 2:case 9:if(ya(o)){Hl=0,Ul=null,Lu(t);break}t=function(){Hl!==2&&Hl!==9||zl!==e||(Hl=7),cd(e)},o.then(t,t);break a;case 3:Hl=7;break a;case 4:Hl=5;break a;case 7:ya(o)?(Hl=0,Ul=null,Lu(t)):(Hl=0,Ul=null,Ru(e,t,o,7));break;case 5:var s=null;switch(Bl.tag){case 26:s=Bl.memoizedState;case 5:case 27:var c=Bl;if(s?Zf(s):c.stateNode.complete){Hl=0,Ul=null;var l=c.sibling;if(l!==null)Bl=l;else{var u=c.return;u===null?Bl=null:(Bl=u,zu(u))}break b}}Hl=0,Ul=null,Ru(e,t,o,5);break;case 6:Hl=0,Ul=null,Ru(e,t,o,6);break;case 8:Tu(),Jl=6;break a;default:throw Error(i(462))}}Fu();break}catch(t){Du(e,t)}while(1);return Bi=zi=null,N.H=r,N.A=a,Rl=n,Bl===null?(zl=null,Vl=0,Kr(),Jl):0}function Fu(){for(;Bl!==null&&!he();)Iu(Bl)}function Iu(e){var t=kc(e.alternate,e,ql);e.memoizedProps=e.pendingProps,t===null?zu(e):Bl=t}function Lu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=pc(n,t,t.pendingProps,t.type,void 0,Vl);break;case 11:t=pc(n,t,t.pendingProps,t.type.render,t.ref,Vl);break;case 5:To(t);default:Rc(n,t),t=Bl=ri(t,ql),t=kc(n,t,ql)}e.memoizedProps=e.pendingProps,t===null?zu(e):Bl=t}function Ru(e,t,n,r){Bi=zi=null,To(t),Ta=null,Ea=0;var i=t.return;try{if(Qs(e,i,t,n,Vl)){Jl=1,qs(e,ui(n,e.current)),Bl=null;return}}catch(t){if(i!==null)throw Bl=i,t;Jl=1,qs(e,ui(n,e.current)),Bl=null;return}t.flags&32768?(Di||r===1?e=!0:Gl||Vl&536870912?e=!1:(Wl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Xa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Bu(t,e)):zu(t)}function zu(e){var t=e;do{if(t.flags&32768){Bu(t,Wl);return}e=t.return;var n=Ic(t.alternate,t,ql);if(n!==null){Bl=n;return}if(t=t.sibling,t!==null){Bl=t;return}Bl=t=e}while(t!==null);Jl===0&&(Jl=5)}function Bu(e,t){do{var n=Lc(e.alternate,e);if(n!==null){n.flags&=32767,Bl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Bl=e;return}Bl=e=n}while(e!==null);Jl=6,Bl=null}function Vu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Ku();while(cu!==0);if(Rl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Gr,Ue(e,n,o,s,c,l),e===zl&&(Bl=zl=null,Vl=0),uu=t,lu=e,du=n,fu=o,pu=a,mu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,td(xe,function(){return qu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=N.T,N.T=null,a=P.p,P.p=2,s=Rl,Rl|=4;try{rl(e,t,n)}finally{Rl=s,P.p=a,N.T=r}}cu=1,Hu(),Uu(),Wu()}}function Hu(){if(cu===1){cu=0;var e=lu,t=uu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=Rl;Rl|=4;try{gl(t,e);var a=Kd,o=yr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&vr(s.ownerDocument.documentElement,s)){if(c!==null&&br(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=_r(s,h),v=_r(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}mp=!!Gd,Kd=Gd=null}finally{Rl=i,P.p=r,N.T=n}}e.current=t,cu=2}}function Uu(){if(cu===2){cu=0;var e=lu,t=uu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=Rl;Rl|=4;try{il(e,t.alternate,t)}finally{Rl=i,P.p=r,N.T=n}}cu=3}}function Wu(){if(cu===4||cu===3){cu=0,ge();var e=lu,t=uu,n=du,r=mu;t.subtreeFlags&10256||t.flags&10256?cu=5:(cu=0,uu=lu=null,Gu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(su=null),Je(n),t=t.stateNode,De&&typeof De.onCommitFiberRoot==`function`)try{De.onCommitFiberRoot(Ee,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=N.T,i=P.p,P.p=2,N.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{N.T=t,P.p=i}}du&3&&Ku(),cd(e),i=e.pendingLanes,n&261930&&i&42?e===gu?hu++:(hu=0,gu=e):hu=0,ld(0,!1)}}function Gu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,na(t)))}function Ku(){return Hu(),Uu(),Wu(),qu()}function qu(){if(cu!==5)return!1;var e=lu,t=fu;fu=0;var n=Je(du),r=N.T,a=P.p;try{P.p=32>n?32:n,N.T=null,n=pu,pu=null;var o=lu,s=du;if(cu=0,uu=lu=null,du=0,Rl&6)throw Error(i(331));var c=Rl;if(Rl|=4,Nl(o.current),Tl(o,o.current,s,n),Rl=c,ld(0,!1),De&&typeof De.onPostCommitFiberRoot==`function`)try{De.onPostCommitFiberRoot(Ee,o)}catch{}return!0}finally{P.p=a,N.T=r,Gu(e,t)}}function Ju(e,t,n){t=ui(n,t),t=Ys(e.stateNode,t,2),e=La(e,t,2),e!==null&&(He(e,2),cd(e))}function Yu(e,t,n){if(e.tag===3)Ju(e,e,n);else for(;t!==null;){if(t.tag===3){Ju(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(su===null||!su.has(r))){e=ui(n,e),n=Xs(2),r=La(t,n,2),r!==null&&(Zs(n,r,t,e),He(r,2),cd(r));break}}t=t.return}}function Xu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ll;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Kl=!0,i.add(n),e=Zu.bind(null,e,t,n),t.then(e,e))}function Zu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,zl===e&&(Vl&n)===n&&(Jl===4||Jl===3&&(Vl&62914560)===Vl&&300>_e()-ru?!(Rl&2)&&Eu(e,0):Zl|=n,$l===Vl&&($l=0)),cd(e)}function Qu(e,t){t===0&&(t=Be()),e=Yr(e,t),e!==null&&(He(e,t),cd(e))}function $u(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qu(e,n)}function ed(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Qu(e,n)}function td(e,t){return pe(e,t)}var nd=null,rd=null,id=!1,ad=!1,od=!1,sd=0;function cd(e){e!==rd&&e.next===null&&(rd===null?nd=rd=e:rd=rd.next=e),ad=!0,id||(id=!0,hd())}function ld(e,t){if(!od&&ad){od=!0;do for(var n=!1,r=nd;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-ke(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,md(r,a))}else a=Vl,a=Le(r,r===zl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Re(r,a)||(n=!0,md(r,a));r=r.next}while(n);od=!1}}function ud(){dd()}function dd(){ad=id=!1;var e=0;sd!==0&&Qd()&&(e=sd);for(var t=_e(),n=null,r=nd;r!==null;){var i=r.next,a=fd(r,t);a===0?(r.next=null,n===null?nd=i:n.next=i,i===null&&(rd=n)):(n=r,(e!==0||a&3)&&(ad=!0)),r=i}cu!==0&&cu!==5||ld(e,!1),sd!==0&&(sd=0)}function fd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-ke(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ze(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=zl,n=Vl,n=Le(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Hl===2||Hl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&me(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Re(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&me(r),Je(n)){case 2:case 8:n=be;break;case 32:n=xe;break;case 268435456:n=Ce;break;default:n=xe}return r=pd.bind(null,e),n=pe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&me(r),e.callbackPriority=2,e.callbackNode=null,2}function pd(e,t){if(cu!==0&&cu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ku()&&e.callbackNode!==n)return null;var r=Vl;return r=Le(e,e===zl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(bu(e,r,t),fd(e,_e()),e.callbackNode!=null&&e.callbackNode===n?pd.bind(null,e):null)}function md(e,t){if(Ku())return null;bu(e,t,!0)}function hd(){nf(function(){Rl&6?pe(ye,ud):dd()})}function gd(){if(sd===0){var e=aa;e===0&&(e=Ne,Ne<<=1,!(Ne&261888)&&(Ne=256)),sd=e}return sd}function _d(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Wt(``+e)}function vd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function yd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=_d((i[$e]||null).action),o=r.submitter;o&&(t=(t=o[$e]||null)?_d(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new pn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(sd!==0){var e=o?vd(i,o):new FormData(i);xs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?vd(i,o):new FormData(i),xs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var bd=0;bd<Br.length;bd++){var xd=Br[bd];Vr(xd.toLowerCase(),`on`+(xd[0].toUpperCase()+xd.slice(1)))}Vr(Mr,`onAnimationEnd`),Vr(Nr,`onAnimationIteration`),Vr(Pr,`onAnimationStart`),Vr(`dblclick`,`onDoubleClick`),Vr(`focusin`,`onFocus`),Vr(`focusout`,`onBlur`),Vr(Fr,`onTransitionRun`),Vr(Ir,`onTransitionStart`),Vr(Lr,`onTransitionCancel`),Vr(Rr,`onTransitionEnd`),ht(`onMouseEnter`,[`mouseout`,`mouseover`]),ht(`onMouseLeave`,[`mouseout`,`mouseover`]),ht(`onPointerEnter`,[`pointerout`,`pointerover`]),ht(`onPointerLeave`,[`pointerout`,`pointerover`]),mt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),mt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),mt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),mt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),mt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),mt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Sd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Cd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Sd));function wd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Hr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Hr(e)}i.currentTarget=null,a=c}}}}function Td(e,t){var n=t[tt];n===void 0&&(n=t[tt]=new Set);var r=e+`__bubble`;n.has(r)||(kd(t,e,2,!1),n.add(r))}function Ed(e,t,n){var r=0;t&&(r|=4),kd(n,e,r,t)}var Dd=`_reactListening`+Math.random().toString(36).slice(2);function Od(e){if(!e[Dd]){e[Dd]=!0,ft.forEach(function(t){t!==`selectionchange`&&(Cd.has(t)||Ed(t,!1,e),Ed(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Dd]||(t[Dd]=!0,Ed(`selectionchange`,!1,t))}}function kd(e,t,n,r){switch(xp(t)){case 2:var i=hp;break;case 8:i=gp;break;default:i=_p}n=i.bind(null,t,n,e),i=void 0,!tn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Ad(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=st(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Qt(function(){var r=a,i=qt(n),s=[];a:{var c=zr.get(e);if(c!==void 0){var l=pn,u=e;switch(e){case`keypress`:if(cn(n)===0)break a;case`keydown`:case`keyup`:l=jn;break;case`focusin`:u=`focus`,l=Sn;break;case`focusout`:u=`blur`,l=Sn;break;case`beforeblur`:case`afterblur`:l=Sn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=bn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=xn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Nn;break;case Mr:case Nr:case Pr:l=Cn;break;case Rr:l=Pn;break;case`scroll`:case`scrollend`:l=hn;break;case`wheel`:l=Fn;break;case`copy`:case`cut`:case`paste`:l=wn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Mn;break;case`toggle`:case`beforetoggle`:l=In}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=$t(m,p),g!=null&&d.push(jd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Kt&&(u=n.relatedTarget||n.fromElement)&&(st(u)||u[et]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?st(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=bn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Mn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:lt(l),h=u==null?c:lt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,st(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Nd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Pd(s,c,l,d,!1),u!==null&&f!==null&&Pd(s,f,u,d,!0)}}a:{if(c=r?lt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=nr;else if(Xn(c))if(rr)v=fr;else{v=ur;var y=lr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Vt(r.elementType)&&(v=nr):v=dr;if(v&&=v(e,r)){Zn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Nt(c,`number`,c.value)}switch(y=r?lt(r):window,e){case`focusin`:(Xn(y)||y.contentEditable===`true`)&&(Sr=y,Cr=r,wr=null);break;case`focusout`:wr=Cr=Sr=null;break;case`mousedown`:Tr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Tr=!1,Er(s,n,i);break;case`selectionchange`:if(xr)break;case`keydown`:case`keyup`:Er(s,n,i)}var b;if(Rn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Kn?Wn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Vn&&n.locale!==`ko`&&(Kn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Kn&&(b=sn()):(rn=i,an=`value`in rn?rn.value:rn.textContent,Kn=!0)),y=Md(r,x),0<y.length&&(x=new Tn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Gn(n),b!==null&&(x.data=b)))),(b=Bn?qn(e,n):Jn(e,n))&&(x=Md(r,`onBeforeInput`),0<x.length&&(y=new Tn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),yd(s,e,r,n,i)}wd(s,t)})}function jd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Md(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=$t(e,n),i!=null&&r.unshift(jd(e,i,a)),i=$t(e,t),i!=null&&r.push(jd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Nd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Pd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=$t(n,a),l!=null&&o.unshift(jd(n,l,c))):i||(l=$t(n,a),l!=null&&o.push(jd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Fd=/\r\n?/g,Id=/\u0000|\uFFFD/g;function Ld(e){return(typeof e==`string`?e:``+e).replace(Fd,`
|
|
13
|
+
`).replace(Id,``)}function Rd(e,t){return t=Ld(t),Ld(e)===t}function zd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Lt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Lt(e,``+r);break;case`className`:xt(e,`class`,r);break;case`tabIndex`:xt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:xt(e,n,r);break;case`style`:Bt(e,r,o);break;case`data`:if(t!==`object`){xt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Wt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&zd(e,t,`name`,a.name,a,null),zd(e,t,`formEncType`,a.formEncType,a,null),zd(e,t,`formMethod`,a.formMethod,a,null),zd(e,t,`formTarget`,a.formTarget,a,null)):(zd(e,t,`encType`,a.encType,a,null),zd(e,t,`method`,a.method,a,null),zd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Wt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Gt);break;case`onScroll`:r!=null&&Td(`scroll`,e);break;case`onScrollEnd`:r!=null&&Td(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Wt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Td(`beforetoggle`,e),Td(`toggle`,e),bt(e,`popover`,r);break;case`xlinkActuate`:St(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:St(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:St(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:St(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:St(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:St(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:St(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:St(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:St(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:bt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Ht.get(n)||n,bt(e,n,r))}}function Bd(e,t,n,r,a,o){switch(n){case`style`:Bt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Lt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Lt(e,``+r);break;case`onScroll`:r!=null&&Td(`scroll`,e);break;case`onScrollEnd`:r!=null&&Td(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Gt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!pt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[$e]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):bt(e,n,r)}}}function Vd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Td(`error`,e),Td(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:zd(e,t,o,s,n,null)}}a&&zd(e,t,`srcSet`,n.srcSet,n,null),r&&zd(e,t,`src`,n.src,n,null);return;case`input`:Td(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:zd(e,t,r,d,n,null)}}Mt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Td(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:zd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Pt(e,!!r,n,!0):Pt(e,!!r,t,!1);return;case`textarea`:for(s in Td(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:zd(e,t,s,c,n,null)}It(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:zd(e,t,l,r,n,null)}return;case`dialog`:Td(`beforetoggle`,e),Td(`toggle`,e),Td(`cancel`,e),Td(`close`,e);break;case`iframe`:case`object`:Td(`load`,e);break;case`video`:case`audio`:for(r=0;r<Sd.length;r++)Td(Sd[r],e);break;case`image`:Td(`error`,e),Td(`load`,e);break;case`details`:Td(`toggle`,e);break;case`embed`:case`source`:case`link`:Td(`error`,e),Td(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:zd(e,t,u,r,n,null)}return;default:if(Vt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Bd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&zd(e,t,c,r,n,null))}function Hd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||zd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&zd(e,t,p,m,r,f)}}jt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||zd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&zd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Pt(e,!!n,n?[]:``,!1):Pt(e,!!n,t,!0)):Pt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:zd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&zd(e,t,s,a,r,o)}Ft(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:zd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:zd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&zd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:zd(e,t,u,p,r,m)}return;default:if(Vt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Bd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Bd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&zd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||zd(e,t,f,p,r,m)}function Ud(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Wd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Ud(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Ud(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Gd=null,Kd=null;function qd(e){return e.nodeType===9?e:e.ownerDocument}function Jd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Yd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Xd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Zd=null;function Qd(){var e=window.event;return e&&e.type===`popstate`?e===Zd?!1:(Zd=e,!0):(Zd=null,!1)}var $d=typeof setTimeout==`function`?setTimeout:void 0,ef=typeof clearTimeout==`function`?clearTimeout:void 0,tf=typeof Promise==`function`?Promise:void 0,nf=typeof queueMicrotask==`function`?queueMicrotask:tf===void 0?$d:function(e){return tf.resolve(null).then(e).catch(rf)};function rf(e){setTimeout(function(){throw e})}function af(e){return e===`head`}function of(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)bf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,bf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[at]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&bf(e.ownerDocument.body);n=i}while(n);Hp(t)}function sf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function cf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:cf(n),ot(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function lf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[at])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=hf(e.nextSibling),e===null)break}return null}function uf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=hf(e.nextSibling),e===null))return null;return e}function df(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=hf(e.nextSibling),e===null))return null;return e}function ff(e){return e.data===`$?`||e.data===`$~`}function pf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function mf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function hf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var gf=null;function _f(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return hf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function vf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function yf(e,t,n){switch(t=qd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function bf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ot(e)}var xf=new Map,Sf=new Set;function Cf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var wf=P.d;P.d={f:Tf,r:Ef,D:kf,C:Af,L:jf,m:Mf,X:Pf,S:Nf,M:Ff};function Tf(){var e=wf.f(),t=wu();return e||t}function Ef(e){var t=ct(e);t!==null&&t.tag===5&&t.type===`form`?Cs(t):wf.r(e)}var Df=typeof document>`u`?null:document;function Of(e,t,n){var r=Df;if(r&&typeof t==`string`&&t){var i=At(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Sf.has(i)||(Sf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Vd(t,`link`,e),dt(t),r.head.appendChild(t)))}}function kf(e){wf.D(e),Of(`dns-prefetch`,e,null)}function Af(e,t){wf.C(e,t),Of(`preconnect`,e,t)}function jf(e,t,n){wf.L(e,t,n);var r=Df;if(r&&e&&t){var i=`link[rel="preload"][as="`+At(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+At(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+At(n.imageSizes)+`"]`)):i+=`[href="`+At(e)+`"]`;var a=i;switch(t){case`style`:a=Lf(e);break;case`script`:a=Vf(e)}xf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),xf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Rf(a))||t===`script`&&r.querySelector(Hf(a))||(t=r.createElement(`link`),Vd(t,`link`,e),dt(t),r.head.appendChild(t)))}}function Mf(e,t){wf.m(e,t);var n=Df;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+At(r)+`"][href="`+At(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Vf(e)}if(!xf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),xf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Hf(a)))return}r=n.createElement(`link`),Vd(r,`link`,e),dt(r),n.head.appendChild(r)}}}function Nf(e,t,n){wf.S(e,t,n);var r=Df;if(r&&e){var i=ut(r).hoistableStyles,a=Lf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Rf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=xf.get(a))&&Gf(e,n);var c=o=r.createElement(`link`);dt(c),Vd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Wf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Pf(e,t){wf.X(e,t);var n=Df;if(n&&e){var r=ut(n).hoistableScripts,i=Vf(e),a=r.get(i);a||(a=n.querySelector(Hf(i)),a||(e=f({src:e,async:!0},t),(t=xf.get(i))&&Kf(e,t),a=n.createElement(`script`),dt(a),Vd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Ff(e,t){wf.M(e,t);var n=Df;if(n&&e){var r=ut(n).hoistableScripts,i=Vf(e),a=r.get(i);a||(a=n.querySelector(Hf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=xf.get(i))&&Kf(e,t),a=n.createElement(`script`),dt(a),Vd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function If(e,t,n,r){var a=(a=H.current)?Cf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Lf(n.href),n=ut(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Lf(n.href);var o=ut(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Rf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),xf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},xf.set(e,n),o||Bf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Vf(n),n=ut(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Lf(e){return`href="`+At(e)+`"`}function Rf(e){return`link[rel="stylesheet"][`+e+`]`}function zf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Bf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Vd(t,`link`,n),dt(t),e.head.appendChild(t))}function Vf(e){return`[src="`+At(e)+`"]`}function Hf(e){return`script[async]`+e}function Uf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+At(n.href)+`"]`);if(r)return t.instance=r,dt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),dt(r),Vd(r,`style`,a),Wf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Lf(n.href);var o=e.querySelector(Rf(a));if(o)return t.state.loading|=4,t.instance=o,dt(o),o;r=zf(n),(a=xf.get(a))&&Gf(r,a),o=(e.ownerDocument||e).createElement(`link`),dt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Vd(o,`link`,r),t.state.loading|=4,Wf(o,n.precedence,e),t.instance=o;case`script`:return o=Vf(n.src),(a=e.querySelector(Hf(o)))?(t.instance=a,dt(a),a):(r=n,(a=xf.get(o))&&(r=f({},n),Kf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),dt(a),Vd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Wf(r,n.precedence,e));return t.instance}function Wf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Gf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Kf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var qf=null;function Jf(e,t,n){if(qf===null){var r=new Map,i=qf=new Map;i.set(n,r)}else i=qf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[at]||a[Qe]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Yf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Xf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Zf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Qf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Lf(r.href),a=t.querySelector(Rf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=tp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,dt(a);return}a=t.ownerDocument||t,r=zf(r),(i=xf.get(i))&&Gf(r,i),a=a.createElement(`link`),dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Vd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=tp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $f=0;function ep(e,t){return e.stylesheets&&e.count===0&&rp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&rp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$f===0&&($f=62500*Wd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&rp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$f?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function tp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)rp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var np=null;function rp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,np=new Map,t.forEach(ip,e),np=null,tp.call(e))}function ip(e,t){if(!(t.state.loading&4)){var n=np.get(e);if(n)var r=n.get(null);else{n=new Map,np.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=tp.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var W={$$typeof:b,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function op(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ve(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ve(0),this.hiddenUpdates=Ve(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function sp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new op(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ei(3,null,null,t),e.current=a,a.stateNode=e,t=ta(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Pa(a),e}function cp(e){return e?(e=Qr,e):Qr}function lp(e,t,n,r,i,a){i=cp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ia(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=La(e,r,t),n!==null&&(yu(n,e,t),Ra(n,e,t))}function up(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function dp(e,t){up(e,t),(e=e.alternate)&&up(e,t)}function fp(e){if(e.tag===13||e.tag===31){var t=Yr(e,67108864);t!==null&&yu(t,e,67108864),dp(e,67108864)}}function pp(e){if(e.tag===13||e.tag===31){var t=_u();t=qe(t);var n=Yr(e,t);n!==null&&yu(n,e,t),dp(e,t)}}var mp=!0;function hp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,_p(e,t,n,r)}finally{P.p=a,N.T=i}}function gp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,_p(e,t,n,r)}finally{P.p=a,N.T=i}}function _p(e,t,n,r){if(mp){var i=vp(r);if(i===null)Ad(e,t,r,yp,n),Mp(e,r);else if(Pp(i,e,t,n,r))r.stopPropagation();else if(Mp(e,r),t&4&&-1<jp.indexOf(e)){for(;i!==null;){var a=ct(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ie(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-ke(o);s.entanglements[1]|=c,o&=~c}cd(a),!(Rl&6)&&(au=_e()+500,ld(0,!1))}}break;case 31:case 13:s=Yr(a,2),s!==null&&yu(s,a,2),wu(),dp(a,2)}if(a=vp(r),a===null&&Ad(e,t,r,yp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ad(e,t,r,null,n)}}function vp(e){return e=qt(e),bp(e)}var yp=null;function bp(e){if(yp=null,e=st(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return yp=e,null}function xp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(ve()){case ye:return 2;case be:return 8;case xe:case Se:return 32;case Ce:return 268435456;default:return 32}default:return 32}}var Sp=!1,Cp=null,wp=null,Tp=null,Ep=new Map,Dp=new Map,kp=[],jp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Mp(e,t){switch(e){case`focusin`:case`focusout`:Cp=null;break;case`dragenter`:case`dragleave`:wp=null;break;case`mouseover`:case`mouseout`:Tp=null;break;case`pointerover`:case`pointerout`:Ep.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Dp.delete(t.pointerId)}}function Np(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ct(t),t!==null&&fp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Pp(e,t,n,r,i){switch(t){case`focusin`:return Cp=Np(Cp,e,t,n,r,i),!0;case`dragenter`:return wp=Np(wp,e,t,n,r,i),!0;case`mouseover`:return Tp=Np(Tp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ep.set(a,Np(Ep.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Dp.set(a,Np(Dp.get(a)||null,e,t,n,r,i)),!0}return!1}function Fp(e){var t=st(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Xe(e.priority,function(){pp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Xe(e.priority,function(){pp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ip(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=vp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Kt=r,n.target.dispatchEvent(r),Kt=null}else return t=ct(n),t!==null&&fp(t),e.blockedOn=n,!1;t.shift()}return!0}function Lp(e,t,n){Ip(e)&&n.delete(t)}function Rp(){Sp=!1,Cp!==null&&Ip(Cp)&&(Cp=null),wp!==null&&Ip(wp)&&(wp=null),Tp!==null&&Ip(Tp)&&(Tp=null),Ep.forEach(Lp),Dp.forEach(Lp)}function zp(e,n){e.blockedOn===n&&(e.blockedOn=null,Sp||(Sp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rp)))}var Bp=null;function Vp(e){Bp!==e&&(Bp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bp===e&&(Bp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(bp(r||n)===null)continue;break}var a=ct(n);a!==null&&(e.splice(t,3),t-=3,xs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hp(e){function t(t){return zp(t,e)}Cp!==null&&zp(Cp,e),wp!==null&&zp(wp,e),Tp!==null&&zp(Tp,e),Ep.forEach(t),Dp.forEach(t);for(var n=0;n<kp.length;n++){var r=kp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<kp.length&&(n=kp[0],n.blockedOn===null);)Fp(n),n.blockedOn===null&&kp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[$e]||null;if(typeof a==`function`)o||Vp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[$e]||null)s=o.formAction;else if(bp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vp(n)}}}function Up(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wp(e){this._internalRoot=e}Gp.prototype.render=Wp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;lp(n,_u(),e,t,null,null)},Gp.prototype.unmount=Wp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;lp(e.current,2,null,e,null,null),wu(),t[et]=null}};function Gp(e){this._internalRoot=e}Gp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ye();e={blockedOn:null,target:e,priority:t};for(var n=0;n<kp.length&&t!==0&&t<kp[n].priority;n++);kp.splice(n,0,e),n===0&&Fp(e)}};var Kp=n.version;if(Kp!==`19.2.4`)throw Error(i(527,Kp,`19.2.4`));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var qp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jp.isDisabled&&Jp.supportsFiber)try{Ee=Jp.inject(qp),De=Jp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ws,s=Gs,c=Ks;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=sp(e,1,!1,null,null,n,r,null,o,s,c,Up),e[et]=t.current,Od(e),new Wp(t)}})),Mp=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=jp()})),Np=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(){}},Pp=new class extends Np{#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`}},Fp={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ip=new class{#e=Fp;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 Lp(e){setTimeout(e,0)}var Rp=typeof window>`u`||`Deno`in globalThis;function zp(){}function Bp(e,t){return typeof e==`function`?e(t):e}function Vp(e){return typeof e==`number`&&e>=0&&e!==1/0}function Hp(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Up(e,t){return typeof e==`function`?e(t):e}function Wp(e,t){return typeof e==`function`?e(t):e}function Gp(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==qp(o,t.options))return!1}else if(!Yp(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 Kp(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Jp(t.options.mutationKey)!==Jp(a))return!1}else if(!Yp(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function qp(e,t){return(t?.queryKeyHashFn||Jp)(e)}function Jp(e){return JSON.stringify(e,(e,t)=>em(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Yp(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>Yp(e[n],t[n])):!1}var Xp=Object.prototype.hasOwnProperty;function Zp(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=$p(e)&&$p(t);if(!r&&!(em(e)&&em(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:Xp.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Zp(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Qp(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 $p(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function em(e){if(!tm(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!tm(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function tm(e){return Object.prototype.toString.call(e)===`[object Object]`}function nm(e){return new Promise(t=>{Ip.setTimeout(t,e)})}function rm(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Zp(e,t)}function im(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function am(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var om=Symbol();function sm(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===om?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function cm(e,t){return typeof e==`function`?e(...t):!!e}function lm(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 um=(()=>{let e=()=>Rp;return{isServer(){return e()},setIsServer(t){e=t}}})();function dm(){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 fm=Lp;function pm(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=fm,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 mm=pm(),hm=new class extends Np{#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 gm(e){return Math.min(1e3*2**e,3e4)}function _m(e){return(e??`online`)===`online`?hm.isOnline():!0}var vm=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function ym(e){let t=!1,n=0,r,i=dm(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new vm(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Pp.isFocused()&&(e.networkMode===`always`||hm.isOnline())&&e.canRun(),u=()=>_m(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{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(d).catch(r=>{if(a())return;let i=e.retry??(um.isServer()?0:3),o=e.retryDelay??gm,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){f(r);return}n++,e.onFail?.(n,r),nm(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var bm=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Vp(this.gcTime)&&(this.#e=Ip.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(um.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(Ip.clearTimeout(this.#e),void 0)}},xm=class extends bm{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=wm(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=wm(this.options);e.data!==void 0&&(this.setState(Cm(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=rm(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(zp).catch(zp):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Wp(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===om||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Up(e.options.staleTime,this)===`static`):!1}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:!Hp(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.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.#i&&(this.#o||this.#s()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.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.#o=!0,n.signal)})},i=()=>{let e=sm(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!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.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=ym({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof vm&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof vm){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#c(e){this.state=(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,...Sm(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Cm(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=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),mm.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function Sm(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_m(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Cm(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function wm(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 Tm=class extends Np{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=dm(),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),Dm(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Om(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Om(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 Wp(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&&!Qp(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&km(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Wp(this.options.enabled,this.#t)!==Wp(t.enabled,this.#t)||Up(this.options.staleTime,this.#t)!==Up(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Wp(this.options.enabled,this.#t)!==Wp(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 jm(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(zp)),t}#g(){this.#b();let e=Up(this.options.staleTime,this.#t);if(um.isServer()||this.#r.isStale||!Vp(e))return;let t=Hp(this.#r.dataUpdatedAt,e)+1;this.#d=Ip.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,!(um.isServer()||Wp(this.options.enabled,this.#t)===!1||!Vp(this.#p)||this.#p===0)&&(this.#f=Ip.setInterval(()=>{(this.options.refetchIntervalInBackground||Pp.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(Ip.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(Ip.clearInterval(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&&Dm(e,t),o=i&&km(e,n,t,r);(a||o)&&(l={...l,...Sm(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=rm(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=rm(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,x={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:Am(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Wp(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=dm())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}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),!Qp(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){mm.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Em(e,t){return Wp(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function Dm(e,t){return Em(e,t)||e.state.data!==void 0&&Om(e,t,t.refetchOnMount)}function Om(e,t,n){if(Wp(t.enabled,e)!==!1&&Up(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Am(e,t)}return!1}function km(e,t,n,r){return(e!==t||Wp(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Am(e,n)}function Am(e,t){return Wp(t.enabled,e)!==!1&&e.isStaleByTime(Up(t.staleTime,e))}function jm(e,t){return!Qp(e.getCurrentResult(),t)}function Mm(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=>{lm(e,()=>t.signal,()=>n=!0)},u=sm(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?am:im;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Pm:Nm,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:Nm(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Nm(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 Pm(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Fm=class extends bm{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Im(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=ym({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),mm.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Im(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Lm=class extends Np{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Fm({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Rm(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Rm(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Rm(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Rm(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){mm.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Kp(t,e))}findAll(e={}){return this.getAll().filter(t=>Kp(e,t))}notify(e){mm.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return mm.batch(()=>Promise.all(e.map(e=>e.continue().catch(zp))))}};function Rm(e){return e.options.scope?.id}var zm=class extends Np{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Qp(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Jp(t.mutationKey)!==Jp(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Im();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){mm.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Bm=class extends Np{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??qp(r,t),a=this.get(i);return a||(a=new xm({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){mm.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Gp(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Gp(e,t)):t}notify(e){mm.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){mm.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){mm.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Vm=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Bm,this.#t=e.mutationCache||new Lm,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Pp.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=hm.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Up(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Bp(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return mm.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;mm.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return mm.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=mm.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(zp).catch(zp)}invalidateQueries(e,t={}){return mm.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=mm.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(zp)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(zp)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Up(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(zp).catch(zp)}fetchInfiniteQuery(e){return e.behavior=Mm(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(zp).catch(zp)}ensureInfiniteQueryData(e){return e.behavior=Mm(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return hm.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Jp(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Yp(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Jp(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Yp(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=qp(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===om&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Hm=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),G=o(((e,t)=>{t.exports=Hm()}))(),Um=W.createContext(void 0),Wm=e=>{let t=W.useContext(Um);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Gm=({client:e,children:t})=>(W.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,G.jsx)(Um.Provider,{value:e,children:t})),Km=W.createContext(!1),qm=()=>W.useContext(Km);Km.Provider;function Jm(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ym=W.createContext(Jm()),Xm=()=>W.useContext(Ym),Zm=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?cm(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Qm=e=>{W.useEffect(()=>{e.clearReset()},[e])},$m=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||cm(n,[e.error,r])),eh=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))}},th=(e,t)=>e.isLoading&&e.isFetching&&!t,nh=(e,t)=>e?.suspense&&t.isPending,rh=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ih(e,t,n){let r=qm(),i=Xm(),a=Wm(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,eh(o),Zm(o,i,s),Qm(i);let c=!a.getQueryCache().get(o.queryHash),[l]=W.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(W.useSyncExternalStore(W.useCallback(e=>{let t=d?l.subscribe(mm.batchCalls(e)):zp;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),W.useEffect(()=>{l.setOptions(o)},[o,l]),nh(o,u))throw rh(o,l,i);if($m({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!um.isServer()&&th(u,r)&&(c?rh(o,l,i):s?.promise)?.catch(zp).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function ah(e,t){return ih(e,Tm,t)}function oh(e,t){let n=Wm(t),[r]=W.useState(()=>new zm(n,e));W.useEffect(()=>{r.setOptions(e)},[r,e]);let i=W.useSyncExternalStore(W.useCallback(e=>r.subscribe(mm.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=W.useCallback((e,t)=>{r.mutate(e,t).catch(zp)},[r]);if(i.error&&cm(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}W.use;var sh=typeof window<`u`?W.useLayoutEffect:W.useEffect;function ch(e){let t=W.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function lh(e,t,n={},r={}){W.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function uh(e){let t=W.useRef(null);return W.useImperativeHandle(e,()=>t.current,[]),t}function dh(e){return e[e.length-1]}function fh(e){return typeof e==`function`}function ph(e,t){return fh(e)?e(t):e}var mh=Object.prototype.hasOwnProperty,hh=Object.prototype.propertyIsEnumerable,gh=()=>Object.create(null),_h=(e,t)=>vh(e,t,gh);function vh(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=Sh(e)&&Sh(i);if(!a&&!(bh(e)&&bh(i)))return i;let o=a?e:yh(e);if(!o)return i;let s=a?i:yh(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:mh.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=vh(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function yh(e){let t=Object.getOwnPropertyNames(e);for(let n of t)if(!hh.call(e,n))return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;let r=t;for(let t of n){if(!hh.call(e,t))return!1;r.push(t)}return r}function bh(e){if(!xh(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!xh(n)||!n.hasOwnProperty(`isPrototypeOf`))}function xh(e){return Object.prototype.toString.call(e)===`[object Object]`}function Sh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ch(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!Ch(e[r],t[r],n))return!1;return!0}if(bh(e)&&bh(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!Ch(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!Ch(e[o],t[o],n)))return!1;return i===a}return!1}function wh(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function Th(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}function Eh(e){return e.replace(/[\x00-\x1f\x7f]/g,``)}function Dh(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return Eh(t)}var Oh=[`http:`,`https:`,`mailto:`,`tel:`];function kh(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Ah(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=Dh(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=Dh(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function jh(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Mh(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Nh(){throw Error(`Invariant failed`)}function Ph(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var Fh=4,Ih=5;function Lh(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function Rh(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=Lh(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function zh(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e,l=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;s<o;){let e=Rh(r,s,t),o,u=s,d=e[5];switch(s=d+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=Hh(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=Hh(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.dynamic?.find(e=>!e.skipOnParamError&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=Uh(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.skipOnParamError&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=Uh(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=Uh(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=Hh(n.fullPath??n.from);e.kind=Ih,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=Hh(n.fullPath??n.from);e.kind=Fh,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=n.options?.params?.parse??null,i.skipOnParamError=l,i.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)zh(e,t,r,s,i,a,o)}function Bh(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Vh(e){if(e.pathless)for(let t of e.pathless)Vh(t);if(e.static)for(let t of e.static.values())Vh(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())Vh(t);if(e.dynamic?.length){e.dynamic.sort(Bh);for(let t of e.dynamic)Vh(t)}if(e.optional?.length){e.optional.sort(Bh);for(let t of e.optional)Vh(t)}if(e.wildcard?.length){e.wildcard.sort(Bh);for(let t of e.wildcard)Vh(t)}}function Hh(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Uh(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:i}}function Wh(e,t){let n=Hh(`/`),r=new Uint16Array(6);for(let t of e)zh(!1,r,t,1,n,0);Vh(n),t.masksTree=n,t.flatCache=Ph(1e3)}function Gh(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=Xh(e,t.masksTree);return t.flatCache.set(e,r),r}function Kh(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=Hh(`/`),zh(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),Xh(r,o,n)}function qh(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=Xh(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=Qh(a.route)),t.matchCache.set(r,a),a}function Jh(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function Yh(e,t=!1,n){let r=Hh(e.fullPath),i=new Uint16Array(6),a={},o={},s=0;return zh(t,i,e,1,r,0,e=>{if(n?.(e,s),e.id in a&&Nh(),a[e.id]=e,s!==0&&e.path){let t=Jh(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}s++}),Vh(r),{processedTree:{segmentTree:r,singleCache:Ph(1e3),matchCache:Ph(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function Xh(e,t,n=!1){let r=e.split(`/`),i=eg(e,r,t,n);if(!i)return null;let[a]=Zh(e,r,i);return{route:i.node.route,rawParams:a,parsedParams:i.parsedParams}}function Zh(e,t,n){let r=$h(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===Fh)break;if(u.kind===Ih){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function Qh(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function $h(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function eg(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!dh(t),a=i&&e!==`/`,o=t.length-(i?1:0),s=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}],c=null,l=null,u=null;for(;s.length;){let n=s.pop(),{node:i,index:d,skipped:f,depth:p,statics:m,dynamics:h,optionals:g}=n,{extract:_,rawParams:v,parsedParams:y}=n;if(i.skipOnParamError){if(!tg(e,t,n))continue;v=n.rawParams,_=n.extract,y=n.parsedParams}r&&i.route&&i.kind!==Fh&&ng(l,n)&&(l=n);let b=d===o;if(b&&(i.route&&!a&&ng(u,n)&&(u=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let x=b?void 0:t[d],S;if(b&&i.index){let n={node:i.index,index:d,skipped:f,depth:p+1,statics:m,dynamics:h,optionals:g,extract:_,rawParams:v,parsedParams:y},r=!0;if(i.index.skipOnParamError&&(tg(e,t,n)||(r=!1)),r){if(m===o&&!h&&!g&&!f)return n;ng(u,n)&&(u=n)}}if(i.wildcard&&ng(c,n))for(let n of i.wildcard){let{prefix:r,suffix:i}=n;if(r&&(b||!(n.caseSensitive?x:S??=x.toLowerCase()).startsWith(r)))continue;if(i){if(b)continue;let e=t.slice(d).join(`/`).slice(-i.length);if((n.caseSensitive?e:e.toLowerCase())!==i)continue}let a={node:n,index:o,skipped:f,depth:p,statics:m,dynamics:h,optionals:g,extract:_,rawParams:v,parsedParams:y};if(!(n.skipOnParamError&&!tg(e,t,a))){c=a;break}}if(i.optional){let e=f|1<<p,t=p+1;for(let n=i.optional.length-1;n>=0;n--){let r=i.optional[n];s.push({node:r,index:d,skipped:e,depth:t,statics:m,dynamics:h,optionals:g,extract:_,rawParams:v,parsedParams:y})}if(!b)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:a}=n;if(r||a){let e=n.caseSensitive?x:S??=x.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}s.push({node:n,index:d+1,skipped:f,depth:t,statics:m,dynamics:h,optionals:g+1,extract:_,rawParams:v,parsedParams:y})}}if(!b&&i.dynamic&&x)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?x:S??=x.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}s.push({node:t,index:d+1,skipped:f,depth:p+1,statics:m,dynamics:h+1,optionals:g,extract:_,rawParams:v,parsedParams:y})}if(!b&&i.staticInsensitive){let e=i.staticInsensitive.get(S??=x.toLowerCase());e&&s.push({node:e,index:d+1,skipped:f,depth:p+1,statics:m+1,dynamics:h,optionals:g,extract:_,rawParams:v,parsedParams:y})}if(!b&&i.static){let e=i.static.get(x);e&&s.push({node:e,index:d+1,skipped:f,depth:p+1,statics:m+1,dynamics:h,optionals:g,extract:_,rawParams:v,parsedParams:y})}if(i.pathless){let e=p+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];s.push({node:n,index:d,skipped:f,depth:e,statics:m,dynamics:h,optionals:g,extract:_,rawParams:v,parsedParams:y})}}}if(u&&c)return ng(c,u)?u:c;if(u)return u;if(c)return c;if(r&&l){let n=l.index;for(let e=0;e<l.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return l.rawParams??=Object.create(null),l.rawParams[`**`]=decodeURIComponent(r),l}return null}function tg(e,t,n){try{let[r,i]=Zh(e,t,n);n.rawParams=r,n.extract=i;let a=n.node.parse(r);return n.parsedParams=Object.assign(Object.create(null),n.parsedParams,a),!0}catch{return null}}function ng(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Fh)>(e.node.kind===Fh)||t.node.kind===Fh==(e.node.kind===Fh)&&t.depth>e.depth))):!0}function rg(e){return ig(e.filter(e=>e!==void 0).join(`/`))}function ig(e){return e.replace(/\/{2,}/g,`/`)}function ag(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function og(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function sg(e){return og(ag(e))}function cg(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function lg(e,t,n){return cg(e,n)===cg(t,n)}function ug({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,o;if(r){o=i?t:a?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(a)s=e.split(`/`);else if(i)s=t.split(`/`);else{for(s=e.split(`/`);s.length>1&&dh(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.pop():r===`.`||s.push(r)}}s.length>1&&(dh(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c,l=``;for(let e=0;e<s.length;e++){e>0&&(l+=`/`);let t=s[e];if(!t)continue;c=Rh(t,0,c);let n=c[0];if(n===0){l+=t;continue}let r=c[5],i=t.substring(0,c[1]),a=t.substring(c[4],r),o=t.substring(c[2],c[3]);n===1?l+=i||a?`${i}{$${o}}${a}`:`$${o}`:n===2?l+=i||a?`${i}{$}${a}`:`$`:l+=`${i}{-$${o}}${a}`}l=ig(l);let u=l||`/`;return o&&r&&r.set(o,u),u}function dg(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function fg(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>mg(e,n)).join(`/`):mg(r,n):r}function pg({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=Rh(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=fg(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=fg(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=fg(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function mg(e,t){let n=encodeURIComponent(e);return t?.(n)??n}function hg(e){return!!e?.isNotFound}function gg(){try{return typeof window<`u`&&typeof window.sessionStorage==`object`?window.sessionStorage:void 0}catch{return}}var _g=`tsr-scroll-restoration-v1_3`;function vg(){let e=gg();if(!e)return null;let t={};try{let n=JSON.parse(e.getItem(`tsr-scroll-restoration-v1_3`)||`{}`);bh(n)&&(t=n)}catch{}return{get state(){return t},set:e=>{t=ph(e,t)||t},persist:()=>{try{e.setItem(_g,JSON.stringify(t))}catch{}}}}var yg=vg(),bg=e=>e.state.__TSR_key||e.href;function xg(e){let t=[],n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(` > `)}`.toLowerCase()}var Sg=!1,Cg=`window`,wg=`data-scroll-restoration-id`;function Tg(e,t){if(!yg)return;let n=yg;if((t??e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,Sg=!1;let r=e.options.getScrollRestorationKey||bg,i=new Map;window.history.scrollRestoration=`manual`;let a=t=>{if(!(Sg||!e.isScrollRestoring))if(t.target===document||t.target===window)i.set(Cg,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{let e=t.target;i.set(e,{scrollX:e.scrollLeft||0,scrollY:e.scrollTop||0})}},o=t=>{if(!e.isScrollRestoring||!t||i.size===0||!n)return;let r=n.state[t]||={};for(let[e,t]of i){let n;if(e===Cg)n=Cg;else if(e.isConnected){let t=e.getAttribute(wg);n=t?`[${wg}="${t}"]`:xg(e)}n&&(r[n]=t)}};document.addEventListener(`scroll`,a,!0),e.subscribe(`onBeforeLoad`,e=>{o(e.fromLocation?r(e.fromLocation):void 0),i.clear()}),window.addEventListener(`pagehide`,()=>{o(r(e.stores.resolvedLocation.state??e.stores.location.state)),n.persist()}),e.subscribe(`onRendered`,t=>{let a=r(t.toLocation),o=e.options.scrollRestorationBehavior,s=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))){Sg=!0;try{let t=e.isScrollRestoring?n.state[a]:void 0,r=!1;if(t)for(let e in t){let n=t[e];if(!bh(n))continue;let{scrollX:i,scrollY:a}=n;if(!(!Number.isFinite(i)||!Number.isFinite(a))){if(e===Cg)window.scrollTo({top:a,left:i,behavior:o}),r=!0;else if(e){let t;try{t=document.querySelector(e)}catch{continue}t&&(t.scrollLeft=i,t.scrollTop=a,r=!0)}}}if(!r){let t=e.history.location.hash.slice(1);if(t){let e=window.history.state?.__hashScrollIntoViewOptions??!0;if(e){let n=document.getElementById(t);n&&n.scrollIntoView(e)}}else{let e={top:0,left:0,behavior:o};if(window.scrollTo(e),s)for(let t of s){if(t===Cg)continue;let n=typeof t==`function`?t():document.querySelector(t);n&&n.scrollTo(e)}}}}finally{Sg=!1}e.isScrollRestoring&&n.set(e=>(e[a]||={},e))}})}function Eg(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function Dg(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Og(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Dg(r):Array.isArray(t)?t.push(Dg(r)):n[e]=[t,Dg(r)]}return n}var kg=jg(JSON.parse),Ag=Mg(JSON.stringify,JSON.parse);function jg(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Og(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function Mg(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=Eg(e,r);return t?`?${t}`:``}}var Ng=`__root__`;function Pg(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Fg(e){return e instanceof Response&&!!e.options}function Ig(e){return{input:({url:t})=>{for(let n of e)t=Rg(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=zg(e[n],t);return t}}}function Lg(e){let t=sg(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),a=e.caseSensitive?r:r.toLowerCase();return{input:({url:t})=>{let r=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return r===i?t.pathname=`/`:r.startsWith(a)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=rg([`/`,t,e.pathname]),e)}}function Rg(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function zg(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Bg(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>Vg(o,_.state)),x=r(()=>Vg(s,v.state)),S=r(()=>Vg(c,y.state)),C=r(()=>_.state[0]),w=r(()=>_.state.some(e=>o.get(e)?.state.status===`pending`)),T=r(()=>({locationHref:p.state.href,resolvedLocationHref:m.state?.href,status:l.state})),E=r(()=>({status:l.state,loadedAt:u.state,isLoading:d.state,isTransitioning:f.state,matches:b.state,location:p.state,resolvedLocation:m.state,statusCode:h.state,redirect:g.state})),D=Ph(64);function O(e){let t=D.get(e);return t||(t=r(()=>{let t=_.state;for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.state}}),D.set(e,t)),t}let k={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingMatchesId:v,cachedMatchesId:y,activeMatchesSnapshot:b,pendingMatchesSnapshot:x,cachedMatchesSnapshot:S,firstMatchId:C,hasPendingMatches:w,matchRouteReactivity:T,activeMatchStoresById:o,pendingMatchStoresById:s,cachedMatchStoresById:c,__store:E,getMatchStoreByRouteId:O,setActiveMatches:A,setPendingMatches:j,setCachedMatches:M};A(e.matches),a?.(k);function A(e){Hg(e,o,_,n,i)}function j(e){Hg(e,s,v,n,i)}function M(e){Hg(e,c,y,n,i)}return k}function Vg(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.state)}return n}function Hg(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.state!==n&&e.setState(()=>n)}Mh(n.state,a)||n.setState(()=>a)})}var Ug=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Wg=e=>e.stores.matchesId.state.some(t=>e.stores.activeMatchStoresById.get(t)?.state._forcePending),Gg=(e,t)=>!!(e.preload&&!e.router.stores.activeMatchStoresById.has(t)),Kg=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},qg=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},Jg=(e,t,n)=>{if(!(!Fg(n)&&!hg(n)))throw Fg(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:Fg(n)?`redirected`:r.status===`pending`?`success`:r.status,context:Kg(e,t.index),isFetching:!1,error:n})),hg(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),Fg(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},Yg=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Xg=(e,t,n)=>{let r=Kg(e,n);e.updateMatch(t,e=>({...e,context:r}))},Zg=(e,t,n,r)=>{let{id:i,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,Jg(e,e.router.getMatch(i),n);try{o.options.onError?.(n)}catch(t){n=t,Jg(e,e.router.getMatch(i),n)}e.updateMatch(i,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!Fg(n)&&!hg(n)&&(e.serialError??=n)},Qg=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Gg(e,t)&&(n.options.loader||n.options.beforeLoad||l_(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{Ug(e)},i);r._nonReactive.pendingTimeout=t}},$g=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Qg(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&Jg(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},e_=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=wh(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&Zg(e,n,o,`PARSE_PARAMS`),s&&Zg(e,n,s,`VALIDATE_SEARCH`),Qg(e,t,r,i);let c=new AbortController,l=!1,u=()=>{l||(l=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},d=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),d()});return}i._nonReactive.beforeLoadPromise=wh();let f={...Kg(e,n,!1),...i.__routeContext},{search:p,params:m,cause:h}=i,g=Gg(e,t),_={search:p,abortController:c,params:m,preload:g,context:f,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:g?`preload`:h,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},v=r=>{if(r===void 0){e.router.batch(()=>{u(),d()});return}(Fg(r)||hg(r))&&(u(),Zg(e,n,r,`BEFORE_LOAD`)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),d()})},y;try{if(y=r.options.beforeLoad(_),Th(y))return u(),y.catch(t=>{Zg(e,n,t,`BEFORE_LOAD`)}).then(v)}catch(t){u(),Zg(e,n,t,`BEFORE_LOAD`)}v(y)},t_=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>e_(e,n,t,i),s=()=>{if(Yg(e,n))return;let t=$g(e,n,i);return Th(t)?t.then(o):o()};return a()},n_=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},r_=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=Kg(e,r),d=Gg(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},i_=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{c_(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(r_(e,t,n,r,i)),l=!!s&&Th(c);if((l||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;Jg(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}i._lazyPromise&&await i._lazyPromise;let u=a._nonReactive.minPendingPromise;u&&await u,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:Kg(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:Kg(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,hg(t)&&await i.options.notFoundComponent?.preload?.(),Jg(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,Jg(e,e.router.getMatch(n),t)}!Fg(o)&&!hg(o)&&await c_(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:Kg(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),Jg(e,r,t)}},a_=async(e,t,n)=>{async function r(r,a,c,l,d){let f=Date.now()-a.updatedAt,p=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,m=d.options.shouldReload,h=typeof m==`function`?m(r_(e,t,i,n,d)):m,{status:g,invalid:_}=l,v=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(_||(h??v)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await i_(e,t,i,n,d);let r=e.router.getMatch(i);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){Fg(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await i_(e,t,i,n,d):Xg(e,i,n))}let{id:i,routeId:a}=e.matches[n],o=!1,s=!1,c=e.router.looseRoutesById[a],l=c.options.loader,u=((typeof l==`function`?void 0:l?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(Yg(e,i)){if(!e.router.getMatch(i))return e.matches[n];Xg(e,i,n)}else{let t=e.router.getMatch(i),o=e.router.stores.matchesId.state[n],s=(o&&e.router.stores.activeMatchStoresById.get(o)||null)?.routeId===a?o:e.router.stores.activeMatchesSnapshot.state.find(e=>e.routeId===a)?.id,l=Gg(e,i);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&u)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(i),a=n._nonReactive.error||n.error;a&&Jg(e,n,a),n.status===`pending`&&await r(l,t,s,n,c)}else{let n=l&&!e.router.stores.activeMatchStoresById.has(i),a=e.router.getMatch(i);a._nonReactive.loaderPromise=wh(),n!==a.preload&&e.updateMatch(i,e=>({...e,preload:n})),await r(l,t,s,a,c)}}let d=e.router.getMatch(i);s||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;let f=s?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,e=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function o_(e){let t=e,n=[];Wg(t.router)&&Ug(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=t_(t,e);Th(n)&&await n}catch(e){if(Fg(e))throw e;if(hg(e))r=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?qg(t,r):void 0,o=r&&t.preload?0:a===void 0?i:Math.min(a+1,i),s,c;for(let e=0;e<o;e++)n.push(a_(t,n,e));try{await Promise.all(n)}catch{let e=await Promise.allSettled(n);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(Fg(e))throw e;hg(e)?s??=e:c??=e}if(c!==void 0)throw c}let l=s??(r&&!t.preload?r:void 0),u=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!l&&r&&t.preload)return t.matches;if(l){let e=qg(t,l);e===void 0&&Nh();let n=t.matches[e],r=t.router.looseRoutesById[n.routeId],i=t.router.options?.defaultNotFoundComponent;!r.options.notFoundComponent&&i&&(r.options.notFoundComponent=i),l.routeId=n.routeId;let a=n.routeId===t.router.routeTree.id;t.updateMatch(n.id,e=>({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:l},isFetching:!1})),u=e,await c_(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await c_(e,[`errorComponent`])}for(let e=0;e<=u;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=n_(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let d=Ug(t);if(Th(d)&&await d,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function s_(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function c_(e,t=u_){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===u_?(()=>{if(e._componentsPromise===void 0){let t=s_(e,u_);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():s_(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function l_(e){for(let t of u_)if(e.options[t]?.preload)return!0;return!1}var u_=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`],d_=`__TSR_index`,f_=`popstate`,p_=`beforeunload`;function m_(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=v_(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[d_];i=h_(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[d_];i=h_(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[d_]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function h_(e,t){t||={};let n=y_();return{...t,key:n,__TSR_key:n,[d_]:e}}function g_(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>v_(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=y_();t.history.replaceState({[d_]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=v_(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[d_]-l.state[d_],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=m_({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(p_,S,{capture:!0}),t.removeEventListener(f_,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(p_,S,{capture:!0}),t.addEventListener(f_,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function __(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function v_(e,t){let n=__(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=y_();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[d_]:0,key:a,__TSR_key:a}}}function y_(){return(Math.random()+1).toString(36).substring(7)}function b_(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var x_=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=dg(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=g_()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=Ph(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Bg(w_(this.latestLocation),e),Tg(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=sg(o);t&&t!==`/`&&e.push(Lg({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:Ig(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.setState(()=>this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a)`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Yh(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&Wh(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:Ah(e).path,external:!1,searchStr:o,search:_h(t?.search,i),hash:Ah(r.slice(1)).path,state:vh(t?.state,a)}}let o=new URL(i,this.origin),s=Rg(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:Ah(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:_h(t?.search,c),hash:Ah(s.hash.slice(1)).path,state:vh(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>ug({base:e,to:ig(t),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>E_({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingMatchesId.state.forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.state.forEach(e=>{if(this.stores.pendingMatchStoresById.has(e))return;let t=this.stores.activeMatchStoresById.get(e)?.state;t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,a=this.resolvePathWithBase(i,`.`),o=r.search,s=Object.assign(Object.create(null),r.params),c=t.to?this.resolvePathWithBase(a,`${t.to}`):this.resolvePathWithBase(a,`.`),l=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?s:Object.assign(s,ph(t.params,s)),u=this.getMatchedRoutes(c),d=u.matchedRoutes;if((!u.foundRoute||u.foundRoute.path!==`/`&&u.routeParams[`**`])&&this.options.notFoundRoute&&(d=[...d,this.options.notFoundRoute]),Object.keys(l).length>0)for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(l,t(l))}catch{}}let f=e.leaveParams?c:Ah(pg({path:c,params:l,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,p=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,T_(t.options.validateSearch,{...e,...p}))}catch{}}),p=e}p=D_({search:p,dest:t,destRoutes:d,_includeValidateSearch:e._includeValidateSearch}),p=_h(o,p);let m=this.options.stringifySearch(p),h=t.hash===!0?n.hash:t.hash?ph(t.hash,n.hash):void 0,g=h?`#${h}`:``,_=t.state===!0?n.state:t.state?ph(t.state,n.state):{};_=vh(n.state,_);let v=`${f}${m}${g}`,y,b,x=!1;if(this.rewrite){let e=new URL(v,this.origin),t=zg(this.rewrite,e);y=e.href.replace(e.origin,``),t.origin===this.origin?b=t.pathname+t.search+t.hash:(b=t.href,x=!0)}else y=jh(v),b=y;return{publicHref:b,href:y,pathname:f,search:p,searchStr:m,state:_,hash:h??``,external:x,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=Gh(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,ph(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=Ch(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},i=og(this.latestLocation.href)===og(n.href),a=this.commitLocationPromise;if(this.commitLocationPromise=wh(()=>{a?.resolve(),a=void 0}),i&&r())this.load();else{let{maskedLocation:r,hashScrollIntoView:i,...a}=n;r&&(a={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...a,search:a.searchStr,state:{...a.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(a.unmaskOnReload??this.options.unmaskOnReload??!1)&&(a.state.__tempKey=this.tempLocationKey)),a.state.__hashScrollIntoViewOptions=i??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,this.history[n.replace?`replace`:`push`](a.publicHref,a.state,{ignoreBlocker:t})}return this.resetNextScroll=n.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=v_(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=Rg(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(kh(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatchesSnapshot.state.filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.setState(()=>`pending`),this.stores.statusCode.setState(()=>200),this.stores.isLoading.setState(()=>!0),this.stores.location.setState(()=>this.latestLocation),this.stores.setPendingMatches(e),this.stores.setCachedMatches(t)})},this.load=async e=>{let t,n,r,i=this.stores.resolvedLocation.state??this.stores.location.state;for(r=new Promise(a=>{this.startTransition(async()=>{try{this.beforeLoad();let t=this.latestLocation,n=this.stores.resolvedLocation.state,r=b_(t,n);this.stores.redirect.state||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await o_({router:this,sync:e?.sync,forceStaleReload:i.href===t.href,matches:this.stores.pendingMatchesSnapshot.state,location:t,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatchesSnapshot.state,a=i.length,o=this.stores.activeMatchesSnapshot.state;e=a?o.filter(e=>!this.stores.pendingMatchStoresById.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStoresById.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.activeMatchStoresById.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),a&&(this.stores.setActiveMatches(i),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){Fg(e)?(t=e,this.navigate({...t.options,replace:!0,ignoreBlocker:!0})):hg(e)&&(n=e);let r=t?t.status:n?404:this.stores.activeMatchesSnapshot.state.some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>r),this.stores.redirect.setState(()=>t)})}this.latestLoadPromise===r&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),a()})}),this.latestLoadPromise=r,await r;this.latestLoadPromise&&r!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.stores.activeMatchesSnapshot.state.some(e=>e.status===`error`)&&(a=500),a!==void 0&&this.stores.statusCode.setState(()=>a)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.state,a=typeof t.types==`function`?t.types(b_(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStoresById.get(e);if(n){n.setState(t);return}let r=this.stores.activeMatchStoresById.get(e);if(r){r.setState(t);return}let i=this.stores.cachedMatchStoresById.get(e);if(i){let n=t(i.state);n.status===`redirected`?this.stores.cachedMatchStoresById.delete(e)&&this.stores.cachedMatchesId.setState(t=>t.filter(t=>t!==e)):i.setState(()=>n)}})},this.getMatch=e=>this.stores.cachedMatchStoresById.get(e)?.state??this.stores.pendingMatchStoresById.get(e)?.state??this.stores.activeMatchStoresById.get(e)?.state,this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setActiveMatches(this.stores.activeMatchesSnapshot.state.map(t)),this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.map(t)),this.stores.setPendingMatches(this.stores.pendingMatchesSnapshot.state.map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&kh(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCachedMatches([]):this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`?!0:e-t.updatedAt>=r}})},this.loadRouteChunk=c_,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.stores.matchesId.state,...this.stores.pendingMatchesId.state]),i=new Set([...r,...this.stores.cachedMatchesId.state]),a=n.filter(e=>!i.has(e.id));if(a.length){let e=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...e,...a])}try{return n=await o_({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(Fg(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});hg(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.state!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.state:t.pending)?this.latestLocation:this.stores.resolvedLocation.state||this.stores.location.state,a=Kh(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!Ch(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?Ch(i.search,r.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.activeMatchesSnapshot.state.some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Ag,parseSearch:e.parseSearch??kg,protocolAllowlist:e.protocolAllowlist??Oh}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.state}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i,parsedParams:a}=n,{matchedRoutes:o}=n,s=!1;(r?r.path!==`/`&&i[`**`]:og(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:s=!0);let c=s?k_(this.options.notFoundMode,o):void 0,l=Array(o.length),u=new Map;for(let e of this.stores.activeMatchStoresById.values())e.routeId&&u.set(e.routeId,e.state);for(let n=0;n<o.length;n++){let r=o[n],s=l[n-1],d,f,p;{let n=s?.search??e.search,i=s?._strictSearch??void 0;try{let e=T_(r.options.validateSearch,{...n})??void 0;d={...n,...e},f={...i,...e},p=void 0}catch(e){let r=e;if(e instanceof S_||(r=new S_(e.message,{cause:e})),t?.throwOnError)throw r;d=n,f={},p=r}}let m=r.options.loaderDeps?.({search:d})??``,h=m?JSON.stringify(m):``,{interpolatedPath:g,usedParams:_}=pg({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),v=r.id+g+h,y=this.getMatch(v),b=u.get(r.id),x=y?._strictParams??_,S;if(!y)try{A_(r,_,a,x)}catch(e){if(S=hg(e)||Fg(e)?e:new C_(e.message,{cause:e}),t?.throwOnError)throw S}Object.assign(i,x);let C=b?`stay`:`enter`,w;if(y)w={...y,cause:C,params:b?.params??i,_strictParams:x,search:_h(b?b.search:y.search,d),_strictSearch:f};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||l_(r)?`pending`:`success`;w={id:v,ssr:r.options.ssr,index:n,routeId:r.id,params:b?.params??i,_strictParams:x,pathname:g,updatedAt:Date.now(),search:b?_h(b.search,d):d,_strictSearch:f,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:S,__routeContext:void 0,_nonReactive:{loadPromise:wh()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:C,loaderDeps:b?vh(b.loaderDeps,m):m,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t?.preload||(w.globalNotFound=c===r.id),w.searchError=p;let T=this.getParentContext(s);w.context={...T,...w.__routeContext,...w.__beforeLoadContext},l[n]=w}for(let t=0;t<l.length;t++){let n=l[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),o=u.get(n.routeId);if(n.params=o?_h(o.params,i):i,!a){let i=l[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:l,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return l}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=dh(t),a={...e.search};for(let e of t)try{Object.assign(a,T_(e.options.validateSearch,a))}catch{}let o=dh(this.stores.matchesId.state),s=o&&this.stores.activeMatchStoresById.get(o)?.state,c=s&&s.routeId===i.id&&s.pathname===e.pathname,l;if(c)l=s.params;else{let e=Object.assign(Object.create(null),n);for(let i of t)try{A_(i,n,r??{},e)}catch{}l=e}return{matchedRoutes:t,fullPath:i.fullPath,search:a,params:l}}},S_=class extends Error{},C_=class extends Error{};function w_(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function T_(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new S_(`Async validation not supported`);if(n.issues)throw new S_(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function E_({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=og(e),a,o,s=qh(i,n,!0);return s&&(a=s.route,Object.assign(r,s.rawParams),o=Object.assign(Object.create(null),s.parsedParams)),{matchedRoutes:s?.branch||[t.__root__],routeParams:r,foundRoute:a,parsedParams:o}}function D_({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return O_(n)(e,t,r??!1)}function O_(e){let t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(let n of e)`search`in n.options?n.options.search?.middlewares&&t.middlewares.push(...n.options.search.middlewares):(n.options.preSearchFilters||n.options.postSearchFilters)&&t.middlewares.push(({search:e,next:t})=>{let r=e;`preSearchFilters`in n.options&&n.options.preSearchFilters&&(r=n.options.preSearchFilters.reduce((e,t)=>t(e),e));let i=t(r);return`postSearchFilters`in n.options&&n.options.postSearchFilters?n.options.postSearchFilters.reduce((e,t)=>t(e),i):i}),n.options.validateSearch&&t.middlewares.push(({search:e,next:r})=>{let i=r(e);if(!t._includeValidateSearch)return i;try{return{...i,...T_(n.options.validateSearch,i)??void 0}}catch{return i}});t.middlewares.push(({search:e})=>{let n=t.dest;return n.search?n.search===!0?e:ph(n.search,e):{}});let n=(e,t,r)=>{if(e>=r.length)return t;let i=r[e];return i({search:t,next:t=>n(e+1,t,r)})};return function(e,r,i){return t.dest=r,t._includeValidateSearch=i,n(0,e,t.middlewares)}}function k_(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return Ng}function A_(e,t,n,r){let i=e.options.params?.parse??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(let e in t)e in n&&(r[e]=n[e]);else{let e=i(r);Object.assign(r,e)}}var j_=`Error preloading route! ☝️`,M_=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=Ng:this.parentRoute||Nh();let r=n?Ng:t?.path;r&&r!==`/`&&(r=ag(r));let i=t?.id||r,a=n?Ng:rg([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=rg([`/`,a]));let o=a===`__root__`?`/`:rg([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=og(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Pg({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},N_=class extends M_{constructor(e){super(e)}};function P_(e){if(typeof document<`u`&&document.querySelector){let t=e.stores.location.state,n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==``){let e=document.getElementById(t.hash);e&&e.scrollIntoView(n)}}}function F_(e){let t=e.errorComponent??L_;return(0,G.jsx)(I_,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?W.createElement(t,{error:n,reset:r}):e.children})}var I_=class extends W.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.resetKey===this.props.getResetKey()?this.state.error:null,reset:()=>{this.reset()}})}};function L_({error:e}){let[t,n]=W.useState(!1);return(0,G.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,G.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,G.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,G.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,G.jsx)(`div`,{children:(0,G.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,G.jsx)(`code`,{children:e.message}):null})}):null]})}function R_({children:e,fallback:t=null}){return z_()?(0,G.jsx)(W.Fragment,{children:e}):(0,G.jsx)(W.Fragment,{children:t})}function z_(){return W.useSyncExternalStore(B_,()=>!0,()=>!1)}function B_(){return()=>{}}var V_=W.createContext(null);function H_(e){return W.useContext(V_)}var U_=W.createContext(void 0),W_=W.createContext(void 0),G_=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(G_||{});function K_({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function q_(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var J_=[],Y_=0,{link:X_,unlink:Z_,propagate:Q_,checkDirty:$_,shallowPropagate:ev}=K_({update(e){return e._update()},notify(e){J_[nv++]=e,e.flags&=~G_.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=G_.Mutable|G_.Dirty,ov(e))}}),tv=0,nv=0,rv,iv=0;function av(e){try{++iv,e()}finally{--iv||sv()}}function ov(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Z_(n,e)}function sv(){if(!(iv>0)){for(;tv<nv;){let e=J_[tv];J_[tv++]=void 0,e.notify()}tv=0,nv=0}}function cv(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?G_.None:G_.Mutable,get(){return rv!==void 0&&X_(i,rv,Y_),i._snapshot},subscribe(e){let t=q_(e),n={current:!1},r=lv(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=rv,o=t?.compare??Object.is;if(n)rv=i,++Y_,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=G_.Mutable|G_.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{rv=a,n&&(i.flags&=~G_.RecursedCheck),ov(i)}}};return n?(i.flags=G_.Mutable|G_.Dirty,i.get=function(){let e=i.flags;if(e&G_.Dirty||e&G_.Pending&&$_(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&ev(e)}}else e&G_.Pending&&(i.flags=e&~G_.Pending);return rv!==void 0&&X_(i,rv,Y_),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Q_(e),ev(e),sv())}},i}function lv(e){let t=()=>{let t=rv;rv=n,++Y_,n.depsTail=void 0,n.flags=G_.Watching|G_.RecursedCheck;try{return e()}finally{rv=t,n.flags&=~G_.RecursedCheck,ov(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:G_.Watching|G_.RecursedCheck,notify(){let e=this.flags;e&G_.Dirty||e&G_.Pending&&$_(this.deps,this)?t():this.flags=G_.Watching},stop(){this.flags=G_.None,this.depsTail=void 0,ov(this)}};return t(),n}var uv=class{constructor(e){this.atom=cv(e)}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(q_(e))}},dv=class{constructor(e){this.atom=cv(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(q_(e))}};function fv(e){return typeof e==`function`?new dv(e):new uv(e)}var pv=o((e=>{var t=ap();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),mv=o(((e,t)=>{t.exports=pv()})),hv=o((e=>{var t=ap(),n=mv();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.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),gv=o(((e,t)=>{t.exports=hv()}))();function _v(e,t){return e===t}function vv(e,t,n=_v){let r=(0,W.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,W.useCallback)(()=>e?.get(),[e]);return(0,gv.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var yv={state:void 0,get:()=>void 0,subscribe:()=>()=>{}};function bv(e){let t=H_(),n=W.useContext(e.from?W_:U_),r=e.from??n,i=r?e.from?t.stores.getMatchStoreByRouteId(r):t.stores.activeMatchStoresById.get(r):void 0,a=W.useRef(void 0);return vv(i??yv,n=>{if((e.shouldThrow??!0)&&!n&&Nh(),n===void 0)return;let r=e.select?e.select(n):n;if(e.structuralSharing??t.options.defaultStructuralSharing){let e=vh(a.current,r);return a.current=e,e}return r})}function xv(e){return bv({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Sv(e){let{select:t,...n}=e;return bv({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Cv(e){return bv({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function wv(e){return bv({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Tv(e){let t=H_();return W.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Ev(e){return bv({...e,select:t=>e.select?e.select(t.context):t.context})}var Dv=l(Ap(),1);function Ov(e,t){let n=H_(),r=uh(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:l,hashScrollIntoView:u,replace:d,startTransition:f,resetScroll:p,viewTransition:m,children:h,target:g,disabled:_,style:v,className:y,onClick:b,onBlur:x,onFocus:S,onMouseEnter:C,onMouseLeave:w,onTouchStart:T,ignoreBlocker:E,params:D,search:O,hash:k,state:A,mask:j,reloadDocument:M,unsafeRelative:N,from:P,_fromLocation:F,...I}=e,L=z_(),ee=W.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),R=vv(n.stores.location,e=>e,(e,t)=>e.href===t.href),z=W.useMemo(()=>{let e={_fromLocation:R,...ee};return n.buildLocation(e)},[n,R,ee]),B=z.maskedLocation?z.maskedLocation.publicHref:z.publicHref,V=z.maskedLocation?z.maskedLocation.external:z.external,H=W.useMemo(()=>Lv(B,V,n.history,_),[_,V,B,n.history]),U=W.useMemo(()=>{if(H?.external)return kh(H.href,n.protocolAllowlist)?void 0:H.href;if(!Rv(s)&&!(typeof s!=`string`||s.indexOf(`:`)===-1))try{return new URL(s),kh(s,n.protocolAllowlist)?void 0:s}catch{}},[s,H,n.protocolAllowlist]),te=W.useMemo(()=>{if(U)return!1;if(o?.exact){if(!lg(R.pathname,z.pathname,n.basepath))return!1}else{let e=cg(R.pathname,n.basepath),t=cg(z.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(o?.includeSearch??!0)&&!Ch(R.search,z.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:o?.includeHash?L&&R.hash===z.hash:!0},[o?.exact,o?.explicitUndefined,o?.includeHash,o?.includeSearch,R,U,L,z.hash,z.pathname,z.search,n.basepath]),ne=te?ph(i,{})??Av:kv,re=te?kv:ph(a,{})??kv,ie=[y,ne.className,re.className].filter(Boolean).join(` `),ae=(v||ne.style||re.style)&&{...v,...ne.style,...re.style},[oe,se]=W.useState(!1),ce=W.useRef(!1),le=e.reloadDocument||U?!1:c??n.options.defaultPreload,ue=l??n.options.defaultPreloadDelay??0,de=W.useCallback(()=>{n.preloadRoute({...ee,_builtLocation:z}).catch(e=>{console.warn(e),console.warn(j_)})},[n,ee,z]);lh(r,W.useCallback(e=>{e?.isIntersecting&&de()},[de]),Fv,{disabled:!!_||le!==`viewport`}),W.useEffect(()=>{ce.current||!_&&le===`render`&&(de(),ce.current=!0)},[_,de,le]);let fe=e=>{let t=e.currentTarget.getAttribute(`target`),r=g===void 0?t:g;if(!_&&!Bv(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,Dv.flushSync)(()=>{se(!0)});let t=n.subscribe(`onResolved`,()=>{t(),se(!1)});n.navigate({...ee,replace:d,resetScroll:p,hashScrollIntoView:u,startTransition:f,viewTransition:m,ignoreBlocker:E})}};if(U)return{...I,ref:r,href:U,...h&&{children:h},...g&&{target:g},..._&&{disabled:_},...v&&{style:v},...y&&{className:y},...b&&{onClick:b},...x&&{onBlur:x},...S&&{onFocus:S},...C&&{onMouseEnter:C},...w&&{onMouseLeave:w},...T&&{onTouchStart:T}};let pe=e=>{if(_||le!==`intent`)return;if(!ue){de();return}let t=e.currentTarget;if(Pv.has(t))return;let n=setTimeout(()=>{Pv.delete(t),de()},ue);Pv.set(t,n)},me=e=>{_||le!==`intent`||de()},he=e=>{if(_||!le||!ue)return;let t=e.currentTarget,n=Pv.get(t);n&&(clearTimeout(n),Pv.delete(t))};return{...I,...ne,...re,href:H?.href,ref:r,onClick:Iv([b,fe]),onBlur:Iv([x,he]),onFocus:Iv([S,pe]),onMouseEnter:Iv([C,pe]),onMouseLeave:Iv([w,he]),onTouchStart:Iv([T,me]),disabled:!!_,target:g,...ae&&{style:ae},...ie&&{className:ie},..._&&jv,...te&&Mv,...L&&oe&&Nv}}var kv={},Av={className:`active`},jv={role:`link`,"aria-disabled":!0},Mv={"data-status":`active`,"aria-current":`page`},Nv={"data-transitioning":`transitioning`},Pv=new WeakMap,Fv={rootMargin:`100px`},Iv=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Lv(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function Rv(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var zv=W.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=Ov(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return W.createElement(`a`,t,o)}return W.createElement(n,a,o)});function Bv(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Vv=class extends M_{constructor(e){super(e),this.useMatch=e=>bv({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Ev({...e,from:this.id}),this.useSearch=e=>wv({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Cv({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Sv({...e,from:this.id}),this.useLoaderData=e=>xv({...e,from:this.id}),this.useNavigate=()=>Tv({from:this.fullPath}),this.Link=W.forwardRef((e,t)=>(0,G.jsx)(zv,{ref:t,from:this.fullPath,...e}))}};function Hv(e){return new Vv(e)}var Uv=class extends N_{constructor(e){super(e),this.useMatch=e=>bv({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Ev({...e,from:this.id}),this.useSearch=e=>wv({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Cv({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Sv({...e,from:this.id}),this.useLoaderData=e=>xv({...e,from:this.id}),this.useNavigate=()=>Tv({from:this.fullPath}),this.Link=W.forwardRef((e,t)=>(0,G.jsx)(zv,{ref:t,from:this.fullPath,...e}))}};function Wv(e){return new Uv(e)}function Gv(e){let t=H_(),n=`not-found-${vv(t.stores.location,e=>e.pathname)}-${vv(t.stores.status,e=>e)}`;return(0,G.jsx)(F_,{getResetKey:()=>n,onCatch:(t,n)=>{if(hg(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(hg(t))return e.fallback?.(t);throw t},children:e.children})}function Kv(){return(0,G.jsx)(`p`,{children:`Not Found`})}function qv(e){return(0,G.jsx)(G.Fragment,{children:e.children})}function Jv(e,t,n){return t.options.notFoundComponent?(0,G.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,G.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,G.jsx)(Kv,{})}var Yv=W.memo(function({matchId:e}){let t=H_(),n=t.stores.activeMatchStoresById.get(e);n||Nh();let r=vv(t.stores.loadedAt,e=>e),i=vv(n,e=>e);return(0,G.jsx)(Xv,{router:t,matchId:e,resetKey:r,matchState:W.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function Xv({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,G.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,l=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,u=r.ssr===!1||r.ssr===`data-only`,d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||u))?W.Suspense:qv,f=s?F_:qv,p=l?Gv:qv;return(0,G.jsxs)(i.isRoot?i.options.shellComponent??qv:qv,{children:[(0,G.jsx)(U_.Provider,{value:t,children:(0,G.jsx)(d,{fallback:o,children:(0,G.jsx)(f,{getResetKey:()=>n,errorComponent:s||L_,onCatch:(e,t)=>{if(hg(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,G.jsx)(p,{fallback:e=>{if(e.routeId??=r.routeId,!l||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return W.createElement(l,e)},children:u||r._displayPending?(0,G.jsx)(R_,{fallback:o,children:(0,G.jsx)(Qv,{matchId:t})}):(0,G.jsx)(Qv,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Zv,{resetKey:n}),(e.options.scrollRestoration,null)]}):null]})}function Zv({resetKey:e}){let t=H_(),n=W.useRef(void 0);return sh(()=>{let e=t.latestLocation.href;(n.current===void 0||n.current!==e)&&(t.emit({type:`onRendered`,...b_(t.stores.location.state,t.stores.resolvedLocation.state)}),n.current=e)},[t.latestLocation.state.__TSR_key,e,t]),null}var Qv=W.memo(function({matchId:e}){let t=H_(),n=t.stores.activeMatchStoresById.get(e);n||Nh();let r=vv(n,e=>e),i=r.routeId,a=t.routesById[i],o=W.useMemo(()=>{let e=(t.routesById[i].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:i,loaderDeps:r.loaderDeps,params:r._strictParams,search:r._strictSearch});return e?JSON.stringify(e):void 0},[i,r.loaderDeps,r._strictParams,r._strictSearch,t.options.defaultRemountDeps,t.routesById]),s=W.useMemo(()=>{let e=a.options.component??t.options.defaultComponent;return e?(0,G.jsx)(e,{},o):(0,G.jsx)($v,{})},[o,a.options.component,t.options.defaultComponent]);if(r._displayPending)throw t.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw t.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status===`pending`){let e=a.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(r.id);if(n&&!n._nonReactive.minPendingPromise){let t=wh();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw t.getMatch(r.id)?._nonReactive.loadPromise}if(r.status===`notFound`)return hg(r.error)||Nh(),Jv(t,a,r.error);if(r.status===`redirected`)throw Fg(r.error)||Nh(),t.getMatch(r.id)?._nonReactive.loadPromise;if(r.status===`error`)throw r.error;return s}),$v=W.memo(function(){let e=H_(),t=W.useContext(U_),n,r=!1,i;{let a=t?e.stores.activeMatchStoresById.get(t):void 0;[n,r]=vv(a,e=>[e?.routeId,e?.globalNotFound??!1]),i=vv(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,G.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||Nh(),Jv(e,a,void 0);if(!i)return null;let s=(0,G.jsx)(Yv,{matchId:i});return n===`__root__`?(0,G.jsx)(W.Suspense,{fallback:o,children:s}):s});function ey(){let e=H_(),t=W.useRef({router:e,mounted:!1}),[n,r]=W.useState(!1),i=vv(e.stores.isLoading,e=>e),a=vv(e.stores.hasPendingMatches,e=>e),o=ch(i),s=i||n||a,c=ch(s),l=i||a,u=ch(l);return e.startTransition=e=>{r(!0),W.startTransition(()=>{e(),r(!1)})},W.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return og(e.latestLocation.publicHref)!==og(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),sh(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),sh(()=>{o&&!i&&e.emit({type:`onLoad`,...b_(e.stores.location.state,e.stores.resolvedLocation.state)})},[o,e,i]),sh(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...b_(e.stores.location.state,e.stores.resolvedLocation.state)})},[l,u,e]),sh(()=>{if(c&&!s){let t=b_(e.stores.location.state,e.stores.resolvedLocation.state);e.emit({type:`onResolved`,...t}),av(()=>{e.stores.status.setState(()=>`idle`),e.stores.resolvedLocation.setState(()=>e.stores.location.state)}),t.hrefChanged&&P_(e)}},[s,c,e]),null}function ty(){let e=H_(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,G.jsx)(t,{}):null,r=(0,G.jsxs)(typeof document<`u`&&e.ssr?qv:W.Suspense,{fallback:n,children:[(0,G.jsx)(ey,{}),(0,G.jsx)(ny,{})]});return e.options.InnerWrap?(0,G.jsx)(e.options.InnerWrap,{children:r}):r}function ny(){let e=H_(),t=vv(e.stores.firstMatchId,e=>e),n=vv(e.stores.loadedAt,e=>e),r=t?(0,G.jsx)(Yv,{matchId:t}):null;return(0,G.jsx)(U_.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,G.jsx)(F_,{getResetKey:()=>n,errorComponent:L_,onCatch:void 0,children:r})})}var ry=e=>({createMutableStore:fv,createReadonlyStore:fv,batch:av}),iy=e=>new ay(e),ay=class extends x_{constructor(e){super(e,ry)}};function oy({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,G.jsx)(V_.Provider,{value:e,children:t});return e.options.Wrap?(0,G.jsx)(e.options.Wrap,{children:r}):r}function sy({router:e,...t}){return(0,G.jsx)(oy,{router:e,...t,children:(0,G.jsx)(ty,{})})}function cy(e){let t=H_({warn:e?.router===void 0}),n=e?.router||t,r=(0,W.useRef)(void 0);return vv(n.stores.__store,t=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){let n=vh(r.current,e.select(t));return r.current=n,n}return e.select(t)}return t})}var ly=/\{[^{}]+\}/g,uy=()=>typeof process==`object`&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function dy(){return Math.random().toString(36).slice(2,11)}function fy(e){let{baseUrl:t=``,Request:n=globalThis.Request,fetch:r=globalThis.fetch,querySerializer:i,bodySerializer:a,pathSerializer:o,headers:s,requestInitExt:c=void 0,...l}={...e};c=uy()?c:void 0,t=xy(t);let u=[];async function d(e,d){let{baseUrl:f,fetch:p=r,Request:m=n,headers:h,params:g={},parseAs:_=`json`,querySerializer:v,bodySerializer:y=a??vy,pathSerializer:b,body:x,middleware:S=[],...C}=d||{},w=t;f&&(w=xy(f)??t);let T=typeof i==`function`?i:gy(i);v&&(T=typeof v==`function`?v:gy({...typeof i==`object`?i:{},...v}));let E=b||o||_y,D=x===void 0?void 0:y(x,by(s,h,g.header)),O=by(D===void 0||D instanceof FormData?{}:{"Content-Type":`application/json`},s,h,g.header),k=[...u,...S],A={redirect:`follow`,...l,...C,body:D,headers:O},j,M,N=new m(yy(e,{baseUrl:w,params:g,querySerializer:T,pathSerializer:E}),A),P;for(let e in C)e in N||(N[e]=C[e]);if(k.length){j=dy(),M=Object.freeze({baseUrl:w,fetch:p,parseAs:_,querySerializer:T,bodySerializer:y,pathSerializer:E});for(let t of k)if(t&&typeof t==`object`&&typeof t.onRequest==`function`){let n=await t.onRequest({request:N,schemaPath:e,params:g,options:M,id:j});if(n)if(n instanceof m)N=n;else if(n instanceof Response){P=n;break}else throw Error(`onRequest: must return new Request() or Response() when modifying the request`)}}if(!P){try{P=await p(N,c)}catch(t){let n=t;if(k.length)for(let t=k.length-1;t>=0;t--){let r=k[t];if(r&&typeof r==`object`&&typeof r.onError==`function`){let t=await r.onError({request:N,error:n,schemaPath:e,params:g,options:M,id:j});if(t){if(t instanceof Response){n=void 0,P=t;break}if(t instanceof Error){n=t;continue}throw Error(`onError: must return new Response() or instance of Error`)}}}if(n)throw n}if(k.length)for(let t=k.length-1;t>=0;t--){let n=k[t];if(n&&typeof n==`object`&&typeof n.onResponse==`function`){let t=await n.onResponse({request:N,response:P,schemaPath:e,params:g,options:M,id:j});if(t){if(!(t instanceof Response))throw Error(`onResponse: must return new Response() when modifying the response`);P=t}}}}let F=P.headers.get(`Content-Length`);if(P.status===204||N.method===`HEAD`||F===`0`&&!P.headers.get(`Transfer-Encoding`)?.includes(`chunked`))return P.ok?{data:void 0,response:P}:{error:void 0,response:P};if(P.ok)return{data:await(async()=>{if(_===`stream`)return P.body;if(_===`json`&&!F){let e=await P.text();return e?JSON.parse(e):void 0}return await P[_]()})(),response:P};let I=await P.text();try{I=JSON.parse(I)}catch{}return{error:I,response:P}}return{request(e,t,n){return d(t,{...n,method:e.toUpperCase()})},GET(e,t){return d(e,{...t,method:`GET`})},PUT(e,t){return d(e,{...t,method:`PUT`})},POST(e,t){return d(e,{...t,method:`POST`})},DELETE(e,t){return d(e,{...t,method:`DELETE`})},OPTIONS(e,t){return d(e,{...t,method:`OPTIONS`})},HEAD(e,t){return d(e,{...t,method:`HEAD`})},PATCH(e,t){return d(e,{...t,method:`PATCH`})},TRACE(e,t){return d(e,{...t,method:`TRACE`})},use(...e){for(let t of e)if(t){if(typeof t!=`object`||!(`onRequest`in t||`onResponse`in t||`onError`in t))throw Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");u.push(t)}},eject(...e){for(let t of e){let e=u.indexOf(t);e!==-1&&u.splice(e,1)}}}}function py(e,t,n){if(t==null)return``;if(typeof t==`object`)throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${n?.allowReserved===!0?t:encodeURIComponent(t)}`}function my(e,t,n){if(!t||typeof t!=`object`)return``;let r=[],i={simple:`,`,label:`.`,matrix:`;`}[n.style]||`&`;if(n.style!==`deepObject`&&n.explode===!1){for(let e in t)r.push(e,n.allowReserved===!0?t[e]:encodeURIComponent(t[e]));let i=r.join(`,`);switch(n.style){case`form`:return`${e}=${i}`;case`label`:return`.${i}`;case`matrix`:return`;${e}=${i}`;default:return i}}for(let i in t){let a=n.style===`deepObject`?`${e}[${i}]`:i;r.push(py(a,t[i],n))}let a=r.join(i);return n.style===`label`||n.style===`matrix`?`${i}${a}`:a}function hy(e,t,n){if(!Array.isArray(t))return``;if(n.explode===!1){let r={form:`,`,spaceDelimited:`%20`,pipeDelimited:`|`}[n.style]||`,`,i=(n.allowReserved===!0?t:t.map(e=>encodeURIComponent(e))).join(r);switch(n.style){case`simple`:return i;case`label`:return`.${i}`;case`matrix`:return`;${e}=${i}`;default:return`${e}=${i}`}}let r={simple:`,`,label:`.`,matrix:`;`}[n.style]||`&`,i=[];for(let r of t)n.style===`simple`||n.style===`label`?i.push(n.allowReserved===!0?r:encodeURIComponent(r)):i.push(py(e,r,n));return n.style===`label`||n.style===`matrix`?`${r}${i.join(r)}`:i.join(r)}function gy(e){return function(t){let n=[];if(t&&typeof t==`object`)for(let r in t){let i=t[r];if(i!=null){if(Array.isArray(i)){if(i.length===0)continue;n.push(hy(r,i,{style:`form`,explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof i==`object`){n.push(my(r,i,{style:`deepObject`,explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(py(r,i,e))}}return n.join(`&`)}}function _y(e,t){let n=e;for(let r of e.match(ly)??[]){let e=r.substring(1,r.length-1),i=!1,a=`simple`;if(e.endsWith(`*`)&&(i=!0,e=e.substring(0,e.length-1)),e.startsWith(`.`)?(a=`label`,e=e.substring(1)):e.startsWith(`;`)&&(a=`matrix`,e=e.substring(1)),!t||t[e]===void 0||t[e]===null)continue;let o=t[e];if(Array.isArray(o)){n=n.replace(r,hy(e,o,{style:a,explode:i}));continue}if(typeof o==`object`){n=n.replace(r,my(e,o,{style:a,explode:i}));continue}if(a===`matrix`){n=n.replace(r,`;${py(e,o)}`);continue}n=n.replace(r,a===`label`?`.${encodeURIComponent(o)}`:encodeURIComponent(o))}return n}function vy(e,t){return e instanceof FormData?e:t&&(t.get instanceof Function?t.get(`Content-Type`)??t.get(`content-type`):t[`Content-Type`]??t[`content-type`])===`application/x-www-form-urlencoded`?new URLSearchParams(e).toString():JSON.stringify(e)}function yy(e,t){let n=`${t.baseUrl}${e}`;t.params?.path&&(n=t.pathSerializer(n,t.params.path));let r=t.querySerializer(t.params.query??{});return r.startsWith(`?`)&&(r=r.substring(1)),r&&(n+=`?${r}`),n}function by(...e){let t=new Headers;for(let n of e){if(!n||typeof n!=`object`)continue;let e=n instanceof Headers?n.entries():Object.entries(n);for(let[n,r]of e)if(r===null)t.delete(n);else if(Array.isArray(r))for(let e of r)t.append(n,e);else r!==void 0&&t.set(n,r)}return t}function xy(e){return e.endsWith(`/`)?e.substring(0,e.length-1):e}function Sy(e){let t=fy({baseUrl:e.baseUrl,...e.fetch&&{fetch:e.fetch}}),n=e.getHeaders,r=e.transportPath??`direct`;return t.use({async onRequest({request:e}){if(n){let t=await n();for(let[n,r]of Object.entries(t))e.headers.set(n,r)}return e.headers.has(`x-syncular-transport-path`)||e.headers.set(`x-syncular-transport-path`,r),e}}),t}var Cy=Mp();function wy(e){return Sy({baseUrl:e.serverUrl,getHeaders:()=>({Authorization:`Bearer ${e.token}`})})}async function Ty(e){try{let{error:t,response:n}=await e.GET(`/console/stats`);if(!t)return;let r=n.status,i=null;if(typeof t==`string`)i=t;else if(t&&typeof t==`object`){let e=t,n=e.error,r=e.message;if(typeof n==`string`&&n.length>0)i=n;else if(typeof r==`string`&&r.length>0)i=r;else try{i=JSON.stringify(e)}catch{i=null}}throw Error(i&&i.length>0?`Console API /console/stats returned ${r}: ${i}`:`Console API /console/stats returned ${r}`)}catch(e){throw e instanceof Error?e:Error(`Failed to connect to console API`)}}var Ey=`sync-console-connection`;function Dy(e){if(!e)return null;let t=e.serverUrl?.trim()??``,n=e.token?.trim()??``;return!t||!n?null:{serverUrl:t,token:n}}function Oy(e){return typeof window>`u`?null:e===`local`?window.localStorage:e===`session`?window.sessionStorage:null}function ky(e){let t=Oy(e);if(!t)return null;try{let e=t.getItem(Ey);return e?Dy(JSON.parse(e)):null}catch{return null}}function Ay(e,t){let n=Oy(e);if(n)try{if(!t){n.removeItem(Ey);return}n.setItem(Ey,JSON.stringify(t))}catch{}}var jy=(0,W.createContext)(null);function My({children:e,defaultConfig:t=null,autoConnect:n=!1,storageMode:r=`session`}){let[i,a]=(0,W.useState)(()=>ky(r));(0,W.useEffect)(()=>{a(ky(r))},[r]),(0,W.useEffect)(()=>{typeof window>`u`||(r!==`local`&&window.localStorage.removeItem(Ey),r===`memory`&&window.sessionStorage.removeItem(Ey))},[r]);let o=(0,W.useCallback)(e=>{let t=Dy(e);a(t),Ay(r,t)},[r]),[s,c]=(0,W.useState)({isConnected:!1,isConnecting:!1,error:null,client:null}),l=(0,W.useRef)(null);(0,W.useEffect)(()=>{if(!(i?.serverUrl?.trim()&&i.token?.trim())&&t?.serverUrl?.trim()&&t.token?.trim()){o({serverUrl:t.serverUrl.trim(),token:t.token.trim()});return}},[o,i,t]);let u=(0,W.useCallback)(async(e,t)=>{let n=e??i;if(!n)return c(e=>({...e,error:`No connection configured`})),!1;let r=Dy(n);if(!r){let e=(n.serverUrl?.trim()??``).length>0;return c(t=>({...t,error:e?`Token is required`:`Server URL is required`})),!1}e&&(t?.persistOverride??!0)&&o(r),c(e=>({...e,isConnecting:!0,error:null}));try{let e=wy(r);return await Ty(e),c({isConnected:!0,isConnecting:!1,client:e,error:null}),!0}catch(e){return c({isConnected:!1,isConnecting:!1,client:null,error:e instanceof Error?e.message:`Connection failed`}),!1}},[i,o]),d=(0,W.useCallback)(e=>{e?.clearSavedConfig&&o(null),c({isConnected:!1,isConnecting:!1,client:null,error:null})},[o]),f=(0,W.useCallback)(()=>{c(e=>({...e,error:null}))},[]),p=(0,W.useCallback)(e=>{o(e),c({isConnected:!1,isConnecting:!1,client:null,error:null})},[o]),m=(0,W.useMemo)(()=>({config:i,setConfig:p,isConnected:s.isConnected,isConnecting:s.isConnecting,error:s.error,client:s.client,connect:u,disconnect:d,clearError:f}),[i,p,s,u,d,f]);return(0,W.useEffect)(()=>{if(!n||s.isConnected||s.isConnecting)return;let e=i??t,r=Ny(e);!e||!r||l.current!==r&&(l.current=r,u(e,{persistOverride:!0}))},[n,i,t,s.isConnected,s.isConnecting,u]),(0,G.jsx)(jy.Provider,{value:m,children:e})}function Ny(e){if(!e)return null;let t=e.serverUrl?.trim()??``,n=e.token?.trim()??``;return!t||!n?null:`${t}\u0000${n}`}function Py(){let e=(0,W.useContext)(jy);if(!e)throw Error(`useConnection must be used within a ConnectionProvider`);return e}function Fy(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=Fy(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Iy(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Fy(e))&&(r&&(r+=` `),r+=t);return r}new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function Ly(e){return function(){return e}}var Ry=Math.PI,zy=2*Ry,By=1e-6,Vy=zy-By;function Hy(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Uy(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Hy;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var Wy=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Hy:Uy(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>By)if(!(Math.abs(u*s-c*l)>By)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Ry-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>By&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>By||Math.abs(this._y1-l)>By)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%zy+zy),d>Vy?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>By&&this._append`A${n},${n},0,${+(d>=Ry)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function Gy(){return new Wy}Gy.prototype=Wy.prototype,Array.prototype.slice;function Ky(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function qy(e){this._context=e}qy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Jy(){}function Yy(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Xy(e){this._context=e}Xy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Yy(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Yy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Zy(e){this._context=e}Zy.prototype={areaStart:Jy,areaEnd:Jy,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Yy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Qy(e){this._context=e}Qy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Yy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function $y(e){this._context=e}$y.prototype={areaStart:Jy,areaEnd:Jy,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function eb(e){return e<0?-1:1}function tb(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(eb(a)+eb(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function nb(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function rb(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function ib(e){this._context=e}ib.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:rb(this,this._t0,nb(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,rb(this,nb(this,n=tb(this,e,t)),n);break;default:rb(this,this._t0,n=tb(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function ab(e){this._context=new ob(e)}(ab.prototype=Object.create(ib.prototype)).point=function(e,t){ib.prototype.point.call(this,t,e)};function ob(e){this._context=e}ob.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function sb(e){this._context=e}sb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=cb(e),i=cb(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function cb(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function lb(e,t){this._context=e,this._t=t}lb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function ub(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function db(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function fb(e,t){return e[t]}function pb(e){let t=[];return t.key=e,t}function mb(){var e=Ly([]),t=db,n=ub,r=fb;function i(i){var a=Array.from(e.apply(this,arguments),pb),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=Ky(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:Ly(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:Ly(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?db:typeof e==`function`?e:Ly(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??ub,i):n},i}function hb(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}ub(e,t)}}function gb(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}ub(e,t)}}function _b(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,ub(e,t)}}var vb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e===`__proto__`}e.isUnsafeProperty=t})),yb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}e.isDeepKey=t})),bb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}e.toKey=t})),xb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(t).join(`,`);let n=String(e);return n===`0`&&Object.is(Number(e),-0)?`-0`:n}e.toString=t})),Sb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=xb(),n=bb();function r(e){if(Array.isArray(e))return e.map(n.toKey);if(typeof e==`symbol`)return[e];e=t.toString(e);let r=[],i=e.length;if(i===0)return r;let a=0,o=``,s=``,c=!1;for(e.charCodeAt(0)===46&&(r.push(``),a++);a<i;){let t=e[a];s?t===`\\`&&a+1<i?(a++,o+=e[a]):t===s?s=``:o+=t:c?t===`"`||t===`'`?s=t:t===`]`?(c=!1,r.push(o),o=``):o+=t:t===`[`?(c=!0,o&&=(r.push(o),``)):t===`.`?o&&=(r.push(o),``):o+=t,a++}return o&&r.push(o),r}e.toPath=r})),Cb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=vb(),n=yb(),r=bb(),i=Sb();function a(e,s,c){if(e==null)return c;switch(typeof s){case`string`:{if(t.isUnsafeProperty(s))return c;let r=e[s];return r===void 0?n.isDeepKey(s)?a(e,i.toPath(s),c):c:r}case`number`:case`symbol`:{typeof s==`number`&&(s=r.toKey(s));let t=e[s];return t===void 0?c:t}default:{if(Array.isArray(s))return o(e,s,c);if(s=Object.is(s?.valueOf(),-0)?`-0`:String(s),t.isUnsafeProperty(s))return c;let n=e[s];return n===void 0?c:n}}}function o(e,n,r){if(n.length===0)return r;let i=e;for(let e=0;e<n.length;e++){if(i==null||t.isUnsafeProperty(n[e]))return r;i=i[n[e]]}return i===void 0?r:i}e.get=a})),wb=l(o(((e,t)=>{t.exports=Cb().get}))()),Tb=e=>e===0?0:e>0?1:-1,Eb=e=>typeof e==`number`&&e!=+e,Db=e=>typeof e==`string`&&e.indexOf(`%`)===e.length-1,Ob=e=>(typeof e==`number`||e instanceof Number)&&!Eb(e),kb=e=>Ob(e)||typeof e==`string`,Ab=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ob(e)&&typeof e!=`string`)return n;var i;if(Db(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return Eb(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},jb=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function Mb(e,t,n){if(!(!e||!e.length))return e.find(e=>e&&(typeof t==`function`?t(e):(0,wb.default)(e,t))===n)}var Nb=e=>e==null,Pb=e=>Nb(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function Fb(e){return e!=null}function Ib(){}var Lb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}e.uniqBy=t})),Rb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}e.ary=t})),zb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e}e.identity=t})),Bb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return Number.isSafeInteger(e)&&e>=0}e.isLength=t})),Vb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Bb();function n(e){return e!=null&&typeof e!=`function`&&t.isLength(e.length)}e.isArrayLike=n})),Hb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`object`&&!!e}e.isObjectLike=t})),Ub=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Vb(),n=Hb();function r(e){return n.isObjectLike(e)&&t.isArrayLike(e)}e.isArrayLikeObject=r})),Wb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Cb();function n(e){return function(n){return t.get(n,e)}}e.property=n})),Gb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}e.isObject=t})),Kb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e==null||typeof e!=`object`&&typeof e!=`function`}e.isPrimitive=t})),qb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}e.isEqualsSameValueZero=t})),Jb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Gb(),n=Kb(),r=qb();function i(e,t,n){return typeof n==`function`?a(e,t,function e(t,r,i,o,s,c){let l=n(t,r,i,o,s,c);return l===void 0?a(t,r,e,c):!!l},new Map):i(e,t,()=>void 0)}function a(e,n,i,s){if(n===e)return!0;switch(typeof n){case`object`:return o(e,n,i,s);case`function`:return Object.keys(n).length>0?a(e,{...n},i,s):r.isEqualsSameValueZero(e,n);default:return t.isObject(e)?typeof n==`string`?n===``:!0:r.isEqualsSameValueZero(e,n)}}function o(e,t,r,i){if(t==null)return!0;if(Array.isArray(t))return c(e,t,r,i);if(t instanceof Map)return s(e,t,r,i);if(t instanceof Set)return l(e,t,r,i);let a=Object.keys(t);if(e==null||n.isPrimitive(e))return a.length===0;if(a.length===0)return!0;if(i?.has(t))return i.get(t)===e;i?.set(t,e);try{for(let o=0;o<a.length;o++){let s=a[o];if(!n.isPrimitive(e)&&!(s in e)||t[s]===void 0&&e[s]!==void 0||t[s]===null&&e[s]!==null||!r(e[s],t[s],s,e,t,i))return!1}return!0}finally{i?.delete(t)}}function s(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function c(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function l(e,t,n,r){return t.size===0?!0:e instanceof Set?c([...e],[...t],n,r):!1}e.isMatchWith=i,e.isSetMatch=l})),Yb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Jb();function n(e,n){return t.isMatchWith(e,n,()=>void 0)}e.isMatch=n})),Xb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}e.getSymbols=t})),Zb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}e.getTag=t})),Qb=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),e.argumentsTag=`[object Arguments]`,e.arrayBufferTag=`[object ArrayBuffer]`,e.arrayTag=`[object Array]`,e.bigInt64ArrayTag=`[object BigInt64Array]`,e.bigUint64ArrayTag=`[object BigUint64Array]`,e.booleanTag=`[object Boolean]`,e.dataViewTag=`[object DataView]`,e.dateTag=`[object Date]`,e.errorTag=`[object Error]`,e.float32ArrayTag=`[object Float32Array]`,e.float64ArrayTag=`[object Float64Array]`,e.functionTag=`[object Function]`,e.int16ArrayTag=`[object Int16Array]`,e.int32ArrayTag=`[object Int32Array]`,e.int8ArrayTag=`[object Int8Array]`,e.mapTag=`[object Map]`,e.numberTag=`[object Number]`,e.objectTag=`[object Object]`,e.regexpTag=`[object RegExp]`,e.setTag=`[object Set]`,e.stringTag=`[object String]`,e.symbolTag=`[object Symbol]`,e.uint16ArrayTag=`[object Uint16Array]`,e.uint32ArrayTag=`[object Uint32Array]`,e.uint8ArrayTag=`[object Uint8Array]`,e.uint8ClampedArrayTag=`[object Uint8ClampedArray]`})),$b=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}e.isTypedArray=t})),ex=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Xb(),n=Zb(),r=Qb(),i=Kb(),a=$b();function o(e,t){return s(e,void 0,e,new Map,t)}function s(e,t,n,r=new Map,o=void 0){let u=o?.(e,t,n,r);if(u!==void 0)return u;if(i.isPrimitive(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let i=0;i<e.length;i++)t[i]=s(e[i],i,n,r,o);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[i,a]of e)t.set(i,s(a,i,n,r,o));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let i of e)t.add(s(i,void 0,n,r,o));return t}if(typeof Buffer<`u`&&Buffer.isBuffer(e))return e.subarray();if(a.isTypedArray(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let i=0;i<e.length;i++)t[i]=s(e[i],i,n,r,o);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),c(t,e,n,r,o),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),c(t,e,n,r,o),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),c(t,e,n,r,o),t}if(e instanceof Error){let t=new e.constructor;return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,c(t,e,n,r,o),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),c(t,e,n,r,o),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),c(t,e,n,r,o),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),c(t,e,n,r,o),t}if(typeof e==`object`&&l(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),c(t,e,n,r,o),t}return e}function c(e,n,r=e,i,a){let o=[...Object.keys(n),...t.getSymbols(n)];for(let t=0;t<o.length;t++){let c=o[t],l=Object.getOwnPropertyDescriptor(e,c);(l==null||l.writable)&&(e[c]=s(n[c],c,r,i,a))}}function l(e){switch(n.getTag(e)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=o,e.cloneDeepWithImpl=s,e.copyProperties=c})),tx=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=ex();function n(e){return t.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}e.cloneDeep=n})),nx=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Yb(),n=tx();function r(e){return e=n.cloneDeep(e),n=>t.isMatch(n,e)}e.matches=r})),rx=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=ex(),n=Zb(),r=Qb();function i(e,i){return t.cloneDeepWith(e,(a,o,s,c)=>{let l=i?.(a,o,s,c);if(l!==void 0)return l;if(typeof e==`object`){if(n.getTag(e)===r.objectTag&&typeof e.constructor!=`function`){let n={};return c.set(e,n),t.copyProperties(n,e,s,c),n}switch(Object.prototype.toString.call(e)){case r.numberTag:case r.stringTag:case r.booleanTag:{let n=new e.constructor(e?.valueOf());return t.copyProperties(n,e),n}case r.argumentsTag:{let n={};return t.copyProperties(n,e),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}default:return}}})}e.cloneDeepWith=i})),ix=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=rx();function n(e){return t.cloneDeepWith(e)}e.cloneDeep=n})),ax=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=/^(?:0|[1-9]\d*)$/;function n(e,n=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<n;case`symbol`:return!1;case`string`:return t.test(e)}}e.isIndex=n})),ox=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Zb();function n(e){return typeof e==`object`&&!!e&&t.getTag(e)===`[object Arguments]`}e.isArguments=n})),sx=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=yb(),n=ax(),r=ox(),i=Sb();function a(e,a){let o;if(o=Array.isArray(a)?a:typeof a==`string`&&t.isDeepKey(a)&&e?.[a]==null?i.toPath(a):[a],o.length===0)return!1;let s=e;for(let e=0;e<o.length;e++){let t=o[e];if((s==null||!Object.hasOwn(s,t))&&!((Array.isArray(s)||r.isArguments(s))&&n.isIndex(t)&&t<s.length))return!1;s=s[t]}return!0}e.has=a})),cx=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Yb(),n=bb(),r=ix(),i=Cb(),a=sx();function o(e,o){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=n.toKey(e);break}return o=r.cloneDeep(o),function(n){let r=i.get(n,e);return r===void 0?a.has(n,e):o===void 0?r===void 0:t.isMatch(r,o)}}e.matchesProperty=o})),lx=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=zb(),n=Wb(),r=nx(),i=cx();function a(e){if(e==null)return t.identity;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?i.matchesProperty(e[0],e[1]):r.matches(e);case`string`:case`symbol`:case`number`:return n.property(e)}}e.iteratee=a})),ux=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Lb(),n=Rb(),r=zb(),i=Ub(),a=lx();function o(e,o=r.identity){return i.isArrayLikeObject(e)?t.uniqBy(Array.from(e),n.ary(a.iteratee(o),1)):[]}e.uniqBy=o}));o(((e,t)=>{t.exports=ux().uniqBy}))();var dx=Symbol(`NOT_FOUND`);function fx(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function px(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!=`object`)throw TypeError(t)}function mx(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var hx=e=>Array.isArray(e)?e:[e];function gx(e){let t=Array.isArray(e[0])?e[0]:e;return mx(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function _x(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function vx(e){let t;return{get(n){return t&&e(t.key,n)?t.value:dx},put(e,n){t={key:e,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function yx(e,t){let n=[];function r(e){let r=n.findIndex(n=>t(e,n.key));if(r>-1){let e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return dx}function i(t,i){r(t)===dx&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())}function a(){return n}function o(){n=[]}return{get:r,put:i,getEntries:a,clear:o}}var bx=(e,t)=>e===t;function xx(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;let{length:r}=t;for(let i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}}function Sx(e,t){let{equalityCheck:n=bx,maxSize:r=1,resultEqualityCheck:i}=typeof t==`object`?t:{equalityCheck:t},a=xx(n),o=0,s=r<=1?vx(a):yx(r,a);function c(){let t=s.get(arguments);if(t===dx){if(t=e.apply(null,arguments),o++,i){let e=s.getEntries().find(e=>i(e.value,t));e&&(t=e.value,o!==0&&o--)}s.put(arguments,t)}return t}return c.clearCache=()=>{s.clear(),c.resetResultsCount()},c.resultsCount=()=>o,c.resetResultsCount=()=>{o=0},c}var Cx=class{constructor(e){this.value=e}deref(){return this.value}},wx=typeof WeakRef<`u`?WeakRef:Cx,Tx=0,Ex=1;function Dx(){return{s:Tx,v:void 0,o:null,p:null}}function Ox(e,t={}){let n=Dx(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=Dx(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=Dx(),e.set(n,t)):t=r}}let s=t,c;if(t.s===Ex)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=i?.deref?.()??i;e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new wx(c):c}return s.s=Ex,s.v=c,c}return o.clearCache=()=>{n=Dx(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function kx(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),fx(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=Ox,argsMemoizeOptions:u=[],devModeChecks:d={}}={...n,...a},f=hx(c),p=hx(u),m=gx(e),h=s(function(){return t++,o.apply(null,arguments)},...f),g=l(function(){r++;let e=_x(m,arguments);return i=h.apply(null,e),i},...p);return Object.assign(g,{resultFunc:o,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var K=kx(Ox),Ax=Object.assign((e,t=K)=>{px(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>Ax}),jx=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}e.compareValues=(e,n,r)=>{if(e!==n){let i=t(e),a=t(n);if(i===a&&i===0){if(e<n)return r===`desc`?1:-1;if(e>n)return r===`desc`?-1:1}return r===`desc`?a-i:i-a}return 0}})),Mx=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`symbol`||e instanceof Symbol}e.isSymbol=t})),Nx=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Mx(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(e,i){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||t.isSymbol(e)?!0:typeof e==`string`&&(r.test(e)||!n.test(e))||i!=null&&Object.hasOwn(i,e)}e.isKey=i})),Px=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=jx(),n=Nx(),r=Sb();function i(e,i,a,o){if(e==null)return[];a=o?void 0:a,Array.isArray(e)||(e=Object.values(e)),Array.isArray(i)||(i=i==null?[null]:[i]),i.length===0&&(i=[null]),Array.isArray(a)||(a=a==null?[]:[a]),a=a.map(e=>String(e));let s=(e,t)=>{let n=e;for(let e=0;e<t.length&&n!=null;++e)n=n[t[e]];return n},c=(e,t)=>t==null||e==null?t:typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:s(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?s(t,e):typeof t==`object`?t[e]:t,l=i.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||n.isKey(e)?e:{key:e,path:r.toPath(e)}));return e.map(e=>({original:e,criteria:l.map(t=>c(t,e))})).slice().sort((e,n)=>{for(let r=0;r<l.length;r++){let i=t.compareValues(e.criteria[r],n.criteria[r],a[r]);if(i!==0)return i}return 0}).map(e=>e.original)}e.orderBy=i})),Fx=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}e.flatten=t})),Ix=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=ax(),n=Vb(),r=Gb(),i=qb();function a(e,a,o){return r.isObject(o)&&(typeof a==`number`&&n.isArrayLike(o)&&t.isIndex(a)&&a<o.length||typeof a==`string`&&a in o)?i.isEqualsSameValueZero(o[a],e):!1}e.isIterateeCall=a})),Lx=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Px(),n=Fx(),r=Ix();function i(e,...i){let a=i.length;return a>1&&r.isIterateeCall(e,i[0],i[1])?i=[]:a>2&&r.isIterateeCall(i[0],i[1],i[2])&&(i=[i[0]]),t.orderBy(e,n.flatten(i),[`asc`])}e.sortBy=i})),Rx=l(o(((e,t)=>{t.exports=Lx().sortBy}))()),zx=e=>e.legend.settings,Bx=e=>e.legend.size;K([e=>e.legend.payload,zx],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?(0,Rx.default)(r,n):r}),typeof Symbol==`function`&&Symbol.observable;var Vx=()=>Math.random().toString(36).substring(7).split(``).join(`.`);`${Vx()}`,`${Vx()}`;function Hx(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Ux(e){return Hx(e)&&`type`in e&&typeof e.type==`string`}var Wx=Symbol.for(`immer-nothing`),Gx=Symbol.for(`immer-draftable`),Kx=Symbol.for(`immer-state`);function qx(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Jx=Object,Yx=Jx.getPrototypeOf,Xx=`constructor`,Zx=`prototype`,Qx=`configurable`,$x=`enumerable`,eS=`writable`,tS=`value`,nS=e=>!!e&&!!e[Kx];function rS(e){return e?oS(e)||pS(e)||!!e[Gx]||!!e[Xx]?.[Gx]||mS(e)||hS(e):!1}var iS=Jx[Zx][Xx].toString(),aS=new WeakMap;function oS(e){if(!e||!gS(e))return!1;let t=Yx(e);if(t===null||t===Jx[Zx])return!0;let n=Jx.hasOwnProperty.call(t,Xx)&&t[Xx];if(n===Object)return!0;if(!_S(n))return!1;let r=aS.get(n);return r===void 0&&(r=Function.toString.call(n),aS.set(n,r)),r===iS}function sS(e,t,n=!0){cS(e)===0?(n?Reflect.ownKeys(e):Jx.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function cS(e){let t=e[Kx];return t?t.type_:pS(e)?1:mS(e)?2:hS(e)?3:0}var lS=(e,t,n=cS(e))=>n===2?e.has(t):Jx[Zx].hasOwnProperty.call(e,t),uS=(e,t,n=cS(e))=>n===2?e.get(t):e[t],dS=(e,t,n,r=cS(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function fS(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var pS=Array.isArray,mS=e=>e instanceof Map,hS=e=>e instanceof Set,gS=e=>typeof e==`object`,_S=e=>typeof e==`function`,vS=e=>typeof e==`boolean`;function yS(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var bS=e=>e.copy_||e.base_,xS=e=>e.modified_?e.copy_:e.base_;function SS(e,t){if(mS(e))return new Map(e);if(hS(e))return new Set(e);if(pS(e))return Array[Zx].slice.call(e);let n=oS(e);if(t===!0||t===`class_only`&&!n){let t=Jx.getOwnPropertyDescriptors(e);delete t[Kx];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[eS]===!1&&(a[eS]=!0,a[Qx]=!0),(a.get||a.set)&&(t[i]={[Qx]:!0,[eS]:!0,[$x]:a[$x],[tS]:e[i]})}return Jx.create(Yx(e),t)}else{let t=Yx(e);if(t!==null&&n)return{...e};let r=Jx.create(t);return Jx.assign(r,e)}}function CS(e,t=!1){return ES(e)||nS(e)||!rS(e)?e:(cS(e)>1&&Jx.defineProperties(e,{set:TS,add:TS,clear:TS,delete:TS}),Jx.freeze(e),t&&sS(e,(e,t)=>{CS(t,!0)},!1),e)}function wS(){qx(2)}var TS={[tS]:wS};function ES(e){return e===null||!gS(e)?!0:Jx.isFrozen(e)}var DS=`MapSet`,OS=`Patches`,kS=`ArrayMethods`,AS={};function jS(e){let t=AS[e];return t||qx(0,e),t}var MS=e=>!!AS[e],NS,PS=()=>NS,FS=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:MS(DS)?jS(DS):void 0,arrayMethodsPlugin_:MS(kS)?jS(kS):void 0});function IS(e,t){t&&(e.patchPlugin_=jS(OS),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function LS(e){RS(e),e.drafts_.forEach(BS),e.drafts_=null}function RS(e){e===NS&&(NS=e.parent_)}var zS=e=>NS=FS(NS,e);function BS(e){let t=e[Kx];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function VS(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[Kx].modified_&&(LS(t),qx(4)),rS(e)&&(e=HS(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Kx].base_,e,t)}else e=HS(t,n);return US(t,e,!0),LS(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===Wx?void 0:e}function HS(e,t){if(ES(t))return t;let n=t[Kx];if(!n)return ZS(t,e.handledSet_,e);if(!GS(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);YS(n,e)}return n.copy_}function US(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&CS(t,n)}function WS(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var GS=(e,t)=>e.scope_===t,KS=[];function qS(e,t,n,r){let i=bS(e),a=e.type_;if(r!==void 0&&uS(i,r,a)===t){dS(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;sS(i,(e,n)=>{if(nS(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??KS;for(let e of o)dS(i,e,n,a)}function JS(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!GS(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=xS(i);qS(e,i.draft_??i,a,n),YS(i,r)})}function YS(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}WS(e)}}function XS(e,t,n){let{scope_:r}=e;if(nS(n)){let i=n[Kx];GS(i,r)&&i.callbacks_.push(function(){aC(e),qS(e,n,xS(i),t)})}else rS(n)&&e.callbacks_.push(function(){let i=bS(e);e.type_===3?i.has(n)&&ZS(n,r.handledSet_,r):uS(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ZS(uS(e.copy_,t,e.type_),r.handledSet_,r)})}function ZS(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||nS(e)||t.has(e)||!rS(e)||ES(e)?e:(t.add(e),sS(e,(r,i)=>{if(nS(i)){let t=i[Kx];GS(t,n)&&(dS(e,r,xS(t),e.type_),WS(t))}else rS(i)&&ZS(i,t,n)}),e)}function QS(e,t){let n=pS(e),r={type_:n?1:0,scope_:t?t.scope_:PS(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=$S;n&&(i=[r],a=eC);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var $S={get(e,t){if(t===Kx)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=bS(e);if(!lS(i,t,e.type_))return nC(e,i,t);let a=i[t];if(e.finalized_||!rS(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&yS(t))return a;if(a===tC(e.base_,t)){aC(e);let n=e.type_===1?+t:t,r=sC(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in bS(e)},ownKeys(e){return Reflect.ownKeys(bS(e))},set(e,t,n){let r=rC(bS(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=tC(bS(e),t),i=r?.[Kx];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(fS(n,r)&&(n!==void 0||lS(e.base_,t,e.type_)))return!0;aC(e),iC(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),XS(e,t,n),!0)},deleteProperty(e,t){return aC(e),tC(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),iC(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=bS(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[eS]:!0,[Qx]:e.type_!==1||t!==`length`,[$x]:r[$x],[tS]:n[t]}},defineProperty(){qx(11)},getPrototypeOf(e){return Yx(e.base_)},setPrototypeOf(){qx(12)}},eC={};for(let e in $S){let t=$S[e];eC[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}eC.deleteProperty=function(e,t){return eC.set.call(this,e,t,void 0)},eC.set=function(e,t,n){return $S.set.call(this,e[0],t,n,e[0])};function tC(e,t){let n=e[Kx];return(n?bS(n):e)[t]}function nC(e,t,n){let r=rC(t,n);return r?tS in r?r[tS]:r.get?.call(e.draft_):void 0}function rC(e,t){if(!(t in e))return;let n=Yx(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Yx(n)}}function iC(e){e.modified_||(e.modified_=!0,e.parent_&&iC(e.parent_))}function aC(e){e.copy_||=(e.assigned_=new Map,SS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var oC=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(_S(e)&&!_S(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}_S(t)||qx(6),n!==void 0&&!_S(n)&&qx(7);let r;if(rS(e)){let i=zS(this),a=sC(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?LS(i):RS(i)}return IS(i,n),VS(r,i)}else if(!e||!gS(e)){if(r=t(e),r===void 0&&(r=e),r===Wx&&(r=void 0),this.autoFreeze_&&CS(r,!0),n){let t=[],i=[];jS(OS).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}else qx(1,e)},this.produceWithPatches=(e,t)=>{if(_S(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},vS(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),vS(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),vS(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){rS(e)||qx(8),nS(e)&&(e=cC(e));let t=zS(this),n=sC(t,e,void 0);return n[Kx].isManual_=!0,RS(t),n}finishDraft(e,t){let n=e&&e[Kx];(!n||!n.isManual_)&&qx(9);let{scope_:r}=n;return IS(r,t),VS(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=jS(OS).applyPatches_;return nS(e)?r(e,t):this.produce(e,e=>r(e,t))}};function sC(e,t,n,r){let[i,a]=mS(t)?jS(DS).proxyMap_(t,n):hS(t)?jS(DS).proxySet_(t,n):QS(t,n);return(n?.scope_??PS()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?JS(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function cC(e){return nS(e)||qx(10,e),lC(e)}function lC(e){if(!rS(e)||ES(e))return e;let t=e[Kx],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=SS(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=SS(e,!0);return sS(n,(e,t)=>{dS(n,e,lC(t))},r),t&&(t.finalized_=!1),n}var uC=new oC().produce;typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function dC(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(LC(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>Ux(t)&&t.type===e,n}function fC(e){return rS(e)?uC(e,()=>{}):e}function pC(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var mC=`RTK_autoBatch`,hC=()=>e=>({payload:e,meta:{[mC]:!0}});function gC(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(LC(28));if(r in t)throw Error(LC(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function _C(e){return typeof e==`function`}function vC(e,t){let[n,r,i]=gC(t),a;if(_C(e))a=()=>fC(e());else{let t=fC(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n)if(nS(e)){let r=n(e,t);return r===void 0?e:r}else if(rS(e))return uC(e,e=>n(e,t));else{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}return e},e)}return o.getInitialState=a,o}var yC=Symbol.for(`rtk-slice-createasyncthunk`);function bC(e,t){return`${e}/${t}`}function xC({creators:e}={}){let t=e?.asyncThunk?.[yC];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(LC(11));let i=(typeof e.reducers==`function`?e.reducers(wC()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(LC(12));if(n in o.sliceCaseReducersByType)throw Error(LC(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:bC(n,r),createNotation:typeof e.reducers==`function`};EC(a)?OC(o,a,s,t):TC(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?gC(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return vC(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=pC(d,r,m)),i}function i(t=l){return pC(pC(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=SC(a,t,()=>pC(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function SC(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}var CC=xC();function wC(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function TC({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!DC(r))throw Error(LC(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?dC(e,o):dC(e))}function EC(e){return e._reducerDefinitionType===`asyncThunk`}function DC(e){return e._reducerDefinitionType===`reducerWithPrepare`}function OC({type:e,reducerName:t},n,r,i){if(!i)throw Error(LC(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||kC,pending:s||kC,rejected:c||kC,settled:l||kC})}function kC(){}var AC=`listener`,jC=`completed`,MC=`cancelled`;`${MC}`,`${jC}`,`${AC}${MC}`,`${AC}${jC}`;var{assign:NC}=Object,PC=`listenerMiddleware`,FC=NC(dC(`${PC}/add`),{withTypes:()=>FC});`${PC}`;var IC=NC(dC(`${PC}/remove`),{withTypes:()=>IC});function LC(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function RC(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function zC(e){return Number.isFinite(e)}function BC(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function VC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?VC(Object(n),!0).forEach(function(t){UC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function UC(e,t,n){return(t=WC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WC(e){var t=GC(e,`string`);return typeof t==`symbol`?t:t+``}function GC(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function KC(e,t,n){return Nb(e)||Nb(t)?n:kb(t)?(0,wb.default)(e,t,n):typeof t==`function`?t(e):n}var qC=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:a,verticalAlign:o,layout:s}=t;if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&Ob(e[a]))return HC(HC({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&Ob(e[o]))return HC(HC({},e),{},{[o]:e[o]+(i||0)})}return e},JC=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,YC={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0,o=0;o<t;++o){var s=e[o]?.[r];if(s!=null){var c=s[1],l=s[0],u=Eb(c)?l:c;u>=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:hb,none:ub,silhouette:gb,wiggle:_b,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0;a<t;++a){var o=e[a]?.[r];if(o!=null){var s=Eb(o[1])?o[0]:o[1];s>=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},XC=(e,t,n)=>{var r=YC[n]??ub,i=mb().keys(t).value((e,t)=>Number(KC(e,t,0))).order(db).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=KC(e[i],t[r],0);Array.isArray(a)&&a.length===2&&Ob(a[0])&&Ob(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i},ZC=e=>{var t=e.flat(2).filter(Ob);return[Math.min(...t),Math.max(...t)]},QC=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],$C=(e,t,n)=>{if(e!=null)return QC(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var{stackedData:o}=a,s=o.reduce((e,r)=>{var i=ZC(RC(r,t,n));return!zC(i[0])||!zC(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},ew=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,tw=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/;function nw(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:a}=e;return HC(HC({},t),{},{dataKey:n,payload:r,value:i,name:a})}var rw=e=>e.layout.width,iw=e=>e.layout.height,aw=e=>e.layout.margin,ow=K(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),sw=K(e=>e.cartesianAxis.yAxis,e=>Object.values(e));function cw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?cw(Object(n),!0).forEach(function(t){uw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uw(e,t,n){return(t=dw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dw(e){var t=fw(e,`string`);return typeof t==`symbol`?t:t+``}function fw(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var pw=e=>e.brush.height;function mw(e){return sw(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function hw(e){return sw(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function gw(e){return ow(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+t.height:e,0)}function _w(e){return ow(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+t.height:e,0)}var vw=K([rw,iw,aw,pw,mw,hw,gw,_w,zx,Bx],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=lw(lw({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=qC(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return lw(lw({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})});K(vw,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),K(rw,iw,(e,t)=>({x:0,y:0,width:e,height:t}));var yw=e=>e.brush,bw=K([yw,vw,aw],(e,t,n)=>({height:e.height,x:Ob(e.x)?e.x:t.left,y:Ob(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:Ob(e.width)?e.width:t.width})),xw=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}e.debounce=t})),Sw=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=xw();function n(e,n=0,r={}){typeof r!=`object`&&(r={});let{leading:i=!1,trailing:a=!0,maxWait:o}=r,s=[,,];i&&(s[0]=`leading`),a&&(s[1]=`trailing`);let c,l=null,u=t.debounce(function(...t){c=e.apply(this,t),l=null},n,{edges:s}),d=function(...t){return o!=null&&(l===null&&(l=Date.now()),Date.now()-l>=o)?(c=e.apply(this,t),l=Date.now(),u.cancel(),u.schedule(),c):(u.apply(this,t),c)};return d.cancel=u.cancel,d.flush=()=>(u.flush(),c),d}e.debounce=n})),Cw=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Sw();function n(e,n=0,r={}){let{leading:i=!0,trailing:a=!0}=r;return t.debounce(e,n,{leading:i,maxWait:n,trailing:a})}e.throttle=n})),ww=o(((e,t)=>{t.exports=Cw().throttle})),Tw=!0,Ew=function(e,t){var n=[...arguments].slice(2);if(Tw&&typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e))if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var r=0;console.warn(t.replace(/%s/g,()=>n[r++]))}},Dw={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},Ow=(e,t,n)=>{var{width:r=Dw.width,height:i=Dw.height,aspect:a,maxHeight:o}=n,s=Db(r)?e:Number(r),c=Db(i)?t:Number(i);return a&&a>0&&(s?c=s/a:c&&(s=c*a),o&&c!=null&&c>o&&(c=o)),{calculatedWidth:s,calculatedHeight:c}},kw={width:0,height:0,overflow:`visible`},Aw={width:0,overflowX:`visible`},jw={height:0,overflowY:`visible`},Mw={},Nw=e=>{var{width:t,height:n}=e,r=Db(t),i=Db(n);return r&&i?kw:r?Aw:i?jw:Mw};function Pw(e){var{width:t,height:n,aspect:r}=e,i=t,a=n;return i===void 0&&a===void 0?(i=Dw.width,a=Dw.height):i===void 0?i=r&&r>0?void 0:Dw.width:a===void 0&&(a=r&&r>0?void 0:Dw.height),{width:i,height:a}}var Fw=l(ww());function Iw(){return Iw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Iw.apply(null,arguments)}function Lw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Lw(Object(n),!0).forEach(function(t){zw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zw(e,t,n){return(t=Bw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bw(e){var t=Vw(e,`string`);return typeof t==`symbol`?t:t+``}function Vw(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Hw=(0,W.createContext)(Dw.initialDimension);function Uw(e){return BC(e.width)&&BC(e.height)}function Ww(e){var{children:t,width:n,height:r}=e,i=(0,W.useMemo)(()=>({width:n,height:r}),[n,r]);return Uw(i)?W.createElement(Hw.Provider,{value:i},t):null}var Gw=()=>(0,W.useContext)(Hw),Kw=(0,W.forwardRef)((e,t)=>{var{aspect:n,initialDimension:r=Dw.initialDimension,width:i,height:a,minWidth:o=Dw.minWidth,minHeight:s,maxHeight:c,children:l,debounce:u=Dw.debounce,id:d,className:f,onResize:p,style:m={}}=e,h=(0,W.useRef)(null),g=(0,W.useRef)();g.current=p,(0,W.useImperativeHandle)(t,()=>h.current);var[_,v]=(0,W.useState)({containerWidth:r.width,containerHeight:r.height}),y=(0,W.useCallback)((e,t)=>{v(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,W.useEffect)(()=>{if(h.current==null||typeof ResizeObserver>`u`)return Ib;var e=e=>{var t,n=e[0];if(n!=null){var{width:r,height:i}=n.contentRect;y(r,i),(t=g.current)==null||t.call(g,r,i)}};u>0&&(e=(0,Fw.default)(e,u,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:n,height:r}=h.current.getBoundingClientRect();return y(n,r),t.observe(h.current),()=>{t.disconnect()}},[y,u]);var{containerWidth:b,containerHeight:x}=_;Ew(!n||n>0,`The aspect(%s) must be greater than zero.`,n);var{calculatedWidth:S,calculatedHeight:C}=Ow(b,x,{width:i,height:a,aspect:n,maxHeight:c});return Ew(S!=null&&S>0||C!=null&&C>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
14
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
15
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
16
|
+
height and width.`,S,C,i,a,o,s,n),W.createElement(`div`,{id:d?`${d}`:void 0,className:Iy(`recharts-responsive-container`,f),style:Rw(Rw({},m),{},{width:i,height:a,minWidth:o,minHeight:s,maxHeight:c}),ref:h},W.createElement(`div`,{style:Nw({width:i,height:a})},W.createElement(Ww,{width:S,height:C},l)))}),qw=(0,W.forwardRef)((e,t)=>{var n=Gw();if(BC(n.width)&&BC(n.height))return e.children;var{width:r,height:i}=Pw({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:o}=Ow(void 0,void 0,{width:r,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return Ob(a)&&Ob(o)?W.createElement(Ww,{width:a,height:o},e.children):W.createElement(Kw,Iw({},e,{width:r,height:i,ref:t}))}),Jw=e=>e.layout.layoutType,Yw=e=>{var t=e.layout.layoutType;if(t===`centric`||t===`radial`)return t},Xw=Symbol.for(`immer-nothing`),Zw=Symbol.for(`immer-draftable`),Qw=Symbol.for(`immer-state`);function $w(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var eT=Object.getPrototypeOf;function tT(e){return!!e&&!!e[Qw]}function nT(e){return e?aT(e)||Array.isArray(e)||!!e[Zw]||!!e.constructor?.[Zw]||dT(e)||fT(e):!1}var rT=Object.prototype.constructor.toString(),iT=new WeakMap;function aT(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;let n=Object.hasOwnProperty.call(t,`constructor`)&&t.constructor;if(n===Object)return!0;if(typeof n!=`function`)return!1;let r=iT.get(n);return r===void 0&&(r=Function.toString.call(n),iT.set(n,r)),r===rT}function oT(e,t,n=!0){sT(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function sT(e){let t=e[Qw];return t?t.type_:Array.isArray(e)?1:dT(e)?2:fT(e)?3:0}function cT(e,t){return sT(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function lT(e,t,n){let r=sT(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function uT(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}function dT(e){return e instanceof Map}function fT(e){return e instanceof Set}function pT(e){return e.copy_||e.base_}function mT(e,t){if(dT(e))return new Map(e);if(fT(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=aT(e);if(t===!0||t===`class_only`&&!n){let t=Object.getOwnPropertyDescriptors(e);delete t[Qw];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(eT(e),t)}else{let t=eT(e);return t!==null&&n?{...e}:Object.assign(Object.create(t),e)}}function hT(e,t=!1){return vT(e)||tT(e)||!nT(e)?e:(sT(e)>1&&Object.defineProperties(e,{set:_T,add:_T,clear:_T,delete:_T}),Object.freeze(e),t&&Object.values(e).forEach(e=>hT(e,!0)),e)}function gT(){$w(2)}var _T={value:gT};function vT(e){return typeof e!=`object`||!e?!0:Object.isFrozen(e)}var yT={};function bT(e){let t=yT[e];return t||$w(0,e),t}var xT;function ST(){return xT}function CT(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function wT(e,t){t&&(bT(`Patches`),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function TT(e){ET(e),e.drafts_.forEach(OT),e.drafts_=null}function ET(e){e===xT&&(xT=e.parent_)}function DT(e){return xT=CT(xT,e)}function OT(e){let t=e[Qw];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function kT(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return e!==void 0&&e!==n?(n[Qw].modified_&&(TT(t),$w(4)),nT(e)&&(e=AT(t,e),t.parent_||MT(t,e)),t.patches_&&bT(`Patches`).generateReplacementPatches_(n[Qw].base_,e,t.patches_,t.inversePatches_)):e=AT(t,n,[]),TT(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===Xw?void 0:e}function AT(e,t,n){if(vT(t))return t;let r=e.immer_.shouldUseStrictIteration(),i=t[Qw];if(!i)return oT(t,(r,a)=>jT(e,i,t,r,a,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return MT(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;let t=i.copy_,a=t,o=!1;i.type_===3&&(a=new Set(t),t.clear(),o=!0),oT(a,(r,a)=>jT(e,i,t,r,a,n,o),r),MT(e,t,!1),n&&e.patches_&&bT(`Patches`).generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function jT(e,t,n,r,i,a,o){if(i==null||typeof i!=`object`&&!o)return;let s=vT(i);if(!(s&&!o)){if(tT(i)){let o=AT(e,i,a&&t&&t.type_!==3&&!cT(t.assigned_,r)?a.concat(r):void 0);if(lT(n,r,o),tT(o))e.canAutoFreeze_=!1;else return}else o&&n.add(i);if(nT(i)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&s)return;AT(e,i),(!t||!t.scope_.parent_)&&typeof r!=`symbol`&&(dT(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&MT(e,i)}}}function MT(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&hT(t,n)}function NT(e,t){let n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:ST(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},i=r,a=PT;n&&(i=[r],a=FT);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,s}var PT={get(e,t){if(t===Qw)return e;let n=pT(e);if(!cT(n,t))return LT(e,n,t);let r=n[t];return e.finalized_||!nT(r)?r:r===IT(e.base_,t)?(BT(e),e.copy_[t]=HT(r,e)):r},has(e,t){return t in pT(e)},ownKeys(e){return Reflect.ownKeys(pT(e))},set(e,t,n){let r=RT(pT(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=IT(pT(e),t),i=r?.[Qw];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(uT(n,r)&&(n!==void 0||cT(e.base_,t)))return!0;BT(e),zT(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_[t]=!0,!0)},deleteProperty(e,t){return IT(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,BT(e),zT(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=pT(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!==`length`,enumerable:r.enumerable,value:n[t]}},defineProperty(){$w(11)},getPrototypeOf(e){return eT(e.base_)},setPrototypeOf(){$w(12)}},FT={};oT(PT,(e,t)=>{FT[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),FT.deleteProperty=function(e,t){return FT.set.call(this,e,t,void 0)},FT.set=function(e,t,n){return PT.set.call(this,e[0],t,n,e[0])};function IT(e,t){let n=e[Qw];return(n?pT(n):e)[t]}function LT(e,t,n){let r=RT(t,n);return r?`value`in r?r.value:r.get?.call(e.draft_):void 0}function RT(e,t){if(!(t in e))return;let n=eT(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=eT(n)}}function zT(e){e.modified_||(e.modified_=!0,e.parent_&&zT(e.parent_))}function BT(e){e.copy_||=mT(e.base_,e.scope_.immer_.useStrictShallowCopy_)}var VT=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,n)=>{if(typeof e==`function`&&typeof t!=`function`){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}typeof t!=`function`&&$w(6),n!==void 0&&typeof n!=`function`&&$w(7);let r;if(nT(e)){let i=DT(this),a=HT(e,void 0),o=!0;try{r=t(a),o=!1}finally{o?TT(i):ET(i)}return wT(i,n),kT(r,i)}else if(!e||typeof e!=`object`){if(r=t(e),r===void 0&&(r=e),r===Xw&&(r=void 0),this.autoFreeze_&&hT(r,!0),n){let t=[],i=[];bT(`Patches`).generateReplacementPatches_(e,r,t,i),n(t,i)}return r}else $w(1,e)},this.produceWithPatches=(e,t)=>{if(typeof e==`function`)return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},typeof e?.autoFreeze==`boolean`&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy==`boolean`&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration==`boolean`&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){nT(e)||$w(8),tT(e)&&(e=UT(e));let t=DT(this),n=HT(e,void 0);return n[Qw].isManual_=!0,ET(t),n}finishDraft(e,t){let n=e&&e[Qw];(!n||!n.isManual_)&&$w(9);let{scope_:r}=n;return wT(r,t),kT(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=bT(`Patches`).applyPatches_;return tT(e)?r(e,t):this.produce(e,e=>r(e,t))}};function HT(e,t){let n=dT(e)?bT(`MapSet`).proxyMap_(e,t):fT(e)?bT(`MapSet`).proxySet_(e,t):NT(e,t);return(t?t.scope_:ST()).drafts_.push(n),n}function UT(e){return tT(e)||$w(10,e),WT(e)}function WT(e){if(!nT(e)||vT(e))return e;let t=e[Qw],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=mT(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=mT(e,!0);return oT(n,(e,t)=>{lT(n,e,WT(t))},r),t&&(t.finalized_=!1),n}new VT().produce;function GT(e){return e}function KT(){return KT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KT.apply(null,arguments)}typeof window<`u`&&window.document&&window.document.createElement&&window.setTimeout;function qT(){return qT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qT.apply(null,arguments)}function JT(){return JT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JT.apply(null,arguments)}function YT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function XT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?YT(Object(n),!0).forEach(function(t){ZT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ZT(e,t,n){return(t=QT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QT(e){var t=$T(e,`string`);return typeof t==`symbol`?t:t+``}function $T(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var eE=(e,t)=>Object.keys(t).reduce((n,r)=>XT(XT({},n),{},{[r]:e(r,t[r])}),{});function tE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?tE(Object(n),!0).forEach(function(t){rE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rE(e,t,n){return(t=iE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iE(e){var t=aE(e,`string`);return typeof t==`symbol`?t:t+``}function aE(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var oE=(e,t,n)=>e+(t-e)*n,sE=e=>{var{from:t,to:n}=e;return t!==n},cE=(e,t,n)=>{var r=eE((t,n)=>{if(sE(n)){var[r,i]=e(n.from,n.to,n.velocity);return nE(nE({},n),{},{from:r,velocity:i})}return n},t);return n<1?eE((e,t)=>sE(t)&&r[e]!=null?nE(nE({},t),{},{velocity:oE(t.velocity,r[e].velocity,n),from:oE(t.from,r[e].from,n)}):t,t):cE(e,r,n-1)};function lE(){return lE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lE.apply(null,arguments)}Math.PI/180;var uE=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0,width:0,height:0,brushBottom:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2};function dE(){return dE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dE.apply(null,arguments)}var fE=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Mx();function n(e){return t.isSymbol(e)?NaN:Number(e)}e.toNumber=n})),pE=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=fE();function n(e){return e?(e=t.toNumber(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}e.toFinite=n})),mE=o((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Ix(),n=pE();function r(e,r,i){i&&typeof i!=`number`&&t.isIterateeCall(e,r,i)&&(r=i=void 0),e=n.toFinite(e),r===void 0?(r=e,e=0):r=n.toFinite(r),i=i===void 0?e<r?1:-1:n.toFinite(i);let a=Math.max(Math.ceil((r-e)/(i||1)),0),o=Array(a);for(let t=0;t<a;t++)o[t]=e,e+=i;return o}e.range=r})),hE=o(((e,t)=>{t.exports=mE().range})),gE=e=>e.chartData,_E=K([gE],e=>{var t=e.chartData==null?0:e.chartData.length-1;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),vE=(e,t,n,r)=>r?_E(e):gE(e),yE=K([vE],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t==null?[]:t.slice(n,r+1)});K([_E],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t==null?[]:t.slice(n,r+1)});var bE=K([gE],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t==null?[]:t.slice(n,r+1)});function xE(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(zC(t)&&zC(n))return!0}return!1}function SE(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function CE(e,t){if(t&&typeof e!=`function`&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,a;if(zC(n))i=n;else if(typeof n==`function`)return;if(zC(r))a=r;else if(typeof r==`function`)return;var o=[i,a];if(xE(o))return o}}function wE(e,t,n){if(!(!n&&t==null)){if(typeof e==`function`&&t!=null)try{var r=e(t,n);if(xE(r))return SE(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,a]=e,o,s;if(i===`auto`)t!=null&&(o=Math.min(...t));else if(Ob(i))o=i;else if(typeof i==`function`)try{t!=null&&(o=i(t?.[0]))}catch{}else if(typeof i==`string`&&ew.test(i)){var c=ew.exec(i);if(c==null||c[1]==null||t==null)o=void 0;else{var l=+c[1];o=t[0]-l}}else o=t?.[0];if(a===`auto`)t!=null&&(s=Math.max(...t));else if(Ob(a))s=a;else if(typeof a==`function`)try{t!=null&&(s=a(t?.[1]))}catch{}else if(typeof a==`string`&&tw.test(a)){var u=tw.exec(a);if(u==null||u[1]==null||t==null)s=void 0;else{var d=+u[1];s=t[1]+d}}else s=t?.[1];var f=[o,s];if(xE(f))return t==null?f:SE(f,t,n)}}}var TE=l(o(((e,t)=>{(function(e){var n=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:`2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286`},i=!0,a=`[DecimalError] `,o=a+`Invalid argument: `,s=a+`Exponent out of range: `,c=Math.floor,l=Math.pow,u=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,d,f=1e7,p=7,m=9007199254740991,h=c(m/p),g={};g.absoluteValue=g.abs=function(){var e=new this.constructor(this);return e.s&&=1,e},g.comparedTo=g.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*p;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n},g.dividedBy=g.div=function(e){return b(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this,n=t.constructor;return D(b(t,new n(e),0,1),n.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return S(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return this.s===0},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n=this,r=n.constructor,o=r.precision,s=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(d))throw Error(a+`NaN`);if(n.s<1)throw Error(a+(n.s?`NaN`:`-Infinity`));return n.eq(d)?new r(0):(i=!1,t=b(T(n,s),T(e,s),s),i=!0,D(t,o))},g.minus=g.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?O(t,e):_(t,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(a+`NaN`);return n.s?(i=!1,t=b(n,e,0,1).times(e),i=!0,n.minus(t)):D(new r(n),o)},g.naturalExponential=g.exp=function(){return x(this)},g.naturalLogarithm=g.ln=function(){return T(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_(t,e):O(t,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(o+e);if(t=S(i)+1,r=i.d.length-1,n=r*p+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},g.squareRoot=g.sqrt=function(){var e,t,n,r,o,s,l,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(a+`NaN`)}for(e=S(u),i=!1,o=Math.sqrt(+u),o==0||o==1/0?(t=y(u.d),(t.length+e)%2==0&&(t+=`0`),o=Math.sqrt(t),e=c((e+1)/2)-(e<0||e%2),o==1/0?t=`5e`+e:(t=o.toExponential(),t=t.slice(0,t.indexOf(`e`)+1)+e),r=new d(t)):r=new d(o.toString()),n=d.precision,o=l=n+3;;)if(s=r,r=s.plus(b(u,s,l+2)).times(.5),y(s.d).slice(0,l)===(t=y(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),o==l&&t==`4999`){if(D(s,n+1,0),s.times(s).eq(u)){r=s;break}}else if(t!=`9999`)break;l+=4}return i=!0,D(r,n)},g.times=g.mul=function(e){var t,n,r,a,o,s,c,l,u,d=this,p=d.constructor,m=d.d,h=(e=new p(e)).d;if(!d.s||!e.s)return new p(0);for(e.s*=d.s,n=d.e+e.e,l=m.length,u=h.length,l<u&&(o=m,m=h,h=o,s=l,l=u,u=s),o=[],s=l+u,r=s;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,a=l+r;a>r;)c=o[a]+h[r]*m[a-r-1]+t,o[a--]=c%f|0,t=c/f|0;o[a]=(o[a]+t)%f|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,i?D(e,p.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(v(e,0,n),t===void 0?t=i.rounding:v(t,0,8),D(r,e+S(r)+1,t))},g.toExponential=function(e,t){var r,i=this,a=i.constructor;return e===void 0?r=k(i,!0):(v(e,0,n),t===void 0?t=a.rounding:v(t,0,8),i=D(new a(i),e+1,t),r=k(i,!0,e+1)),r},g.toFixed=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?k(a):(v(e,0,n),t===void 0?t=o.rounding:v(t,0,8),i=D(new o(a),e+S(a)+1,t),r=k(i.abs(),!1,e+S(i)+1),a.isneg()&&!a.isZero()?`-`+r:r)},g.toInteger=g.toint=function(){var e=this,t=e.constructor;return D(new t(e),S(e)+1,t.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,n,r,o,s,l,u=this,f=u.constructor,h=12,g=+(e=new f(e));if(!e.s)return new f(d);if(u=new f(u),!u.s){if(e.s<1)throw Error(a+`Infinity`);return u}if(u.eq(d))return u;if(r=f.precision,e.eq(d))return D(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,s=u.s,!l){if(s<0)throw Error(a+`NaN`)}else if((n=g<0?-g:g)<=m){for(o=new f(d),t=Math.ceil(r/p+4),i=!1;n%2&&(o=o.times(u),A(o.d,t)),n=c(n/2),n!==0;)u=u.times(u),A(u.d,t);return i=!0,e.s<0?new f(d).div(o):D(o,r)}return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,i=!1,o=e.times(T(u,r+h)),i=!0,o=x(o),o.s=s,o},g.toPrecision=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?(r=S(a),i=k(a,r<=o.toExpNeg||r>=o.toExpPos)):(v(e,1,n),t===void 0?t=o.rounding:v(t,0,8),a=D(new o(a),e,t),r=S(a),i=k(a,e<=r||r<=o.toExpNeg,e)),i},g.toSignificantDigits=g.tosd=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(v(e,1,n),t===void 0?t=i.rounding:v(t,0,8)),D(new i(r),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=this,t=S(e),n=e.constructor;return k(e,t<=n.toExpNeg||t>=n.toExpPos)};function _(e,t){var n,r,a,o,s,c,l,u,d=e.constructor,m=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),i?D(t,m):t;if(l=e.d,u=t.d,s=e.e,a=t.e,l=l.slice(),o=s-a,o){for(o<0?(r=l,o=-o,c=u.length):(r=u,a=s,c=l.length),s=Math.ceil(m/p),c=s>c?s+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=l.length,o=u.length,c-o<0&&(o=c,r=u,u=l,l=r),n=0;o;)n=(l[--o]=l[o]+u[o]+n)/f|0,l[o]%=f;for(n&&(l.unshift(n),++a),c=l.length;l[--c]==0;)l.pop();return t.d=l,t.e=a,i?D(t,m):t}function v(e,t,n){if(e!==~~e||e<t||e>n)throw Error(o+e)}function y(e){var t,n,r,i=e.length-1,a=``,o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+``,n=p-r.length,n&&(a+=w(n)),a+=r;o=e[t],r=o+``,n=p-r.length,n&&(a+=w(n))}else if(o===0)return`0`;for(;o%10==0;)o/=10;return a+o}var b=(function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%f|0,r=n/f|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*f+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,s){var c,l,u,d,m,h,g,_,v,y,b,x,C,w,T,E,O,k,A=r.constructor,j=r.s==i.s?1:-1,M=r.d,N=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(a+`Division by zero`);for(l=r.e-i.e,O=N.length,T=M.length,g=new A(j),_=g.d=[],u=0;N[u]==(M[u]||0);)++u;if(N[u]>(M[u]||0)&&--l,x=o==null?o=A.precision:s?o+(S(r)-S(i))+1:o,x<0)return new A(0);if(x=x/p+2|0,u=0,O==1)for(d=0,N=N[0],x++;(u<T||d)&&x--;u++)C=d*f+(M[u]||0),_[u]=C/N|0,d=C%N|0;else{for(d=f/(N[0]+1)|0,d>1&&(N=e(N,d),M=e(M,d),O=N.length,T=M.length),w=O,v=M.slice(0,O),y=v.length;y<O;)v[y++]=0;k=N.slice(),k.unshift(0),E=N[0],N[1]>=f/2&&++E;do d=0,c=t(N,v,O,y),c<0?(b=v[0],O!=y&&(b=b*f+(v[1]||0)),d=b/E|0,d>1?(d>=f&&(d=f-1),m=e(N,d),h=m.length,y=v.length,c=t(m,v,h,y),c==1&&(d--,n(m,O<h?k:N,h))):(d==0&&(c=d=1),m=N.slice()),h=m.length,h<y&&m.unshift(0),n(v,m,y),c==-1&&(y=v.length,c=t(N,v,O,y),c<1&&(d++,n(v,O<y?k:N,y))),y=v.length):c===0&&(d++,v=[0]),_[u++]=d,c&&v[0]?v[y++]=M[w]||0:(v=[M[w]],y=1);while((w++<T||v[0]!==void 0)&&x--)}return _[0]||_.shift(),g.e=l,D(g,s?o+S(g)+1:o)}})();function x(e,t){var n,r,a,o,c,u,f=0,p=0,m=e.constructor,h=m.precision;if(S(e)>16)throw Error(s+S(e));if(!e.s)return new m(d);for(t==null?(i=!1,u=h):u=t,c=new m(.03125);e.abs().gte(.1);)e=e.times(c),p+=5;for(r=Math.log(l(2,p))/Math.LN10*2+5|0,u+=r,n=a=o=new m(d),m.precision=u;;){if(a=D(a.times(e),u),n=n.times(++f),c=o.plus(b(a,n,u)),y(c.d).slice(0,u)===y(o.d).slice(0,u)){for(;p--;)o=D(o.times(o),u);return m.precision=h,t==null?(i=!0,D(o,h)):o}o=c}}function S(e){for(var t=e.e*p,n=e.d[0];n>=10;n/=10)t++;return t}function C(e,t,n){if(t>e.LN10.sd())throw i=!0,n&&(e.precision=n),Error(a+`LN10 precision limit exceeded`);return D(new e(e.LN10),t)}function w(e){for(var t=``;e--;)t+=`0`;return t}function T(e,t){var n,r,o,s,c,l,u,f,p,m=1,h=10,g=e,_=g.d,v=g.constructor,x=v.precision;if(g.s<1)throw Error(a+(g.s?`NaN`:`-Infinity`));if(g.eq(d))return new v(0);if(t==null?(i=!1,f=x):f=t,g.eq(10))return t??(i=!0),C(v,f);if(f+=h,v.precision=f,n=y(_),r=n.charAt(0),s=S(g),Math.abs(s)<0x5543df729c000){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=y(g.d),r=n.charAt(0),m++;s=S(g),r>1?(g=new v(`0.`+n),s++):g=new v(r+`.`+n.slice(1))}else return u=C(v,f+2,x).times(s+``),g=T(new v(r+`.`+n.slice(1)),f-h).plus(u),v.precision=x,t==null?(i=!0,D(g,x)):g;for(l=c=g=b(g.minus(d),g.plus(d),f),p=D(g.times(g),f),o=3;;){if(c=D(c.times(p),f),u=l.plus(b(c,new v(o),f)),y(u.d).slice(0,f)===y(l.d).slice(0,f))return l=l.times(2),s!==0&&(l=l.plus(C(v,f+2,x).times(s+``))),l=b(l,new v(m),f),v.precision=x,t==null?(i=!0,D(l,x)):l;l=u,o+=2}}function E(e,t){var n,r,a;for((n=t.indexOf(`.`))>-1&&(t=t.replace(`.`,``)),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=c(n/p),e.d=[],r=(n+1)%p,n<0&&(r+=p),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=p;r<a;)e.d.push(+t.slice(r,r+=p));t=t.slice(r),r=p-t.length}else r-=a;for(;r--;)t+=`0`;if(e.d.push(+t),i&&(e.e>h||e.e<-h))throw Error(s+n)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,n){var r,a,o,u,d,m,g,_,v=e.d;for(u=1,o=v[0];o>=10;o/=10)u++;if(r=t-u,r<0)r+=p,a=t,g=v[_=0];else{if(_=Math.ceil((r+1)/p),o=v.length,_>=o)return e;for(g=o=v[_],u=1;o>=10;o/=10)u++;r%=p,a=r-p+u}if(n!==void 0&&(o=l(10,u-a-1),d=g/o%10|0,m=t<0||v[_+1]!==void 0||g%o,m=n<4?(d||m)&&(n==0||n==(e.s<0?3:2)):d>5||d==5&&(n==4||m||n==6&&(r>0?a>0?g/l(10,u-a):0:v[_-1])%10&1||n==(e.s<0?8:7))),t<1||!v[0])return m?(o=S(e),v.length=1,t=t-o-1,v[0]=l(10,(p-t%p)%p),e.e=c(-t/p)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(r==0?(v.length=_,o=1,_--):(v.length=_+1,o=l(10,p-r),v[_]=a>0?(g/l(10,u-a)%l(10,a)|0)*o:0),m)for(;;)if(_==0){(v[0]+=o)==f&&(v[0]=1,++e.e);break}else{if(v[_]+=o,v[_]!=f)break;v[_--]=0,o=1}for(r=v.length;v[--r]===0;)v.pop();if(i&&(e.e>h||e.e<-h))throw Error(s+S(e));return e}function O(e,t){var n,r,a,o,s,c,l,u,d,m,h=e.constructor,g=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),i?D(t,g):t;if(l=e.d,m=t.d,r=t.e,u=e.e,l=l.slice(),s=u-r,s){for(d=s<0,d?(n=l,s=-s,c=m.length):(n=m,r=u,c=l.length),a=Math.max(Math.ceil(g/p),c)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,c=m.length,d=a<c,d&&(c=a),a=0;a<c;a++)if(l[a]!=m[a]){d=l[a]<m[a];break}s=0}for(d&&(n=l,l=m,m=n,t.s=-t.s),c=l.length,a=m.length-c;a>0;--a)l[c++]=0;for(a=m.length;a>s;){if(l[--a]<m[a]){for(o=a;o&&l[--o]===0;)l[o]=f-1;--l[o],l[a]+=f}l[a]-=m[a]}for(;l[--c]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,i?D(t,g):t):new h(0)}function k(e,t,n){var r,i=S(e),a=y(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+`.`+a.slice(1)+w(r):o>1&&(a=a.charAt(0)+`.`+a.slice(1)),a=a+(i<0?`e`:`e+`)+i):i<0?(a=`0.`+w(-i-1)+a,n&&(r=n-o)>0&&(a+=w(r))):i>=o?(a+=w(i+1-o),n&&(r=n-i-1)>0&&(a=a+`.`+w(r))):((r=i+1)<o&&(a=a.slice(0,r)+`.`+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+=`.`),a+=w(r))),e.s<0?`-`+a:a}function A(e,t){if(e.length>t)return e.length=t,!0}function j(e){var t,n,r;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i){t.s=e.s,t.e=e.e,t.d=(e=e.d)?e.slice():e;return}if(typeof e==`number`){if(e*0!=0)throw Error(o+e);if(e>0)t.s=1;else if(e<0)e=-e,t.s=-1;else{t.s=0,t.e=0,t.d=[0];return}if(e===~~e&&e<1e7){t.e=0,t.d=[e];return}return E(t,e.toString())}else if(typeof e!=`string`)throw Error(o+e);if(e.charCodeAt(0)===45?(e=e.slice(1),t.s=-1):t.s=1,u.test(e))E(t,e);else throw Error(o+e)}if(i.prototype=g,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=j,i.config=i.set=M,e===void 0&&(e={}),e)for(r=[`precision`,`rounding`,`toExpNeg`,`toExpPos`,`LN10`],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function M(e){if(!e||typeof e!=`object`)throw Error(a+`Object expected`);var t,r,i,s=[`precision`,1,n,`rounding`,0,8,`toExpNeg`,-1/0,0,`toExpPos`,0,1/0];for(t=0;t<s.length;t+=3)if((i=e[r=s[t]])!==void 0)if(c(i)===i&&i>=s[t+1]&&i<=s[t+2])this[r]=i;else throw Error(o+r+`: `+i);if((i=e[r=`LN10`])!==void 0)if(i==Math.LN10)this[r]=new this(i);else throw Error(o+r+`: `+i);return this}r=j(r),r.default=r.Decimal=r,d=new r(1),typeof define==`function`&&define.amd?define(function(){return r}):t!==void 0&&t.exports?t.exports=r:(e||=typeof self<`u`&&self&&self.self==self?self:Function(`return this`)(),e.Decimal=r)})(e)}))());function EE(e){return e===0?1:Math.floor(new TE.default(e).abs().log(10).toNumber())+1}function DE(e,t,n){for(var r=new TE.default(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var OE=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},kE=(e,t,n)=>{if(e.lte(0))return new TE.default(0);var r=EE(e.toNumber()),i=new TE.default(10).pow(r),a=e.div(i),o=r===1?.1:.05,s=new TE.default(Math.ceil(a.div(o).toNumber())).add(n).mul(o).mul(i);return t?new TE.default(s.toNumber()):new TE.default(Math.ceil(s.toNumber()))},AE=(e,t,n)=>{if(e.lte(0))return new TE.default(0);var r=[1,2,2.5,5],i=e.toNumber(),a=Math.floor(new TE.default(i).abs().log(10).toNumber()),o=new TE.default(10).pow(a),s=e.div(o).toNumber(),c=r.findIndex(e=>e>=s-1e-10);if(c===-1&&(o=o.mul(10),c=0),c+=n,c>=r.length){var l=Math.floor(c/r.length);c%=r.length,o=o.mul(new TE.default(10).pow(l))}var u=new TE.default(r[c]??1).mul(o);return t?u:new TE.default(Math.ceil(u.toNumber()))},jE=(e,t,n)=>{var r=new TE.default(1),i=new TE.default(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new TE.default(10).pow(EE(e)-1),i=new TE.default(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new TE.default(Math.floor(e)))}else e===0?i=new TE.default(Math.floor((t-1)/2)):n||(i=new TE.default(Math.floor(e)));for(var o=Math.floor((t-1)/2),s=[],c=0;c<t;c++)s.push(i.add(new TE.default(c-o).mul(r)).toNumber());return s},ME=function(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:kE;if(!Number.isFinite((t-e)/(n-1)))return{step:new TE.default(0),tickMin:new TE.default(0),tickMax:new TE.default(0)};var o=a(new TE.default(t).sub(e).div(n-1),r,i),s;e<=0&&t>=0?s=new TE.default(0):(s=new TE.default(e).add(t).div(2),s=s.sub(new TE.default(s).mod(o)));var c=Math.ceil(s.sub(e).div(o).toNumber()),l=Math.ceil(new TE.default(t).sub(s).div(o).toNumber()),u=c+l+1;return u>n?ME(e,t,n,r,i+1,a):(u<n&&(l=t>0?l+(n-u):l,c=t>0?c:c+(n-u)),{step:o,tickMin:s.sub(new TE.default(c).mul(o)),tickMax:s.add(new TE.default(l).mul(o))})},NE=function(e){var[t,n]=e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`auto`,o=Math.max(r,2),[s,c]=OE([t,n]);if(s===-1/0||c===1/0){var l=c===1/0?[s,...Array(r-1).fill(1/0)]:[...Array(r-1).fill(-1/0),c];return t>n?l.reverse():l}if(s===c)return jE(s,r,i);var{step:u,tickMin:d,tickMax:f}=ME(s,c,o,i,0,a===`snap125`?AE:kE),p=DE(d,f.add(new TE.default(.1).mul(u)),u);return t>n?p.reverse():p},PE=function(e,t){var[n,r]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`auto`,[o,s]=OE([n,r]);if(o===-1/0||s===1/0)return[n,r];if(o===s)return[o];var c=a===`snap125`?AE:kE,l=Math.max(t,2),u=c(new TE.default(s).sub(o).div(l-1),i,0),d=[...DE(new TE.default(o),new TE.default(s),u),s];return i===!1&&(d=d.map(e=>Math.round(e))),n>r?d.reverse():d},FE=e=>e.rootProps.barCategoryGap,IE=e=>e.rootProps.stackOffset,LE=e=>e.rootProps.reverseStackOrder,RE=e=>e.options.chartName,zE={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},BE={allowDecimals:!1,allowDuplicatedCategory:!0,allowDataOverflow:!1,angle:0,angleAxisId:0,axisLine:!0,axisLineType:`polygon`,cx:0,cy:0,hide:!1,includeHidden:!1,label:!1,niceTicks:`auto`,orientation:`outer`,reversed:!1,scale:`auto`,tick:!0,tickLine:!0,tickSize:8,type:`auto`,zIndex:zE.axis},VE={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,angle:0,axisLine:!0,includeHidden:!1,hide:!1,niceTicks:`auto`,label:!1,orientation:`right`,radiusAxisId:0,reversed:!1,scale:`auto`,stroke:`#ccc`,tick:!0,tickCount:5,tickLine:!0,type:`auto`,zIndex:zE.axis},HE=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function UE(e,t,n){if(n!==`auto`)return n;if(e!=null)return JC(e,t)?`category`:`number`}function WE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?WE(Object(n),!0).forEach(function(t){KE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function KE(e,t,n){return(t=qE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qE(e){var t=JE(e,`string`);return typeof t==`symbol`?t:t+``}function JE(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var YE={allowDataOverflow:BE.allowDataOverflow,allowDecimals:BE.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:BE.angleAxisId,includeHidden:!1,name:void 0,reversed:BE.reversed,scale:BE.scale,tick:BE.tick,tickCount:void 0,ticks:void 0,type:BE.type,unit:void 0,niceTicks:`auto`},XE={allowDataOverflow:VE.allowDataOverflow,allowDecimals:VE.allowDecimals,allowDuplicatedCategory:VE.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:VE.radiusAxisId,includeHidden:VE.includeHidden,name:void 0,reversed:VE.reversed,scale:VE.scale,tick:VE.tick,tickCount:VE.tickCount,ticks:void 0,type:VE.type,unit:void 0,niceTicks:`auto`},ZE=K([(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},Yw],(e,t)=>{if(e!=null)return e;var n=UE(t,`angleAxis`,YE.type)??`category`;return GE(GE({},YE),{},{type:n})}),QE=K([(e,t)=>e.polarAxis.radiusAxis[t],Yw],(e,t)=>{if(e!=null)return e;var n=UE(t,`radiusAxis`,XE.type)??`category`;return GE(GE({},XE),{},{type:n})}),$E=e=>e.polarOptions,eD=K([rw,iw,vw],uE),tD=K([$E,eD],(e,t)=>{if(e!=null)return Ab(e.innerRadius,t,0)}),nD=K([$E,eD],(e,t)=>{if(e!=null)return Ab(e.outerRadius,t,t*.8)}),rD=K([$E],e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]});K([ZE,rD],HE);var iD=K([eD,tD,nD],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});K([QE,iD],HE),K([Jw,$E,tD,nD,rw,iw],(e,t,n,r,i,a)=>{if(!(e!==`centric`&&e!==`radial`||t==null||n==null||r==null)){var{cx:o,cy:s,startAngle:c,endAngle:l}=t;return{cx:Ab(o,i,i/2),cy:Ab(s,a,a/2),innerRadius:n,outerRadius:r,startAngle:c,endAngle:l,clockWise:!1}}});var aD=(e,t)=>t,oD=(e,t,n)=>n;function sD(e){return e?.id}function cD(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:a}=n,o=new Map;return e.forEach(e=>{var t=e.data??r;if(!(t==null||t.length===0)){var n=sD(e);t.forEach((t,r)=>{var s=a==null||i?r:String(KC(t,a,null)),c=KC(t,e.dataKey,0),l=o.has(s)?o.get(s):{};Object.assign(l,{[n]:c}),o.set(s,l)})}}),Array.from(o.values())}function lD(e){return`stackId`in e&&e.stackId!=null&&e.dataKey!=null}var uD=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function dD(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function fD(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var pD=e=>{var t=Jw(e);return t===`horizontal`?`xAxis`:t===`vertical`?`yAxis`:t===`centric`?`angleAxis`:`radiusAxis`},mD=e=>e.tooltip.settings.axisId;function hD(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),i=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(e){var t=i[0],n=i[1];return t<=n?e>=t&&e<=n:e>=n&&e<=t},bandwidth:n?()=>n.call(e):void 0,ticks:t?n=>t.call(e,n):void 0,map:(t,n)=>{var r=e(t);if(r!=null){if(e.bandwidth&&n!=null&&n.position){var i=e.bandwidth();switch(n.position){case`middle`:r+=i/2;break;case`end`:r+=i;break;default:break}}return r}}}}}var gD=(e,t)=>{if(t!=null)switch(e){case`linear`:if(!xE(t)){for(var n,r,i=0;i<t.length;i++){var a=t[i];zC(a)&&((n===void 0||a<n)&&(n=a),(r===void 0||a>r)&&(r=a))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t;default:return t}};function _D(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function vD(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function yD(e){let t,n,r;e.length===2?(t=e===_D||e===vD?e:bD,n=e,r=e):(t=_D,n=(t,n)=>_D(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function bD(){return 0}function xD(e){return e===null?NaN:+e}function*SD(e,t){if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}var CD=yD(_D),wD=CD.right;CD.left,yD(xD).center;var TD=class extends Map{constructor(e,t=kD){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(ED(this,e))}has(e){return super.has(ED(this,e))}set(e,t){return super.set(DD(this,e),t)}delete(e){return super.delete(OD(this,e))}};function ED({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function DD({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function OD({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function kD(e){return typeof e==`object`&&e?e.valueOf():e}function AD(e=_D){if(e===_D)return jD;if(typeof e!=`function`)throw TypeError(`compare is not a function`);return(t,n)=>{let r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function jD(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var MD=Math.sqrt(50),ND=Math.sqrt(10),PD=Math.sqrt(2);function FD(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=MD?10:a>=ND?5:a>=PD?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?FD(e,t,n*2):[s,c,l]}function ID(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?FD(t,e,n):FD(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function LD(e,t,n){return t=+t,e=+e,n=+n,FD(e,t,n)[2]}function RD(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?LD(t,e,n):LD(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function zD(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function BD(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function VD(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?jD:AD(i);r>n;){if(r-n>600){let a=r-n+1,o=t-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1),u=Math.max(n,Math.floor(t-o*c/a+l)),d=Math.min(r,Math.floor(t+(a-o)*c/a+l));VD(e,t,u,d,i)}let a=e[t],o=n,s=r;for(HD(e,n,t),i(e[r],a)>0&&HD(e,n,r);o<s;){for(HD(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?HD(e,n,s):(++s,HD(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function HD(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function UD(e,t,n){if(e=Float64Array.from(SD(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return BD(e);if(t>=1)return zD(e);var r,i=(r-1)*t,a=Math.floor(i),o=zD(VD(e,a).subarray(0,a+1));return o+(BD(e.subarray(a+1))-o)*(i-a)}}function WD(e,t,n=xD){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function GD(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function KD(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function qD(e,t){switch(arguments.length){case 0:break;case 1:typeof e==`function`?this.interpolator(e):this.range(e);break;default:this.domain(e),typeof t==`function`?this.interpolator(t):this.range(t);break}return this}var JD=Symbol(`implicit`);function YD(){var e=new TD,t=[],n=[],r=JD;function i(i){let a=e.get(i);if(a===void 0){if(r!==JD)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new TD;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return YD(t,n).unknown(r)},KD.apply(i,arguments),i}function XD(){var e=YD().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=GD(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return XD(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},KD.apply(d(),arguments)}function ZD(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return ZD(t())},e}function QD(){return ZD(XD.apply(null,arguments).paddingInner(1))}function $D(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function eO(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function tO(){}var nO=.7,rO=1/nO,iO=`\\s*([+-]?\\d+)\\s*`,aO=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,oO=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,sO=/^#([0-9a-f]{3,8})$/,cO=RegExp(`^rgb\\(${iO},${iO},${iO}\\)$`),lO=RegExp(`^rgb\\(${oO},${oO},${oO}\\)$`),uO=RegExp(`^rgba\\(${iO},${iO},${iO},${aO}\\)$`),dO=RegExp(`^rgba\\(${oO},${oO},${oO},${aO}\\)$`),fO=RegExp(`^hsl\\(${aO},${oO},${oO}\\)$`),pO=RegExp(`^hsla\\(${aO},${oO},${oO},${aO}\\)$`),mO={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};$D(tO,yO,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:hO,formatHex:hO,formatHex8:gO,formatHsl:_O,formatRgb:vO,toString:vO});function hO(){return this.rgb().formatHex()}function gO(){return this.rgb().formatHex8()}function _O(){return MO(this).formatHsl()}function vO(){return this.rgb().formatRgb()}function yO(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=sO.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?bO(t):n===3?new wO(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?xO(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?xO(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=cO.exec(e))?new wO(t[1],t[2],t[3],1):(t=lO.exec(e))?new wO(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=uO.exec(e))?xO(t[1],t[2],t[3],t[4]):(t=dO.exec(e))?xO(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=fO.exec(e))?jO(t[1],t[2]/100,t[3]/100,1):(t=pO.exec(e))?jO(t[1],t[2]/100,t[3]/100,t[4]):mO.hasOwnProperty(e)?bO(mO[e]):e===`transparent`?new wO(NaN,NaN,NaN,0):null}function bO(e){return new wO(e>>16&255,e>>8&255,e&255,1)}function xO(e,t,n,r){return r<=0&&(e=t=n=NaN),new wO(e,t,n,r)}function SO(e){return e instanceof tO||(e=yO(e)),e?(e=e.rgb(),new wO(e.r,e.g,e.b,e.opacity)):new wO}function CO(e,t,n,r){return arguments.length===1?SO(e):new wO(e,t,n,r??1)}function wO(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}$D(wO,CO,eO(tO,{brighter(e){return e=e==null?rO:rO**+e,new wO(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?nO:nO**+e,new wO(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new wO(kO(this.r),kO(this.g),kO(this.b),OO(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:TO,formatHex:TO,formatHex8:EO,formatRgb:DO,toString:DO}));function TO(){return`#${AO(this.r)}${AO(this.g)}${AO(this.b)}`}function EO(){return`#${AO(this.r)}${AO(this.g)}${AO(this.b)}${AO((isNaN(this.opacity)?1:this.opacity)*255)}`}function DO(){let e=OO(this.opacity);return`${e===1?`rgb(`:`rgba(`}${kO(this.r)}, ${kO(this.g)}, ${kO(this.b)}${e===1?`)`:`, ${e})`}`}function OO(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function kO(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function AO(e){return e=kO(e),(e<16?`0`:``)+e.toString(16)}function jO(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new PO(e,t,n,r)}function MO(e){if(e instanceof PO)return new PO(e.h,e.s,e.l,e.opacity);if(e instanceof tO||(e=yO(e)),!e)return new PO;if(e instanceof PO)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new PO(o,s,c,e.opacity)}function NO(e,t,n,r){return arguments.length===1?MO(e):new PO(e,t,n,r??1)}function PO(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}$D(PO,NO,eO(tO,{brighter(e){return e=e==null?rO:rO**+e,new PO(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?nO:nO**+e,new PO(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new wO(LO(e>=240?e-240:e+120,i,r),LO(e,i,r),LO(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new PO(FO(this.h),IO(this.s),IO(this.l),OO(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=OO(this.opacity);return`${e===1?`hsl(`:`hsla(`}${FO(this.h)}, ${IO(this.s)*100}%, ${IO(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function FO(e){return e=(e||0)%360,e<0?e+360:e}function IO(e){return Math.max(0,Math.min(1,e||0))}function LO(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var RO=e=>()=>e;function zO(e,t){return function(n){return e+n*t}}function BO(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function VO(e){return(e=+e)==1?HO:function(t,n){return n-t?BO(t,n,e):RO(isNaN(t)?n:t)}}function HO(e,t){var n=t-e;return n?zO(e,n):RO(isNaN(e)?t:e)}var UO=(function e(t){var n=VO(t);function r(e,t){var r=n((e=CO(e)).r,(t=CO(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=HO(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function WO(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function GO(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function KO(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=tk(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function qO(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function JO(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function YO(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=tk(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var XO=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ZO=new RegExp(XO.source,`g`);function QO(e){return function(){return e}}function $O(e){return function(t){return e(t)+``}}function ek(e,t){var n=XO.lastIndex=ZO.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=XO.exec(e))&&(i=ZO.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:JO(r,i)})),n=ZO.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?$O(c[0].x):QO(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function tk(e,t){var n=typeof t,r;return t==null||n===`boolean`?RO(t):(n===`number`?JO:n===`string`?(r=yO(t))?(t=r,UO):ek:t instanceof yO?UO:t instanceof Date?qO:GO(t)?WO:Array.isArray(t)?KO:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?YO:JO)(e,t)}function nk(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function rk(e,t){t===void 0&&(t=e,e=tk);for(var n=0,r=t.length-1,i=t[0],a=Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}function ik(e){return function(){return e}}function ak(e){return+e}var ok=[0,1];function sk(e){return e}function ck(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:ik(isNaN(t)?NaN:.5)}function lk(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function uk(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=ck(i,r),a=n(o,a)):(r=ck(r,i),a=n(a,o)),function(e){return a(r(e))}}function dk(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=ck(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=wD(e,t,1,r)-1;return a[n](i[n](t))}}function fk(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function pk(){var e=ok,t=ok,n=tk,r,i,a,o=sk,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==sk&&(o=lk(e[0],e[n-1])),s=n>2?dk:uk,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),JO))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,ak),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=nk,u()},d.clamp=function(e){return arguments.length?(o=e?!0:sk,u()):o!==sk},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function mk(){return pk()(sk,sk)}function hk(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function gk(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function _k(e){return e=gk(Math.abs(e)),e?e[1]:NaN}function vk(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function yk(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var bk=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function xk(e){if(!(t=bk.exec(e)))throw Error(`invalid format: `+e);var t;return new Sk({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}xk.prototype=Sk.prototype;function Sk(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}Sk.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function Ck(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var wk;function Tk(e,t){var n=gk(e,t);if(!n)return wk=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(wk=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+gk(e,Math.max(0,t+a-1))[0]}function Ek(e,t){var n=gk(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var Dk={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:hk,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Ek(e*100,t),r:Ek,s:Tk,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ok(e){return e}var kk=Array.prototype.map,Ak=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function jk(e){var t=e.grouping===void 0||e.thousands===void 0?Ok:vk(kk.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?Ok:yk(kk.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=xk(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):Dk[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=Dk[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=Ck(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&wk!==void 0?Ak[8+wk/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r;break}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(_k(t)/3)))*3,r=10**-n,i=l((e=xk(e),e.type=`f`,e),{suffix:Ak[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var Mk,Nk,Pk;Fk({thousands:`,`,grouping:[3],currency:[`$`,``]});function Fk(e){return Mk=jk(e),Nk=Mk.format,Pk=Mk.formatPrefix,Mk}function Ik(e){return Math.max(0,-_k(Math.abs(e)))}function Lk(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(_k(t)/3)))*3-_k(Math.abs(e)))}function Rk(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_k(t)-_k(e))+1}function zk(e,t,n,r){var i=RD(e,t,n),a;switch(r=xk(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Lk(i,o))&&(r.precision=a),Pk(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=Rk(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=Ik(i))&&(r.precision=a-(r.type===`%`)*2);break}return Nk(r)}function Bk(e){var t=e.domain;return e.ticks=function(e){var n=t();return ID(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return zk(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=LD(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function Vk(){var e=mk();return e.copy=function(){return fk(e,Vk())},KD.apply(e,arguments),Bk(e)}function Hk(e){var t;function n(e){return e==null||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,ak),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Hk(e).unknown(t)},e=arguments.length?Array.from(e,ak):[0,1],Bk(n)}function Uk(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function Wk(e){return Math.log(e)}function Gk(e){return Math.exp(e)}function Kk(e){return-Math.log(-e)}function qk(e){return-Math.exp(-e)}function Jk(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function Yk(e){return e===10?Jk:e===Math.E?Math.exp:t=>e**+t}function Xk(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Zk(e){return(t,n)=>-e(-t,n)}function Qk(e){let t=e(Wk,Gk),n=t.domain,r=10,i,a;function o(){return i=Xk(r),a=Yk(r),n()[0]<0?(i=Zk(i),a=Zk(a),e(Kk,qk)):e(Wk,Gk),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=ID(o,s,p))}else m=ID(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=xk(n)).precision==null&&(n.trim=!0),n=Nk(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(Uk(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function $k(){let e=Qk(pk()).domain([1,10]);return e.copy=()=>fk(e,$k()).base(e.base()),KD.apply(e,arguments),e}function eA(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function tA(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function nA(e){var t=1,n=e(eA(t),tA(t));return n.constant=function(n){return arguments.length?e(eA(t=+n),tA(t)):t},Bk(n)}function rA(){var e=nA(pk());return e.copy=function(){return fk(e,rA()).constant(e.constant())},KD.apply(e,arguments)}function iA(e){return function(t){return t<0?-((-t)**+e):t**+e}}function aA(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function oA(e){return e<0?-e*e:e*e}function sA(e){var t=e(sk,sk),n=1;function r(){return n===1?e(sk,sk):n===.5?e(aA,oA):e(iA(n),iA(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},Bk(t)}function cA(){var e=sA(pk());return e.copy=function(){return fk(e,cA()).exponent(e.exponent())},KD.apply(e,arguments),e}function lA(){return cA.apply(null,arguments).exponent(.5)}function uA(e){return Math.sign(e)*e*e}function dA(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function fA(){var e=mk(),t=[0,1],n=!1,r;function i(t){var i=dA(e(t));return isNaN(i)?r:n?Math.round(i):i}return i.invert=function(t){return e.invert(uA(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(n){return arguments.length?(e.range((t=Array.from(n,ak)).map(uA)),i):t.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(n=!!e,i):n},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return fA(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},KD.apply(i,arguments),Bk(i)}function pA(){var e=[],t=[],n=[],r;function i(){var r=0,i=Math.max(1,t.length);for(n=Array(i-1);++r<i;)n[r-1]=WD(e,r/i);return a}function a(e){return e==null||isNaN(e=+e)?r:t[wD(n,e)]}return a.invertExtent=function(r){var i=t.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:e[0],i<n.length?n[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(_D),i()},a.range=function(e){return arguments.length?(t=Array.from(e),i()):t.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return pA().domain(e).range(t).unknown(r)},KD.apply(a,arguments)}function mA(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(e){return e!=null&&e<=e?i[wD(r,e,0,n)]:a}function s(){var i=-1;for(r=Array(n);++i<n;)r[i]=((i+1)*t-(i-n)*e)/(n+1);return o}return o.domain=function(n){return arguments.length?([e,t]=n,e=+e,t=+t,s()):[e,t]},o.range=function(e){return arguments.length?(n=(i=Array.from(e)).length-1,s()):i.slice()},o.invertExtent=function(a){var o=i.indexOf(a);return o<0?[NaN,NaN]:o<1?[e,r[0]]:o>=n?[r[n-1],t]:[r[o-1],r[o]]},o.unknown=function(e){return arguments.length&&(a=e),o},o.thresholds=function(){return r.slice()},o.copy=function(){return mA().domain([e,t]).range(i).unknown(a)},KD.apply(Bk(o),arguments)}function hA(){var e=[.5],t=[0,1],n,r=1;function i(i){return i!=null&&i<=i?t[wD(e,i,0,r)]:n}return i.domain=function(n){return arguments.length?(e=Array.from(n),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(n){return arguments.length?(t=Array.from(n),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(n){var r=t.indexOf(n);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return hA().domain(e).range(t).unknown(n)},KD.apply(i,arguments)}var gA=new Date,_A=new Date;function vA(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>vA(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(gA.setTime(+t),_A.setTime(+r),e(gA),e(_A),Math.floor(n(gA,_A))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var yA=vA(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);yA.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?vA(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):yA),yA.range;var bA=1e3,xA=bA*60,SA=xA*60,CA=SA*24,wA=CA*7,TA=CA*30,EA=CA*365,DA=vA(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*bA)},(e,t)=>(t-e)/bA,e=>e.getUTCSeconds());DA.range;var OA=vA(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*bA)},(e,t)=>{e.setTime(+e+t*xA)},(e,t)=>(t-e)/xA,e=>e.getMinutes());OA.range;var kA=vA(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*xA)},(e,t)=>(t-e)/xA,e=>e.getUTCMinutes());kA.range;var AA=vA(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*bA-e.getMinutes()*xA)},(e,t)=>{e.setTime(+e+t*SA)},(e,t)=>(t-e)/SA,e=>e.getHours());AA.range;var jA=vA(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*SA)},(e,t)=>(t-e)/SA,e=>e.getUTCHours());jA.range;var MA=vA(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*xA)/CA,e=>e.getDate()-1);MA.range;var NA=vA(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/CA,e=>e.getUTCDate()-1);NA.range;var PA=vA(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/CA,e=>Math.floor(e/CA));PA.range;function FA(e){return vA(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*xA)/wA)}var IA=FA(0),LA=FA(1),RA=FA(2),zA=FA(3),BA=FA(4),VA=FA(5),HA=FA(6);IA.range,LA.range,RA.range,zA.range,BA.range,VA.range,HA.range;function UA(e){return vA(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/wA)}var WA=UA(0),GA=UA(1),KA=UA(2),qA=UA(3),JA=UA(4),YA=UA(5),XA=UA(6);WA.range,GA.range,KA.range,qA.range,JA.range,YA.range,XA.range;var ZA=vA(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());ZA.range;var QA=vA(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());QA.range;var $A=vA(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());$A.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:vA(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),$A.range;var ej=vA(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ej.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:vA(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),ej.range;function tj(e,t,n,r,i,a){let o=[[DA,1,bA],[DA,5,5*bA],[DA,15,15*bA],[DA,30,30*bA],[a,1,xA],[a,5,5*xA],[a,15,15*xA],[a,30,30*xA],[i,1,SA],[i,3,3*SA],[i,6,6*SA],[i,12,12*SA],[r,1,CA],[r,2,2*CA],[n,1,wA],[t,1,TA],[t,3,3*TA],[e,1,EA]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=yD(([,,e])=>e).right(o,i);if(a===o.length)return e.every(RD(t/EA,n/EA,r));if(a===0)return yA.every(Math.max(RD(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[nj,rj]=tj(ej,QA,WA,PA,jA,kA),[ij,aj]=tj($A,ZA,IA,MA,AA,OA);function oj(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function sj(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function cj(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function lj(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=gj(i),u=_j(i),d=gj(a),f=_j(a),p=gj(o),m=_j(o),h=gj(s),g=_j(s),_=gj(c),v=_j(c),y={a:N,A:P,b:F,B:I,c:null,d:Rj,e:Rj,f:Uj,g:eM,G:nM,H:zj,I:Bj,j:Vj,L:Hj,m:Wj,M:Gj,p:L,q:ee,Q:TM,s:EM,S:Kj,u:qj,U:Jj,V:Xj,w:Zj,W:Qj,x:null,X:null,y:$j,Y:tM,Z:rM,"%":wM},b={a:R,A:z,b:B,B:V,c:null,d:iM,e:iM,f:lM,g:bM,G:SM,H:aM,I:oM,j:sM,L:cM,m:uM,M:dM,p:H,q:U,Q:TM,s:EM,S:fM,u:pM,U:mM,V:gM,w:_M,W:vM,x:null,X:null,y:yM,Y:xM,Z:CM,"%":wM},x={a:E,A:D,b:O,B:k,c:A,d:Oj,e:Oj,f:Pj,g:wj,G:Cj,H:Aj,I:Aj,j:kj,L:Nj,m:Dj,M:jj,p:T,q:Ej,Q:Ij,s:Lj,S:Mj,u:yj,U:bj,V:xj,w:vj,W:Sj,x:j,X:M,y:wj,Y:Cj,Z:Tj,"%":Fj};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=uj[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=cj(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=sj(cj(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?GA.ceil(a):GA(a),a=NA.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=oj(cj(r.y,0,1)),o=a.getDay(),a=o>4||o===0?LA.ceil(a):LA(a),a=MA.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else (`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:`W`in r?1:0),o=`Z`in r?sj(cj(r.y,0,1)).getUTCDay():oj(cj(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,sj(r)):oj(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in uj?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function F(e){return c[e.getMonth()]}function I(e){return s[e.getMonth()]}function L(e){return i[+(e.getHours()>=12)]}function ee(e){return 1+~~(e.getMonth()/3)}function R(e){return o[e.getUTCDay()]}function z(e){return a[e.getUTCDay()]}function B(e){return c[e.getUTCMonth()]}function V(e){return s[e.getUTCMonth()]}function H(e){return i[+(e.getUTCHours()>=12)]}function U(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var uj={"-":``,_:` `,0:`0`},dj=/^\s*\d+/,fj=/^%/,pj=/[\\^$*+?|[\]().{}]/g;function mj(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function hj(e){return e.replace(pj,`\\$&`)}function gj(e){return RegExp(`^(?:`+e.map(hj).join(`|`)+`)`,`i`)}function _j(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function vj(e,t,n){var r=dj.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function yj(e,t,n){var r=dj.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function bj(e,t,n){var r=dj.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function xj(e,t,n){var r=dj.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Sj(e,t,n){var r=dj.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Cj(e,t,n){var r=dj.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function wj(e,t,n){var r=dj.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Tj(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function Ej(e,t,n){var r=dj.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Dj(e,t,n){var r=dj.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Oj(e,t,n){var r=dj.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function kj(e,t,n){var r=dj.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Aj(e,t,n){var r=dj.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function jj(e,t,n){var r=dj.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Mj(e,t,n){var r=dj.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Nj(e,t,n){var r=dj.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Pj(e,t,n){var r=dj.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Fj(e,t,n){var r=fj.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ij(e,t,n){var r=dj.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Lj(e,t,n){var r=dj.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Rj(e,t){return mj(e.getDate(),t,2)}function zj(e,t){return mj(e.getHours(),t,2)}function Bj(e,t){return mj(e.getHours()%12||12,t,2)}function Vj(e,t){return mj(1+MA.count($A(e),e),t,3)}function Hj(e,t){return mj(e.getMilliseconds(),t,3)}function Uj(e,t){return Hj(e,t)+`000`}function Wj(e,t){return mj(e.getMonth()+1,t,2)}function Gj(e,t){return mj(e.getMinutes(),t,2)}function Kj(e,t){return mj(e.getSeconds(),t,2)}function qj(e){var t=e.getDay();return t===0?7:t}function Jj(e,t){return mj(IA.count($A(e)-1,e),t,2)}function Yj(e){var t=e.getDay();return t>=4||t===0?BA(e):BA.ceil(e)}function Xj(e,t){return e=Yj(e),mj(BA.count($A(e),e)+($A(e).getDay()===4),t,2)}function Zj(e){return e.getDay()}function Qj(e,t){return mj(LA.count($A(e)-1,e),t,2)}function $j(e,t){return mj(e.getFullYear()%100,t,2)}function eM(e,t){return e=Yj(e),mj(e.getFullYear()%100,t,2)}function tM(e,t){return mj(e.getFullYear()%1e4,t,4)}function nM(e,t){var n=e.getDay();return e=n>=4||n===0?BA(e):BA.ceil(e),mj(e.getFullYear()%1e4,t,4)}function rM(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+mj(t/60|0,`0`,2)+mj(t%60,`0`,2)}function iM(e,t){return mj(e.getUTCDate(),t,2)}function aM(e,t){return mj(e.getUTCHours(),t,2)}function oM(e,t){return mj(e.getUTCHours()%12||12,t,2)}function sM(e,t){return mj(1+NA.count(ej(e),e),t,3)}function cM(e,t){return mj(e.getUTCMilliseconds(),t,3)}function lM(e,t){return cM(e,t)+`000`}function uM(e,t){return mj(e.getUTCMonth()+1,t,2)}function dM(e,t){return mj(e.getUTCMinutes(),t,2)}function fM(e,t){return mj(e.getUTCSeconds(),t,2)}function pM(e){var t=e.getUTCDay();return t===0?7:t}function mM(e,t){return mj(WA.count(ej(e)-1,e),t,2)}function hM(e){var t=e.getUTCDay();return t>=4||t===0?JA(e):JA.ceil(e)}function gM(e,t){return e=hM(e),mj(JA.count(ej(e),e)+(ej(e).getUTCDay()===4),t,2)}function _M(e){return e.getUTCDay()}function vM(e,t){return mj(GA.count(ej(e)-1,e),t,2)}function yM(e,t){return mj(e.getUTCFullYear()%100,t,2)}function bM(e,t){return e=hM(e),mj(e.getUTCFullYear()%100,t,2)}function xM(e,t){return mj(e.getUTCFullYear()%1e4,t,4)}function SM(e,t){var n=e.getUTCDay();return e=n>=4||n===0?JA(e):JA.ceil(e),mj(e.getUTCFullYear()%1e4,t,4)}function CM(){return`+0000`}function wM(){return`%`}function TM(e){return+e}function EM(e){return Math.floor(e/1e3)}var DM,OM,kM;AM({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function AM(e){return DM=lj(e),OM=DM.format,DM.parse,kM=DM.utcFormat,DM.utcParse,DM}function jM(e){return new Date(e)}function MM(e){return e instanceof Date?+e:+new Date(+e)}function NM(e,t,n,r,i,a,o,s,c,l){var u=mk(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,MM)):f().map(jM)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(Uk(n,e)):u},u.copy=function(){return fk(u,NM(e,t,n,r,i,a,o,s,c,l))},u}function PM(){return KD.apply(NM(ij,aj,$A,ZA,IA,MA,AA,OA,DA,OM).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function FM(){return KD.apply(NM(nj,rj,ej,QA,WA,NA,jA,kA,DA,kM).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function IM(){var e=0,t=1,n,r,i,a,o=sk,s=!1,c;function l(e){return e==null||isNaN(e=+e)?c:o(i===0?.5:(e=(a(e)-n)*i,s?Math.max(0,Math.min(1,e)):e))}l.domain=function(o){return arguments.length?([e,t]=o,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(e){return arguments.length?(s=!!e,l):s},l.interpolator=function(e){return arguments.length?(o=e,l):o};function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,o=e(n,r),l):[o(0),o(1)]}}return l.range=u(tk),l.rangeRound=u(nk),l.unknown=function(e){return arguments.length?(c=e,l):c},function(o){return a=o,n=o(e),r=o(t),i=n===r?0:1/(r-n),l}}function LM(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function RM(){var e=Bk(IM()(sk));return e.copy=function(){return LM(e,RM())},qD.apply(e,arguments)}function zM(){var e=Qk(IM()).domain([1,10]);return e.copy=function(){return LM(e,zM()).base(e.base())},qD.apply(e,arguments)}function BM(){var e=nA(IM());return e.copy=function(){return LM(e,BM()).constant(e.constant())},qD.apply(e,arguments)}function VM(){var e=sA(IM());return e.copy=function(){return LM(e,VM()).exponent(e.exponent())},qD.apply(e,arguments)}function HM(){return VM.apply(null,arguments).exponent(.5)}function UM(){var e=[],t=sk;function n(n){if(n!=null&&!isNaN(n=+n))return t((wD(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(_D),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>UD(e,r/t))},n.copy=function(){return UM(t).domain(e)},qD.apply(n,arguments)}function WM(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,l=sk,u,d=!1,f;function p(e){return isNaN(e=+e)?f:(e=.5+((e=+u(e))-a)*(r*e<r*a?s:c),l(d?Math.max(0,Math.min(1,e)):e))}p.domain=function(l){return arguments.length?([e,t,n]=l,i=u(e=+e),a=u(t=+t),o=u(n=+n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p):[e,t,n]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(l=e,p):l};function m(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,l=rk(e,[n,r,i]),p):[l(0),l(.5),l(1)]}}return p.range=m(tk),p.rangeRound=m(nk),p.unknown=function(e){return arguments.length?(f=e,p):f},function(l){return u=l,i=l(e),a=l(t),o=l(n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p}}function GM(){var e=Bk(WM()(sk));return e.copy=function(){return LM(e,GM())},qD.apply(e,arguments)}function KM(){var e=Qk(WM()).domain([.1,1,10]);return e.copy=function(){return LM(e,KM()).base(e.base())},qD.apply(e,arguments)}function qM(){var e=nA(WM());return e.copy=function(){return LM(e,qM()).constant(e.constant())},qD.apply(e,arguments)}function JM(){var e=sA(WM());return e.copy=function(){return LM(e,JM()).exponent(e.exponent())},qD.apply(e,arguments)}function YM(){return JM.apply(null,arguments).exponent(.5)}var XM=s({scaleBand:()=>XD,scaleDiverging:()=>GM,scaleDivergingLog:()=>KM,scaleDivergingPow:()=>JM,scaleDivergingSqrt:()=>YM,scaleDivergingSymlog:()=>qM,scaleIdentity:()=>Hk,scaleImplicit:()=>JD,scaleLinear:()=>Vk,scaleLog:()=>$k,scaleOrdinal:()=>YD,scalePoint:()=>QD,scalePow:()=>cA,scaleQuantile:()=>pA,scaleQuantize:()=>mA,scaleRadial:()=>fA,scaleSequential:()=>RM,scaleSequentialLog:()=>zM,scaleSequentialPow:()=>VM,scaleSequentialQuantile:()=>UM,scaleSequentialSqrt:()=>HM,scaleSequentialSymlog:()=>BM,scaleSqrt:()=>lA,scaleSymlog:()=>rA,scaleThreshold:()=>hA,scaleTime:()=>PM,scaleUtc:()=>FM,tickFormat:()=>zk});function ZM(e){var t=XM;if(e in t&&typeof t[e]==`function`)return t[e]();var n=`scale${Pb(e)}`;if(n in t&&typeof t[n]==`function`)return t[n]()}function QM(e,t,n){if(typeof e==`function`)return e.copy().domain(t).range(n);if(e!=null){var r=ZM(e);if(r!=null)return r.domain(t).range(n),r}}function $M(e,t,n,r){if(!(n==null||r==null))return typeof e.scale==`function`?QM(e.scale,n,r):QM(t,n,r)}function eN(e){return`scale${Pb(e)}`}function tN(e){return eN(e)in XM}var nN=(e,t,n)=>{if(e!=null){var{scale:r,type:i}=e;if(r===`auto`)return i===`category`&&n&&(n.indexOf(`LineChart`)>=0||n.indexOf(`AreaChart`)>=0||n.indexOf(`ComposedChart`)>=0&&!t)?`point`:i===`category`?`band`:`linear`;if(typeof r==`string`)return tN(r)?r:`point`}};function rN(e,t){for(var n=0,r=e.length,i=e[0]<e[e.length-1];n<r;){var a=Math.floor((n+r)/2);(i?e[a]<t:e[a]>t)?n=a+1:r=a}return n}function iN(e,t){if(e){var n=t??e.domain(),r=n.map(t=>e(t)??0),i=e.range();if(!(n.length===0||i.length<2))return e=>{var t=rN(r,e);if(t<=0)return n[0];if(t>=n.length)return n[n.length-1];var i=r[t-1]??0,a=r[t]??0;return Math.abs(e-i)<=Math.abs(e-a)?n[t-1]:n[t]}}}function aN(e){if(e!=null)return`invert`in e&&typeof e.invert==`function`?e.invert.bind(e):iN(e,void 0)}var oN=l(hE());function sN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?sN(Object(n),!0).forEach(function(t){lN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lN(e,t,n){return(t=uN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uN(e){var t=dN(e,`string`);return typeof t==`symbol`?t:t+``}function dN(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var fN=[0,`auto`],pN={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:`preserveEnd`,minTickGap:5,mirror:!1,name:void 0,orientation:`bottom`,padding:{left:0,right:0},reversed:!1,scale:`auto`,tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:`category`,unit:void 0,niceTicks:`auto`},mN=(e,t)=>e.cartesianAxis.xAxis[t],hN=(e,t)=>mN(e,t)??pN,gN={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:fN,hide:!0,id:0,includeHidden:!1,interval:`preserveEnd`,minTickGap:5,mirror:!1,name:void 0,orientation:`left`,padding:{top:0,bottom:0},reversed:!1,scale:`auto`,tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:`number`,unit:void 0,niceTicks:`auto`,width:60},_N=(e,t)=>e.cartesianAxis.yAxis[t],vN=(e,t)=>_N(e,t)??gN,yN={domain:[0,`auto`],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:``,range:[64,64],scale:`auto`,type:`number`,unit:``},bN=(e,t)=>e.cartesianAxis.zAxis[t]??yN,xN=(e,t,n)=>{switch(t){case`xAxis`:return hN(e,n);case`yAxis`:return vN(e,n);case`zAxis`:return bN(e,n);case`angleAxis`:return ZE(e,n);case`radiusAxis`:return QE(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},SN=(e,t,n)=>{switch(t){case`xAxis`:return hN(e,n);case`yAxis`:return vN(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},CN=(e,t,n)=>{switch(t){case`xAxis`:return hN(e,n);case`yAxis`:return vN(e,n);case`angleAxis`:return ZE(e,n);case`radiusAxis`:return QE(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},wN=e=>e.graphicalItems.cartesianItems.some(e=>e.type===`bar`)||e.graphicalItems.polarItems.some(e=>e.type===`radialBar`);function TN(e,t){return n=>{switch(e){case`xAxis`:return`xAxisId`in n&&n.xAxisId===t;case`yAxis`:return`yAxisId`in n&&n.yAxisId===t;case`zAxis`:return`zAxisId`in n&&n.zAxisId===t;case`angleAxis`:return`angleAxisId`in n&&n.angleAxisId===t;case`radiusAxis`:return`radiusAxisId`in n&&n.radiusAxisId===t;default:return!1}}}var EN=e=>e.graphicalItems.cartesianItems,DN=K([aD,oD],TN),ON=(e,t,n)=>e.filter(n).filter(e=>t?.includeHidden===!0?!0:!e.hide),kN=K([EN,xN,DN],ON,{memoizeOptions:{resultEqualityCheck:dD}}),AN=K([kN],e=>e.filter(e=>e.type===`area`||e.type===`bar`).filter(lD)),jN=e=>e.filter(e=>!(`stackId`in e)||e.stackId===void 0),MN=K([kN],jN),NN=e=>e.map(e=>e.data).filter(Boolean).flat(1),PN=K([kN],e=>e.some(e=>!e.data)),FN=K([kN],NN,{memoizeOptions:{resultEqualityCheck:dD}}),IN=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},LN=K([FN,vE],IN),RN=(e,t,n)=>t?.dataKey==null?n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:KC(e,t)}))):e.map(e=>({value:e})):e.map(e=>({value:KC(e,t.dataKey)})),zN=(e,t,n,r,i,a)=>{var{chartData:o=[],dataStartIndex:s,dataEndIndex:c}=r,l=RN(e,t,n);return i&&t?.dataKey!=null&&a.length>0?[...o.slice(s,c+1).map(e=>({value:KC(e,t.dataKey)})).filter(e=>e.value!=null),...l]:l},BN=K([LN,xN,kN,vE,PN,FN],zN);function VN(e){if(kb(e)||e instanceof Date){var t=Number(e);if(zC(t))return t}}function HN(e){if(Array.isArray(e)){var t=[VN(e[0]),VN(e[1])];return xE(t)?t:void 0}var n=VN(e);if(n!=null)return[n,n]}function UN(e){return e.map(VN).filter(Fb)}function WN(e,t){var n=VN(e),r=VN(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var GN=K([BN],e=>e?.map(e=>e.value).sort(WN));function KN(e,t){switch(e){case`xAxis`:return t.direction===`x`;case`yAxis`:return t.direction===`y`;default:return!1}}function qN(e,t,n){if(!n||!n.length)return[];var r;if(typeof t==`number`&&!Eb(t))r=t;else if(Array.isArray(t)){var i=UN(t);i.length>0&&(r=Math.max(...i))}return r==null?[]:UN(n.flatMap(t=>{var n=KC(e,t.dataKey),i,a;if(Array.isArray(n)?[i,a]=n:i=a=n,!(!zC(i)||!zC(a)))return[r-i,r+a]}))}var JN=e=>CN(e,pD(e),mD(e)),YN=K([JN],e=>e?.dataKey),XN=K([AN,vE,JN],cD),ZN=(e,t,n,r)=>{var i=t.reduce((e,t)=>{if(t.stackId==null)return e;var n=e[t.stackId];return n??=[],n.push(t),e[t.stackId]=n,e},{});return Object.fromEntries(Object.entries(i).map(t=>{var[i,a]=t,o=r?[...a].reverse():a;return[i,{stackedData:XC(e,o.map(sD),n),graphicalItems:o}]}))},QN=K([XN,AN,IE,LE],ZN),$N=(e,t,n,r)=>{var{dataStartIndex:i,dataEndIndex:a}=t;if(r==null&&n!==`zAxis`){var o=$C(e,i,a);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},eP=K([xN],e=>e.allowDataOverflow),tP=e=>{if(e==null||!(`domain`in e))return fN;if(e.domain!=null)return e.domain;if(`ticks`in e&&e.ticks!=null){if(e.type===`number`){var t=UN(e.ticks);return[Math.min(...t),Math.max(...t)]}if(e.type===`category`)return e.ticks.map(String)}return e?.domain??fN},nP=K([xN],tP),rP=K([nP,eP],CE),iP=K([QN,gE,aD,rP],$N,{memoizeOptions:{resultEqualityCheck:uD}}),aP=e=>e.errorBars,oP=(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>KN(n,e)),sP=function(){var e=[...arguments].filter(Boolean);if(e.length!==0){var t=e.flat();return[Math.min(...t),Math.max(...t)]}},cP=function(e,t,n,r,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],o,s;if(n.length>0&&n.forEach(e=>{var n=e.data==null?a:[...e.data],c=r[e.id]?.filter(e=>KN(i,e));n.forEach(n=>{var r=KC(n,t.dataKey??e.dataKey),i=qN(n,r,c);if(i.length>=2){var a=Math.min(...i),l=Math.max(...i);(o==null||a<o)&&(o=a),(s==null||l>s)&&(s=l)}var u=HN(r);u!=null&&(o=o==null?u[0]:Math.min(o,u[0]),s=s==null?u[1]:Math.max(s,u[1]))})}),t?.dataKey!=null&&n.length===0&&e.forEach(e=>{var n=HN(KC(e,t.dataKey));n!=null&&(o=o==null?n[0]:Math.min(o,n[0]),s=s==null?n[1]:Math.max(s,n[1]))}),zC(o)&&zC(s))return[o,s]},lP=K([LN,xN,MN,aP,aD,yE],cP,{memoizeOptions:{resultEqualityCheck:uD}});function uP(e){var{value:t}=e;if(kb(t)||t instanceof Date)return t}var dP=(e,t,n)=>{var r=e.map(uP).filter(e=>e!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&jb(r))?(0,oN.default)(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},fP=e=>e.referenceElements.dots,pP=(e,t,n)=>e.filter(e=>e.ifOverflow===`extendDomain`).filter(e=>t===`xAxis`?e.xAxisId===n:e.yAxisId===n),mP=K([fP,aD,oD],pP),hP=e=>e.referenceElements.areas,gP=K([hP,aD,oD],pP),_P=e=>e.referenceElements.lines,vP=K([_P,aD,oD],pP),yP=(e,t)=>{if(e!=null){var n=UN(e.map(e=>t===`xAxis`?e.x:e.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},bP=K(mP,aD,yP),xP=(e,t)=>{if(e!=null){var n=UN(e.flatMap(e=>[t===`xAxis`?e.x1:e.y1,t===`xAxis`?e.x2:e.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},SP=K([gP,aD],xP);function CP(e){if(e.x!=null)return UN([e.x]);var t=e.segment?.map(e=>e.x);return t==null||t.length===0?[]:UN(t)}function wP(e){if(e.y!=null)return UN([e.y]);var t=e.segment?.map(e=>e.y);return t==null||t.length===0?[]:UN(t)}var TP=(e,t)=>{if(e!=null){var n=e.flatMap(e=>t===`xAxis`?CP(e):wP(e));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},EP=K(bP,K([vP,aD],TP),SP,(e,t,n)=>sP(e,n,t)),DP=(e,t,n,r,i,a,o,s)=>n??wE(t,o===`vertical`&&s===`xAxis`||o===`horizontal`&&s===`yAxis`?sP(r,a,i):sP(a,i),e.allowDataOverflow),OP=K([xN,nP,rP,iP,lP,EP,Jw,aD],DP,{memoizeOptions:{resultEqualityCheck:uD}}),kP=[0,1],AP=(e,t,n,r,i,a,o)=>{if(!((e==null||n==null||n.length===0)&&o===void 0)){var{dataKey:s,type:c}=e,l=JC(t,a);return l&&s==null?(0,oN.default)(0,n?.length??0):c===`category`?dP(r,e,l):i===`expand`&&!l?kP:o}},jP=K([xN,Jw,LN,BN,IE,aD,OP],AP),MP=K([xN,wN,RE],nN),NP=(e,t,n)=>{var{niceTicks:r}=t;if(r!==`none`){var i=tP(t),a=Array.isArray(i)&&(i[0]===`auto`||i[1]===`auto`);if((r===`snap125`||r===`adaptive`)&&t!=null&&t.tickCount&&xE(e)){if(a)return NE(e,t.tickCount,t.allowDecimals,r);if(t.type===`number`)return PE(e,t.tickCount,t.allowDecimals,r)}if(r===`auto`&&n===`linear`&&t!=null&&t.tickCount){if(a&&xE(e))return NE(e,t.tickCount,t.allowDecimals,`adaptive`);if(t.type===`number`&&xE(e))return PE(e,t.tickCount,t.allowDecimals,`adaptive`)}}},PP=K([jP,CN,MP],NP),FP=(e,t,n,r)=>{if(r!==`angleAxis`&&e?.type===`number`&&xE(t)&&Array.isArray(n)&&n.length>0){var i=t[0],a=n[0]??0,o=t[1],s=n[n.length-1]??0;return[Math.min(i,a),Math.max(o,s)]}return t},IP=K([xN,jP,PP,aD],FP),LP=K(K(BN,xN,(e,t)=>{if(!(!t||t.type!==`number`)){var n=1/0,r=Array.from(UN(e.map(e=>e.value))).sort((e,t)=>e-t),i=r[0],a=r[r.length-1];if(i==null||a==null)return 1/0;var o=a-i;if(o===0)return 1/0;for(var s=0;s<r.length-1;s++){var c=r[s],l=r[s+1];if(!(c==null||l==null)){var u=l-c;n=Math.min(n,u)}}return n/o}}),Jw,FE,vw,(e,t,n,r,i)=>i,(e,t,n,r,i)=>{if(!zC(e))return 0;var a=t===`vertical`?r.height:r.width;if(i===`gap`)return e*a/2;if(i===`no-gap`){var o=Ab(n,e*a),s=e*a/2;return s-o-(s-o)/a*o}return 0}),RP=(e,t,n)=>{var r=hN(e,t);return r==null||typeof r.padding!=`string`?0:LP(e,`xAxis`,t,n,r.padding)},zP=(e,t,n)=>{var r=vN(e,t);return r==null||typeof r.padding!=`string`?0:LP(e,`yAxis`,t,n,r.padding)},BP=K(hN,RP,(e,t)=>{if(e==null)return{left:0,right:0};var{padding:n}=e;return typeof n==`string`?{left:t,right:t}:{left:(n.left??0)+t,right:(n.right??0)+t}}),VP=K(vN,zP,(e,t)=>{if(e==null)return{top:0,bottom:0};var{padding:n}=e;return typeof n==`string`?{top:t,bottom:t}:{top:(n.top??0)+t,bottom:(n.bottom??0)+t}}),HP=K([vw,BP,bw,yw,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:a}=r;return i?[a.left,n.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),UP=K([vw,Jw,VP,bw,yw,(e,t,n)=>n],(e,t,n,r,i,a)=>{var{padding:o}=i;return a?[r.height-o.bottom,o.top]:t===`horizontal`?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),WP=(e,t,n,r)=>{switch(t){case`xAxis`:return HP(e,n,r);case`yAxis`:return UP(e,n,r);case`zAxis`:return bN(e,n)?.range;case`angleAxis`:return rD(e);case`radiusAxis`:return iD(e,n);default:return}},GP=K([xN,WP],HE),KP=K([xN,MP,K([MP,IP],gD),GP],$M),qP=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:a}=n;if(JC(e,r)&&(i===`number`||a!==`auto`))return t.map(e=>e.value)}},JP=K([Jw,BN,CN,aD],qP),YP=K([KP],hD);K([KP],aN),K([KP,GN],iN),K([kN,aP,aD],oP);function XP(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var ZP=(e,t)=>t,QP=(e,t,n)=>n,$P=K(ow,ZP,QP,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(XP)),eF=K(sw,ZP,QP,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(XP)),tF=(e,t)=>({width:e.width,height:t.height}),nF=(e,t)=>({width:typeof t.width==`number`?t.width:60,height:e.height});K(vw,hN,tF);var rF=(e,t,n)=>{switch(t){case`top`:return e.top;case`bottom`:return n-e.bottom;default:return 0}},iF=(e,t,n)=>{switch(t){case`left`:return e.left;case`right`:return n-e.right;default:return 0}},aF=K(iw,vw,$P,ZP,QP,(e,t,n,r,i)=>{var a={},o;return n.forEach(n=>{var s=tF(t,n);o??=rF(t,r,e);var c=r===`top`&&!i||r===`bottom`&&i;a[n.id]=o-Number(c)*s.height,o+=(c?-1:1)*s.height}),a}),oF=K(rw,vw,eF,ZP,QP,(e,t,n,r,i)=>{var a={},o;return n.forEach(n=>{var s=nF(t,n);o??=iF(t,r,e);var c=r===`left`&&!i||r===`right`&&i;a[n.id]=o-Number(c)*s.width,o+=(c?-1:1)*s.width}),a});K([vw,hN,(e,t)=>{var n=hN(e,t);if(n!=null)return aF(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),K([vw,vN,(e,t)=>{var n=vN(e,t);if(n!=null)return oF(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),K(vw,vN,(e,t)=>({width:typeof t.width==`number`?t.width:60,height:e.height}));var sF=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:a,dataKey:o}=n,s=JC(e,r),c=t.map(e=>e.value),l=c.filter(e=>e!=null);if(o&&s&&a===`category`&&i&&jb(l))return c}},cF=K([Jw,BN,xN,aD],sF);K([Jw,SN,MP,YP,cF,JP,WP,PP,aD],(e,t,n,r,i,a,o,s,c)=>{if(t!=null){var l=JC(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:a,duplicateDomain:i,isCategorical:l,niceTicks:s,range:o,realScaleType:n,scale:r}}}),K([Jw,CN,MP,YP,PP,WP,cF,JP,aD],(e,t,n,r,i,a,o,s,c)=>{if(!(t==null||r==null)){var l=JC(e,c),{type:u,ticks:d,tickCount:f}=t,p=n===`scaleBand`&&typeof r.bandwidth==`function`?r.bandwidth()/2:2,m=u===`category`&&r.bandwidth?r.bandwidth()/p:0;m=c===`angleAxis`&&a!=null&&a.length>=2?Tb(a[0]-a[1])*2*m:m;var h=d||i;return h?h.map((e,t)=>{var n=o?o.indexOf(e):e,i=r.map(n);return zC(i)?{index:t,coordinate:i+m,value:e,offset:m}:null}).filter(Fb):l&&s?s.map((e,t)=>{var n=r.map(e);return zC(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(Fb):r.ticks?r.ticks(f).map((e,t)=>{var n=r.map(e);return zC(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(Fb):r.domain().map((e,t)=>{var n=r.map(e);return zC(n)?{coordinate:n+m,value:o?o[e]:e,index:t,offset:m}:null}).filter(Fb)}}),K([Jw,CN,YP,WP,cF,JP,aD],(e,t,n,r,i,a,o)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var s=JC(e,o),{tickCount:c}=t,l=0;return l=o===`angleAxis`&&r?.length>=2?Tb(r[0]-r[1])*2*l:l,s&&a?a.map((e,t)=>{var r=n.map(e);return zC(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(Fb):n.ticks?n.ticks(c).map((e,t)=>{var r=n.map(e);return zC(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(Fb):n.domain().map((e,t)=>{var r=n.map(e);return zC(r)?{coordinate:r+l,value:i?i[e]:e,index:t,offset:l}:null}).filter(Fb)}}),K(xN,YP,(e,t)=>{if(!(e==null||t==null))return cN(cN({},e),{},{scale:t})}),K((e,t,n)=>bN(e,n),K([K([xN,MP,jP,GP],$M)],hD),(e,t)=>{if(!(e==null||t==null))return cN(cN({},e),{},{scale:t})}),K([Jw,ow,sw],(e,t,n)=>{switch(e){case`horizontal`:return t.some(e=>e.reversed)?`right-to-left`:`left-to-right`;case`vertical`:return n.some(e=>e.reversed)?`bottom-to-top`:`top-to-bottom`;case`centric`:case`radial`:return`left-to-right`;default:return}}),K([(e,t,n)=>e.renderedTicks[t]?.[n]],e=>{if(!(!e||e.length===0))return t=>{var n=1/0,r=e[0];for(var i of e){var a=Math.abs(i.coordinate-t);a<n&&(n=a,r=i)}return r?.value}});var lF=e=>e.options.defaultTooltipEventType,uF=e=>e.options.validateTooltipEventTypes;function dF(e,t,n){if(e==null)return t;var r=e?`axis`:`item`;return n==null?t:n.includes(r)?r:t}var fF=(e,t)=>{var n,r=Number(t);if(!(Eb(r)||t==null))return r>=0?e==null||(n=e[r])==null?void 0:n.value:void 0},pF=e=>e.tooltip.settings,mF={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},hF=CC({name:`tooltip`,initialState:{itemInteraction:{click:mF,hover:mF},axisInteraction:{click:mF,hover:mF},keyboardInteraction:mF,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:`hover`,axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(GT(t.payload))},prepare:hC()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,i=cC(e).tooltipItemPayloads.indexOf(GT(n));i>-1&&(e.tooltipItemPayloads[i]=GT(r))},prepare:hC()},removeTooltipEntrySettings:{reducer(e,t){var n=cC(e).tooltipItemPayloads.indexOf(GT(t.payload));n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:hC()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:gF,replaceTooltipEntrySettings:_F,removeTooltipEntrySettings:vF,setTooltipSettingsState:yF,setActiveMouseOverItemIndex:bF,mouseLeaveItem:xF,mouseLeaveChart:SF,setActiveClickItemIndex:CF,setMouseOverAxisIndex:wF,setMouseClickAxisIndex:TF,setSyncInteraction:EF,setKeyboardInteraction:DF}=hF.actions;hF.reducer;function OF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?OF(Object(n),!0).forEach(function(t){AF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function AF(e,t,n){return(t=jF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jF(e){var t=MF(e,`string`);return typeof t==`symbol`?t:t+``}function MF(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function NF(e,t,n){return t===`axis`?n===`click`?e.axisInteraction.click:e.axisInteraction.hover:n===`click`?e.itemInteraction.click:e.itemInteraction.hover}function PF(e){return e.index!=null}var FF=(e,t,n,r)=>{if(t==null)return mF;var i=NF(e,t,n);if(i==null)return mF;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(PF(i)){if(a)return kF(kF({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return kF(kF({},mF),{},{coordinate:i.coordinate})};function IF(e){if(typeof e==`number`)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function LF(e,t){var n=IF(e),r=t[0],i=t[1];return n===void 0?!1:n>=Math.min(r,i)&&n<=Math.max(r,i)}function RF(e,t,n){if(n==null||t==null)return!0;var r=KC(e,t);return r==null||!xE(n)?!0:LF(r,n)}var zF=(e,t,n,r)=>{var i=e?.index;if(i==null)return null;var a=Number(i);if(!zC(a))return i;var o=0,s=1/0;t.length>0&&(s=t.length-1);var c=Math.max(o,Math.min(a,s)),l=t[c];return l==null||RF(l,n,r)?String(c):null},BF=(e,t,n,r,i,a,o)=>{if(a!=null){var s=o[0]?.getPosition(a);if(s!=null)return s;var c=i?.[Number(a)];if(c)switch(n){case`horizontal`:return{x:c.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:c.coordinate}}}},VF=(e,t,n,r)=>{if(t===`axis`)return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i=n===`hover`?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId;if(e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(r!=null||e.keyboardInteraction.active)){var a=e.tooltipItemPayloads[0];return a==null?[]:[a]}return e.tooltipItemPayloads.filter(e=>e.settings?.graphicalItemId===i)},HF=e=>e.options.tooltipPayloadSearcher,UF=e=>e.tooltip;function WF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?WF(Object(n),!0).forEach(function(t){KF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function KF(e,t,n){return(t=qF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qF(e){var t=JF(e,`string`);return typeof t==`symbol`?t:t+``}function JF(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function YF(e){if(typeof e==`string`||typeof e==`number`)return e}function XF(e){if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return e}function ZF(e){if(typeof e==`string`||typeof e==`number`)return e;if(typeof e==`function`)return t=>e(t)}function QF(e){if(typeof e==`string`)return e}function $F(e){if(!(typeof e!=`object`||!e))return{name:`name`in e?YF(e.name):void 0,unit:`unit`in e?XF(e.unit):void 0,dataKey:`dataKey`in e?ZF(e.dataKey):void 0,payload:`payload`in e?e.payload:void 0,color:`color`in e?QF(e.color):void 0,fill:`fill`in e?QF(e.fill):void 0}}function eI(e,t){return e??t}var tI=(e,t,n,r,i,a,o)=>{if(!(t==null||a==null)){var{chartData:s,computedData:c,dataStartIndex:l,dataEndIndex:u}=n;return e.reduce((e,n)=>{var{dataDefinedOnItem:d,settings:f}=n,p=eI(d,s),m=Array.isArray(p)?RC(p,l,u):p,h=f?.dataKey??r,g=f?.nameKey,_=r&&Array.isArray(m)&&!Array.isArray(m[0])&&o===`axis`?Mb(m,r,i):a(m,t,c,g);return Array.isArray(_)?_.forEach(t=>{var n=$F(t),r=n?.name,i=n?.dataKey,a=n?.payload,o=GF(GF({},f),{},{name:r,unit:n?.unit,color:n?.color??f?.color,fill:n?.fill??f?.fill});e.push(nw({tooltipEntrySettings:o,dataKey:i,payload:a,value:KC(a,i),name:r==null?void 0:String(r)}))}):e.push(nw({tooltipEntrySettings:f,dataKey:h,payload:_,value:KC(_,h),name:KC(_,g)??f?.name})),e},[])}},nI=K([JN,wN,RE],nN),rI=K([K([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),JN,K([pD,mD],TN)],ON,{memoizeOptions:{resultEqualityCheck:dD}}),iI=K([rI],e=>e.filter(lD)),aI=K([rI],NN,{memoizeOptions:{resultEqualityCheck:dD}}),oI=K([rI],e=>e.some(e=>!e.data)),sI=K([aI,gE],IN),cI=K([iI,gE,JN],cD),lI=K([sI,JN,rI,gE,oI,aI],zN),uI=K([JN],tP),dI=K([uI,K([JN],e=>e.allowDataOverflow)],CE),fI=K([K([cI,K([rI],e=>e.filter(lD)),IE,LE],ZN),gE,pD,dI],$N),pI=K([sI,JN,K([rI],jN),aP,pD,bE],cP,{memoizeOptions:{resultEqualityCheck:uD}}),mI=K([K([fP,pD,mD],pP),pD],yP),hI=K([K([hP,pD,mD],pP),pD],xP),gI=K([JN,Jw,sI,lI,IE,pD,K([JN,uI,dI,fI,pI,K([mI,K([K([_P,pD,mD],pP),pD],TP),hI],sP),Jw,pD],DP)],AP),_I=K([JN,gI,K([gI,JN,nI],NP),pD],FP),vI=e=>WP(e,pD(e),mD(e),!1),yI=K([Jw,JN,nI,K([K([JN,nI,_I,K([JN,vI],HE)],$M)],hD),vI,K([Jw,lI,JN,pD],sF),K([Jw,lI,JN,pD],qP),pD],(e,t,n,r,i,a,o,s)=>{if(t){var{type:c}=t,l=JC(e,s);if(r){var u=n===`scaleBand`&&r.bandwidth?r.bandwidth()/2:2,d=c===`category`&&r.bandwidth?r.bandwidth()/u:0;return d=s===`angleAxis`&&i!=null&&i?.length>=2?Tb(i[0]-i[1])*2*d:d,l&&o?o.map((e,t)=>{var n=r.map(e);return zC(n)?{coordinate:n+d,value:e,index:t,offset:d}:null}).filter(Fb):r.domain().map((e,t)=>{var n=r.map(e);return zC(n)?{coordinate:n+d,value:a?a[e]:e,index:t,offset:d}:null}).filter(Fb)}}}),bI=K([lF,uF,pF],(e,t,n)=>dF(n.shared,e,t)),xI=e=>e.tooltip.settings.trigger,SI=e=>e.tooltip.settings.defaultIndex,CI=K([UF,bI,xI,SI],FF),wI=K([CI,sI,YN,gI],zF),TI=K([yI,wI],fF);K([CI],e=>{if(e)return e.dataKey}),K([CI],e=>{if(e)return e.graphicalItemId});var EI=K([UF,bI,xI,SI],VF);K([CI,K([rw,iw,Jw,vw,yI,SI,EI],BF)],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),K([CI],e=>e?.active??!1),K([K([EI,wI,gE,YN,TI,HF,bI],tI)],e=>{if(e!=null){var t=e.map(e=>e.payload).filter(e=>e!=null);return Array.from(new Set(t))}});var DI=(e,t)=>t,OI=(e,t,n)=>n,kI=(e,t,n,r)=>r;K(yI,e=>(0,Rx.default)(e,e=>e.coordinate));var AI=K([UF,DI,OI,kI],FF),jI=K([AI,sI,YN,gI],zF),MI=K([UF,DI,OI,kI],VF);K([AI,K([rw,iw,Jw,vw,yI,kI,MI],BF)],(e,t)=>e.coordinate??t),K([MI,jI,gE,YN,K([yI,jI],fF),HF,DI],tI),K([AI,jI],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),K(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}}),K(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(zE));return Array.from(new Set(t)).sort((e,t)=>e-t)},{memoizeOptions:{resultEqualityCheck:fD}});function NI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?NI(Object(n),!0).forEach(function(t){FI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NI(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function FI(e,t,n){return(t=II(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function II(e){var t=LI(e,`string`);return typeof t==`symbol`?t:t+``}function LI(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var RI={zIndexMap:Object.values(zE).reduce((e,t)=>PI(PI({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},zI=new Set(Object.values(zE));function BI(e){return zI.has(e)}var VI=CC({name:`zIndex`,initialState:RI,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:hC()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(--e.zIndexMap[n].consumers,e.zIndexMap[n].consumers<=0&&!BI(n)&&delete e.zIndexMap[n])},prepare:hC()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:i}=t.payload;e.zIndexMap[n]?i?e.zIndexMap[n].panoramaElement=GT(r):e.zIndexMap[n].element=GT(r):e.zIndexMap[n]={consumers:0,element:i?void 0:GT(r),panoramaElement:i?GT(r):void 0}},prepare:hC()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:hC()}}}),{registerZIndexPortal:HI,unregisterZIndexPortal:UI,registerZIndexPortalElement:WI,unregisterZIndexPortalElement:GI}=VI.actions;VI.reducer;function KI(){return KI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KI.apply(null,arguments)}var qI=l(o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)}))(),1).default;new qI;var JI=(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},YI=(e,t)=>({classGroupId:e,validator:t}),XI=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ZI=`-`,QI=[],$I=`arbitrary..`,eL=e=>{let t=rL(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return nL(e);let n=e.split(ZI);return tL(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?JI(i,t):t:i||QI}return n[e]||QI}}},tL=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=tL(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(ZI):e.slice(t).join(ZI),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},nL=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?$I+r:void 0})(),rL=e=>{let{theme:t,classGroups:n}=e;return iL(n,t)},iL=(e,t)=>{let n=XI();for(let r in e){let i=e[r];aL(i,n,r,t)}return n},aL=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];oL(i,t,n,r)}},oL=(e,t,n,r)=>{if(typeof e==`string`){sL(e,t,n);return}if(typeof e==`function`){cL(e,t,n,r);return}lL(e,t,n,r)},sL=(e,t,n)=>{let r=e===``?t:uL(t,e);r.classGroupId=n},cL=(e,t,n,r)=>{if(dL(e)){aL(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(YI(n,e))},lL=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];aL(o,uL(t,a),n,r)}},uL=(e,t)=>{let n=e,r=t.split(ZI),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=XI(),n.nextPart.set(t,i)),n=i}return n},dL=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,fL=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)}}},pL=`!`,mL=`:`,hL=[],gL=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),_L=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===mL){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(pL)?(c=s.slice(0,-1),l=!0):s.startsWith(pL)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return gL(t,l,c,u)};if(t){let e=t+mL,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):gL(hL,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},vL=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}},yL=e=>({cache:fL(e.cacheSize),parseClassName:_L(e),sortModifiers:vL(e),...eL(e)}),bL=/\s+/,xL=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(bL),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+pL:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},SL=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=CL(n))&&(i&&(i+=` `),i+=r);return i},CL=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=CL(e[r]))&&(n&&(n+=` `),n+=t);return n},wL=(e,...t)=>{let n,r,i,a,o=o=>(n=yL(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=xL(e,n);return i(e,a),a};return a=o,(...e)=>a(SL(...e))},TL=[],EL=e=>{let t=t=>t[e]||TL;return t.isThemeGetter=!0,t},DL=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,OL=/^\((?:(\w[\w-]*):)?(.+)\)$/i,kL=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,AL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jL=/\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$/,ML=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,NL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,FL=e=>kL.test(e),IL=e=>!!e&&!Number.isNaN(Number(e)),LL=e=>!!e&&Number.isInteger(Number(e)),RL=e=>e.endsWith(`%`)&&IL(e.slice(0,-1)),zL=e=>AL.test(e),BL=()=>!0,VL=e=>jL.test(e)&&!ML.test(e),HL=()=>!1,UL=e=>NL.test(e),WL=e=>PL.test(e),GL=e=>!q(e)&&!J(e),KL=e=>sR(e,dR,HL),q=e=>DL.test(e),qL=e=>sR(e,fR,VL),JL=e=>sR(e,pR,IL),YL=e=>sR(e,hR,BL),XL=e=>sR(e,mR,HL),ZL=e=>sR(e,lR,HL),QL=e=>sR(e,uR,WL),$L=e=>sR(e,gR,UL),J=e=>OL.test(e),eR=e=>cR(e,fR),tR=e=>cR(e,mR),nR=e=>cR(e,lR),rR=e=>cR(e,dR),iR=e=>cR(e,uR),aR=e=>cR(e,gR,!0),oR=e=>cR(e,hR,!0),sR=(e,t,n)=>{let r=DL.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},cR=(e,t,n=!1)=>{let r=OL.exec(e);return r?r[1]?t(r[1]):n:!1},lR=e=>e===`position`||e===`percentage`,uR=e=>e===`image`||e===`url`,dR=e=>e===`length`||e===`size`||e===`bg-size`,fR=e=>e===`length`,pR=e=>e===`number`,mR=e=>e===`family-name`,hR=e=>e===`number`||e===`weight`,gR=e=>e===`shadow`,_R=wL(()=>{let e=EL(`color`),t=EL(`font`),n=EL(`text`),r=EL(`font-weight`),i=EL(`tracking`),a=EL(`leading`),o=EL(`breakpoint`),s=EL(`container`),c=EL(`spacing`),l=EL(`radius`),u=EL(`shadow`),d=EL(`inset-shadow`),f=EL(`text-shadow`),p=EL(`drop-shadow`),m=EL(`blur`),h=EL(`perspective`),g=EL(`aspect`),_=EL(`ease`),v=EL(`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(),J,q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[J,q,c],T=()=>[FL,`full`,`auto`,...w()],E=()=>[LL,`none`,`subgrid`,J,q],D=()=>[`auto`,{span:[`full`,LL,J,q]},LL,J,q],O=()=>[LL,`auto`,J,q],k=()=>[`auto`,`min`,`max`,`fr`,J,q],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[FL,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[FL,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[FL,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,J,q],L=()=>[...b(),nR,ZL,{position:[J,q]}],ee=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],R=()=>[`auto`,`cover`,`contain`,rR,KL,{size:[J,q]}],z=()=>[RL,eR,qL],B=()=>[``,`none`,`full`,l,J,q],V=()=>[``,IL,eR,qL],H=()=>[`solid`,`dashed`,`dotted`,`double`],U=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],te=()=>[IL,RL,nR,ZL],ne=()=>[``,`none`,m,J,q],re=()=>[`none`,IL,J,q],ie=()=>[`none`,IL,J,q],ae=()=>[IL,J,q],oe=()=>[FL,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[zL],breakpoint:[zL],color:[BL],container:[zL],"drop-shadow":[zL],ease:[`in`,`out`,`in-out`],font:[GL],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[zL],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[zL],shadow:[zL],spacing:[`px`,IL],text:[zL],"text-shadow":[zL],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,FL,q,J,g]}],container:[`container`],columns:[{columns:[IL,q,J,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:[LL,`auto`,J,q]}],basis:[{basis:[FL,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[IL,FL,`auto`,`initial`,`none`,q]}],grow:[{grow:[``,IL,J,q]}],shrink:[{shrink:[``,IL,J,q]}],order:[{order:[LL,`first`,`last`,`none`,J,q]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,eR,qL]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,oR,YL]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,RL,q]}],"font-family":[{font:[tR,XL,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,J,q]}],"line-clamp":[{"line-clamp":[IL,`none`,J,JL]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,J,q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,J,q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...H(),`wavy`]}],"text-decoration-thickness":[{decoration:[IL,`from-font`,`auto`,J,qL]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[IL,`auto`,J,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()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,J,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`,J,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:L()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:R()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},LL,J,q],radial:[``,J,q],conic:[LL,J,q]},iR,QL]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:V()}],"border-w-x":[{"border-x":V()}],"border-w-y":[{"border-y":V()}],"border-w-s":[{"border-s":V()}],"border-w-e":[{"border-e":V()}],"border-w-bs":[{"border-bs":V()}],"border-w-be":[{"border-be":V()}],"border-w-t":[{"border-t":V()}],"border-w-r":[{"border-r":V()}],"border-w-b":[{"border-b":V()}],"border-w-l":[{"border-l":V()}],"divide-x":[{"divide-x":V()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":V()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...H(),`hidden`,`none`]}],"divide-style":[{divide:[...H(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...H(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[IL,J,q]}],"outline-w":[{outline:[``,IL,eR,qL]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,aR,$L]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,aR,$L]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:V()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[IL,qL]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":V()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,aR,$L]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[IL,J,q]}],"mix-blend":[{"mix-blend":[...U(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":U()}],"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":[IL]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[J,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[IL]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,J,q]}],filter:[{filter:[``,`none`,J,q]}],blur:[{blur:ne()}],brightness:[{brightness:[IL,J,q]}],contrast:[{contrast:[IL,J,q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,aR,$L]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,IL,J,q]}],"hue-rotate":[{"hue-rotate":[IL,J,q]}],invert:[{invert:[``,IL,J,q]}],saturate:[{saturate:[IL,J,q]}],sepia:[{sepia:[``,IL,J,q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,J,q]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[IL,J,q]}],"backdrop-contrast":[{"backdrop-contrast":[IL,J,q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,IL,J,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[IL,J,q]}],"backdrop-invert":[{"backdrop-invert":[``,IL,J,q]}],"backdrop-opacity":[{"backdrop-opacity":[IL,J,q]}],"backdrop-saturate":[{"backdrop-saturate":[IL,J,q]}],"backdrop-sepia":[{"backdrop-sepia":[``,IL,J,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`,J,q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[IL,`initial`,J,q]}],ease:[{ease:[`linear`,`initial`,_,J,q]}],delay:[{delay:[IL,J,q]}],animate:[{animate:[`none`,v,J,q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,J,q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":[`scale-3d`],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[J,q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"translate-none":[`translate-none`],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,J,q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":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`,J,q]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[IL,eR,qL,JL]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`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`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Y(...e){return _R(Iy(e))}var vR={light:``,dark:`.dark`},yR=W.createContext(null);function bR(){let e=W.useContext(yR);if(!e)throw Error(`useChart must be used within a <ChartContainer />`);return e}var xR=W.forwardRef(({id:e,className:t,children:n,config:r,...i},a)=>{let o=W.useId(),s=`chart-${e||o.replace(/:/g,``)}`;return(0,G.jsx)(yR.Provider,{value:{config:r},children:(0,G.jsxs)(`div`,{className:Y(`flex justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-neutral-500 [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-panel [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-panel [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none`,t),"data-chart":s,ref:a,...i,children:[(0,G.jsx)(SR,{config:r,id:s}),(0,G.jsx)(qw,{initialDimension:{width:1,height:1},children:n})]})})});xR.displayName=`ChartContainer`;function SR({config:e,id:t}){let n=Object.entries(e).filter(([,e])=>e.theme||e.color);return n.length<1?null:(0,G.jsx)(`style`,{dangerouslySetInnerHTML:{__html:Object.entries(vR).map(([e,r])=>`${r} [data-chart='${t}'] {\n${n.map(([t,n])=>{let r=n.theme?.[e]??n.color;return r?` --color-${t}: ${r};`:null}).filter(Boolean).join(`
|
|
17
|
+
`)}\n}`).join(`
|
|
18
|
+
`)}})}var CR=W.forwardRef(({active:e,className:t,color:n,formatter:r,hideIndicator:i=!1,hideLabel:a=!1,indicator:o=`dot`,label:s,labelClassName:c,labelFormatter:l,labelKey:u,nameKey:d,payload:f},p)=>{let{config:m}=bR(),h=W.useMemo(()=>{if(a||!f?.length)return null;let e=f[0];if(!e)return null;let t=wR(m,e,`${u||e.dataKey||e.name||`value`}`),n=!u&&typeof s==`string`?m[s]?.label??s:t?.label;return l?(0,G.jsx)(`div`,{className:Y(`font-medium`,c),children:l(n??``,f)}):n?(0,G.jsx)(`div`,{className:Y(`font-medium`,c),children:n}):null},[m,a,s,c,l,u,f]);if(!e||!f?.length)return null;let g=f.length===1&&o!==`dot`;return(0,G.jsxs)(`div`,{className:Y(`grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-surface px-2.5 py-1.5 text-xs shadow-xl`,t),ref:p,children:[g?null:h,(0,G.jsx)(`div`,{className:`grid gap-1.5`,children:f.map((e,t)=>{let a=`${d||e.name||e.dataKey||`value`}`,s=wR(m,e,a),c=n||e.payload?.fill||e.color;return(0,G.jsx)(`div`,{className:Y(`flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-neutral-500`,o===`dot`?`items-center`:null),children:r&&e.value!==void 0&&e.name?r(e.value,e.name,e,t,e.payload??{}):(0,G.jsxs)(G.Fragment,{children:[s?.icon?(0,G.jsx)(s.icon,{}):i?null:(0,G.jsx)(`div`,{className:Y(`shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]`,o===`dot`?`h-2.5 w-2.5`:null,o===`line`?`w-1`:null,o===`dashed`?`w-0 border-[1.5px] border-dashed bg-transparent`:null,g&&o===`dashed`?`my-0.5`:null),style:{"--color-bg":c,"--color-border":c}}),(0,G.jsxs)(`div`,{className:Y(`flex flex-1 justify-between leading-none`,g?`items-end`:`items-center`),children:[(0,G.jsxs)(`div`,{className:`grid gap-1.5`,children:[g?h:null,(0,G.jsx)(`span`,{className:`text-neutral-500`,children:s?.label||e.name})]}),e.value===void 0?null:(0,G.jsx)(`span`,{className:`font-mono font-medium tabular-nums text-foreground`,children:typeof e.value==`number`?e.value.toLocaleString():e.value})]})]})},a)})})]})});CR.displayName=`ChartTooltipContent`;function wR(e,t,n){let r=t.payload?.[n],i=typeof r==`string`?r:null,a=typeof t.dataKey==`string`?t.dataKey:null,o=typeof t.name==`string`?t.name:null;return e[i??a??o??n]}var TR=[`1h`,`6h`,`24h`,`7d`],ER=(0,W.forwardRef)(({className:e,bars:t,activeRange:n=`1h`,onRangeChange:r,startLabel:i=`-1h`,midLabel:a=`-30m`,endLabel:o=`now`,...s},c)=>(0,G.jsxs)(`div`,{ref:c,className:Y(`px-5 pt-4 pb-3 border-b border-border`,e),...s,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-500 uppercase tracking-widest`,children:`Activity`}),(0,G.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,G.jsx)(`span`,{className:`w-2 h-2 rounded-sm bg-healthy/70`}),(0,G.jsx)(`span`,{className:`font-mono text-[9px] text-neutral-500`,children:`Push`})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,G.jsx)(`span`,{className:`w-2 h-2 rounded-sm bg-flow/70`}),(0,G.jsx)(`span`,{className:`font-mono text-[9px] text-neutral-500`,children:`Pull`})]}),(0,G.jsx)(`div`,{className:`flex gap-0.5 ml-2`,children:TR.map(e=>(0,G.jsx)(`button`,{type:`button`,onClick:()=>r?.(e),className:Y(`font-mono text-[9px] border rounded-sm px-1.5 py-0.5 cursor-pointer transition-all`,e===n?`text-white border-border-bright bg-white/[0.03]`:`text-neutral-500 border-transparent hover:text-neutral-300`),children:e},e))})]})]}),(0,G.jsx)(`div`,{className:`flex items-end gap-[2px] h-16`,children:t.map((e,t)=>(0,G.jsxs)(`div`,{className:`flex-1 flex flex-col gap-[1px] h-16 justify-end`,children:[(0,G.jsx)(`div`,{className:`bg-flow/60 rounded-t-sm min-h-[2px]`,style:{height:`${e.pullPercent}%`}}),(0,G.jsx)(`div`,{className:`bg-healthy/60 rounded-t-sm min-h-[2px]`,style:{height:`${e.pushPercent}%`}})]},t))}),(0,G.jsxs)(`div`,{className:`flex justify-between mt-1.5`,children:[(0,G.jsx)(`span`,{className:`font-mono text-[8px] text-neutral-600`,children:i}),(0,G.jsx)(`span`,{className:`font-mono text-[8px] text-neutral-600`,children:a}),(0,G.jsx)(`span`,{className:`font-mono text-[8px] text-neutral-600`,children:o})]})]}));ER.displayName=`ActivityBars`;var DR=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,OR=Iy,kR=(e,t)=>n=>{if(t?.variants==null)return OR(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=DR(t)||DR(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return OR(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},AR=kR(`bg-surface border border-border rounded-md px-3 py-1.5 text-foreground outline-none w-full transition focus:border-flow placeholder:text-neutral-600`,{variants:{variant:{default:`font-sans text-[13px]`,mono:`font-mono text-[12px]`}},defaultVariants:{variant:`default`}}),jR=(0,W.forwardRef)(({className:e,variant:t,...n},r)=>(0,G.jsx)(`input`,{ref:r,className:Y(AR({variant:t,className:e})),...n}));jR.displayName=`Input`;function MR({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=W.useRef(e!==void 0),[a,o]=W.useState(t);return[i?e:a,W.useCallback(e=>{i||o(e)},[])]}var NR={};function PR(e,t){let n=W.useRef(NR);return n.current===NR&&(n.current=e(t)),n}var FR=W[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],IR=FR&&FR!==W.useLayoutEffect?FR:e=>e();function X(e){let t=PR(LR).current;return t.next=e,IR(t.effect),t.trampoline}function LR(){let e={next:void 0,callback:RR,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function RR(){}function zR(e,t,n,r){let i=PR(VR).current;return HR(i,e,t,n,r)&&WR(i,[e,t,n,r]),i.callback}function BR(e){let t=PR(VR).current;return UR(t,e)&&WR(t,e),t.callback}function VR(){return{callback:null,cleanup:null,refs:[]}}function HR(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function UR(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function WR(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;break;default:}}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;break;default:}}}}}}var Z=typeof document<`u`?W.useLayoutEffect:()=>{},GR={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},KR={...GR,position:`fixed`,top:0,left:0},qR={...GR,position:`absolute`};function JR(){}var YR=Object.freeze([]),XR=Object.freeze({});function ZR(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 QR=ZR(`https://base-ui.com/production-error`,`Base UI`),$R=19;function ez(e){return $R>=e}function tz(e){if(!W.isValidElement(e))return null;let t=e,n=t.props;return(ez(19)?n?.ref:t.ref)??null}function nz(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function rz(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 iz(e,t){return typeof e==`function`?e(t):e}function az(e,t){return typeof e==`function`?e(t):e}var oz={};function sz(e,t,n,r,i){let a={...pz(e,oz)};return t&&(a=lz(a,t)),n&&(a=lz(a,n)),r&&(a=lz(a,r)),i&&(a=lz(a,i)),a}function cz(e){if(e.length===0)return oz;if(e.length===1)return pz(e[0],oz);let t={...pz(e[0],oz)};for(let n=1;n<e.length;n+=1)t=lz(t,e[n]);return t}function lz(e,t){return fz(t)?t(e):uz(e,t)}function uz(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=nz(e.style,r);break;case`className`:e[n]=gz(e.className,r);break;default:dz(n,r)?e[n]=mz(e[n],r):e[n]=r}}return e}function dz(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 fz(e){return typeof e==`function`}function pz(e,t){return fz(e)?e(t):e??oz}function mz(e,t){return t?e?n=>{if(_z(n)){let r=n;hz(r);let i=t(r);return r.baseUIHandlerPrevented||e?.(r),i}let r=t(n);return e?.(n),r}:t:e}function hz(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function gz(e,t){return t?e?t+` `+e:t:e}function _z(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}var vz={style:{transition:`none`}},yz={fallbackAxisSide:`none`},bz={fallbackAxisSide:`end`},xz={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0};function Sz(e,t,n={}){let r=t.render,i=Cz(t,n);return n.enabled===!1?null:Tz(e,r,i,n.state??XR)}function Cz(e,t={}){let{className:n,style:r,render:i}=e,{state:a=XR,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?iz(n,a):void 0,d=l?az(r,a):void 0,f=l?rz(a,c):XR,p=l?nz(f,Array.isArray(s)?cz(s):s)??XR:XR;return typeof document<`u`&&(l?Array.isArray(o)?p.ref=BR([p.ref,tz(i),...o]):p.ref=zR(p.ref,tz(i),o):zR(null,null)),l?(u!==void 0&&(p.className=gz(p.className,u)),d!==void 0&&(p.style=nz(p.style,d)),p):XR}var wz=Symbol.for(`react.lazy`);function Tz(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=sz(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===wz&&(i=W.Children.toArray(t)[0]),W.cloneElement(i,e)}if(e&&typeof e==`string`)return Ez(e,n);throw Error(QR(8))}function Ez(e,t){return e===`button`?(0,W.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,W.createElement)(`img`,{alt:``,...t,key:t.key}):W.createElement(e,t)}var Dz={...W},Oz=0;function kz(e,t=`mui`){let[n,r]=W.useState(e),i=e||n;return W.useEffect(()=>{n??(Oz+=1,r(`${t}-${Oz}`))},[n,t]),i}var Az=Dz.useId;function jz(e,t){if(Az!==void 0){let n=Az();return e??(t?`${t}-${n}`:n)}return kz(e,t)}function Mz(e){return jz(e,`base-ui`)}function Nz(){return typeof window<`u`}function Pz(e){return Lz(e)?(e.nodeName||``).toLowerCase():`#document`}function Fz(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Iz(e){return((Lz(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Lz(e){return Nz()?e instanceof Node||e instanceof Fz(e).Node:!1}function Rz(e){return Nz()?e instanceof Element||e instanceof Fz(e).Element:!1}function zz(e){return Nz()?e instanceof HTMLElement||e instanceof Fz(e).HTMLElement:!1}function Bz(e){return!Nz()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Fz(e).ShadowRoot}function Vz(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Qz(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Hz(e){return/^(table|td|th)$/.test(Pz(e))}function Uz(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Wz=/transform|translate|scale|rotate|perspective|filter/,Gz=/paint|layout|strict|content/,Kz=e=>!!e&&e!==`none`,qz;function Jz(e){let t=Rz(e)?Qz(e):e;return Kz(t.transform)||Kz(t.translate)||Kz(t.scale)||Kz(t.rotate)||Kz(t.perspective)||!Xz()&&(Kz(t.backdropFilter)||Kz(t.filter))||Wz.test(t.willChange||``)||Gz.test(t.contain||``)}function Yz(e){let t=eB(e);for(;zz(t)&&!Zz(t);){if(Jz(t))return t;if(Uz(t))return null;t=eB(t)}return null}function Xz(){return qz??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),qz}function Zz(e){return/^(html|body|#document)$/.test(Pz(e))}function Qz(e){return Fz(e).getComputedStyle(e)}function $z(e){return Rz(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function eB(e){if(Pz(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Bz(e)&&e.host||Iz(e);return Bz(t)?t.host:t}function tB(e){let t=eB(e);return Zz(t)?e.ownerDocument?e.ownerDocument.body:e.body:zz(t)&&Vz(t)?t:tB(t)}function nB(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=tB(e),i=r===e.ownerDocument?.body,a=Fz(r);if(i){let e=rB(a);return t.concat(a,a.visualViewport||[],Vz(r)?r:[],e&&n?nB(e):[])}else return t.concat(r,nB(r,[],n))}function rB(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var iB=W.createContext(void 0);function aB(e=!1){let t=W.useContext(iB);if(t===void 0&&!e)throw Error(QR(16));return t}function oB(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:W.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 sB(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=W.useRef(null),s=aB(!0),c=a??s!==void 0,{props:l}=oB({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=W.useCallback(()=>{let e=o.current;cB(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return Z(u,[u]),{getButtonProps:W.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return sz({type:i?`button`:void 0,onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(hz(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,a=e.currentTarget,s=cB(a),l=!i&&lB(a),u=r&&(i?s:!l),d=e.key===`Enter`,f=e.key===` `,p=a.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&c&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),l||i&&s?(a.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!i&&(f||d)&&e.preventDefault(),!i&&d&&n?.(e))},onKeyUp(e){if(!t){if(hz(e),a?.(e),e.target===e.currentTarget&&i&&c&&cB(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?void 0:{role:`button`},l,u)},[t,l,c,i]),buttonRef:X(e=>{o.current=e,u()})}}function cB(e){return zz(e)&&e.tagName===`BUTTON`}function lB(e){return!!(e?.tagName===`A`&&e?.href)}var uB=W.createContext(void 0);function dB(){let e=W.useContext(uB);if(e===void 0)throw Error(QR(63));return e}var fB=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),pB={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},mB={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},hB={disabled:!1,...mB},gB={valid(e){return e===null?null:e?{[fB.valid]:``}:{[fB.invalid]:``}}},_B=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.disabled=`data-disabled`,e.readonly=`data-readonly`,e.required=`data-required`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),vB={...gB,checked(e){return e?{[_B.checked]:``}:{[_B.unchecked]:``}}};function yB(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}var bB=W.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:JR,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function xB(){return W.useContext(bB)}var SB=W.createContext({invalid:void 0,name:void 0,validityData:{state:pB,errors:[],error:``,value:``,initialValue:null},setValidityData:JR,disabled:void 0,touched:mB.touched,setTouched:JR,dirty:mB.dirty,setDirty:JR,filled:mB.filled,setFilled:JR,focused:mB.focused,setFocused:JR,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:hB,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=XR)=>e,getInputValidationProps:(e=XR)=>e,inputRef:{current:null},commit:async()=>{}}});function CB(e=!0){let t=W.useContext(SB);if(t.setValidityData===JR&&!e)throw Error(QR(28));return t}function wB(e){let{enabled:t=!0,value:n,id:r,name:i,controlRef:a,commit:o}=e,{formRef:s}=xB(),{invalid:c,markedDirtyRef:l,validityData:u,setValidityData:d}=CB(),f=X(e.getValue);Z(()=>{if(!t)return;let e=n;e===void 0&&(e=f()),u.initialValue===null&&e!==null&&d(t=>({...t,initialValue:e}))},[t,d,n,u.initialValue,f]),Z(()=>{!t||!r||s.current.fields.set(r,{getValue:f,name:i,controlRef:a,validityData:yB(u,c),validate(e=!0){let t=n;t===void 0&&(t=f()),l.current=!0,e?Dv.flushSync(()=>o(t)):o(t)}})},[o,a,t,s,f,r,c,l,i,u,n]),Z(()=>{let e=s.current.fields;return()=>{r&&e.delete(r)}},[s,r])}var TB=W.createContext({controlId:void 0,registerControlId:JR,labelId:void 0,setLabelId:JR,messageIds:[],setMessageIds:JR,getDescriptionProps:e=>e});function EB(){return W.useContext(TB)}function DB(e,t,n,r=!0,i){let[a,o]=W.useState(),s=Mz(i?`${i}-label`:void 0),c=e??t??a;return Z(()=>{let i=e||t||!r?void 0:OB(n.current,s);a!==i&&o(i)}),c}function OB(e,t){let n=kB(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function kB(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}function AB(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=EB(),o=Mz(t),s=n?i:void 0,c=PR(()=>Symbol(`labelable-control`)),l=W.useRef(!1),u=W.useRef(t!=null),d=X(()=>{!l.current||a===JR||(l.current=!1,a(c.current,void 0))});return Z(()=>{if(a===JR)return;let e;if(n){let n=r?.current;e=Rz(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),W.useEffect(()=>d,[d]),i??o}var jB=`none`,MB=`trigger-press`,NB=`trigger-hover`,PB=`trigger-focus`,FB=`outside-press`,IB=`item-press`,LB=`focus-out`,RB=`escape-key`,zB=`cancel-open`,BB=`disabled`,VB=`imperative-action`,HB=`window-resize`;function UB(e,t,n,r){let i=!1,a=!1,o=r??XR;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}}function WB(e,t){let n=W.useRef(e),r=X(t);Z(()=>{n.current!==e&&r(n.current)},[e,r]),Z(()=>{n.current=e},[e])}var GB=W.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i,"aria-labelledby":a,id:o,inputRef:s,name:c,nativeButton:l=!1,onCheckedChange:u,readOnly:d=!1,required:f=!1,disabled:p=!1,render:m,uncheckedValue:h,value:g,..._}=e,{clearErrors:v}=xB(),{state:y,setTouched:b,setDirty:x,validityData:S,setFilled:C,setFocused:w,shouldValidateOnChange:T,validationMode:E,disabled:D,name:O,validation:k}=CB(),{labelId:A}=EB(),j=D||p,M=O??c,N=X(u),P=W.useRef(null),F=zR(P,s,k.inputRef),I=W.useRef(null),L=Mz(),ee=AB({id:o,implicit:!1,controlRef:I}),R=l?void 0:ee,[z,B]=MR({controlled:n,default:!!i,name:`Switch`,state:`checked`});wB({id:L,commit:k.commit,value:z,controlRef:I,name:M,getValue:()=>z}),Z(()=>{P.current&&C(P.current.checked)},[P,C]),WB(z,()=>{v(M),x(z!==S.initialValue),C(z),T()?k.commit(z):k.commit(z,!0)});let{getButtonProps:V,buttonRef:H}=sB({disabled:j,native:l}),U=DB(a,A,P,!l,R),te={id:l?ee:L,role:`switch`,"aria-checked":z,"aria-readonly":d||void 0,"aria-required":f||void 0,"aria-labelledby":U,onFocus(){j||w(!0)},onBlur(){let e=P.current;!e||j||(b(!0),w(!1),E===`onBlur`&&k.commit(e.checked))},onClick(e){d||j||(e.preventDefault(),P.current?.dispatchEvent(new PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},ne=W.useMemo(()=>sz({checked:z,disabled:j,id:R,name:M,required:f,style:M?qR:KR,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:F,onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked,n=UB(jB,e.nativeEvent);N?.(t,n),!n.isCanceled&&B(t)},onFocus(){I.current?.focus()}},k.getInputValidationProps,g===void 0?XR:{value:g}),[z,j,F,R,M,N,f,B,k,g]),re=W.useMemo(()=>({...y,checked:z,disabled:j,readOnly:d,required:f}),[y,z,j,d,f]),ie=Sz(`span`,e,{state:re,ref:[t,I,H],props:[te,k.getValidationProps,_,V],stateAttributesMapping:vB});return(0,G.jsxs)(uB.Provider,{value:re,children:[ie,!z&&M&&h!==void 0&&(0,G.jsx)(`input`,{type:`hidden`,name:M,value:h}),(0,G.jsx)(`input`,{...ne})]})}),KB=W.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{state:a}=CB(),o=dB();return Sz(`span`,e,{state:{...a,...o},ref:t,stateAttributesMapping:vB,props:i})}),qB=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(GB,{ref:n,className:Y(`relative w-[34px] h-[18px] bg-border-bright rounded-full cursor-pointer transition data-[checked]:bg-healthy`,e),...t,children:(0,G.jsx)(KB,{className:`block w-[14px] h-[14px] bg-white rounded-full transition-transform data-[checked]:translate-x-4 absolute top-0.5 left-0.5`})}));qB.displayName=`Switch`;var JB=(0,W.forwardRef)(({className:e,enabled:t=!0,onEnabledChange:n,thresholds:r,onThresholdsChange:i,...a},o)=>{function s(e,t){let n=Number(t);Number.isFinite(n)&&i?.({...r,[e]:n})}return(0,G.jsxs)(`div`,{ref:o,className:Y(`bg-panel border border-border rounded-lg hover:border-border-bright transition`,e),...a,children:[(0,G.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-border flex items-center justify-between`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-offline`}),(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-500 uppercase tracking-widest`,children:`Alerts`})]}),(0,G.jsx)(qB,{checked:t,onCheckedChange:e=>n?.(e)})]}),(0,G.jsxs)(`div`,{className:`p-4 space-y-3`,children:[(0,G.jsx)(YB,{label:`P90 latency threshold`,value:r.p90Latency,onChange:e=>s(`p90Latency`,e)}),(0,G.jsx)(YB,{label:`Error rate threshold`,value:r.errorRate,onChange:e=>s(`errorRate`,e)}),(0,G.jsx)(YB,{label:`Client lag threshold`,value:r.clientLag,onChange:e=>s(`clientLag`,e)})]})]})});JB.displayName=`AlertsConfig`;function YB({label:e,value:t,onChange:n}){return(0,G.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-500`,children:e}),(0,G.jsx)(jR,{variant:`mono`,type:`number`,value:t,onChange:e=>n(e.target.value),className:`w-[100px] text-[11px] px-2 py-1 text-right`})]})}var XB=kR(`inline-flex items-center gap-1 px-2 py-0.5 rounded-sm font-mono text-[9px] leading-normal uppercase tracking-wider`,{variants:{variant:{default:`bg-white/[0.05] text-neutral-300 border border-border-bright`,destructive:`bg-offline/10 text-offline border border-offline/20`,ghost:`bg-transparent text-neutral-500 border border-border-bright`,outline:`bg-transparent text-neutral-400 border border-border-bright`,secondary:`bg-panel text-neutral-400 border border-border`,healthy:`bg-healthy/10 text-healthy border border-healthy/20`,syncing:`bg-syncing/10 text-syncing border border-syncing/20`,offline:`bg-offline/10 text-offline border border-offline/20`,flow:`bg-flow/10 text-flow border border-flow/20`,relay:`bg-relay/10 text-relay border border-relay/20`}},defaultVariants:{variant:`default`}}),ZB=(0,W.forwardRef)(({className:e,variant:t,style:n,...r},i)=>(0,G.jsx)(`span`,{ref:i,className:Y(XB({variant:t,className:e})),style:{lineHeight:1,...n},...r}));ZB.displayName=`Badge`;var QB=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`div`,{ref:n,role:`table`,className:Y(`w-full`,e),...t}));QB.displayName=`Table`;var $B=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`div`,{ref:n,role:`rowgroup`,className:Y(e),...t}));$B.displayName=`TableHeader`;var eV=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`div`,{ref:n,role:`rowgroup`,className:Y(e),...t}));eV.displayName=`TableBody`;var tV=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`div`,{ref:n,role:`row`,className:Y(`font-mono text-[11px] leading-6 px-4 flex items-center gap-4 border-b border-[#141414] hover:bg-white/[0.015] transition-colors cursor-default`,e),...t}));tV.displayName=`TableRow`;var nV=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`div`,{ref:n,role:`columnheader`,className:Y(`min-w-0 font-mono text-[9px] text-neutral-600 uppercase tracking-wider leading-6 bg-white/[0.01] text-left truncate`,e),...t}));nV.displayName=`TableHead`;var rV=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`div`,{ref:n,role:`cell`,className:Y(`min-w-0 whitespace-nowrap overflow-hidden text-ellipsis`,e),...t}));rV.displayName=`TableCell`;var iV={relay:`relay`,admin:`flow`,proxy:`ghost`},aV=(0,W.forwardRef)(({className:e,keys:t,onCreateKey:n,onRotateKey:r,onRevokeKey:i,...a},o)=>(0,G.jsx)(`div`,{ref:o,className:Y(`w-full`,e),...a,children:(0,G.jsxs)(QB,{children:[(0,G.jsx)($B,{children:(0,G.jsxs)(tV,{children:[(0,G.jsx)(nV,{children:`Name`}),(0,G.jsx)(nV,{children:`Type`}),(0,G.jsx)(nV,{children:`Prefix`}),(0,G.jsx)(nV,{children:`Created`})]})}),(0,G.jsx)(eV,{children:t.map((e,t)=>(0,G.jsxs)(tV,{className:`group relative`,children:[(0,G.jsx)(rV,{children:(0,G.jsx)(`span`,{className:`text-white truncate`,children:e.name})}),(0,G.jsx)(rV,{children:(0,G.jsx)(ZB,{variant:iV[e.type]??`ghost`,children:e.type})}),(0,G.jsx)(rV,{children:(0,G.jsx)(`span`,{className:`text-neutral-500 truncate`,children:e.prefix})}),(0,G.jsx)(rV,{children:(0,G.jsx)(`span`,{className:`text-neutral-600 truncate`,children:e.created})}),(r||i)&&(0,G.jsxs)(`div`,{className:`absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity`,children:[r&&(0,G.jsx)(`button`,{type:`button`,onClick:()=>r(e.name),className:`flex items-center gap-1 px-1.5 py-0.5 rounded text-[9px] text-neutral-600 hover:text-white hover:bg-white/[0.05] cursor-pointer transition-colors`,children:`rotate`}),i&&(0,G.jsx)(`button`,{type:`button`,onClick:()=>i(e.name),className:`flex items-center gap-1 px-1.5 py-0.5 rounded text-[9px] text-neutral-600 hover:text-offline hover:bg-offline/10 cursor-pointer transition-colors`,children:`revoke`})]})]},`${e.name}:${e.prefix}:${t}`))})]})}));aV.displayName=`ApiKeysTable`;var oV=(0,W.forwardRef)(({className:e,metrics:t=[],uptime:n,isLive:r=!0,...i},a)=>(0,G.jsxs)(`div`,{ref:a,className:Y(`fixed bottom-0 left-0 right-0 z-100 h-8 border-t border-border bg-surface/92 backdrop-blur-lg flex items-center justify-between px-5`,e),...i,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,G.jsx)(`div`,{className:`flex items-center gap-[2px]`,children:[0,.1,.2,.3,.4].map(e=>(0,G.jsx)(`div`,{className:`w-0.5 h-1.5 bg-healthy rounded-sm animate-[heartbeat_1.2s_ease-in-out_infinite]`,style:{animationDelay:`${e}s`}},e))}),r&&(0,G.jsx)(`span`,{className:`font-mono text-[9px] text-healthy uppercase tracking-widest`,children:`Live`})]}),(0,G.jsx)(`div`,{className:`flex items-center gap-6`,children:t.map(e=>(0,G.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,G.jsx)(`span`,{className:`font-mono text-[9px] text-neutral-600`,children:e.label}),(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-300`,children:e.value})]},e.label))}),n!=null&&(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`font-mono text-[9px] text-neutral-600`,children:`UPTIME`}),(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-400`,children:n})]})]}));oV.displayName=`BottomBar`;var sV=(0,W.forwardRef)(({className:e,commits:t,onViewAll:n,...r},i)=>(0,G.jsxs)(`div`,{ref:i,className:Y(`px-5 pt-3 pb-2`,e),...r,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-500 uppercase tracking-widest`,children:`Recent Commits`}),n&&(0,G.jsx)(`button`,{type:`button`,onClick:n,className:`inline-flex items-center gap-1.5 rounded-md font-mono text-[9px] px-2 py-0.5 border border-border-bright bg-transparent text-neutral-400 hover:text-white hover:bg-white/[0.03] cursor-pointer transition-all`,children:`View all →`})]}),(0,G.jsxs)(`div`,{className:`font-mono text-[9px] tracking-wider uppercase text-neutral-600 flex items-center gap-4 px-4 leading-[22px] border-b border-border`,children:[(0,G.jsx)(`span`,{className:`w-[60px] truncate`,children:`Seq`}),(0,G.jsx)(`span`,{className:`w-[100px] truncate`,children:`Actor`}),(0,G.jsx)(`span`,{className:`w-[50px] truncate`,children:`Chg`}),(0,G.jsx)(`span`,{className:`flex-1 truncate`,children:`Tables`}),(0,G.jsx)(`span`,{className:`w-[70px] text-right truncate`,children:`Time`})]}),t.map(e=>(0,G.jsxs)(`div`,{className:`font-mono text-[11px] leading-7 px-4 flex items-center gap-4 border-b border-[#141414] hover:bg-white/[0.015] transition-colors cursor-default`,children:[(0,G.jsxs)(`span`,{className:`w-[60px] text-flow font-medium truncate`,children:[`#`,e.seq]}),(0,G.jsx)(`span`,{className:`w-[100px] text-neutral-400 truncate`,children:e.actor}),(0,G.jsx)(`span`,{className:`w-[50px] text-white truncate`,children:e.changes}),(0,G.jsx)(`span`,{className:`flex-1 truncate`,children:(0,G.jsx)(`span`,{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-sm font-mono text-[9px] uppercase tracking-wider bg-transparent text-neutral-500 border border-border-bright`,children:e.tables})}),(0,G.jsx)(`span`,{className:`w-[70px] text-right text-neutral-600 truncate`,children:e.time})]},e.seq))]}));sV.displayName=`CommitTable`;var cV=kR(`inline-flex items-center justify-center gap-1.5 rounded-md font-mono transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`border border-border-bright bg-transparent text-neutral-400 hover:text-white hover:bg-white/[0.03]`,primary:`border border-flow bg-flow/10 text-flow hover:bg-flow/20`,destructive:`border border-offline bg-offline/10 text-offline hover:bg-offline/20`,ghost:`border border-transparent bg-transparent text-neutral-400 hover:text-white hover:bg-white/[0.03]`,link:`border border-transparent bg-transparent text-neutral-400 underline underline-offset-4 hover:text-white`,secondary:`border border-border bg-panel text-neutral-400 hover:text-white hover:bg-white/[0.03]`},size:{sm:`text-[10px] px-2.5 py-1`,md:`text-[11px] px-3.5 py-1.5`,icon:`h-8 w-8`}},defaultVariants:{variant:`default`,size:`md`}}),Q=(0,W.forwardRef)(({className:e,variant:t,size:n,...r},i)=>(0,G.jsx)(`button`,{ref:i,className:Y(cV({variant:t,size:n,className:e})),...r}));Q.displayName=`Button`;var lV=(0,W.forwardRef)(({className:e,isConnected:t=!1,isConnecting:n=!1,isTestingConnection:r=!1,serverUrl:i,onServerUrlChange:a,consoleToken:o,onConsoleTokenChange:s,onSaveAndConnect:c,onDisconnect:l,onTestConnection:u,statusMessage:d,...f},p)=>(0,G.jsxs)(`div`,{ref:p,className:Y(`bg-panel border border-border rounded-lg hover:border-border-bright transition`,e),...f,children:[(0,G.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-border flex items-center justify-between`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:Y(`w-1.5 h-1.5 rounded-full`,t?`bg-healthy`:`bg-offline`),style:t?{boxShadow:`0 0 4px #22c55e`}:void 0}),(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-500 uppercase tracking-widest`,children:`Connection`})]}),(0,G.jsx)(ZB,{variant:t?`healthy`:`offline`,children:t?`Connected`:`Disconnected`})]}),(0,G.jsxs)(`div`,{className:`p-5 space-y-4`,children:[(0,G.jsx)(`p`,{className:`font-mono text-[10px] text-neutral-500`,children:`Configure the server endpoint and authentication token.`}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`label`,{htmlFor:`console-server-url`,className:`font-mono text-[9px] text-neutral-500 uppercase tracking-wider block mb-1.5`,children:`Server URL`}),(0,G.jsx)(jR,{id:`console-server-url`,variant:`mono`,value:i,onChange:e=>a?.(e.target.value)})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`label`,{htmlFor:`console-token`,className:`font-mono text-[9px] text-neutral-500 uppercase tracking-wider block mb-1.5`,children:`Console Token`}),(0,G.jsx)(jR,{id:`console-token`,variant:`mono`,type:`password`,value:o,onChange:e=>s?.(e.target.value)})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(Q,{variant:`primary`,size:`md`,onClick:c,disabled:n,children:n?`Connecting...`:`Save + Connect`}),(0,G.jsx)(Q,{variant:`default`,size:`md`,onClick:u,disabled:n||r,children:r?`Testing...`:`Test Connection`}),(0,G.jsx)(Q,{variant:`destructive`,size:`md`,onClick:l,disabled:!t,children:`Disconnect`})]}),d&&(0,G.jsx)(`div`,{className:Y(`font-mono text-[10px]`,t?`text-healthy`:`text-offline`),children:d})]})]}));lV.displayName=`ConnectionForm`;var uV=kR(`animate-spin text-neutral-500`,{variants:{size:{sm:`h-3 w-3`,md:`h-5 w-5`,lg:`h-8 w-8`}},defaultVariants:{size:`md`}}),dV=(0,W.forwardRef)(({className:e,size:t,...n},r)=>(0,G.jsxs)(`svg`,{ref:r,className:Y(uV({size:t,className:e})),xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...n,children:[(0,G.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,G.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]}));dV.displayName=`Spinner`;function fV({className:e,state:t}){switch(t){case`connected`:return(0,G.jsx)(ZB,{variant:`healthy`,className:e,children:`Connected`});case`disconnected`:return(0,G.jsx)(ZB,{variant:`destructive`,className:e,children:`Disconnected`});case`connecting`:return(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs text-neutral-400`,children:[(0,G.jsx)(dV,{size:`sm`}),`Connecting`]});case`not-configured`:return(0,G.jsx)(ZB,{variant:`ghost`,className:e,children:`Not configured`})}}var pV=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`div`,{ref:n,className:Y(`bg-panel border border-border rounded-lg hover:border-border-bright transition`,e),...t}));pV.displayName=`Card`;var mV=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`div`,{ref:n,className:Y(`px-4 py-2.5 border-b border-border flex items-center justify-between`,e),...t}));mV.displayName=`CardHeader`;var hV=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`h3`,{ref:n,className:Y(`font-mono text-[10px] text-neutral-500 uppercase tracking-widest`,e),...t}));hV.displayName=`CardTitle`;var gV=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`div`,{ref:n,className:Y(`p-4`,e),...t}));gV.displayName=`CardContent`;var _V=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`div`,{ref:n,className:Y(`px-4 py-2.5 border-t border-border`,e),...t}));_V.displayName=`CardFooter`;function vV({action:e,className:t,icon:n,message:r}){return(0,G.jsxs)(`div`,{className:Y(`flex flex-col items-center justify-center gap-3 py-12`,t),children:[n?(0,G.jsx)(`div`,{className:`text-neutral-500`,children:n}):null,(0,G.jsx)(`p`,{className:`font-mono text-[10px] text-neutral-500`,children:r}),e?(0,G.jsx)(`div`,{children:e}):null]})}var yV=(0,W.forwardRef)(({className:e,groups:t,searchValue:n,searchPlaceholder:r=`Filter by client or actor...`,onSearchChange:i,actions:a,...o},s)=>(0,G.jsxs)(`div`,{ref:s,className:Y(`px-5 py-3 border-b border-border flex items-center gap-4 flex-wrap`,e),...o,children:[t.map((e,t)=>(0,G.jsx)(bV,{group:e,showDivider:t>0},t)),i!==void 0&&(0,G.jsx)(`input`,{className:`bg-surface border border-border rounded-md font-mono text-[10px] text-foreground outline-none transition focus:border-flow placeholder:text-neutral-600 max-w-[200px] px-2.5 py-1`,placeholder:r,value:n,onChange:e=>i(e.target.value)}),a&&(0,G.jsx)(`div`,{className:`ml-auto flex items-center gap-2`,children:a})]}));yV.displayName=`FilterBar`;function bV({group:e,showDivider:t}){return(0,G.jsxs)(G.Fragment,{children:[t&&(0,G.jsx)(`div`,{className:`w-px h-4 bg-border`}),(0,G.jsxs)(`div`,{className:`flex items-center gap-1`,children:[e.label&&(0,G.jsx)(`span`,{className:`font-mono text-[9px] text-neutral-500 mr-1`,children:e.label}),e.options.map(t=>(0,G.jsx)(`button`,{type:`button`,onClick:()=>e.onActiveChange(t.id),className:Y(`font-mono text-[10px] border rounded-sm px-2.5 py-0.5 cursor-pointer transition-all`,t.id===e.activeId?`text-white border-border-bright bg-white/[0.03]`:`text-neutral-500 border-transparent hover:text-neutral-300`),children:t.label},t.id))]})]})}function xV(e){return e===0?`#22c55e`:e<10?`#f59e0b`:e<50?`#f97316`:`#ef4444`}var SV={online:`healthy`,syncing:`syncing`,offline:`offline`},CV={realtime:`flow`,polling:`ghost`},wV=(0,W.forwardRef)(({className:e,client:t,headSeq:n,onEvict:r,...i},a)=>{let o=Math.max(0,n-t.cursor),s=Math.min(100,t.cursor/n*100),c=xV(o);return(0,G.jsxs)(`div`,{ref:a,className:Y(`bg-panel border border-border rounded-lg hover:border-border-bright transition`,e),style:{borderLeft:`3px solid ${c}`},...i,children:[(0,G.jsxs)(`div`,{className:`px-3.5 py-2 border-b border-border flex items-center justify-between`,children:[(0,G.jsx)(`div`,{className:`flex items-center gap-2 min-w-0`,children:(0,G.jsx)(`span`,{className:`font-mono text-[11px] text-white truncate`,title:t.id,children:t.id.length>14?`${t.id.substring(0,14)}\u2026`:t.id})}),(0,G.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-shrink-0`,children:[(0,G.jsx)(ZB,{variant:SV[t.status],children:t.status}),(0,G.jsx)(ZB,{variant:CV[t.mode],children:t.mode})]})]}),(0,G.jsxs)(`div`,{className:`p-3 space-y-3`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,G.jsxs)(`span`,{className:`font-mono text-[9px] text-neutral-600`,children:[`#`,t.cursor.toLocaleString()]}),(0,G.jsxs)(`span`,{className:`font-mono text-[9px] text-neutral-600`,children:[`#`,n.toLocaleString()]})]}),(0,G.jsx)(`div`,{className:`h-1 rounded-full bg-surface`,children:(0,G.jsx)(`div`,{className:`h-full rounded-full transition-all`,style:{width:`${s}%`,background:c}})}),(0,G.jsx)(`div`,{className:`font-mono text-[9px] mt-1`,style:{color:c},children:o===0?`Caught up`:`${o} behind`})]}),(0,G.jsxs)(`div`,{className:`space-y-1`,children:[(0,G.jsx)(TV,{label:`Actor`,value:t.actor}),(0,G.jsx)(TV,{label:`Dialect`,value:t.dialect}),(0,G.jsx)(TV,{label:`Last seen`,value:t.lastSeen}),(0,G.jsxs)(`div`,{className:`flex justify-between items-start`,children:[(0,G.jsx)(`span`,{className:`font-mono text-[9px] text-neutral-600`,children:`Scopes`}),(0,G.jsxs)(`div`,{className:`flex gap-1 flex-wrap justify-end`,children:[t.scopes.slice(0,2).map(e=>(0,G.jsx)(ZB,{variant:`ghost`,children:e},e)),t.scopes.length>2&&(0,G.jsxs)(`span`,{className:`font-mono text-[9px] text-neutral-600`,children:[`+`,t.scopes.length-2]})]})]})]}),r&&(0,G.jsxs)(`button`,{type:`button`,onClick:r,className:`w-full inline-flex items-center justify-center gap-1.5 rounded-md font-mono text-[9px] px-2 py-1 border border-offline/25 bg-offline/[0.04] text-offline hover:border-offline hover:bg-offline/[0.08] cursor-pointer transition-all`,children:[(0,G.jsxs)(`svg`,{className:`w-3 h-3`,fill:`none`,stroke:`currentColor`,strokeWidth:2,viewBox:`0 0 24 24`,children:[(0,G.jsx)(`path`,{d:`M18.36 6.64a9 9 0 11-12.73 0`}),(0,G.jsx)(`line`,{x1:`12`,y1:`2`,x2:`12`,y2:`12`})]}),`Evict`]})]})]})});wV.displayName=`FleetCard`;function TV({label:e,value:t}){return(0,G.jsxs)(`div`,{className:`flex justify-between`,children:[(0,G.jsx)(`span`,{className:`font-mono text-[9px] text-neutral-600`,children:e}),(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-400`,children:t})]})}var EV=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),DV=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),OV=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),kV=e=>{let t=OV(e);return t.charAt(0).toUpperCase()+t.slice(1)},AV={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},jV=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},MV=(0,W.createContext)({}),NV=()=>(0,W.useContext)(MV),PV=(0,W.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=NV()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,W.createElement)(`svg`,{ref:c,...AV,width:t??l??AV.width,height:t??l??AV.height,stroke:e??f,strokeWidth:m,className:EV(`lucide`,p,i),...!a&&!jV(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,W.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),FV=(e,t)=>{let n=(0,W.forwardRef)(({className:n,...r},i)=>(0,W.createElement)(PV,{ref:i,iconNode:t,className:EV(`lucide-${DV(kV(e))}`,`lucide-${e}`,n),...r}));return n.displayName=kV(e),n},IV=FV(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),LV=FV(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),RV=FV(`user-x`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`17`,x2:`22`,y1:`8`,y2:`13`,key:`3nzzx3`}],[`line`,{x1:`22`,x2:`17`,y1:`8`,y2:`13`,key:`1swrse`}]]);function zV(e){return e===0?`#22c55e`:e<10?`#f59e0b`:e<50?`#f97316`:`#ef4444`}var BV={online:`healthy`,syncing:`syncing`,offline:`offline`},VV=(0,W.forwardRef)(({className:e,clients:t,headSeq:n,onEvict:r,...i},a)=>(0,G.jsx)(`div`,{ref:a,className:Y(`w-full`,e),...i,children:(0,G.jsxs)(QB,{children:[(0,G.jsx)($B,{children:(0,G.jsxs)(tV,{children:[(0,G.jsx)(nV,{className:`w-[160px]`,children:`Client`}),(0,G.jsx)(nV,{className:`w-[70px]`,children:`Status`}),(0,G.jsx)(nV,{className:`w-[60px]`,children:`Type`}),(0,G.jsx)(nV,{className:`w-[80px]`,children:`Cursor`}),(0,G.jsx)(nV,{className:`w-[110px]`,children:`Lag`}),(0,G.jsx)(nV,{className:`w-[60px]`,children:`Dialect`}),(0,G.jsx)(nV,{className:`flex-1`,children:`Mode`})]})}),(0,G.jsx)(eV,{children:t.map(e=>{let t=Math.max(0,n-e.cursor),i=n>0?Math.min(100,e.cursor/n*100):100,a=zV(t);return(0,G.jsxs)(tV,{className:`group relative`,children:[(0,G.jsx)(rV,{className:`w-[160px]`,children:(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full flex-shrink-0`,style:{background:a,boxShadow:`0 0 4px ${a}`}}),(0,G.jsx)(`span`,{className:`font-mono text-[11px] text-white truncate`,title:e.id,children:e.id.length>18?`${e.id.substring(0,18)}\u2026`:e.id})]})}),(0,G.jsx)(rV,{className:`w-[70px]`,children:(0,G.jsx)(ZB,{variant:BV[e.status],children:e.status})}),(0,G.jsx)(rV,{className:`w-[60px]`,children:(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-400`,children:e.type})}),(0,G.jsx)(rV,{className:`w-[80px]`,children:(0,G.jsxs)(`span`,{className:`font-mono text-[11px] text-white font-medium`,children:[`#`,e.cursor.toLocaleString()]})}),(0,G.jsx)(rV,{className:`w-[110px]`,children:(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`div`,{className:`w-[60px] h-[3px] rounded-full bg-surface overflow-hidden`,children:(0,G.jsx)(`div`,{className:`h-full rounded-full transition-all`,style:{width:`${i}%`,background:a}})}),(0,G.jsx)(`span`,{className:`font-mono text-[10px] font-medium`,style:{color:a},children:t===0?`0`:`${t}`})]})}),(0,G.jsx)(rV,{className:`w-[60px]`,children:(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-400`,children:e.dialect})}),(0,G.jsx)(rV,{className:`flex-1`,children:(0,G.jsx)(ZB,{variant:e.mode===`realtime`?`flow`:`ghost`,children:e.mode})}),r&&(0,G.jsxs)(`button`,{type:`button`,title:`Evict client`,onClick:()=>r(e.id),className:`absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-1 px-1.5 py-0.5 rounded text-[9px] text-neutral-600 hover:text-offline hover:bg-offline/10 cursor-pointer transition-colors opacity-0 group-hover:opacity-100`,children:[(0,G.jsx)(RV,{size:10}),`evict`]})]},e.id)})})]})}));VV.displayName=`FleetTable`;var HV=(0,W.forwardRef)(({className:e,handlers:t,tableCount:n,...r},i)=>{let a=n??t.length;return(0,G.jsxs)(`div`,{ref:i,className:Y(`bg-panel border border-border rounded-lg hover:border-border-bright transition`,e),...r,children:[(0,G.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-border flex items-center justify-between`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-flow`}),(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-500 uppercase tracking-widest`,children:`Handlers`})]}),(0,G.jsxs)(`span`,{className:`font-mono text-[10px] text-neutral-600`,children:[a,` tables`]})]}),(0,G.jsxs)(`div`,{className:`font-mono text-[9px] tracking-wider uppercase text-neutral-600 flex items-center gap-4 px-4 leading-6 border-b border-border`,children:[(0,G.jsx)(`span`,{className:`flex-1`,children:`Table`}),(0,G.jsx)(`span`,{className:`w-[100px]`,children:`Depends On`}),(0,G.jsx)(`span`,{className:`w-[70px] text-right`,children:`Chunk TTL`})]}),t.map((e,n)=>(0,G.jsxs)(`div`,{className:Y(`font-mono text-[11px] leading-7 px-4 flex items-center gap-4 hover:bg-white/[0.015] transition-colors cursor-default`,n<t.length-1&&`border-b border-[#141414]`),children:[(0,G.jsx)(`span`,{className:`flex-1 text-white truncate`,children:e.table}),(0,G.jsx)(`span`,{className:`w-[100px] truncate`,children:e.dependsOn?(0,G.jsx)(ZB,{variant:`ghost`,children:e.dependsOn}):(0,G.jsx)(`span`,{className:`text-neutral-600`,children:`—`})}),(0,G.jsx)(`span`,{className:`w-[70px] text-right text-neutral-500 truncate`,children:e.chunkTtl})]},`${e.table}:${n}`))]})});HV.displayName=`HandlersTable`;var UV={flow:`bg-flow`,healthy:`bg-healthy`,syncing:`bg-syncing`,offline:`bg-offline`,relay:`bg-relay`,muted:`bg-neutral-500`},WV=(0,W.forwardRef)(({className:e,items:t,...n},r)=>(0,G.jsx)(`div`,{ref:r,className:Y(`border-b border-border px-6 py-3 flex items-center justify-between flex-wrap gap-4`,`bg-[linear-gradient(to_bottom,rgba(17,17,17,0.8),#0c0c0c)]`,e),...n,children:t.map((e,t)=>(0,G.jsx)(GV,{item:e,showDivider:t>0},e.label))}));WV.displayName=`KpiStrip`;function GV({item:e,showDivider:t}){let n=UV[e.color??`muted`]??`bg-neutral-500`;return(0,G.jsxs)(G.Fragment,{children:[t&&(0,G.jsx)(`div`,{className:`w-px h-4 bg-border`}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:Y(`w-1.5 h-1.5 rounded-full`,n)}),(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-500 uppercase`,children:e.label}),(0,G.jsxs)(`span`,{className:`font-mono text-sm text-white font-semibold`,children:[e.value,e.unit&&(0,G.jsx)(`span`,{className:`text-xs text-neutral-600`,children:e.unit})]}),e.trend&&(0,G.jsx)(`span`,{className:Y(`font-mono text-[10px]`,e.trend.startsWith(`+`)?`text-healthy`:`text-offline`),children:e.trend})]})]})}var KV=(0,W.forwardRef)(({className:e,buckets:t,successRate:n=99.6,successLabel:r=`success`,...i},a)=>{let o=n/100*88,s=88-o;return(0,G.jsxs)(`div`,{ref:a,className:Y(`px-5 py-3 border-b border-border flex items-center gap-8`,e),...i,children:[(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-500 uppercase tracking-widest`,children:`Latency`}),(0,G.jsx)(`div`,{className:`flex items-center gap-6`,children:t.map(e=>(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`font-mono text-[9px] text-neutral-500`,children:e.label}),(0,G.jsxs)(`div`,{className:`flex gap-1 items-end h-5`,children:[(0,G.jsx)(`div`,{className:`w-3 rounded-t bg-healthy/60`,style:{height:`${e.pushBarPercent}%`}}),(0,G.jsx)(`div`,{className:`w-3 rounded-t bg-flow/60`,style:{height:`${e.pullBarPercent}%`}})]}),(0,G.jsxs)(`span`,{className:`font-mono text-[10px] text-neutral-400`,children:[e.pushMs,` / `,e.pullMs,`ms`]})]},e.label))}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2 ml-auto`,children:[(0,G.jsxs)(`svg`,{viewBox:`0 0 36 36`,className:`w-7 h-7`,children:[(0,G.jsx)(`circle`,{cx:18,cy:18,r:14,fill:`none`,stroke:`#1e1e1e`,strokeWidth:4}),(0,G.jsx)(`circle`,{cx:18,cy:18,r:14,fill:`none`,stroke:`#22c55e`,strokeWidth:4,strokeDasharray:`${o} ${s}`,transform:`rotate(-90 18 18)`,strokeLinecap:`round`})]}),(0,G.jsxs)(`span`,{className:`font-mono text-[10px] text-neutral-400`,children:[n,`%`,` `,(0,G.jsx)(`span`,{className:`text-neutral-600`,children:r})]})]})]})});KV.displayName=`LatencyPercentilesBar`;var qV={PUSH:`syncing`,PULL:`healthy`,ACK:`flow`},JV=(0,W.forwardRef)(({className:e,entries:t,isConnected:n=!0,maxVisible:r=20,maxHeight:i,...a},o)=>{let s=t.slice(0,r);return(0,G.jsxs)(`div`,{ref:o,className:Y(`flex-shrink-0`,e),style:{width:360},...a,children:[(0,G.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-border flex items-center justify-between`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-500 uppercase tracking-widest`,children:`Live Feed`}),(0,G.jsx)(`span`,{className:Y(`w-1.5 h-1.5 rounded-full`,n?`bg-healthy animate-[dotPulse_1.5s_ease-in-out_infinite]`:`bg-neutral-600`)})]}),(0,G.jsx)(`span`,{className:`font-mono text-[9px] text-neutral-600`,children:n?`WebSocket`:`Disconnected`})]}),(0,G.jsx)(`div`,{className:`px-3 py-2 space-y-0.5 overflow-y-auto`,style:i?{maxHeight:i}:void 0,children:s.length===0?(0,G.jsx)(`div`,{className:`flex items-center justify-center h-[200px]`,children:(0,G.jsx)(`p`,{className:`text-neutral-500 text-sm font-mono`,children:n?`Waiting for activity...`:`Connect to see live activity`})}):s.map((e,t)=>(0,G.jsxs)(`div`,{className:`flex items-center gap-2 py-1 animate-[streamSlide_0.35s_ease-out]`,children:[(0,G.jsx)(ZB,{variant:qV[e.type]??`ghost`,className:`text-[8px] px-1.5 py-0`,children:e.type}),(0,G.jsxs)(`span`,{className:`font-mono text-[10px] text-neutral-400 truncate flex-1`,children:[e.actor,` · `,e.table]}),(0,G.jsx)(`span`,{className:`font-mono text-[9px] text-neutral-600`,children:e.time})]},`${e.time}-${t}`))})]})});JV.displayName=`LiveActivityFeed`;var YV={syncing:`bg-syncing`,flow:`bg-flow`,healthy:`bg-healthy`,offline:`bg-offline`},XV=(0,W.forwardRef)(({className:e,title:t,description:n,dotColor:r=`syncing`,stats:i,actionLabel:a,actionVariant:o=`default`,actionIcon:s,onAction:c,...l},u)=>(0,G.jsxs)(`div`,{ref:u,className:Y(`bg-panel border border-border rounded-lg hover:border-border-bright transition`,e),...l,children:[(0,G.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-border flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:Y(`w-1.5 h-1.5 rounded-full`,YV[r])}),(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-500 uppercase tracking-widest`,children:t})]}),(0,G.jsxs)(`div`,{className:`p-4`,children:[(0,G.jsx)(`p`,{className:`font-mono text-[10px] text-neutral-500 leading-relaxed mb-4`,children:n}),(0,G.jsx)(`div`,{className:Y(`grid gap-3 mb-4`,i.length<=2?`grid-cols-2`:`grid-cols-3`),children:i.map(e=>(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`font-mono text-[9px] text-neutral-600 uppercase tracking-wider mb-1`,children:e.label}),(0,G.jsx)(`div`,{className:Y(`font-mono font-semibold`,e.tone===`syncing`?`text-sm text-syncing`:`text-lg text-white`),children:e.value})]},e.label))}),(0,G.jsxs)(Q,{variant:o,size:`md`,onClick:c,children:[s,a]})]})]}));XV.displayName=`MaintenanceCard`;function ZV({actions:e,children:t,className:n,contentClassName:r,description:i,title:a}){return(0,G.jsxs)(pV,{className:Y(`border-border`,n),children:[a||e?(0,G.jsxs)(`div`,{className:`flex items-start justify-between px-4 pt-4`,children:[(0,G.jsxs)(`div`,{children:[a?(0,G.jsx)(`h3`,{className:`font-mono text-[10px] text-neutral-500 uppercase tracking-widest`,children:a}):null,i?(0,G.jsx)(`p`,{className:`mt-1 font-mono text-[10px] text-neutral-500`,children:i}):null]}),e?(0,G.jsx)(`div`,{className:`flex items-center gap-2`,children:e}):null]}):null,(0,G.jsx)(gV,{className:r,children:t})]})}var QV=(0,W.forwardRef)(({className:e,rows:t,onResetDefaults:n,...r},i)=>(0,G.jsxs)(`div`,{ref:i,className:Y(`bg-panel border border-border rounded-lg hover:border-border-bright transition`,e),...r,children:[(0,G.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-border flex items-center justify-between`,children:[(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-500 uppercase tracking-widest`,children:`Preferences`}),n&&(0,G.jsx)(Q,{variant:`default`,size:`sm`,onClick:n,children:`Reset defaults`})]}),(0,G.jsx)(`div`,{className:`p-4 space-y-4`,children:t.map((e,t)=>(0,G.jsx)($V,{row:e,showDivider:t>0},e.label))})]}));QV.displayName=`PreferencesPanel`;function $V({row:e,showDivider:t}){return(0,G.jsxs)(G.Fragment,{children:[t&&(0,G.jsx)(`div`,{className:`border-t border-border`}),(0,G.jsx)(`div`,{className:`flex items-center justify-between`,children:e.type===`filter`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`font-mono text-[11px] text-neutral-400`,children:e.label}),(0,G.jsx)(`div`,{className:`flex gap-0.5`,children:e.options.map(t=>(0,G.jsx)(`button`,{type:`button`,onClick:()=>e.onActiveChange(t.id),className:Y(`font-mono text-[10px] border rounded-sm px-2.5 py-0.5 cursor-pointer transition-all`,t.id===e.activeId?`text-white border-border-bright bg-white/[0.03]`:`text-neutral-500 border-transparent hover:text-neutral-300`),children:t.label},t.id))})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`font-mono text-[11px] text-neutral-400`,children:e.label}),e.description&&(0,G.jsx)(`p`,{className:`font-mono text-[9px] text-neutral-600 mt-0.5`,children:e.description})]}),(0,G.jsx)(qB,{checked:e.checked,onCheckedChange:t=>e.onCheckedChange(t)})]})})]})}function eH({actions:e,children:t,className:n,contentClassName:r,description:i,title:a}){return(0,G.jsxs)(pV,{className:n,children:[a||e?(0,G.jsxs)(`div`,{className:`flex items-start justify-between px-4 pt-4`,children:[(0,G.jsxs)(`div`,{children:[a?(0,G.jsx)(`h3`,{className:`font-mono text-[10px] text-neutral-500 uppercase tracking-widest`,children:a}):null,i?(0,G.jsx)(`p`,{className:`mt-1 font-mono text-[10px] text-neutral-500`,children:i}):null]}),e?(0,G.jsx)(`div`,{className:`flex items-center gap-2`,children:e}):null]}):null,(0,G.jsx)(gV,{className:r,children:t})]})}var tH={commit:`text-flow`,push:`text-syncing`,pull:`text-healthy`},nH={applied:`text-healthy`,error:`text-offline`,cached:`text-syncing`},rH=(0,W.forwardRef)(({className:e,entries:t,filterBar:n,pagination:r,onEntryClick:i,selectedEntryId:a,...o},s)=>(0,G.jsxs)(`div`,{ref:s,className:Y(`h-full flex flex-col`,e),...o,children:[n,(0,G.jsxs)(`div`,{className:`font-mono text-[9px] tracking-wider uppercase text-neutral-600 flex items-center gap-4 px-4 leading-6 border-b border-border bg-white/[0.01]`,children:[(0,G.jsx)(`span`,{className:`w-[50px] truncate`,children:`Time`}),(0,G.jsx)(`span`,{className:`w-[65px] truncate`,children:`Type`}),(0,G.jsx)(`span`,{className:`w-[55px] truncate`,children:`ID`}),(0,G.jsx)(`span`,{className:`w-[65px] truncate`,children:`Outcome`}),(0,G.jsx)(`span`,{className:`w-[50px] truncate`,children:`Dur`}),(0,G.jsx)(`span`,{className:`w-[100px] truncate`,children:`Actor`}),(0,G.jsx)(`span`,{className:`w-[120px] truncate`,children:`Client`}),(0,G.jsx)(`span`,{className:`flex-1 truncate`,children:`Detail`})]}),(0,G.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:t.map((e,t)=>(0,G.jsx)(iH,{entry:e,isSelected:a===e.id,onClick:i},`${e.id}-${t}`))}),r]}));rH.displayName=`StreamLog`;function iH({entry:e,isSelected:t,onClick:n}){let r=tH[e.type]??`text-neutral-500`,i=nH[e.outcome]??`text-neutral-600`,a=Y(`font-mono text-[11px] leading-7 px-4 flex items-center gap-4 border-b border-[#141414] hover:bg-white/[0.015] transition-colors`,n?`cursor-pointer`:`cursor-default`,t&&`bg-white/[0.05]`),o=(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`w-[50px] text-neutral-600 truncate`,children:e.time}),(0,G.jsx)(`span`,{className:Y(`w-[65px] font-medium truncate`,r),children:e.type.toUpperCase()}),(0,G.jsx)(`span`,{className:`w-[55px] text-flow truncate`,children:e.id}),(0,G.jsx)(`span`,{className:Y(`w-[65px] truncate`,i),children:e.outcome}),(0,G.jsx)(`span`,{className:`w-[50px] text-neutral-500 truncate`,children:e.duration}),(0,G.jsx)(`span`,{className:`w-[100px] text-neutral-400 truncate`,children:e.actor}),(0,G.jsx)(`span`,{className:`w-[120px] text-neutral-600 truncate`,title:e.client,children:e.client.length>14?`${e.client.substring(0,14)}\u2026`:e.client}),(0,G.jsx)(`span`,{className:`flex-1 text-neutral-500 truncate`,children:e.detail})]});return n?(0,G.jsx)(`button`,{type:`button`,className:Y(a,`w-full bg-transparent text-left`),onClick:()=>n(e),children:o}):(0,G.jsx)(`div`,{className:a,children:o})}function aH(e){return e===`online`?`#22c55e`:e===`syncing`?`#f59e0b`:`#ef4444`}var oH=(0,W.forwardRef)(({className:e,clients:t,headSeq:n,maxLag:r,minSeq:i,...a},o)=>{let s=t.map(e=>e.cursor),c=i??Math.min(...s,n)-10,l=r??Math.max(...t.map(e=>n-e.cursor),0),u=n-c,d=[c,Math.round(c+u*.33),Math.round(c+u*.66),n];return(0,G.jsxs)(`div`,{ref:o,className:Y(`bg-panel border border-border rounded-lg hover:border-border-bright transition`,e),...a,children:[(0,G.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-border flex items-center justify-between`,children:[(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-500 uppercase tracking-widest`,children:`Sync Horizon`}),(0,G.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-500`,children:`Head`}),(0,G.jsxs)(`span`,{className:`font-mono text-xs text-white font-semibold`,children:[`#`,n.toLocaleString()]})]}),(0,G.jsx)(`div`,{className:`w-px h-3 bg-border`}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-500`,children:`Max lag`}),(0,G.jsx)(`span`,{className:`font-mono text-xs text-syncing font-semibold`,children:l})]})]})]}),(0,G.jsxs)(`div`,{className:`p-4`,children:[(0,G.jsxs)(`div`,{className:`relative h-8 mb-3 rounded bg-surface`,children:[(0,G.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-between px-2`,children:d.map(e=>(0,G.jsxs)(`span`,{className:`font-mono text-[8px] text-neutral-700`,children:[`#`,e.toLocaleString()]},e))}),(0,G.jsx)(`div`,{className:`absolute top-0 bottom-0 w-px bg-flow/40`,style:{right:`2%`}}),t.map(e=>{let t=u>0?(e.cursor-c)/u*96+2:50,n=aH(e.status),r=e.status===`offline`?.4:1;return(0,G.jsx)(`div`,{className:`absolute`,style:{left:`${t}%`,top:`50%`,transform:`translate(-50%,-50%)`,opacity:r},title:`${e.id} \u2192 #${e.cursor}`,children:(0,G.jsx)(`div`,{className:`w-2.5 h-2.5 rounded-full`,style:{background:n,boxShadow:`0 0 4px ${n}`}})},e.id)})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,G.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-healthy`}),(0,G.jsx)(`span`,{className:`font-mono text-[9px] text-neutral-500`,children:`Caught up`})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,G.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-syncing`}),(0,G.jsx)(`span`,{className:`font-mono text-[9px] text-neutral-500`,children:`Behind`})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,G.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-offline opacity-50`}),(0,G.jsx)(`span`,{className:`font-mono text-[9px] text-neutral-500`,children:`Offline`})]})]})]})]})});oH.displayName=`SyncHorizon`;var sH=[],cH=void 0;function lH(){return cH}function uH(e){sH.push(e)}function dH(e){let t=(t,n)=>{let r=PR(pH).current,i;try{cH=r;for(let e of sH)e.before(r);i=e(t,n);for(let e of sH)e.after(r);r.didInitialize=!0}finally{cH=void 0}return i};return t.displayName=e.displayName||e.name,t}function fH(e){return W.forwardRef(dH(e))}function pH(){return{didInitialize:!1}}function mH(e){let t=W.useRef(!0);t.current&&(t.current=!1,e())}var hH=W.createContext(void 0);function gH(e){let t=W.useContext(hH);if(t===void 0&&!e)throw Error(QR(72));return t}var _H=[];function vH(e){W.useEffect(e,_H)}var yH=0,bH=class e{static create(){return new e}currentId=yH;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=yH,t()},e)}isStarted(){return this.currentId!==yH}clear=()=>{this.currentId!==yH&&(clearTimeout(this.currentId),this.currentId=yH)};disposeEffect=()=>this.clear};function xH(){let e=PR(bH.create).current;return vH(e.disposeEffect),e}var SH=typeof navigator<`u`,CH=MH(),wH=PH(),TH=NH(),EH=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),DH=CH.platform===`MacIntel`&&CH.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(CH.platform);SH&&/firefox/i.test(TH);var OH=SH&&/apple/i.test(navigator.vendor);SH&&/Edg/i.test(TH);var kH=SH&&/android/i.test(wH)||/android/i.test(TH),AH=SH&&wH.toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints,jH=TH.includes(`jsdom/`);function MH(){if(!SH)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function NH(){if(!SH)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function PH(){if(!SH)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}var FH=`data-base-ui-focusable`,IH=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function LH(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function RH(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Bz(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function zH(e,t){if(!Rz(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(RH(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function BH(e){return`composedPath`in e?e.composedPath()[0]:e.target}function VH(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 HH(e){return e.matches(`html,body`)}function UH(e){return zz(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function WH(e){return e?e.getAttribute(`role`)===`combobox`&&UH(e):!1}function GH(e){if(!e||jH)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function KH(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function qH(e,t,n=!0){return e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...qH(e,t.id,n)])}function JH(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 YH(e){e.preventDefault(),e.stopPropagation()}function XH(e){return`nativeEvent`in e}function ZH(e){return e.pointerType===``&&e.isTrusted?!0:kH&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function QH(e){return jH?!1:!kH&&e.width===0&&e.height===0||kH&&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 $H(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function eU(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var tU=[`top`,`right`,`bottom`,`left`],nU=Math.min,rU=Math.max,iU=Math.round,aU=Math.floor,oU=e=>({x:e,y:e}),sU={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function cU(e,t,n){return rU(e,nU(t,n))}function lU(e,t){return typeof e==`function`?e(t):e}function uU(e){return e.split(`-`)[0]}function dU(e){return e.split(`-`)[1]}function fU(e){return e===`x`?`y`:`x`}function pU(e){return e===`y`?`height`:`width`}function mU(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function hU(e){return fU(mU(e))}function gU(e,t,n){n===void 0&&(n=!1);let r=dU(e),i=hU(e),a=pU(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=TU(o)),[o,TU(o)]}function _U(e){let t=TU(e);return[vU(e),t,vU(t)]}function vU(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var yU=[`left`,`right`],bU=[`right`,`left`],xU=[`top`,`bottom`],SU=[`bottom`,`top`];function CU(e,t,n){switch(e){case`top`:case`bottom`:return n?t?bU:yU:t?yU:bU;case`left`:case`right`:return t?xU:SU;default:return[]}}function wU(e,t,n,r){let i=dU(e),a=CU(uU(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(vU)))),a}function TU(e){let t=uU(e);return sU[t]+e.slice(t.length)}function EU(e){return{top:0,right:0,bottom:0,left:0,...e}}function DU(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:EU(e)}function OU(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function kU(e,t,n){return Math.floor(e/t)!==n}function AU(e,t){return t<0||t>=e.current.length}function jU(e,t){return NU(e,{disabledIndices:t})}function MU(e,t){return NU(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function NU(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.current.length-1&&RU(e,a,r));return a}function PU(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:l,stopEvent:u=!1}){let d=l,f;if(t.key===`ArrowUp`?f=`up`:t.key===`ArrowDown`&&(f=`down`),f){let n=[],i=[],p=!1,m=0;{let t=null,r=-1;e.current.forEach((e,a)=>{if(e==null)return;m+=1;let o=e.closest(`[role="row"]`);o&&(p=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(a),i[a]=r})}let h=!1,g=0;if(p)for(let e of n){let t=e.length;t>g&&(g=t),t!==a&&(h=!0)}let _=h&&m<e.current.length,v=g||a,y=t=>{if(!h||l===-1)return;let a=i[l];if(a==null)return;let s=n[a].indexOf(l),c=t===`up`?-1:1;for(let t=a+c,i=0;i<n.length;i+=1,t+=c){if(t<0||t>=n.length){if(!r||_)return;t=t<0?n.length-1:0}let i=n[t];for(let t=Math.min(s,i.length-1);t>=0;--t){let n=i[t];if(!RU(e,n,o))return n}}},b=t=>{if(!_||l===-1)return;let n=l%v,i=t===`up`?-v:v,a=c-c%v,s=aU(c/v)+1;for(let t=l-n+i,u=0;u<s;u+=1,t+=i){if(t<0||t>c){if(!r)return;t=t<0?a:0}let i=Math.min(t+v-1,c);for(let r=Math.min(t+n,i);r>=t;--r)if(!RU(e,r,o))return r}};u&&YH(t);let x=y(f)??b(f);if(x!==void 0)d=x;else if(l===-1)d=f===`up`?c:s;else if(d=NU(e,{startingIndex:l,amount:v,decrement:f===`up`,disabledIndices:o}),r){if(f===`up`&&(l-v<s||d<0)){let e=l%v,t=c%v,n=c-(t-e);d=t===e?c:t>e?n:n-v}f===`down`&&l+v>c&&(d=NU(e,{startingIndex:l%v-v,amount:v,disabledIndices:o}))}AU(e,d)&&(d=l)}if(n===`both`){let n=aU(l/a);t.key===(i?`ArrowLeft`:`ArrowRight`)&&(u&&YH(t),l%a===a-1?r&&(d=NU(e,{startingIndex:l-l%a-1,disabledIndices:o})):(d=NU(e,{startingIndex:l,disabledIndices:o}),r&&kU(d,a,n)&&(d=NU(e,{startingIndex:l-l%a-1,disabledIndices:o}))),kU(d,a,n)&&(d=l)),t.key===(i?`ArrowRight`:`ArrowLeft`)&&(u&&YH(t),l%a===0?r&&(d=NU(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o})):(d=NU(e,{startingIndex:l,decrement:!0,disabledIndices:o}),r&&kU(d,a,n)&&(d=NU(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o}))),kU(d,a,n)&&(d=l));let s=aU(c/a)===n;AU(e,d)&&(d=r&&s?t.key===(i?`ArrowRight`:`ArrowLeft`)?c:NU(e,{startingIndex:l-l%a-1,disabledIndices:o}):l)}return d}function FU(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<a;e+=1)n.push(i+r+e*t);i%t+e<=t&&n.every(e=>r[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function IU(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function LU(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function RU(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e.current[t];return r?zU(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function zU(e){return Qz(e).display!==`none`}var BU=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`].join(`,`),VU=typeof Element>`u`,HU=VU?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,UU=!VU&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},WU=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):WU(e.parentNode))},GU=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},KU=function(e,t,n){if(WU(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(BU));return t&&HU.call(e,BU)&&r.unshift(e),r=r.filter(n),r},qU=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!WU(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=qU(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{HU.call(a,BU)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!WU(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=qU(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},JU=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},YU=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||GU(e))&&!JU(e)?0:e.tabIndex},XU=function(e,t){var n=YU(e);return n<0&&t&&!JU(e)?0:n},ZU=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},QU=function(e){return e.tagName===`INPUT`},$U=function(e){return QU(e)&&e.type===`hidden`},eW=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},tW=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},nW=function(e){if(!e.name)return!0;var t=e.form||UU(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=tW(r,e.form);return!i||i===e},rW=function(e){return QU(e)&&e.type===`radio`},iW=function(e){return rW(e)&&!nW(e)},aW=function(e){var t=e&&UU(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=UU(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},oW=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},sW=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility===`hidden`)return!0;var i=HU.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(HU.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=UU(e);if(o&&!o.shadowRoot&&r(o)===!0)return oW(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(aW(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return oW(e);return!1},cW=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return HU.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},lW=function(e,t){return!(t.disabled||$U(t)||sW(t,e)||eW(t)||cW(t))},uW=function(e,t){return!(iW(t)||YU(t)<0||!lW(e,t))},dW=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},fW=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=XU(a,i),s=i?fW(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(ZU).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},pW=function(e,t){return t||={},fW(t.getShadowRoot?qU([e],t.includeContainer,{filter:uW.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:dW}):KU(e,t.includeContainer,uW.bind(null,t)))},mW=function(e,t){return t||={},t.getShadowRoot?qU([e],t.includeContainer,{filter:lW.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):KU(e,t.includeContainer,lW.bind(null,t))},hW=function(e,t){if(t||={},!e)throw Error(`No node provided`);return HU.call(e,BU)===!1?!1:uW(t,e)};function gW(e){return e?.ownerDocument||document}var _W=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function vW(e,t){let n=pW(e,_W()),r=n.length;if(r===0)return;let i=LH(gW(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function yW(e){return vW(gW(e).body,1)||e}function bW(e){return vW(gW(e).body,-1)||e}function xW(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!RH(n,r)}function SW(e){pW(e,_W()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function CW(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function wW(e,t){return t!=null&&!$H(t)?0:typeof e==`function`?e():e}function TW(e,t,n){let r=wW(e,n);return typeof r==`number`?r:r?.[t]}function EW(e){return typeof e==`function`?e():e}function DW(e,t){return t||e===`click`||e===`mousedown`}var OW=W.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new bH,currentIdRef:{current:null},currentContextRef:{current:null}});function kW(e,t={open:!1}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`floatingId`),{open:i}=t,{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:d}=W.useContext(OW),[f,p]=W.useState(!1);return Z(()=>{function e(){p(!1),l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current}if(a.current&&!i&&a.current===r){if(p(!1),s){let t=r;return d.start(s,()=>{n.select(`open`)||a.current&&a.current!==t||e()}),()=>{d.clear()}}e()}},[i,r,a,o,s,c,l,d,n]),Z(()=>{if(!i)return;let e=l.current,t=a.current;d.clear(),l.current={onOpenChange:n.setOpen,setIsInstantPhase:p},a.current=r,o.current={open:0,close:TW(c.current,`close`)},t!==null&&t!==r?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,UB(jB))):(p(!1),e?.setIsInstantPhase(!1))},[i,r,n,a,o,s,c,l,d]),Z(()=>()=>{l.current=null},[l]),W.useMemo(()=>({hasProvider:u,delayRef:o,isInstantPhase:f}),[u,o,f])}function AW(e){let t=PR(jW,e).current;return t.next=e,Z(t.effect),t}function jW(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var MW=null;globalThis.requestAnimationFrame;var NW=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)}},PW=class e{static create(){return new e}static request(e){return NW.request(e)}static cancel(e){return NW.cancel(e)}currentId=MW;request(e){this.cancel(),this.currentId=NW.request(()=>{this.currentId=MW,e()})}cancel=()=>{this.currentId!==MW&&(NW.cancel(this.currentId),this.currentId=MW)};disposeEffect=()=>this.cancel};function FW(){let e=PR(PW.create).current;return vH(e.disposeEffect),e}var IW=W.forwardRef(function(e,t){let[n,r]=W.useState();Z(()=>{OH&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,G.jsx)(`span`,{...e,ref:t,style:KR,"aria-hidden":n?void 0:!0,...i,"data-base-ui-focus-guard":``})});function LW(e){return`data-base-ui-${e}`}var RW=0;function zW(e,t={}){let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(RW);let a=()=>e?.focus({preventScroll:n});i?a():RW=requestAnimationFrame(a)}var BW={inert:new WeakMap,"aria-hidden":new WeakMap},VW=`data-base-ui-inert`,HW={inert:new WeakSet,"aria-hidden":new WeakSet},UW=new WeakMap,WW=0;function GW(e){return HW[e]}function KW(e){return e?Bz(e)?e.host:KW(e.parentNode):null}var qW=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=KW(t);return e.contains(n)?n:null}).filter(e=>e!=null),JW=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},YW=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{Pz(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function XW(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){let o=r?`inert`:n?`aria-hidden`:null,s=null,c=null,l=qW(t,e),u=i?qW(t,a):[],d=new Set(u),f=i?YW(t,JW(l),new Set(l)).filter(e=>!d.has(e)):[],p=[],m=[];if(o){let e=BW[o],n=GW(o);c=n,s=e;let r=qW(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=l.concat(r);YW(t,JW(i),new Set(i)).forEach(t=>{let r=t.getAttribute(o),i=r!==null&&r!==`false`,a=(e.get(t)||0)+1;e.set(t,a),p.push(t),a===1&&i&&n.add(t),i||t.setAttribute(o,o===`inert`?``:`true`)})}return i&&f.forEach(e=>{let t=(UW.get(e)||0)+1;UW.set(e,t),m.push(e),t===1&&e.setAttribute(VW,``)}),WW+=1,()=>{s&&p.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!c?.has(e)&&o&&e.removeAttribute(o),c?.delete(e))}),i&&m.forEach(e=>{let t=(UW.get(e)||0)-1;UW.set(e,t),t||e.removeAttribute(VW)}),--WW,WW||(BW.inert=new WeakMap,BW[`aria-hidden`]=new WeakMap,HW.inert=new WeakSet,HW[`aria-hidden`]=new WeakSet,UW=new WeakMap)}}function ZW(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,o=gW(e[0]).body;return XW(e,o,n,r,{mark:i,markerIgnoreElements:a})}var QW=W.createContext(null),$W=()=>W.useContext(QW),eG=LW(`portal`);function tG(e={}){let{ref:t,container:n,componentProps:r=XR,elementProps:i}=e,a=jz(),o=$W()?.portalNode,[s,c]=W.useState(null),[l,u]=W.useState(null),d=X(e=>{e!==null&&u(e)}),f=W.useRef(null);Z(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(Lz(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,a]);let p=Sz(`div`,r,{ref:[t,d],props:[{id:a,[eG]:``},i]});return{portalNode:l,portalSubtree:s&&p?Dv.createPortal(p,s):null}}var nG=W.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,renderGuards:o,...s}=e,{portalNode:c,portalSubtree:l}=tG({container:r,ref:t,componentProps:e,elementProps:s}),u=W.useRef(null),d=W.useRef(null),f=W.useRef(null),p=W.useRef(null),[m,h]=W.useState(null),g=m?.modal,_=m?.open,v=typeof o==`boolean`?o:!!m&&!m.modal&&m.open&&!!c;W.useEffect(()=>{if(!c||g)return;function e(e){c&&e.relatedTarget&&xW(e)&&(e.type===`focusin`?CW:SW)(c)}return c.addEventListener(`focusin`,e,!0),c.addEventListener(`focusout`,e,!0),()=>{c.removeEventListener(`focusin`,e,!0),c.removeEventListener(`focusout`,e,!0)}},[c,g]),W.useEffect(()=>{!c||_||CW(c)},[_,c]);let y=W.useMemo(()=>({beforeOutsideRef:u,afterOutsideRef:d,beforeInsideRef:f,afterInsideRef:p,portalNode:c,setFocusManagerState:h}),[c]);return(0,G.jsxs)(W.Fragment,{children:[l,(0,G.jsxs)(QW.Provider,{value:y,children:[v&&c&&(0,G.jsx)(IW,{"data-type":`outside`,ref:u,onFocus:e=>{xW(e,c)?f.current?.focus():bW(m?m.domReference:null)?.focus()}}),v&&c&&(0,G.jsx)(`span`,{"aria-owns":c.id,style:xz}),c&&Dv.createPortal(n,c),v&&c&&(0,G.jsx)(IW,{"data-type":`outside`,ref:d,onFocus:e=>{xW(e,c)?p.current?.focus():(yW(m?m.domReference:null)?.focus(),m?.closeOnFocusOut&&m?.onOpenChange(!1,UB(`focus-out`,e.nativeEvent)))}})]})]})});function rG(){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 iG=W.createContext(null),aG=W.createContext(null),oG=()=>W.useContext(iG)?.id||null,sG=e=>{let t=W.useContext(aG);return e??t};function cG(e){return e==null?e:`current`in e?e.current:e}function lG(e,t){let n=Fz(e.target);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 uG=20,dG=[];function fG(){dG=dG.filter(e=>e.deref()?.isConnected)}function pG(e){fG(),e&&Pz(e)!==`body`&&(dG.push(new WeakRef(e)),dG.length>uG&&(dG=dG.slice(-uG)))}function mG(){return fG(),dG[dG.length-1]?.deref()}function hG(e){if(!e)return null;let t=_W();return hW(e,t)?e:pW(e,t)[0]||e}function gG(e){return!e||!e.isConnected?!1:typeof e.checkVisibility==`function`?e.checkVisibility():zU(e)}function _G(e,t){if(!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=_W(),r=mW(e,n).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return hW(e,n)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),i=e.getAttribute(`tabindex`);t.current.includes(`floating`)||r.length===0?i!==`0`&&e.setAttribute(`tabindex`,`0`):(i!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function vG(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=X(()=>b.current.floatingContext?.nodeId),S=i===!1,C=WH(_)&&S,w=W.useRef([`content`]),T=AW(i),E=AW(a),D=AW(l),O=sG(p),k=$W(),A=W.useRef(!1),j=W.useRef(!1),M=W.useRef(!1),N=W.useRef(-1),P=W.useRef(``),F=W.useRef(``),I=W.useRef(null),L=W.useRef(null),ee=zR(I,f,k?.beforeInsideRef),R=zR(L,k?.afterInsideRef),z=xH(),B=xH(),V=FW(),H=k!=null,U=KH(v),te=X((e=U)=>e?pW(e,_W()):[]),ne=X(()=>m?.().filter(e=>e!=null)??[]),re=X(e=>{let t=te(e);return w.current.map(()=>t).filter(Boolean).flat()});W.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&RH(U,LH(gW(U)))&&te().length===0&&!C&&YH(e)}let t=gW(U);return t.addEventListener(`keydown`,e),()=>{t.removeEventListener(`keydown`,e)}},[r,_,U,s,w,C,te,re]),W.useEffect(()=>{if(r||!g)return;let e=gW(U);function t(){M.current=!1}function n(e){let t=BH(e),n=ne();M.current=!(RH(v,t)||RH(_,t)||RH(k?.portalNode,t)||n.some(e=>e===t||RH(e,t))),F.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(j.current=!0)}function i(){F.current=`keyboard`}return e.addEventListener(`pointerdown`,n,!0),e.addEventListener(`pointerup`,t,!0),e.addEventListener(`pointercancel`,t,!0),e.addEventListener(`keydown`,i,!0),()=>{e.removeEventListener(`pointerdown`,n,!0),e.removeEventListener(`pointerup`,t,!0),e.removeEventListener(`pointercancel`,t,!0),e.removeEventListener(`keydown`,i,!0)}},[r,v,_,U,g,k,ne]),W.useEffect(()=>{if(r||!c)return;let e=gW(U);function t(){j.current=!0,B.start(0,()=>{j.current=!1})}function n(e){let t=BH(e),n=te().indexOf(t);n!==-1&&(N.current=n)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=BH(t);queueMicrotask(()=>{let a=x(),c=h.context.triggerElements,l=ne(),f=n?.hasAttribute(LW(`focus-guard`))&&[I.current,L.current,k?.beforeInsideRef.current,k?.afterInsideRef.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,cG(d),cG(u)].includes(n),p=!(RH(_,n)||RH(v,n)||RH(n,v)||RH(k?.portalNode,n)||l.some(e=>e===n||RH(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>RH(e,n))||f||O&&(qH(O.nodesRef.current,a).find(e=>RH(e.context?.elements.floating,n)||RH(e.context?.elements.domReference,n))||JH(O.nodesRef.current,a).find(e=>[e.context?.elements.floating,KH(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&U&&_G(U,w),o&&r!==_&&!gG(i)&&LH(e)===e.body){if(zz(U)&&(U.focus(),o===`popup`)){V.request(()=>{U.focus()});return}let e=N.current,t=te(),n=t[e]||t[t.length-1]||U;zz(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!s)&&n&&p&&!j.current&&(C||n!==mG())&&(A.current=!0,h.setOpen(!1,UB(LB,t)))})}function a(){M.current||(b.current.insideReactTree=!0,z.start(0,()=>{b.current.insideReactTree=!1}))}let l=zz(_)?_:null,f=[];if(!(!v&&!l))return l&&(l.addEventListener(`focusout`,i),l.addEventListener(`pointerdown`,t),f.push(()=>{l.removeEventListener(`focusout`,i),l.removeEventListener(`pointerdown`,t)})),v&&(v.addEventListener(`focusin`,n),v.addEventListener(`focusout`,i),k&&(v.addEventListener(`focusout`,a,!0),f.push(()=>{v.removeEventListener(`focusout`,a,!0)})),f.push(()=>{v.removeEventListener(`focusin`,n),v.removeEventListener(`focusout`,i)})),()=>{f.forEach(e=>{e()})}},[r,_,v,U,s,O,k,h,c,o,te,C,x,w,b,z,B,V,u,d,ne]),W.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(k?.portalNode?.querySelectorAll(`[${LW(`portal`)}]`)||[]),t=(O?JH(O.nodesRef.current,x()):[]).find(e=>WH(e.context?.elements.domReference||null))?.context?.elements.domReference,n=ZW([...[v,...e,I.current,L.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,...ne()],t,cG(d),cG(u),C?_:null].filter(e=>e!=null),{ariaHidden:s||C,mark:!1}),i=ZW([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,w,k,C,O,x,u,d,ne]),Z(()=>{if(!g||r||!zz(U))return;let e=LH(gW(U));queueMicrotask(()=>{let t=re(U),n=T.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1)return;let i;i=r===!0||r===null?t[0]||U:cG(r),i=i||t[0]||U,!RH(U,e)&&zW(i,{preventScroll:i===U})})},[r,g,U,S,re,T,D]),Z(()=>{if(r||!U)return;let e=gW(U);pG(LH(e));function t(e){if(e.open||(P.current=lG(e.nativeEvent,F.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(A.current=!0),e.reason===`outside-press`)if(e.nested)A.current=!1;else if(ZH(e.nativeEvent)||QH(e.nativeEvent))A.current=!1;else{let e=!1;document.createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?A.current=!1:A.current=!0}}y.on(`openchange`,t);function n(){let e=E.current,t=typeof e==`function`?e(P.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`){let e=_||mG();return e&&e.isConnected?e:null}let n=_||mG();return cG(t)||n||null}return()=>{y.off(`openchange`,t);let r=LH(e),i=ne(),a=RH(v,r)||i.some(e=>e===r||RH(e,r))||O&&qH(O.nodesRef.current,x(),!1).some(e=>RH(e.context?.elements.floating,r)),o=n();queueMicrotask(()=>{let t=hG(o),n=typeof E.current!=`boolean`;E.current&&!A.current&&zz(t)&&(!(!n&&t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),A.current=!1})}},[r,v,U,E,b,y,O,_,x,ne]),Z(()=>{if(!EH||g||!v)return;let e=LH(gW(v));!zz(e)||!UH(e)||RH(v,e)&&e.blur()},[g,v]),Z(()=>{if(!(r||!k))return k.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{k.setFocusManagerState(null)}},[r,k,s,g,h,c,_]),Z(()=>{if(!(r||!U))return _G(U,w),()=>{queueMicrotask(fG)}},[r,U,w]);let ie=!r&&(s?!C:!0)&&(H||s);return(0,G.jsxs)(W.Fragment,{children:[ie&&(0,G.jsx)(IW,{"data-type":`inside`,ref:ee,onFocus:e=>{if(s){let e=re();zW(e[e.length-1])}else k?.portalNode&&(A.current=!1,xW(e,k.portalNode)?yW(_)?.focus():cG(d??k.beforeOutsideRef)?.focus())}}),n,ie&&(0,G.jsx)(IW,{"data-type":`inside`,ref:R,onFocus:e=>{s?zW(re()[0]):k?.portalNode&&(c&&(A.current=!0),xW(e,k.portalNode)?bW(_)?.focus():cG(u??k.afterOutsideRef)?.focus())}})]})}function yG(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function bG(e){return e!=null&&e.clientX!=null}function xG(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),o=n.context.dataRef,{enabled:s=!0,axis:c=`both`}=t,l=W.useRef(!1),u=W.useRef(null),[d,f]=W.useState(),[p,m]=W.useState([]),h=X((e,t,r)=>{l.current||o.current.openEvent&&!bG(o.current.openEvent)||n.set(`positionReference`,yG(r??a,{x:e,y:t,axis:c,dataRef:o,pointerType:d}))}),g=X(e=>{r?u.current||m([]):h(e.clientX,e.clientY,e.currentTarget)}),_=$H(d)?i:r,v=W.useCallback(()=>{if(!_||!s)return;let e=Fz(i);function t(n){RH(i,BH(n))?(e.removeEventListener(`mousemove`,t),u.current=null):h(n.clientX,n.clientY)}if(!o.current.openEvent||bG(o.current.openEvent)){e.addEventListener(`mousemove`,t);let n=()=>{e.removeEventListener(`mousemove`,t),u.current=null};return u.current=n,n}n.set(`positionReference`,a)},[_,s,i,o,a,n,h]);W.useEffect(()=>v(),[v,p]),W.useEffect(()=>{s&&!i&&(l.current=!1)},[s,i]),W.useEffect(()=>{!s&&r&&(l.current=!0)},[s,r]);let y=W.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return W.useMemo(()=>s?{reference:y,trigger:y}:{},[s,y])}var SG={intentional:`onClick`,sloppy:`onPointerDown`};function CG(){return!1}function wG(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function TG(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),{dataRef:a}=n.context,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`sloppy`,referencePress:u=CG,referencePressEvent:d=`sloppy`,bubbles:f,externalTree:p}=t,m=sG(p),h=X(typeof c==`function`?c:()=>!1),g=typeof c==`function`?h:c,_=g!==!1,v=X(()=>l),y=W.useRef(!1),b=W.useRef(!1),x=W.useRef(!1),{escapeKey:S,outsidePress:C}=wG(f),w=W.useRef(null),T=xH(),E=xH(),D=X(()=>{E.clear(),a.current.insideReactTree=!1}),O=W.useRef(!1),k=W.useRef(``),A=X(u),j=X(e=>{if(!r||!o||!s||e.key!==`Escape`||O.current)return;let t=a.current.floatingContext?.nodeId,i=m?qH(m.nodesRef.current,t):[];if(!S&&i.length>0){let e=!0;if(i.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}let c=UB(RB,XH(e)?e.nativeEvent:e);n.setOpen(!1,c),!S&&!c.isPropagationAllowed&&e.stopPropagation()}),M=X(()=>{a.current.insideReactTree=!0,E.start(0,D)});W.useEffect(()=>{if(!r||!o)return;a.current.__escapeKeyBubbles=S,a.current.__outsidePressBubbles=C;let e=new bH,t=new bH;function c(){e.clear(),O.current=!0}function l(){e.start(Xz()?5:0,()=>{O.current=!1})}function u(){x.current=!0,t.start(0,()=>{x.current=!1})}function d(){y.current=!1,b.current=!1}function f(){let e=k.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function p(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function h(e){let t=a.current.floatingContext?.nodeId,r=m&&qH(m.nodesRef.current,t).some(t=>VH(e,t.context?.elements.floating));return VH(e,n.select(`floatingElement`))||VH(e,n.select(`domReferenceElement`))||r}function E(e){if(p(e)){D();return}if(a.current.insideReactTree){D();return}let r=BH(e),i=`[${LW(`inert`)}]`,o=Array.from(gW(n.select(`floatingElement`)).querySelectorAll(i)),s=Rz(r)?r.getRootNode():null;Bz(s)&&(o=o.concat(Array.from(s.querySelectorAll(i))));let c=n.context.triggerElements;if(r&&(c.hasElement(r)||c.hasMatchingElement(e=>RH(e,r))))return;let l=Rz(r)?r:null;for(;l&&!Zz(l);){let e=eB(l);if(Zz(e)||!Rz(e))break;l=e}if(o.length&&Rz(r)&&!HH(r)&&!RH(r,n.select(`floatingElement`))&&o.every(e=>!RH(l,e)))return;if(zz(r)&&!(`touches`in e)){let t=Zz(r),n=Qz(r),i=/auto|scroll/,a=t||i.test(n.overflowX),o=t||i.test(n.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=s&&e.offsetY>r.clientHeight;if(u||d)return}if(h(e))return;if(f()===`intentional`&&x.current){t.clear(),x.current=!1;return}if(typeof g==`function`&&!g(e))return;let u=a.current.floatingContext?.nodeId,d=m?qH(m.nodesRef.current,u):[];if(d.length>0){let e=!0;if(d.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}n.setOpen(!1,UB(FB,e)),D()}function A(e){f()!==`sloppy`||e.pointerType===`touch`||!n.select(`open`)||!o||VH(e,n.select(`floatingElement`))||VH(e,n.select(`domReferenceElement`))||E(e)}function M(e){if(f()!==`sloppy`||!n.select(`open`)||!o||VH(e,n.select(`floatingElement`))||VH(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];t&&(w.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},T.start(1e3,()=>{w.current&&(w.current.dismissOnTouchEnd=!1,w.current.dismissOnMouseDown=!1)}))}function N(e){k.current=`touch`;let t=BH(e);function n(){M(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function P(e){if(T.clear(),e.type===`pointerdown`&&(k.current=e.pointerType),e.type===`mousedown`&&w.current&&!w.current.dismissOnMouseDown)return;let t=BH(e);function n(){e.type===`pointerdown`?A(e):E(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function F(e){if(!y.current)return;let n=b.current;if(d(),f()===`intentional`){if(e.type===`pointercancel`){n&&u();return}if(!h(e)){if(n){u();return}typeof g==`function`&&!g(e)||(t.clear(),x.current=!0,D())}}}function I(e){if(f()!==`sloppy`||!w.current||VH(e,n.select(`floatingElement`))||VH(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];if(!t)return;let r=Math.abs(t.clientX-w.current.startX),i=Math.abs(t.clientY-w.current.startY),a=Math.sqrt(r*r+i*i);a>5&&(w.current.dismissOnTouchEnd=!0),a>10&&(E(e),T.clear(),w.current=null)}function L(e){let t=BH(e);function n(){I(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function ee(e){f()!==`sloppy`||!w.current||VH(e,n.select(`floatingElement`))||VH(e,n.select(`domReferenceElement`))||(w.current.dismissOnTouchEnd&&E(e),T.clear(),w.current=null)}function R(e){let t=BH(e);function n(){ee(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}let z=gW(i);return s&&(z.addEventListener(`keydown`,j),z.addEventListener(`compositionstart`,c),z.addEventListener(`compositionend`,l)),_&&(z.addEventListener(`click`,P,!0),z.addEventListener(`pointerdown`,P,!0),z.addEventListener(`pointerup`,F,!0),z.addEventListener(`pointercancel`,F,!0),z.addEventListener(`mousedown`,P,!0),z.addEventListener(`mouseup`,F,!0),z.addEventListener(`touchstart`,N,!0),z.addEventListener(`touchmove`,L,!0),z.addEventListener(`touchend`,R,!0)),()=>{s&&(z.removeEventListener(`keydown`,j),z.removeEventListener(`compositionstart`,c),z.removeEventListener(`compositionend`,l)),_&&(z.removeEventListener(`click`,P,!0),z.removeEventListener(`pointerdown`,P,!0),z.removeEventListener(`pointerup`,F,!0),z.removeEventListener(`pointercancel`,F,!0),z.removeEventListener(`mousedown`,P,!0),z.removeEventListener(`mouseup`,F,!0),z.removeEventListener(`touchstart`,N,!0),z.removeEventListener(`touchmove`,L,!0),z.removeEventListener(`touchend`,R,!0)),e.clear(),t.clear(),d(),x.current=!1}},[a,i,s,_,g,r,o,S,C,j,D,v,m,n,T]),W.useEffect(D,[g,D]);let N=W.useMemo(()=>({onKeyDown:j,[SG[d]]:e=>{A()&&n.setOpen(!1,UB(MB,e.nativeEvent))},...d!==`intentional`&&{onClick(e){A()&&n.setOpen(!1,UB(`trigger-press`,e.nativeEvent))}}}),[j,n,d,A]),P=X(e=>{if(!r||!o||e.button!==0)return;let t=BH(e.nativeEvent);RH(n.select(`floatingElement`),t)&&(y.current||(y.current=!0,b.current=!1))}),F=X(e=>{!r||!o||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&y.current&&(b.current=!0)}),I=W.useMemo(()=>({onKeyDown:j,onPointerDown:F,onMouseDown:F,onClickCapture:M,onMouseDownCapture(e){M(),P(e)},onPointerDownCapture(e){M(),P(e)},onMouseUpCapture:M,onTouchEndCapture:M,onTouchMoveCapture:M}),[j,M,P,F]);return W.useMemo(()=>o?{reference:N,floating:I,trigger:N}:{},[o,N,I])}function EG(e,t,n){let{reference:r,floating:i}=e,a=mU(t),o=hU(t),s=pU(o),c=uU(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(dU(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function DG(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=lU(t,e),p=DU(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=OU(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=OU(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var OG=50,kG=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:DG},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=EG(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<OG&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=EG(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},AG=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=lU(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=uU(r),_=mU(o),v=uU(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[TU(o)]:_U(o)),x=p!==`none`;!d&&x&&b.push(...wU(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=gU(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==mU(t))||T.every(e=>mU(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=mU(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function jG(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function MG(e){return tU.some(t=>e[t]>=0)}var NG=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=lU(e,t);switch(i){case`referenceHidden`:{let e=jG(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:MG(e)}}}case`escaped`:{let e=jG(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:MG(e)}}}default:return{}}}}},PG=new Set([`left`,`top`]);async function FG(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=uU(n),s=dU(n),c=mU(n)===`y`,l=PG.has(o)?-1:1,u=a&&c?-1:1,d=lU(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var IG=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await FG(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},LG=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=lU(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=mU(uU(i)),p=fU(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=cU(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=cU(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},RG=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=lU(e,t),u={x:n,y:r},d=mU(i),f=fU(d),p=u[f],m=u[d],h=lU(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=PG.has(uU(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},zG=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=lU(e,t),u=await o.detectOverflow(t,l),d=uU(i),f=dU(i),p=mU(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=nU(h-u[g],v),x=nU(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=rU(u.left,0),t=rU(u.right,0),n=rU(u.top,0),r=rU(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:rU(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:rU(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function BG(e){let t=Qz(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=zz(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=iU(n)!==a||iU(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function VG(e){return Rz(e)?e:e.contextElement}function HG(e){let t=VG(e);if(!zz(t))return oU(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=BG(t),o=(a?iU(n.width):n.width)/r,s=(a?iU(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var UG=oU(0);function WG(e){let t=Fz(e);return!Xz()||!t.visualViewport?UG:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function GG(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Fz(e)?!1:t}function KG(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=VG(e),o=oU(1);t&&(r?Rz(r)&&(o=HG(r)):o=HG(e));let s=GG(a,n,r)?WG(a):oU(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Fz(a),t=r&&Rz(r)?Fz(r):r,n=e,i=rB(n);for(;i&&r&&t!==n;){let e=HG(i),t=i.getBoundingClientRect(),r=Qz(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Fz(i),i=rB(n)}}return OU({width:u,height:d,x:c,y:l})}function qG(e,t){let n=$z(e).scrollLeft;return t?t.left+n:KG(Iz(e)).left+n}function JG(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-qG(e,n),y:n.top+t.scrollTop}}function YG(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Iz(r),s=t?Uz(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=oU(1),u=oU(0),d=zz(r);if((d||!d&&!a)&&((Pz(r)!==`body`||Vz(o))&&(c=$z(r)),d)){let e=KG(r);l=HG(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?JG(o,c):oU(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function XG(e){return Array.from(e.getClientRects())}function ZG(e){let t=Iz(e),n=$z(e),r=e.ownerDocument.body,i=rU(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=rU(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+qG(e),s=-n.scrollTop;return Qz(r).direction===`rtl`&&(o+=rU(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var QG=25;function $G(e,t){let n=Fz(e),r=Iz(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Xz();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=qG(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=QG&&(a-=o)}else l<=QG&&(a+=l);return{width:a,height:o,x:s,y:c}}function eK(e,t){let n=KG(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=zz(e)?HG(e):oU(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function tK(e,t,n){let r;if(t===`viewport`)r=$G(e,n);else if(t===`document`)r=ZG(Iz(e));else if(Rz(t))r=eK(t,n);else{let n=WG(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return OU(r)}function nK(e,t){let n=eB(e);return n===t||!Rz(n)||Zz(n)?!1:Qz(n).position===`fixed`||nK(n,t)}function rK(e,t){let n=t.get(e);if(n)return n;let r=nB(e,[],!1).filter(e=>Rz(e)&&Pz(e)!==`body`),i=null,a=Qz(e).position===`fixed`,o=a?eB(e):e;for(;Rz(o)&&!Zz(o);){let t=Qz(o),n=Jz(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Vz(o)&&!n&&nK(e,o))?r=r.filter(e=>e!==o):i=t,o=eB(o)}return t.set(e,r),r}function iK(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Uz(t)?[]:rK(t,this._c):[].concat(n),r],o=tK(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=tK(t,a[e],i);s=rU(n.top,s),c=nU(n.right,c),l=nU(n.bottom,l),u=rU(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function aK(e){let{width:t,height:n}=BG(e);return{width:t,height:n}}function oK(e,t,n){let r=zz(t),i=Iz(t),a=n===`fixed`,o=KG(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=oU(0);function l(){c.x=qG(i)}if(r||!r&&!a)if((Pz(t)!==`body`||Vz(i))&&(s=$z(t)),r){let e=KG(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?JG(i,s):oU(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function sK(e){return Qz(e).position===`static`}function cK(e,t){if(!zz(e)||Qz(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Iz(e)===n&&(n=n.ownerDocument.body),n}function lK(e,t){let n=Fz(e);if(Uz(e))return n;if(!zz(e)){let t=eB(e);for(;t&&!Zz(t);){if(Rz(t)&&!sK(t))return t;t=eB(t)}return n}let r=cK(e,t);for(;r&&Hz(r)&&sK(r);)r=cK(r,t);return r&&Zz(r)&&sK(r)&&!Jz(r)?n:r||Yz(e)||n}var uK=async function(e){let t=this.getOffsetParent||lK,n=this.getDimensions,r=await n(e.floating);return{reference:oK(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function dK(e){return Qz(e).direction===`rtl`}var fK={convertOffsetParentRelativeRectToViewportRelativeRect:YG,getDocumentElement:Iz,getClippingRect:iK,getOffsetParent:lK,getElementRects:uK,getClientRects:XG,getDimensions:aK,getScale:HG,isElement:Rz,isRTL:dK};function pK(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mK(e,t){let n=null,r,i=Iz(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=aU(d),h=aU(i.clientWidth-(u+f)),g=aU(i.clientHeight-(d+p)),_=aU(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:rU(0,nU(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!pK(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function hK(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=VG(e),u=i||a?[...l?nB(l):[],...t?nB(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?mK(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?KG(e):null;c&&g();function g(){let t=KG(e);h&&!pK(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var gK=IG,_K=LG,vK=AG,yK=zG,bK=NG,xK=RG,SK=(e,t,n)=>{let r=new Map,i={platform:fK,...n},a={...i.platform,_c:r};return kG(e,t,{...i,platform:a})},CK=typeof document<`u`?W.useLayoutEffect:function(){};function wK(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!wK(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!wK(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function TK(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function EK(e,t){let n=TK(e);return Math.round(t*n)/n}function DK(e){let t=W.useRef(e);return CK(()=>{t.current=e}),t}function OK(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);wK(f,r)||p(r);let[m,h]=W.useState(null),[g,_]=W.useState(null),v=W.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=W.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=W.useRef(null),C=W.useRef(null),w=W.useRef(u),T=c!=null,E=DK(c),D=DK(i),O=DK(l),k=W.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),SK(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!wK(w.current,t)&&(w.current=t,Dv.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);CK(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=W.useRef(!1);CK(()=>(A.current=!0,()=>{A.current=!1}),[]),CK(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=W.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=W.useMemo(()=>({reference:b,floating:x}),[b,x]),N=W.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=EK(M.floating,u.x),r=EK(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...TK(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var kK=(e,t)=>{let n=gK(e);return{name:n.name,fn:n.fn,options:[e,t]}},AK=(e,t)=>{let n=_K(e);return{name:n.name,fn:n.fn,options:[e,t]}},jK=(e,t)=>({fn:xK(e).fn,options:[e,t]}),MK=(e,t)=>{let n=vK(e);return{name:n.name,fn:n.fn,options:[e,t]}},NK=(e,t)=>{let n=yK(e);return{name:n.name,fn:n.fn,options:[e,t]}},PK=(e,t)=>{let n=bK(e);return{name:n.name,fn:n.fn,options:[e,t]}};kx({memoize:Sx,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});var $=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(QR(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},FK=mv(),IK=ez(19)?zK:BK;function LK(e,t,n,r,i){return IK(e,t,n,r,i)}function RK(e,t,n,r,i){let a=W.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,FK.useSyncExternalStore)(e.subscribe,a,a)}uH({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);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}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,FK.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function zK(e,t,n,r,i){let a=lH();if(!a)return RK(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.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function BK(e,t,n,r,i){return(0,gv.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var VK=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 LK(this,e,t,n,r)}},HK=class extends VK{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){W.useDebugValue(e),Z(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){let n=this;Z(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;Z(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){W.useDebugValue(e);let n=t!==void 0;Z(()=>{n&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,n])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return W.useDebugValue(e),LK(this,this.selectors[e],t,n,r)}useContextCallback(e,t){W.useDebugValue(e);let n=X(t??JR);this.context[e]=n}useStateSetter(e){let t=W.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)}})}},UK={open:$(e=>e.open),domReferenceElement:$(e=>e.domReferenceElement),referenceElement:$(e=>e.positionReference??e.referenceElement),floatingElement:$(e=>e.floatingElement),floatingId:$(e=>e.floatingId)},WK=class extends HK{constructor(e){let{nested:t,noEmit:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:rG(),nested:t,noEmit:n,triggerElements:i},UK)}setOpen=(e,t)=>{if((!e||!this.state.open||eU(t.event))&&(this.context.dataRef.current.openEvent=e?t.event:void 0),!this.context.noEmit){let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)}this.context.onOpenChange?.(e,t)}};function GK(e,t=!1,n=!1){let[r,i]=W.useState(e&&t?`idle`:void 0),[a,o]=W.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),Z(()=>{if(!e&&a&&r!==`ending`&&n){let e=PW.request(()=>{i(`ending`)});return()=>{PW.cancel(e)}}},[e,a,r,n]),Z(()=>{if(!e||t)return;let n=PW.request(()=>{i(void 0)});return()=>{PW.cancel(n)}},[t,e]),Z(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=PW.request(()=>{i(`idle`)});return()=>{PW.cancel(n)}},[t,e,a,i,r]),W.useMemo(()=>({mounted:a,setMounted:o,transitionStatus:r}),[a,r])}var KK=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),qK={[KK.startingStyle]:``},JK={[KK.endingStyle]:``},YK={transitionStatus(e){return e===`starting`?qK:e===`ending`?JK:null}};function XK(e,t=!1,n=!0){let r=FW();return X((i,a=null)=>{r.cancel();function o(){Dv.flushSync(i)}let s=cG(e);if(s==null)return;let c=s;if(typeof c.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{function e(){let e=KK.startingStyle;if(!c.hasAttribute(e)){r.request(i);return}let t=new MutationObserver(()=>{c.hasAttribute(e)||(t.disconnect(),i())});t.observe(c,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}function i(){Promise.all(c.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||o()}).catch(()=>{let e=c.getAnimations();if(n){if(a?.aborted)return;o()}else e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&i()})}if(t){e();return}r.request(i)}})}function ZK(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=X(i),o=XK(r,n,!1);W.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}function QK(e,t){let n=W.useRef(null),r=W.useRef(null);return W.useCallback(i=>{if(e!==void 0){if(n.current!==null){let e=n.current,i=r.current,a=t.context.triggerElements.getById(e);i&&a===i&&t.context.triggerElements.delete(e),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function $K(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=QK(e,n),o=X(t=>{if(a(t),!t||!n.select(`open`))return;let i=n.select(`activeTriggerId`);if(i===e){n.update({activeTriggerElement:t,...r});return}i??n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return Z(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function eq(e){let t=e.useState(`open`);Z(()=>{if(t&&!e.select(`activeTriggerId`)&&e.context.triggerElements.size===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[n,r]=t.value;e.update({activeTriggerId:n,activeTriggerElement:r})}}},[t,e])}function tq(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=GK(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=X(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return ZK({enabled:!t.useState(`preventUnmountingOnClose`),open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}var nq=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function rq(){return new WK({open:!1,floatingElement:null,referenceElement:null,triggerElements:new nq,floatingId:``,nested:!1,noEmit:!1,onOpenChange:void 0})}function iq(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:`idle`,floatingRootContext:rq(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:XR,inactiveTriggerProps:XR,popupProps:XR}}var aq=$(e=>e.triggerIdProp??e.activeTriggerId),oq={open:$(e=>e.openProp??e.open),mounted:$(e=>e.mounted),transitionStatus:$(e=>e.transitionStatus),floatingRootContext:$(e=>e.floatingRootContext),preventUnmountingOnClose:$(e=>e.preventUnmountingOnClose),payload:$(e=>e.payload),activeTriggerId:aq,activeTriggerElement:$(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:$((e,t)=>t!==void 0&&aq(e)===t),isOpenedByTrigger:$((e,t)=>t!==void 0&&aq(e)===t&&e.open),isMountedByTrigger:$((e,t)=>t!==void 0&&aq(e)===t&&e.mounted),triggerProps:$((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:$(e=>e.popupProps),popupElement:$(e=>e.popupElement),positionerElement:$(e=>e.positionerElement)};function sq(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=jz(),a=oG()!=null,o=PR(()=>new WK({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new nq,floatingId:i,nested:a,noEmit:!1})).current;return Z(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=Rz(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o.context.noEmit=!1,o}function cq(e={}){let{nodeId:t,externalTree:n}=e,r=sq(e),i=e.rootContext||r,a={reference:i.useState(`referenceElement`),floating:i.useState(`floatingElement`),domReference:i.useState(`domReferenceElement`)},[o,s]=W.useState(null),c=W.useRef(null),l=sG(n);Z(()=>{a.domReference&&(c.current=a.domReference)},[a.domReference]);let u=OK({...e,elements:{...a,...o&&{reference:o}}}),d=W.useCallback(e=>{let t=Rz(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),u.refs.setReference(t)},[u.refs]),[f,p]=W.useState(null),[m,h]=W.useState(null);i.useSyncedValue(`referenceElement`,f),i.useSyncedValue(`domReferenceElement`,Rz(f)?f:null),i.useSyncedValue(`floatingElement`,m);let g=W.useCallback(e=>{(Rz(e)||e===null)&&(c.current=e,p(e)),(Rz(u.refs.reference.current)||u.refs.reference.current===null||e!==null&&!Rz(e))&&u.refs.setReference(e)},[u.refs,p]),_=W.useCallback(e=>{h(e),u.refs.setFloating(e)},[u.refs]),v=W.useMemo(()=>({...u.refs,setReference:g,setFloating:_,setPositionReference:d,domReference:c}),[u.refs,g,_,d]),y=W.useMemo(()=>({...u.elements,domReference:a.domReference}),[u.elements,a.domReference]),b=i.useState(`open`),x=i.useState(`floatingId`),S=W.useMemo(()=>({...u,dataRef:i.context.dataRef,open:b,onOpenChange:i.setOpen,events:i.context.events,floatingId:x,refs:v,elements:y,nodeId:t,rootStore:i}),[u,v,y,t,i,b,x]);return Z(()=>{i.context.dataRef.current.floatingContext=S;let e=l?.nodesRef.current.find(e=>e.id===t);e&&(e.context=S)}),W.useMemo(()=>({...u,context:S,refs:v,elements:y,rootStore:i}),[u,v,y,S,i])}function lq(e){let{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,a=jz(),o=oG()!=null,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(r?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=PR(()=>new WK({open:s,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:i,floatingId:a,nested:o,noEmit:n})).current;return Z(()=>{let e={open:s,floatingId:a,referenceElement:c,floatingElement:l};Rz(c)&&(e.domReferenceElement=c),d.state.positionReference===d.state.referenceElement&&(e.positionReference=c),d.update(e)},[s,a,c,l,d]),d.context.onOpenChange=i,d.context.nested=o,d.context.noEmit=n,d}var uq=AH&&OH;function dq(e,t={}){let n=`rootStore`in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:a=!0,delay:o}=t,s=W.useRef(!1),c=W.useRef(null),l=xH(),u=W.useRef(!0);W.useEffect(()=>{let e=n.select(`domReferenceElement`);if(!a)return;let t=Fz(e);function r(){let e=n.select(`domReferenceElement`);!n.select(`open`)&&zz(e)&&e===LH(gW(e))&&(s.current=!0)}function i(){u.current=!0}function o(){u.current=!1}return t.addEventListener(`blur`,r),uq&&(t.addEventListener(`keydown`,i,!0),t.addEventListener(`pointerdown`,o,!0)),()=>{t.removeEventListener(`blur`,r),uq&&(t.removeEventListener(`keydown`,i,!0),t.removeEventListener(`pointerdown`,o,!0))}},[n,a]),W.useEffect(()=>{if(!a)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=n.select(`domReferenceElement`);Rz(e)&&(c.current=e,s.current=!0)}}return r.on(`openchange`,e),()=>{r.off(`openchange`,e)}},[r,a,n]);let d=W.useMemo(()=>({onMouseLeave(){s.current=!1,c.current=null},onFocus(e){let t=e.currentTarget;if(s.current){if(c.current===t)return;s.current=!1,c.current=null}let r=BH(e.nativeEvent);if(Rz(r)){if(uq&&!e.relatedTarget){if(!u.current&&!UH(r))return}else if(!GH(r))return}let i=zH(e.relatedTarget,n.context.triggerElements),{nativeEvent:a,currentTarget:d}=e,f=typeof o==`function`?o():o;if(n.select(`open`)&&i||f===0||f===void 0){n.setOpen(!0,UB(PB,a,d));return}l.start(f,()=>{s.current||n.setOpen(!0,UB(PB,a,d))})},onBlur(e){s.current=!1,c.current=null;let t=e.relatedTarget,r=e.nativeEvent,a=Rz(t)&&t.hasAttribute(LW(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let e=n.select(`domReferenceElement`),o=LH(e?e.ownerDocument:document);!t&&o===e||RH(i.current.floatingContext?.refs.floating.current,o)||RH(e,o)||a||zH(t??o,n.context.triggerElements)||n.setOpen(!1,UB(PB,r))})}}),[i,n,l,o]);return W.useMemo(()=>a?{reference:d,trigger:d}:{},[a,d])}var fq=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${IH}`;function pq(e){return e?!!e.closest(fq):!1}var mq=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new bH,this.restTimeout=new bH,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose};function hq(e){e.performedPointerEventsMutation&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null)}function gq(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t;hq(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function _q(e){let t=PR(mq.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||=t,vH(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function vq(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),{dataRef:o}=n.context,{enabled:s=!0,closeDelay:c=0}=t,l=_q(n),u=sG(),d=oG(),f=X(()=>DW(o.current.openEvent?.type,l.interactedInside)),p=X(()=>{let e=o.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`}),m=X(e=>zH(e,n.context.triggerElements)),h=W.useCallback(e=>{let t=TW(c,`close`,l.pointerType),r=()=>{n.setOpen(!1,UB(NB,e)),u?.events.emit(`floating.closed`,e)};t?l.openChangeTimeout.start(t,r):(l.openChangeTimeout.clear(),r())},[c,n,l,u]),g=X(()=>{hq(l)}),_=X(e=>{let t=BH(e);if(!pq(t)){l.interactedInside=!1;return}l.interactedInside=t?.closest(`[aria-haspopup]`)!=null});Z(()=>{r||(l.pointerType=void 0,l.restTimeoutPending=!1,l.interactedInside=!1,g())},[r,l,g]),W.useEffect(()=>g,[g]),Z(()=>{if(s&&r&&l.handleCloseOptions?.blockPointerEvents&&p()&&Rz(a)&&i){let e=a,t=i,n=gW(i),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;return r&&(r.style.pointerEvents=``),gq(l,{scopeElement:l.handleCloseOptions?.getScope?.()??l.pointerEventsScopeElement??r??e.closest(`[data-rootownerid]`)??n.body,referenceElement:e,floatingElement:t}),()=>{g()}}},[s,r,a,i,l,p,u,d,g]);let v=xH();W.useEffect(()=>{if(!s)return;function e(){l.openChangeTimeout.clear(),v.clear(),u?.events.off(`floating.closed`,r),g()}function t(e){if(u&&d&&qH(u.nodesRef.current,d).length>0){u.events.on(`floating.closed`,r);return}if(!m(e.relatedTarget)){if(l.handler){l.handler(e);return}g(),f()||h(e)}}function r(e){!u||!d||qH(u.nodesRef.current,d).length>0||v.start(0,()=>{u.events.off(`floating.closed`,r),n.setOpen(!1,UB(NB,e)),u.events.emit(`floating.closed`,e)})}let a=i;return a&&(a.addEventListener(`mouseenter`,e),a.addEventListener(`mouseleave`,t),a.addEventListener(`pointerdown`,_,!0)),()=>{a&&(a.removeEventListener(`mouseenter`,e),a.removeEventListener(`mouseleave`,t),a.removeEventListener(`pointerdown`,_,!0)),u?.events.off(`floating.closed`,r)}},[s,i,n,o,f,m,h,g,_,l,u,d,v])}var yq={current:null};function bq(e,t={}){let n=`rootStore`in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:a=!0,delay:o=0,handleClose:s=null,mouseOnly:c=!1,restMs:l=0,move:u=!0,triggerElementRef:d=yq,externalTree:f,isActiveTrigger:p=!0,getHandleCloseContext:m}=t,h=sG(f),g=_q(n),_=AW(s),v=AW(o),y=AW(l),b=AW(a);p&&(g.handleCloseOptions=_.current?.__options);let x=X(()=>DW(r.current.openEvent?.type,g.interactedInside)),S=X(e=>zH(e,n.context.triggerElements)),C=X((e,t,r)=>{let i=n.context.triggerElements;if(i.hasElement(t))return!e||!RH(e,t);if(!Rz(r))return!1;let a=r;return i.hasMatchingElement(e=>RH(e,a))&&(!e||!RH(e,a))}),w=W.useCallback((e,t=!0)=>{let r=TW(v.current,`close`,g.pointerType);r?g.openChangeTimeout.start(r,()=>{n.setOpen(!1,UB(NB,e)),h?.events.emit(`floating.closed`,e)}):t&&(g.openChangeTimeout.clear(),n.setOpen(!1,UB(NB,e)),h?.events.emit(`floating.closed`,e))},[v,n,g,h]),T=X(()=>{g.handler&&=(gW(n.select(`domReferenceElement`)).removeEventListener(`mousemove`,g.handler),void 0)});W.useEffect(()=>T,[T]);let E=X(()=>{hq(g)});return W.useEffect(()=>{if(!a)return;function e(e){e.open||(T(),g.openChangeTimeout.clear(),g.restTimeout.clear(),g.blockMouseMove=!0,g.restTimeoutPending=!1)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[a,i,g,T]),W.useEffect(()=>{if(!a)return;let e=d.current??(p?n.select(`domReferenceElement`):null);if(!Rz(e))return;function t(e){if(g.openChangeTimeout.clear(),g.blockMouseMove=!1,c&&!$H(g.pointerType)||EW(y.current)>0&&!TW(v.current,`open`))return;let t=TW(v.current,`open`,g.pointerType),r=e.currentTarget??null,i=n.select(`domReferenceElement`),a=r==null?!1:C(i,r,e.target),o=n.select(`open`),s=!o||a;a&&o?n.setOpen(!0,UB(NB,e,r)):t?g.openChangeTimeout.start(t,()=>{s&&n.setOpen(!0,UB(NB,e,r))}):s&&n.setOpen(!0,UB(NB,e,r))}function i(e){if(x()){E();return}T();let t=gW(n.select(`domReferenceElement`));g.restTimeout.clear(),g.restTimeoutPending=!1;let i=r.current.floatingContext??m?.();if(!S(e.relatedTarget)){if(_.current&&i){n.select(`open`)||g.openChangeTimeout.clear();let r=d.current;g.handler=_.current({...i,tree:h,x:e.clientX,y:e.clientY,onClose(){E(),T(),b.current&&!x()&&r===n.select(`domReferenceElement`)&&w(e,!0)}}),t.addEventListener(`mousemove`,g.handler),g.handler(e);return}(g.pointerType!==`touch`||!RH(n.select(`floatingElement`),e.relatedTarget))&&w(e)}}return u&&e.addEventListener(`mousemove`,t,{once:!0}),e.addEventListener(`mouseenter`,t),e.addEventListener(`mouseleave`,i),()=>{u&&e.removeEventListener(`mousemove`,t),e.removeEventListener(`mouseenter`,t),e.removeEventListener(`mouseleave`,i)}},[T,E,r,v,w,n,a,_,g,p,C,x,S,c,u,y,d,h,b,m]),W.useMemo(()=>{if(!a)return;function e(e){g.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,r=e.currentTarget,i=n.select(`domReferenceElement`),a=n.select(`open`),o=C(i,r,e.target);if(c&&!$H(g.pointerType))return;let s=EW(y.current);if(a&&!o||s===0||!o&&g.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;g.restTimeout.clear();function l(){if(g.restTimeoutPending=!1,x())return;let e=n.select(`open`);!g.blockMouseMove&&(!e||o)&&n.setOpen(!0,UB(NB,t,r))}g.pointerType===`touch`?Dv.flushSync(()=>{l()}):o&&a?l():(g.restTimeoutPending=!0,g.restTimeout.start(s,l))}}},[a,g,x,C,c,n,y])}function xq(e=[]){let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=e.map(e=>e?.trigger),a=W.useCallback(t=>Sq(t,e,`reference`),t),o=W.useCallback(t=>Sq(t,e,`floating`),n),s=W.useCallback(t=>Sq(t,e,`item`),r),c=W.useCallback(t=>Sq(t,e,`trigger`),i);return W.useMemo(()=>({getReferenceProps:a,getFloatingProps:o,getItemProps:s,getTriggerProps:c}),[a,o,s,c])}function Sq(e,t,n){let r=new Map,i=n===`item`,a={};n===`floating`&&(a.tabIndex=-1,a[FH]=``);for(let t in e)i&&e&&(t===`active`||t===`selected`)||(a[t]=e[t]);for(let o=0;o<t.length;o+=1){let s,c=t[o]?.[n];s=typeof c==`function`?e?c(e):null:c,s&&Cq(a,s,i,r)}return Cq(a,e,i,r),a}function Cq(e,t,n,r){for(let i in t){let a=t[i];n&&(i===`active`||i===`selected`)||(i.startsWith(`on`)?(r.has(i)||r.set(i,[]),typeof a==`function`&&(r.get(i)?.push(a),e[i]=(...e)=>r.get(i)?.map(t=>t(...e)).find(e=>e!==void 0))):e[i]=a)}}var wq=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function Tq(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingId`),a=n.useState(`domReferenceElement`),o=n.useState(`floatingElement`),{role:s=`dialog`}=t,c=jz(),l=a?.id||c,u=W.useMemo(()=>KH(o)?.id||i,[o,i]),d=wq.get(s)??s,f=oG()!=null,p=W.useMemo(()=>d===`tooltip`||s===`label`?XR:{"aria-haspopup":d===`alertdialog`?`dialog`:d,"aria-expanded":`false`,...d===`listbox`&&{role:`combobox`},...d===`menu`&&f&&{role:`menuitem`},...s===`select`&&{"aria-autocomplete":`none`},...s===`combobox`&&{"aria-autocomplete":`list`}},[d,f,s]),m=W.useMemo(()=>d===`tooltip`||s===`label`?{[`aria-${s===`label`?`labelledby`:`describedby`}`]:r?u:void 0}:{...p,"aria-expanded":r?`true`:`false`,"aria-controls":r?u:void 0,...d===`menu`&&{id:l}},[d,u,r,l,s,p]),h=W.useMemo(()=>{let e={id:u,...d&&{role:d}};return d===`tooltip`||s===`label`?e:{...e,...d===`menu`&&{"aria-labelledby":l}}},[d,u,l,s]),g=W.useCallback(({active:e,selected:t})=>{let n={role:`option`,...e&&{id:`${u}-fui-option`}};switch(s){case`select`:case`combobox`:return{...n,"aria-selected":t};default:}return{}},[u,s]);return W.useMemo(()=>({reference:m,floating:h,item:g,trigger:p}),[m,h,p,g])}var Eq=.1,Dq=Eq*Eq,Oq=.5;function kq(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Aq(e,t,n,r,i,a,o,s,c,l){let u=!1;return kq(e,t,n,r,i,a)&&(u=!u),kq(e,t,i,a,o,s)&&(u=!u),kq(e,t,o,s,c,l)&&(u=!u),kq(e,t,c,l,n,r)&&(u=!u),u}function jq(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Mq(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Nq(e={}){let{blockPointerEvents:t=!1}=e,n=new bH,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Dq;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=BH(r),g=r.type===`mouseleave`,_=RH(u,h),v=RH(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&Rz(r.relatedTarget)&&RH(u,r.relatedTarget))return;function y(){return!!(s&&qH(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=Mq(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Mq(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Mq(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Mq(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!jq(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Oq/2:Oq*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Oq+1,o=C||T?S.bottom-Oq:S.top,s=C?T?S.bottom-Oq:S.top:S.bottom-Oq;M=Aq(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Oq/2:Oq*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Oq,o=C||T?S.top+Oq:S.bottom,s=C?T?S.top+Oq:S.bottom:S.top+Oq;M=Aq(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Oq/2:Oq*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Oq+1,o=w||E?S.right-Oq:S.left,s=w?E?S.right-Oq:S.left:S.right-Oq;M=Aq(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Oq/2:Oq*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Oq,o=w||E?S.left+Oq:S.right,s=w?E?S.left+Oq:S.right:S.left+Oq;M=Aq(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options={blockPointerEvents:t},r}var Pq={...oq,disabled:$(e=>e.disabled),instantType:$(e=>e.instantType),isInstantPhase:$(e=>e.isInstantPhase),trackCursorAxis:$(e=>e.trackCursorAxis),disableHoverablePopup:$(e=>e.disableHoverablePopup),lastOpenChangeReason:$(e=>e.openChangeReason),closeOnClick:$(e=>e.closeOnClick),closeDelay:$(e=>e.closeDelay),hasViewport:$(e=>e.hasViewport)},Fq=class e extends HK{constructor(e){super({...Iq(),...e},{popupRef:W.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new nq},Pq)}setOpen=(e,t)=>{let n=t.reason,r=n===NB,i=e&&n===`trigger-focus`,a=!e&&(n===`trigger-press`||n===`escape-key`);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let o=()=>{let r={open:e,openChangeReason:n};i?r.instantType=`focus`:a?r.instantType=`dismiss`:n===`trigger-hover`&&(r.instantType=void 0);let o=t.trigger?.id??null;(o||e)&&(r.activeTriggerId=o,r.activeTriggerElement=t.trigger??null),this.update(r)};r?Dv.flushSync(o):o()};static useStore(t,n){let r=PR(()=>new e(n)).current,i=t??r,a=lq({popupStore:i,onOpenChange:i.setOpen});return i.state.floatingRootContext=a,i}};function Iq(){return{...iq(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}dH(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=Fq.useStore(l?.store,{open:n,openProp:r,activeTriggerId:d,triggerIdProp:u});mH(()=>{r===void 0&&p.state.open===!1&&n===!0&&p.update({open:!0,activeTriggerId:d})}),p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i}),Z(()=>{m&&t&&p.setOpen(!1,UB(BB))},[m,t,p]),p.useSyncedValue(`disabled`,t),eq(p);let{forceUnmount:v,transitionStatus:y}=tq(h,p),b=p.useState(`isInstantPhase`),x=p.useState(`instantType`),S=p.useState(`lastOpenChangeReason`),C=W.useRef(null);Z(()=>{y===`ending`&&S===`none`||y!==`ending`&&b?(x!==`delay`&&(C.current=x),p.set(`instantType`,`delay`)):C.current!==null&&(p.set(`instantType`,C.current),C.current=null)},[y,b,S,x,p]),Z(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]);let w=W.useCallback(()=>{p.setOpen(!1,Lq(p,VB))},[p]);W.useImperativeHandle(o,()=>({unmount:v,close:w}),[v,w]);let T=p.useState(`floatingRootContext`),{getReferenceProps:E,getFloatingProps:D,getTriggerProps:O}=xq([TG(T,{enabled:!t,referencePress:()=>p.select(`closeOnClick`)}),xG(T,{enabled:!t&&a!==`none`,axis:a===`none`?void 0:a})]),k=W.useMemo(()=>E(),[E]),A=W.useMemo(()=>O(),[O]),j=W.useMemo(()=>D(),[D]);return p.useSyncedValues({activeTriggerProps:k,inactiveTriggerProps:A,popupProps:j}),(0,G.jsx)(hH.Provider,{value:p,children:typeof f==`function`?f({payload:_}):f})});function Lq(e,t){let n=UB(t);return n.preventUnmountOnClose=()=>{e.set(`preventUnmountingOnClose`,!0)},n}var Rq=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=KK.startingStyle]=`startingStyle`,e[e.endingStyle=KK.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),zq=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),Bq={[zq.popupOpen]:``},Vq={[zq.popupOpen]:``,[zq.pressed]:``},Hq={[Rq.open]:``},Uq={[Rq.closed]:``},Wq={[Rq.anchorHidden]:``},Gq={open(e){return e?Bq:null}},Kq={open(e){return e?Vq:null}},qq={open(e){return e?Hq:Uq},anchorHidden(e){return e?Wq:null}},Jq=W.createContext(void 0);function Yq(){return W.useContext(Jq)}var Xq=function(e){return e[e.popupOpen=zq.popupOpen]=`popupOpen`,e.triggerDisabled=`data-trigger-disabled`,e}({});fH(function(e,t){let{className:n,render:r,handle:i,payload:a,disabled:o,delay:s,closeOnClick:c=!0,closeDelay:l,id:u,...d}=e,f=gH(!0),p=i?.store??f;if(!p)throw Error(QR(82));let m=Mz(u),h=p.useState(`isTriggerActive`,m),g=p.useState(`isOpenedByTrigger`,m),_=p.useState(`floatingRootContext`),v=W.useRef(null),y=s??600,b=l??0,{registerTrigger:x,isMountedByThisTrigger:S}=$K(m,v,p,{payload:a,closeOnClick:c,closeDelay:b}),C=Yq(),{delayRef:w,isInstantPhase:T,hasProvider:E}=kW(_,{open:g});p.useSyncedValue(`isInstantPhase`,T);let D=p.useState(`disabled`),O=o??D,k=p.useState(`trackCursorAxis`),A=p.useState(`disableHoverablePopup`),j=bq(_,{enabled:!O,mouseOnly:!0,move:!1,handleClose:!A&&k!==`both`?Nq():null,restMs(){let e=C?.delay,t=typeof w.current==`object`?w.current.open:void 0,n=y;return E&&(n=t===0?0:s??e??y),n},delay(){let e=typeof w.current==`object`?w.current.close:void 0,t=b;return l==null&&E&&(t=e),{close:t}},triggerElementRef:v,isActiveTrigger:h}),M=dq(_,{enabled:!O}).reference,N={open:g},P=p.useState(`triggerProps`,S);return Sz(`button`,e,{state:N,ref:[t,x,v],props:[j,M,P,{onPointerDown(){p.set(`closeOnClick`,c)},id:m,[Xq.triggerDisabled]:O?``:void 0},d],stateAttributesMapping:Gq})});var Zq=W.createContext(void 0);function Qq(){let e=W.useContext(Zq);if(e===void 0)throw Error(QR(70));return e}var $q=W.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,...o}=e,{portalNode:s,portalSubtree:c}=tG({container:r,ref:t,componentProps:e,elementProps:o});return!c&&!s?null:(0,G.jsxs)(W.Fragment,{children:[c,s&&Dv.createPortal(n,s)]})}),eJ=W.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return gH().useState(`mounted`)||n?(0,G.jsx)(Zq.Provider,{value:n,children:(0,G.jsx)($q,{ref:t,...r})}):null}),tJ=W.createContext(void 0);function nJ(){let e=W.useContext(tJ);if(e===void 0)throw Error(QR(71));return e}var rJ=W.createContext(void 0);function iJ(){return W.useContext(rJ)?.direction??`ltr`}var aJ=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=lU(e,t)||{};if(l==null)return{};let f=DU(u),p={x:n,y:r},m=hU(i),h=pU(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=cU(k,j,A),N=!c.arrow&&dU(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),oJ=(e,t)=>({...aJ(e),options:[e,t]}),sJ={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await PK().fn(e)).data?.referenceHidden||a}}}},cJ={sideX:`left`,sideY:`top`},lJ={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=Fz(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:cJ};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=gW(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=uU(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:cJ.sideX,g=f===`top`?`bottom`:cJ.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function uJ(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function dJ(e,t,n){let{rects:r,placement:i}=e;return{side:uJ(t,uU(i),n),align:dU(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function fJ(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,keepMounted:f=!1,floatingRootContext:p,mounted:m,collisionAvoidance:h,shiftCrossAxis:g=!1,nodeId:_,adaptiveOrigin:v,lazyFlip:y=!1,externalTree:b}=e,[x,S]=W.useState(null);!m&&x!==null&&S(null);let C=h.side||`flip`,w=h.align||`flip`,T=h.fallbackAxisSide||`end`,E=typeof t==`function`?t:void 0,D=X(E),O=E?D:t,k=AW(t),A=iJ()===`rtl`,j=x||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":A?`left`:`right`,"inline-start":A?`right`:`left`}[r],M=a===`center`?j:`${j}-${a}`,N=c,P=r===`bottom`?1:0,F=r===`top`?1:0,I=r===`right`?1:0,L=r===`left`?1:0;typeof N==`number`?N={top:N+P,right:N+L,bottom:N+F,left:N+I}:N&&={top:(N.top||0)+P,right:(N.right||0)+L,bottom:(N.bottom||0)+F,left:(N.left||0)+I};let ee={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:N},R=W.useRef(null),z=AW(i),B=AW(o),V=[kK(e=>{let t=dJ(e,r,A),n=typeof z.current==`function`?z.current(t):z.current,i=typeof B.current==`function`?B.current(t):B.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[typeof i==`function`?0:i,typeof o==`function`?0:o,A,r])],H=w===`none`&&C!==`shift`,U=!H&&(l||g||C===`shift`),te=C===`none`?null:MK({...ee,padding:{top:N.top+1,right:N.right+1,bottom:N.bottom+1,left:N.left+1},mainAxis:!g&&C===`flip`,crossAxis:w===`flip`?`alignment`:!1,fallbackAxisSideDirection:T}),ne=H?null:AK(e=>{let t=gW(e.elements.floating).documentElement;return{...ee,rootBoundary:g?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:w!==`none`,crossAxis:U,limiter:l||g?void 0:jK(e=>{if(!R.current)return{};let{width:t,height:n}=R.current.getBoundingClientRect(),r=mU(uU(e.placement)),i=r===`y`?t:n,a=r===`y`?N.left+N.right:N.top+N.bottom;return{offset:i/2+a/2}})}},[ee,l,g,N,w]);C===`shift`||w===`shift`||a===`center`?V.push(ne,te):V.push(te,ne),V.push(NK({...ee,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=window.devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),oJ(()=>({element:R.current||document.createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=uU(a),l=mU(c),u=R.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(dJ(e,r,A)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,U&&l===`y`&&b?S:x),{}}},sJ,v),Z(()=>{!m&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[m,p]);let re=W.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:ie,elements:ae,x:oe,y:se,middlewareData:ce,update:le,placement:ue,context:de,isPositioned:fe,floatingStyles:pe}=cq({rootContext:p,placement:M,middleware:V,strategy:n,whileElementsMounted:f?void 0:(...e)=>hK(...e,re),nodeId:_,externalTree:b}),{sideX:me,sideY:he}=ce.adaptiveOrigin||cJ,ge=fe?n:`fixed`,_e=W.useMemo(()=>{let e=v?{position:ge,[me]:oe,[he]:se}:{position:ge,...pe};return fe||(e.opacity=0),e},[v,ge,me,oe,he,se,pe,fe]),ve=W.useRef(null);Z(()=>{if(!m)return;let e=k.current,t=typeof e==`function`?e():e,n=(pJ(t)?t.current:t)||null;n!==ve.current&&(ie.setPositionReference(n),ve.current=n)},[m,ie,O,k]),W.useEffect(()=>{if(!m)return;let e=k.current;typeof e!=`function`&&pJ(e)&&e.current!==ve.current&&(ie.setPositionReference(e.current),ve.current=e.current)},[m,ie,O,k]),W.useEffect(()=>{if(f&&m&&ae.domReference&&ae.floating)return hK(ae.domReference,ae.floating,le,re)},[f,m,ae,le,re]);let ye=uU(ue),be=uJ(r,ye,A),xe=dU(ue)||`center`,Se=!!ce.hide?.referenceHidden;Z(()=>{y&&m&&fe&&S(ye)},[y,m,fe,ye]);let Ce=W.useMemo(()=>({position:`absolute`,top:ce.arrow?.y,left:ce.arrow?.x}),[ce.arrow]),we=ce.arrow?.centerOffset!==0;return W.useMemo(()=>({positionerStyles:_e,arrowStyles:Ce,arrowRef:R,arrowUncentered:we,side:be,align:xe,physicalSide:ye,anchorHidden:Se,refs:ie,context:de,isPositioned:fe,update:le}),[_e,Ce,R,we,be,xe,ye,Se,ie,de,fe,le])}function pJ(e){return e!=null&&`current`in e}function mJ(e){return e===`starting`?vz:XR}var hJ=W.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=bz,...g}=e,_=gH(),v=Qq(),y=_.useState(`open`),b=_.useState(`mounted`),x=_.useState(`trackCursorAxis`),S=_.useState(`disableHoverablePopup`),C=_.useState(`floatingRootContext`),w=_.useState(`instantType`),T=_.useState(`transitionStatus`),E=fJ({anchor:i,positionMethod:a,floatingRootContext:C,mounted:b,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:v,collisionAvoidance:h,adaptiveOrigin:_.useState(`hasViewport`)?lJ:void 0}),D=W.useMemo(()=>{let e={};return(!y||x===`both`||S)&&(e.pointerEvents=`none`),{role:`presentation`,hidden:!b,style:{...E.positionerStyles,...e}}},[y,x,S,b,E.positionerStyles]),O=W.useMemo(()=>({open:y,side:E.side,align:E.align,anchorHidden:E.anchorHidden,instant:x===`none`?w:`tracking-cursor`}),[y,E.side,E.align,E.anchorHidden,x,w]),k=W.useMemo(()=>({...O,arrowRef:E.arrowRef,arrowStyles:E.arrowStyles,arrowUncentered:E.arrowUncentered}),[O,E.arrowRef,E.arrowStyles,E.arrowUncentered]),A=Sz(`div`,e,{state:O,props:[D,mJ(T),g],ref:[t,_.useStateSetter(`positionerElement`)],stateAttributesMapping:qq});return(0,G.jsx)(tJ.Provider,{value:k,children:A})}),gJ={...qq,...YK},_J=W.forwardRef(function(e,t){let{className:n,render:r,...i}=e,a=gH(),{side:o,align:s}=nJ(),c=a.useState(`open`),l=a.useState(`instantType`),u=a.useState(`transitionStatus`),d=a.useState(`popupProps`),f=a.useState(`floatingRootContext`);ZK({open:c,ref:a.context.popupRef,onComplete(){c&&a.context.onOpenChangeComplete?.(!0)}});let p=a.useState(`disabled`),m=a.useState(`closeDelay`);return vq(f,{enabled:!p,closeDelay:m}),Sz(`div`,e,{state:{open:c,side:o,align:s,instant:l,transitionStatus:u},ref:[t,a.context.popupRef,a.useStateSetter(`popupElement`)],props:[d,mJ(u),i],stateAttributesMapping:gJ})});function vJ(e){return ez(19)?e:e?`true`:void 0}var yJ=(0,W.forwardRef)(({className:e,sideOffset:t=4,children:n,...r},i)=>(0,G.jsx)(eJ,{children:(0,G.jsx)(hJ,{sideOffset:t,children:(0,G.jsx)(_J,{ref:i,className:Y(`bg-[#1e1e1e] border border-neutral-700 rounded-md px-2.5 py-1.5 text-xs text-neutral-300 font-mono shadow-lg`,e),...r,children:n})})}));yJ.displayName=`TooltipContent`;function bJ(e){return e===`online`?`#22c55e`:e===`syncing`?`#f59e0b`:`#ef4444`}var xJ=(0,W.forwardRef)(({className:e,clients:t,positions:n,relayClientIds:r=[],serverPosition:i={x:420,y:190},relayPosition:a={x:780,y:190},viewBox:o={width:1200,height:380},totalNodes:s,onlineCount:c,offlineCount:l,...u},d)=>{let f=i.x,p=i.y,m=a.x,h=a.y,g={},_=2*Math.PI/Math.max(t.length,1);t.forEach((e,t)=>{let n=r.includes(e.id),i=n?m:f,a=n?h:p,o=n?240:260,s=n?130:150,c=_*t-Math.PI/2;g[e.id]={x:i+o*Math.cos(c),y:a+s*Math.sin(c)}});let v={};if(n)for(let e of n)v[e.clientId]={x:e.x,y:e.y};function y(e){return v[e]??g[e]??{x:600,y:190}}let b=s??t.length+2,x=c??t.filter(e=>e.status!==`offline`).length,S=l??t.filter(e=>e.status===`offline`).length;return(0,G.jsxs)(`div`,{ref:d,className:Y(`relative overflow-hidden`,`bg-[radial-gradient(ellipse_at_35%_50%,rgba(59,130,246,0.06)_0%,transparent_50%),radial-gradient(ellipse_at_68%_50%,rgba(139,92,246,0.04)_0%,transparent_40%),#0c0c0c]`,`bg-[image:radial-gradient(circle_at_1px_1px,#1a1a1a_1px,transparent_0)] bg-[size:24px_24px]`,e),style:{height:420},...u,children:[(0,G.jsx)(`div`,{className:`absolute left-0 right-0 h-px bg-[linear-gradient(90deg,transparent,rgba(59,130,246,0.3),transparent)] animate-[scanSweep_6s_ease-in-out_infinite] pointer-events-none`}),(0,G.jsx)(`div`,{className:`absolute top-4 left-5 z-10`,children:(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-500 uppercase tracking-widest`,children:`Sync Topology`})}),(0,G.jsxs)(`div`,{className:`absolute top-4 right-5 z-10 flex items-center gap-3`,children:[(0,G.jsxs)(`span`,{className:`font-mono text-[10px] text-neutral-600`,children:[b,` nodes`]}),(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-600`,children:`·`}),(0,G.jsxs)(`span`,{className:`font-mono text-[10px] text-healthy`,children:[x,` online`]}),(0,G.jsx)(`span`,{className:`font-mono text-[10px] text-neutral-600`,children:`·`}),(0,G.jsxs)(`span`,{className:`font-mono text-[10px] text-offline`,children:[S,` offline`]})]}),(0,G.jsxs)(`svg`,{viewBox:`0 0 ${o.width} ${o.height}`,className:`w-full h-full`,preserveAspectRatio:`xMidYMid meet`,children:[(0,G.jsx)(`ellipse`,{cx:f,cy:p,rx:280,ry:160,fill:`none`,stroke:`#1a1a1a`,strokeWidth:.5,strokeDasharray:`6 10`}),(0,G.jsx)(`ellipse`,{cx:m,cy:h,rx:260,ry:140,fill:`none`,stroke:`#1a1a1a`,strokeWidth:.5,strokeDasharray:`6 10`}),(0,G.jsx)(`line`,{x1:f,y1:p,x2:m,y2:h,stroke:`#8b5cf6`,strokeWidth:2,opacity:.3}),(0,G.jsx)(`line`,{x1:f,y1:p,x2:m,y2:h,stroke:`#8b5cf6`,strokeWidth:1,strokeDasharray:`4 2`,opacity:.6,children:(0,G.jsx)(`animate`,{attributeName:`stroke-dashoffset`,from:`20`,to:`0`,dur:`1s`,repeatCount:`indefinite`})}),(0,G.jsxs)(`circle`,{r:3,fill:`#8b5cf6`,opacity:.8,children:[(0,G.jsx)(`animateMotion`,{dur:`2.5s`,repeatCount:`indefinite`,path:`M${f},${p} L${m},${h}`}),(0,G.jsx)(`animate`,{attributeName:`opacity`,values:`0;0.8;0.8;0`,dur:`2.5s`,repeatCount:`indefinite`})]}),(0,G.jsxs)(`circle`,{r:3,fill:`#8b5cf6`,opacity:.8,children:[(0,G.jsx)(`animateMotion`,{dur:`2.5s`,begin:`1.25s`,repeatCount:`indefinite`,path:`M${m},${h} L${f},${p}`}),(0,G.jsx)(`animate`,{attributeName:`opacity`,values:`0;0.8;0.8;0`,dur:`2.5s`,begin:`1.25s`,repeatCount:`indefinite`})]}),(0,G.jsx)(`text`,{x:(f+m)/2,y:p-20,textAnchor:`middle`,fill:`#8b5cf6`,fontFamily:`JetBrains Mono, monospace`,fontSize:8,opacity:.4,letterSpacing:2,children:`BACKBONE`}),t.map(e=>{let t=y(e.id),n=r.includes(e.id),i=n?m:f,a=n?h:p,o=bJ(e.status),s=e.status===`syncing`?2.5:1.5;if(e.status===`offline`)return(0,G.jsx)(`line`,{x1:i,y1:a,x2:t.x,y2:t.y,stroke:o,strokeWidth:1,strokeDasharray:`3 6`,opacity:.2},`line-${e.id}`);let c=e.status===`syncing`?`1.2s`:`2.8s`,l=`${Number.parseFloat(c)/2}s`;return(0,G.jsxs)(`g`,{children:[(0,G.jsx)(`line`,{x1:i,y1:a,x2:t.x,y2:t.y,stroke:o,strokeWidth:s,strokeDasharray:`4 2`,children:(0,G.jsx)(`animate`,{attributeName:`stroke-dashoffset`,from:`20`,to:`0`,dur:`1s`,repeatCount:`indefinite`})}),(0,G.jsxs)(`circle`,{r:2.5,fill:o,opacity:.7,children:[(0,G.jsx)(`animateMotion`,{dur:c,repeatCount:`indefinite`,path:`M${i},${a} L${t.x},${t.y}`}),(0,G.jsx)(`animate`,{attributeName:`opacity`,values:`0;0.7;0.7;0`,dur:c,repeatCount:`indefinite`})]}),(0,G.jsxs)(`circle`,{r:2,fill:o,opacity:.5,children:[(0,G.jsx)(`animateMotion`,{dur:c,begin:l,repeatCount:`indefinite`,path:`M${t.x},${t.y} L${i},${a}`}),(0,G.jsx)(`animate`,{attributeName:`opacity`,values:`0;0.5;0.5;0`,dur:c,begin:l,repeatCount:`indefinite`})]})]},`line-${e.id}`)}),(0,G.jsxs)(`circle`,{cx:f,cy:p,r:50,fill:`none`,stroke:`#3b82f6`,strokeWidth:.5,opacity:.15,children:[(0,G.jsx)(`animate`,{attributeName:`r`,from:`32`,to:`60`,dur:`3s`,repeatCount:`indefinite`}),(0,G.jsx)(`animate`,{attributeName:`opacity`,from:`0.25`,to:`0`,dur:`3s`,repeatCount:`indefinite`})]}),(0,G.jsxs)(`circle`,{cx:f,cy:p,r:50,fill:`none`,stroke:`#3b82f6`,strokeWidth:.5,opacity:.15,children:[(0,G.jsx)(`animate`,{attributeName:`r`,from:`32`,to:`60`,dur:`3s`,begin:`1.5s`,repeatCount:`indefinite`}),(0,G.jsx)(`animate`,{attributeName:`opacity`,from:`0.25`,to:`0`,dur:`3s`,begin:`1.5s`,repeatCount:`indefinite`})]}),(0,G.jsx)(`circle`,{cx:f,cy:p,r:32,fill:`#0c0c0c`,stroke:`#3b82f6`,strokeWidth:2,style:{filter:`drop-shadow(0 0 12px rgba(59,130,246,0.4))`}}),(0,G.jsx)(`circle`,{cx:f,cy:p,r:16,fill:`rgba(59,130,246,0.12)`,stroke:`#3b82f6`,strokeWidth:.8}),(0,G.jsx)(`circle`,{cx:f,cy:p,r:6,fill:`#3b82f6`}),(0,G.jsx)(`text`,{x:f,y:p+48,textAnchor:`middle`,fill:`#444`,fontFamily:`JetBrains Mono, monospace`,fontSize:9,letterSpacing:2.5,children:`SERVER`}),(0,G.jsxs)(`circle`,{cx:m,cy:h,r:40,fill:`none`,stroke:`#8b5cf6`,strokeWidth:.5,opacity:.15,children:[(0,G.jsx)(`animate`,{attributeName:`r`,from:`26`,to:`48`,dur:`3.5s`,repeatCount:`indefinite`}),(0,G.jsx)(`animate`,{attributeName:`opacity`,from:`0.2`,to:`0`,dur:`3.5s`,repeatCount:`indefinite`})]}),(0,G.jsx)(`circle`,{cx:m,cy:h,r:26,fill:`#0c0c0c`,stroke:`#8b5cf6`,strokeWidth:2,style:{filter:`drop-shadow(0 0 10px rgba(139,92,246,0.35))`}}),(0,G.jsx)(`circle`,{cx:m,cy:h,r:13,fill:`rgba(139,92,246,0.12)`,stroke:`#8b5cf6`,strokeWidth:.8}),(0,G.jsx)(`circle`,{cx:m,cy:h,r:5,fill:`#8b5cf6`}),(0,G.jsx)(`text`,{x:m,y:h+42,textAnchor:`middle`,fill:`#444`,fontFamily:`JetBrains Mono, monospace`,fontSize:9,letterSpacing:2.5,children:`RELAY`}),t.map(e=>{let t=y(e.id),n=bJ(e.status),i=e.status===`offline`?.25:1,a=e.actor.replace(`user-`,``).replace(`svc-`,``),o=r.includes(e.id);return(0,G.jsxs)(`g`,{opacity:i,children:[(0,G.jsx)(`circle`,{cx:t.x,cy:t.y,r:20,fill:`#0c0c0c`,stroke:n,strokeWidth:1.5}),(0,G.jsx)(`circle`,{cx:t.x,cy:t.y,r:5,fill:n}),(0,G.jsx)(`text`,{x:t.x,y:t.y+32,textAnchor:`middle`,fill:`#555`,fontFamily:`JetBrains Mono, monospace`,fontSize:9,children:a}),(0,G.jsxs)(`text`,{x:t.x,y:t.y+42,textAnchor:`middle`,fill:`#333`,fontFamily:`JetBrains Mono, monospace`,fontSize:7,children:[e.type,o?` · relay`:``]})]},`node-${e.id}`)})]})]})});xJ.displayName=`TopologyHero`;var SJ=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.indeterminate=`data-indeterminate`,e.disabled=`data-disabled`,e.readonly=`data-readonly`,e.required=`data-required`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({});function CJ(e){return W.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[SJ.checked]:``}:{[SJ.unchecked]:``}},...gB}),[e.indeterminate])}var wJ=W.createContext({disabled:!1});function TJ(){return W.useContext(wJ)}var EJ=W.createContext(void 0);function DJ(e=!0){let t=W.useContext(EJ);if(t===void 0&&!e)throw Error(QR(3));return t}var OJ=W.createContext(void 0);function kJ(){let e=W.useContext(OJ);if(e===void 0)throw Error(QR(14));return e}var AJ=`data-parent`,jJ=W.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,"aria-labelledby":a,disabled:o=!1,id:s,indeterminate:c=!1,inputRef:l,name:u,onCheckedChange:d,parent:f=!1,readOnly:p=!1,render:m,required:h=!1,uncheckedValue:g,value:_,nativeButton:v=!1,...y}=e,{clearErrors:b}=xB(),{disabled:x,name:S,setDirty:C,setFilled:w,setFocused:T,setTouched:E,state:D,validationMode:O,validityData:k,shouldValidateOnChange:A,validation:j}=CB(),M=TJ(),{labelId:N,controlId:P,registerControlId:F,getDescriptionProps:I}=EB(),L=DJ(),ee=L?.parent,R=ee&&L.allValues,z=x||M.disabled||L?.disabled||o,B=S??u,V=_??B,H=Mz(),U=Mz(),te=P;R?te=f?U:`${ee.id}-${V}`:s&&(te=s);let ne={};R&&(f?ne=L.parent.getParentProps():V&&(ne=L.parent.getChildProps(V)));let re=X(d),{checked:ie=n,indeterminate:ae=c,onCheckedChange:oe,...se}=ne,ce=L?.value,le=L?.setValue,ue=L?.defaultValue,de=W.useRef(null),fe=PR(()=>Symbol(`checkbox-control`)),pe=W.useRef(!1),{getButtonProps:me,buttonRef:he}=sB({disabled:z,native:v}),ge=L?.validation??j,[_e,ve]=MR({controlled:V&&ce&&!f?ce.includes(V):ie,default:V&&ue&&!f?ue.includes(V):i,name:`Checkbox`,state:`checked`});Z(()=>{F!==JR&&(pe.current=!0,F(fe.current,te))},[te,L,F,f,fe]),W.useEffect(()=>{let e=fe.current;return()=>{!pe.current||F===JR||(pe.current=!1,F(e,void 0))}},[F,fe]),wB({enabled:!L,id:H,commit:ge.commit,value:_e,controlRef:de,name:B,getValue:()=>_e});let ye=W.useRef(null),be=zR(l,ye,ge.inputRef),xe=DB(a,N,ye,!v,te??void 0);Z(()=>{ye.current&&(ye.current.indeterminate=ae,_e&&w(!0))},[_e,ae,w]),WB(_e,()=>{L&&!f||(b(B),w(_e),C(_e!==k.initialValue),A()?ge.commit(_e):ge.commit(_e,!0))});let Se=sz({checked:_e,disabled:z,name:f?void 0:B,id:v?void 0:te??void 0,required:h,ref:be,style:B?qR:KR,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked,n=UB(jB,e.nativeEvent);oe?.(t,n),re(t,n),!n.isCanceled&&(ve(t),V&&ce&&le&&!f&&le(t?[...ce,V]:ce.filter(e=>e!==V),n))},onFocus(){de.current?.focus()}},_===void 0?XR:{value:(L?_e&&_:_)||``},I,L?ge.getValidationProps:ge.getInputValidationProps),Ce=R?!!ie:_e,we=R&&ae||c;W.useEffect(()=>{if(!ee||!V)return;let e=ee.disabledStatesRef.current;return e.set(V,z),()=>{e.delete(V)}},[ee,z,V]);let Te=W.useMemo(()=>({...D,checked:Ce,disabled:z,readOnly:p,required:h,indeterminate:we}),[D,Ce,z,p,h,we]),Ee=CJ(Te),De=Sz(`span`,e,{state:Te,ref:[he,de,t,L?.registerControlRef],props:[{id:v?te??void 0:H,role:`checkbox`,"aria-checked":ae?`mixed`:_e,"aria-readonly":p||void 0,"aria-required":h||void 0,"aria-labelledby":xe,[AJ]:f?``:void 0,onFocus(){T(!0)},onBlur(){let e=ye.current;e&&(E(!0),T(!1),O===`onBlur`&&ge.commit(L?ce:e.checked))},onClick(e){p||z||(e.preventDefault(),ye.current?.dispatchEvent(new PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},I,ge.getValidationProps,y,se,me],stateAttributesMapping:Ee});return(0,G.jsxs)(OJ.Provider,{value:Te,children:[De,!_e&&!L&&B&&!f&&g!==void 0&&(0,G.jsx)(`input`,{type:`hidden`,name:B,value:g}),(0,G.jsx)(`input`,{...Se})]})}),MJ=W.forwardRef(function(e,t){let{render:n,className:r,keepMounted:i=!1,...a}=e,o=kJ(),s=o.checked||o.indeterminate,{mounted:c,transitionStatus:l,setMounted:u}=GK(s),d=W.useRef(null),f={...o,transitionStatus:l};ZK({open:s,ref:d,onComplete(){s||u(!1)}});let p=CJ(o),m=W.useMemo(()=>({...p,...YK,...gB}),[p]),h=i||c,g=Sz(`span`,e,{ref:[t,d],state:f,stateAttributesMapping:m,props:a});return h?g:null}),NJ=(0,W.forwardRef)(({className:e,label:t,...n},r)=>{let i=(0,G.jsx)(jJ,{ref:r,className:Y(`w-[15px] h-[15px] border-[1.5px] border-neutral-700 rounded-full flex items-center justify-center cursor-pointer transition-all duration-200`,`data-[checked]:bg-healthy data-[checked]:border-healthy data-[checked]:shadow-[0_0_6px_rgba(34,197,94,0.3)]`,e),...n,children:(0,G.jsx)(MJ,{className:`flex items-center justify-center text-white`,children:(0,G.jsx)(`svg`,{width:`8`,height:`8`,viewBox:`0 0 8 8`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,G.jsx)(`path`,{d:`M1.5 4L3.25 5.75L6.5 2.25`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})})});return t?(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-2 cursor-pointer font-mono text-[11px] text-neutral-400`,children:[i,(0,G.jsx)(`span`,{children:t})]}):i});NJ.displayName=`Checkbox`;var PJ=W.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});function FJ(e=!1){let t=W.useContext(PJ);if(!t&&!e)throw Error(QR(86));return t}var IJ=function(e){let t=Mz(),n=e.controlId===void 0?t:e.controlId,[r,i]=W.useState(n),[a,o]=W.useState(e.labelId),[s,c]=W.useState([]),l=PR(()=>new Map),{messageIds:u}=EB(),d=X((e,t)=>{let n=l.current;if(t===void 0){n.delete(e);return}n.set(e,t),i(e=>{if(n.size===0)return;let t;for(let r of n.values()){if(e!==void 0&&r===e)return e;t===void 0&&(t=r)}return t})}),f=W.useCallback(e=>sz({"aria-describedby":u.concat(s).join(` `)||void 0},e),[u,s]),p=W.useMemo(()=>({controlId:r,registerControlId:d,labelId:a,setLabelId:o,messageIds:s,setMessageIds:c,getDescriptionProps:f}),[r,d,a,o,s,c,f]);return(0,G.jsx)(TB.Provider,{value:p,children:e.children})},LJ=Object.keys(pB);function RJ(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(let n of LJ)n!==`valid`&&(n===`valueMissing`&&(t=e[n]),e[n]&&(t=!1));return t}function zJ(e){let{formRef:t,clearErrors:n}=xB(),{setValidityData:r,validate:i,validityData:a,validationDebounceTime:o,invalid:s,markedDirtyRef:c,state:l,name:u,shouldValidateOnChange:d}=e,{controlId:f,getDescriptionProps:p}=EB(),m=xH(),h=W.useRef(null),g=X(async(e,n=!1)=>{let o=h.current;if(!o)return;if(n){if(l.valid!==!1)return;let n=o.validity;if(!n.valueMissing){let n={value:e,state:{...pB,valid:!0},error:``,errors:[],initialValue:a.initialValue};if(o.setCustomValidity(``),f){let e=t.current.fields.get(f);e&&t.current.fields.set(f,{...e,...yB(n,!1)})}r(n);return}let i=LJ.reduce((e,t)=>(e[t]=n[t],e),{});if(!i.valid&&!RJ(i))return}function u(e){let t=LJ.reduce((t,n)=>(t[n]=e.validity[n],t),{}),n=!1;for(let e of LJ)if(e!==`valid`){if(e===`valueMissing`&&t[e])n=!0;else if(t[e])return t}return n&&!c.current&&(t.valid=!0,t.valueMissing=!1),t}m.clear();let p=null,g=[],_=u(o),v,y=d();if(o.validationMessage&&!y)v=o.validationMessage,g=[o.validationMessage];else{let n=i(e,Array.from(t.current.fields.values()).reduce((e,t)=>(t.name&&(e[t.name]=t.getValue()),e),{}));p=typeof n==`object`&&n&&`then`in n?await n:n,p===null?y&&(o.setCustomValidity(``),_.customError=!1,o.validationMessage?(v=o.validationMessage,g=[o.validationMessage]):o.validity.valid&&!_.valid&&(_.valid=!0)):(_.valid=!1,_.customError=!0,Array.isArray(p)?(g=p,o.setCustomValidity(p.join(`
|
|
19
|
+
`))):p&&(g=[p],o.setCustomValidity(p)))}let b={value:e,state:_,error:v??(Array.isArray(p)?p[0]:p??``),errors:g,initialValue:a.initialValue};if(f){let e=t.current.fields.get(f);e&&t.current.fields.set(f,{...e,...yB(b,s)})}r(b)}),_=W.useCallback((e={})=>sz(p,l.valid===!1?{"aria-invalid":!0}:XR,e),[p,l.valid]),v=W.useCallback((e={})=>sz({onChange(e){if(e.nativeEvent.defaultPrevented)return;if(n(u),!d()){g(e.currentTarget.value,!0);return}let t=e.currentTarget;if(t.value===``){g(t.value);return}m.clear(),o?m.start(o,()=>{g(t.value)}):g(t.value)}},_(e)),[_,n,u,m,g,o,d]);return W.useMemo(()=>({getValidationProps:_,getInputValidationProps:v,inputRef:h,commit:g}),[_,v,g])}var BJ=W.forwardRef(function(e,t){let{errors:n,validationMode:r,submitAttemptedRef:i}=xB(),{render:a,className:o,validate:s,validationDebounceTime:c=0,validationMode:l=r,name:u,disabled:d=!1,invalid:f,dirty:p,touched:m,actionsRef:h,...g}=e,{disabled:_}=FJ(),v=X(s||(()=>null)),y=_||d,[b,x]=W.useState(!1),[S,C]=W.useState(!1),[w,T]=W.useState(!1),[E,D]=W.useState(!1),O=p??S,k=m??b,A=W.useRef(!1),j=X(e=>{p===void 0&&(e&&(A.current=!0),C(e))}),M=X(e=>{m===void 0&&x(e)}),N=X(()=>l===`onChange`||l===`onSubmit`&&i.current),P=!!u&&Object.hasOwn(n,u)&&n[u]!==void 0,F=f===!0||P,[I,L]=W.useState({state:pB,error:``,errors:[],value:null,initialValue:null}),ee=!F&&I.state.valid,R=W.useMemo(()=>({disabled:y,touched:k,dirty:O,valid:ee,filled:w,focused:E}),[y,k,O,ee,w,E]),z=zJ({setValidityData:L,validate:v,validityData:I,validationDebounceTime:c,invalid:F,markedDirtyRef:A,state:R,name:u,shouldValidateOnChange:N}),B=W.useCallback(()=>{A.current=!0,z.commit(I.value)},[z,I]);W.useImperativeHandle(h,()=>({validate:B}),[B]);let V=W.useMemo(()=>({invalid:F,name:u,validityData:I,setValidityData:L,disabled:y,touched:k,setTouched:M,dirty:O,setDirty:j,filled:w,setFilled:T,focused:E,setFocused:D,validate:v,validationMode:l,validationDebounceTime:c,shouldValidateOnChange:N,state:R,markedDirtyRef:A,validation:z}),[F,u,I,y,k,M,O,j,w,T,E,D,v,l,c,N,R,z]),H=Sz(`div`,e,{ref:t,state:R,props:g,stateAttributesMapping:gB});return(0,G.jsx)(SB.Provider,{value:V,children:H})}),VJ=W.forwardRef(function(e,t){return(0,G.jsx)(IJ,{children:(0,G.jsx)(BJ,{...e,ref:t})})});function HJ(e,t){let n=Mz(e);return Z(()=>(t(n),()=>{t(void 0)}),[n,t]),n}function UJ(e={}){let{id:t,fallbackControlId:n,native:r=!1,setLabelId:i,focusControl:a}=e,{controlId:o,setLabelId:s}=EB(),c=HJ(t,X(e=>{s(e),i?.(e)})),l=o??n;function u(e){if(a){a(e,l);return}if(!l)return;let t=gW(e.currentTarget).getElementById(l);zz(t)&&WJ(t)}function d(e){BH(e.nativeEvent)?.closest(`button,input,select,textarea`)||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),!r&&u(e))}return r?{id:c,htmlFor:l??void 0,onMouseDown:d}:{id:c,onClick:d,onPointerDown(e){e.preventDefault()}}}function WJ(e){e.focus({focusVisible:!0})}var GJ=W.forwardRef(function(e,t){let{render:n,className:r,id:i,nativeLabel:a=!0,...o}=e,s=CB(!1),{labelId:c}=EB(),l=W.useRef(null),u=UJ({id:c??i,native:a});return Sz(`label`,e,{ref:[t,l],state:s.state,props:[u,o],stateAttributesMapping:gB})}),KJ={...gB,...YK},qJ=W.forwardRef(function(e,t){let{render:n,id:r,className:i,match:a,...o}=e,s=Mz(r),{validityData:c,state:l,name:u}=CB(!1),{setMessageIds:d}=EB(),{errors:f}=xB(),p=u?f[u]:null,m=!1;m=p||a===!0?!0:a?!!c.state[a]:c.state.valid===!1;let{mounted:h,transitionStatus:g,setMounted:_}=GK(m);Z(()=>{if(!(!m||!s))return d(e=>e.concat(s)),()=>{d(e=>e.filter(e=>e!==s))}},[m,s,d]);let v=W.useRef(null),[y,b]=W.useState(null),[x,S]=W.useState(null),C=p||(c.errors.length>1?(0,G.jsx)(`ul`,{children:c.errors.map(e=>(0,G.jsx)(`li`,{children:e},e))}):c.error),w=c.error;p==null?c.errors.length>1&&(w=JSON.stringify(c.errors)):w=Array.isArray(p)?JSON.stringify(p):p,m&&w!==x&&(S(w),b(C)),ZK({open:m,ref:v,onComplete(){m||_(!1)}});let T={...l,transitionStatus:g},E=Sz(`div`,e,{ref:[t,v],state:T,props:[{id:s,children:m?C:y},o],stateAttributesMapping:KJ,enabled:h});return h?E:null}),JJ=W.forwardRef(function(e,t){let{render:n,id:r,className:i,...a}=e,o=Mz(r),s=CB(!1),{setMessageIds:c}=EB();return Z(()=>{if(o)return c(e=>e.concat(o)),()=>{c(e=>e.filter(e=>e!==o))}},[o,c]),Sz(`p`,e,{ref:t,state:s.state,props:[{id:o},a],stateAttributesMapping:gB})}),YJ=VJ,XJ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(GJ,{ref:n,className:Y(`font-mono text-[9px] text-neutral-500 uppercase tracking-wider block mb-1.5`,e),...t}));XJ.displayName=`FieldLabel`;var ZJ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(JJ,{ref:n,className:Y(`font-mono text-[9px] text-neutral-600 mt-0.5`,e),...t}));ZJ.displayName=`FieldDescription`;var QJ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(qJ,{ref:n,className:Y(`font-mono text-[10px] text-offline mt-1`,e),...t}));QJ.displayName=`FieldError`;var $J=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`div`,{ref:n,className:Y(e),...t}));$J.displayName=`FieldContent`;var eY=W.createContext(null),tY=W.createContext(null);function nY(){let e=W.useContext(eY);if(e===null)throw Error(QR(60));return e}function rY(){let e=W.useContext(tY);if(e===null)throw Error(QR(61));return e}function iY(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function aY(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:iY(t,e,n))}function oY(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:iY(e,t,n))}function sY(e,t,n){return e.filter(e=>!iY(t,e,n))}function cY(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function lY(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function uY(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(lY(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function dY(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?cY(e.value):cY(e)}var fY={id:$(e=>e.id),labelId:$(e=>e.labelId),modal:$(e=>e.modal),multiple:$(e=>e.multiple),items:$(e=>e.items),itemToStringLabel:$(e=>e.itemToStringLabel),itemToStringValue:$(e=>e.itemToStringValue),isItemEqualToValue:$(e=>e.isItemEqualToValue),value:$(e=>e.value),hasSelectedValue:$(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:dY(t,r)!==``}),hasNullItemLabel:$((e,t)=>t?uY(e.items):!1),open:$(e=>e.open),mounted:$(e=>e.mounted),forceMount:$(e=>e.forceMount),transitionStatus:$(e=>e.transitionStatus),openMethod:$(e=>e.openMethod),activeIndex:$(e=>e.activeIndex),selectedIndex:$(e=>e.selectedIndex),isActive:$((e,t)=>e.activeIndex===t),isSelected:$((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>iY(n,e,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:iY(n,i,r)}),isSelectedByFocus:$((e,t)=>e.selectedIndex===t),popupProps:$(e=>e.popupProps),triggerProps:$(e=>e.triggerProps),triggerElement:$(e=>e.triggerElement),positionerElement:$(e=>e.positionerElement),listElement:$(e=>e.listElement),scrollUpArrowVisible:$(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:$(e=>e.scrollDownArrowVisible),hasScrollArrows:$(e=>e.hasScrollArrows)};function pY(e){let t=W.useRef(``),n=W.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:W.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function mY(e){let[t,n]=W.useState(null),r=X((t,r)=>{e||n(r||(DH?`touch`:``))});WB(e,t=>{t&&!e&&n(null)});let{onClick:i,onPointerDown:a}=pY(r);return W.useMemo(()=>({openMethod:t,triggerProps:{onClick:i,onPointerDown:a}}),[t,i,a])}function hY(e,t){return e??t}function gY(e){let t=e.getBoundingClientRect(),n=window.getComputedStyle(e,`::before`),r=window.getComputedStyle(e,`::after`);if(!(n.content!==`none`||r.content!==`none`))return t;let i=parseFloat(n.width)||0,a=parseFloat(n.height)||0,o=parseFloat(r.width)||0,s=parseFloat(r.height)||0,c=Math.max(t.width,i,o),l=Math.max(t.height,a,s),u=c-t.width,d=l-t.height;return{left:t.left-u/2,right:t.right+u/2,top:t.top-d/2,bottom:t.bottom+d/2}}var _Y=2,vY=400,yY=200,bY={...Kq,...gB,value:()=>null},xY=W.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,...s}=e,{setTouched:c,setFocused:l,validationMode:u,state:d,disabled:f}=CB(),{labelId:p}=EB(),{store:m,setOpen:h,selectionRef:g,validation:_,readOnly:v,required:y,alignItemWithTriggerActiveRef:b,disabled:x,keyboardActiveRef:S}=nY(),C=f||x||a,w=LK(m,fY.open),T=LK(m,fY.value),E=LK(m,fY.triggerProps),D=LK(m,fY.positionerElement),O=LK(m,fY.listElement),k=LK(m,fY.id),A=LK(m,fY.labelId),j=LK(m,fY.hasSelectedValue),M=!j&&w,N=LK(m,fY.hasNullItemLabel,M),P=i??k,F=hY(p,A);AB({id:P});let I=AW(D),L=W.useRef(null),{getButtonProps:ee,buttonRef:R}=sB({disabled:C,native:o}),z=zR(t,L,R,X(e=>{m.set(`triggerElement`,e)})),B=xH(),V=xH(),H=xH(),U=xH();W.useEffect(()=>{if(w)return j||N?U.start(yY,()=>{g.current.allowUnselectedMouseUp=!0,H.start(yY,()=>{g.current.allowSelectedMouseUp=!0})}):H.start(vY,()=>{g.current.allowUnselectedMouseUp=!0,g.current.allowSelectedMouseUp=!0}),()=>{H.clear(),U.clear()};g.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},V.clear()},[w,j,N,g,V,H,U]);let te=W.useMemo(()=>O?.id??KH(D)?.id,[O,D]),ne=sz(E,{id:P,role:`combobox`,"aria-expanded":w?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":w?te:void 0,"aria-labelledby":F,"aria-readonly":v||void 0,"aria-required":y||void 0,tabIndex:C?-1:0,ref:z,onFocus(e){l(!0),w&&b.current&&h(!1,UB(jB,e.nativeEvent)),B.start(0,()=>{m.set(`forceMount`,!0)})},onBlur(e){RH(D,e.relatedTarget)||(c(!0),l(!1),u===`onBlur`&&_.commit(T))},onPointerMove(){S.current=!1},onKeyDown(){S.current=!0},onMouseDown(e){if(w)return;let t=gW(e.currentTarget);function n(e){if(!L.current)return;let t=e.target;if(RH(L.current,t)||RH(I.current,t)||t===L.current)return;let n=gY(L.current);e.clientX>=n.left-_Y&&e.clientX<=n.right+_Y&&e.clientY>=n.top-_Y&&e.clientY<=n.bottom+_Y||h(!1,UB(zB,e))}V.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},_.getValidationProps,s,ee);ne.role=`combobox`;let re={...d,open:w,disabled:C,value:T,readOnly:v,placeholder:!j};return Sz(`button`,e,{ref:[t,L],state:re,stateAttributesMapping:bY,props:ne})}),SY=W.createContext(void 0),CY=W.forwardRef(function(e,t){let{store:n}=nY(),r=LK(n,fY.mounted),i=LK(n,fY.forceMount);return r||i?(0,G.jsx)(SY.Provider,{value:!0,children:(0,G.jsx)(nG,{ref:t,...e})}):null}),wY={},TY={},EY=``;function DY(e){if(typeof document>`u`)return!1;let t=gW(e);return Fz(t).innerWidth-t.documentElement.clientWidth>0}function OY(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=gW(e),n=t.documentElement,r=t.body,i=Vz(n)?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 kY(e){let t=gW(e),n=t.documentElement,r=t.body,i=Vz(n)?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 AY(e){let t=gW(e),n=t.documentElement,r=t.body,i=Fz(n),a=0,o=0,s=!1,c=PW.create();if(EH&&(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,wY={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},EY=n.style.scrollBehavior,TY={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=Vz(n)?n:r;if(s=OY(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`,overflow:`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,wY),Object.assign(r.style,TY),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=EY)}function d(){u(),c.request(l)}return l(),i.addEventListener(`resize`,d),()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&i.removeEventListener(`resize`,d)}}var jY=new class{lockCount=0;restore=null;timeoutLock=bH.create();timeoutUnlock=bH.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=gW(e).documentElement,n=Fz(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=JR;return}this.restore=DH||!DY(e)?kY(e):AY(e)}};function MY(e=!0,t=null){Z(()=>{if(e)return jY.acquire(t)},[e,t])}var NY=W.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function PY(){return W.useContext(NY)}function FY(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=X(i),o=W.useRef(0),s=PR(LY).current,c=PR(IY).current,[l,u]=W.useState(0),d=W.useRef(l),f=X((e,t)=>{c.set(e,t??null),d.current+=1,u(d.current)}),p=X(e=>{c.delete(e),d.current+=1,u(d.current)}),m=W.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(RY).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);Z(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),Z(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),Z(()=>()=>{n.current=[]},[n]),Z(()=>()=>{r&&(r.current=[])},[r]);let h=X(e=>(s.add(e),()=>{s.delete(e)}));Z(()=>{s.forEach(e=>e(m))},[s,m]);let g=W.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return(0,G.jsx)(NY.Provider,{value:g,children:t})}function IY(){return new Map}function LY(){return new Set}function RY(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var zY=W.createContext(void 0);function BY(){let e=W.useContext(zY);if(!e)throw Error(QR(59));return e}var VY=W.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n?.getBoundingClientRect();i=`polygon(
|
|
20
|
+
0% 0%,
|
|
21
|
+
100% 0%,
|
|
22
|
+
100% 100%,
|
|
23
|
+
0% 100%,
|
|
24
|
+
0% 0%,
|
|
25
|
+
${e.left}px ${e.top}px,
|
|
26
|
+
${e.left}px ${e.bottom}px,
|
|
27
|
+
${e.right}px ${e.bottom}px,
|
|
28
|
+
${e.right}px ${e.top}px,
|
|
29
|
+
${e.left}px ${e.top}px
|
|
30
|
+
)`}return(0,G.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function HY(e,t){e&&Object.assign(e.style,t)}var UY={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},WY={position:`fixed`},GY=W.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=yz,..._}=e,{store:v,listRef:y,labelsRef:b,alignItemWithTriggerActiveRef:x,selectedItemTextRef:S,valuesRef:C,initialValueRef:w,popupRef:T,setValue:E}=nY(),D=rY(),O=LK(v,fY.open),k=LK(v,fY.mounted),A=LK(v,fY.modal),j=LK(v,fY.value),M=LK(v,fY.openMethod),N=LK(v,fY.positionerElement),P=LK(v,fY.triggerElement),F=LK(v,fY.isItemEqualToValue),I=LK(v,fY.transitionStatus),L=W.useRef(null),ee=W.useRef(null),[R,z]=W.useState(h),B=k&&R&&M!==`touch`;!k&&R!==h&&z(h),Z(()=>{k||(fY.scrollUpArrowVisible(v.state)&&v.set(`scrollUpArrowVisible`,!1),fY.scrollDownArrowVisible(v.state)&&v.set(`scrollDownArrowVisible`,!1))},[v,k]),W.useImperativeHandle(x,()=>B),MY((B||A)&&O&&M!==`touch`,P);let V=fJ({anchor:n,floatingRootContext:D,positionMethod:r,mounted:k,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??B,collisionAvoidance:g,keepMounted:!0}),H=B?`none`:V.side,U=B?WY:V.positionerStyles,te=W.useMemo(()=>{let e={};return O||(e.pointerEvents=`none`),{role:`presentation`,hidden:!k,style:{...U,...e}}},[O,k,U]),ne={open:O,side:H,align:V.align,anchorHidden:V.anchorHidden},re=Sz(`div`,e,{ref:[t,X(e=>{v.set(`positionerElement`,e)})],state:ne,stateAttributesMapping:qq,props:[te,mJ(I),_]}),ie=W.useRef(0),ae=X(e=>{if(e.size===0&&ie.current===0||C.current.length===0)return;let t=ie.current;if(ie.current=e.size,e.size===t)return;let n=UB(jB);if(t!==0&&!v.state.multiple&&j!==null&&oY(C.current,j,F)===-1){let e=w.current,t=e!=null&&oY(C.current,e,F)!==-1?e:null;E(t,n),t===null&&(v.set(`selectedIndex`,null),S.current=null)}if(t!==0&&v.state.multiple&&Array.isArray(j)){let e=e=>oY(C.current,e,F)!==-1,t=j.filter(t=>e(t));(t.length!==j.length||t.some(e=>!aY(j,e,F)))&&(E(t,n),t.length===0&&(v.set(`selectedIndex`,null),S.current=null))}if(O&&B){v.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};HY(N,e),HY(T.current,e)}}),oe=W.useMemo(()=>({...V,side:H,alignItemWithTriggerActive:B,setControlledAlignItemWithTrigger:z,scrollUpArrowRef:L,scrollDownArrowRef:ee}),[V,H,B,z]);return(0,G.jsx)(FY,{elementsRef:y,labelsRef:b,onMapChange:ae,children:(0,G.jsxs)(zY.Provider,{value:oe,children:[k&&A&&(0,G.jsx)(VY,{inert:vJ(!O),cutout:P}),re]})})});function KY(e){let t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}var qY=`base-ui-disable-scrollbar`,JY={className:qY,getElement(e){return(0,G.jsx)(`style`,{nonce:e,href:qY,precedence:`base-ui:low`,children:`.${qY}{scrollbar-width:none}.${qY}::-webkit-scrollbar{display:none}`})}},YY=W.createContext(void 0);function XY(e){let t=W.useContext(YY);if(t===void 0&&!e)throw Error(QR(69));return t}var ZY=`ArrowUp`,QY=`ArrowDown`,$Y=`ArrowLeft`,eX=`ArrowRight`,tX=`Home`,nX=new Set([$Y,eX]),rX=new Set([$Y,eX,tX,`End`]),iX=new Set([ZY,QY]),aX=new Set([ZY,QY,tX,`End`]),oX=new Set([...nX,...iX]),sX=new Set([...oX,tX,`End`]),cX=new Set([ZY,QY,$Y,eX,tX,`End`]),lX=new Set([`Shift`,`Control`,`Alt`,`Meta`]);function uX(e){return zz(e)&&e.tagName===`INPUT`}function dX(e){return!!(uX(e)&&e.selectionStart!=null||zz(e)&&e.tagName===`TEXTAREA`)}function fX(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=pX(e,t,`left`),a=mX(e),o=mX(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginRight<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=pX(e,t,`top`),r=mX(e),i=mX(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function pX(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function mX(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}function hX(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var gX=W.createContext(void 0),_X={disableStyleElements:!1};function vX(){return W.useContext(gX)??_X}var yX=1,bX={...qq,...YK},xX=W.forwardRef(function(e,t){let{render:n,className:r,finalFocus:i,...a}=e,{store:o,popupRef:s,onOpenChangeComplete:c,setOpen:l,valueRef:u,selectedItemTextRef:d,keyboardActiveRef:f,multiple:p,handleScrollArrowVisibility:m,scrollHandlerRef:h,highlightItemOnHover:g}=nY(),{side:_,align:v,alignItemWithTriggerActive:y,setControlledAlignItemWithTrigger:b,scrollDownArrowRef:x,scrollUpArrowRef:S}=BY(),C=XY(!0)!=null,w=rY(),{nonce:T,disableStyleElements:E}=vX(),D=xH(),O=LK(o,fY.id),k=LK(o,fY.open),A=LK(o,fY.mounted),j=LK(o,fY.popupProps),M=LK(o,fY.transitionStatus),N=LK(o,fY.triggerElement),P=LK(o,fY.positionerElement),F=LK(o,fY.listElement),I=W.useRef(0),L=W.useRef(!1),ee=W.useRef(0),R=W.useRef(!1),z=W.useRef({}),B=FW(),V=X(e=>{if(!P||!s.current||!R.current)return;if(L.current||!y){m();return}let t=P.style.top===`0px`,n=P.style.bottom===`0px`,r=P.getBoundingClientRect().height,i=gW(P),a=getComputedStyle(P),o=parseFloat(a.marginTop),c=parseFloat(a.marginBottom),l=SX(getComputedStyle(s.current)),u=Math.min(i.documentElement.clientHeight-o-c,l),d=e.scrollTop,f=CX(e),p=0,h=null,g=!1,_=!1,v=e=>{P.style.height=`${e}px`},b=(t,n)=>{let i=hX(t,0,u-r);i>0&&v(r+i),e.scrollTop=n,u-(r+i)<=yX&&(L.current=!0),m()};if(t){let e=f-d,t=r+e,n=Math.min(t,u);if(p=n,e<=yX){b(e,f);return}u-n>yX?_=!0:g=!0}else if(n){let e=d,t=r+e,n=Math.min(t,u),i=t-u;if(p=n,e<=yX){b(e,0);return}u-n>yX?h=0:(g=!0,d<f&&(h=d-(e-i)))}if(p=Math.ceil(p),p!==0&&v(p),_||h!=null){let t=CX(e),n=_?t:hX(h,0,t);Math.abs(e.scrollTop-n)>yX&&(e.scrollTop=n)}(g||p>=u-yX)&&(L.current=!0),m()});W.useImperativeHandle(h,()=>V,[V]),ZK({open:k,ref:s,onComplete(){k&&c?.(!0)}});let H={open:k,transitionStatus:M,side:_,align:v};Z(()=>{!P||!s.current||Object.keys(z.current).length||(z.current={top:P.style.top||`0`,left:P.style.left||`0`,right:P.style.right,height:P.style.height,bottom:P.style.bottom,minHeight:P.style.minHeight,maxHeight:P.style.maxHeight,marginTop:P.style.marginTop,marginBottom:P.style.marginBottom})},[s,P]),Z(()=>{k||y||(R.current=!1,L.current=!1,I.current=0,ee.current=0,HY(P,z.current))},[k,y,P,s]),Z(()=>{let e=s.current;if(!(!k||!N||!P||!e||o.state.transitionStatus===`ending`)){if(!y){R.current=!0,B.request(m),e.style.removeProperty(`--transform-origin`);return}queueMicrotask(()=>{let t=DX(e);e.style.removeProperty(`--transform-origin`);try{let t=getComputedStyle(P),n=getComputedStyle(e),r=gW(N),i=Fz(P),a=wX(N),o=TX(N.getBoundingClientRect(),a),s=TX(P.getBoundingClientRect(),a),c=o.left,l=o.height,f=F||e,p=f.scrollHeight,h=parseFloat(n.borderBottomWidth),g=parseFloat(t.marginTop)||10,_=parseFloat(t.marginBottom)||10,v=parseFloat(t.minHeight)||100,y=SX(n),x=r.documentElement.clientHeight-g-_,S=r.documentElement.clientWidth,C=x-o.bottom+l,w=d.current,T=u.current,E,D=0,O=0;if(w&&T){let e=TX(T.getBoundingClientRect(),a);E=TX(w.getBoundingClientRect(),a);let t=e.left-c,n=E.left-s.left,r=e.top-o.top+e.height/2,i=E.top-s.top+E.height/2;D=t-n,O=i-r}let k=C+O+_+h,A=Math.min(x,k),j=x-g-_,M=k-A,ee=Math.max(5,c+D),B=S-5,V=Math.max(0,ee+s.width-B);P.style.left=`${ee-V}px`,P.style.height=`${A}px`,P.style.maxHeight=`auto`,P.style.marginTop=`${g}px`,P.style.marginBottom=`${_}px`,e.style.height=`100%`;let H=CX(f),U=M>=H-yX;U&&(A=Math.min(x,s.height)-(M-H));let te=o.top<20||o.bottom>x-20||Math.ceil(A)+yX<Math.min(p,v),ne=(i.visualViewport?.scale??1)!==1&&EH;if(te||ne){R.current=!0,HY(P,z.current),Dv.flushSync(()=>b(!1));return}if(U){let e=Math.max(0,x-k);P.style.top=s.height>=j?`0`:`${e}px`,P.style.height=`${A}px`,f.scrollTop=CX(f),I.current=Math.max(v,A)}else P.style.bottom=`0`,I.current=Math.max(v,A),f.scrollTop=M;if(E){let t=s.top,n=s.height,r=E.top+E.height/2,i=hX(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(I.current===x||A>=y)&&(L.current=!0),m(),setTimeout(()=>{R.current=!0})}finally{t()}})}},[o,k,P,N,u,d,s,m,y,b,B,x,S,F]),W.useEffect(()=>{if(!y||!P||!k)return;let e=Fz(P);function t(e){l(!1,UB(HB,e))}return e.addEventListener(`resize`,t),()=>{e.removeEventListener(`resize`,t)}},[l,y,P,k]);let U={...F?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":p||void 0,id:`${O}-list`},onKeyDown(e){f.current=!0,C&&cX.has(e.key)&&e.stopPropagation()},onMouseMove(){f.current=!1},onPointerLeave(e){if(!g||KY(e)||e.pointerType===`touch`)return;let t=e.currentTarget;D.start(0,()=>{o.set(`activeIndex`,null),t.focus({preventScroll:!0})})},onScroll(e){F||V(e.currentTarget)},...y&&{style:F?{height:`100%`}:UY}},te=Sz(`div`,e,{ref:[t,s],state:H,stateAttributesMapping:bX,props:[j,U,mJ(M),{className:!F&&y?JY.className:void 0},a]});return(0,G.jsxs)(W.Fragment,{children:[!E&&JY.getElement(T),(0,G.jsx)(vG,{context:w,modal:!1,disabled:!A,returnFocus:i,restoreFocus:!0,children:te})]})});function SX(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function CX(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function wX(e){return fK.getScale(e)}function TX(e,t){return OU({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}var EX=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function DX(e){let{style:t}=e,n={};for(let[e,r]of EX)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of EX){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var OX=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function kX(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=PY(),f=W.useRef(-1),[p,m]=W.useState(a??(i===OX.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=W.useRef(null),g=W.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return Z(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),Z(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),W.useMemo(()=>({ref:g,index:p}),[p,g])}var AX=W.createContext(void 0),jX=W.memo(W.forwardRef(function(e,t){let{render:n,className:r,value:i=null,label:a,disabled:o=!1,nativeButton:s=!1,...c}=e,l=W.useRef(null),u=kX({label:a,textRef:l,indexGuessBehavior:OX.GuessFromOrder}),{store:d,getItemProps:f,setOpen:p,setValue:m,selectionRef:h,typingRef:g,valuesRef:_,keyboardActiveRef:v,multiple:y,highlightItemOnHover:b}=nY(),x=xH(),S=LK(d,fY.isActive,u.index),C=LK(d,fY.isSelected,u.index,i),w=LK(d,fY.isSelectedByFocus,u.index),T=LK(d,fY.isItemEqualToValue),E=u.index,D=E!==-1,O=W.useRef(null),k=AW(E);Z(()=>{if(!D)return;let e=_.current;return e[E]=i,()=>{delete e[E]}},[D,E,i,_]),Z(()=>{if(!D)return;let e=d.state.value,t=e;y&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&iY(i,t,T)&&d.set(`selectedIndex`,E)},[D,E,y,T,d,i]);let A={disabled:o,selected:C,highlighted:S},j=f({active:S,selected:C});j.onFocus=void 0,j.id=void 0;let M=W.useRef(null),N=W.useRef(`mouse`),P=W.useRef(!1),{getButtonProps:F,buttonRef:I}=sB({disabled:o,focusableWhenDisabled:!0,native:s,composite:!0});function L(e){let t=d.state.value;if(y){let n=Array.isArray(t)?t:[];m(C?sY(n,i,T):[...n,i],UB(IB,e))}else m(i,UB(IB,e)),p(!1,UB(IB,e))}let ee={role:`option`,"aria-selected":C,tabIndex:S?0:-1,onFocus(){d.set(`activeIndex`,E)},onMouseEnter(){!v.current&&d.state.selectedIndex===null&&b&&d.set(`activeIndex`,E)},onMouseMove(){b&&d.set(`activeIndex`,E)},onMouseLeave(e){!b||v.current||KY(e)||x.start(0,()=>{d.state.activeIndex===E&&d.set(`activeIndex`,null)})},onTouchStart(){h.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){M.current=e.key,d.set(`activeIndex`,E),e.key===` `&&g.current&&e.preventDefault()},onClick(e){P.current=!1,!(e.type===`keydown`&&M.current===null)&&(o||e.type===`keydown`&&M.current===` `&&g.current||N.current!==`touch`&&!S||(M.current=null,L(e.nativeEvent)))},onPointerEnter(e){N.current=e.pointerType},onPointerDown(e){N.current=e.pointerType,P.current=!0},onMouseUp(){if(o)return;if(P.current){P.current=!1;return}let e=!h.current.allowSelectedMouseUp&&C,t=!h.current.allowUnselectedMouseUp&&!C;e||t||N.current!==`touch`&&!S||O.current?.click()}},R=Sz(`div`,e,{ref:[I,t,u.ref,O],state:A,props:[j,ee,c,F]}),z=W.useMemo(()=>({selected:C,indexRef:k,textRef:l,selectedByFocus:w,hasRegistered:D}),[C,k,l,w,D]);return(0,G.jsx)(AX.Provider,{value:z,children:R})})),MX=(0,W.forwardRef)(({className:e,children:t,...n},r)=>(0,G.jsx)(xY,{ref:r,className:Y(`inline-flex items-center justify-between bg-surface border border-border rounded-md px-3 py-1.5 font-mono text-[12px] text-foreground cursor-pointer hover:border-border-bright transition`,e),...n,children:t}));MX.displayName=`SelectTrigger`;var NX=(0,W.forwardRef)(({className:e,portalProps:t,positionerProps:n,...r},i)=>(0,G.jsx)(CY,{...t,children:(0,G.jsx)(GY,{...n,children:(0,G.jsx)(xX,{ref:i,className:Y(`bg-panel border border-border rounded-md py-1 shadow-lg z-50`,e),...r})})}));NX.displayName=`SelectContent`;var PX=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(jX,{ref:n,className:Y(`font-mono text-[11px] px-3 py-1.5 text-neutral-400 cursor-pointer hover:bg-white/[0.03] hover:text-white data-[highlighted]:bg-white/[0.03] data-[highlighted]:text-white outline-none`,e),...t}));PX.displayName=`SelectItem`;var FX=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`textarea`,{ref:n,className:Y(`bg-surface border border-border rounded-md px-3 py-2 font-mono text-[12px] text-foreground outline-none w-full transition focus:border-flow placeholder:text-neutral-600 resize-none min-h-[80px]`,e),...t}));FX.displayName=`Textarea`;var IX=W.createContext(void 0);function LX(e=!0){let t=W.useContext(IX);if(t===void 0&&!e)throw Error(QR(7));return t}function RX(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=aB(),{ref:i,index:a}=kX(e),o=n===a,s=W.useRef(null),c=zR(i,s);return{compositeProps:W.useMemo(()=>({tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}}),[o,r,a,t]),compositeRef:c,index:a}}function zX(e){let{render:t,className:n,state:r=XR,props:i=YR,refs:a=YR,metadata:o,stateAttributesMapping:s,tag:c=`div`,...l}=e,{compositeProps:u,compositeRef:d}=RX({metadata:o});return Sz(c,e,{state:r,ref:[...a,d],props:[u,...i,l],stateAttributesMapping:s})}var BX=W.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:i=!1,form:a,onPressedChange:o,pressed:s,render:c,type:l,value:u,nativeButton:d=!0,...f}=e,p=Mz(u||void 0),m=LX(),h=m?.value??[],g=m?void 0:r,_=(i||m?.disabled)??!1,[v,y]=MR({controlled:m?p!==void 0&&h.indexOf(p)>-1:s,default:g,name:`Toggle`,state:`pressed`}),b=X((e,t)=>{p&&m?.setGroupValue?.(p,e,t),o?.(e,t)}),{getButtonProps:x,buttonRef:S}=sB({disabled:_,native:d}),C={disabled:_,pressed:v},w=[S,t],T=[{"aria-pressed":v,onClick(e){let t=!v,n=UB(jB,e.nativeEvent);b(t,n),!n.isCanceled&&y(t)}},f,x],E=Sz(`button`,e,{enabled:!m,state:C,ref:w,props:T});return m?(0,G.jsx)(zX,{tag:`button`,render:c,className:n,state:C,refs:w,props:T}):E}),VX=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(BX,{ref:n,className:Y(`font-mono text-[10px] text-neutral-500 border border-transparent rounded-sm px-2.5 py-1 cursor-pointer transition-all hover:text-neutral-300 data-[pressed]:text-white data-[pressed]:border-border-bright data-[pressed]:bg-white/[0.03]`,e),...t}));VX.displayName=`Toggle`;function HX(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var UX=`data-composite-item-active`,WX=[];function GX(e){let{itemSizes:t,cols:n=1,loopFocus:r=!0,dense:i=!1,orientation:a=`both`,direction:o,highlightedIndex:s,onHighlightedIndexChange:c,rootRef:l,enableHomeAndEndKeys:u=!1,stopEventPropagation:d=!1,disabledIndices:f,modifierKeys:p=WX}=e,[m,h]=W.useState(0),g=n>1,_=W.useRef(null),v=zR(_,l),y=W.useRef([]),b=W.useRef(!1),x=s??m,S=X((e,t=!1)=>{if((c??h)(e),t){let t=y.current[e];fX(_.current,t,o,a)}}),C=X(e=>{if(e.size===0||b.current)return;b.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,r=n?t.indexOf(n):-1;r!==-1&&S(r),fX(_.current,n,o,a)}),w=W.useMemo(()=>({"aria-orientation":a===`both`?void 0:a,ref:v,onFocus(e){!_.current||!dX(e.target)||e.target.setSelectionRange(0,e.target.value.length??0)},onKeyDown(e){let s=u?sX:oX;if(!s.has(e.key)||KX(e,p)||!_.current)return;let c=o===`rtl`,l=c?$Y:eX,m={horizontal:l,vertical:QY,both:l}[a],h=c?eX:$Y,v={horizontal:h,vertical:ZY,both:h}[a];if(dX(e.target)&&!HX(e.target)){let t=e.target.selectionStart,n=e.target.selectionEnd,r=e.target.value??``;if(t==null||e.shiftKey||t!==n||e.key!==v&&t<r.length||e.key!==m&&t>0)return}let b=x,C=jU(y,f),w=MU(y,f);if(g){let o=t||Array.from({length:y.current.length},()=>({width:1,height:1})),s=FU(o,n,i),l=s.findIndex(e=>e!=null&&!RU(y,e,f)),u=s.reduce((e,t,n)=>t!=null&&!RU(y,t,f)?n:e,-1);b=s[PU({current:s.map(e=>e?y.current[e]:null)},{event:e,orientation:a,loopFocus:r,cols:n,disabledIndices:LU([...f||y.current.map((e,t)=>RU(y,t)?t:void 0),void 0],s),minIndex:l,maxIndex:u,prevIndex:IU(x>w?C:x,o,s,n,e.key===`ArrowDown`?`bl`:e.key===`ArrowRight`?`tr`:`tl`),rtl:c})]}let T={horizontal:[l],vertical:[QY],both:[l,QY]}[a],E={horizontal:[h],vertical:[ZY],both:[h,ZY]}[a],D=g?s:{horizontal:u?rX:nX,vertical:u?aX:iX,both:s}[a];u&&(e.key===`Home`?b=C:e.key===`End`&&(b=w)),b===x&&(T.includes(e.key)||E.includes(e.key))&&(b=r&&b===w&&T.includes(e.key)?C:r&&b===C&&E.includes(e.key)?w:NU(y,{startingIndex:b,decrement:E.includes(e.key),disabledIndices:f})),b!==x&&!AU(y,b)&&(d&&e.stopPropagation(),D.has(e.key)&&e.preventDefault(),S(b,!0),queueMicrotask(()=>{y.current[b]?.focus()}))}}),[n,i,o,f,y,u,x,g,t,r,v,p,S,a,d]);return W.useMemo(()=>({props:w,highlightedIndex:x,onHighlightedIndexChange:S,elementsRef:y,disabledIndices:f,onMapChange:C,relayKeyboardEvent:w.onKeyDown}),[w,x,S,y,f,C])}function KX(e,t){for(let n of lX.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function qX(e){let{render:t,className:n,refs:r=YR,props:i=YR,state:a=XR,stateAttributesMapping:o,highlightedIndex:s,onHighlightedIndexChange:c,orientation:l,dense:u,itemSizes:d,loopFocus:f,cols:p,enableHomeAndEndKeys:m,onMapChange:h,stopEventPropagation:g=!0,rootRef:_,disabledIndices:v,modifierKeys:y,highlightItemOnHover:b=!1,tag:x=`div`,...S}=e,{props:C,highlightedIndex:w,onHighlightedIndexChange:T,elementsRef:E,onMapChange:D,relayKeyboardEvent:O}=GX({itemSizes:d,cols:p,loopFocus:f,dense:u,orientation:l,highlightedIndex:s,onHighlightedIndexChange:c,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:iJ(),disabledIndices:v,modifierKeys:y}),k=Sz(x,e,{state:a,ref:r,props:[C,...i,S],stateAttributesMapping:o}),A=W.useMemo(()=>({highlightedIndex:w,onHighlightedIndexChange:T,highlightItemOnHover:b,relayKeyboardEvent:O}),[w,T,b,O]);return(0,G.jsx)(iB.Provider,{value:A,children:(0,G.jsx)(FY,{elementsRef:E,onMapChange:e=>{h?.(e),D(e)},children:k})})}var JX=function(e){return e.disabled=`data-disabled`,e.orientation=`data-orientation`,e.multiple=`data-multiple`,e}({}),YX={multiple(e){return e?{[JX.multiple]:``}:null}},XX=W.forwardRef(function(e,t){let{defaultValue:n,disabled:r=!1,loopFocus:i=!0,onValueChange:a,orientation:o=`horizontal`,multiple:s=!1,value:c,className:l,render:u,...d}=e,f=XY(!0),p=W.useMemo(()=>{if(c===void 0)return n??[]},[c,n]),m=W.useMemo(()=>c!==void 0||n!==void 0,[c,n]),h=(f?.disabled??!1)||r,[g,_]=MR({controlled:c,default:p,name:`ToggleGroup`,state:`value`}),v=X((e,t,n)=>{let r;if(s?(r=g.slice(),t?r.push(e):r.splice(g.indexOf(e),1)):r=t?[e]:[],Array.isArray(r)){if(a?.(r,n),n.isCanceled)return;_(r)}}),y={disabled:h,multiple:s,orientation:o},b=W.useMemo(()=>({disabled:h,orientation:o,setGroupValue:v,value:g,isValueInitialized:m}),[h,o,v,g,m]),x={role:`group`},S=Sz(`div`,e,{enabled:!!f,state:y,ref:t,props:[x,d],stateAttributesMapping:YX});return(0,G.jsx)(IX.Provider,{value:b,children:f?S:(0,G.jsx)(qX,{render:u,className:l,state:y,refs:[t],props:[x,d],stateAttributesMapping:YX,loopFocus:i,enableHomeAndEndKeys:!0})})}),ZX=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(XX,{ref:n,className:Y(`flex items-center gap-0.5`,e),...t}));ZX.displayName=`ToggleGroup`;var QX=Y(cV({variant:`secondary`,size:`sm`}),`h-7 whitespace-nowrap uppercase tracking-[0.08em] leading-none no-underline`);function $X({active:e,onClick:t,children:n,className:r}){return(0,G.jsxs)(`button`,{type:`button`,onClick:t,className:Y(`font-mono text-[10px] tracking-[1.5px] uppercase bg-transparent border-none px-3.5 py-1 cursor-pointer relative transition-colors`,e?`text-white`:`text-neutral-500 hover:text-neutral-300`,r),children:[n,e&&(0,G.jsx)(`span`,{className:`absolute -bottom-2.5 left-1/2 -translate-x-1/2 w-4 h-0.5 bg-flow rounded-sm shadow-[0_0_8px_rgba(59,130,246,0.5)]`})]})}function eZ({items:e,activeId:t,onItemChange:n,renderItem:r,className:i}){return(0,G.jsx)(`div`,{className:Y(`flex items-center gap-0.5`,i),children:e.map(e=>{let i=e.id===t,a=()=>n?.(e.id);return r?(0,G.jsx)(`span`,{children:r(e,{active:i,onClick:a})},e.id):(0,G.jsx)($X,{active:i,onClick:a,children:e.label},e.id)})})}var tZ=kR(`rounded-full inline-block flex-shrink-0`,{variants:{color:{healthy:`bg-healthy`,syncing:`bg-syncing`,offline:`bg-offline`,flow:`bg-flow`,relay:`bg-relay`,encrypt:`bg-encrypt`,muted:`bg-neutral-500`},size:{sm:`w-1.5 h-1.5`,md:`w-2 h-2`,lg:`w-2.5 h-2.5`},glow:{true:``,false:``}},defaultVariants:{color:`healthy`,size:`sm`,glow:!1}}),nZ={healthy:`0 0 6px #22c55e`,syncing:`0 0 6px #f59e0b`,offline:`0 0 6px #ef4444`,flow:`0 0 6px #3b82f6`,relay:`0 0 6px #8b5cf6`,encrypt:`0 0 6px #f472b6`,muted:`none`};function rZ({color:e,size:t,glow:n,pulse:r,className:i}){return(0,G.jsx)(`span`,{className:Y(tZ({color:e,size:t,glow:n}),r&&`dot-pulse`,i),style:n?{boxShadow:nZ[e??`healthy`]}:void 0})}var iZ={name:`@syncular/ui`,version:`0.0.6-244`,description:`Reusable Syncular UI components and styles`,license:`Apache-2.0`,author:`Benjamin Kniffler`,homepage:`https://syncular.dev`,repository:{type:`git`,url:`https://github.com/syncular/syncular.git`,directory:`packages/ui`},bugs:{url:`https://github.com/syncular/syncular/issues`},keywords:[`sync`,`offline-first`,`realtime`,`ui`,`react`],publishConfig:{access:`public`},type:`module`,exports:{".":{bun:`./src/index.ts`,browser:`./src/index.ts`,import:{types:`./dist/index.d.ts`,default:`./dist/index.js`}},"./charts":{bun:`./src/charts/index.ts`,browser:`./src/charts/index.ts`,import:{types:`./dist/charts/index.d.ts`,default:`./dist/charts/index.js`}},"./console":{bun:`./src/console/index.ts`,browser:`./src/console/index.ts`,import:{types:`./dist/console/index.d.ts`,default:`./dist/console/index.js`}},"./forms":{bun:`./src/forms/index.ts`,browser:`./src/forms/index.ts`,import:{types:`./dist/forms/index.d.ts`,default:`./dist/forms/index.js`}},"./primitives":{bun:`./src/primitives/index.ts`,browser:`./src/primitives/index.ts`,import:{types:`./dist/primitives/index.d.ts`,default:`./dist/primitives/index.js`}},"./observable-universe":{bun:`./src/observable-universe/index.ts`,browser:`./src/observable-universe/index.ts`,import:{types:`./dist/observable-universe/index.d.ts`,default:`./dist/observable-universe/index.js`}},"./demo":{bun:`./src/demo/index.ts`,browser:`./src/demo/index.ts`,import:{types:`./dist/demo/index.d.ts`,default:`./dist/demo/index.js`}},"./navigation":{bun:`./src/navigation/index.ts`,browser:`./src/navigation/index.ts`,import:{types:`./dist/navigation/index.d.ts`,default:`./dist/navigation/index.js`}},"./styles.css":`./dist/styles.css`,"./styles.source.css":`./src/styles/styles.css`,"./styles/tokens.css":`./src/styles/tokens.css`,"./package.json":`./package.json`},files:[`dist`,`src`],scripts:{tsgo:`tsgo --noEmit`,"build:css":`bunx @tailwindcss/cli -i src/styles/styles.css -o dist/styles.css`,build:`tsgo && bun run build:css`,release:`bunx syncular-publish`},peerDependencies:{react:`^19.0.0`,"react-dom":`^19.0.0`},dependencies:{"@base-ui/react":`^1.3.0`,"class-variance-authority":`^0.7.1`,clsx:`^2.1.1`,"lucide-react":`^1.7.0`,recharts:`^3.8.1`,"tailwind-merge":`^3.5.0`,tailwindcss:`^4.2.2`},devDependencies:{"@syncular/config":`workspace:*`,"@tailwindcss/cli":`^4.2.2`,"@types/react":`^19.2.14`}}.version;function aZ({label:e,className:t}){return(0,G.jsxs)(`div`,{className:Y(`flex items-center gap-3`,t),children:[(0,G.jsx)(rZ,{color:`healthy`,size:`md`,glow:!0}),(0,G.jsx)(`span`,{className:`font-display font-bold text-white text-sm tracking-tight`,children:`syncular`}),e&&(0,G.jsx)(`span`,{className:`font-mono text-[9px] text-neutral-600 uppercase tracking-widest`,children:e}),(0,G.jsxs)(`span`,{className:`font-mono text-[9px] text-neutral-600 tracking-wider`,children:[`v`,iZ]})]})}function oZ({brand:e,center:t,right:n,className:r}){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-[42px] shrink-0`}),(0,G.jsxs)(`nav`,{className:Y(`fixed top-0 left-0 right-0 z-100 h-[42px] border-b border-border bg-surface/88 backdrop-blur-lg flex items-center justify-between px-5`,r),children:[(0,G.jsx)(`div`,{className:`flex items-center gap-3`,children:e}),(0,G.jsx)(`div`,{className:`flex items-center gap-0.5`,children:t}),(0,G.jsx)(`div`,{className:`flex items-center gap-2`,children:n})]})]})}var sZ=kR(`border rounded-lg p-3 font-mono text-[11px]`,{variants:{variant:{default:`border-border bg-panel`,destructive:`border-offline/20 bg-offline/5 text-offline`}},defaultVariants:{variant:`default`}}),cZ=(0,W.forwardRef)(({className:e,variant:t,...n},r)=>(0,G.jsx)(`div`,{ref:r,role:`alert`,className:Y(sZ({variant:t,className:e})),...n}));cZ.displayName=`Alert`;var lZ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`h5`,{ref:n,className:Y(`font-medium text-white mb-1`,e),...t}));lZ.displayName=`AlertTitle`;var uZ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`p`,{ref:n,className:Y(`text-neutral-400`,e),...t}));uZ.displayName=`AlertDescription`;var dZ=W.createContext(void 0);function fZ(e){let t=W.useContext(dZ);if(e===!1&&t===void 0)throw Error(QR(27));return t}var pZ={...qq,...YK},mZ=W.forwardRef(function(e,t){let{render:n,className:r,forceRender:i=!1,...a}=e,{store:o}=fZ(),s=o.useState(`open`),c=o.useState(`nested`),l=o.useState(`mounted`);return Sz(`div`,e,{state:{open:s,transitionStatus:o.useState(`transitionStatus`)},ref:[o.context.backdropRef,t],stateAttributesMapping:pZ,props:[{role:`presentation`,hidden:!l,style:{userSelect:`none`,WebkitUserSelect:`none`}},a],enabled:i||!c})}),hZ=W.forwardRef(function(e,t){let{render:n,className:r,id:i,...a}=e,{store:o}=fZ(),s=Mz(i);return o.useSyncedValueWithCleanup(`descriptionElementId`,s),Sz(`p`,e,{ref:t,props:[{id:s},a]})}),gZ=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),_Z=function(e){return e[e.open=Rq.open]=`open`,e[e.closed=Rq.closed]=`closed`,e[e.startingStyle=Rq.startingStyle]=`startingStyle`,e[e.endingStyle=Rq.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),vZ=W.createContext(void 0);function yZ(){let e=W.useContext(vZ);if(e===void 0)throw Error(QR(26));return e}var bZ={...qq,...YK,nestedDialogOpen(e){return e?{[_Z.nestedDialogOpen]:``}:null}},xZ=W.forwardRef(function(e,t){let{className:n,finalFocus:r,initialFocus:i,render:a,...o}=e,{store:s}=fZ(),c=s.useState(`descriptionElementId`),l=s.useState(`disablePointerDismissal`),u=s.useState(`floatingRootContext`),d=s.useState(`popupProps`),f=s.useState(`modal`),p=s.useState(`mounted`),m=s.useState(`nested`),h=s.useState(`nestedOpenDialogCount`),g=s.useState(`open`),_=s.useState(`openMethod`),v=s.useState(`titleElementId`),y=s.useState(`transitionStatus`),b=s.useState(`role`);yZ(),ZK({open:g,ref:s.context.popupRef,onComplete(){g&&s.context.onOpenChangeComplete?.(!0)}});function x(e){return e===`touch`?s.context.popupRef.current:!0}let S=i===void 0?x:i,C=Sz(`div`,e,{state:{open:g,nested:m,transitionStatus:y,nestedDialogOpen:h>0},props:[d,{"aria-labelledby":v??void 0,"aria-describedby":c??void 0,role:b,tabIndex:-1,hidden:!p,onKeyDown(e){cX.has(e.key)&&e.stopPropagation()},style:{[gZ.nestedDialogs]:h}},o],ref:[t,s.context.popupRef,s.useStateSetter(`popupElement`)],stateAttributesMapping:bZ});return(0,G.jsx)(vG,{context:u,openInteractionType:_,disabled:!p,closeOnFocusOut:!l,initialFocus:S,returnFocus:r,modal:f!==!1,restoreFocus:`popup`,children:C})}),SZ=W.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=fZ(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,G.jsx)(vZ.Provider,{value:n,children:(0,G.jsxs)(nG,{ref:t,...r,children:[a&&o===!0&&(0,G.jsx)(VY,{ref:i.context.internalBackdropRef,inert:vJ(!s)}),e.children]})}):null});function CZ(e){let{store:t,parentContext:n,actionsRef:r}=e,i=t.useState(`open`),a=t.useState(`disablePointerDismissal`),o=t.useState(`modal`),s=t.useState(`popupElement`),{openMethod:c,triggerProps:l}=mY(i);eq(t);let{forceUnmount:u}=tq(i,t),d=X(e=>{let n=UB(e);return n.preventUnmountOnClose=()=>{t.set(`preventUnmountingOnClose`,!0)},n}),f=W.useCallback(()=>{t.setOpen(!1,d(VB))},[t,d]);W.useImperativeHandle(r,()=>({unmount:u,close:f}),[u,f]);let p=lq({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[m,h]=W.useState(0),g=m===0,_=Tq(p),v=TG(p,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(e){if(!t.context.outsidePressEnabledRef.current||`button`in e&&e.button!==0||`touches`in e&&e.touches.length!==1)return!1;let n=BH(e);if(g&&!a){let e=n;return o&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===e||t.context.backdropRef.current===e||RH(e,s)&&!e?.hasAttribute(`data-base-ui-portal`):!0}return!1},escapeKey:g});MY(i&&o===!0,s);let{getReferenceProps:y,getFloatingProps:b,getTriggerProps:x}=xq([_,v]);t.useContextCallback(`onNestedDialogOpen`,e=>{h(e+1)}),t.useContextCallback(`onNestedDialogClose`,()=>{h(0)}),W.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(m),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,m]);let S=W.useMemo(()=>y(l),[y,l]),C=W.useMemo(()=>x(l),[x,l]),w=W.useMemo(()=>b(),[b]);t.useSyncedValues({openMethod:c,activeTriggerProps:S,inactiveTriggerProps:C,popupProps:w,floatingRootContext:p,nestedOpenDialogCount:m})}var wZ={...oq,modal:$(e=>e.modal),nested:$(e=>e.nested),nestedOpenDialogCount:$(e=>e.nestedOpenDialogCount),disablePointerDismissal:$(e=>e.disablePointerDismissal),openMethod:$(e=>e.openMethod),descriptionElementId:$(e=>e.descriptionElementId),titleElementId:$(e=>e.titleElementId),viewportElement:$(e=>e.viewportElement),role:$(e=>e.role)},TZ=class extends HK{constructor(e){super(EZ(e),{popupRef:W.createRef(),backdropRef:W.createRef(),internalBackdropRef:W.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new nq,onOpenChange:void 0,onOpenChangeComplete:void 0},wZ)}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;let n={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit(`openchange`,n);let r={open:e},i=t.trigger?.id??null;(i||e)&&(r.activeTriggerId=i,r.activeTriggerElement=t.trigger??null),this.update(r)}};function EZ(e={}){return{...iq(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:`dialog`,...e}}function DZ(e){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:o=!1,modal:s=!0,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:d=null}=e,f=fZ(!0),p=!!f,m=PR(()=>l?.store??new TZ({open:r,openProp:n,activeTriggerId:d,triggerIdProp:u,modal:s,disablePointerDismissal:o,nested:p})).current;mH(()=>{n===void 0&&m.state.open===!1&&r===!0&&m.update({open:!0,activeTriggerId:d})}),m.useControlledProp(`openProp`,n),m.useControlledProp(`triggerIdProp`,u),m.useSyncedValues({disablePointerDismissal:o,nested:p,modal:s}),m.useContextCallback(`onOpenChange`,i),m.useContextCallback(`onOpenChangeComplete`,a);let h=m.useState(`payload`);CZ({store:m,actionsRef:c,parentContext:f?.store.context,onOpenChange:i,triggerIdProp:u});let g=W.useMemo(()=>({store:m}),[m]);return(0,G.jsx)(dZ.Provider,{value:g,children:typeof t==`function`?t({payload:h}):t})}var OZ=W.forwardRef(function(e,t){let{render:n,className:r,id:i,...a}=e,{store:o}=fZ(),s=Mz(i);return o.useSyncedValueWithCleanup(`titleElementId`,s),Sz(`h2`,e,{ref:t,props:[{id:s},a]})}),kZ=DZ,AZ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(mZ,{ref:n,className:Y(`fixed inset-0 z-50 bg-black/60 backdrop-blur-sm`,e),...t}));AZ.displayName=`DialogOverlay`;var jZ=(0,W.forwardRef)(({className:e,children:t,...n},r)=>(0,G.jsxs)(SZ,{children:[(0,G.jsx)(mZ,{className:`fixed inset-0 z-50 bg-black/60 backdrop-blur-sm`}),(0,G.jsx)(xZ,{ref:r,className:Y(`fixed z-50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-panel border border-border rounded-lg shadow-lg max-w-lg w-full p-0`,e),...n,children:t})]}));jZ.displayName=`DialogContent`;var MZ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`div`,{ref:n,className:Y(`px-5 py-3 border-b border-border`,e),...t}));MZ.displayName=`DialogHeader`;var NZ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`div`,{ref:n,className:Y(`px-5 py-3 border-t border-border flex justify-end gap-2`,e),...t}));NZ.displayName=`DialogFooter`;var PZ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(OZ,{ref:n,className:Y(`font-mono text-[10px] text-neutral-500 uppercase tracking-widest`,e),...t}));PZ.displayName=`DialogTitle`;var FZ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(hZ,{ref:n,className:Y(`font-mono text-[10px] text-neutral-500`,e),...t}));FZ.displayName=`DialogDescription`;var IZ=(0,W.forwardRef)(({className:e,page:t,totalPages:n,totalItems:r,onPageChange:i,...a},o)=>(0,G.jsxs)(`div`,{ref:o,className:Y(`px-5 py-2.5 border-t border-border flex items-center justify-between`,e),...a,children:[(0,G.jsxs)(`span`,{className:`font-mono text-[10px] text-neutral-600`,children:[r,` items · Page `,t,` of `,n]}),(0,G.jsxs)(`div`,{className:`flex gap-2`,children:[(0,G.jsx)(Q,{size:`sm`,variant:`default`,disabled:t<=1,onClick:()=>i(t-1),children:`Prev`}),(0,G.jsx)(Q,{size:`sm`,variant:`default`,disabled:t>=n,onClick:()=>i(t+1),children:`Next`})]})]}));IZ.displayName=`Pagination`;var LZ=(0,W.forwardRef)(({className:e,orientation:t=`horizontal`,...n},r)=>(0,G.jsx)(`hr`,{ref:r,"aria-orientation":t===`vertical`?`vertical`:void 0,className:Y(`border-none m-0`,t===`horizontal`?`h-px w-full bg-border`:`w-px h-4 bg-border`,e),...n}));LZ.displayName=`Separator`;var RZ=kR(`fixed z-50 bg-panel shadow-lg overflow-auto`,{variants:{side:{top:`top-0 left-0 w-full h-[400px] border-b border-border`,right:`right-0 top-0 h-full w-[400px] border-l border-border`,bottom:`bottom-0 left-0 w-full h-[400px] border-t border-border`,left:`left-0 top-0 h-full w-[400px] border-r border-border`}},defaultVariants:{side:`right`}}),zZ=(0,W.forwardRef)(({className:e,side:t,children:n,...r},i)=>(0,G.jsxs)(SZ,{children:[(0,G.jsx)(mZ,{className:`fixed inset-0 z-50 bg-black/60 backdrop-blur-sm`}),(0,G.jsx)(xZ,{ref:i,className:Y(RZ({side:t,className:e})),...r,children:n})]}));zZ.displayName=`SheetContent`;var BZ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`div`,{ref:n,className:Y(`px-5 py-3 border-b border-border`,e),...t}));BZ.displayName=`SheetHeader`;var VZ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`div`,{ref:n,className:Y(`px-5 py-3 border-t border-border flex justify-end gap-2`,e),...t}));VZ.displayName=`SheetFooter`;var HZ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(OZ,{ref:n,className:Y(`font-mono text-[10px] text-neutral-500 uppercase tracking-widest`,e),...t}));HZ.displayName=`SheetTitle`;var UZ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(hZ,{ref:n,className:Y(`text-sm text-neutral-400`,e),...t}));UZ.displayName=`SheetDescription`;var WZ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`div`,{ref:n,className:Y(`rounded-md bg-neutral-800 animate-pulse`,e),...t}));WZ.displayName=`Skeleton`;var GZ=W.createContext(void 0);function KZ(){let e=W.useContext(GZ);if(e===void 0)throw Error(QR(64));return e}var qZ=function(e){return e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e}({}),JZ={tabActivationDirection:e=>({[qZ.activationDirection]:e})},YZ=W.createContext(void 0);function XZ(){let e=W.useContext(YZ);if(e===void 0)throw Error(QR(65));return e}var ZZ=W.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:i,value:a,id:o,nativeButton:s=!0,...c}=e,{value:l,getTabPanelIdByValue:u,orientation:d}=KZ(),{activateOnFocus:f,highlightedTabIndex:p,onTabActivation:m,registerTabResizeObserverElement:h,setHighlightedTabIndex:g,tabsListElement:_}=XZ(),v=Mz(o),{compositeProps:y,compositeRef:b,index:x}=RX({metadata:W.useMemo(()=>({disabled:r,id:v,value:a}),[r,v,a])}),S=a===l,C=W.useRef(!1),w=W.useRef(null);W.useEffect(()=>{let e=w.current;if(e)return h(e)},[h]),Z(()=>{if(C.current){C.current=!1;return}if(!(S&&x>-1&&p!==x))return;let e=_;if(e!=null){let t=LH(gW(e));if(t&&RH(e,t))return}r||g(x)},[S,x,p,g,r,_]);let{getButtonProps:T,buttonRef:E}=sB({disabled:r,native:s,focusableWhenDisabled:!0}),D=u(a),O=W.useRef(!1),k=W.useRef(!1);function A(e){S||r||m(a,UB(jB,e.nativeEvent,void 0,{activationDirection:`none`}))}function j(e){S||(x>-1&&!r&&g(x),!r&&f&&(!O.current||O.current&&k.current)&&m(a,UB(jB,e.nativeEvent,void 0,{activationDirection:`none`})))}function M(e){if(S||r)return;O.current=!0;function t(){O.current=!1,k.current=!1}(!e.button||e.button===0)&&(k.current=!0,gW(e.currentTarget).addEventListener(`pointerup`,t,{once:!0}))}return Sz(`button`,e,{state:{disabled:r,active:S,orientation:d},ref:[t,E,b,w],props:[y,{role:`tab`,"aria-controls":D,"aria-selected":S,id:v,onClick:A,onFocus:j,onPointerDown:M,[UX]:S?``:void 0,onKeyDownCapture(){C.current=!0}},c,T]})}),QZ=function(e){return e.index=`data-index`,e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e.hidden=`data-hidden`,e[e.startingStyle=KK.startingStyle]=`startingStyle`,e[e.endingStyle=KK.endingStyle]=`endingStyle`,e}({}),$Z={...JZ,...YK},eQ=W.forwardRef(function(e,t){let{className:n,value:r,render:i,keepMounted:a=!1,...o}=e,{value:s,getTabIdByPanelValue:c,orientation:l,tabActivationDirection:u,registerMountedTabPanel:d,unregisterMountedTabPanel:f}=KZ(),p=Mz(),{ref:m,index:h}=kX({metadata:W.useMemo(()=>({id:p,value:r}),[p,r])}),g=r===s,{mounted:_,transitionStatus:v,setMounted:y}=GK(g),b=!_,x=c(r),S={hidden:b,orientation:l,tabActivationDirection:u,transitionStatus:v},C=W.useRef(null),w=Sz(`div`,e,{state:S,ref:[t,m,C],props:[{"aria-labelledby":x,hidden:b,id:p,role:`tabpanel`,tabIndex:g?0:-1,inert:vJ(!g),[QZ.index]:h},o],stateAttributesMapping:$Z});return ZK({open:g,ref:C,onComplete(){g||y(!1)}}),Z(()=>{if(!(b&&!a)&&p!=null)return d(r,p),()=>{f(r,p)}},[b,a,r,p,d,f]),a||_?w:null}),tQ=W.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,...o}=e,{getTabElementBySelectedValue:s,onValueChange:c,orientation:l,value:u,setTabMap:d,tabActivationDirection:f}=KZ(),[p,m]=W.useState(0),[h,g]=W.useState(null),_=W.useRef(new Set),v=W.useRef(new Set),y=W.useRef(null),b=X(()=>{_.current.forEach(e=>{e()})});W.useEffect(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{_.current.size&&b()});return y.current=e,h&&e.observe(h),v.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),y.current=null}},[h,b]);let x=X(e=>(_.current.add(e),()=>{_.current.delete(e)})),S=X(e=>(v.current.add(e),y.current?.observe(e),()=>{v.current.delete(e),y.current?.unobserve(e)})),C=rQ(u,l,h,s),w=X((e,t)=>{e!==u&&(t.activationDirection=C(e),c(e,t))}),T={orientation:l,tabActivationDirection:f},E={"aria-orientation":l===`vertical`?`vertical`:void 0,role:`tablist`},D=W.useMemo(()=>({activateOnFocus:n,highlightedTabIndex:p,registerIndicatorUpdateListener:x,registerTabResizeObserverElement:S,onTabActivation:w,setHighlightedTabIndex:m,tabsListElement:h}),[n,p,x,S,w,m,h]);return(0,G.jsx)(YZ.Provider,{value:D,children:(0,G.jsx)(qX,{render:a,className:r,state:T,refs:[t,g],props:[E,o],stateAttributesMapping:JZ,highlightedIndex:p,enableHomeAndEndKeys:!0,loopFocus:i,orientation:l,onHighlightedIndexChange:m,onMapChange:d,disabledIndices:YR})})});function nQ(e,t){let{left:n,top:r}=e.getBoundingClientRect(),{left:i,top:a}=t.getBoundingClientRect();return{left:n-i,top:r-a}}function rQ(e,t,n,r){let[i,a]=W.useState(null);return Z(()=>{if(e==null||n==null){a(null);return}let i=r(e);if(i==null){a(null);return}let{left:o,top:s}=nQ(i,n);a(t===`horizontal`?o:s)},[t,r,n,e]),W.useCallback(o=>{if(o===e)return`none`;if(o==null)return a(null),`none`;if(o!=null&&n!=null){let e=r(o);if(e!=null){let{left:r,top:o}=nQ(e,n);if(i==null)return a(t===`horizontal`?r:o),`none`;if(t===`horizontal`){if(r<i)return a(r),`left`;if(r>i)return a(r),`right`}else if(o<i)return a(o),`up`;else if(o>i)return a(o),`down`}}return`none`},[r,t,i,n,e])}var iQ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(tQ,{ref:n,className:Y(`flex items-center gap-0.5`,e),...t}));iQ.displayName=`TabsList`;var aQ=kR(`inline-flex items-center justify-center cursor-pointer transition-all outline-none`,{variants:{variant:{default:`font-mono text-[10px] text-neutral-500 border border-transparent rounded-sm px-2.5 py-1 hover:text-neutral-300 data-[selected]:text-white data-[selected]:border-border-bright data-[selected]:bg-white/[0.03]`,pills:`font-mono text-[10px] text-neutral-500 border border-transparent rounded-full px-3 py-1 hover:text-neutral-300 data-[selected]:text-white data-[selected]:border-border-bright data-[selected]:bg-white/[0.03]`}},defaultVariants:{variant:`default`}}),oQ=(0,W.forwardRef)(({className:e,variant:t,...n},r)=>(0,G.jsx)(ZZ,{ref:r,className:Y(aQ({variant:t,className:e})),...n}));oQ.displayName=`TabsTrigger`;var sQ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(eQ,{ref:n,className:Y(`outline-none`,e),...t}));sQ.displayName=`TabsContent`;var cQ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`p`,{ref:n,className:Y(`font-mono text-[11px] text-neutral-300`,e),...t}));cQ.displayName=`Text`;var lQ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`p`,{ref:n,className:Y(`font-mono text-[10px] text-neutral-500`,e),...t}));lQ.displayName=`TextMuted`;var uQ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`code`,{ref:n,className:Y(`font-mono text-[11px] text-white`,e),...t}));uQ.displayName=`TextCode`;var dQ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`span`,{ref:n,className:Y(`font-mono text-[9px] uppercase tracking-wider text-neutral-500`,e),...t}));dQ.displayName=`TextLabel`;var fQ=(0,W.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(`pre`,{ref:n,className:Y(`font-mono text-[11px] text-neutral-300 p-3 rounded border border-border bg-panel-alt overflow-x-auto`,e),...t}));fQ.displayName=`CodeBlock`;function pQ(e,t){let[n,r]=(0,W.useState)(()=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}});return(0,W.useEffect)(()=>{try{n==null?window.localStorage.removeItem(e):window.localStorage.setItem(e,JSON.stringify(n))}catch{}},[e,n]),[n,(0,W.useCallback)(e=>{r(t=>typeof e==`function`?e(t):e)},[])]}var mQ=`console:instance-id`;function hQ(){let[e,t]=pQ(mQ,``),n=e.trim();return(0,W.useMemo)(()=>({instanceId:n.length>0?n:void 0,rawInstanceId:e,setInstanceId:t,clearInstanceId:()=>t(``)}),[n,e,t])}var gQ={stats:e=>[`console`,`stats`,e],timeseries:e=>[`console`,`stats`,`timeseries`,e],latency:e=>[`console`,`stats`,`latency`,e],commits:e=>[`console`,`commits`,e],commitDetail:(e,t,n)=>[`console`,`commit-detail`,e,t,n],timeline:e=>[`console`,`timeline`,e],clients:e=>[`console`,`clients`,e],eventDetail:(e,t,n)=>[`console`,`event-detail`,e,t,n],eventPayload:(e,t,n)=>[`console`,`event-payload`,e,t,n],handlers:e=>[`console`,`handlers`,e],prunePreview:e=>[`console`,`prune`,`preview`,e],operations:e=>[`console`,`operations`,e],apiKeys:e=>[`console`,`api-keys`,e],storage:e=>[`console`,`storage`,e]};function _Q(e,t){return e===0?!1:e??t}function vQ(e){let t=new URLSearchParams;if(!e)return t;for(let[n,r]of Object.entries(e))r!=null&&t.set(n,String(r));return t}function yQ(e,t,n){let r=e.endsWith(`/`)?e.slice(0,-1):e,i=vQ(n)?.toString();return`${r}${t}${i?`?${i}`:``}`}function bQ(e,t){if(!t||!e)throw Error(`Not connected`);return e}async function xQ(e){let t={Authorization:`Bearer ${e.connectionConfig.token}`};e.body!==void 0&&(t[`Content-Type`]=`application/json`);let n=await fetch(yQ(e.connectionConfig.serverUrl,e.path,e.query),{method:e.method??`GET`,headers:t,body:e.body===void 0?void 0:JSON.stringify(e.body)});if(!n.ok)throw Error(e.errorMessage);return n.json()}async function SQ(e){let t=await fetch(yQ(e.connectionConfig.serverUrl,e.path,e.query),{method:`GET`,headers:{Authorization:`Bearer ${e.connectionConfig.token}`}});if(!t.ok)throw Error(e.errorMessage);return t.blob()}function CQ(e){let{config:t,isConnected:n}=Py();return ah({queryKey:e.queryKey,queryFn:()=>xQ({connectionConfig:bQ(t,n),path:e.path,query:e.query,method:e.method,errorMessage:e.errorMessage}),enabled:(e.enabled??!0)&&n&&!!t,refetchInterval:e.refetchInterval})}function wQ(e){let{config:t,isConnected:n}=Py();return ah({queryKey:e.queryKey,queryFn:()=>{if(e.id===void 0)throw Error(e.requiredMessage);return xQ({connectionConfig:bQ(t,n),path:e.path(e.id),query:e.query,errorMessage:e.errorMessage})},enabled:(e.enabled??!0)&&e.id!==void 0&&n&&!!t})}function TQ(e,t){for(let n of t)e.invalidateQueries({queryKey:n})}function EQ(e){let{instanceId:t}=hQ();return e??t}function DQ(e){let{config:t,isConnected:n}=Py(),{instanceId:r}=hQ(),i=Wm();return oh({mutationFn:i=>e.mutationFn({connectionConfig:bQ(t,n),variables:i,selectedInstanceId:r}),onSuccess:()=>{e.invalidateQueryKeys&&TQ(i,e.invalidateQueryKeys)}})}function OQ(e={}){let t=EQ(e.instanceId);return CQ({queryKey:gQ.stats({partitionId:e.partitionId,instanceId:t}),path:`/console/stats`,query:{partitionId:e.partitionId,instanceId:t},errorMessage:`Failed to fetch stats`,refetchInterval:_Q(e.refetchIntervalMs,5e3)})}function kQ(e={},t={}){let n=EQ(e.instanceId);return CQ({queryKey:gQ.timeseries({...e,instanceId:n}),path:`/console/stats/timeseries`,query:{interval:e.interval,range:e.range,partitionId:e.partitionId,instanceId:n},errorMessage:`Failed to fetch timeseries stats`,enabled:t.enabled,refetchInterval:_Q(t.refetchIntervalMs,3e4)})}function AQ(e={},t={}){let n=EQ(e.instanceId);return CQ({queryKey:gQ.latency({...e,instanceId:n}),path:`/console/stats/latency`,query:{range:e.range,partitionId:e.partitionId,instanceId:n},errorMessage:`Failed to fetch latency stats`,enabled:t.enabled,refetchInterval:_Q(t.refetchIntervalMs,3e4)})}function jQ(e={},t={}){let n=EQ(e.instanceId);return CQ({queryKey:gQ.commits({...e,instanceId:n}),path:`/console/commits`,query:{limit:e.limit,offset:e.offset,partitionId:e.partitionId,instanceId:n},errorMessage:`Failed to fetch commits`,enabled:t.enabled,refetchInterval:_Q(t.refetchIntervalMs,1e4)})}function MQ(e,t={}){let n=EQ(t.instanceId);return wQ({queryKey:gQ.commitDetail(e,t.partitionId,n),id:e,requiredMessage:`Commit sequence is required`,path:e=>`/console/commits/${encodeURIComponent(String(e))}`,query:{partitionId:t.partitionId,instanceId:n},errorMessage:`Failed to fetch commit detail`,enabled:t.enabled})}function NQ(e={},t={}){let n=EQ(e.instanceId);return CQ({queryKey:gQ.timeline({...e,instanceId:n}),path:`/console/timeline`,query:{limit:e.limit,offset:e.offset,partitionId:e.partitionId,view:e.view,eventType:e.eventType,actorId:e.actorId,clientId:e.clientId,requestId:e.requestId,traceId:e.traceId,table:e.table,outcome:e.outcome,search:e.search,from:e.from,to:e.to,instanceId:n},errorMessage:`Failed to fetch timeline`,enabled:t.enabled,refetchInterval:_Q(t.refetchIntervalMs,1e4)})}function PQ(e={},t={}){let n=EQ(e.instanceId);return CQ({queryKey:gQ.clients({...e,instanceId:n}),path:`/console/clients`,query:{limit:e.limit,offset:e.offset,partitionId:e.partitionId,instanceId:n},errorMessage:`Failed to fetch clients`,enabled:t.enabled,refetchInterval:_Q(t.refetchIntervalMs,1e4)})}function FQ(e,t={}){let n=EQ(t.instanceId);return wQ({queryKey:gQ.eventDetail(e,t.partitionId,n),id:e,requiredMessage:`Event id is required`,path:e=>`/console/events/${encodeURIComponent(String(e))}`,query:{partitionId:t.partitionId,instanceId:n},errorMessage:`Failed to fetch event detail`,enabled:t.enabled})}function IQ(e,t={}){let n=EQ(t.instanceId);return wQ({queryKey:gQ.eventPayload(e,t.partitionId,n),id:e,requiredMessage:`Event id is required`,path:e=>`/console/events/${encodeURIComponent(String(e))}/payload`,query:{partitionId:t.partitionId,instanceId:n},errorMessage:`Failed to fetch event payload`,enabled:t.enabled})}function LQ(e={}){let t=EQ(e.instanceId);return CQ({queryKey:gQ.handlers(t),path:`/console/handlers`,query:{instanceId:t},errorMessage:`Failed to fetch handlers`})}function RQ(e={}){let t=EQ(e.instanceId);return CQ({queryKey:gQ.prunePreview(t),path:`/console/prune/preview`,query:{instanceId:t},method:`POST`,errorMessage:`Failed to fetch prune preview`,enabled:e.enabled})}function zQ(e={},t={}){let n=EQ(e.instanceId);return CQ({queryKey:gQ.operations({...e,instanceId:n}),path:`/console/operations`,query:{limit:e.limit,offset:e.offset,operationType:e.operationType,partitionId:e.partitionId,instanceId:n},errorMessage:`Failed to fetch operations`,enabled:t.enabled,refetchInterval:_Q(t.refetchIntervalMs,1e4)})}function BQ(){return DQ({mutationFn:async({connectionConfig:e,selectedInstanceId:t})=>xQ({connectionConfig:e,path:`/console/events`,query:{instanceId:t},method:`DELETE`,errorMessage:`Failed to clear events`}),invalidateQueryKeys:[[`console`,`events`]]})}function VQ(){return DQ({mutationFn:async({connectionConfig:e,variables:t,selectedInstanceId:n})=>{let r=t.instanceId??n;return xQ({connectionConfig:e,path:`/console/clients/${encodeURIComponent(t.clientId)}`,query:{partitionId:t.partitionId,instanceId:r},method:`DELETE`,errorMessage:`Failed to evict client`})},invalidateQueryKeys:[[`console`,`clients`],[`console`,`stats`],[`console`,`operations`]]})}function HQ(){return DQ({mutationFn:async({connectionConfig:e,selectedInstanceId:t})=>xQ({connectionConfig:e,path:`/console/prune`,query:{instanceId:t},method:`POST`,errorMessage:`Failed to prune`}),invalidateQueryKeys:[[`console`,`stats`],[`console`,`commits`],[`console`,`timeline`],[`console`,`prune`,`preview`],[`console`,`operations`]]})}function UQ(){return DQ({mutationFn:async({connectionConfig:e,selectedInstanceId:t})=>xQ({connectionConfig:e,path:`/console/compact`,query:{instanceId:t},method:`POST`,errorMessage:`Failed to compact`}),invalidateQueryKeys:[[`console`,`stats`],[`console`,`operations`]]})}function WQ(){return DQ({mutationFn:async({connectionConfig:e,variables:t,selectedInstanceId:n})=>xQ({connectionConfig:e,path:`/console/notify-data-change`,query:{instanceId:t.instanceId??n},method:`POST`,body:{tables:t.tables,partitionId:t.partitionId},errorMessage:`Failed to notify data change`}),invalidateQueryKeys:[[`console`,`stats`],[`console`,`commits`],[`console`,`timeline`],[`console`,`operations`]]})}function GQ(e={}){let t=EQ(e.instanceId);return CQ({queryKey:gQ.apiKeys({...e,instanceId:t}),path:`/console/api-keys`,query:{limit:e.limit,offset:e.offset,type:e.type,status:e.status,expiresWithinDays:e.expiresWithinDays,instanceId:t},errorMessage:`Failed to fetch API keys`})}function KQ(){return DQ({mutationFn:async({connectionConfig:e,variables:t,selectedInstanceId:n})=>xQ({connectionConfig:e,path:`/console/api-keys`,query:{instanceId:n},method:`POST`,body:t,errorMessage:`Failed to create API key`}),invalidateQueryKeys:[[`console`,`api-keys`]]})}function qQ(){return DQ({mutationFn:async({connectionConfig:e,variables:t,selectedInstanceId:n})=>xQ({connectionConfig:e,path:`/console/api-keys/${encodeURIComponent(t)}`,query:{instanceId:n},method:`DELETE`,errorMessage:`Failed to revoke API key`}),invalidateQueryKeys:[[`console`,`api-keys`]]})}function JQ(){return DQ({mutationFn:async({connectionConfig:e,variables:t,selectedInstanceId:n})=>xQ({connectionConfig:e,path:`/console/api-keys/bulk-revoke`,query:{instanceId:n},method:`POST`,body:t,errorMessage:`Failed to bulk revoke API keys`}),invalidateQueryKeys:[[`console`,`api-keys`]]})}function YQ(){return DQ({mutationFn:async({connectionConfig:e,variables:t,selectedInstanceId:n})=>xQ({connectionConfig:e,path:`/console/api-keys/${encodeURIComponent(t)}/rotate`,query:{instanceId:n},method:`POST`,errorMessage:`Failed to rotate API key`}),invalidateQueryKeys:[[`console`,`api-keys`]]})}function XQ(){return DQ({mutationFn:async({connectionConfig:e,variables:t,selectedInstanceId:n})=>xQ({connectionConfig:e,path:`/console/api-keys/${encodeURIComponent(t)}/rotate/stage`,query:{instanceId:n},method:`POST`,errorMessage:`Failed to stage-rotate API key`}),invalidateQueryKeys:[[`console`,`api-keys`]]})}function ZQ(e={}){return CQ({queryKey:gQ.storage({prefix:e.prefix,cursor:e.cursor,limit:e.limit}),path:`/console/storage`,query:{prefix:e.prefix,cursor:e.cursor,limit:e.limit},errorMessage:`Failed to list blobs`,refetchInterval:_Q(e.refetchIntervalMs,3e4)})}function QQ(){return DQ({mutationFn:async({connectionConfig:e,variables:t})=>xQ({connectionConfig:e,path:`/console/storage/${encodeURIComponent(t)}`,method:`DELETE`,errorMessage:`Failed to delete blob`}),invalidateQueryKeys:[[`console`,`storage`]]})}function $Q(){let{config:e,isConnected:t}=Py();return async n=>{let r=await SQ({connectionConfig:bQ(e,t),path:`/console/storage/${encodeURIComponent(n)}/download`,errorMessage:`Failed to download blob`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=n.split(`/`).pop()||n,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)}}var e$=`console:partition-id`;function t$(){let[e,t]=pQ(e$,``),n=e.trim();return(0,W.useMemo)(()=>({partitionId:n.length>0?n:void 0,rawPartitionId:e,setPartitionId:t,clearPartitionId:()=>t(``)}),[n,e,t])}var n$={refreshInterval:5,timeFormat:`relative`,showSparklines:!0,pageSize:20};function r$(){let[e,t]=pQ(`console:preferences`,n$);return{preferences:e,setPreferences:t,updatePreference:(e,n)=>{t(t=>({...t,[e]:n}))},resetPreferences:()=>{t(n$)}}}var i$=[{value:5,label:`5 seconds`},{value:10,label:`10 seconds`},{value:30,label:`30 seconds`},{value:60,label:`1 minute`},{value:0,label:`Manual only`}],a$=[{value:10,label:`10`},{value:20,label:`20`},{value:50,label:`50`},{value:100,label:`100`}],o$=`syncular-console-root`;function s$(e){e.classList.add(o$)}var c$=[{suffix:``,label:`Command`},{suffix:`/stream`,label:`Stream`},{suffix:`/fleet`,label:`Fleet`},{suffix:`/ops`,label:`Ops`},{suffix:`/storage`,label:`Storage`},{suffix:`/config`,label:`Config`}];function l$(e){let t=e?.trim()??``;return!t||t===`/`?``:(t.startsWith(`/`)?t:`/${t}`).replace(/\/+$/g,``)}function u$(e,t){return e?t?`${e}${t}`:e:t||`/`}function d$({basePath:e,appHref:t,modeBadge:n}){let{connect:r,config:i,isConnected:a,isConnecting:o}=Py(),{preferences:s}=r$(),{instanceId:c,rawInstanceId:l,setInstanceId:u,clearInstanceId:d}=hQ(),{partitionId:f,rawPartitionId:p,setPartitionId:m,clearPartitionId:h}=t$(),g=cy({select:e=>e.location.pathname}),{data:_}=OQ({refetchIntervalMs:s.refreshInterval*1e3,partitionId:f,instanceId:c}),v=l$(e),y=(0,W.useMemo)(()=>c$.map(e=>({...e,id:u$(v,e.suffix)})),[v]),b=u$(v,``),x=u$(v,`/config`),S=o?`connecting`:a?`connected`:i?`disconnected`:`not-configured`,C=y.find(e=>e.suffix===``?g===b||g===`${b}/`:g.startsWith(e.id))?.id??b,w=_?[{label:`HEAD`,value:`#${_.maxCommitSeq}`},{label:`COMMITS`,value:`${_.commitCount}`},{label:`CHANGES`,value:`${_.changeCount}`},{label:`CLIENTS`,value:`${_.activeClientCount}/${_.clientCount}`}]:[];return(0,G.jsxs)(`div`,{className:`${o$} h-screen bg-background text-foreground flex flex-col`,children:[(0,G.jsx)(oZ,{brand:(0,G.jsx)(zv,{to:b,children:(0,G.jsx)(aZ,{label:`console`})}),center:(0,G.jsx)(eZ,{items:y,activeId:C,renderItem:(e,{active:t})=>(0,G.jsx)(zv,{to:e.id,children:(0,G.jsx)($X,{active:t,children:e.label})},e.id)}),right:(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[n?(0,G.jsx)(ZB,{variant:`flow`,className:`hidden md:inline-flex px-2 py-1 text-[10px]`,children:n}):null,(0,G.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,G.jsx)(`span`,{className:`font-mono text-[9px] text-neutral-500 uppercase tracking-wide`,children:`Instance`}),(0,G.jsx)(jR,{variant:`mono`,value:l,onChange:e=>u(e.target.value),onBlur:e=>u(e.target.value.trim()),placeholder:`all`,className:`h-7 w-[110px] px-2 py-1`}),c?(0,G.jsx)(Q,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-[10px]`,onClick:d,children:`All`}):null]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,G.jsx)(`span`,{className:`font-mono text-[9px] text-neutral-500 uppercase tracking-wide`,children:`Partition`}),(0,G.jsx)(jR,{variant:`mono`,value:p,onChange:e=>m(e.target.value),onBlur:e=>m(e.target.value.trim()),placeholder:`all`,className:`h-7 w-[110px] px-2 py-1`}),f?(0,G.jsx)(Q,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-[10px]`,onClick:h,children:`All`}):null]}),(0,G.jsx)(fV,{state:S}),(0,G.jsx)(zv,{to:x,children:(0,G.jsx)(Q,{variant:g===x?`secondary`:`ghost`,size:`icon`,children:(0,G.jsx)(LV,{className:`h-3 w-3`})})}),t?(0,G.jsxs)(`a`,{href:t,className:QX,children:[(0,G.jsx)(IV,{className:`h-3 w-3`}),`Go to app`]}):null]})}),(0,G.jsx)(`main`,{className:`flex-1 overflow-auto pb-[32px]`,children:(0,G.jsx)(`div`,{className:`min-h-full`,children:a||g===x?(0,G.jsx)(`div`,{style:{animation:`pageIn 0.3s ease-out`},children:(0,G.jsx)($v,{})},g):(0,G.jsx)(f$,{configPath:x,hasSavedConfig:!!i,isConnecting:o,onConnect:()=>{r()}})})}),a&&(0,G.jsx)(oV,{isLive:a,metrics:w,uptime:`--`})]})}function f$({configPath:e,hasSavedConfig:t,isConnecting:n,onConnect:r}){return(0,G.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16`,children:[(0,G.jsx)(`p`,{className:`mb-4 text-foreground-muted`,children:`Not connected to a @syncular server`}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t&&(0,G.jsx)(Q,{variant:`default`,onClick:r,disabled:n,children:n?`Connecting...`:`Connect`}),(0,G.jsx)(zv,{to:e,children:(0,G.jsx)(Q,{variant:`link`,children:`Configure connection`})})]})]})}var p$=Wv({component:d$});function m$(e={}){let{maxEvents:t=100,enabled:n=!0,staleAfterMs:r=65e3,replayLimit:i=100,partitionId:a,instanceId:o}=e,{config:s,isConnected:c}=Py(),{instanceId:l}=hQ(),u=o??l,[d,f]=(0,W.useState)([]),[p,m]=(0,W.useState)(!1),[h,g]=(0,W.useState)(`disconnected`),[_,v]=(0,W.useState)(null),y=(0,W.useRef)(null),b=(0,W.useRef)(null),x=(0,W.useRef)(null),S=(0,W.useRef)(0),C=(0,W.useRef)(0),w=(0,W.useRef)(null),T=(0,W.useCallback)(()=>{f([]),w.current=null},[]);return(0,W.useEffect)(()=>{if(!n||!c||!s?.serverUrl||!s?.token)return;let e=!1,o=Number.isFinite(i)?Math.max(1,Math.min(500,Math.floor(i))):100;if(typeof WebSocket>`u`)return;let l=()=>{b.current&&=(clearTimeout(b.current),null)},d=()=>{x.current&&=(clearInterval(x.current),null)},p=()=>{if(e||b.current)return;S.current+=1;let t=Math.min(3e4,1e3*2**Math.max(0,S.current-1)),n=t+Math.floor(t*.2*Math.random());b.current=setTimeout(()=>{b.current=null,e||_()},n)},h=()=>{C.current=Date.now(),m(!0),g(`connected`)},_=()=>{if(e)return;g(`connecting`),l();let n=(()=>{let e=new URL(s.serverUrl,window.location.origin);return e.protocol=e.protocol===`https:`?`wss:`:`ws:`,e.pathname=`${e.pathname.endsWith(`/`)?e.pathname.slice(0,-1):e.pathname}/console/events/live`,e.search=``,w.current&&e.searchParams.set(`since`,w.current),e.searchParams.set(`replayLimit`,String(o)),a&&e.searchParams.set(`partitionId`,a),u&&e.searchParams.set(`instanceId`,u),e.toString()})(),i=new WebSocket(n);y.current=i,i.onopen=()=>{if(e){i.close();return}S.current=0,v(null),g(`connecting`),m(!1);try{i.send(JSON.stringify({type:`auth`,token:s.token}))}catch{i.close();return}d(),x.current=setInterval(()=>{let e=y.current;if(!e||e.readyState!==WebSocket.OPEN)return;let t=C.current;t&&(Date.now()-t<=r||(m(!1),g(`stale`),e.close()))},1e3)},i.onclose=()=>{e||(m(!1),g(`disconnected`),d(),p())},i.onerror=()=>{e||v(Error(`WebSocket connection failed`))},i.onmessage=e=>{try{let n=JSON.parse(e.data),r=n.type;if(h(),r===`connected`||r===`heartbeat`||r===`auth_required`)return;if(r===`error`){let e=typeof n.message==`string`?n.message:`Live events authentication failed`;v(Error(e));return}let i={type:r,timestamp:n.timestamp||new Date().toISOString(),data:n};if(a&&i.data.partitionId!==a||u&&i.data.instanceId!==u)return;let o=Date.parse(w.current??``),s=Date.parse(i.timestamp);Number.isFinite(s)&&(!Number.isFinite(o)||s>o)&&(w.current=i.timestamp),f(e=>[i,...e].slice(0,t))}catch{}}};return _(),()=>{e=!0,l(),d(),y.current&&=(y.current.close(),null),m(!1),g(`disconnected`)}},[n,c,s?.serverUrl,s?.token,t,a,u,i,r]),{events:d,isConnected:p,connectionState:h,error:_,clearEvents:T}}var h$=(0,W.createContext)(null);function g$(){let[e,t]=pQ(`console:time-range`,`24h`);return{range:e,setRange:t}}var _$=[{hint:`ios`,type:`mobile`},{hint:`android`,type:`mobile`},{hint:`mobile`,type:`mobile`},{hint:`tablet`,type:`tablet`},{hint:`desktop`,type:`desktop`},{hint:`mac`,type:`desktop`},{hint:`windows`,type:`desktop`},{hint:`linux`,type:`desktop`},{hint:`browser`,type:`browser`},{hint:`web`,type:`browser`},{hint:`server`,type:`server`},{hint:`api`,type:`server`},{hint:`iot`,type:`iot`},{hint:`sensor`,type:`iot`}];function v$(e){let t=e.toLowerCase();for(let e of _$)if(t.includes(e.hint))return e.type;return`client`}function y$(e){let t=e.toLowerCase();return t.includes(`pglite`)?`PGlite`:t.includes(`sqlite`)||t.includes(`wa-sqlite`)?`SQLite`:t.includes(`postgres`)||t.includes(`pg`)?`PostgreSQL`:`unknown`}function b$(e,t){return typeof e.lagCommitCount==`number`?Math.max(0,e.lagCommitCount):t?Math.max(0,t.maxCommitSeq-e.cursor):0}function x$(e,t){return e.activityState===`stale`?`offline`:t>0?`syncing`:`online`}function S$(e,t){return e.length<=16?e:`${e.slice(0,12)}-${t+1}`}function C$(e,t,n={}){let r=n.maxNodes??10;return e.slice(0,r).map((e,n)=>{let r=x$(e,b$(e,t));return{id:S$(e.clientId,n),type:v$(e.clientId),status:r,cursor:Math.max(0,e.cursor),actor:e.actorId,mode:e.connectionMode,dialect:y$(e.clientId),scopes:Object.keys(e.effectiveScopes||{}),lastSeen:e.updatedAt}})}var w$={enabled:!1,thresholds:{p90Latency:500,errorRate:5,clientLag:100}};function T$(e,t=`relative`){if(t===`absolute`)return new Date(e).toLocaleString();let n=new Date(e),r=new Date().getTime()-n.getTime(),i=Math.floor(r/1e3);return i<60?`${i}s ago`:i<3600?`${Math.floor(i/60)}m ago`:i<86400?`${Math.floor(i/3600)}h ago`:`${Math.floor(i/86400)}d ago`}function E$(e){let t=e.length>1&&e.endsWith(`/`)?e.slice(0,-1):e;return t===`/console`||t.startsWith(`/console/`)?`/console/stream`:`/stream`}function D$(){let e=Tv(),t=(0,W.useMemo)(()=>typeof window>`u`?`/stream`:E$(window.location.pathname),[]),n=g$(),{range:r}=n,{preferences:i}=r$(),{partitionId:a}=t$(),o=i.refreshInterval*1e3,[s]=pQ(`console:alert-config`,w$),[c,l]=(0,W.useState)(`1h`),{data:u}=OQ({refetchIntervalMs:o,partitionId:a}),{data:d}=kQ({range:r,partitionId:a},{refetchIntervalMs:o}),{data:f}=AQ({range:r,partitionId:a},{refetchIntervalMs:o}),{data:p}=jQ({limit:5,partitionId:a},{refetchIntervalMs:o}),{data:m}=PQ({limit:12,offset:0,partitionId:a},{refetchIntervalMs:o}),{events:h,isConnected:g}=m$({maxEvents:8,partitionId:a}),_=(0,W.useMemo)(()=>{let e=d?.buckets??[],t=0,n=0;for(let r of e)t+=r.pushCount+r.pullCount,n+=r.errorCount;let r=t>0?n/t*100:0;return{totalEvents:t,errorRate:r}},[d?.buckets]),v=(0,W.useMemo)(()=>m?.items?C$(m.items,u,{maxNodes:12}):[],[m?.items,u]),y=v.filter(e=>e.status!==`offline`).length,b=v.filter(e=>e.status===`offline`).length,x=(0,W.useMemo)(()=>u?[{label:`Ops (Range)`,value:_.totalEvents,color:`flow`},{label:`P50 Latency`,value:f?.push?.p50??0,unit:`ms`,color:`healthy`},{label:`Error Rate`,value:`${_.errorRate.toFixed(1)}%`,color:_.errorRate>0?`offline`:`muted`},{label:`Active Clients`,value:u.activeClientCount,color:`syncing`},{label:`Pending`,value:u.maxActiveClientCursor!==null&&u.maxCommitSeq>0?u.maxCommitSeq-(u.minActiveClientCursor??0):0,color:`relay`}]:[],[u,f,_.errorRate,_.totalEvents]),S=(0,W.useMemo)(()=>h.map(e=>({type:e.type.toUpperCase(),actor:e.data?.actorId??``,table:(e.data?.tables??[])[0]??``,time:T$(e.timestamp,i.timeFormat)})),[h,i.timeFormat]),C=(0,W.useMemo)(()=>{let e=d?.buckets;if(!e?.length)return[];let t=Math.max(...e.map(e=>Math.max(e.pushCount,e.pullCount)),1);return e.map(e=>({pushPercent:t>0?e.pushCount/t*100:0,pullPercent:t>0?e.pullCount/t*100:0}))},[d?.buckets]),w=(0,W.useMemo)(()=>{if(!f)return[];let e=Math.max(f.push.p50,f.push.p90,f.push.p99,f.pull.p50,f.pull.p90,f.pull.p99,1);return[{label:`P50`,pushMs:f.push.p50,pullMs:f.pull.p50,pushBarPercent:f.push.p50/e*100,pullBarPercent:f.pull.p50/e*100},{label:`P90`,pushMs:f.push.p90,pullMs:f.pull.p90,pushBarPercent:f.push.p90/e*100,pullBarPercent:f.pull.p90/e*100},{label:`P99`,pushMs:f.push.p99,pullMs:f.pull.p99,pushBarPercent:f.push.p99/e*100,pullBarPercent:f.pull.p99/e*100}]},[f]),T=(0,W.useMemo)(()=>p?.items?p.items.map(e=>({seq:e.commitSeq,actor:e.actorId,changes:e.changeCount,tables:(e.affectedTables??[]).join(`, `),time:T$(e.createdAt,i.timeFormat)})):[],[p?.items,i.timeFormat]),E=(0,W.useMemo)(()=>Math.max(0,100-_.errorRate),[_.errorRate]),D=(0,W.useMemo)(()=>{if(!s.enabled||!u)return[];let e=[];return f?.push?.p90&&f.push.p90>s.thresholds.p90Latency&&e.push(`P90 push latency (${f.push.p90}ms) exceeds threshold (${s.thresholds.p90Latency}ms)`),u.minActiveClientCursor!==null&&u.maxCommitSeq-u.minActiveClientCursor>s.thresholds.clientLag&&e.push(`Client lag (${u.maxCommitSeq-u.minActiveClientCursor}) exceeds threshold (${s.thresholds.clientLag})`),_.errorRate>s.thresholds.errorRate&&e.push(`Error rate (${_.errorRate.toFixed(1)}%) exceeds threshold (${s.thresholds.errorRate}%)`),e},[s,u,f,_.errorRate]);return u?(0,G.jsx)(h$.Provider,{value:n,children:(0,G.jsxs)(`div`,{className:`flex flex-col`,children:[D.length>0&&(0,G.jsx)(`div`,{className:`px-6 pb-4`,children:(0,G.jsxs)(cZ,{variant:`destructive`,children:[(0,G.jsx)(lZ,{children:`Threshold Exceeded`}),(0,G.jsx)(uZ,{children:D.map((e,t)=>(0,G.jsx)(`span`,{className:`block`,children:e},t))})]})}),(0,G.jsx)(xJ,{clients:v,totalNodes:v.length+2,onlineCount:y,offlineCount:b,relayClientIds:[]}),(0,G.jsx)(WV,{items:x}),(0,G.jsxs)(`div`,{className:`flex`,children:[(0,G.jsxs)(`div`,{className:`flex-1 min-w-0 flex flex-col`,children:[(0,G.jsx)(`div`,{className:`border-b border-border border-r border-border`,children:(0,G.jsx)(ER,{bars:C,activeRange:c,onRangeChange:l})}),(0,G.jsx)(`div`,{className:`border-b border-border border-r border-border`,children:(0,G.jsx)(KV,{buckets:w,successRate:E})}),(0,G.jsx)(`div`,{className:`border-r border-border`,children:(0,G.jsx)(sV,{commits:T,onViewAll:()=>e({href:t})})})]}),(0,G.jsx)(JV,{entries:S,isConnected:g,maxVisible:20,maxHeight:`calc(100vh - 200px)`})]})]})}):(0,G.jsx)(`div`,{className:`flex items-center justify-center py-24`,children:(0,G.jsx)(dV,{size:`lg`})})}function O$(){return(0,G.jsx)(D$,{})}var k$=VX;function A$({children:e}){return(0,G.jsxs)(`div`,{className:`space-y-4 px-5 py-5`,children:[(0,G.jsx)(j$,{}),(0,G.jsx)(R$,{}),(0,G.jsx)(z$,{}),e]})}function j$(){let{clearError:e,config:t,connect:n,disconnect:r,error:i,isConnected:a,isConnecting:o}=Py(),[s,c]=(0,W.useState)(t?.serverUrl??`/api`),[l,u]=(0,W.useState)(t?.token??``),[d,f]=(0,W.useState)(null),[p,m]=(0,W.useState)(!1),[h,g]=(0,W.useState)(null),[_,v]=pQ(`console:disconnect-clear-saved-config`,!1);return(0,W.useEffect)(()=>{let e=new URLSearchParams(window.location.search),t=e.get(`server`),n=!1;if(t&&(c(t),e.delete(`server`),n=!0),e.has(`token`)&&(e.delete(`token`),n=!0),n){let t=e.toString(),n=t?`${window.location.pathname}?${t}`:window.location.pathname;window.history.replaceState({},``,n)}},[]),(0,W.useEffect)(()=>{t?.serverUrl&&c(t.serverUrl),t?.token&&u(t.token)},[t?.serverUrl,t?.token]),(0,W.useEffect)(()=>{g(null)},[]),(0,G.jsx)(lV,{isConnected:a,isConnecting:o,isTestingConnection:p,serverUrl:s,onServerUrlChange:c,consoleToken:l,onConsoleTokenChange:u,onSaveAndConnect:async()=>{e(),f(null),g(await n({serverUrl:s.trim(),token:l.trim()},{persistOverride:!0})?`Connected successfully and configuration saved.`:`Failed to connect with the provided settings.`)},onDisconnect:()=>{r({clearSavedConfig:_}),_&&(c(`/api`),u(``)),g(_?`Disconnected and saved credentials cleared.`:`Disconnected.`),f(null)},onTestConnection:async()=>{m(!0),f(null),g(null);let e=performance.now();try{let t=s.trim(),n=l.trim();if(!t||!n)throw Error(`Missing server URL or token`);if(!(await fetch(`${t}/console/stats`,{headers:{Authorization:`Bearer ${n}`}})).ok)throw Error(`Failed to connect`);f(Math.round(performance.now()-e))}catch{f(-1)}finally{m(!1)}},statusMessage:i??h??(d===null?void 0:d<0?`Connection failed`:`Connection successful (${d}ms latency)`),children:(0,G.jsx)(`div`,{className:`px-5 pb-5 -mt-2`,children:(0,G.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border border-border px-3 py-2`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:`font-mono text-[10px] text-neutral-400`,children:`Clear saved credentials on disconnect`}),(0,G.jsx)(`p`,{className:`font-mono text-[9px] text-neutral-500`,children:`Removes stored server URL and token from this browser.`})]}),(0,G.jsx)(qB,{checked:_,onCheckedChange:v})]})})})}var M$=1440*60*1e3;function N$(e){let t=e.trim();if(!t)return null;let n=Number.parseInt(t,10);return!Number.isInteger(n)||n<=0?null:n}function P$(e){if(!e)return`Never`;let t=Date.parse(e);return Number.isFinite(t)?new Date(t).toLocaleString():`Invalid date`}function F$(e){return e.length===0?`all scopes`:e.length<=2?e.join(`, `):`${e.slice(0,2).join(`, `)} +${e.length-2}`}function I$(e,t){if(e.revokedAt)return`revoked`;if(!e.expiresAt)return`active`;let n=Date.parse(e.expiresAt);if(!Number.isFinite(n))return`active`;let r=Date.now();return n<=r?`expired`:n<=r+t*M$?`expiring`:`active`}function L$(e){return e===`revoked`?`destructive`:e===`expired`?`offline`:e===`expiring`?`syncing`:`healthy`}function R$(){let[e,t]=(0,W.useState)(`all`),[n,r]=(0,W.useState)(`all`),[i,a]=(0,W.useState)(`14`),[o,s]=(0,W.useState)(!1),[c,l]=(0,W.useState)(!1),[u,d]=(0,W.useState)(``),[f,p]=(0,W.useState)(`relay`),[m,h]=(0,W.useState)(``),[g,_]=(0,W.useState)(``),[v,y]=(0,W.useState)(``),[b,x]=(0,W.useState)(null),[S,C]=(0,W.useState)([]),[w,T]=(0,W.useState)(null),[E,D]=(0,W.useState)(null),[O,k]=(0,W.useState)(null),[A,j]=(0,W.useState)(null),[M,N]=(0,W.useState)(null),[P,F]=(0,W.useState)(null),[I,L]=(0,W.useState)(null),ee=(0,W.useMemo)(()=>N$(i),[i]),R=ee??14,z=(0,W.useMemo)(()=>N$(v),[v]),B=v.trim().length>0,V=!B||z!==null,{data:H,isLoading:U,error:te}=GQ((0,W.useMemo)(()=>({type:e===`all`?void 0:e,status:n===`all`?void 0:n,expiresWithinDays:n===`expiring`?R:void 0}),[e,n,R])),ne=KQ(),re=JQ(),ie=qQ(),ae=YQ(),oe=XQ();(0,W.useEffect)(()=>{let e=new Set((H?.items??[]).map(e=>e.keyId));C(t=>t.filter(t=>e.has(t)))},[H?.items]);let se=async()=>{try{let e=g.split(`,`).map(e=>e.trim()).filter(e=>e.length>0);x((await ne.mutateAsync({name:u,keyType:f,actorId:m||void 0,scopeKeys:e.length>0?e:void 0,expiresInDays:B?z??void 0:void 0})).secretKey),d(``),h(``),_(``),y(``)}catch{}},ce=e=>{navigator.clipboard.writeText(e),D(e),setTimeout(()=>D(null),2e3)},le=async()=>{if(O)try{await ie.mutateAsync(O)}finally{k(null)}},ue=async()=>{if(S.length!==0)try{T(await re.mutateAsync({keyIds:S})),C([])}catch{}},de=async()=>{if(A)try{let e=await oe.mutateAsync(A.keyId);N({oldKeyId:A.keyId,oldKeyName:A.name,secretKey:e.secretKey})}catch{}},fe=async()=>{if(M)try{await ie.mutateAsync(M.oldKeyId)}finally{N(null),j(null)}},pe=async()=>{if(P)try{L((await ae.mutateAsync(P)).secretKey)}finally{F(null)}};if(U)return(0,G.jsx)(`div`,{className:`flex h-[200px] items-center justify-center`,children:(0,G.jsx)(dV,{size:`lg`})});if(te)return(0,G.jsx)(`div`,{className:`flex h-[200px] items-center justify-center`,children:(0,G.jsxs)(`p`,{className:`text-danger`,children:[`Failed to load API keys: `,te.message]})});let me=(H?.items??[]).filter(e=>e.revokedAt===null).map(e=>e.keyId),he=me.length>0&&me.every(e=>S.includes(e)),ge=S.length>0,_e=(H?.items??[]).filter(e=>S.includes(e.keyId)).map(e=>e.name);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(eH,{title:`API Keys`,description:`Issue, rotate, revoke, and audit key lifecycle state.`,actions:(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsxs)(Q,{size:`sm`,variant:`destructive`,onClick:()=>l(!0),disabled:S.length===0,children:[`Revoke Selected (`,S.length,`)`]}),(0,G.jsx)(Q,{size:`sm`,onClick:()=>s(!0),children:`Create Key`})]}),children:[(0,G.jsxs)(`div`,{className:`mb-4 grid gap-3 lg:grid-cols-3`,children:[(0,G.jsxs)(YJ,{children:[(0,G.jsx)(XJ,{children:`Type filter`}),(0,G.jsxs)(ZX,{value:[e],multiple:!1,onValueChange:e=>{let n=e.find(e=>typeof e==`string`);(n===`all`||n===`relay`||n===`proxy`||n===`admin`)&&t(n)},children:[(0,G.jsx)(k$,{value:`all`,children:`all`}),(0,G.jsx)(k$,{value:`relay`,children:`relay`}),(0,G.jsx)(k$,{value:`proxy`,children:`proxy`}),(0,G.jsx)(k$,{value:`admin`,children:`admin`})]})]}),(0,G.jsxs)(YJ,{children:[(0,G.jsx)(XJ,{children:`Status filter`}),(0,G.jsxs)(ZX,{value:[n],multiple:!1,onValueChange:e=>{let t=e.find(e=>typeof e==`string`);(t===`all`||t===`active`||t===`revoked`||t===`expiring`)&&r(t)},children:[(0,G.jsx)(k$,{value:`all`,children:`all`}),(0,G.jsx)(k$,{value:`active`,children:`active`}),(0,G.jsx)(k$,{value:`revoked`,children:`revoked`}),(0,G.jsx)(k$,{value:`expiring`,children:`expiring`})]})]}),(0,G.jsxs)(YJ,{children:[(0,G.jsx)(XJ,{htmlFor:`api-key-expiring-window`,children:`Expiring window (days)`}),(0,G.jsx)(ZJ,{children:`Used when status filter is set to expiring.`}),(0,G.jsx)(jR,{id:`api-key-expiring-window`,placeholder:`14`,value:i,inputMode:`numeric`,onChange:e=>a(e.target.value)}),ee===null&&i.trim().length>0?(0,G.jsx)(`p`,{className:`font-mono text-[10px] text-offline`,children:`Enter a positive whole number.`}):null]})]}),H?.items.length===0?(0,G.jsx)(vV,{message:`No API keys match the current filters.`}):(0,G.jsxs)(QB,{children:[(0,G.jsx)($B,{children:(0,G.jsxs)(tV,{children:[(0,G.jsx)(nV,{className:`w-[28px]`,children:(0,G.jsx)(NJ,{checked:he,indeterminate:!he&&ge&&me.length>0,onCheckedChange:e=>{C(e?me:[])},"aria-label":`Select all active keys`})}),(0,G.jsx)(nV,{className:`w-[100px]`,children:`NAME`}),(0,G.jsx)(nV,{className:`w-[55px]`,children:`TYPE`}),(0,G.jsx)(nV,{className:`w-[90px]`,children:`KEY PREFIX`}),(0,G.jsx)(nV,{className:`w-[80px]`,children:`ACTOR`}),(0,G.jsx)(nV,{className:`w-[100px]`,children:`SCOPES`}),(0,G.jsx)(nV,{className:`w-[120px]`,children:`CREATED`}),(0,G.jsx)(nV,{className:`w-[120px]`,children:`LAST USED`}),(0,G.jsx)(nV,{className:`w-[120px]`,children:`EXPIRES`}),(0,G.jsx)(nV,{className:`flex-1`,children:`STATUS`})]})}),(0,G.jsx)(eV,{children:(H?.items??[]).map(e=>{let t=I$(e,R);return(0,G.jsxs)(tV,{className:`group relative`,children:[(0,G.jsx)(rV,{className:`w-[28px]`,children:(0,G.jsx)(NJ,{checked:S.includes(e.keyId),onCheckedChange:t=>{C(n=>t?[...new Set([...n,e.keyId])]:n.filter(t=>t!==e.keyId))},"aria-label":`Select ${e.name}`,disabled:e.revokedAt!==null})}),(0,G.jsx)(rV,{className:`w-[100px] font-medium`,children:e.name}),(0,G.jsx)(rV,{className:`w-[55px]`,children:(0,G.jsx)(ZB,{variant:e.keyType===`admin`?`flow`:e.keyType===`proxy`?`ghost`:`relay`,children:e.keyType})}),(0,G.jsx)(rV,{className:`w-[90px]`,children:(0,G.jsxs)(`code`,{className:`font-mono text-[11px]`,children:[e.keyPrefix,`...`]})}),(0,G.jsx)(rV,{className:`w-[80px] text-neutral-500`,children:e.actorId??`-`}),(0,G.jsx)(rV,{className:`w-[100px] text-neutral-500`,children:(0,G.jsx)(`code`,{className:`font-mono text-[10px]`,children:F$(e.scopeKeys)})}),(0,G.jsx)(rV,{className:`w-[120px] text-neutral-500`,children:P$(e.createdAt)}),(0,G.jsx)(rV,{className:`w-[120px] text-neutral-500`,children:P$(e.lastUsedAt)}),(0,G.jsx)(rV,{className:`w-[120px] text-neutral-500`,children:P$(e.expiresAt)}),(0,G.jsx)(rV,{className:`flex-1`,children:(0,G.jsx)(ZB,{variant:L$(t),children:t})}),e.revokedAt===null&&(0,G.jsxs)(`div`,{className:`absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity`,children:[(0,G.jsx)(`button`,{type:`button`,onClick:()=>j(e),className:`px-1.5 py-0.5 rounded text-[9px] font-mono text-neutral-600 hover:text-white hover:bg-white/[0.05] cursor-pointer transition-colors`,children:`stage`}),(0,G.jsx)(`button`,{type:`button`,onClick:()=>F(e.keyId),className:`px-1.5 py-0.5 rounded text-[9px] font-mono text-neutral-600 hover:text-white hover:bg-white/[0.05] cursor-pointer transition-colors`,children:`rotate`}),(0,G.jsx)(`button`,{type:`button`,onClick:()=>k(e.keyId),className:`px-1.5 py-0.5 rounded text-[9px] font-mono text-neutral-600 hover:text-offline hover:bg-offline/10 cursor-pointer transition-colors`,children:`revoke`})]})]},e.keyId)})})]})]}),(0,G.jsx)(kZ,{open:o,onOpenChange:s,children:(0,G.jsxs)(jZ,{children:[(0,G.jsx)(MZ,{children:(0,G.jsx)(PZ,{children:`Create API Key`})}),b?(0,G.jsx)(B$,{copiedKeyId:E,onClose:()=>{x(null),s(!1)},onCopy:ce,secretKey:b,warning:`Copy this key now. You will not be able to view it again.`}):(0,G.jsxs)(`div`,{className:`px-5 py-4 flex flex-col gap-4`,children:[(0,G.jsxs)(YJ,{children:[(0,G.jsx)(XJ,{htmlFor:`api-key-name`,children:`Name`}),(0,G.jsx)(jR,{id:`api-key-name`,placeholder:`Backend Relay Key`,value:u,onChange:e=>d(e.target.value)})]}),(0,G.jsxs)(YJ,{children:[(0,G.jsx)(XJ,{children:`Key type`}),(0,G.jsxs)(ZX,{value:[f],multiple:!1,onValueChange:e=>{let t=e.find(e=>typeof e==`string`);(t===`relay`||t===`proxy`||t===`admin`)&&p(t)},children:[(0,G.jsx)(k$,{value:`relay`,children:`relay`}),(0,G.jsx)(k$,{value:`proxy`,children:`proxy`}),(0,G.jsx)(k$,{value:`admin`,children:`admin`})]})]}),(0,G.jsxs)(YJ,{children:[(0,G.jsx)(XJ,{htmlFor:`api-key-actor-id`,children:`Actor ID (optional)`}),(0,G.jsx)(ZJ,{children:`Pin this key to a fixed actor ID`}),(0,G.jsx)(jR,{id:`api-key-actor-id`,placeholder:`actor-123`,value:m,onChange:e=>h(e.target.value)})]}),(0,G.jsxs)(YJ,{children:[(0,G.jsx)(XJ,{htmlFor:`api-key-scope-keys`,children:`Scope keys (optional)`}),(0,G.jsx)(ZJ,{children:`Comma-separated list of allowed scope keys`}),(0,G.jsx)(jR,{id:`api-key-scope-keys`,placeholder:`scope-a, scope-b`,value:g,onChange:e=>_(e.target.value)})]}),(0,G.jsxs)(YJ,{children:[(0,G.jsx)(XJ,{htmlFor:`api-key-expires-days`,children:`Expires in days (optional)`}),(0,G.jsx)(ZJ,{children:`Leave empty to keep the key non-expiring.`}),(0,G.jsx)(jR,{id:`api-key-expires-days`,placeholder:`30`,value:v,inputMode:`numeric`,onChange:e=>y(e.target.value)}),V?null:(0,G.jsx)(`p`,{className:`font-mono text-[10px] text-offline`,children:`Enter a positive whole number.`})]}),(0,G.jsxs)(NZ,{children:[(0,G.jsx)(Q,{variant:`default`,onClick:()=>s(!1),children:`Cancel`}),(0,G.jsx)(Q,{variant:`primary`,onClick:se,disabled:ne.isPending||!u||!V,children:ne.isPending?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(dV,{size:`sm`}),`Creating...`]}):`Create`})]})]})]})}),(0,G.jsx)(kZ,{open:c,onOpenChange:e=>{l(e),e||T(null)},children:(0,G.jsxs)(jZ,{children:[(0,G.jsx)(MZ,{children:(0,G.jsx)(PZ,{children:`Bulk Revoke API Keys`})}),w?(0,G.jsxs)(`div`,{className:`px-5 py-4 flex flex-col gap-3`,children:[(0,G.jsx)(cZ,{variant:`destructive`,children:(0,G.jsxs)(uZ,{children:[`Requested `,w.requestedCount,` keys. Revoked`,` `,w.revokedCount,`, already revoked`,` `,w.alreadyRevokedCount,`, not found`,` `,w.notFoundCount,`.`]})}),(0,G.jsx)(NZ,{children:(0,G.jsx)(Q,{variant:`primary`,onClick:()=>{l(!1),T(null)},children:`Done`})})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`px-5 py-4 flex flex-col gap-3`,children:[(0,G.jsx)(cZ,{variant:`destructive`,children:(0,G.jsx)(uZ,{children:`This revokes selected keys immediately and cannot be undone.`})}),(0,G.jsxs)(`p`,{className:`font-mono text-[10px] text-neutral-500`,children:[`Selected keys: `,_e.slice(0,5).join(`, `),_e.length>5?` +${_e.length-5} more`:``]})]}),(0,G.jsxs)(NZ,{children:[(0,G.jsx)(Q,{variant:`default`,onClick:()=>l(!1),children:`Cancel`}),(0,G.jsx)(Q,{variant:`destructive`,onClick:ue,disabled:re.isPending||S.length===0,children:re.isPending?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(dV,{size:`sm`}),`Revoking...`]}):`Revoke Selected`})]})]})]})}),(0,G.jsx)(kZ,{open:A!==null||M!==null,onOpenChange:()=>{j(null),N(null)},children:(0,G.jsxs)(jZ,{children:[(0,G.jsx)(MZ,{children:(0,G.jsx)(PZ,{children:`Stage Rotate API Key`})}),M?(0,G.jsxs)(`div`,{className:`px-5 py-4 flex flex-col gap-4`,children:[(0,G.jsx)(cZ,{variant:`default`,children:(0,G.jsxs)(uZ,{children:[`Replacement key created for `,M.oldKeyName,`. The old key is still active until you revoke it.`]})}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`code`,{className:`flex-1 rounded-md border border-border bg-surface p-3 font-mono text-[11px] text-white break-all`,children:M.secretKey}),(0,G.jsx)(Q,{variant:`default`,size:`sm`,onClick:()=>ce(M.secretKey),children:E===M.secretKey?`Copied`:`Copy`})]}),(0,G.jsxs)(NZ,{children:[(0,G.jsx)(Q,{variant:`default`,onClick:()=>{N(null),j(null)},children:`Keep Old Key Active`}),(0,G.jsx)(Q,{variant:`destructive`,onClick:fe,disabled:ie.isPending,children:ie.isPending?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(dV,{size:`sm`}),`Revoking Old Key...`]}):`Finalize and Revoke Old Key`})]})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`px-5 py-4`,children:(0,G.jsx)(`p`,{className:`font-mono text-[10px] text-neutral-500`,children:`Staged rotation creates a replacement key now and keeps the current key active until you explicitly revoke it.`})}),(0,G.jsxs)(NZ,{children:[(0,G.jsx)(Q,{variant:`default`,onClick:()=>j(null),children:`Cancel`}),(0,G.jsx)(Q,{variant:`primary`,onClick:de,disabled:oe.isPending||!A,children:oe.isPending?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(dV,{size:`sm`}),`Staging...`]}):`Create Replacement Key`})]})]})]})}),(0,G.jsx)(kZ,{open:O!==null,onOpenChange:()=>k(null),children:(0,G.jsxs)(jZ,{children:[(0,G.jsx)(MZ,{children:(0,G.jsx)(PZ,{children:`Revoke API Key`})}),(0,G.jsx)(`div`,{className:`px-5 py-4`,children:(0,G.jsx)(cZ,{variant:`destructive`,children:(0,G.jsx)(uZ,{children:`Revoking a key immediately invalidates it for all requests.`})})}),(0,G.jsxs)(NZ,{children:[(0,G.jsx)(Q,{variant:`default`,onClick:()=>k(null),children:`Cancel`}),(0,G.jsx)(Q,{variant:`destructive`,onClick:le,disabled:ie.isPending,children:ie.isPending?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(dV,{size:`sm`}),`Revoking...`]}):`Revoke`})]})]})}),(0,G.jsx)(kZ,{open:P!==null||I!==null,onOpenChange:()=>{F(null),L(null)},children:(0,G.jsxs)(jZ,{children:[(0,G.jsx)(MZ,{children:(0,G.jsx)(PZ,{children:`Rotate API Key`})}),I?(0,G.jsx)(B$,{copiedKeyId:E,onClose:()=>L(null),onCopy:ce,secretKey:I,warning:`The previous key has been invalidated. Store this replacement securely.`}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`px-5 py-4`,children:(0,G.jsx)(`p`,{className:`font-mono text-[10px] text-neutral-500`,children:`Rotating a key invalidates the previous secret immediately.`})}),(0,G.jsxs)(NZ,{children:[(0,G.jsx)(Q,{variant:`default`,onClick:()=>F(null),children:`Cancel`}),(0,G.jsx)(Q,{variant:`primary`,onClick:pe,disabled:ae.isPending,children:ae.isPending?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(dV,{size:`sm`}),`Rotating...`]}):`Rotate`})]})]})]})})]})}function z$(){let{preferences:e,updatePreference:t,resetPreferences:n}=r$();return(0,G.jsx)(QV,{rows:[{type:`filter`,label:`Auto-refresh interval`,options:i$.map(e=>({id:`${e.value}`,label:e.label})),activeId:`${e.refreshInterval}`,onActiveChange:e=>t(`refreshInterval`,Number.parseInt(e,10))},{type:`filter`,label:`Items per page`,options:a$.map(e=>({id:`${e.value}`,label:e.label})),activeId:`${e.pageSize}`,onActiveChange:e=>t(`pageSize`,Number.parseInt(e,10))},{type:`filter`,label:`Time format`,options:[{id:`relative`,label:`Relative`},{id:`absolute`,label:`Absolute`}],activeId:e.timeFormat,onActiveChange:e=>t(`timeFormat`,e)},{type:`toggle`,label:`Show sparklines`,description:`Display mini trend charts in dashboard metric cards`,checked:e.showSparklines,onCheckedChange:e=>t(`showSparklines`,e)}],onResetDefaults:n})}function B$({copiedKeyId:e,onClose:t,onCopy:n,secretKey:r,warning:i}){return(0,G.jsxs)(`div`,{className:`px-5 py-4 flex flex-col gap-4`,children:[(0,G.jsx)(cZ,{variant:`destructive`,children:(0,G.jsx)(uZ,{children:i})}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`code`,{className:`flex-1 rounded-md border border-border bg-surface p-3 font-mono text-[11px] text-white break-all`,children:r}),(0,G.jsx)(Q,{variant:`default`,size:`sm`,onClick:()=>n(r),children:e===r?`Copied`:`Copy`})]}),(0,G.jsx)(NZ,{children:(0,G.jsx)(Q,{variant:`primary`,onClick:t,children:`Done`})})]})}function V$(e){let t=e.toLowerCase();return t.includes(`mobile`)||t.includes(`ios`)||t.includes(`android`)?`mobile`:t.includes(`tablet`)?`tablet`:t.includes(`desktop`)||t.includes(`laptop`)?`desktop`:t.includes(`edge`)?`edge`:t.includes(`iot`)?`iot`:`desktop`}function H$(e){let t=e.toLowerCase();return t.includes(`pglite`)?`PGlite`:t.includes(`wa-sqlite`)||t.includes(`sqlite`)?`SQLite`:t.includes(`postgres`)||t.includes(`pg`)?`PostgreSQL`:`unknown`}function U$(e,t){if(t===`absolute`)return new Date(e).toLocaleString();try{let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/1e3),i=Math.floor(r/60),a=Math.floor(i/60),o=Math.floor(a/24);return r<60?`just now`:i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}catch{return e}}function W$(e,t,n){return{id:e.clientId,type:V$(e.clientId),status:e.activityState===`stale`?`offline`:e.activityState===`idle`?`syncing`:`online`,cursor:e.cursor,actor:e.actorId,mode:e.connectionMode===`realtime`?`realtime`:`polling`,dialect:H$(e.clientId),scopes:Object.keys(e.effectiveScopes??{}),lastSeen:U$(e.updatedAt,n)}}function G$({emptyState:e}={}){let[t,n]=(0,W.useState)(1),[r,i]=(0,W.useState)(null),{preferences:a}=r$(),{partitionId:o}=t$(),s=a.pageSize,c=a.refreshInterval*1e3,{data:l,isLoading:u}=OQ({refetchIntervalMs:c,partitionId:o}),{data:d,isLoading:f,error:p}=PQ({limit:s,offset:(t-1)*s,partitionId:o},{refetchIntervalMs:c}),m=VQ(),h=Math.ceil((d?.total??0)/s),g=l?.maxCommitSeq??0;(0,W.useEffect)(()=>{n(1)},[]);let _=async()=>{if(r)try{await m.mutateAsync({clientId:r,partitionId:o})}finally{i(null)}};if(f||u)return(0,G.jsx)(`div`,{className:`flex items-center justify-center h-[200px]`,children:(0,G.jsx)(dV,{size:`lg`})});if(p)return(0,G.jsx)(`div`,{className:`flex items-center justify-center h-[200px]`,children:(0,G.jsxs)(`p`,{className:`text-danger`,children:[`Failed to load clients: `,p.message]})});let v=(d?.items??[]).map(e=>W$(e,g,a.timeFormat));return(0,G.jsxs)(`div`,{className:`flex flex-col gap-5 px-5 py-5`,children:[v.length>0&&(0,G.jsx)(oH,{clients:v,headSeq:g}),v.length===0?e??(0,G.jsx)(ZV,{children:(0,G.jsx)(vV,{message:`No clients yet`})}):(0,G.jsx)(VV,{clients:v,headSeq:g,onEvict:e=>{let t=d?.items.find(t=>t.clientId===e);i(t?.clientId??e)}}),h>1&&(0,G.jsx)(IZ,{page:t,totalPages:h,totalItems:d?.total??0,onPageChange:n}),(0,G.jsx)(kZ,{open:r!==null,onOpenChange:()=>i(null),children:(0,G.jsxs)(jZ,{children:[(0,G.jsx)(MZ,{children:(0,G.jsx)(PZ,{children:`Evict Client`})}),(0,G.jsxs)(`div`,{className:`px-5 py-4 flex flex-col gap-4`,children:[(0,G.jsxs)(`p`,{className:`font-mono text-[11px] text-neutral-300`,children:[`Are you sure you want to evict client`,` `,(0,G.jsxs)(`span`,{className:`font-mono text-white`,children:[r?.slice(0,12),`...`]}),`?`]}),(0,G.jsx)(`p`,{className:`font-mono text-[10px] text-neutral-500`,children:`This will force the client to re-bootstrap on their next sync.`})]}),(0,G.jsxs)(NZ,{children:[(0,G.jsx)(Q,{variant:`default`,onClick:()=>i(null),children:`Cancel`}),(0,G.jsx)(Q,{variant:`destructive`,onClick:_,disabled:m.isPending,children:m.isPending?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(dV,{size:`sm`}),`Evicting...`]}):`Evict`})]})]})})]})}var K$={latencyThresholdMs:1e3,errorRateThreshold:5,clientLagThreshold:50,enabled:!1};function q$(e){return e<1e3?`${e}ms`:e<6e4?`${Math.round(e/1e3)}s`:e<36e5?`${Math.round(e/6e4)}m`:`${Math.round(e/36e5)}h`}function J$(e){let t=e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0);return Array.from(new Set(t))}function Y$(e){switch(e){case`notify_data_change`:return`Notify`;case`evict_client`:return`Evict`;case`compact`:return`Compact`;default:return`Prune`}}function X$(e){return!e||typeof e!=`object`||Array.isArray(e)?null:e}function Z$(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function Q$(e){let t=X$(e.requestPayload),n=X$(e.resultPayload);if(e.operationType===`notify_data_change`){let e=Z$(t?.tables),r=n?.commitSeq;return`${e.length} table${e.length===1?``:`s`} -> commit #${typeof r==`number`?r:`?`}`}if(e.operationType===`evict_client`){let t=n?.evicted===!0?`evicted`:`not found`;return`client ${e.targetClientId??`?`} ${t}`}return e.operationType===`compact`?`${typeof n?.deletedChanges==`number`?n.deletedChanges:0} changes removed`:`${typeof n?.deletedCommits==`number`?n.deletedCommits:0} commits removed${typeof t?.watermarkCommitSeq==`number`?` at #${t.watermarkCommitSeq}`:``}`}function $$(e){let t=Date.parse(e);return Number.isFinite(t)?new Date(t).toLocaleString():e}function e1(){let{partitionId:e}=t$();return(0,G.jsxs)(`div`,{className:`flex flex-col gap-4 px-5 py-5`,children:[(0,G.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,G.jsx)(t1,{}),(0,G.jsx)(o1,{})]}),(0,G.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-3`,children:[(0,G.jsx)(n1,{partitionId:e}),(0,G.jsx)(r1,{partitionId:e}),(0,G.jsx)(i1,{partitionId:e})]}),(0,G.jsx)(a1,{partitionId:e})]})}function t1(){let{data:e,isLoading:t,error:n}=LQ();return t?(0,G.jsx)(`div`,{className:`flex items-center justify-center h-[200px]`,children:(0,G.jsx)(dV,{size:`lg`})}):n?(0,G.jsx)(`div`,{className:`flex items-center justify-center h-[200px]`,children:(0,G.jsxs)(`p`,{className:`text-danger`,children:[`Failed to load handlers: `,n.message]})}):(0,G.jsx)(HV,{handlers:(e?.items??[]).map(e=>({table:e.table,dependsOn:e.dependsOn?.join(`, `)??null,chunkTtl:e.snapshotChunkTtlMs?q$(e.snapshotChunkTtlMs):`default`})),tableCount:e?.items.length??0})}function n1({partitionId:e}){let[t,n]=(0,W.useState)(!1),[r,i]=(0,W.useState)(null),{data:a,isLoading:o}=OQ({partitionId:e}),{data:s,isLoading:c,refetch:l}=RQ({enabled:!1}),u=HQ();return o?(0,G.jsx)(`div`,{className:`flex items-center justify-center h-[200px]`,children:(0,G.jsx)(dV,{size:`lg`})}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(XV,{title:`Prune`,description:`Delete commits that all clients have already synced. Pruning removes commits older than the oldest active client cursor.`,dotColor:`syncing`,stats:[{label:`Total commits`,value:a?.commitCount??0},{label:`Commit range`,value:`${a?.minCommitSeq??0} - ${a?.maxCommitSeq??0}`},{label:`Min active cursor`,value:a?.minActiveClientCursor??`N/A`,tone:`syncing`}],actionLabel:`Preview Prune`,actionVariant:`destructive`,onAction:async()=>{n(!0),i(null),await l()}}),(0,G.jsx)(kZ,{open:t,onOpenChange:n,children:(0,G.jsxs)(jZ,{children:[(0,G.jsx)(MZ,{children:(0,G.jsx)(PZ,{children:`Prune Old Commits`})}),(0,G.jsx)(`div`,{className:`px-5 py-4 flex flex-col gap-4`,children:r===null?c?(0,G.jsx)(`div`,{className:`flex items-center justify-center py-8`,children:(0,G.jsx)(dV,{size:`sm`})}):s?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(cZ,{variant:s.commitsToDelete>0?`destructive`:`default`,children:(0,G.jsx)(uZ,{children:s.commitsToDelete>0?(0,G.jsxs)(G.Fragment,{children:[`This will delete`,` `,(0,G.jsx)(`strong`,{children:s.commitsToDelete}),` commits up to sequence`,` `,(0,G.jsxs)(`code`,{className:`font-mono`,children:[`#`,s.watermarkCommitSeq]}),`.`]}):`No commits are eligible for pruning.`})}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,G.jsxs)(`div`,{className:`flex justify-between font-mono text-[11px]`,children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Watermark commit seq:`}),(0,G.jsxs)(`span`,{className:`text-white`,children:[`#`,s.watermarkCommitSeq]})]}),(0,G.jsxs)(`div`,{className:`flex justify-between font-mono text-[11px] items-center`,children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Commits to delete:`}),(0,G.jsx)(ZB,{variant:s.commitsToDelete>0?`offline`:`ghost`,children:s.commitsToDelete})]})]})]}):null:(0,G.jsxs)(cZ,{variant:`default`,children:[(0,G.jsx)(lZ,{children:`Pruning Complete`}),(0,G.jsxs)(uZ,{children:[`Successfully deleted `,(0,G.jsx)(`strong`,{children:r}),` commits.`]})]})}),(0,G.jsxs)(NZ,{children:[(0,G.jsx)(Q,{variant:`default`,onClick:()=>n(!1),children:r===null?`Cancel`:`Close`}),r===null&&(0,G.jsx)(Q,{variant:`destructive`,onClick:async()=>{i((await u.mutateAsync()).deletedCommits)},disabled:u.isPending||c||(s?.commitsToDelete??0)===0,children:u.isPending?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(dV,{size:`sm`}),`Pruning...`]}):`Prune Now`})]})]})})]})}function r1({partitionId:e}){let[t,n]=(0,W.useState)(!1),[r,i]=(0,W.useState)(null),{data:a,isLoading:o}=OQ({partitionId:e}),s=UQ();return o?(0,G.jsx)(`div`,{className:`flex items-center justify-center h-[200px]`,children:(0,G.jsx)(dV,{size:`lg`})}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(XV,{title:`Compact`,description:`Merge old changes to reduce storage space. Compaction merges multiple changes to the same row into a single change.`,dotColor:`flow`,stats:[{label:`Total changes`,value:a?.changeCount??0},{label:`Total commits`,value:a?.commitCount??0}],actionLabel:`Run Compaction`,actionVariant:`primary`,onAction:()=>{n(!0),i(null)}}),(0,G.jsx)(kZ,{open:t,onOpenChange:n,children:(0,G.jsxs)(jZ,{children:[(0,G.jsx)(MZ,{children:(0,G.jsx)(PZ,{children:`Compact Changes`})}),(0,G.jsx)(`div`,{className:`px-5 py-4 flex flex-col gap-4`,children:r===null?(0,G.jsx)(cZ,{variant:`default`,children:(0,G.jsx)(uZ,{children:`Compaction will merge multiple changes to the same row, keeping only the most recent version. This is safe and can be run at any time.`})}):(0,G.jsxs)(cZ,{variant:`default`,children:[(0,G.jsx)(lZ,{children:`Compaction Complete`}),(0,G.jsxs)(uZ,{children:[`Successfully removed `,(0,G.jsx)(`strong`,{children:r}),` redundant changes.`]})]})}),(0,G.jsxs)(NZ,{children:[(0,G.jsx)(Q,{variant:`default`,onClick:()=>n(!1),children:r===null?`Cancel`:`Close`}),r===null&&(0,G.jsx)(Q,{variant:`primary`,onClick:async()=>{i((await s.mutateAsync()).deletedChanges)},disabled:s.isPending,children:s.isPending?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(dV,{size:`sm`}),`Compacting...`]}):`Compact Now`})]})]})})]})}function i1({partitionId:e}){let[t,n]=(0,W.useState)(!1),[r,i]=(0,W.useState)(`tasks`),[a,o]=(0,W.useState)(e??``),[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(null),d=WQ(),f=J$(r),p=[{label:`Next tables`,value:f.length,tone:`syncing`},{label:`Last commit seq`,value:s?`#${s.commitSeq}`:`—`,tone:`syncing`},{label:`Last chunks cleared`,value:s?.deletedChunks??`—`}];return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(XV,{title:`Notify Data Change`,description:`Create a synthetic commit after external imports or direct DB writes so clients re-bootstrap for affected tables.`,dotColor:`healthy`,stats:p,actionLabel:`Notify Clients`,actionVariant:`primary`,onAction:()=>{n(!0),u(null)}}),(0,G.jsx)(kZ,{open:t,onOpenChange:n,children:(0,G.jsxs)(jZ,{children:[(0,G.jsx)(MZ,{children:(0,G.jsx)(PZ,{children:`Notify External Data Change`})}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-4 px-5 py-4`,children:[s?(0,G.jsxs)(cZ,{variant:`default`,children:[(0,G.jsx)(lZ,{children:`Notification Sent`}),(0,G.jsxs)(uZ,{children:[`Created synthetic commit`,` `,(0,G.jsxs)(`strong`,{children:[`#`,s.commitSeq]}),` for`,` `,(0,G.jsx)(`strong`,{children:s.tables.length}),` table`,s.tables.length===1?``:`s`,` and cleared`,` `,(0,G.jsx)(`strong`,{children:s.deletedChunks}),` cached chunk`,s.deletedChunks===1?``:`s`,`.`]})]}):(0,G.jsx)(cZ,{variant:`default`,children:(0,G.jsx)(uZ,{children:`Use this when data changed outside Syncular push flow. It invalidates cached snapshot chunks and forces clients to pull fresh data.`})}),l?(0,G.jsx)(cZ,{variant:`destructive`,children:(0,G.jsx)(uZ,{children:l})}):null,(0,G.jsxs)(YJ,{children:[(0,G.jsx)(XJ,{children:`Tables (comma-separated)`}),(0,G.jsx)(jR,{value:r,onChange:e=>i(e.target.value),placeholder:`tasks, notes`,disabled:d.isPending}),(0,G.jsx)(ZJ,{children:`Enter one or more table names affected by the external change.`})]}),(0,G.jsxs)(YJ,{children:[(0,G.jsx)(XJ,{children:`Partition ID (optional)`}),(0,G.jsx)(jR,{value:a,onChange:e=>o(e.target.value),placeholder:`default`,disabled:d.isPending})]})]}),(0,G.jsxs)(NZ,{children:[(0,G.jsx)(Q,{variant:`default`,onClick:()=>n(!1),children:s?`Close`:`Cancel`}),s?null:(0,G.jsx)(Q,{variant:`primary`,onClick:async()=>{if(f.length===0){u(`Provide at least one table name.`);return}u(null),c(await d.mutateAsync({tables:f,partitionId:a.trim()||void 0}))},disabled:d.isPending,children:d.isPending?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(dV,{size:`sm`}),`Notifying...`]}):`Notify Data Change`})]})]})})]})}function a1({partitionId:e}){let[t,n]=(0,W.useState)(`all`),{data:r,isLoading:i,error:a}=zQ({limit:20,offset:0,operationType:t===`all`?void 0:t,partitionId:e},{refetchIntervalMs:5e3});return(0,G.jsx)(eH,{title:`Operation Audit`,description:`Recent prune/compact/notify/evict actions with actor and result context.`,actions:(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(Q,{variant:t===`all`?`default`:`ghost`,size:`sm`,onClick:()=>n(`all`),children:`All`}),(0,G.jsx)(Q,{variant:t===`prune`?`default`:`ghost`,size:`sm`,onClick:()=>n(`prune`),children:`Prune`}),(0,G.jsx)(Q,{variant:t===`compact`?`default`:`ghost`,size:`sm`,onClick:()=>n(`compact`),children:`Compact`}),(0,G.jsx)(Q,{variant:t===`notify_data_change`?`default`:`ghost`,size:`sm`,onClick:()=>n(`notify_data_change`),children:`Notify`}),(0,G.jsx)(Q,{variant:t===`evict_client`?`default`:`ghost`,size:`sm`,onClick:()=>n(`evict_client`),children:`Evict`})]}),contentClassName:`pt-2`,children:i?(0,G.jsx)(`div`,{className:`flex items-center justify-center py-10`,children:(0,G.jsx)(dV,{size:`lg`})}):a?(0,G.jsx)(cZ,{variant:`destructive`,children:(0,G.jsxs)(uZ,{children:[`Failed to load operation audit events: `,a.message]})}):(r?.items.length??0)===0?(0,G.jsx)(`div`,{className:`px-2 py-8 text-sm text-neutral-500`,children:`No operation events found for this filter.`}):(0,G.jsx)(`div`,{className:`overflow-x-auto`,children:(0,G.jsxs)(QB,{children:[(0,G.jsx)($B,{children:(0,G.jsxs)(tV,{children:[(0,G.jsx)(nV,{children:`Time`}),(0,G.jsx)(nV,{children:`Type`}),(0,G.jsx)(nV,{children:`User`}),(0,G.jsx)(nV,{children:`Target`}),(0,G.jsx)(nV,{children:`Result`})]})}),(0,G.jsx)(eV,{children:(r?.items??[]).map((e,t)=>(0,G.jsxs)(tV,{children:[(0,G.jsx)(rV,{className:`whitespace-nowrap text-xs text-neutral-400`,children:$$(e.createdAt)}),(0,G.jsx)(rV,{children:(0,G.jsx)(ZB,{variant:`ghost`,children:Y$(e.operationType)})}),(0,G.jsx)(rV,{className:`font-mono text-xs`,children:e.consoleUserId??`system`}),(0,G.jsx)(rV,{className:`font-mono text-xs`,children:e.targetClientId??e.partitionId??(e.operationType===`notify_data_change`?`partition default`:`global`)}),(0,G.jsx)(rV,{className:`font-mono text-xs text-neutral-300`,children:Q$(e)})]},`${e.operationId}:${e.createdAt}:${t}`))})]})})})}function o1(){let[e,t]=pQ(`console:alert-config`,K$),n={p90Latency:e.latencyThresholdMs,errorRate:e.errorRateThreshold,clientLag:e.clientLagThreshold};return(0,G.jsx)(JB,{enabled:e.enabled,onEnabledChange:e=>{t(t=>({...t,enabled:e}))},thresholds:n,onThresholdsChange:e=>{t(t=>({...t,latencyThresholdMs:e.p90Latency,errorRateThreshold:e.errorRate,clientLagThreshold:e.clientLag}))}})}function s1(e){if(e===0)return`0 B`;let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=Math.floor(Math.log(e)/Math.log(1024));return`${(e/1024**n).toFixed(n===0?0:1)} ${t[n]}`}function c1(e){let t=Date.parse(e);return Number.isFinite(t)?new Date(t).toLocaleString():e}function l1(){let[e,t]=(0,W.useState)(``),[n,r]=(0,W.useState)(void 0),[i,a]=(0,W.useState)(void 0),[o,s]=(0,W.useState)([]),[c,l]=(0,W.useState)(null),{data:u,isLoading:d,error:f}=ZQ({prefix:n,cursor:i,limit:100}),p=QQ(),m=$Q();function h(){let t=e.trim();r(t.length>0?t:void 0),a(void 0),s([])}function g(){t(``),r(void 0),a(void 0),s([])}function _(){u?.cursor&&(s(e=>[...e,i??``]),a(u.cursor))}function v(){s(e=>{let t=[...e],n=t.pop();return a(n&&n.length>0?n:void 0),t})}function y(){c&&p.mutate(c,{onSuccess:()=>l(null)})}if(d)return(0,G.jsx)(`div`,{className:`flex flex-col gap-4 px-5 py-5`,children:(0,G.jsx)(`div`,{className:`flex items-center justify-center h-[200px]`,children:(0,G.jsx)(dV,{size:`lg`})})});if(f)return(0,G.jsx)(`div`,{className:`flex flex-col gap-4 px-5 py-5`,children:(0,G.jsx)(`div`,{className:`flex items-center justify-center h-[200px]`,children:(0,G.jsxs)(`p`,{className:`text-danger font-mono text-[11px]`,children:[`Failed to load storage items: `,f.message]})})});let b=u?.items??[];return(0,G.jsxs)(`div`,{className:`flex flex-col gap-4 px-5 py-5`,children:[(0,G.jsx)(eH,{title:`Storage`,actions:(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(jR,{placeholder:`Prefix filter...`,value:e,onChange:e=>t(e.target.value),onKeyDown:e=>{e.key===`Enter`&&h()},className:`h-7 w-48 text-xs`}),(0,G.jsx)(Q,{variant:`default`,size:`sm`,onClick:h,children:`Filter`}),n&&(0,G.jsx)(Q,{variant:`ghost`,size:`sm`,onClick:g,children:`Clear`})]}),children:b.length===0?(0,G.jsx)(vV,{message:n?`No storage items matching prefix "${n}".`:`No storage items found.`}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`overflow-x-auto`,children:(0,G.jsxs)(QB,{children:[(0,G.jsx)($B,{children:(0,G.jsxs)(tV,{children:[(0,G.jsx)(nV,{children:`Key`}),(0,G.jsx)(nV,{children:`Size`}),(0,G.jsx)(nV,{children:`Type`}),(0,G.jsx)(nV,{children:`Uploaded`}),(0,G.jsx)(nV,{children:`Actions`})]})}),(0,G.jsx)(eV,{children:b.map(e=>(0,G.jsxs)(tV,{children:[(0,G.jsx)(rV,{className:`font-mono text-xs max-w-[320px]`,title:e.key,children:e.key}),(0,G.jsx)(rV,{className:`font-mono text-xs text-neutral-400 whitespace-nowrap`,children:s1(e.size)}),(0,G.jsx)(rV,{children:e.httpMetadata?.contentType?(0,G.jsx)(ZB,{variant:`ghost`,children:e.httpMetadata.contentType}):(0,G.jsx)(`span`,{className:`text-neutral-500 text-xs`,children:`--`})}),(0,G.jsx)(rV,{className:`whitespace-nowrap text-xs text-neutral-400`,children:c1(e.uploaded)}),(0,G.jsx)(rV,{children:(0,G.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,G.jsx)(Q,{variant:`ghost`,size:`sm`,onClick:()=>void m(e.key),children:`Download`}),(0,G.jsx)(Q,{variant:`ghost`,size:`sm`,onClick:()=>l(e.key),children:`Delete`})]})})]},e.key))})]})}),(0,G.jsxs)(`div`,{className:`flex items-center justify-between px-2 py-2`,children:[(0,G.jsx)(Q,{variant:`ghost`,size:`sm`,disabled:o.length===0,onClick:v,children:`Previous`}),(0,G.jsx)(Q,{variant:`ghost`,size:`sm`,disabled:!u?.truncated,onClick:_,children:`Next`})]})]})}),(0,G.jsx)(kZ,{open:c!==null,onOpenChange:()=>l(null),children:(0,G.jsxs)(jZ,{children:[(0,G.jsx)(MZ,{children:(0,G.jsx)(PZ,{children:`Delete Storage Item`})}),(0,G.jsxs)(`div`,{className:`px-5 py-4 flex flex-col gap-4`,children:[(0,G.jsxs)(`p`,{className:`font-mono text-[11px] text-neutral-300`,children:[`Are you sure you want to delete`,` `,(0,G.jsx)(`span`,{className:`font-mono text-white`,children:c}),`?`]}),(0,G.jsx)(`p`,{className:`font-mono text-[10px] text-neutral-500`,children:`This action cannot be undone.`})]}),(0,G.jsxs)(NZ,{children:[(0,G.jsx)(Q,{variant:`default`,onClick:()=>l(null),children:`Cancel`}),(0,G.jsx)(Q,{variant:`destructive`,onClick:y,disabled:p.isPending,children:p.isPending?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(dV,{size:`sm`}),` Deleting...`]}):`Delete`})]})]})})]})}function u1(e,t){if(t===`absolute`)return new Date(e).toLocaleString();let n=new Date(e),r=new Date().getTime()-n.getTime(),i=Math.floor(r/1e3);return i<60?`${i}s`:i<3600?`${Math.floor(i/60)}m`:i<86400?`${Math.floor(i/3600)}h`:`${Math.floor(i/86400)}d`}function d1(e){let t=e.split(/\s+/).map(e=>e.trim()).filter(e=>e.length>0),n={},r=[];for(let e of t){let[t=``,...i]=e.split(`:`),a=i.join(`:`).trim(),o=t.toLowerCase();if(!a){r.push(e);continue}if(o===`actor`){n.actorId=a;continue}if(o===`client`){n.clientId=a;continue}if(o===`table`){n.table=a;continue}if(o===`request`){n.requestId=a;continue}if(o===`trace`){n.traceId=a;continue}r.push(e)}return r.length>0&&(n.search=r.join(` `)),n}function f1(e){return e===`1h`?3600*1e3:e===`6h`?360*60*1e3:e===`24h`?1440*60*1e3:e===`7d`?10080*60*1e3:720*60*60*1e3}function p1(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function m1(e,t){return e?`#${e.federatedCommitId??(t?`${t}:${e.commitSeq}`:String(e.commitSeq))}`:`#?`}function h1(e,t){return e?`E${e.federatedEventId??(t?`${t}:${e.eventId}`:e.eventId)}`:`E?`}function g1(e,t,n){return!e||!t?null:e.replaceAll(`{traceId}`,encodeURIComponent(t)).replaceAll(`{spanId}`,encodeURIComponent(n??``))}function _1({initialSelectedEntryId:e}={}){let{preferences:t}=r$(),{partitionId:n}=t$(),{range:r,setRange:i}=g$(),a=t.pageSize,o=t.refreshInterval*1e3,[s,c]=(0,W.useState)(()=>e?.startsWith(`#`)?`commits`:e?.startsWith(`E`)?`events`:`all`),[l,u]=(0,W.useState)(`all`),[d,f]=(0,W.useState)(`all`),[p,m]=(0,W.useState)(``),[h,g]=(0,W.useState)(1),[_,v]=(0,W.useState)(!1),[y,b]=(0,W.useState)(e??null),x=(0,W.useRef)(!1),S=(0,W.useMemo)(()=>d1(p),[p]),C=(0,W.useMemo)(()=>new Date(Date.now()-f1(r)).toISOString(),[r]),{data:w,isLoading:T,refetch:E}=NQ({limit:a,offset:(h-1)*a,...n?{partitionId:n}:{},view:s,...s!==`commits`&&l!==`all`?{eventType:l}:{},...s!==`commits`&&d!==`all`?{outcome:d}:{},...S.actorId?{actorId:S.actorId}:{},...S.clientId?{clientId:S.clientId}:{},...S.requestId?{requestId:S.requestId}:{},...S.traceId?{traceId:S.traceId}:{},...S.table?{table:S.table}:{},...S.search?{search:S.search}:{},from:C},{refetchIntervalMs:o}),D=BQ(),O=y?.startsWith(`#`)?y.slice(1):void 0,k=y?.startsWith(`E`)?y.slice(1):void 0,A=O&&O!==`?`?O:void 0,j=k&&k!==`?`?k:void 0,{data:M,isLoading:N,error:P}=MQ(A,{enabled:A!==void 0,partitionId:n}),{data:F,isLoading:I,error:L}=FQ(j,{enabled:j!==void 0,partitionId:n}),{data:ee,isLoading:R,error:z}=IQ(j,{enabled:j!==void 0&&!!F?.payloadRef,partitionId:n}),B=(0,W.useMemo)(()=>g1(void 0,F?.traceId??null,F?.spanId??null),[F?.spanId,F?.traceId,void 0]);(0,W.useEffect)(()=>{g(1)},[]),(0,W.useEffect)(()=>{g(1)},[]),(0,W.useEffect)(()=>{e&&b(e)},[e]),(0,W.useEffect)(()=>{if(!x.current){x.current=!0;return}b(null)},[]),(0,W.useEffect)(()=>{g(1),b(null)},[]);let V=(0,W.useMemo)(()=>(w?.items??[]).map(e=>{let n=e.instanceId??e.commit?.instanceId??e.event?.instanceId,r=n?`[${n}] `:``;if(e.type===`commit`&&e.commit){let i=e.commit;return{type:`commit`,id:m1(i,n),outcome:`--`,duration:`--`,actor:i.actorId,client:i.clientId,detail:`${r}${i.changeCount} chg | ${(i.affectedTables??[]).join(`, `)}`,time:u1(e.timestamp,t.timeFormat)}}let i=e.event;return i?{type:i.eventType,id:h1(i,n),outcome:i.outcome,duration:`${i.durationMs}ms`,actor:i.actorId,client:i.clientId,detail:`${r}${(i.tables??[]).join(`, `)||`--`}`,time:u1(e.timestamp,t.timeFormat)}:{type:`pull`,id:`E?`,outcome:`unknown`,duration:`--`,actor:``,client:``,detail:`--`,time:u1(e.timestamp,t.timeFormat)}}),[t.timeFormat,w?.items]),H=w?.total??0,U=Math.max(1,Math.ceil(H/a)),te=T,ne=[{label:``,options:[{id:`all`,label:`All`},{id:`commits`,label:`Commits`},{id:`events`,label:`Events`}],activeId:s,onActiveChange:e=>{c(e),e===`commits`&&(u(`all`),f(`all`)),g(1)}},{label:`Time`,options:[{id:`1h`,label:`1h`},{id:`6h`,label:`6h`},{id:`24h`,label:`24h`},{id:`7d`,label:`7d`},{id:`30d`,label:`30d`}],activeId:r,onActiveChange:e=>{i(e),g(1)}},{label:`Type`,options:[{id:`all`,label:`All`},{id:`push`,label:`Push`},{id:`pull`,label:`Pull`}],activeId:l,onActiveChange:e=>{u(e),g(1)}},{label:`Outcome`,options:[{id:`all`,label:`All`},{id:`applied`,label:`Applied`},{id:`error`,label:`Error`},{id:`rejected`,label:`Rejected`}],activeId:d,onActiveChange:e=>{f(e),g(1)}}];function re(){D.mutate(void 0,{onSuccess:()=>{v(!1),E()}})}return(0,G.jsxs)(`div`,{className:`flex flex-col h-full`,children:[te&&V.length===0?(0,G.jsx)(`div`,{className:`flex items-center justify-center py-24`,children:(0,G.jsx)(dV,{size:`lg`})}):(0,G.jsx)(rH,{entries:V,selectedEntryId:y,onEntryClick:e=>b(e.id),filterBar:(0,G.jsx)(yV,{groups:ne,searchValue:p,searchPlaceholder:`Use actor:, client:, table:, request:, trace: or free text...`,onSearchChange:m,actions:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Q,{size:`sm`,variant:`ghost`,onClick:()=>void E(),children:`Refresh`}),(0,G.jsx)(Q,{size:`sm`,variant:`ghost`,children:`Export`}),(0,G.jsx)(Q,{size:`sm`,variant:`destructive`,onClick:()=>v(!0),children:`Clear`})]})}),pagination:(0,G.jsx)(IZ,{page:h,totalPages:U,totalItems:H,onPageChange:g})}),(0,G.jsx)(kZ,{open:y!==null,onOpenChange:e=>{e||b(null)},children:(0,G.jsxs)(jZ,{children:[(0,G.jsx)(MZ,{children:(0,G.jsx)(PZ,{children:A===void 0?j===void 0?`Entry details`:`Event E${j}`:`Commit #${A}`})}),(0,G.jsx)(`div`,{className:`px-5 py-4 space-y-3 max-h-[70vh] overflow-y-auto`,children:N||I?(0,G.jsx)(`div`,{className:`flex items-center justify-center py-8`,children:(0,G.jsx)(dV,{size:`sm`})}):P||L?(0,G.jsx)(`p`,{className:`font-mono text-[11px] text-offline`,children:`Failed to load details.`}):M?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 font-mono text-[11px]`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Actor`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:M.actorId})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Client`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:M.clientId})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Instance`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:M.instanceId??`--`})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Created`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:u1(M.createdAt,t.timeFormat)})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Changes`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:M.changeCount})]})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:`font-mono text-[10px] uppercase tracking-wider text-neutral-500 mb-2`,children:`Affected Tables`}),(0,G.jsx)(`p`,{className:`font-mono text-[11px] text-neutral-200`,children:M.affectedTables.join(`, `)||`--`})]}),(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`p`,{className:`font-mono text-[10px] uppercase tracking-wider text-neutral-500`,children:`Changes`}),M.changes.length===0?(0,G.jsx)(`p`,{className:`font-mono text-[11px] text-neutral-500`,children:`No changes recorded.`}):M.changes.map(e=>(0,G.jsxs)(`div`,{className:`rounded-md border border-border p-3 space-y-2`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between font-mono text-[11px]`,children:[(0,G.jsxs)(`span`,{className:`text-neutral-300`,children:[e.table,` | `,e.op]}),(0,G.jsxs)(`span`,{className:`text-neutral-500`,children:[`#`,e.changeId]})]}),(0,G.jsxs)(`div`,{className:`font-mono text-[11px] text-neutral-400`,children:[`rowId: `,e.rowId,e.rowVersion===null?``:` | version: ${e.rowVersion}`]}),(0,G.jsx)(`pre`,{className:`font-mono text-[10px] rounded bg-surface p-2 overflow-x-auto text-neutral-200`,children:p1(e.rowJson)})]},e.changeId))]})]}):F?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 font-mono text-[11px]`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Type`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:F.eventType})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Path`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:F.syncPath})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Instance`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:F.instanceId??`--`})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Outcome`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:F.outcome})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Response Status`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:F.responseStatus})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Actor`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:F.actorId})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Client`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:F.clientId})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Status`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:F.statusCode})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Transport`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:F.transportPath})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Duration`}),(0,G.jsxs)(`div`,{className:`text-neutral-100`,children:[F.durationMs,`ms`]})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Request ID`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:F.requestId})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Trace ID`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:F.traceId??`--`}),B&&(0,G.jsx)(`a`,{href:B,target:`_blank`,rel:`noreferrer`,className:`font-mono text-[10px] text-flow underline underline-offset-4`,children:`Open external trace`})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Span ID`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:F.spanId??`--`})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Commit Seq`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:F.commitSeq??`--`}),F.commitSeq!==null&&(0,G.jsx)(Q,{variant:`ghost`,size:`sm`,onClick:()=>b(`#${F.instanceId?`${F.instanceId}:`:``}${F.commitSeq}`),children:`Open linked commit`})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Subscription Count`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:F.subscriptionCount??`--`})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Error Code`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:F.errorCode??`--`})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Payload Ref`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:F.payloadRef??`--`})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`text-neutral-500`,children:`Created`}),(0,G.jsx)(`div`,{className:`text-neutral-100`,children:u1(F.createdAt,t.timeFormat)})]})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:`font-mono text-[10px] uppercase tracking-wider text-neutral-500 mb-2`,children:`Tables`}),(0,G.jsx)(`p`,{className:`font-mono text-[11px] text-neutral-200`,children:F.tables.join(`, `)||`--`})]}),F.scopesSummary&&(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:`font-mono text-[10px] uppercase tracking-wider text-neutral-500 mb-2`,children:`Scopes Summary`}),(0,G.jsx)(`pre`,{className:`font-mono text-[10px] rounded bg-surface p-2 overflow-x-auto text-neutral-200`,children:p1(F.scopesSummary)})]}),F.payloadRef&&(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:`font-mono text-[10px] uppercase tracking-wider text-neutral-500 mb-2`,children:`Payload Snapshot`}),R?(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(dV,{size:`sm`}),(0,G.jsx)(`span`,{className:`font-mono text-[11px] text-neutral-400`,children:`Loading payload snapshot...`})]}):z?(0,G.jsx)(`p`,{className:`font-mono text-[11px] text-offline`,children:`Failed to load payload snapshot.`}):ee?(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`p`,{className:`font-mono text-[10px] uppercase tracking-wider text-neutral-500`,children:`Request`}),(0,G.jsx)(`pre`,{className:`font-mono text-[10px] rounded bg-surface p-2 overflow-x-auto text-neutral-200`,children:p1(ee.requestPayload)}),(0,G.jsx)(`p`,{className:`font-mono text-[10px] uppercase tracking-wider text-neutral-500`,children:`Response`}),(0,G.jsx)(`pre`,{className:`font-mono text-[10px] rounded bg-surface p-2 overflow-x-auto text-neutral-200`,children:p1(ee.responsePayload)})]}):(0,G.jsx)(`p`,{className:`font-mono text-[11px] text-neutral-500`,children:`No payload snapshot available.`})]}),F.errorMessage&&(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:`font-mono text-[10px] uppercase tracking-wider text-neutral-500 mb-2`,children:`Error`}),(0,G.jsx)(`p`,{className:`font-mono text-[11px] text-offline`,children:F.errorMessage})]})]}):(0,G.jsx)(`p`,{className:`font-mono text-[11px] text-neutral-500`,children:`No details available for this row.`})}),(0,G.jsx)(NZ,{children:(0,G.jsx)(Q,{variant:`default`,size:`sm`,onClick:()=>b(null),children:`Close`})})]})}),(0,G.jsx)(kZ,{open:_,onOpenChange:e=>{e||v(!1)},children:(0,G.jsxs)(jZ,{children:[(0,G.jsx)(MZ,{children:(0,G.jsx)(PZ,{children:`Clear all events`})}),(0,G.jsx)(`div`,{className:`p-4`,children:(0,G.jsx)(`span`,{className:`font-mono text-[11px] text-neutral-400`,children:`This will permanently delete all request events. Commits are not affected. Are you sure?`})}),(0,G.jsxs)(NZ,{children:[(0,G.jsx)(Q,{variant:`default`,size:`sm`,onClick:()=>v(!1),children:`Cancel`}),(0,G.jsx)(Q,{variant:`destructive`,size:`sm`,onClick:re,disabled:D.isPending,children:D.isPending?`Clearing...`:`Clear all`})]})]})})]})}var v1=Hv({getParentRoute:()=>p$,path:`/config`,component:A$}),y1=Hv({getParentRoute:()=>p$,path:`/fleet`,component:G$}),b1=Hv({getParentRoute:()=>p$,path:`/`,component:O$});function x1(){let{seq:e}=S1.useParams();return(0,G.jsx)(_1,{initialSelectedEntryId:`#${e}`})}var S1=Hv({getParentRoute:()=>p$,path:`/investigate/commit/$seq`,component:x1});function C1(){let{id:e}=w1.useParams();return(0,G.jsx)(_1,{initialSelectedEntryId:`E${e}`})}var w1=Hv({getParentRoute:()=>p$,path:`/investigate/event/$id`,component:C1}),T1=Hv({getParentRoute:()=>p$,path:`/ops`,component:e1}),E1=Hv({getParentRoute:()=>p$,path:`/storage`,component:l1}),D1=Hv({getParentRoute:()=>p$,path:`/stream`,component:_1}),O1=p$.addChildren([b1,D1,S1,w1,y1,T1,E1,v1]),k1=`syncular-console-basepath`,A1=`syncular-console-server-url`,j1=`syncular-console-token`;function M1(e){if(!e)return;let t=e.trim();return t.length>0?t:void 0}function N1(e){let t=globalThis.document;if(!t)return;let n=t.querySelector(`meta[name="${e}"]`)?.getAttribute(`content`);return M1(n)}function P1(e){return!e||e===`/`?`/`:(e.startsWith(`/`)?e:`/${e}`).replace(/\/+$/g,``)||`/`}function F1(){return P1(N1(k1))}function I1(){let e=N1(A1),t=N1(j1);return!e||!t?null:{serverUrl:e,token:t}}function L1(){return new Vm({defaultOptions:{queries:{staleTime:5e3,retry:1}}})}function R1(e){return P1(e??F1())}function z1(e){let[t]=(0,W.useState)(()=>L1()),n=(0,W.useMemo)(()=>iy({routeTree:O1,basepath:R1(e.basePath)}),[e.basePath]);return(0,G.jsx)(Gm,{client:t,children:(0,G.jsx)(My,{defaultConfig:e.defaultConfig===void 0?I1():e.defaultConfig,autoConnect:e.autoConnect??e.defaultConfig===void 0,storageMode:e.storageMode,children:(0,G.jsx)(sy,{router:n})})})}function B1(e){return(0,G.jsx)(`div`,{className:o$,children:(0,G.jsx)(z1,{...e})})}function V1(e){if(typeof e!=`string`)return e;let t=document.querySelector(e);if(!t)throw Error(`Unable to mount console: ${e} not found`);return t}function H1(e,t={}){let n=V1(e);s$(n);let r=(0,Cy.createRoot)(n),i=(0,G.jsx)(B1,{basePath:t.basePath,defaultConfig:t.defaultConfig,autoConnect:t.autoConnect});return t.strictMode===!1?(r.render(i),r):(r.render((0,G.jsx)(W.StrictMode,{children:i})),r)}var U1=`syncular-sentry-dsn`,W1=`syncular-sentry-environment`,G1=`syncular-sentry-release`;function K1(e){if(!e)return;let t=e.trim();return t.length>0?t:void 0}function q1(e){if(typeof document>`u`)return;let t=document.querySelector(`meta[name="${e}"]`)?.getAttribute(`content`);return K1(t)}function J1(e){if(!(typeof process>`u`))return K1({}[e])}function Y1(e){for(let t of e)if(t)return t}function X1(){let e=Y1([K1(globalThis.__SYNCULAR_SENTRY_DSN__),q1(U1),J1(`SYNCULAR_SENTRY_DSN`)]);return e?{dsn:e,environment:Y1([K1(globalThis.__SYNCULAR_SENTRY_ENVIRONMENT__),q1(W1),J1(`SYNCULAR_SENTRY_ENVIRONMENT`)]),release:Y1([K1(globalThis.__SYNCULAR_SENTRY_RELEASE__),q1(G1),J1(`SYNCULAR_SENTRY_RELEASE`)]),enableLogs:!0,tracesSampleRate:.2,tracePropagationTargets:[/^https?:\/\/.*\/api\/.*/]}:null}var Z1=X1();Z1&&Tp(Z1),H1(`#root`);
|