distribution/docs/themes/hugo-geekdoc/static/js/116-831698f6.chunk.min.js

1 line
267 KiB
JavaScript
Raw Normal View History

(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[116],{2116:function(e,t,r){var n;"undefined"!=typeof self&&self,n=function(e){return function(){"use strict";var t={771:function(t){t.exports=e}},r={};function n(e){var a=r[e];if(void 0!==a)return a.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var a={};return function(){n.d(a,{default:function(){return l}});var e=n(771),t=n.n(e),r=function(e,t,r){for(var n=r,a=0,i=e.length;n<t.length;){var o=t[n];if(a<=0&&t.slice(n,n+i)===e)return n;"\\"===o?n++:"{"===o?a++:"}"===o&&a--,n++}return-1},i=/^\\begin{/,o=function(e,n){var a=function(e,t){for(var n,a=[],o=new RegExp("("+t.map((function(e){return e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")})).join("|")+")");-1!==(n=e.search(o));){n>0&&(a.push({type:"text",data:e.slice(0,n)}),e=e.slice(n));var s=t.findIndex((function(t){return e.startsWith(t.left)}));if(-1===(n=r(t[s].right,e,t[s].left.length)))break;var l=e.slice(0,n+t[s].right.length),h=i.test(l)?l:e.slice(t[s].left.length,n);a.push({type:"math",data:h,rawData:l,display:t[s].display}),e=e.slice(n+t[s].right.length)}return""!==e&&a.push({type:"text",data:e}),a}(e,n.delimiters);if(1===a.length&&"text"===a[0].type)return null;for(var o=document.createDocumentFragment(),s=0;s<a.length;s++)if("text"===a[s].type)o.appendChild(document.createTextNode(a[s].data));else{var l=document.createElement("span"),h=a[s].data;n.displayMode=a[s].display;try{n.preProcess&&(h=n.preProcess(h)),t().render(h,l,n)}catch(e){if(!(e instanceof t().ParseError))throw e;n.errorCallback("KaTeX auto-render: Failed to parse `"+a[s].data+"` with ",e),o.appendChild(document.createTextNode(a[s].rawData));continue}o.appendChild(l)}return o},s=function e(t,r){for(var n=0;n<t.childNodes.length;n++){var a=t.childNodes[n];if(3===a.nodeType){for(var i=a.textContent,s=a.nextSibling,l=0;s&&s.nodeType===Node.TEXT_NODE;)i+=s.textContent,s=s.nextSibling,l++;var h=o(i,r);if(h){for(var c=0;c<l;c++)a.nextSibling.remove();n+=h.childNodes.length-1,t.replaceChild(h,a)}else n+=l}else 1===a.nodeType&&function(){var t=" "+a.className+" ";-1===r.ignoredTags.indexOf(a.nodeName.toLowerCase())&&r.ignoredClasses.every((function(e){return-1===t.indexOf(" "+e+" ")}))&&e(a,r)}()}},l=function(e,t){if(!e)throw new Error("No element provided to render");var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);r.delimiters=r.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],r.ignoredTags=r.ignoredTags||["script","noscript","style","textarea","pre","code","option"],r.ignoredClasses=r.ignoredClasses||[],r.errorCallback=r.errorCallback||console.error,r.macros=r.macros||{},s(e,r)}}(),a.default}()},e.exports=n(r(527))},527:function(e){var t;"undefined"!=typeof self&&self,t=function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return ra}});var r=function e(t,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n,a,i="KaTeX parse error: "+t,o=r&&r.loc;if(o&&o.start<=o.end){var s=o.lexer.input;n=o.start,a=o.end,n===s.length?i+=" at end of input: ":i+=" at position "+(n+1)+": ";var l=s.slice(n,a).replace(/[^]/g,"$&̲");i+=(n>15?"…"+s.slice(n-15,n):s.slice(0,n))+l+(a+15<s.length?s.slice(a,a+15)+"…":s.slice(a))}var h=new Error(i);return h.name="ParseError