Files
website/assets/js/933.242aad0a.js
github-actions[bot] 645df5016b deploy: a9fc72b62b
2023-09-17 15:18:03 +00:00

1 line
10 KiB
JavaScript

(self.webpackChunkstardust_website=self.webpackChunkstardust_website||[]).push([[933],{6159:(e,t,n)=>{"use strict";n.d(t,{N:()=>p,Z:()=>u});var o=n(7462),r=n(7294),s=n(6010),l=n(4973),a=n(9306);const c="enhancedAnchor_WiXH",i="h1Heading_dC7a",p=function(e){let{...t}=e;return r.createElement("header",null,r.createElement("h1",(0,o.Z)({},t,{id:void 0,className:i}),t.children))},u=e=>{return"h1"===e?p:(t=e,function(e){let{id:n,...o}=e;const{navbar:{hideOnScroll:i}}=(0,a.LU)();return n?r.createElement(t,o,r.createElement("a",{"aria-hidden":"true",tabIndex:-1,className:(0,s.Z)("anchor",{[c]:!i}),id:n}),o.children,r.createElement("a",{className:"hash-link",href:`#${n}`,title:(0,l.I)({id:"theme.common.headingLinkTitle",message:"Direct link to heading",description:"Title for link to heading"})},"#")):r.createElement(t,o)});var t}},7933:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var o=n(7294),r=n(6742),s=n(7462),l=n(6010);const a={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","at-rule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]};var c={Prism:n(7410).Z,theme:a};function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},p.apply(this,arguments)}var u=/\r\n|\r|\n/,d=function(e){0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},h=function(e,t){var n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},y=function(e,t){var n=e.plain,o=Object.create(null),r=e.styles.reduce((function(e,n){var o=n.languages,r=n.style;return o&&!o.includes(t)||n.types.forEach((function(t){var n=p({},e[t],r);e[t]=n})),e}),o);return r.root=n,r.plain=p({},n,{backgroundColor:null}),r};function m(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&-1===t.indexOf(o)&&(n[o]=e[o]);return n}const g=function(e){function t(){for(var t=this,n=[],o=arguments.length;o--;)n[o]=arguments[o];e.apply(this,n),i(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?y(e.theme,e.language):void 0;return t.themeDict=n})),i(this,"getLineProps",(function(e){var n=e.key,o=e.className,r=e.style,s=p({},m(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),l=t.getThemeDict(t.props);return void 0!==l&&(s.style=l.plain),void 0!==r&&(s.style=void 0!==s.style?p({},s.style,r):r),void 0!==n&&(s.key=n),o&&(s.className+=" "+o),s})),i(this,"getStyleForToken",(function(e){var n=e.types,o=e.empty,r=n.length,s=t.getThemeDict(t.props);if(void 0!==s){if(1===r&&"plain"===n[0])return o?{display:"inline-block"}:void 0;if(1===r&&!o)return s[n[0]];var l=o?{display:"inline-block"}:{},a=n.map((function(e){return s[e]}));return Object.assign.apply(Object,[l].concat(a))}})),i(this,"getTokenProps",(function(e){var n=e.key,o=e.className,r=e.style,s=e.token,l=p({},m(e,["key","className","style","token"]),{className:"token "+s.types.join(" "),children:s.content,style:t.getStyleForToken(s),key:void 0});return void 0!==r&&(l.style=void 0!==l.style?p({},l.style,r):r),void 0!==n&&(l.key=n),o&&(l.className+=" "+o),l})),i(this,"tokenize",(function(e,t,n,o){var r={code:t,grammar:n,language:o,tokens:[]};e.hooks.run("before-tokenize",r);var s=r.tokens=e.tokenize(r.code,r.grammar,r.language);return e.hooks.run("after-tokenize",r),s}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,o=e.code,r=e.children,s=this.getThemeDict(this.props),l=t.languages[n];return r({tokens:function(e){for(var t=[[]],n=[e],o=[0],r=[e.length],s=0,l=0,a=[],c=[a];l>-1;){for(;(s=o[l]++)<r[l];){var i=void 0,p=t[l],y=n[l][s];if("string"==typeof y?(p=l>0?p:["plain"],i=y):(p=h(p,y.type),y.alias&&(p=h(p,y.alias)),i=y.content),"string"==typeof i){var m=i.split(u),g=m.length;a.push({types:p,content:m[0]});for(var f=1;f<g;f++)d(a),c.push(a=[]),a.push({types:p,content:m[f]})}else l++,t.push(p),n.push(i),o.push(0),r.push(i.length)}l--,t.pop(),n.pop(),o.pop(),r.pop()}return d(a),c}(void 0!==l?this.tokenize(t,o,l,n):[o]),className:"prism-code language-"+n,style:void 0!==s?s.root:{},getLineProps:this.getLineProps,getTokenProps:this.getTokenProps})},t}(o.Component);var f=n(7594),b=n.n(f);const k={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]};var v=n(5350),E=n(9306);const j=()=>{const{prism:e}=(0,E.LU)(),{isDarkTheme:t}=(0,v.Z)(),n=e.theme||k,o=e.darkTheme||n;return t?o:n};var T=n(4973);const Z="codeBlockContainer_J+bg",N="codeBlockContent_csEI",x="codeBlockTitle_oQzk",C="codeBlock_rtdJ",B="codeBlockWithTitle_ZT05",L="copyButton_M3SB",S="codeBlockLines_1zSZ",_=/{([\d,-]+)}/,P=function(e){void 0===e&&(e=["js","jsBlock","jsx","python","html"]);const t={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},python:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},n=["highlight-next-line","highlight-start","highlight-end"].join("|"),o=e.map((e=>`(?:${t[e].start}\\s*(${n})\\s*${t[e].end})`)).join("|");return new RegExp(`^\\s*(?:${o})\\s*$`)};function $(e){let{children:t,className:n,metastring:r,title:a}=e;const{prism:i}=(0,E.LU)(),[p,u]=(0,o.useState)(!1),[d,h]=(0,o.useState)(!1);(0,o.useEffect)((()=>{h(!0)}),[]);const y=(0,E.bc)(r)||a,m=(0,o.useRef)(null);let f=[];const k=j(),v=Array.isArray(t)?t.join(""):t;if(r&&_.test(r)){const e=r.match(_)[1];f=b()(e).filter((e=>e>0))}let $=n&&n.replace(/language-/,"");!$&&i.defaultLanguage&&($=i.defaultLanguage);let w=v.replace(/\n$/,"");if(0===f.length&&void 0!==$){let e="";const t=(e=>{switch(e){case"js":case"javascript":case"ts":case"typescript":return P(["js","jsBlock"]);case"jsx":case"tsx":return P(["js","jsBlock","jsx"]);case"html":return P(["js","jsBlock","html"]);case"python":case"py":return P(["python"]);default:return P()}})($),n=v.replace(/\n$/,"").split("\n");let o;for(let r=0;r<n.length;){const s=r+1,l=n[r].match(t);if(null!==l){switch(l.slice(1).reduce(((e,t)=>e||t),void 0)){case"highlight-next-line":e+=`${s},`;break;case"highlight-start":o=s;break;case"highlight-end":e+=`${o}-${s-1},`}n.splice(r,1)}else r+=1}f=b()(e),w=n.join("\n")}const O=()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;const o=document.createElement("textarea"),r=document.activeElement;o.value=e,o.setAttribute("readonly",""),o.style.contain="strict",o.style.position="absolute",o.style.left="-9999px",o.style.fontSize="12pt";const s=document.getSelection();let l=!1;s.rangeCount>0&&(l=s.getRangeAt(0)),n.append(o),o.select(),o.selectionStart=0,o.selectionEnd=e.length;let a=!1;try{a=document.execCommand("copy")}catch{}o.remove(),l&&(s.removeAllRanges(),s.addRange(l)),r&&r.focus()}(w),u(!0),setTimeout((()=>u(!1)),2e3)};return o.createElement(g,(0,s.Z)({},c,{key:String(d),theme:k,code:w,language:$}),(e=>{let{className:t,style:n,tokens:r,getLineProps:a,getTokenProps:c}=e;return o.createElement("div",{className:Z},y&&o.createElement("div",{style:n,className:x},y),o.createElement("div",{className:(0,l.Z)(N,$)},o.createElement("pre",{tabIndex:0,className:(0,l.Z)(t,C,"thin-scrollbar",{[B]:y}),style:n},o.createElement("code",{className:S},r.map(((e,t)=>{1===e.length&&""===e[0].content&&(e[0].content="\n");const n=a({line:e,key:t});return f.includes(t+1)&&(n.className+=" docusaurus-highlight-code-line"),o.createElement("span",(0,s.Z)({key:t},n),e.map(((e,t)=>o.createElement("span",(0,s.Z)({key:t},c({token:e,key:t}))))))})))),o.createElement("button",{ref:m,type:"button","aria-label":(0,T.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),className:(0,l.Z)(L,"clean-btn"),onClick:O},p?o.createElement(T.Z,{id:"theme.CodeBlock.copied",description:"The copied button label on code blocks"},"Copied"):o.createElement(T.Z,{id:"theme.CodeBlock.copy",description:"The copy button label on code blocks"},"Copy"))))}))}var w=n(6159);const O={code:e=>{const{children:t}=e;return(0,o.isValidElement)(t)?t:t.includes("\n")?o.createElement($,e):o.createElement("code",e)},a:e=>o.createElement(r.Z,e),pre:e=>{const{children:t}=e;return(0,o.isValidElement)(t?.props?.children)?t?.props.children:o.createElement($,(0,o.isValidElement)(t)?t?.props:{children:t})},h1:(0,w.Z)("h1"),h2:(0,w.Z)("h2"),h3:(0,w.Z)("h3"),h4:(0,w.Z)("h4"),h5:(0,w.Z)("h5"),h6:(0,w.Z)("h6")}},7594:(e,t)=>{function n(e){let t,n=[];for(let o of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(o))n.push(parseInt(o,10));else if(t=o.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,o,r,s]=t;if(o&&s){o=parseInt(o),s=parseInt(s);const e=o<s?1:-1;"-"!==r&&".."!==r&&"\u2025"!==r||(s+=e);for(let t=o;t!==s;t+=e)n.push(t)}}return n}t.default=n,e.exports=n}}]);