12 |
- (globalThis.webpackChunksakurairo_scripts=globalThis.webpackChunksakurairo_scripts||[]).push([[3474],{3474:()=>{!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e=/(?:^|\s)command-line(?:\s|$)/,t="command-line-prompt",n="".startsWith?function(e,t){return e.startsWith(t)}:function(e,t){return 0===e.indexOf(t)},a="".endsWith?function(e,t){return e.endsWith(t)}:function(e,t){var n=e.length;return e.substring(n-t.length,n)===t};Prism.hooks.add("before-highlight",(function(i){var s=r(i);if(!s.complete&&i.code){var o=i.element.parentElement;if(o&&/pre/i.test(o.nodeName)&&(e.test(o.className)||e.test(i.element.className))){var l=i.element.querySelector("."+t);l&&l.remove();var u=i.code.split("\n");s.numberOfLines=u.length;var c=s.outputLines=[],m=o.getAttribute("data-output"),p=o.getAttribute("data-filter-output");if(null!==m)m.split(",").forEach((function(e){var t=e.split("-"),n=parseInt(t[0],10),a=2===t.length?parseInt(t[1],10):n;if(!isNaN(n)&&!isNaN(a)){n<1&&(n=1),a>u.length&&(a=u.length),a--;for(var r=--n;r<=a;r++)c[r]=u[r],u[r]=""}}));else if(p)for(var d=0;d<u.length;d++)n(u[d],p)&&(c[d]=u[d].slice(p.length),u[d]="");for(var f=s.continuationLineIndicies=new Set,h=o.getAttribute("data-continuation-str"),v=o.getAttribute("data-filter-continuation"),g=0;g<u.length;g++){var b=u[g];b&&(h&&a(b,h)&&f.add(g+1),g>0&&v&&n(b,v)&&(u[g]=b.slice(v.length),f.add(g)))}i.code=u.join("\n")}else s.complete=!0}else s.complete=!0})),Prism.hooks.add("before-insert",(function(e){var t=r(e);if(!t.complete){for(var n=e.highlightedCode.split("\n"),a=t.outputLines||[],i=0,s=n.length;i<s;i++)a.hasOwnProperty(i)?n[i]='<span class="token output">'+Prism.util.encode(a[i])+"</span>":n[i]='<span class="token command">'+n[i]+"</span>";e.highlightedCode=n.join("\n")}})),Prism.hooks.add("complete",(function(n){if(function(e){return"command-line"in(e.vars=e.vars||{})}(n)){var a=r(n);if(!a.complete){var i=n.element.parentElement;e.test(n.element.className)&&(n.element.className=n.element.className.replace(e," ")),e.test(i.className)||(i.className+=" command-line");var s,o="",l=a.numberOfLines||0,u=b("data-prompt","");if(""!==u)s='<span data-prompt="'+u+'"></span>';else s='<span data-user="'+b("data-user","user")+'" data-host="'+b("data-host","localhost")+'"></span>';for(var c=a.continuationLineIndicies||new Set,m='<span data-continuation-prompt="'+b("data-continuation-prompt",">")+'"></span>',p=0;p<l;p++)c.has(p)?o+=m:o+=s;var d=document.createElement("span");d.className=t,d.innerHTML=o;for(var f=a.outputLines||[],h=0,v=f.length;h<v;h++)if(f.hasOwnProperty(h)){var g=d.children[h];g.removeAttribute("data-user"),g.removeAttribute("data-host"),g.removeAttribute("data-prompt")}n.element.insertBefore(d,n.element.firstChild),a.complete=!0}}function b(e,t){return(i.getAttribute(e)||t).replace(/"/g,""")}}))}function r(e){var t=e.vars=e.vars||{};return t["command-line"]=t["command-line"]||{}}}()}}]);
- //# sourceMappingURL=3474.js.map
|