speice.io/assets/js/5249.b6836a87.js

1 line
268 KiB
JavaScript
Raw Normal View History

"use strict";(self.webpackChunkspeice_io=self.webpackChunkspeice_io||[]).push([["5249"],{22237:function(e,t,r){r.d(t,{Z:()=>aj});var a,n,i,s,o,l,h,m,c,p,u,d,g,f,v,b,y,x,w,k,S,M,z=r("67294");class A{constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new A(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class T{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new T(t,A.range(this,e))}}class B{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r="KaTeX parse error: "+e,a=t&&t.loc;if(a&&a.start<=a.end){var n,i,s,o,l=a.lexer.input;n=a.start,i=a.end,n===l.length?r+=" at end of input: ":r+=" at position "+(n+1)+": ";var h=l.slice(n,i).replace(/[^]/g,"$&\u0332");s=n>15?"\u2026"+l.slice(n-15,n):l.slice(0,n),r+=s+h+(o=i+15<l.length?l.slice(i,i+15)+"\u2026":l.slice(i))}var m=Error(r);return m.name="ParseError",m.__proto__=B.prototype,m.position=n,null!=n&&null!=i&&(m.length=i-n),m.rawMessage=e,m}}B.prototype.__proto__=Error.prototype;var C=/([A-Z])/g,q={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},N=/[&><"']/g,I=function e(t){if("ordgroup"===t.type)return 1===t.body.length?e(t.body[0]):t;if("color"===t.type)return 1===t.body.length?e(t.body[0]):t;if("font"===t.type)return e(t.body);else return t},H=function(e){if(!e)throw Error("Expected non-null, but got "+String(e));return e},R={contains:function(e,t){return -1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(N,e=>q[e])},hyphenate:function(e){return e.replace(C,"-$1").toLowerCase()},getBaseElem:I,isCharacterBox:function(e){var t=I(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?":"===t[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}},O={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type