blog/assets/js/ff82dde7.ed9826e1.js

1 line
273 KiB
JavaScript
Raw Normal View History

"use strict";(self.webpackChunkfi=self.webpackChunkfi||[]).push([[8472],{63935:(I,M,i)=>{i.r(M),i.d(M,{assets:()=>U,contentTitle:()=>e,default:()=>u,frontMatter:()=>a,metadata:()=>O,toc:()=>k});var N=i(85893),T=i(11151),g=i(67294),j=i(86010),z=i(12466),Z=i(16550),c=i(20469),l=i(91980),D=i(67392),G=i(50012);function C(I){return g.Children.toArray(I).filter((I=>"\n"!==I)).map((I=>{if(!I||(0,g.isValidElement)(I)&&function(I){const{props:M}=I;return!!M&&"object"==typeof M&&"value"in M}(I))return I;throw new Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof I.type?I.type:I.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function b(I){const{values:M,children:i}=I;return(0,g.useMemo)((()=>{const I=M??function(I){return C(I).map((I=>{let{props:{value:M,label:i,attributes:N,default:T}}=I;return{value:M,label:i,attributes:N,default:T}}))}(i);return function(I){const M=(0,D.l)(I,((I,M)=>I.value===M.value));if(M.length>0)throw new Error(`Docusaurus error: Duplicate values "${M.map((I=>I.value)).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(I),I}),[M,i])}function S(I){let{value:M,tabValues:i}=I;return i.some((I=>I.value===M))}function x(I){let{queryString:M=!1,groupId:i}=I;const N=(0,Z.k6)(),T=function(I){let{queryString:M=!1,groupId:i}=I;if("string"==typeof M)return M;if(!1===M)return null;if(!0===M&&!i)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return i??null}({queryString:M,groupId:i});return[(0,l._X)(T),(0,g.useCallback)((I=>{if(!T)return;const M=new URLSearchParams(N.location.search);M.set(T,I),N.replace({...N.location,search:M.toString()})}),[T,N])]}function L(I){const{defaultValue:M,queryString:i=!1,groupId:N}=I,T=b(I),[j,z]=(0,g.useState)((()=>function(I){let{defaultValue:M,tabValues:i}=I;if(0===i.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(M){if(!S({value:M,tabValues:i}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${M}" but none of its children has the corresponding value. Available values are: ${i.map((I=>I.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return M}const N=i.find((I=>I.default))??i[0];if(!N)throw new Error("Unexpected error: 0 tabValues");return N.value}({defaultValue:M,tabValues:T}))),[Z,l]=x({queryString:i,groupId:N}),[D,C]=function(I){let{groupId:M}=I;const i=function(I){return I?`docusaurus.tab.${I}`:null}(M),[N,T]=(0,G.Nk)(i);return[N,(0,g.useCallback)((I=>{i&&T.set(I)}),[i,T])]}({groupId:N}),L=(()=>{const I=Z??D;return S({value:I,tabValues:T})?I:null})();(0,c.Z)((()=>{L&&z(L)}),[L]);return{selectedValue:j,selectValue:(0,g.useCallback)((I=>{if(!S({value:I,tabValues:T}))throw new Error(`Can't select invalid tab value=${I}`);z(I),l(I),C(I)}),[l,C,T]),tabValues:T}}var m=i(72389);const s={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function d(I){let{className:M,block:i,selectedValue:T,selectValue:g,tabValues:Z}=I;const c=[],{blockElementScrollPositionUntilNextRender:l}=(0,z.o5)(),D=I=>{const M=I.currentTarget,i=c.indexOf(M),N=Z[i].value;N!==T&&(l(M),g(N))},G=I=>{let M=null;switch(I.key){case"Enter":D(I);break;case"ArrowRight":{const i=c.indexOf(I.currentTarget)+1;M=c[i]??c[0];break}case"ArrowLeft":{const i=c.indexOf(I.currentTarget)-1;M=c[i]??c[c.length-1];break}}M?.focus()};return(0,N.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,j.Z)("tabs",{"tabs--block":i},M),children:Z.map((I=>{let{value:M,label:i,attributes:g}=I;return(0,N.jsx)("li",{role:"tab",tabIndex:T===M?0:-1,"aria-selected":T===M,ref:I=>c.push(I),onKeyDown:G,onClick:D,...g,className:(0,j.Z)("tabs__item",s.tabItem,g?.className,{"tabs__item--active":T===M}),children:i??M},M)}))})}function w(I){let{lazy:M,children:i,selectedValue:T}=I;const j=(Array.isArray(i)