(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9028],{48519:function(t,e,n){"use strict";n.d(e,{AnnotationPopover:function(){return o}});var a=n(27573),r=n(2515);n(7653);var i=n(63530),l=n(33298);function o(t){let{children:e,body:n}=t,o=(0,i.ZK)();return(0,a.jsxs)(r.fC,{children:[(0,a.jsx)(r.xz,{asChild:!0,children:(0,a.jsx)("button",{"data-testid":"annotation-button","aria-label":(0,i.Ff)(o,"annotation_button_label"),className:(0,l.t)("decoration-dotted","decoration-1","underline","underline-offset-2"),children:e})}),(0,a.jsx)(r.h_,{children:(0,a.jsxs)(r.VY,{className:(0,l.t)("text-sm","max-w-[280px]","bg-light","ring-1","ring-dark/2","rounded","shadow-1xs","shadow-dark/1","p-3","[&_p]:leading-snug","dark:bg-dark","dark:ring-light/2","dark:shadow-dark/4","-outline-offset-2","outline-2","outline-primary/8","z-20"),sideOffset:5,children:[n,(0,a.jsx)(r.Eh,{asChild:!0,children:(0,a.jsxs)("svg",{width:"100%",viewBox:"0 0 8 5",preserveAspectRatio:"xMaxYMid meet",className:(0,l.t)("relative","z-[2]","fill-light","stroke-dark/2","[paint-order:stroke_fill]","dark:fill-dark","dark:stroke-light/2"),fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("g",{"clip-path":"url(#clipAnnotation)",children:(0,a.jsx)("path",{d:"M0 0L4 4L8 0",strokeWidth:"2",strokeLinecap:"round",stroke:"inherit",fill:"inherit"})}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"clipAnnotation",children:(0,a.jsx)("rect",{width:"8",height:"5",fill:"white"})})})]})})]})})]})}},17370:function(t,e,n){"use strict";n.d(e,{CopyCodeButton:function(){return o}});var a=n(27573),r=n(7653),i=n(63530),l=n(33298);function o(t){let{codeId:e,style:n}=t,o=(0,i.ZK)(),[c,s]=r.useState(!1);return r.useEffect(()=>{if(!c)return;let t=setTimeout(()=>{s(!1)},1e3);return()=>{clearTimeout(t)}},[c]),(0,a.jsx)("button",{onClick:()=>{let t=document.getElementById(e);t&&(navigator.clipboard.writeText(function(t){let e="",n=t=>{t instanceof HTMLBRElement?e+="\n":t instanceof HTMLSpanElement?t.classList.contains("ew")?e+="\n":e+=t.innerText:t instanceof HTMLElement?t.childNodes.forEach(n):e+=t.textContent};return n(t),e}(t)),s(!0))},className:(0,l.t)(n,"print:hidden"),children:(0,i.t)(o,c?"code_copied":"code_copy")})}},62086:function(t,e,n){"use strict";n.d(e,{Details:function(){return o}});var a=n(27573),r=n(7653),i=n(54533),l=n(33298);function o(t){let{children:e,id:n,className:o}=t,c=r.useRef(null),[s,u]=r.useState(!1),d=(0,i.Hp)();return r.useEffect(()=>{var t;if(!d||!c.current)return;d===n&&u(!0);let e=document.getElementById(d);u(!!(e&&(null===(t=c.current)||void 0===t?void 0:t.contains(e))))},[d,n]),(0,a.jsx)("details",{ref:c,id:n,open:t.open||s,className:(0,l.t)(o,"group/expandable","shadow-dark/1","bg-gradient-to-t","from-light-1","to-light-1","border","border-b-0","border-dark-3/3","[&]:mt-[0px]","[&:first-child]:mt-5","[&:first-child]:rounded-t-lg","[:not(&)_+&]:mt-5","[:not(&)_+&]:rounded-t-lg","[&:not(:has(+_&))]:mb-5","[&:not(:has(+_&))]:rounded-b-lg","[&:not(:has(+_&))]:border-b","dark:border-light-2/[0.06]","dark:from-dark-2","dark:to-dark-2","dark:shadow-none","group open:dark:to-dark-2/8","group open:to-light-1/6"),children:e})}},18742:function(t,e,n){"use strict";n.d(e,{DynamicTabs:function(){return s}});var a=n(27573),r=n(7653),i=n(54533),l=n(33298);let o=(()=>{if("undefined"==typeof localStorage)return{activeIds:{},activeTitles:[]};let t=localStorage.getItem("@gitbook/tabsState");return t?JSON.parse(t):{activeIds:{},activeTitles:[]}})(),c=new Set;function s(t){let{id:e,tabs:n,tabsBody:s,style:d}=t,f=(0,i.Hp)(),[p,m]=function(){let t=(0,r.useCallback)(t=>(c.add(t),()=>c.delete(t)),[]),e=(0,r.useCallback)(()=>o,[]);return[r.useSyncExternalStore(t,e,e),t=>{o=t(o),"undefined"!=typeof localStorage&&localStorage.setItem("@gitbook/tabsState",JSON.stringify(o)),c.forEach(t=>t())}]}(),h=(0,r.useMemo)(()=>{var t,a,r;let i={id:e,tabs:n};return null!==(a=null!==(t=function(t,e){var n;let a=e.activeIds[t.id];return a&&null!==(n=t.tabs.find(t=>t.id===a))&&void 0!==n?n:null}(i,p))&&void 0!==t?t:null!==(r=i.tabs.map(t=>({item:t,score:p.activeTitles.indexOf(t.title)})).filter(t=>{let{score:e}=t;return e>=0}).sort((t,e)=>{let{score:n}=t,{score:a}=e;return a-n}).map(t=>{let{item:e}=t;return e})[0])&&void 0!==r?r:null)&&void 0!==a?a:i.tabs[0]},[e,n,p]),b=(0,i.tm)()?h:n[0],k=r.useCallback(t=>{m(n=>({activeIds:{...n.activeIds,[e]:t.id},activeTitles:t.title?n.activeTitles.filter(e=>e!==t.title).concat([t.title]).slice(-5):n.activeTitles}))},[e,m]);return r.useEffect(()=>{if(!f)return;let t=document.getElementById(f);if(!t)return;let e=t.closest('[role="tabpanel"]');if(!e)return;let a=n.find(t=>t.id===e.id);a&&k(a)},[f,n,k]),(0,a.jsxs)("div",{className:(0,l.t)("rounded-lg","straight-corners:rounded-sm","ring-1","ring-inset","ring-dark/3","flex","overflow-hidden","flex-col","dark:ring-light/2",d),children:[(0,a.jsx)("div",{role:"tablist",className:(0,l.t)("group/tabs","inline-flex","flex-row","self-stretch","after:flex-[1]","after:bg-dark-2/1","[&:has(button.active-tab:last-of-type):after]:rounded-bl-md","dark:after:bg-dark-1/5"),children:n.map(t=>(0,a.jsx)("button",{role:"tab","aria-selected":b.id===t.id,"aria-controls":t.id,id:u(t.id),onClick:()=>{k(t)},className:(0,l.t)("[&:has(+_.active-tab)]:rounded-br-md","[.active-tab_+_&]:rounded-bl-md","[.active-tab_+_:after]:rounded-br-md","inline-block","text-sm","px-3.5","py-2","transition-[color]","font-[500]","relative","after:transition-colors","after:group-hover/tabs:border-transparent","after:border-r","after:absolute","after:left-[unset]","after:right-0","after:border-dark/4","after:top-[15%]","after:h-[70%]","after:w-[1px]","last:after:border-transparent","text-dark-2/7","bg-dark-2/1","dark:bg-dark-1/5","hover:text-dark-2","dark:text-light-3/8","dark:after:border-light/2","dark:hover:text-light-3","truncate","max-w-full",b.id===t.id?["shrink-0","active-tab","text-dark-2","bg-transparent","dark:text-light","dark:bg-transparent","after:[&.active-tab]:border-transparent","after:[:has(+_&.active-tab)]:border-transparent","after:[:has(&_+)]:border-transparent"]:null),children:t.title},t.id))}),n.map((t,e)=>(0,a.jsx)("div",{role:"tabpanel",id:t.id,"aria-labelledby":u(t.id),className:(0,l.t)("p-4",t.id!==b.id?"hidden":null),children:s[e]},t.id))]})}function u(t){return"tab-".concat(t)}},84308:function(t,e,n){"use strict";n.r(e),n.d(e,{ContentKit:function(){return l}});var a=n(7653),r=n(68595),i=n(32775);function l(t){var e;let{security:n,initialInput:o,initialOutput:c,children:s,render:u,onAction:d,onComplete:f}=t,[p,m]=a.useState({input:o,children:s,output:c,state:null!==(e=c.state)&&void 0!==e?e:{}}),[h,b]=a.useState(null),k=a.useCallback(async t=>{var e;let n={...p.input,...(null===(e=p.output)||void 0===e?void 0:e.props)?{props:p.output.props}:{},...t,state:{...p.input.state,...p.state,...t.state}};console.log("transition to input",n);let a=await u(n),r=a.output;if("complete"===r.type)return null==f?void 0:f(r.returnValue);console.log("and got output",r,"for",n),m(t=>({input:n,children:a.children,output:r,state:t.state}))},[m,p,u,f]),v=a.useMemo(()=>({security:n,state:p.state,setState:t=>{m(e=>({...e,state:{...e.state,...t}}))},update:k,dispatchAction:async function(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=(0,i.a)(p.state,t);switch(e&&(null==d||d(n)),console.log("action",n),n.action){case"@ui.modal.open":{let t={componentId:n.componentId,props:n.props,context:p.input.context,action:n},e=await u(t);"element"!==e.output.type&&e.output.type||b({mode:"modal",initialInput:t,initialOutput:e.output,initialChildren:e.children});break}case"@ui.url.open":window.open(n.url,"_blank");break;default:await k({action:n})}}}),[k,n,p.state,p.input.context,m,u]),g=a.useCallback(async t=>{"@ui.modal.close"===t.action&&(k({action:t}),b(null))},[]);return a.createElement(a.Fragment,null,a.createElement(r.l.Provider,{value:v},p.children),h?a.createElement(l,{security:n,initialInput:h.initialInput,initialOutput:h.initialOutput,render:u,onAction:g},h.initialChildren):null)}},69125:function(t,e,n){"use strict";n.d(e,{ElementButton:function(){return o}});var a=n(7653),r=n(45254),i=n.n(r),l=n(68595);function o(t){var e;let{element:n,icon:r,trailingIcon:o}=t,c=(0,l.D)(),[s,u]=a.useState(!1);return a.createElement("button",{title:n.tooltip,className:i()("contentkit-button","contentkit-button-style-".concat(null!==(e=n.style)&&void 0!==e?e:"secondary"),s?"contentkit-button-loading":null),onClick:t=>{n.disabled||s||(t.stopPropagation(),u(!0),c.dispatchAction(n.onPress).finally(()=>{u(!1)}))}},r,n.label?a.createElement("span",{className:"contentkit-button-label"},n.label):null,o)}},77266:function(t,e,n){"use strict";n.d(e,{ElementCard:function(){return o}});var a=n(7653),r=n(45254),i=n.n(r),l=n(68595);function o(t){let{element:e,children:n,icon:r,hint:o,buttons:c}=t,s=(0,l.D)();return a.createElement("div",{className:i()("contentkit-card",e.onPress?"contentkit-card-pressable":null),onClick:()=>{e.onPress&&s.dispatchAction(e.onPress)}},e.title?a.createElement("div",{className:i()("contentkit-card-header")},r?a.createElement("div",{className:i()("contentkit-card-icon")},r):null,a.createElement("div",{className:i()("contentkit-card-header-content")},a.createElement("div",{className:i()("contentkit-card-title")},e.title),o?a.createElement("div",{className:i()("contentkit-card-hint")},o):null),c&&c.length>0?a.createElement("div",{className:i()("contentkit-card-buttons")},c):null):null,n?a.createElement("div",{className:i()("contentkit-card-body")},n):null)}},16791:function(t,e,n){"use strict";n.d(e,{ElementMarkdownClient:function(){return l}});var a=n(7653),r=n(32775),i=n(68595);function l(t){let{element:e,initialMarkdown:n=e.content,renderMarkdown:l,children:o}=t,[c,s]=a.useState(null),u=(0,i.D)(),d=(0,r.a)(u.state,e.content);return a.useEffect(()=>{if(n===d){s(null);return}let t=!1;return(async()=>{let e=await l(d);t||s(e)})(),()=>{t=!0}},[n,d]),a.createElement(a.Fragment,null,c||o)}},15783:function(t,e,n){"use strict";n.d(e,{ElementModal:function(){return o}});var a=n(7653),r=n(45254),i=n.n(r),l=n(68595);function o(t){let{element:e,subtitle:n,children:r}=t,o=(0,l.D)(),[c,s]=a.useState(!1);a.useEffect(()=>{s(!0)},[]);let u=async()=>{await o.dispatchAction({action:"@ui.modal.close",returnValue:e.returnValue||{}})};return a.createElement("div",{className:i()("contentkit-modal-backdrop"),onClick:u},a.createElement("div",{className:i()("contentkit-modal",c?"contentkit-modal-opened":null),onClick:t=>{t.stopPropagation()}},a.createElement("div",{className:i()("contentkit-modal-header")},e.title?a.createElement("h1",{className:i()("contentkit-modal-title")},e.title):null,n?a.createElement("div",{className:"contentkit-modal-subtitle"},n):null),a.createElement("div",{className:i()("contentkit-modal-body")},r)))}},13870:function(t,e,n){"use strict";n.d(e,{ElementTextInput:function(){return c}});var a=n(7653),r=n(45254),i=n.n(r),l=n(68595),o=n(32775);function c(t){var e,n,r;let{element:c}=t,s=(0,l.D)(),u=null!==(n=null!==(e=(0,o.g)(s.state,c.state))&&void 0!==e?e:c.initialValue)&&void 0!==n?n:"",d=t=>{s.setState({[c.state]:t.target.value})};return c.multiline?a.createElement("textarea",{disabled:c.disabled,className:i()("contentkit-textinput"),value:u,placeholder:c.placeholder,onChange:d}):a.createElement("input",{type:null!==(r=c.inputType)&&void 0!==r?r:"text",disabled:c.disabled,className:i()("contentkit-textinput"),value:u,placeholder:c.placeholder,onChange:d})}},50665:function(t,e,n){"use strict";n.d(e,{ElementWebframe:function(){return l}});var a=n(7653),r=n(68595),i=n(32775);function l(t){let{element:e}=t,[n,l]=a.useState(!1),o=(0,r.D)(),c=a.useRef(null),[s,u]=a.useState({}),d=a.useRef(!1),f=a.useRef([]),p=a.useCallback(t=>{let n=new URL(e.source.url);if(o.security.firstPartyDomains.includes(n.host)){if(d.current){if(!c.current)return;c.current.contentWindow.postMessage(t,"".concat(n.protocol,"//").concat(n.host))}else f.current.push(t)}},[o.security]);return a.useEffect(()=>{let t=t=>{if(!c.current)return;let e=t.data,n=new URL(t.origin);if(!o.security.firstPartyDomains.includes(n.host))return;let a=c.current.contentWindow;if(a&&t.source===a){if("string"==typeof e)try{let t=JSON.parse(e);if("iframe.resize"===t.context&&"number"==typeof t.height){let e=a.outerWidth,n=t.height;u({maxWidth:e,aspectRatio:e/n,maxHeight:n})}}catch(t){return}if(e.action)switch(e.action.action){case"@webframe.ready":d.current=!0,f.current.forEach(t=>{p(t)}),f.current=[];break;case"@webframe.resize":u({maxWidth:Number(e.action.size.maxWidth),maxHeight:Number(e.action.size.maxHeight),aspectRatio:Number(e.action.size.aspectRatio)});break;default:o.update({action:e.action})}}};return window.addEventListener("message",t),l(!0),()=>{window.removeEventListener("message",t)}},[o,p]),a.useEffect(()=>{if(!e.data)return;let t={};return Object.entries(e.data).forEach(e=>{let[n,a]=e;t[n]=(0,i.a)(o.state,a)}),p({state:t})},[e.data,o.state,p]),a.createElement("div",{className:"contentkit-webframe",style:{aspectRatio:s.aspectRatio||e.aspectRatio||void 0,maxWidth:s.maxWidth||void 0,maxHeight:s.maxHeight||void 0}},n?a.createElement("iframe",{ref:c,src:e.source.url,allowFullScreen:!0,allow:"clipboard-write",style:{position:"absolute",top:0,left:0,bottom:0,right:0,width:"100%",height:"100%",border:"none"}}):null)}},68595:function(t,e,n){"use strict";n.d(e,{D:function(){return i},l:function(){return r}});var a=n(7653);let r=a.createContext(null);function i(){let t=a.useContext(r);if(!t)throw Error("ContentKit component should be wrapped in ");return t}},32775:function(t,e,n){"use strict";function a(t,e){let n=t[e];return"string"==typeof n?n:"number"==typeof n?"".concat(n):void 0}n.d(e,{a:function(){return function t(e,n){if("string"==typeof n||"number"==typeof n||"boolean"==typeof n||void 0===n)return n;if(Array.isArray(n))return n.map(e=>t(localState,e));if("$state"in n&&"string"==typeof n.$state)return e[n.$state];let a={};return Object.entries(n).forEach(n=>{let[r,i]=n;a[r]=t(e,i)}),a}},g:function(){return a}})},18289:function(){},71635:function(){},6335:function(){},71228:function(){},92523:function(){},18173:function(t){t.exports={tableWrapper:"table_tableWrapper__zr7LC","detect-scroll":"table_detect-scroll__IZtP9",columnHeader:"table_columnHeader__PGmsy",row:"table_row__LpfCG",rowGroup:"table_rowGroup__IKtSP",cell:"table_cell__X_gFM"}},19182:function(t,e,n){"use strict";function a(t){return r||(r=!0,Promise.all([n.e(703),n.e(4006)]).then(n.t.bind(n,94006,19)).then(()=>{document.body.classList.add("katex-loaded")})),null}n.r(e),n.d(e,{default:function(){return a}});let r=!1},55127:function(t,e,n){"use strict";n.d(e,{MathJaXLazy:function(){return i}});var a=n(7653);let r=a.lazy(()=>n.e(1559).then(n.bind(n,71559)));function i(t){return a.createElement(a.Suspense,{fallback:t.fallback},a.createElement(r,{...t}))}}}]); //# sourceMappingURL=9028-c639390951421226.js.map