forked from bombastictranz/public-docs
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
layout-a94a3882a296acee.js.download
2 lines (2 loc) · 24.1 KB
/
layout-a94a3882a296acee.js.download
1
2
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[666],{8800:function(e,t,r){Promise.resolve().then(r.bind(r,60700)),Promise.resolve().then(r.bind(r,55101)),Promise.resolve().then(r.bind(r,63473)),Promise.resolve().then(r.bind(r,91487)),Promise.resolve().then(r.bind(r,24684)),Promise.resolve().then(r.bind(r,16051)),Promise.resolve().then(r.t.bind(r,6003,23)),Promise.resolve().then(r.bind(r,95666)),Promise.resolve().then(r.bind(r,27700)),Promise.resolve().then(r.bind(r,31355)),Promise.resolve().then(r.bind(r,33597)),Promise.resolve().then(r.bind(r,49013)),Promise.resolve().then(r.bind(r,96250)),Promise.resolve().then(r.bind(r,80510)),Promise.resolve().then(r.bind(r,32850)),Promise.resolve().then(r.bind(r,22505)),Promise.resolve().then(r.bind(r,6880)),Promise.resolve().then(r.bind(r,31054))},24684:function(e,t,r){"use strict";r.r(t),r.d(t,{ClientContexts:function(){return l}});var n=r(57437),a=r(91774);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(2265)},16051:function(e,t,r){"use strict";r.r(t),r.d(t,{CookiesToast:function(){return u}});var n=r(57437),a=r(35275),l=r(2265),s=r(25361),o=r(21945),i=r(41185),c=r(23531),d=r(28310);function u(e){let{privacyPolicy:t="https://policies.gitbook.com/privacy/cookies"}=e,[r,u]=l.useState(!1),h=(0,o.ZK)();if(l.useEffect(()=>{u(void 0===(0,c.Bi)())},[]),!r)return null;let f=e=>{(0,c.GQ)(e),window.location.reload()},p="cookies-description";return(0,n.jsxs)("div",{role:"dialog","data-testid":"cookies-dialog","aria-modal":"true","aria-label":(0,i.F)(h,"cookies_title"),"aria-describedby":p,className:(0,d.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:p,className:(0,d.t)("text-sm"),children:(0,i.t)(h,"cookies_prompt",(0,n.jsx)("a",{href:t,className:(0,d.t)("text-primary-500","hover:text-primary-600","underline"),children:(0,i.t)(h,"cookies_prompt_privacy")}))}),(0,n.jsx)("button",{onClick:()=>u(!1),"aria-label":(0,i.F)(h,"cookies_close"),className:(0,d.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,i.F)(h,"cookies_close"),children:(0,n.jsx)(a.default,{className:(0,d.t)("w-4")})}),(0,n.jsxs)("div",{className:(0,d.t)("mt-3","flex","flex-row","gap-2"),children:[(0,n.jsx)(s.zx,{variant:"primary",size:"small","aria-label":(0,i.F)(h,"cookies_accept"),onClick:()=>{f(!0)},children:(0,i.t)(h,"cookies_accept")}),(0,n.jsx)(s.zx,{variant:"secondary",size:"small","aria-label":(0,i.F)(h,"cookies_reject"),onClick:()=>{f(!1)},children:(0,i.t)(h,"cookies_reject")})]})]})}},95666:function(e,t,r){"use strict";r.r(t),r.d(t,{HeaderMobileMenu:function(){return d}});var n=r(57437),a=r(47907),l=r(2265);function s(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",...e,children:(0,n.jsx)("path",{d:"M3 12h18M3 6h18M3 18h18"})})}var o=r(21945),i=r(28310);let c="navigation-open";function d(e){let t=(0,o.ZK)(),r=(0,a.usePathname)(),[d,u]=(0,l.useState)(!1),h=()=>{window.scrollY>=320?u(!0):u(!1)};return(0,l.useEffect)(()=>{document.body.classList.remove(c)},[r]),(0,l.useEffect)(()=>(window.addEventListener("scroll",h),()=>{window.removeEventListener("scroll",h)}),[]),(0,n.jsx)("button",{...e,"aria-label":(0,o.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))},children:(0,n.jsx)(s,{className:(0,i.t)("w-7","h-7","rounded","straight-corners:rounded-sm","text-inherit","hover:bg-dark/3","p-[0.25rem]","dark:hover:bg-light/2")})})}},27700:function(e,t,r){"use strict";r.r(t),r.d(t,{LoadIntegrations:function(){return a}});var n=r(2265);function a(){return n.useEffect(()=>{(function(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];((null===(t=window.GitBook)||void 0===t?void 0:t.events.get(e))||[]).forEach(e=>e(...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)}}},80510:function(e,t,r){"use strict";r.r(t),r.d(t,{SearchButton:function(){return c}});var n=r(57437),a=r(6484),l=r(2265),s=r(21945),o=r(28310),i=r(44352);function c(e){let{style:t,children:r}=e,l=(0,s.ZK)(),[,c]=(0,i.R)();return(0,n.jsxs)("button",{onClick:()=>{c({ask:!1,global:!1,query:""})},"aria-label":(0,s.Ff)(l,"search"),className:(0,o.t)("flex","flex-1","flex-row","justify-center","items-center","px-2","gap-3","text-dark/7","min-h-[2.5rem]","w-[2.5rem]","rounded-lg","straight-corners:rounded-none","bg-dark/2","transition-colors","transition-opacity","ease-out","hover:opacity-8","ring-1","ring-inset","ring-dark/1","dark:bg-light/1","dark:ring-light/1","dark:text-light/7","[&>p]:hidden","[&>span]:hidden","md:justify-start","md:[&>p]:flex","md:[&>span]:flex","md:w-full","md:px-3.5","text-base",t),children:[(0,n.jsx)("div",{className:(0,o.t)("text-dark/7","pt-1.5","pb-2","dark:text-light/7"),children:(0,n.jsx)(a.default,{className:(0,o.t)("shrink-0","w-5","h-5")})}),r,(0,n.jsx)(d,{})]})}let d=()=>{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)("span",{className:(0,o.t)("hidden","md:inline","justify-end","text-xs","text-dark/5","dark:text-light/5",'[font-feature-settings:"calt",_"case"]'),children:["mac"===e?"⌘":"Ctrl"," + K"]})}},32850:function(e,t,r){"use strict";r.r(t),r.d(t,{SearchModal:function(){return I}});var n=r(57437),a=r(6484),l=r(46368),s=r(1843),o=r(47907),i=r(2265),c=r(12236),d=r(32153),u=r(21945),h=r(28310),f=r(37635),p=r(25361),m=r(41185);r(15355);var x=r(13472),k=(0,x.$)("3bfadf8190e59c18e7919c653aa172b37350ca62"),g=(0,x.$)("21c2e390afc137ba53026b03b7d4509b7fc84ff7"),v=(0,x.$)("6010784ba60bc0f2acaad43c58d2112544b151b4"),b=(0,x.$)("53c5d6519c2fd6357416d3b17564542d3557bb29"),y=r(44352);let w=(0,d.cn)({key:"searchAskState",default:null});function j(e){let{spaceId:t,query:r}=e,a=(0,u.ZK)(),[,l]=(0,y.R)(),[s,o]=(0,d.FV)(w);return i.useEffect(()=>{let e=!1;return o({type:"loading"}),(async()=>{var n;let a=(n=b(t,r),{[Symbol.asyncIterator]:function(){return{current:n,async next(){let{iteratorResult:e,next:t}=await this.current;return t?this.current=t:e.done=!0,e}}}});for await(let t of(l(e=>e?{...e,ask:!0,query:r}:null),a)){if(e)return;o({type:"answer",answer:t})}})().catch(t=>{e||o({type:"error"})}),()=>{e=!0}},[t,r,l,o]),i.useEffect(()=>()=>{o(null)},[o]),(0,n.jsxs)("div",{className:(0,h.t)("max-h-[60vh]","overflow-y-auto","border-t","border-dark/2","dark:border-light/1"),children:[(null==s?void 0:s.type)==="answer"?(0,n.jsx)(n.Fragment,{children:s.answer?(0,n.jsx)("div",{className:(0,h.t)("w-full"),children:(0,n.jsx)(_,{answer:s.answer})}):(0,n.jsx)("div",{className:(0,h.t)("p-4"),children:(0,m.t)(a,"search_ask_no_answer")})}):null,(null==s?void 0:s.type)==="error"?(0,n.jsx)("div",{className:(0,h.t)("p-4"),children:(0,m.t)(a,"search_ask_error")}):null,(null==s?void 0:s.type)==="loading"?(0,n.jsx)("div",{className:(0,h.t)("w-full","flex","items-center","justify-center"),children:(0,n.jsx)(p.gb,{className:(0,h.t)("w-5","py-4","text-primary")})}):null]})}function _(e){let{answer:t}=e,r=(0,y.q)(),l=(0,u.ZK)(),[,s]=(0,y.R)(),o=()=>{s(null)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{"data-test":"search-ask-answer",className:(0,h.t)("mt-4","px-4","text-dark/9","dark:text-light/8"),children:t.body}),t.followupQuestions.length>0?(0,n.jsx)("div",{className:(0,h.t)("mt-7","flex","flex-col","flex-wrap","gap-1"),children:t.followupQuestions.map(e=>(0,n.jsxs)(p.rU,{className:(0,h.t)("text-sm","font-medium","inline-flex","items-start","gap-2","px-4","py-1","text-primary-500","focus-within:text-primary-700","hover:bg-primary/2","dark:text-primary-400","dark:hover:bg-primary-500/3"),...r({query:e,ask:!0}),children:[(0,n.jsx)(a.default,{className:(0,h.t)("w-[15px]","h-[15px]","shrink-0","mt-0.5","[&>path]:[stroke-opacity:0.64]")}),(0,n.jsx)("span",{children:e})]},e))}):null,t.sources.length>0?(0,n.jsxs)("div",{className:(0,h.t)("flex","flex-wrap","gap-2","mt-7","py-4","px-4","border-t","border-dark/2","dark:border-light/1"),children:[(0,n.jsx)("span",{className:(0,h.t)("text-sm"),children:(0,m.t)(l,"search_ask_sources")}),t.sources.map(e=>(0,n.jsx)("span",{className:(0,h.t)(),children:(0,n.jsxs)(p.rU,{onClick:o,className:(0,h.t)("flex","text-sm","text-dark/7","hover:underline","focus-within:text-primary-700","dark:text-light/8"),href:e.href,prefetch:!1,children:[(0,n.jsx)(f.default,{className:(0,h.t)("stroke-dark/6","w-[15px]","h-[15px]","shrink-0","mt-0.5","mr-0.5","dark:stroke-light/6")}),e.title]})},e.id))]}):null]})}var N=r(51003);let C=new Set(["who","what","where","when","why","how","explain","is","are","was","were","do","does","did","which","whom","whose","can","have","give","tell","show","find"]);function q(e){let{query:t,text:r,highlight:a=["text-bold","text-primary"]}=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,h.t)("whitespace-break-spaces"),children:l.map((e,t)=>(0,n.jsx)("span",{className:(0,h.t)(e.match?a:null),children:e.text},t))})}let E=i.forwardRef(function(e,t){let{query:r,item:a,active:l,onClick:s}=e;return(0,n.jsxs)(p.rU,{ref:t,href:a.href,onClick:e=>{e.preventDefault(),s(a.href)},className:(0,h.t)("flex","flex-row","px-6","py-3","hover:bg-dark-4/2","text-base","text-dark","font-semibold","first:mt-0","[&:has(+.search-section-result-item):not(:first-child)]:mt-6","dark:text-light","dark:hover:bg-light-4/2",l?["bg-dark/1","dark:bg-light/1"]:null),children:[a.spaceTitle?(0,n.jsx)("span",{className:(0,h.t)("opacity-6","font-normal","mr-2"),children:a.spaceTitle+" ›"}):null,(0,n.jsx)(q,{query:r,text:a.title})]})}),P=i.forwardRef(function(e,t){let{question:r,recommended:l=!1,active:s,onClick:o}=e,i=(0,u.ZK)(),c=(0,y.q)();return(0,n.jsxs)(p.rU,{ref:t,onClick:o,className:(0,h.t)("flex","flex-row","px-4","py-2","hover:bg-dark-4/2","text-dark/7","text-sm","font-medium","first:mt-0","last:pb-3","dark:text-light/8","dark:hover:bg-light-4/2",s?["bg-dark/1","dark:bg-light/1"]:null),...c({ask:!0,query:r}),children:[(0,n.jsx)(a.default,{className:(0,h.t)("w-[15px]","h-[15px]","shrink-0","mt-0.5","mr-2","stroke-dark/5","dark:stroke-light/5")}),l?r:(0,u.t)(i,"search_ask",[r])]})}),R=i.forwardRef(function(e,t){let{query:r,item:a,active:l,onClick:s}=e;return(0,n.jsx)(p.rU,{ref:t,href:a.href,onClick:e=>{e.preventDefault(),s(a.href)},className:(0,h.t)("search-section-result-item","[&:has(+:not(&))]:mb-6","flex","flex-col","pl-6","hover:bg-dark-4/2","dark:hover:bg-light-4/2",l?["bg-dark/1","dark:bg-light/1"]:null),children:(0,n.jsxs)("div",{className:(0,h.t)("border-l","p-3","border-dark/2","dark:border-light/2"),children:[a.title?(0,n.jsx)("p",{className:(0,h.t)("text-base","text-dark/7","dark:text-light/8"),children:(0,n.jsx)(q,{query:r,text:a.title})}):null,a.body?(0,n.jsx)("p",{className:(0,h.t)("text-sm","text-dark","line-clamp-6","linear-mask-gradient","z-[-1]","relative","dark:text-light/8"),children:(0,n.jsx)(q,{query:r,text:a.body})}):null]})})}),L=i.forwardRef(function(e,t){let{children:r,query:a,spaceId:l,revisionId:s,parent:o,withAsk:c,onSwitchToAsk:d,onClose:f}=e,m=(0,u.ZK)(),x=i.useRef(null),[b,y]=i.useState(null),[w,j]=i.useState(null),_=i.useRef([]),C=i.useRef(null);i.useEffect(()=>{if(a)return c&&y(e=>S(e,a)),x.current=setTimeout(async()=>{j(null);let e=await (o?v(o,a):g(l,s,a));y(c?S(e,a):e)},250),()=>{x.current&&(clearTimeout(x.current),x.current=null)};{if(!c)return;let e=!1;return(C.current?Promise.resolve(C.current):k(l)).then(t=>{C.current=t,e||y(t.map(e=>({type:"recommended-question",id:e,question:e})))}),()=>{e=!0}}},[a,l,s,o,c]),i.useEffect(()=>{var e;null!==w&&_.current[w]&&(null===(e=_.current[w])||void 0===e||e.scrollIntoView({block:"nearest",inline:"nearest"}))},[w,_]);let q=i.useCallback(e=>{b&&j(t=>null===t?0:Math.max(Math.min(t+e,b.length-1),0))},[b]),L=i.useCallback(()=>{var e;null!==w&&_.current[w]&&(null===(e=_.current[w])||void 0===e||e.click())},[w,_]);return(i.useImperativeHandle(t,()=>({moveUp:()=>{q(-1)},moveDown:()=>{q(1)},select:L}),[q,L]),b)?(0,n.jsxs)("div",{className:(0,h.t)("max-h-[60vh]","overflow-auto","relative","shadow-[0_1px_0_0_inset]","shadow-dark/2","dark:shadow-light/2"),children:[r,0===b.length?(0,n.jsx)("div",{"data-test":"search-noresults",className:(0,h.t)("text-sm","text-dark","p-6","text-center","dark:text-light/8"),children:(0,u.t)(m,"search_no_results",a)}):(0,n.jsx)("div",{"data-test":"search-results",children:b.map((e,t)=>{switch(e.type){case"page":return(0,n.jsx)(E,{ref:e=>{_.current[t]=e},query:a,item:e,active:t===w,onClick:f},e.id);case"question":return(0,n.jsx)(P,{ref:e=>{_.current[t]=e},question:a,active:t===w,onClick:d},e.id);case"recommended-question":return(0,n.jsx)(P,{ref:e=>{_.current[t]=e},question:e.question,active:t===w,onClick:d,recommended:!0},e.id);case"section":return(0,n.jsx)(R,{ref:e=>{_.current[t]=e},query:a,item:e,active:t===w,onClick:f},e.id);default:(0,N.ZP)(e)}})})]}):a?(0,n.jsx)("div",{className:(0,h.t)("flex","items-center","justify-center","py-8"),children:(0,n.jsx)(p.gb,{className:(0,h.t)("w-6","text-primary")})}):null});function S(e,t){let r=e?e.filter(e=>"question"!==e.type):null;return!function(e){if(e.length>25||e.includes("?")||e.includes(" "))return!0;let t=e.toLowerCase().trim().split(/\s+/);if(0===t.length)return!1;for(let e of t)if(C.has(e))return!0;return!1}(t)?r:[{type:"question",id:"question",query:t},...null!=r?r:[]]}function F(e){let{spaceTitle:t}=e,[r,a]=(0,y.R)(),l=(0,u.ZK)();return r?(0,n.jsxs)("div",{role:"toolbar","aria-orientation":"horizontal",className:(0,h.t)("overflow-x-auto","hide-scroll","flex","flex-row","py-3","gap-0","px-0","pt-0","sticky","z-[0]","w-[calc(100%-1px)]","left-[1px]","top-[0px]","bg-gradient-to-b","from-white","to-transparent","from-60%","dark:from-dark-4","dark:to-transparent","shadow-[0_1px_0_0_inset]","shadow-dark/2","dark:shadow-light/2","md:px-6","md:gap-3"),children:[(0,n.jsx)(U,{active:!r.global,onClick:()=>{a({...r,global:!1})},children:(0,u.t)(l,"search_scope_space",t)}),(0,n.jsx)(U,{active:r.global,onClick:()=>{a({...r,global:!0})},children:(0,u.t)(l,"search_scope_all")})]}):null}function U(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,h.t)("text-xs","transition-colors","duration-75","px-2.5","py-1.5","border-t","relative","top-[0px]","z-[1]","border-dark/2","whitespace-pre","hover:border-dark/6","dark:hover:border-light/6","md:px-1",a?["text-primary-400","border-primary-400","hover:border-primary-400","dark:hover:text-primary-400","dark:border-primary-400","dark:hover:border-primary-400"]:null),children:r})}var D=r(64835);function I(e){let[t,r]=(0,y.R)(),a=(0,d.sJ)(w),u=(0,o.useRouter)();(0,c.y1)("mod+k",e=>{e.preventDefault(),r({ask:!1,query:"",global:!1})},[]);let f=null!==t;if(i.useEffect(()=>(f&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="auto"}),[f]),null===t)return null;let p=async e=>{await r(null),e&&u.push(e)};return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{role:"dialog",className:(0,h.t)("flex","items-start","justify-center","fixed","inset-0","bg-dark/4","backdrop-blur-2xl","opacity-[1]","z-30","px-4","pt-4","dark:bg-dark/8","md:pt-[min(8vw,_6rem)]"),onClick:()=>{p()},children:[(0,n.jsx)(l.M,{children:(null==a?void 0:a.type)==="loading"?(0,n.jsx)(s.E.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:1},className:(0,h.t)("w-[100vw]","h-[100vh]","fixed","inset-0","z-10","pointer-events-none"),children:(0,n.jsx)(D.K,{gridStyle:["h-[100vh]","aspect-auto","top-[-30%]"],pulse:!0,tile:96,style:["grid"]})},"loading"):null}),(0,n.jsx)(M,{...e,state:t,onChangeQuery:e=>{r(e)},onClose:p})]})})}function M(e){let{spaceId:t,revisionId:r,spaceTitle:l,withAsk:s,parent:o,state:c,onChangeQuery:d,onClose:f}=e,p=(0,u.ZK)(),m=i.useRef(null),x=i.useRef(null);return i.useEffect(()=>{var e;null===(e=x.current)||void 0===e||e.focus()},[]),(0,n.jsxs)("div",{role:"dialog","aria-label":(0,u.Ff)(p,"search"),className:(0,h.t)("z-40","flex","flex-col","bg-white","max-w-[768px]","mt-[-1px]","w-full","max-h","rounded-lg","ring-1","ring-dark/1","shadow-2xl","backdrop-blur-lg","overflow-hidden","dark:ring-inset","dark:bg-dark-3","dark:ring-light/2"),onClick:e=>{e.stopPropagation()},children:[(0,n.jsxs)("div",{className:(0,h.t)("flex","flex-row","items-center"),children:[(0,n.jsx)("div",{className:(0,h.t)("text-dark/4","p-3","dark:text-light/5"),children:(0,n.jsx)(a.default,{className:(0,h.t)("w-6","h-6")})}),(0,n.jsx)("div",{className:(0,h.t)("flex-1"),children:(0,n.jsx)("input",{ref:x,value:c.query,onKeyDown:e=>{var t,r,n;"Escape"===e.key?f():"ArrowUp"===e.key?(e.preventDefault(),null===(t=m.current)||void 0===t||t.moveUp()):"ArrowDown"===e.key?(e.preventDefault(),null===(r=m.current)||void 0===r||r.moveDown()):"Enter"===e.key&&(e.preventDefault(),null===(n=m.current)||void 0===n||n.select())},onChange:e=>{d({ask:!1,query:e.target.value,global:c.global})},className:(0,h.t)("text-dark","placeholder:text-dark/7","flex","resize-none","w-full","h-12","p-2","focus:outline-none","bg-transparent","whitespace-pre-line","dark:text-light","dark:placeholder:text-light/7"),placeholder:(0,u.Ff)(p,s?"search_ask_input_placeholder":"search_input_placeholder"),spellCheck:"false",autoComplete:"off",autoCorrect:"off"})})]}),c.ask&&s?null:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(L,{ref:m,spaceId:t,revisionId:r,parent:c.global?o:null,query:c.query,withAsk:s,onSwitchToAsk:()=>{d({ask:!0,query:c.query,global:c.global})},onClose:f,children:o&&c.query?(0,n.jsx)(F,{spaceTitle:l}):null})}),c.query&&c.ask&&s?(0,n.jsx)(j,{spaceId:t,query:c.query}):null]})}},44352:function(e,t,r){"use strict";r.d(t,{R:function(){return o},q:function(){return i}});var n=r(21920),a=r(2265);let l={q:n.Oi,ask:n.AE,global:n.AE},s={history:"replace"};function o(){let[e,t]=(0,n.XI)(l,s),r=a.useMemo(()=>null===e||null===e.q?null:{query:e.q,ask:!!e.ask,global:!!e.global},[e]),o=a.useRef(r);return a.useLayoutEffect(()=>{o.current=r},[r]),[r,a.useCallback(e=>("function"==typeof e&&(e=e(o.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]=o();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])}},22505:function(e,t,r){"use strict";r.r(t),r.d(t,{ToggleableLinkItem:function(){return m}});var n=r(57437),a=r(84989),l=r(26990),s=r(21870),o=r(1843),i=r(47907),c=r(2265),d=r(28310),u=r(25361);let h={opacity:1,height:"auto",display:"block"},f={opacity:0,height:0,transitionEnd:{display:"none"}},p=(0,l.E)(.02,{ease:e=>Math.pow(e,2)});function m(e){var t;let{href:r,children:l,descendants:m,pathname:x}=e,k=decodeURIComponent(null!==(t=(0,i.useSelectedLayoutSegment)())&&void 0!==t?t:""),g=k===x,v=!!m,b=v&&(g||k.startsWith(x+"/")),[y,w]=(0,s.H)(),[j,_]=c.useState(b);c.useEffect(()=>{v&&_(e=>e||b)},[b,v]),c.useEffect(()=>{if(N.current&&v)try{w(y.current,j?h:f,{duration:.1});let e="& > ul > li";j?w(e,{opacity:1},{delay:p}):w(e,{opacity:0})}catch(e){console.error(e)}},[j,v,w,y]);let N=c.useRef(!1);return c.useEffect(()=>{N.current=!0},[]),(0,n.jsxs)("div",{children:[(0,n.jsxs)(u.rU,{href:r,className:(0,d.t)("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",g?["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,v?(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",g?["hover:bg-primary/4","dark:hover:bg-primary/4"]:[]),onClick:e=>{e.preventDefault(),e.stopPropagation(),_(e=>!e)},children:(0,n.jsx)(a.default,{className:(0,d.t)("grid","flex-shrink-0","w-5","h-5","p-0.5","[&>path]:transition-[stroke-opacity]","text-current","transition-transform","[&>path]:[stroke-opacity:0.40]","group-hover:[&>path]:[stroke-opacity:1]",j?["rotate-90"]:["rotate-0"])})}):null]}),v?(0,n.jsx)(o.E.div,{ref:y,className:(0,d.t)(j?null:"[&_ul>li]:opacity-1"),initial:j?h:f,children:m}):null]})}},6880:function(e,t,r){"use strict";r.r(t),r.d(t,{ThemeToggler:function(){return u}});var n=r(57437),a=r(66089),l=r(40636),s=r(7924),o=r(91774),i=r(2265),c=r(21945),d=r(28310);function u(e){let t=(0,c.ZK)(),[r,u]=i.useState(!1),{theme:f,setTheme:p}=(0,o.F)();i.useEffect(()=>{u(!0)},[]);let m=e=>{p(e)};return(0,n.jsxs)("div",{role:"radiogroup",className:(0,d.t)("flex","flex-row","rounded-full","straight-corners:rounded-sm","border","border-dark/3","dark:border-light/2"),children:[(0,n.jsx)(h,{active:r&&"light"===f,icon:s.default,onClick:()=>m("light"),title:(0,c.Ff)(t,"switch_to_light_theme")}),(0,n.jsx)(h,{active:r&&"system"===f,icon:a.default,onClick:()=>m("system"),title:(0,c.Ff)(t,"switch_to_system_theme")}),(0,n.jsx)(h,{active:r&&"dark"===f,icon:l.default,onClick:()=>m("dark"),title:(0,c.Ff)(t,"switch_to_dark_theme")})]})}function h(e){let{icon:t,onClick:r,title:a,active:l}=e;return(0,n.jsx)("button",{type:"button",role:"radio",onClick:r,"aria-label":a,"aria-checked":l,className:(0,d.t)("p-1","m-1","group","rounded-full","straight-corners:rounded-sm",l?["bg-primary-600/4","dark:bg-primary-400/2"]:null,"text-dark","dark:text-light/7"),children:(0,n.jsx)(t,{className:(0,d.t)("w-4","h-4",l?["stroke-primary-600","dark:stroke-primary-400"]:null)})})}},23531:function(e,t,r){"use strict";r.d(t,{Bi:function(){return u},GQ:function(){return d},OP:function(){return i}});var n=r(98955),a=r(49079);let l="__gitbook_cookie_granted",s=null,o=null;async function i(){return s||(o||(o=c().finally(()=>{o=null})),s=await o),s}async function c(){if(u())return h();let e=n.Z.get("__session");if(e)return e;{var t;let e=h(),r=new URL(null!==(t=a.env.NEXT_PUBLIC_GITBOOK_APP_URL)&&void 0!==t?t:"https://app.gitbook.com");r.pathname="/__session",r.searchParams.set("proposed",e);try{let e=await fetch(r,{method:"GET",credentials:"include",cache:"no-cache",mode:"cors"}),{deviceId:t}=await e.json();return t}catch(t){return console.error("Failed to fetch visitor session ID",t),e}}}function d(e){n.Z.set(l,e?"yes":"no",{expires:365})}function u(){let e=n.Z.get(l);return"yes"!==e&&("no"===e||void 0)}function h(){return"undefined"!=typeof crypto&&crypto.randomUUID?"".concat(crypto.randomUUID(),"R"):"".concat(Math.random().toString(36).substring(2),"R")}},6003:function(e){e.exports={containerHeaderlinks:"headerLinks_containerHeaderlinks__GUgiv"}}},function(e){e.O(0,[691,769,982,423,236,359,361,971,681,744],function(){return e(e.s=8800)}),_N_E=e.O()}]);
//# sourceMappingURL=layout-a94a3882a296acee.js.map