MCPcopy
hub / github.com/google/adk-python / constructor

Method constructor

src/google/adk/cli/browser/chunk-27SWUPRL.js:1–1  ·  view source on GitHub ↗
(e,t)

Source from the content-addressed store, hash-verified

1import"./chunk-RMXJBC7V.js";var z=class r extends Error{constructor(e,t){var a="KaTeX parse error: "+e,n,l,u=t&&t.loc;if(u&&u.start<=u.end){var h=u.lexer.input;n=u.start,l=u.end,n===h.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var c=h.slice(n,l).replace(/[^]/g,"$&\u0332"),v;n>15?v="\u2026"+h.slice(n-15,n):v=h.slice(0,n);var g;l+15<h.length?g=h.slice(l,l+15)+"\u2026":g=h.slice(l),a+=v+c+g}super(a),this.name="ParseError",Object.setPrototypeOf(this,r.prototype),this.position=n,n!=null&&l!=null&&(this.length=l-n),this.rawMessage=e}},H1=/([A-Z])/g,qt=r=>r.replace(H1,"-$1").toLowerCase(),N1={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},O1=/[&><"']/g,n0=r=>String(r).replace(O1,e=>N1[e]),Ee=r=>r.type==="ordgroup"||r.type==="color"?r.body.length===1?Ee(r.body[0]):r:r.type==="font"?Ee(r.body):r,F1=new Set(["mathord","textord","atom"]),q0=r=>F1.has(Ee(r).type),L1=r=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(r);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},vt={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:r=>"#"+r},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:(r,e)=>(e.push(r),e)},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:r=>Math.max(0,r),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:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:r=>Math.max(0,r),cli:"-e, --max-expand <n>",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function P1(r){if("default"in r)return r.default;var e=r.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var me=class{constructor(e){e===void 0&&(e={}),e=e||{};for(var t of Object.keys(vt)){var a=vt[t],n=e[t];this[t]=n!==void 0?a.processor?a.processor(n):n:P1(a)}}reportNonstrict(e,t,a){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,a)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new z("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var n=this.strict;if(typeof n=="function")try{n=n(e,t,a)}catch(l){n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=L1(e.url);if(t==null)return!1;e.protocol=t}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}},w0=class{constructor(e,t,a){this.id=e,this.size=t,this.cramped=a}sup(){return k0[G1[this.id]]}sub(){return k0[U1[this.id]]}fracNum(){return k0[V1[this.id]]}fracDen(){return k0[X1[this.id]]}cramp(){return k0[Y1[this.id]]}text(){return k0[W1[this.id]]}isTight(){return this.size>=2}},Rt=0,He=1,_0=2,C0=3,ce=4,p0=5,ee=6,s0=7,k0=[new w0(Rt,0,!1),new w0(He,0,!0),new w0(_0,1,!1),new w0(C0,1,!0),new w0(ce,2,!1),new w0(p0,2,!0),new w0(ee,3,!1),new w0(s0,3,!0)],G1=[ce,p0,ce,p0,ee,s0,ee,s0],U1=[p0,p0,p0,p0,s0,s0,s0,s0],V1=[_0,C0,ce,p0,ee,s0,ee,s0],X1=[C0,C0,p0,p0,s0,s0,s0,s0],Y1=[He,He,C0,C0,p0,p0,s0,s0],W1=[Rt,He,_0,C0,_0,C0,_0,C0],H={DISPLAY:k0[Rt],TEXT:k0[_0],SCRIPT:k0[ce],SCRIPTSCRIPT:k0[ee]},pt=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function $1(r){for(var e=0;e<pt.length;e++)for(var t=pt[e],a=0;a<t.blocks.length;a++){var n=t.blocks[a];if(r>=n[0]&&r<=n[1])return t.name}return null}var Ie=[];pt.forEach(r=>r.blocks.forEach(e=>Ie.push(...e)));function Rr(r){for(var e=0;e<Ie.length;e+=2)if(r>=Ie[e]&&r<=Ie[e+1])return!0;return!1}var Q0=80,j1=function(e,t){return"M95,"+(622+e+t)+`
2c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
3c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
4c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10

Callers

nothing calls this directly

Calls 2

sliceMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected