Spotify.NET/assets/js/614.36e4fb33.js

1 line
15 KiB
JavaScript
Raw Permalink Normal View History

(self.webpackChunkspotify_api_docs=self.webpackChunkspotify_api_docs||[]).push([[614],{614:function(e,t,n){"use strict";n.d(t,{Z:function(){return ee}});var o=n(7462),r=n(3366),a=n(7294),c=n(2389),s=n(6010),l=n(2949),i=n(6668);function u(){var e=(0,i.L)().prism,t=(0,l.I)().colorMode,n=e.theme,o=e.darkTheme||n;return"dark"===t?o:n}var p=n(5281),d=n(6528),m=n(7594),f=n.n(m),g=(0,d.Z)(/title=(["'])(.*?)\1/,{quote:1,title:2}),v=(0,d.Z)(/\{([\d,-]+)\}/,{range:1}),y={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}};function h(e,t){var n=e.map((function(e){var n=y[e],o=n.start,r=n.end;return"(?:"+o+"\\s*("+t.flatMap((function(e){var t,n;return[e.line,null==(t=e.block)?void 0:t.start,null==(n=e.block)?void 0:n.end].filter(Boolean)})).join("|")+")\\s*"+r+")"})).join("|");return new RegExp("^\\s*(?:"+n+")\\s*$")}function b(e,t){var n=e.replace(/\n$/,""),o=t.language,r=t.magicComments,a=t.metastring;if(a&&v.test(a)){var c=a.match(v).groups.range;if(0===r.length)throw new 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.");var s=r[0].className,l=f()(c).filter((function(e){return e>0})).map((function(e){return[e-1,[s]]}));return{lineClassNames:Object.fromEntries(l),code:n}}if(void 0===o)return{lineClassNames:{},code:n};for(var i=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return h(["js","jsBlock"],t);case"jsx":case"tsx":return h(["js","jsBlock","jsx"],t);case"html":return h(["js","jsBlock","html"],t);case"python":case"py":case"bash":return h(["bash"],t);case"markdown":case"md":return h(["html","jsx","bash"],t);default:return h(Object.keys(y),t)}}(o,r),u=n.split("\n"),p=Object.fromEntries(r.map((function(e){return[e.className,{start:0,range:""}]}))),d=Object.fromEntries(r.filter((function(e){return e.line})).map((function(e){var t=e.className;return[e.line,t]}))),m=Object.fromEntries(r.filter((function(e){return e.block})).map((function(e){var t=e.className;return[e.block.start,t]}))),g=Object.fromEntries(r.filter((function(e){return e.block})).map((function(e){var t=e.className;return[e.block.end,t]}))),b=0;b<u.length;){var k=u[b].match(i);if(k){var E=k.slice(1).find((function(e){return void 0!==e}));d[E]?p[d[E]].range+=b+",":m[E]?p[m[E]].start=b:g[E]&&(p[g[E]].range+=p[g[E]].start+"-"+(b-1)+","),u.splice(b,1)}else b+=1}n=u.join("\n");var N={};return Object.entries(p).forEach((function(e){var t=e[0],n=e[1].range;f()(n).forEach((function(e){null!=N[e]||(N[e]=[]),N[e].push(t)}))})),{lineClassNames:N,code:n}}var k="codeBlockContainer_Ckt0",E=["as"];function N(e){var t=e.as,n=(0,r.Z)(e,E),c=function(e){var t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((function(e){var o=e[0],r=e[1],a=t[o];a&&"string"==typeof r&&(n[a]=r)})),n}(u());return a.createElement(t,(0,o.Z)({},n,{style:c,className:(0,s.Z)(n.className,k,p.k.common.codeBlock)}))}var B={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function C(e){var t=e.children,n=e.className;return a.createElement(N,{as:"pre",tabIndex:0,className:(0,s.Z)(B.codeBlockStandalone,"thin-scrollbar",n)},a.createElement("code",{className:B.codeBlockLines},t))}var w=n(9688),L={attributes:!0,characterData:!0,childList:!0,subtree:!0};function j(e,t){var n=(0,a.useState)(),o=n[0],r=n[1],c=(0,a.useCallback)((function(){var t;r(null==(t=e.current)?void 0:t.closest("[role=tabpanel][hidden]"))}),[e,r]);(0,a.useEffect)((function(){c()}),[c]),function(e,t,n){void 0===n&&(n=L);var o=(0,w.zX)(t),r=(0,w.Ql)(n);(0,a.useEffect)((function(){var t=new MutationObserver(o);return e&&t.observe(e,r),function(){return t.di