@sentry/junior-dashboard 0.279.0 → 0.280.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +100 -31
- package/dist/client-manifest.json +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +100 -31
- package/dist/public/chunks/AdminPage-YEKZOKH6.js +1 -0
- package/dist/public/chunks/AutomationPage-5GS3IUAK.js +3 -0
- package/dist/public/chunks/AutomationRunsPage-IPYEZU4L.js +1 -0
- package/dist/public/chunks/AutomationsPage-HSAYPC3C.js +1 -0
- package/dist/public/chunks/CodePage-IPFKXWFB.js +1 -0
- package/dist/public/chunks/ConnectionsPage-5XUEK6FS.js +1 -0
- package/dist/public/chunks/DrawerContent-RYYS57ZH.js +1 -0
- package/dist/public/chunks/LocationDetailPage-27ETUGR6.js +1 -0
- package/dist/public/chunks/LocationsPage-WOKMQAGM.js +1 -0
- package/dist/public/chunks/McpSettingsPage-3RT7JPEK.js +1 -0
- package/dist/public/chunks/PeoplePage-6YQLDOUL.js +1 -0
- package/dist/public/chunks/PersonProfilePage-GYMAZFIK.js +1 -0
- package/dist/public/chunks/PersonalTokensPage-4BCR744B.js +1 -0
- package/dist/public/chunks/PluginUserPage-IP6WL7MD.js +1 -0
- package/dist/public/chunks/RepositoryPage-TRD44LQ3.js +1 -0
- package/dist/public/chunks/SettingsPage-4E3SLQ36.js +1 -0
- package/dist/public/chunks/SystemPage-C3XBKXKW.js +1 -0
- package/dist/public/chunks/WorkspaceFormPage-2LS2X67Q.js +2 -0
- package/dist/public/chunks/WorkspacesPage-5WB3CUTX.js +1 -0
- package/dist/public/chunks/chunk-2BCS5AQL.js +1 -0
- package/dist/public/chunks/chunk-3Y3ICT6K.js +1 -0
- package/dist/public/chunks/chunk-4AKUZW6R.js +1 -0
- package/dist/public/chunks/chunk-4UGZNVJM.js +1 -0
- package/dist/public/chunks/chunk-564V7YHG.js +1 -0
- package/dist/public/chunks/chunk-5GZDBGAR.js +1 -0
- package/dist/public/chunks/chunk-5ISD3QSC.js +1 -0
- package/dist/public/chunks/chunk-5LNGNJ3P.js +1 -0
- package/dist/public/chunks/chunk-5ZA674OU.js +1 -0
- package/dist/public/chunks/chunk-6FSJ3W2W.js +1 -0
- package/dist/public/chunks/chunk-6GQL3EVJ.js +1 -0
- package/dist/public/chunks/chunk-6PHJZPWD.js +19 -0
- package/dist/public/chunks/chunk-A2QWWA7O.js +41 -0
- package/dist/public/chunks/chunk-AYXSBMWA.js +1 -0
- package/dist/public/chunks/chunk-B5ZN3SWQ.js +14 -0
- package/dist/public/chunks/chunk-B6HGRBBX.js +1 -0
- package/dist/public/chunks/chunk-BKOACADP.js +1 -0
- package/dist/public/chunks/chunk-CQY6BYUB.js +1 -0
- package/dist/public/chunks/chunk-CR2ICLSH.js +1 -0
- package/dist/public/chunks/chunk-DZB4LPI6.js +1 -0
- package/dist/public/chunks/chunk-EFEREKX4.js +1 -0
- package/dist/public/chunks/chunk-FE522UEA.js +1 -0
- package/dist/public/chunks/chunk-FVX42XAD.js +1 -0
- package/dist/public/chunks/chunk-G5NWYJTV.js +1 -0
- package/dist/public/chunks/chunk-GMZIELFU.js +1 -0
- package/dist/public/chunks/chunk-GO45RQDL.js +1 -0
- package/dist/public/chunks/chunk-GOTQ4D6W.js +1 -0
- package/dist/public/chunks/chunk-GRMX2HX6.js +1 -0
- package/dist/public/chunks/chunk-GYRM5ZIV.js +1 -0
- package/dist/public/chunks/chunk-H2ZU34CP.js +1 -0
- package/dist/public/chunks/chunk-H76B43OQ.js +1 -0
- package/dist/public/chunks/chunk-HCLRG2EC.js +1 -0
- package/dist/public/chunks/chunk-IA6BJDKN.js +1 -0
- package/dist/public/chunks/chunk-IZWTFLCC.js +1 -0
- package/dist/public/chunks/chunk-J37MXUED.js +1 -0
- package/dist/public/chunks/chunk-JAZABOBA.js +0 -0
- package/dist/public/chunks/chunk-L2H3ZWZN.js +1 -0
- package/dist/public/chunks/chunk-LBELRO5P.js +1 -0
- package/dist/public/chunks/chunk-LKW7MULF.js +1 -0
- package/dist/public/chunks/chunk-MEHLQZDG.js +3 -0
- package/dist/public/chunks/chunk-MTBUV2GJ.js +1 -0
- package/dist/public/chunks/chunk-N4AONKD3.js +1 -0
- package/dist/public/chunks/chunk-NQMDED2R.js +2 -0
- package/dist/public/chunks/chunk-NQOJAZFQ.js +1 -0
- package/dist/public/chunks/chunk-PEQNT5MO.js +1 -0
- package/dist/public/chunks/chunk-PQPAPPEI.js +1 -0
- package/dist/public/chunks/chunk-PXHLJIOT.js +1 -0
- package/dist/public/chunks/chunk-QNA7F7QB.js +1 -0
- package/dist/public/chunks/chunk-QOX5RMLM.js +1 -0
- package/dist/public/chunks/chunk-QPBLZSNX.js +1 -0
- package/dist/public/chunks/chunk-R4ORRE77.js +1 -0
- package/dist/public/chunks/chunk-RHIXHBS5.js +1 -0
- package/dist/public/chunks/chunk-RHMZNAJX.js +1 -0
- package/dist/public/chunks/chunk-SDKV3OID.js +1 -0
- package/dist/public/chunks/chunk-SIOW7OOW.js +1 -0
- package/dist/public/chunks/chunk-SUX4QBVF.js +1 -0
- package/dist/public/chunks/chunk-T4M53QQT.js +1 -0
- package/dist/public/chunks/chunk-TFJOEF3Q.js +1 -0
- package/dist/public/chunks/chunk-UAH6DWNS.js +1 -0
- package/dist/public/chunks/chunk-UJD3MBMB.js +1 -0
- package/dist/public/chunks/chunk-UK2V4UBT.js +1 -0
- package/dist/public/chunks/chunk-UT6HZPGL.js +1 -0
- package/dist/public/chunks/chunk-UZ44J2LH.js +1 -0
- package/dist/public/chunks/chunk-V5UDSIRA.js +63 -0
- package/dist/public/chunks/chunk-VC6IS564.js +1 -0
- package/dist/public/chunks/chunk-VFEBNOPX.js +1 -0
- package/dist/public/chunks/chunk-VXT3FIVL.js +55 -0
- package/dist/public/chunks/chunk-WJ3OXMVX.js +1 -0
- package/dist/public/chunks/chunk-WRXMQB7X.js +25 -0
- package/dist/public/chunks/chunk-WZVO3HG4.js +1 -0
- package/dist/public/chunks/chunk-XNR4RZEC.js +1 -0
- package/dist/public/chunks/chunk-YPMUHXYT.js +147 -0
- package/dist/public/chunks/chunk-YYNMZ4WC.js +1 -0
- package/dist/public/chunks/chunk-Z2JPRGFT.js +1 -0
- package/dist/public/chunks/chunk-ZIJ6SJDN.js +1 -0
- package/dist/public/chunks/code-highlighter-Q7WC7AEF.js +12 -0
- package/dist/public/client-TYC7JKRE.js +91 -0
- package/dist/tailwind.css +1 -1
- package/package.json +5 -4
- package/src/api/schema.ts +1 -1
- package/src/assets.ts +4 -1
- package/src/client/App.tsx +100 -23
- package/src/client/TracedRoutes.tsx +8 -4
- package/src/client/code-highlighter.ts +26 -0
- package/src/client/code.tsx +2 -22
- package/src/client/components/Drawer.tsx +12 -71
- package/src/client/components/DrawerContent.tsx +76 -0
- package/src/client/components/ProfileMenu.tsx +12 -3
- package/src/client/components/UserInputForm.tsx +28 -5
- package/src/client/conversations/ConversationCatchUp.tsx +107 -0
- package/src/client/conversations/ConversationContextTags.tsx +110 -0
- package/src/client/conversations/ConversationEventLog.tsx +213 -71
- package/src/client/conversations/ConversationHeader.tsx +35 -41
- package/src/client/conversations/ConversationHeaderActions.tsx +34 -38
- package/src/client/conversations/ConversationHomeList.tsx +41 -3
- package/src/client/conversations/ConversationMeta.tsx +6 -12
- package/src/client/conversations/ConversationOverflowMenu.tsx +15 -4
- package/src/client/conversations/ConversationPage.tsx +188 -150
- package/src/client/conversations/ShareConversationButton.tsx +5 -50
- package/src/client/conversations/SlackMark.tsx +16 -4
- package/src/client/conversations/TranscriptRows.tsx +24 -11
- package/src/client/conversations/TranscriptView.tsx +21 -13
- package/src/client/conversations/conversationArchive.ts +22 -0
- package/src/client/conversations/conversationCatchUpState.ts +96 -0
- package/src/client/conversations/conversationMemory.ts +8 -1
- package/src/client/conversations/queries.ts +11 -3
- package/src/client/conversations/{transcriptUnreadHistory.ts → transcriptAroundHistory.ts} +48 -42
- package/src/client/conversations/transcriptBottomPinning.ts +27 -3
- package/src/client/conversations/transcriptReadPosition.ts +24 -2
- package/src/client/conversations/turnContext.ts +1 -1
- package/src/client/pages/admin/AdminPage.tsx +1 -1
- package/src/client/pages/admin/ServiceAccountsSection.tsx +1 -1
- package/src/client/pages/memory/memoryDashboard.ts +1 -1
- package/src/client/pages/memory/memoryRecord.ts +1 -1
- package/src/client/pages/settings/ConnectionsPage.tsx +1 -1
- package/src/client/pages/user/PluginUserPage.tsx +0 -6
- package/src/client/pages/user/pluginUserPageRoutes.ts +5 -0
- package/src/client/primaryNav.ts +1 -1
- package/src/client/review-desk/reviewItemFormat.ts +1 -1
- package/src/mock-reporting/fixtures.ts +43 -0
- package/src/mock-reporting/routes.ts +40 -3
- package/src/public-assets.ts +28 -20
- package/src/shell.ts +12 -2
- package/dist/public/client-ZCZXZBTL.js +0 -460
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as o}from"./chunk-UT6HZPGL.js";import{a as r}from"./chunk-YYNMZ4WC.js";import{a as i}from"./chunk-GOTQ4D6W.js";import{b as a}from"./chunk-YPMUHXYT.js";import{c as n}from"./chunk-7SZRL6FY.js";var t=n(a(),1);function y(e){return(0,t.jsx)(o,{children:(0,t.jsx)(i,{children:e.children})})}function s(e){return(0,t.jsx)(o,{children:(0,t.jsx)(r,{...e})})}export{y as a,s as b};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{L as x,a as O,c as M,d as L,f as p,g as v,j as S}from"./chunk-YPMUHXYT.js";import{a as F,c as A}from"./chunk-7SZRL6FY.js";var w=F(u=>{"use strict";var z=O();function q(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var c={d:{f:d,r:function(){throw Error(q(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},K=Symbol.for("react.portal");function $(t,e,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:K,key:i==null?null:""+i,children:t,containerInfo:e,implementation:r}}var h=z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function b(t,e){if(t==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c;u.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(q(299));return $(t,e,null,r)};u.flushSync=function(t){var e=h.T,r=c.p;try{if(h.T=null,c.p=2,t)return t()}finally{h.T=e,c.p=r,c.d.f()}};u.preconnect=function(t,e){typeof t=="string"&&(e?(e=e.crossOrigin,e=typeof e=="string"?e==="use-credentials"?e:"":void 0):e=null,c.d.C(t,e))};u.prefetchDNS=function(t){typeof t=="string"&&c.d.D(t)};u.preinit=function(t,e){if(typeof t=="string"&&e&&typeof e.as=="string"){var r=e.as,i=b(r,e.crossOrigin),n=typeof e.integrity=="string"?e.integrity:void 0,s=typeof e.fetchPriority=="string"?e.fetchPriority:void 0;r==="style"?c.d.S(t,typeof e.precedence=="string"?e.precedence:void 0,{crossOrigin:i,integrity:n,fetchPriority:s}):r==="script"&&c.d.X(t,{crossOrigin:i,integrity:n,fetchPriority:s,nonce:typeof e.nonce=="string"?e.nonce:void 0})}};u.preinitModule=function(t,e){if(typeof t=="string")if(typeof e=="object"&&e!==null){if(e.as==null||e.as==="script"){var r=b(e.as,e.crossOrigin);c.d.M(t,{crossOrigin:r,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0})}}else e==null&&c.d.M(t)};u.preload=function(t,e){if(typeof t=="string"&&typeof e=="object"&&e!==null&&typeof e.as=="string"){var r=e.as,i=b(r,e.crossOrigin);c.d.L(t,r,{crossOrigin:i,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,type:typeof e.type=="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy=="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet=="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes=="string"?e.imageSizes:void 0,media:typeof e.media=="string"?e.media:void 0})}};u.preloadModule=function(t,e){if(typeof t=="string")if(e){var r=b(e.as,e.crossOrigin);c.d.m(t,{as:typeof e.as=="string"&&e.as!=="script"?e.as:void 0,crossOrigin:r,integrity:typeof e.integrity=="string"?e.integrity:void 0})}else c.d.m(t)};u.requestFormReset=function(t){c.d.r(t)};u.unstable_batchedUpdates=function(t,e){return t(e)};u.useFormState=function(t,e,r){return h.H.useFormState(t,e,r)};u.useFormStatus=function(){return h.H.useHostTransitionStatus()};u.version="19.2.6"});var Y=F((Q,H)=>{"use strict";function U(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(U)}catch(t){console.error(t)}}U(),H.exports=w()});var B=A(O(),1);function E(t){B.useEffect(t,L)}var T=null,ne=globalThis.requestAnimationFrame,C=class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let r=this.callbacks,i=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,i>0)for(let n=0;n<r.length;n+=1)r[n]?.(e)};request(e){let r=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),r}cancel(e){let r=e-this.startId;r<0||r>=this.callbacks.length||this.callbacks[r]!==null&&(this.callbacks[r]=null,this.callbacksCount-=1)}},R=new C;var f=class t{static create(){return new t}static request(e){return R.request(e)}static cancel(e){return R.cancel(e)}currentId=T;request(e){this.cancel(),this.currentId=R.request(()=>{this.currentId=T,e()})}cancel=()=>{this.currentId!==T&&(R.cancel(this.currentId),this.currentId=T)};disposeEffect=()=>this.cancel};function V(){let t=p(f.create).current;return E(t.disposeEffect),t}var y=0,k=class t{static create(){return new t}currentId=y;start(e,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=y,r()},e)}isStarted(){return this.currentId!==y}clear=()=>{this.currentId!==y&&(clearTimeout(this.currentId),this.currentId=y)};disposeEffect=()=>this.clear};function ue(){let t=p(k.create).current;return E(t.disposeEffect),t}var W=A(O(),1);var N=A(Y(),1);function G(t){return t==null?t:"current"in t?t.current:t}function D(t,e){return t.getAnimations(e).filter(r=>{let i=r.effect?.getTiming();return i?.duration!==1/0&&i?.iterations!==1/0})}var I=null;function X(t){if(!I){let e=[];I=e,queueMicrotask(()=>{I=null,N.flushSync(()=>{for(let r of e)r()})})}I.push(t)}function j(t,e=!1,r=!1){let i=V();return S((n,s=null)=>{i.cancel();let a=G(t);if(a==null)return;let o=a,l=()=>{if(!r){N.flushSync(n);return}X(()=>{s?.aborted||n()})};if(typeof o.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){n();return}function _(){Promise.all(D(o).map(m=>m.finished.then(M))).then(()=>{s?.aborted||l()},()=>{if(s?.aborted)return;if(D(o).some(g=>g.pending||g.playState!=="finished")){_();return}l()})}if(e){let m=x;if(!o.hasAttribute(m)){i.request(_);return}let g=new MutationObserver(()=>{o.hasAttribute(m)||(g.disconnect(),_())});g.observe(o,{attributes:!0,attributeFilter:[m]}),s?.addEventListener("abort",()=>g.disconnect(),{once:!0});return}i.request(_)})}function pe(t){let{enabled:e=!0,open:r,ref:i,batch:n=!1,onComplete:s}=t,a=S(s),o=j(i,r,n);W.useEffect(()=>{if(!e)return;let l=new AbortController;return o(a,l.signal),()=>{l.abort()}},[e,r,a,o])}var P=A(O(),1);function Ee(t,e=!1,r=!1,i=!1){let[n,s]=P.useState(t&&e?"idle":void 0),[a,o]=P.useState(t&&!i);return t&&!a&&(o(!0),s("starting")),!t&&a&&n!=="ending"&&!r&&s("ending"),!t&&!a&&n==="ending"&&s(void 0),v(()=>{if(!t&&a&&n!=="ending"&&r){let l=f.request(()=>{s("ending")});return()=>{f.cancel(l)}}},[t,a,n,r]),v(()=>{if(!t||e||n===void 0)return;let l=f.request(()=>{s(void 0)});return()=>{f.cancel(l)}},[e,t,n]),v(()=>{if(!t||!e)return;t&&a&&n!=="idle"&&s("starting");let l=f.request(()=>{s("idle")});return()=>{f.cancel(l)}},[e,t,a,n]),{mounted:a,setMounted:o,transitionStatus:n}}export{Y as a,E as b,f as c,V as d,k as e,ue as f,G as g,j as h,pe as i,Ee as j};
|
|
2
|
+
/*! Bundled license information:
|
|
3
|
+
|
|
4
|
+
react-dom/cjs/react-dom.production.js:
|
|
5
|
+
(**
|
|
6
|
+
* @license React
|
|
7
|
+
* react-dom.production.js
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the MIT license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
13
|
+
*)
|
|
14
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o,b as a,c as t,e}from"./chunk-VXT3FIVL.js";var r=e({email:o().trim().email(),emailVerified:t().optional(),name:o().nullable().optional()}).strict(),p=e({user:r}).strict(),s=168,c=e({autoArchiveDefault:t().optional(),autoArchiveGraceHours:a().int().positive().optional(),user:r.extend({avatarUrl:o().optional(),isAdmin:t()}).strict()}).strict(),b=e({autoArchiveDefault:t().optional(),autoArchiveGraceHours:a().int().min(1).max(s).optional(),displayName:o().trim().min(1).max(80).optional()}).strict().refine(i=>Object.values(i).some(n=>n!==void 0),"Change at least one setting."),d=e({allowedDomainCount:a(),authRequired:t(),authPath:o(),basePath:o(),sentryConversationLinks:t(),version:o().min(1)}).strict(),m=e({config:d,me:c}).strict();export{s as a,c as b,d as c,m as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as l,b as d}from"./chunk-MTBUV2GJ.js";import{Jc as o,Rc as m,b as a}from"./chunk-YPMUHXYT.js";import{c as i}from"./chunk-7SZRL6FY.js";var e=i(a(),1);function g(r){let t=r.tone==="error";return(0,e.jsxs)(l,{role:t?"alert":"status",className:m("flex min-w-0 rounded-md p-4 has-[>svg]:gap-x-3",t?"border-rose-300/25 bg-rose-300/5 *:[svg]:text-rose-300":"border-amber-300/25 bg-amber-300/5 *:[svg]:text-amber-300"),children:[(0,e.jsx)(o,{"aria-hidden":!0,className:"size-4.5 shrink-0"}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)(d,{children:r.title}),r.children?(0,e.jsx)("div",{className:"mt-1 text-sm leading-relaxed text-dashboard-text-muted",children:r.children}):null]})]})}export{g as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var i={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},e={...i,position:"fixed",margin:0,top:0,left:0},t={...i,position:"absolute"};export{e as a,t as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ia as l,Na as u,Qa as e,Sa as f,a as B,b}from"./chunk-YPMUHXYT.js";import{c as o}from"./chunk-7SZRL6FY.js";var h=o(B(),1);var s=h.forwardRef(function(t,r){let{render:i,className:y,disabled:n=!1,focusableWhenDisabled:v=!1,nativeButton:m=!0,style:z,...x}=t,{getButtonProps:p,buttonRef:g}=u({disabled:n,focusableWhenDisabled:v,native:m});return l("button",t,{state:{disabled:n},ref:[r,g],props:[x,p]})});var c=o(b(),1),a="inline-flex h-9 max-w-full items-center justify-center gap-2 rounded-md border px-3 text-sm font-medium leading-none focus-visible:outline-2 focus-visible:outline-offset-2",N=f("cursor-pointer font-sans no-underline transition-colors data-disabled:cursor-not-allowed data-disabled:opacity-50",{variants:{variant:{default:"",primary:"",quiet:"",danger:""},size:{default:"",icon:"grid size-9 place-items-center rounded-md border-0 bg-transparent p-0 text-dashboard-text-muted focus-visible:outline-2 focus-visible:outline-offset-1 data-disabled:hover:!bg-transparent data-disabled:hover:!text-dashboard-text-muted",menu:"flex w-full items-center gap-2.5 rounded-md border-0 bg-transparent px-2.5 py-2 text-left text-sm font-semibold text-dashboard-text hover:bg-dashboard-fill-strong focus-visible:bg-dashboard-fill-strong focus-visible:outline-none data-disabled:hover:bg-transparent"}},compoundVariants:[{size:"default",variant:"default",className:e(a,"border-dashboard-border-emphasis bg-dashboard-surface-raised text-dashboard-text hover:border-dashboard-border-heavy hover:bg-dashboard-surface-hover hover:text-dashboard-text focus-visible:outline-dashboard-focus data-disabled:hover:border-dashboard-border-emphasis data-disabled:hover:bg-dashboard-surface-raised data-disabled:hover:text-dashboard-text")},{size:"default",variant:"primary",className:e(a,"border-dashboard-text-solid bg-dashboard-text-solid text-dashboard-text-inverse hover:border-dashboard-text-subtle hover:bg-dashboard-text-subtle focus-visible:outline-dashboard-focus data-disabled:hover:border-dashboard-text-solid data-disabled:hover:bg-dashboard-text-solid")},{size:"default",variant:"quiet",className:e(a,"border-transparent bg-transparent text-dashboard-text-muted hover:bg-dashboard-fill-strong hover:text-dashboard-text focus-visible:outline-dashboard-focus data-disabled:hover:bg-transparent data-disabled:hover:text-dashboard-text-muted")},{size:"default",variant:"danger",className:e(a,"border-dashboard-border-strong bg-transparent text-dashboard-text-muted hover:border-rose-300/40 hover:text-rose-300 focus-visible:outline-rose-300/55 data-disabled:hover:border-dashboard-border-strong data-disabled:hover:text-dashboard-text-muted")},{size:"icon",variant:["default","primary"],className:"hover:!bg-dashboard-fill-strong hover:!text-dashboard-text focus-visible:outline-dashboard-focus"},{size:"icon",variant:"danger",className:"hover:!bg-rose-300/10 hover:!text-rose-300 focus-visible:outline-rose-300/55"}],defaultVariants:{variant:"default",size:"default"}});function W({className:d,variant:t="default",size:r="default",...i}){return(0,c.jsx)(s,{"data-slot":"button",className:e(N({variant:t,size:r}),d),...i})}export{N as a,W as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s}from"./chunk-L2H3ZWZN.js";import{b as l}from"./chunk-QPBLZSNX.js";import{a}from"./chunk-GOTQ4D6W.js";import{M as o}from"./chunk-6PHJZPWD.js";import{b as n}from"./chunk-YPMUHXYT.js";import{c as i}from"./chunk-7SZRL6FY.js";var t=i(n(),1),r=[{end:!0,label:"General",to:"/settings"},{label:"API Tokens",to:"/settings/api-tokens"},{label:"Identities",to:"/settings/connections"},{label:"MCP",to:"/settings/mcp"}];function p(e){return(0,t.jsx)(a,{children:(0,t.jsxs)("div",{className:"grid w-full max-w-3xl min-w-0 gap-8",children:[(0,t.jsx)(o,{documentTitle:e.title,navigation:(0,t.jsx)(l,{ariaLabel:"Settings navigation",items:r}),title:"Settings"}),(0,t.jsxs)("section",{className:"grid min-w-0 gap-5",children:[(0,t.jsx)(s,{description:e.description,title:e.title}),e.children]})]})})}export{p as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ja as d}from"./chunk-VXT3FIVL.js";import{Qa as l,Rc as i,b as o}from"./chunk-YPMUHXYT.js";import{c as n}from"./chunk-7SZRL6FY.js";var c=n(o(),1);function m({className:a,...s}){return(0,c.jsx)("div",{"aria-hidden":"true","data-slot":"skeleton",className:l("animate-pulse rounded-md bg-dashboard-fill-soft motion-reduce:animate-none",a),...s})}var e=n(o(),1);function w(a){let s=a.variant??"panel";return(0,e.jsxs)("div",{"aria-busy":"true","aria-live":"polite",className:i("grid gap-4",a.className),role:"status",children:[(0,e.jsx)("span",{className:"sr-only",children:a.label}),b(s)]})}function b(a){switch(a){case"stats":return(0,e.jsx)(u,{});case"overview":return(0,e.jsx)(f,{});case"list":return(0,e.jsx)(g,{});case"library":return(0,e.jsx)(N,{});case"panel":return(0,e.jsx)(r,{className:"min-h-64"})}}function u(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:Array.from({length:4},(a,s)=>(0,e.jsx)(r,{className:"min-h-[7.5rem] p-4 sm:min-h-32 sm:p-5"},s))}),(0,e.jsx)(r,{className:"min-h-[17rem]"})]})}function f(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"grid gap-4 xl:grid-cols-2",children:[(0,e.jsx)(r,{className:"min-h-[17rem]"}),(0,e.jsx)(r,{className:"min-h-[17rem]"})]}),(0,e.jsx)(t,{className:"h-24 border-y border-dashboard-border-subtle bg-dashboard-fill-faint"}),(0,e.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,e.jsx)(r,{className:"min-h-56"}),(0,e.jsx)(r,{className:"min-h-56"})]})]})}function g(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(r,{className:"min-h-20 p-4"}),(0,e.jsx)(t,{className:"h-10 border-b border-dashboard-border-subtle"}),(0,e.jsx)(r,{className:"min-h-80"})]})}function N(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[(0,e.jsx)(t,{className:"h-7 w-56 rounded-md bg-dashboard-fill-soft"}),(0,e.jsx)(t,{className:"h-10 w-full max-w-md rounded-lg border border-dashboard-border-subtle bg-dashboard-fill-faint sm:w-72"})]}),(0,e.jsx)("div",{"aria-hidden":"true",className:"grid min-w-0 grid-cols-3 gap-1 border-b border-dashboard-border-subtle sm:flex",children:Array.from({length:3},(a,s)=>(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2 px-3 py-2.5 sm:justify-start",children:[(0,e.jsx)(t,{className:"h-3 w-12 rounded-md bg-dashboard-fill-soft"}),(0,e.jsx)(t,{className:"h-5 w-8 rounded-sm border border-dashboard-border-subtle bg-dashboard-fill-faint"})]},s))}),(0,e.jsx)(r,{className:"min-h-80"})]})}function r(a){return(0,e.jsx)(d,{className:i("animate-pulse motion-reduce:animate-none",a.className),children:(0,e.jsx)("span",{"aria-hidden":"true"})})}function t(a){return(0,e.jsx)(m,{className:a.className})}export{m as a,w as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as je}from"./chunk-IZWTFLCC.js";import{A as Ge,D as Se,H as Ce,I as ze,J as Ye,a as Dt,j as L,o as $e,p as Ue,x as Be,y as Ae}from"./chunk-YPMUHXYT.js";import{c as Et}from"./chunk-7SZRL6FY.js";function qe(c,u=Number.MIN_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER){return Math.max(u,Math.min(c,l))}function bt(c,u=!1){let{overflowY:l}=Ae(c);return l!=="auto"&&l!=="scroll"?!1:u?c.clientHeight>0:c.scrollHeight>c.clientHeight}function Pt(c,u=!1){let{overflowX:l}=Ae(c);return l!=="auto"&&l!=="scroll"?!1:u?c.clientWidth>0:c.scrollWidth>c.clientWidth}function Je(c,u,l=!1){return u==="vertical"?bt(c,l):Pt(c,l)}function Xe(c,u,l,h=!1){let f=c;for(;$e(f)&&f!==u&&!Be(f);){if(Ue(f)&&Je(f,l,h))return f;f=Ge(f)}return null}function Ke(c,u,l="vertical",h=!1){return Xe(c,u,l,h)??(Je(u,l,h)?u:null)}function Qe(c,u,l){return typeof c?.elementFromPoint=="function"?c.elementFromPoint(u,l):null}var i=Et(Dt(),1);var Mt=40,At=10,Ct=50,Ze=4,Yt=80,we=1,Xt='button,a,input,select,textarea,label,[role="button"]';function Te(c,u,l){switch(c){case"up":return-l;case"down":return l;case"left":return-u;case"right":return u;default:return 0}}function Ee(c){return Number.isFinite(c)&&c>0?c:null}function et(c,u){return`translate3d(${c.x}px,${c.y}px,0) scale(${u})`}function _t(c){return c%2===1}function _e(c,u,l){let h=c[l];if(typeof h=="function")try{h.call(c,u)}catch(f){if(f&&typeof f=="object"&&"name"in f&&f.name==="NotFoundError")return;throw f}}function Ut(c){let{enabled:u,directions:l,elementRef:h,movementCssVars:f,canStart:se,ignoreSelectorWhenTouch:tt=!0,ignoreScrollableAncestors:rt=!1,swipeThreshold:ie,onDismiss:nt,onProgress:ct,onCancel:ot,onSwipeStart:st,onRelease:it,onSwipingChange:ut,trackDrag:Ie=!0}=c,lt=Xt,$=l.length===1?l[0]:void 0,ue=Math.max(0,typeof ie=="number"?ie:Mt),U=l.includes("left"),B=l.includes("right"),G=l.includes("up"),z=l.includes("down"),le=U||B,De=G||z,Le=le?"horizontal":"vertical",[at,N]=i.useState(void 0),[Ne,ft]=i.useState(!1),[be,Fe]=i.useState(!1),V=i.useRef({x:0,y:0}),E=i.useRef({x:0,y:0}),H=i.useRef(null),w=i.useRef({x:0,y:0,scale:1}),D=i.useRef(void 0),ae=i.useRef(0),j=i.useRef(!1),x=i.useRef({x:0,y:0}),q=i.useRef(!1),fe=i.useRef(!1),de=i.useRef(null),F=i.useRef(!1),k=i.useRef(!1),pe=i.useRef({width:0,height:0}),ve=i.useRef(0),J=i.useRef(ue),Pe=i.useRef(null),K=i.useRef(null),W=i.useRef(null),Q=i.useRef(!1),Z=i.useRef({x:0,y:0}),me=i.useRef(null),v=i.useRef(!1),he=i.useRef(null),ee=L(e=>{v.current!==e&&(v.current=e,ft(e),ut?.(e))});function Oe(e){if(!e)return;let t=h.current,r=Pe.current;if(!t||!r)return;let o=r({element:t,direction:e});J.current=Math.max(0,o)}let C=L((e,t)=>{let r=Number.isFinite(e)?qe(e,0,1):0,o=r!==ve.current,n=!1;if(t){let s=me.current;n=!s||s.deltaX!==t.deltaX||s.deltaY!==t.deltaY||s.direction!==t.direction}!o&&!n||(ve.current=r,t?me.current=t:o&&(me.current=null),ct?.(r,t))}),Y=L(e=>{let t=h.current;if(!Ie||!t){e||(he.current=null);return}let r=t.style,o=he.current;e?(o||(he.current=[r.transition,r.transform]),r.transition="none"):o&&([r.transition,r.transform]=o,he.current=null);let n=E.current,s=w.current,a=n.x-s.x,d=n.y-s.y;e&&(r.transform=et(n,s.scale)),r.setProperty(f.x,`${a}px`),r.setProperty(f.y,`${d}px`)});function Ve(e,t){if(t===null)return;let r=W.current;if(r&&t>r.time){let o=Math.abs(e.x-r.x)<we&&Math.abs(e.y-r.y)<we,n=o&&!Q.current;if(Q.current=o,n)return;let s=Math.max(t-r.time,Ze);Z.current={x:(e.x-r.x)/s,y:(e.y-r.y)/s}}W.current={x:e.x,y:e.y,time:t}}let dt=i.useCallback(()=>{N(void 0),ee(!1),Fe(!1),C(0),J.current=ue,Pe.current=null,V.current={x:0,y:0},E.current={x:0,y:0},w.current={x:0,y:0,scale:1},D.current=void 0,ae.current=0,j.current=!1,x.current={x:0,y:0},q.current=!1,H.current=null,fe.current=!1,de.current=null,F.current=!1,k.current=!1,pe.current={width:0,height:0},K.current=null,W.current=null,Q.current=!1,Z.current={x:0,y:0},me.current=null,Y(!1)},[ee,ue,Y,C]);function He(e){if("touches"in e){let t=e.touches[0];return t?{x:t.clientX,y:t.clientY}:null}return{x:e.clientX,y:e.clientY}}function ye(e){return"touches"in e?!0:e.pointerType==="touch"}function ke(e,t){let r=h.current?.getRootNode();return Qe(r,e.x,e.y)??Ye(t)}function Me(e,t){return(o=>{let n=Ke(e,t,o),s=Se(n);return n===s.body||n===s.documentElement?null:n})(Le)}function We(e,t,r){F.current=!1;let o=ye(e),n=ke(t,e.nativeEvent),a=Se(h.current).body,d=o&&a?Me(n,a):null,y=r?.ignoreScrollableTarget??!1;if(d&&!y||(F.current=!!(d&&y),ze(n,lt)&&(!o||tt)))return!1;let m=h.current;if(rt&&m&&n&&!(r?.ignoreScrollableAncestors??!1)&&Xe(n,m,Le)!=null)return!1;if(j.current=!1,D.current=void 0,ae.current=0,V.current=t,K.current=Ee(e.timeStamp),W.current=null,Q.current=!1,Z.current={x:0,y:0},x.current=t,H.current=t,J.current=ue,Pe.current=typeof ie=="function"?ie:null,m){pe.current={width:m.offsetWidth,height:m.offsetHeight},Oe($);let S=je(m);w.current=S,E.current={x:S.x,y:S.y},Ve({x:S.x,y:S.y},K.current),"touches"in e||_e(m,e.pointerId,"setPointerCapture")}return st?.(e.nativeEvent),ee(!0),q.current=!0,C(0),Y(!0),!0}function ge(){Re(),F.current=!1,H.current=null}function Re(){fe.current=!1,de.current=null}function pt(e){if(ge(),!v.current)return;ee(!1);let t=w.current;E.current={x:t.x,y:t.y},N(void 0),k.current=!1,Y(!1);let r=h.current;r&&_e(r,e.pointerId,"releasePointerCapture"),C(0,{deltaX:0,deltaY:0,direction:void 0}),ot?.(e.nativeEvent)}function mt(e,t){let r=a=>Math.sign(a)*Math.abs(a)**.5,o=(a,d,y)=>!d&&a<0||!y&&a>0?r(a):a,n=le?o(e,U,B):r(e),s=De?o(t,G,z):r(t);return{x:n,y:s}}function ht(e,t,r){let o=(n,s,a,d,y)=>n>0&&s<=0&&d||n<0&&s>=Math.max(0,a)&&y;return De&&r!==0?o(r,e.scrollTop,e.scrollHeight-e.clientHeight,z,G):le&&t!==0?o(t,e.scrollLeft,e.scrollWidth-e.clientWidth,B,U):null}let xe=L(e=>{if(!u||e.defaultPrevented||e.nativeEvent.defaultPrevented||!("touches"in e)&&e.button!==0)return;let t=He(e);!t||(fe.current=!0,de.current=t,F.current=!1,k.current=!("touches"in e),!(se?se(t,{nativeEvent:e.nativeEvent,direction:$}):!0))||We(e,t)&&Re()});function yt(e,t,r){if(!u||!v.current)return;let o=Ye(e.nativeEvent);if(ye(e)&&!F.current){let R=e.currentTarget;if(Me(o,R))return}if("touches"in e||e.preventDefault(),q.current&&(q.current=!1,Ie)){V.current=t;let R=Ee(e.timeStamp);R!==null&&(K.current=R),W.current=null,Q.current=!1}let n=t.x,s=t.y,a=r.x,d=r.y;(d<0&&s>x.current.y||d>0&&s<x.current.y)&&(x.current={x:x.current.x,y:s}),(a<0&&n>x.current.x||a>0&&n<x.current.x)&&(x.current={x:n,y:x.current.y});let y=n-V.current.x,g=s-V.current.y,m=s-x.current.y,S=n-x.current.x,p;if(!D.current)Math.abs(y)>=Math.abs(g)?p=y>0?"right":"left":p=g>0?"down":"up",p&&(p==="left"&&U||p==="right"&&B||p==="up"&&G||p==="down"&&z)&&(D.current=p,ae.current=Te(p,y,g),N(p),Oe(p));else{let R=D.current,I=Te(R,S,m);I>J.current?(j.current=!1,N(R)):!(U&&B)&&!(G&&z)&&ae.current-I>=At&&(j.current=!0)}let P=mt(y,g),M=w.current.x,T=w.current.y;le&&(M+=P.x),De&&(T+=P.y);let A=E.current,O=M!==A.x||T!==A.y;E.current={x:M,y:T},O&&Y(!0),Ve({x:M,y:T},Ee(e.timeStamp));let re=M-w.current.x,ne=T-w.current.y,ce={deltaX:re,deltaY:ne,direction:D.current},_=0,b=$??D.current;if(b){let R=b==="left"||b==="right"?pe.current.width:pe.current.height,I=w.current.scale||1,oe=Te(b,re,ne);R>0&&I>0&&oe>0&&(_=oe/(R*I))}C(_,ce)}let X=L(e=>{if(!u)return;let t=E.current,r=w.current,o=t.x-r.x,n=t.y-r.y,s={deltaX:o,deltaY:n,direction:D.current};if(!v.current){ge(),C(0,s);return}ee(!1),ge(),k.current=!1;let a=h.current;a&&("touches"in e||_e(a,e.pointerId,"releasePointerCapture"));let d=o,y=n,g=K.current,m=Ee(e.timeStamp),S=g!==null&&m!==null&&m>g?m-g:0,p=S>0?Math.max(S,Ct):0,P=p>0?d/p:0,M=p>0?y/p:0,T=Z.current.x,A=Z.current.y,O=W.current;if(O&&m!==null&&m>=O.time){let b=m-O.time;if(b<=Yt){let R=Math.max(b,Ze),I=t.x-O.x,oe=t.y-O.y,wt=I/R,Tt=oe/R;Math.abs(I)>=we&&(T=wt),Math.abs(oe)>=we&&(A=Tt)}else T=0,A=0}let re=it?.({event:e.nativeEvent,direction:D.current,deltaX:d,deltaY:y,velocityX:P,velocityY:M,releaseVelocityX:T,releaseVelocityY:A}),ne=typeof re=="boolean";if(j.current&&!ne){E.current={x:r.x,y:r.y},N(void 0),Y(!1),C(0,s);return}let ce=!1,_;if(ne)ce=re,_=D.current??$;else for(let b of l)if(Te(b,d,y)>J.current){ce=!0,_=b;break}ce&&_?(N(_),Fe(!0),Y(!1),nt?.(e.nativeEvent,{direction:_})):(E.current={x:r.x,y:r.y},N(void 0),Y(!1),C(0,s))}),te=L(e=>{let t=He(e);if(!t)return;let r=!1;if(!("touches"in e)){let s=_t(e.buttons);if(s&&(k.current=!0),e.buttons!==0&&!s){pt(e);return}if(e.buttons===0&&k.current){if(!v.current){X(e);return}r=!0}}if(!Ne&&fe.current){if(!ye(e)&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)){ge();return}if(se?se(t,{nativeEvent:e.nativeEvent,direction:$}):!0){let a=de.current,d=!1;if(ye(e)){let g=h.current;if(a&&g){let m=ke(t,e.nativeEvent),p=Se(g).body,P=p?Me(m,p):null;if(P&&(Ce(g,P)||Ce(P,g))){let M=t.x-a.x,T=t.y-a.y,A=ht(P,M,T);if(A===!1)return;A===!0&&(d=!0)}}}We(e,t,{ignoreScrollableTarget:d,ignoreScrollableAncestors:d})&&(a&&d?(Re(),V.current=a,x.current=a,H.current=a,q.current=!1):(Re(),F.current=!1))}}let o=H.current,n=o===null?{x:0,y:0}:{x:t.x-o.x,y:t.y-o.y};H.current=t,yt(e,t,n),r&&!("touches"in e)&&X(e)}),gt=L((e,t)=>{te({touches:e.touches,currentTarget:t,nativeEvent:e,defaultPrevented:e.defaultPrevented,timeStamp:e.timeStamp})}),Rt=i.useCallback(()=>{let e=v.current,t=E.current,r=w.current,o=t.x-r.x,n=t.y-r.y;return!e&&o===0&&n===0&&!be?{[f.x]:"0px",[f.y]:"0px"}:{transition:e?"none":void 0,transform:e?et(t,r.scale):void 0,[f.x]:`${o}px`,[f.y]:`${n}px`}},[be,f]),xt=i.useCallback(()=>u?{onPointerDown:xe,onPointerMove:te,onPointerUp:X,onPointerCancel:X}:{},[u,X,te,xe]),St=i.useCallback(()=>u?{onTouchStart:xe,onTouchMove:te,onTouchEnd:X,onTouchCancel:X}:{},[u,X,te,xe]);return{swiping:Ne,swipeDirection:at,dragDismissed:be,getPointerProps:xt,getTouchProps:St,moveNative:gt,getDragStyles:Rt,reset:dt}}export{qe as a,Ke as b,Qe as c,Te as d,Ut as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as q,i as H,j as J}from"./chunk-B5ZN3SWQ.js";import{Ia as g,N as G,Qa as y,a as S,b as I,c as D,g as p,h as $,j}from"./chunk-YPMUHXYT.js";import{b as lt,c as d}from"./chunk-7SZRL6FY.js";var b={};lt(b,{Fallback:()=>tt,Image:()=>Z,Root:()=>Q});var A=d(S(),1);var z=d(S(),1),V=z.createContext(void 0);function P(){let t=z.useContext(V);if(t===void 0)throw new Error($(13));return t}var v={imageLoadingStatus:()=>null};var K=d(I(),1),Q=A.forwardRef(function(e,r){let{className:f,render:c,style:l,...o}=e,[n,s]=A.useState("idle"),a={imageLoadingStatus:n},i=A.useMemo(()=>({imageLoadingStatus:n,setImageLoadingStatus:s}),[n,s]),m=g("span",e,{state:a,ref:r,props:o,stateAttributesMapping:v});return(0,K.jsx)(V.Provider,{value:i,children:m})});var h=d(S(),1);var X=d(S(),1);function Y(t,{referrerPolicy:e,crossOrigin:r,sizes:f,srcSet:c},l){let o=X.useState("idle"),n=o[1];return p(()=>{if(!l)return D;if(!t&&!c)return n("error"),D;let s=!0,a=new window.Image,i=m=>()=>{s&&n(m)};return n("loading"),a.onload=i("loaded"),a.onerror=i("error"),e&&(a.referrerPolicy=e),a.crossOrigin=r??null,f&&(a.sizes=f),c&&(a.srcset=c),t&&(a.src=t),a.complete&&n(a.naturalWidth>0?"loaded":"error"),()=>{s=!1}},[l,t,c,f,r,e,n]),o}var mt={...v,...G},Z=h.forwardRef(function(e,r){let{className:f,render:c,onLoadingStatusChange:l,keepMounted:o=!1,style:n,sizes:s,srcSet:a,src:i,...m}=e,{setImageLoadingStatus:C}=P(),[u,x]=Y(i,e,!o),E=u==="loaded",{mounted:ot,transitionStatus:_,setMounted:w}=J(E),F=h.useRef(null),U=h.useRef(!0);p(()=>{if(!o)return;let k=U.current;U.current=!1;let O=F.current;if(!O)return;if(!O.complete){x("loading");return}let W=O.naturalWidth>0?"loaded":"error";x(W),W==="loaded"&&k&&w(!0)},[o,i,a,s,m.crossOrigin,m.referrerPolicy,c,x,w]);let nt=o?{"data-loading":u==="loading"?"":void 0,"data-error":u==="error"?"":void 0,"aria-hidden":u!=="loaded"||void 0,onLoad(){x("loaded")},onError(){x("error")}}:void 0,B=j(k=>{l?.(k),C(k)});p(()=>{u!=="idle"&&B(u)},[u,B]),p(()=>()=>C("idle"),[C]),H({enabled:!E,open:E,ref:F,onComplete(){E||w(!1)}});let st={imageLoadingStatus:u,transitionStatus:o&&_==="ending"?void 0:_},T=o||ot,L={};s!==void 0&&(L.sizes=s),a!==void 0&&(L.srcSet=a),i!==void 0&&(L.src=i);let it=g("img",e,{state:st,ref:[r,F],props:[nt,m,L],stateAttributesMapping:mt,enabled:T});return T?it:null});var R=d(S(),1);var tt=R.forwardRef(function(e,r){let{className:f,render:c,delay:l=0,style:o,...n}=e,{imageLoadingStatus:s}=P(),[a,i]=R.useState(l===0),m=q();return R.useEffect(()=>(l>0?m.start(l,()=>i(!0)):i(!0),m.clear),[m,l]),g("span",e,{state:{imageLoadingStatus:s},ref:r,props:n,stateAttributesMapping:v,enabled:s!=="loaded"&&(l===0||a)})});var M=d(I(),1);function et({className:t,size:e="default",...r}){return(0,M.jsx)(b.Root,{"data-slot":"avatar","data-size":e,className:y("group/avatar relative inline-grid size-7 shrink-0 place-items-center overflow-hidden rounded-full border-2 border-dashboard-bg bg-dashboard-focus shadow-sm select-none data-[size=sm]:size-6",t),...r})}function at({className:t,...e}){return(0,M.jsx)(b.Image,{"data-slot":"avatar-image",className:y("size-full object-cover",t),...e})}function rt({className:t,...e}){return(0,M.jsx)(b.Fallback,{"data-slot":"avatar-fallback",className:y("grid size-full place-items-center font-sans text-xs leading-none font-semibold tracking-tight text-dashboard-text-inverse group-data-[size=sm]/avatar:text-2xs",t),...e})}var N=d(I(),1);function jt(t){let e=t.name.trim().split(/\s+/).filter(Boolean),r=t.size==="list"?t.name.trim().slice(0,1):e.length>1?`${e[0][0]}${e.at(-1)[0]}`:t.name.slice(0,2);return(0,N.jsxs)(et,{"aria-hidden":"true",size:t.size==="list"?"sm":"default",children:[(0,N.jsx)(at,{alt:"User avatar",loading:"lazy",referrerPolicy:"no-referrer",src:t.imageUrl}),(0,N.jsx)(rt,{children:r.toUpperCase()})]})}export{et as a,at as b,rt as c,jt as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as ve,E as De,F as Re,I as Ce,J as xe,L as Oe,O as Ee,P as Pe,Q as ke,R as Te,S as Ne,T as ee,U as Be,V as Ie,W as Le,d as le,e as ce,g as pe,ia as Me,k as be,m as we,s as Se}from"./chunk-WRXMQB7X.js";import{c as de,e as Z}from"./chunk-B5ZN3SWQ.js";import{D as L,F as H,H as fe,Ia as C,J as me,N as ge,Na as G,O as R,Oa as M,P as he,Pa as V,Qc as Y,R as ye,a as g,b as Q,g as _,h as I,j as ae,l as W,r as ue}from"./chunk-YPMUHXYT.js";import{c as f}from"./chunk-7SZRL6FY.js";var x=f(g(),1);function ut(){let e=0,t;return{acquire(){if(!(typeof document>"u")){if(e===0){let o=document.documentElement,r=document.body,n=typeof window>"u"?0:window.scrollX||window.pageXOffset||0,i=typeof window>"u"?0:window.scrollY||window.pageYOffset||0;t={bodyHeight:r.style.height,bodyLeft:r.style.left,bodyOverflow:r.style.overflow,bodyOverscroll:r.style.overscrollBehavior,bodyPosition:r.style.position,bodyRight:r.style.right,bodyTop:r.style.top,bodyWidth:r.style.width,htmlHeight:o.style.height,htmlOverflow:o.style.overflow,htmlOverscroll:o.style.overscrollBehavior,scrollX:n,scrollY:i},o.style.overflow="hidden",o.style.overscrollBehavior="none",o.style.height="100%",r.style.overflow="hidden",r.style.overscrollBehavior="none",r.style.position="fixed",r.style.top=`-${i}px`,r.style.left=`-${n}px`,r.style.right="0",r.style.width="100%",r.style.height="100%"}e+=1}},release(){if(typeof document>"u"||e===0||(e=Math.max(0,e-1),e>0||t===void 0))return;let o=document.documentElement,r=document.body;o.style.overflow=t.htmlOverflow,o.style.overscrollBehavior=t.htmlOverscroll,o.style.height=t.htmlHeight,r.style.overflow=t.bodyOverflow,r.style.overscrollBehavior=t.bodyOverscroll,r.style.position=t.bodyPosition,r.style.top=t.bodyTop,r.style.left=t.bodyLeft,r.style.right=t.bodyRight,r.style.width=t.bodyWidth,r.style.height=t.bodyHeight;let{scrollX:n,scrollY:i}=t;t=void 0,typeof window<"u"&&window.scrollTo(n,i)}}}var Ve=ut();function Ye(){Ve.acquire()}function _e(){Ve.release()}function pt(e){let t=new MutationObserver(e);return t.observe(document.body,{childList:!0,subtree:!0}),()=>t.disconnect()}function St(e,t){let[o,r]=(0,x.useState)(!1),n=(0,x.useRef)(!1),i=(0,x.useRef)(null),s=(0,x.useSyncExternalStore)(pt,()=>{let l=document.querySelectorAll("[data-dashboard-modal]"),c=l[l.length-1];return i.current?c===i.current:!c},()=>!0);return(0,x.useEffect)(()=>(Ye(),r(!0),_e),[]),{rootProps:{open:o,modal:s?"trap-focus":!1,disablePointerDismissal:!s,onOpenChange(l,c){if(!l&&!s){c.cancel();return}n.current=!l,r(l)},onOpenChangeComplete(l){!l&&n.current&&e()}},contentProps:{ref:i,"aria-modal":s?!0:void 0,finalFocus:()=>!!(n.current&&s),initialFocus:()=>{let l=document.querySelectorAll("[data-dashboard-modal]");return l[l.length-1]!==i.current?!1:t?.current??!0}}}}var He=f(g(),1);var $=f(g(),1),te=$.createContext(void 0);function y(e){let t=$.useContext(te);if(!e&&t===void 0)throw new Error(I(27));return t}var kt=He.forwardRef(function(t,o){let{render:r,className:n,style:i,disabled:s=!1,nativeButton:l=!0,...c}=t,a=y(),m=a.useState("open"),{getButtonProps:h,buttonRef:S}=G({disabled:s,native:l}),b={disabled:s};function u(p){m&&a.setOpen(!1,M(V.closePress,p.nativeEvent))}return C("button",t,{state:b,ref:[o,S],props:[{onClick:u},c,h]})});var Ae=f(g(),1);var Lt=Ae.forwardRef(function(t,o){let{render:r,className:n,style:i,id:s,...l}=t,c=y(),a=Y(s);return c.useSyncedValueWithCleanup("descriptionElementId",a),C("p",t,{ref:o,props:[{id:a},l]})});var Yt=R.open,_t=R.closed,Ht=R.startingStyle,At=R.endingStyle;var Xe="data-nested-dialog-open";var Ue=f(g(),1);var U=f(g(),1),oe=U.createContext(void 0);function je(){let e=U.useContext(oe);if(e===void 0)throw new Error(I(26));return e}var We=f(g(),1),Ge=f(Q(),1),$e=We.forwardRef(function(t,o){let{cutout:r,...n}=t,i;if(r){let s=r.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${s.left}px ${s.top}px,${s.left}px ${s.bottom}px,${s.right}px ${s.bottom}px,${s.right}px ${s.top}px,${s.left}px ${s.top}px)`}return(0,Ge.jsx)("div",{ref:o,role:"presentation","data-base-ui-inert":"",...n,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})});var A=f(Q(),1),zt=Ue.forwardRef(function(t,o){let{keepMounted:r=!1,...n}=t,i=y(),s=i.useState("mounted"),l=i.useState("modal"),c=i.useState("open");return s||r?(0,A.jsx)(oe.Provider,{value:r,children:(0,A.jsxs)(Se,{ref:o,...n,children:[s&&l===!0&&(0,A.jsx)($e,{ref:i.context.internalBackdropRef,inert:be(!c)}),t.children]})}):null});var qe=f(g(),1);var Fe={...ye,...ge,nestedDialogOpen(e){return e?{[Xe]:""}:null}};var no=qe.forwardRef(function(t,o){let{render:r,className:n,style:i,children:s,...l}=t,c=je(),a=y(),m=a.useState("open"),h=a.useState("nested"),S=a.useState("transitionStatus"),b=a.useState("nestedOpenDialogCount"),u=a.useState("mounted"),p=a.useStateSetter("viewportElement"),w=b>0;return C("div",t,{enabled:c||u,state:{open:m,nested:h,transitionStatus:S,nestedDialogOpen:w},ref:[o,p],stateAttributesMapping:Fe,props:[{role:"presentation",hidden:!u,style:{pointerEvents:m?void 0:"none"},children:s},l]})});var ze=f(g(),1);var co=ze.forwardRef(function(t,o){let{render:r,className:n,style:i,id:s,...l}=t,c=y(),a=Y(s);return c.useSyncedValueWithCleanup("titleElementId",a),C("h2",t,{ref:o,props:[{id:a},l]})});var fo=R.open,mo=R.closed,go=R.startingStyle,ho=R.endingStyle;var yo="data-nested-dialog-open";var it=f(g(),1);var ne=f(g(),1);var Ke={},Je={},Qe="";function F(e,t){return ue(e)?e:t}function Ze(e,t,o){return/hidden|clip/.test(e.getComputedStyle(F(t,o)).overflowY)}function ft(e){if(typeof document>"u")return!1;let t=L(e);return W(t).innerWidth-t.documentElement.clientWidth>0}function mt(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;let o=L(e),r=o.documentElement,n=o.body,i=F(r,n),s=i.style.overflowY,l=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",i.style.overflowY="scroll";let c=i.offsetWidth;i.style.overflowY="hidden";let a=i.offsetWidth;return i.style.overflowY=s,r.style.scrollbarGutter=l,c===a}function gt(e){let t=L(e),o=t.documentElement,r=t.body,n=F(o,r),i={overflowY:n.style.overflowY,overflowX:n.style.overflowX};return Object.assign(n.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(n.style,i)}}function ht(e){let t=L(e),o=t.documentElement,r=t.body,n=W(o),i=0,s=0,l=!1,c=de.create();if(H.engine.webkit&&(n.visualViewport?.scale??1)!==1)return()=>{};function a(){let b=n.getComputedStyle(o),u=n.getComputedStyle(r),v=(b.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=o.scrollTop,s=o.scrollLeft,Ke={scrollbarGutter:o.style.scrollbarGutter,overflowY:o.style.overflowY,overflowX:o.style.overflowX},Qe=o.style.scrollBehavior,Je={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 D=o.scrollHeight>o.clientHeight,P=o.scrollWidth>o.clientWidth,k=b.overflowY==="scroll"||u.overflowY==="scroll",d=b.overflowX==="scroll"||u.overflowX==="scroll",O=Math.max(0,n.innerWidth-r.clientWidth),T=Math.max(0,n.innerHeight-r.clientHeight),N=parseFloat(u.marginTop)+parseFloat(u.marginBottom),E=parseFloat(u.marginLeft)+parseFloat(u.marginRight),B=F(o,r);if(l=mt(e),l){o.style.scrollbarGutter=v,B.style.overflowY="hidden",B.style.overflowX="hidden";return}Object.assign(o.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(D||k)&&(o.style.overflowY="scroll"),(P||d)&&(o.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:N||T?`calc(100dvh - ${N+T}px)`:"100dvh",width:E||O?`calc(100vw - ${E+O}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=s,o.setAttribute("data-base-ui-scroll-locked",""),o.style.scrollBehavior="unset"}function m(){Object.assign(o.style,Ke),Object.assign(r.style,Je),l||(o.scrollTop=i,o.scrollLeft=s,o.removeAttribute("data-base-ui-scroll-locked"),o.style.scrollBehavior=Qe)}function h(){m(),c.request(a)}a();let S=pe(n,"resize",h);return()=>{c.cancel(),m(),typeof n.removeEventListener=="function"&&S()}}var re=class{lockCount=0;restore=null;timeoutLock=Z.create();timeoutUnlock=Z.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;let o=L(t),r=o.documentElement,n=o.body,i=W(r);if(Ze(i,r,n)){let l=new i.MutationObserver(()=>{Ze(i,r,n)||(l.disconnect(),this.restore=null,this.lock(t))}),c={attributes:!0};l.observe(r,c),l.observe(n,c),this.restore=()=>l.disconnect();return}let s=H.os.ios||!ft(t);this.restore=s?gt(t):ht(t)}},yt=new re;function et(e=!0,t=null){_(()=>{if(e)return yt.acquire(t)},[e,t])}function tt({store:e,parentContext:t,isDrawer:o}){let r=e.useState("open"),n=e.useState("mounted"),i=e.useState("disablePointerDismissal"),s=e.useState("modal"),l=e.useState("popupElement"),c=e.useState("floatingRootContext"),[a,m]=ne.useState(0),[h,S]=ne.useState(0),b=a===0,u=De(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:s==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(p){if(!e.context.outsidePressEnabledRef.current||"button"in p&&p.button!==0)return!1;if("touches"in p){if(p.type==="touchend"){if(p.changedTouches.length!==1||p.touches.length!==0)return!1}else if(p.touches.length!==1)return!1}let w=me(p);if(b&&!i){if(s){let v=e.context.internalBackdropRef.current,D=e.context.backdropRef.current;return v||D?v===w||D===w||fe(w,l)&&!w?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:b});return et(r&&s===!0,l),e.useContextCallback("onNestedDialogOpen",(p,w)=>{!e.select("open")&&!e.select("mounted")||(m(p),S(w))}),_(()=>{!r&&!n&&(m(0),S(0))},[r,n]),_(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(a+1,h+(o?1:0)),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[o,r,a,h,t]),Te(e,{activeTriggerProps:u.reference,inactiveTriggerProps:u.trigger,popupProps:u.floating,nestedOpenDialogCount:a,nestedOpenDrawerCount:h}),null}var q=f(g(),1);var ot={...Ie,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},z=class extends ce{constructor(t,o,r){let n=new ee,i=nt(t,n,o,r);super(i,st(n),ot)}setOpen=(t,o)=>{o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,o),!o.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(t,o),this.update(Oe(this.state,t,o.trigger)))}};function rt(){let e=new ee;return new Me(Object.freeze(nt(void 0,e)),Object.freeze(st(e)),ot)}function nt(e,t,o,r=!1){return{...Be(t,o,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function st(e){return{popupRef:q.createRef(),backdropRef:q.createRef(),internalBackdropRef:q.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}var X=f(Q(),1);function Wo(e,t){let{children:o,open:r,defaultOpen:n=!1,onOpenChange:i,onOpenChangeComplete:s,disablePointerDismissal:l=!1,modal:c=!0,actionsRef:a,handle:m,triggerId:h,defaultTriggerId:S=null}=t,b=e==="drawer",u=e==="alert-dialog",p=u?!0:c,w=u||l,v=u?"alertdialog":"dialog",D=y(!0),P=D!=null,k={modal:p,disablePointerDismissal:w,nested:P,role:v},d=Ce((K,J)=>new z({open:n,openProp:r,activeTriggerId:S,triggerIdProp:h,...k},K,J),!0);d.useControlledProp("openProp",r),d.useControlledProp("triggerIdProp",h),d.useSyncedValues(k),d.useContextCallback("onOpenChange",i),d.useContextCallback("onOpenChangeComplete",s);let O=d.useState("open"),T=d.useState("mounted"),N=d.useState("payload");Ne(d,O),Pe(d);let{forceUnmount:E}=ke(O,d);it.useImperativeHandle(a,()=>({unmount:E,close:()=>d.setOpen(!1,M(V.imperativeAction))}),[E,d]);let B=O||T||m!=null;return(0,X.jsxs)(te.Provider,{value:d,children:[m&&(0,X.jsx)(xe,{handle:m,store:d}),B&&(0,X.jsx)(tt,{store:d,parentContext:D?.context,isDrawer:b}),typeof o=="function"?o({payload:N}):o]})}var ct=f(g(),1);var se=f(g(),1);var j=f(g(),1);function lt(e){let t=j.useRef(""),o=j.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:j.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:o}}function at(e,t){let o=ae((i,s)=>{(typeof e=="function"?e():e)||t(s||(H.os.ios?"touch":""))}),{onClick:r,onPointerDown:n}=lt(o);return se.useMemo(()=>({onClick:r,onPointerDown:n}),[r,n])}var lr=le(function(t,o){let{render:r,className:n,style:i,disabled:s=!1,nativeButton:l=!0,id:c,payload:a,handle:m,...h}=t,S=y(!0),u=Le(m)??S;if(!u)throw new Error(I(79));let p=Y(c),w=u.useState("floatingRootContext"),v=u.useState("isOpenedByTrigger",p),D=u.useState("triggerPopupId",p),P=ct.useRef(null),{registerTrigger:k,isMountedByThisTrigger:d}=Ee(p,P,u,{payload:a}),{getButtonProps:O,buttonRef:T}=G({disabled:s,native:l}),N=ve(w),E=at(()=>u.select("open"),J=>{u.set("openMethod",J)}),B={disabled:s,open:v},K=u.useState("triggerProps",d);return C("button",t,{state:B,ref:[T,o,k,P],props:[N.reference,K,E,{[we]:"",id:p,"aria-haspopup":"dialog","aria-expanded":v,"aria-controls":D},h,O],stateAttributesMapping:he})});var ie=class extends Re{constructor(){super(rt(),"Dialog",!1)}open(t){this.openByTrigger(t)}openWithPayload(t){let o=this.attachedStore;o!==null&&(o.set("payload",t),o.setOpen(!0,M(V.imperativeAction)))}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function fr(){return new ie}export{at as a,$e as b,et as c,y as d,kt as e,Lt as f,je as g,Fe as h,zt as i,Wo as j,no as k,co as l,lr as m,ie as n,fr as o,yo as p,Ye as q,_e as r,St as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as Oe}from"./chunk-6PHJZPWD.js";import{$ as zo,D as Eo,E as Ao,F as Do,G as No,I as Vo,J as Mo,N as Io,O as Ho,P as _o,Q as Lo,R as ko,T as St,U as Fo,V as Bo,W as $o,Y as Wo,Z as jo,_ as Uo,aa as Yo,ba as bt,c as eo,ca as Go,d as to,da as Xo,e as oo,ea as Ko,fa as Jo,ga as qo,ha as Qo,ia as en,k as Ro,l as yo,q as Co,r as vo,t as Re,u as So,v as bo,w as wo,x as Oo}from"./chunk-WRXMQB7X.js";import{a as Zt,d as Ze,f as io,h as tt,i as To}from"./chunk-B5ZN3SWQ.js";import{D as we,H as yt,Ha as xo,I as so,Ia as te,J as ao,Oa as me,P as co,Pa as oe,Qa as wt,Qc as tn,R as et,S as lo,Sa as Zo,T as po,a as V,b as ue,c as _e,e as be,ea as uo,g as N,h as fe,ia as Ct,j as re,l as qe,la as fo,ma as mo,na as de,o as Qe,oa as xe,p as no,qa as go,ra as vt,sa as ho,xa as Po,y as ro}from"./chunk-YPMUHXYT.js";import{b as sr,c as R}from"./chunk-7SZRL6FY.js";var ie={};sr(ie,{Arrow:()=>Bn,Handle:()=>Be,Popup:()=>kn,Portal:()=>xn,Positioner:()=>_n,Provider:()=>Wn,Root:()=>cn,Trigger:()=>fn,Viewport:()=>tr,createHandle:()=>or});var Ee=R(V(),1);var ot=R(V(),1),Ot=ot.createContext(void 0);function G(t){let e=ot.useContext(Ot);if(e===void 0&&!t)throw new Error(fe(72));return e}var on=R(V(),1);var nn={...Bo,disabled:t=>t.disabled,instantType:t=>t.instantType,isInstantPhase:t=>t.isInstantPhase,trackCursorAxis:t=>t.trackCursorAxis,disableHoverablePopup:t=>t.disableHoverablePopup,lastOpenChangeReason:t=>t.openChangeReason,closeOnClick:t=>t.closeOnClick,appliedTriggerProps:(t,e)=>e?t.activeTriggerProps:void 0,closeDelay:t=>t.closeDelay,adaptiveOrigin:t=>t.adaptiveOrigin},nt=class extends oo{constructor(e,o,n){let r=new St;super(sn(e,r,o,n),an(r),nn)}setOpen=(e,o)=>{Io(this,e,o,{extraState:{openChangeReason:o.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,me(oe.triggerPress,e))}};function rn(){let t=new St,e=new en(Object.freeze(sn(void 0,t)),Object.freeze(an(t)),nn);return Object.assign(e,{setOpen:_e,cancelPendingOpen:_e})}function sn(t,e,o,n=!1){return{...Fo(e,o,n),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...t}}function an(t){return{popupRef:on.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:t}}var Le=R(ue(),1),cn=eo(function(e){let{disabled:o=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:s=!1,trackCursorAxis:c="none",actionsRef:l,onOpenChange:p,onOpenChangeComplete:m,handle:f,triggerId:g,defaultTriggerId:h=null,children:u}=e,i=Vo((I,j)=>new nt({open:n,openProp:r,activeTriggerId:h,triggerIdProp:g},I,j));i.useControlledProp("openProp",r),i.useControlledProp("triggerIdProp",g),i.useContextCallback("onOpenChange",p),i.useContextCallback("onOpenChangeComplete",m);let P=i.useState("open"),a=!o&&P,y=i.useState("activeTriggerId"),b=i.useState("mounted"),d=i.useState("payload");i.useSyncedValues({trackCursorAxis:c,disableHoverablePopup:s,disabled:o}),_o(i,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:T,transitionStatus:C}=Lo(a,i),E=i.useState("isInstantPhase"),v=i.useState("instantType"),w=i.useState("lastOpenChangeReason"),_=Ee.useRef(null);N(()=>{P&&o&&i.setOpen(!1,me(oe.disabled))},[P,o,i]),N(()=>{C==="ending"&&w===oe.none||C!=="ending"&&E?(v!=="delay"&&(_.current=v),i.set("instantType","delay")):_.current!==null&&(i.set("instantType",_.current),_.current=null)},[C,E,w,v,i]),N(()=>{a&&y==null&&i.set("payload",void 0)},[i,y,a]),Ee.useImperativeHandle(l,()=>({unmount:T,close:()=>i.setOpen(!1,me(oe.imperativeAction))}),[T,i]);let M=a||b||!o&&c!=="none";return(0,Le.jsxs)(Ot.Provider,{value:i,children:[f&&(0,Le.jsx)(Mo,{handle:f,store:i}),M&&(0,Le.jsx)(ar,{store:i,disabled:o,trackCursorAxis:c}),typeof u=="function"?u({payload:d}):u]})});function ar({store:t,disabled:e,trackCursorAxis:o}){let n=t.useState("floatingRootContext"),r=Ao(n,{enabled:!e,referencePress:()=>t.select("closeOnClick")}),s=Eo(n,{enabled:!e&&o!=="none",axis:o==="none"?void 0:o}),c=Ee.useMemo(()=>xo(s.reference,r.reference),[s.reference,r.reference]);return ko(t,{activeTriggerProps:c,inactiveTriggerProps:c,popupProps:r.floating??be}),null}var it=R(V(),1);var rt=R(V(),1),Et=rt.createContext(void 0);function ln(){return rt.useContext(Et)}var pn="data-base-ui-tooltip-trigger";function un(t){let e=ao(t);return Qe(e)?e:null}var fn=to(function(e,o){let{render:n,className:r,style:s,handle:c,payload:l,disabled:p,delay:m,closeOnClick:f=!0,closeDelay:g,id:h,...u}=e,i=G(!0),a=$o(c)??i;if(!a)throw new Error(fe(82));let y=tn(h),b=a.useState("isTriggerActive",y),d=a.useState("isOpenedByTrigger",y),T=a.useState("floatingRootContext"),C=it.useRef(null),E=g??0,{registerTrigger:v,isMountedByThisTrigger:w}=Ho(y,C,a,{payload:l,closeOnClick:f,closeDelay:E}),_=ln(),{activeIdRef:M,delayRef:I,isInstantPhase:j,hasProvider:O}=wo(T,{open:d}),k=jo(T);a.useSyncedValue("isInstantPhase",j);let L=a.useState("disabled"),B=p??L,ge=Re(B),K=a.useState("trackCursorAxis"),A=a.useState("disableHoverablePopup"),J=it.useRef(!1),Z=io(),Te=it.useRef(void 0);function $e(){return O&&M.current!=null?0:m??_??600}function he(D){let $=C.current;if(!$||!D)return!1;let F=so(D,`[${pn}]`);return F!==null&&F!==$&&yt($,F)}function Pe(D){let $=he(D);return J.current=$,$&&(k.openChangeTimeout.clear(),k.restTimeout.clear(),k.restTimeoutPending=!1,Z.clear()),$}let ht=zo(T,{enabled:!B,mouseOnly:!0,move:!1,handleClose:!A&&K!=="both"?Yo():null,restMs:$e,delay(){return g==null&&O?{close:So(I.current,"close")}:{close:E}},triggerElementRef:C,isActiveTrigger:b,isClosing:()=>a.select("transitionStatus")==="ending",shouldOpen(){return!J.current}}),S=Wo(T,{enabled:!B}).reference,ee=D=>{let $=J.current,F=un(D),ye=Pe(F),ae=C.current,xt=ae&&F&&yt(ae,F);if(ye&&a.select("open")&&a.select("lastOpenChangeReason")===oe.triggerHover){a.setOpen(!1,me(oe.triggerHover,D));return}if($&&!ye&&xt&&!ge.current&&!a.select("open")&&ae&&uo(Te.current)){let We=()=>{!J.current&&!ge.current&&!a.select("open")&&a.setOpen(!0,me(oe.triggerHover,D,ae))},ne=$e();ne===0?(Z.clear(),We()):Z.start(ne,We)}},Pt=a.useState("appliedTriggerProps",w||K!=="none");return te("button",e,{state:{open:d},ref:[o,v,C],props:[ht,S,Pt,{onMouseOver(D){ee(D.nativeEvent)},onFocus(D){he(un(D.nativeEvent))&&D.preventBaseUIHandler()},onMouseLeave(){J.current=!1,Z.clear(),Te.current=void 0},onPointerEnter(D){Te.current=D.pointerType},onPointerDown(D){Te.current=D.pointerType,a.set("closeOnClick",f),f&&!a.select("open")&&a.cancelPendingOpen(D.nativeEvent)},onClick(D){f&&!a.select("open")&&a.cancelPendingOpen(D.nativeEvent)},id:y,[po]:B?"":void 0,[pn]:B?void 0:""},u],stateAttributesMapping:co})});var Pn=R(V(),1);var st=R(V(),1),At=st.createContext(void 0);function dn(){let t=st.useContext(At);if(t===void 0)throw new Error(fe(70));return t}var at=R(V(),1),mn=R(Zt(),1);var gn=R(ue(),1),hn=at.forwardRef(function(e,o){let{children:n,container:r,className:s,render:c,style:l,...p}=e,{node:m,subtree:f}=vo({container:r,ref:o,componentProps:e,elementProps:p});return!f&&!m?null:(0,gn.jsxs)(at.Fragment,{children:[f,m&&mn.createPortal(n,m)]})});var Dt=R(ue(),1),xn=Pn.forwardRef(function(e,o){let{keepMounted:n=!1,...r}=e;return G().useState("mounted")||n?(0,Dt.jsx)(At.Provider,{value:n,children:(0,Dt.jsx)(hn,{ref:o,...r})}):null});var ft=R(V(),1);var ct=R(V(),1),Nt=ct.createContext(void 0);function Ae(){let t=ct.useContext(Nt);if(t===void 0)throw new Error(fe(71));return t}var z=R(V(),1);var X=R(V(),1);function Rn(t){let{nodeId:e,externalTree:o,rootContext:n}=t,r=n.useState("referenceElement"),s=n.useState("floatingElement"),c=n.useState("domReferenceElement"),l=n.useState("open"),p=n.useState("floatingId"),[m,f]=X.useState(null),g=X.useRef(null),h=Oo(o),u=X.useMemo(()=>({reference:r,floating:s,domReference:c}),[r,s,c]),i=Go({...t,elements:{...u,...m&&{reference:m}}}),P=X.useCallback(d=>{let T=Qe(d)?{getBoundingClientRect:()=>d.getBoundingClientRect(),getClientRects:()=>d.getClientRects(),contextElement:d}:d;f(T),i.refs.setReference(T)},[i.refs]),a=X.useMemo(()=>({...i.refs,setPositionReference:P,domReference:g}),[i.refs,P]),y=X.useMemo(()=>({...i.elements,domReference:c}),[i.elements,c]),b=X.useMemo(()=>({...i,dataRef:n.context.dataRef,open:l,onOpenChange:n.setOpen,events:n.context.events,floatingId:p,refs:a,elements:y,nodeId:e,rootStore:n}),[i,a,y,e,n,l,p]);return N(()=>{c&&(g.current=c)},[c]),N(()=>{n.context.dataRef.current.floatingContext=b;let d=h?.nodesRef.current.find(T=>T.id===e);d&&(d.context=b)}),X.useMemo(()=>({...i,context:b,refs:a,elements:y,rootStore:n}),[i,a,y,b,n])}var lr=t=>({name:"arrow",options:t,async fn(e){let{x:o,y:n,placement:r,rects:s,platform:c,elements:l,middlewareData:p}=e,{element:m,padding:f=0}=mo(t,e)||{};if(m==null)return{};let g=Po(f),h={x:o,y:n},u=ho(r),i=go(u),P=await c.getDimensions(m),a=u==="y",y=a?"top":"left",b=a?"bottom":"right",d=a?"clientHeight":"clientWidth",T=s.reference[i]+s.reference[u]-h[u]-s.floating[i],C=h[u]-s.reference[u],E=l.floating[d]||s.floating[i],v=T/2-C/2,w=E/2-P[i]/2-1,_=Math.min(g[y],w),M=Math.min(g[b],w),I=_,j=E-P[i]-M,O=E/2-P[i]/2+v,k=fo(I,O,j),L=!p.arrow&&xe(r)!=null&&O!==k&&s.reference[i]/2-(O<I?_:M)-P[i]/2<0,B=L?O<I?O-I:O-j:0;return{[u]:h[u]+B,data:{[u]:k,centerOffset:O-k-B,...L&&{alignmentOffset:B}},reset:L}}}),Tn=(t,e)=>{let{name:o,fn:n}=lr(t);return{name:o,fn:n,options:[t,e]}};var yn={name:"hide",async fn(t){let{width:e,height:o,x:n,y:r}=t.rects.reference,s=e===0&&o===0&&n===0&&r===0,c=await t.platform.detectOverflow(t,{elementContext:"reference"});return{data:{referenceHidden:c.top-o>=0||c.right-e>=0||c.bottom-o>=0||c.left-e>=0||s}}}};var De={sideX:"left",sideY:"top"};var lt="--available-width",pt="--available-height",Cn="--anchor-width",vn="--anchor-height",Sn="--transform-origin",bn="--positioner-width",wn="--positioner-height";var En=lt,An=pt;function Vn(t,e,o){let n=t==="inline-start"||t==="inline-end";return{top:"top",right:n?o?"inline-start":"inline-end":"right",bottom:"bottom",left:n?o?"inline-end":"inline-start":"left"}[e]}function Dn(t,e,o){let{rects:n,placement:r}=t;return{side:Vn(e,de(r),o),align:xe(r)||"center",anchor:{width:n.reference.width,height:n.reference.height},positioner:{width:n.floating.width,height:n.floating.height}}}function Mn(t){return pr(t,Rn)}function pr(t,e){let{anchor:o,positionMethod:n="absolute",side:r="bottom",sideOffset:s=0,align:c="center",alignOffset:l=0,collisionBoundary:p,collisionPadding:m=5,sticky:f=!1,arrowPadding:g=5,disableAnchorTracking:h=!1,inline:u,keepMounted:i=!1,floatingRootContext:P,mounted:a,collisionAvoidance:y,shift:b,nodeId:d,adaptiveOrigin:T,lazyFlip:C=!1,externalTree:E}=t,v=y.side||"flip",w=y.align||"flip",_=y.fallbackAxisSide||"end",M=b?.crossAxis??!1,I=b?.rootBoundary,j=typeof o=="function"?o:void 0,O=re(j),k=j?O:o,L=Re(o),B=Re(a),K=Oe()==="rtl",[A,J]=z.useState(null);!a&&A!==null&&J(null);let Z=C==="placement",Te=A?de(A):null,$e=A&&Z?xe(A)||"center":null,he=Te||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":K?"left":"right","inline-start":K?"right":"left"}[r],Pe=$e||c,ht=Pe==="center"?he:`${he}-${Pe}`,S=m;typeof S=="number"?S={top:S,right:S,bottom:S,left:S}:S&&(S={top:S.top||0,right:S.right||0,bottom:S.bottom||0,left:S.left||0});let ee=1,Pt=r==="bottom"?ee:0,_t=r==="top"?ee:0,Lt=r==="right"?ee:0,D=r==="left"?ee:0,$={boundary:p==="clipping-ancestors"?"clippingAncestors":p,padding:S},F=z.useRef(null),ye=Re(s),ae=Re(l),xt=typeof s!="function"?s:0,We=typeof l!="function"?l:0,ne=[];u&&ne.push(u),ne.push(Xo(x=>{let U=Dn(x,r,K),Y=typeof ye.current=="function"?ye.current(U):ye.current,W=typeof ae.current=="function"?ae.current(U):ae.current;return{mainAxis:Y,crossAxis:W,alignmentAxis:W}},[xt,We,K,r]));let kt=w==="none"&&v!=="shift",Ft=!kt&&(f||M||v==="shift"),Bt=v==="none"?null:qo({...$,padding:{top:S.top+ee+Pt,right:S.right+ee+D,bottom:S.bottom+ee+_t,left:S.left+ee+Lt},mainAxis:!M&&v==="flip",crossAxis:w==="flip"?"alignment":!1,fallbackAxisSideDirection:_}),$t=kt?null:Ko({...$,rootBoundary:I,mainAxis:w!=="none",crossAxis:Ft,limiter:f||M?void 0:Jo(x=>{if(!F.current)return{};let{width:U,height:Y}=F.current.getBoundingClientRect(),W=vt(de(x.placement)),le=W==="y"?U:Y,q=W==="y"?S.left+S.right:S.top+S.bottom;return{offset:le/2+q/2}})},[$,f,M,I,S,w]);v==="shift"||w==="shift"||Pe==="center"?ne.push($t,Bt):ne.push(Bt,$t),ne.push(Qo({...$,apply({elements:{floating:x},availableWidth:U,availableHeight:Y,rects:W}){if(!B.current)return;let le=x.style;le.setProperty(En,`${U}px`),le.setProperty(An,`${Y}px`);let q=qe(x).devicePixelRatio||1,{x:Xe,y:Se,width:Ke,height:pe}=W.reference,Ie=(Math.round((Xe+Ke)*q)-Math.round(Xe*q))/q,He=(Math.round((Se+pe)*q)-Math.round(Se*q))/q;le.setProperty(Cn,`${Ie}px`),le.setProperty(vn,`${He}px`)}}),Tn(x=>({element:F.current||we(x.elements.floating).createElement("div"),padding:F.current?g:0}),[g]),{name:"transformOrigin",fn(x){let{elements:{floating:U},middlewareData:Y,placement:W,platform:le,rects:q,y:Xe}=x,Se=de(W),Ke=xe(W),pe=vt(Se)==="y",Ie=F.current,He=typeof s=="function"?s(Dn(x,r,K)):s,Je;if(!Ie&&Ke&&Math.abs(pe?Y.shift?.x||0:Y.shift?.y||0)<=1)Je=Ke==="start"===(pe&&le.isRTL?.(U)===!0)?"100%":"0%";else{let rr=pe?Y.arrow?.x||0:Y.arrow?.y||0,ir=pe?Ie?.clientWidth||0:Ie?.clientHeight||0;Je=`${rr+ir/2}px`}let Tt=Se==="top"||Se==="left"?`calc(100% + ${He}px)`:`${-He}px`;return Ft&&pe&&Math.abs(Y.shift?.y||0)>He&&(Tt=`${q.reference.y+q.reference.height/2-Xe}px`),U.style.setProperty(Sn,pe?`${Je} ${Tt}`:`${Tt} ${Je}`),{}}},yn,T),N(()=>{!a&&P&&P.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[a,P]);let Rt=z.useMemo(()=>({ancestorScroll:!h,elementResize:!h&&typeof ResizeObserver<"u",layoutShift:!h&&typeof IntersectionObserver<"u"}),[h]),{refs:Ce,elements:Ve,x:Wt,y:jt,middlewareData:ve,update:je,placement:Ue,context:Ut,isPositioned:ce,floatingStyles:zt}=e({rootContext:P,open:i?a:void 0,placement:ht,middleware:ne,strategy:n,whileElementsMounted:i?void 0:(...x)=>bt(...x,Rt),nodeId:d,externalTree:E}),{sideX:Yt,sideY:Gt}=ve.adaptiveOrigin||De,ze=ce?n:"fixed",Xt=z.useMemo(()=>{let x;return ce?T?x={position:ze,[Yt]:Wt,[Gt]:jt}:x={...zt,position:ze}:x={position:ze,top:0,left:0},x[En]="100vw",x[An]="100vh",ce||(x.opacity=0),x},[T,ze,Yt,Wt,Gt,jt,zt,ce]),Ye=z.useRef(null);N(()=>{if(!a)return;let x=L.current,U=typeof x=="function"?x():x,W=(Nn(U)?U.current:U)||null||null;W!==Ye.current&&(Ce.setPositionReference(W),Ye.current=W)},[a,Ce,k,L]),z.useEffect(()=>{if(!a)return;let x=L.current;typeof x!="function"&&Nn(x)&&x.current!==Ye.current&&(Ce.setPositionReference(x.current),Ye.current=x.current)},[a,Ce,k,L]),z.useEffect(()=>{if(i&&a&&Ve.reference&&Ve.floating)return bt(Ve.reference,Ve.floating,je,Rt)},[i,a,Ve,je,Rt]);let Me=de(Ue),Kt=Vn(r,Me,K),Ge=xe(Ue)||"center",Jt=!!ve.hide?.referenceHidden;N(()=>{C&&a&&ce&&(Me!==he||Z&&Ge!==Pe)&&J(Ue)},[C,Z,a,ce,Ue,Me,Ge,he,Pe]);let qt=z.useMemo(()=>({position:"absolute",top:ve.arrow?.y,left:ve.arrow?.x}),[ve.arrow]),Qt=ve.arrow?.centerOffset!==0;return z.useMemo(()=>({positionerStyles:Xt,arrowStyles:qt,arrowRef:F,arrowUncentered:Qt,side:Kt,align:Ge,physicalSide:Me,anchorHidden:Jt,refs:Ce,context:Ut,isPositioned:ce,update:je}),[Xt,qt,F,Qt,Kt,Ge,Me,Jt,Ce,Ut,ce,je])}function Nn(t){return t!=null&&"current"in t}function ut(t){return t==="starting"?yo:be}function In(t,e,{styles:o,transitionStatus:n,props:r,refs:s,hidden:c,inert:l=!1}){let p={...o};return l&&(p.pointerEvents="none"),te("div",t,{state:e,ref:s,props:[{role:"presentation",hidden:c,style:p},ut(n),r],stateAttributesMapping:et})}var Hn=R(ue(),1),_n=ft.forwardRef(function(e,o){let{render:n,className:r,anchor:s,positionMethod:c="absolute",side:l="top",align:p="center",sideOffset:m=0,alignOffset:f=0,collisionBoundary:g="clipping-ancestors",collisionPadding:h=5,arrowPadding:u=5,sticky:i=!1,disableAnchorTracking:P=!1,collisionAvoidance:a=Co,style:y,...b}=e,d=G(),T=dn(),C=d.useState("open"),E=d.useState("mounted"),v=d.useState("trackCursorAxis"),w=d.useState("disableHoverablePopup"),_=d.useState("floatingRootContext"),M=d.useState("instantType"),I=d.useState("transitionStatus"),j=d.useState("adaptiveOrigin"),O=Mn({anchor:s,positionMethod:c,floatingRootContext:_,mounted:E,side:l,sideOffset:m,align:p,alignOffset:f,collisionBoundary:g,collisionPadding:h,sticky:i,arrowPadding:u,disableAnchorTracking:P,keepMounted:T,collisionAvoidance:a,adaptiveOrigin:j}),k=ft.useMemo(()=>({open:C,side:O.side,align:O.align,anchorHidden:O.anchorHidden,instant:v!=="none"?"tracking-cursor":M}),[C,O.side,O.align,O.anchorHidden,v,M]),L=In(e,k,{styles:O.positionerStyles,transitionStatus:I,props:b,refs:[o,d.useStateSetter("positionerElement")],hidden:!E,inert:!C||v==="both"||w});return(0,Hn.jsx)(Nt.Provider,{value:O,children:L})});var Ln=R(V(),1);var kn=Ln.forwardRef(function(e,o){let{render:n,className:r,style:s,...c}=e,l=G(),{side:p,align:m}=Ae(),f=l.useState("open"),g=l.useState("instantType"),h=l.useState("transitionStatus"),u=l.useState("popupProps"),i=l.useState("floatingRootContext"),P=l.useState("disabled"),a=l.useState("closeDelay");To({open:f,ref:l.context.popupRef,onComplete(){f&&l.context.onOpenChangeComplete?.(!0)}}),Uo(i,{enabled:!P,closeDelay:a});let y=l.useStateSetter("popupElement");return te("div",e,{state:{open:f,side:p,align:m,instant:g,transitionStatus:h},ref:[o,l.context.popupRef,y],props:[No,u,ut(h),c],stateAttributesMapping:lo})});var Fn=R(V(),1);var Bn=Fn.forwardRef(function(e,o){let{render:n,className:r,style:s,...c}=e,l=G(),{arrowRef:p,side:m,align:f,arrowUncentered:g,arrowStyles:h}=Ae(),u=l.useState("open"),i=l.useState("instantType");return te("div",e,{state:{open:u,side:m,align:f,uncentered:g,instant:i},ref:[o,p],props:[{style:h,"aria-hidden":!0},c],stateAttributesMapping:et})});var $n=R(V(),1);var Vt=R(ue(),1),Wn=function(e){let{delay:o,closeDelay:n,timeout:r=400}=e,s=$n.useMemo(()=>({open:o,close:n}),[o,n]);return(0,Vt.jsx)(Et.Provider,{value:o,children:(0,Vt.jsx)(bo,{delay:s,timeoutMs:r,children:e.children})})};var er=R(V(),1);var H=R(V(),1),qn=R(Zt(),1);var jn=R(V(),1);function Un(t){let[e,o]=jn.useState({current:t,previous:null});return Object.is(t,e.current)||o({current:t,previous:e.current}),e.previous}var gt=R(V(),1);function Mt(t){let e=ro(t),o=parseFloat(e.width)||0,n=parseFloat(e.height)||0,r=no(t),s=r?t.offsetWidth:o,c=r?t.offsetHeight:n;return(Ct(o)!==s||Ct(n)!==c)&&(o=s,n=c),{width:o,height:n}}var ke="--popup-width",Fe="--popup-height";function Gn(t){let{popupElement:e,positionerElement:o,content:n,mounted:r,onMeasureLayout:s,onMeasureLayoutComplete:c,side:l,direction:p}=t,m=tt(e,!0),f=Ze(),g=gt.useRef(null),h=re(s),u=re(c),i=gt.useMemo(()=>ur(l,p),[l,p]);N(()=>{if(!r){g.current=null;return}if(!e||!o)return;let P=Yn(e,i);It(e,"auto");let a=mt(e,"position","static"),y=mt(e,"transform","none"),b=mt(e,"scale","1"),d=Yn(o,{[lt]:"max-content",[pt]:"max-content"});function T(){a(),y(),d(),b()}if(h?.(),g.current===null){dt(o,"max-content");let w=Mt(e);return g.current=w,dt(o,w),T(),u?.(null,w),P}dt(o,"max-content");let C=g.current,E=Mt(e);g.current=E,It(e,C),T(),u?.(C,E),dt(o,E);let v=new AbortController;return f.request(()=>{It(e,E),m(()=>{e.style.setProperty(ke,"auto"),e.style.setProperty(Fe,"auto")},v.signal)}),()=>{v.abort(),f.cancel(),P()}},[n,e,o,m,f,r,h,u,i])}function ur(t,e){let o=t==="top",n=t==="left"||t===(e==="rtl"?"inline-end":"inline-start");return!o&&!n?be:{position:"absolute",[o?"bottom":"top"]:"0",[n?"right":"left"]:"0"}}function mt(t,e,o){let n=t.style.getPropertyValue(e);return t.style.setProperty(e,o),()=>{t.style.setProperty(e,n)}}function Yn(t,e){let o=[];for(let[n,r]of Object.entries(e))o.push(mt(t,n,r));return o.length?()=>{o.forEach(n=>n())}:_e}function It(t,e){let o=e==="auto"?"auto":`${e.width}px`,n=e==="auto"?"auto":`${e.height}px`;t.style.setProperty(ke,o),t.style.setProperty(Fe,n)}function dt(t,e){let o=e==="max-content"?"max-content":`${e.width}px`,n=e==="max-content"?"max-content":`${e.height}px`;t.style.setProperty(bn,o),t.style.setProperty(wn,n)}var Xn={name:"adaptiveOrigin",async fn(t){let{x:e,y:o,rects:{floating:n},elements:{floating:r},platform:s,strategy:c,placement:l}=t,p=qe(r),m=p.getComputedStyle(r);if(!(m.transitionDuration!=="0s"&&m.transitionDuration!==""))return{x:e,y:o,data:De};let g=await s.getOffsetParent?.(r),h={width:0,height:0};if(c==="fixed"&&p?.visualViewport)h={width:p.visualViewport.width,height:p.visualViewport.height};else if(g===p){let b=we(r);h={width:b.documentElement.clientWidth,height:b.documentElement.clientHeight}}else await s.isElement?.(g)&&(h=await s.getDimensions(g));let u=de(l),i=e,P=o;u==="left"&&(i=h.width-(e+n.width)),u==="top"&&(P=h.height-(o+n.height));let a=u==="left"?"right":De.sideX,y=u==="top"?"bottom":De.sideY;return{x:i,y:P,data:{sideX:a,sideY:y}}}};var Kn="data-activation-direction";var Ne=R(ue(),1),Qn={activationDirection:t=>t?{[Kn]:t}:null};function Zn(t){let{store:e,side:o,children:n}=t,r=Oe(),s=e.useState("activeTriggerElement"),c=e.useState("activeTriggerId"),l=e.useState("open"),p=e.useState("payload"),m=e.useState("mounted"),f=e.useState("popupElement"),g=e.useState("positionerElement"),h=Un(l?s:null),u=gr(c,p),i=H.useRef(null),[P,a]=H.useState(null),[y,b]=H.useState(null),d=H.useRef(null),T=H.useRef(null),C=tt(d,!0),E=Ze(),v=H.useRef(null),[w,_]=H.useState(null),[M,I]=H.useState(!1);N(()=>(e.set("adaptiveOrigin",Xn),()=>{e.set("adaptiveOrigin",void 0)}),[e]);let j=re(()=>{d.current?.style.setProperty("animation","none"),d.current?.style.setProperty("transition","none"),T.current?.style.setProperty("display","none")}),O=re(A=>{d.current?.style.removeProperty("animation"),d.current?.style.removeProperty("transition"),T.current?.style.removeProperty("display"),A&&_(A)}),k=re(()=>{v.current?.abort();let A=new AbortController;v.current=A,C(()=>{a(null),_(null),i.current=null},A.signal)}),L=H.useRef(null);N(()=>{(!l||!m)&&(L.current=null)},[l,m]),N(()=>{if(l&&s&&h&&s!==h&&L.current!==s&&i.current){a(i.current),I(!0);let A=mr(h,s);b(A),L.current=s}},[l,s,h]),N(()=>{P!=null&&(v.current?.abort(),I(!0),E.request(()=>{qn.flushSync(()=>{I(!1)}),k()}))},[u,P,k,E]),N(()=>{let A=d.current;if(!A)return;let J=we(A).createElement("div");for(let Z of Array.from(A.childNodes))J.appendChild(Z.cloneNode(!0));i.current=J});let B=P!=null,ge;B?ge=(0,Ne.jsxs)(H.Fragment,{children:[(0,Ne.jsx)("div",{"data-previous":!0,inert:Ro(!0),ref:T,style:{...w?{[ke]:`${w.width}px`,[Fe]:`${w.height}px`}:null,position:"absolute"},"data-ending-style":M?void 0:""},"previous"),(0,Ne.jsx)("div",{"data-current":!0,ref:d,"data-starting-style":M?"":void 0,children:n},u)]}):ge=(0,Ne.jsx)("div",{"data-current":!0,ref:d,children:n},u),N(()=>{let A=T.current;!A||!P||A.replaceChildren(...Array.from(P.childNodes))},[P]),Gn({popupElement:f,positionerElement:g,mounted:m,content:p,onMeasureLayout:j,onMeasureLayoutComplete:O,side:o,direction:r});let K={activationDirection:dr(y),transitioning:B};return{children:ge,state:K}}function dr(t){if(t)return`${Jn(t.horizontal,5,"right","left")} ${Jn(t.vertical,5,"down","up")}`}function Jn(t,e,o,n){return t>e?o:t<-e?n:""}function mr(t,e){let o=t.getBoundingClientRect(),n=e.getBoundingClientRect(),r={x:o.left+o.width/2,y:o.top+o.height/2},s={x:n.left+n.width/2,y:n.top+n.height/2};return{horizontal:s.x-r.x,vertical:s.y-r.y}}function gr(t,e){let[o,n]=H.useState(0),r=H.useRef(t),s=H.useRef(e),c=H.useRef(!1);return N(()=>{let l=r.current,p=s.current,m=t!==l,f=e!==p;m?(n(g=>g+1),c.current=!f):c.current&&f&&(n(g=>g+1),c.current=!1),r.current=t,s.current=e},[t,e]),`${t??"current"}-${o}`}var tr=er.forwardRef(function(e,o){let{render:n,className:r,style:s,children:c,...l}=e,p=G(),m=Ae(),f=p.useState("instantType"),{children:g,state:h}=Zn({store:p,side:m.side,children:c}),u={activationDirection:h.activationDirection,transitioning:h.transitioning,instant:f};return te("div",e,{state:u,ref:o,props:[l,{children:g}],stateAttributesMapping:Qn})});var Be=class extends Do{constructor(){super(rn(),"Tooltip")}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function or(){return new Be}var Q=R(V(),1);var se=R(ue(),1);function xa({delay:t=0,closeDelay:e=150,...o}){return(0,se.jsx)(ie.Provider,{"data-slot":"tooltip-provider",delay:t,closeDelay:e,...o})}var Ht=(0,Q.createContext)(void 0),nr="(min-width: 768px) and (hover: hover) and (pointer: fine)";function hr(t){let e=window.matchMedia(nr);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}function Pr(){return window.matchMedia(nr).matches}function Ra({disabled:t,onOpenChange:e,open:o,...n}){let r=(0,Q.useSyncExternalStore)(hr,Pr,()=>!1),s=(0,Q.useId)(),[c,l]=(0,Q.useState)(n.defaultOpen??!1),p=r&&(o??c);return(0,se.jsx)(Ht.Provider,{value:p?s:void 0,children:(0,se.jsx)(ie.Root,{"data-slot":"tooltip",disabled:t||!r,onOpenChange:(m,f)=>{l(m),e?.(m,f)},open:o,...n})})}function Ta({closeOnClick:t=!1,...e}){let o=(0,Q.useContext)(Ht);return(0,se.jsx)(ie.Trigger,{"aria-describedby":o,closeOnClick:t,"data-slot":"tooltip-trigger",...e})}var xr=Zo("z-50 select-text rounded-md border border-dashboard-border-emphasis bg-dashboard-surface-raised font-sans text-xs shadow-2xl shadow-black/70 outline-none",{variants:{size:{default:"min-w-36 max-w-lg px-3 py-2 leading-relaxed text-dashboard-text-muted",compact:"px-2.5 py-1.5 leading-none text-dashboard-text"}},defaultVariants:{size:"default"}});function ya({className:t,side:e="top",sideOffset:o=10,align:n="center",size:r,children:s,...c}){let l=(0,Q.useContext)(Ht);return(0,se.jsx)(ie.Portal,{children:(0,se.jsx)(ie.Positioner,{align:n,collisionPadding:8,side:e,sideOffset:o,className:"isolate z-50 data-anchor-hidden:invisible",children:(0,se.jsx)(ie.Popup,{"data-slot":"tooltip-content",id:l,role:"tooltip",className:wt(xr({size:r}),t),...c,children:s})})})}function Ca({className:t,...e}){return(0,se.jsx)("div",{className:wt("mb-1 font-semibold text-dashboard-text-muted",t),...e})}export{hn as a,Mn as b,ut as c,In as d,Mt as e,Qn as f,Zn as g,xa as h,Ra as i,Ta as j,xr as k,ya as l,Ca as m};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as F,b as He}from"./chunk-YPMUHXYT.js";import{c as E}from"./chunk-7SZRL6FY.js";var vt={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},gt=class{#t=vt;#e=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,t){return this.#t.setTimeout(e,t)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,t){return this.#t.setInterval(e,t)}clearInterval(e){this.#t.clearInterval(e)}},C=new gt;function Ke(e){setTimeout(e,0)}var Qe=typeof window>"u"||"Deno"in globalThis;function g(){}function Ve(e,t){return typeof e=="function"?e(t):e}function X(e){return typeof e=="number"&&e>=0&&e!==1/0}function ce(e,t){return Math.max(e+(t||0)-Date.now(),0)}function P(e,t){return typeof e=="function"?e(t):e}function R(e,t){return typeof e=="function"?e(t):e}function he(e,t){let{type:s="all",exact:r,fetchStatus:i,predicate:n,queryKey:o,stale:c}=e;if(o){if(r){if(t.queryHash!==Y(o,t.options))return!1}else if(!H(t.queryKey,o))return!1}if(s!=="all"){let a=t.isActive();if(s==="active"&&!a||s==="inactive"&&a)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||n&&!n(t))}function le(e,t){let{exact:s,status:r,predicate:i,mutationKey:n}=e;if(n){if(!t.options.mutationKey)return!1;if(s){if(Q(t.options.mutationKey)!==Q(n))return!1}else if(!H(t.options.mutationKey,n))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Y(e,t){return(t?.queryKeyHashFn||Q)(e)}function Q(e){return JSON.stringify(e,(t,s)=>Ce(s)?Object.keys(s).sort().reduce((r,i)=>(r[i]=s[i],r),{}):s)}function H(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>H(e[s],t[s])):!1}var bt=Object.prototype.hasOwnProperty;function K(e,t,s=0){if(e===t)return e;if(s>500)return t;let r=Le(e)&&Le(t);if(!r&&!(Ce(e)&&Ce(t)))return t;let n=(r?e:Object.keys(e)).length,o=r?t:Object.keys(t),c=o.length,a=r?new Array(c):{},p=0;for(let u=0;u<c;u++){let f=r?u:o[u],l=e[f],b=t[f];if(l===b){a[f]=l,(r?u<n:bt.call(e,f))&&p++;continue}if(l===null||b===null||typeof l!="object"||typeof b!="object"){a[f]=b;continue}let m=K(l,b,s+1);a[f]=m,m===l&&p++}return n===c&&p===n?e:a}function j(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let s in e)if(e[s]!==t[s])return!1;return!0}function Le(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ce(e){if(!Be(e))return!1;let t=e.constructor;if(t===void 0)return!0;let s=t.prototype;return!(!Be(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Be(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ge(e){return new Promise(t=>{C.setTimeout(t,e)})}function ee(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?K(e,t):t}function Rt(e){return e}function $e(e,t,s=0){let r=[...e,t];return s&&r.length>s?r.slice(1):r}function ze(e,t,s=0){let r=[t,...e];return s&&r.length>s?r.slice(0,-1):r}var B=Symbol();function fe(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===B?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function V(e,t){return typeof e=="function"?e(...t):!!e}function Je(e,t,s){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?s():i.addEventListener("abort",s,{once:!0})),i)}),e}var We=Ke;function Ot(){let e=[],t=0,s=c=>{c()},r=c=>{c()},i=We,n=c=>{t?e.push(c):i(()=>{s(c)})},o=()=>{let c=e;e=[],c.length&&i(()=>{r(()=>{c.forEach(a=>{s(a)})})})};return{batch:c=>{let a;t++;try{a=c()}finally{t--,t||o()}return a},batchCalls:c=>(...a)=>{n(()=>{c(...a)})},schedule:n,setNotifyFunction:c=>{s=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{i=c}}}var d=Ot();var O=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(){}};var wt=class extends O{#t;#e;#s;constructor(){super(),this.#s=e=>{if(typeof window<"u"&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#s=e,this.#e?.(),this.#e=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},G=new wt;var St=class extends O{#t=!0;#e;#s;constructor(){super(),this.#s=e=>{if(typeof window<"u"&&window.addEventListener){let t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#s=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(s=>{s(e)}))}isOnline(){return this.#t}},L=new St;function te(){let e,t,s=new Promise((i,n)=>{e=i,t=n});s.status="pending",s.catch(()=>{});function r(i){Object.assign(s,i),delete s.resolve,delete s.reject}return s.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},s.reject=i=>{r({status:"rejected",reason:i}),t(i)},s}var M=(()=>{let e=()=>Qe;return{isServer(){return e()},setIsServer(t){e=t}}})();function Et(e){return Math.min(1e3*2**e,3e4)}function Me(e){return(e??"online")==="online"?L.isOnline():!0}var de=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function pe(e){let t=!1,s=0,r,i=te(),n=()=>i.status!=="pending",o=h=>{if(!n()){let y=new de(h);l(y),e.onCancel?.(y)}},c=()=>{t=!0},a=()=>{t=!1},p=()=>G.isFocused()&&(e.networkMode==="always"||L.isOnline())&&e.canRun(),u=()=>Me(e.networkMode)&&e.canRun(),f=h=>{n()||(r?.(),i.resolve(h))},l=h=>{n()||(r?.(),i.reject(h))},b=()=>new Promise(h=>{r=y=>{(n()||p())&&h(y)},e.onPause?.()}).then(()=>{r=void 0,n()||e.onContinue?.()}),m=()=>{if(n())return;let h,y=s===0?e.initialPromise:void 0;try{h=y??e.fn()}catch(v){h=Promise.reject(v)}Promise.resolve(h).then(f).catch(v=>{if(n())return;let w=e.retry??(M.isServer()?0:3),T=e.retryDelay??Et,_=typeof T=="function"?T(s,v):T,U=w===!0||typeof w=="number"&&s<w||typeof w=="function"&&w(s,v);if(t||!U){l(v);return}s++,e.onFail?.(s,v),Ge(_).then(()=>p()?void 0:b()).then(()=>{t?l(v):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:a,canStart:u,start:()=>(u()?m():b().then(m),i)}}var me=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),X(this.gcTime)&&(this.#t=C.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(M.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#t!==void 0&&(C.clearTimeout(this.#t),this.#t=void 0)}};function Ze(e){return{onFetch:(t,s)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,n=t.state.data?.pages||[],o=t.state.data?.pageParams||[],c={pages:[],pageParams:[]},a=0,p=async()=>{let u=!1,f=m=>{Je(m,()=>t.signal,()=>u=!0)},l=fe(t.options,t.fetchOptions),b=async(m,h,y)=>{if(u)return Promise.reject(t.signal.reason);if(h==null&&m.pages.length)return Promise.resolve(m);let w=(()=>{let Pe={client:t.client,queryKey:t.queryKey,pageParam:h,direction:y?"backward":"forward",meta:t.options.meta};return f(Pe),Pe})(),T=await l(w),{maxPages:_}=t.options,U=y?ze:$e;return{pages:U(m.pages,T,_),pageParams:U(m.pageParams,h,_)}};if(i&&n.length){let m=i==="backward",h=m?Xe:xe,y={pages:n,pageParams:o},v=h(r,y);c=await b(y,v,m)}else{let m=e??n.length;do{let h=a===0?o[0]??r.initialPageParam:xe(r,c);if(a>0&&h==null)break;c=await b(c,h),a++}while(a<m)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=p}}}function xe(e,{pages:t,pageParams:s}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,s[r],s):void 0}function Xe(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}function Ye(e,t){return t?xe(e,t)!=null:!1}function et(e,t){return!t||!e.getPreviousPageParam?!1:Xe(e,t)!=null}var rt=class extends me{#t;#e;#s;#r;#i;#n;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=st(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#t}get promise(){return this.#n?.promise}setOptions(e){if(this.options={...this.#a,...e},e?._type&&(this.#t=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let t=st(this.options);t.data!==void 0&&(this.setState(tt(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){let s=ee(this.state.data,e,this.options);return this.#u({data:s,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),s}setState(e){this.#u({type:"setState",state:e})}cancel(e){let t=this.#n?.promise;return this.#n?.cancel(e),t?t.then(g).catch(g):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=>R(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===B||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>P(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:!ce(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#n&&(this.#o||this.#h()?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#h(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#u({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){let a=this.observers.find(p=>p.options.queryFn);a&&this.setOptions(a.options)}let s=new AbortController,r=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#o=!0,s.signal)})},i=()=>{let a=fe(this.options,t),u=(()=>{let f={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(f),f})();return this.#o=!1,this.options.persister?this.options.persister(a,u,this):a(u)},o=(()=>{let a={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(a),a})();(this.#t==="infinite"?Ze(this.options.pages):this.options.behavior)?.onFetch(o,this),this.#s=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#u({type:"fetch",meta:o.fetchOptions?.meta}),this.#n=pe({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:a=>{a instanceof de&&a.revert&&this.setState({...this.#s,fetchStatus:"idle"}),s.abort()},onFail:(a,p)=>{this.#u({type:"failed",failureCount:a,error:p})},onPause:()=>{this.#u({type:"pause"})},onContinue:()=>{this.#u({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{let a=await this.#n.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#r.config.onSuccess?.(a,this),this.#r.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof de){if(a.silent)return this.#n.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#u({type:"error",error:a}),this.#r.config.onError?.(a,this),this.#r.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#u(e){let t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Te(s.data,this.options),fetchMeta:e.meta??null};case"success":let r={...s,...tt(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#s=e.manual?r:void 0,r;case"error":let i=e.error;return{...s,error:i,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),d.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function Te(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Me(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function tt(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function st(e){let t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,r=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var it=class extends O{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,s){let r=t.queryKey,i=t.queryHash??Y(r,t),n=this.get(i);return n||(n=new rt({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(r)}),this.add(n)),n}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#t.get(e.queryHash);t&&(e.destroy(),t===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){d.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(s=>he(t,s))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(s=>he(e,s)):t}notify(e){d.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){d.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){d.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}};var nt=class extends me{#t;#e;#s;#r;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#s=e.mutationCache,this.#e=[],this.state=e.state||Fe(),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.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#s.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=pe({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(n,o)=>{this.#i({type:"failed",failureCount:n,error:o})},onPause:()=>{this.#i({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.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.#s.config.onMutate&&await this.#s.config.onMutate(e,this,s);let o=await this.options.onMutate?.(e,s);o!==this.state.context&&this.#i({type:"pending",context:o,variables:e,isPaused:i})}let n=await this.#r.start();return await this.#s.config.onSuccess?.(n,e,this.state.context,this,s),await this.options.onSuccess?.(n,e,this.state.context,s),await this.#s.config.onSettled?.(n,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(n,null,e,this.state.context,s),this.#i({type:"success",data:n}),n}catch(n){try{await this.#s.config.onError?.(n,e,this.state.context,this,s)}catch(o){Promise.reject(o)}try{await this.options.onError?.(n,e,this.state.context,s)}catch(o){Promise.reject(o)}try{await this.#s.config.onSettled?.(void 0,n,this.state.variables,this.state.context,this,s)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,n,e,this.state.context,s)}catch(o){Promise.reject(o)}throw this.#i({type:"error",error:n}),n}finally{this.#s.runNext(this)}}#i(e){let t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,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{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),d.batch(()=>{this.#e.forEach(s=>{s.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}};function Fe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ot=class extends O{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#s=0}#t;#e;#s;build(e,t,s){let r=new nt({client:e,mutationCache:this,mutationId:++this.#s,options:e.defaultMutationOptions(t),state:s});return this.add(r),r}add(e){this.#t.add(e);let t=ye(e);if(typeof t=="string"){let s=this.#e.get(t);s?s.push(e):this.#e.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){let t=ye(e);if(typeof t=="string"){let s=this.#e.get(t);if(s)if(s.length>1){let r=s.indexOf(e);r!==-1&&s.splice(r,1)}else s[0]===e&&this.#e.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=ye(e);if(typeof t=="string"){let r=this.#e.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){let t=ye(e);return typeof t=="string"?this.#e.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){d.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){let t={exact:!0,...e};return this.getAll().find(s=>le(t,s))}findAll(e={}){return this.getAll().filter(t=>le(e,t))}notify(e){d.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(t=>t.state.isPaused);return d.batch(()=>Promise.all(e.map(t=>t.continue().catch(g))))}};function ye(e){return e.options.scope?.id}var Pt=class{#t;#e;#s;#r;#i;#n;#a;#o;constructor(e={}){this.#t=e.queryCache||new it,this.#e=e.mutationCache||new ot,this.#s=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#n=0}mount(){this.#n++,this.#n===1&&(this.#a=G.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#o=L.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#n--,this.#n===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),s=this.#t.build(this,t),r=s.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(P(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:t,state:s})=>{let r=s.data;return[t,r]})}setQueryData(e,t,s){let r=this.defaultQueryOptions({queryKey:e}),n=this.#t.get(r.queryHash)?.state.data,o=Ve(t,n);if(o!==void 0)return this.#t.build(this,r).setData(o,{...s,manual:!0})}setQueriesData(e,t,s){return d.batch(()=>this.#t.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,s)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state}removeQueries(e){let t=this.#t;d.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){let s=this.#t;return d.batch(()=>(s.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let s={revert:!0,...t},r=d.batch(()=>this.#t.findAll(e).map(i=>i.cancel(s)));return Promise.all(r).then(g).catch(g)}invalidateQueries(e,t={}){return d.batch(()=>(this.#t.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){let s={...t,cancelRefetch:t.cancelRefetch??!0},r=d.batch(()=>this.#t.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let n=i.fetch(void 0,s);return s.throwOnError||(n=n.catch(g)),i.state.fetchStatus==="paused"?Promise.resolve():n}));return Promise.all(r).then(g)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let s=this.#t.build(this,t);return s.isStaleByTime(P(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(g).catch(g)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(g).catch(g)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return L.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#s}setDefaultOptions(e){this.#s=e}setQueryDefaults(e,t){this.#r.set(Q(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],s={};return t.forEach(r=>{H(e,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(e,t){this.#i.set(Q(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],s={};return t.forEach(r=>{H(e,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#s.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Y(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===B&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#s.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}};var D=class extends O{constructor(e,t){super(),this.options=t,this.#t=e,this.#o=null,this.#a=te(),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#s=void 0;#r=void 0;#i;#n;#a;#o;#h;#u;#d;#l;#p;#c;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),at(this.#e,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return De(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return De(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#R(),this.#O(),this.#e.removeObserver(this)}setOptions(e){let t=this.options,s=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof R(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#e.setOptions(this.options),t._defaulted&&!j(this.options,t)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});let r=this.hasListeners();r&&ut(this.#e,s,this.options,t)&&this.#f(),this.updateResult(),r&&(this.#e!==s||R(this.options.enabled,this.#e)!==R(t.enabled,this.#e)||P(this.options.staleTime,this.#e)!==P(t.staleTime,this.#e))&&this.#y();let i=this.#v();r&&(this.#e!==s||R(this.options.enabled,this.#e)!==R(t.enabled,this.#e)||i!==this.#c)&&this.#g(i)}getOptimisticResult(e){let t=this.#t.getQueryCache().build(this.#t,e),s=this.createResult(t,e);return Qt(this,s)&&(this.#r=s,this.#n=this.options,this.#i=this.#e.state),s}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(s,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,r))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#t.defaultQueryOptions(e),s=this.#t.getQueryCache().build(this.#t,t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(e){this.#w();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(g)),t}#y(){this.#R();let e=P(this.options.staleTime,this.#e);if(M.isServer()||this.#r.isStale||!X(e))return;let s=ce(this.#r.dataUpdatedAt,e)+1;this.#l=C.setTimeout(()=>{this.#r.isStale||this.updateResult()},s)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#g(e){this.#O(),this.#c=e,!(M.isServer()||R(this.options.enabled,this.#e)===!1||!X(this.#c)||this.#c===0)&&(this.#p=C.setInterval(()=>{(this.options.refetchIntervalInBackground||G.isFocused())&&this.#f()},this.#c))}#b(){this.#y(),this.#g(this.#v())}#R(){this.#l!==void 0&&(C.clearTimeout(this.#l),this.#l=void 0)}#O(){this.#p!==void 0&&(C.clearInterval(this.#p),this.#p=void 0)}createResult(e,t){let s=this.#e,r=this.options,i=this.#r,n=this.#i,o=this.#n,a=e!==s?e.state:this.#s,{state:p}=e,u={...p},f=!1,l;if(t._optimisticResults){let S=this.hasListeners(),Z=!S&&at(e,t),oe=S&&ut(e,s,t,r);(Z||oe)&&(u={...u,...Te(p.data,e.options)}),t._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:b,errorUpdatedAt:m,status:h}=u;l=u.data;let y=!1;if(t.placeholderData!==void 0&&l===void 0&&h==="pending"){let S;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(S=i.data,y=!0):S=typeof t.placeholderData=="function"?t.placeholderData(this.#d?.state.data,this.#d):t.placeholderData,S!==void 0&&(h="success",l=ee(i?.data,S,t),f=!0)}if(t.select&&l!==void 0&&!y)if(i&&l===n?.data&&t.select===this.#h)l=this.#u;else try{this.#h=t.select,l=t.select(l),l=ee(i?.data,l,t),this.#u=l,this.#o=null}catch(S){this.#o=S}this.#o&&(b=this.#o,l=this.#u,m=Date.now(),h="error");let v=u.fetchStatus==="fetching",w=h==="pending",T=h==="error",_=w&&v,U=l!==void 0,k={status:h,fetchStatus:u.fetchStatus,isPending:w,isSuccess:h==="success",isError:T,isInitialLoading:_,isLoading:_,data:l,dataUpdatedAt:u.dataUpdatedAt,error:b,errorUpdatedAt:m,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:u.dataUpdateCount>a.dataUpdateCount||u.errorUpdateCount>a.errorUpdateCount,isFetching:v,isRefetching:v&&!w,isLoadingError:T&&!U,isPaused:u.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:T&&U,isStale:Ie(e,t),refetch:this.refetch,promise:this.#a,isEnabled:R(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let S=k.data!==void 0,Z=k.status==="error"&&!S,oe=ue=>{Z?ue.reject(k.error):S&&ue.resolve(k.data)},Ue=()=>{let ue=this.#a=k.promise=te();oe(ue)},ae=this.#a;switch(ae.status){case"pending":e.queryHash===s.queryHash&&oe(ae);break;case"fulfilled":(Z||k.data!==ae.value)&&Ue();break;case"rejected":(!Z||k.error!==ae.reason)&&Ue();break}}return k}updateResult(){let e=this.#r,t=this.createResult(this.#e,this.options);if(this.#i=this.#e.state,this.#n=this.options,this.#i.data!==void 0&&(this.#d=this.#e),j(t,e))return;this.#r=t;let s=()=>{if(!e)return!0;let{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#m.size)return!0;let n=new Set(i??this.#m);return this.options.throwOnError&&n.add("error"),Object.keys(this.#r).some(o=>{let c=o;return this.#r[c]!==e[c]&&n.has(c)})};this.#S({listeners:s()})}#w(){let e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;let t=this.#e;this.#e=e,this.#s=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(e){d.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function Ct(e,t){return R(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&R(t.retryOnMount,e)===!1)}function at(e,t){return Ct(e,t)||e.state.data!==void 0&&De(e,t,t.refetchOnMount)}function De(e,t,s){if(R(t.enabled,e)!==!1&&P(t.staleTime,e)!=="static"){let r=typeof s=="function"?s(e):s;return r==="always"||r!==!1&&Ie(e,t)}return!1}function ut(e,t,s,r){return(e!==t||R(r.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&Ie(e,s)}function Ie(e,t){return R(t.enabled,e)!==!1&&e.isStaleByTime(P(t.staleTime,e))}function Qt(e,t){return!j(e.getCurrentResult(),t)}var Ae=class extends D{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:s}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:n,isError:o,isRefetchError:c}=r,a=s.fetchMeta?.fetchMore?.direction,p=o&&a==="forward",u=i&&a==="forward",f=o&&a==="backward",l=i&&a==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Ye(t,s.data),hasPreviousPage:et(t,s.data),isFetchNextPageError:p,isFetchingNextPage:u,isFetchPreviousPageError:f,isFetchingPreviousPage:l,isRefetchError:c&&!p&&!f,isRefetching:n&&!u&&!l}}};var qe=class extends O{#t;#e=void 0;#s;#r;constructor(e,t){super(),this.#t=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.#t.defaultMutationOptions(e),j(this.options,t)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&Q(t.mutationKey)!==Q(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#n(e)}getCurrentResult(){return this.#e}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#i(),this.#n()}mutate(e,t){return this.#r=t,this.#s?.removeObserver(this),this.#s=this.#t.getMutationCache().build(this.#t,this.options),this.#s.addObserver(this),this.#s.execute(e)}#i(){let e=this.#s?.state??Fe();this.#e={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#n(e){d.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#e.variables,s=this.#e.context,r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,t,s,r)}catch(i){Promise.reject(i)}try{this.#r.onSettled?.(e.data,null,t,s,r)}catch(i){Promise.reject(i)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,t,s,r)}catch(i){Promise.reject(i)}try{this.#r.onSettled?.(void 0,e.error,t,s,r)}catch(i){Promise.reject(i)}}}this.listeners.forEach(t=>{t(this.#e)})})}};function ct(e,t){let s=new Set(t);return e.filter(r=>!s.has(r))}function Mt(e,t,s){let r=e.slice(0);return r[t]=s,r}var ke=class extends O{#t;#e;#s;#r;#i;#n;#a;#o;#h;#u=[];constructor(e,t,s){super(),this.#t=e,this.#r=s,this.#s=[],this.#i=[],this.#e=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#s=e,this.#r=t,d.batch(()=>{let s=this.#i,r=this.#c(this.#s);r.forEach(u=>u.observer.setOptions(u.defaultedQueryOptions));let i=r.map(u=>u.observer),n=i.map(u=>u.getCurrentResult()),o=s.length!==i.length,c=i.some((u,f)=>u!==s[f]),a=o||c,p=a?!0:n.some((u,f)=>{let l=this.#e[f];return!l||!j(u,l)});!a&&!p||(a&&(this.#u=r,this.#i=i),this.#e=n,this.hasListeners()&&(a&&(ct(s,i).forEach(u=>{u.destroy()}),ct(i,s).forEach(u=>{u.subscribe(f=>{this.#m(u,f)})})),this.#f()))})}getCurrentResult(){return this.#e}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let s=this.#c(e),r=s.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=s.map(n=>n.defaultedQueryOptions.queryHash);return[r,n=>this.#l(n??r,t,i),()=>this.#d(r,s)]}#d(e,t){return t.map((s,r)=>{let i=e[r];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,n=>{t.forEach(o=>{o.observer.trackProp(n)})})})}#l(e,t,s){if(t){let r=this.#h,i=s!==void 0&&r!==void 0&&(r.length!==s.length||s.some((n,o)=>n!==r[o]));return(!this.#n||this.#e!==this.#o||i||t!==this.#a)&&(this.#a=t,this.#o=this.#e,s!==void 0&&(this.#h=s),this.#n=K(this.#n,t(e))),this.#n}return e}#p(){return this.#r?.combine!==void 0&&this.#i.some((e,t)=>e.options.suspense&&this.#e[t]?.data===void 0)}#c(e){let t=new Map;this.#i.forEach(r=>{let i=r.options.queryHash;if(!i)return;let n=t.get(i);n?n.push(r):t.set(i,[r])});let s=[];return e.forEach(r=>{let i=this.#t.defaultQueryOptions(r),o=t.get(i.queryHash)?.shift()??new D(this.#t,i);s.push({defaultedQueryOptions:i,observer:o})}),s}#m(e,t){let s=this.#i.indexOf(e);s!==-1&&(this.#e=Mt(this.#e,s,t),this.#f())}#f(){if(this.hasListeners()){let e=this.#d(this.#e,this.#u),t=this.#p(),s=this.#n,r=t?s:this.#l(e,this.#r?.combine);(t||s!==r)&&d.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};var $=E(F(),1),ht=E(He(),1),je=$.createContext(void 0),I=e=>{let t=$.useContext(je);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},xt=({client:e,children:t})=>($.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,ht.jsx)(je.Provider,{value:e,children:t}));var N=E(F(),1);var se=E(F(),1),Tt=E(He(),1);function Ft(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Dt=se.createContext(Ft()),ve=()=>se.useContext(Dt);var lt=E(F(),1);var ge=(e,t,s)=>{let r=s?.state.error&&typeof e.throwOnError=="function"?V(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},be=e=>{lt.useEffect(()=>{e.clearReset()},[e])},Re=({result:e,errorResetBoundary:t,throwOnError:s,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||V(s,[e.error,r]));var Oe=E(F(),1),ft=Oe.createContext(!1),we=()=>Oe.useContext(ft),qr=ft.Provider;var Se=e=>{if(e.suspense){let s=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>s(r(...i)):s(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},dt=(e,t)=>e.isLoading&&e.isFetching&&!t,re=(e,t)=>e?.suspense&&t.isPending,ie=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function Ee(e,t,s){let r=we(),i=ve(),n=I(s),o=n.defaultQueryOptions(e);n.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let c=n.getQueryCache().get(o.queryHash),a=e.subscribed!==!1;o._optimisticResults=r?"isRestoring":a?"optimistic":void 0,Se(o),ge(o,i,c),be(i);let p=!n.getQueryCache().get(o.queryHash),[u]=N.useState(()=>new t(n,o)),f=u.getOptimisticResult(o),l=!r&&a;if(N.useSyncExternalStore(N.useCallback(b=>{let m=l?u.subscribe(d.batchCalls(b)):g;return u.updateResult(),m},[u,l]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),N.useEffect(()=>{u.setOptions(o)},[o,u]),re(o,f))throw ie(o,u,i);if(Re({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:c,suspense:o.suspense}))throw f.error;return n.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!M.isServer()&&dt(f,r)&&(p?ie(o,u,i):c?.promise)?.catch(g).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?f:u.trackResult(f)}function It(e,t){return Ee(e,D,t)}var A=E(F(),1);function At(e,t){let s=I(t),[r]=A.useState(()=>new qe(s,e));A.useEffect(()=>{r.setOptions(e)},[r,e]);let i=A.useSyncExternalStore(A.useCallback(o=>r.subscribe(d.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),n=A.useCallback((o,c)=>{r.mutate(o,c).catch(g)},[r]);if(i.error&&V(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:n,mutateAsync:i.mutate}}var x=E(F(),1);function qt({queries:e,...t},s){let r=I(s),i=we(),n=ve(),o=x.useMemo(()=>e.map(h=>{let y=r.defaultQueryOptions(h);return y._optimisticResults=i?"isRestoring":"optimistic",y}),[e,r,i]);o.forEach(h=>{Se(h);let y=r.getQueryCache().get(h.queryHash);ge(h,n,y)}),be(n);let[c]=x.useState(()=>new ke(r,o,t)),[a,p,u]=c.getOptimisticResult(o,t.combine),f=!i&&t.subscribed!==!1;x.useSyncExternalStore(x.useCallback(h=>f?c.subscribe(d.batchCalls(h)):g,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),x.useEffect(()=>{c.setQueries(o,t)},[o,t,c]);let b=a.some((h,y)=>re(o[y],h))?a.flatMap((h,y)=>{let v=o[y];if(v&&re(v,h)){let w=new D(r,v);return ie(v,w,n)}return[]}):[];if(b.length>0)throw Promise.all(b);let m=a.find((h,y)=>{let v=o[y];return v&&Re({result:h,errorResetBoundary:n,throwOnError:v.throwOnError,query:r.getQueryCache().get(v.queryHash),suspense:v.suspense})});if(m?.error)throw m.error;return p(u())}var q=E(F(),1);function pt(e,t){return e.findAll(t.filters).map(s=>t.select?t.select(s):s.state)}function kt(e={},t){let s=I(t).getMutationCache(),r=q.useRef(e),i=q.useRef(null);return i.current===null&&(i.current=pt(s,e)),q.useEffect(()=>{r.current=e}),q.useSyncExternalStore(q.useCallback(n=>s.subscribe(()=>{let o=K(i.current,pt(s,r.current));i.current!==o&&(i.current=o,d.schedule(n))}),[s]),()=>i.current,()=>i.current)}function jt(e,t){return Ee(e,Ae,t)}var ne=E(F(),1);var mt="x-junior-version";var Ne="junior:dashboard-version";function yt(e){let t=e.headers.get(mt)?.trim();!t||typeof window>"u"||window.dispatchEvent(new CustomEvent(Ne,{detail:t}))}function wi(e){let[t,s]=(0,ne.useState)(e);return(0,ne.useEffect)(()=>{e&&s(e)},[e]),(0,ne.useEffect)(()=>{let r=i=>{s(i.detail)};return window.addEventListener(Ne,r),()=>window.removeEventListener(Ne,r)},[]),t}var _e=class extends Error{status;fields;code;apiError;constructor(t,s,r,i){super(`${t} returned ${s}`),this.status=s,this.fields=i?.fields,this.code=i?.code,r?.trim()&&(this.apiError=r.trim())}};async function z(e,t){let s,r,i;try{let n=await t.json();typeof n.error=="string"&&(s=n.error),typeof n.code=="string"&&(i=n.code),n.fields&&typeof n.fields=="object"&&(r=Object.fromEntries(Object.entries(n.fields).filter(o=>Array.isArray(o[1])&&o[1].every(c=>typeof c=="string"))))}catch{}throw new _e(e,t.status,s,{fields:r,code:i})}function J(){if(typeof window>"u")return;let e=window.__JUNIOR_DASHBOARD_BASE_PATH__??"/",t=e==="/"?"/auth/login":`${e}/auth/login`;if(window.location.pathname!==t){let s=`${window.location.pathname}${window.location.search||""}`,r=new URLSearchParams;s!=="/"&&r.set("next",s);let i=r.toString();window.location.assign(i?`${t}?${i}`:t)}}async function Pi(e,t,s){let r=await W(t,{body:JSON.stringify(s),credentials:"same-origin",headers:{"content-type":"application/json"},method:"PATCH"});return r.status===401&&J(),r.ok||await z(t,r),e.parse(await r.json())}async function Ci(e,t,s){let r=await W(t,{body:JSON.stringify(s),credentials:"same-origin",headers:{"content-type":"application/json"},method:"POST"});return r.status===401&&J(),r.ok||await z(t,r),e.parse(await r.json())}async function Qi(e,t,s){let r=await W(t,{body:JSON.stringify(s),credentials:"same-origin",headers:{"content-type":"application/json"},method:"PUT"});return r.status===401&&J(),r.ok||await z(t,r),e.parse(await r.json())}async function Mi(e){let t=await W(e,{credentials:"same-origin",method:"DELETE"});t.status===401&&J(),t.ok||await z(e,t)}async function xi(e,t,s={}){let r=await W(t,{body:JSON.stringify(s),credentials:"same-origin",headers:{"content-type":"application/json"},method:"DELETE"});return r.status===401&&J(),r.ok||await z(t,r),e.parse(await r.json())}async function W(e,t){let s=await fetch(e,t);return yt(s),s}async function Ti(e,t,s){let r=await Nt(t,s);return e.parse(await r.json())}async function Nt(e,t,s){let r=await W(e,{credentials:"same-origin",...t?{signal:t}:void 0,...s?{cache:"no-store",headers:s}:void 0});return r.status===401&&J(),!r.ok&&!(s&&r.status===304)&&await z(e,r),r}export{Rt as a,L as b,Pt as c,I as d,xt as e,qt as f,It as g,kt as h,At as i,jt as j,wi as k,_e as l,Pi as m,Ci as n,Qi as o,Mi as p,xi as q,Ti as r,Nt as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Rc as s,Sc as m,b as t}from"./chunk-YPMUHXYT.js";import{c as e}from"./chunk-7SZRL6FY.js";var r=e(t(),1);function o(a){return(0,r.jsx)("div",{className:s(m,"grid min-w-0 content-start gap-4 px-4 py-4 pb-[max(1rem,env(safe-area-inset-bottom))] sm:gap-6 sm:px-8 sm:py-8 sm:pb-8",a.className),children:a.children})}export{o as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as u,y as p}from"./chunk-R4ORRE77.js";import{d as n,i as r,m as s,n as c}from"./chunk-GO45RQDL.js";import{ga as i,ha as a}from"./chunk-VXT3FIVL.js";var m="junior:composer:autocorrect";function C(){return p(m,!1)}function S(e){let v=n();return r({mutationFn:o=>s(i,`/api/conversations/${encodeURIComponent(e)}/auto-archive`,{autoArchive:o}),onSuccess:o=>{v.setQueryData(u(e),t=>t&&{...t,autoArchive:o.autoArchive,detailEtag:void 0})}})}function d(){let e=n();return r({mutationFn:()=>c(a,"/api/conversations/archive-done",{}),onSuccess:async()=>{await e.invalidateQueries({queryKey:["dashboard","conversations"]})}})}export{C as a,S as b,d as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as Pt}from"./chunk-FE522UEA.js";import{a as we,b as Pe,d as Ee}from"./chunk-GMZIELFU.js";import{a as ve}from"./chunk-IZWTFLCC.js";import{X as ye,e as ne,f as ce,g as st,j as me,k as pe,o as Te,p as xe,q as ge}from"./chunk-WRXMQB7X.js";import{a as fe}from"./chunk-CQY6BYUB.js";import{a as Vo,b as se,e as Xt,f as ue,i as he}from"./chunk-B5ZN3SWQ.js";import{b as jt}from"./chunk-CR2ICLSH.js";import{D as X,G as U,H as z,I as de,Ia as D,J as Y,Ja as Re,Jc as Oe,M as zt,N as le,Na as Et,Ob as Ce,Oc as Ne,Qa as q,Vb as De,_ as ft,a as C,b as ot,c as ee,e as oe,f as re,g as B,gc as Se,h as lt,j as Bt,l as ie,nb as be,o as ae}from"./chunk-YPMUHXYT.js";import{b as Ao,c as v}from"./chunk-7SZRL6FY.js";var M={};Ao(M,{Action:()=>so,Arrow:()=>fo,Close:()=>eo,Content:()=>Ke,Description:()=>Qe,Portal:()=>io,Positioner:()=>uo,Provider:()=>_e,Root:()=>Ge,Title:()=>to,Viewport:()=>Fe,createToastManager:()=>ho,useToastManager:()=>po});var Me=v(C(),1);var bt=v(C(),1),$t=bt.createContext(void 0);function k(){let e=bt.useContext($t);if(!e)throw new Error(lt(73));return e}var Ie=0;function Ct(e){return Ie+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${Ie}`}function Dt(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){let s=e(t);return typeof s=="string"?{description:s}:s}return e}function Wt(e){let t=new Map,s=0,o=0;return e.forEach((i,c)=>{let n=i.transitionStatus==="ending";t.set(i.id,{value:i,domIndex:c,visibleIndex:n?-1:s,offsetY:o}),o+=i.height||0,n||(s+=1)}),t}function Gt(e,t){let s=0;return e.map(o=>{if(o.transitionStatus==="ending")return o;let i=s>=t;return s+=1,o.limited===i?o:{...o,limited:i}})}var L={toasts:e=>e.toasts,isEmpty:e=>e.toasts.length===0,toast:(e,t)=>e.toastMetadata.get(t)?.value,toastIndex:(e,t)=>e.toastMetadata.get(t)?.domIndex??-1,toastOffsetY:(e,t)=>e.toastMetadata.get(t)?.offsetY??0,toastVisibleIndex:(e,t)=>e.toastMetadata.get(t)?.visibleIndex??-1,focused:e=>e.focused,expanded:e=>e.hovering||e.focused,expandedOrOutOfFocus:e=>e.hovering||e.focused||!e.isWindowFocused,prevFocusElement:e=>e.prevFocusElement},St=class extends ne{timers=new Map;areTimersPaused=!1;constructor(t){super({...t,toastMetadata:Wt(t.toasts)},{},L)}setViewport=t=>{this.set("viewport",t)};syncProviderProps(t,s){let o=this.state.limit!==s;if(this.state.timeout===t&&!o)return;let i={timeout:t,limit:s};if(o){let c=Gt(this.state.toasts,s);i.toasts=c,i.toastMetadata=Wt(c)}this.update(i)}disposeEffect=()=>()=>{this.timers.forEach(t=>{t.timeout?.clear()}),this.timers.clear()};removeToast(t,s=!1){let o=L.toastIndex(this.state,t);if(o===-1)return;let i=this.state.toasts[o];s||i?.onRemove?.();let c=[...this.state.toasts];c.splice(o,1),this.setToasts(c)}addToast=t=>{let{timeout:s,limit:o}=this.state,i=t.id||Ct("toast");if(t.id){let r=L.toast(this.state,t.id);if(r)if(r.transitionStatus==="ending")this.removeToast(t.id,!0);else{let{id:u,transitionStatus:a,...f}=t;return this.updateToastInternal(t.id,f,!0,!0),t.id}}let c={...t,id:i,updateKey:0,transitionStatus:"starting"},n=[c,...this.state.toasts];this.setToasts(Gt(n,o));let d=c.timeout??s;return c.type!=="loading"&&d>0&&this.scheduleTimer(i,d,()=>this.closeToast(i)),L.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),i};updateToast=(t,s)=>{let o=L.toast(this.state,t);!o||o.transitionStatus==="ending"||this.updateToastInternal(t,typeof s=="function"?s(o):s,!1,!0)};updateToastInternal=(t,s,o=!1,i=!1)=>{let{timeout:c,toasts:n}=this.state,d=L.toast(this.state,t);if(!d||d.transitionStatus==="ending")return;let r={...d,...s,...i&&{updateKey:d.updateKey+1}};this.setToasts(n.map(V=>V.id===t?r:V));let u=r.timeout??c,a=d.timeout??c,f=Object.hasOwn(s,"timeout"),h=r.transitionStatus!=="ending"&&r.type!=="loading"&&u>0,R=this.timers.has(t),g=a!==u,E=d.type==="loading";if(!h&&R){this.clearTimer(t);return}h&&(!R||g||f||E||o)&&(this.clearTimer(t),this.scheduleTimer(t,u,()=>this.closeToast(t)),L.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=t=>{let s=t===void 0,{limit:o,toasts:i}=this.state,c;if(s)c=i,this.clearTimers();else{let r=L.toast(this.state,t);if(!r)return;c=[r],this.clearTimer(t)}let n=i.map(r=>s||r.id===t?{...r,transitionStatus:"ending",height:0}:r),d=Gt(n,o);this.setToasts(d,!d.some(r=>r.transitionStatus!=="ending")),c.forEach(r=>{r.transitionStatus!=="ending"&&r.onClose?.()}),this.handleFocusManagement(t)};promiseToast=(t,s)=>{let o=Dt(s.loading),i=this.addToast({...o,type:"loading"}),c=t.then(n=>{let d=Dt(s.success,n);return this.updateToast(i,{...d,type:"success",timeout:d.timeout}),n}).catch(n=>{let d=Dt(s.error,n);return this.updateToast(i,{...d,type:"error",timeout:d.timeout}),Promise.reject(n)});return{}.hasOwnProperty.call(s,"setPromise")&&s.setPromise(c),c};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(t=>{t.timeout&&(t.timeout.clear(),t.remaining=Math.max(t.remaining-(Date.now()-t.start),0))}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((t,s)=>{t.remaining=t.remaining>0?t.remaining:t.delay,t.timeout??=Xt.create(),t.timeout.start(t.remaining,()=>{this.handleTimerFired(s),t.callback()}),t.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=t=>{if(t.pointerType!=="touch")return;let s=Y(t);z(this.state.viewport,s)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(t,s,o){let i=Date.now(),n=!L.expandedOrOutOfFocus(this.state)?Xt.create():void 0;n?.start(s,()=>{this.handleTimerFired(t),o()}),this.timers.set(t,{timeout:n,start:i,delay:s,remaining:s,callback:o})}clearTimers(){this.timers.forEach(t=>{t.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(t){this.timers.get(t)?.timeout?.clear(),this.timers.delete(t),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(t){this.timers.delete(t),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(t,s=t.length===0){let o={toasts:t,toastMetadata:Wt(t)};s&&(o.hovering=!1,o.focused=!1),this.update(o)}handleFocusManagement(t){let s=U(X(this.state.viewport));if(!this.state.viewport||!z(this.state.viewport,s)||!ft(s))return;if(t===void 0){this.restoreFocusToPrevElement();return}let o=L.toasts(this.state),i=L.toastIndex(this.state,t),c=(d,r)=>{for(let u=d;u>=0&&u<o.length;u+=r)if(o[u].transitionStatus!=="ending")return o[u];return null},n=c(i+1,1)??c(i-1,-1);n?n.ref?.current?.focus():this.restoreFocusToPrevElement()}};var Ot=v(ot(),1),_e=function(t){let{children:s,timeout:o=5e3,limit:i=3,toastManager:c}=t,n=re(()=>new St({timeout:o,limit:i,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return se(n.disposeEffect),Me.useEffect(function(){return c?c[" subscribe"](({action:u,options:a})=>{let f=a.id;u==="promise"&&a.promise?n.promiseToast(a.promise,a):u==="update"&&f?n.updateToast(f,a.updates):u==="close"?n.closeToast(f):n.addToast(a)}):void 0},[n,c]),(0,Ot.jsxs)($t.Provider,{value:n,children:[(0,Ot.jsx)(Fo,{store:n,timeout:o,limit:i}),s]})};function Fo(e){let{store:t,timeout:s,limit:o}=e;return B(()=>{t.syncProviderProps(s,o)},[t,s,o]),null}var A=v(C(),1);var Ae="--toast-frontmost-height";var j=v(ot(),1),Fe=A.forwardRef(function(t,s){let{render:o,className:i,style:c,children:n,...d}=t,r=k(),u=ue(),a=A.useRef(!1),f=A.useRef(!1),h=A.useRef(!1),R=r.useState("isEmpty"),g=r.useState("toasts"),E=r.useState("focused"),V=r.useState("expanded"),mt=r.useState("prevFocusElement"),$=g[0]?.height,W=g.some(m=>m.transitionStatus==="ending"),rt=g.filter(m=>m.priority==="high");A.useEffect(()=>{let m=r.state.viewport;if(!m||R)return;let S=ie(m),y=X(m);function ht(N){N.key==="F6"&&Y(N)!==m&&(N.preventDefault(),r.set("prevFocusElement",U(y)),m?.focus({preventScroll:!0}),r.pauseTimers(),r.set("focused",!0))}function gt(N){Y(N)===S&&(r.set("isWindowFocused",!1),r.pauseTimers())}function et(N){if(N.relatedTarget)return;let vt=Y(N),Tt=U(X(m));(vt===S||!z(m,vt)||!ft(Tt))&&r.resumeTimers(),u.start(0,()=>r.set("isWindowFocused",!0))}return ce(st(S,"keydown",ht),st(S,"blur",gt,!0),st(S,"focus",et,!0),st(y,"pointerdown",r.handleDocumentPointerDown,!0))},[r,u,R]);function nt(m){a.current=!0;let S=m.relatedTarget===r.state.viewport?g.find(y=>y.transitionStatus!=="ending"&&!y.limited):void 0;S?S.ref?.current?.focus():r.restoreFocusToPrevElement()}function it(m){m.key==="Tab"&&m.shiftKey&&Y(m.nativeEvent)===r.state.viewport&&(m.preventDefault(),r.restoreFocusToPrevElement())}function Q(){r.state.toasts.some(S=>S.transitionStatus==="ending")||h.current||!f.current||(r.set("hovering",!1),r.select("expandedOrOutOfFocus")||r.resumeTimers(),f.current=!1)}A.useEffect(Q,[W,r]);function Z(){r.pauseTimers(),r.set("hovering",!0),f.current=!1}function pt(){f.current=!0,Q()}function at(m){m.pointerType==="touch"&&(h.current=!0)}function tt(m){m.pointerType==="touch"&&(h.current=!1,Q())}function G(){if(a.current){a.current=!1;return}E||ft(U(X(r.state.viewport)))&&(r.set("focused",!0),r.pauseTimers())}function b(m){!E||z(r.state.viewport,m.relatedTarget)||(r.set("focused",!1),r.select("expandedOrOutOfFocus")||r.resumeTimers())}let ct={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:Z,onMouseMove:Z,onMouseLeave:pt,onFocus:G,onBlur:b,onKeyDown:it,onClick:G,onPointerDown:at,onPointerUp:tt,onPointerCancel:tt,style:{[Ae]:$?`${$}px`:void 0}},H={expanded:V},K=!R&&mt&&(0,j.jsx)(me,{onFocus:nt}),ut=D("div",t,{ref:[s,r.setViewport],state:H,props:[ct,d,{children:(0,j.jsxs)(A.Fragment,{children:[K,n,K]})}]});return(0,j.jsxs)(A.Fragment,{children:[K,ut,!E&&rt.length>0&&(0,j.jsx)("div",{style:fe,children:rt.map(m=>(0,j.jsxs)("div",{role:"alert","aria-atomic":!0,children:[(0,j.jsx)("div",{children:m.title}),(0,j.jsx)("div",{children:m.description})]},m.id))})]})});var x=v(C(),1),$e=v(Vo(),1);var Nt=v(C(),1),Kt=Nt.createContext(void 0);function J(){let e=Nt.useContext(Kt);if(!e)throw new Error(lt(66));return e}var It="--toast-index",Le="--toast-offset-y",Ye="--toast-height",ke="--toast-swipe-movement-x",He="--toast-swipe-movement-y";var Be="data-swipe-direction",Ms=zt.startingStyle,_s=zt.endingStyle;var We=v(ot(),1),Lo={...le,swipeDirection(e){return e?{[Be]:e}:null}},ze=40,Yo=10,je=.5,ko=1,Ho=`${Te},${xe}`,Ge=x.forwardRef(function(t,s){let{toast:o,render:i,className:c,swipeDirection:n=["down","right"],style:d,...r}=t,u=o.positionerProps?.anchor!==void 0,a=[];u||(a=Array.isArray(n)?n:[n]);let f=a.length>0,h=k(),[R,g]=x.useState(void 0),[E,V]=x.useState(!1),[mt,$]=x.useState(!1),[W,rt]=x.useState({x:0,y:0}),[nt,it]=x.useState({x:0,y:0,scale:1}),[Q,Z]=x.useState(),[pt,at]=x.useState(),[tt,G]=x.useState(null),b=x.useRef(null),ct=x.useRef(void 0),H=x.useRef({x:0,y:0}),K=x.useRef({x:0,y:0,scale:1}),ut=x.useRef(void 0),m=x.useRef(0),S=x.useRef(!1),y=x.useRef({x:0,y:0}),ht=x.useRef(!1),gt=x.useRef({x:0,y:0}),et=x.useRef(null),N=x.useRef(null),vt=h.useState("toastIndex",o.id),Tt=h.useState("toastVisibleIndex",o.id),To=h.useState("toastOffsetY",o.id),xo=h.useState("focused"),kt=h.useState("expanded");he({open:o.transitionStatus!=="ending",ref:b,onComplete(){o.transitionStatus==="ending"&&h.removeToast(o.id)}});let Rt=Bt((l=!1)=>{let T=b.current;if(!T)return;let P=T.style.height;T.style.height="auto";let _=T.offsetHeight;T.style.height=P;function I(){h.updateToastInternal(o.id,{ref:b,height:_,transitionStatus:void 0})}l?$e.flushSync(I):I()});B(()=>{let l=ct.current;o.transitionStatus!=="starting"&&l===o.id||(l!==void 0&&(g(void 0),it({x:0,y:0,scale:1}),xt({x:0,y:0})),ct.current=o.id,Rt())},[Rt,o.id,o.transitionStatus]);function xt(l){gt.current=l,rt(l)}B(()=>()=>{N.current?.abort()},[]);function go(l,T){let P=w=>w>0?w**je:-(Math.abs(w)**je),_=l>0&&!a.includes("right")||l<0&&!a.includes("left"),I=T>0&&!a.includes("down")||T<0&&!a.includes("up");return{x:_?P(l):l,y:I?P(T):T}}let wt=Bt(l=>{if(l.pointerId!==et.current)return;et.current=null,N.current?.abort(),N.current=null,V(!1),$(!1),G(null);let T=K.current;if(l.type==="pointercancel"||S.current){xt({x:T.x,y:T.y}),g(void 0);return}let P=gt.current,_=P.x-T.x,I=P.y-T.y,w;for(let O of a)if(Pt(O,_,I)>ze){w=O;break}w?(g(w),h.closeToast(o.id)):(xt({x:T.x,y:T.y}),g(void 0))});function vo(l){if(l.button!==0)return;l.pointerType==="touch"&&h.pauseTimers();let T=Y(l.nativeEvent);if(de(T,`button,a,input,textarea,[role="button"],${Ho}`))return;S.current=!1,ut.current=void 0,m.current=0,et.current=l.pointerId,H.current={x:l.clientX,y:l.clientY},y.current=H.current;let _=l.currentTarget,I=ve(_);K.current=I,it(I),xt({x:I.x,y:I.y}),h.set("hovering",!0),V(!0),$(!1),G(null),ht.current=!0,N.current?.abort();let w=new AbortController;N.current=w;let O=X(_);O.addEventListener("pointerup",wt,{signal:w.signal}),O.addEventListener("pointercancel",wt,{signal:w.signal}),_.setPointerCapture?.(l.pointerId)}function Ro(l){if(l.pointerId!==et.current)return;l.preventDefault(),ht.current&&(H.current={x:l.clientX,y:l.clientY},ht.current=!1);let{clientY:T,clientX:P,movementX:_,movementY:I}=l;(I<0&&T>y.current.y||I>0&&T<y.current.y)&&(y.current={x:y.current.x,y:T}),(_<0&&P>y.current.x||_>0&&P<y.current.x)&&(y.current={x:P,y:y.current.y});let w=P-H.current.x,O=T-H.current.y,Do=T-y.current.y,So=P-y.current.x,dt=tt;if(!mt&&Math.sqrt(w*w+O*O)>=ko){$(!0);let yt=a.includes("left")||a.includes("right"),Io=a.includes("up")||a.includes("down");if(yt&&Io){let Mo=Math.abs(w),_o=Math.abs(O);dt=Mo>_o?"horizontal":"vertical",G(dt)}}let F;if(!ut.current)dt==="vertical"?O>0?F="down":O<0&&(F="up"):dt==="horizontal"?w>0?F="right":w<0&&(F="left"):Math.abs(w)>=Math.abs(O)?F=w>0?"right":"left":F=O>0?"down":"up",F&&a.includes(F)&&(ut.current=F,m.current=Pt(F,w,O),g(F));else{let Ht=ut.current,yt=Pt(Ht,So,Do);yt>ze?(S.current=!1,g(Ht)):!(a.includes("left")&&a.includes("right"))&&!(a.includes("up")&&a.includes("down"))&&m.current-yt>=Yo&&(S.current=!0)}let Qt=go(w,O),Zt=K.current.x,te=K.current.y,Oo=a.includes("left")||a.includes("right"),No=a.includes("up")||a.includes("down");dt!=="vertical"&&Oo&&(Zt+=Qt.x),dt!=="horizontal"&&No&&(te+=Qt.y),xt({x:Zt,y:te})}function wo(l){if(l.key==="Escape"){if(!b.current||!z(b.current,U(X(b.current))))return;h.closeToast(o.id)}}x.useEffect(()=>{let l=b.current;if(!f||!l)return;function T(P){et.current===null||!z(l,Y(P))||P.preventDefault()}return st(l,"touchmove",T,{passive:!1})},[f]);function yo(){let l=W.x-nt.x,T=W.y-nt.y;return{transition:E?"none":void 0,transform:E?`translateX(${W.x}px) translateY(${W.y}px) scale(${nt.scale})`:void 0,[ke]:`${l}px`,[He]:`${T}px`}}let Jt=o.priority==="high",Po={role:Jt?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":Q,"aria-describedby":pt,"aria-hidden":Jt&&!xo?!0:void 0,onPointerDown:f?vo:void 0,onPointerMove:f?Ro:void 0,onPointerUp:f?wt:void 0,onPointerCancel:f?wt:void 0,onKeyDown:wo,inert:pe(o.limited),style:{...yo(),[It]:o.transitionStatus==="ending"?vt:Tt,[Le]:`${To}px`,[Ye]:o.height?`${o.height}px`:void 0}},Eo=x.useMemo(()=>({toast:o,setTitleId:Z,setDescriptionId:at,recalculateHeight:Rt,visibleIndex:Tt,expanded:kt}),[o,Z,at,Rt,Tt,kt]),bo={transitionStatus:o.transitionStatus,expanded:kt,limited:o.limited||!1,type:o.type,swiping:E,swipeDirection:R},Co=D("div",t,{ref:[s,b],state:bo,stateAttributesMapping:Lo,props:[Po,r]});return(0,We.jsx)(Kt.Provider,{value:Eo,children:Co})});var Mt=v(C(),1);var Ke=Mt.forwardRef(function(t,s){let{render:o,className:i,style:c,...n}=t,{visibleIndex:d,expanded:r,recalculateHeight:u}=J(),a=Mt.useRef(null);B(()=>{u();let R=a.current;if(!R||typeof ResizeObserver!="function"||typeof MutationObserver!="function")return;let g=new ResizeObserver(()=>u(!0)),E=new MutationObserver(()=>u(!0));return g.observe(R),E.observe(R,{childList:!0,subtree:!0,characterData:!0}),()=>{g.disconnect(),E.disconnect()}},[u]);let f=d>0;return D("div",t,{ref:[s,a],state:{expanded:r,behind:f},props:n})});var Je=v(C(),1);var Ue=v(C(),1);function qe(e){return e==null||typeof e=="boolean"||e===""?!1:Array.isArray(e)?e.some(qe):!0}function _t(e){return Ue.isValidElement(e)&&qe(e.props.children)}function At(e,t,s){let{toast:o,setTitleId:i,setDescriptionId:c}=J(),n=s==="title"?i:c,d=t??(s==="title"?o.title:o.description);return{id:Re(e),children:d,type:o.type,setId:n}}function Vt(e,t,s){let o=_t(e);return B(()=>{if(o)return s(t),()=>{s(i=>i===t?void 0:i)}},[o,t,s]),o?e:null}var Qe=Je.forwardRef(function(t,s){let{render:o,className:i,style:c,id:n,children:d,...r}=t,{id:u,children:a,type:f,setId:h}=At(n,d,"description"),g=D("p",t,{ref:s,state:{type:f},props:{...r,id:u,children:a}});return Vt(g,u,h)});var Ze=v(C(),1);var to=Ze.forwardRef(function(t,s){let{render:o,className:i,style:c,id:n,children:d,...r}=t,{id:u,children:a,type:f,setId:h}=At(n,d,"title"),g=D("h2",t,{ref:s,state:{type:f},props:{...r,id:u,children:a}});return Vt(g,u,h)});var Ft=v(C(),1);var eo=Ft.forwardRef(function(t,s){let{render:o,className:i,style:c,disabled:n,nativeButton:d=!0,...r}=t,u=k(),{toast:a,expanded:f}=J(),[h,R]=Ft.useState(!1),{getButtonProps:g,buttonRef:E}=Et({disabled:n,native:d}),V={type:a.type};return D("button",t,{ref:[s,E],state:V,props:[{"aria-hidden":!f&&!h,onClick(){u.closeToast(a.id)},onFocus(){R(!0)},onBlur(){R(!1)}},r,g]})});var oo=v(C(),1);var so=oo.forwardRef(function(t,s){let{render:o,className:i,style:c,disabled:n,nativeButton:d=!0,...r}=t,{toast:u}=J(),a=u.actionProps?.children??r.children,{getButtonProps:f,buttonRef:h}=Et({disabled:n,native:d}),R={type:u.type},g=D("button",t,{ref:[s,h],state:R,props:[r,u.actionProps,f,{children:a}]});return _t(g)?g:null});var ro=v(C(),1);var no=v(ot(),1),io=ro.forwardRef(function(t,s){return(0,no.jsx)(we,{ref:s,...t})});var Yt=v(C(),1);var Lt=v(C(),1),qt=Lt.createContext(void 0);function ao(){let e=Lt.useContext(qt);if(e===void 0)throw new Error(lt(84));return e}var co=v(ot(),1),uo=Yt.forwardRef(function(t,s){let{toast:o,...i}=t,c=k(),n=o.positionerProps??oe,{render:d,className:r,anchor:u=n.anchor,positionMethod:a=n.positionMethod??"absolute",side:f=n.side??"top",align:h=n.align??"center",sideOffset:R=n.sideOffset??0,alignOffset:g=n.alignOffset??0,collisionBoundary:E=n.collisionBoundary??"clipping-ancestors",collisionPadding:V=n.collisionPadding??5,arrowPadding:mt=n.arrowPadding??5,sticky:$=n.sticky??!1,disableAnchorTracking:W=n.disableAnchorTracking??!1,collisionAvoidance:rt=n.collisionAvoidance??ge,style:nt,...it}=i,[Q,Z]=Yt.useState(null),pt=c.useState("toastIndex",o.id),at=c.useState("toastVisibleIndex",o.id),tt=ae(u)?u:null,G=ye({open:!0,onOpenChange:ee,elements:{floating:Q,reference:tt}}),b=Pe({anchor:tt,positionMethod:a,floatingRootContext:G,mounted:!0,side:f,sideOffset:R,align:h,alignOffset:g,collisionBoundary:E,collisionPadding:V,sticky:$,arrowPadding:mt,disableAnchorTracking:W,keepMounted:!0,collisionAvoidance:rt}),ct={side:b.side,align:b.align,anchorHidden:b.anchorHidden},H=Ee(t,ct,{styles:{...b.positionerStyles,[It]:o.transitionStatus==="ending"?pt:at},transitionStatus:o.transitionStatus,props:it,refs:[s,Z]});return(0,co.jsx)(qt.Provider,{value:b,children:H})});var lo=v(C(),1);var fo=lo.forwardRef(function(t,s){let{className:o,render:i,style:c,...n}=t,{arrowRef:d,side:r,align:u,arrowUncentered:a,arrowStyles:f}=ao();return D("div",t,{state:{side:r,align:u,uncentered:a},ref:[s,d],props:[{style:f,"aria-hidden":!0},n]})});var mo=v(C(),1);function po(){let e=k(),t=e.useState("toasts");return mo.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function ho(){let e=new Set;function t(s){e.forEach(o=>o(s))}return{" subscribe":function(o){return e.add(o),()=>{e.delete(o)}},add(s){let o=s.id||Ct("toast"),i={...s,id:o,transitionStatus:"starting"};return t({action:"add",options:i}),o},close(s){t({action:"close",options:{id:s}})},update(s,o){t({action:"update",options:{id:s,updates:o}})},promise(s,o){let i=s;return t({action:"promise",options:{...o,promise:s,setPromise(c){i=c}}}),i}}}var p=v(ot(),1);function Bo({...e}){return(0,p.jsx)(M.Provider,{...e})}function Xo({...e}){return(0,p.jsx)(M.Portal,{"data-slot":"toast-portal",...e})}function zo({className:e,...t}){return(0,p.jsx)(M.Viewport,{"data-slot":"toast-viewport",className:q("pointer-events-none fixed inset-x-4 bottom-[max(5.25rem,env(safe-area-inset-bottom))] z-[60] mx-auto w-auto max-w-sm outline-none sm:right-4 sm:left-auto sm:mx-0 sm:w-full",e),...t})}function jo({className:e,...t}){return(0,p.jsx)(M.Root,{"data-slot":"toast",className:q("group/toast pointer-events-auto absolute right-0 bottom-0 z-[calc(1000-var(--toast-index))] w-full origin-bottom rounded-lg border border-dashboard-border-emphasis bg-dashboard-surface-raised text-dashboard-text shadow-lg will-change-transform outline-none select-none focus-visible:outline-2 focus-visible:outline-dashboard-focus","[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]","h-(--height) [transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] [transition:transform_180ms_ease-out,opacity_180ms,height_180ms] motion-reduce:transition-none","after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']","data-expanded:h-(--toast-height) data-expanded:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]","data-limited:opacity-0 data-starting-style:[transform:translateY(150%)]","[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(150%)]","data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]","data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]","data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]","data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]","data-expanded:data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]","data-expanded:data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]","data-expanded:data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]","data-expanded:data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]",e),...t})}function $o({className:e,...t}){return(0,p.jsx)(M.Content,{"data-slot":"toast-content",className:q("flex h-full items-center gap-3 overflow-hidden p-4 transition-opacity duration-180 motion-reduce:transition-none ease-[cubic-bezier(0.22,1,0.36,1)] data-behind:opacity-0 data-expanded:opacity-100",e),...t})}function Wo({className:e,...t}){return(0,p.jsx)(M.Title,{"data-slot":"toast-title",className:q("break-words text-sm font-medium",e),...t})}function Go({className:e,...t}){return(0,p.jsx)(M.Description,{"data-slot":"toast-description",className:q("break-words text-sm text-dashboard-text-muted",e),...t})}function Ko({className:e,render:t=(0,p.jsx)(jt,{}),...s}){return(0,p.jsx)(M.Action,{"data-slot":"toast-action",render:t,className:q("shrink-0",e),...s})}function Uo({className:e,children:t,render:s=(0,p.jsx)(jt,{size:"icon"}),...o}){return(0,p.jsx)(M.Close,{"data-slot":"toast-close","aria-label":"Close toast",render:s,className:q("relative shrink-0 text-dashboard-text-muted after:absolute after:-inset-2 after:content-[''] hover:text-dashboard-text",e),...o,children:t??(0,p.jsx)(Ne,{"aria-hidden":"true"})})}function qo({type:e}){let t=null;return e==="success"&&(t=(0,p.jsx)(be,{"aria-hidden":"true"})),e==="info"&&(t=(0,p.jsx)(Ce,{"aria-hidden":"true"})),e==="warning"&&(t=(0,p.jsx)(Oe,{"aria-hidden":"true"})),e==="error"&&(t=(0,p.jsx)(Se,{className:"text-rose-300","aria-hidden":"true"})),e==="loading"&&(t=(0,p.jsx)(De,{className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"})),t?(0,p.jsx)("span",{"data-slot":"toast-icon",className:"shrink-0 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",children:t}):null}function Jo(){let{toasts:e}=M.useToastManager();return e.map(t=>(0,p.jsx)(jo,{toast:t,children:(0,p.jsxs)($o,{children:[(0,p.jsx)(qo,{type:t.type}),(0,p.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,p.jsx)(Wo,{}),(0,p.jsx)(Go,{})]}),t.actionProps?(0,p.jsx)(Ko,{...t.actionProps}):null,(0,p.jsx)(Uo,{})]})},t.id))}function Tn({children:e,...t}){return(0,p.jsxs)(Bo,{limit:3,timeout:4e3,...t,children:[e,(0,p.jsx)(Xo,{children:(0,p.jsx)(zo,{children:(0,p.jsx)(Jo,{})})})]})}var xn=M.useToastManager;export{Tn as a,xn as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Rc as s,b as d}from"./chunk-YPMUHXYT.js";import{c as a}from"./chunk-7SZRL6FY.js";var t=a(d(),1),i="m-0 font-sans text-sm font-medium text-dashboard-text",l="mt-1 mb-0 font-sans text-xs leading-relaxed text-dashboard-text-muted";function n(e){let o=e.totalLabel??"period total";return(0,t.jsxs)("div",{className:s("flex flex-wrap items-start justify-between gap-3 border-b border-dashboard-border-subtle px-4 py-4 sm:px-5",e.className),children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h3",{className:i,children:e.title}),e.description?(0,t.jsx)("p",{className:l,children:e.description}):null]}),e.total!==void 0?(0,t.jsxs)("div",{className:"shrink-0 text-right",children:[(0,t.jsx)("div",{className:i,children:e.total}),(0,t.jsx)("div",{className:l,children:o})]}):e.trailing?(0,t.jsx)("div",{className:"font-sans text-xs text-dashboard-text-muted",children:e.trailing}):null]})}export{n as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as g}from"./chunk-MEHLQZDG.js";import{b as d}from"./chunk-CR2ICLSH.js";import{Oc as f,Qa as o,Rc as p,Sa as c,b as u,tc as m}from"./chunk-YPMUHXYT.js";import{c as i}from"./chunk-7SZRL6FY.js";var a=i(u(),1);function h({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"input-group",role:"group",className:o("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-dashboard-border bg-dashboard-overlay-soft transition-colors outline-none hover:border-dashboard-border-emphasis has-[[data-slot=input-group-control]:focus-visible]:border-dashboard-focus has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot=input-group-control]:focus-visible]:ring-dashboard-focus/25",t),...e})}var v=c("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-dashboard-text-muted select-none",{variants:{align:{"inline-start":"order-first pl-2.5","inline-end":"order-last pr-1.5"}},defaultVariants:{align:"inline-start"}});function s({className:t,align:e="inline-start",...r}){return(0,a.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":e,className:o(v({align:e}),t),onClick:l=>{l.target.closest("button")||l.currentTarget.parentElement?.querySelector("input")?.focus()},...r})}function b({className:t,type:e="button",...r}){return(0,a.jsx)(d,{type:e,size:"icon",className:o("size-6",t),...r})}function I({className:t,...e}){return(0,a.jsx)(g,{"data-slot":"input-group-control",className:o("h-full min-w-0 flex-1 rounded-none border-0 bg-transparent px-2 focus:ring-0",t),...e})}var n=i(u(),1);function k(t){let e=y[t.size??"compact"];return(0,n.jsxs)(h,{className:p(e.group,t.className),children:[(0,n.jsx)(I,{"aria-label":t.label,className:p("[&::-webkit-search-cancel-button]:appearance-none",e.input),onChange:r=>t.onChange(r.currentTarget.value),placeholder:t.placeholder,ref:t.inputRef,type:"search",value:t.value}),(0,n.jsx)(s,{className:e.icon,children:(0,n.jsx)(m,{"aria-hidden":"true",size:e.iconSize,strokeWidth:2.5})}),(0,n.jsx)(s,{align:"inline-end",className:e.clear,children:(0,n.jsx)(b,{"aria-label":"Clear search",className:t.value?void 0:"invisible",onClick:r=>{t.onChange(""),r.currentTarget.closest("[data-slot=input-group]")?.querySelector("input")?.focus()},children:(0,n.jsx)(f,{"aria-hidden":"true",size:14,strokeWidth:2.5})})})]})}var y={compact:{clear:"pr-1.25",group:"h-9",icon:"pl-2.25",iconSize:13,input:"pr-1 pl-2.5"},default:{clear:"pr-1.75",group:"h-10",icon:"pl-2.75",iconSize:14,input:"pr-1 pl-2.75"}};export{k as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as le,b as fe,c as Mt,d as Je,e as pe,f as Ye,g as Bt,h as Xe,i as $e,j as Qe}from"./chunk-MEHLQZDG.js";import{w as Nt,y as Vt,z as At}from"./chunk-6PHJZPWD.js";import{a as Le,b as Te}from"./chunk-CQY6BYUB.js";import{a as ze}from"./chunk-VC6IS564.js";import{i as _e,j as je}from"./chunk-B5ZN3SWQ.js";import{Fa as ue,H as It,Ha as Pt,Ia as $,Ma as we,N as Ge,Na as qe,Oa as He,Pa as Ue,Qa as We,Qc as Q,Xc as Ke,a as G,b as ie,c as Oe,dd as Dt,e as ve,g as L,h as Se,hb as Et,j as ye,l as yt}from"./chunk-YPMUHXYT.js";import{b as vt,c as b}from"./chunk-7SZRL6FY.js";var Pe={};vt(Pe,{Indicator:()=>qt,Root:()=>wt});var V=b(G(),1);function Ft(e){if(!e)return null;for(let o of e.elements){let d=o.tagName;if(d==="BUTTON"||d==="INPUT"){let x=o;if(x.type==="submit")return x}}return null}var Ot="data-checked",St="data-unchecked";function Ze(e){return{checked(o){return e.indeterminate?{}:o?{[Ot]:""}:{[St]:""}},...le}}var Lt=b(G(),1);function et(e,o,d,x=!0,y,T){let[h,k]=Lt.useState(),R=Q(y?`${y}-label`:void 0),s=!!T?.trim(),C=e??(s?void 0:o)??h;return L(()=>{let v=e||o||s||!x?void 0:to(d.current,R);h!==v&&k(v)}),C}function to(e,o){let d=oo(e);if(d)return!d.id&&o&&(d.id=o),d.id||void 0}function oo(e){if(!e)return;let o=e.parentElement;if(o&&o.tagName==="LABEL")return o;let d=e.id;if(d){let y=e.nextElementSibling;if(y&&y.htmlFor===d)return y}let x=e.labels;return x&&x[0]}var tt=b(G(),1),ro=tt.createContext(void 0);function Tt(){return tt.useContext(ro)}var ot=b(G(),1),mt=ot.createContext(void 0);function _t(){let e=ot.useContext(mt);if(e===void 0)throw new Error(Se(14));return e}var Ie=b(ie(),1),no="data-parent",wt=V.forwardRef(function(o,d){let{checked:x,className:y,defaultChecked:T=!1,"aria-labelledby":h,disabled:k=!1,form:R,id:s,indeterminate:I=!1,inputRef:C,name:v,onCheckedChange:M,parent:c=!1,readOnly:g=!1,render:U,required:B=!1,uncheckedValue:j,value:W,nativeButton:K=!1,style:Ve,...z}=o,{clearErrors:P}=Je(),{disabled:me,name:be,setDirty:J,setFilled:ae,setTouched:se,state:Z,validationMode:Re,validityData:F,validation:ee}=fe(),xe=Xe(),{labelId:n,registerControlId:O,getDescriptionProps:_}=pe(),i=Tt(),f=i?.allValues===void 0?void 0:i.parent,E=f!==void 0,m=me||xe.disabled||i?.disabled||k,u=be??v,a=W??u,S=Q(),de=i?.registerControlId!==O,D=Ye({id:s||void 0,enabled:de}),te=K?D:S,Y={};E&&(c?Y=f.getParentProps():a!==void 0&&(Y=f.getChildProps(a)));let{checked:ce=x,indeterminate:he=I,onCheckedChange:Ce,...ge}=Y,t=i?.value,p=V.useRef(null),Ae=$e(m,p),{getButtonProps:Me,buttonRef:Be}=qe({disabled:m,native:K}),X=i?.validation??ee,[N,l]=Ke({controlled:a!==void 0&&t!==void 0&&!c?t.includes(a):ce,default:T,name:"Checkbox",state:"checked"}),w=E?!!ce:N,ke=E&&he||I;Qe(p,S,N,void 0,!i&&!m,v);let ct=f?.registerChildId,oe=V.useRef(null),Ct=X.registerInput,gt=i?a:void 0,Xt=V.useCallback(r=>Ct(r,{controlRef:p,value:gt}),[Ct,gt]),$t=ue(C,oe,c?void 0:Xt),Qt=et(h,n,oe,!K,D,z["aria-label"]);L(()=>{oe.current&&(oe.current.indeterminate=ke),i||ae(N)},[N,ke,i,ae]),ze(N,()=>{i||(P(u),J(N!==F.initialValue),X.change(N))});let Zt=Pt({checked:N,disabled:m,form:R,name:c?void 0:u,id:K?void 0:D,required:B,ref:$t,style:u?Te:Le,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(r){if(r.nativeEvent.defaultPrevented)return;if(g){r.preventDefault();return}let q=r.currentTarget.checked,re=He(Ue.none,r.nativeEvent);if(M?.(q,re),!re.isCanceled&&(Ce?.(q,re),!re.isCanceled&&(l(q),a!==void 0&&i!==void 0&&!c&&!E))){let ne=q?[...i.value,a]:i.value.filter(Fe=>Fe!==a);i.setValue(ne,re)}},onClick(r){r.stopPropagation()},onFocus(){p.current?.focus()}},W!==void 0?{value:(i?N&&W:W)||""}:ve,_,r=>X.getValidationProps(m,r));V.useEffect(()=>{if(!f||a===void 0)return;let r=f.disabledStatesRef.current;return r.set(a,m),()=>{r.delete(a)}},[f,m,a]);let ut=V.useMemo(()=>({...Z,checked:w,disabled:m,readOnly:g,required:B,indeterminate:ke}),[Z,w,m,g,B,ke]),eo=Ze(ut),kt=$("span",o,{state:ut,ref:[Be,p,d],props:[{id:te,role:"checkbox","aria-checked":ke?"mixed":w,"aria-readonly":g||void 0,"aria-required":B||void 0,"aria-labelledby":Qt,[no]:c?"":void 0,onFocus(){Ae(!0)},onBlur(){let r=oe.current;r&&(se(!0),Ae(!1),Re==="onBlur"&&X.commit(i?t:r.checked))},onKeyDown(r){if(r.key!=="Enter"||(r.preventBaseUIHandler(),r.defaultPrevented))return;let q=oe.current?.form??null,re=r.currentTarget,ne=r.nativeEvent,Fe=r.preventDefault,ft=ne.preventDefault,pt=!1;r.preventDefault=()=>{pt=!0,Fe.call(r)},ne.preventDefault=()=>{pt=!0,ft.call(ne)},ft.call(ne),yt(re).queueMicrotask(()=>{r.preventDefault=Fe,ne.preventDefault=ft,pt||Ft(q)?.click()})},onClick(r){if(g||m)return;r.preventDefault();let q=oe.current;q&&we(q,r)}},z,ge,Me,_,r=>X.getValidationProps(m,r)],stateAttributesMapping:eo}),lt=kt.props.id;return L(()=>{if(!(!ct||c||a===void 0||lt===void 0))return ct(a,lt)},[ct,c,a,lt]),(0,Ie.jsxs)(mt.Provider,{value:ut,children:[kt,!N&&!i&&u&&!c&&j!==void 0&&(0,Ie.jsx)("input",{type:"hidden",form:R,name:u,value:j,disabled:m}),(0,Ie.jsx)("input",{...Zt,suppressHydrationWarning:!0})]})});var rt=b(G(),1);var qt=rt.forwardRef(function(o,d){let{render:x,className:y,style:T,keepMounted:h=!1,...k}=o,R=_t(),s=R.checked||R.indeterminate,{mounted:I,transitionStatus:C,setMounted:v}=je(s),M=rt.useRef(null),c={...R,transitionStatus:C};_e({batch:!0,enabled:!s,open:s,ref:M,onComplete(){s||v(!1)}});let U={...Ze(R),...Ge},B=h||I,j=$("span",o,{ref:[d,M],state:c,stateAttributesMapping:U,props:k});return B?j:null});var nt=b(ie(),1);function rr({className:e,...o}){return(0,nt.jsx)(Pe.Root,{"data-slot":"checkbox",className:We("grid size-4 shrink-0 cursor-pointer place-items-center rounded-sm border border-dashboard-border-interactive bg-dashboard-control text-dashboard-text-inverse transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-dashboard-focus data-checked:border-dashboard-focus data-checked:bg-dashboard-focus data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...o,children:(0,nt.jsx)(Pe.Indicator,{"data-slot":"checkbox-indicator",children:(0,nt.jsx)(Et,{"aria-hidden":"true",size:12,strokeWidth:3})})})}var De={};vt(De,{Indicator:()=>Yt,Root:()=>Jt});var H=b(G(),1);var Ht="data-checked",Ut="data-unchecked";var Ee={checked(e){return e?{[Ht]:""}:{[Ut]:""}},...Ge,...le};var it=b(G(),1),bt=it.createContext(void 0);function Wt(){return it.useContext(bt)}function Kt(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}var at=b(G(),1),Rt=at.createContext(void 0);function zt(){let e=at.useContext(Rt);if(e===void 0)throw new Error(Se(52));return e}var Ne=b(ie(),1),Jt=H.forwardRef(function(o,d){let{render:x,className:y,disabled:T=!1,readOnly:h=!1,required:k=!1,"aria-labelledby":R,value:s,inputRef:I,nativeButton:C=!1,id:v,style:M,...c}=o,g=Wt(),{disabled:U,readOnly:B,required:j,form:W,checkedValue:K,touched:Ve=!1,validation:z,name:P,setCheckedValue:me=Oe,setTouched:be=Oe,registerInputRef:J=Oe}=g??{},{setTouched:ae,setFilled:se,state:Z,disabled:Re}=fe(),F=Xe(),{labelId:ee,getDescriptionProps:xe}=pe(),n=Re||F.disabled||U||T,O=B||h,_=j||k,i=W,f=g?K===s:s==="",E=H.useRef(null),m=$e(n,E),u=H.useRef(null),a=z?.registerInput,S=H.useCallback(l=>a?.(l,{controlRef:E,value:void 0}),[a]),de=ue(I,u,J,S);L(()=>{u.current?.checked&&se(!0)},[se]),L(()=>{if(u.current){if(n&&f){J(null);return}J(u.current)}},[f,n,J]);let D=Q(),te=Ye({id:v}),Y=C?void 0:te,ce=et(R,ee,u,!C,Y,c["aria-label"]),he={role:"radio","aria-checked":f,"aria-labelledby":ce,[Vt]:f?"":void 0,id:C?te:D,onKeyDown(l){l.key==="Enter"&&l.preventDefault()},onClick(l){if(l.defaultPrevented||n||O)return;l.preventDefault();let w=u.current;w&&we(w,l)},onFocus(l){m(!0),!(l.defaultPrevented||n||O||!Ve)&&(u.current?.click(),be(!1))},onBlur(){g||m(!1)}},{getButtonProps:Ce,buttonRef:ge}=qe({disabled:n,native:C,composite:!1}),t={type:"radio",ref:de,form:i,id:Y,name:P,tabIndex:-1,style:P?Te:Le,"aria-hidden":!0,...s!==void 0?{value:Kt(s)}:ve,disabled:n,checked:f,required:_,readOnly:O,onChange(l){if(l.nativeEvent.defaultPrevented||n||O||s===void 0)return;let w=He(Ue.none,l.nativeEvent);me(s,w),!w.isCanceled&&ae(!0)},onClick(l){l.stopPropagation()},onFocus(){E.current?.focus()}},p=H.useMemo(()=>({...Z,required:_,disabled:n,readOnly:O,checked:f}),[Z,n,O,f,_]),Ae=p,Me=g!==void 0,Be=[d,E,ge],X=[he,c,Ce,xe,z?l=>z.getValidationProps(n,l):ve],N=$("span",o,{enabled:!Me,state:p,ref:Be,props:X,stateAttributesMapping:Ee});return(0,Ne.jsxs)(Rt.Provider,{value:Ae,children:[Me?(0,Ne.jsx)(Nt,{tag:"span",render:x,className:y,style:M,state:p,refs:Be,props:X,stateAttributesMapping:Ee}):N,(0,Ne.jsx)("input",{...t,suppressHydrationWarning:!0})]})});var st=b(G(),1);var Yt=st.forwardRef(function(o,d){let{render:x,className:y,style:T,keepMounted:h=!1,...k}=o,R=zt(),s=R.checked,{mounted:I,transitionStatus:C,setMounted:v}=je(s),M={...R,transitionStatus:C},c=st.useRef(null),g=h||I,U=$("span",o,{ref:[d,c],state:M,props:k,stateAttributesMapping:Ee});return _e({batch:!0,enabled:!s,open:s,ref:c,onComplete(){s||v(!1)}}),g?U:null});var A=b(G(),1);var xt=b(ie(),1),io=[Dt],ht=A.forwardRef(function(o,d){let{render:x,className:y,disabled:T,readOnly:h,required:k,onValueChange:R,value:s,defaultValue:I,form:C,name:v,inputRef:M,id:c,style:g,...U}=o,{setTouched:B,setFocused:j,validationMode:W,name:K,disabled:Ve,state:z,validation:P,setDirty:me,setFilled:be,validityData:J}=fe(),{labelId:ae}=pe(),{clearErrors:se,elementRef:Z}=Je(),Re=Mt(!0),F=Ve||T,ee=K??v,xe=Q(c),[n,O]=Ke({controlled:s,default:I,name:"RadioGroup",state:"value"}),[_,i]=A.useState(!1),f=ye((t,p)=>{R?.(t,p),!p.isCanceled&&O(t)}),E=P.getInputControl,m=A.useMemo(()=>({get current(){return E()}}),[E]),u=A.useRef(null),a=A.useRef(null),S=ue(u,M),de=A.useRef(S),D=ye(t=>{u.current===t&&de.current===S||(de.current=S,S?.(t))});L(()=>{D(u.current)},[S,D]);let te=ye(t=>{if(t){if(!t.disabled){a.current||(a.current=t);let p=u.current;(t.checked||p==null||p.disabled)&&D(t)}return()=>{a.current===t&&(a.current=null),u.current===t&&D(null)}}}),Y=ye(()=>{let t=Z.current;if(!t)return n??null;for(let p of P.registeredInputs.keys())if(p.checked&&Bt(p,t))return n??null;return null});Qe(m,xe,n??null,Y,!F,v),ze(n,()=>{se(ee),me(n!==J.initialValue),be(n!=null),P.change(n);let t=a.current;n==null&&t&&!t.disabled&&D(t)});let ce=ae??Re?.legendId,he={...z,disabled:F??!1,required:k??!1,readOnly:h??!1},Ce=A.useMemo(()=>({checkedValue:n,disabled:F,form:C,validation:P,name:ee,readOnly:h,registerInputRef:te,required:k,setCheckedValue:f,setTouched:i,touched:_}),[n,F,C,P,ee,h,te,k,f,i,_]),ge={id:c,role:"radiogroup","aria-required":k||void 0,"aria-disabled":F||void 0,"aria-readonly":h||void 0,"aria-labelledby":ce,onBlur(t){It(t.currentTarget,t.relatedTarget)||(i(!1),B(!0),j(!1),W==="onBlur"&&P.commit(n))},onKeyDownCapture(t){t.key.startsWith("Arrow")&&i(!0)}};return(0,xt.jsx)(bt.Provider,{value:Ce,children:(0,xt.jsx)(At,{render:x,className:y,style:g,state:he,props:[ge,U,t=>P.getValidationProps(F??!1,t)],refs:[d],stateAttributesMapping:le,enableHomeAndEndKeys:!1,modifierKeys:io})})});var dt=b(ie(),1);function xn(e){return(0,dt.jsx)(ht,{"data-slot":"radio-group",...e})}function hn({className:e,...o}){return(0,dt.jsx)(De.Root,{"data-slot":"radio-group-item",className:We("grid size-4 shrink-0 cursor-pointer place-items-center rounded-full border border-dashboard-border-interactive bg-dashboard-control transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-dashboard-focus data-checked:border-dashboard-focus data-checked:bg-dashboard-focus data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...o,children:(0,dt.jsx)(De.Indicator,{"data-slot":"radio-group-indicator",className:"size-1.5 rounded-full bg-dashboard-text-inverse"})})}export{rr as a,xn as b,hn as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as A}from"./chunk-SUX4QBVF.js";import{a as p,c as C,f as v,o as g,p as u,q as f,r as b,s as x,t as k,w as R,x as N}from"./chunk-V5UDSIRA.js";import{a as h}from"./chunk-2BCS5AQL.js";import{s as l}from"./chunk-NQMDED2R.js";import{Ja as m}from"./chunk-VXT3FIVL.js";import{H as y}from"./chunk-6PHJZPWD.js";import{b as n}from"./chunk-YPMUHXYT.js";import{c as s}from"./chunk-7SZRL6FY.js";var t=s(n(),1),T="var(--color-cyan-300)",B="var(--color-emerald-300)",S="var(--color-rose-400)",c=[{color:T,key:"created",label:"Created"},{color:B,key:"merged",label:"Merged"},{color:S,key:"closed",label:"Closed"}],E=Object.fromEntries(c.map(a=>[a.key,{color:a.color,label:a.label}]));function X(a){let r=a.bucketUnit??"day",o=a.days,w=o.map(e=>e.created+e.merged+e.closed),D=Math.max(1,...o.flatMap(e=>[e.created,e.merged,e.closed])),O=b(o.map(e=>e.created)),L=w.some(e=>e>0);return(0,t.jsxs)(m,{className:"min-h-[17rem] p-4 sm:p-5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"m-0 font-display text-xl font-medium text-dashboard-text",children:"Changes over time"}),(0,t.jsx)("p",{className:"mt-1 mb-0 font-sans text-xs leading-relaxed text-dashboard-text-muted",children:"Code changes created, merged, and closed each day."})]}),(0,t.jsx)(A,{ariaLabel:"Code change legend",items:c})]}),(0,t.jsxs)("div",{className:"relative mt-5 overflow-hidden",children:[(0,t.jsx)(R,{className:"aspect-auto h-55 w-full",config:E,children:(0,t.jsxs)(v,{"aria-label":`Code changes during the last ${a.range===1?"24 hours":`${a.range} days`}`,barGap:1,data:o,margin:g,role:"img",children:[(0,t.jsx)(p,{strokeDasharray:"3 5",vertical:!1}),(0,t.jsx)(f,{maximum:D}),(0,t.jsx)(u,{keys:o.map(e=>e.date)}),(0,t.jsx)(N,{content:(0,t.jsx)(k,{rows:e=>c.map(d=>[d.label.toLowerCase(),e[d.key]])})}),c.map(e=>(0,t.jsx)(C,{dataKey:e.key,fill:`var(--color-${e.key})`,fillOpacity:.86,isAnimationActive:!1,maxBarSize:10,radius:1},e.key)),(0,t.jsx)(x,{unit:y(r),average:O,format:l,stroke:"var(--color-slate-200)"})]})}),L?null:(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center pt-12 font-sans text-xs text-dashboard-text-muted",children:"No code changes in this period."})]})]})}var i=s(n(),1);function U(a){return a==="merged"?"success":a==="open"?"info":"neutral"}function F(a){let r=a.change,o=r.title??`${r.repository} #${r.number}`;return(0,i.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-4 border-b border-dashboard-border-subtle px-4 py-3 last:border-b-0",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("div",{className:"truncate font-display text-sm text-dashboard-text",children:r.url?(0,i.jsx)("a",{className:"text-inherit no-underline hover:text-dashboard-accent-text",href:r.url,rel:"noreferrer",target:"_blank",children:o}):o}),(0,i.jsxs)("div",{className:"mt-1 truncate font-mono text-xs text-dashboard-text-muted",children:[r.repository," #",r.number]})]}),(0,i.jsx)(h,{size:"compact",tone:U(r.state),children:r.state})]})}export{X as a,F as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l}from"./chunk-YPMUHXYT.js";function f(o,i){let e=(i??l(o).getComputedStyle(o)).transform,r=0,n=0,a=1;if(e&&e!=="none"){let s=e.match(/matrix(?:3d)?\(([^)]+)\)/);if(s){let t=s[1].split(", ").map(parseFloat);t.length===6?(r=t[4],n=t[5],a=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(r=t[12],n=t[13],a=t[0])}}return{x:r,y:n,scale:a}}export{f as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Rc as n,Sc as s,b as r}from"./chunk-YPMUHXYT.js";import{c as a}from"./chunk-7SZRL6FY.js";var o=a(r(),1);function d(){return(0,o.jsx)("div",{className:"relative grid size-10 shrink-0 select-none place-items-center overflow-visible",children:(0,o.jsx)("img",{alt:"",className:"relative -m-0.5 size-11 max-w-none object-contain opacity-90 drop-shadow-[0_0_7px_rgba(255,255,255,0.16)]",draggable:!1,src:"/_junior/dashboard/avatar.png"})})}var l=["relative","overflow-hidden","bg-white/15","before:absolute","before:inset-0","before:content-['']","before:bg-[linear-gradient(90deg,#ff4d6d,#ffb703,#56f39a,#4cc9f0,#9b5de5,#ff4d6d)]","before:bg-[length:200%_100%]","before:animate-[junior-rainbow-flow_1.2s_linear_infinite]","motion-reduce:before:animate-none"].join(" ");var e=a(r(),1);function g(i){return(0,e.jsx)("div",{className:n(s,"grid min-h-[calc(100dvh-5rem)] place-items-center px-4 py-8 md:px-8"),children:(0,e.jsxs)("section",{className:"grid w-full max-w-lg grid-cols-[auto_minmax(0,1fr)] items-center gap-3 rounded-lg border border-dashboard-border-emphasis bg-dashboard-surface-raised p-4",children:[(0,e.jsx)(d,{}),(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"font-bold",children:i.label}),(0,e.jsx)("div",{"aria-label":i.label,className:`${l} mt-3 h-1.5 w-full`,role:"progressbar"})]})]})})}export{d as a,g as b};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as i}from"./chunk-YPMUHXYT.js";import{c as a}from"./chunk-7SZRL6FY.js";var e=a(i(),1);function d(t){return(0,e.jsxs)("div",{className:t.className,children:[(0,e.jsx)("h2",{className:"m-0 font-display text-xl font-medium tracking-[-0.02em] text-dashboard-text",id:t.id,children:t.title}),t.description?(0,e.jsx)("p",{className:"mt-1.5 mb-0 max-w-2xl font-sans text-xs leading-relaxed text-dashboard-text-muted",children:t.description}):null]})}export{d as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a}from"./chunk-YPMUHXYT.js";import{c as d}from"./chunk-7SZRL6FY.js";var t=d(a(),1);function o(e){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-dashboard-border-subtle bg-dashboard-overlay-soft px-4 py-3 max-md:flex-col max-md:items-stretch",children:[(0,t.jsx)("div",{className:"min-w-0",children:e.children}),e.actions?(0,t.jsx)("div",{className:"shrink-0 max-md:w-full",children:e.actions}):null]})}var i=d(a(),1);function c(e){return(0,i.jsx)("div",{className:"min-w-0 break-words font-sans text-xs font-medium leading-tight text-dashboard-text-muted",children:e.children})}export{o as a,c as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as B,b as I,c as M,d as H,e as W,f as $}from"./chunk-6FSJ3W2W.js";import{Ga as U,Ia as i,N as x,Na as _,a as y,b as E,g as D,j as F}from"./chunk-YPMUHXYT.js";import{b as re,c as s}from"./chunk-7SZRL6FY.js";var r={};re(r,{Panel:()=>Q,Root:()=>L,Trigger:()=>z});var b=s(y(),1);var S={...W,...x};var j=s(E(),1),L=b.forwardRef(function(o,p){let{render:N,className:d,defaultOpen:u=!1,disabled:C=!1,onOpenChange:m,open:g,style:P,...R}=o,l=F(m),e=B({open:g,defaultOpen:u,onOpenChange:l,disabled:C}),n=b.useMemo(()=>({open:e.open,disabled:e.disabled,transitionStatus:e.transitionStatus}),[e.open,e.disabled,e.transitionStatus]),f=b.useMemo(()=>({...e,onOpenChange:l,state:n}),[e,l,n]),a=i("div",o,{state:n,ref:p,props:R,stateAttributesMapping:S});return(0,j.jsx)(I.Provider,{value:f,children:a})});var q=s(y(),1);var pe={...H,...x},z=q.forwardRef(function(o,p){let{panelId:N,open:d,handleTrigger:u,state:C,disabled:m}=M(),{className:g,disabled:P=m,render:R,nativeButton:l=!0,style:e,...n}=o,{getButtonProps:f,buttonRef:a}=_({disabled:P,native:l});return i("button",o,{state:C,ref:[p,a],props:[{"aria-controls":d?N:void 0,"aria-expanded":d,onClick:u},n,f],stateAttributesMapping:pe})});var O=s(y(),1);var G="--collapsible-panel-height",J="--collapsible-panel-width";var Q=O.forwardRef(function(o,p){let{className:N,hiddenUntilFound:d,keepMounted:u,render:C,id:m,style:g,...P}=o,{defaultPanelId:R,mounted:l,onOpenChange:e,open:n,setMounted:f,setPanelIdState:a,setOpen:T,state:X,transitionStatus:Y}=M(),Z=d??!1,ee=u??!1,h=m||void 0,te=h??R;D(()=>(a(c=>h??(c===null?void 0:c)),()=>{a(c=>c===h?null:c)}),[h,a]);let{height:A,props:oe,ref:le,shouldPreventOpenAnimation:ne,shouldRender:ae,transitionStatus:se,width:w}=$({externalRef:p,hiddenUntilFound:Z,id:te,keepMounted:ee,mounted:l,onOpenChange:e,open:n,setMounted:f,setOpen:T,transitionStatus:Y}),V={...X,transitionStatus:se},k=U(g,V),ie=i("div",{...o,style:void 0},{state:V,ref:le,props:[oe,{style:{[G]:A===void 0?"auto":`${A}px`,[J]:w===void 0?"auto":`${w}px`}},P,k?{style:k}:void 0,ne?{style:{animationName:"none"}}:void 0],stateAttributesMapping:S});return ae?ie:null});var v=s(E(),1);function He({...t}){return(0,v.jsx)(r.Root,{"data-slot":"collapsible",...t})}function We({...t}){return(0,v.jsx)(r.Trigger,{"data-slot":"collapsible-trigger",...t})}function $e({...t}){return(0,v.jsx)(r.Panel,{"data-slot":"collapsible-content",...t})}export{He as a,We as b,$e as c};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as rt}from"./chunk-VC6IS564.js";import{f as ge,i as Ge,j as xe}from"./chunk-B5ZN3SWQ.js";import{D as $e,Ha as Xe,I as Je,Ia as $,J as He,N as qe,Oa as Qe,Pa as Ze,Qa as et,Qc as G,Sa as tt,a as P,b as oe,c as T,e as Re,f as ie,g as M,h as be,j as E,p as Ye,q as Ke}from"./chunk-YPMUHXYT.js";import{b as Tt,c as I}from"./chunk-7SZRL6FY.js";var Dt=I(P(),1);var Se={};Tt(Se,{Control:()=>It,Description:()=>Ft,Error:()=>xt,Item:()=>Vt,Label:()=>gt,Root:()=>bt,Validity:()=>ht});var O=I(P(),1);var ve=I(P(),1);var ot="data-valid",it="data-invalid";var ae={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Ot={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},at={disabled:!1,...Ot},J={valid(t){return t===null?null:t?{[ot]:""}:{[it]:""}}};var wt={invalid:void 0,name:void 0,validityData:{state:ae,errors:[],error:"",value:"",initialValue:null},setValidityData:T,disabled:void 0,setTouched:T,setDirty:T,setFilled:T,setFocused:T,focusOwnerRef:{current:void 0},validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:at,registerFieldControl:T,validation:{getValidationProps:(t,e=Re)=>e,inputRef:{current:null},registeredInputs:new Map,registerInput:T,getInputControl:()=>null,commit:async()=>{},change:T}},Te=ve.createContext(wt);function U(t=!0){let e=ve.useContext(Te);if(e.setValidityData===T&&!t)throw new Error(be(28));return e}var Fe=I(P(),1),At=Fe.createContext(void 0);function st(t=!1){let e=Fe.useContext(At);if(!e&&!t)throw new Error(be(86));return e}var Ce=I(P(),1);var _t=Ce.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:T,validationMode:"onSubmit",submitCountRef:{current:0}});function Q(){return Ce.useContext(_t)}var ne=I(P(),1);var ye=I(P(),1);var Oe=ye.createContext({controlId:void 0,registerControlId:T,resetControlId:T,labelId:void 0,setLabelId:T,messageIds:[],setMessageIds:T,getDescriptionProps:t=>t});function B(){return ye.useContext(Oe)}var lt=I(oe(),1),Ie=function(e){let r=G(),[s,p]=ne.useState(r),[l,n]=ne.useState(),[u,f]=ne.useState([]),d=s===void 0?r:s,i=ie(()=>new Map),{messageIds:R}=B(),x=E((h,C)=>{let g=i.current;C===void 0?g.delete(h):g.set(h,C),p(w=>{if(g.size===0)return w;let k;for(let o of g.values()){if(o===w)return w;k===void 0&&(k=o)}return k})}),m=E(()=>{i.current.size===0&&p(r)}),b=ne.useCallback(h=>{let C=h["aria-describedby"]?h["aria-describedby"].split(" "):[];return C.push(...R,...u),{...h,"aria-describedby":Array.from(new Set(C)).join(" ")||void 0}},[R,u]),N=ne.useMemo(()=>({controlId:d,registerControlId:x,resetControlId:m,labelId:l,setLabelId:n,messageIds:u,setMessageIds:f,getDescriptionProps:b}),[d,x,m,l,n,u,f,b]);return(0,lt.jsx)(Oe.Provider,{value:N,children:e.children})};var we=I(P(),1);function dt(t={}){let{id:e,enabled:r=!0}=t,{controlId:s,registerControlId:p,resetControlId:l}=B(),n=G(),u=ie(()=>Symbol()),f=we.useRef(!1),d=we.useRef(!1),i=E(()=>{!f.current||p===T||(f.current=!1,p(u.current,void 0))});return M(()=>{if(!r||p===T){i();return}let R;if(e!==void 0)d.current=!0,R=e;else if(d.current)R=n;else{l();return}if(R===void 0){i();return}f.current=!0,p(u.current,R)},[e,r,p,l,n,u,i]),M(()=>i,[i]),(r?s:void 0)??e??n}function ut(t,e){let r=G(t);return M(()=>(e(r),()=>{e(s=>s===r?void 0:s)}),[r,e]),r}function ct(t={}){let{id:e,fallbackControlId:r,native:s=!1,setLabelId:p,focusControl:l}=t,{controlId:n,setLabelId:u}=B(),f=E(m=>{u(m),p?.(m)}),d=ut(e,f),i=n??r;function R(m){if(l){l(m,i);return}if(!i)return;let b=Pt(m.currentTarget,i);Ye(b)&&kt(b)}function x(m){let b=He(m.nativeEvent);Je(b,"button,input,select,textarea")||(!m.defaultPrevented&&m.detail>1&&m.preventDefault(),!s&&R(m))}return s?{id:d,htmlFor:i,onMouseDown:x}:{id:d,onClick:x,onPointerDown(m){m.preventDefault()}}}function Pt(t,e){let r=t.getRootNode();for(;Ke(r);){let s=r.getElementById(e);if(s)return s;r=r.host.getRootNode()}return $e(t).getElementById(e)}function kt(t){t.focus({focusVisible:!0})}var te=I(P(),1);function se(t,e){return{...t,state:{...t.state,valid:!e&&t.state.valid}}}var Ae=Object.keys(ae);function Ut(t,e){return t.matches(":disabled")?!1:!e||t.form===e?!0:t.form===null&&!t.hasAttribute("form")}function ft(t,e){let r=null;for(let s of t.keys())if(Ut(s,e)){if(!s.validity.valid)return s;r??=s}return r}function mt(t){return{...ae,valid:!t,customError:t}}function _e(t){return t&&t.validationMessage?[t.validationMessage]:[]}function pt(t){let{elementRef:e,formRef:r}=Q(),{setValidityData:s,validate:p,validityData:l,validationDebounceTime:n,invalid:u,markedDirtyRef:f,state:d,shouldValidateOnChange:i,validationMode:R,registeredFieldIdRef:x}=t,{controlId:m,getDescriptionProps:b}=B(),N=ge(),h=te.useRef(null),C=ie(()=>new Map).current,g=te.useRef(0),w=te.useRef(null),k=te.useCallback((S,A)=>(C.set(S,A),()=>{C.delete(S)}),[C]),o=E(()=>{let S=ft(C,e.current);return S&&C.get(S)?.controlRef.current||null}),c=E(async(S,A=!1)=>{g.current+=1;let V=g.current;function q(a,F=u){let L=x.current??m;if(L==null)return;let y=r.current.fields.get(L);if(!y)return;let Y=se(a,F);r.current.fields.set(L,{...y,validityData:Y})}function Z(a,F){let L=a.valid===!1?F:[];return{value:S,state:a,error:L[0]??"",errors:L,initialValue:l.initialValue}}function re(a,F){let L=a.validity.customError?a.validationMessage:"",y=F.replace(/\r\n?/g,`
|
|
2
|
+
`);a.setCustomValidity(y),w.current=[a,y,L]}function K(){let a=w.current;w.current=null,a&&(!a[0].willValidate||a[0].validationMessage===a[1])&&a[0].setCustomValidity(a[2])}function D(a,F,L){let y=Z(a,F);q(y,L),s(y)}function X(a){let F=Ae.reduce((y,Y)=>(y[Y]=a.validity[Y],y),{}),L=!1;for(let y of Ae)if(y!=="valid"){if(y==="valueMissing"&&F[y])L=!0;else if(F[y])return F}return L&&!f.current&&(F.valid=!0,F.valueMissing=!1),F}function ee(){return C.size>0?ft(C,e.current):h.current}let j=ee();function de(){return j=ee(),j?.willValidate?X(j):mt(!1)}if(A){if(d.valid!==!1||!j)return;if(!j.validity.valueMissing){K();let a=ee(),F=a?.validity.customError?_e(a):[];D(mt(F.length>0),F,!1);return}for(let a of Ae)if(a!=="valid"&&a!=="valueMissing"&&a!=="customError"&&j.validity[a])return}N.clear(),K();let z=de(),v=_e(j),W=i();if(v.length===0||W){let a=Array.from(r.current.fields.values()).reduce((y,Y)=>(Y.name&&(y[Y.name]=Y.getValue()),y),{}),F=p(S,a),L;if(typeof F=="object"&&F!==null&&"then"in F){if(z.valid===!1?D(z,v):(R==="onSubmit"||!l.state.customError)&&(z.valid=null,D(z,v)),L=await F,V!==g.current)return;z=de()}else L=F;v=L?[].concat(L).filter(Boolean):[],v.length>0?(z.valid=!1,z.customError=!0,j?.willValidate&&re(j,v.join(`
|
|
3
|
+
`))):v=_e(j)}D(z,v)}),_=E((S,A=!1)=>{if(N.clear(),g.current+=1,A)return;let V=i();V&&S!==""&&n?N.start(n,()=>{c(S)}):c(S,!V)}),H=te.useCallback((S,A={})=>Xe(b(A),d.valid===!1&&!d.disabled&&!S?{"aria-invalid":!0}:Re),[b,d.disabled,d.valid]);return te.useMemo(()=>({getValidationProps:H,inputRef:h,registeredInputs:C,registerInput:k,getInputControl:o,commit:c,change:_}),[H,C,k,o,c,_])}var Ee=I(P(),1);function Rt(t){let{change:e,commit:r,invalid:s,markedDirtyRef:p,name:l,setRegisteredFieldName:n,registeredFieldIdRef:u,setValidityData:f,validityData:d}=t,{formRef:i}=Q(),R=Ee.useRef(null),x=Ee.useRef(null),m=Ee.useRef(!1),b=E(()=>{let o=x.current;if(o)return o.getValue?o.getValue():o.value});function N(o){return o.value===void 0?b():o.value}let h=E(()=>{let o=x.current;if(p.current=!0,!o){r(d.value);return}r(N(o))});function C(){let o=x.current;!o||!o.id||i.current.fields.set(o.id,{getValue:b,name:l??o.name,controlRef:o.controlRef,validityData:se(d,s),validate:h})}function g(o=x.current?.id){o&&i.current.fields.delete(o)}function w(o){if(m.current)return;m.current=!0;let c=N(o);f(_=>_.initialValue===c?_:{..._,initialValue:c})}M(()=>{let o=x.current;!o||!o.id||(n(l?void 0:o.name),i.current.fields.set(o.id,{getValue:b,name:l??o.name,controlRef:o.controlRef,validityData:se(d,s),validate:h}))},[i,b,s,l,n,h,d]),M(()=>{let o=i.current.fields;return()=>{let c=x.current?.id;c&&o.delete(c)}},[i]);let k=E((o,c)=>{if(!c){R.current===o&&(R.current=null,e(void 0,!0),g(),x.current=null,n(void 0),u.current=void 0);return}let _=x.current?.id,H=R.current;H&&H!==o&&e(void 0,!0),R.current=o,x.current=c,l||n(c.name),u.current=c.id,_&&_!==c.id&&g(_),w(c),C()});return[h,k]}var he=I(oe(),1),Bt=O.forwardRef(function(e,r){let{errors:s,validationMode:p,submitCountRef:l}=Q(),{render:n,className:u,validate:f,validationDebounceTime:d=0,validationMode:i=p,name:R,disabled:x=!1,invalid:m,dirty:b,touched:N,actionsRef:h,style:C,...g}=e,w=st(!0)?.disabled,k=E(f||(()=>null)),o=w||x,[c,_]=O.useState(!1),[H,S]=O.useState(!1),[A,V]=O.useState(!1),[q,Z]=O.useState(!1),re=O.useRef(void 0),K=b??H,D=N??c,X=O.useRef(K),ee=O.useRef(void 0),[j,de]=O.useState(),z=R??j;M(()=>{b!==void 0&&(X.current=b)},[b]);let v=E(pe=>{b===void 0&&(pe&&(X.current=!0),S(pe))}),W=E(pe=>{N===void 0&&_(pe)}),a=E(()=>i==="onChange"||i==="onSubmit"&&l.current>0),F=z&&Object.hasOwn(s,z)?s[z]:null,L=!!(Array.isArray(F)?F.length:F),y=m===!0||L,[Y,Me]=O.useState({state:ae,error:"",errors:[],value:null,initialValue:null}),je=!y&&(o?null:Y.state.valid),fe=O.useMemo(()=>({disabled:o,touched:D,dirty:K,valid:je,filled:A,focused:q}),[o,D,K,je,A,q]),me=pt({setValidityData:Me,validate:k,validityData:Y,validationDebounceTime:d,invalid:y,markedDirtyRef:X,state:fe,shouldValidateOnChange:a,validationMode:i,registeredFieldIdRef:ee}),[ze,We]=Rt({change:me.change,commit:me.commit,invalid:y,markedDirtyRef:X,name:R,setRegisteredFieldName:de,registeredFieldIdRef:ee,setValidityData:Me,validityData:Y});O.useImperativeHandle(h,()=>({validate:ze}),[ze]);let St=O.useMemo(()=>({invalid:y,name:z,validityData:Y,setValidityData:Me,disabled:o,setTouched:W,setDirty:v,setFilled:V,setFocused:Z,focusOwnerRef:re,validationMode:i,shouldValidateOnChange:a,state:fe,registerFieldControl:We,validation:me}),[y,z,Y,o,W,v,V,Z,i,a,fe,We,me]),Mt=$("div",e,{ref:r,state:fe,props:g,stateAttributesMapping:J});return(0,he.jsx)(Te.Provider,{value:St,children:Mt})}),bt=O.forwardRef(function(e,r){return(0,he.jsx)(Ie,{children:(0,he.jsx)(Bt,{...e,ref:r})})});var ue=I(P(),1);var Ve=I(P(),1),Pe=Ve.createContext({disabled:!1});function De(){return Ve.useContext(Pe)}var gt=ue.forwardRef(function(e,r){let{render:s,className:p,style:l,id:n,nativeLabel:u=!0,...f}=e,d=U(!1),i=De(),{labelId:R}=B(),x={...d.state,disabled:d.disabled||i.disabled},m=ue.useRef(null),b=ct({id:R??n,native:u});return $("label",e,{ref:[r,m],state:x,props:[b,f],stateAttributesMapping:J})});var le=I(P(),1);var ke=I(oe(),1),jt={...J,...qe},xt=le.forwardRef(function(e,r){let{render:s,id:p,className:l,match:n,style:u,...f}=e,d=G(p),{validityData:i,state:R,name:x}=U(!1),{setMessageIds:m}=B(),{errors:b}=Q(),N=x&&Object.hasOwn(b,x)?b[x]:null,h=!!(Array.isArray(N)?N.length:N),C=typeof n=="string",g=!1;n===!0?g=!0:R.disabled?g=!1:C?g=!!i.state[n]:g=h||i.state.valid===!1;let{mounted:w,transitionStatus:k,setMounted:o}=xe(g);M(()=>{if(!(!g||!d))return m(D=>D.concat(d)),()=>{m(D=>D.filter(X=>X!==d))}},[g,d,m]);let c=le.useRef(null),[_,H]=le.useState(null),[S,A]=le.useState(null),V=i.error;!C&&h?V=N:i.errors.length>1&&(V=i.errors);let q=V;Array.isArray(V)&&(q=V.length>1?(0,ke.jsx)("ul",{children:V.map(D=>(0,ke.jsx)("li",{children:D},D))}):V[0]);let Z=Array.isArray(V)?JSON.stringify(V):V;g&&Z!==S&&(A(Z),H(q)),Ge({open:g,ref:c,onComplete(){g||o(!1)}});let re={...R,transitionStatus:k},K=$("div",e,{ref:[r,c],state:re,props:[{id:d,children:g?q:_},f],stateAttributesMapping:jt,enabled:w});return w?K:null});var vt=I(P(),1);var Ft=vt.forwardRef(function(e,r){let{render:s,id:p,className:l,style:n,...u}=e,f=G(p),d=U(!1),i=De(),{setMessageIds:R}=B(),x={...d.state,disabled:d.disabled||i.disabled};return M(()=>{if(f)return R(b=>b.concat(f)),()=>{R(b=>b.filter(N=>N!==f))}},[f,R]),$("p",e,{ref:r,state:x,props:[{id:f},u],stateAttributesMapping:J})});var Le=I(P(),1);function Ct(t,e,r){let{setFocused:s,focusOwnerRef:p}=U(),l=E(n=>{(n?!t:p.current===l)&&(p.current=n&&l,r?.(n),s(n))});return M(()=>{let n=e.current;return n?.getRootNode()?.activeElement===n&&l(!0),()=>l(!1)},[t,e,l]),l}function yt(t,e,r,s,p=!0,l){let{registerFieldControl:n}=U(),u=ie(()=>Symbol());M(()=>{let f=u.current;if(!p){n(f,void 0);return}n(f,{controlRef:t,getValue:s,id:e,name:l,value:r})},[t,p,s,e,l,n,u,r]),M(()=>{let f=u.current;return()=>{n(f,void 0)}},[n,u])}var It=Le.forwardRef(function(e,r){let{render:s,className:p,id:l,name:n,value:u,disabled:f=!1,onValueChange:d,defaultValue:i,autoFocus:R=!1,style:x,...m}=e,{state:b,name:N,disabled:h,setTouched:C,setDirty:g,validityData:w,setFilled:k,validationMode:o,validation:c}=U(),{clearErrors:_,elementRef:H,submitCountRef:S}=Q(),A=h||f,V=N??n,q={...b,disabled:A},{labelId:Z}=B(),re=dt({id:l}),K=u!==void 0,D=u==null?void 0:String(u),X=E(()=>c.inputRef.current?.value);yt(c.inputRef,re,D,X,!A,n),M(()=>{let v=D??c.inputRef.current?.value;v!==void 0&&k(v!=="")},[D,i,c.inputRef,k]),rt(D,()=>{D!==void 0&&(_(V),g(D!==(w.initialValue??"")),c.change(D))});let ee=Le.useRef(null),j=Ct(A,ee),de=ge();return $("input",e,{ref:[r,ee],state:q,props:[{id:re,disabled:A,name:V,ref:c.inputRef,"aria-labelledby":Z,autoFocus:R,...K?{value:u}:{defaultValue:i},onChange(v){let W=v.currentTarget.value,a=Qe(Ze.none,v.nativeEvent);d?.(W,a),!K&&(g(W!==(w.initialValue??"")),k(W!==""),!v.nativeEvent.defaultPrevented&&!a.isCanceled&&(_(V),c.change(W)))},onFocus(){j(!0)},onBlur(v){if(C(!0),j(!1),o==="onBlur"){let W=v.currentTarget.value;c.commit(W),K&&queueMicrotask(()=>{let a=c.inputRef.current?.value;a!==void 0&&a!==W&&a!==(w.initialValue??"")&&c.commit(a)})}},onKeyDown(v){if(v.currentTarget.tagName==="INPUT"&&v.key==="Enter"){C(!0);let W=v.currentTarget.value,a=v.currentTarget.form;if(a&&a===H.current&&!v.defaultPrevented){let F=v.currentTarget,L=S.current;de.start(0,()=>{S.current===L&&c.commit(F.value)})}else c.commit(W)}}},m,v=>c.getValidationProps(A,v)],stateAttributesMapping:J})});var ce=I(P(),1);var Et=I(oe(),1),ht=function(e){let{children:r}=e,{validityData:s,invalid:p}=U(!1),l=ce.useMemo(()=>se(s,p),[s,p]),n=l.state.valid===!1,{transitionStatus:u}=xe(n),f=ce.useMemo(()=>({...l,validity:l.state,transitionStatus:u}),[l,u]);return(0,Et.jsx)(ce.Fragment,{children:r(f)})};var Ne=I(P(),1);var Ue=I(oe(),1),Vt=Ne.forwardRef(function(e,r){let{render:s,className:p,style:l,disabled:n=!1,...u}=e,{state:f,disabled:d}=U(!1),i=d||n,R={...f,disabled:i},x=Ne.useMemo(()=>({disabled:i}),[i]),m=$("div",e,{ref:r,state:R,props:u,stateAttributesMapping:J});return(0,Ue.jsx)(Ie,{children:(0,Ue.jsx)(Pe.Provider,{value:x,children:m})})});var Lt=I(oe(),1),Be=Dt.forwardRef(function(e,r){return(0,Lt.jsx)(Se.Control,{ref:r,...e})});var Nt=I(oe(),1),zt="block w-full rounded-md border border-dashboard-border-emphasis bg-dashboard-ink px-3 py-2 font-sans text-sm text-dashboard-text placeholder:text-dashboard-text-muted/70 focus:border-dashboard-focus focus:outline-none focus:ring-1 focus:ring-dashboard-focus/25 aria-invalid:border-rose-300 disabled:cursor-not-allowed disabled:opacity-50",Wt=tt(zt,{variants:{size:{default:"",comfortable:"min-h-11 text-base sm:min-h-10 sm:text-sm"}},defaultVariants:{size:"default"}});function hi({className:t,size:e,...r}){return(0,Nt.jsx)(Be,{"data-slot":"input",className:et(Wt({size:e}),t),...r})}export{J as a,U as b,st as c,Q as d,B as e,dt as f,Ut as g,De as h,Ct as i,yt as j,zt as k,hi as l};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Qa as r,Sa as n,b as s}from"./chunk-YPMUHXYT.js";import{c as o}from"./chunk-7SZRL6FY.js";var a=o(s(),1),l=n("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"border-dashboard-border-strong bg-dashboard-surface-raised text-dashboard-text",destructive:"border-rose-300/20 bg-rose-300/[0.08] text-rose-100 *:data-[slot=alert-description]:text-rose-100/70 *:[svg]:text-rose-300"}},defaultVariants:{variant:"default"}});function u({className:t,variant:e,...d}){return(0,a.jsx)("div",{"data-slot":"alert",role:"alert",className:r(l({variant:e}),t),...d})}function v({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"alert-title",className:r("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-dashboard-text",t),...e})}function c({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"alert-description",className:r("text-sm text-balance text-dashboard-text-muted md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-dashboard-text [&_p:not(:last-child)]:mb-4",t),...e})}export{u as a,v as b,c};
|