@brickkit/cli 0.13.2 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard-dist/{api-reference-mT9VNcPb.js → api-reference-lLhahVJi.js} +4 -4
- package/dashboard-dist/app.js +10 -10
- package/dashboard-dist/{client-CwATkLJa.js → client-DRtkFydB.js} +1 -1
- package/dashboard-dist/{core-BEUWp6B5.js → core-BSTqZqMg.js} +1 -1
- package/dashboard-dist/{docs-BRrtyxDB.js → docs-Cye2p0fM.js} +2 -2
- package/dashboard-dist/kit.js +1 -1
- package/dashboard-dist/{popover-Bj9x-88h.js → popover-CKxhB1QI.js} +1 -1
- package/dist/bin.js +46 -1
- package/dist/bin.js.map +1 -1
- package/dist/build.js +38 -16
- package/dist/build.js.map +1 -1
- package/dist/dashboard-host.js +9 -7
- package/dist/dashboard-host.js.map +1 -1
- package/dist/dashboard-protocol.js +21 -1
- package/dist/dashboard-protocol.js.map +1 -1
- package/dist/dashboard.d.ts +1 -1
- package/dist/definitions.js +1 -0
- package/dist/definitions.js.map +1 -1
- package/dist/dev-protocol.js.map +1 -1
- package/dist/dev-worker.js +51 -12
- package/dist/dev-worker.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/project.js +4 -2
- package/dist/project.js.map +1 -1
- package/dist/workflows.d.ts +14 -1
- package/dist/workflows.js +1 -1
- package/dist/workflows2.js +32 -5
- package/dist/workflows2.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
export{U as Custom,G as DefaultResultDisplay,W as default}from"./api-reference-
|
|
1
|
+
export{U as Custom,G as DefaultResultDisplay,W as default}from"./api-reference-lLhahVJi.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{H as ShikiError,t as addClassToHast,T as applyColorReplacements,n as codeToHast,r as codeToHtml,i as codeToTokens,a as codeToTokensBase,E as codeToTokensWithThemes,o as createBundledHighlighter,s as createCssVariablesTheme,c as createHighlighterCore,l as createHighlighterCoreSync,u as createPositionConverter,D as createShikiInternal,O as createShikiInternalSync,k as createShikiPrimitive,A as createShikiPrimitiveAsync,d as createSingletonShorthands,f as flatTokenVariants,j as getLastGrammarState,p as getSingletonHighlighterCore,m as getTokenStyleObject,h as guessEmbeddedLanguages,g as hastToHtml,M as isNoneTheme,N as isPlainLang,P as isSpecialLang,F as isSpecialTheme,_ as makeSingletonHighlighter,v as makeSingletonHighlighterCore,I as normalizeGetter,L as normalizeTheme,R as resolveColorReplacements,z as splitLines,y as splitToken,b as splitTokens,x as stringifyTokenStyle,B as toArray,S as tokenizeAnsiWithTheme,V as tokenizeWithTheme,C as tokensToHast,w as transformerDecorations}from"./api-reference-
|
|
1
|
+
export{H as ShikiError,t as addClassToHast,T as applyColorReplacements,n as codeToHast,r as codeToHtml,i as codeToTokens,a as codeToTokensBase,E as codeToTokensWithThemes,o as createBundledHighlighter,s as createCssVariablesTheme,c as createHighlighterCore,l as createHighlighterCoreSync,u as createPositionConverter,D as createShikiInternal,O as createShikiInternalSync,k as createShikiPrimitive,A as createShikiPrimitiveAsync,d as createSingletonShorthands,f as flatTokenVariants,j as getLastGrammarState,p as getSingletonHighlighterCore,m as getTokenStyleObject,h as guessEmbeddedLanguages,g as hastToHtml,M as isNoneTheme,N as isPlainLang,P as isSpecialLang,F as isSpecialTheme,_ as makeSingletonHighlighter,v as makeSingletonHighlighterCore,I as normalizeGetter,L as normalizeTheme,R as resolveColorReplacements,z as splitLines,y as splitToken,b as splitTokens,x as stringifyTokenStyle,B as toArray,S as tokenizeAnsiWithTheme,V as tokenizeWithTheme,C as tokensToHast,w as transformerDecorations}from"./api-reference-lLhahVJi.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{Gn as t,Hn as n,Mn as r,Nn as i,Pn as a,S as o,Un as s,Vn as c,Wn as l,a as u,c as d,cn as f,kn as p,kt as m,ln as h,rn as g,s as _,sn as v}from"./CompositeRoot-D4sRkYq3.js";import{J as y,at as b,b as x,et as S,it as C,k as w,ot as T,wt as E}from"./popover-Bj9x-88h.js";import{A as D,D as O,I as k,M as A,N as j,O as M,P as N,R as P,a as F,c as I,d as L,f as R,g as ee,h as te,i as ne,j as re,k as z,l as B,m as ie,n as ae,o as oe,p as se,r as ce,s as le,t as ue,u as de,w as fe}from"./CollapsiblePanel-CbUysOp5.js";import{c as pe,f as me,o as he}from"./app.js";var ge={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};ge.node;var _e=n(ge),ve={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};ve.node;var ye=n(ve),V=e(t(),1);async function be(e,t){let n=await fetch(e,{signal:t});if(n.status!==404){if(!n.ok)throw Error(await n.text());return await n.json()}}function xe(e){let[t,n]=(0,V.useState)();return(0,V.useEffect)(()=>{let e=new AbortController;return be(S.info,e.signal).then(e=>e&&n(e),()=>{}),()=>e.abort()},[e]),t}function Se(e,t){let n=e.join(`/`),[r,i]=(0,V.useState)();return(0,V.useEffect)(()=>{let t=new AbortController;return be(b(e),t.signal).then(e=>i({key:n,value:e?{status:`ready`,page:e}:{status:`missing`}}),e=>{t.signal.aborted||i({key:n,value:{status:`failed`,message:e instanceof Error?e.message:String(e)}})}),()=>t.abort()},[n,t]),r&&r.key===n?r.value:{status:`loading`}}function Ce(e,t){let[n,r]=(0,V.useState)();return(0,V.useEffect)(()=>{if(!e)return;let n=!0,i=`${S.components}?v=${t}`;return import(i).then(e=>{let i=e.components??e.default;n&&r({revision:t,value:{components:i&&typeof i==`object`?i:{}}})},async e=>{let a=await fetch(i).then(e=>e.ok?void 0:e.text()).catch(()=>void 0);n&&r({revision:t,value:{components:{},error:a??(e instanceof Error?e.message:String(e))}})}),()=>{n=!1}},[e,t]),e?n&&n.revision===t?n.value:void 0:{components:{}}}var H=e(s(),1),we=V.createContext(void 0);function Te(){let e=V.useContext(we);if(e===void 0)throw Error(v(10));return e}var Ee={value:()=>null},De=V.forwardRef(function(e,t){let{render:n,className:i,disabled:o=!1,hiddenUntilFound:s,keepMounted:c,loopFocus:l,onValueChange:f,multiple:p=!1,orientation:m=`vertical`,value:g,defaultValue:_,style:v,...y}=e,b=_??a,x=V.useRef([]),[S,C]=d({controlled:g,default:b,name:`Accordion`,state:`value`}),w=h((e,t,n)=>{let r;r=p?t?[...S,e]:S.filter(t=>t!==e):S[0]===e?[]:[e],f?.(r,n),n.isCanceled||C(r)}),T=V.useMemo(()=>({value:S,disabled:o,orientation:m}),[S,o,m]),E=V.useMemo(()=>({disabled:o,handleValueChange:w,hiddenUntilFound:s??!1,keepMounted:c??!1,state:T,value:S}),[o,w,s,c,T,S]),D=r(`div`,e,{state:T,ref:t,props:y,stateAttributesMapping:Ee});return(0,H.jsx)(we.Provider,{value:E,children:(0,H.jsx)(u,{elementsRef:x,children:D})})}),Oe=V.createContext(void 0);function U(){let e=V.useContext(Oe);if(e===void 0)throw Error(v(9));return e}var ke=`data-index`,W={...F,index:e=>({[ke]:String(e)}),...m,value:()=>null},Ae=V.forwardRef(function(e,t){let{className:n,disabled:i=!1,onOpenChange:a,render:s,value:c,style:l,...u}=e,{ref:d,index:f}=_(),{disabled:p,handleValueChange:m,state:g,value:v}=Te(),y=o(),b=c??y,x=i||p,S=v.includes(b),C=h((e,t)=>{a?.(e,t),t.isCanceled||m(b,e,t)}),w=B({open:S,onOpenChange:C,disabled:x}),T=V.useMemo(()=>({...w,onOpenChange:C,state:{open:w.open,disabled:w.disabled,transitionStatus:w.transitionStatus}}),[w,C]),E=V.useMemo(()=>({...g,hidden:!S&&!w.mounted,index:f,disabled:x,open:S}),[w.mounted,x,f,S,g]),D=o(),[O,k]=V.useState(),A=O===null?void 0:O??D,j=V.useMemo(()=>({defaultTriggerId:D,open:S,state:E,setTriggerId:k,triggerId:A}),[D,S,E,k,A]),M=r(`div`,e,{state:E,ref:[t,d],props:u,stateAttributesMapping:W});return(0,H.jsx)(le.Provider,{value:T,children:(0,H.jsx)(Oe.Provider,{value:j,children:M})})}),je=V.forwardRef(function(e,t){let{render:n,className:i,style:a,...o}=e,{state:s}=U();return r(`h3`,e,{state:s,ref:t,props:o,stateAttributesMapping:W})}),Me={...W,...oe},Ne=V.forwardRef(function(e,t){let{disabled:n,className:i,id:a,render:o,nativeButton:s=!0,style:c,...l}=e,{panelId:u,open:d,handleTrigger:p,disabled:m}=I(),{getButtonProps:h,buttonRef:_}=g({disabled:n||m,native:s}),{defaultTriggerId:v,state:y,setTriggerId:b}=U(),x=a||void 0,S=x??v;return f(()=>(b(e=>x??(e===null?void 0:e)),()=>{b(e=>e===x?null:e)}),[x,b]),r(`button`,e,{state:y,ref:[t,_],props:[{"aria-controls":d?u:void 0,"aria-expanded":d,id:S,onClick:p},l,h],stateAttributesMapping:Me})}),Pe=`--accordion-panel-height`,Fe=`--accordion-panel-width`,Ie=V.forwardRef(function(e,t){let{className:n,hiddenUntilFound:a,keepMounted:o,id:s,render:c,style:l,...u}=e,{hiddenUntilFound:d,keepMounted:p}=Te(),{defaultPanelId:m,mounted:h,onOpenChange:g,open:_,setMounted:v,setOpen:y,setPanelIdState:b,transitionStatus:x}=I(),S=a??d,C=o??p,w=s||void 0,T=s??m;f(()=>(b(e=>w??(e===null?void 0:e)),()=>{b(e=>e===w?null:e)}),[w,b]);let{height:E,props:D,ref:O,shouldPreventOpenAnimation:k,shouldRender:A,transitionStatus:j,width:M}=ae({externalRef:t,hiddenUntilFound:S,id:T,keepMounted:C,mounted:h,onOpenChange:g,open:_,setMounted:v,setOpen:y,transitionStatus:x}),{state:N,triggerId:P}=U(),F={...N,transitionStatus:j},L=i(l,F),R=r(`div`,{...e,style:void 0},{state:F,ref:O,props:[D,{"aria-labelledby":P,role:`region`,style:{[Pe]:E===void 0?`auto`:`${E}px`,[Fe]:M===void 0?`auto`:`${M}px`}},u,L?{style:L}:void 0,k?{style:{animationName:`none`}}:void 0],stateAttributesMapping:W});return A?R:null});function Le({className:e,...t}){return(0,H.jsx)(De,{className:t=>j(`divide-y divide-fd-border overflow-hidden rounded-lg border bg-fd-card`,typeof e==`function`?e(t):e),...t})}function Re({children:e,...t}){return(0,H.jsx)(Ae,{...t,children:e})}function ze({className:e,children:t,...n}){return(0,H.jsx)(je,{className:t=>j(`scroll-m-24 not-prose flex flex-row items-center text-fd-card-foreground font-medium has-focus-visible:bg-fd-accent`,typeof e==`function`?e(t):e),...n,children:t})}function Be({className:e,children:t,...n}){return(0,H.jsxs)(Ne,{className:t=>j(`group flex flex-1 items-center gap-2 px-3 py-2.5 text-start focus-visible:outline-none`,typeof e==`function`?e(t):e),...n,children:[(0,H.jsx)(P,{className:`size-4 shrink-0 text-fd-muted-foreground transition-transform duration-200 group-data-panel-open:rotate-90`}),t]})}function Ve({className:e,children:t,...n}){return(0,H.jsx)(Ie,{className:t=>j(`h-(--accordion-panel-height) overflow-hidden transition-[height] ease-out data-ending-style:h-0 data-starting-style:h-0`,typeof e==`function`?e(t):e),...n,children:t})}function He({ref:e,className:t,defaultValue:n,...r}){let i=(0,V.useRef)(null),a=fe(e,i),[o,s]=(0,V.useState)(n??[]);return(0,V.useEffect)(()=>{let e=window.location.hash.substring(1),t=i.current;if(!t||e.length===0)return;let n=document.getElementById(e);if(!n||!t.contains(n))return;let r=n.getAttribute(`data-accordion-value`);r&&s(e=>[r,...e])},[]),(0,H.jsx)(Le,{ref:a,value:o,onValueChange:s,className:e=>j(`divide-y divide-fd-border overflow-hidden rounded-lg border bg-fd-card`,typeof t==`function`?t(e):t),...r})}function Ue({title:e,id:t,value:n=String(e),children:r,...i}){return(0,H.jsxs)(Re,{value:n,...i,children:[(0,H.jsxs)(ze,{id:t,"data-accordion-value":n,children:[(0,H.jsx)(Be,{children:e}),t?(0,H.jsx)(We,{id:t}):null]}),(0,H.jsx)(Ve,{hiddenUntilFound:!0,children:(0,H.jsx)(`div`,{className:`px-4 pb-2 text-[0.9375rem] prose-no-margin [&[hidden]:not([hidden='until-found'])]:hidden`,children:r})})]})}function We({id:e}){let t=O({note:`accordion`}),[n,r]=M(()=>{let t=new URL(window.location.href);return t.hash=e,navigator.clipboard.writeText(t.toString())});return(0,H.jsxs)(`button`,{type:`button`,"aria-live":`polite`,className:j(z({variant:`ghost`,className:`text-fd-muted-foreground me-2`})),onClick:r,children:[n?(0,H.jsx)(c,{className:`size-3.5`}):(0,H.jsx)(N,{className:`size-3.5`}),(0,H.jsx)(`span`,{className:`sr-only`,children:t(n?`Copied Link`:`Copy Link`,{note:`aria-label`})})]})}function Ge({id:e,variant:t=`normal`,changeLayout:n=!0,height:r=`3rem`,rainbowColors:i=[`rgba(0,149,255,0.56)`,`rgba(231,77,255,0.77)`,`rgba(255,0,0,0.73)`,`rgba(131,255,166,0.66)`],...a}){let o=O({note:`banner`}),[s,c]=(0,V.useState)(!0),l=e?`nd-banner-${Je(e)}`:null;(0,V.useEffect)(()=>{l&&localStorage.getItem(l)===`true`&&c(!1)},[l]);function u(){c(!1),l&&localStorage.setItem(l,`true`)}return s?(0,H.jsxs)(`div`,{id:e,...a,className:j(`sticky top-0 z-40 flex flex-row items-center justify-center px-4 text-center text-sm font-medium`,t===`normal`&&`bg-fd-secondary`,t===`rainbow`&&`bg-fd-background`,!s&&`hidden`,a.className),style:{height:r},children:[n&&s?(0,H.jsx)(`style`,{children:l?`:root:not(.${l}) { --fd-banner-height: ${r}; }`:`:root { --fd-banner-height: ${r}; }`}):null,l?(0,H.jsx)(`style`,{children:`.${l} #${e} { display: none; }`}):null,l?(0,H.jsx)(`script`,{dangerouslySetInnerHTML:{__html:`if (localStorage.getItem('${l}') === 'true') document.documentElement.classList.add('${l}');`}}):null,t===`rainbow`?qe({colors:i}):null,a.children,e?(0,H.jsx)(`button`,{type:`button`,"aria-label":o(`Close Banner`,{note:`aria-label`}),onClick:u,className:j(z({variant:`ghost`,className:`absolute inset-e-2 top-1/2 -translate-y-1/2 text-fd-muted-foreground/50`,size:`icon-sm`})),children:(0,H.jsx)(he,{})}):null]}):null}var Ke=`linear-gradient(to bottom,white,transparent), radial-gradient(circle at top center, white, transparent)`;function qe({colors:e}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`absolute inset-0 -z-1`,style:{maskImage:Ke,maskComposite:`intersect`,animation:`fd-moving-banner 20s linear infinite`,backgroundImage:`repeating-linear-gradient(70deg, ${[...e,e[0]].map((t,n)=>`${t} ${n*50/e.length}%`).join(`, `)})`,backgroundSize:`200% 100%`,filter:`saturate(2)`}}),(0,H.jsx)(`style`,{children:`@keyframes fd-moving-banner {
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{Gn as t,Hn as n,Mn as r,Nn as i,Pn as a,S as o,Un as s,Vn as c,Wn as l,a as u,c as d,cn as f,kn as p,kt as m,ln as h,rn as g,s as _,sn as v}from"./CompositeRoot-D4sRkYq3.js";import{J as y,Tt as b,at as x,b as S,et as C,k as w,ot as T,st as E}from"./popover-CKxhB1QI.js";import{A as D,D as O,I as k,M as A,N as j,O as M,P as N,R as P,a as F,c as I,d as L,f as R,g as ee,h as te,i as ne,j as re,k as z,l as B,m as ie,n as ae,o as oe,p as se,r as ce,s as le,t as ue,u as de,w as fe}from"./CollapsiblePanel-CbUysOp5.js";import{c as pe,f as me,o as he}from"./app.js";var ge={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};ge.node;var _e=n(ge),ve={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};ve.node;var ye=n(ve),V=e(t(),1);async function be(e,t){let n=await fetch(e,{signal:t});if(n.status!==404){if(!n.ok)throw Error(await n.text());return await n.json()}}function xe(e){let[t,n]=(0,V.useState)();return(0,V.useEffect)(()=>{let e=new AbortController;return be(C.info,e.signal).then(e=>e&&n(e),()=>{}),()=>e.abort()},[e]),t}function Se(e,t){let n=e.join(`/`),[r,i]=(0,V.useState)();return(0,V.useEffect)(()=>{let t=new AbortController;return be(T(e),t.signal).then(e=>i({key:n,value:e?{status:`ready`,page:e}:{status:`missing`}}),e=>{t.signal.aborted||i({key:n,value:{status:`failed`,message:e instanceof Error?e.message:String(e)}})}),()=>t.abort()},[n,t]),r&&r.key===n?r.value:{status:`loading`}}function Ce(e,t){let[n,r]=(0,V.useState)();return(0,V.useEffect)(()=>{if(!e)return;let n=!0,i=`${C.components}?v=${t}`;return import(i).then(e=>{let i=e.components??e.default;n&&r({revision:t,value:{components:i&&typeof i==`object`?i:{}}})},async e=>{let a=await fetch(i).then(e=>e.ok?void 0:e.text()).catch(()=>void 0);n&&r({revision:t,value:{components:{},error:a??(e instanceof Error?e.message:String(e))}})}),()=>{n=!1}},[e,t]),e?n&&n.revision===t?n.value:void 0:{components:{}}}var H=e(s(),1),we=V.createContext(void 0);function Te(){let e=V.useContext(we);if(e===void 0)throw Error(v(10));return e}var Ee={value:()=>null},De=V.forwardRef(function(e,t){let{render:n,className:i,disabled:o=!1,hiddenUntilFound:s,keepMounted:c,loopFocus:l,onValueChange:f,multiple:p=!1,orientation:m=`vertical`,value:g,defaultValue:_,style:v,...y}=e,b=_??a,x=V.useRef([]),[S,C]=d({controlled:g,default:b,name:`Accordion`,state:`value`}),w=h((e,t,n)=>{let r;r=p?t?[...S,e]:S.filter(t=>t!==e):S[0]===e?[]:[e],f?.(r,n),n.isCanceled||C(r)}),T=V.useMemo(()=>({value:S,disabled:o,orientation:m}),[S,o,m]),E=V.useMemo(()=>({disabled:o,handleValueChange:w,hiddenUntilFound:s??!1,keepMounted:c??!1,state:T,value:S}),[o,w,s,c,T,S]),D=r(`div`,e,{state:T,ref:t,props:y,stateAttributesMapping:Ee});return(0,H.jsx)(we.Provider,{value:E,children:(0,H.jsx)(u,{elementsRef:x,children:D})})}),Oe=V.createContext(void 0);function U(){let e=V.useContext(Oe);if(e===void 0)throw Error(v(9));return e}var ke=`data-index`,W={...F,index:e=>({[ke]:String(e)}),...m,value:()=>null},Ae=V.forwardRef(function(e,t){let{className:n,disabled:i=!1,onOpenChange:a,render:s,value:c,style:l,...u}=e,{ref:d,index:f}=_(),{disabled:p,handleValueChange:m,state:g,value:v}=Te(),y=o(),b=c??y,x=i||p,S=v.includes(b),C=h((e,t)=>{a?.(e,t),t.isCanceled||m(b,e,t)}),w=B({open:S,onOpenChange:C,disabled:x}),T=V.useMemo(()=>({...w,onOpenChange:C,state:{open:w.open,disabled:w.disabled,transitionStatus:w.transitionStatus}}),[w,C]),E=V.useMemo(()=>({...g,hidden:!S&&!w.mounted,index:f,disabled:x,open:S}),[w.mounted,x,f,S,g]),D=o(),[O,k]=V.useState(),A=O===null?void 0:O??D,j=V.useMemo(()=>({defaultTriggerId:D,open:S,state:E,setTriggerId:k,triggerId:A}),[D,S,E,k,A]),M=r(`div`,e,{state:E,ref:[t,d],props:u,stateAttributesMapping:W});return(0,H.jsx)(le.Provider,{value:T,children:(0,H.jsx)(Oe.Provider,{value:j,children:M})})}),je=V.forwardRef(function(e,t){let{render:n,className:i,style:a,...o}=e,{state:s}=U();return r(`h3`,e,{state:s,ref:t,props:o,stateAttributesMapping:W})}),Me={...W,...oe},Ne=V.forwardRef(function(e,t){let{disabled:n,className:i,id:a,render:o,nativeButton:s=!0,style:c,...l}=e,{panelId:u,open:d,handleTrigger:p,disabled:m}=I(),{getButtonProps:h,buttonRef:_}=g({disabled:n||m,native:s}),{defaultTriggerId:v,state:y,setTriggerId:b}=U(),x=a||void 0,S=x??v;return f(()=>(b(e=>x??(e===null?void 0:e)),()=>{b(e=>e===x?null:e)}),[x,b]),r(`button`,e,{state:y,ref:[t,_],props:[{"aria-controls":d?u:void 0,"aria-expanded":d,id:S,onClick:p},l,h],stateAttributesMapping:Me})}),Pe=`--accordion-panel-height`,Fe=`--accordion-panel-width`,Ie=V.forwardRef(function(e,t){let{className:n,hiddenUntilFound:a,keepMounted:o,id:s,render:c,style:l,...u}=e,{hiddenUntilFound:d,keepMounted:p}=Te(),{defaultPanelId:m,mounted:h,onOpenChange:g,open:_,setMounted:v,setOpen:y,setPanelIdState:b,transitionStatus:x}=I(),S=a??d,C=o??p,w=s||void 0,T=s??m;f(()=>(b(e=>w??(e===null?void 0:e)),()=>{b(e=>e===w?null:e)}),[w,b]);let{height:E,props:D,ref:O,shouldPreventOpenAnimation:k,shouldRender:A,transitionStatus:j,width:M}=ae({externalRef:t,hiddenUntilFound:S,id:T,keepMounted:C,mounted:h,onOpenChange:g,open:_,setMounted:v,setOpen:y,transitionStatus:x}),{state:N,triggerId:P}=U(),F={...N,transitionStatus:j},L=i(l,F),R=r(`div`,{...e,style:void 0},{state:F,ref:O,props:[D,{"aria-labelledby":P,role:`region`,style:{[Pe]:E===void 0?`auto`:`${E}px`,[Fe]:M===void 0?`auto`:`${M}px`}},u,L?{style:L}:void 0,k?{style:{animationName:`none`}}:void 0],stateAttributesMapping:W});return A?R:null});function Le({className:e,...t}){return(0,H.jsx)(De,{className:t=>j(`divide-y divide-fd-border overflow-hidden rounded-lg border bg-fd-card`,typeof e==`function`?e(t):e),...t})}function Re({children:e,...t}){return(0,H.jsx)(Ae,{...t,children:e})}function ze({className:e,children:t,...n}){return(0,H.jsx)(je,{className:t=>j(`scroll-m-24 not-prose flex flex-row items-center text-fd-card-foreground font-medium has-focus-visible:bg-fd-accent`,typeof e==`function`?e(t):e),...n,children:t})}function Be({className:e,children:t,...n}){return(0,H.jsxs)(Ne,{className:t=>j(`group flex flex-1 items-center gap-2 px-3 py-2.5 text-start focus-visible:outline-none`,typeof e==`function`?e(t):e),...n,children:[(0,H.jsx)(P,{className:`size-4 shrink-0 text-fd-muted-foreground transition-transform duration-200 group-data-panel-open:rotate-90`}),t]})}function Ve({className:e,children:t,...n}){return(0,H.jsx)(Ie,{className:t=>j(`h-(--accordion-panel-height) overflow-hidden transition-[height] ease-out data-ending-style:h-0 data-starting-style:h-0`,typeof e==`function`?e(t):e),...n,children:t})}function He({ref:e,className:t,defaultValue:n,...r}){let i=(0,V.useRef)(null),a=fe(e,i),[o,s]=(0,V.useState)(n??[]);return(0,V.useEffect)(()=>{let e=window.location.hash.substring(1),t=i.current;if(!t||e.length===0)return;let n=document.getElementById(e);if(!n||!t.contains(n))return;let r=n.getAttribute(`data-accordion-value`);r&&s(e=>[r,...e])},[]),(0,H.jsx)(Le,{ref:a,value:o,onValueChange:s,className:e=>j(`divide-y divide-fd-border overflow-hidden rounded-lg border bg-fd-card`,typeof t==`function`?t(e):t),...r})}function Ue({title:e,id:t,value:n=String(e),children:r,...i}){return(0,H.jsxs)(Re,{value:n,...i,children:[(0,H.jsxs)(ze,{id:t,"data-accordion-value":n,children:[(0,H.jsx)(Be,{children:e}),t?(0,H.jsx)(We,{id:t}):null]}),(0,H.jsx)(Ve,{hiddenUntilFound:!0,children:(0,H.jsx)(`div`,{className:`px-4 pb-2 text-[0.9375rem] prose-no-margin [&[hidden]:not([hidden='until-found'])]:hidden`,children:r})})]})}function We({id:e}){let t=O({note:`accordion`}),[n,r]=M(()=>{let t=new URL(window.location.href);return t.hash=e,navigator.clipboard.writeText(t.toString())});return(0,H.jsxs)(`button`,{type:`button`,"aria-live":`polite`,className:j(z({variant:`ghost`,className:`text-fd-muted-foreground me-2`})),onClick:r,children:[n?(0,H.jsx)(c,{className:`size-3.5`}):(0,H.jsx)(N,{className:`size-3.5`}),(0,H.jsx)(`span`,{className:`sr-only`,children:t(n?`Copied Link`:`Copy Link`,{note:`aria-label`})})]})}function Ge({id:e,variant:t=`normal`,changeLayout:n=!0,height:r=`3rem`,rainbowColors:i=[`rgba(0,149,255,0.56)`,`rgba(231,77,255,0.77)`,`rgba(255,0,0,0.73)`,`rgba(131,255,166,0.66)`],...a}){let o=O({note:`banner`}),[s,c]=(0,V.useState)(!0),l=e?`nd-banner-${Je(e)}`:null;(0,V.useEffect)(()=>{l&&localStorage.getItem(l)===`true`&&c(!1)},[l]);function u(){c(!1),l&&localStorage.setItem(l,`true`)}return s?(0,H.jsxs)(`div`,{id:e,...a,className:j(`sticky top-0 z-40 flex flex-row items-center justify-center px-4 text-center text-sm font-medium`,t===`normal`&&`bg-fd-secondary`,t===`rainbow`&&`bg-fd-background`,!s&&`hidden`,a.className),style:{height:r},children:[n&&s?(0,H.jsx)(`style`,{children:l?`:root:not(.${l}) { --fd-banner-height: ${r}; }`:`:root { --fd-banner-height: ${r}; }`}):null,l?(0,H.jsx)(`style`,{children:`.${l} #${e} { display: none; }`}):null,l?(0,H.jsx)(`script`,{dangerouslySetInnerHTML:{__html:`if (localStorage.getItem('${l}') === 'true') document.documentElement.classList.add('${l}');`}}):null,t===`rainbow`?qe({colors:i}):null,a.children,e?(0,H.jsx)(`button`,{type:`button`,"aria-label":o(`Close Banner`,{note:`aria-label`}),onClick:u,className:j(z({variant:`ghost`,className:`absolute inset-e-2 top-1/2 -translate-y-1/2 text-fd-muted-foreground/50`,size:`icon-sm`})),children:(0,H.jsx)(he,{})}):null]}):null}var Ke=`linear-gradient(to bottom,white,transparent), radial-gradient(circle at top center, white, transparent)`;function qe({colors:e}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`absolute inset-0 -z-1`,style:{maskImage:Ke,maskComposite:`intersect`,animation:`fd-moving-banner 20s linear infinite`,backgroundImage:`repeating-linear-gradient(70deg, ${[...e,e[0]].map((t,n)=>`${t} ${n*50/e.length}%`).join(`, `)})`,backgroundSize:`200% 100%`,filter:`saturate(2)`}}),(0,H.jsx)(`style`,{children:`@keyframes fd-moving-banner {
|
|
2
2
|
from { background-position: 0% 0; }
|
|
3
3
|
to { background-position: 100% 0; }
|
|
4
|
-
}`})]})}function Je(e){let t=`abcdefghijklmnopqrstuvwxyz234567`,n=``,r=0,i=0;for(let a=0;a<e.length;a++)for(r=r<<8|e.charCodeAt(a),i+=8;i>=5;)i-=5,n+=t[r>>i&31];return i>0&&(n+=t[r<<5-i&31]),n}var G=ne,Ye=ce;function Xe({children:e,className:t,...n}){return(0,H.jsx)(ue,{...n,className:e=>j(`overflow-hidden [&[hidden]:not([hidden='until-found'])]:hidden h-(--collapsible-panel-height) transition-[height,opacity] data-starting-style:opacity-0 data-starting-style:h-0 data-ending-style:h-0 data-ending-style:opacity-0`,typeof t==`function`?t(e):t),children:e})}var Ze=p(`flex flex-row items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-fd-accent hover:text-fd-accent-foreground [&_svg]:size-4`);function Qe({className:e,...t}){return(0,H.jsx)(`div`,{className:j(`not-prose rounded-md border bg-fd-card p-2`,e),...t,children:t.children})}function $e({name:e,icon:t=(0,H.jsx)(k,{}),className:n,...r}){return(0,H.jsxs)(`div`,{className:j(Ze({className:n})),...r,children:[t,e]})}function et({name:e,defaultOpen:t=!1,...n}){let[r,i]=(0,V.useState)(t);return(0,H.jsxs)(G,{open:r,onOpenChange:i,...n,children:[(0,H.jsxs)(Ye,{className:j(Ze({className:`w-full`})),children:[r?(0,H.jsx)(_e,{}):(0,H.jsx)(ye,{}),e]}),(0,H.jsx)(Xe,{children:(0,H.jsx)(`div`,{className:`ms-2 flex flex-col border-l ps-2`,children:n.children})})]})}var tt=e=>{let t=`-zoom`,n=[`clip-path`,`fill`,`mask`,`marker-start`,`marker-mid`,`marker-end`],r=new Map;if(e.hasAttribute(`id`)){let{id:n}=e,i=n+t;r.set(n,i);let a=e;a.id=i}e.querySelectorAll(`[id]`).forEach(e=>{let{id:n}=e,i=n+t;r.set(n,i);let a=e;a.id=i});let i=n.map(e=>`[${e}]`).join(`, `);e.querySelectorAll(i).forEach(e=>{for(let t of n){let n=e.getAttribute(t);if(n?.startsWith(`url(#`)===!0){let i=n.slice(5,-1),a=r.get(i);a!==void 0&&e.setAttribute(t,`url(#${a})`)}}}),e.querySelectorAll(`style`).forEach(e=>{let{textContent:t}=e;if(t!==``){let n=t;if(r.forEach((e,t)=>{n=n.replaceAll(`#${t}`,`#${e}`)}),n!==t){let t=e;t.textContent=n}}})};function nt(e){return typeof Element>`u`?!1:e instanceof Element}var K=(e,t)=>nt(t)&&t.tagName.toUpperCase()===e,rt=e=>K(`DIV`,e)||K(`SPAN`,e),q=e=>K(`IMG`,e),it=e=>e.complete&&e.naturalHeight!==0,J=e=>K(`SVG`,e),at=e=>{if(e!==null)return q(e)?e.alt:e.getAttribute(`aria-label`)??void 0},ot=/url(?:\(['"]?)(?<url>.*?)(?:['"]?\))/,st=e=>{if(e!==null){if(q(e))return e.currentSrc===``?void 0:e.currentSrc;if(rt(e)){let{backgroundImage:t}=window.getComputedStyle(e);if(t!==``)return ot.exec(t)?.[1]}}},ct=e=>{if(e==null)return{};if(J(e)){let{parentElement:t}=e,n=e.getBoundingClientRect();if(t==null)return{height:n.height,left:n.left,width:n.width,top:n.top};{let e=t.getBoundingClientRect();return{height:n.height,left:e.left-n.left,top:e.top-n.top,width:n.width}}}return{height:e.offsetHeight,left:e.offsetLeft,width:e.offsetWidth,top:e.offsetTop}},lt=({height:e,offset:t,width:n})=>Math.min((window.innerWidth-t*2)/n,(window.innerHeight-t*2)/e),ut=({containerHeight:e,containerWidth:t,offset:n,targetHeight:r,targetWidth:i})=>{let a=lt({height:r,offset:n,width:i}),o=i>r?i/t:r/e;return a>1?o:a*o},dt=({containerHeight:e,containerWidth:t,hasScalableSrc:n,offset:r,targetHeight:i,targetWidth:a})=>e===0||t===0?1:!n&&i!==0&&a!==0?ut({containerHeight:e,containerWidth:t,offset:r,targetHeight:i,targetWidth:a}):lt({height:e,offset:r,width:t}),ft=({containerHeight:e,containerLeft:t,containerTop:n,containerWidth:r,hasScalableSrc:i,offset:a,targetHeight:o,targetWidth:s})=>{let c=dt({containerHeight:e,containerWidth:r,hasScalableSrc:i,offset:a,targetHeight:o,targetWidth:s});return{top:n,left:t,width:r*c,height:e*c,initialTransform:`translate(0,0) scale(${1/c})`}},Y=(e,t)=>{let n=parseFloat(e);return e.endsWith(`%`)?t*n/100:n},X=({containerHeight:e,containerLeft:t,containerTop:n,containerWidth:r,hasScalableSrc:i,offset:a,position:o,targetHeight:s,targetWidth:c,visibleHeight:l,visibleWidth:u})=>{let[d=`50%`,f=`50%`]=o.split(` `),p=Y(d,r-u),m=Y(f,e-l),h=dt({containerHeight:l,containerWidth:u,hasScalableSrc:i,offset:a,targetHeight:s,targetWidth:c});return{top:n+m,left:t+p,width:u*h,height:l*h,initialTransform:`translate(0,0) scale(${1/h})`}},pt=({containerHeight:e,containerLeft:t,containerTop:n,containerWidth:r,hasScalableSrc:i,objectFit:a,objectPosition:o,offset:s,targetHeight:c,targetWidth:l})=>{let u=a;u===`scale-down`&&(u=l<=r&&c<=e?`none`:`contain`);let d={containerHeight:e,containerLeft:t,containerTop:n,containerWidth:r,hasScalableSrc:i,offset:s,position:o,targetHeight:c,targetWidth:l};if(u===`cover`||u===`contain`){let t=r/l,n=e/c,i=u===`cover`?Math.max(t,n):Math.min(t,n);return X({...d,visibleWidth:l*i,visibleHeight:c*i})}if(u===`none`)return X({...d,visibleWidth:l,visibleHeight:c});{let a=r/l,o=e/c,u=Math.max(a,o),d=dt({containerHeight:c*u,containerWidth:l*u,hasScalableSrc:i,offset:s,targetHeight:c,targetWidth:l});return{top:n,left:t,width:r*d,height:e*d,initialTransform:`translate(0,0) scale(${1/d})`}}},mt=({backgroundPosition:e,backgroundSize:t,containerHeight:n,containerLeft:r,containerTop:i,containerWidth:a,hasScalableSrc:o,offset:s,targetHeight:c,targetWidth:l})=>{let u={containerHeight:n,containerLeft:r,containerTop:i,containerWidth:a,hasScalableSrc:o,offset:s,position:e,targetHeight:c,targetWidth:l};if(t===`cover`||t===`contain`){let e=a/l,r=n/c,i=t===`cover`?Math.max(e,r):Math.min(e,r);return X({...u,visibleWidth:l*i,visibleHeight:c*i})}if(t===`auto`)return X({...u,visibleWidth:l,visibleHeight:c});{let[e=`50%`,r=`50%`]=t.split(` `),i=Y(e,a),o=Y(r,n),s=i/l,d=o/c,f=Math.min(s,d);return X({...u,visibleWidth:l*f,visibleHeight:c*f})}},ht=({height:e,initialTransform:t,isZoomed:n,left:r,top:i,userTransform:a,width:o})=>{let s=``;if(a!==`none`&&a!==``){let t=o/2,n=e/2;s=`translate(${t}px,${n}px) ${a} translate(${-t}px,${-n}px)`}if(!n)return s===``?t:`${t} ${s}`;let c=window.innerWidth/2,l=window.innerHeight/2,u=r+o/2,d=i+e/2,f=`translate(${c-u}px,${l-d}px) scale(1)`;return s===``?f:`${f} ${s}`},gt=({fallback:e,natural:t})=>t!==void 0&&t!==0?t:e,_t=/\.svg$/i,vt=({hasZoomImg:e,imgSrc:t,isSvg:n})=>n||t?.slice(0,18)===`data:image/svg+xml`||e||t!==void 0&&_t.test(t),yt=({hasZoomImg:e,imgSrc:t,isSvg:n,isZoomed:r,loadedImgEl:i,offset:a,shouldRefresh:o,targetEl:s})=>{let c=vt({hasZoomImg:e,imgSrc:t,isSvg:n}),l=s.getBoundingClientRect(),u=window.getComputedStyle(s),d=i!=null&&rt(s),f=i!=null&&!d,p=gt({fallback:l.height,natural:i?.naturalHeight}),m=gt({fallback:l.width,natural:i?.naturalWidth}),{height:h,left:g,top:_,width:v}=l,y=d?mt({backgroundPosition:u.backgroundPosition,backgroundSize:u.backgroundSize,containerHeight:h,containerLeft:g,containerTop:_,containerWidth:v,hasScalableSrc:c,offset:a,targetHeight:p,targetWidth:m}):f?pt({containerHeight:h,containerLeft:g,containerTop:_,containerWidth:v,hasScalableSrc:c,objectFit:u.objectFit,objectPosition:u.objectPosition,offset:a,targetHeight:p,targetWidth:m}):ft({containerHeight:h,containerLeft:g,containerTop:_,containerWidth:v,hasScalableSrc:c,offset:a,targetHeight:p,targetWidth:m}),b={top:y.top,left:y.left,width:y.width,height:y.height,transform:ht({...y,isZoomed:r,userTransform:u.transform})};return r&&o&&(b.transitionDuration=`0.01ms`),b},bt=e(l()),xt=[`img`,`svg`,`[role="img"]`,`[data-zoom]`].map(e=>`${e}:not([aria-hidden="true"])`).join(`,`),St={overflow:``,width:``};function Ct(){let e=document.querySelector(`[data-rmiz-portal]`);if(e!=null)return e;let t=document.createElement(`div`);return t.setAttribute(`data-rmiz-portal`,``),document.body.appendChild(t),t}function wt(e){e.preventDefault()}function Tt(e){return V.createElement(Et,{...e})}var Et=class extends V.Component{constructor(){super(...arguments),this.state={id:``,isZoomImgLoaded:!1,loadedImgEl:void 0,modalState:`UNLOADED`,shouldRefresh:!1,styleGhost:{}},this.refContent=V.createRef(),this.refDialog=V.createRef(),this.refModalContent=V.createRef(),this.refModalImg=V.createRef(),this.refWrap=V.createRef(),this.imgEl=null,this.isScaling=!1,this.prevBodyAttrs=St,this.styleModalImg={},this.handleModalStateChange=e=>{let{state:{modalState:t}}=this;e!==`LOADING`&&t===`LOADING`?(this.isScaling=!1,this.loadZoomImg(),window.addEventListener(`resize`,this.handleResize,{passive:!0}),window.addEventListener(`touchstart`,this.handleTouchStart,{passive:!0}),window.addEventListener(`touchmove`,this.handleTouchMove,{passive:!0}),window.addEventListener(`touchend`,this.handleTouchEnd,{passive:!0}),window.addEventListener(`touchcancel`,this.handleTouchCancel,{passive:!0}),document.addEventListener(`keydown`,this.handleKeyDown,!0)):e!==`LOADED`&&t===`LOADED`?window.addEventListener(`wheel`,this.handleWheel,{passive:!0}):e!==`UNLOADING`&&t===`UNLOADING`?(this.ensureImgTransitionEnd(),window.removeEventListener(`wheel`,this.handleWheel),window.removeEventListener(`touchstart`,this.handleTouchStart),window.removeEventListener(`touchmove`,this.handleTouchMove),window.removeEventListener(`touchend`,this.handleTouchEnd),window.removeEventListener(`touchcancel`,this.handleTouchCancel),document.removeEventListener(`keydown`,this.handleKeyDown,!0)):e!==`UNLOADED`&&t===`UNLOADED`&&(this.bodyScrollEnable(),window.removeEventListener(`resize`,this.handleResize),this.refDialog.current?.close())},this.setId=()=>{let e=()=>Math.random().toString(16).slice(-4);this.setState({id:e()+e()+e()})},this.setAndTrackImg=()=>{let{refContent:{current:e}}=this;e!=null&&(this.imgEl=e.querySelector(xt),this.imgEl===null?this.contentNotFoundChangeObserver??(this.contentNotFoundChangeObserver=new MutationObserver(this.setAndTrackImg),this.contentNotFoundChangeObserver.observe(e,{childList:!0,subtree:!0})):(this.contentNotFoundChangeObserver?.disconnect(),this.imgEl.addEventListener(`load`,this.handleImgLoad),this.imgEl.addEventListener(`click`,this.handleZoom),this.state.loadedImgEl??this.handleImgLoad(),this.imgElResizeObserver=new ResizeObserver(e=>{let[t]=e;t?.target!==void 0&&(this.imgEl=t.target,this.setState({styleGhost:ct(this.imgEl)}))}),this.imgElResizeObserver.observe(this.imgEl),this.contentChangeObserver??(this.contentChangeObserver=new MutationObserver(()=>{this.setState({styleGhost:ct(this.imgEl)})}),this.contentChangeObserver.observe(e,{attributes:!0,childList:!0,subtree:!0}))))},this.handleIfZoomChanged=e=>{let{props:{isZoomed:t}}=this;!e&&t?this.zoom():e&&!t&&this.unzoom()},this.handleImgLoad=()=>{let e=st(this.imgEl);if(e==null||e===``)return;let t=new Image,{imgEl:n}=this;if(q(n)){let{sizes:e,srcset:r,crossOrigin:i}=n;t.sizes=e,t.srcset=r,t.crossOrigin=i}t.src=e;let r=()=>{this.setState({loadedImgEl:t,styleGhost:ct(this.imgEl)})};t.decode().then(r).catch(()=>{it(t)?r():t.onload=r})},this.handleZoom=e=>{this.props.isDisabled!==!0&&this.hasImage()&&this.props.onZoomChange?.(!0,{event:e})},this.handleUnzoom=e=>{this.props.isDisabled!==!0&&this.props.onZoomChange?.(!1,{event:e})},this.handleBtnUnzoomClick=e=>{e.preventDefault(),e.stopPropagation(),this.handleUnzoom(e)},this.handleDialogClick=e=>{(e.target===this.refModalContent.current||e.target===this.refModalImg.current)&&(e.stopPropagation(),this.handleUnzoom(e))},this.handleDialogClose=e=>{e.stopPropagation(),this.handleUnzoom(e)},this.handleKeyDown=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),this.handleUnzoom(e))},this.handleWheel=e=>{e.ctrlKey||this.isScaling||(window.visualViewport?.scale??1)>1||(e.stopPropagation(),queueMicrotask(()=>{this.handleUnzoom(e)}))},this.handleTouchStart=e=>{if(e.touches.length>1){this.isScaling=!0;return}let{changedTouches:t}=e,[n]=t;if(t.length===1&&n!==void 0){let{screenY:e}=n;this.touchYStart=e}},this.handleTouchMove=e=>{let t=window.visualViewport?.scale??1,{changedTouches:n}=e,[r]=n;if(this.props.canSwipeToUnzoom&&!this.isScaling&&t<=1&&this.touchYStart!=null&&r!==void 0){let{screenY:t}=r;this.touchYEnd=t;let n=Math.max(this.touchYStart,this.touchYEnd),i=Math.min(this.touchYStart,this.touchYEnd);Math.abs(n-i)>this.props.swipeToUnzoomThreshold&&(this.touchYStart=void 0,this.touchYEnd=void 0,this.handleUnzoom(e))}},this.handleTouchEnd=()=>{this.touchYStart=void 0,this.touchYEnd=void 0},this.handleTouchCancel=()=>{this.touchYStart=void 0,this.touchYEnd=void 0},this.handleResize=()=>{this.setState({shouldRefresh:!0})},this.hasImage=()=>this.imgEl!==null&&(this.state.loadedImgEl!==void 0||J(this.imgEl))&&window.getComputedStyle(this.imgEl).display!==`none`,this.zoom=()=>{this.bodyScrollDisable(),this.refDialog.current?.showModal(),this.setState({modalState:`LOADING`})},this.unzoom=()=>{this.setState({modalState:`UNLOADING`})},this.handleImgTransitionEnd=()=>{clearTimeout(this.timeoutTransitionEnd),this.state.modalState===`LOADING`?this.setState({modalState:`LOADED`}):this.state.modalState===`UNLOADING`&&this.setState({shouldRefresh:!1,modalState:`UNLOADED`})},this.ensureImgTransitionEnd=()=>{if(this.refModalImg.current!==null){let{transitionDuration:e}=window.getComputedStyle(this.refModalImg.current),t=parseFloat(e);if(t!==0&&!Number.isNaN(t)){let n=t*(e.endsWith(`ms`)?1:1e3)+50;this.timeoutTransitionEnd=setTimeout(this.handleImgTransitionEnd,n)}}},this.bodyScrollDisable=()=>{let e=document.body.style;this.prevBodyAttrs={overflow:e.overflow,width:e.width};let t=document.body.clientWidth;e.overflow=`hidden`,e.width=`${t}px`},this.bodyScrollEnable=()=>{let e=document.body.style,t=this.prevBodyAttrs;e.width=t.width,e.overflow=t.overflow,this.prevBodyAttrs=St},this.loadZoomImg=()=>{let{props:{zoomImg:e}}=this;if(e==null)return;let{src:t}=e;if(t!==void 0&&t!==``){let n=new Image;n.sizes=e.sizes??``,n.srcset=e.srcSet??``,n.crossOrigin=e.crossOrigin??void 0,n.src=t;let r=()=>{this.setState({isZoomImgLoaded:!0})};n.decode().then(r).catch(()=>{it(n)?r():n.onload=r})}},this.UNSAFE_handleSvg=()=>{let{imgEl:e,refModalImg:t,styleModalImg:n}=this;if(J(e)){let r=e.cloneNode(!0);tt(r),r.style.width=`${n.width??0}px`,r.style.height=`${n.height??0}px`,r.addEventListener(`click`,this.handleUnzoom),t.current?.firstChild?.remove(),t.current?.appendChild(r)}}}render(){let{handleBtnUnzoomClick:e,handleDialogClick:t,handleDialogClose:n,handleUnzoom:r,handleZoom:i,imgEl:a,props:{a11yNameButtonUnzoom:o,a11yNameButtonZoom:s,children:c,classDialog:l,IconUnzoom:u,IconZoom:d,wrapElement:f,ZoomContent:p,zoomImg:m,zoomMargin:h},refContent:g,refDialog:_,refModalContent:v,refModalImg:y,refWrap:b,state:{id:x,isZoomImgLoaded:S,loadedImgEl:C,modalState:w,shouldRefresh:T,styleGhost:E}}=this,D=`rmiz-modal-${x}`,O=`rmiz-modal-img-${x}`,k=rt(a),A=q(a),j=J(a),M=at(a),N=st(a),P=A?a.sizes:void 0,F=A?a.srcset:void 0,I=A?a.crossOrigin:void 0,L=m?.src!==void 0&&m.src!==``,R=this.hasImage(),ee=M!==void 0&&M!==``?`${s}: ${M}`:s,te=w===`LOADING`||w===`LOADED`,ne=R?`found`:`not-found`,re=w===`UNLOADED`||w===`UNLOADING`?`hidden`:`visible`,z={visibility:w===`UNLOADED`?`visible`:`hidden`};this.styleModalImg=R&&a!==null?yt({hasZoomImg:L,imgSrc:N,isSvg:j,isZoomed:te,loadedImgEl:C,offset:h,shouldRefresh:T,targetEl:a}):{};let B=null;if(R){let t=A||k?V.createElement(`img`,{alt:M,crossOrigin:I,sizes:P,src:N,srcSet:F,...S&&w===`LOADED`?m:{},"data-rmiz-modal-img":``,height:this.styleModalImg.height??void 0,id:O,onTransitionEnd:this.handleImgTransitionEnd,ref:y,style:this.styleModalImg,width:this.styleModalImg.width??void 0}):j?V.createElement(`div`,{"data-rmiz-modal-img":!0,onTransitionEnd:this.handleImgTransitionEnd,ref:y,style:this.styleModalImg}):null,n=V.createElement(`button`,{"aria-label":o,"data-rmiz-btn-unzoom":``,onClick:e,type:`button`},V.createElement(u,null));B=p==null?V.createElement(V.Fragment,null,t,n):V.createElement(p,{buttonUnzoom:n,modalState:w,img:t,isZoomImgLoaded:S,onUnzoom:r})}return V.createElement(f,{"data-rmiz":``,ref:b},V.createElement(f,{"data-rmiz-content":ne,ref:g,style:z},c),R&&V.createElement(f,{"data-rmiz-ghost":``,style:E},V.createElement(`button`,{"aria-label":ee,"data-rmiz-btn-zoom":``,onClick:i,type:`button`},V.createElement(d,null))),R&&bt.createPortal(V.createElement(`dialog`,{"aria-labelledby":O,"aria-modal":`true`,className:l,"data-rmiz-modal":``,id:D,onClick:t,onClose:n,onCancel:wt,ref:_,role:`dialog`},V.createElement(`div`,{"data-rmiz-modal-overlay":re}),V.createElement(`div`,{"data-rmiz-modal-content":``,ref:v},B)),Ct()))}componentDidMount(){this.setId(),this.setAndTrackImg(),this.handleImgLoad(),this.UNSAFE_handleSvg()}componentWillUnmount(){this.state.modalState!==`UNLOADED`&&this.bodyScrollEnable(),this.contentChangeObserver?.disconnect(),this.contentNotFoundChangeObserver?.disconnect(),this.imgElResizeObserver?.disconnect(),this.imgEl?.removeEventListener(`load`,this.handleImgLoad),this.imgEl?.removeEventListener(`click`,this.handleZoom),clearTimeout(this.timeoutTransitionEnd),window.removeEventListener(`wheel`,this.handleWheel),window.removeEventListener(`touchstart`,this.handleTouchStart),window.removeEventListener(`touchmove`,this.handleTouchMove),window.removeEventListener(`touchend`,this.handleTouchEnd),window.removeEventListener(`touchcancel`,this.handleTouchCancel),window.removeEventListener(`resize`,this.handleResize),document.removeEventListener(`keydown`,this.handleKeyDown,!0)}componentDidUpdate(e,t){this.handleModalStateChange(t.modalState),this.UNSAFE_handleSvg(),this.handleIfZoomChanged(e.isZoomed)}};Et.defaultProps={a11yNameButtonUnzoom:`Minimize image`,a11yNameButtonZoom:`Expand image`,canSwipeToUnzoom:!0,IconUnzoom:Dt,IconZoom:Ot,isDisabled:!1,swipeToUnzoomThreshold:10,wrapElement:`div`,zoomMargin:0};function Dt(){return V.createElement(`svg`,{"aria-hidden":`true`,"data-rmiz-btn-unzoom-icon":!0,fill:`currentColor`,focusable:`false`,viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`},V.createElement(`path`,{d:`M 14.144531 1.148438 L 9 6.292969 L 9 3 L 8 3 L 8 8 L 13 8 L 13 7 L 9.707031 7 L 14.855469 1.851563 Z M 8 8 L 3 8 L 3 9 L 6.292969 9 L 1.148438 14.144531 L 1.851563 14.855469 L 7 9.707031 L 7 13 L 8 13 Z`}))}function Ot(){return V.createElement(`svg`,{"aria-hidden":`true`,"data-rmiz-btn-zoom-icon":!0,fill:`currentColor`,focusable:`false`,viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`},V.createElement(`path`,{d:`M 9 1 L 9 2 L 12.292969 2 L 2 12.292969 L 2 9 L 1 9 L 1 14 L 6 14 L 6 13 L 2.707031 13 L 13 2.707031 L 13 6 L 14 6 L 14 1 Z`}))}function kt({onZoomChange:e,...t}){let[n,r]=V.useState(!1),i=V.useCallback((t,{event:n})=>{r(t),e?.(t,{event:n})},[e]);return V.createElement(Tt,{...t,isZoomed:n,onZoomChange:i})}var At=(0,V.createContext)(null);function jt(e){return typeof e==`string`?e:typeof e==`object`?`default`in e?e.default.src:e.src:``}function Mt({zoomInProps:e,children:t,rmiz:n,caption:r,...i}){let a=(0,V.use)(At),o={src:jt(i.src),sizes:void 0,...e},s=t??(0,H.jsx)(A,{sizes:`(max-width: 768px) 100vw, (max-width: 1200px) 70vw, 900px`,...i});return a?(0,H.jsx)(`span`,{role:`button`,tabIndex:0,"aria-haspopup":`dialog`,ref:e=>{if(e)return a.register({element:e,image:{alt:i.alt,...o},caption:r??i.title})},onClick:e=>{e.target!==e.currentTarget&&a.open(e.currentTarget)},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),a.open(e.currentTarget))},className:`block outline-none [&_img]:cursor-zoom-in [&:focus-visible_img]:ring-2 [&:focus-visible_img]:ring-fd-ring`,children:s}):(0,H.jsx)(kt,{zoomMargin:20,wrapElement:`span`,...n,zoomImg:o,children:s})}function Nt({items:e,className:t,...n}){let r=O({note:`inline table of contents`});return(0,H.jsxs)(G,{...n,className:e=>j(`not-prose rounded-lg border bg-fd-card text-fd-card-foreground`,typeof t==`function`?t(e):t),children:[(0,H.jsxs)(Ye,{className:`group inline-flex w-full items-center justify-between px-4 py-2.5 font-medium`,children:[n.children??r(`Table of Contents`),(0,H.jsx)(me,{className:`size-4 transition-transform duration-200 group-data-open:rotate-180`})]}),(0,H.jsx)(Xe,{children:(0,H.jsx)(`div`,{className:`flex flex-col p-4 pt-0 text-sm text-fd-muted-foreground`,children:e.map(e=>(0,H.jsx)(`a`,{href:e.url,className:`border-s py-1.5 hover:text-fd-accent-foreground`,style:{paddingInlineStart:12*Math.max(e.depth-1,0)},children:e.title},e.url))})})]})}function Pt({children:e}){return(0,H.jsx)(`div`,{className:`fd-steps`,children:e})}function Ft({children:e}){return(0,H.jsx)(`div`,{className:`fd-step`,children:e})}var It=(0,V.createContext)(null);function Lt(){let e=(0,V.useContext)(It);if(!e)throw Error(`You must wrap your component in <Tabs>`);return e}function Rt({className:e,...t}){return(0,H.jsx)(te,{...t,className:t=>j(`flex gap-3.5 text-fd-secondary-foreground overflow-x-auto px-4 not-prose`,typeof e==`function`?e(t):e)})}function zt({className:e,...t}){return(0,H.jsx)(ee,{...t,className:t=>j(`inline-flex items-center gap-2 whitespace-nowrap text-fd-muted-foreground border-b border-transparent py-2 text-sm font-medium transition-colors [&_svg]:size-4 hover:text-fd-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[active]:border-fd-primary data-[active]:text-fd-primary`,typeof e==`function`?e(t):e)})}function Bt({ref:e,className:t,items:n,label:r,defaultIndex:i=0,defaultValue:a=n?Wt(n[i]):void 0,...o}){let s=(0,V.useMemo)(()=>[],[]);return(0,H.jsxs)(se,{ref:e,className:e=>j(`flex flex-col overflow-hidden rounded-xl border bg-fd-secondary my-4`,typeof t==`function`?t(e):t),defaultValue:a,...o,children:[n&&(0,H.jsxs)(Rt,{children:[r&&(0,H.jsx)(`span`,{className:`text-sm font-medium my-auto me-auto`,children:r}),n.map(e=>(0,H.jsx)(zt,{value:Wt(e),children:e},e))]}),(0,H.jsx)(It.Provider,{value:(0,V.useMemo)(()=>({items:n,collection:s}),[s,n]),children:o.children})]})}function Vt({value:e,...t}){let{items:n}=Lt(),r=e??n?.at(Ut());if(!r)throw Error("Failed to resolve tab `value`, please pass a `value` prop to the Tab component.");return(0,H.jsx)(Ht,{value:Wt(r),...t,children:t.children})}function Ht({value:e,className:t,...n}){return(0,H.jsx)(ie,{value:e,className:e=>j(`p-4 text-[0.9375rem] bg-fd-background rounded-xl outline-none prose-no-margin data-[inactive]:hidden [&>figure:only-child]:-m-4 [&>figure:only-child]:border-none`,typeof t==`function`?t(e):t),...n,children:n.children})}function Ut(){let e=(0,V.useId)(),{collection:t}=Lt();return(0,V.useEffect)(()=>()=>{let n=t.indexOf(e);n!==-1&&t.splice(n,1)},[e,t]),t.includes(e)||t.push(e),t.indexOf(e)}function Wt(e){return e.toLowerCase().replace(/\s/,`-`)}var Z=p(`text-fd-muted-foreground not-prose pe-2`);function Gt({id:e,type:t,className:n,...r}){let i=O({note:`type table`});return(0,H.jsxs)(`div`,{id:e,className:j(`@container flex flex-col p-1 bg-fd-card text-fd-card-foreground rounded-2xl border my-6 text-sm overflow-hidden`,n),...r,children:[(0,H.jsxs)(`div`,{className:`flex font-medium items-center px-3 py-1 not-prose text-fd-muted-foreground`,children:[(0,H.jsx)(`p`,{className:`w-1/4`,children:i(`Prop`)}),(0,H.jsx)(`p`,{className:`@max-xl:hidden`,children:i(`Type`)})]}),Object.entries(t).map(([t,n])=>(0,H.jsx)(Kt,{parentId:e,name:t,item:n},t))]})}function Kt({parentId:e,name:t,item:{parameters:n=[],description:r,required:i=!1,deprecated:a,typeDescription:o,default:s,type:c,typeDescriptionLink:l,returns:u}}){let d=O({note:`type table`}),[f,p]=(0,V.useState)(!1),m=e?`${e}-${t}`:void 0;return(0,V.useEffect)(()=>{let e=window.location.hash;m&&e&&`#${m}`===e&&p(!0)},[m]),(0,H.jsxs)(G,{id:m,open:f,onOpenChange:e=>{e&&m&&window.history.replaceState(null,``,`#${m}`),p(e)},className:j(`rounded-xl border overflow-hidden scroll-m-20 transition-all`,f?`shadow-sm bg-fd-background not-last:mb-2`:`border-transparent`),children:[(0,H.jsxs)(Ye,{className:`relative flex flex-row items-center w-full group text-start px-3 py-2 not-prose hover:bg-fd-accent`,children:[(0,H.jsxs)(`code`,{className:j(`text-fd-primary min-w-fit w-1/4 font-mono font-medium pe-2`,a&&`line-through text-fd-primary/50`),children:[t,!i&&`?`]}),l?(0,H.jsx)(re,{href:l,className:`underline @max-xl:hidden`,children:c}):(0,H.jsx)(`span`,{className:`@max-xl:hidden`,children:c}),(0,H.jsx)(me,{className:`absolute inset-e-2 size-4 text-fd-muted-foreground transition-transform group-data-[open]:rotate-180`})]}),(0,H.jsx)(Xe,{children:(0,H.jsxs)(`div`,{className:`grid grid-cols-[1fr_3fr] gap-y-4 text-sm p-3 overflow-auto fd-scroll-container border-t`,children:[(0,H.jsx)(`div`,{className:`prose prose-sm col-span-full prose-no-margin empty:hidden`,children:r}),o&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{className:j(Z()),children:d(`Type`)}),(0,H.jsx)(`p`,{className:`my-auto not-prose`,children:o})]}),s&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{className:j(Z()),children:d(`Default`)}),(0,H.jsx)(`p`,{className:`my-auto not-prose`,children:s})]}),n.length>0&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{className:j(Z()),children:d(`Parameters`)}),(0,H.jsx)(`div`,{className:`flex flex-col gap-2`,children:n.map(e=>(0,H.jsxs)(`div`,{className:`inline-flex items-center flex-wrap gap-1`,children:[(0,H.jsxs)(`p`,{className:`font-medium not-prose text-nowrap`,children:[e.name,` -`]}),(0,H.jsx)(`div`,{className:`prose prose-sm prose-no-margin`,children:e.description})]},e.name))})]}),u&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{className:j(Z()),children:d(`Returns`)}),(0,H.jsx)(`div`,{className:`my-auto prose prose-sm prose-no-margin`,children:u})]})]})})]})}var qt=(0,V.createContext)([]);function Jt(e){let t=(0,V.useContext)(qt);return(0,H.jsx)(Nt,{items:t,...e})}function Yt({code:e,title:t}){return(0,H.jsx)(L,{title:t,children:(0,H.jsx)(R,{children:(0,H.jsx)(`code`,{children:e})})})}function Xt(e){return()=>(0,H.jsx)(D,{type:`warn`,title:`<${e}> is not available here`,children:`It needs a build step or the network, so it shows on your docs site but not in the dashboard.`})}function Zt(e={}){return{...de,img:e=>(0,H.jsx)(Mt,{...e}),Callout:D,Tabs:Bt,Tab:Vt,Steps:Pt,Step:Ft,Accordions:He,Accordion:Ue,Files:Qe,File:$e,Folder:et,TypeTable:Gt,Banner:Ge,InlineTOC:Jt,DynamicCodeBlock:Yt,AutoTypeTable:Xt(`AutoTypeTable`),GithubInfo:Xt(`GithubInfo`),GraphView:Xt(`GraphView`),...e}}function Qt(e){return Function(e)({Fragment:V.Fragment,jsx:H.jsx,jsxs:H.jsxs}).default}var $t=class extends V.Component{state={};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`Docs page failed to render`,e,t.componentStack)}componentDidUpdate(e){e.reset.some((e,t)=>e!==this.props.reset[t])&&this.state.error&&this.setState({error:void 0})}render(){let{error:e}=this.state;if(!e)return this.props.children;let t=/Expected component `([^`]+)` to be defined/.exec(e.message);return(0,H.jsx)(D,{type:`error`,title:t?`<${t[1]}> is not defined`:`This page failed to render`,children:t?`Export ${t[1]} from the file named in documentation.components, or import it in the page.`:e.message})}};function en(e){document.getElementById(e)?.scrollIntoView({block:`start`})}function tn(e){let t=e.target.closest(`a`)?.getAttribute(`href`);if(!t||!t.startsWith(`#`)||t.startsWith(`#/`))return;e.preventDefault();let n=t.slice(1);try{n=decodeURIComponent(n)}catch{}en(n)}function nn(e,t){let[n,r]=(0,V.useState)();return(0,V.useEffect)(()=>{let t=e.map(e=>e.url.slice(1)),n=()=>{let e=t[0];for(let n of t){let t=document.getElementById(n);t&&t.getBoundingClientRect().top<=120&&(e=n)}r(e)};return n(),window.addEventListener(`scroll`,n,{passive:!0}),()=>window.removeEventListener(`scroll`,n)},[e,t]),n}function rn({headings:e,page:t}){let n=nn(e,t);return e.length===0?null:(0,H.jsxs)(`nav`,{"aria-label":`On this page`,className:`flex flex-col gap-0.5 text-sm`,children:[(0,H.jsx)(`div`,{className:`mb-1.5 text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:`On this page`}),e.map(e=>(0,H.jsx)(`a`,{href:e.url,onClick:tn,"aria-current":e.url.slice(1)===n?`location`:void 0,style:{paddingLeft:`${Math.max(e.depth-2,0)*12+8}px`},className:E(`rounded-md py-1 pr-2 text-muted-foreground outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 aria-[current=location]:font-medium aria-[current=location]:text-foreground`),children:e.title},e.url))]})}function an({page:e,project:t}){let n=(0,V.useMemo)(()=>Zt(t?.components),[t]),r=(0,V.useMemo)(()=>{try{return{Page:Qt(e.code)}}catch(e){return{error:e instanceof Error?e.message:String(e)}}},[e.code]);if(`error`in r)return(0,H.jsx)(D,{type:`error`,title:`This page could not run`,children:r.error});let{Page:i}=r;return(0,H.jsx)(qt.Provider,{value:e.toc,children:(0,H.jsx)($t,{reset:[e.code,n],children:(0,H.jsx)(i,{components:n})})})}function on({page:e,project:t}){return(0,H.jsxs)(`article`,{onClick:tn,className:`min-w-0`,children:[(0,H.jsx)(`h1`,{className:`text-3xl font-semibold tracking-tight`,children:e.title}),e.description&&(0,H.jsx)(`p`,{className:`mt-2 mb-8 text-base text-muted-foreground`,children:e.description}),t?.error&&(0,H.jsx)(D,{type:`warn`,title:`Your components did not load`,children:t.error}),e.error?(0,H.jsx)(D,{type:`error`,title:`${e.path} does not compile`,children:(0,H.jsx)(`pre`,{className:`font-mono text-xs whitespace-pre-wrap`,children:e.error})}):(0,H.jsx)(`div`,{className:`prose max-w-none`,children:(0,H.jsx)(an,{page:e,project:t})})]})}function sn({path:e,revision:t,project:n,onPage:r,onMissing:i}){let a=Se(e,t),o=a.status===`ready`?a.page:void 0;return(0,V.useEffect)(()=>r(o),[o,r]),(0,V.useEffect)(()=>{a.status===`missing`&&i()},[a.status,i]),a.status===`loading`||a.status===`ready`&&!n?(0,H.jsx)(w,{title:`Loading page`}):a.status===`missing`?(0,H.jsx)(w,{title:`No such page`,hint:`There is no page at /${e.join(`/`)}`}):a.status===`failed`?(0,H.jsx)(D,{type:`error`,title:`The page could not be loaded`,children:a.message}):(0,H.jsx)(on,{page:a.page,project:n})}function Q(e){return e.split(`/`).filter(Boolean)}var $=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),cn=(e,t)=>e.type===`page`?$(Q(e.url),t):e.type===`folder`?(e.index?$(Q(e.index.url),t):!1)||e.children.some(e=>cn(e,t)):!1,ln=`flex min-h-7 items-center rounded-md px-2 py-1 text-sm text-muted-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 aria-[current=page]:bg-muted aria-[current=page]:font-medium aria-[current=page]:text-foreground`;function un({node:e,current:t,depth:n}){let r=cn(e,t),[i,a]=(0,V.useState)(),o=i??(r||e.defaultOpen===!0);return(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{className:`flex items-center`,children:[e.index?(0,H.jsx)(`a`,{href:C(Q(e.index.url)),"aria-current":$(Q(e.index.url),t)?`page`:void 0,className:E(ln,`flex-1 font-medium text-foreground`),children:e.name}):(0,H.jsx)(`button`,{type:`button`,onClick:()=>a(!o),className:E(ln,`flex-1 cursor-pointer text-left font-medium text-foreground`),children:e.name}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`${o?`Collapse`:`Expand`} ${e.name}`,"aria-expanded":o,onClick:()=>a(!o),className:`grid size-7 shrink-0 cursor-pointer place-items-center rounded-md text-muted-foreground outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50`,children:(0,H.jsx)(P,{className:E(`size-3.5 transition-transform`,o&&`rotate-90`)})})]}),o&&(0,H.jsx)(`div`,{className:`ml-2 border-l pl-1.5`,children:(0,H.jsx)(dn,{nodes:e.children,current:t,depth:n+1})})]})}function dn({nodes:e,current:t,depth:n}){return(0,H.jsx)(H.Fragment,{children:e.map((e,r)=>e.type===`separator`?(0,H.jsx)(`div`,{className:`mt-4 mb-1 px-2 text-xs font-medium tracking-wide text-muted-foreground uppercase first:mt-0`,children:e.name},`separator-${r}`):e.type===`folder`?(0,H.jsx)(un,{node:e,current:t,depth:n},`folder-${e.name}-${r}`):(0,H.jsx)(`a`,{href:C(Q(e.url)),"aria-current":$(Q(e.url),t)?`page`:void 0,className:ln,children:e.name},e.url))})}function fn({nodes:e,current:t}){return(0,H.jsx)(`nav`,{"aria-label":`Docs pages`,className:`flex flex-col gap-0.5`,children:(0,H.jsx)(dn,{nodes:e,current:t,depth:0})})}function pn(e){for(let t of e){if(t.type===`page`)return Q(t.url);if(t.type===`folder`){if(t.index)return Q(t.index.url);let e=pn(t.children);if(e)return e}}}function mn({revision:e}){let[t,n]=(0,V.useState)(``),[r,i]=(0,V.useState)([]);return(0,V.useEffect)(()=>{if(!t.trim()){i([]);return}let e=new AbortController,n=setTimeout(()=>{fetch(T(t),{signal:e.signal}).then(e=>e.ok?e.json():[]).then(e=>i(e.slice(0,12)),()=>{})},150);return()=>{clearTimeout(n),e.abort()}},[t,e]),(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(pe,{className:`pointer-events-none absolute top-2.5 left-2.5 size-3.5 text-muted-foreground`}),(0,H.jsx)(x,{type:`search`,value:t,placeholder:`Search docs`,"aria-label":`Search docs`,className:`pl-8`,onChange:e=>n(e.target.value),onKeyDown:e=>{e.key===`Escape`&&n(``)}}),t.trim()&&(0,H.jsx)(`div`,{role:`listbox`,"aria-label":`Search results`,className:`absolute inset-x-0 top-full z-20 mt-1 max-h-96 overflow-y-auto rounded-lg border bg-popover p-1 text-popover-foreground shadow-md`,children:r.length===0?(0,H.jsx)(`div`,{className:`px-2 py-3 text-center text-xs text-muted-foreground`,children:`No results`}):r.map(e=>{let[t,r]=e.url.split(`#`);return(0,H.jsxs)(`a`,{role:`option`,"aria-selected":!1,href:C(Q(t??``),r),onClick:()=>n(``),className:`flex flex-col rounded-md px-2 py-1.5 text-sm outline-none hover:bg-muted focus-visible:bg-muted`,children:[(0,H.jsx)(`span`,{className:e.type===`page`?`font-medium`:`truncate`,children:e.content}),(0,H.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[e.type===`page`?`Page`:e.type===`heading`?`Heading`:`Text`,` · `,e.url]})]},e.id)})})]})}function hn({docs:e,route:t}){return e?e.status===`missing`?(0,H.jsx)(w,{title:`The docs need packages that are not installed`,hint:`Install them with: bun add -d ${e.packages.join(` `)}`}):e.status===`error`?(0,H.jsx)(w,{title:`The docs cannot be shown`,hint:e.message}):(0,H.jsx)(gn,{docs:e,route:t}):(0,H.jsx)(w,{title:`No documentation`,hint:`Set documentation: './docs' in brick() to show a folder of pages here`})}function gn({docs:e,route:t}){let n=xe(e.revision),r=Ce(e.components,e.revision),[i,a]=(0,V.useState)(),o=(0,V.useMemo)(()=>i?.toc??[],[i]),{path:s,anchor:c}=t,l=(0,V.useCallback)(()=>{if(s.length>0||!n)return;let e=pn(n.tree.children);e&&location.replace(C(e))},[s.length,n]);(0,V.useEffect)(()=>{if(!i)return;let e=()=>{let e=c?document.getElementById(c):void 0;e?e.scrollIntoView({block:`start`}):window.scrollTo(0,0)};if(e(),!c)return;let t=()=>{document.removeEventListener(`load`,e,!0),window.removeEventListener(`wheel`,t),window.removeEventListener(`touchstart`,t),window.removeEventListener(`keydown`,t),clearTimeout(n)},n=setTimeout(t,2e3);return document.addEventListener(`load`,e,!0),window.addEventListener(`wheel`,t,{passive:!0}),window.addEventListener(`touchstart`,t,{passive:!0}),window.addEventListener(`keydown`,t),t},[i?.path,c]);let u=y(`(min-width: 1024px)`),d=n?.tree.name??e.title,f=(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(mn,{revision:e.revision}),n&&(0,H.jsx)(fn,{nodes:n.tree.children,current:s})]});return(0,H.jsxs)(`div`,{className:`flex min-h-[calc(100svh-3.5rem)]`,children:[u&&(0,H.jsxs)(`aside`,{className:`sticky top-14 flex h-[calc(100svh-3.5rem)] w-64 shrink-0 flex-col gap-3 overflow-y-auto border-r p-3`,children:[(0,H.jsx)(`div`,{className:`px-1 pt-1 text-sm font-semibold`,children:d}),f]}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[!u&&(0,H.jsxs)(`details`,{className:`border-b p-3`,children:[(0,H.jsxs)(`summary`,{className:`cursor-pointer text-sm font-medium`,children:[d,`: pages and search`]}),(0,H.jsx)(`div`,{className:`mt-3 flex flex-col gap-3`,children:f})]}),(0,H.jsx)(`div`,{className:`mx-auto max-w-3xl px-6 py-10 max-sm:px-4`,children:(0,H.jsx)(sn,{path:s,revision:e.revision,project:r,onPage:a,onMissing:l})})]}),(0,H.jsx)(`aside`,{className:`sticky top-14 hidden h-[calc(100svh-3.5rem)] w-56 shrink-0 overflow-y-auto p-4 pt-10 xl:block`,children:(0,H.jsx)(rn,{headings:o,page:i?.path})})]})}export{hn as default};
|
|
4
|
+
}`})]})}function Je(e){let t=`abcdefghijklmnopqrstuvwxyz234567`,n=``,r=0,i=0;for(let a=0;a<e.length;a++)for(r=r<<8|e.charCodeAt(a),i+=8;i>=5;)i-=5,n+=t[r>>i&31];return i>0&&(n+=t[r<<5-i&31]),n}var G=ne,Ye=ce;function Xe({children:e,className:t,...n}){return(0,H.jsx)(ue,{...n,className:e=>j(`overflow-hidden [&[hidden]:not([hidden='until-found'])]:hidden h-(--collapsible-panel-height) transition-[height,opacity] data-starting-style:opacity-0 data-starting-style:h-0 data-ending-style:h-0 data-ending-style:opacity-0`,typeof t==`function`?t(e):t),children:e})}var Ze=p(`flex flex-row items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-fd-accent hover:text-fd-accent-foreground [&_svg]:size-4`);function Qe({className:e,...t}){return(0,H.jsx)(`div`,{className:j(`not-prose rounded-md border bg-fd-card p-2`,e),...t,children:t.children})}function $e({name:e,icon:t=(0,H.jsx)(k,{}),className:n,...r}){return(0,H.jsxs)(`div`,{className:j(Ze({className:n})),...r,children:[t,e]})}function et({name:e,defaultOpen:t=!1,...n}){let[r,i]=(0,V.useState)(t);return(0,H.jsxs)(G,{open:r,onOpenChange:i,...n,children:[(0,H.jsxs)(Ye,{className:j(Ze({className:`w-full`})),children:[r?(0,H.jsx)(_e,{}):(0,H.jsx)(ye,{}),e]}),(0,H.jsx)(Xe,{children:(0,H.jsx)(`div`,{className:`ms-2 flex flex-col border-l ps-2`,children:n.children})})]})}var tt=e=>{let t=`-zoom`,n=[`clip-path`,`fill`,`mask`,`marker-start`,`marker-mid`,`marker-end`],r=new Map;if(e.hasAttribute(`id`)){let{id:n}=e,i=n+t;r.set(n,i);let a=e;a.id=i}e.querySelectorAll(`[id]`).forEach(e=>{let{id:n}=e,i=n+t;r.set(n,i);let a=e;a.id=i});let i=n.map(e=>`[${e}]`).join(`, `);e.querySelectorAll(i).forEach(e=>{for(let t of n){let n=e.getAttribute(t);if(n?.startsWith(`url(#`)===!0){let i=n.slice(5,-1),a=r.get(i);a!==void 0&&e.setAttribute(t,`url(#${a})`)}}}),e.querySelectorAll(`style`).forEach(e=>{let{textContent:t}=e;if(t!==``){let n=t;if(r.forEach((e,t)=>{n=n.replaceAll(`#${t}`,`#${e}`)}),n!==t){let t=e;t.textContent=n}}})};function nt(e){return typeof Element>`u`?!1:e instanceof Element}var K=(e,t)=>nt(t)&&t.tagName.toUpperCase()===e,rt=e=>K(`DIV`,e)||K(`SPAN`,e),q=e=>K(`IMG`,e),it=e=>e.complete&&e.naturalHeight!==0,J=e=>K(`SVG`,e),at=e=>{if(e!==null)return q(e)?e.alt:e.getAttribute(`aria-label`)??void 0},ot=/url(?:\(['"]?)(?<url>.*?)(?:['"]?\))/,st=e=>{if(e!==null){if(q(e))return e.currentSrc===``?void 0:e.currentSrc;if(rt(e)){let{backgroundImage:t}=window.getComputedStyle(e);if(t!==``)return ot.exec(t)?.[1]}}},ct=e=>{if(e==null)return{};if(J(e)){let{parentElement:t}=e,n=e.getBoundingClientRect();if(t==null)return{height:n.height,left:n.left,width:n.width,top:n.top};{let e=t.getBoundingClientRect();return{height:n.height,left:e.left-n.left,top:e.top-n.top,width:n.width}}}return{height:e.offsetHeight,left:e.offsetLeft,width:e.offsetWidth,top:e.offsetTop}},lt=({height:e,offset:t,width:n})=>Math.min((window.innerWidth-t*2)/n,(window.innerHeight-t*2)/e),ut=({containerHeight:e,containerWidth:t,offset:n,targetHeight:r,targetWidth:i})=>{let a=lt({height:r,offset:n,width:i}),o=i>r?i/t:r/e;return a>1?o:a*o},dt=({containerHeight:e,containerWidth:t,hasScalableSrc:n,offset:r,targetHeight:i,targetWidth:a})=>e===0||t===0?1:!n&&i!==0&&a!==0?ut({containerHeight:e,containerWidth:t,offset:r,targetHeight:i,targetWidth:a}):lt({height:e,offset:r,width:t}),ft=({containerHeight:e,containerLeft:t,containerTop:n,containerWidth:r,hasScalableSrc:i,offset:a,targetHeight:o,targetWidth:s})=>{let c=dt({containerHeight:e,containerWidth:r,hasScalableSrc:i,offset:a,targetHeight:o,targetWidth:s});return{top:n,left:t,width:r*c,height:e*c,initialTransform:`translate(0,0) scale(${1/c})`}},Y=(e,t)=>{let n=parseFloat(e);return e.endsWith(`%`)?t*n/100:n},X=({containerHeight:e,containerLeft:t,containerTop:n,containerWidth:r,hasScalableSrc:i,offset:a,position:o,targetHeight:s,targetWidth:c,visibleHeight:l,visibleWidth:u})=>{let[d=`50%`,f=`50%`]=o.split(` `),p=Y(d,r-u),m=Y(f,e-l),h=dt({containerHeight:l,containerWidth:u,hasScalableSrc:i,offset:a,targetHeight:s,targetWidth:c});return{top:n+m,left:t+p,width:u*h,height:l*h,initialTransform:`translate(0,0) scale(${1/h})`}},pt=({containerHeight:e,containerLeft:t,containerTop:n,containerWidth:r,hasScalableSrc:i,objectFit:a,objectPosition:o,offset:s,targetHeight:c,targetWidth:l})=>{let u=a;u===`scale-down`&&(u=l<=r&&c<=e?`none`:`contain`);let d={containerHeight:e,containerLeft:t,containerTop:n,containerWidth:r,hasScalableSrc:i,offset:s,position:o,targetHeight:c,targetWidth:l};if(u===`cover`||u===`contain`){let t=r/l,n=e/c,i=u===`cover`?Math.max(t,n):Math.min(t,n);return X({...d,visibleWidth:l*i,visibleHeight:c*i})}if(u===`none`)return X({...d,visibleWidth:l,visibleHeight:c});{let a=r/l,o=e/c,u=Math.max(a,o),d=dt({containerHeight:c*u,containerWidth:l*u,hasScalableSrc:i,offset:s,targetHeight:c,targetWidth:l});return{top:n,left:t,width:r*d,height:e*d,initialTransform:`translate(0,0) scale(${1/d})`}}},mt=({backgroundPosition:e,backgroundSize:t,containerHeight:n,containerLeft:r,containerTop:i,containerWidth:a,hasScalableSrc:o,offset:s,targetHeight:c,targetWidth:l})=>{let u={containerHeight:n,containerLeft:r,containerTop:i,containerWidth:a,hasScalableSrc:o,offset:s,position:e,targetHeight:c,targetWidth:l};if(t===`cover`||t===`contain`){let e=a/l,r=n/c,i=t===`cover`?Math.max(e,r):Math.min(e,r);return X({...u,visibleWidth:l*i,visibleHeight:c*i})}if(t===`auto`)return X({...u,visibleWidth:l,visibleHeight:c});{let[e=`50%`,r=`50%`]=t.split(` `),i=Y(e,a),o=Y(r,n),s=i/l,d=o/c,f=Math.min(s,d);return X({...u,visibleWidth:l*f,visibleHeight:c*f})}},ht=({height:e,initialTransform:t,isZoomed:n,left:r,top:i,userTransform:a,width:o})=>{let s=``;if(a!==`none`&&a!==``){let t=o/2,n=e/2;s=`translate(${t}px,${n}px) ${a} translate(${-t}px,${-n}px)`}if(!n)return s===``?t:`${t} ${s}`;let c=window.innerWidth/2,l=window.innerHeight/2,u=r+o/2,d=i+e/2,f=`translate(${c-u}px,${l-d}px) scale(1)`;return s===``?f:`${f} ${s}`},gt=({fallback:e,natural:t})=>t!==void 0&&t!==0?t:e,_t=/\.svg$/i,vt=({hasZoomImg:e,imgSrc:t,isSvg:n})=>n||t?.slice(0,18)===`data:image/svg+xml`||e||t!==void 0&&_t.test(t),yt=({hasZoomImg:e,imgSrc:t,isSvg:n,isZoomed:r,loadedImgEl:i,offset:a,shouldRefresh:o,targetEl:s})=>{let c=vt({hasZoomImg:e,imgSrc:t,isSvg:n}),l=s.getBoundingClientRect(),u=window.getComputedStyle(s),d=i!=null&&rt(s),f=i!=null&&!d,p=gt({fallback:l.height,natural:i?.naturalHeight}),m=gt({fallback:l.width,natural:i?.naturalWidth}),{height:h,left:g,top:_,width:v}=l,y=d?mt({backgroundPosition:u.backgroundPosition,backgroundSize:u.backgroundSize,containerHeight:h,containerLeft:g,containerTop:_,containerWidth:v,hasScalableSrc:c,offset:a,targetHeight:p,targetWidth:m}):f?pt({containerHeight:h,containerLeft:g,containerTop:_,containerWidth:v,hasScalableSrc:c,objectFit:u.objectFit,objectPosition:u.objectPosition,offset:a,targetHeight:p,targetWidth:m}):ft({containerHeight:h,containerLeft:g,containerTop:_,containerWidth:v,hasScalableSrc:c,offset:a,targetHeight:p,targetWidth:m}),b={top:y.top,left:y.left,width:y.width,height:y.height,transform:ht({...y,isZoomed:r,userTransform:u.transform})};return r&&o&&(b.transitionDuration=`0.01ms`),b},bt=e(l()),xt=[`img`,`svg`,`[role="img"]`,`[data-zoom]`].map(e=>`${e}:not([aria-hidden="true"])`).join(`,`),St={overflow:``,width:``};function Ct(){let e=document.querySelector(`[data-rmiz-portal]`);if(e!=null)return e;let t=document.createElement(`div`);return t.setAttribute(`data-rmiz-portal`,``),document.body.appendChild(t),t}function wt(e){e.preventDefault()}function Tt(e){return V.createElement(Et,{...e})}var Et=class extends V.Component{constructor(){super(...arguments),this.state={id:``,isZoomImgLoaded:!1,loadedImgEl:void 0,modalState:`UNLOADED`,shouldRefresh:!1,styleGhost:{}},this.refContent=V.createRef(),this.refDialog=V.createRef(),this.refModalContent=V.createRef(),this.refModalImg=V.createRef(),this.refWrap=V.createRef(),this.imgEl=null,this.isScaling=!1,this.prevBodyAttrs=St,this.styleModalImg={},this.handleModalStateChange=e=>{let{state:{modalState:t}}=this;e!==`LOADING`&&t===`LOADING`?(this.isScaling=!1,this.loadZoomImg(),window.addEventListener(`resize`,this.handleResize,{passive:!0}),window.addEventListener(`touchstart`,this.handleTouchStart,{passive:!0}),window.addEventListener(`touchmove`,this.handleTouchMove,{passive:!0}),window.addEventListener(`touchend`,this.handleTouchEnd,{passive:!0}),window.addEventListener(`touchcancel`,this.handleTouchCancel,{passive:!0}),document.addEventListener(`keydown`,this.handleKeyDown,!0)):e!==`LOADED`&&t===`LOADED`?window.addEventListener(`wheel`,this.handleWheel,{passive:!0}):e!==`UNLOADING`&&t===`UNLOADING`?(this.ensureImgTransitionEnd(),window.removeEventListener(`wheel`,this.handleWheel),window.removeEventListener(`touchstart`,this.handleTouchStart),window.removeEventListener(`touchmove`,this.handleTouchMove),window.removeEventListener(`touchend`,this.handleTouchEnd),window.removeEventListener(`touchcancel`,this.handleTouchCancel),document.removeEventListener(`keydown`,this.handleKeyDown,!0)):e!==`UNLOADED`&&t===`UNLOADED`&&(this.bodyScrollEnable(),window.removeEventListener(`resize`,this.handleResize),this.refDialog.current?.close())},this.setId=()=>{let e=()=>Math.random().toString(16).slice(-4);this.setState({id:e()+e()+e()})},this.setAndTrackImg=()=>{let{refContent:{current:e}}=this;e!=null&&(this.imgEl=e.querySelector(xt),this.imgEl===null?this.contentNotFoundChangeObserver??(this.contentNotFoundChangeObserver=new MutationObserver(this.setAndTrackImg),this.contentNotFoundChangeObserver.observe(e,{childList:!0,subtree:!0})):(this.contentNotFoundChangeObserver?.disconnect(),this.imgEl.addEventListener(`load`,this.handleImgLoad),this.imgEl.addEventListener(`click`,this.handleZoom),this.state.loadedImgEl??this.handleImgLoad(),this.imgElResizeObserver=new ResizeObserver(e=>{let[t]=e;t?.target!==void 0&&(this.imgEl=t.target,this.setState({styleGhost:ct(this.imgEl)}))}),this.imgElResizeObserver.observe(this.imgEl),this.contentChangeObserver??(this.contentChangeObserver=new MutationObserver(()=>{this.setState({styleGhost:ct(this.imgEl)})}),this.contentChangeObserver.observe(e,{attributes:!0,childList:!0,subtree:!0}))))},this.handleIfZoomChanged=e=>{let{props:{isZoomed:t}}=this;!e&&t?this.zoom():e&&!t&&this.unzoom()},this.handleImgLoad=()=>{let e=st(this.imgEl);if(e==null||e===``)return;let t=new Image,{imgEl:n}=this;if(q(n)){let{sizes:e,srcset:r,crossOrigin:i}=n;t.sizes=e,t.srcset=r,t.crossOrigin=i}t.src=e;let r=()=>{this.setState({loadedImgEl:t,styleGhost:ct(this.imgEl)})};t.decode().then(r).catch(()=>{it(t)?r():t.onload=r})},this.handleZoom=e=>{this.props.isDisabled!==!0&&this.hasImage()&&this.props.onZoomChange?.(!0,{event:e})},this.handleUnzoom=e=>{this.props.isDisabled!==!0&&this.props.onZoomChange?.(!1,{event:e})},this.handleBtnUnzoomClick=e=>{e.preventDefault(),e.stopPropagation(),this.handleUnzoom(e)},this.handleDialogClick=e=>{(e.target===this.refModalContent.current||e.target===this.refModalImg.current)&&(e.stopPropagation(),this.handleUnzoom(e))},this.handleDialogClose=e=>{e.stopPropagation(),this.handleUnzoom(e)},this.handleKeyDown=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),this.handleUnzoom(e))},this.handleWheel=e=>{e.ctrlKey||this.isScaling||(window.visualViewport?.scale??1)>1||(e.stopPropagation(),queueMicrotask(()=>{this.handleUnzoom(e)}))},this.handleTouchStart=e=>{if(e.touches.length>1){this.isScaling=!0;return}let{changedTouches:t}=e,[n]=t;if(t.length===1&&n!==void 0){let{screenY:e}=n;this.touchYStart=e}},this.handleTouchMove=e=>{let t=window.visualViewport?.scale??1,{changedTouches:n}=e,[r]=n;if(this.props.canSwipeToUnzoom&&!this.isScaling&&t<=1&&this.touchYStart!=null&&r!==void 0){let{screenY:t}=r;this.touchYEnd=t;let n=Math.max(this.touchYStart,this.touchYEnd),i=Math.min(this.touchYStart,this.touchYEnd);Math.abs(n-i)>this.props.swipeToUnzoomThreshold&&(this.touchYStart=void 0,this.touchYEnd=void 0,this.handleUnzoom(e))}},this.handleTouchEnd=()=>{this.touchYStart=void 0,this.touchYEnd=void 0},this.handleTouchCancel=()=>{this.touchYStart=void 0,this.touchYEnd=void 0},this.handleResize=()=>{this.setState({shouldRefresh:!0})},this.hasImage=()=>this.imgEl!==null&&(this.state.loadedImgEl!==void 0||J(this.imgEl))&&window.getComputedStyle(this.imgEl).display!==`none`,this.zoom=()=>{this.bodyScrollDisable(),this.refDialog.current?.showModal(),this.setState({modalState:`LOADING`})},this.unzoom=()=>{this.setState({modalState:`UNLOADING`})},this.handleImgTransitionEnd=()=>{clearTimeout(this.timeoutTransitionEnd),this.state.modalState===`LOADING`?this.setState({modalState:`LOADED`}):this.state.modalState===`UNLOADING`&&this.setState({shouldRefresh:!1,modalState:`UNLOADED`})},this.ensureImgTransitionEnd=()=>{if(this.refModalImg.current!==null){let{transitionDuration:e}=window.getComputedStyle(this.refModalImg.current),t=parseFloat(e);if(t!==0&&!Number.isNaN(t)){let n=t*(e.endsWith(`ms`)?1:1e3)+50;this.timeoutTransitionEnd=setTimeout(this.handleImgTransitionEnd,n)}}},this.bodyScrollDisable=()=>{let e=document.body.style;this.prevBodyAttrs={overflow:e.overflow,width:e.width};let t=document.body.clientWidth;e.overflow=`hidden`,e.width=`${t}px`},this.bodyScrollEnable=()=>{let e=document.body.style,t=this.prevBodyAttrs;e.width=t.width,e.overflow=t.overflow,this.prevBodyAttrs=St},this.loadZoomImg=()=>{let{props:{zoomImg:e}}=this;if(e==null)return;let{src:t}=e;if(t!==void 0&&t!==``){let n=new Image;n.sizes=e.sizes??``,n.srcset=e.srcSet??``,n.crossOrigin=e.crossOrigin??void 0,n.src=t;let r=()=>{this.setState({isZoomImgLoaded:!0})};n.decode().then(r).catch(()=>{it(n)?r():n.onload=r})}},this.UNSAFE_handleSvg=()=>{let{imgEl:e,refModalImg:t,styleModalImg:n}=this;if(J(e)){let r=e.cloneNode(!0);tt(r),r.style.width=`${n.width??0}px`,r.style.height=`${n.height??0}px`,r.addEventListener(`click`,this.handleUnzoom),t.current?.firstChild?.remove(),t.current?.appendChild(r)}}}render(){let{handleBtnUnzoomClick:e,handleDialogClick:t,handleDialogClose:n,handleUnzoom:r,handleZoom:i,imgEl:a,props:{a11yNameButtonUnzoom:o,a11yNameButtonZoom:s,children:c,classDialog:l,IconUnzoom:u,IconZoom:d,wrapElement:f,ZoomContent:p,zoomImg:m,zoomMargin:h},refContent:g,refDialog:_,refModalContent:v,refModalImg:y,refWrap:b,state:{id:x,isZoomImgLoaded:S,loadedImgEl:C,modalState:w,shouldRefresh:T,styleGhost:E}}=this,D=`rmiz-modal-${x}`,O=`rmiz-modal-img-${x}`,k=rt(a),A=q(a),j=J(a),M=at(a),N=st(a),P=A?a.sizes:void 0,F=A?a.srcset:void 0,I=A?a.crossOrigin:void 0,L=m?.src!==void 0&&m.src!==``,R=this.hasImage(),ee=M!==void 0&&M!==``?`${s}: ${M}`:s,te=w===`LOADING`||w===`LOADED`,ne=R?`found`:`not-found`,re=w===`UNLOADED`||w===`UNLOADING`?`hidden`:`visible`,z={visibility:w===`UNLOADED`?`visible`:`hidden`};this.styleModalImg=R&&a!==null?yt({hasZoomImg:L,imgSrc:N,isSvg:j,isZoomed:te,loadedImgEl:C,offset:h,shouldRefresh:T,targetEl:a}):{};let B=null;if(R){let t=A||k?V.createElement(`img`,{alt:M,crossOrigin:I,sizes:P,src:N,srcSet:F,...S&&w===`LOADED`?m:{},"data-rmiz-modal-img":``,height:this.styleModalImg.height??void 0,id:O,onTransitionEnd:this.handleImgTransitionEnd,ref:y,style:this.styleModalImg,width:this.styleModalImg.width??void 0}):j?V.createElement(`div`,{"data-rmiz-modal-img":!0,onTransitionEnd:this.handleImgTransitionEnd,ref:y,style:this.styleModalImg}):null,n=V.createElement(`button`,{"aria-label":o,"data-rmiz-btn-unzoom":``,onClick:e,type:`button`},V.createElement(u,null));B=p==null?V.createElement(V.Fragment,null,t,n):V.createElement(p,{buttonUnzoom:n,modalState:w,img:t,isZoomImgLoaded:S,onUnzoom:r})}return V.createElement(f,{"data-rmiz":``,ref:b},V.createElement(f,{"data-rmiz-content":ne,ref:g,style:z},c),R&&V.createElement(f,{"data-rmiz-ghost":``,style:E},V.createElement(`button`,{"aria-label":ee,"data-rmiz-btn-zoom":``,onClick:i,type:`button`},V.createElement(d,null))),R&&bt.createPortal(V.createElement(`dialog`,{"aria-labelledby":O,"aria-modal":`true`,className:l,"data-rmiz-modal":``,id:D,onClick:t,onClose:n,onCancel:wt,ref:_,role:`dialog`},V.createElement(`div`,{"data-rmiz-modal-overlay":re}),V.createElement(`div`,{"data-rmiz-modal-content":``,ref:v},B)),Ct()))}componentDidMount(){this.setId(),this.setAndTrackImg(),this.handleImgLoad(),this.UNSAFE_handleSvg()}componentWillUnmount(){this.state.modalState!==`UNLOADED`&&this.bodyScrollEnable(),this.contentChangeObserver?.disconnect(),this.contentNotFoundChangeObserver?.disconnect(),this.imgElResizeObserver?.disconnect(),this.imgEl?.removeEventListener(`load`,this.handleImgLoad),this.imgEl?.removeEventListener(`click`,this.handleZoom),clearTimeout(this.timeoutTransitionEnd),window.removeEventListener(`wheel`,this.handleWheel),window.removeEventListener(`touchstart`,this.handleTouchStart),window.removeEventListener(`touchmove`,this.handleTouchMove),window.removeEventListener(`touchend`,this.handleTouchEnd),window.removeEventListener(`touchcancel`,this.handleTouchCancel),window.removeEventListener(`resize`,this.handleResize),document.removeEventListener(`keydown`,this.handleKeyDown,!0)}componentDidUpdate(e,t){this.handleModalStateChange(t.modalState),this.UNSAFE_handleSvg(),this.handleIfZoomChanged(e.isZoomed)}};Et.defaultProps={a11yNameButtonUnzoom:`Minimize image`,a11yNameButtonZoom:`Expand image`,canSwipeToUnzoom:!0,IconUnzoom:Dt,IconZoom:Ot,isDisabled:!1,swipeToUnzoomThreshold:10,wrapElement:`div`,zoomMargin:0};function Dt(){return V.createElement(`svg`,{"aria-hidden":`true`,"data-rmiz-btn-unzoom-icon":!0,fill:`currentColor`,focusable:`false`,viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`},V.createElement(`path`,{d:`M 14.144531 1.148438 L 9 6.292969 L 9 3 L 8 3 L 8 8 L 13 8 L 13 7 L 9.707031 7 L 14.855469 1.851563 Z M 8 8 L 3 8 L 3 9 L 6.292969 9 L 1.148438 14.144531 L 1.851563 14.855469 L 7 9.707031 L 7 13 L 8 13 Z`}))}function Ot(){return V.createElement(`svg`,{"aria-hidden":`true`,"data-rmiz-btn-zoom-icon":!0,fill:`currentColor`,focusable:`false`,viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`},V.createElement(`path`,{d:`M 9 1 L 9 2 L 12.292969 2 L 2 12.292969 L 2 9 L 1 9 L 1 14 L 6 14 L 6 13 L 2.707031 13 L 13 2.707031 L 13 6 L 14 6 L 14 1 Z`}))}function kt({onZoomChange:e,...t}){let[n,r]=V.useState(!1),i=V.useCallback((t,{event:n})=>{r(t),e?.(t,{event:n})},[e]);return V.createElement(Tt,{...t,isZoomed:n,onZoomChange:i})}var At=(0,V.createContext)(null);function jt(e){return typeof e==`string`?e:typeof e==`object`?`default`in e?e.default.src:e.src:``}function Mt({zoomInProps:e,children:t,rmiz:n,caption:r,...i}){let a=(0,V.use)(At),o={src:jt(i.src),sizes:void 0,...e},s=t??(0,H.jsx)(A,{sizes:`(max-width: 768px) 100vw, (max-width: 1200px) 70vw, 900px`,...i});return a?(0,H.jsx)(`span`,{role:`button`,tabIndex:0,"aria-haspopup":`dialog`,ref:e=>{if(e)return a.register({element:e,image:{alt:i.alt,...o},caption:r??i.title})},onClick:e=>{e.target!==e.currentTarget&&a.open(e.currentTarget)},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),a.open(e.currentTarget))},className:`block outline-none [&_img]:cursor-zoom-in [&:focus-visible_img]:ring-2 [&:focus-visible_img]:ring-fd-ring`,children:s}):(0,H.jsx)(kt,{zoomMargin:20,wrapElement:`span`,...n,zoomImg:o,children:s})}function Nt({items:e,className:t,...n}){let r=O({note:`inline table of contents`});return(0,H.jsxs)(G,{...n,className:e=>j(`not-prose rounded-lg border bg-fd-card text-fd-card-foreground`,typeof t==`function`?t(e):t),children:[(0,H.jsxs)(Ye,{className:`group inline-flex w-full items-center justify-between px-4 py-2.5 font-medium`,children:[n.children??r(`Table of Contents`),(0,H.jsx)(me,{className:`size-4 transition-transform duration-200 group-data-open:rotate-180`})]}),(0,H.jsx)(Xe,{children:(0,H.jsx)(`div`,{className:`flex flex-col p-4 pt-0 text-sm text-fd-muted-foreground`,children:e.map(e=>(0,H.jsx)(`a`,{href:e.url,className:`border-s py-1.5 hover:text-fd-accent-foreground`,style:{paddingInlineStart:12*Math.max(e.depth-1,0)},children:e.title},e.url))})})]})}function Pt({children:e}){return(0,H.jsx)(`div`,{className:`fd-steps`,children:e})}function Ft({children:e}){return(0,H.jsx)(`div`,{className:`fd-step`,children:e})}var It=(0,V.createContext)(null);function Lt(){let e=(0,V.useContext)(It);if(!e)throw Error(`You must wrap your component in <Tabs>`);return e}function Rt({className:e,...t}){return(0,H.jsx)(te,{...t,className:t=>j(`flex gap-3.5 text-fd-secondary-foreground overflow-x-auto px-4 not-prose`,typeof e==`function`?e(t):e)})}function zt({className:e,...t}){return(0,H.jsx)(ee,{...t,className:t=>j(`inline-flex items-center gap-2 whitespace-nowrap text-fd-muted-foreground border-b border-transparent py-2 text-sm font-medium transition-colors [&_svg]:size-4 hover:text-fd-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[active]:border-fd-primary data-[active]:text-fd-primary`,typeof e==`function`?e(t):e)})}function Bt({ref:e,className:t,items:n,label:r,defaultIndex:i=0,defaultValue:a=n?Wt(n[i]):void 0,...o}){let s=(0,V.useMemo)(()=>[],[]);return(0,H.jsxs)(se,{ref:e,className:e=>j(`flex flex-col overflow-hidden rounded-xl border bg-fd-secondary my-4`,typeof t==`function`?t(e):t),defaultValue:a,...o,children:[n&&(0,H.jsxs)(Rt,{children:[r&&(0,H.jsx)(`span`,{className:`text-sm font-medium my-auto me-auto`,children:r}),n.map(e=>(0,H.jsx)(zt,{value:Wt(e),children:e},e))]}),(0,H.jsx)(It.Provider,{value:(0,V.useMemo)(()=>({items:n,collection:s}),[s,n]),children:o.children})]})}function Vt({value:e,...t}){let{items:n}=Lt(),r=e??n?.at(Ut());if(!r)throw Error("Failed to resolve tab `value`, please pass a `value` prop to the Tab component.");return(0,H.jsx)(Ht,{value:Wt(r),...t,children:t.children})}function Ht({value:e,className:t,...n}){return(0,H.jsx)(ie,{value:e,className:e=>j(`p-4 text-[0.9375rem] bg-fd-background rounded-xl outline-none prose-no-margin data-[inactive]:hidden [&>figure:only-child]:-m-4 [&>figure:only-child]:border-none`,typeof t==`function`?t(e):t),...n,children:n.children})}function Ut(){let e=(0,V.useId)(),{collection:t}=Lt();return(0,V.useEffect)(()=>()=>{let n=t.indexOf(e);n!==-1&&t.splice(n,1)},[e,t]),t.includes(e)||t.push(e),t.indexOf(e)}function Wt(e){return e.toLowerCase().replace(/\s/,`-`)}var Z=p(`text-fd-muted-foreground not-prose pe-2`);function Gt({id:e,type:t,className:n,...r}){let i=O({note:`type table`});return(0,H.jsxs)(`div`,{id:e,className:j(`@container flex flex-col p-1 bg-fd-card text-fd-card-foreground rounded-2xl border my-6 text-sm overflow-hidden`,n),...r,children:[(0,H.jsxs)(`div`,{className:`flex font-medium items-center px-3 py-1 not-prose text-fd-muted-foreground`,children:[(0,H.jsx)(`p`,{className:`w-1/4`,children:i(`Prop`)}),(0,H.jsx)(`p`,{className:`@max-xl:hidden`,children:i(`Type`)})]}),Object.entries(t).map(([t,n])=>(0,H.jsx)(Kt,{parentId:e,name:t,item:n},t))]})}function Kt({parentId:e,name:t,item:{parameters:n=[],description:r,required:i=!1,deprecated:a,typeDescription:o,default:s,type:c,typeDescriptionLink:l,returns:u}}){let d=O({note:`type table`}),[f,p]=(0,V.useState)(!1),m=e?`${e}-${t}`:void 0;return(0,V.useEffect)(()=>{let e=window.location.hash;m&&e&&`#${m}`===e&&p(!0)},[m]),(0,H.jsxs)(G,{id:m,open:f,onOpenChange:e=>{e&&m&&window.history.replaceState(null,``,`#${m}`),p(e)},className:j(`rounded-xl border overflow-hidden scroll-m-20 transition-all`,f?`shadow-sm bg-fd-background not-last:mb-2`:`border-transparent`),children:[(0,H.jsxs)(Ye,{className:`relative flex flex-row items-center w-full group text-start px-3 py-2 not-prose hover:bg-fd-accent`,children:[(0,H.jsxs)(`code`,{className:j(`text-fd-primary min-w-fit w-1/4 font-mono font-medium pe-2`,a&&`line-through text-fd-primary/50`),children:[t,!i&&`?`]}),l?(0,H.jsx)(re,{href:l,className:`underline @max-xl:hidden`,children:c}):(0,H.jsx)(`span`,{className:`@max-xl:hidden`,children:c}),(0,H.jsx)(me,{className:`absolute inset-e-2 size-4 text-fd-muted-foreground transition-transform group-data-[open]:rotate-180`})]}),(0,H.jsx)(Xe,{children:(0,H.jsxs)(`div`,{className:`grid grid-cols-[1fr_3fr] gap-y-4 text-sm p-3 overflow-auto fd-scroll-container border-t`,children:[(0,H.jsx)(`div`,{className:`prose prose-sm col-span-full prose-no-margin empty:hidden`,children:r}),o&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{className:j(Z()),children:d(`Type`)}),(0,H.jsx)(`p`,{className:`my-auto not-prose`,children:o})]}),s&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{className:j(Z()),children:d(`Default`)}),(0,H.jsx)(`p`,{className:`my-auto not-prose`,children:s})]}),n.length>0&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{className:j(Z()),children:d(`Parameters`)}),(0,H.jsx)(`div`,{className:`flex flex-col gap-2`,children:n.map(e=>(0,H.jsxs)(`div`,{className:`inline-flex items-center flex-wrap gap-1`,children:[(0,H.jsxs)(`p`,{className:`font-medium not-prose text-nowrap`,children:[e.name,` -`]}),(0,H.jsx)(`div`,{className:`prose prose-sm prose-no-margin`,children:e.description})]},e.name))})]}),u&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{className:j(Z()),children:d(`Returns`)}),(0,H.jsx)(`div`,{className:`my-auto prose prose-sm prose-no-margin`,children:u})]})]})})]})}var qt=(0,V.createContext)([]);function Jt(e){let t=(0,V.useContext)(qt);return(0,H.jsx)(Nt,{items:t,...e})}function Yt({code:e,title:t}){return(0,H.jsx)(L,{title:t,children:(0,H.jsx)(R,{children:(0,H.jsx)(`code`,{children:e})})})}function Xt(e){return()=>(0,H.jsx)(D,{type:`warn`,title:`<${e}> is not available here`,children:`It needs a build step or the network, so it shows on your docs site but not in the dashboard.`})}function Zt(e={}){return{...de,img:e=>(0,H.jsx)(Mt,{...e}),Callout:D,Tabs:Bt,Tab:Vt,Steps:Pt,Step:Ft,Accordions:He,Accordion:Ue,Files:Qe,File:$e,Folder:et,TypeTable:Gt,Banner:Ge,InlineTOC:Jt,DynamicCodeBlock:Yt,AutoTypeTable:Xt(`AutoTypeTable`),GithubInfo:Xt(`GithubInfo`),GraphView:Xt(`GraphView`),...e}}function Qt(e){return Function(e)({Fragment:V.Fragment,jsx:H.jsx,jsxs:H.jsxs}).default}var $t=class extends V.Component{state={};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`Docs page failed to render`,e,t.componentStack)}componentDidUpdate(e){e.reset.some((e,t)=>e!==this.props.reset[t])&&this.state.error&&this.setState({error:void 0})}render(){let{error:e}=this.state;if(!e)return this.props.children;let t=/Expected component `([^`]+)` to be defined/.exec(e.message);return(0,H.jsx)(D,{type:`error`,title:t?`<${t[1]}> is not defined`:`This page failed to render`,children:t?`Export ${t[1]} from the file named in documentation.components, or import it in the page.`:e.message})}};function en(e){document.getElementById(e)?.scrollIntoView({block:`start`})}function tn(e){let t=e.target.closest(`a`)?.getAttribute(`href`);if(!t||!t.startsWith(`#`)||t.startsWith(`#/`))return;e.preventDefault();let n=t.slice(1);try{n=decodeURIComponent(n)}catch{}en(n)}function nn(e,t){let[n,r]=(0,V.useState)();return(0,V.useEffect)(()=>{let t=e.map(e=>e.url.slice(1)),n=()=>{let e=t[0];for(let n of t){let t=document.getElementById(n);t&&t.getBoundingClientRect().top<=120&&(e=n)}r(e)};return n(),window.addEventListener(`scroll`,n,{passive:!0}),()=>window.removeEventListener(`scroll`,n)},[e,t]),n}function rn({headings:e,page:t}){let n=nn(e,t);return e.length===0?null:(0,H.jsxs)(`nav`,{"aria-label":`On this page`,className:`flex flex-col gap-0.5 text-sm`,children:[(0,H.jsx)(`div`,{className:`mb-1.5 text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:`On this page`}),e.map(e=>(0,H.jsx)(`a`,{href:e.url,onClick:tn,"aria-current":e.url.slice(1)===n?`location`:void 0,style:{paddingLeft:`${Math.max(e.depth-2,0)*12+8}px`},className:b(`rounded-md py-1 pr-2 text-muted-foreground outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 aria-[current=location]:font-medium aria-[current=location]:text-foreground`),children:e.title},e.url))]})}function an({page:e,project:t}){let n=(0,V.useMemo)(()=>Zt(t?.components),[t]),r=(0,V.useMemo)(()=>{try{return{Page:Qt(e.code)}}catch(e){return{error:e instanceof Error?e.message:String(e)}}},[e.code]);if(`error`in r)return(0,H.jsx)(D,{type:`error`,title:`This page could not run`,children:r.error});let{Page:i}=r;return(0,H.jsx)(qt.Provider,{value:e.toc,children:(0,H.jsx)($t,{reset:[e.code,n],children:(0,H.jsx)(i,{components:n})})})}function on({page:e,project:t}){return(0,H.jsxs)(`article`,{onClick:tn,className:`min-w-0`,children:[(0,H.jsx)(`h1`,{className:`text-3xl font-semibold tracking-tight`,children:e.title}),e.description&&(0,H.jsx)(`p`,{className:`mt-2 mb-8 text-base text-muted-foreground`,children:e.description}),t?.error&&(0,H.jsx)(D,{type:`warn`,title:`Your components did not load`,children:t.error}),e.error?(0,H.jsx)(D,{type:`error`,title:`${e.path} does not compile`,children:(0,H.jsx)(`pre`,{className:`font-mono text-xs whitespace-pre-wrap`,children:e.error})}):(0,H.jsx)(`div`,{className:`prose max-w-none`,children:(0,H.jsx)(an,{page:e,project:t})})]})}function sn({path:e,revision:t,project:n,onPage:r,onMissing:i}){let a=Se(e,t),o=a.status===`ready`?a.page:void 0;return(0,V.useEffect)(()=>r(o),[o,r]),(0,V.useEffect)(()=>{a.status===`missing`&&i()},[a.status,i]),a.status===`loading`||a.status===`ready`&&!n?(0,H.jsx)(w,{title:`Loading page`}):a.status===`missing`?(0,H.jsx)(w,{title:`No such page`,hint:`There is no page at /${e.join(`/`)}`}):a.status===`failed`?(0,H.jsx)(D,{type:`error`,title:`The page could not be loaded`,children:a.message}):(0,H.jsx)(on,{page:a.page,project:n})}function Q(e){return e.split(`/`).filter(Boolean)}var $=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),cn=(e,t)=>e.type===`page`?$(Q(e.url),t):e.type===`folder`?(e.index?$(Q(e.index.url),t):!1)||e.children.some(e=>cn(e,t)):!1,ln=`flex min-h-7 items-center rounded-md px-2 py-1 text-sm text-muted-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 aria-[current=page]:bg-muted aria-[current=page]:font-medium aria-[current=page]:text-foreground`;function un({node:e,current:t,depth:n}){let r=cn(e,t),[i,a]=(0,V.useState)(),o=i??(r||e.defaultOpen===!0);return(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{className:`flex items-center`,children:[e.index?(0,H.jsx)(`a`,{href:x(Q(e.index.url)),"aria-current":$(Q(e.index.url),t)?`page`:void 0,className:b(ln,`flex-1 font-medium text-foreground`),children:e.name}):(0,H.jsx)(`button`,{type:`button`,onClick:()=>a(!o),className:b(ln,`flex-1 cursor-pointer text-left font-medium text-foreground`),children:e.name}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`${o?`Collapse`:`Expand`} ${e.name}`,"aria-expanded":o,onClick:()=>a(!o),className:`grid size-7 shrink-0 cursor-pointer place-items-center rounded-md text-muted-foreground outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50`,children:(0,H.jsx)(P,{className:b(`size-3.5 transition-transform`,o&&`rotate-90`)})})]}),o&&(0,H.jsx)(`div`,{className:`ml-2 border-l pl-1.5`,children:(0,H.jsx)(dn,{nodes:e.children,current:t,depth:n+1})})]})}function dn({nodes:e,current:t,depth:n}){return(0,H.jsx)(H.Fragment,{children:e.map((e,r)=>e.type===`separator`?(0,H.jsx)(`div`,{className:`mt-4 mb-1 px-2 text-xs font-medium tracking-wide text-muted-foreground uppercase first:mt-0`,children:e.name},`separator-${r}`):e.type===`folder`?(0,H.jsx)(un,{node:e,current:t,depth:n},`folder-${e.name}-${r}`):(0,H.jsx)(`a`,{href:x(Q(e.url)),"aria-current":$(Q(e.url),t)?`page`:void 0,className:ln,children:e.name},e.url))})}function fn({nodes:e,current:t}){return(0,H.jsx)(`nav`,{"aria-label":`Docs pages`,className:`flex flex-col gap-0.5`,children:(0,H.jsx)(dn,{nodes:e,current:t,depth:0})})}function pn(e){for(let t of e){if(t.type===`page`)return Q(t.url);if(t.type===`folder`){if(t.index)return Q(t.index.url);let e=pn(t.children);if(e)return e}}}function mn({revision:e}){let[t,n]=(0,V.useState)(``),[r,i]=(0,V.useState)([]);return(0,V.useEffect)(()=>{if(!t.trim()){i([]);return}let e=new AbortController,n=setTimeout(()=>{fetch(E(t),{signal:e.signal}).then(e=>e.ok?e.json():[]).then(e=>i(e.slice(0,12)),()=>{})},150);return()=>{clearTimeout(n),e.abort()}},[t,e]),(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(pe,{className:`pointer-events-none absolute top-2.5 left-2.5 size-3.5 text-muted-foreground`}),(0,H.jsx)(S,{type:`search`,value:t,placeholder:`Search docs`,"aria-label":`Search docs`,className:`pl-8`,onChange:e=>n(e.target.value),onKeyDown:e=>{e.key===`Escape`&&n(``)}}),t.trim()&&(0,H.jsx)(`div`,{role:`listbox`,"aria-label":`Search results`,className:`absolute inset-x-0 top-full z-20 mt-1 max-h-96 overflow-y-auto rounded-lg border bg-popover p-1 text-popover-foreground shadow-md`,children:r.length===0?(0,H.jsx)(`div`,{className:`px-2 py-3 text-center text-xs text-muted-foreground`,children:`No results`}):r.map(e=>{let[t,r]=e.url.split(`#`);return(0,H.jsxs)(`a`,{role:`option`,"aria-selected":!1,href:x(Q(t??``),r),onClick:()=>n(``),className:`flex flex-col rounded-md px-2 py-1.5 text-sm outline-none hover:bg-muted focus-visible:bg-muted`,children:[(0,H.jsx)(`span`,{className:e.type===`page`?`font-medium`:`truncate`,children:e.content}),(0,H.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[e.type===`page`?`Page`:e.type===`heading`?`Heading`:`Text`,` · `,e.url]})]},e.id)})})]})}function hn({docs:e,route:t}){return e?e.status===`missing`?(0,H.jsx)(w,{title:`The docs need packages that are not installed`,hint:`Install them with: bun add -d ${e.packages.join(` `)}`}):e.status===`error`?(0,H.jsx)(w,{title:`The docs cannot be shown`,hint:e.message}):(0,H.jsx)(gn,{docs:e,route:t}):(0,H.jsx)(w,{title:`No documentation`,hint:`Set documentation: './docs' in brick() to show a folder of pages here`})}function gn({docs:e,route:t}){let n=xe(e.revision),r=Ce(e.components,e.revision),[i,a]=(0,V.useState)(),o=(0,V.useMemo)(()=>i?.toc??[],[i]),{path:s,anchor:c}=t,l=(0,V.useCallback)(()=>{if(s.length>0||!n)return;let e=pn(n.tree.children);e&&location.replace(x(e))},[s.length,n]);(0,V.useEffect)(()=>{if(!i)return;let e=()=>{let e=c?document.getElementById(c):void 0;e?e.scrollIntoView({block:`start`}):window.scrollTo(0,0)};if(e(),!c)return;let t=()=>{document.removeEventListener(`load`,e,!0),window.removeEventListener(`wheel`,t),window.removeEventListener(`touchstart`,t),window.removeEventListener(`keydown`,t),clearTimeout(n)},n=setTimeout(t,2e3);return document.addEventListener(`load`,e,!0),window.addEventListener(`wheel`,t,{passive:!0}),window.addEventListener(`touchstart`,t,{passive:!0}),window.addEventListener(`keydown`,t),t},[i?.path,c]);let u=y(`(min-width: 1024px)`),d=n?.tree.name??e.title,f=(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(mn,{revision:e.revision}),n&&(0,H.jsx)(fn,{nodes:n.tree.children,current:s})]});return(0,H.jsxs)(`div`,{className:`flex min-h-[calc(100svh-3.5rem)]`,children:[u&&(0,H.jsxs)(`aside`,{className:`sticky top-14 flex h-[calc(100svh-3.5rem)] w-64 shrink-0 flex-col gap-3 overflow-y-auto border-r p-3`,children:[(0,H.jsx)(`div`,{className:`px-1 pt-1 text-sm font-semibold`,children:d}),f]}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[!u&&(0,H.jsxs)(`details`,{className:`border-b p-3`,children:[(0,H.jsxs)(`summary`,{className:`cursor-pointer text-sm font-medium`,children:[d,`: pages and search`]}),(0,H.jsx)(`div`,{className:`mt-3 flex flex-col gap-3`,children:f})]}),(0,H.jsx)(`div`,{className:`mx-auto max-w-3xl px-6 py-10 max-sm:px-4`,children:(0,H.jsx)(sn,{path:s,revision:e.revision,project:r,onPage:a,onMissing:l})})]}),(0,H.jsx)(`aside`,{className:`sticky top-14 hidden h-[calc(100svh-3.5rem)] w-56 shrink-0 overflow-y-auto p-4 pt-10 xl:block`,children:(0,H.jsx)(rn,{headings:o,page:i?.path})})]})}export{hn as default};
|
package/dashboard-dist/kit.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{Ct as Badge,xt as Button,S as Card,C as CardAction,w as CardContent,T as CardDescription,E as CardFooter,D as CardHeader,O as CardTitle,o as Checkbox,k as Empty,b as Input,yt as Kbd,bt as KbdGroup,i as Metric,A as PageHeader,x as Panel,t as Popover,n as PopoverContent,r as PopoverTrigger,vt as Separator,a as SparkBars,s as Table,c as TableBody,l as TableCaption,u as TableCell,d as TableFooter,f as TableHead,p as TableHeader,m as TableRow,_ as Toggle,h as ToggleGroup,g as ToggleGroupItem,pt as Tooltip,mt as TooltipContent,ht as TooltipProvider,gt as TooltipTrigger,I as appFetch,wt as badgeVariants,St as buttonVariants,Tt as cn,L as createAppClient,U as defineDashboard,v as toggleVariants,z as useAppFetch,B as useAppQuery,V as useArchitecture,H as useRequests}from"./popover-CKxhB1QI.js";
|