speice.io/assets/js/ccc49370.ef47e24c.js

1 line
3.6 KiB
JavaScript

"use strict";(self.webpackChunkspeice_io=self.webpackChunkspeice_io||[]).push([["2998"],{28127:function(e,t,n){n.d(t,{Z:function(){return s}});var i=n(85893);n(67294);var l=n(96025),r=n(50790);function s(e){let{nextItem:t,prevItem:n}=e;return(0,i.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,l.I)({id:"theme.blog.post.paginator.navAriaLabel",message:"Blog post page navigation",description:"The ARIA label for the blog posts pagination"}),children:[t&&(0,i.jsx)(r.Z,{...t,subLabel:(0,i.jsx)(l.Z,{id:"theme.blog.post.paginator.olderPost",description:"The blog post button label to navigate to the older/next post",children:"Older post"})}),n&&(0,i.jsx)(r.Z,{...n,subLabel:(0,i.jsx)(l.Z,{id:"theme.blog.post.paginator.newerPost",description:"The blog post button label to navigate to the newer/previous post",children:"Newer post"}),isNext:!0})]})}},40131:function(e,t,n){n.d(t,{Z:function(){return o}});var i=n(85893),l=n(67294),r=n(34403);function s(e){let{title:t,headingType:n,children:l}=e;return(0,i.jsxs)("div",{role:"group",children:[(0,i.jsx)(r.Z,{as:n,children:t}),l]})}let o=(0,l.memo)(function(e){let{items:t,ListComponent:n}=e;return function(e,t){let n=[],l=[];function r(){if(0===l.length)return;let e=new Date(l[0].date).getFullYear(),r=function(e,t){let n=[],l=[];function r(){if(0===l.length)return;let e=l[0].title.split(":")[0];l=(l=l.map(e=>({...e,title:e.title.split(":")[1].trim()}))).reverse(),n.push((0,i.jsx)(s,{title:e,headingType:"h4",children:(0,i.jsx)("div",{role:"group",style:{paddingInlineStart:"1.5em"},children:(0,i.jsx)(t,{items:l})})},e)),l=[]}for(let s of e){if(s.title.includes(":")){l.push(s);continue}r(),n.push((0,i.jsx)(t,{items:[s]},s.permalink))}return r(),n}(l,t);n.push((0,i.jsx)(s,{title:String(e),headingType:"h3",children:r},e)),l=[]}for(let t of e){if(0===l.length){l.push(t);continue}let e=new Date(t.date).getFullYear();e!==new Date(l[0].date).getFullYear()&&r(),l.push(t)}return r(),n}(t,n)})},40653:function(e,t,n){n.d(t,{Z:()=>y});var i=n("85893");n("67294");var l=n("67026"),r=n("7227"),s=n("34550"),o=n("96025"),a=n("2933"),d=n("70144"),c=n("78720"),u=n("66856"),h=n("16893");let p="playgroundContainer_TGbA",g="playgroundHeader_qwyd",x="playgroundEditor_PvJ1",j="playgroundPreview_bb8I";function f(e){let{children:t}=e;return(0,i.jsx)("div",{className:(0,l.Z)(g),children:t})}function b(){return(0,i.jsx)("div",{children:"Loading..."})}function m(){return(0,i.jsx)(d.Z,{fallback:(0,i.jsx)(b,{}),children:()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(h.Z,{fallback:e=>(0,i.jsx)(c.Ac,{...e}),children:(0,i.jsx)(s.i5,{})}),(0,i.jsx)(s.IF,{})]})})}function v(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f,{children:(0,i.jsx)(o.Z,{id:"theme.Playground.result",description:"The result label of the live codeblocks",children:"Result"})}),(0,i.jsx)("div",{className:j,children:(0,i.jsx)(m,{})})]})}function Z(){let e=(0,r.Z)();return(0,i.jsx)(s.uz,{className:x},String(e))}function k(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f,{children:(0,i.jsx)(o.Z,{id:"theme.Playground.liveEditor",description:"The live editor label of the live codeblocks",children:"Live Editor"})}),(0,i.jsx)(Z,{})]})}let w=e=>`${e};`;function y(e){let{children:t,transformCode:n,...l}=e,{siteConfig:{themeConfig:r}}=(0,a.Z)(),{liveCodeBlock:{playgroundPosition:o}}=r,d=(0,u.p)(),c=l.metastring?.includes("noInline")??!1;return(0,i.jsx)("div",{className:p,children:(0,i.jsx)(s.nu,{code:t?.replace(/\n$/,""),noInline:c,transformCode:n??w,theme:d,...l,children:"top"===o?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(v,{}),(0,i.jsx)(k,{})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(k,{}),(0,i.jsx)(v,{})]})})})}}}]);