1 line
63 KiB
JavaScript
1 line
63 KiB
JavaScript
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1283],{3586:(e,t,r)=>{"use strict";r.d(t,{C:()=>m,J:()=>u});var n=r(13368),s=r(5772),i=r(7620),a=r(24578),o=r(25316);let l=(0,o.createServerReference)("408eee4ac3d79d94417304c41179663415f055b2fc",o.callServer,void 0,o.findSourceMapURL,"streamAIChatResponse");var c=r(62574);let d=n.v(e=>({state:{opened:!1,responseId:null,messages:[],followUpSuggestions:[],loading:!1,error:!1},setState:t=>e(e=>({state:{...e.state,...t(e.state)}}))}));function u(){return n.P(d,e=>e.state)}function m(){let e=function(){let e=function(){let e=(0,c.aP)();return i.useMemo(()=>({location:e?{spaceId:e.spaceId,pageId:e.pageId}:void 0}),[e])}(),t=i.useRef(e);return i.useEffect(()=>{t.current=e},[e]),t}(),t=n.P(d,e=>e.setState),r=(0,a.jt)();return i.useMemo(()=>({open:()=>t(e=>({...e,opened:!0})),close:()=>t(e=>({...e,opened:!1})),clear:()=>t(e=>({opened:e.opened,loading:!1,messages:[],followUpSuggestions:[],responseId:null,error:!1})),postMessage:async n=>{r({type:"ask_question",query:n.message}),t(e=>({...e,messages:[...e.messages,{role:s.W7.User,content:n.message},{role:s.W7.Assistant,content:null}],followUpSuggestions:[],loading:!0,error:!1}));try{var i;for await(let r of(await l({message:n.message,messageContext:e.current,previousResponseId:null!=(i=d.getState().state.responseId)?i:void 0}))){if(!r)continue;let e=r.event;switch(e.type){case"response_finish":t(t=>({...t,responseId:e.responseId,loading:!1,error:!1}));break;case"response_followup_suggestion":t(t=>({...t,followUpSuggestions:[...t.followUpSuggestions,...e.suggestions]}))}t(e=>({...e,messages:[...e.messages.slice(0,-1),{role:s.W7.Assistant,content:r.content}]}))}t(e=>({...e,loading:!1,error:!1}))}catch(e){t(e=>({...e,loading:!1,error:!0}))}}}),[e,t,r])}},4093:(e,t,r)=>{"use strict";r.r(t),r.d(t,{DropdownButton:()=>u,DropdownChevron:()=>d,DropdownMenu:()=>c,DropdownMenuItem:()=>m,DropdownSubMenu:()=>h});var n=r(54568),s=r(86424),i=r(7620),a=r(98743),o=r(6878),l=r(54217);function c(e){let{button:t,children:r,className:s,openOnHover:l=!1}=e,[c,d]=(0,i.useState)(!1),[u,m]=(0,i.useState)(!1);return(0,n.jsxs)(o.bL,{modal:!1,open:l?u||c:u,onOpenChange:m,children:[(0,n.jsx)(o.l9,{asChild:!0,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:()=>l?m(!u):null,className:"group/dropdown",children:t}),(0,n.jsx)(o.ZL,{children:(0,n.jsx)(o.UC,{"data-testid":"dropdown-menu",hideWhenDetached:!0,collisionPadding:8,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),align:"start",className:"z-40 animate-scaleIn pt-2",children:(0,n.jsx)("div",{className:(0,a.P)("flex max-h-80 min-w-40 max-w-[40vw] flex-col gap-1 overflow-auto rounded-lg straight-corners:rounded-sm bg-tint-base p-2 shadow-lg ring-1 ring-tint-subtle sm:min-w-52 sm:max-w-80",s),children:r})})})]})}function d(){return(0,n.jsx)(s.In,{icon:"chevron-down",className:(0,a.P)("shrink-0","opacity-6","size-3","ms-1","transition-all","group-hover/dropdown:opacity-11","group-data-[state=open]/dropdown:opacity-11","group-data-[state=open]/dropdown:rotate-180")})}function u(e){let{children:t,className:r}=e;return(0,n.jsxs)("div",{className:(0,a.P)("group/dropdown","flex","items-center",r),children:[t,(0,n.jsx)(d,{})]})}function m(e){let{children:t,active:r=!1,href:s,className:i,insights:c,...d}=e,u=(0,a.P)("rounded straight-corners:rounded-sm px-3 py-1 text-sm flex gap-2 items-center",r?"bg-primary text-primary-strong data-[highlighted]:bg-primary-hover":"data-[highlighted]:bg-tint-hover","focus:outline-none",e.disabled?"opacity-7 cursor-not-allowed":"cursor-pointer",i);return s?(0,n.jsx)(o.q7,{...d,asChild:!0,children:(0,n.jsx)(l.N_,{href:s,insights:c,className:u,children:t})}):(0,n.jsx)(o.q7,{...d,className:(0,a.P)("px-3 py-1",u,i),children:t})}function h(e){let{children:t,label:r}=e;return(0,n.jsxs)(o.Pb,{children:[(0,n.jsxs)(o.ZP,{className:"flex cursor-pointer items-center justify-between rounded straight-corners:rounded-sm px-3 py-1 text-sm focus:outline-none data-[highlighted]:bg-tint-hover",children:[r,(0,n.jsx)(s.In,{icon:"chevron-right",className:"size-3 shrink-0 opacity-6"})]}),(0,n.jsx)(o.ZL,{children:(0,n.jsx)(o.G5,{hideWhenDetached:!0,collisionPadding:8,className:"z-40 animate-present",children:(0,n.jsx)("div",{className:"flex max-h-80 min-w-40 max-w-[40vw] flex-col gap-1 overflow-auto rounded-lg straight-corners:rounded-sm bg-tint-base p-2 shadow-lg ring-1 ring-tint-subtle sm:min-w-52 sm:max-w-80",children:t})})})]})}},4788:(e,t,r)=>{"use strict";r.d(t,{K:()=>o,SpaceLayoutContextProvider:()=>a});var n=r(54568),s=r(7620);let i=s.createContext({basePath:""});function a(e){let{basePath:t,children:r}=e,a=s.useMemo(()=>({basePath:t}),[t]);return(0,n.jsx)(i.Provider,{value:a,children:r})}function o(){let e=s.useContext(i);if(!e)throw Error("SpaceLayoutContext not found");return e.basePath}},9873:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SearchButton:()=>d});var n=r(54568),s=r(86424),i=r(7620),a=r(88118),o=r(98743),l=r(24578),c=r(99428);function d(e){let{style:t,children:r}=e,i=(0,a.ok)(),[,d]=(0,c.S)(),m=(0,l.jt)();return(0,n.jsxs)("button",{type:"button",onClick:()=>{d({ask:!1,global:!1,query:""}),m({type:"search_open"})},"aria-label":(0,a.si)(i,"search"),className:(0,o.P)("flex","flex-1","flex-row","justify-center","items-center","w-full","py-2.5","md:py-2","px-3","circular-corners:px-4","gap-2","bg-tint-base","ring-1","ring-tint-12/2","depth-flat:ring-tint-subtle","shadow-sm","shadow-tint-12/3","dark:shadow-none","depth-flat:shadow-none","text-tint","rounded-lg","straight-corners:rounded-sm","circular-corners:rounded-full","contrast-more:ring-tint-12","contrast-more:text-tint-strong","transition-all","hover:bg-tint-subtle","hover:shadow-md","hover:scale-102","depth-flat:hover:scale-100","hover:ring-tint-hover","hover:text-tint-strong","focus:shadow-md","focus:scale-102","depth-flat:focus:scale-100","focus:ring-tint-hover","focus:text-tint-strong","contrast-more:hover:ring-2","contrast-more:hover:ring-tint-12","contrast-more:focus:ring-2","contrast-more:focus:ring-tint-12","active:shadow-sm","active:scale-100","md:justify-start","md:w-full","text-sm",t),children:[(0,n.jsx)(s.In,{icon:"magnifying-glass",className:(0,o.P)("text-tint-subtle","shrink-0","size-4")}),(0,n.jsx)("div",{className:(0,o.P)("w-full","hidden","md:block","text-left"),children:r}),(0,n.jsx)(u,{})]})}function u(){let[e,t]=(0,i.useState)(null);return(0,i.useEffect)(()=>{t(function(){let e=navigator.platform.toLowerCase();return e.includes("mac")?"mac":(e.includes("win"),"win")}())},[]),(0,n.jsxs)("div",{"aria-busy":null===e?"true":void 0,className:(0,o.P)('shortcut -mr-1 hidden justify-end gap-0.5 whitespace-nowrap text-tint text-xs [font-feature-settings:"calt",_"case"] contrast-more:text-tint-strong md:flex',e?"motion-safe:animate-fadeIn motion-reduce:opacity-100":"opacity-0"),children:[(0,n.jsx)("kbd",{className:"flex h-5 min-w-5 items-center justify-center rounded border border-tint-subtle theme-bold:border-header-link/5 bg-tint-base theme-bold:bg-header-background px-1 ".concat("mac"===e?"text-sm":""),children:"mac"===e?"⌘":"Ctrl"}),(0,n.jsx)("kbd",{className:"flex size-5 items-center justify-center rounded border border-tint-subtle theme-bold:border-header-link/5 bg-tint-base theme-bold:bg-header-background",children:"K"})]})}},10092:(e,t,r)=>{"use strict";r.d(t,{HeaderMobileMenu:()=>u});var n=r(54568),s=r(86424),i=r(62942),a=r(7620),o=r(88118),l=r(98743),c=r(40965);let d="navigation-open";function u(e){let t=(0,o.ok)(),r=(0,i.usePathname)(),u=(0,a.useRef)(!1),m=(0,a.useRef)(window);return(0,c.F)(()=>{u.current=window.scrollY>=320},m),(0,a.useEffect)(()=>{document.body.classList.remove(d)},[r]),(0,n.jsx)("button",{...e,"aria-label":(0,o.si)(t,"table_of_contents_button_label"),onClick:()=>{!u.current&&document.body.classList.contains(d)?document.body.classList.remove(d):(document.body.classList.add(d),window.scrollTo(0,0))},className:(0,l.P)("flex flex-row items-center rounded straight-corners:rounded-sm px-2 py-1",e.className),children:(0,n.jsx)(s.In,{icon:"bars",className:"size-4 text-inherit"})})}},11631:()=>{},12632:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SiteSectionGroupItem:()=>p,SiteSectionList:()=>m,SiteSectionListItem:()=>h});var n=r(54568),s=r(86424),i=r(28427),a=r(7620),o=r(98743),l=r(29578),c=r(62574),d=r(54217),u=r(85820);function m(e){let{sections:{list:t,current:r},className:s}=e;return t.length>0&&(0,n.jsx)("nav",{"aria-label":"Sections",className:(0,o.P)("-mx-5 before:contents[] relative border-tint-subtle border-b from-transparent sidebar-filled:to-tint-subtle theme-muted:to-tint-subtle to-tint-base text-sm text-tint before:pointer-events-none before:absolute before:right-2 before:bottom-0 before:left-0 before:h-12 before:bg-gradient-to-b [html.sidebar-filled.theme-bold.tint_&]:to-tint-base [html.sidebar-filled.theme-bold.tint_&]:to-tint-subtle [html.sidebar-filled.theme-muted_&]:to-tint-base",s),children:(0,n.jsx)(l.TOCScrollContainer,{style:{maxHeight:"".concat(17,"rem")},className:"gutter-stable overflow-y-auto px-2 pb-6",children:t.map(e=>"site-section-group"===e.object?(0,n.jsx)(p,{group:e,currentSection:r},e.id):(0,n.jsx)(h,{section:e,isActive:e.id===r.id},e.id))})})}function h(e){let{section:t,isActive:r,className:s,...i}=e,m=(0,c.aq)();a.useEffect(()=>{},[m]);let h=a.createRef();return(0,l.useScrollToActiveTOCItem)({anchorRef:h,isActive:r}),(0,n.jsxs)(d.N_,{ref:h,href:t.url,"aria-current":r&&"page",className:(0,o.P)("group/section-link","flex","flex-row","items-center","gap-3","rounded-md","straight-corners:rounded-none","circular-corners:rounded-xl","px-3","py-2","transition-all","hover:bg-tint-hover","hover:text-tint-strong","contrast-more:hover:ring-1","contrast-more:hover:ring-tint",r?"font-semibold text-primary-subtle hover:bg-primary-hover hover:text-primary contrast-more:text-primary contrast-more:hover:text-primary-strong contrast-more:hover:ring-1 contrast-more:hover:ring-primary-hover":null,s),...i,children:[(0,n.jsx)("div",{className:(0,o.P)("flex size-8 shrink-0 items-center justify-center rounded-md straight-corners:rounded-none bg-tint-subtle text-lg text-tint leading-none shadow-sm shadow-tint ring-1 ring-tint-subtle transition-transform group-hover/section-link:scale-110 group-hover/section-link:ring-tint-hover group-active/section-link:scale-90 group-active/section-link:shadow-none contrast-more:text-tint-strong dark:shadow-none",r?"bg-primary tint:bg-primary-solid text-primary-subtle tint:text-contrast-primary-solid shadow-md shadow-primary ring-primary group-hover/section-link:ring-primary-hover, contrast-more:text-primary contrast-more:ring-2 contrast-more:ring-primary":null),children:t.icon?(0,n.jsx)(u.D,{icon:t.icon,isActive:r}):(0,n.jsx)("span",{className:"text-sm opacity-8 ".concat(r&&"opacity-10"),children:t.title.substring(0,2)})}),t.title]})}function p(e){let{group:t,currentSection:r}=e,i=t.sections.length>0,l=t.sections.some(e=>e.id===r.id),c=i&&l,[d,m]=a.useState(c);return a.useEffect(()=>{c&&m(c)},[c]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),m(e=>!e)},className:"group/section-link flex w-full flex-row items-center gap-3 rounded-md straight-corners:rounded-none px-3 py-2 text-left transition-all hover:bg-tint-hover hover:text-tint-strong contrast-more:hover:ring-1 contrast-more:hover:ring-tint ".concat(l?"font-semibold text-primary hover:bg-primary-hover hover:text-primary-strong contrast-more:text-primary-strong contrast-more:hover:ring-1 contrast-more:hover:ring-primary-hover":null),children:[(0,n.jsx)("div",{className:(0,o.P)("flex size-8 shrink-0 items-center justify-center rounded-md straight-corners:rounded-none bg-tint-subtle text-lg text-tint leading-none shadow-sm shadow-tint ring-1 ring-tint-subtle transition-transform group-hover/section-link:scale-110 group-hover/section-link:ring-tint-hover group-active/section-link:scale-90 group-active/section-link:shadow-none contrast-more:text-tint-strong dark:shadow-none",l?"bg-primary tint:bg-primary-solid text-primary tint:text-contrast-primary-solid shadow-md shadow-primary ring-primary group-hover/section-link:ring-primary-hover, contrast-more:text-primary-strong contrast-more:ring-2 contrast-more:ring-primary":null),children:t.icon?(0,n.jsx)(u.D,{icon:t.icon,isActive:l}):(0,n.jsx)("span",{className:"text-sm opacity-8 ".concat(l&&"opacity-10"),children:t.title.substring(0,2)})}),t.title,(0,n.jsx)("span",{className:(0,o.P)("ml-auto","group","relative","rounded-full","straight-corners:rounded-sm","w-5","h-5","after:grid-area-1-1","after:absolute","after:-top-1","after:grid","after:-left-1","after:w-7","after:h-7","hover:bg-tint-active","hover:text-current",l&&"hover:bg-tint-hover"),children:(0,n.jsx)(s.In,{icon:"chevron-right",className:(0,o.P)("grid","flex-shrink-0","size-3","m-1","transition-[opacity]","text-current","transition-transform","opacity-6","group-hover:opacity-11","contrast-more:opacity-11",d?"rotate-90":"rotate-0")})})]}),i?(0,n.jsx)(f,{isVisible:d,children:t.sections.map(e=>(0,n.jsx)(h,{section:e,isActive:e.id===r.id,className:"pl-5"},e.id))}):null]})}function f(e){let{isVisible:t,children:r}=e,{show:s,hide:a,scope:o}=(0,c.E6)(t);return(0,n.jsx)(i.P.div,{ref:o,className:t?void 0:"[&_ul>li]:opacity-1",initial:t?s:a,children:r})}},14105:(e,t,r)=>{"use strict";r.d(t,{ClientContexts:()=>a});var n=r(54568),s=r(21752),i=r(54217);function a(e){let{children:t,forcedTheme:r,externalLinksTarget:a}=e,o=e.nonce?"":e.nonce;return(0,n.jsx)(s.N,{nonce:o,attribute:"class",enableSystem:!0,forcedTheme:r,children:(0,n.jsx)(i.PA.Provider,{value:{externalLinksTarget:a},children:t})})}},14250:(e,t,r)=>{"use strict";r.d(t,{TableOfContentsScript:()=>s});var n=r(7620);function s(){return(0,n.useEffect)(()=>{let e=document.documentElement,t=()=>{var t;let r=document.getElementById("site-header"),n=document.getElementById("announcement-banner"),s=document.getElementById("site-footer"),i=null!=(t=null==r?void 0:r.offsetHeight)?t:0;e.style.setProperty("--toc-top-offset","".concat(i,"px"));let a=window.innerHeight-i;if(n&&"none"!==window.getComputedStyle(n).display){let e=n.getBoundingClientRect();e.height>0&&e.bottom>0&&(a-=Math.min(e.height,e.bottom))}if(s){let e=s.getBoundingClientRect();e.top<window.innerHeight&&(a-=Math.min(e.height,window.innerHeight-e.top))}e.style.setProperty("--toc-height","".concat(a,"px"))};t(),window.addEventListener("scroll",t,{passive:!0}),window.addEventListener("resize",t,{passive:!0});let r=new MutationObserver(()=>{requestAnimationFrame(t)});return r.observe(document.documentElement,{subtree:!0,attributes:!0,attributeFilter:["style","class"]}),()=>{r.disconnect(),window.removeEventListener("scroll",t),window.removeEventListener("resize",t)}},[]),null}},18440:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PagesList:()=>_});var n=r(54568),s=r(98743),i=r(64824),a=r(5772),o=r(86424),l=r(54217);function c(e){let{page:t,style:r}=e;return t.emoji?(0,n.jsx)(l.zT,{code:t.emoji,style:[r,"text-inherit"]}):t.icon?(0,n.jsx)(o.In,{icon:t.icon,className:(0,s.P)("size-[1em]",r)}):void 0}function d(e){let{page:t}=e;return(0,n.jsx)(c,{page:t,style:(0,s.P)("text-base","[.toclink_&]:text-tint-strong/6","group-aria-current-page/toclink:text-primary-subtle","contrast-more:group-aria-current-page/toclink:text-primary",t.emoji?"":["theme-gradient:bg-gradient-to-b","theme-bold:bg-gradient-to-b","theme-gradient:bg-fixed","theme-bold:bg-fixed","no-tint:from-primary-7","no-tint:to-primary-10","tint:from-tint-7","tint:to-tint-10","group-aria-current-page/toclink:bg-none"],"shrink-0")})}var u=r(28427),m=r(7620),h=r(62574),p=r(29578);function f(e){let{href:t,children:r,descendants:s,pathnames:i,insights:a}=e,o=(0,h.Zq)(),l=i.some(e=>e===o),c=l||i.some(e=>o.startsWith("".concat(e,"/"))),[d,u]=m.useState(c),p=(0,m.useRef)(!1);m.useEffect(()=>{c&&!p.current&&u(c)},[c]);let f=e=>{p.current=!0,u(e)};return s?(0,n.jsx)(g,{descendants:s,isOpen:d,setIsOpen:f,children:e=>{let{descendants:s,toggler:i}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(x,{href:t,insights:a,isActive:l,onActiveClick:()=>f(!d),children:[r,i]}),s]})}}):(0,n.jsx)(x,{href:t,insights:a,isActive:l,children:r})}function x(e){let{isActive:t,href:r,insights:s,children:i,onActiveClick:a}=e,o=(0,m.useRef)(null);return(0,p.useScrollToActiveTOCItem)({anchorRef:o,isActive:t}),(0,n.jsx)(l.N_,{ref:o,href:r,insights:s,"aria-current":t?"page":void 0,classNames:["ToggleableLinkItemStyles",...t?["ToggleableLinkItemActiveStyles"]:[]],onClick:e=>{t&&a&&(e.preventDefault(),a())},children:i})}function g(e){let{descendants:t,isOpen:r,setIsOpen:s}=e;return e.children({toggler:(0,n.jsx)(b,{isLinkActive:r,isOpen:r,onToggle:()=>{s(e=>!e)}}),descendants:(0,n.jsx)(j,{isVisible:r,children:t})})}function b(e){let{isLinkActive:t,isOpen:r,onToggle:i}=e;return(0,n.jsx)("span",{className:(0,s.P)("group","relative","rounded-full","straight-corners:rounded-sm","w-5","h-5","after:grid-area-1-1","after:absolute","after:-top-1","after:grid","after:-left-1","after:w-7","after:h-7","hover:bg-tint-active","hover:text-current",t&&"hover:bg-tint-hover"),onClick:e=>{e.preventDefault(),e.stopPropagation(),i()},children:(0,n.jsx)(o.In,{icon:"chevron-right",className:(0,s.P)("m-1 grid size-3 flex-shrink-0 text-current opacity-6 transition","group-hover:opacity-11 contrast-more:opacity-11",r?"rotate-90":"rotate-0")})})}let v={opacity:1,height:"auto"},y={opacity:0,height:0,transitionEnd:{display:"none"}};function j(e){let{isVisible:t,children:r}=e;return(0,n.jsx)(u.P.div,{className:"overflow-hidden",animate:t?v:y,initial:t?v:y,children:r})}function w(e){var t;let{page:r}=e;return(0,n.jsx)("li",{className:"flex flex-col",children:(0,n.jsx)(f,{href:null!=(t=r.href)?t:"#",pathnames:r.pathnames,insights:{type:"link_click",link:{target:{kind:"page",page:r.id},position:a.QB.Sidebar}},descendants:r.descendants&&r.descendants.length>0?(0,n.jsx)(_,{pages:r.descendants,style:(0,s.P)("ml-5","my-2","border-tint-subtle","sidebar-list-default:border-l","sidebar-list-line:border-l")}):null,children:r.emoji||r.icon?(0,n.jsxs)("span",{className:"flex items-center gap-3",children:[(0,n.jsx)(d,{page:r}),r.title]}):r.title})})}function k(e){let{page:t}=e;return(0,n.jsxs)("li",{className:"group/page-group-item flex flex-col",children:[(0,n.jsxs)("div",{className:(0,s.P)("-top-5 group-first/page-group-item:-mt-5 sticky z-[1] flex items-center gap-3 px-3 pt-6","font-semibold text-xs uppercase tracking-wide","pb-3","-mb-1.5","[mask-image:linear-gradient(rgba(0,0,0,1)_70%,rgba(0,0,0,0))]","bg-tint-base","sidebar-filled:bg-tint-subtle","theme-muted:bg-tint-subtle","[html.sidebar-filled.theme-bold.tint_&]:bg-tint-subtle","[html.sidebar-filled.theme-muted_&]:bg-tint-base","[html.sidebar-filled.theme-bold.tint_&]:bg-tint-base","[html.sidebar-default.theme-gradient_&]:bg-gradient-primary","[html.sidebar-default.theme-gradient.tint_&]:bg-gradient-tint"),children:[(0,n.jsx)(d,{page:t}),t.title]}),t.descendants&&t.descendants.length>0?(0,n.jsx)(_,{pages:t.descendants}):null]})}function N(e){var t;let{page:r}=e;return(0,n.jsx)("li",{className:(0,s.P)("flex","flex-col"),children:(0,n.jsxs)(l.N_,{href:null!=(t=r.href)?t:"#",classNames:["PageLinkItemStyles"],insights:{type:"link_click",link:{target:r.target,position:a.QB.Sidebar}},children:[(0,n.jsx)(d,{page:r}),r.title,(0,n.jsx)(o.In,{icon:"arrow-up-right-from-square",className:(0,s.P)("size-3","mr-1","mt-1","place-self-start","shrink-0","text-current","transition-colors","[&>path]:transition-opacity","[&>path]:opacity-[0.4]","group-hover:[&>path]:opacity-11")})]})})}function _(e){let{pages:t,style:r}=e;return(0,n.jsx)("ul",{className:(0,s.P)("flex flex-col gap-y-0.5",r),children:t.map(e=>{switch(e.type){case"document":return(0,n.jsx)(w,{page:e},e.id);case"link":return(0,n.jsx)(N,{page:e},e.id);case"group":return(0,n.jsx)(k,{page:e},e.id);default:(0,i.Ay)(e)}})})}},20416:(e,t,r)=>{"use strict";r.d(t,{Toolbar:()=>i,ToolbarBody:()=>a,ToolbarButton:()=>l,ToolbarButtonGroups:()=>o});var n=r(54568),s=r(98743);function i(e){let{children:t}=e;return(0,n.jsx)("div",{className:(0,s.P)("flex","flex-row","items-center","gap-4","text-sm","px-4","py-1","rounded-full","truncate","text-tint-1","dark:text-tint-12"),children:t})}function a(e){return(0,n.jsx)("div",{className:"flex flex-col gap-1",children:e.children})}function o(e){return(0,n.jsx)("div",{className:"flex flex-row gap-2",children:e.children})}function l(e){let{children:t,...r}=e;return(0,n.jsx)("a",{...r,className:(0,s.P)("flex","flex-col","items-center","justify-center","size-11","gap-1","text-sm","rounded-full","truncate","text-tint-1","dark:text-tint-12","hover:bg-tint-12","dark:hover:bg-tint-1","hover:shadow-lg","cursor-pointer"),children:t})}},22399:(e,t,r)=>{"use strict";r.r(t),r.d(t,{LoadIntegrations:()=>s});var n=r(7620);function s(){return n.useEffect(()=>{!function(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];((null==(t=window.GitBook)?void 0:t.events.get(e))||[]).forEach(e=>e(...n))}("load")},[]),null}window.GitBook={events:new Map,addEventListener:(e,t)=>{var r,n,s;let i=null!=(s=null==(r=window.GitBook)?void 0:r.events.get(e))?s:[];i.push(t),null==(n=window.GitBook)||n.events.set(e,i)},removeEventListener:(e,t)=>{var r,n;let s=null!=(n=null==(r=window.GitBook)?void 0:r.events.get(e))?n:[],i=s.indexOf(t);-1!==i&&s.splice(i,1)}}},29578:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TOCScrollContainer:()=>o,useScrollToActiveTOCItem:()=>l});var n=r(54568),s=r(7620),i=r(5047);let a=s.createContext(null);function o(e){let t=(0,s.useRef)(null),r=(0,s.useRef)([]),i=(0,s.useCallback)(e=>t.current?(e(t.current),()=>{}):(r.current.push(e),()=>{r.current=r.current.filter(t=>t!==e)}),[]),o=(0,s.useMemo)(()=>({getContainer:i}),[i]);return(0,s.useEffect)(()=>{let e=t.current;if(e)return r.current.forEach(t=>t(e)),()=>{r.current=[]}},[]),(0,n.jsx)(a.Provider,{value:o,children:(0,n.jsx)("div",{ref:t,"data-testid":"toc-scroll-container",...e})})}function l(e){let{isActive:t,anchorRef:r}=e,{getContainer:n}=function(){let e=s.useContext(a);return(0,i.assert)(e),e}();(0,s.useEffect)(()=>{let e=r.current;if(t&&e)return n(t=>{(function(e,t){let r=e.offsetTop,n=t.scrollTop,s=n+t.clientHeight;return r<n+100||r>s-100})(e,t)&&t.scrollTo({top:e.offsetTop-100})})},[t,n,r])}},30711:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ThemeToggler:()=>c});var n=r(54568),s=r(86424),i=r(21752),a=r(7620),o=r(88118),l=r(98743);function c(){let e=(0,o.ok)(),[t,r]=a.useState(!1),{theme:s,setTheme:l}=(0,i.D)();a.useEffect(()=>{r(!0)},[]);let c=e=>{l(e)};return(0,n.jsxs)("div",{role:"radiogroup",className:"flex flex-row gap-2",children:[(0,n.jsx)(d,{active:t&&"light"===s,icon:"sun-bright",onClick:()=>c("light"),title:(0,o.si)(e,"switch_to_light_theme")}),(0,n.jsx)(d,{active:t&&"system"===s,icon:"desktop",onClick:()=>c("system"),title:(0,o.si)(e,"switch_to_system_theme")}),(0,n.jsx)(d,{active:t&&"dark"===s,icon:"moon",onClick:()=>c("dark"),title:(0,o.si)(e,"switch_to_dark_theme")})]})}function d(e){let{icon:t,onClick:r,title:i,active:a}=e;return(0,n.jsx)("button",{type:"button",role:"radio",onClick:r,"aria-label":i,title:i,"aria-checked":a,className:(0,l.P)("p-2","rounded","straight-corners:rounded-none","circular-corners:rounded-full","transition-all","text-tint","contrast-more:text-tint-strong","hover:bg-tint-hover","contrast-more:hover:ring-2","contrast-more:focus:ring-2","ring-tint",a&&["bg-primary","theme-muted:bg-primary-hover","[html.sidebar-filled.theme-bold.tint_&]:bg-primary-hover","hover:bg-primary","text-primary-strong","contrast-more:text-primary-strong","contrast-more:ring-1","ring-primary"]),children:(0,n.jsx)(s.In,{icon:t,className:(0,l.P)("size-4")})})}},39839:()=>{},45786:e=>{e.exports={containerHeaderlinks:"headerLinks_containerHeaderlinks__GUgiv",linkEllipsis:"headerLinks_linkEllipsis__Z01IN"}},46745:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SearchModal:()=>B});var n=r(54568),s=r(86424),i=r(98337),a=r(28427),o=r(62942),l=r(7620),c=r(58541),d=r(88118),u=r(98743),m=r(22159),h=r(65938),p=r(54217),f=r(96021),x=r(24578);let g=(0,l.createContext)(void 0);function b(e){let{children:t,value:r}=e;return(0,n.jsx)(g.Provider,{value:r,children:t})}var v=r(25316);let y=(0,v.createServerReference)("4034b5dbc1de5d472ba2b51d0e5c565d9a96c5df4a",v.callServer,void 0,v.findSourceMapURL,"streamAskQuestion");var j=r(99428);function w(e){let{query:t}=e,r=(0,d.ok)(),s=(0,x.jt)(),[,i]=(0,j.S)(),[a,o]=function(){let e=(0,l.useContext)(g);if(!e)throw Error("SearchAskContext is not available");return e}();l.useEffect(()=>{let e=!1;return o({type:"loading"}),(async()=>{s({type:"ask_question",query:t}),i(e=>e?{...e,query:t,ask:!0}:null);let{stream:r}=await y({question:t});for await(let t of(0,h.S7)(r)){if(e)return;t&&o({type:"answer",answer:t})}})().catch(()=>{e||o({type:"error"})}),()=>{e=!0}},[t,o,i,s]),l.useEffect(()=>()=>{o(null)},[o]);let c=(0,n.jsx)("div",{className:(0,u.P)("w-full","flex","items-center","justify-center"),children:(0,n.jsx)(p.Rh,{className:(0,u.P)("w-6","py-8","text-primary-subtle")})});return(0,n.jsxs)("div",{className:(0,u.P)("max-h-[60vh]","overflow-y-auto"),children:[(null==a?void 0:a.type)==="answer"?(0,n.jsx)(l.Suspense,{fallback:c,children:(0,n.jsx)(k,{answer:a.answer,placeholder:c})}):null,(null==a?void 0:a.type)==="error"?(0,n.jsx)("div",{className:(0,u.P)("p-4"),children:(0,f.t)(r,"search_ask_error")}):null,(null==a?void 0:a.type)==="loading"?c:null]})}function k(e){let{answer:t,placeholder:r}=e,[s,i]=l.useState(null),[a,o]=l.useTransition();return l.useEffect(()=>{o(()=>{i(t)})},[t]),s?(0,n.jsx)("div",{className:(0,u.P)("w-full"),children:(0,n.jsx)(N,{answer:s})}):(0,n.jsx)(n.Fragment,{children:r})}function N(e){var t;let{answer:r}=e,s=(0,d.ok)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{"data-testid":"search-ask-answer",className:(0,u.P)("my-4","sm:mt-6","px-4","sm:px-12","text-tint-strong"),children:[null!=(t=r.body)?t:(0,f.t)(s,"search_ask_no_answer"),r.followupQuestions.length>0?(0,n.jsx)(_,{followupQuestions:r.followupQuestions}):null]}),r.sources.length>0?(0,n.jsx)(P,{sources:r.sources,language:s,hasAnswer:!!r.body}):null]})}function _(e){let{followupQuestions:t}=e,r=(0,j.I)();return(0,n.jsx)("div",{className:(0,u.P)("flex","flex-col","flex-wrap","mt-4","sm:mt-6"),children:t.map(e=>(0,n.jsxs)(p.N_,{className:(0,u.P)("flex","items-center","gap-2","px-4","-mx-4","py-2","rounded","straight-corners:rounded-none","circular-corners:rounded-full","text-tint","hover:bg-tint-hover","focus-within:bg-tint-hover"),...r({query:e,ask:!0}),children:[(0,n.jsx)(s.In,{icon:"magnifying-glass",className:(0,u.P)("size-4","shrink-0","mr-2","text-tint-subtle")}),(0,n.jsx)("span",{children:e})]},e))})}function P(e){let{sources:t,language:r,hasAnswer:i}=e;return(0,n.jsxs)("div",{className:(0,u.P)("flex","flex-wrap","gap-2","mt-4","sm:mt-6","py-4","px-4","border-t","border-subtle"),children:[(0,n.jsx)("span",{children:(0,f.t)(r,i?"search_ask_sources":"search_ask_sources_no_answer")}),t.map(e=>(0,n.jsx)("span",{className:(0,u.P)(),children:(0,n.jsxs)(p.N_,{className:(0,u.P)("flex","flex-wrap","gap-1","items-center","text-tint","hover:underline","links-accent:decoration-[3px]","links-accent:underline-offset-4","focus-within:text-primary"),href:e.href,children:[(0,n.jsx)(s.In,{icon:"arrow-up-right",className:(0,u.P)("text-tint-subtle","size-4","shrink-0")}),e.title]})},e.id))]})}var C=r(64824);function S(e){var t;let{query:r,text:s,highlight:i=["text-bold","bg-primary","text-contrast-primary","px-0.5","-mx-0.5","py-0.5","rounded","straight-corners:rounded-sm","group-[.is-active]:bg-primary-active","group-[.is-active]:text-contrast-primary-active"]}=e,a=(t=s,r.toLowerCase().split(" ").reduce((e,t)=>{var r,n;return r=e,n=t,r.reduce((e,t)=>{if(t.match)return e.push(t),e;let{text:r}=t,s=r.toLowerCase().indexOf(n);if(s>=0){let t=r.slice(0,s),i=r.slice(s,s+n.length),a=r.slice(s+n.length);return t.length>0&&e.push({text:t}),i.length>0&&e.push({text:i,match:n}),a.length>0&&e.push({text:a}),e}return e.push({text:r}),e},[])},[{text:t}]));return(0,n.jsx)("span",{className:(0,u.P)("whitespace-break-spaces"),children:a.map((e,t)=>(0,n.jsx)("span",{className:(0,u.P)(e.match?i:null),children:e.text},t))})}let I=l.forwardRef(function(e,t){var r,i;let{query:a,item:o,active:l}=e,c=null!=(i=null==(r=o.breadcrumbs)?void 0:r.map(e=>(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[e.icon?(0,n.jsx)(s.In,{className:"size-3",icon:e.icon}):null,e.label]},e.label)))?i:[];return(0,n.jsxs)(p.N_,{ref:t,href:o.href,className:(0,u.P)("flex","gap-4","flex-row","items-center","p-4","border-t","border-tint-subtle","first:border-none","text-base","font-medium","hover:bg-tint-hover","group",l?["is-active","bg-primary","text-contrast-primary","hover:bg-primary-hover"]:null),insights:{type:"search_open_result",query:a,result:{pageId:o.pageId,spaceId:o.spaceId}},children:[(0,n.jsx)("div",{className:"size-4",children:(0,n.jsx)(s.In,{icon:"file-lines",className:(0,u.P)("size-4",l?"text-primary":"text-tint-subtle")})}),(0,n.jsxs)("div",{className:(0,u.P)("flex","flex-col","w-full"),children:[c.length>0?(0,n.jsx)("div",{className:(0,u.P)("text-xs","opacity-6","contrast-more:opacity-11","font-normal","uppercase","tracking-wider","mb-1","flex","flex-wrap","gap-x-2","gap-y-1","items-center"),children:(c.length>3?[...c.slice(0,2),(0,n.jsx)(s.In,{icon:"ellipsis-h",className:"size-3"},"ellipsis"),...c.slice(-1)]:c).map((e,t)=>(0,n.jsxs)(n.Fragment,{children:[0!==t?(0,n.jsx)(s.In,{icon:"chevron-right",className:"size-3"},"".concat(e.key,"-icon")):null,(0,n.jsx)("span",{className:"line-clamp-1",children:e},e.key)]}))}):null,(0,n.jsx)(S,{query:a,text:o.title})]}),(0,n.jsx)("div",{className:(0,u.P)("p-2","rounded","straight-corners:rounded-none","circular-corners:rounded-full",l?["bg-primary-solid","text-contrast-primary-solid"]:["opacity-6"]),children:(0,n.jsx)(s.In,{icon:l?"arrow-turn-down-left":"chevron-right",className:(0,u.P)("size-4")})})]})});var z=r(3586);let L=l.forwardRef(function(e,t){let{question:r,recommended:i=!1,active:a,onClick:o,withAIChat:l}=e,c=(0,d.ok)(),m=(0,j.I)(),h=(0,z.C)(),[,f]=(0,j.S)();return(0,n.jsxs)(p.N_,{ref:t,onClick:()=>{l?(h.open(),h.postMessage({message:r}),f(null)):o()},"data-testid":"search-result-item",className:(0,u.P)("flex","px-4",i?["py-2","text-tint"]:"py-4","hover:bg-tint-hover","first:mt-0","last:pb-3",a&&["is-active","bg-primary","text-contrast-primary","hover:bg-primary-hover"]),...l?{href:"#"}:m({ask:!0,query:r}),children:[(0,n.jsx)(s.In,{icon:i?"search":"sparkles",className:(0,u.P)("size-4","shrink-0","mt-1.5","mr-4",a?["text-primary"]:["text-tint-subtle"])}),(0,n.jsx)("div",{className:"w-full",children:i?r:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"font-medium",children:(0,d.t)(c,"search_ask",[r])}),(0,n.jsx)("div",{className:(0,u.P)("text-sm","text-tint"),children:(0,d.t)(c,"search_ask_description")})]})}),(0,n.jsx)("div",{className:(0,u.P)("p-2","rounded","self-center","straight-corners:rounded-none","circular-corners:rounded-full",a?["bg-primary-solid","text-contrast-primary-solid"]:["opacity-6"]),children:(0,n.jsx)(s.In,{icon:a?"arrow-turn-down-left":"chevron-right",className:(0,u.P)("size-4")})})]})}),R=l.forwardRef(function(e,t){let{query:r,item:i,active:a}=e;return(0,n.jsxs)(p.N_,{ref:t,href:i.href,className:(0,u.P)("[&:has(+:not(&))]:mb-6","flex","items-center","pl-6","sm:pl-12","pr-4","text-tint","hover:bg-tint-hover","font-normal","py-2","group",a&&["is-active","bg-primary","text-contrast-primary","hover:bg-primary-hover"]),insights:{type:"search_open_result",query:r,result:{pageId:i.pageId,spaceId:i.spaceId}},children:[(0,n.jsxs)("div",{className:(0,u.P)("border-l-2","px-4","py-1","flex","flex-1","overflow-hidden","flex-col","border-tint-subtle"),children:[i.title?(0,n.jsx)("p",{className:(0,u.P)("text-base","mb-2"),children:(0,n.jsx)(S,{query:r,text:i.title})}):null,i.body?function(e,t){let r=e.toLocaleLowerCase().indexOf(t.toLocaleLowerCase());return(0,n.jsx)("p",{className:(0,u.P)("text-sm","line-clamp-3","relative"),children:(0,n.jsx)(S,{query:t,text:r<20?e:"...".concat(e.slice(r-10))})})}(i.body,r):null]}),(0,n.jsx)("div",{className:(0,u.P)("p-2","rounded","straight-corners:rounded-none","circular-corners:rounded-full","bg-primary-solid","text-contrast-primary-solid","hidden","sm:block",a?["opacity-11","block"]:["opacity-0"]),children:(0,n.jsx)(s.In,{icon:"arrow-turn-down-left",className:(0,u.P)("size-4")})})]})}),E=(0,v.createServerReference)("00a14f0414df1bf5ec0740617a9d57265ba1153a78",v.callServer,void 0,v.findSourceMapURL,"streamRecommendedQuestions"),q=(0,v.createServerReference)("40e3aad6fe488d90d982b772e6cdff292f0fa24405",v.callServer,void 0,v.findSourceMapURL,"searchAllSiteContent"),M=(0,v.createServerReference)("406501bb452c53a1d439732f93e7663b39082f03f5",v.callServer,void 0,v.findSourceMapURL,"searchSiteSpaceContent"),A=null,D=l.forwardRef(function(e,t){let{children:r,query:s,withAsk:i,withAIChat:a,global:o,onSwitchToAsk:c}=e,m=(0,d.ok)(),f=(0,x.jt)(),[g,b]=l.useState({results:[],fetching:!0}),[v,y]=l.useState(null),j=l.useRef([]);l.useEffect(()=>{if(!s){if(!i)return void b({results:[],fetching:!1});if(A)return void b({results:A,fetching:!1});let e=!1;b({results:[],fetching:!1});let t=new Set,r=[],n=setTimeout(async()=>{if(e)return;let n=await E();for await(let s of(0,h.S7)(n.stream)){if(!s)continue;let{question:n}=s;!t.has(n)&&(t.add(n),r.push({type:"recommended-question",id:n,question:n}),A=r,e||b({results:[...r],fetching:!1}))}},100);return()=>{e=!0,clearTimeout(n)}}b(e=>({results:e.results,fetching:!0}));let e=!1,t=setTimeout(async()=>{let t=await (o?q(s):M(s));if(!e){if(!t)return void b({results:[],fetching:!1});b({results:t,fetching:!1}),f({type:"search_type_query",query:s})}},350);return()=>{e=!0,clearTimeout(t)}},[s,o,i,f]);let w=l.useMemo(()=>i?function(e,t){let r=e.filter(e=>"question"!==e.type);return 0===t.length?r:[{type:"question",id:"question",query:t},...null!=r?r:[]]}(g.results,s):g.results,[g.results,s,i]);l.useEffect(()=>{s?w.length>0&&y(0):y(null)},[w,s]),l.useEffect(()=>{var e;null!==v&&j.current[v]&&(null==(e=j.current[v])||e.scrollIntoView({block:"nearest",inline:"nearest"}))},[v,j]);let k=l.useCallback(e=>{y(t=>null===t?0:Math.max(Math.min(t+e,w.length-1),0))},[w]),N=l.useCallback(()=>{var e;null!==v&&j.current[v]&&(null==(e=j.current[v])||e.click())},[v,j]);if(l.useImperativeHandle(t,()=>({moveUp:()=>{k(-1)},moveDown:()=>{k(1)},select:N}),[k,N]),g.fetching)return(0,n.jsx)("div",{className:(0,u.P)("flex","items-center","justify-center","py-8"),children:(0,n.jsx)(p.Rh,{className:(0,u.P)("w-6","text-primary")})});let _=(0,n.jsx)("div",{className:(0,u.P)("text","text-tint","p-8","text-center"),children:(0,d.t)(m,"search_no_results_for",s)});return(0,n.jsxs)("div",{className:(0,u.P)("overflow-auto"),children:[r,0===w.length?s?_:null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{"data-testid":"search-results",children:w.map((e,t)=>{switch(e.type){case"page":return(0,n.jsx)(I,{ref:e=>{j.current[t]=e},query:s,item:e,active:t===v},e.id);case"question":return(0,n.jsx)(L,{ref:e=>{j.current[t]=e},withAIChat:a,question:s,active:t===v,onClick:c},e.id);case"recommended-question":return(0,n.jsx)(L,{ref:e=>{j.current[t]=e},withAIChat:a,question:e.question,active:t===v,onClick:c,recommended:!0},e.id);case"section":return(0,n.jsx)(R,{ref:e=>{j.current[t]=e},query:s,item:e,active:t===v},e.id);default:(0,C.Ay)(e)}})}),!w.some(e=>"question"!==e.type)&&_]})]})});function T(e){let{spaceTitle:t}=e,[r,s]=(0,j.S)(),i=(0,d.ok)();return r?(0,n.jsxs)("div",{role:"toolbar","aria-orientation":"horizontal",className:(0,u.P)("flex","flex-row","mr-4"),children:[(0,n.jsx)(U,{active:!r.global,onClick:()=>{s({...r,global:!1})},children:(0,d.t)(i,"search_scope_space",t)}),(0,n.jsx)(U,{active:r.global,onClick:()=>{s({...r,global:!0})},children:(0,d.t)(i,"search_scope_all")})]}):null}function U(e){let{onClick:t,children:r,active:s}=e;return(0,n.jsx)("button",{role:"tab",type:"button","aria-selected":s,onClick:t,className:(0,u.P)("text-sm","transition-colors","px-3","py-2","border-b-2","whitespace-pre","-mb-[1px]",s?["text-primary","border-primary"]:["border-transparent"]),children:r})}function B(e){let[t,r]=(0,j.S)(),s=function(){let[e,t]=(0,l.useState)(null);return(0,l.useMemo)(()=>[e,t],[e])}(),[d]=s,h=(0,o.useRouter)();(0,c.vC)("mod+k",e=>{e.preventDefault(),r({ask:!1,query:"",global:!1})},[]);let p=null!==t;l.useEffect(()=>(p&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="auto"}),[p]);let f=async e=>{await r(null),e&&h.push(e)};return(0,n.jsx)(b,{value:s,children:(0,n.jsx)(i.N,{children:null!==t?(0,n.jsx)(a.P.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,delay:.1},role:"dialog",className:(0,u.P)("fixed","inset-0","bg-tint-12/4","dark:bg-tint-1/6","backdrop-blur-2xl","z-50","px-4","pt-4","md:pt-[min(8vh,6rem)]"),onClick:()=>{f()},children:(0,n.jsxs)("div",{className:"scroll-nojump",children:[(0,n.jsx)(i.N,{children:(null==d?void 0:d.type)==="loading"?(0,n.jsx)(a.P.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:1},className:(0,u.P)("w-screen","h-screen","fixed","inset-0","z-10","pointer-events-none"),children:(0,n.jsx)(m.R,{gridStyle:["h-screen","aspect-auto","top-[-30%]"],pulse:!0,tile:96,style:["grid"]})},"loading"):null}),(0,n.jsx)(O,{...e,state:t,setSearchState:r,onClose:f})]})}):null})})}function O(e){let{spaceTitle:t,withAsk:r,withAIChat:i,isMultiVariants:o,state:c,setSearchState:m,onClose:h}=e,p=(0,d.ok)(),f=l.useRef(null),x=l.useRef(null);l.useEffect(()=>{var e;null==(e=x.current)||e.focus()},[]),l.useEffect(()=>{let e=e=>{"Escape"===e.key&&h()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[h]);let g=c.query.trim();return(0,n.jsxs)(a.P.div,{transition:{duration:.2,delay:.1,ease:"easeOut"},initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},role:"dialog","aria-label":(0,d.si)(p,"search"),className:(0,u.P)("z-40","relative","flex","flex-col","bg-tint-base","max-w-prose","mx-auto","max-h-[70dvh]","w-full","rounded-lg","straight-corners:rounded-sm","circular-corners:rounded-2xl","ring-1","ring-tint","shadow-2xl","depth-flat:shadow-none","overflow-hidden","dark:ring-inset","dark:ring-tint"),onClick:e=>{e.stopPropagation()},children:[(0,n.jsxs)("div",{className:(0,u.P)("flex","flex-row","items-start",null!==c.query?"border-b":null,"border-tint-subtle"),children:[(0,n.jsx)("div",{className:(0,u.P)("p-2","pl-4","pt-4"),children:(0,n.jsx)(s.In,{icon:"magnifying-glass",className:(0,u.P)("size-4","text-tint-subtle")})}),(0,n.jsxs)("div",{className:(0,u.P)("w-full","flex","flex-row","flex-wrap","gap-y-0","gap-x-4","items-end"),children:[(0,n.jsx)("input",{ref:x,value:c.query,onKeyDown:e=>{var t,r,n;"ArrowUp"===e.key?(e.preventDefault(),null==(t=f.current)||t.moveUp()):"ArrowDown"===e.key?(e.preventDefault(),null==(r=f.current)||r.moveDown()):"Enter"===e.key&&(e.preventDefault(),null==(n=f.current)||n.select())},onChange:e=>{m({ask:!1,query:e.target.value,global:c.global})},className:(0,u.P)("text-tint-strong","placeholder:text-tint","flex","resize-none","flex-1","h-12","p-2","focus:outline-none","bg-transparent","whitespace-pre-line"),placeholder:(0,d.si)(p,r?"search_ask_input_placeholder":"search_input_placeholder"),spellCheck:"false",autoComplete:"off",autoCorrect:"off"}),o?(0,n.jsx)(T,{spaceTitle:t}):null]})]}),c.ask&&r?null:(0,n.jsx)(D,{ref:f,global:o&&c.global,query:g,withAsk:r,withAIChat:i,onSwitchToAsk:()=>{m(e=>e?{...e,ask:!0}:null)}}),g&&c.ask&&r?(0,n.jsx)(w,{query:g}):null]})}},48990:(e,t,r)=>{"use strict";r.d(t,{SpacesDropdownMenuItems:()=>l});var n=r(54568),s=r(31417),i=r(62574),a=r(4093);function o(e){let{variantSpace:t,active:r,currentSpacePath:o}=e,l=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=(0,i.Zq)();if(!r&&n.startsWith("".concat(t,"/")))return e;if(URL.canParse(e)){let t=new URL(e);return t.pathname=(0,s.uJ)(t.pathname,n),t.searchParams.set("fallback","true"),t.toString()}return"".concat((0,s.uJ)(e,n),"?fallback=true")}(t.url,o,r);return(0,n.jsx)(a.DropdownMenuItem,{href:l,active:r,children:t.title},t.id)}function l(e){let{slimSpaces:t,curPath:r}=e;return(0,n.jsx)(n.Fragment,{children:t.map(e=>(0,n.jsx)(o,{variantSpace:e,active:e.isActive,currentSpacePath:r},e.id))})}},50636:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CookiesToast:()=>u});var n=r(54568),s=r(86424),i=r(7620),a=r(54217),o=r(88118),l=r(96021),c=r(98743),d=r(24578);function u(e){let{privacyPolicy:t="https://policies.gitbook.com/privacy/cookies"}=e,[r,u]=i.useState(!1),m=(0,o.ok)();if(i.useEffect(()=>{u(void 0===(0,d.$7)())},[]),!r)return null;let h=e=>{(0,d.nC)(e),window.location.reload()},p="cookies-description";return(0,n.jsxs)("div",{role:"dialog","data-testid":"cookies-dialog","aria-modal":"true","aria-label":(0,l.s)(m,"cookies_title"),"aria-describedby":p,className:(0,c.P)("fixed","z-10","bg-tint-base","rounded","straight-corners:rounded-none","circular-corners:rounded-2xl","ring-1","ring-tint-subtle","shadow-1xs","depth-flat:shadow-none","p-4","pr-8","bottom-4","right-4","left-16","max-w-md","text-balance","sm:left-auto","lg:chat-open:mr-80","xl:chat-open:mr-[25rem]","transition-all","duration-300"),children:[(0,n.jsx)("p",{id:p,className:(0,c.P)("text-sm"),children:(0,l.t)(m,"cookies_prompt",(0,n.jsx)(a.ah,{href:t,children:(0,l.t)(m,"cookies_prompt_privacy")}))}),(0,n.jsx)("button",{type:"button",onClick:()=>u(!1),"aria-label":(0,l.s)(m,"close"),className:(0,c.P)("absolute","top-3","right-3","w-6","h-6","flex","justify-center","items-center","rounded-sm","circular-corners:rounded-full","hover:bg-tint-hover"),title:(0,l.s)(m,"close"),children:(0,n.jsx)(s.In,{icon:"xmark",className:(0,c.P)("size-4")})}),(0,n.jsxs)("div",{className:(0,c.P)("mt-3","flex","flex-row","gap-2"),children:[(0,n.jsx)(a.$n,{variant:"primary",size:"small","aria-label":(0,l.s)(m,"cookies_accept"),onClick:()=>{h(!0)},label:(0,l.s)(m,"cookies_accept")}),(0,n.jsx)(a.$n,{variant:"secondary",size:"small","aria-label":(0,l.s)(m,"cookies_reject"),onClick:()=>{h(!1)},label:(0,l.s)(m,"cookies_reject")})]})]})}},55392:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SiteSectionTabs:()=>d});var n=r(54568),s=r(86424),i=r(63034),a=r(7620),o=r(54217),l=r(98743),c=r(85820);function d(e){let{sections:{list:t,current:r}}=e,[s,o]=a.useState(),[l,c]=a.useState(null),d=a.useRef(null),h=function(e,t){var r,n;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=document.documentElement.clientWidth,o=0-(null!=(n=null==(r=d.current)?void 0:r.offsetLeft)?n:0)+-12;if(a<768)c(o+16);else if(e&&s===t){let t=o+(null==e?void 0:e.getBoundingClientRect().left);c(Math.min(o+a-(i<4?256:496)-16,Math.max(o+16,t)))}else s||c(null)};return t.length>0?(0,n.jsxs)(i.bL,{"aria-label":"Sections",id:"sections",onValueChange:o,className:"z-10 flex w-full flex-nowrap items-center",children:[(0,n.jsx)("div",{ref:d,className:"-mx-3",children:(0,n.jsxs)(i.B8,{className:"center m-0 flex list-none gap-2 bg-transparent",children:[t.map(e=>{let{id:t,title:a,icon:o}=e,l="site-section-group"===e.object,c=l&&!!e.sections.find(e=>e.id===r.id)||t===r.id;return(0,n.jsx)(i.q7,{value:t,children:l?e.sections.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.l9,{ref:r=>h(r,t,e.sections.length),asChild:!0,onClick:e=>{s&&(e.preventDefault(),e.stopPropagation())},children:(0,n.jsx)(m,{isActive:c,title:a,icon:o})}),(0,n.jsx)(i.UC,{className:"absolute top-0 left-0 z-20 w-full data-[motion=from-end]:motion-safe:animate-enterFromRight data-[motion=from-start]:motion-safe:animate-enterFromLeft data-[motion=to-end]:motion-safe:animate-exitToRight data-[motion=to-start]:motion-safe:animate-exitToLeft md:w-max",children:(0,n.jsx)(p,{sections:e.sections,currentSection:r})})]}):null:(0,n.jsx)(i.N_,{asChild:!0,children:(0,n.jsx)(u,{url:e.url,isActive:c,title:a,icon:o||void 0})})},t)}),(0,n.jsx)(i.C1,{className:"fixed top-full z-50 flex h-3 items-end justify-center duration-150 motion-safe:transition-[width,_transform] data-[state=hidden]:motion-safe:animate-fadeOut data-[state=visible]:motion-safe:animate-fadeIn","aria-hidden":!0,children:(0,n.jsx)("div",{className:"relative top-1/2 size-3 rotate-45 rounded-tl-sm border-tint-subtle border-t border-l bg-tint-base"})})]})}),(0,n.jsx)("div",{className:"absolute top-full flex transition-transform duration-200 ease-in-out",style:{display:null===l?"none":void 0,transform:l?"translateX(".concat(l,"px) translateZ(0)"):"translateZ(0)"},children:(0,n.jsx)(i.LM,{className:"relative mt-3 h-[var(--radix-navigation-menu-viewport-height)] w-[calc(100vw_-_2rem)] origin-[top_center] overflow-hidden rounded-lg straight-corners:rounded-sm bg-tint-base depth-flat:shadow-none shadow-lg shadow-tint-10/6 ring-1 ring-tint-subtle duration-250 data-[state=closed]:duration-150 motion-safe:transition-[width,_height,_transform] data-[state=closed]:motion-safe:animate-scaleOut data-[state=open]:motion-safe:animate-scaleIn md:mx-0 md:w-[var(--radix-navigation-menu-viewport-width)] dark:shadow-tint-1/6",style:{translate:void 0}})})]}):null}let u=a.forwardRef(function(e,t){let{isActive:r,title:s,icon:i,url:a,...d}=e;return(0,n.jsxs)(o.N_,{ref:t,...d,className:(0,l.P)("group relative my-2 flex select-none items-center justify-between rounded circular-corners:rounded-full straight-corners:rounded-none px-3 py-1",r?"text-primary-subtle":"text-tint hover:bg-tint-hover hover:text-tint-strong"),href:a,children:[(0,n.jsxs)("span",{className:"flex w-full items-center gap-2 truncate",children:[i?(0,n.jsx)(c.D,{isActive:r,icon:i}):null,s]}),r?(0,n.jsx)(h,{}):null]})}),m=a.forwardRef(function(e,t){let{isActive:r,title:i,icon:a,...o}=e;return(0,n.jsxs)("button",{ref:t,...o,className:(0,l.P)("group relative my-2 flex select-none items-center justify-between rounded circular-corners:rounded-full straight-corners:rounded-none px-3 py-1 transition-colors hover:cursor-default",r?"text-primary-subtle":"text-tint hover:bg-tint-hover hover:text-tint-strong"),children:[(0,n.jsxs)("span",{className:"flex w-full items-center gap-2 truncate",children:[a?(0,n.jsx)(c.D,{isActive:r,icon:a}):null,i]}),r?(0,n.jsx)(h,{}):null,(0,n.jsx)(s.In,{"aria-hidden":!0,icon:"chevron-down",className:"ms-1 size-3 shrink-0 opacity-6 transition-all group-data-[state=open]:rotate-180"})]})});function h(){return(0,n.jsx)("span",{className:"-bottom-2 absolute inset-x-3 h-0.5 bg-primary-9 contrast-more:bg-primary-11"})}function p(e){let{sections:t,currentSection:r}=e;return(0,n.jsx)("ul",{className:(0,l.P)("grid w-full gap-1 p-2 sm:grid-cols-1 md:w-max",t.length<4?"md:grid-cols-1":"md:grid-cols-2"),children:t.map(e=>(0,n.jsx)(f,{section:e,isActive:e.id===r.id},e.id))})}function f(e){let{section:t,isActive:r}=e,{url:s,icon:i,title:a}=t;return(0,n.jsx)("li",{className:"flex w-full md:w-60",children:(0,n.jsxs)(o.N_,{href:s,className:(0,l.P)("flex w-full select-none flex-col gap-1 rounded straight-corners:rounded-none px-3 py-2 transition-colors hover:bg-tint-hover",r?"text-primary":"text-tint-strong"),children:[(0,n.jsxs)("div",{className:"flex w-full gap-2",children:[i?(0,n.jsx)(c.D,{className:"mt-[3px]",isActive:!1,icon:i}):null,a]}),t.description?(0,n.jsx)("p",{className:"text-tint-subtle",children:t.description}):null]})})}},60101:(e,t,r)=>{"use strict";r.d(t,{AIChatButton:()=>l});var n=r(54568),s=r(88118),i=r(3586),a=r(54217),o=r(73598);function l(){let e=(0,i.C)(),t=(0,i.J)(),r=(0,s.ok)();return(0,n.jsx)(a.$n,{icon:(0,n.jsx)(o.A,{}),iconOnly:!0,size:"default",variant:"secondary",className:"!px-3 bg-tint-base py-2.5",label:(0,s.si)(r,"ai_chat_assistant_name"),onClick:()=>{t.opened?e.close():e.open()}})}},60426:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AIChat:()=>v,AIChatWindow:()=>y});var n=r(54568),s=r(88118),i=r(86424),a=r(7620),o=r(3586),l=r(62574),c=r(54217),d=r(4093),u=r(73598),m=r(98743),h=r(5384);function p(e){let{value:t,onChange:r,onSubmit:o,disabled:l,loading:d}=e,u=(0,s.ok)(),p=(0,a.useRef)(null);return(0,a.useEffect)(()=>{l||setTimeout(()=>{var e;null==(e=p.current)||e.focus()},300)},[l]),(0,n.jsxs)("div",{className:"relative flex flex-col overflow-hidden circular-corners:rounded-2xl rounded-corners:rounded-md bg-tint-base/9 ring-1 ring-tint-subtle backdrop-blur-lg transition-all depth-subtle:has-[textarea:focus]:shadow-lg has-[textarea:focus]:ring-2 has-[textarea:focus]:ring-primary-hover contrast-more:bg-tint-base",children:[(0,n.jsx)("textarea",{ref:p,disabled:l||d,"data-loading":d,className:(0,m.P)("resize-none","focus:outline-none","focus:ring-0","w-full","px-4","py-3","pb-12","h-auto","bg-transparent","max-h-64","placeholder:text-tint/8","transition-colors","disabled:bg-tint-subtle","delay-300","disabled:delay-0","disabled:cursor-not-allowed","data-[loading=true]:cursor-progress","data-[loading=true]:opacity-50"),value:t,rows:1,placeholder:(0,s.si)(u,"ai_chat_input_placeholder"),onChange:e=>{let t=e.currentTarget;r(t.value),t.style.height="auto",t.style.height="".concat(t.scrollHeight,"px")},onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&t.trim()&&(e.preventDefault(),e.currentTarget.style.height="auto",o(t))}}),(0,n.jsxs)("div",{className:"absolute inset-x-0 bottom-0 flex items-center px-2 py-2",children:[(0,n.jsx)(h.m,{label:(0,n.jsxs)("div",{className:"flex flex-col gap-3 p-2",children:[(0,n.jsx)("p",{children:(0,s.t)(u,"ai_chat_context_description")}),(0,n.jsxs)("ul",{className:"flex flex-col gap-2",children:[(0,n.jsxs)("li",{className:"flex items-center gap-2",children:[(0,n.jsx)(i.In,{icon:"memo",className:"size-3.5 opacity-7"}),(0,s.t)(u,"ai_chat_context_pages_youve_read")]}),(0,n.jsxs)("li",{className:"flex items-center gap-2",children:[(0,n.jsx)(i.In,{icon:"user",className:"size-3.5 opacity-7"}),(0,s.t)(u,"ai_chat_context_info_provided_by_the_site")]}),(0,n.jsxs)("li",{className:"flex items-center gap-2",children:[(0,n.jsx)(i.In,{icon:"message-question",className:"size-3.5 opacity-7"}),(0,s.t)(u,"ai_chat_context_previous_messages")]})]}),(0,n.jsx)("p",{children:(0,s.t)(u,"ai_chat_context_disclaimer")})]}),arrow:!0,children:(0,n.jsxs)("div",{className:"flex cursor-help items-center gap-1 circular-corners:rounded-2xl rounded-corners:rounded-md px-2 py-1 text-tint/7 text-xs transition-all hover:bg-tint",children:[(0,n.jsx)("span",{className:"-ml-1 circular-corners:rounded-2xl rounded-corners:rounded-md bg-tint-11/7 px-1 py-0.5 font-mono font-semibold text-[0.65rem] text-contrast-tint-11 leading-none",children:"AI"})," ",(0,n.jsx)("span",{children:(0,s.t)(u,"ai_chat_context_title")})]})}),(0,n.jsx)(c.$n,{label:(0,s.si)(u,"send"),size:"medium",className:"ml-auto",disabled:l||!t.trim(),onClick:()=>o(t)})]})]})}var f=r(5772);function x(e){let{chat:t,lastUserMessageRef:r}=e;return(0,n.jsx)(n.Fragment,{children:t.messages.map((e,s)=>{let i=e.role===f.W7.User&&s===t.messages.map(e=>e.role).lastIndexOf(f.W7.User);return(0,n.jsx)("div",{ref:i?r:void 0,className:(0,m.P)(e.content?"animate-[fadeIn_500ms_both]":"","shrink-0","last:min-h-[calc(100%-5rem)]",e.role===f.W7.User?"max-w-[80%] self-end rounded-md bg-tint px-4 py-2":""),style:{animationDelay:"".concat(Math.min(.05*s,.5),"s")},children:e.content?e.content:t.loading?(0,n.jsx)("div",{className:"flex w-full animate-[fadeIn_500ms_both] flex-wrap gap-2",children:Array.from({length:7}).map((e,t)=>(0,n.jsx)("div",{className:"h-4 animate-[fadeIn_0.5s_ease_both,pulse_1.5s_infinite] rounded-md bg-tint-4",style:{width:"calc(".concat(t%4*20+10,"% - 4px)"),animationDelay:"".concat(.1*t,"s")}},t))}):null},s)})})}function g(e){let{chatController:t}=e,r=(0,s.ok)(),i=[(0,s.si)(r,"ai_chat_suggested_questions_about_this_page"),(0,s.si)(r,"ai_chat_suggested_questions_read_next"),(0,s.si)(r,"ai_chat_suggested_questions_example")];return(0,n.jsx)("div",{className:"flex flex-col items-center gap-2",children:i.map((e,r)=>(0,n.jsx)(c.$n,{label:e,variant:"secondary",size:"medium",className:"max-w-full animate-[present_500ms_both] whitespace-normal",style:{animationDelay:"".concat(800+100*r,"ms")},onClick:()=>t.postMessage({message:e}),children:e},e))})}function b(e){let{chat:t,chatController:r}=e;return 0===t.followUpSuggestions.length?null:(0,n.jsx)("div",{className:"flex flex-row flex-wrap justify-end gap-2 pt-8",children:t.followUpSuggestions.map((e,t)=>(0,n.jsx)(c.$n,{onClick:()=>{r.postMessage({message:e})},label:e,className:"max-w-full animate-[present_500ms_both] whitespace-normal text-right",size:"small",variant:"secondary",style:{animationDelay:"".concat(250+Math.min(50*t,150),"ms")}},t))})}function v(){let e=(0,o.J)();return e.opened?(0,n.jsx)(y,{chat:e}):null}function y(e){let{chat:t}=e,[r,m]=a.useState(""),h=(0,o.C)(),f=a.useRef(null),v=a.useRef(null),y=a.useRef(null),w=a.useRef(null),[k,N]=a.useState(0),_=(0,s.ok)(),P=(0,l.cB)(36e5),C=!t.messages.length,S=a.useMemo(()=>{let e=new Date(P).getHours();return e<6?(0,s.si)(_,"ai_chat_assistant_greeting_night"):e<12?(0,s.si)(_,"ai_chat_assistant_greeting_morning"):e<18?(0,s.si)(_,"ai_chat_assistant_greeting_afternoon"):(0,s.si)(_,"ai_chat_assistant_greeting_evening")},[P,_]);return a.useEffect(()=>{t.messages.length>0&&y.current&&y.current.scrollIntoView({behavior:"smooth",block:"start"})},[t.messages.length]),a.useEffect(()=>{var e;null==(e=f.current)||e.scrollIntoView({behavior:"smooth",block:"start"});let t=new ResizeObserver(e=>{e.forEach(e=>{N(e.contentRect.height+32)})});return w.current&&t.observe(w.current),()=>t.disconnect()},[t.opened]),(0,n.jsx)("div",{className:"ai-chat inset-y-0 right-0 z-40 mx-auto flex max-w-3xl animate-present px-4 py-4 transition-all duration-300 sm:px-6 lg:fixed lg:w-80 lg:animate-enterFromRight lg:pr-4 lg:pl-0 xl:w-96",ref:f,children:(0,n.jsxs)("div",{className:"relative flex h-full grow flex-col overflow-hidden circular-corners:rounded-3xl rounded-corners:rounded-md bg-tint-base text-sm text-tint depth-subtle:shadow-lg shadow-tint ring-1 ring-tint-subtle",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 border-tint-subtle border-b bg-tint-subtle px-4 py-2 text-tint-strong",children:[(0,n.jsx)(u.A,{className:"size-5 text-tint ".concat(t.loading?"animate-pulse":""),state:t.loading?"thinking":"default"}),(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("div",{className:"font-bold",children:"Docs Assistant"}),(0,n.jsx)("div",{className:"text-tint text-xs leading-none transition-all duration-500 ".concat(t.loading?"h-3 opacity-11":"h-0 opacity-0"),children:t.loading?t.messages[t.messages.length-1].content?(0,s.t)(_,"ai_chat_working"):(0,s.t)(_,"ai_chat_thinking"):""})]}),(0,n.jsxs)("div",{className:"ml-auto flex gap-2",children:[(0,n.jsx)(d.DropdownMenu,{button:(0,n.jsx)(c.$n,{onClick:()=>{},iconOnly:!0,icon:"ellipsis",label:(0,s.si)(_,"more"),className:"!px-2",variant:"blank",size:"default"}),children:(0,n.jsxs)(d.DropdownMenuItem,{onClick:()=>{h.clear()},disabled:C,children:[(0,n.jsx)(i.In,{icon:"broom-wide",className:"size-3 text-tint-subtle"}),(0,s.t)(_,"ai_chat_clear_conversation")]})}),(0,n.jsx)(c.$n,{onClick:()=>h.close(),iconOnly:!0,icon:"close",label:(0,s.si)(_,"close"),className:"!px-2",variant:"blank",size:"default"})]})]}),(0,n.jsx)("div",{ref:v,className:"flex grow scroll-pt-4 flex-col gap-4 overflow-y-auto p-4",style:{paddingBottom:"".concat(k,"px")},children:C?(0,n.jsxs)("div",{className:"flex min-h-full w-full shrink-0 flex-col items-center justify-center gap-6 py-4",children:[(0,n.jsx)("div",{className:"flex size-32 animate-[fadeIn_500ms_both] items-center justify-center rounded-full bg-tint-subtle",children:(0,n.jsx)(u.A,{className:"size-16 animate-[present_500ms_200ms_both]"})}),(0,n.jsxs)("div",{className:"animate-[fadeIn_500ms_400ms_both]",children:[(0,n.jsx)("h5",{className:" text-center font-bold text-lg text-tint-strong",children:S}),(0,n.jsx)("p",{className:"text-center text-tint",children:(0,s.t)(_,"ai_chat_assistant_description")})]}),t.error?null:(0,n.jsx)(g,{chatController:h})]}):(0,n.jsx)(x,{chat:t,lastUserMessageRef:y})}),(0,n.jsxs)("div",{ref:w,className:"absolute inset-x-0 bottom-0 mr-2 flex flex-col gap-4 bg-gradient-to-b from-transparent to-50% to-tint-base/9 p-4 pr-2",children:[t.error?(0,n.jsx)(j,{chatController:h}):(0,n.jsx)(b,{chat:t,chatController:h}),(0,n.jsx)(p,{value:r,onChange:m,loading:t.loading,disabled:t.loading||t.error,onSubmit:()=>{h.postMessage({message:r}),m("")}})]})]})})}function j(e){let t=(0,s.ok)(),{chatController:r}=e;return(0,n.jsxs)("div",{className:"flex flex-wrap justify-between gap-2 rounded-md bg-danger p-3 text-danger text-sm ring-1 ring-danger",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(i.In,{icon:"exclamation-triangle",className:"size-3.5"}),(0,n.jsx)("span",{className:"flex items-center gap-1",children:(0,s.t)(t,"ai_chat_error")})]}),(0,n.jsx)("div",{className:"flex justify-end",children:(0,n.jsx)(c.$n,{variant:"blank",size:"small",icon:"refresh",label:(0,s.si)(t,"unexpected_error_retry"),onClick:()=>{r.clear()},className:"!text-danger hover:bg-danger-5"})})]})}},66859:(e,t,r)=>{"use strict";r.d(t,{RefreshChangeRequestButton:()=>d});var n=r(54568),s=r(86424),i=r(7620),a=r(25316);let o=(0,a.createServerReference)("401836e19148425bfb6ab0a6c7ce3ec84441468889",a.callServer,void 0,a.findSourceMapURL,"hasContentBeenUpdated");var l=r(98743),c=r(20416);function d(e){let{updatedAt:t}=e,[r,a]=i.useState(!1),[d,u]=i.useState(!1),m=function(e){let{spaceId:t,changeRequestId:r,revisionId:n}=e;return i.useCallback(async()=>{await o({spaceId:t,changeRequestId:r,revisionId:n})&&window.location.reload()},[t,r,n])}(e),h=i.useCallback(async()=>{u(!0);try{await m()}finally{u(!1),a(!1)}},[m]);return(i.useEffect(()=>{t<Date.now()-3e4&&a(!0)},[t]),i.useEffect(()=>{if(!r){let e=setTimeout(()=>{a(!0)},3e4);return()=>clearTimeout(e)}},[r]),r)?(0,n.jsx)(c.ToolbarButton,{title:"Refresh",onClick:e=>{e.preventDefault(),h()},children:(0,n.jsx)(s.In,{icon:"rotate",className:(0,l.P)("size-4",d?"animate-spin":null)})}):null}},71283:(e,t,r)=>{Promise.resolve().then(r.bind(r,27801)),Promise.resolve().then(r.bind(r,39496)),Promise.resolve().then(r.t.bind(r,89090,23)),Promise.resolve().then(r.t.bind(r,91942,23)),Promise.resolve().then(r.t.bind(r,10206,23)),Promise.resolve().then(r.t.bind(r,76954,23)),Promise.resolve().then(r.t.bind(r,19408,23)),Promise.resolve().then(r.t.bind(r,81582,23)),Promise.resolve().then(r.t.bind(r,15253,23)),Promise.resolve().then(r.t.bind(r,94497,23)),Promise.resolve().then(r.t.bind(r,57968,23)),Promise.resolve().then(r.t.bind(r,93522,23)),Promise.resolve().then(r.t.bind(r,34086,23)),Promise.resolve().then(r.t.bind(r,258,23)),Promise.resolve().then(r.t.bind(r,55739,23)),Promise.resolve().then(r.t.bind(r,83196,23)),Promise.resolve().then(r.t.bind(r,39538,23)),Promise.resolve().then(r.t.bind(r,87298,23)),Promise.resolve().then(r.t.bind(r,76059,23)),Promise.resolve().then(r.t.bind(r,7361,23)),Promise.resolve().then(r.t.bind(r,20758,23)),Promise.resolve().then(r.t.bind(r,5989,23)),Promise.resolve().then(r.t.bind(r,82536,23)),Promise.resolve().then(r.t.bind(r,51212,23)),Promise.resolve().then(r.t.bind(r,77117,23)),Promise.resolve().then(r.t.bind(r,4441,23)),Promise.resolve().then(r.bind(r,38098)),Promise.resolve().then(r.bind(r,66859)),Promise.resolve().then(r.bind(r,20416)),Promise.resolve().then(r.bind(r,60426)),Promise.resolve().then(r.bind(r,60101)),Promise.resolve().then(r.bind(r,76169)),Promise.resolve().then(r.bind(r,33591)),Promise.resolve().then(r.bind(r,50636)),Promise.resolve().then(r.t.bind(r,45786,23)),Promise.resolve().then(r.bind(r,10092)),Promise.resolve().then(r.bind(r,48990)),Promise.resolve().then(r.bind(r,81608)),Promise.resolve().then(r.bind(r,63644)),Promise.resolve().then(r.bind(r,94413)),Promise.resolve().then(r.bind(r,37512)),Promise.resolve().then(r.bind(r,21520)),Promise.resolve().then(r.bind(r,81402)),Promise.resolve().then(r.bind(r,65498)),Promise.resolve().then(r.bind(r,42613)),Promise.resolve().then(r.bind(r,14417)),Promise.resolve().then(r.bind(r,85053)),Promise.resolve().then(r.bind(r,5833)),Promise.resolve().then(r.bind(r,22399)),Promise.resolve().then(r.bind(r,90983)),Promise.resolve().then(r.bind(r,42296)),Promise.resolve().then(r.bind(r,47091)),Promise.resolve().then(r.bind(r,4093)),Promise.resolve().then(r.bind(r,9443)),Promise.resolve().then(r.bind(r,15943)),Promise.resolve().then(r.bind(r,90862)),Promise.resolve().then(r.bind(r,20310)),Promise.resolve().then(r.t.bind(r,11631,23)),Promise.resolve().then(r.bind(r,9873)),Promise.resolve().then(r.bind(r,46745)),Promise.resolve().then(r.bind(r,14105)),Promise.resolve().then(r.bind(r,12632)),Promise.resolve().then(r.bind(r,55392)),Promise.resolve().then(r.bind(r,4788)),Promise.resolve().then(r.bind(r,18440)),Promise.resolve().then(r.bind(r,14250)),Promise.resolve().then(r.bind(r,29578)),Promise.resolve().then(r.bind(r,30711)),Promise.resolve().then(r.bind(r,56240)),Promise.resolve().then(r.bind(r,58132)),Promise.resolve().then(r.bind(r,18003)),Promise.resolve().then(r.t.bind(r,39839,23))},73598:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(54568);let s=e=>{let{className:t="size-4",size:r,state:s="default",...i}=e;return(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,...r&&{width:r,height:r},...i,children:[(0,n.jsx)("title",{children:"Docs Assistant"}),(0,n.jsx)("path",{d:"M12.8916 1.06265C12.921 0.979101 13.0392 0.979127 13.0685 1.06267C13.239 1.5478 13.3439 1.84646 13.516 2.1032C13.6683 2.33042 13.8578 2.53033 14.0766 2.6945C14.3239 2.88 14.6165 3.00068 15.0919 3.19671C15.1761 3.23142 15.1761 3.3506 15.0919 3.38531C14.6165 3.58134 14.3239 3.70203 14.0766 3.88752C13.8578 4.05169 13.6683 4.2516 13.516 4.47882C13.3439 4.73556 13.239 5.03423 13.0685 5.51937C13.0392 5.60291 12.921 5.60292 12.8916 5.51938C12.7212 5.03423 12.6162 4.73557 12.4442 4.47882C12.2919 4.2516 12.1023 4.05169 11.8835 3.88752C11.6363 3.70202 11.3436 3.58134 10.8682 3.38531C10.7841 3.3506 10.7841 3.23141 10.8683 3.1967C11.3436 3.00067 11.6363 2.87999 11.8835 2.6945C12.1023 2.53033 12.2919 2.33042 12.4442 2.1032C12.6162 1.84646 12.7212 1.54779 12.8916 1.06265Z",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round",className:"thinking"===s?"animate-spin":"",style:{transformOrigin:"13px 3.5px"}}),(0,n.jsx)("path",{d:"M9.479 10.2734C9.479 11.2369 8.6115 11.2578 7.54138 11.2578C6.47126 11.2578 5.60376 11.2369 5.60376 10.2734",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"M9.47913 6.77344L9.47913 7.77344",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"M5.60388 6.77344L5.60388 7.77344",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"M13.2813 8.875L13.2813 10.125C13.2813 12.3341 11.4904 14.125 9.28125 14.125L1.80165 14.125L1.80165 6.78125C1.80165 4.57211 3.59251 2.78125 5.80165 2.78125L7.67889 2.78125",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})}},85820:(e,t,r)=>{"use strict";r.d(t,{D:()=>a});var n=r(54568),s=r(86424),i=r(98743);function a(e){let{icon:t,isActive:r,className:a}=e;return(0,n.jsx)(s.In,{icon:t,className:(0,i.P)("size-[1em] shrink-0 text-inherit opacity-8",r&&"text-inherit opacity-10",a)})}},99428:(e,t,r)=>{"use strict";r.d(t,{I:()=>o,S:()=>a});var n=r(16821),s=r(7620);let i={q:n.tU,ask:n.cr,global:n.cr};function a(){let[e,t]=(0,n.ab)(i,{history:"replace"}),r=s.useMemo(()=>null===e||null===e.q?null:{query:e.q,ask:!!e.ask,global:!!e.global},[e]),a=s.useRef(r);return s.useLayoutEffect(()=>{a.current=r},[r]),[r,s.useCallback(e=>("function"==typeof e&&(e=e(a.current)),null===e)?t({q:null,ask:null,global:null}):t({q:e.query,ask:!!e.ask||null,global:!!e.global||null}),[t])]}function o(){let[,e]=a();return s.useCallback(t=>{var r;let n=new URLSearchParams;return n.set("q",null!=(r=t.query)?r:""),t.ask?n.set("ask","on"):n.delete("ask"),t.global?n.set("global","on"):n.delete("global"),{href:"?".concat(n.toString()),prefetch:!1,onClick:r=>{r.preventDefault(),e(e=>({query:"",ask:!1,global:!1,...null!=e?e:{},...t}))}}},[e])}}}]); |