mastra 1.40.2-alpha.8 → 1.40.2
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/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/factory/assets/{AlertDialog.es-Dd0j0SAo.js → AlertDialog.es-Dkf8ZLsq.js} +1 -1
- package/dist/factory/assets/BoardConfigPage-CbGjRoKd.js +1 -0
- package/dist/factory/assets/{BoardIcons-BZwAAPO8.js → BoardIcons-ChSrt-Ky.js} +1 -1
- package/dist/factory/assets/BoardIntakePage-lNVbdWDh.js +1 -0
- package/dist/factory/assets/BoardRulesPage-DWDWpS0z.js +1 -0
- package/dist/factory/assets/{Breadcrumb.es-CVW-e0jJ.js → Breadcrumb.es-DRA_fT-0.js} +1 -1
- package/dist/factory/assets/{Card-C1AF3dS4-gxDCT3SZ.js → Card-C1AF3dS4-D5nc4nsO.js} +1 -1
- package/dist/factory/assets/CodeBlock.es-CSnUNCvE.js +6 -0
- package/dist/factory/assets/{CodeEditor-DKVZX8c1-D3tFx8Wi.js → CodeEditor-DE69mZsU-DhkPbKOd.js} +1 -1
- package/dist/factory/assets/{Command.es-DYk0Ffqt.js → Command.es-CJWc6UXm.js} +1 -1
- package/dist/factory/assets/{CompositeItem-CSfZykYZ.js → CompositeItem-DXJX9-KR.js} +1 -1
- package/dist/factory/assets/{CompositeRoot-BDBckJr1.js → CompositeRoot-COSYbRmu.js} +1 -1
- package/dist/factory/assets/ConditionRows-mhryClJA.js +1 -0
- package/dist/factory/assets/CreateFactoryPage-BJVsA5mX.js +1 -0
- package/dist/factory/assets/{DescriptionMarkdown-CPlbpMmD.js → DescriptionMarkdown-iotpUxXF.js} +1 -1
- package/dist/factory/assets/{FactorySkillPage-KcjxsEs4.js → FactorySkillPage-D9qzT8bU.js} +3 -3
- package/dist/factory/assets/{FactorySkillsPage-7FrLl5uh.js → FactorySkillsPage-PMfXgYDo.js} +1 -1
- package/dist/factory/assets/{Field.es-C1w4lsXS.js → Field.es-BgoAtL-2.js} +1 -1
- package/dist/factory/assets/GithubIcon-CAP9GMMO.css +1 -0
- package/dist/factory/assets/GithubIcon.es-CIm0nGDf.js +55 -0
- package/dist/factory/assets/{HrefLink-y54gg66e.js → HrefLink-1sjfHRy7.js} +1 -1
- package/dist/factory/assets/{IconArrowRotateClockwise.es-DeFmTuQG.js → IconArrowRotateClockwise.es-INXo4MVi.js} +1 -1
- package/dist/factory/assets/{IconFormCircle.es-Dl8N58Cl.js → IconFormCircle.es-DNm0NK7A.js} +1 -1
- package/dist/factory/assets/IconLoadingCircle.es-Cj4Y7rb5.js +1 -0
- package/dist/factory/assets/{IconPencil.es-DqPc7VYz.js → IconPencil.es-DLEsNj2e.js} +1 -1
- package/dist/factory/assets/{IconScript.es-D3hL2fC9.js → IconScript.es-CPO1Fq6Z.js} +1 -1
- package/dist/factory/assets/{IconSettingsSliderHor.es-CWhsvZzL.js → IconSettingsSliderHor.es-VS_Cfpz8.js} +1 -1
- package/dist/factory/assets/{Input-BWp76snh.js → Input-9DXuotFV.js} +1 -1
- package/dist/factory/assets/{InputNumber.es-DuTGd35f.js → InputNumber.es-Bho-MKtp.js} +1 -1
- package/dist/factory/assets/KnowledgePage-CmdlrOqT.js +13 -0
- package/dist/factory/assets/{LoadErrorState-B6WrspsB.js → LoadErrorState-w5i-jqQO.js} +1 -1
- package/dist/factory/assets/{MarkdownRenderer-Dp2g3gxh-CfibLUrr.js → MarkdownRenderer-Ca7UVGTG-D9IuJEv9.js} +1 -1
- package/dist/factory/assets/MastraGatewayBilling-D2xarOnv.js +1 -0
- package/dist/factory/assets/{NewBoardPage-CZSKsKqc.js → NewBoardPage-Co58G3u-.js} +2 -2
- package/dist/factory/assets/{NewPage-B2FRg0re.js → NewPage-B4lBGEFC.js} +1 -1
- package/dist/factory/assets/{OnboardingPage-D3oyT1ph.js → OnboardingPage-D1AJcuIq.js} +1 -1
- package/dist/factory/assets/{ProviderBrandIcon-DG3b_E_A.js → ProviderBrandIcon-CKq3WaGZ.js} +1 -1
- package/dist/factory/assets/{RadioGroup-B980sx1z.js → RadioGroup-CvTRwRir.js} +1 -1
- package/dist/factory/assets/{RadioGroup.es-BfW3ErPZ.js → RadioGroup.es-DQfIiNtD.js} +1 -1
- package/dist/factory/assets/RootGuards-CZvggXIb.js +1 -0
- package/dist/factory/assets/{RulesPage-X6M3Ywua.js → RulesPage-Bu80TWNE.js} +1 -1
- package/dist/factory/assets/{SearchInput.es-B6oIv0hQ.js → SearchInput.es-BRVlUePH.js} +1 -1
- package/dist/factory/assets/SessionLayout-DeleDrJs.js +4 -0
- package/dist/factory/assets/SessionPage-BAz6O4wl.js +1 -0
- package/dist/factory/assets/SessionSharingPopover-CX69d1UJ.js +1 -0
- package/dist/factory/assets/SettingsPage-9wgvYj6_.js +3 -0
- package/dist/factory/assets/{SettingsSubsection-B_X_u0Kt.js → SettingsSubsection-D1Yp4Ujt.js} +1 -1
- package/dist/factory/assets/Sidebar.es-B464rGRm.js +1 -0
- package/dist/factory/assets/{SignInPage-BloSA2lI.js → SignInPage-BBl3lfcN.js} +1 -1
- package/dist/factory/assets/{SkillBadges-IJt3Rano.js → SkillBadges-DuFvl4d8.js} +1 -1
- package/dist/factory/assets/{SlackConnectionPage-CPfQws3c.js → SlackConnectionPage-6H6OccOz.js} +1 -1
- package/dist/factory/assets/{StackedDiffs-BlNEFzj-.js → StackedDiffs-DtoTOL9C.js} +1 -1
- package/dist/factory/assets/{TabsRoot-DNjGHnQQ.js → TabsRoot-MM_4fh4A.js} +1 -1
- package/dist/factory/assets/{ThinkingLevel.es-DUHMUmiq.js → ThinkingLevel.es-Q1cgMAQj.js} +1 -1
- package/dist/factory/assets/{Tree-B90XgTY4-DiRKznbx.js → Tree-B90XgTY4-DvEdNAwi.js} +1 -1
- package/dist/factory/assets/{buttons-group-DA_wORqQ-87uBfszt.js → buttons-group-DA_wORqQ-tI0OhQlr.js} +1 -1
- package/dist/factory/assets/combobox-parts-BVuRAhY6-ClaPtI8E.js +1 -0
- package/dist/factory/assets/{copy-button-BPysC9gu-Ce9_m0Wu.js → copy-button-C3L1ZoAD-DpbBeGOv.js} +1 -1
- package/dist/factory/assets/{esm-KJWZ33y-.js → esm-C7YFnOq6.js} +1 -1
- package/dist/factory/assets/index-Btp5jnxM.js +125 -0
- package/dist/factory/assets/index-CK3K8ZRd.css +1 -0
- package/dist/factory/assets/{input-DqReKX0A-ScC7s6sY.js → input-DqReKX0A-D66C6dWr.js} +3 -3
- package/dist/factory/assets/{input-group-C64rGEu8-tF1AZfiZ.js → input-group-BXqgO3Q2-BNrm-udR.js} +1 -1
- package/dist/factory/assets/{onboardingFlow-DTVR_ThV.js → onboardingFlow-C89nSzO4.js} +1 -1
- package/dist/factory/assets/relative-time.es-2U7OUie-.js +1 -0
- package/dist/factory/assets/{ruleLanes-zac0HQwn.js → ruleLanes-CB6XWPZ9.js} +1 -1
- package/dist/factory/assets/{select-jT0h_BBB-6ji8g_rW.js → select-BPzTS5dZ-BGYcBcgg.js} +1 -1
- package/dist/factory/assets/{settings-C5r2ThW9-D7BpEINa.js → settings-C5r2ThW9-DgHKaQxx.js} +1 -1
- package/dist/factory/assets/{use-keydown.es-Celupa-_.js → use-keydown.es-BFnOTORr.js} +1 -1
- package/dist/factory/assets/{useBoardCatalog-C-gXjA-g.js → useBoardCatalog-DC55UfJd.js} +1 -1
- package/dist/factory/assets/{useBoardEditor-Bn11vS5Q.js → useBoardEditor-DFyQuLCD.js} +1 -1
- package/dist/factory/assets/{useChatSessionContext-CAxNkdHm.js → useChatSessionContext--lCmFMPT.js} +1 -1
- package/dist/factory/assets/useDraftModelGuards-BRcs4Wdl.js +29 -0
- package/dist/factory/assets/{useFactoryDecisions-600qQ62i.js → useFactoryDecisions-O_sajSic.js} +1 -1
- package/dist/factory/assets/{useGlobalSearchControls-CDvuBRkd.js → useGlobalSearchControls-BOmC11Gr.js} +1 -1
- package/dist/factory/assets/{useInfiniteQuery-BqXR1JQ-.js → useInfiniteQuery-D1T5yb8L.js} +1 -1
- package/dist/factory/assets/{useIntakeRoutes-OObHoZos.js → useIntakeRoutes-C2h717K6.js} +1 -1
- package/dist/factory/assets/{useLinearData-Bbyd0L4b.js → useLinearData-D6cSKZs3.js} +1 -1
- package/dist/factory/assets/{useRouteSessionId-0WFT82oQ.js → useRouteSessionId-BYStxtYL.js} +1 -1
- package/dist/factory/assets/{useRowDrag-0taus7Yi.js → useRowDrag-B2rvWAzw.js} +1 -1
- package/dist/factory/assets/{useSessionCard-bQ1xW_Go.js → useSessionCard-mjrTpVMe.js} +1 -1
- package/dist/factory/assets/{useSessionRepository-Bw24ik7O.js → useSessionRepository-CCb1tcZg.js} +1 -1
- package/dist/factory/assets/{useSessionRows-CnLoToLZ.js → useSessionRows-CIakAaqj.js} +1 -1
- package/dist/factory/assets/{useThreadWorkspacePath-BZmjtdux.js → useThreadWorkspacePath-BmtxcrV6.js} +1 -1
- package/dist/factory/assets/workspaces-DYc-hvkC.js +2 -0
- package/dist/factory/index.html +44 -46
- package/dist/index.js +1 -1
- package/dist/studio/assets/{index-CzTSJmoH.js → index-y7atQeWR.js} +2 -2
- package/dist/studio/assets/{main-cRrOk30z.js → main-BhWoo2De.js} +263 -260
- package/dist/studio/assets/style-CLhrNGTk.css +3 -0
- package/dist/studio/index.html +2 -2
- package/package.json +7 -7
- package/dist/factory/assets/BoardConfigPage-CxuB8oe8.js +0 -1
- package/dist/factory/assets/BoardIntakePage-CsKxBduq.js +0 -1
- package/dist/factory/assets/BoardRulesPage-6fKznTV0.js +0 -1
- package/dist/factory/assets/CodeBlock.es-BJ0-aeYG.js +0 -6
- package/dist/factory/assets/ConditionRows-gvlUEEY7.js +0 -1
- package/dist/factory/assets/CreateFactoryPage-CTflXXet.js +0 -1
- package/dist/factory/assets/GithubIcon-C0PmZadW.css +0 -1
- package/dist/factory/assets/GithubIcon.es-BmZS8JQG.js +0 -55
- package/dist/factory/assets/KnowledgePage-B7yyr3vo.js +0 -13
- package/dist/factory/assets/MastraGatewayBilling-CeKTtQZ3.js +0 -1
- package/dist/factory/assets/RootGuards-BNlIx3jH.js +0 -1
- package/dist/factory/assets/SessionLayout-DAfEeZWD.js +0 -4
- package/dist/factory/assets/SessionPage-BXT65bS8.js +0 -1
- package/dist/factory/assets/SessionSharingPopover-DRKk_u9-.js +0 -1
- package/dist/factory/assets/SettingsPage-tkiXsO19.js +0 -3
- package/dist/factory/assets/Sidebar.es-CFLW5bYW.js +0 -1
- package/dist/factory/assets/combobox-parts-DhYtFSRV-BZqyW5dv.js +0 -1
- package/dist/factory/assets/index-B4UKgiu6.css +0 -1
- package/dist/factory/assets/index-C7vLhvAL.js +0 -125
- package/dist/factory/assets/relative-time.es-DP-qvaLv.js +0 -1
- package/dist/factory/assets/spinner-B9ykw74u-DYljVQkq.js +0 -1
- package/dist/factory/assets/spinner-B9ykw74u-zThqnDlE.css +0 -1
- package/dist/factory/assets/useDraftModelGuards-CI7E0Q5e.js +0 -29
- package/dist/factory/assets/usePlatformConnections-C4XGXSRe.js +0 -1
- package/dist/factory/assets/workspaces-DlGQ_R_W.js +0 -2
- package/dist/studio/assets/style-Bk6CooWr.css +0 -3
- /package/dist/factory/assets/{MarkdownRenderer-Dp2g3gxh-C04mQel5.css → MarkdownRenderer-Ca7UVGTG-C04mQel5.css} +0 -0
- /package/dist/factory/assets/{combobox-parts-DhYtFSRV-CYlMQsMB.css → combobox-parts-BVuRAhY6-CYlMQsMB.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{O as t,k as n}from"./IconChevronRightMedium.es-BkPdzxSm.js";import{$n as r}from"./GithubIcon.es-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{O as t,k as n}from"./IconChevronRightMedium.es-BkPdzxSm.js";import{$n as r}from"./GithubIcon.es-CIm0nGDf.js";var i=e(n(),1),a=t(),o=(0,i.forwardRef)(({href:e=``,...t},n)=>(0,a.jsx)(r,{ref:n,to:e,...t}));o.displayName=`HrefLink`;export{o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{O as t,T as n,f as r,k as i}from"./IconChevronRightMedium.es-BkPdzxSm.js";import{Qr as a,Xr as ee,Xt as o,Zn as s,br as c,gr as l,in as te,yr as u,zt as d}from"./GithubIcon.es-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{O as t,T as n,f as r,k as i}from"./IconChevronRightMedium.es-BkPdzxSm.js";import{Qr as a,Xr as ee,Xt as o,Zn as s,br as c,gr as l,in as te,yr as u,zt as d}from"./GithubIcon.es-CIm0nGDf.js";import{r as ne}from"./CompositeItem-DXJX9-KR.js";import{t as re}from"./boardCatalog-y-s19dQU.js";var f=[`teammate`,`author`,`assignee`,`reviewer`,`worked`];function ie(e){return`factory:${e}`}var p=[`source`,`linearProject`,`pullRequest`,`trust`,...f,`label`];function m(e){return p.filter(t=>t!==`reviewer`||e)}function h(e,t){let n=new Set(m(e)),r={source:new Set,linearProject:new Set,pullRequest:new Set,trust:new Set,teammate:new Set,author:new Set,assignee:new Set,reviewer:new Set,worked:new Set,label:new Set};for(let e of n)r[e]=new Set(t(e).flatMap(e=>typeof e==`string`&&e.trim()?[e.trim()]:[]));return r}function g(e,t){return h(t,t=>e.getAll(t))}function _(e,t){let n=new URLSearchParams(e);for(let e of p){n.delete(e);for(let r of t[e])n.append(e,r)}return n}function v(e){e.delete(`item`),e.delete(`comment`)}function ae(e){return p.filter(t=>e[t].size>0).map(t=>({id:t,fieldId:t,operatorId:`in`,value:[...e[t]]}))}function y(e){return p.some(t=>e[t].size>0)}function b(e,t,n){let r={...e,[t]:new Set(n)};return t===`source`&&!n.includes(`linear`)&&(r.linearProject=new Set),r}function x(e,t){return h(t,t=>{let n=e.findLast(e=>e.fieldId===t)?.value;return Array.isArray(n)?n:[n]})}var S=[`board`,`list`],C=`list`,w=`layout`;function T(e){return S.some(t=>t===e)}function E(e){let t=e.get(w);return t&&T(t)?t:C}function oe(e,t){let n=new URLSearchParams(e);return t===`list`?n.delete(w):n.set(w,t),n}var se=`relative flex min-h-36 flex-col gap-3 rounded-card border border-surface-rim bg-fill-subtle p-2`,ce=`grid min-h-10 grid-cols-[2.375rem_minmax(0,1fr)_var(--spacing-avatar-sm)_2.625rem] items-center gap-x-3 rounded-lg px-3 py-1 max-sm:grid-cols-[2.375rem_minmax(0,1fr)_auto] max-sm:gap-y-1 max-sm:py-2`,le=`[container-type:inline-size] m-px min-h-0 min-w-0 flex-1 [scrollbar-gutter:stable] overflow-auto overscroll-x-contain rounded-[calc(var(--studio-frame-radius,1.5rem)-1px)] lg:overscroll-x-auto`,D=[`recent`,`recent-mine`,`created-newest`,`created-oldest`],O=`sort`,k=`recent`,A={recent:`Recently moved`,"recent-mine":`Recently moved by me`,"created-newest":`Newest on board`,"created-oldest":`Oldest on board`};function ue(e){return D.filter(t=>t!==`recent-mine`||e).map(e=>({value:e,label:A[e]}))}function j(e){return D.some(t=>t===e)}function M(e,t){let n=e.get(O);return!n||!j(n)||n===`recent-mine`&&!t?k:n}function N(e,t){let n=new URLSearchParams(e);return t===`recent`?n.delete(O):n.set(O,t),n}var P=`view`,F=te({sort:o(D).catch(k),layout:o(S).catch(C)});function I(e,t){return`mastracode.savedViews:${e}:${t}`}var L=`mastracode.boardViews`,R=[...p,O,w,P],z=(e,t)=>`${e}:${t}`;function B(e){let t=new URLSearchParams;for(let[n,r]of e)R.includes(n)&&t.append(n,r);return t}function V(){try{let e=JSON.parse(localStorage.getItem(L)??`{}`);return typeof e!=`object`||!e||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).filter(e=>typeof e[1]==`string`))}catch{return{}}}function H(e){return R.some(t=>e.has(t))}function U(e,t){let n=re(e,t),r=de(e,t);return r?`${n}?${r}`:n}function de(e,t){let n=V()[z(e,t)];if(!n)return;let r=B(new URLSearchParams(n));return H(r)?r:void 0}function fe(e,t,n){let r=z(e,t),i=B(n).toString(),a=Object.entries(V()).filter(([e])=>e!==r);i&&a.push([r,i]);try{localStorage.setItem(L,JSON.stringify(Object.fromEntries(a.slice(-50))))}catch{}}var pe=/^(?:\/(?:work|review|rules|new)|\/settings(?:\/[^/]+){0,2})\/?$/,W=/^\/(work|review)\/?$/;function G(e){return`/factories/${e.id}`}function me(e){return`/factories/${e}/new-factory`}function he(e){return`/factories/${e}/user/new/${crypto.randomUUID()}`}function K(e,t){return`/factories/${e}/workspaces/${t.sessionId}/threads/${t.threadId}`}function ge(e,t,n){return`/factories/${e}/cards/${t}/new/${n}`}function _e(e,t,n){return n===void 0?`/factories/${e}/cards/${t}`:K(e,n)}function ve(e,t){let n=G(e),r=/^\/factories\/[^/]+(\/.*)?$/.exec(t.pathname)?.[1]??``;if(r&&!pe.test(r))return n;let i=W.exec(r)?.[1];return i?`${U(e.id,i)}${t.hash}`:`${n}${r}${t.hash}`}var ye=e(i(),1),q=t();function be({label:e,rows:t=3,rowClassName:r=`h-5 w-full`,className:i,children:a}){return(0,q.jsx)(`div`,{role:`status`,"aria-label":e,className:n(`flex flex-col gap-1.5`,i),children:Array.from({length:t},(e,t)=>(0,q.jsx)(ye.Fragment,{children:a??(0,q.jsx)(ne,{"aria-hidden":!0,className:n(`motion-reduce:before:animate-none`,r)})},t))})}function J(e,t){let n=new URLSearchParams({sessionId:t.sessionId,resourceId:t.resourceId,threadId:t.threadId});return e.get(`/web/config/models?${n}`)}function Y(e,t){return u({queryKey:d.availableModels({factoryProjectId:t?.factoryProjectId,sessionId:t?.sessionId,resourceId:t?.resourceId,threadId:t?.threadId}),queryFn:t?()=>J(e,t):ee,enabled:t!==void 0&&t.enabled!==!1})}function xe(e){let{client:t}=s();return c(Y(t,e))}function Se(e){return e?.scope?`?scope=${e.scope}`:e?.factoryProjectId?`?factoryId=${encodeURIComponent(e.factoryProjectId)}`:``}async function X(e,t){let n=Se(t),r=await fetch(`${e}/web/config/models${n}`,{credentials:`include`,headers:{Accept:`application/json`}});if(!r.ok)throw Error(`Failed to load models (${r.status})`);return await r.json()}function Z(e,t){return u({queryKey:d.availableModels(t&&{factoryProjectId:t.factoryProjectId,scope:t.scope}),queryFn:()=>X(e,t)})}function Q(e){let{baseUrl:t,client:n}=s(),r=e?.sessionId&&e.resourceId&&e.threadId?{...e,sessionId:e.sessionId,resourceId:e.resourceId,threadId:e.threadId}:void 0,i=r?Y(n,r).queryKey:Z(t,e).queryKey;return c({queryKey:i,queryFn:r?()=>J(n,r):()=>X(t,e),enabled:e?.enabled!==!1,select:e=>e.models})}function Ce(){let{baseUrl:e}=s();return c({...Z(e,{scope:`user`}),select:e=>e.models})}function we(e){let{baseUrl:t}=s();return c({...Z(t,e),enabled:e.enabled!==!1,select:e=>e.fallbackModelId??void 0})}function Te(e,t){let{data:n}=Q(t);return n?.find(t=>t.id===e)?.reasoningOptions}function $(e){return u({queryKey:d.defaultModel(),queryFn:()=>e.get(`/web/config/default-model`)})}function Ee({enabled:e=!0}={}){let{client:t}=s();return c({...$(t),enabled:e})}function De(){let{client:e}=s(),t=a();return l({mutationFn:t=>e.put(`/web/config/default-model`,{modelId:t}),onSuccess:()=>Promise.all([t.invalidateQueries({queryKey:d.defaultModel()}),t.invalidateQueries({queryKey:d.availableModels()})])})}function Oe(){let{client:e}=s(),t=a(),n=d.defaultModel();return l({scope:{id:`personal-thinking-default`},mutationFn:t=>e.put(`/web/config/default-model/thinking`,{thinkingLevel:t}),onMutate:async e=>{await t.cancelQueries({queryKey:n,exact:!0});let r=t.getQueryData(n);return r&&t.setQueryData(n,{...r,thinkingLevel:e}),{previous:r}},onError:(e,r,i)=>{if(i?.previous){let{thinkingLevel:e}=i.previous;t.setQueryData(n,t=>t&&{...t,thinkingLevel:e})}return t.invalidateQueries({queryKey:n,exact:!0})},onSuccess:({thinkingLevel:e})=>(t.setQueryData(n,t=>t&&{...t,thinkingLevel:e}),t.invalidateQueries({queryKey:d.availableModels()}))})}function ke(){let{client:e}=s();return l({mutationFn:()=>e.post(`/web/config/default-model/apply`,{})})}function Ae(){let{client:e}=s(),t=a();return l({mutationFn:()=>e.del(`/web/config/default-model`),onSuccess:()=>Promise.all([t.invalidateQueries({queryKey:d.defaultModel()}),t.invalidateQueries({queryKey:d.availableModels()})])})}var je=r(`IconArrowRotateClockwise`,()=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{d:`M19.5165 14.6667C18.4182 17.7738 15.4549 20 11.9717 20C7.5534 20 3.97168 16.4183 3.97168 12C3.97168 7.58172 7.5534 4 11.9717 4C15.0676 4 17 5.5 19 8`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,q.jsx)(`path`,{d:`M19 4V8H15`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]}));export{M as A,m as B,fe as C,A as D,I as E,ce as F,g as G,_ as H,le as I,f as J,v as K,E as L,N as M,j as N,O,se as P,oe as R,U as S,F as T,x as U,ae as V,y as W,ie as Y,me as _,Ee as a,he as b,Z as c,Te as d,Ce as f,_e as g,ge as h,Ae as i,ue as j,k,Q as l,be as m,$ as n,De as o,xe as p,b as q,ke as r,Oe as s,je as t,we as u,G as v,P as w,K as x,ve as y,p as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{O as t,S as n,T as r,f as i,k as a,m as o,n as s,o as c}from"./IconChevronRightMedium.es-BkPdzxSm.js";import{Ds as l,Os as u,Ts as d,Yo as f,ao as p,dr as m,xa as h,ya as g}from"./GithubIcon.es-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{O as t,S as n,T as r,f as i,k as a,m as o,n as s,o as c}from"./IconChevronRightMedium.es-BkPdzxSm.js";import{Ds as l,Os as u,Ts as d,Yo as f,ao as p,dr as m,xa as h,ya as g}from"./GithubIcon.es-CIm0nGDf.js";import{r as _}from"./Sidebar.es-B464rGRm.js";import{b as v}from"./IconArrowRotateClockwise.es-INXo4MVi.js";var y=t(),b=e(a(),1),x={xs:`size-avatar-xs`,inline:`size-avatar-inline`,sm:`size-avatar-sm`,md:`size-avatar-md`,lg:`size-avatar-lg`,control:`size-control-md`},S={xs:`text-meta`,inline:`text-meta`,sm:`text-caption`,md:`text-body-sm`,lg:`text-body`,control:`text-body-sm`},C={xs:`[&>svg]:hidden`,inline:`[&>svg]:size-[11px]`,sm:`[&>svg]:size-icon-xs`,md:`[&>svg]:size-icon-sm`,lg:`[&>svg]:size-icon-sm`,control:`[&>svg]:size-icon-sm`},w=(0,b.createContext)(void 0),T=b.createContext(void 0);function E(){let e=b.useContext(T);if(e===void 0)throw Error(l(13));return e}var D={imageLoadingStatus:()=>null},O=b.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,[s,c]=b.useState(`idle`),l={imageLoadingStatus:s},u=b.useMemo(()=>({imageLoadingStatus:s,setImageLoadingStatus:c}),[s,c]),d=o(`span`,e,{state:l,ref:t,props:a,stateAttributesMapping:D});return(0,y.jsx)(T.Provider,{value:u,children:d})});function k(e,{referrerPolicy:t,crossOrigin:r,sizes:i,srcSet:a},o){let s=b.useState(`idle`),c=s[1];return u(()=>{if(!o)return n;if(!e&&!a)return c(`error`),n;let s=!0,l=new window.Image,u=e=>()=>{s&&c(e)};return c(`loading`),l.onload=u(`loaded`),l.onerror=u(`error`),t&&(l.referrerPolicy=t),l.crossOrigin=r??null,i&&(l.sizes=i),a&&(l.srcset=a),e&&(l.src=e),l.complete&&c(l.naturalWidth>0?`loaded`:`error`),()=>{s=!1}},[o,e,a,i,r,t,c]),s}var A={...D,...f},j=b.forwardRef(function(e,t){let{className:n,render:r,onLoadingStatusChange:i,keepMounted:a=!1,style:s,sizes:c,srcSet:l,src:d,...f}=e,{setImageLoadingStatus:m}=E(),[_,v]=k(d,e,!a),y=_===`loaded`,{mounted:x,transitionStatus:S,setMounted:C}=h(y),w=b.useRef(null),T=b.useRef(!0);u(()=>{if(!a)return;let e=T.current;T.current=!1;let t=w.current;if(!t)return;if(!t.complete){v(`loading`);return}let n=t.naturalWidth>0?`loaded`:`error`;v(n),n===`loaded`&&e&&C(!0)},[a,d,l,c,f.crossOrigin,f.referrerPolicy,r,v,C]);let D=a?{"data-loading":_===`loading`?``:void 0,"data-error":_===`error`?``:void 0,"aria-hidden":_!==`loaded`||void 0,onLoad(){v(`loaded`)},onError(){v(`error`)}}:void 0,O=p(e=>{i?.(e),m(e)});u(()=>{_!==`idle`&&O(_)},[_,O]),u(()=>()=>m(`idle`),[m]),g({enabled:!y,open:y,ref:w,onComplete(){y||C(!1)}});let j={imageLoadingStatus:_,transitionStatus:a&&S===`ending`?void 0:S},M=a||x,N={};c!==void 0&&(N.sizes=c),l!==void 0&&(N.srcSet=l),d!==void 0&&(N.src=d);let P=o(`img`,e,{state:j,ref:[t,w],props:[D,f,N],stateAttributesMapping:A,enabled:M});return M?P:null}),M=b.forwardRef(function(e,t){let{className:n,render:r,delay:i=0,style:a,...s}=e,{imageLoadingStatus:c}=E(),[l,u]=b.useState(i===0),f=d();return b.useEffect(()=>(i>0?f.start(i,()=>u(!0)):u(!0),f.clear),[f,i]),o(`span`,e,{state:{imageLoadingStatus:c},ref:t,props:s,stateAttributesMapping:D,enabled:c!==`loaded`&&(i===0||l)})}),N={neutral:`bg-fill-inverse text-background`,success:`bg-success-indicator text-background`,warning:`bg-warning-indicator text-background`,destructive:`bg-destructive-indicator text-background`,info:`bg-info-indicator text-background`},P={xs:`min-h-1.5 min-w-1.5 [&>svg]:hidden`,inline:`min-h-1.5 min-w-1.5 [&>svg]:hidden`,sm:`min-h-2 min-w-2 [&>svg]:hidden`,md:`min-h-2.5 min-w-2.5 [&>svg]:size-icon-xs`,lg:`min-h-3 min-w-3 [&>svg]:size-icon-xs`,control:`min-h-2.5 min-w-2.5 [&>svg]:size-icon-xs`};function F({tone:e,className:t,children:n,...i}){let a=(0,b.useContext)(w)??`sm`;return(0,y.jsx)(`span`,{...i,"data-slot":`avatar-badge`,className:r(`absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full ring-2 ring-card select-none`,`[&>[data-slot=avatar]]:border-0 [&>[data-slot=avatar]]:after:hidden`,`after:pointer-events-none after:absolute after:inset-0 after:rounded-full after:shadow-inset`,e?N[e]:`bg-card text-foreground`,P[a],t),children:(0,y.jsx)(w.Provider,{value:`xs`,children:n})})}function I({src:e,name:t,size:n,interactive:i=!1,color:a,textColor:o}){let l=(0,b.useContext)(w),[u,d]=(0,b.useState)(),f=n??l??`sm`,p=t.trim()[0]?.toUpperCase()??`A`,m=!!e&&u!==e,h=!m&&!!a;return(0,y.jsx)(`div`,{"data-slot":`avatar`,"data-size":f,className:r(x[f],`flex shrink-0 items-center justify-center overflow-hidden rounded-full border border-border`,!h&&`bg-fill`,c,i&&`cursor-pointer hover:border-border-hover`),style:h?{backgroundColor:a}:void 0,children:m?(0,y.jsx)(`img`,{src:e,alt:t,className:`size-full object-cover`,onError:()=>d(e)}):(0,y.jsx)(s,{variant:f===`xs`?`meta`:`body`,tone:h?void 0:`muted`,className:`text-center`,style:h&&o?{color:o}:void 0,children:p})})}function L({size:e,className:t,...n}){let i=(0,b.useContext)(w),a=e??i??`sm`;return(0,y.jsx)(w.Provider,{value:a,children:(0,y.jsx)(O,{...n,"data-slot":`avatar`,"data-size":a,className:r(`relative inline-flex shrink-0 rounded-full select-none`,`after:pointer-events-none after:absolute after:inset-0 after:rounded-full after:border after:border-border`,x[a],t)})})}function R(e){return e.name===void 0?(0,y.jsx)(L,{...e}):(0,y.jsx)(I,{...e})}function z({className:e,...t}){let n=(0,b.useContext)(w)??`sm`;return(0,y.jsx)(M,{...t,"data-slot":`avatar-fallback`,className:r(`flex size-full items-center justify-center overflow-hidden rounded-full bg-muted text-muted-foreground`,S[n],C[n],e)})}var B={xs:`[--avatar-group-size:var(--spacing-avatar-xs)] [--avatar-group-gap:1px] [--avatar-group-edge:0.5px]`,inline:`[--avatar-group-size:var(--spacing-avatar-inline)] [--avatar-group-gap:1px] [--avatar-group-edge:0.5px]`,sm:`[--avatar-group-size:var(--spacing-avatar-sm)] [--avatar-group-gap:--spacing(0.5)] [--avatar-group-edge:1px]`,md:`[--avatar-group-size:var(--spacing-avatar-md)] [--avatar-group-gap:--spacing(0.5)] [--avatar-group-edge:1px]`,lg:`[--avatar-group-size:var(--spacing-avatar-lg)] [--avatar-group-gap:--spacing(0.5)] [--avatar-group-edge:1px]`,control:`[--avatar-group-size:var(--spacing-control-md)] [--avatar-group-gap:--spacing(0.5)] [--avatar-group-edge:1px]`},V=[`*:not-first:ml-[calc(var(--avatar-group-size)/-4)]`,`*:not-first:[mask-image:radial-gradient(circle_at_calc(var(--avatar-group-size)*-0.25)_50%,transparent_calc(var(--avatar-group-size)/2+var(--avatar-group-gap)),black_calc(var(--avatar-group-size)/2+var(--avatar-group-gap)+var(--avatar-group-edge)))]`];function H({size:e=`sm`,className:t,children:n,...i}){let a=b.Children.toArray(n);return(0,y.jsx)(w.Provider,{value:e,children:(0,y.jsx)(`div`,{...i,"data-slot":`avatar-group`,className:r(`flex items-center`,B[e],V,t),children:a.map((e,t)=>(0,y.jsx)(`div`,{"data-slot":`avatar-group-item`,className:`flex`,style:{zIndex:a.length-t},children:e},t))})})}function U({className:e,...t}){let n=(0,b.useContext)(w)??`sm`;return(0,y.jsx)(`div`,{...t,"data-slot":`avatar-group-count`,"data-size":n,className:r(`relative flex shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground tabular-nums`,`after:pointer-events-none after:absolute after:inset-0 after:rounded-full after:border after:border-border`,x[n],S[n],C[n],e)})}function W({className:e,...t}){return(0,y.jsx)(j,{...t,"data-slot":`avatar-image`,className:r(`size-full rounded-full object-cover`,e)})}var G=Object.assign(R,{Image:W,Fallback:z,Badge:F,Group:H,GroupCount:U});function K(){let e=m(),t=_();return n=>{e(v(n)),t?.setOpenMobile(!1)}}var q=i(`IconFormCircle`,()=>(0,y.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,stroke:`currentColor`,strokeWidth:`2`}));export{K as n,G as r,q as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{O as t,f as n,k as r}from"./IconChevronRightMedium.es-BkPdzxSm.js";import{B as i,Qr as a,Zn as o,br as s,gr as c,yr as l,zt as u}from"./GithubIcon.es-CIm0nGDf.js";import{t as d}from"./createLucideIcon-BHFyd0LL.js";var f={name:`factory`,size:24,node:[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M16 16h.01`,key:`1f9h7w`}],[`path`,{d:`M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z`,key:`1iv0i2`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]};f.node;var p=d(f),m=e(r(),1);function h(e,t){let[n,r]=(0,m.useState)(e);return(0,m.useEffect)(()=>{let n=window.setTimeout(()=>r(e),t);return()=>window.clearTimeout(n)},[t,e]),n}function g(e){return l({queryKey:u.githubStatus(),queryFn:()=>i(e)})}function _(e=!0){let{baseUrl:t}=o();return s({...g(t),enabled:e})}var v=`[nango]`;function y({expectedWidth:e,expectedHeight:t}){let n=window.screen.width,r=window.screen.height,i=n/2-e/2,a=r/2-t/2;return{left:Math.max(i,0),top:Math.max(a,0),width:Math.min(e,n),height:Math.min(t,r)}}function b(e){let t={...e,scrollbars:`yes`,resizable:`yes`,status:`no`,toolbar:`no`,location:`no`,copyhistory:`no`,menubar:`no`,directories:`no`},n=[];for(let e in t)n.push(`${e}=${t[e]}`);return n.join(`,`)}var x=class{baseURL;debug;swClient;errorHandler;modal;isProcessingMessage=!1;constructor({baseUrl:e,debug:t,webSocketUrl:n,successHandler:r,errorHandler:i}){this.baseURL=e,this.debug=t,this.swClient=new WebSocket(n),this.errorHandler=i,this.swClient.onmessage=e=>{this.isProcessingMessage=!0,this.handleMessage(e,r),this.isProcessingMessage=!1}}setModal(e){this.modal=e}handleMessage(e,t){let n=JSON.parse(e.data);switch(n.message_type){case`connection_ack`:this.debug&&console.log(v,`Connection ack received. Opening modal...`),this.baseURL.searchParams.set(`ws_client_id`,n.ws_client_id),this.open();break;case`error`:this.debug&&console.log(v,`Error received. Rejecting authorization...`),this.errorHandler(n.error_type,n.error_desc),this.swClient.close();break;case`success`:this.debug&&console.log(v,`Success received. Resolving authorization...`),t({providerConfigKey:n.provider_config_key,connectionId:n.connection_id,isPending:n.is_pending}),this.swClient.close();break;default:this.debug&&console.log(v,`Unknown message type received from Nango server. Ignoring...`);return}}open(){this.modal&&(this.debug&&console.log(v,`opening`,this.baseURL.href),this.modal.location=this.baseURL.href,(!this.modal||this.modal.closed||this.modal.closed===void 0)&&this.errorHandler(`blocked_by_browser`,`Modal blocked by browser`))}close(){this.modal&&!this.modal.closed&&(this.modal.close(),delete this.modal),this.swClient.close(),delete this.swClient}},S=class{iframe=null;isReady=!1;listener=null;sessionToken;baseURL;apiURL;onEvent;detectClosedAuthWindow;lang;themeOverride;constructor({sessionToken:e,baseURL:t=`https://connect.nango.dev`,apiURL:n=`https://api.nango.dev`,detectClosedAuthWindow:r,onEvent:i,lang:a,themeOverride:o}){this.sessionToken=e,this.baseURL=t,this.apiURL=n,this.onEvent=i,this.detectClosedAuthWindow=r,this.lang=a,this.themeOverride=o}open(){this.iframe?.isConnected||(this.iframe&&this.close(),this.iframe=this.createIframe(),document.body.append(this.iframe),document.body.style.overflow=`hidden`,this.setupEventListeners())}createIframe(){let e=new URL(this.baseURL);e.pathname.endsWith(`/`)||(e.pathname+=`/`),this.apiURL&&e.searchParams.append(`apiURL`,this.apiURL),this.detectClosedAuthWindow&&e.searchParams.append(`detectClosedAuthWindow`,String(this.detectClosedAuthWindow)),this.lang&&e.searchParams.append(`lang`,this.lang),this.themeOverride&&e.searchParams.append(`theme`,this.themeOverride);let t=document.createElement(`iframe`);return t.src=e.href,t.id=`connect-ui`,t.style.position=`fixed`,t.style.zIndex=`9999`,t.style.top=`0`,t.style.left=`0`,t.style.right=`0`,t.style.bottom=`0`,t.style.width=`100vw`,t.style.height=`100vh`,t.style.backgroundColor=`transparent`,t.allow=`clipboard-write`,t}setupEventListeners(){this.listener=e=>{if(e.origin!==new URL(this.baseURL).origin||typeof e.data!=`object`||!e.data||!e.data.type)return;let t=e.data;switch(t.type){case`ready`:this.isReady=!0,this.sendSessionToken();break;case`close`:this.close()}this.onEvent&&this.onEvent(t)},window.addEventListener(`message`,this.listener,!1)}setSessionToken(e){this.sessionToken=e,this.isReady&&this.sendSessionToken()}close(){this.listener&&=(window.removeEventListener(`message`,this.listener),null),this.iframe&&(this.iframe.remove(),this.iframe=null,document.body.style.overflow=``)}sendSessionToken(){if(!this.sessionToken)return;let e={type:`session_token`,sessionToken:this.sessionToken};this.iframe?.contentWindow?.postMessage(e,`*`)}},C=`https://api.nango.dev`,w=`NANGO DEBUG LOG: `,T=class extends Error{type;constructor(e,t){super(e),this.type=t}},E=class{hostBaseUrl;websocketsBaseUrl;publicKey;connectSessionToken;debug=!1;width=500;height=600;tm=null;win=null;constructor(e={}){e.host=e.host||C,e.websocketsPath=e.websocketsPath||`/`,this.debug=e.debug||!1,this.debug&&(console.log(w,`Debug mode is enabled.`),console.log(w,`Using host: ${e.host}.`)),e.width&&(this.width=e.width),e.height&&(this.height=e.height),this.hostBaseUrl=e.host.replace(/\/+$/,``),this.publicKey=e.publicKey,this.connectSessionToken=e.connectSessionToken;try{let t=new URL(this.hostBaseUrl),n=new URL(e.websocketsPath,t);this.websocketsBaseUrl=n.toString().replace(`https://`,`wss://`).replace(`http://`,`ws://`)}catch{throw new T(`Invalid URL provided for the Nango host.`,`invalid_host_url`)}}async create(e,t,n){this.ensureCredentials();let r=null,i=n;typeof t==`string`?r=t:i=t;let a=this.hostBaseUrl+`/auth/unauthenticated/${e}${this.toQueryString(r,i)}`;return await this.triggerAuth({authUrl:a})}auth(e,t,n){this.ensureCredentials();let r=null,i=n;if(typeof t==`string`?r=t:i={...i,...t},i&&(`installation`in i&&i.installation===`outbound`||`credentials`in i&&(`token_id`in i.credentials&&`token_secret`in i.credentials||!(`oauth_client_id_override`in i.credentials)||!(`oauth_client_secret_override`in i.credentials))&&Object.keys(i.credentials).length>0)){let t=i.credentials;if(!t)throw new T(`Credentials are required for custom auth`,`missing_credentials`);let{credentials:n,...a}=i;return this.customAuth(e,r,this.convertCredentialsToConfig(t),a,i.installation)}let a=window.open(``,`_blank`,b(y({expectedWidth:this.width,expectedHeight:this.height})));return new Promise((t,n)=>{let o=e=>{t(e)},s=(e,t)=>{n(new T(t,e))};if(this.win&&this.clear(),!a||a.closed||a.closed===void 0){s(`blocked_by_browser`,`Modal blocked by browser`);return}let c;try{c=new URL(`${this.hostBaseUrl}/oauth/connect/${e}${this.toQueryString(r,i)}`)}catch{s(`invalid_host_url`,`Invalid URL provided for the Nango host.`);return}this.win=new x({baseUrl:c,debug:this.debug,webSocketUrl:this.websocketsBaseUrl,successHandler:o,errorHandler:s}),this.win.setModal(a),this.tm=setInterval(()=>{this.win&&this.win.modal&&this.win.modal.closed&&(this.win.isProcessingMessage||i?.detectClosedAuthWindow&&(clearInterval(this.tm),this.win.close(),this.win=null,n(new T(`The authorization window was closed before the authorization flow was completed`,`window_closed`))))},500)}).finally(()=>{this.clear()})}reconnect(e,t){if(!this.connectSessionToken)throw new T(`Reconnect requires a session token`,`missing_connect_session_token`);return this.auth(e,t)}clear(){if(this.tm&&clearInterval(this.tm),this.win){let e=this.win;this.win=null,setTimeout(()=>{try{e.close()}catch{}},500)}}openConnectUI(e){let t=new S({sessionToken:this.connectSessionToken,...e});return t.open(),t}convertCredentialsToConfig(e){let t={};if(`type`in e&&`username`in e&&`password`in e&&e.type===`SIGNATURE`)return{params:{type:e.type,username:e.username,password:e.password}};if(`type`in e&&e.type===`AWS_SIGV4`){let t={type:e.type,role_arn:e.role_arn};return e.region&&(t.region=e.region),{params:t}}if(`username`in e&&(t.username=e.username||``),`password`in e&&(t.password=e.password||``),`apiKey`in e&&(t.apiKey=e.apiKey||``),`role_arn`in e&&(t.role_arn=e.role_arn),`region`in e&&e.region&&(t.region=e.region),`privateKey`in e||`type`in e&&e.type===`JWT`){let{privateKey:t,...n}=e;return{...n},t&&typeof t==`object`&&`id`in t&&`secret`in t,{params:e}}if(`client_id`in e&&(`client_secret`in e||`client_private_key`in e))return{params:{client_id:e.client_id,client_secret:e.client_secret,client_certificate:e.client_certificate,client_private_key:e.client_private_key}};if(`token_id`in e&&`token_secret`in e){let t={token_id:e.token_id,token_secret:e.token_secret};return`oauth_client_id_override`in e&&(t.oauth_client_id_override=e.oauth_client_id_override),`oauth_client_secret_override`in e&&(t.oauth_client_secret_override=e.oauth_client_secret_override),{params:t}}return`username`in e&&`password`in e&&`organization_id`in e&&`dev_key`in e?{params:{username:e.username,password:e.password,organization_id:e.organization_id,dev_key:e.dev_key}}:`type`in e&&e.type===`TWO_STEP`?{params:{...e}}:{params:t}}async triggerAuth({authUrl:e,credentials:t,assertionOption:n}){let r={};t&&Object.assign(r,t),n&&Object.keys(n).length>0&&(r.assertionOption=n);let i=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},...Object.keys(r).length>0?{body:JSON.stringify(r)}:{}});if(!i.ok){let e=await i.json();throw new T(e.error.message,e.error.code)}return i.json()}async customAuth(e,t,n,r,i){let{params:a}=n;if(!a)throw new T(`You must specify credentials.`,`missing_credentials`);if(`type`in a&&a.type===`TWO_STEP`){let n=r?.assertionOption;return await this.triggerAuth({authUrl:this.hostBaseUrl+`/auth/two-step/${e}${this.toQueryString(t,r)}`,credentials:a,...n?{assertionOption:n}:{}})}return`type`in a&&a.type===`SIGNATURE`&&`username`in a&&`password`in a?await this.triggerAuth({authUrl:this.hostBaseUrl+`/auth/signature/${e}${this.toQueryString(t,r)}`,credentials:a}):`type`in a&&a.type===`AWS_SIGV4`&&`role_arn`in a?await this.triggerAuth({authUrl:this.hostBaseUrl+`/auth/aws-sigv4/${e}${this.toQueryString(t,r)}`,credentials:{role_arn:a.role_arn,region:a.region}}):`username`in a&&`password`in a&&`organization_id`in a&&`dev_key`in a?await this.triggerAuth({authUrl:this.hostBaseUrl+`/auth/bill/${e}${this.toQueryString(t,r)}`,credentials:a}):`apiKey`in a?await this.triggerAuth({authUrl:this.hostBaseUrl+`/api-auth/api-key/${e}${this.toQueryString(t,r)}`,credentials:a}):`username`in a||`password`in a?await this.triggerAuth({authUrl:this.hostBaseUrl+`/api-auth/basic/${e}${this.toQueryString(t,r)}`,credentials:a}):`privateKey`in a||`type`in a&&a.type===`JWT`?await this.triggerAuth({authUrl:this.hostBaseUrl+`/auth/jwt/${e}${this.toQueryString(t,r)}`,credentials:a}):`token_id`in a&&`token_secret`in a?await this.triggerAuth({authUrl:this.hostBaseUrl+`/auth/tba/${e}${this.toQueryString(t,r)}`,credentials:a}):`client_id`in a&&(`client_secret`in a||`client_private_key`in a)?await this.triggerAuth({authUrl:this.hostBaseUrl+`/oauth2/auth/${e}${this.toQueryString(t,r)}`,credentials:a}):i===`outbound`?await this.triggerAuth({authUrl:this.hostBaseUrl+`/auth/oauth-outbound/${e}${this.toQueryString(t,r)}`}):Promise.reject(Error(`Something went wrong with the authorization`))}toQueryString(e,t){let n=[];if(e&&n.push(`connection_id=${e}`),this.publicKey&&n.push(`public_key=${this.publicKey}`),this.connectSessionToken&&n.push(`connect_session_token=${this.connectSessionToken}`),t){for(let e in t.params){let r=t.params[e];typeof r==`string`&&n.push(`params[${encodeURIComponent(e)}]=${encodeURIComponent(r)}`)}if(t.hmac&&n.push(`hmac=${t.hmac}`),t.user_scope&&n.push(`user_scope=${t.user_scope.join(`,`)}`),t.credentials){let e=t.credentials;`oauth_client_id_override`in e&&n.push(`credentials[oauth_client_id_override]=${encodeURIComponent(e.oauth_client_id_override)}`),`oauth_client_secret_override`in e&&n.push(`credentials[oauth_client_secret_override]=${encodeURIComponent(e.oauth_client_secret_override)}`),`oauth_refresh_token_override`in e&&n.push(`credentials[oauth_refresh_token_override]=${encodeURIComponent(e.oauth_refresh_token_override)}`),`token_id`in e&&n.push(`token_id=${encodeURIComponent(e.token_id)}`),`token_secret`in e&&n.push(`token_secret=${encodeURIComponent(e.token_secret)}`)}for(let e in t.authorization_params){let r=t.authorization_params[e];typeof r==`string`?n.push(`authorization_params[${e}]=${r}`):r===void 0&&n.push(`authorization_params[${e}]=undefined`)}}return n.length===0?``:`?`+n.join(`&`)}ensureCredentials(){if(!this.publicKey&&!this.connectSessionToken)throw new T(`You must specify a public key OR a connect session token (cf. documentation).`,`missing_auth_token`)}},D=`https://projects.mastra.ai`,O={jira:{id:`jira`,displayName:`Jira`,authKind:`oauth`},"incident-io":{id:`incident-io`,displayName:`incident.io`,authKind:`apiKey`},gitlab:{id:`gitlab`,displayName:`GitLab`,authKind:`oauth`},"gitlab-self-hosted":{id:`gitlab-self-hosted`,displayName:`self-hosted GitLab`,authKind:`apiKey`,credentialName:`access token`,params:[{key:`hostname`,label:`Instance hostname`,placeholder:`gitlab.example.com`}]},vanta:{id:`vanta`,displayName:`Vanta`,authKind:`oauth`}};function k(e,t){return t.integrationId===`gitlab-self-hosted`?`gitlab-self-hosted`:e}async function A(e,t,n){let r;try{r=await fetch(`${e}${t}`,{headers:{Accept:`application/json`},credentials:`include`,...n})}catch(e){let t=Error(`Network request failed`);throw t.transient=!0,t.cause=e,t}if(!r.ok){let e=`Request failed (${r.status})`,t,n;try{let i=await r.json();t=i.error,n=i.reason,i.message?e=i.message:i.error&&(e=i.error)}catch{}let i=Error(e);throw i.code=t,i.reason=n,i.status=r.status,i}return await r.json()}function j(e){if(!(e instanceof Error))return!1;if(e.transient===!0)return!0;let t=e.status;return t!==void 0&&t>=500}function M(e){if(!(e instanceof Error))return!1;let t=e.status;return t===403||t===404}async function N(e,t){let{connections:n}=await A(e,`/web/integrations/platform/${t}/connections`);return n}function P(e){if(!(e instanceof Error)||!(`code`in e)||e.code!==`connect_tools_off`)return;let t=`reason`in e?e.reason:void 0;return t===`no_credentials`||t===`no_project_id`?t:`unknown`}async function F(e){return A(e,`/web/integrations/platform/connect-tools`)}async function I(e){return A(e,`/web/integrations/platform/connect-tools/tools`)}function L(e,t){let n=[...new Set(t)].sort((e,t)=>t.length-e.length),r=new Map,i=[];for(let t of e){let e=n.find(e=>t.name.startsWith(`${e}_`));if(!e){i.push(t);continue}let a=r.get(e)??[];a.push(t),r.set(e,a)}return{byIntegration:r,other:i}}function R(e,t){return`${D}/${t?`orgs/${encodeURIComponent(t)}`:`org`}/projects/${encodeURIComponent(e)}/settings/connect`}async function z(e,t){return A(e,`/web/integrations/platform/${t}/connect-session`,{method:`POST`})}async function B(e,t,n){return A(e,`/web/integrations/platform/${t}/connections/${encodeURIComponent(n)}/reconnect-session`,{method:`POST`})}var V=class extends Error{reason;constructor(e,t){super(e),this.reason=t,this.name=`HeadlessAuthError`}};async function H(e){let t=new E({connectSessionToken:e.session.sessionToken}),n={};e.credentials?n.credentials=e.credentials:n.detectClosedAuthWindow=!0,e.params&&(n.params=e.params);try{await t.auth(e.session.integrationId,n)}catch(e){throw U(e)}}function U(e){return e instanceof T&&e.type===`blocked_by_browser`?new V(`Popup was blocked. Allow popups for this site and try again.`,`popup_blocked`):e instanceof T&&e.type===`window_closed`?new V(`Authorization window was closed before the connection finished.`,`window_closed`):new V(e instanceof Error&&e.message?e.message:`Authorization failed.`,`failed`)}var W=2e3,G=6e4;async function K(e,t,n,r={}){let i=r.intervalMs??W,a=Date.now()+(r.deadlineMs??G);for(;;){try{let r=(await N(e,t)).find(e=>e.id===n);if(r?.status===`active`)return r}catch(e){if(!j(e))throw e}if(Date.now()>=a)return null;await new Promise(e=>setTimeout(e,i))}}function q(e,t=!0){let{baseUrl:n}=o();return s({queryKey:u.platformConnections(e),queryFn:()=>N(n,e),enabled:t,retry:!1})}function J(e,t){return l({queryKey:[...u.platformConnections(t),`active`],queryFn:async()=>{try{return(await N(e,t)).some(e=>e.status===`active`)}catch(e){if(M(e))return!1;throw e}},retry:!1})}function Y(e){let t=a();return async()=>{let n=e===`gitlab`||e===`gitlab-self-hosted`;await Promise.all([t.invalidateQueries({queryKey:u.platformConnections(e)}),...e===`jira`?[t.invalidateQueries({queryKey:u.jiraStatus()}),t.invalidateQueries({queryKey:u.jiraProjects()})]:[],...e===`incident-io`?[t.invalidateQueries({queryKey:u.incidentioStatus()}),t.invalidateQueries({queryKey:u.incidentioSources()})]:[],...n?[t.invalidateQueries({queryKey:u.platformConnections(`gitlab`)}),t.invalidateQueries({queryKey:u.platformConnections(`gitlab-self-hosted`)}),t.invalidateQueries({queryKey:[`gitlab`,`status`]}),t.invalidateQueries({queryKey:[`gitlab`,`projects`]})]:[]])}}function X(e){let{baseUrl:t}=o(),n=Y(e);return c({mutationFn:async(n={})=>{let r=await z(t,e);return await H({session:r,...n.credentials?{credentials:n.credentials}:{},...n.params?{params:n.params}:{}}),K(t,e,r.connectionId)},onSettled:n})}function Z(e){let{baseUrl:t}=o(),n=Y(e);return c({mutationFn:async n=>{let r=await B(t,e,n.connectionId);return await H({session:r,...n.credentials?{credentials:n.credentials}:{},...r.params?{params:r.params}:{}}),K(t,e,n.connectionId)},onSettled:n})}var Q=t(),$=n(`IconLoadingCircle`,()=>(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`path`,{d:`M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z`,stroke:`currentColor`,strokeOpacity:`0.3`,strokeWidth:`2`}),(0,Q.jsx)(`path`,{d:`M20.9451 13C20.4839 17.1716 17.1716 20.4839 13 20.9451`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]}));export{h as _,Z as a,P as c,I as d,F as f,_ as g,g as h,q as i,L as l,k as m,J as n,D as o,R as p,X as r,O as s,$ as t,M as u,p as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{O as t,T as n,f as r,k as i,m as a}from"./IconChevronRightMedium.es-BkPdzxSm.js";import{$i as o,As as s,Bi as c,Ca as l,Da as u,Ds as d,Fs as f,Gi as p,Ia as m,Ji as h,Ko as g,Lo as _,Oa as v,Os as y,Qi as b,Rs as x,Ui as S,Uo as C,Vi as w,Wi as T,Wo as E,Xi as D,Yi as O,Zi as k,aa as A,da as j,fa as M,ga as N,go as P,ia as F,ka as ee,ks as te,ma as ne,oa as re,pa as ie,qi as ae,sa as oe,ta as se,us as ce,wa as le,ya as ue,zi as de}from"./GithubIcon.es-BmZS8JQG.js";function I(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function fe(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function L(e){let t=[],n,r=1/0,i=1/0,a=-1/0,o=-1/0;for(let s of Array.from(e).sort((e,t)=>e.top-t.top)){if(r=Math.min(r,s.left),i=Math.min(i,s.top),a=Math.max(a,s.right),o=Math.max(o,s.bottom),!n||s.top-n.top>n.height/2)t.push(fe(s));else{let e=t[t.length-1];e.left=Math.min(e.left,s.left),e.right=Math.max(e.right,s.right),e.bottom=Math.max(e.bottom,s.bottom),e.width=e.right-e.left,e.height=e.bottom-e.top}n=s}return{lines:t,fallback:I(r,i,a,o)}}function R(e,t,n){return e.findIndex(e=>t>e.left-2&&t<e.right+2&&n>e.top-2&&n<e.bottom+2)}function z(e){return I(e.left,e.top,e.right,e.bottom)}function pe(e,t,n){let{lines:r}=L(e.getClientRects());if(r.length<2)return;let i=R(r,t,n);return{x:t,y:n,lineIndex:i===-1?void 0:i,element:e}}function me(e,t,n){let{lines:r,fallback:i}=L(e.getClientRects());if(r.length<2)return null;let a=n?.x,o=n?.y,s=t[0];if(n?.lineIndex!=null&&r[n.lineIndex])return z(r[n.lineIndex]);if(a!=null&&o!=null){let e=R(r,a,o);if(e!==-1)return z(r[e])}if(r.length===2&&r[0].left>r[1].right&&a!=null&&o!=null)return i;if(s===`t`||s===`b`){let e=r[0],t=r[r.length-1],n=s===`t`?e:t;return I(n.left,e.top,n.right,t.bottom)}let c=s===`l`,l=r[0].left,u=r[0].right,d=c?1/0:-1/0,f=r[0],p=r[0];for(let e of r){l=Math.min(l,e.left),u=Math.max(u,e.right);let t=c?e.left:e.right;c&&t<d||!c&&t>d?(d=t,f=e,p=e):t===d&&(p=e)}return I(l,f.top,u,p.bottom)}function he(e){return`contextElement`in e&&e.contextElement?e.contextElement:ce(e)?e:void 0}function ge(e,t){function n(t){B(e,t.currentTarget,t.clientX,t.clientY)}function r(e){t||n(e)}return{onFocus(){e.current=void 0},onMouseEnter:r,onMouseMove:r}}function B(e,t,n,r){let i=pe(t,n,r);return e.current=i,i}function _e(e){return{name:`inline`,async fn(t){let n=t.elements.reference;if(typeof n?.getClientRects!=`function`)return{};let r=he(n),i=e.current,a=i?.element===n||i?.element===r?i:void 0,o=me(n,t.placement,a);if(!o||typeof t.platform.getElementRects!=`function`)return{};let s=await t.platform.getElementRects({reference:{contextElement:r,getBoundingClientRect(){return o}},floating:t.elements.floating,strategy:t.strategy});return t.rects.reference.x===s.reference.x&&t.rects.reference.y===s.reference.y&&t.rects.reference.width===s.reference.width&&t.rects.reference.height===s.reference.height?{}:{reset:{rects:s}}}}}var V=e(i(),1),H=V.createContext(void 0);function U(e){let t=V.useContext(H);if(t===void 0&&!e)throw Error(d(50));return t}var W={...o,instantType:e=>e.instantType,adaptiveOrigin:e=>e.adaptiveOrigin,closeDelay:e=>e.closeDelay},ve=class extends se{constructor(e,t,n){let r=new F;super(G(e,r,t,n),K(r),W)}setOpen=(e,t)=>{let{inlineRectCoordsRef:n}=this.context;oe(this,e,t,{onBeforeDispatch(){let r=t.event;e&&t.reason===`trigger-hover`&&t.trigger&&`clientX`in r&&`clientY`in r&&n.current?.element!==t.trigger&&B(n,t.trigger,r.clientX,r.clientY)}})}};function ye(){let e=new F;return new p(Object.freeze(G(void 0,e)),Object.freeze(K(e)),W)}function G(e,t,n,r=!1){return{...b(t,n,r),instantType:void 0,adaptiveOrigin:void 0,closeDelay:300,...e}}function K(e){return{popupRef:V.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e,inlineRectCoordsRef:{current:void 0}}}var q=t();function J(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:i,actionsRef:a,handle:o,triggerId:s,defaultTriggerId:c=null,children:l}=e,u=ne((e,r)=>new ve({open:n,openProp:t,activeTriggerId:c,triggerIdProp:s},e,r));u.useControlledProp(`openProp`,t),u.useControlledProp(`triggerIdProp`,s),u.useContextCallback(`onOpenChange`,r),u.useContextCallback(`onOpenChangeComplete`,i);let d=u.useState(`open`),f=u.useState(`activeTriggerId`),p=u.useState(`mounted`),m=u.useState(`payload`);j(u,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:h}=M(d,u,()=>{u.context.inlineRectCoordsRef.current=void 0});y(()=>{d&&(f??u.set(`payload`,void 0))},[u,f,d]),V.useImperativeHandle(a,()=>({unmount:h,close:()=>u.setOpen(!1,_(P))}),[h,u]);let g=d||p||o!=null;return(0,q.jsxs)(H.Provider,{value:u,children:[o&&(0,q.jsx)(re,{handle:o,store:u}),g&&(0,q.jsx)(be,{store:u}),typeof l==`function`?l({payload:m}):l]})}function be({store:e}){let t=e.useState(`floatingRootContext`),n=le(t);return ie(e,{activeTriggerProps:n.reference,inactiveTriggerProps:n.trigger,popupProps:n.floating}),null}var xe=te(function(e){return U(!0)?(0,q.jsx)(J,{...e}):(0,q.jsx)(v,{children:(0,q.jsx)(J,{...e})})}),Y=V.createContext(void 0);function Se(){let e=V.useContext(Y);if(e===void 0)throw Error(d(48));return e}var Ce=V.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return U().useState(`mounted`)||n?(0,q.jsx)(Y.Provider,{value:n,children:(0,q.jsx)(S,{ref:t,...r})}):null}),we=s(function(e,t){let{render:n,className:r,delay:i,closeDelay:o,id:s,payload:c,handle:l,style:u,...f}=e,p=U(!0),m=k(l)??p;if(!m)throw Error(d(89));let _=T(s),v=m.useState(`isTriggerActive`,_),y=m.useState(`isOpenedByTrigger`,_),b=m.useState(`floatingRootContext`),x=m.context.inlineRectCoordsRef,S=V.useRef(null),C=i??600,w=o??300,{registerTrigger:E,isMountedByThisTrigger:O}=N(_,S,m,{payload:c,closeDelay:w}),A=h(b,{mouseOnly:!0,move:!1,handleClose:ae(),delay:()=>({open:C,close:w}),triggerElementRef:S,isActiveTrigger:v,isClosing:()=>m.select(`transitionStatus`)===`ending`}),j=D(b,{delay:C}),M={open:y},P=m.useState(`triggerProps`,O),F=ge(x,y);return a(`a`,e,{state:M,ref:[t,E,S],props:[A,j.reference,P,F,{id:_},f],stateAttributesMapping:g})}),X=V.createContext(void 0);function Z(){let e=V.useContext(X);if(e===void 0)throw Error(d(49));return e}var Te=V.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f=5,arrowPadding:p=5,sticky:h=!1,disableAnchorTracking:g=!1,collisionAvoidance:_=m,style:v,...b}=e,x=U(),S=Se(),C=ee(),T=x.useState(`open`),E=x.useState(`mounted`),D=x.useState(`floatingRootContext`),O=x.useState(`instantType`),k=x.useState(`transitionStatus`),A=x.useState(`adaptiveOrigin`),j=x.context.inlineRectCoordsRef,M=w({anchor:i,floatingRootContext:D,positionMethod:a,mounted:E,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:h,disableAnchorTracking:g,keepMounted:S,nodeId:C,collisionAvoidance:_,adaptiveOrigin:A,inline:_e(j)}),N=M.update;y(()=>{T&&E&&N()},[T,E,N]);let P={open:T,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:O},F=de(e,P,{styles:M.positionerStyles,transitionStatus:k,props:b,refs:[t,x.useStateSetter(`positionerElement`)],hidden:!E,inert:!T});return(0,q.jsx)(X.Provider,{value:M,children:(0,q.jsx)(u,{id:C,children:F})})}),Ee=V.forwardRef(function(e,t){let{className:n,render:r,style:i,...o}=e,s=U(),{side:l,align:u}=Z(),d=s.useState(`open`),f=s.useState(`instantType`),p=s.useState(`transitionStatus`),m=s.useState(`popupProps`),h=s.useState(`floatingRootContext`),g=s.useState(`closeDelay`);return ue({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),O(h,{closeDelay:g}),a(`div`,e,{state:{open:d,side:l,align:u,instant:f,transitionStatus:p},ref:[t,s.context.popupRef,s.useStateSetter(`popupElement`)],props:[A,m,c(p),o],stateAttributesMapping:E})}),De=V.forwardRef(function(e,t){let{render:n,className:r,style:i,...o}=e,s=U(),{arrowRef:c,side:l,align:u,arrowUncentered:d,arrowStyles:f}=Z(),p={open:s.useState(`open`),side:l,align:u,uncentered:d};return a(`div`,e,{state:p,ref:[c,t],props:[{style:f,"aria-hidden":!0},o],stateAttributesMapping:C})}),Oe=class extends l{constructor(){super(ye(),`PreviewCard`)}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select(`open`)??!1}};function ke(){return new Oe}var Ae=ke,je=xe,Q=V.forwardRef(({className:e,delay:t=250,...n},r)=>(0,q.jsx)(we,{ref:r,delay:t,className:e,...n}));Q.displayName=`HoverCardTrigger`;var $=V.forwardRef(({className:e,children:t,side:r=`top`,align:i,sideOffset:a=5,container:o,showArrow:s=!0,anchor:c,positionMethod:l=x,alignOffset:u,collisionBoundary:d,collisionPadding:p,sticky:m,arrowPadding:h,disableAnchorTracking:g,collisionAvoidance:_,...v},y)=>{let b={side:r,align:i,sideOffset:a,anchor:c,positionMethod:l,alignOffset:u,collisionBoundary:d,collisionPadding:p,sticky:m,arrowPadding:h,disableAnchorTracking:g,collisionAvoidance:_};return(0,q.jsx)(Ce,{container:o??void 0,children:(0,q.jsx)(Te,{className:`z-50 data-[anchor-hidden]:hidden`,...b,children:(0,q.jsxs)(Ee,{ref:y,className:n(`w-auto max-w-100 origin-[var(--transform-origin)] rounded-xl px-3 py-2.5 text-caption text-foreground`,f,`data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:zoom-out-95 data-[open]:animate-in data-[open]:fade-in-0 data-[open]:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1`,`motion-reduce:data-[closed]:animate-none motion-reduce:data-[open]:animate-none`,e),...v,children:[t,s&&(0,q.jsx)(De,{className:`fill-popover`})]})})})});$.displayName=`HoverCardContent`;var Me=r(`IconPencil`,()=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{d:`M18.4142 3.91415L20.0858 5.58573C20.8668 6.36678 20.8668 7.63311 20.0858 8.41416L18 10.4999L7.79289 20.7071C7.60536 20.8946 7.351 20.9999 7.08579 20.9999H3V16.9142C3 16.6489 3.10536 16.3946 3.29289 16.2071L13.5 5.99994L15.5858 3.91416C16.3668 3.13311 17.6332 3.13311 18.4142 3.91415Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,q.jsx)(`path`,{d:`M13.5 6L18 10.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]}));export{Ae as a,Q as i,je as n,$ as r,Me as t};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{O as t,T as n,f as r,k as i,m as a}from"./IconChevronRightMedium.es-BkPdzxSm.js";import{$i as o,As as s,Bi as c,Ca as l,Da as u,Ds as d,Fs as f,Gi as p,Ia as m,Ji as h,Ko as g,Lo as _,Oa as v,Os as y,Qi as b,Rs as x,Ui as S,Uo as C,Vi as w,Wi as T,Wo as E,Xi as D,Yi as O,Zi as k,aa as A,da as j,fa as M,ga as N,go as P,ia as F,ka as ee,ks as te,ma as ne,oa as re,pa as ie,qi as ae,sa as oe,ta as se,us as ce,wa as le,ya as ue,zi as de}from"./GithubIcon.es-CIm0nGDf.js";function I(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function fe(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function L(e){let t=[],n,r=1/0,i=1/0,a=-1/0,o=-1/0;for(let s of Array.from(e).sort((e,t)=>e.top-t.top)){if(r=Math.min(r,s.left),i=Math.min(i,s.top),a=Math.max(a,s.right),o=Math.max(o,s.bottom),!n||s.top-n.top>n.height/2)t.push(fe(s));else{let e=t[t.length-1];e.left=Math.min(e.left,s.left),e.right=Math.max(e.right,s.right),e.bottom=Math.max(e.bottom,s.bottom),e.width=e.right-e.left,e.height=e.bottom-e.top}n=s}return{lines:t,fallback:I(r,i,a,o)}}function R(e,t,n){return e.findIndex(e=>t>e.left-2&&t<e.right+2&&n>e.top-2&&n<e.bottom+2)}function z(e){return I(e.left,e.top,e.right,e.bottom)}function pe(e,t,n){let{lines:r}=L(e.getClientRects());if(r.length<2)return;let i=R(r,t,n);return{x:t,y:n,lineIndex:i===-1?void 0:i,element:e}}function me(e,t,n){let{lines:r,fallback:i}=L(e.getClientRects());if(r.length<2)return null;let a=n?.x,o=n?.y,s=t[0];if(n?.lineIndex!=null&&r[n.lineIndex])return z(r[n.lineIndex]);if(a!=null&&o!=null){let e=R(r,a,o);if(e!==-1)return z(r[e])}if(r.length===2&&r[0].left>r[1].right&&a!=null&&o!=null)return i;if(s===`t`||s===`b`){let e=r[0],t=r[r.length-1],n=s===`t`?e:t;return I(n.left,e.top,n.right,t.bottom)}let c=s===`l`,l=r[0].left,u=r[0].right,d=c?1/0:-1/0,f=r[0],p=r[0];for(let e of r){l=Math.min(l,e.left),u=Math.max(u,e.right);let t=c?e.left:e.right;c&&t<d||!c&&t>d?(d=t,f=e,p=e):t===d&&(p=e)}return I(l,f.top,u,p.bottom)}function he(e){return`contextElement`in e&&e.contextElement?e.contextElement:ce(e)?e:void 0}function ge(e,t){function n(t){B(e,t.currentTarget,t.clientX,t.clientY)}function r(e){t||n(e)}return{onFocus(){e.current=void 0},onMouseEnter:r,onMouseMove:r}}function B(e,t,n,r){let i=pe(t,n,r);return e.current=i,i}function _e(e){return{name:`inline`,async fn(t){let n=t.elements.reference;if(typeof n?.getClientRects!=`function`)return{};let r=he(n),i=e.current,a=i?.element===n||i?.element===r?i:void 0,o=me(n,t.placement,a);if(!o||typeof t.platform.getElementRects!=`function`)return{};let s=await t.platform.getElementRects({reference:{contextElement:r,getBoundingClientRect(){return o}},floating:t.elements.floating,strategy:t.strategy});return t.rects.reference.x===s.reference.x&&t.rects.reference.y===s.reference.y&&t.rects.reference.width===s.reference.width&&t.rects.reference.height===s.reference.height?{}:{reset:{rects:s}}}}}var V=e(i(),1),H=V.createContext(void 0);function U(e){let t=V.useContext(H);if(t===void 0&&!e)throw Error(d(50));return t}var W={...o,instantType:e=>e.instantType,adaptiveOrigin:e=>e.adaptiveOrigin,closeDelay:e=>e.closeDelay},ve=class extends se{constructor(e,t,n){let r=new F;super(G(e,r,t,n),K(r),W)}setOpen=(e,t)=>{let{inlineRectCoordsRef:n}=this.context;oe(this,e,t,{onBeforeDispatch(){let r=t.event;e&&t.reason===`trigger-hover`&&t.trigger&&`clientX`in r&&`clientY`in r&&n.current?.element!==t.trigger&&B(n,t.trigger,r.clientX,r.clientY)}})}};function ye(){let e=new F;return new p(Object.freeze(G(void 0,e)),Object.freeze(K(e)),W)}function G(e,t,n,r=!1){return{...b(t,n,r),instantType:void 0,adaptiveOrigin:void 0,closeDelay:300,...e}}function K(e){return{popupRef:V.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e,inlineRectCoordsRef:{current:void 0}}}var q=t();function J(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:i,actionsRef:a,handle:o,triggerId:s,defaultTriggerId:c=null,children:l}=e,u=ne((e,r)=>new ve({open:n,openProp:t,activeTriggerId:c,triggerIdProp:s},e,r));u.useControlledProp(`openProp`,t),u.useControlledProp(`triggerIdProp`,s),u.useContextCallback(`onOpenChange`,r),u.useContextCallback(`onOpenChangeComplete`,i);let d=u.useState(`open`),f=u.useState(`activeTriggerId`),p=u.useState(`mounted`),m=u.useState(`payload`);j(u,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:h}=M(d,u,()=>{u.context.inlineRectCoordsRef.current=void 0});y(()=>{d&&(f??u.set(`payload`,void 0))},[u,f,d]),V.useImperativeHandle(a,()=>({unmount:h,close:()=>u.setOpen(!1,_(P))}),[h,u]);let g=d||p||o!=null;return(0,q.jsxs)(H.Provider,{value:u,children:[o&&(0,q.jsx)(re,{handle:o,store:u}),g&&(0,q.jsx)(be,{store:u}),typeof l==`function`?l({payload:m}):l]})}function be({store:e}){let t=e.useState(`floatingRootContext`),n=le(t);return ie(e,{activeTriggerProps:n.reference,inactiveTriggerProps:n.trigger,popupProps:n.floating}),null}var xe=te(function(e){return U(!0)?(0,q.jsx)(J,{...e}):(0,q.jsx)(v,{children:(0,q.jsx)(J,{...e})})}),Y=V.createContext(void 0);function Se(){let e=V.useContext(Y);if(e===void 0)throw Error(d(48));return e}var Ce=V.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return U().useState(`mounted`)||n?(0,q.jsx)(Y.Provider,{value:n,children:(0,q.jsx)(S,{ref:t,...r})}):null}),we=s(function(e,t){let{render:n,className:r,delay:i,closeDelay:o,id:s,payload:c,handle:l,style:u,...f}=e,p=U(!0),m=k(l)??p;if(!m)throw Error(d(89));let _=T(s),v=m.useState(`isTriggerActive`,_),y=m.useState(`isOpenedByTrigger`,_),b=m.useState(`floatingRootContext`),x=m.context.inlineRectCoordsRef,S=V.useRef(null),C=i??600,w=o??300,{registerTrigger:E,isMountedByThisTrigger:O}=N(_,S,m,{payload:c,closeDelay:w}),A=h(b,{mouseOnly:!0,move:!1,handleClose:ae(),delay:()=>({open:C,close:w}),triggerElementRef:S,isActiveTrigger:v,isClosing:()=>m.select(`transitionStatus`)===`ending`}),j=D(b,{delay:C}),M={open:y},P=m.useState(`triggerProps`,O),F=ge(x,y);return a(`a`,e,{state:M,ref:[t,E,S],props:[A,j.reference,P,F,{id:_},f],stateAttributesMapping:g})}),X=V.createContext(void 0);function Z(){let e=V.useContext(X);if(e===void 0)throw Error(d(49));return e}var Te=V.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f=5,arrowPadding:p=5,sticky:h=!1,disableAnchorTracking:g=!1,collisionAvoidance:_=m,style:v,...b}=e,x=U(),S=Se(),C=ee(),T=x.useState(`open`),E=x.useState(`mounted`),D=x.useState(`floatingRootContext`),O=x.useState(`instantType`),k=x.useState(`transitionStatus`),A=x.useState(`adaptiveOrigin`),j=x.context.inlineRectCoordsRef,M=w({anchor:i,floatingRootContext:D,positionMethod:a,mounted:E,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:h,disableAnchorTracking:g,keepMounted:S,nodeId:C,collisionAvoidance:_,adaptiveOrigin:A,inline:_e(j)}),N=M.update;y(()=>{T&&E&&N()},[T,E,N]);let P={open:T,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:O},F=de(e,P,{styles:M.positionerStyles,transitionStatus:k,props:b,refs:[t,x.useStateSetter(`positionerElement`)],hidden:!E,inert:!T});return(0,q.jsx)(X.Provider,{value:M,children:(0,q.jsx)(u,{id:C,children:F})})}),Ee=V.forwardRef(function(e,t){let{className:n,render:r,style:i,...o}=e,s=U(),{side:l,align:u}=Z(),d=s.useState(`open`),f=s.useState(`instantType`),p=s.useState(`transitionStatus`),m=s.useState(`popupProps`),h=s.useState(`floatingRootContext`),g=s.useState(`closeDelay`);return ue({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),O(h,{closeDelay:g}),a(`div`,e,{state:{open:d,side:l,align:u,instant:f,transitionStatus:p},ref:[t,s.context.popupRef,s.useStateSetter(`popupElement`)],props:[A,m,c(p),o],stateAttributesMapping:E})}),De=V.forwardRef(function(e,t){let{render:n,className:r,style:i,...o}=e,s=U(),{arrowRef:c,side:l,align:u,arrowUncentered:d,arrowStyles:f}=Z(),p={open:s.useState(`open`),side:l,align:u,uncentered:d};return a(`div`,e,{state:p,ref:[c,t],props:[{style:f,"aria-hidden":!0},o],stateAttributesMapping:C})}),Oe=class extends l{constructor(){super(ye(),`PreviewCard`)}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select(`open`)??!1}};function ke(){return new Oe}var Ae=ke,je=xe,Q=V.forwardRef(({className:e,delay:t=250,...n},r)=>(0,q.jsx)(we,{ref:r,delay:t,className:e,...n}));Q.displayName=`HoverCardTrigger`;var $=V.forwardRef(({className:e,children:t,side:r=`top`,align:i,sideOffset:a=5,container:o,showArrow:s=!0,anchor:c,positionMethod:l=x,alignOffset:u,collisionBoundary:d,collisionPadding:p,sticky:m,arrowPadding:h,disableAnchorTracking:g,collisionAvoidance:_,...v},y)=>{let b={side:r,align:i,sideOffset:a,anchor:c,positionMethod:l,alignOffset:u,collisionBoundary:d,collisionPadding:p,sticky:m,arrowPadding:h,disableAnchorTracking:g,collisionAvoidance:_};return(0,q.jsx)(Ce,{container:o??void 0,children:(0,q.jsx)(Te,{className:`z-50 data-[anchor-hidden]:hidden`,...b,children:(0,q.jsxs)(Ee,{ref:y,className:n(`w-auto max-w-100 origin-[var(--transform-origin)] rounded-xl px-3 py-2.5 text-caption text-foreground`,f,`data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:zoom-out-95 data-[open]:animate-in data-[open]:fade-in-0 data-[open]:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1`,`motion-reduce:data-[closed]:animate-none motion-reduce:data-[open]:animate-none`,e),...v,children:[t,s&&(0,q.jsx)(De,{className:`fill-popover`})]})})})});$.displayName=`HoverCardContent`;var Me=r(`IconPencil`,()=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{d:`M18.4142 3.91415L20.0858 5.58573C20.8668 6.36678 20.8668 7.63311 20.0858 8.41416L18 10.4999L7.79289 20.7071C7.60536 20.8946 7.351 20.9999 7.08579 20.9999H3V16.9142C3 16.6489 3.10536 16.3946 3.29289 16.2071L13.5 5.99994L15.5858 3.91416C16.3668 3.13311 17.6332 3.13311 18.4142 3.91415Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,q.jsx)(`path`,{d:`M13.5 6L18 10.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]}));export{Ae as a,Q as i,je as n,$ as r,Me as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{O as e,T as t,f as n,n as r}from"./IconChevronRightMedium.es-BkPdzxSm.js";import{E as i,m as a,p as o}from"./useThreadWorkspacePath-
|
|
1
|
+
import{O as e,T as t,f as n,n as r}from"./IconChevronRightMedium.es-BkPdzxSm.js";import{E as i,m as a,p as o}from"./useThreadWorkspacePath-BmtxcrV6.js";import{Ir as s,Nr as c,Pr as l}from"./index-Btp5jnxM.js";var u=e();function d({title:e,titleMenu:n,headerCenter:d,headerActions:f,dockActions:p,children:m}){let h=c({breadcrumbs:e?(0,u.jsxs)(`div`,{className:`h-control-sm flex min-w-0 items-center gap-0.5`,children:[(0,u.jsx)(r,{as:`h1`,variant:`label`,tone:`ink`,className:`min-w-0 truncate px-3`,children:e}),n]}):void 0,triggerClassName:`size-control-sm rounded-full [&>svg]:size-icon-md`}),g=!!(h.breadcrumbs||f),_=f&&p?p(f):void 0;return(0,u.jsxs)(`div`,{className:`relative flex h-full min-h-0 flex-col`,style:g?o:void 0,children:[g?(0,u.jsx)(`div`,{className:`[container-type:size] pointer-events-none absolute inset-0 z-20`,children:(0,u.jsxs)(`div`,{"data-slot":`chat-page-header`,className:t(`grid items-center gap-x-2 ps-3 pt-(--chat-header-top)`,i.header,d?`grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)]`:`grid-cols-[minmax(0,1fr)_auto]`),children:[(0,u.jsxs)(s,{border:!1,className:t(`grid grid-cols-subgrid px-0`,_?`col-[1/-2]`:`col-span-full`),children:[(0,u.jsx)(`div`,{className:`flex min-w-0 items-center`,children:h.breadcrumbs&&(0,u.jsx)(`div`,{className:a,children:h.breadcrumbs})}),d?(0,u.jsx)(`div`,{className:`flex items-center`,children:d}):null,_?null:(0,u.jsx)(`div`,{className:`flex min-w-0 justify-end`,children:f&&(0,u.jsx)(`div`,{className:t(a,`shrink-0`),children:f})})]}),_]})}):null,(0,u.jsx)(l,{variant:`page`,body:`fixed`,children:m})]})}var f=n(`IconScript`,()=>(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`path`,{d:`M7 20H5.5C4.39543 20 3.5 19.1046 3.5 18V17C3.5 16.4477 3.94772 16 4.5 16H12.5C13.0523 16 13.5 16.4477 13.5 17V18.25C13.5 19.2165 14.2835 20 15.25 20C16.2165 20 17 19.2165 17 18.25V5.75C17 4.7835 17.7835 4 18.75 4C19.7165 4 20.5 4.7835 20.5 5.75V8C20.5 8.55228 20.0523 9 19.5 9H17.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,u.jsx)(`path`,{d:`M19 4H8C6.89543 4 6 4.89543 6 6V16`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,u.jsx)(`path`,{d:`M15 20H6`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,u.jsx)(`path`,{d:`M9.5 8.5H10L11 8L12 8.5H13.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,u.jsx)(`path`,{d:`M9.5 12H10L11 11.5L12 12H13.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]}));export{d as n,f as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{O as t,f as n,k as r}from"./IconChevronRightMedium.es-BkPdzxSm.js";import{za as i}from"./GithubIcon.es-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{O as t,f as n,k as r}from"./IconChevronRightMedium.es-BkPdzxSm.js";import{za as i}from"./GithubIcon.es-CIm0nGDf.js";var a=()=>typeof navigator<`u`&&/mac/i.test(navigator.platform||navigator.userAgent||``),o=e(i(),1),s=e(r(),1),c=Object.defineProperty,l=(e,t)=>c(e,`name`,{value:t,configurable:!0});function u(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}l(u,`setRef`);function d(...e){return t=>{let n=!1,r=e.map(e=>{let r=u(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():u(e[t],null)}}}}l(d,`composeRefs`);function f(...e){return s.useCallback(d(...e),e)}l(f,`useComposedRefs`);var p=Object.defineProperty,m=(e,t)=>p(e,`name`,{value:t,configurable:!0});function h(e){let t=s.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,c=[];r=T(r),s.Children.forEach(r,e=>{if(x(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;C(n)&&typeof k==`function`;)n=k(n._payload);a=v(t,n),c.push(a?.props?.children)}else c.push(e)}),a?a=s.cloneElement(a,void 0,c):!o&&s.Children.count(r)===1&&s.isValidElement(r)&&(a=r);let l=a?b(a):void 0,u=f(n,l);if(!a){if(r||r===0)throw Error(o?O(e):D(e));return r}let d=y(i,a.props??{});return a.type!==s.Fragment&&(d.ref=n?u:l),s.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}m(h,`createSlot`);var g=Symbol.for(`radix.slottable`);function _(e){let t=m(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=g,t}m(_,`createSlottable`);var v=m((e,t)=>`child`in e.props?s.isValidElement(t)?s.cloneElement(t,void 0,e.props.children(t.props.children)):null:s.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function y(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=E(a,i))}return{...e,...n}}m(y,`mergeProps`);function b(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}m(b,`getElementRef`);function x(e){return s.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===g}m(x,`isSlottable`);var S=Symbol.for(`react.lazy`);function C(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===S&&`_payload`in e&&w(e._payload)}m(C,`isLazyComponent`);function w(e){return typeof e==`object`&&!!e&&`then`in e}m(w,`isPromiseLike`);function T(e){let t=e;for(;C(t)&&typeof k==`function`;)t=k(t._payload);return t}m(T,`useUnwrappedLazy`);function E(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}m(E,`concatAriaDescribedby`);var D=m(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),O=m(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),k=s.use,A=t(),j=Object.defineProperty,M=(e,t)=>j(e,`name`,{value:t,configurable:!0}),N=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=h(`Primitive.${t}`),r=s.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,A.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function P(e,t){e&&o.flushSync(()=>e.dispatchEvent(t))}M(P,`dispatchDiscreteCustomEvent`);var F=n(`IconMagnifyingGlass`,()=>(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`path`,{d:`M11 18C14.866 18 18 14.866 18 11C18 7.13401 14.866 4 11 4C7.13401 4 4 7.13401 4 11C4 14.866 7.13401 18 11 18Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,A.jsx)(`path`,{d:`M20 20L16.05 16.05`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]})),I=n(`IconSettingsSliderHor`,()=>(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M15 10C16.6575 10 18 8.6575 18 7C18 5.3425 16.6575 4 15 4C13.3425 4 12 5.3425 12 7C12 8.6575 13.3425 10 15 10Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,A.jsx)(`path`,{d:`M12 7H4`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,A.jsx)(`path`,{d:`M20 7H18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,A.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M9 20C10.6575 20 12 18.6575 12 17C12 15.3425 10.6575 14 9 14C7.3425 14 6 15.3425 6 17C6 18.6575 7.3425 20 9 20Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,A.jsx)(`path`,{d:`M6 17H4`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,A.jsx)(`path`,{d:`M20 17H12.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]}));export{h as a,a as c,P as i,F as n,d as o,N as r,f as s,I as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{O as t,k as n,m as r}from"./IconChevronRightMedium.es-BkPdzxSm.js";import{Cn as i,Lo as a,Oo as o,Os as s,Ts as c,_t as l,ao as u,at as d,ct as f,dt as p,mt as m,st as h,ut as g}from"./GithubIcon.es-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{O as t,k as n,m as r}from"./IconChevronRightMedium.es-BkPdzxSm.js";import{Cn as i,Lo as a,Oo as o,Os as s,Ts as c,_t as l,ao as u,at as d,ct as f,dt as p,mt as m,st as h,ut as g}from"./GithubIcon.es-CIm0nGDf.js";var _=e(n(),1),v=_.forwardRef(function(e,t){let{render:n,className:v,id:y,name:b,value:x,disabled:S=!1,onValueChange:C,defaultValue:w,autoFocus:T=!1,style:E,...D}=e,{state:O,name:k,disabled:A,setTouched:j,setDirty:M,validityData:N,setFilled:P,validationMode:F,validation:I}=m(),{clearErrors:L,elementRef:R,submitCountRef:z}=h(),B=A||S,V=k??b,H={...O,disabled:B},{labelId:U}=g(),W=f({id:y}),G=x!==void 0,K=x==null?void 0:String(x),q=u(()=>I.inputRef.current?.value);p(I.inputRef,W,K,q,!B,b),s(()=>{let e=K??I.inputRef.current?.value;e!==void 0&&P(e!==``)},[K,w,I.inputRef,P]),i(K,()=>{K!==void 0&&(L(V),M(K!==(N.initialValue??``)),I.change(K))});let J=_.useRef(null),Y=d(B,J),X=c();return r(`input`,e,{ref:[t,J],state:H,props:[{id:W,disabled:B,name:V,ref:I.inputRef,"aria-labelledby":U,autoFocus:T,...G?{value:x}:{defaultValue:w},onChange(e){let t=e.currentTarget.value,n=a(o,e.nativeEvent);C?.(t,n),G||(M(t!==(N.initialValue??``)),P(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(L(V),I.change(t)))},onFocus(){Y(!0)},onBlur(e){if(j(!0),Y(!1),F===`onBlur`){let t=e.currentTarget.value;I.commit(t),G&&queueMicrotask(()=>{let e=I.inputRef.current?.value;e!==void 0&&e!==t&&e!==(N.initialValue??``)&&I.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){j(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===R.current&&!e.defaultPrevented){let t=e.currentTarget,n=z.current;X.start(0,()=>{z.current===n&&I.commit(t.value)})}else I.commit(t)}}},D,e=>I.getValidationProps(B,e)],stateAttributesMapping:l})}),y=t(),b=_.forwardRef(function(e,t){return(0,y.jsx)(v,{ref:t,...e})});export{v as n,b as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{C as t,O as n,S as r,T as i,k as a,m as o,y as s}from"./IconChevronRightMedium.es-BkPdzxSm.js";import{Cn as c,Ds as l,Es as u,Fo as d,Lo as f,Mi as p,Nn as m,Oo as h,Os as g,Ra as _,Ro as v,So as y,Ss as b,Ti as x,To as S,Ts as C,_o as w,_t as T,ao as E,at as ee,bo as te,ci as D,ct as O,dt as k,eo as ne,fo as A,kn as j,ls as M,mt as re,no as N,ns as P,oi as ie,oo as F,so as I,st as ae,to as oe,ut as se,wi as ce,ws as le,xo as ue,yo as de}from"./GithubIcon.es-BmZS8JQG.js";import{t as fe}from"./IconPlusMedium.es-BOotRziY.js";import{O as pe}from"./combobox-parts-DhYtFSRV-BZqyW5dv.js";import{n as L}from"./password-manager-autofill.es-Cs1VH0JI.js";import{o as me,s as R}from"./input-group-C64rGEu8-tF1AZfiZ.js";import{t as z}from"./IconMinusMedium.es-BHqCu_dX.js";var B=e(a(),1),V=new Map;function H(e,t){let n=JSON.stringify({locale:pe(e),options:t}),r=V.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return V.set(n,i),i}function he(e,t,n){return e==null?``:H(t,n).format(e)}var ge=B.createContext(void 0);function _e(){let e=B.useContext(ge);if(e===void 0)throw Error(l(43));return e}var ve={inputValue:()=>null,value:()=>null,...T},ye=`零〇一二三四五六七八九`,be=/[٠-٩۰-۹0-9]/g,U=/[零〇一二三四五六七八九]/g,xe=[`%`,`٪`,`%`,`﹪`],Se=[`‰`,`؉`],Ce=/[%٪%﹪]/,we=/[‰؉]/,Te=/[%٪%﹪]/g,W=/[‰؉]/g,Ee=/[٠-٩۰-۹]/,De=/[零〇一二三四五六七八九]/,G=/[0-9٠-٩۰-۹0-9零〇一二三四五六七八九]/;function Oe(e){return G.test(e)}var ke=[`.`,`,`,`.`,`,`,`٫`,`٬`],Ae=/\p{Zs}/u,je=/\p{Cf}/u,Me=/\p{Cf}/gu,Ne=[`+`,`+`,`﹢`],Pe=[`-`,`−`,`-`,`‒`,`–`,`—`,`﹣`],K=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function Fe(e,t){let[n,r=`0`]=String(e).split(`e`);return Number(`${n}e${Number(r)+t}`)}var q=/[-−-‒–—﹣]/gu,J=/[++﹢]/gu,Y=/[-−-‒–—﹣]/,Ie=/[++﹢]/,Le=11111.1;function Re(e,t){return H(e,t).formatToParts(Le)}function ze(e,t){let n=Re(e,t),r={};n.forEach(e=>{r[e.type]=e.value});let i=`.`;return H(e).formatToParts(.1).forEach(e=>{e.type===`decimal`&&(i=e.value)}),{...r,decimal:i}}function X(e,t,n){let r=e.replace(Me,``).trim();r=r.replace(q,`-`).replace(J,`+`);let i=!1,a=(e,t)=>(t===`-`&&(i=!0),``);r=r.replace(/([+-])\s*$/,a).replace(/^\s*([+-])/,a);let o=t;o===void 0&&(Ee.test(r)?o=`ar`:De.test(r)&&(o=`zh`));let{group:s,decimal:c,currency:l,exponentSeparator:u}=ze(o,n),d=H(o,n).formatToParts(1).filter(e=>e.type===`unit`).map(e=>K(e.value)),f=d.length?new RegExp(d.join(`|`),`g`):null,p=null;s&&(p=/\p{Zs}/u.test(s)?/\p{Zs}/gu:s===`'`||s===`’`?/['’]/g:new RegExp(K(s),`g`));let m=[[p,``],[new RegExp(K(c),`g`),`.`],[/[.٫]/g,`.`],[/[,٬]/g,``],[l?new RegExp(K(l),`g`):null,``],[f,``],[Te,``],[W,``],[u?new RegExp(K(u),`g`):null,`e`],[be,e=>String(e.charCodeAt(0)%16)],[U,e=>String(Math.max(ye.indexOf(e)-1,0))]].reduce((e,[t,n])=>t?e.replace(t,n):e,r),h=m.lastIndexOf(`.`);if(h!==-1&&(m=`${m.slice(0,h).replace(/\./g,``)}.${m.slice(h+1).replace(/\./g,``)}`),/^[-+]?Infinity$/i.test(r)||r.includes(`∞`))return null;let g=(i?`-`:``)+m,_=parseFloat(g),v=n?.style,y=v===`unit`&&n?.unit===`percent`,b=Ce.test(e)||v===`percent`;return we.test(e)?_=Fe(_,-3):!y&&b&&(_=Fe(_,-2)),Number.isFinite(_)?_:null}var Be=1e-10,Ve=1e-10;function Z(e){return e?.maximumFractionDigits!=null||e?.minimumFractionDigits!=null||e?.maximumSignificantDigits!=null||e?.minimumSignificantDigits!=null||e?.roundingIncrement!=null||e?.roundingMode!=null||e?.roundingPriority!=null}function Q(e,t){if(!Number.isFinite(e))return e;if(!Z(t)){let t=parseFloat(e.toPrecision(15));return Math.abs(t-e)<=Math.min(2**-52*Math.max(1,Math.abs(e)),Ve)?t:e}let n=H(`en-US`,{...t,signDisplay:`auto`,currencySign:`standard`,notation:t.notation===`compact`?`standard`:t.notation,useGrouping:!1}),r=n.format(e),i=X(r,`en-US`,t);return i===null?e:n.format(i)===r?i:e}function He(e,t,n,r){let i=Math.abs(n),a=Math.sign(n),o=i*Be*a,s=e-t+o;return r?t+Math.round(s/n)*n:t+(a>0?Math.floor(s/i):Math.ceil(s/i))*i}function Ue(e,t,n,r,i,a,o,s,c){if(e===null)return e;let l=e;if(t!=null&&o&&t!==0&&(l=He(l,s||n===-(2**53-1)?i:n,t,s)),c&&(l=m(l,n,r)),t==null&&!Z(a))return l;let u=Q(l,a);return c?m(u,n,r):u}var $=n(),We=B.forwardRef(function(e,t){let{id:n,min:r,max:i,smallStep:a=.1,step:c=1,largeStep:l=10,required:u=!1,disabled:p=!1,readOnly:m=!1,form:y,name:x,defaultValue:S=null,value:C,onValueChange:w,onValueCommitted:T,allowWheelScrub:ee=!1,snapOnStep:te=!1,allowOutOfRange:D=!1,format:k,locale:A,render:M,className:ie,inputRef:se,style:ce,...le}=e,{setDirty:ue,validityData:de,disabled:fe,setFilled:pe,name:L,state:me,validation:R}=re(),{clearErrors:z}=ae(),V=fe||p,H=L??x,_e=c===`any`?1:c,[ye,be]=B.useState(!1),U=r??-(2**53-1),Ce=i??2**53-1,we=r??0,Te=k?.style,W=B.useRef(null),Ee=s(se,R.inputRef),De=O({id:n}),[G,Oe]=j({controlled:C,default:S,name:`NumberField`,state:`value`}),je=F(G);g(()=>{pe(G!==null)},[pe,G]);let Me=_(),K=F(k),Fe=B.useRef(!1),q=E((e,t)=>{Fe.current=!1,T?.(e,t)}),J=B.useRef(!0),Y=B.useRef(null),[Ie,Le]=B.useState(()=>he(G,A,k)),[X,Be]=B.useState(`numeric`),Ve=E(()=>{let e=Re(A,k),t=new Set(ke),n=e=>e.forEach(e=>t.add(e)),r=e.find(e=>e.type===`decimal`)?.value??ze(A,k).decimal;t.add(r),e.forEach(e=>{e.type!==`integer`&&e.type!==`fraction`&&e.type!==`exponentInteger`&&e.type!==`compact`&&(n(Array.from(e.value)),Ae.test(e.value)&&t.add(` `))});let i=Te===`percent`||Te===`unit`&&k?.unit===`percent`,a=Te===`percent`||Te===`unit`&&k?.unit===`permille`;return i&&n(xe),a&&n(Se),n(Ne),(U<0||D)&&n(Pe),t}),Z=E(e=>e?.altKey?a:e?.shiftKey?l:_e),Q=E((e,t)=>{let n=t.event,r=t.direction,i=t.reason.startsWith(`input-`)||t.reason===`none`,a=!D||!i,o=Ue(e,r?Z(n)*r:void 0,U,Ce,we,K.current,te,n?.altKey??!1,a),s=o!==G||i&&(e!==G||J.current===!1);if(s){if(w?.(o,t),t.isCanceled)return!1;Oe(o),ue(o!==de.initialValue),Fe.current=!0}return Y.current=o,J.current&&Le(he(o,A,k)),Me(),s}),He=E((e,{direction:t,currentValue:n,event:r,reason:i})=>{let a=n??je.current,o=r;return typeof a==`number`?Q(a+e*t,f(i,o,void 0,{direction:t})):Q(0,f(i,o))});g(function(){if(!J.current)return;let e=he(G,A,k);e!==Ie&&Le(e)}),g(function(){if(!b)return;let e=`text`;U>=0&&(e=`decimal`),Be(e)},[U]);let We=E(()=>{let e=W.current;if(!e)return;let t=e.value.length;e.setSelectionRange(t,t),e.focus()});B.useEffect(function(){let e=W.current;if(V||m||!ee||!e)return;function t(e){if(e.ctrlKey||P(N(W.current))!==W.current)return;let t=Math.abs(e.deltaX)>Math.abs(e.deltaY),n=e.shiftKey&&t?e.deltaX:e.deltaY;if(n===0||!e.shiftKey&&t)return;e.preventDefault(),J.current=!0;let r=Z(e);He(r,{direction:n>0?-1:1,event:e,reason:`wheel`})&&q(Y.current,v(d,e))}return I(e,`wheel`,t)},[ee,He,V,m,Z,q,Y,je]);let Ge=B.useMemo(()=>({...me,disabled:V,readOnly:m,required:u,value:G,inputValue:Ie,scrubbing:ye}),[me,V,m,u,G,Ie,ye]),Ke=B.useMemo(()=>({inputRef:W,focusInput:We,minWithDefault:U,maxWithDefault:Ce,id:De,setValue:Q,incrementValue:He,getStepAmount:Z,allowInputSyncRef:J,formatOptionsRef:K,valueRef:je,lastChangedValueRef:Y,hasPendingCommitRef:Fe,name:H,nameProp:x,inputMode:X,getAllowedNonNumericKeys:Ve,min:r,max:i,setInputValue:Le,locale:A,setIsScrubbing:be,state:Ge,onValueCommitted:q}),[W,We,U,Ce,De,Q,He,Z,K,je,H,x,X,Ve,r,i,Le,A,Ge,q]),qe=o(`div`,e,{ref:t,state:Ge,props:le,stateAttributesMapping:ve});return(0,$.jsxs)(ge.Provider,{value:Ke,children:[qe,(0,$.jsx)(`input`,{...R.getValidationProps(V,{onFocus(){We()},onChange(e){if(e.nativeEvent.defaultPrevented||V||m)return;let t=e.currentTarget.valueAsNumber,n=Number.isNaN(t)?null:t,r=f(h,e.nativeEvent);Q(n,r),z(H),R.change(Y.current??n)}}),ref:Ee,type:`number`,form:y,name:H,value:G??``,min:r,max:i,step:c,disabled:V,readOnly:m,required:u,"aria-hidden":!0,tabIndex:-1,style:H?oe:ne,suppressHydrationWarning:!0})]})}),Ge=B.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:s}=_e();return o(`div`,e,{ref:t,state:s,props:[{role:`group`},a],stateAttributesMapping:ve})}),Ke=0,qe=class e extends le{static create(){return new e}start(e,t){this.clear(),this.currentId=setInterval(()=>{t()},e)}clear=()=>{this.currentId!==Ke&&(clearInterval(this.currentId),this.currentId=Ke)}};function Je(){let e=t(qe.create).current;return u(e.disposeEffect),e}var Ye=60,Xe=400,Ze=8,Qe=50,$e=3;function et(e){return e===`touch`||e===`pen`}function tt(e){let{disabled:t,tick:n,onStop:i,tickDelay:a=Ye,startDelay:o=Xe,scrollDistance:s=Ze,elementRef:c}=e,l=C(),u=Je(),d=C(),f=B.useRef(!1),p=B.useRef(0),m=B.useRef({x:0,y:0}),h=B.useRef(!1),g=B.useRef(!1),_=B.useRef(``),v=B.useRef(r),y=B.useRef(r),b=E(()=>{d.clear(),l.clear(),u.clear(),v.current(),p.current=0});function x(e){b();let t=c.current;if(!t)return;let r=M(t);function s(e){e.preventDefault()}v.current=I(r,`contextmenu`,s),y.current(),y.current=I(r,`pointerup`,e=>{f.current=!1,b(),i?.(e)},{once:!0}),n(e)?l.start(o,()=>{u.start(a,()=>{n(e)||b()})}):b()}return B.useEffect(()=>()=>{b(),y.current()},[b]),B.useEffect(()=>{t&&(f.current=!1,h.current=!1,_.current=``,b())},[t,b]),{pointerHandlers:{onTouchStart(){h.current=!0},onTouchEnd(){h.current=!1},onPointerDown(e){e.defaultPrevented||e.button||t||(_.current=e.pointerType,g.current=!1,f.current=!0,m.current={x:e.clientX,y:e.clientY},et(e.pointerType)?d.start(Qe,()=>{let t=p.current;p.current=0,f.current&&t<$e?(x(e.nativeEvent),g.current=!0):(g.current=!1,b())}):(e.preventDefault(),x(e.nativeEvent)))},onPointerUp(e){et(e.pointerType)&&(f.current=!1)},onPointerMove(e){if(t||!et(e.pointerType)||!f.current)return;p.current+=1;let{x:n,y:r}=m.current,i=n-e.clientX,a=r-e.clientY;i**2+a**2>s**2&&b()},onMouseEnter(e){e.defaultPrevented||t||!f.current||h.current||et(_.current)||x(e.nativeEvent)},onMouseLeave(){h.current||b()},onMouseUp(){h.current||b()}},shouldSkipClick:E(e=>e.defaultPrevented?!0:et(_.current)?g.current:e.detail!==0)}}var nt={WebkitUserSelect:`none`,userSelect:`none`};function rt(e,t,n){let{render:r,className:i,disabled:a=!1,nativeButton:s=!0,style:c,...l}=e,{allowInputSyncRef:u,formatOptionsRef:d,getStepAmount:p,id:m,incrementValue:h,inputRef:g,focusInput:_,maxWithDefault:y,minWithDefault:b,setValue:x,state:S,valueRef:C,locale:T,lastChangedValueRef:E,onValueCommitted:ee}=_e(),{disabled:te,readOnly:O,value:k,inputValue:ne}=S,j=a||te||k!=null&&(n?k>=y:k<=b),M=n?w:A;function re(e){let t=!u.current;if(u.current=!0,!t){E.current=C.current;return}let n=X(ne,T,d.current);if(n!==null){let t=f(M,e);x(n,t),t.isCanceled||(C.current=n)}}let{pointerHandlers:N,shouldSkipClick:P}=tt({disabled:j||O,elementRef:g,tick(e){let t=p(e);return h(t,{direction:n?1:-1,event:e,reason:M})},onStop(e){let t=E.current??C.current;ee(t,v(M,e))}}),ie={disabled:j,"aria-label":n?`Increase`:`Decrease`,"aria-controls":m,tabIndex:-1,style:nt,...N,onClick(e){let t=j||O;if(e.defaultPrevented||t||P(e))return;re(e.nativeEvent);let r=p(e),i=C.current;h(r,{direction:n?1:-1,event:e.nativeEvent,reason:M});let a=E.current??C.current;a!==i&&ee(a,v(M,e.nativeEvent))},onPointerDown(e){e.defaultPrevented||O||e.button||j||(re(e.nativeEvent),E.current=null,et(e.pointerType)||_(),N.onPointerDown(e))}},{getButtonProps:F,buttonRef:I}=D({disabled:j||O,native:s,focusableWhenDisabled:!0}),ae={...S,disabled:j};return o(`button`,e,{ref:[t,I],state:ae,props:[ie,l,F],stateAttributesMapping:ve})}var it=B.forwardRef(function(e,t){return rt(e,t,!0)}),at=B.forwardRef(function(e,t){return rt(e,t,!1)}),ot=new Set([`Backspace`,`Delete`,`ArrowLeft`,`ArrowRight`,`Tab`,`Enter`,`Escape`]),st=B.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{allowInputSyncRef:s,formatOptionsRef:l,getAllowedNonNumericKeys:u,getStepAmount:d,id:p,incrementValue:m,inputMode:h,max:_,min:b,name:x,nameProp:C,setValue:w,state:T,setInputValue:E,locale:D,inputRef:O,onValueCommitted:ne,lastChangedValueRef:A,hasPendingCommitRef:j,valueRef:M}=_e(),{disabled:N,readOnly:P,required:ie,value:F,inputValue:I}=T,{clearErrors:oe}=ae(),{validationMode:ce,setTouched:le,invalid:fe,shouldValidateOnChange:pe,validation:L}=re(),{labelId:me}=se(),R=ee(N,O),z=B.useRef(!1),V=B.useRef(null);return k(O,p,F,void 0,!N,C),g(()=>{if(V.current!=null){let e=V.current;V.current=null,O.current?.setSelectionRange(e,e)}}),c(F,()=>{oe(x),z.current&&!pe()?z.current=!1:L.change(F)}),o(`input`,e,{ref:[t,O],state:T,props:[{id:p,required:ie,disabled:N,readOnly:P,inputMode:h,value:I,type:`text`,autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,"aria-roledescription":`Number field`,"aria-invalid":!N&&fe?!0:void 0,"aria-labelledby":me,suppressHydrationWarning:!0,onFocus(e){e.defaultPrevented||N||R(!0)},onBlur(e){if(e.defaultPrevented||N||(le(!0),R(!1),P))return;let t=!s.current,n=j.current;if(s.current=!0,I.trim()===``){let r=f(ue,e.nativeEvent);if(w(null,r),r.isCanceled)return;ce===`onBlur`&&L.commit(null),(t||n||F!==null)&&ne(null,v(ue,e.nativeEvent));return}let r=l.current,i=X(I,D,r);if(i===null)return;let a=Z(r),o;o=!t&&!a?F:a?Q(i,r):i;let c=v(de,e.nativeEvent),u=F!==o,d=t||u||n,p=o;if(u){let t=f(de,e.nativeEvent);if(z.current=!0,w(o,t),t.isCanceled){z.current=!1;return}p=A.current,p===F&&(z.current=!1)}ce===`onBlur`&&L.commit(p),d&&ne(p,c);let m=he(p,D,r);I!==m&&E(m)},onChange(e){if(e.nativeEvent.defaultPrevented)return;s.current=!1;let t=e.currentTarget.value;if(t.trim()===``){E(t),w(null,f(ue,e.nativeEvent));return}let n=u();if(!Array.from(t).every(e=>Oe(e)||Y.test(e)||n.has(e)||je.test(e)))return;let r=X(t,D,l.current);E(t),r!==null&&w(r,f(te,e.nativeEvent))},onKeyDown(e){if(e.defaultPrevented||P||N)return;let t=e.nativeEvent,n=!s.current,r=u(),i=r.has(e.key),{decimal:a,currency:o,percentSign:c}=ze(D,l.current),p=e.currentTarget.selectionStart,h=e.currentTarget.selectionEnd,g=p===0&&h===I.length,y=e=>p!=null&&h!=null&&e>=p&&e<h;[[Y,q],[Ie,J]].forEach(([t,n])=>{if(t.test(e.key)&&Array.from(r).some(e=>t.test(e))){let e=I.search(n),t=e!==-1&&y(e);i=!(Y.test(I)||Ie.test(I))||g||t}}),[a,o,c].forEach(t=>{if(e.key===t){let e=I.indexOf(t),n=y(e);i=e===-1||g||n}});let x=ot.has(e.key),C=e.key===`ArrowUp`||e.key===`ArrowDown`;if(e.which===229||e.altKey&&!C||e.ctrlKey||e.metaKey||i||Oe(e.key)||x)return;let T=null;if(e.key===`Home`&&b!=null?T=b:e.key===`End`&&_!=null&&(T=_),e.key.length>1&&!C&&T===null)return;let E=n?X(I,D,l.current):null,ee=d(e);e.preventDefault(),e.stopPropagation();let te=v(S,t),O=!1;(C||T!==null)&&(s.current=!0),C?(n||(A.current=M.current),O=m(ee,{direction:e.key===`ArrowUp`?1:-1,currentValue:E,event:t,reason:S})):T!==null&&(O=w(T,f(S,t))),O&&ne(A.current,te)},onPaste(e){if(e.defaultPrevented||P||N)return;let t=``;try{t=e.clipboardData?.getData(`text/plain`)??``}catch{return}e.preventDefault();let n=e.currentTarget,r=n.selectionStart,i=n.selectionEnd,a=I.slice(0,r)+t+I.slice(i),o=X(a,D,l.current);o!==null&&(s.current=!1,V.current=r+t.length,w(o,f(y,e.nativeEvent)),E(a))}},a,e=>L.getValidationProps(N,e)],stateAttributesMapping:ve})});function ct({className:e,...t}){return(0,$.jsx)(We,{"data-slot":`input-number`,className:i(`w-full`,e),...t})}function lt({className:e,size:t,...n}){let r=B.useContext(ce)??t??`md`;return(0,$.jsx)(Ge,{"data-slot":`input-number-group`,"data-size":r,className:i(me,x[r],`has-[>[data-slot=input-number-decrement]]:[&>[data-slot=input-number-input]]:pl-0`,`has-[>[data-slot=input-number-increment]]:[&>[data-slot=input-number-input]]:pr-0`,e),...n})}function ut({className:e,autoComplete:t,...n}){return(0,$.jsx)(st,{"data-slot":`input-number-input`,className:i(R,e),...n,...L(t)})}var dt=i(ie({variant:`ghost`,size:`icon-sm`}),`mx-1 shrink-0`);function ft({className:e,children:t,...n}){return(0,$.jsx)(at,{"data-slot":`input-number-decrement`,className:i(dt,e),...n,children:(0,$.jsx)(p,{size:`sm`,children:t??(0,$.jsx)(z,{})})})}function pt({className:e,children:t,...n}){return(0,$.jsx)(it,{"data-slot":`input-number-increment`,className:i(dt,e),...n,children:(0,$.jsx)(p,{size:`sm`,children:t??(0,$.jsx)(fe,{})})})}export{ut as a,pt as i,ft as n,lt as r,ct as t};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{C as t,O as n,S as r,T as i,k as a,m as o,y as s}from"./IconChevronRightMedium.es-BkPdzxSm.js";import{Cn as c,Ds as l,Es as u,Fo as d,Lo as f,Mi as p,Nn as m,Oo as h,Os as g,Ra as _,Ro as v,So as y,Ss as b,Ti as x,To as S,Ts as C,_o as w,_t as T,ao as E,at as ee,bo as te,ci as D,ct as O,dt as k,eo as ne,fo as A,kn as j,ls as M,mt as re,no as N,ns as P,oi as ie,oo as F,so as I,st as ae,to as oe,ut as se,wi as ce,ws as le,xo as ue,yo as de}from"./GithubIcon.es-CIm0nGDf.js";import{t as fe}from"./IconPlusMedium.es-BOotRziY.js";import{O as pe}from"./combobox-parts-BVuRAhY6-ClaPtI8E.js";import{n as L}from"./password-manager-autofill.es-Cs1VH0JI.js";import{o as me,s as R}from"./input-group-BXqgO3Q2-BNrm-udR.js";import{t as z}from"./IconMinusMedium.es-BHqCu_dX.js";var B=e(a(),1),V=new Map;function H(e,t){let n=JSON.stringify({locale:pe(e),options:t}),r=V.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return V.set(n,i),i}function he(e,t,n){return e==null?``:H(t,n).format(e)}var ge=B.createContext(void 0);function _e(){let e=B.useContext(ge);if(e===void 0)throw Error(l(43));return e}var ve={inputValue:()=>null,value:()=>null,...T},ye=`零〇一二三四五六七八九`,be=/[٠-٩۰-۹0-9]/g,U=/[零〇一二三四五六七八九]/g,xe=[`%`,`٪`,`%`,`﹪`],Se=[`‰`,`؉`],Ce=/[%٪%﹪]/,we=/[‰؉]/,Te=/[%٪%﹪]/g,W=/[‰؉]/g,Ee=/[٠-٩۰-۹]/,De=/[零〇一二三四五六七八九]/,G=/[0-9٠-٩۰-۹0-9零〇一二三四五六七八九]/;function Oe(e){return G.test(e)}var ke=[`.`,`,`,`.`,`,`,`٫`,`٬`],Ae=/\p{Zs}/u,je=/\p{Cf}/u,Me=/\p{Cf}/gu,Ne=[`+`,`+`,`﹢`],Pe=[`-`,`−`,`-`,`‒`,`–`,`—`,`﹣`],K=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function Fe(e,t){let[n,r=`0`]=String(e).split(`e`);return Number(`${n}e${Number(r)+t}`)}var q=/[-−-‒–—﹣]/gu,J=/[++﹢]/gu,Y=/[-−-‒–—﹣]/,Ie=/[++﹢]/,Le=11111.1;function Re(e,t){return H(e,t).formatToParts(Le)}function ze(e,t){let n=Re(e,t),r={};n.forEach(e=>{r[e.type]=e.value});let i=`.`;return H(e).formatToParts(.1).forEach(e=>{e.type===`decimal`&&(i=e.value)}),{...r,decimal:i}}function X(e,t,n){let r=e.replace(Me,``).trim();r=r.replace(q,`-`).replace(J,`+`);let i=!1,a=(e,t)=>(t===`-`&&(i=!0),``);r=r.replace(/([+-])\s*$/,a).replace(/^\s*([+-])/,a);let o=t;o===void 0&&(Ee.test(r)?o=`ar`:De.test(r)&&(o=`zh`));let{group:s,decimal:c,currency:l,exponentSeparator:u}=ze(o,n),d=H(o,n).formatToParts(1).filter(e=>e.type===`unit`).map(e=>K(e.value)),f=d.length?new RegExp(d.join(`|`),`g`):null,p=null;s&&(p=/\p{Zs}/u.test(s)?/\p{Zs}/gu:s===`'`||s===`’`?/['’]/g:new RegExp(K(s),`g`));let m=[[p,``],[new RegExp(K(c),`g`),`.`],[/[.٫]/g,`.`],[/[,٬]/g,``],[l?new RegExp(K(l),`g`):null,``],[f,``],[Te,``],[W,``],[u?new RegExp(K(u),`g`):null,`e`],[be,e=>String(e.charCodeAt(0)%16)],[U,e=>String(Math.max(ye.indexOf(e)-1,0))]].reduce((e,[t,n])=>t?e.replace(t,n):e,r),h=m.lastIndexOf(`.`);if(h!==-1&&(m=`${m.slice(0,h).replace(/\./g,``)}.${m.slice(h+1).replace(/\./g,``)}`),/^[-+]?Infinity$/i.test(r)||r.includes(`∞`))return null;let g=(i?`-`:``)+m,_=parseFloat(g),v=n?.style,y=v===`unit`&&n?.unit===`percent`,b=Ce.test(e)||v===`percent`;return we.test(e)?_=Fe(_,-3):!y&&b&&(_=Fe(_,-2)),Number.isFinite(_)?_:null}var Be=1e-10,Ve=1e-10;function Z(e){return e?.maximumFractionDigits!=null||e?.minimumFractionDigits!=null||e?.maximumSignificantDigits!=null||e?.minimumSignificantDigits!=null||e?.roundingIncrement!=null||e?.roundingMode!=null||e?.roundingPriority!=null}function Q(e,t){if(!Number.isFinite(e))return e;if(!Z(t)){let t=parseFloat(e.toPrecision(15));return Math.abs(t-e)<=Math.min(2**-52*Math.max(1,Math.abs(e)),Ve)?t:e}let n=H(`en-US`,{...t,signDisplay:`auto`,currencySign:`standard`,notation:t.notation===`compact`?`standard`:t.notation,useGrouping:!1}),r=n.format(e),i=X(r,`en-US`,t);return i===null?e:n.format(i)===r?i:e}function He(e,t,n,r){let i=Math.abs(n),a=Math.sign(n),o=i*Be*a,s=e-t+o;return r?t+Math.round(s/n)*n:t+(a>0?Math.floor(s/i):Math.ceil(s/i))*i}function Ue(e,t,n,r,i,a,o,s,c){if(e===null)return e;let l=e;if(t!=null&&o&&t!==0&&(l=He(l,s||n===-(2**53-1)?i:n,t,s)),c&&(l=m(l,n,r)),t==null&&!Z(a))return l;let u=Q(l,a);return c?m(u,n,r):u}var $=n(),We=B.forwardRef(function(e,t){let{id:n,min:r,max:i,smallStep:a=.1,step:c=1,largeStep:l=10,required:u=!1,disabled:p=!1,readOnly:m=!1,form:y,name:x,defaultValue:S=null,value:C,onValueChange:w,onValueCommitted:T,allowWheelScrub:ee=!1,snapOnStep:te=!1,allowOutOfRange:D=!1,format:k,locale:A,render:M,className:ie,inputRef:se,style:ce,...le}=e,{setDirty:ue,validityData:de,disabled:fe,setFilled:pe,name:L,state:me,validation:R}=re(),{clearErrors:z}=ae(),V=fe||p,H=L??x,_e=c===`any`?1:c,[ye,be]=B.useState(!1),U=r??-(2**53-1),Ce=i??2**53-1,we=r??0,Te=k?.style,W=B.useRef(null),Ee=s(se,R.inputRef),De=O({id:n}),[G,Oe]=j({controlled:C,default:S,name:`NumberField`,state:`value`}),je=F(G);g(()=>{pe(G!==null)},[pe,G]);let Me=_(),K=F(k),Fe=B.useRef(!1),q=E((e,t)=>{Fe.current=!1,T?.(e,t)}),J=B.useRef(!0),Y=B.useRef(null),[Ie,Le]=B.useState(()=>he(G,A,k)),[X,Be]=B.useState(`numeric`),Ve=E(()=>{let e=Re(A,k),t=new Set(ke),n=e=>e.forEach(e=>t.add(e)),r=e.find(e=>e.type===`decimal`)?.value??ze(A,k).decimal;t.add(r),e.forEach(e=>{e.type!==`integer`&&e.type!==`fraction`&&e.type!==`exponentInteger`&&e.type!==`compact`&&(n(Array.from(e.value)),Ae.test(e.value)&&t.add(` `))});let i=Te===`percent`||Te===`unit`&&k?.unit===`percent`,a=Te===`percent`||Te===`unit`&&k?.unit===`permille`;return i&&n(xe),a&&n(Se),n(Ne),(U<0||D)&&n(Pe),t}),Z=E(e=>e?.altKey?a:e?.shiftKey?l:_e),Q=E((e,t)=>{let n=t.event,r=t.direction,i=t.reason.startsWith(`input-`)||t.reason===`none`,a=!D||!i,o=Ue(e,r?Z(n)*r:void 0,U,Ce,we,K.current,te,n?.altKey??!1,a),s=o!==G||i&&(e!==G||J.current===!1);if(s){if(w?.(o,t),t.isCanceled)return!1;Oe(o),ue(o!==de.initialValue),Fe.current=!0}return Y.current=o,J.current&&Le(he(o,A,k)),Me(),s}),He=E((e,{direction:t,currentValue:n,event:r,reason:i})=>{let a=n??je.current,o=r;return typeof a==`number`?Q(a+e*t,f(i,o,void 0,{direction:t})):Q(0,f(i,o))});g(function(){if(!J.current)return;let e=he(G,A,k);e!==Ie&&Le(e)}),g(function(){if(!b)return;let e=`text`;U>=0&&(e=`decimal`),Be(e)},[U]);let We=E(()=>{let e=W.current;if(!e)return;let t=e.value.length;e.setSelectionRange(t,t),e.focus()});B.useEffect(function(){let e=W.current;if(V||m||!ee||!e)return;function t(e){if(e.ctrlKey||P(N(W.current))!==W.current)return;let t=Math.abs(e.deltaX)>Math.abs(e.deltaY),n=e.shiftKey&&t?e.deltaX:e.deltaY;if(n===0||!e.shiftKey&&t)return;e.preventDefault(),J.current=!0;let r=Z(e);He(r,{direction:n>0?-1:1,event:e,reason:`wheel`})&&q(Y.current,v(d,e))}return I(e,`wheel`,t)},[ee,He,V,m,Z,q,Y,je]);let Ge=B.useMemo(()=>({...me,disabled:V,readOnly:m,required:u,value:G,inputValue:Ie,scrubbing:ye}),[me,V,m,u,G,Ie,ye]),Ke=B.useMemo(()=>({inputRef:W,focusInput:We,minWithDefault:U,maxWithDefault:Ce,id:De,setValue:Q,incrementValue:He,getStepAmount:Z,allowInputSyncRef:J,formatOptionsRef:K,valueRef:je,lastChangedValueRef:Y,hasPendingCommitRef:Fe,name:H,nameProp:x,inputMode:X,getAllowedNonNumericKeys:Ve,min:r,max:i,setInputValue:Le,locale:A,setIsScrubbing:be,state:Ge,onValueCommitted:q}),[W,We,U,Ce,De,Q,He,Z,K,je,H,x,X,Ve,r,i,Le,A,Ge,q]),qe=o(`div`,e,{ref:t,state:Ge,props:le,stateAttributesMapping:ve});return(0,$.jsxs)(ge.Provider,{value:Ke,children:[qe,(0,$.jsx)(`input`,{...R.getValidationProps(V,{onFocus(){We()},onChange(e){if(e.nativeEvent.defaultPrevented||V||m)return;let t=e.currentTarget.valueAsNumber,n=Number.isNaN(t)?null:t,r=f(h,e.nativeEvent);Q(n,r),z(H),R.change(Y.current??n)}}),ref:Ee,type:`number`,form:y,name:H,value:G??``,min:r,max:i,step:c,disabled:V,readOnly:m,required:u,"aria-hidden":!0,tabIndex:-1,style:H?oe:ne,suppressHydrationWarning:!0})]})}),Ge=B.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:s}=_e();return o(`div`,e,{ref:t,state:s,props:[{role:`group`},a],stateAttributesMapping:ve})}),Ke=0,qe=class e extends le{static create(){return new e}start(e,t){this.clear(),this.currentId=setInterval(()=>{t()},e)}clear=()=>{this.currentId!==Ke&&(clearInterval(this.currentId),this.currentId=Ke)}};function Je(){let e=t(qe.create).current;return u(e.disposeEffect),e}var Ye=60,Xe=400,Ze=8,Qe=50,$e=3;function et(e){return e===`touch`||e===`pen`}function tt(e){let{disabled:t,tick:n,onStop:i,tickDelay:a=Ye,startDelay:o=Xe,scrollDistance:s=Ze,elementRef:c}=e,l=C(),u=Je(),d=C(),f=B.useRef(!1),p=B.useRef(0),m=B.useRef({x:0,y:0}),h=B.useRef(!1),g=B.useRef(!1),_=B.useRef(``),v=B.useRef(r),y=B.useRef(r),b=E(()=>{d.clear(),l.clear(),u.clear(),v.current(),p.current=0});function x(e){b();let t=c.current;if(!t)return;let r=M(t);function s(e){e.preventDefault()}v.current=I(r,`contextmenu`,s),y.current(),y.current=I(r,`pointerup`,e=>{f.current=!1,b(),i?.(e)},{once:!0}),n(e)?l.start(o,()=>{u.start(a,()=>{n(e)||b()})}):b()}return B.useEffect(()=>()=>{b(),y.current()},[b]),B.useEffect(()=>{t&&(f.current=!1,h.current=!1,_.current=``,b())},[t,b]),{pointerHandlers:{onTouchStart(){h.current=!0},onTouchEnd(){h.current=!1},onPointerDown(e){e.defaultPrevented||e.button||t||(_.current=e.pointerType,g.current=!1,f.current=!0,m.current={x:e.clientX,y:e.clientY},et(e.pointerType)?d.start(Qe,()=>{let t=p.current;p.current=0,f.current&&t<$e?(x(e.nativeEvent),g.current=!0):(g.current=!1,b())}):(e.preventDefault(),x(e.nativeEvent)))},onPointerUp(e){et(e.pointerType)&&(f.current=!1)},onPointerMove(e){if(t||!et(e.pointerType)||!f.current)return;p.current+=1;let{x:n,y:r}=m.current,i=n-e.clientX,a=r-e.clientY;i**2+a**2>s**2&&b()},onMouseEnter(e){e.defaultPrevented||t||!f.current||h.current||et(_.current)||x(e.nativeEvent)},onMouseLeave(){h.current||b()},onMouseUp(){h.current||b()}},shouldSkipClick:E(e=>e.defaultPrevented?!0:et(_.current)?g.current:e.detail!==0)}}var nt={WebkitUserSelect:`none`,userSelect:`none`};function rt(e,t,n){let{render:r,className:i,disabled:a=!1,nativeButton:s=!0,style:c,...l}=e,{allowInputSyncRef:u,formatOptionsRef:d,getStepAmount:p,id:m,incrementValue:h,inputRef:g,focusInput:_,maxWithDefault:y,minWithDefault:b,setValue:x,state:S,valueRef:C,locale:T,lastChangedValueRef:E,onValueCommitted:ee}=_e(),{disabled:te,readOnly:O,value:k,inputValue:ne}=S,j=a||te||k!=null&&(n?k>=y:k<=b),M=n?w:A;function re(e){let t=!u.current;if(u.current=!0,!t){E.current=C.current;return}let n=X(ne,T,d.current);if(n!==null){let t=f(M,e);x(n,t),t.isCanceled||(C.current=n)}}let{pointerHandlers:N,shouldSkipClick:P}=tt({disabled:j||O,elementRef:g,tick(e){let t=p(e);return h(t,{direction:n?1:-1,event:e,reason:M})},onStop(e){let t=E.current??C.current;ee(t,v(M,e))}}),ie={disabled:j,"aria-label":n?`Increase`:`Decrease`,"aria-controls":m,tabIndex:-1,style:nt,...N,onClick(e){let t=j||O;if(e.defaultPrevented||t||P(e))return;re(e.nativeEvent);let r=p(e),i=C.current;h(r,{direction:n?1:-1,event:e.nativeEvent,reason:M});let a=E.current??C.current;a!==i&&ee(a,v(M,e.nativeEvent))},onPointerDown(e){e.defaultPrevented||O||e.button||j||(re(e.nativeEvent),E.current=null,et(e.pointerType)||_(),N.onPointerDown(e))}},{getButtonProps:F,buttonRef:I}=D({disabled:j||O,native:s,focusableWhenDisabled:!0}),ae={...S,disabled:j};return o(`button`,e,{ref:[t,I],state:ae,props:[ie,l,F],stateAttributesMapping:ve})}var it=B.forwardRef(function(e,t){return rt(e,t,!0)}),at=B.forwardRef(function(e,t){return rt(e,t,!1)}),ot=new Set([`Backspace`,`Delete`,`ArrowLeft`,`ArrowRight`,`Tab`,`Enter`,`Escape`]),st=B.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{allowInputSyncRef:s,formatOptionsRef:l,getAllowedNonNumericKeys:u,getStepAmount:d,id:p,incrementValue:m,inputMode:h,max:_,min:b,name:x,nameProp:C,setValue:w,state:T,setInputValue:E,locale:D,inputRef:O,onValueCommitted:ne,lastChangedValueRef:A,hasPendingCommitRef:j,valueRef:M}=_e(),{disabled:N,readOnly:P,required:ie,value:F,inputValue:I}=T,{clearErrors:oe}=ae(),{validationMode:ce,setTouched:le,invalid:fe,shouldValidateOnChange:pe,validation:L}=re(),{labelId:me}=se(),R=ee(N,O),z=B.useRef(!1),V=B.useRef(null);return k(O,p,F,void 0,!N,C),g(()=>{if(V.current!=null){let e=V.current;V.current=null,O.current?.setSelectionRange(e,e)}}),c(F,()=>{oe(x),z.current&&!pe()?z.current=!1:L.change(F)}),o(`input`,e,{ref:[t,O],state:T,props:[{id:p,required:ie,disabled:N,readOnly:P,inputMode:h,value:I,type:`text`,autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,"aria-roledescription":`Number field`,"aria-invalid":!N&&fe?!0:void 0,"aria-labelledby":me,suppressHydrationWarning:!0,onFocus(e){e.defaultPrevented||N||R(!0)},onBlur(e){if(e.defaultPrevented||N||(le(!0),R(!1),P))return;let t=!s.current,n=j.current;if(s.current=!0,I.trim()===``){let r=f(ue,e.nativeEvent);if(w(null,r),r.isCanceled)return;ce===`onBlur`&&L.commit(null),(t||n||F!==null)&&ne(null,v(ue,e.nativeEvent));return}let r=l.current,i=X(I,D,r);if(i===null)return;let a=Z(r),o;o=!t&&!a?F:a?Q(i,r):i;let c=v(de,e.nativeEvent),u=F!==o,d=t||u||n,p=o;if(u){let t=f(de,e.nativeEvent);if(z.current=!0,w(o,t),t.isCanceled){z.current=!1;return}p=A.current,p===F&&(z.current=!1)}ce===`onBlur`&&L.commit(p),d&&ne(p,c);let m=he(p,D,r);I!==m&&E(m)},onChange(e){if(e.nativeEvent.defaultPrevented)return;s.current=!1;let t=e.currentTarget.value;if(t.trim()===``){E(t),w(null,f(ue,e.nativeEvent));return}let n=u();if(!Array.from(t).every(e=>Oe(e)||Y.test(e)||n.has(e)||je.test(e)))return;let r=X(t,D,l.current);E(t),r!==null&&w(r,f(te,e.nativeEvent))},onKeyDown(e){if(e.defaultPrevented||P||N)return;let t=e.nativeEvent,n=!s.current,r=u(),i=r.has(e.key),{decimal:a,currency:o,percentSign:c}=ze(D,l.current),p=e.currentTarget.selectionStart,h=e.currentTarget.selectionEnd,g=p===0&&h===I.length,y=e=>p!=null&&h!=null&&e>=p&&e<h;[[Y,q],[Ie,J]].forEach(([t,n])=>{if(t.test(e.key)&&Array.from(r).some(e=>t.test(e))){let e=I.search(n),t=e!==-1&&y(e);i=!(Y.test(I)||Ie.test(I))||g||t}}),[a,o,c].forEach(t=>{if(e.key===t){let e=I.indexOf(t),n=y(e);i=e===-1||g||n}});let x=ot.has(e.key),C=e.key===`ArrowUp`||e.key===`ArrowDown`;if(e.which===229||e.altKey&&!C||e.ctrlKey||e.metaKey||i||Oe(e.key)||x)return;let T=null;if(e.key===`Home`&&b!=null?T=b:e.key===`End`&&_!=null&&(T=_),e.key.length>1&&!C&&T===null)return;let E=n?X(I,D,l.current):null,ee=d(e);e.preventDefault(),e.stopPropagation();let te=v(S,t),O=!1;(C||T!==null)&&(s.current=!0),C?(n||(A.current=M.current),O=m(ee,{direction:e.key===`ArrowUp`?1:-1,currentValue:E,event:t,reason:S})):T!==null&&(O=w(T,f(S,t))),O&&ne(A.current,te)},onPaste(e){if(e.defaultPrevented||P||N)return;let t=``;try{t=e.clipboardData?.getData(`text/plain`)??``}catch{return}e.preventDefault();let n=e.currentTarget,r=n.selectionStart,i=n.selectionEnd,a=I.slice(0,r)+t+I.slice(i),o=X(a,D,l.current);o!==null&&(s.current=!1,V.current=r+t.length,w(o,f(y,e.nativeEvent)),E(a))}},a,e=>L.getValidationProps(N,e)],stateAttributesMapping:ve})});function ct({className:e,...t}){return(0,$.jsx)(We,{"data-slot":`input-number`,className:i(`w-full`,e),...t})}function lt({className:e,size:t,...n}){let r=B.useContext(ce)??t??`md`;return(0,$.jsx)(Ge,{"data-slot":`input-number-group`,"data-size":r,className:i(me,x[r],`has-[>[data-slot=input-number-decrement]]:[&>[data-slot=input-number-input]]:pl-0`,`has-[>[data-slot=input-number-increment]]:[&>[data-slot=input-number-input]]:pr-0`,e),...n})}function ut({className:e,autoComplete:t,...n}){return(0,$.jsx)(st,{"data-slot":`input-number-input`,className:i(R,e),...n,...L(t)})}var dt=i(ie({variant:`ghost`,size:`icon-sm`}),`mx-1 shrink-0`);function ft({className:e,children:t,...n}){return(0,$.jsx)(at,{"data-slot":`input-number-decrement`,className:i(dt,e),...n,children:(0,$.jsx)(p,{size:`sm`,children:t??(0,$.jsx)(z,{})})})}function pt({className:e,children:t,...n}){return(0,$.jsx)(it,{"data-slot":`input-number-increment`,className:i(dt,e),...n,children:(0,$.jsx)(p,{size:`sm`,children:t??(0,$.jsx)(fe,{})})})}export{ut as a,pt as i,ft as n,lt as r,ct as t};
|