mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-29 18:27:56 +02:00
4 lines
No EOL
40 KiB
JavaScript
4 lines
No EOL
40 KiB
JavaScript
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["81438"],{22917:function(e,t,n){n.d(t,{CS:()=>x,wj:()=>s,nO:()=>u,iZ:()=>p,n4:()=>c,Ne:()=>_,ci:()=>Z,cH:()=>k});var r=n("85893"),l=n("67294"),a=n("31008"),i=n("96417");function s(){let e=(0,i.Z)(),t=e?.data?.blogMetadata;if(!t)throw Error("useBlogMetadata() can't be called on the current route because the blog metadata could not be found in route context");return t}let o=l.createContext(null);function c(e){let{children:t,content:n,isBlogPostPage:a=!1}=e,i=function(e){let{content:t,isBlogPostPage:n}=e;return(0,l.useMemo)(()=>({metadata:t.metadata,frontMatter:t.frontMatter,assets:t.assets,toc:t.toc,isBlogPostPage:n}),[t,n])}({content:n,isBlogPostPage:a});return(0,r.jsx)(o.Provider,{value:i,children:t})}function u(){let e=(0,l.useContext)(o);if(null===e)throw new a.i6("BlogPostProvider");return e}var d=n("82274"),m=n("30056");let h=e=>new Date(e).toISOString();function f(e){let t=e.map(j);return{author:1===t.length?t[0]:t}}function g(e,t,n){return e?{image:function(e){let{imageUrl:t,caption:n}=e;return{"@type":"ImageObject","@id":t,url:t,contentUrl:t,caption:n}}({imageUrl:t(e,{absolute:!0}),caption:`title image for the blog post: ${n}`})}:{}}function x(e){let{siteConfig:t}=(0,m.Z)(),{withBaseUrl:n}=(0,d.Cg)(),{metadata:{blogDescription:r,blogTitle:l,permalink:a}}=e,i=`${t.url}${a}`;return{"@context":"https://schema.org","@type":"Blog","@id":i,mainEntityOfPage:i,headline:l,description:r,blogPost:e.items.map(e=>(function(e,t,n){let{assets:r,frontMatter:l,metadata:a}=e,{date:i,title:s,description:o,lastUpdatedAt:c}=a,u=r.image??l.image,d=l.keywords??[],m=`${t.url}${a.permalink}`,x=c?h(c):void 0;return{"@type":"BlogPosting","@id":m,mainEntityOfPage:m,url:m,headline:s,name:s,description:o,datePublished:i,...x?{dateModified:x}:{},...f(a.authors),...g(u,n,s),...d?{keywords:d}:{}}})(e.content,t,n))}}function p(){let e=s(),{assets:t,metadata:n}=u(),{siteConfig:r}=(0,m.Z)(),{withBaseUrl:l}=(0,d.Cg)(),{date:a,title:i,description:o,frontMatter:c,lastUpdatedAt:x}=n,p=t.image??c.image,j=c.keywords??[],v=x?h(x):void 0,b=`${r.url}${n.permalink}`;return{"@context":"https://schema.org","@type":"BlogPosting","@id":b,mainEntityOfPage:b,url:b,headline:i,name:i,description:o,datePublished:a,...v?{dateModified:v}:{},...f(n.authors),...g(p,l,i),...j?{keywords:j}:{},isPartOf:{"@type":"Blog","@id":`${r.url}${e.blogBasePath}`,name:e.blogTitle}}}function j(e){return{"@type":"Person",...e.name?{name:e.name}:{},...e.title?{description:e.title}:{},...e.url?{url:e.url}:{},...e.email?{email:e.email}:{},...e.imageURL?{image:e.imageURL}:{}}}var v=n("3620"),b=n("64152"),N=n("46918"),y=n("30998");function k(e){let{pathname:t}=(0,v.TH)();return(0,l.useMemo)(()=>e.filter(e=>{var n,r;return n=e,r=t,(!n.unlisted||!!(0,y.Mg)(n.permalink,r))&&!0}),[e,t])}function Z(e){let t=Object.entries((0,N.vM)(e,e=>`${new Date(e.date).getFullYear()}`));return t.reverse(),t}function _(e){let{items:t,ulClassName:n,liClassName:l,linkClassName:a,linkActiveClassName:i}=e;return(0,r.jsx)("ul",{className:n,children:t.map(e=>(0,r.jsx)("li",{className:l,children:(0,r.jsx)(b.Z,{isNavLink:!0,to:e.permalink,className:a,activeClassName:i,children:e.title})},e.permalink))})}},6952:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(85893);function l(e){return(0,r.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}n(67294)},18291:function(e,t,n){n.d(t,{Z:()=>C});var r=n("85893"),l=n("67294"),a=n("90496"),i=n("80661"),s=n("2235");let o={admonition:"admonition_o5H7",admonitionHeading:"admonitionHeading_FzoX",admonitionIcon:"admonitionIcon_rXq6",admonitionContent:"admonitionContent_Knsx"};function c(e){let{type:t,className:n,children:l}=e;return(0,r.jsx)("div",{className:(0,a.Z)(s.k.common.admonition,s.k.common.admonitionType(t),o.admonition,n),children:l})}function u(e){let{icon:t,title:n}=e;return(0,r.jsxs)("div",{className:o.admonitionHeading,children:[(0,r.jsx)("span",{className:o.admonitionIcon,children:t}),n]})}function d(e){let{children:t}=e;return t?(0,r.jsx)("div",{className:o.admonitionContent,children:t}):null}function m(e){let{type:t,icon:n,title:l,children:a,className:i}=e;return(0,r.jsxs)(c,{type:t,className:i,children:[l||n?(0,r.jsx)(u,{title:l,icon:n}):null,(0,r.jsx)(d,{children:a})]})}let h={icon:(0,r.jsx)(function(e){return(0,r.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})},{}),title:(0,r.jsx)(i.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function f(e){return(0,r.jsx)(m,{...h,...e,className:(0,a.Z)("alert alert--secondary",e.className),children:e.children})}let g={icon:(0,r.jsx)(function(e){return(0,r.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})},{}),title:(0,r.jsx)(i.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function x(e){return(0,r.jsx)(m,{...g,...e,className:(0,a.Z)("alert alert--success",e.className),children:e.children})}var p=n("6952");let j={icon:(0,r.jsx)(p.Z,{}),title:(0,r.jsx)(i.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function v(e){return(0,r.jsx)(m,{...j,...e,className:(0,a.Z)("alert alert--info",e.className),children:e.children})}function b(e){return(0,r.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}let N={icon:(0,r.jsx)(b,{}),title:(0,r.jsx)(i.Z,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})},y={icon:(0,r.jsx)(function(e){return(0,r.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})},{}),title:(0,r.jsx)(i.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})},k={icon:(0,r.jsx)(b,{}),title:(0,r.jsx)(i.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})},Z={note:f,tip:x,info:v,warning:function(e){return(0,r.jsx)(m,{...N,...e,className:(0,a.Z)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,r.jsx)(m,{...y,...e,className:(0,a.Z)("alert alert--danger",e.className),children:e.children})},secondary:e=>(0,r.jsx)(f,{title:"secondary",...e}),important:e=>(0,r.jsx)(v,{title:"important",...e}),success:e=>(0,r.jsx)(x,{title:"success",...e}),caution:function(e){return(0,r.jsx)(m,{...k,...e,className:(0,a.Z)("alert alert--warning",e.className),children:e.children})}};var _=n("17973");let w={...Z,"my-custom-admonition":function(e){return(0,r.jsxs)("div",{style:{border:"solid red",padding:10},children:[(0,r.jsx)(_.Z,{as:"h5",style:{color:"blue",fontSize:30},children:e.title}),(0,r.jsx)("div",{children:e.children})]})}};function C(e){let t=function(e){let{mdxAdmonitionTitle:t,rest:n}=function(e){let t=l.Children.toArray(e),n=t.find(e=>l.isValidElement(e)&&"mdxAdmonitionTitle"===e.type),a=t.filter(e=>e!==n);return{mdxAdmonitionTitle:n?.props.children,rest:a.length>0?(0,r.jsx)(r.Fragment,{children:a}):null}}(e.children),a=e.title??t;return{...e,...a&&{title:a},children:n}}(e),n=function(e){let t=w[e];return t?t:(console.warn(`No admonition component found for admonition type "${e}". Using Info as fallback.`),w.info)}(t.type);return(0,r.jsx)(n,{...t})}},4967:function(e,t,n){n.d(t,{Z:()=>L});var r=n("85893"),l=n("67294"),a=n("90496"),i=n("75957"),s=n("36173"),o=n("80661"),c=n("22917"),u=n("70341"),d=n("17973");function m(e){let{year:t,yearGroupHeadingClassName:n,children:l}=e;return(0,r.jsxs)("div",{role:"group",children:[(0,r.jsx)(d.Z,{as:"h3",className:n,children:t}),l]})}let h=(0,l.memo)(function(e){let{items:t,yearGroupHeadingClassName:n,ListComponent:l}=e;if(!(0,u.L)().blog.sidebar.groupByYear)return(0,r.jsx)(l,{items:t});{let e=(0,c.ci)(t);return(0,r.jsx)(r.Fragment,{children:e.map(e=>{let[t,a]=e;return(0,r.jsx)(m,{year:t,yearGroupHeadingClassName:n,children:(0,r.jsx)(l,{items:a})},t)})})}}),f="sidebar_P3nc",g="sidebarItemTitle_VrjY",x="sidebarItemList_OSkG",p="sidebarItem_WJ0y",j="sidebarItemLink_Qrfg",v="sidebarItemLinkActive_nUeK",b="yearGroupHeading_lECJ",N=e=>{let{items:t}=e;return(0,r.jsx)(c.Ne,{items:t,ulClassName:(0,a.Z)(x,"clean-list"),liClassName:p,linkClassName:j,linkActiveClassName:v})},y=(0,l.memo)(function(e){let{sidebar:t}=e,n=(0,c.cH)(t.items);return(0,r.jsx)("aside",{className:"col col--3",children:(0,r.jsxs)("nav",{className:(0,a.Z)(f,"thin-scrollbar"),"aria-label":(0,o.I)({id:"theme.blog.sidebar.navAriaLabel",message:"Blog recent posts navigation",description:"The ARIA label for recent posts in the blog sidebar"}),children:[(0,r.jsx)("div",{className:(0,a.Z)(g,"margin-bottom--md"),children:t.title}),(0,r.jsx)(h,{items:n,ListComponent:N,yearGroupHeadingClassName:b})]})})});var k=n("82306");let Z="yearGroupHeading_Ruz9",_=e=>{let{items:t}=e;return(0,r.jsx)(c.Ne,{items:t,ulClassName:"menu__list",liClassName:"menu__list-item",linkClassName:"menu__link",linkActiveClassName:"menu__link--active"})};function w(e){let{sidebar:t}=e,n=(0,c.cH)(t.items);return(0,r.jsx)(h,{items:n,ListComponent:_,yearGroupHeadingClassName:Z})}let C=(0,l.memo)(function(e){return(0,r.jsx)(k.Zo,{component:w,props:e})});function B(e){let{sidebar:t}=e,n=(0,s.i)();return t?.items.length?"mobile"===n?(0,r.jsx)(C,{sidebar:t}):(0,r.jsx)(y,{sidebar:t}):null}function L(e){let{sidebar:t,toc:n,children:l,...s}=e,o=t&&t.items.length>0;return(0,r.jsx)(i.Z,{...s,children:(0,r.jsx)("div",{className:"container margin-vert--lg",children:(0,r.jsxs)("div",{className:"row",children:[(0,r.jsx)(B,{sidebar:t}),(0,r.jsx)("main",{className:(0,a.Z)("col",{"col--7":o,"col--9 col--offset-1":!o}),children:l}),n&&(0,r.jsx)("div",{className:"col col--2",children:n})]})})})}},85926:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(85893);function l(e){let{children:t,className:n}=e;return(0,r.jsx)("article",{className:n,children:t})}n(67294)},37132:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(85893);n(67294);var l=n(90496),a=n(64661),i=n(22917),s=n(54145);function o(e){let{children:t,className:n}=e,{isBlogPostPage:o}=(0,i.nO)();return(0,r.jsx)("div",{id:o?a.blogPostContainerID:void 0,className:(0,l.Z)("markdown",n),children:(0,r.jsx)(s.Z,{children:t})})}},75588:function(e,t,n){n.d(t,{Z:()=>h});var r=n("85893");n("67294");var l=n("90496"),a=n("80661"),i=n("84970"),s=n("64151"),o=n("22917");let c="container_x5Un";function u(e){let{readingTime:t}=e,n=function(){let{selectMessage:e}=(0,i.c)();return t=>{let n=Math.ceil(t);return e(n,(0,a.I)({id:"theme.blog.post.readingTime.plurals",description:'Pluralized label for "{readingTime} min read". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One min read|{readingTime} min read"},{readingTime:n}))}}();return(0,r.jsx)(r.Fragment,{children:n(t)})}function d(e){let{date:t,formattedDate:n}=e;return(0,r.jsx)("time",{dateTime:t,children:n})}function m(){return(0,r.jsx)(r.Fragment,{children:" \xb7 "})}function h(e){let t,{className:n}=e,{metadata:a}=(0,o.nO)(),{date:i,readingTime:h}=a,f=(0,s.P)({day:"numeric",month:"long",year:"numeric",timeZone:"UTC"});return(0,r.jsxs)("div",{className:(0,l.Z)(c,"margin-vert--md",n),children:[(0,r.jsx)(d,{date:i,formattedDate:(t=i,f.format(new Date(t)))}),void 0!==h&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m,{}),(0,r.jsx)(u,{readingTime:h})]})]})}},29584:function(e,t,n){n.d(t,{Z:()=>o});var r=n("85893");n("67294");var l=n("90496"),a=n("64152"),i=n("22917");let s="title_UBNu";function o(e){let{className:t}=e,{metadata:n,isBlogPostPage:o}=(0,i.nO)(),{permalink:c,title:u}=n;return(0,r.jsx)(o?"h1":"h2",{className:(0,l.Z)(s,t),children:o?u:(0,r.jsx)(a.Z,{to:c,children:u})})}},95433:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(85893);n(67294);var l=n(79410),a=n(22917);function i(){let{assets:e,metadata:t}=(0,a.nO)(),{title:n,description:i,date:s,tags:o,authors:c,frontMatter:u}=t,{keywords:d}=u,m=e.image??u.image;return(0,r.jsxs)(l.d,{title:u.title_meta??n,description:i,keywords:d,image:m,children:[(0,r.jsx)("meta",{property:"og:type",content:"article"}),(0,r.jsx)("meta",{property:"article:published_time",content:s}),c.some(e=>e.url)&&(0,r.jsx)("meta",{property:"article:author",content:c.map(e=>e.url).filter(Boolean).join(",")}),o.length>0&&(0,r.jsx)("meta",{property:"article:tag",content:o.map(e=>e.label).join(",")})]})}},30826:function(e,t,n){n.d(t,{Z:()=>h});var r=n("85893"),l=n("67294"),a=n("90496"),i=n("60415"),s=n("8903"),o=n("43766");let c={details:"details_Nokh",isBrowser:"isBrowser_QrB5",collapsibleContent:"collapsibleContent_EoA1"};function u(e){return!!e&&("SUMMARY"===e.tagName||u(e.parentElement))}function d(e){let{summary:t,children:n,...d}=e;(0,i.Z)().collectAnchor(d.id);let m=(0,s.Z)(),h=(0,l.useRef)(null),{collapsed:f,setCollapsed:g}=(0,o.u)({initialState:!d.open}),[x,p]=(0,l.useState)(d.open),j=l.isValidElement(t)?t:(0,r.jsx)("summary",{children:t??"Details"});return(0,r.jsxs)("details",{...d,ref:h,open:x,"data-collapsed":f,className:(0,a.Z)(c.details,m&&c.isBrowser,d.className),onMouseDown:e=>{u(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();let t=e.target;if(!!(u(t)&&function e(t,n){return!!t&&(t===n||e(t.parentElement,n))}(t,h.current)))e.preventDefault(),f?(g(!1),p(!0)):g(!0)},children:[j,(0,r.jsx)(o.z,{lazy:!1,collapsed:f,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{g(e),p(!e)},children:(0,r.jsx)("div",{className:c.collapsibleContent,children:n})})]})}let m="details_Cn_P";function h(e){let{...t}=e;return(0,r.jsx)(d,{...t,className:(0,a.Z)("alert alert--info",m,t.className)})}},54145:function(e,t,n){n.d(t,{Z:()=>A});var r=n("85893"),l=n("67294"),a=n("80980"),i=n("28289"),s=n("45960");function o(e){return(0,r.jsx)("code",{...e})}function c(e){var t;return void 0!==(t=e).children&&l.Children.toArray(t.children).every(e=>"string"==typeof e&&!e.includes("\n"))?(0,r.jsx)(o,{...e}):(0,r.jsx)(s.Z,{...e})}var u=n("64152"),d=n("30826");function m(e){let t=l.Children.toArray(e.children),n=t.find(e=>l.isValidElement(e)&&"summary"===e.type),a=(0,r.jsx)(r.Fragment,{children:t.filter(e=>e!==n)});return(0,r.jsx)(d.Z,{...e,summary:n,children:a})}var h=n("17973");function f(e){return(0,r.jsx)(h.Z,{...e})}var g=n("90496");let x={containsTaskList:"containsTaskList_k9gM"};var p=n("60415");let j="img_vXGZ";var v=n("18291"),b=n("18605"),N=n("22687"),y=n("70341"),k=n("31058"),Z=n("57396");async function _(e){let{id:t,text:n,config:r}=e;Z.Z.mermaidAPI.initialize(r);try{return await Z.Z.render(t,n)}catch(e){throw document.querySelector(`#d${t}`)?.remove(),e}}let w="container_RUsj";function C(e){let{renderResult:t}=e,n=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let e=n.current;t.bindFunctions?.(e)},[t]),(0,r.jsx)("div",{ref:n,className:`docusaurus-mermaid-container ${w}`,dangerouslySetInnerHTML:{__html:t.svg}})}function B(e){let{value:t}=e,n=function(e){let{text:t,config:n}=e,[r,a]=(0,l.useState)(null),i=(0,l.useRef)(`mermaid-svg-${Math.round(1e7*Math.random())}`).current,s=function(){let{colorMode:e}=(0,k.I)(),t=(0,y.L)().mermaid,n=t.theme[e],{options:r}=t;return(0,l.useMemo)(()=>({startOnLoad:!1,...r,theme:n}),[n,r])}(),o=n??s;return(0,l.useEffect)(()=>{_({id:i,text:t,config:o}).then(a).catch(e=>{a(()=>{throw e})})},[i,t,o]),r}({text:t});return null===n?null:(0,r.jsx)(C,{renderResult:n})}let L={Head:i.Z,details:m,Details:m,code:c,a:function(e){return(0,r.jsx)(u.Z,{...e})},pre:function(e){return(0,r.jsx)(r.Fragment,{children:e.children})},ul:function(e){return(0,r.jsx)("ul",{...e,className:function(e){if(void 0!==e)return(0,g.Z)(e,e?.includes("contains-task-list")&&x.containsTaskList)}(e.className)})},li:function(e){return(0,p.Z)().collectAnchor(e.id),(0,r.jsx)("li",{...e})},img:function(e){var t;return(0,r.jsx)("img",{decoding:"async",loading:"lazy",...e,className:(t=e.className,(0,g.Z)(t,j))})},h1:e=>(0,r.jsx)(f,{as:"h1",...e}),h2:e=>(0,r.jsx)(f,{as:"h2",...e}),h3:e=>(0,r.jsx)(f,{as:"h3",...e}),h4:e=>(0,r.jsx)(f,{as:"h4",...e}),h5:e=>(0,r.jsx)(f,{as:"h5",...e}),h6:e=>(0,r.jsx)(f,{as:"h6",...e}),admonition:v.Z,mermaid:function(e){return(0,r.jsx)(b.Z,{fallback:e=>(0,r.jsx)(N.Ac,{...e}),children:(0,r.jsx)(B,{...e})})}},I="tweetQuote_h8Rz",E="avatarImg_b51M",T={...L,Code:c,Highlight:function(e){let{children:t,color:n}=e;return(0,r.jsx)("span",{style:{backgroundColor:n,borderRadius:"2px",color:"#fff",padding:"0.2rem"},children:t})},TweetQuote:function(e){let{url:t,handle:n,name:l,job:a,children:i}=e,s=`https://unavatar.io/x/${n}`,o=`https://x.com/${n}`;return(0,r.jsxs)("figure",{className:I,children:[(0,r.jsx)("blockquote",{children:(0,r.jsx)(u.Z,{to:t,children:i})}),(0,r.jsx)("figcaption",{children:(0,r.jsx)(u.Z,{to:o,rel:"nofollow",children:(0,r.jsxs)("div",{className:"avatar",children:[(0,r.jsx)("img",{alt:l,className:(0,g.Z)("avatar__photo",E),src:s}),(0,r.jsxs)("div",{className:(0,g.Z)("avatar__intro"),children:[(0,r.jsx)("strong",{className:"avatar__name",children:(0,r.jsx)("cite",{children:l})}),(0,r.jsx)("small",{className:"avatar__subtitle",itemProp:"description",children:a})]})]})})})]})}};function A(e){let{children:t}=e;return(0,r.jsx)(a.Z,{components:T,children:t})}},6957:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(85893);n(67294);var l=n(90496),a=n(64152);function i(e){let{permalink:t,title:n,subLabel:i,isNext:s}=e;return(0,r.jsxs)(a.Z,{className:(0,l.Z)("pagination-nav__link",s?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t,children:[i&&(0,r.jsx)("div",{className:"pagination-nav__sublabel",children:i}),(0,r.jsx)("div",{className:"pagination-nav__label",children:n})]})}},54336:function(e,t,n){n.d(t,{Z:()=>s});var r=n("85893");n("67294");var l=n("90496"),a=n("9763");let i="tableOfContents_RLlU";function s(e){let{className:t,...n}=e;return(0,r.jsx)("div",{className:(0,l.Z)(i,"thin-scrollbar",t),children:(0,r.jsx)(a.Z,{...n,linkClassName:"table-of-contents__link toc-highlight",linkActiveClassName:"table-of-contents__link--active"})})}},9763:function(e,t,n){n.d(t,{Z:()=>c});var r=n("85893"),l=n("67294"),a=n("70341");function i(e){let t=e.getBoundingClientRect();return t.top===t.bottom?i(e.parentNode):t}var s=n("64152");let o=l.memo(function e(t){let{toc:n,className:l,linkClassName:a,isChild:i}=t;return n.length?(0,r.jsx)("ul",{className:i?void 0:l,children:n.map(t=>(0,r.jsxs)("li",{children:[(0,r.jsx)(s.Z,{to:`#${t.id}`,className:a??void 0,dangerouslySetInnerHTML:{__html:t.value}}),(0,r.jsx)(e,{isChild:!0,toc:t.children,className:l,linkClassName:a})]},t.id))}):null});function c(e){let{toc:t,className:n="table-of-contents table-of-contents__left-border",linkClassName:s="table-of-contents__link",linkActiveClassName:c,minHeadingLevel:u,maxHeadingLevel:d,...m}=e,h=(0,a.L)(),f=u??h.tableOfContents.minHeadingLevel,g=d??h.tableOfContents.maxHeadingLevel,x=function(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:r}=e;return(0,l.useMemo)(()=>(function e(t){let{toc:n,minHeadingLevel:r,maxHeadingLevel:l}=t;return n.flatMap(t=>{var n;let a=e({toc:t.children,minHeadingLevel:r,maxHeadingLevel:l});return(n=t).level>=r&&n.level<=l?[{...t,children:a}]:a})})({toc:function(e){let t=e.map(e=>({...e,parentIndex:-1,children:[]})),n=Array(7).fill(-1);t.forEach((e,t)=>{let r=n.slice(2,e.level);e.parentIndex=Math.max(...r),n[e.level]=t});let r=[];return t.forEach(e=>{let{parentIndex:n,...l}=e;n>=0?t[n].children.push(l):r.push(l)}),r}(t),minHeadingLevel:n,maxHeadingLevel:r}),[t,n,r])}({toc:t,minHeadingLevel:f,maxHeadingLevel:g});return!function(e){let t=(0,l.useRef)(void 0),n=function(){let e=(0,l.useRef)(0),{navbar:{hideOnScroll:t}}=(0,a.L)();return(0,l.useEffect)(()=>{e.current=t?0:document.querySelector(".navbar").clientHeight},[t]),e}();(0,l.useEffect)(()=>{if(!e)return()=>{};let{linkClassName:r,linkActiveClassName:l,minHeadingLevel:a,maxHeadingLevel:s}=e;function o(){var e;let o=(e=r,Array.from(document.getElementsByClassName(e))),c=function(e,t){let{anchorTopOffset:n}=t,r=e.find(e=>i(e).top>=n);if(r){var l;return(l=i(r)).top>0&&l.bottom<window.innerHeight/2?r:e[e.indexOf(r)-1]??null}return e[e.length-1]??null}(function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e,r=[];for(let e=t;e<=n;e+=1)r.push(`h${e}.anchor`);return Array.from(document.querySelectorAll(r.join()))}({minHeadingLevel:a,maxHeadingLevel:s}),{anchorTopOffset:n.current}),u=o.find(e=>{var t;return c&&c.id===decodeURIComponent((t=e).href.substring(t.href.indexOf("#")+1))});o.forEach(e=>{var n;n=e,e===u?(t.current&&t.current!==n&&t.current.classList.remove(l),n.classList.add(l),t.current=n):n.classList.remove(l)})}return document.addEventListener("scroll",o),document.addEventListener("resize",o),o(),()=>{document.removeEventListener("scroll",o),document.removeEventListener("resize",o)}},[e,n])}((0,l.useMemo)(()=>{if(s&&c)return{linkClassName:s,linkActiveClassName:c,minHeadingLevel:f,maxHeadingLevel:g}},[s,c,f,g])),(0,r.jsx)(o,{toc:x,className:n,linkClassName:s,...m})}},64151:function(e,t,n){n.d(t,{P:function(){return l}});var r=n(30056);function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{i18n:{currentLocale:t}}=(0,r.Z)(),n=function(){let{i18n:{currentLocale:e,localeConfigs:t}}=(0,r.Z)();return t[e].calendar}();return new Intl.DateTimeFormat(t,{calendar:n,...e})}},84970:function(e,t,n){n.d(t,{c:function(){return o}});var r=n(67294),l=n(30056);let a=["zero","one","two","few","many","other"];function i(e){return a.filter(t=>e.includes(t))}let s={locale:"en",pluralForms:i(["one","other"]),select:e=>1===e?"one":"other"};function o(){let e=function(){let{i18n:{currentLocale:e}}=(0,l.Z)();return(0,r.useMemo)(()=>{try{return function(e){let t=new Intl.PluralRules(e);return{locale:e,pluralForms:i(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".
|
|
Docusaurus will fallback to the default (English) implementation.
|
|
Error: ${t.message}
|
|
`),s}},[e])}();return{selectMessage:(t,n)=>(function(e,t,n){let r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error(`For locale=${n.locale}, a maximum of ${n.pluralForms.length} plural forms are expected (${n.pluralForms.join(",")}), but the message contains ${r.length}: ${e}`);let l=n.select(t);return r[Math.min(n.pluralForms.indexOf(l),r.length-1)]})(n,t,e)}}},82234:function(e,t,n){n.d(t,{Z:function(){return a}});var r=n(85893);n(67294);var l=n(8903);function a(e){let{children:t,fallback:n}=e;return(0,l.Z)()?(0,r.jsx)(r.Fragment,{children:t?.()}):n??null}},21112:function(e,t,n){n.d(t,{Z:()=>N});var r=n("85893"),l=n("67294"),a=n("22917"),i=n("29584"),s=n("75588"),o=n("90496"),c=n("64152");let u={image:"image_oRbT"};function d(e){let{author:t,className:n}=e,{name:l,url:a,imageURL:i}=t;return(0,r.jsx)("div",{className:(0,o.Z)("avatar margin-bottom--sm",n),children:i&&(0,r.jsx)(c.Z,{className:"avatar__photo-link avatar__photo",href:a,children:(0,r.jsx)("img",{className:u.image,src:i,alt:l,onError:e=>{e.currentTarget.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="600" height="600" fill="none" stroke="%2325c2a0" stroke-width="30" version="1.1"><circle cx="300" cy="230" r="115"/><path stroke-linecap="butt" d="M106.81863443903,481.4 a205,205 1 0,1 386.36273112194,0"/></svg>'}})})})}function m(e){let{expanded:t,...n}=e;return t?(0,r.jsx)("svg",{viewBox:"0 0 1024 1024",width:"20",height:"20",fill:"currentColor",...n,children:(0,r.jsx)("path",{d:"M783.915092 1009.031953l-271.898251-277.615587-271.930737 277.550617a49.214558 49.214558 0 0 1-70.752018 0 51.780862 51.780862 0 0 1 0-72.246322l307.274261-313.706262a49.279528 49.279528 0 0 1 70.784503 0l307.33923 313.706262a51.975771 51.975771 0 0 1 0 72.311292 49.409467 49.409467 0 0 1-70.816988 0z m-307.306745-608.05155L169.269117 87.274141A51.975771 51.975771 0 0 1 169.269117 14.96285a49.409467 49.409467 0 0 1 70.816987 0l271.930737 277.615586L783.850122 14.96285a49.409467 49.409467 0 0 1 70.816988 0 51.975771 51.975771 0 0 1 0 72.311291l-307.33923 313.706262a49.376982 49.376982 0 0 1-70.719533 0z"})}):(0,r.jsx)("svg",{viewBox:"0 0 1024 1024",width:"20",height:"20",fill:"currentColor",...n,children:(0,r.jsx)("path",{d:"M476.612887 1009.12034L169.240699 695.380437a51.981345 51.981345 0 0 1 0-72.319045 49.382277 49.382277 0 0 1 70.824582 0l271.959897 277.645356 271.862433-277.645356a49.382277 49.382277 0 0 1 70.824582 0 51.981345 51.981345 0 0 1 0 72.319045l-307.307212 313.739903a49.447254 49.447254 0 0 1-70.792094 0z m307.274724-608.116755L511.99269 123.455693l-271.959897 277.645357a49.382277 49.382277 0 0 1-70.824582 0 51.981345 51.981345 0 0 1 0-72.319045L476.580399 15.042102a49.382277 49.382277 0 0 1 70.727117 0l307.372188 313.739903a51.981345 51.981345 0 0 1 0 72.319045 49.414766 49.414766 0 0 1-70.824582 0z"})})}let h={imageOnlyAuthorRow:"imageOnlyAuthorRow_WiD6",imageOnlyAuthorCol:"imageOnlyAuthorCol_uiac",toggleButton:"toggleButton_WvRg"};function f(e){let{className:t}=e,{metadata:{authors:n},assets:i}=(0,a.nO)(),[s,c]=(0,l.useState)(!1);if(0===n.length)return null;let u=n.slice(0,s?n.length:10);return(0,r.jsxs)("div",{className:(0,o.Z)("margin-top--md margin-bottom--sm",h.imageOnlyAuthorRow,t),children:[u.map((e,t)=>(0,r.jsx)("div",{className:h.imageOnlyAuthorCol,children:(0,r.jsx)(d,{author:{...e,imageURL:i.authorsImageUrls[t]??e.imageURL}})},t)),n.length>10&&(0,r.jsx)("button",{className:(0,o.Z)("clean-btn",h.toggleButton),type:"button",onClick:()=>c(e=>!e),"aria-label":"expand",children:(0,r.jsx)(m,{expanded:s})})]})}let g={changelogItemTitleList:"changelogItemTitleList_sueG"};function x(){let{isBlogPostPage:e}=(0,a.nO)();return(0,r.jsx)(i.Z,{className:e?void 0:g.changelogItemTitleList})}function p(){return(0,r.jsxs)("header",{children:[(0,r.jsx)(x,{}),(0,r.jsx)(s.Z,{}),(0,r.jsx)(f,{})]})}var j=n("85926"),v=n("37132");let b="changelogItemContainer_jeDt";function N(e){let{children:t}=e;return(0,r.jsxs)(j.Z,{className:b,children:[(0,r.jsx)(p,{}),(0,r.jsx)(v.Z,{children:t})]})}},90759:function(e,t,n){n.r(t),n.d(t,{default:()=>j});var r=n("85893");n("67294");var l=n("90496"),a=n("80661"),i=n("64152"),s=n("79410"),o=n("2235"),c=n("22917"),u=n("95433"),d=n("4967"),m=n("21112"),h=n("6957");function f(e){let{nextItem:t,prevItem:n}=e;return(0,r.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,a.I)({id:"theme.changelog.post.paginator.navAriaLabel",message:"Changelog item navigation",description:"The ARIA label for the changelog pagination"}),children:[n&&(0,r.jsx)(h.Z,{...n,subLabel:(0,r.jsx)(a.Z,{id:"theme.changelog.post.paginator.newerRelease",description:"The changelog button label to navigate to the newer release",children:"Newer release"})}),t&&(0,r.jsx)(h.Z,{...t,subLabel:(0,r.jsx)(a.Z,{id:"theme.changelog.post.paginator.olderRelease",description:"The changelog button label to navigate to the older release",children:"Older release"}),isNext:!0})]})}var g=n("54336");function x(){let{metadata:e}=(0,c.nO)(),{listPageLink:t}=e;return(0,r.jsx)(i.Z,{to:t,children:(0,r.jsx)(a.Z,{id:"changelog.backLink",children:"\u2190 Back to index page"})})}function p(e){let{sidebar:t,children:n}=e,{metadata:l,toc:a}=(0,c.nO)(),{nextItem:i,prevItem:s,frontMatter:o}=l,{hide_table_of_contents:u,toc_min_heading_level:h,toc_max_heading_level:p}=o;return(0,r.jsxs)(d.Z,{sidebar:t,toc:!u&&a.length>0?(0,r.jsx)(g.Z,{toc:a,minHeadingLevel:h,maxHeadingLevel:p}):void 0,children:[(0,r.jsx)(x,{}),(0,r.jsx)(m.Z,{children:n}),(i||s)&&(0,r.jsx)(f,{nextItem:i,prevItem:s})]})}function j(e){let t=e.content;return(0,r.jsx)(c.n4,{content:e.content,isBlogPostPage:!0,children:(0,r.jsxs)(s.FG,{className:(0,l.Z)(o.k.wrapper.blogPages,o.k.page.blogPostPage),children:[(0,r.jsx)(u.Z,{}),(0,r.jsx)(p,{sidebar:e.sidebar,children:(0,r.jsx)(t,{})})]})})}},45960:function(e,t,n){n.d(t,{Z:()=>ei});var r,l={};n.r(l),n.d(l,{ButtonExample:()=>I});var a=n("85893"),i=n("67294"),s=n("90496"),o=n("8903"),c=n("10075"),u=n("80661"),d=n("30056"),m=n("82234"),h=n("22687"),f=n("31058"),g=n("70341");function x(){let{prism:e}=(0,g.L)(),{colorMode:t}=(0,f.I)(),n=e.theme,r=e.darkTheme||n;return"dark"===t?r:n}var p=n("18605");let j="playgroundContainer_6Ior",v="playgroundHeader_Tvsk",b="playgroundEditor_TySg",N="playgroundPreview_mApW";function y(e){let{children:t}=e;return(0,a.jsx)("div",{className:(0,s.Z)(v),children:t})}function k(){return(0,a.jsx)("div",{children:"Loading..."})}function Z(){return(0,a.jsx)(m.Z,{fallback:(0,a.jsx)(k,{}),children:()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.Z,{fallback:e=>(0,a.jsx)(h.Ac,{...e}),children:(0,a.jsx)(c.i5,{})}),(0,a.jsx)(c.IF,{})]})})}function _(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y,{children:(0,a.jsx)(u.Z,{id:"theme.Playground.result",description:"The result label of the live codeblocks",children:"Result"})}),(0,a.jsx)("div",{className:N,children:(0,a.jsx)(Z,{})})]})}function w(){let e=(0,o.Z)();return(0,a.jsx)(c.uz,{className:b},String(e))}function C(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y,{children:(0,a.jsx)(u.Z,{id:"theme.Playground.liveEditor",description:"The live editor label of the live codeblocks",children:"Live Editor"})}),(0,a.jsx)(w,{})]})}let B=e=>`${e};`;function L(e){let{children:t,transformCode:n,...r}=e,{siteConfig:{themeConfig:l}}=(0,d.Z)(),{liveCodeBlock:{playgroundPosition:i}}=l,s=x(),o=r.metastring?.includes("noInline")??!1;return(0,a.jsx)("div",{className:j,children:(0,a.jsx)(c.nu,{code:t?.replace(/\n$/,""),noInline:o,transformCode:n??B,theme:s,...r,children:"top"===i?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(_,{}),(0,a.jsx)(C,{})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C,{}),(0,a.jsx)(_,{})]})})})}function I(e){return(0,a.jsx)("button",{type:"button",...e,style:{backgroundColor:"white",color:"black",border:"solid red",borderRadius:20,padding:10,cursor:"pointer",...e.style}})}let E={React:i,...i,...l};var T=n("2235"),A=n("6324"),M=n.n(A);let O=/title=(?<quote>["'])(?<title>.*?)\1/,H=/\{(?<range>[\d,-]+)\}/,R={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},$={...R,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},z=Object.keys(R);function S(e,t){let n=e.map(e=>{let{start:n,end:r}=$[e];return`(?:${n}\\s*(${t.flatMap(e=>[e.line,e.block?.start,e.block?.end].filter(Boolean)).join("|")})\\s*${r})`}).join("|");return RegExp(`^\\s*(?:${n})\\s*$`)}let P="codeBlockContainer_jDV4";function F(e){let{as:t,...n}=e,r=function(e){let t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach(e=>{let[r,l]=e,a=t[r];a&&"string"==typeof l&&(n[a]=l)}),n}(x());return(0,a.jsx)(t,{...n,style:r,className:(0,s.Z)(n.className,P,T.k.common.codeBlock)})}let D={codeBlockContent:"codeBlockContent_vx7S",codeBlockTitle:"codeBlockTitle_bdru",codeBlock:"codeBlock_Gebt",codeBlockStandalone:"codeBlockStandalone_i_cY",codeBlockLines:"codeBlockLines_FJaf",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_FU9Q",buttonGroup:"buttonGroup_cUGO"};function U(e){let{children:t,className:n}=e;return(0,a.jsx)(F,{as:"pre",tabIndex:0,className:(0,s.Z)(D.codeBlockStandalone,"thin-scrollbar",n),children:(0,a.jsx)("code",{className:D.codeBlockLines,children:t})})}var W=n("31008");let V={attributes:!0,characterData:!0,childList:!0,subtree:!0};var G=n("7316");let q={codeLine:"codeLine_qRmp",codeLineNumber:"codeLineNumber_dS_J",codeLineContent:"codeLineContent_XF5l"};function Q(e){let{line:t,classNames:n,showLineNumbers:r,getLineProps:l,getTokenProps:i}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");let o=l({line:t,className:(0,s.Z)(n,r&&q.codeLine)}),c=t.map((e,t)=>(0,a.jsx)("span",{...i({token:e})},t));return(0,a.jsxs)("span",{...o,children:[r?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:q.codeLineNumber}),(0,a.jsx)("span",{className:q.codeLineContent,children:c})]}):c,(0,a.jsx)("br",{})]})}var X=n("84171");function Y(e){return(0,a.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,a.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function J(e){return(0,a.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,a.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}let K={copyButtonCopied:"copyButtonCopied_OkN_",copyButtonIcons:"copyButtonIcons_OqsO",copyButtonIcon:"copyButtonIcon_PgCn",copyButtonSuccessIcon:"copyButtonSuccessIcon_bsQG"};function ee(e){let{code:t,className:n}=e,[r,l]=(0,i.useState)(!1),o=(0,i.useRef)(void 0),c=(0,i.useCallback)(()=>{(0,X.Z)(t),l(!0),o.current=window.setTimeout(()=>{l(!1)},1e3)},[t]);return(0,i.useEffect)(()=>()=>window.clearTimeout(o.current),[]),(0,a.jsx)("button",{type:"button","aria-label":r?(0,u.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,u.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,u.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,s.Z)("clean-btn",n,K.copyButton,r&&K.copyButtonCopied),onClick:c,children:(0,a.jsxs)("span",{className:K.copyButtonIcons,"aria-hidden":"true",children:[(0,a.jsx)(Y,{className:K.copyButtonIcon}),(0,a.jsx)(J,{className:K.copyButtonSuccessIcon})]})})}function et(e){return(0,a.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,a.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}let en={wordWrapButtonIcon:"wordWrapButtonIcon_MQXS",wordWrapButtonEnabled:"wordWrapButtonEnabled_TBIH"};function er(e){let{className:t,onClick:n,isEnabled:r}=e,l=(0,u.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,a.jsx)("button",{type:"button",onClick:n,className:(0,s.Z)("clean-btn",t,r&&en.wordWrapButtonEnabled),"aria-label":l,title:l,children:(0,a.jsx)(et,{className:en.wordWrapButtonIcon,"aria-hidden":"true"})})}function el(e){var t,n,r;let{children:l,className:o="",metastring:c,title:u,showLineNumbers:d,language:m}=e,{prism:{defaultLanguage:h,magicComments:f}}=(0,g.L)();let p=(t=m??function(e){let t=e.split(" ").find(e=>e.startsWith("language-"));return t?.replace(/language-/,"")}(o)??h,t?.toLowerCase()),j=x(),v=function(){let[e,t]=(0,i.useState)(!1),[n,r]=(0,i.useState)(!1),l=(0,i.useRef)(null),a=(0,i.useCallback)(()=>{let n=l.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t(e=>!e)},[l,e]),s=(0,i.useCallback)(()=>{let{scrollWidth:e,clientWidth:t}=l.current;r(e>t||l.current.querySelector("code").hasAttribute("style"))},[l]);return!function(e,t){let[n,r]=(0,i.useState)(),l=(0,i.useCallback)(()=>{r(e.current?.closest("[role=tabpanel][hidden]"))},[e,r]);(0,i.useEffect)(()=>{l()},[l]),!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:V,r=(0,W.zX)(t),l=(0,W.Ql)(n);(0,i.useEffect)(()=>{let t=new MutationObserver(r);return e&&t.observe(e,l),()=>t.disconnect()},[e,r,l])}(n,e=>{e.forEach(e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),l())})},{attributes:!0,characterData:!1,childList:!1,subtree:!1})}(l,s),(0,i.useEffect)(()=>{s()},[e,s]),(0,i.useEffect)(()=>(window.addEventListener("resize",s,{passive:!0}),()=>{window.removeEventListener("resize",s)}),[s]),{codeBlockRef:l,isEnabled:e,isCodeScrollable:n,toggle:a}}();let b=(n=c,(n?.match(O)?.groups.title??"")||u),{lineClassNames:N,code:y}=function(e,t){let n=e.replace(/\n$/,""),{language:r,magicComments:l,metastring:a}=t;if(a&&H.test(a)){let e=a.match(H).groups.range;if(0===l.length)throw Error(`A highlight range has been given in code block's metastring (\`\`\` ${a}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);let t=l[0].className;return{lineClassNames:Object.fromEntries(M()(e).filter(e=>e>0).map(e=>[e-1,[t]])),code:n}}if(void 0===r)return{lineClassNames:{},code:n};let i=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return S(["js","jsBlock"],t);case"jsx":case"tsx":return S(["js","jsBlock","jsx"],t);case"html":return S(["js","jsBlock","html"],t);case"python":case"py":case"bash":return S(["bash"],t);case"markdown":case"md":return S(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return S(["tex"],t);case"lua":case"haskell":return S(["lua"],t);case"sql":return S(["lua","jsBlock"],t);case"wasm":return S(["wasm"],t);case"vb":case"vba":case"visual-basic":return S(["vb","rem"],t);case"vbnet":return S(["vbnet","rem"],t);case"batch":return S(["rem"],t);case"basic":return S(["rem","f90"],t);case"fsharp":return S(["js","ml"],t);case"ocaml":case"sml":return S(["ml"],t);case"fortran":return S(["f90"],t);case"cobol":return S(["cobol"],t);default:return S(z,t)}}(r,l),s=n.split("\n"),o=Object.fromEntries(l.map(e=>[e.className,{start:0,range:""}])),c=Object.fromEntries(l.filter(e=>e.line).map(e=>{let{className:t,line:n}=e;return[n,t]})),u=Object.fromEntries(l.filter(e=>e.block).map(e=>{let{className:t,block:n}=e;return[n.start,t]})),d=Object.fromEntries(l.filter(e=>e.block).map(e=>{let{className:t,block:n}=e;return[n.end,t]}));for(let e=0;e<s.length;){let t=s[e].match(i);if(!t){e+=1;continue}let n=t.slice(1).find(e=>void 0!==e);c[n]?o[c[n]].range+=`${e},`:u[n]?o[u[n]].start=e:d[n]&&(o[d[n]].range+=`${o[d[n]].start}-${e-1},`),s.splice(e,1)}n=s.join("\n");let m={};return Object.entries(o).forEach(e=>{let[t,{range:n}]=e;M()(n).forEach(e=>{m[e]??=[],m[e].push(t)})}),{lineClassNames:m,code:n}}(l,{metastring:c,language:p,magicComments:f});let k=d??(r=c,!!r?.includes("showLineNumbers"));return(0,a.jsxs)(F,{as:"div",className:(0,s.Z)(o,p&&!o.includes(`language-${p}`)&&`language-${p}`),children:[b&&(0,a.jsx)("div",{className:D.codeBlockTitle,children:b}),(0,a.jsxs)("div",{className:D.codeBlockContent,children:[(0,a.jsx)(G.y$,{theme:j,code:y,language:p??"text",children:e=>{let{className:t,style:n,tokens:r,getLineProps:l,getTokenProps:i}=e;return(0,a.jsx)("pre",{tabIndex:0,ref:v.codeBlockRef,className:(0,s.Z)(t,D.codeBlock,"thin-scrollbar"),style:n,children:(0,a.jsx)("code",{className:(0,s.Z)(D.codeBlockLines,k&&D.codeBlockLinesWithNumbering),children:r.map((e,t)=>(0,a.jsx)(Q,{line:e,getLineProps:l,getTokenProps:i,classNames:N[t],showLineNumbers:k},t))})})}}),(0,a.jsxs)("div",{className:D.buttonGroup,children:[(v.isEnabled||v.isCodeScrollable)&&(0,a.jsx)(er,{className:D.codeButton,onClick:()=>v.toggle(),isEnabled:v.isEnabled}),(0,a.jsx)(ee,{className:D.codeButton,code:y})]})]})]})}let ea=(r=function(e){var t;let{children:n,...r}=e,l=(0,o.Z)();let s=(t=n,i.Children.toArray(t).some(e=>(0,i.isValidElement)(e))?t:Array.isArray(t)?t.join(""):t),c="string"==typeof s?el:U;return(0,a.jsx)(c,{...r,children:s},String(l))},function(e){return e.live?(0,a.jsx)(L,{scope:E,...e}):(0,a.jsx)(r,{...e})});function ei(e){return(0,a.jsx)(ea,{...e})}}}]); |