(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8280],{76704:function(e,t,r){Promise.resolve().then(r.bind(r,57501)),Promise.resolve().then(r.bind(r,35592)),Promise.resolve().then(r.bind(r,17760)),Promise.resolve().then(r.bind(r,42057)),Promise.resolve().then(r.bind(r,41410)),Promise.resolve().then(r.bind(r,35489)),Promise.resolve().then(r.t.bind(r,60311,23)),Promise.resolve().then(r.bind(r,72020)),Promise.resolve().then(r.bind(r,91861)),Promise.resolve().then(r.bind(r,92884)),Promise.resolve().then(r.bind(r,50433)),Promise.resolve().then(r.bind(r,26700)),Promise.resolve().then(r.bind(r,37195)),Promise.resolve().then(r.bind(r,49780)),Promise.resolve().then(r.bind(r,75014)),Promise.resolve().then(r.bind(r,80718)),Promise.resolve().then(r.bind(r,66819)),Promise.resolve().then(r.bind(r,22833)),Promise.resolve().then(r.bind(r,86604)),Promise.resolve().then(r.bind(r,42579)),Promise.resolve().then(r.bind(r,89531)),Promise.resolve().then(r.bind(r,19656)),Promise.resolve().then(r.bind(r,66185)),Promise.resolve().then(r.bind(r,42663)),Promise.resolve().then(r.bind(r,45343)),Promise.resolve().then(r.bind(r,22563)),Promise.resolve().then(r.bind(r,5145)),Promise.resolve().then(r.bind(r,48982)),Promise.resolve().then(r.bind(r,1898)),Promise.resolve().then(r.bind(r,90790)),Promise.resolve().then(r.bind(r,97879)),Promise.resolve().then(r.bind(r,71362))},17760:function(e,t,r){"use strict";r.d(t,{ClientContexts:function(){return l}});var n=r(27573),a=r(54689);function l(e){let{children:t,forcedTheme:r}=e;return(0,n.jsx)(a.f,{nonce:"",attribute:"class",enableSystem:!0,forcedTheme:r,children:t})}r(7653)},42057:function(e,t,r){"use strict";r.d(t,{RefreshChangeRequestButton:function(){return c}});var n=r(27573),a=r(42172),l=r(7653);r(43503);var s=(0,r(99976).$)("ebe2454926b87e898c2656d2494d4f7263611b83"),i=r(33298),o=r(41410);function c(e){let{updatedAt:t}=e,[r,c]=l.useState(!1),[d,u]=l.useState(!1),h=function(e){let{spaceId:t,changeRequestId:r,revisionId:n}=e;return l.useCallback(async()=>{await s({spaceId:t,changeRequestId:r,revisionId:n})&&window.location.reload()},[t,r,n])}(e),f=l.useCallback(async()=>{u(!0);try{await h()}finally{u(!1),c(!1)}},[h]);return(l.useEffect(()=>{t{if(!r){let e=setTimeout(()=>{c(!0)},3e4);return()=>clearTimeout(e)}},[r]),r)?(0,n.jsx)(o.ToolbarButton,{title:"Refresh",onClick:e=>{e.preventDefault(),f()},children:(0,n.jsx)(a.JO,{icon:"rotate",className:(0,i.t)("size-4",d?"animate-spin":null)})}):null}},41410:function(e,t,r){"use strict";r.d(t,{Toolbar:function(){return l},ToolbarBody:function(){return s},ToolbarButton:function(){return o},ToolbarButtonGroups:function(){return i}});var n=r(27573);r(7653);var a=r(33298);function l(e){let{children:t}=e;return(0,n.jsx)("div",{className:(0,a.t)("flex","flex-row","items-center","gap-4","text-sm","px-4","py-1","rounded-full","truncate","text-light","dark:text-light"),children:t})}function s(e){return(0,n.jsx)("div",{className:"flex flex-col gap-1",children:e.children})}function i(e){return(0,n.jsx)("div",{className:"flex flex-row gap-2",children:e.children})}function o(e){let{children:t,...r}=e;return(0,n.jsx)("a",{...r,className:(0,a.t)("flex","flex-col","items-center","justify-center","size-11","gap-1","text-sm","rounded-full","hover:bg-dark-1","hover:text-white","truncate","text-light","dark:text-light","dark:hover:bg-dark-2","hover:shadow-lg","cursor-pointer"),children:t})}},35489:function(e,t,r){"use strict";r.r(t),r.d(t,{CookiesToast:function(){return u}});var n=r(27573),a=r(42172),l=r(7653),s=r(53902),i=r(63530),o=r(80807),c=r(33298),d=r(22551);function u(e){let{privacyPolicy:t="https://policies.gitbook.com/privacy/cookies"}=e,[r,u]=l.useState(!1),h=(0,i.ZK)();if(l.useEffect(()=>{u(void 0===(0,d.Bi)())},[]),!r)return null;let f=e=>{(0,d.GQ)(e),window.location.reload()},m="cookies-description";return(0,n.jsxs)("div",{role:"dialog","data-testid":"cookies-dialog","aria-modal":"true","aria-label":(0,o.F)(h,"cookies_title"),"aria-describedby":m,className:(0,c.t)("fixed","z-10","bg-white","rounded","straight-corners:rounded-none","ring-1","ring-dark/2","shadow-1xs","p-4","pr-8","bottom-4","right-4","left-16","max-w-md","text-balance","sm:left-auto","dark:ring-light/2","dark:bg-dark"),children:[(0,n.jsx)("p",{id:m,className:(0,c.t)("text-sm"),children:(0,o.t)(h,"cookies_prompt",(0,n.jsx)("a",{href:t,className:(0,c.t)("text-primary-500","hover:text-primary-600","underline"),children:(0,o.t)(h,"cookies_prompt_privacy")}))}),(0,n.jsx)("button",{type:"button",onClick:()=>u(!1),"aria-label":(0,o.F)(h,"cookies_close"),className:(0,c.t)("absolute","top-3","right-3","w-6","h-6","flex","justify-center","items-center","rounded-sm","hover:bg-dark/2","dark:hover:bg-light/1"),title:(0,o.F)(h,"cookies_close"),children:(0,n.jsx)(a.JO,{icon:"xmark",className:(0,c.t)("size-4")})}),(0,n.jsxs)("div",{className:(0,c.t)("mt-3","flex","flex-row","gap-2"),children:[(0,n.jsx)(s.zx,{variant:"primary",size:"small","aria-label":(0,o.F)(h,"cookies_accept"),onClick:()=>{f(!0)},children:(0,o.t)(h,"cookies_accept")}),(0,n.jsx)(s.zx,{variant:"secondary",size:"small","aria-label":(0,o.F)(h,"cookies_reject"),onClick:()=>{f(!1)},children:(0,o.t)(h,"cookies_reject")})]})]})}},72020:function(e,t,r){"use strict";r.d(t,{HeaderMobileMenu:function(){return d}});var n=r(27573),a=r(42172),l=r(81695),s=r(7653),i=r(63530),o=r(33298);let c="navigation-open";function d(e){let t=(0,i.ZK)(),r=(0,l.usePathname)(),[d,u]=(0,s.useState)(!1),h=()=>{window.scrollY>=320?u(!0):u(!1)};return(0,s.useEffect)(()=>{document.body.classList.remove(c)},[r]),(0,s.useEffect)(()=>(window.addEventListener("scroll",h),()=>{window.removeEventListener("scroll",h)}),[]),(0,n.jsx)("button",{...e,"aria-label":(0,i.Ff)(t,"table_of_contents_button_label"),onClick:()=>{!d&&document.body.classList.contains(c)?document.body.classList.remove(c):(document.body.classList.add(c),window.scrollTo(0,0))},className:(0,o.t)("flex","flex-row","items-center","hover:bg-dark/3","py-1","px-2","dark:hover:bg-light/2","rounded","straight-corners:rounded-sm","page-no-toc:hidden",e.className),children:(0,n.jsx)(a.JO,{icon:"bars",className:(0,o.t)("size-4","text-inherit")})})}},91861:function(e,t,r){"use strict";r.d(t,{SpacesDropdownMenuItem:function(){return o}});var n=r(27573),a=r(81695);r(42172),r(7653);var l=r(33298),s=r(53902);function i(e){let{children:t,active:r=!1,href:a,className:i,insights:o}=e;return a?(0,n.jsx)(s.rU,{href:a,prefetch:!1,insights:o,className:(0,l.t)("px-3 py-1 text-sm rounded straight-corners:rounded-sm",r?"bg-primary/3 dark:bg-light/2 text-primary-600":null,"hover:bg-dark/2 dark:hover:bg-light/2",i),children:t}):(0,n.jsx)("div",{className:(0,l.t)("text-xs px-3 py-1 font-medium text-dark/8 dark:text-light/8",i),children:t})}function o(e){let{variantSpace:t,active:r}=e,l=function(e){var t;let r=null!==(t=(0,a.useSelectedLayoutSegment)())&&void 0!==t?t:"",n=new URL(e);return n.pathname+="/".concat(r),n.pathname=n.pathname.replace(/\/{2,}/g,"/").replace(/\/$/,""),n.searchParams.set("fallback","true"),n.toString()}(t.url);return(0,n.jsx)(i,{href:l,active:r,children:t.title},t.id)}},49780:function(e,t,r){"use strict";r.r(t),r.d(t,{LoadIntegrations:function(){return a}});var n=r(7653);function a(){return n.useEffect(()=>{(function(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),a=1;ae(...n))})("load")},[]),null}window.GitBook={events:new Map,addEventListener:(e,t)=>{var r,n,a;let l=null!==(a=null===(r=window.GitBook)||void 0===r?void 0:r.events.get(e))&&void 0!==a?a:[];l.push(t),null===(n=window.GitBook)||void 0===n||n.events.set(e,l)},removeEventListener:(e,t)=>{var r,n;let a=null!==(n=null===(r=window.GitBook)||void 0===r?void 0:r.events.get(e))&&void 0!==n?n:[],l=a.indexOf(t);-1!==l&&a.splice(l,1)}}},86604:function(e,t,r){"use strict";r.r(t),r.d(t,{SearchButton:function(){return d}});var n=r(27573),a=r(42172),l=r(7653),s=r(63530),i=r(33298),o=r(66353),c=r(22551);function d(e){let{style:t,children:r}=e,l=(0,s.ZK)(),[,d]=(0,o.R)(),h=(0,c.Ke)();return(0,n.jsxs)("button",{onClick:()=>{d({ask:!1,global:!1,query:""}),h({type:"search_open"})},"aria-label":(0,s.Ff)(l,"search"),className:(0,i.t)("flex","flex-1","flex-row","justify-center","items-center","w-full","px-3","py-2","gap-2","bg-light","dark:bg-dark","ring-1","ring-dark/1","dark:ring-light/2","shadow-sm","shadow-dark/4","dark:shadow-none","text-dark/7","dark:text-light-4/7","rounded-lg","straight-corners:rounded-sm","contrast-more:ring-dark","contrast-more:text-dark","contrast-more:dark:ring-light","contrast-more:dark:text-light","transition-all","hover:shadow-md","hover:scale-102","hover:ring-dark/2","hover:text-dark/10","focus:shadow-md","focus:scale-102","focus:ring-dark/2","focus:text-dark/10","dark:hover:bg-dark-3","dark:hover:ring-light/4","dark:hover:text-light","dark:focus:bg-dark-3","dark:focus:ring-light/4","dark:focus:text-light","contrast-more:hover:ring-2","contrast-more:hover:ring-dark","dark:contrast-more:hover:ring-light","contrast-more:focus:ring-2","contrast-more:focus:ring-dark","dark:contrast-more:focus:ring-light","active:shadow-sm","active:scale-98","md:justify-start","md:w-full",t),children:[(0,n.jsx)(a.JO,{icon:"magnifying-glass",className:(0,i.t)("text-dark/8","dark:text-light/8","shrink-0","size-4")}),(0,n.jsx)("div",{className:(0,i.t)("w-full","hidden","md:block","text-left"),children:r}),(0,n.jsx)(u,{})]})}let u=()=>{let[e,t]=(0,l.useState)("win");return(0,l.useEffect)(()=>{t(function(){let e=navigator.platform.toLowerCase();return e.includes("mac")?"mac":(e.includes("win"),"win")}())},[]),(0,n.jsxs)("div",{className:(0,i.t)("shortcut","hidden","md:inline","justify-end","text-xs","text-dark/7","contrast-more:text-dark","dark:text-light-4/7","contrast-more:dark:text-light","whitespace-nowrap",'[font-feature-settings:"calt",_"case"]'),children:["mac"===e?"⌘":"Ctrl +"," K"]})}},42579:function(e,t,r){"use strict";r.r(t),r.d(t,{SearchModal:function(){return J}});var n=r(27573),a=r(42172),l=r(40529),s=r(72354),i=r(81695),o=r(7653),c=r(32603),d=r(63530),u=r(33298),h=r(53902),f=r(80807);r(43503);var m=r(99976),x=(0,m.$)("a501ac45ed3ebadb223a733b12ac4f508a02a6f1"),p=(0,m.$)("a690e51318b39e87baed8c54df0cf141887dfc43"),g=(0,m.$)("67d7c91eed4bb9626c0e7273d7ce868d296e225d"),v=(0,m.$)("570add0a00dbdd6e818c5df488df0dff652dd942"),b=r(66353),k=r(22551);let y=(0,o.createContext)(void 0);function w(e){let{children:t,value:r}=e;return(0,n.jsx)(y.Provider,{value:r,children:t})}function j(e){let{pointer:t,query:r}=e,a=(0,d.ZK)(),l=(0,k.Ke)(),[,s]=(0,b.R)(),[i,c]=function(){let e=(0,o.useContext)(y);if(!e)throw Error("SearchAskContext is not available");return e}(),{organizationId:m,siteId:x,siteSpaceId:p}=t;o.useEffect(()=>{let e=!1;return c({type:"loading"}),(async()=>{var t;l({type:"ask_question",query:r});let n=(t=v(m,x,null!=p?p:null,r),{[Symbol.asyncIterator]:function(){return{current:t,async next(){let{iteratorResult:e,next:t}=await this.current;return t?this.current=t:e.done=!0,e}}}});for await(let t of(s(e=>e?{...e,query:r,ask:!0}:null),n)){if(e)return;c({type:"answer",answer:t})}})().catch(()=>{e||c({type:"error"})}),()=>{e=!0}},[m,x,p,r,c,s,l]),o.useEffect(()=>()=>{c(null)},[c]);let g=(0,n.jsx)("div",{className:(0,u.t)("w-full","flex","items-center","justify-center"),children:(0,n.jsx)(h.gb,{className:(0,u.t)("w-6","py-8","text-primary")})});return(0,n.jsxs)("div",{className:(0,u.t)("max-h-[60vh]","overflow-y-auto"),children:[(null==i?void 0:i.type)==="answer"?(0,n.jsx)(o.Suspense,{fallback:g,children:(0,n.jsx)(N,{answer:i.answer,placeholder:g})}):null,(null==i?void 0:i.type)==="error"?(0,n.jsx)("div",{className:(0,u.t)("p-4"),children:(0,f.t)(a,"search_ask_error")}):null,(null==i?void 0:i.type)==="loading"?g:null]})}function N(e){let{answer:t,placeholder:r}=e,[a,l]=o.useState(null),[s,i]=o.useTransition();return o.useEffect(()=>{i(()=>{l(t)})},[t]),a?(0,n.jsx)("div",{className:(0,u.t)("w-full"),children:(0,n.jsx)(_,{answer:a})}):(0,n.jsx)(n.Fragment,{children:r})}function _(e){var t;let{answer:r}=e,a=(0,d.ZK)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{"data-test":"search-ask-answer",className:(0,u.t)("my-4","sm:mt-6","px-4","sm:px-12","text-dark/9","dark:text-light/8"),children:[null!==(t=r.body)&&void 0!==t?t:(0,f.t)(a,"search_ask_no_answer"),r.followupQuestions.length>0?(0,n.jsx)(C,{followupQuestions:r.followupQuestions}):null]}),r.sources.length>0?(0,n.jsx)(E,{sources:r.sources,language:a,hasAnswer:!!r.body}):null]})}function C(e){let{followupQuestions:t}=e,r=(0,b.q)();return(0,n.jsx)("div",{className:(0,u.t)("flex","flex-col","flex-wrap","mt-4","sm:mt-6"),children:t.map(e=>(0,n.jsxs)(h.rU,{className:(0,u.t)("flex","items-center","gap-2","px-4","-mx-4","py-2","rounded","straight-corners:rounded-none","text-dark/7","dark:text-light/8","hover:bg-dark-4/2","dark:hover:bg-light-4/2","focus-within:bg-dark-4/2","dark:focus-within:bg-light-4/2"),...r({query:e,ask:!0}),children:[(0,n.jsx)(a.JO,{icon:"magnifying-glass",className:(0,u.t)("size-4","shrink-0","mr-2","text-dark/5","dark:text-light/5")}),(0,n.jsx)("span",{children:e})]},e))})}function E(e){let{sources:t,language:r,hasAnswer:l}=e;return(0,n.jsxs)("div",{className:(0,u.t)("flex","flex-wrap","gap-2","mt-4","sm:mt-6","py-4","px-4","border-t","border-dark/2","dark:border-light/1"),children:[(0,n.jsx)("span",{children:(0,f.t)(r,l?"search_ask_sources":"search_ask_sources_no_answer")}),t.map(e=>(0,n.jsx)("span",{className:(0,u.t)(),children:(0,n.jsxs)(h.rU,{className:(0,u.t)("flex","flex-wrap","gap-1","items-center","text-dark/7","hover:underline","focus-within:text-primary-700","dark:text-light/8"),href:e.href,prefetch:!1,children:[(0,n.jsx)(a.JO,{icon:"arrow-up-right",className:(0,u.t)("text-dark/6","size-4","shrink-0","dark:text-light/6")}),e.title]})},e.id))]})}var q=r(23060);function P(e){let{query:t,text:r,highlight:a=["text-bold","bg-primary-100","text-contrast-primary-100","dark:bg-primary-700","dark:text-contrast-primary-700","px-0.5","-mx-0.5","py-0.5","rounded","straight-corners:rounded-sm","group-[.is-active]:bg-primary-200","group-[.is-active]:text-contrast-primary-200","dark:group-[.is-active]:bg-primary-700","dark:group-[.is-active]:text-contrast-primary-700"]}=e,l=t.toLowerCase().split(" ").reduce((e,t)=>e.reduce((e,r)=>{if(r.match)return e.push(r),e;let{text:n}=r,a=n.toLowerCase().indexOf(t);if(a>=0){let r=n.slice(0,a),l=n.slice(a,a+t.length),s=n.slice(a+t.length);return r.length>0&&e.push({text:r}),l.length>0&&e.push({text:l,match:t}),s.length>0&&e.push({text:s}),e}return e.push({text:n}),e},[]),[{text:r}]);return(0,n.jsx)("span",{className:(0,u.t)("whitespace-break-spaces"),children:l.map((e,t)=>(0,n.jsx)("span",{className:(0,u.t)(e.match?a:null),children:e.text},t))})}let S=o.forwardRef(function(e,t){let{query:r,item:l,active:s}=e;return(0,n.jsxs)(h.rU,{ref:t,href:l.href,className:(0,u.t)("flex","gap-4","flex-row","items-center","p-4","border-t","border-dark/2","dark:border-light/1","first:border-none","text-base","font-medium","hover:bg-dark/1","dark:hover:bg-light/1","group",s?["is-active","bg-primary-50","text-contrast-primary-50","dark:bg-primary-800","dark:text-contrast-primary-800","hover:bg-primary-100/8","dark:hover:bg-primary-700/7"]:null),children:[(0,n.jsx)("div",{className:"size-4",children:(0,n.jsx)(a.JO,{icon:"file-lines",className:(0,u.t)("size-4",s?"text-primary":"opacity-5")})}),(0,n.jsxs)("div",{className:(0,u.t)("flex","flex-col","w-full"),children:[l.spaceTitle?(0,n.jsx)("div",{className:(0,u.t)("text-xs","opacity-6","font-normal","uppercase","tracking-wider","mb-1"),children:l.spaceTitle}):null,(0,n.jsx)(P,{query:r,text:l.title})]}),(0,n.jsx)("div",{className:(0,u.t)("p-2","rounded","straight-corners:rounded-none",s?["bg-primary","text-contrast-primary"]:["opacity-6"]),children:(0,n.jsx)(a.JO,{icon:s?"arrow-turn-down-left":"chevron-right",className:(0,u.t)("size-4")})})]})}),R=o.forwardRef(function(e,t){let{question:r,recommended:l=!1,active:s,onClick:i}=e,o=(0,d.ZK)(),c=(0,b.q)();return(0,n.jsxs)(h.rU,{ref:t,onClick:i,className:(0,u.t)("flex","px-4",l?["py-2","text-dark/7","dark:text-light/8"]:"py-4","hover:bg-dark/1","dark:hover:bg-light/1","first:mt-0","last:pb-3",s&&["is-active","bg-primary-50","text-contrast-primary-50","dark:bg-primary-800","dark:text-contrast-primary-800","hover:bg-primary-100/8","dark:hover:bg-primary-700/7"]),...c({ask:!0,query:r}),children:[(0,n.jsx)(a.JO,{icon:l?"search":"sparkles",className:(0,u.t)("size-4","shrink-0","mt-1.5","mr-4",s?["text-primary"]:["text-dark/5","dark:text-light/5"])}),(0,n.jsx)("div",{className:"w-full",children:l?r:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"font-medium",children:(0,d.t)(o,"search_ask",[r])}),(0,n.jsx)("div",{className:(0,u.t)("text-sm","text-dark/8","dark:text-light/8"),children:(0,d.t)(o,"search_ask_description")})]})}),(0,n.jsx)("div",{className:(0,u.t)("p-2","rounded","self-center","straight-corners:rounded-none",s?["bg-primary","text-contrast-primary"]:["opacity-6"]),children:(0,n.jsx)(a.JO,{icon:s?"arrow-turn-down-left":"chevron-right",className:(0,u.t)("size-4")})})]})}),z=o.forwardRef(function(e,t){let{query:r,item:l,active:s}=e;return(0,n.jsxs)(h.rU,{ref:t,href:l.href,className:(0,u.t)("[&:has(+:not(&))]:mb-6","flex","items-center","pl-6","sm:pl-12","pr-4","text-dark/8","dark:text-light/8","hover:bg-dark/1","dark:hover:bg-light/1","font-normal","py-2","group",s&&["is-active","bg-primary-50","text-contrast-primary-50","dark:bg-primary-800","dark:text-contrast-primary-800","hover:bg-primary-100/8","dark:hover:bg-primary-700/7"]),children:[(0,n.jsxs)("div",{className:(0,u.t)("border-l-2","px-4","py-1","flex","flex-1","overflow-hidden","flex-col","border-dark/2","dark:border-light/2"),children:[l.title?(0,n.jsx)("p",{className:(0,u.t)("text-base","mb-2"),children:(0,n.jsx)(P,{query:r,text:l.title})}):null,l.body?(0,n.jsx)("p",{className:(0,u.t)("text-sm","line-clamp-3","relative"),children:(0,n.jsx)(P,{query:r,text:l.body})}):null]}),(0,n.jsx)("div",{className:(0,u.t)("p-2","rounded","straight-corners:rounded-none","bg-primary","text-contrast-primary","hidden","sm:block",s?["opacity-11","block"]:["opacity-0"]),children:(0,n.jsx)(a.JO,{icon:"arrow-turn-down-left",className:(0,u.t)("size-4")})})]})}),L=o.forwardRef(function(e,t){let{children:r,query:a,pointer:l,spaceId:s,revisionId:i,global:c,withAsk:f,onSwitchToAsk:m}=e,v=(0,d.ZK)(),b=(0,k.Ke)(),y=o.useRef(null),[w,j]=o.useState(null),[N,_]=o.useState(null),C=o.useRef([]),E=o.useRef(null);o.useEffect(()=>{if(a)return f&&j(e=>T(e,a)),y.current=setTimeout(async()=>{let e=await (c?p(a,l):g(a,l,i));j(f?T(e,a):e),b({type:"search_type_query",query:a})},350),()=>{y.current&&(clearTimeout(y.current),y.current=null)};{if(!f)return;let e=!1;return(E.current?Promise.resolve(E.current):x(s)).then(t=>{E.current=t,e||j(t.map(e=>({type:"recommended-question",id:e,question:e})))}),()=>{e=!0}}},[a,c,l,s,i,f]),o.useEffect(()=>{a?w&&w.length>0&&_(0):_(null)},[w,a]),o.useEffect(()=>{var e;null!==N&&C.current[N]&&(null===(e=C.current[N])||void 0===e||e.scrollIntoView({block:"nearest",inline:"nearest"}))},[N,C]);let P=o.useCallback(e=>{w&&_(t=>null===t?0:Math.max(Math.min(t+e,w.length-1),0))},[w]),L=o.useCallback(()=>{var e;null!==N&&C.current[N]&&(null===(e=C.current[N])||void 0===e||e.click())},[N,C]);return(o.useImperativeHandle(t,()=>({moveUp:()=>{P(-1)},moveDown:()=>{P(1)},select:L}),[P,L]),w)?(0,n.jsxs)("div",{className:(0,u.t)("overflow-auto"),children:[r,0===w.length?(0,n.jsx)("div",{"data-test":"search-noresults",className:(0,u.t)("text","text-dark/8","p-8","text-center","dark:text-light/8"),children:(0,d.t)(v,"search_no_results",a)}):(0,n.jsx)("div",{"data-test":"search-results",children:w.map((e,t)=>{switch(e.type){case"page":return(0,n.jsx)(S,{ref:e=>{C.current[t]=e},query:a,item:e,active:t===N},e.id);case"question":return(0,n.jsx)(R,{ref:e=>{C.current[t]=e},question:a,active:t===N,onClick:m},e.id);case"recommended-question":return(0,n.jsx)(R,{ref:e=>{C.current[t]=e},question:e.question,active:t===N,onClick:m,recommended:!0},e.id);case"section":return(0,n.jsx)(z,{ref:e=>{C.current[t]=e},query:a,item:e,active:t===N},e.id);default:(0,q.ZP)(e)}})})]}):a?(0,n.jsx)("div",{className:(0,u.t)("flex","items-center","justify-center","py-8"),children:(0,n.jsx)(h.gb,{className:(0,u.t)("w-6","text-primary")})}):null});function T(e,t){let r=e?e.filter(e=>"question"!==e.type):null;return 0===t.length?r:[{type:"question",id:"question",query:t},...null!=r?r:[]]}function O(e){let{spaceTitle:t}=e,[r,a]=(0,b.R)(),l=(0,d.ZK)();return r?(0,n.jsxs)("div",{role:"toolbar","aria-orientation":"horizontal",className:(0,u.t)("flex","flex-row","mr-4"),children:[(0,n.jsx)(F,{active:!r.global,onClick:()=>{a({...r,global:!1})},children:(0,d.t)(l,"search_scope_space",t)}),(0,n.jsx)(F,{active:r.global,onClick:()=>{a({...r,global:!0})},children:(0,d.t)(l,"search_scope_all")})]}):null}function F(e){let{onClick:t,children:r,active:a}=e;return(0,n.jsx)("button",{role:"tab",type:"button","aria-selected":a,onClick:t,className:(0,u.t)("text-sm","transition-colors","px-3","py-2","border-b-2","whitespace-pre","-mb-[1px]",a?["text-primary-500","border-primary-500"]:["border-transparent"]),children:r})}var K=r(28785);function J(e){let[t,r]=(0,b.R)(),a=function(){let[e,t]=(0,o.useState)(null);return(0,o.useMemo)(()=>[e,t],[e])}(),[d]=a,h=(0,i.useRouter)();(0,c.y1)("mod+k",e=>{e.preventDefault(),r({ask:!1,query:"",global:!1})},[]);let f=null!==t;o.useEffect(()=>(f&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="auto"}),[f]);let m=async e=>{await r(null),e&&h.push(e)};return(0,n.jsx)(w,{value:a,children:(0,n.jsx)(l.M,{children:null!==t?(0,n.jsx)(s.E.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,delay:.1},role:"dialog",className:(0,u.t)("fixed","inset-0","bg-dark/4","backdrop-blur-2xl","z-30","px-4","pt-4","dark:bg-dark/8","md:pt-[min(8vh,6rem)]"),onClick:()=>{m()},children:(0,n.jsxs)("div",{className:"scroll-nojump",children:[(0,n.jsx)(l.M,{children:(null==d?void 0:d.type)==="loading"?(0,n.jsx)(s.E.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:1},className:(0,u.t)("w-screen","h-screen","fixed","inset-0","z-10","pointer-events-none"),children:(0,n.jsx)(K.K,{gridStyle:["h-screen","aspect-auto","top-[-30%]"],pulse:!0,tile:96,style:["grid"]})},"loading"):null}),(0,n.jsx)(U,{...e,state:t,setSearchState:r,onClose:m})]})}):null})})}function U(e){let{pointer:t,spaceId:r,revisionId:l,spaceTitle:i,withAsk:c,isMultiVariants:h,state:f,setSearchState:m,onClose:x}=e,p=(0,d.ZK)(),g=o.useRef(null),v=o.useRef(null);return o.useEffect(()=>{var e;null===(e=v.current)||void 0===e||e.focus()},[]),o.useEffect(()=>{let e=e=>{"Escape"===e.key&&x()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[x]),(0,n.jsxs)(s.E.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.Ff)(p,"search"),className:(0,u.t)("z-40","relative","flex","flex-col","bg-white","max-w-prose","mx-auto","max-h-[70dvh]","w-full","rounded-lg","straight-corners:rounded-sm","ring-1","ring-dark/1","shadow-2xl","overflow-hidden","dark:ring-inset","dark:bg-dark-3","dark:ring-light/2"),onClick:e=>{e.stopPropagation()},children:[(0,n.jsxs)("div",{className:(0,u.t)("flex","flex-row","items-start",null!==f.query?"border-b":null,"border-dark/2","dark:border-light/2"),children:[(0,n.jsx)("div",{className:(0,u.t)("p-2","pl-4","pt-4"),children:(0,n.jsx)(a.JO,{icon:"magnifying-glass",className:(0,u.t)("size-4","text-dark/4","dark:text-light/5")})}),(0,n.jsxs)("div",{className:(0,u.t)("w-full","flex","flex-row","flex-wrap","gap-y-0","gap-x-4","items-end"),children:[(0,n.jsx)("input",{ref:v,value:f.query,onKeyDown:e=>{var t,r,n;"ArrowUp"===e.key?(e.preventDefault(),null===(t=g.current)||void 0===t||t.moveUp()):"ArrowDown"===e.key?(e.preventDefault(),null===(r=g.current)||void 0===r||r.moveDown()):"Enter"===e.key&&(e.preventDefault(),null===(n=g.current)||void 0===n||n.select())},onChange:e=>{m({ask:!1,query:e.target.value,global:f.global})},className:(0,u.t)("text-dark","placeholder:text-dark/7","flex","resize-none","flex-1","h-12","p-2","focus:outline-none","bg-transparent","whitespace-pre-line","dark:text-light","dark:placeholder:text-light/7"),placeholder:(0,d.Ff)(p,c?"search_ask_input_placeholder":"search_input_placeholder"),spellCheck:"false",autoComplete:"off",autoCorrect:"off"}),h?(0,n.jsx)(O,{spaceTitle:i}):null]})]}),f.ask&&c?null:(0,n.jsx)(L,{ref:g,pointer:t,spaceId:r,revisionId:l,global:h&&f.global,query:f.query,withAsk:c,onSwitchToAsk:()=>{m(e=>e?{...e,ask:!0}:null)}}),f.query&&f.ask&&c?(0,n.jsx)(j,{pointer:t,query:f.query}):null]})}},66353:function(e,t,r){"use strict";r.d(t,{R:function(){return s},q:function(){return i}});var n=r(87564),a=r(7653);let l={q:n.Oi,ask:n.AE,global:n.AE};function s(){let[e,t]=(0,n.XI)(l,{history:"replace"}),r=a.useMemo(()=>null===e||null===e.q?null:{query:e.q,ask:!!e.ask,global:!!e.global},[e]),s=a.useRef(r);return a.useLayoutEffect(()=>{s.current=r},[r]),[r,a.useCallback(e=>("function"==typeof e&&(e=e(s.current)),null===e)?t({q:null,ask:null,global:null}):t({q:e.query,ask:!!e.ask||null,global:!!e.global||null}),[t])]}function i(){let[,e]=s();return a.useCallback(t=>{var r;let n=new URLSearchParams;return n.set("q",null!==(r=t.query)&&void 0!==r?r:""),t.ask?n.set("ask","on"):n.delete("ask"),t.global?n.set("global","on"):n.delete("global"),{href:"?"+n.toString(),prefetch:!1,onClick:r=>{r.preventDefault(),e(e=>({query:"",ask:!1,global:!1,...null!=e?e:{},...t}))}}},[e])}},89531:function(e,t,r){"use strict";r.r(t),r.d(t,{SiteSectionTabs:function(){return c}});var n=r(27573),a=r(7653),l=r(33298),s=r(53902),i=r(42172);function o(e){let{icon:t,isActive:r}=e;return(0,n.jsx)(i.JO,{icon:t,className:(0,l.t)("size-[1em] text-inherit opacity-8",r&&"text-inherit opacity-10")})}function c(e){var t,r;let{list:s,index:i}=e,c=a.useRef(null),u=a.useRef(null),[h,f]=a.useState(null),m=a.useCallback(()=>{if(c.current&&u.current){let e=c.current.getBoundingClientRect(),t=u.current.getBoundingClientRect();f({left:e.left-t.left,width:e.width})}},[]);a.useEffect(()=>{i>=0&&m()},[i,m]),a.useLayoutEffect(()=>{window.addEventListener("load",m),window.addEventListener("resize",m)},[m]);let x=(null!==(t=null==h?void 0:h.width)&&void 0!==t?t:0)*.01,p="".concat(null!==(r=null==h?void 0:h.left)&&void 0!==r?r:0,"px");return s.length>0?(0,n.jsx)("nav",{"aria-label":"Sections",ref:u,className:"flex flex-nowrap items-center mb-px max-w-screen-2xl mx-auto page-full-width:max-w-full",style:{"--tab-opacity":"".concat(h?1:0),"--tab-scale":"".concat(x),"--tab-start":"".concat(p)},children:(0,n.jsxs)("div",{className:"flex flex-col bg-transparent",children:[(0,n.jsx)("div",{role:"tablist",className:(0,l.t)("flex flex-row gap-2","px-1","sm:px-3","md:px-5"),children:s.map((e,t)=>{var r;let{id:a,urls:l,title:s,icon:u}=e,h=t===i;return(0,n.jsx)(d,{active:h,label:s,href:null!==(r=l.published)&&void 0!==r?r:"",ref:h?c:null,icon:u?(0,n.jsx)(o,{isActive:h,icon:u}):null},a)})}),(0,n.jsx)("div",{className:(0,l.t)("flex","relative","after:block","after:content-['']","after:origin-left","after:absolute","after:-bottom-px","after:left-0","after:opacity-[--tab-opacity]","after:scale-x-[--tab-scale]","after:[transition:_opacity_150ms_25ms,transform_150ms]","after:motion-reduce:transition-none","after:translate-x-[var(--tab-start)]","after:will-change-transform","after:h-0.5","after:w-[100px]","after:bg-primary","dark:after:bg-primary-400")})]})}):null}let d=a.forwardRef(function(e,t){let{active:r,href:a,icon:i,label:o}=e;return(0,n.jsx)(s.rU,{className:(0,l.t)("group/tab px-3 py-1 my-2 rounded straight-corners:rounded-none transition-colors",r&&"text-primary dark:text-primary-400",!r&&"text-dark/8 hover:bg-dark/1 hover:text-dark/9 dark:text-light/8 dark:hover:bg-light/2 dark:hover:text-light/9"),role:"tab",href:a,children:(0,n.jsxs)("span",{ref:t,className:(0,l.t)("flex gap-2 items-center w-full truncate"),children:[i,o]})})})},19656:function(e,t,r){"use strict";r.d(t,{L:function(){return o},TOCScrollContainer:function(){return i}});var n=r(27573),a=r(7653),l=r(33298);let s=a.createContext(null);function i(e){let{children:t,className:r}=e,i=a.createRef();return(0,n.jsx)(s.Provider,{value:i,children:(0,n.jsx)("div",{ref:i,className:(0,l.t)(r),children:t})})}function o(e){let{isActive:t,linkRef:r}=e,n=function(){let e=a.useContext(s);if(!e)throw Error("Context `TOCScrollContainerRefContext` must be used within Provider");return e}(),l=a.useRef(!1);a.useLayoutEffect(()=>{if(!t){l.current=!1;return}if(l.current)return;let e=r.current,a=n.current;e&&a&&function(e,t){let r=e.offsetTop,n=t.scrollTop,a=n+t.clientHeight;return ra-200}(e,a)&&(null==a||a.scrollTo({top:e.offsetTop-200}),l.current=!0)},[t,r,n])}},66185:function(e,t,r){"use strict";r.d(t,{ToggleableLinkItem:function(){return g}});var n=r(27573),a=r(42172),l=r(11349),s=r(74489),i=r(72354),o=r(81695),c=r(7653),d=r(33298),u=r(19656),h=r(54533),f=r(53902);let m={opacity:1,height:"auto",display:"block"},x={opacity:0,height:0,transitionEnd:{display:"none"}},p=(0,l.E)(.02,{ease:e=>Math.pow(e,2)});function g(e){var t;let{href:r,children:l,descendants:g,pathname:v,insights:b}=e,k=decodeURIComponent(null!==(t=(0,o.useSelectedLayoutSegment)())&&void 0!==t?t:""),y=k===v,w=!!g,j=w&&(y||k.startsWith(v+"/")),[N,_]=(0,s.H)(),[C,E]=c.useState(j),q=(0,h.tm)();c.useEffect(()=>{w&&E(e=>e||j)},[j,w]),c.useEffect(()=>{if(q&&w)try{_(N.current,C?m:x,{duration:.1});let e="& > ul > li";C?_(e,{opacity:1},{delay:p}):_(e,{opacity:0})}catch(e){console.error(e)}},[C,q,w,_,N]);let P=c.createRef();return(0,u.L)({linkRef:P,isActive:y}),(0,n.jsxs)("div",{children:[(0,n.jsxs)(f.rU,{ref:P,href:r,insights:b,...y?{"aria-current":"page"}:{},className:(0,d.t)("group/toclink","flex","flex-row","justify-between","pl-5","pr-1.5","py-1.5","text-sm","transition-colors","relative","text-balance","before:border-l","before:absolute","before:left-[-1px]","before:top-0","before:h-full","rounded-md","straight-corners:rounded-none","[&+div_a]:rounded-l-none",y?["before:border-primary-500","font-semibold","text-primary","hover:bg-primary/3","dark:before:border-primary-400","dark:text-primary-400","hover:before:border-primary","dark:hover:bg-primary-500/3","dark:hover:before:border-primary"]:["before:border-transparent","font-normal","text-dark/8","hover:bg-dark/1","hover:text-dark/9","hover:before:border-dark/3","dark:text-light/8","dark:hover:bg-light/2","dark:hover:before:border-light/3","dark:hover:text-light/9"]),children:[l,w?(0,n.jsx)("span",{className:(0,d.t)("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-dark/2","hover:text-current","dark:hover:bg-light/2","dark:hover:text-current",y?["hover:bg-primary/4","dark:hover:bg-primary/4"]:[]),onClick:e=>{e.preventDefault(),e.stopPropagation(),E(e=>!e)},children:(0,n.jsx)(a.JO,{icon:"chevron-right",className:(0,d.t)("grid","flex-shrink-0","size-3","m-1","transition-[opacity]","text-current","transition-transform","[opacity:0.40]","group-hover:[opacity:1]",C?["rotate-90"]:["rotate-0"])})}):null]}),w?(0,n.jsx)(i.E.div,{ref:N,className:(0,d.t)(C?null:"[&_ul>li]:opacity-1"),initial:C?m:x,children:g}):null]})}},42663:function(e,t,r){"use strict";r.r(t),r.d(t,{ThemeToggler:function(){return c}});var n=r(27573),a=r(42172),l=r(54689),s=r(7653),i=r(63530),o=r(33298);function c(e){let t=(0,i.ZK)(),[r,a]=s.useState(!1),{theme:c,setTheme:u}=(0,l.F)();s.useEffect(()=>{a(!0)},[]);let h=e=>{u(e)};return(0,n.jsxs)("div",{role:"radiogroup",className:(0,o.t)("flex","flex-row","rounded-full","straight-corners:rounded-sm","border","border-dark/3","dark:border-light/2"),children:[(0,n.jsx)(d,{active:r&&"light"===c,icon:"sun-bright",onClick:()=>h("light"),title:(0,i.Ff)(t,"switch_to_light_theme")}),(0,n.jsx)(d,{active:r&&"system"===c,icon:"desktop",onClick:()=>h("system"),title:(0,i.Ff)(t,"switch_to_system_theme")}),(0,n.jsx)(d,{active:r&&"dark"===c,icon:"moon",onClick:()=>h("dark"),title:(0,i.Ff)(t,"switch_to_dark_theme")})]})}function d(e){let{icon:t,onClick:r,title:l,active:s}=e;return(0,n.jsx)("button",{type:"button",role:"radio",onClick:r,"aria-label":l,"aria-checked":s,className:(0,o.t)("p-1","m-1","group","rounded-full","straight-corners:rounded-sm",s?["bg-primary-600/4","dark:bg-primary-400/2"]:null,"text-dark","dark:text-light/7"),children:(0,n.jsx)(a.JO,{icon:t,className:(0,o.t)("size-4",s?["text-primary-600","dark:text-primary-400"]:null)})})}},60311:function(e){e.exports={containerHeaderlinks:"headerLinks_containerHeaderlinks__GUgiv",linkEllipsis:"headerLinks_linkEllipsis__Z01IN"}}},function(e){e.O(0,[404,5860,5579,8146,1281,5458,95,985,7695,559,1293,9978,1744],function(){return e(e.s=76704)}),_N_E=e.O()}]); //# sourceMappingURL=layout-4fef239cc37a9e67.js.map