Changeset 3489132
- Timestamp:
- 03/23/2026 02:58:46 PM (5 days ago)
- Location:
- mindcat/trunk/build
- Files:
-
- 38 added
- 5 edited
-
130.js (modified) (1 diff)
-
169.js (added)
-
187.js (added)
-
201.js (added)
-
21.js (added)
-
215.js (added)
-
235.js (added)
-
293.js (added)
-
31.js (added)
-
311.js (added)
-
333.js (added)
-
335.js (added)
-
359.js (added)
-
367.js (added)
-
377.js (added)
-
378.js (added)
-
38.js (added)
-
427.js (added)
-
447.js (added)
-
518.js (added)
-
535.js (added)
-
550.js (added)
-
598.js (added)
-
620.js (modified) (1 diff)
-
644.js (added)
-
659.js (added)
-
679.js (added)
-
697.js (added)
-
70.js (added)
-
731.js (modified) (1 diff)
-
736.js (added)
-
811.js (added)
-
82.js (added)
-
859.js (added)
-
878.js (added)
-
894.js (added)
-
895.js (added)
-
944.js (added)
-
957.js (added)
-
982.js (added)
-
999.js (added)
-
mindmap/mindmap.asset.php (modified) (1 diff)
-
mindmap/mindmap.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mindcat/trunk/build/130.js
r3467811 r3489132 1 "use strict";(globalThis.webpackChunkmindcat=globalThis.webpackChunkmindcat||[]).push([[130],{2130(e,t,r){r.d(t,{default:()=>mn});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 n{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 n(t,a.range(this,e))}}class i{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,a,n="KaTeX parse error: "+e,o=t&&t.loc;if(o&&o.start<=o.end){var s=o.lexer.input;r=o.start,a=o.end,r===s.length?n+=" at end of input: ":n+=" at position "+(r+1)+": ";var l=s.slice(r,a).replace(/[^]/g,"$&̲");n+=(r>15?"…"+s.slice(r-15,r):s.slice(0,r))+l+(a+15<s.length?s.slice(a,a+15)+"…":s.slice(a))}var h=new Error(n);return h.name="ParseError",h.__proto__=i.prototype,h.position=r,null!=r&&null!=a&&(h.length=a-r),h.rawMessage=e,h}}i.prototype.__proto__=Error.prototype;var o=/([A-Z])/g,s=e=>e.replace(o,"-$1").toLowerCase(),l={"&":"&",">":">","<":"<",'"':""","'":"'"},h=/[&><"']/g,m=e=>String(e).replace(h,e=>l[e]),c=e=>"ordgroup"===e.type||"color"===e.type?1===e.body.length?c(e.body[0]):e:"font"===e.type?c(e.body):e,u=new Set(["mathord","textord","atom"]),p=e=>u.has(c(e).type),d={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:["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:e=>Math.max(0,e),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:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function g(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class f{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},d)if(d.hasOwnProperty(t)){var r=d[t];this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:g(r)}}reportNonstrict(e,t,r){var a=this.strict;if("function"==typeof a&&(a=a(e,t,r)),a&&"ignore"!==a){if(!0===a||"error"===a)throw new i("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===a?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){var a=this.strict;if("function"==typeof a)try{a=a(e,t,r)}catch(e){a="error"}return!(!a||"ignore"===a||!0!==a&&"error"!==a&&("warn"===a?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]"),1)))}isTrusted(e){if(e.url&&!e.protocol){var t=(e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"})(e.url);if(null==t)return!1;e.protocol=t}var r="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(r)}}class v{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return b[y[this.id]]}sub(){return b[x[this.id]]}fracNum(){return b[w[this.id]]}fracDen(){return b[k[this.id]]}cramp(){return b[z[this.id]]}text(){return b[S[this.id]]}isTight(){return this.size>=2}}var b=[new v(0,0,!1),new v(1,0,!0),new v(2,1,!1),new v(3,1,!0),new v(4,2,!1),new v(5,2,!0),new v(6,3,!1),new v(7,3,!0)],y=[4,5,4,5,6,7,6,7],x=[5,5,5,5,7,7,7,7],w=[2,3,4,5,6,7,6,7],k=[3,3,5,5,7,7,7,7],z=[1,1,3,3,5,5,7,7],S=[0,1,2,3,2,3,2,3],M={DISPLAY:b[0],TEXT:b[2],SCRIPT:b[4],SCRIPTSCRIPT:b[6]},A=[{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]]}],T=[];function B(e){for(var t=0;t<T.length;t+=2)if(e>=T[t]&&e<=T[t+1])return!0;return!1}A.forEach(e=>e.blocks.forEach(e=>T.push(...e)));var q={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class C{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>e.toText()).join("")}}var I={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},H={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},R={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function E(e,t,r){if(!I[t])throw new Error("Font metrics not found for font: "+t+".");var a=e.charCodeAt(0),n=I[t][a];if(!n&&e[0]in R&&(a=R[e[0]].charCodeAt(0),n=I[t][a]),n||"text"!==r||B(a)&&(n=I[t][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var O={},N=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],D=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],P=function(e,t){return t.size<2?e:N[e-1][t.size-1]};class L{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||L.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=D[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return new L(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:P(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:D[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=P(L.BASESIZE,e);return this.size===t&&this.textSize===L.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==L.BASESIZE?["sizing","reset-size"+this.size,"size"+L.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!O[t=e>=5?0:e>=3?1:2]){var r=O[t]={cssEmPerMu:H.quad[t]/18};for(var a in H)H.hasOwnProperty(a)&&(r[a]=H[a][t])}return O[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}L.BASESIZE=6;var V={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},F={ex:!0,em:!0,mu:!0},G=function(e){return"string"!=typeof e&&(e=e.unit),e in V||e in F||"ex"===e},U=function(e,t){var r;if(e.unit in V)r=V[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var a;if(a=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=a.fontMetrics().xHeight;else{if("em"!==e.unit)throw new i("Invalid unit: '"+e.unit+"'");r=a.fontMetrics().quad}a!==t&&(r*=a.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},W=function(e){return+e.toFixed(4)+"em"},Y=function(e){return e.filter(e=>e).join(" ")},X=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var a=t.getColor();a&&(this.style.color=a)}},_=function(e){var t=document.createElement(e);for(var r in t.className=Y(this.classes),this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);for(var a in this.attributes)this.attributes.hasOwnProperty(a)&&t.setAttribute(a,this.attributes[a]);for(var n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t},j=/[\s"'>/=\x00-\x1f]/,$=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+m(Y(this.classes))+'"');var r="";for(var a in this.style)this.style.hasOwnProperty(a)&&(r+=s(a)+":"+this.style[a]+";");for(var n in r&&(t+=' style="'+m(r)+'"'),this.attributes)if(this.attributes.hasOwnProperty(n)){if(j.test(n))throw new i("Invalid attribute name '"+n+"'");t+=" "+n+'="'+m(this.attributes[n])+'"'}t+=">";for(var o=0;o<this.children.length;o++)t+=this.children[o].toMarkup();return t+"</"+e+">"};class Z{constructor(e,t,r,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,X.call(this,e,r,a),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return _.call(this,"span")}toMarkup(){return $.call(this,"span")}}class K{constructor(e,t,r,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,X.call(this,t,a),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return _.call(this,"a")}toMarkup(){return $.call(this,"a")}}class J{constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e='<img src="'+m(this.src)+'" alt="'+m(this.alt)+'"',t="";for(var r in this.style)this.style.hasOwnProperty(r)&&(t+=s(r)+":"+this.style[r]+";");return t&&(e+=' style="'+m(t)+'"'),e+"'/>"}}var Q={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class ee{constructor(e,t,r,a,n,i,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=a||0,this.skew=n||0,this.width=i||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<A.length;t++)for(var r=A[t],a=0;a<r.blocks.length;a++){var n=r.blocks[a];if(e>=n[0]&&e<=n[1])return r.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Q[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var r in this.italic>0&&((t=document.createElement("span")).style.marginRight=W(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=Y(this.classes)),this.style)this.style.hasOwnProperty(r)&&((t=t||document.createElement("span")).style[r]=this.style[r]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=m(Y(this.classes)),t+='"');var r="";for(var a in this.italic>0&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(a)&&(r+=s(a)+":"+this.style[a]+";");r&&(e=!0,t+=' style="'+m(r)+'"');var n=m(this.text);return e?(t+=">",t+=n,t+="</span>"):n}}class te{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+m(this.attributes[t])+'"');e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+"</svg>"}}class re{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",q[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+m(this.alternate)+'"/>':'<path d="'+m(q[this.pathName])+'"/>'}}class ae{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+m(this.attributes[t])+'"');return e+"/>"}}function ne(e){if(e instanceof ee)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var ie={bin:1,close:1,inner:1,open:1,punct:1,rel:1},oe={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},se={math:{},text:{}};function le(e,t,r,a,n,i){se[e][n]={font:t,group:r,replace:a},i&&a&&(se[e][a]=se[e][n])}var he="math",me="text",ce="main",ue="ams",pe="accent-token",de="bin",ge="close",fe="inner",ve="mathord",be="op-token",ye="open",xe="punct",we="rel",ke="spacing",ze="textord";le(he,ce,we,"≡","\\equiv",!0),le(he,ce,we,"≺","\\prec",!0),le(he,ce,we,"≻","\\succ",!0),le(he,ce,we,"∼","\\sim",!0),le(he,ce,we,"⊥","\\perp"),le(he,ce,we,"⪯","\\preceq",!0),le(he,ce,we,"⪰","\\succeq",!0),le(he,ce,we,"≃","\\simeq",!0),le(he,ce,we,"∣","\\mid",!0),le(he,ce,we,"≪","\\ll",!0),le(he,ce,we,"≫","\\gg",!0),le(he,ce,we,"≍","\\asymp",!0),le(he,ce,we,"∥","\\parallel"),le(he,ce,we,"⋈","\\bowtie",!0),le(he,ce,we,"⌣","\\smile",!0),le(he,ce,we,"⊑","\\sqsubseteq",!0),le(he,ce,we,"⊒","\\sqsupseteq",!0),le(he,ce,we,"≐","\\doteq",!0),le(he,ce,we,"⌢","\\frown",!0),le(he,ce,we,"∋","\\ni",!0),le(he,ce,we,"∝","\\propto",!0),le(he,ce,we,"⊢","\\vdash",!0),le(he,ce,we,"⊣","\\dashv",!0),le(he,ce,we,"∋","\\owns"),le(he,ce,xe,".","\\ldotp"),le(he,ce,xe,"⋅","\\cdotp"),le(he,ce,ze,"#","\\#"),le(me,ce,ze,"#","\\#"),le(he,ce,ze,"&","\\&"),le(me,ce,ze,"&","\\&"),le(he,ce,ze,"ℵ","\\aleph",!0),le(he,ce,ze,"∀","\\forall",!0),le(he,ce,ze,"ℏ","\\hbar",!0),le(he,ce,ze,"∃","\\exists",!0),le(he,ce,ze,"∇","\\nabla",!0),le(he,ce,ze,"♭","\\flat",!0),le(he,ce,ze,"ℓ","\\ell",!0),le(he,ce,ze,"♮","\\natural",!0),le(he,ce,ze,"♣","\\clubsuit",!0),le(he,ce,ze,"℘","\\wp",!0),le(he,ce,ze,"♯","\\sharp",!0),le(he,ce,ze,"♢","\\diamondsuit",!0),le(he,ce,ze,"ℜ","\\Re",!0),le(he,ce,ze,"♡","\\heartsuit",!0),le(he,ce,ze,"ℑ","\\Im",!0),le(he,ce,ze,"♠","\\spadesuit",!0),le(he,ce,ze,"§","\\S",!0),le(me,ce,ze,"§","\\S"),le(he,ce,ze,"¶","\\P",!0),le(me,ce,ze,"¶","\\P"),le(he,ce,ze,"†","\\dag"),le(me,ce,ze,"†","\\dag"),le(me,ce,ze,"†","\\textdagger"),le(he,ce,ze,"‡","\\ddag"),le(me,ce,ze,"‡","\\ddag"),le(me,ce,ze,"‡","\\textdaggerdbl"),le(he,ce,ge,"⎱","\\rmoustache",!0),le(he,ce,ye,"⎰","\\lmoustache",!0),le(he,ce,ge,"⟯","\\rgroup",!0),le(he,ce,ye,"⟮","\\lgroup",!0),le(he,ce,de,"∓","\\mp",!0),le(he,ce,de,"⊖","\\ominus",!0),le(he,ce,de,"⊎","\\uplus",!0),le(he,ce,de,"⊓","\\sqcap",!0),le(he,ce,de,"∗","\\ast"),le(he,ce,de,"⊔","\\sqcup",!0),le(he,ce,de,"◯","\\bigcirc",!0),le(he,ce,de,"∙","\\bullet",!0),le(he,ce,de,"‡","\\ddagger"),le(he,ce,de,"≀","\\wr",!0),le(he,ce,de,"⨿","\\amalg"),le(he,ce,de,"&","\\And"),le(he,ce,we,"⟵","\\longleftarrow",!0),le(he,ce,we,"⇐","\\Leftarrow",!0),le(he,ce,we,"⟸","\\Longleftarrow",!0),le(he,ce,we,"⟶","\\longrightarrow",!0),le(he,ce,we,"⇒","\\Rightarrow",!0),le(he,ce,we,"⟹","\\Longrightarrow",!0),le(he,ce,we,"↔","\\leftrightarrow",!0),le(he,ce,we,"⟷","\\longleftrightarrow",!0),le(he,ce,we,"⇔","\\Leftrightarrow",!0),le(he,ce,we,"⟺","\\Longleftrightarrow",!0),le(he,ce,we,"↦","\\mapsto",!0),le(he,ce,we,"⟼","\\longmapsto",!0),le(he,ce,we,"↗","\\nearrow",!0),le(he,ce,we,"↩","\\hookleftarrow",!0),le(he,ce,we,"↪","\\hookrightarrow",!0),le(he,ce,we,"↘","\\searrow",!0),le(he,ce,we,"↼","\\leftharpoonup",!0),le(he,ce,we,"⇀","\\rightharpoonup",!0),le(he,ce,we,"↙","\\swarrow",!0),le(he,ce,we,"↽","\\leftharpoondown",!0),le(he,ce,we,"⇁","\\rightharpoondown",!0),le(he,ce,we,"↖","\\nwarrow",!0),le(he,ce,we,"⇌","\\rightleftharpoons",!0),le(he,ue,we,"≮","\\nless",!0),le(he,ue,we,"","\\@nleqslant"),le(he,ue,we,"","\\@nleqq"),le(he,ue,we,"⪇","\\lneq",!0),le(he,ue,we,"≨","\\lneqq",!0),le(he,ue,we,"","\\@lvertneqq"),le(he,ue,we,"⋦","\\lnsim",!0),le(he,ue,we,"⪉","\\lnapprox",!0),le(he,ue,we,"⊀","\\nprec",!0),le(he,ue,we,"⋠","\\npreceq",!0),le(he,ue,we,"⋨","\\precnsim",!0),le(he,ue,we,"⪹","\\precnapprox",!0),le(he,ue,we,"≁","\\nsim",!0),le(he,ue,we,"","\\@nshortmid"),le(he,ue,we,"∤","\\nmid",!0),le(he,ue,we,"⊬","\\nvdash",!0),le(he,ue,we,"⊭","\\nvDash",!0),le(he,ue,we,"⋪","\\ntriangleleft"),le(he,ue,we,"⋬","\\ntrianglelefteq",!0),le(he,ue,we,"⊊","\\subsetneq",!0),le(he,ue,we,"","\\@varsubsetneq"),le(he,ue,we,"⫋","\\subsetneqq",!0),le(he,ue,we,"","\\@varsubsetneqq"),le(he,ue,we,"≯","\\ngtr",!0),le(he,ue,we,"","\\@ngeqslant"),le(he,ue,we,"","\\@ngeqq"),le(he,ue,we,"⪈","\\gneq",!0),le(he,ue,we,"≩","\\gneqq",!0),le(he,ue,we,"","\\@gvertneqq"),le(he,ue,we,"⋧","\\gnsim",!0),le(he,ue,we,"⪊","\\gnapprox",!0),le(he,ue,we,"⊁","\\nsucc",!0),le(he,ue,we,"⋡","\\nsucceq",!0),le(he,ue,we,"⋩","\\succnsim",!0),le(he,ue,we,"⪺","\\succnapprox",!0),le(he,ue,we,"≆","\\ncong",!0),le(he,ue,we,"","\\@nshortparallel"),le(he,ue,we,"∦","\\nparallel",!0),le(he,ue,we,"⊯","\\nVDash",!0),le(he,ue,we,"⋫","\\ntriangleright"),le(he,ue,we,"⋭","\\ntrianglerighteq",!0),le(he,ue,we,"","\\@nsupseteqq"),le(he,ue,we,"⊋","\\supsetneq",!0),le(he,ue,we,"","\\@varsupsetneq"),le(he,ue,we,"⫌","\\supsetneqq",!0),le(he,ue,we,"","\\@varsupsetneqq"),le(he,ue,we,"⊮","\\nVdash",!0),le(he,ue,we,"⪵","\\precneqq",!0),le(he,ue,we,"⪶","\\succneqq",!0),le(he,ue,we,"","\\@nsubseteqq"),le(he,ue,de,"⊴","\\unlhd"),le(he,ue,de,"⊵","\\unrhd"),le(he,ue,we,"↚","\\nleftarrow",!0),le(he,ue,we,"↛","\\nrightarrow",!0),le(he,ue,we,"⇍","\\nLeftarrow",!0),le(he,ue,we,"⇏","\\nRightarrow",!0),le(he,ue,we,"↮","\\nleftrightarrow",!0),le(he,ue,we,"⇎","\\nLeftrightarrow",!0),le(he,ue,we,"△","\\vartriangle"),le(he,ue,ze,"ℏ","\\hslash"),le(he,ue,ze,"▽","\\triangledown"),le(he,ue,ze,"◊","\\lozenge"),le(he,ue,ze,"Ⓢ","\\circledS"),le(he,ue,ze,"®","\\circledR"),le(me,ue,ze,"®","\\circledR"),le(he,ue,ze,"∡","\\measuredangle",!0),le(he,ue,ze,"∄","\\nexists"),le(he,ue,ze,"℧","\\mho"),le(he,ue,ze,"Ⅎ","\\Finv",!0),le(he,ue,ze,"⅁","\\Game",!0),le(he,ue,ze,"‵","\\backprime"),le(he,ue,ze,"▲","\\blacktriangle"),le(he,ue,ze,"▼","\\blacktriangledown"),le(he,ue,ze,"■","\\blacksquare"),le(he,ue,ze,"⧫","\\blacklozenge"),le(he,ue,ze,"★","\\bigstar"),le(he,ue,ze,"∢","\\sphericalangle",!0),le(he,ue,ze,"∁","\\complement",!0),le(he,ue,ze,"ð","\\eth",!0),le(me,ce,ze,"ð","ð"),le(he,ue,ze,"╱","\\diagup"),le(he,ue,ze,"╲","\\diagdown"),le(he,ue,ze,"□","\\square"),le(he,ue,ze,"□","\\Box"),le(he,ue,ze,"◊","\\Diamond"),le(he,ue,ze,"¥","\\yen",!0),le(me,ue,ze,"¥","\\yen",!0),le(he,ue,ze,"✓","\\checkmark",!0),le(me,ue,ze,"✓","\\checkmark"),le(he,ue,ze,"ℶ","\\beth",!0),le(he,ue,ze,"ℸ","\\daleth",!0),le(he,ue,ze,"ℷ","\\gimel",!0),le(he,ue,ze,"ϝ","\\digamma",!0),le(he,ue,ze,"ϰ","\\varkappa"),le(he,ue,ye,"┌","\\@ulcorner",!0),le(he,ue,ge,"┐","\\@urcorner",!0),le(he,ue,ye,"└","\\@llcorner",!0),le(he,ue,ge,"┘","\\@lrcorner",!0),le(he,ue,we,"≦","\\leqq",!0),le(he,ue,we,"⩽","\\leqslant",!0),le(he,ue,we,"⪕","\\eqslantless",!0),le(he,ue,we,"≲","\\lesssim",!0),le(he,ue,we,"⪅","\\lessapprox",!0),le(he,ue,we,"≊","\\approxeq",!0),le(he,ue,de,"⋖","\\lessdot"),le(he,ue,we,"⋘","\\lll",!0),le(he,ue,we,"≶","\\lessgtr",!0),le(he,ue,we,"⋚","\\lesseqgtr",!0),le(he,ue,we,"⪋","\\lesseqqgtr",!0),le(he,ue,we,"≑","\\doteqdot"),le(he,ue,we,"≓","\\risingdotseq",!0),le(he,ue,we,"≒","\\fallingdotseq",!0),le(he,ue,we,"∽","\\backsim",!0),le(he,ue,we,"⋍","\\backsimeq",!0),le(he,ue,we,"⫅","\\subseteqq",!0),le(he,ue,we,"⋐","\\Subset",!0),le(he,ue,we,"⊏","\\sqsubset",!0),le(he,ue,we,"≼","\\preccurlyeq",!0),le(he,ue,we,"⋞","\\curlyeqprec",!0),le(he,ue,we,"≾","\\precsim",!0),le(he,ue,we,"⪷","\\precapprox",!0),le(he,ue,we,"⊲","\\vartriangleleft"),le(he,ue,we,"⊴","\\trianglelefteq"),le(he,ue,we,"⊨","\\vDash",!0),le(he,ue,we,"⊪","\\Vvdash",!0),le(he,ue,we,"⌣","\\smallsmile"),le(he,ue,we,"⌢","\\smallfrown"),le(he,ue,we,"≏","\\bumpeq",!0),le(he,ue,we,"≎","\\Bumpeq",!0),le(he,ue,we,"≧","\\geqq",!0),le(he,ue,we,"⩾","\\geqslant",!0),le(he,ue,we,"⪖","\\eqslantgtr",!0),le(he,ue,we,"≳","\\gtrsim",!0),le(he,ue,we,"⪆","\\gtrapprox",!0),le(he,ue,de,"⋗","\\gtrdot"),le(he,ue,we,"⋙","\\ggg",!0),le(he,ue,we,"≷","\\gtrless",!0),le(he,ue,we,"⋛","\\gtreqless",!0),le(he,ue,we,"⪌","\\gtreqqless",!0),le(he,ue,we,"≖","\\eqcirc",!0),le(he,ue,we,"≗","\\circeq",!0),le(he,ue,we,"≜","\\triangleq",!0),le(he,ue,we,"∼","\\thicksim"),le(he,ue,we,"≈","\\thickapprox"),le(he,ue,we,"⫆","\\supseteqq",!0),le(he,ue,we,"⋑","\\Supset",!0),le(he,ue,we,"⊐","\\sqsupset",!0),le(he,ue,we,"≽","\\succcurlyeq",!0),le(he,ue,we,"⋟","\\curlyeqsucc",!0),le(he,ue,we,"≿","\\succsim",!0),le(he,ue,we,"⪸","\\succapprox",!0),le(he,ue,we,"⊳","\\vartriangleright"),le(he,ue,we,"⊵","\\trianglerighteq"),le(he,ue,we,"⊩","\\Vdash",!0),le(he,ue,we,"∣","\\shortmid"),le(he,ue,we,"∥","\\shortparallel"),le(he,ue,we,"≬","\\between",!0),le(he,ue,we,"⋔","\\pitchfork",!0),le(he,ue,we,"∝","\\varpropto"),le(he,ue,we,"◀","\\blacktriangleleft"),le(he,ue,we,"∴","\\therefore",!0),le(he,ue,we,"∍","\\backepsilon"),le(he,ue,we,"▶","\\blacktriangleright"),le(he,ue,we,"∵","\\because",!0),le(he,ue,we,"⋘","\\llless"),le(he,ue,we,"⋙","\\gggtr"),le(he,ue,de,"⊲","\\lhd"),le(he,ue,de,"⊳","\\rhd"),le(he,ue,we,"≂","\\eqsim",!0),le(he,ce,we,"⋈","\\Join"),le(he,ue,we,"≑","\\Doteq",!0),le(he,ue,de,"∔","\\dotplus",!0),le(he,ue,de,"∖","\\smallsetminus"),le(he,ue,de,"⋒","\\Cap",!0),le(he,ue,de,"⋓","\\Cup",!0),le(he,ue,de,"⩞","\\doublebarwedge",!0),le(he,ue,de,"⊟","\\boxminus",!0),le(he,ue,de,"⊞","\\boxplus",!0),le(he,ue,de,"⋇","\\divideontimes",!0),le(he,ue,de,"⋉","\\ltimes",!0),le(he,ue,de,"⋊","\\rtimes",!0),le(he,ue,de,"⋋","\\leftthreetimes",!0),le(he,ue,de,"⋌","\\rightthreetimes",!0),le(he,ue,de,"⋏","\\curlywedge",!0),le(he,ue,de,"⋎","\\curlyvee",!0),le(he,ue,de,"⊝","\\circleddash",!0),le(he,ue,de,"⊛","\\circledast",!0),le(he,ue,de,"⋅","\\centerdot"),le(he,ue,de,"⊺","\\intercal",!0),le(he,ue,de,"⋒","\\doublecap"),le(he,ue,de,"⋓","\\doublecup"),le(he,ue,de,"⊠","\\boxtimes",!0),le(he,ue,we,"⇢","\\dashrightarrow",!0),le(he,ue,we,"⇠","\\dashleftarrow",!0),le(he,ue,we,"⇇","\\leftleftarrows",!0),le(he,ue,we,"⇆","\\leftrightarrows",!0),le(he,ue,we,"⇚","\\Lleftarrow",!0),le(he,ue,we,"↞","\\twoheadleftarrow",!0),le(he,ue,we,"↢","\\leftarrowtail",!0),le(he,ue,we,"↫","\\looparrowleft",!0),le(he,ue,we,"⇋","\\leftrightharpoons",!0),le(he,ue,we,"↶","\\curvearrowleft",!0),le(he,ue,we,"↺","\\circlearrowleft",!0),le(he,ue,we,"↰","\\Lsh",!0),le(he,ue,we,"⇈","\\upuparrows",!0),le(he,ue,we,"↿","\\upharpoonleft",!0),le(he,ue,we,"⇃","\\downharpoonleft",!0),le(he,ce,we,"⊶","\\origof",!0),le(he,ce,we,"⊷","\\imageof",!0),le(he,ue,we,"⊸","\\multimap",!0),le(he,ue,we,"↭","\\leftrightsquigarrow",!0),le(he,ue,we,"⇉","\\rightrightarrows",!0),le(he,ue,we,"⇄","\\rightleftarrows",!0),le(he,ue,we,"↠","\\twoheadrightarrow",!0),le(he,ue,we,"↣","\\rightarrowtail",!0),le(he,ue,we,"↬","\\looparrowright",!0),le(he,ue,we,"↷","\\curvearrowright",!0),le(he,ue,we,"↻","\\circlearrowright",!0),le(he,ue,we,"↱","\\Rsh",!0),le(he,ue,we,"⇊","\\downdownarrows",!0),le(he,ue,we,"↾","\\upharpoonright",!0),le(he,ue,we,"⇂","\\downharpoonright",!0),le(he,ue,we,"⇝","\\rightsquigarrow",!0),le(he,ue,we,"⇝","\\leadsto"),le(he,ue,we,"⇛","\\Rrightarrow",!0),le(he,ue,we,"↾","\\restriction"),le(he,ce,ze,"‘","`"),le(he,ce,ze,"$","\\$"),le(me,ce,ze,"$","\\$"),le(me,ce,ze,"$","\\textdollar"),le(he,ce,ze,"%","\\%"),le(me,ce,ze,"%","\\%"),le(he,ce,ze,"_","\\_"),le(me,ce,ze,"_","\\_"),le(me,ce,ze,"_","\\textunderscore"),le(he,ce,ze,"∠","\\angle",!0),le(he,ce,ze,"∞","\\infty",!0),le(he,ce,ze,"′","\\prime"),le(he,ce,ze,"△","\\triangle"),le(he,ce,ze,"Γ","\\Gamma",!0),le(he,ce,ze,"Δ","\\Delta",!0),le(he,ce,ze,"Θ","\\Theta",!0),le(he,ce,ze,"Λ","\\Lambda",!0),le(he,ce,ze,"Ξ","\\Xi",!0),le(he,ce,ze,"Π","\\Pi",!0),le(he,ce,ze,"Σ","\\Sigma",!0),le(he,ce,ze,"Υ","\\Upsilon",!0),le(he,ce,ze,"Φ","\\Phi",!0),le(he,ce,ze,"Ψ","\\Psi",!0),le(he,ce,ze,"Ω","\\Omega",!0),le(he,ce,ze,"A","Α"),le(he,ce,ze,"B","Β"),le(he,ce,ze,"E","Ε"),le(he,ce,ze,"Z","Ζ"),le(he,ce,ze,"H","Η"),le(he,ce,ze,"I","Ι"),le(he,ce,ze,"K","Κ"),le(he,ce,ze,"M","Μ"),le(he,ce,ze,"N","Ν"),le(he,ce,ze,"O","Ο"),le(he,ce,ze,"P","Ρ"),le(he,ce,ze,"T","Τ"),le(he,ce,ze,"X","Χ"),le(he,ce,ze,"¬","\\neg",!0),le(he,ce,ze,"¬","\\lnot"),le(he,ce,ze,"⊤","\\top"),le(he,ce,ze,"⊥","\\bot"),le(he,ce,ze,"∅","\\emptyset"),le(he,ue,ze,"∅","\\varnothing"),le(he,ce,ve,"α","\\alpha",!0),le(he,ce,ve,"β","\\beta",!0),le(he,ce,ve,"γ","\\gamma",!0),le(he,ce,ve,"δ","\\delta",!0),le(he,ce,ve,"ϵ","\\epsilon",!0),le(he,ce,ve,"ζ","\\zeta",!0),le(he,ce,ve,"η","\\eta",!0),le(he,ce,ve,"θ","\\theta",!0),le(he,ce,ve,"ι","\\iota",!0),le(he,ce,ve,"κ","\\kappa",!0),le(he,ce,ve,"λ","\\lambda",!0),le(he,ce,ve,"μ","\\mu",!0),le(he,ce,ve,"ν","\\nu",!0),le(he,ce,ve,"ξ","\\xi",!0),le(he,ce,ve,"ο","\\omicron",!0),le(he,ce,ve,"π","\\pi",!0),le(he,ce,ve,"ρ","\\rho",!0),le(he,ce,ve,"σ","\\sigma",!0),le(he,ce,ve,"τ","\\tau",!0),le(he,ce,ve,"υ","\\upsilon",!0),le(he,ce,ve,"ϕ","\\phi",!0),le(he,ce,ve,"χ","\\chi",!0),le(he,ce,ve,"ψ","\\psi",!0),le(he,ce,ve,"ω","\\omega",!0),le(he,ce,ve,"ε","\\varepsilon",!0),le(he,ce,ve,"ϑ","\\vartheta",!0),le(he,ce,ve,"ϖ","\\varpi",!0),le(he,ce,ve,"ϱ","\\varrho",!0),le(he,ce,ve,"ς","\\varsigma",!0),le(he,ce,ve,"φ","\\varphi",!0),le(he,ce,de,"∗","*",!0),le(he,ce,de,"+","+"),le(he,ce,de,"−","-",!0),le(he,ce,de,"⋅","\\cdot",!0),le(he,ce,de,"∘","\\circ",!0),le(he,ce,de,"÷","\\div",!0),le(he,ce,de,"±","\\pm",!0),le(he,ce,de,"×","\\times",!0),le(he,ce,de,"∩","\\cap",!0),le(he,ce,de,"∪","\\cup",!0),le(he,ce,de,"∖","\\setminus",!0),le(he,ce,de,"∧","\\land"),le(he,ce,de,"∨","\\lor"),le(he,ce,de,"∧","\\wedge",!0),le(he,ce,de,"∨","\\vee",!0),le(he,ce,ze,"√","\\surd"),le(he,ce,ye,"⟨","\\langle",!0),le(he,ce,ye,"∣","\\lvert"),le(he,ce,ye,"∥","\\lVert"),le(he,ce,ge,"?","?"),le(he,ce,ge,"!","!"),le(he,ce,ge,"⟩","\\rangle",!0),le(he,ce,ge,"∣","\\rvert"),le(he,ce,ge,"∥","\\rVert"),le(he,ce,we,"=","="),le(he,ce,we,":",":"),le(he,ce,we,"≈","\\approx",!0),le(he,ce,we,"≅","\\cong",!0),le(he,ce,we,"≥","\\ge"),le(he,ce,we,"≥","\\geq",!0),le(he,ce,we,"←","\\gets"),le(he,ce,we,">","\\gt",!0),le(he,ce,we,"∈","\\in",!0),le(he,ce,we,"","\\@not"),le(he,ce,we,"⊂","\\subset",!0),le(he,ce,we,"⊃","\\supset",!0),le(he,ce,we,"⊆","\\subseteq",!0),le(he,ce,we,"⊇","\\supseteq",!0),le(he,ue,we,"⊈","\\nsubseteq",!0),le(he,ue,we,"⊉","\\nsupseteq",!0),le(he,ce,we,"⊨","\\models"),le(he,ce,we,"←","\\leftarrow",!0),le(he,ce,we,"≤","\\le"),le(he,ce,we,"≤","\\leq",!0),le(he,ce,we,"<","\\lt",!0),le(he,ce,we,"→","\\rightarrow",!0),le(he,ce,we,"→","\\to"),le(he,ue,we,"≱","\\ngeq",!0),le(he,ue,we,"≰","\\nleq",!0),le(he,ce,ke," ","\\ "),le(he,ce,ke," ","\\space"),le(he,ce,ke," ","\\nobreakspace"),le(me,ce,ke," ","\\ "),le(me,ce,ke," "," "),le(me,ce,ke," ","\\space"),le(me,ce,ke," ","\\nobreakspace"),le(he,ce,ke,null,"\\nobreak"),le(he,ce,ke,null,"\\allowbreak"),le(he,ce,xe,",",","),le(he,ce,xe,";",";"),le(he,ue,de,"⊼","\\barwedge",!0),le(he,ue,de,"⊻","\\veebar",!0),le(he,ce,de,"⊙","\\odot",!0),le(he,ce,de,"⊕","\\oplus",!0),le(he,ce,de,"⊗","\\otimes",!0),le(he,ce,ze,"∂","\\partial",!0),le(he,ce,de,"⊘","\\oslash",!0),le(he,ue,de,"⊚","\\circledcirc",!0),le(he,ue,de,"⊡","\\boxdot",!0),le(he,ce,de,"△","\\bigtriangleup"),le(he,ce,de,"▽","\\bigtriangledown"),le(he,ce,de,"†","\\dagger"),le(he,ce,de,"⋄","\\diamond"),le(he,ce,de,"⋆","\\star"),le(he,ce,de,"◃","\\triangleleft"),le(he,ce,de,"▹","\\triangleright"),le(he,ce,ye,"{","\\{"),le(me,ce,ze,"{","\\{"),le(me,ce,ze,"{","\\textbraceleft"),le(he,ce,ge,"}","\\}"),le(me,ce,ze,"}","\\}"),le(me,ce,ze,"}","\\textbraceright"),le(he,ce,ye,"{","\\lbrace"),le(he,ce,ge,"}","\\rbrace"),le(he,ce,ye,"[","\\lbrack",!0),le(me,ce,ze,"[","\\lbrack",!0),le(he,ce,ge,"]","\\rbrack",!0),le(me,ce,ze,"]","\\rbrack",!0),le(he,ce,ye,"(","\\lparen",!0),le(he,ce,ge,")","\\rparen",!0),le(me,ce,ze,"<","\\textless",!0),le(me,ce,ze,">","\\textgreater",!0),le(he,ce,ye,"⌊","\\lfloor",!0),le(he,ce,ge,"⌋","\\rfloor",!0),le(he,ce,ye,"⌈","\\lceil",!0),le(he,ce,ge,"⌉","\\rceil",!0),le(he,ce,ze,"\\","\\backslash"),le(he,ce,ze,"∣","|"),le(he,ce,ze,"∣","\\vert"),le(me,ce,ze,"|","\\textbar",!0),le(he,ce,ze,"∥","\\|"),le(he,ce,ze,"∥","\\Vert"),le(me,ce,ze,"∥","\\textbardbl"),le(me,ce,ze,"~","\\textasciitilde"),le(me,ce,ze,"\\","\\textbackslash"),le(me,ce,ze,"^","\\textasciicircum"),le(he,ce,we,"↑","\\uparrow",!0),le(he,ce,we,"⇑","\\Uparrow",!0),le(he,ce,we,"↓","\\downarrow",!0),le(he,ce,we,"⇓","\\Downarrow",!0),le(he,ce,we,"↕","\\updownarrow",!0),le(he,ce,we,"⇕","\\Updownarrow",!0),le(he,ce,be,"∐","\\coprod"),le(he,ce,be,"⋁","\\bigvee"),le(he,ce,be,"⋀","\\bigwedge"),le(he,ce,be,"⨄","\\biguplus"),le(he,ce,be,"⋂","\\bigcap"),le(he,ce,be,"⋃","\\bigcup"),le(he,ce,be,"∫","\\int"),le(he,ce,be,"∫","\\intop"),le(he,ce,be,"∬","\\iint"),le(he,ce,be,"∭","\\iiint"),le(he,ce,be,"∏","\\prod"),le(he,ce,be,"∑","\\sum"),le(he,ce,be,"⨂","\\bigotimes"),le(he,ce,be,"⨁","\\bigoplus"),le(he,ce,be,"⨀","\\bigodot"),le(he,ce,be,"∮","\\oint"),le(he,ce,be,"∯","\\oiint"),le(he,ce,be,"∰","\\oiiint"),le(he,ce,be,"⨆","\\bigsqcup"),le(he,ce,be,"∫","\\smallint"),le(me,ce,fe,"…","\\textellipsis"),le(he,ce,fe,"…","\\mathellipsis"),le(me,ce,fe,"…","\\ldots",!0),le(he,ce,fe,"…","\\ldots",!0),le(he,ce,fe,"⋯","\\@cdots",!0),le(he,ce,fe,"⋱","\\ddots",!0),le(he,ce,ze,"⋮","\\varvdots"),le(me,ce,ze,"⋮","\\varvdots"),le(he,ce,pe,"ˊ","\\acute"),le(he,ce,pe,"ˋ","\\grave"),le(he,ce,pe,"¨","\\ddot"),le(he,ce,pe,"~","\\tilde"),le(he,ce,pe,"ˉ","\\bar"),le(he,ce,pe,"˘","\\breve"),le(he,ce,pe,"ˇ","\\check"),le(he,ce,pe,"^","\\hat"),le(he,ce,pe,"⃗","\\vec"),le(he,ce,pe,"˙","\\dot"),le(he,ce,pe,"˚","\\mathring"),le(he,ce,ve,"","\\@imath"),le(he,ce,ve,"","\\@jmath"),le(he,ce,ze,"ı","ı"),le(he,ce,ze,"ȷ","ȷ"),le(me,ce,ze,"ı","\\i",!0),le(me,ce,ze,"ȷ","\\j",!0),le(me,ce,ze,"ß","\\ss",!0),le(me,ce,ze,"æ","\\ae",!0),le(me,ce,ze,"œ","\\oe",!0),le(me,ce,ze,"ø","\\o",!0),le(me,ce,ze,"Æ","\\AE",!0),le(me,ce,ze,"Œ","\\OE",!0),le(me,ce,ze,"Ø","\\O",!0),le(me,ce,pe,"ˊ","\\'"),le(me,ce,pe,"ˋ","\\`"),le(me,ce,pe,"ˆ","\\^"),le(me,ce,pe,"˜","\\~"),le(me,ce,pe,"ˉ","\\="),le(me,ce,pe,"˘","\\u"),le(me,ce,pe,"˙","\\."),le(me,ce,pe,"¸","\\c"),le(me,ce,pe,"˚","\\r"),le(me,ce,pe,"ˇ","\\v"),le(me,ce,pe,"¨",'\\"'),le(me,ce,pe,"˝","\\H"),le(me,ce,pe,"◯","\\textcircled");var Se={"--":!0,"---":!0,"``":!0,"''":!0};le(me,ce,ze,"–","--",!0),le(me,ce,ze,"–","\\textendash"),le(me,ce,ze,"—","---",!0),le(me,ce,ze,"—","\\textemdash"),le(me,ce,ze,"‘","`",!0),le(me,ce,ze,"‘","\\textquoteleft"),le(me,ce,ze,"’","'",!0),le(me,ce,ze,"’","\\textquoteright"),le(me,ce,ze,"“","``",!0),le(me,ce,ze,"“","\\textquotedblleft"),le(me,ce,ze,"”","''",!0),le(me,ce,ze,"”","\\textquotedblright"),le(he,ce,ze,"°","\\degree",!0),le(me,ce,ze,"°","\\degree"),le(me,ce,ze,"°","\\textdegree",!0),le(he,ce,ze,"£","\\pounds"),le(he,ce,ze,"£","\\mathsterling",!0),le(me,ce,ze,"£","\\pounds"),le(me,ce,ze,"£","\\textsterling",!0),le(he,ue,ze,"✠","\\maltese"),le(me,ue,ze,"✠","\\maltese");for(var Me=0;Me<14;Me++){var Ae='0123456789/@."'.charAt(Me);le(he,ce,ze,Ae,Ae)}for(var Te=0;Te<25;Te++){var Be='0123456789!@*()-=+";:?/.,'.charAt(Te);le(me,ce,ze,Be,Be)}for(var qe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ce=0;Ce<52;Ce++){var Ie=qe.charAt(Ce);le(he,ce,ve,Ie,Ie),le(me,ce,ze,Ie,Ie)}le(he,ue,ze,"C","ℂ"),le(me,ue,ze,"C","ℂ"),le(he,ue,ze,"H","ℍ"),le(me,ue,ze,"H","ℍ"),le(he,ue,ze,"N","ℕ"),le(me,ue,ze,"N","ℕ"),le(he,ue,ze,"P","ℙ"),le(me,ue,ze,"P","ℙ"),le(he,ue,ze,"Q","ℚ"),le(me,ue,ze,"Q","ℚ"),le(he,ue,ze,"R","ℝ"),le(me,ue,ze,"R","ℝ"),le(he,ue,ze,"Z","ℤ"),le(me,ue,ze,"Z","ℤ"),le(he,ce,ve,"h","ℎ"),le(me,ce,ve,"h","ℎ");for(var He="",Re=0;Re<52;Re++){var Ee=qe.charAt(Re);le(he,ce,ve,Ee,He=String.fromCharCode(55349,56320+Re)),le(me,ce,ze,Ee,He),le(he,ce,ve,Ee,He=String.fromCharCode(55349,56372+Re)),le(me,ce,ze,Ee,He),le(he,ce,ve,Ee,He=String.fromCharCode(55349,56424+Re)),le(me,ce,ze,Ee,He),le(he,ce,ve,Ee,He=String.fromCharCode(55349,56580+Re)),le(me,ce,ze,Ee,He),le(he,ce,ve,Ee,He=String.fromCharCode(55349,56684+Re)),le(me,ce,ze,Ee,He),le(he,ce,ve,Ee,He=String.fromCharCode(55349,56736+Re)),le(me,ce,ze,Ee,He),le(he,ce,ve,Ee,He=String.fromCharCode(55349,56788+Re)),le(me,ce,ze,Ee,He),le(he,ce,ve,Ee,He=String.fromCharCode(55349,56840+Re)),le(me,ce,ze,Ee,He),le(he,ce,ve,Ee,He=String.fromCharCode(55349,56944+Re)),le(me,ce,ze,Ee,He),Re<26&&(le(he,ce,ve,Ee,He=String.fromCharCode(55349,56632+Re)),le(me,ce,ze,Ee,He),le(he,ce,ve,Ee,He=String.fromCharCode(55349,56476+Re)),le(me,ce,ze,Ee,He))}le(he,ce,ve,"k",He=String.fromCharCode(55349,56668)),le(me,ce,ze,"k",He);for(var Oe=0;Oe<10;Oe++){var Ne=Oe.toString();le(he,ce,ve,Ne,He=String.fromCharCode(55349,57294+Oe)),le(me,ce,ze,Ne,He),le(he,ce,ve,Ne,He=String.fromCharCode(55349,57314+Oe)),le(me,ce,ze,Ne,He),le(he,ce,ve,Ne,He=String.fromCharCode(55349,57324+Oe)),le(me,ce,ze,Ne,He),le(he,ce,ve,Ne,He=String.fromCharCode(55349,57334+Oe)),le(me,ce,ze,Ne,He)}for(var De=0;De<3;De++){var Pe="ÐÞþ".charAt(De);le(he,ce,ve,Pe,Pe),le(me,ce,ze,Pe,Pe)}var Le=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Ve=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Fe=function(e,t,r){return se[r][e]&&se[r][e].replace&&(e=se[r][e].replace),{value:e,metrics:E(e,t,r)}},Ge=function(e,t,r,a,n){var i,o=Fe(e,t,r),s=o.metrics;if(e=o.value,s){var l=s.italic;("text"===r||a&&"mathit"===a.font)&&(l=0),i=new ee(e,s.height,s.depth,l,s.skew,s.width,n)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),i=new ee(e,0,0,0,0,0,n);if(a){i.maxFontSize=a.sizeMultiplier,a.style.isTight()&&i.classes.push("mtight");var h=a.getColor();h&&(i.style.color=h)}return i},Ue=function(e,t,r,a){return void 0===a&&(a=[]),"boldsymbol"===r.font&&Fe(e,"Main-Bold",t).metrics?Ge(e,"Main-Bold",t,r,a.concat(["mathbf"])):"\\"===e||"main"===se[t][e].font?Ge(e,"Main-Regular",t,r,a):Ge(e,"AMS-Regular",t,r,a.concat(["amsrm"]))},We=function(e,t,r){var a=e.mode,n=e.text,o=["mord"],s="math"===a||"text"===a&&t.font,l=s?t.font:t.fontFamily,h="",m="";if(55349===n.charCodeAt(0)&&([h,m]=function(e,t){var r=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,a="math"===t?0:1;if(119808<=r&&r<120484){var n=Math.floor((r-119808)/26);return[Le[n][2],Le[n][a]]}if(120782<=r&&r<=120831){var o=Math.floor((r-120782)/10);return[Ve[o][2],Ve[o][a]]}if(120485===r||120486===r)return[Le[0][2],Le[0][a]];if(120486<r&&r<120782)return["",""];throw new i("Unsupported character: "+e)}(n,a)),h.length>0)return Ge(n,h,a,t,o.concat(m));if(l){var c,u;if("boldsymbol"===l){var p=function(e,t,r,a,n){return"textord"!==n&&Fe(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(n,a,0,0,r);c=p.fontName,u=[p.fontClass]}else s?(c=rt[l].fontName,u=[l]):(c=tt(l,t.fontWeight,t.fontShape),u=[l,t.fontWeight,t.fontShape]);if(Fe(n,c,a).metrics)return Ge(n,c,a,t,o.concat(u));if(Se.hasOwnProperty(n)&&"Typewriter"===c.slice(0,10)){for(var d=[],g=0;g<n.length;g++)d.push(Ge(n[g],c,a,t,o.concat(u)));return Ke(d)}}if("mathord"===r)return Ge(n,"Math-Italic",a,t,o.concat(["mathnormal"]));if("textord"===r){var f=se[a][n]&&se[a][n].font;if("ams"===f){var v=tt("amsrm",t.fontWeight,t.fontShape);return Ge(n,v,a,t,o.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==f&&f){var b=tt(f,t.fontWeight,t.fontShape);return Ge(n,b,a,t,o.concat(b,t.fontWeight,t.fontShape))}var y=tt("textrm",t.fontWeight,t.fontShape);return Ge(n,y,a,t,o.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+r+" in makeOrd")},Ye=(e,t)=>{if(Y(e.classes)!==Y(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||0!==e.italic&&e.hasClass("mathnormal"))return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var a in e.style)if(e.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;for(var n in t.style)if(t.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;return!0},Xe=e=>{for(var t=0;t<e.length-1;t++){var r=e[t],a=e[t+1];r instanceof ee&&a instanceof ee&&Ye(r,a)&&(r.text+=a.text,r.height=Math.max(r.height,a.height),r.depth=Math.max(r.depth,a.depth),r.italic=a.italic,e.splice(t+1,1),t--)}return e},_e=function(e){for(var t=0,r=0,a=0,n=0;n<e.children.length;n++){var i=e.children[n];i.height>t&&(t=i.height),i.depth>r&&(r=i.depth),i.maxFontSize>a&&(a=i.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=a},je=function(e,t,r,a){var n=new Z(e,t,r,a);return _e(n),n},$e=(e,t,r,a)=>new Z(e,t,r,a),Ze=function(e,t,r){var a=je([e],[],t);return a.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),a.style.borderBottomWidth=W(a.height),a.maxFontSize=1,a},Ke=function(e){var t=new C(e);return _e(t),t},Je=function(e,t){return e instanceof C?je([],[e],t):e},Qe=function(e,t){for(var{children:r,depth:a}=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],a=-t[0].shift-t[0].elem.depth,n=a,i=1;i<t.length;i++){var o=-t[i].shift-n-t[i].elem.depth,s=o-(t[i-1].elem.height+t[i-1].elem.depth);n+=o,r.push({type:"kern",size:s}),r.push(t[i])}return{children:r,depth:a}}var l;if("top"===e.positionType){for(var h=e.positionData,m=0;m<e.children.length;m++){var c=e.children[m];h-="kern"===c.type?c.size:c.elem.height+c.elem.depth}l=h}else if("bottom"===e.positionType)l=-e.positionData;else{var u=e.children[0];if("elem"!==u.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-u.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-u.elem.depth}}return{children:e.children,depth:l}}(e),n=0,i=0;i<r.length;i++){var o=r[i];if("elem"===o.type){var s=o.elem;n=Math.max(n,s.maxFontSize,s.height)}}n+=2;var l=je(["pstrut"],[]);l.style.height=W(n);for(var h=[],m=a,c=a,u=a,p=0;p<r.length;p++){var d=r[p];if("kern"===d.type)u+=d.size;else{var g=d.elem,f=d.wrapperClasses||[],v=d.wrapperStyle||{},b=je(f,[l,g],void 0,v);b.style.top=W(-n-u-g.depth),d.marginLeft&&(b.style.marginLeft=d.marginLeft),d.marginRight&&(b.style.marginRight=d.marginRight),h.push(b),u+=g.height+g.depth}m=Math.min(m,u),c=Math.max(c,u)}var y,x=je(["vlist"],h);if(x.style.height=W(c),m<0){var w=je([],[]),k=je(["vlist"],[w]);k.style.height=W(-m);var z=je(["vlist-s"],[new ee("")]);y=[je(["vlist-r"],[x,z]),je(["vlist-r"],[k])]}else y=[je(["vlist-r"],[x])];var S=je(["vlist-t"],y);return 2===y.length&&S.classes.push("vlist-t2"),S.height=c,S.depth=-m,S},et=(e,t)=>{var r=je(["mspace"],[],t),a=U(e,t);return r.style.marginRight=W(a),r},tt=function(e,t,r){var a="";switch(e){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=e}return a+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},rt={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},at={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},nt=function(e,t){var[r,a,n]=at[e],i=new re(r),o=new te([i],{width:W(a),height:W(n),style:"width:"+W(a),viewBox:"0 0 "+1e3*a+" "+1e3*n,preserveAspectRatio:"xMinYMin"}),s=$e(["overlay"],[o],t);return s.height=n,s.style.height=W(n),s.style.width=W(a),s},it={number:3,unit:"mu"},ot={number:4,unit:"mu"},st={number:5,unit:"mu"},lt={mord:{mop:it,mbin:ot,mrel:st,minner:it},mop:{mord:it,mop:it,mrel:st,minner:it},mbin:{mord:ot,mop:ot,mopen:ot,minner:ot},mrel:{mord:st,mop:st,mopen:st,minner:st},mopen:{},mclose:{mop:it,mbin:ot,mrel:st,minner:it},mpunct:{mord:it,mop:it,mrel:st,mopen:it,mclose:it,mpunct:it,minner:it},minner:{mord:it,mop:it,mbin:ot,mrel:st,mopen:it,mpunct:it,minner:it}},ht={mord:{mop:it},mop:{mord:it,mop:it},mbin:{},mrel:{},mopen:{},mclose:{mop:it},mpunct:{},minner:{mop:it}},mt={},ct={},ut={};function pt(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,s={type:t,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:void 0===a.allowedInMath||a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:n},l=0;l<r.length;++l)mt[r[l]]=s;t&&(i&&(ct[t]=i),o&&(ut[t]=o))}function dt(e){var{type:t,htmlBuilder:r,mathmlBuilder:a}=e;pt({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:a})}var gt=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},ft=function(e){return"ordgroup"===e.type?e.body:[e]},vt=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),bt=new Set(["rightmost","mrel","mclose","mpunct"]),yt={display:M.DISPLAY,text:M.TEXT,script:M.SCRIPT,scriptscript:M.SCRIPTSCRIPT},xt={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},wt=function(e,t,r,a){void 0===a&&(a=[null,null]);for(var n=[],i=0;i<e.length;i++){var o=Tt(e[i],t);if(o instanceof C){var s=o.children;n.push(...s)}else n.push(o)}if(Xe(n),!r)return n;var l=t;if(1===e.length){var h=e[0];"sizing"===h.type?l=t.havingSize(h.size):"styling"===h.type&&(l=t.havingStyle(yt[h.style]))}var m=je([a[0]||"leftmost"],[],t),c=je([a[1]||"rightmost"],[],t),u="root"===r;return kt(n,(e,t)=>{var r=t.classes[0],a=e.classes[0];"mbin"===r&&bt.has(a)?t.classes[0]="mord":"mbin"===a&&vt.has(r)&&(e.classes[0]="mord")},{node:m},c,u),kt(n,(e,t)=>{var r=Mt(t),a=Mt(e),n=r&&a?e.hasClass("mtight")?ht[r][a]:lt[r][a]:null;if(n)return et(n,l)},{node:m},c,u),n},kt=function e(t,r,a,n,i){n&&t.push(n);for(var o=0;o<t.length;o++){var s=t[o],l=zt(s);if(l)e(l.children,r,a,null,i);else{var h=!s.hasClass("mspace");if(h){var m=r(s,a.node);m&&(a.insertAfter?a.insertAfter(m):(t.unshift(m),o++))}h?a.node=s:i&&s.hasClass("newline")&&(a.node=je(["leftmost"])),a.insertAfter=(e=>r=>{t.splice(e+1,0,r),o++})(o)}}n&&t.pop()},zt=function(e){return e instanceof C||e instanceof K||e instanceof Z&&e.hasClass("enclosing")?e:null},St=function e(t,r){var a=zt(t);if(a){var n=a.children;if(n.length){if("right"===r)return e(n[n.length-1],"right");if("left"===r)return e(n[0],"left")}}return t},Mt=function(e,t){return e?(t&&(e=St(e,t)),xt[e.classes[0]]||null):null},At=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return je(t.concat(r))},Tt=function(e,t,r){if(!e)return je();if(ct[e.type]){var a=ct[e.type](e,t);if(r&&t.size!==r.size){a=je(t.sizingClasses(r),[a],t);var n=t.sizeMultiplier/r.sizeMultiplier;a.height*=n,a.depth*=n}return a}throw new i("Got group of unknown type: '"+e.type+"'")};function Bt(e,t){var r=je(["base"],e,t),a=je(["strut"]);return a.style.height=W(r.height+r.depth),r.depth&&(a.style.verticalAlign=W(-r.depth)),r.children.unshift(a),r}function qt(e,t){var r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);var a,n=wt(e,t,"root");2===n.length&&n[1].hasClass("tag")&&(a=n.pop());for(var i,o=[],s=[],l=0;l<n.length;l++)if(s.push(n[l]),n[l].hasClass("mbin")||n[l].hasClass("mrel")||n[l].hasClass("allowbreak")){for(var h=!1;l<n.length-1&&n[l+1].hasClass("mspace")&&!n[l+1].hasClass("newline");)l++,s.push(n[l]),n[l].hasClass("nobreak")&&(h=!0);h||(o.push(Bt(s,t)),s=[])}else n[l].hasClass("newline")&&(s.pop(),s.length>0&&(o.push(Bt(s,t)),s=[]),o.push(n[l]));s.length>0&&o.push(Bt(s,t)),r?((i=Bt(wt(r,t,!0))).classes=["tag"],o.push(i)):a&&o.push(a);var m=je(["katex-html"],o);if(m.setAttribute("aria-hidden","true"),i){var c=i.children[0];c.style.height=W(m.height+m.depth),m.depth&&(c.style.verticalAlign=W(-m.depth))}return m}function Ct(e){return new C(e)}class It{constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Y(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof Ht&&this.children[r+1]instanceof Ht){for(var a=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof Ht;)a+=this.children[++r].toText();e.appendChild(new Ht(a).toNode())}else e.appendChild(this.children[r].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=m(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+m(Y(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+"</"+this.type+">"}toText(){return this.children.map(e=>e.toText()).join("")}}class Ht{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return m(this.toText())}toText(){return this.text}}class Rt{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?" ":e>=-.05556&&e<=-.05555?" ":e>=-.1667&&e<=-.1666?" ":e>=-.2223&&e<=-.2222?" ":e>=-.2778&&e<=-.2777?" ":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",W(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+W(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Et=new Set(["\\imath","\\jmath"]),Ot=new Set(["mrow","mtable"]),Nt=function(e,t,r){return!se[t][e]||!se[t][e].replace||55349===e.charCodeAt(0)||Se.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=se[t][e].replace),new Ht(e)},Dt=function(e){return 1===e.length?e[0]:new It("mrow",e)},Pt=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var r=t.font;if(!r||"mathnormal"===r)return null;var a=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathsfit"===r)return"sans-serif-italic";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";var n=e.text;return Et.has(n)?null:(se[a][n]&&se[a][n].replace&&(n=se[a][n].replace),E(n,rt[r].fontName,a)?rt[r].variant:null)};function Lt(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof Ht&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var r=e.children[0];return r instanceof Ht&&","===r.text}return!1}var Vt=function(e,t,r){if(1===e.length){var a=Gt(e[0],t);return r&&a instanceof It&&"mo"===a.type&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var n,i=[],o=0;o<e.length;o++){var s=Gt(e[o],t);if(s instanceof It&&n instanceof It){if("mtext"===s.type&&"mtext"===n.type&&s.getAttribute("mathvariant")===n.getAttribute("mathvariant")){n.children.push(...s.children);continue}if("mn"===s.type&&"mn"===n.type){n.children.push(...s.children);continue}if(Lt(s)&&"mn"===n.type){n.children.push(...s.children);continue}if("mn"===s.type&&Lt(n))s.children=[...n.children,...s.children],i.pop();else if(("msup"===s.type||"msub"===s.type)&&s.children.length>=1&&("mn"===n.type||Lt(n))){var l=s.children[0];l instanceof It&&"mn"===l.type&&(l.children=[...n.children,...l.children],i.pop())}else if("mi"===n.type&&1===n.children.length){var h=n.children[0];if(h instanceof Ht&&"̸"===h.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var m=s.children[0];m instanceof Ht&&m.text.length>0&&(m.text=m.text.slice(0,1)+"̸"+m.text.slice(1),i.pop())}}}i.push(s),n=s}return i},Ft=function(e,t,r){return Dt(Vt(e,t,r))},Gt=function(e,t){if(!e)return new It("mrow");if(ut[e.type])return ut[e.type](e,t);throw new i("Got group of unknown type: '"+e.type+"'")};function Ut(e,t,r,a,n){var i,o=Vt(e,r);i=1===o.length&&o[0]instanceof It&&Ot.has(o[0].type)?o[0]:new It("mrow",o);var s=new It("annotation",[new Ht(t)]);s.setAttribute("encoding","application/x-tex");var l=new It("semantics",[i,s]),h=new It("math",[l]);return h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&h.setAttribute("display","block"),je([n?"katex":"katex-mathml"],[h])}var Wt=function(e){return new L({style:e.displayMode?M.DISPLAY:M.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Yt=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=je(r,[e])}return e},Xt={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},_t=function(e){var t=new It("mo",[new Ht(Xt[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},jt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},$t=new Set(["widehat","widecheck","widetilde","utilde"]),Zt=function(e,t){var{span:r,minWidth:a,height:n}=function(){var r=4e5,a=e.label.slice(1);if($t.has(a)){var n,i,o,s=e,l="ordgroup"===s.base.type?s.base.body.length:1;if(l>5)"widehat"===a||"widecheck"===a?(n=420,r=2364,o=.42,i=a+"4"):(n=312,r=2340,o=.34,i="tilde4");else{var h=[1,1,2,2,3,3][l];"widehat"===a||"widecheck"===a?(r=[0,1062,2364,2364,2364][h],n=[0,239,300,360,420][h],o=[0,.24,.3,.3,.36,.42][h],i=a+h):(r=[0,600,1033,2339,2340][h],n=[0,260,286,306,312][h],o=[0,.26,.286,.3,.306,.34][h],i="tilde"+h)}var m=new re(i),c=new te([m],{width:"100%",height:W(o),viewBox:"0 0 "+r+" "+n,preserveAspectRatio:"none"});return{span:$e([],[c],t),minWidth:0,height:o}}var u,p,d=[],g=jt[a],[f,v,b]=g,y=b/1e3,x=f.length;if(1===x)u=["hide-tail"],p=[g[3]];else if(2===x)u=["halfarrow-left","halfarrow-right"],p=["xMinYMin","xMaxYMin"];else{if(3!==x)throw new Error("Correct katexImagesData or update code here to support\n "+x+" children.");u=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var w=0;w<x;w++){var k=new re(f[w]),z=new te([k],{width:"400em",height:W(y),viewBox:"0 0 "+r+" "+b,preserveAspectRatio:p[w]+" slice"}),S=$e([u[w]],[z],t);if(1===x)return{span:S,minWidth:v,height:y};S.style.height=W(y),d.push(S)}return{span:je(["stretchy"],d,t),minWidth:v,height:y}}();return r.height=n,r.style.height=W(n),a>0&&(r.style.minWidth=W(a)),r};function Kt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Jt(e){var t=Qt(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Qt(e){return e&&("atom"===e.type||oe.hasOwnProperty(e.type))?e:null}var er=(e,t)=>{var r,a,n;e&&"supsub"===e.type?(r=(a=Kt(e.base,"accent")).base,e.base=r,n=function(e){if(e instanceof Z)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(Tt(e,t)),e.base=a):r=(a=Kt(e,"accent")).base;var i=Tt(r,t.havingCrampedStyle()),o=0;if(a.isShifty&&p(r)){var s=c(r);o=ne(Tt(s,t.havingCrampedStyle())).skew}var l,h="\\c"===a.label,m=h?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight);if(a.isStretchy)l=Zt(a,t),l=Qe({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+W(2*o)+")",marginLeft:W(2*o)}:void 0}]});else{var u,d;"\\vec"===a.label?(u=nt("vec",t),d=at.vec[1]):((u=ne(u=We({mode:a.mode,text:a.label},t,"textord"))).italic=0,d=u.width,h&&(m+=u.depth)),l=je(["accent-body"],[u]);var g="\\textcircled"===a.label;g&&(l.classes.push("accent-full"),m=i.height);var f=o;g||(f-=d/2),l.style.left=W(f),"\\textcircled"===a.label&&(l.style.top=".2em"),l=Qe({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-m},{type:"elem",elem:l}]})}var v=je(["mord","accent"],[l],t);return n?(n.children[0]=v,n.height=Math.max(v.height,n.height),n.classes[0]="mord",n):v},tr=(e,t)=>{var r=e.isStretchy?_t(e.label):new It("mo",[Nt(e.label,e.mode)]),a=new It("mover",[Gt(e.base,t),r]);return a.setAttribute("accent","true"),a},rr=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));pt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=gt(t[0]),a=!rr.test(e.funcName),n=!a||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:a,isShifty:n,base:r}},htmlBuilder:er,mathmlBuilder:tr}),pt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],a=e.parser.mode;return"math"===a&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:er,mathmlBuilder:tr}),pt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"accentUnder",mode:r.mode,label:a,base:n}},htmlBuilder:(e,t)=>{var r=Tt(e.base,t),a=Zt(e,t),n="\\utilde"===e.label?.12:0,i=Qe({positionType:"top",positionData:r.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:r}]});return je(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var r=_t(e.label),a=new It("munder",[Gt(e.base,t),r]);return a.setAttribute("accentunder","true"),a}});var ar=e=>{var t=new It("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};function nr(e,t){var r=wt(e.body,t,!0);return je([e.mclass],r,t)}function ir(e,t){var r,a=Vt(e.body,t);return"minner"===e.mclass?r=new It("mpadded",a):"mord"===e.mclass?e.isCharacterBox?(r=a[0]).type="mi":r=new It("mi",a):(e.isCharacterBox?(r=a[0]).type="mo":r=new It("mo",a),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}pt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a,funcName:n}=e;return{type:"xArrow",mode:a.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,a=t.style,n=t.havingStyle(a.sup()),i=Je(Tt(e.body,n,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(o+"-arrow-pad"),e.below&&(n=t.havingStyle(a.sub()),(r=Je(Tt(e.below,n,t),t)).classes.push(o+"-arrow-pad"));var s,l=Zt(e,t),h=-t.fontMetrics().axisHeight+.5*l.height,m=-t.fontMetrics().axisHeight-.5*l.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(m-=i.depth),r){var c=-t.fontMetrics().axisHeight+r.height+.5*l.height+.111;s=Qe({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h},{type:"elem",elem:r,shift:c}]})}else s=Qe({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h}]});return s.children[0].children[0].children[1].classes.push("svg-align"),je(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var r,a=_t(e.label);if(a.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var n=ar(Gt(e.body,t));if(e.below){var i=ar(Gt(e.below,t));r=new It("munderover",[a,i,n])}else r=new It("mover",[a,n])}else if(e.below){var o=ar(Gt(e.below,t));r=new It("munder",[a,o])}else r=ar(),r=new It("mover",[a,r]);return r}}),pt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+a.slice(5),body:ft(n),isCharacterBox:p(n)}},htmlBuilder:nr,mathmlBuilder:ir});var or=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};pt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:or(t[0]),body:ft(t[1]),isCharacterBox:p(t[1])}}}),pt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var r,{parser:a,funcName:n}=e,i=t[1],o=t[0];r="\\stackrel"!==n?or(i):"mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:ft(i)},l={type:"supsub",mode:o.mode,base:s,sup:"\\underset"===n?null:o,sub:"\\underset"===n?o:null};return{type:"mclass",mode:a.mode,mclass:r,body:[l],isCharacterBox:p(l)}},htmlBuilder:nr,mathmlBuilder:ir}),pt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:or(t[0]),body:ft(t[0])}},htmlBuilder(e,t){var r=wt(e.body,t,!0),a=je([e.mclass],r,t);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(e,t){var r=Vt(e.body,t),a=new It("mstyle",r);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var sr={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},lr=()=>({type:"styling",body:[],mode:"math",style:"display"}),hr=e=>"textord"===e.type&&"@"===e.text,mr=(e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t;function cr(e,t,r){var a=sr[e];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(a,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var n={type:"atom",text:a,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[n],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[i],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}pt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"cdlabel",mode:r.mode,side:a.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),a=Je(Tt(e.label,r,t),t);return a.classes.push("cd-label-"+e.side),a.style.bottom=W(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(e,t){var r=new It("mrow",[Gt(e.label,t)]);return(r=new It("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new It("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),pt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=Je(Tt(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:(e,t)=>new It("mrow",[Gt(e.fragment,t)])}),pt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,a=Kt(t[0],"ordgroup").body,n="",o=0;o<a.length;o++)n+=Kt(a[o],"textord").text;var s,l=parseInt(n);if(isNaN(l))throw new i("\\@char has non-numeric argument "+n);if(l<0||l>=1114111)throw new i("\\@char with invalid code point "+n);return l<=65535?s=String.fromCharCode(l):(l-=65536,s=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:s}}});var ur=(e,t)=>{var r=wt(e.body,t.withColor(e.color),!1);return Ke(r)},pr=(e,t)=>{var r=Vt(e.body,t.withColor(e.color)),a=new It("mstyle",r);return a.setAttribute("mathcolor",e.color),a};pt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,a=Kt(t[0],"color-token").color,n=t[1];return{type:"color",mode:r.mode,color:a,body:ft(n)}},htmlBuilder:ur,mathmlBuilder:pr}),pt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:a}=e,n=Kt(t[0],"color-token").color;r.gullet.macros.set("\\current@color",n);var i=r.parseExpression(!0,a);return{type:"color",mode:r.mode,color:n,body:i}},htmlBuilder:ur,mathmlBuilder:pr}),pt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:a}=e,n="["===a.gullet.future().text?a.parseSizeGroup(!0):null,i=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:i,size:n&&Kt(n,"size").value}},htmlBuilder(e,t){var r=je(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=W(U(e.size,t)))),r},mathmlBuilder(e,t){var r=new It("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",W(U(e.size,t)))),r}});var dr={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},gr=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new i("Expected a control sequence",e);return t},fr=(e,t,r,a)=>{var n=e.gullet.macros.get(r.text);null==n&&(r.noexpand=!0,n={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,n,a)};pt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var a=t.fetch();if(dr[a.text])return"\\global"!==r&&"\\\\globallong"!==r||(a.text=dr[a.text]),Kt(t.parseFunction(),"internal");throw new i("Invalid token after macro prefix",a)}}),pt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=t.gullet.popToken(),n=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new i("Expected a control sequence",a);for(var o,s=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(a=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[s].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new i('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new i('Argument number "'+a.text+'" out of order');s++,l.push([])}else{if("EOF"===a.text)throw new i("Expected a macro definition");l[s].push(a.text)}var{tokens:h}=t.gullet.consumeArg();return o&&h.unshift(o),"\\edef"!==r&&"\\xdef"!==r||(h=t.gullet.expandTokens(h)).reverse(),t.gullet.macros.set(n,{tokens:h,numArgs:s,delimiters:l},r===dr[r]),{type:"internal",mode:t.mode}}}),pt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=gr(t.gullet.popToken());t.gullet.consumeSpaces();var n=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return fr(t,a,n,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),pt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=gr(t.gullet.popToken()),n=t.gullet.popToken(),i=t.gullet.popToken();return fr(t,a,i,"\\\\globalfuture"===r),t.gullet.pushToken(i),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}});var vr=function(e,t,r){var a=E(se.math[e]&&se.math[e].replace||e,t,r);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return a},br=function(e,t,r,a){var n=r.havingBaseStyle(t),i=je(a.concat(n.sizingClasses(r)),[e],r),o=n.sizeMultiplier/r.sizeMultiplier;return i.height*=o,i.depth*=o,i.maxFontSize=n.sizeMultiplier,i},yr=function(e,t,r){var a=t.havingBaseStyle(r),n=(1-t.sizeMultiplier/a.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=W(n),e.height-=n,e.depth+=n},xr=function(e,t,r,a,n,i){var o=function(e,t,r,a){return Ge(e,"Size"+t+"-Regular",r,a)}(e,t,n,a),s=br(je(["delimsizing","size"+t],[o],a),M.TEXT,a,i);return r&&yr(s,a,M.TEXT),s},wr=function(e,t,r){return{type:"elem",elem:je(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[je([],[Ge(e,t,r)])])}},kr=function(e,t,r){var a=I["Size4-Regular"][e.charCodeAt(0)]?I["Size4-Regular"][e.charCodeAt(0)][4]:I["Size1-Regular"][e.charCodeAt(0)][4],n=new re("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),i=new te([n],{width:W(a),height:W(t),style:"width:"+W(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=$e([],[i],r);return o.height=t,o.style.height=W(t),o.style.width=W(a),{type:"elem",elem:o}},zr={type:"kern",size:-.008},Sr=new Set(["|","\\lvert","\\rvert","\\vert"]),Mr=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),Ar=function(e,t,r,a,n,i){var o,s,l,h,m="",c=0;o=l=h=e,s=null;var u="Size1-Regular";"\\uparrow"===e?l=h="⏐":"\\Uparrow"===e?l=h="‖":"\\downarrow"===e?o=l="⏐":"\\Downarrow"===e?o=l="‖":"\\updownarrow"===e?(o="\\uparrow",l="⏐",h="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",l="‖",h="\\Downarrow"):Sr.has(e)?(l="∣",m="vert",c=333):Mr.has(e)?(l="∥",m="doublevert",c=556):"["===e||"\\lbrack"===e?(o="⎡",l="⎢",h="⎣",u="Size4-Regular",m="lbrack",c=667):"]"===e||"\\rbrack"===e?(o="⎤",l="⎥",h="⎦",u="Size4-Regular",m="rbrack",c=667):"\\lfloor"===e||"⌊"===e?(l=o="⎢",h="⎣",u="Size4-Regular",m="lfloor",c=667):"\\lceil"===e||"⌈"===e?(o="⎡",l=h="⎢",u="Size4-Regular",m="lceil",c=667):"\\rfloor"===e||"⌋"===e?(l=o="⎥",h="⎦",u="Size4-Regular",m="rfloor",c=667):"\\rceil"===e||"⌉"===e?(o="⎤",l=h="⎥",u="Size4-Regular",m="rceil",c=667):"("===e||"\\lparen"===e?(o="⎛",l="⎜",h="⎝",u="Size4-Regular",m="lparen",c=875):")"===e||"\\rparen"===e?(o="⎞",l="⎟",h="⎠",u="Size4-Regular",m="rparen",c=875):"\\{"===e||"\\lbrace"===e?(o="⎧",s="⎨",h="⎩",l="⎪",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="⎫",s="⎬",h="⎭",l="⎪",u="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(o="⎧",h="⎩",l="⎪",u="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(o="⎫",h="⎭",l="⎪",u="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(o="⎧",h="⎭",l="⎪",u="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(o="⎫",h="⎩",l="⎪",u="Size4-Regular");var p=vr(o,u,n),d=p.height+p.depth,g=vr(l,u,n),f=g.height+g.depth,v=vr(h,u,n),b=v.height+v.depth,y=0,x=1;if(null!==s){var w=vr(s,u,n);y=w.height+w.depth,x=2}var k=d+b+y,z=k+Math.max(0,Math.ceil((t-k)/(x*f)))*x*f,S=a.fontMetrics().axisHeight;r&&(S*=a.sizeMultiplier);var A=z/2-S,T=[];if(m.length>0){var B=z-d-b,q=Math.round(1e3*z),C=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(m,Math.round(1e3*B)),I=new re(m,C),H=(c/1e3).toFixed(3)+"em",R=(q/1e3).toFixed(3)+"em",E=new te([I],{width:H,height:R,viewBox:"0 0 "+c+" "+q}),O=$e([],[E],a);O.height=q/1e3,O.style.width=H,O.style.height=R,T.push({type:"elem",elem:O})}else{if(T.push(wr(h,u,n)),T.push(zr),null===s){var N=z-d-b+.016;T.push(kr(l,N,a))}else{var D=(z-d-b-y)/2+.016;T.push(kr(l,D,a)),T.push(zr),T.push(wr(s,u,n)),T.push(zr),T.push(kr(l,D,a))}T.push(zr),T.push(wr(o,u,n))}var P=a.havingBaseStyle(M.TEXT),L=Qe({positionType:"bottom",positionData:A,children:T});return br(je(["delimsizing","mult"],[L],P),M.TEXT,a,i)},Tr=.08,Br=function(e,t,r,a,n){var i=function(e,t,r){t*=1e3;var a="";switch(e){case"sqrtMain":a=function(e){return"M95,"+(622+e+80)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.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\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize1":a=function(e){return"M263,"+(601+e+80)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize2":a=function(e){return"M983 "+(10+e+80)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize3":a=function(e){return"M424,"+(2398+e+80)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" 80\nh400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize4":a=function(e){return"M473,"+(2713+e+80)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" 80h400000v"+(40+e)+"H1017.7z"}(t);break;case"sqrtTall":a=function(e,t,r){return"M702 "+(e+80)+"H400000"+(40+e)+"\nH742v"+(r-54-80-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 80H400000v"+(40+e)+"H742z"}(t,0,r)}return a}(e,a,r),o=new re(e,i),s=new te([o],{width:"400em",height:W(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return $e(["hide-tail"],[s],n)},qr=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),Cr=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),Ir=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Hr=[0,1.2,1.8,2.4,3],Rr=function(e,t,r,a,n){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),qr.has(e)||Ir.has(e))return xr(e,t,!1,r,a,n);if(Cr.has(e))return Ar(e,Hr[t],!1,r,a,n);throw new i("Illegal delimiter: '"+e+"'")},Er=[{type:"small",style:M.SCRIPTSCRIPT},{type:"small",style:M.SCRIPT},{type:"small",style:M.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Or=[{type:"small",style:M.SCRIPTSCRIPT},{type:"small",style:M.SCRIPT},{type:"small",style:M.TEXT},{type:"stack"}],Nr=[{type:"small",style:M.SCRIPTSCRIPT},{type:"small",style:M.SCRIPT},{type:"small",style:M.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Dr=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Pr=function(e,t,r,a){for(var n=Math.min(2,3-a.style.size);n<r.length&&"stack"!==r[n].type;n++){var i=vr(e,Dr(r[n]),"math"),o=i.height+i.depth;if("small"===r[n].type&&(o*=a.havingBaseStyle(r[n].style).sizeMultiplier),o>t)return r[n]}return r[r.length-1]},Lr=function(e,t,r,a,n,i){var o;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),o=Ir.has(e)?Er:qr.has(e)?Nr:Or;var s=Pr(e,t,o,a);return"small"===s.type?function(e,t,r,a,n,i){var o=Ge(e,"Main-Regular",n,a),s=br(o,t,a,i);return r&&yr(s,a,t),s}(e,s.style,r,a,n,i):"large"===s.type?xr(e,s.size,r,a,n,i):Ar(e,t,r,a,n,i)},Vr=function(e,t,r,a,n,i){var o=a.fontMetrics().axisHeight*a.sizeMultiplier,s=5/a.fontMetrics().ptPerEm,l=Math.max(t-o,r+o),h=Math.max(l/500*901,2*l-s);return Lr(e,h,!0,a,n,i)},Fr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Gr=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function Ur(e,t){var r=Qt(e);if(r&&Gr.has(r.text))return r;throw new i(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Wr(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}pt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=Ur(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Fr[e.funcName].size,mclass:Fr[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>"."===e.delim?je([e.mclass]):Rr(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(Nt(e.delim,e.mode));var r=new It("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var a=W(Hr[e.size]);return r.setAttribute("minsize",a),r.setAttribute("maxsize",a),r}}),pt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new i("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Ur(t[0],e).text,color:r}}}),pt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Ur(t[0],e),a=e.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var i=Kt(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{Wr(e);for(var r,a,n=wt(e.body,t,!0,["mopen","mclose"]),i=0,o=0,s=!1,l=0;l<n.length;l++)n[l].isMiddle?s=!0:(i=Math.max(n[l].height,i),o=Math.max(n[l].depth,o));if(i*=t.sizeMultiplier,o*=t.sizeMultiplier,r="."===e.left?At(t,["mopen"]):Vr(e.left,i,o,t,e.mode,["mopen"]),n.unshift(r),s)for(var h=1;h<n.length;h++){var m=n[h].isMiddle;m&&(n[h]=Vr(m.delim,i,o,m.options,e.mode,[]))}if("."===e.right)a=At(t,["mclose"]);else{var c=e.rightColor?t.withColor(e.rightColor):t;a=Vr(e.right,i,o,c,e.mode,["mclose"])}return n.push(a),je(["minner"],n,t)},mathmlBuilder:(e,t)=>{Wr(e);var r=Vt(e.body,t);if("."!==e.left){var a=new It("mo",[Nt(e.left,e.mode)]);a.setAttribute("fence","true"),r.unshift(a)}if("."!==e.right){var n=new It("mo",[Nt(e.right,e.mode)]);n.setAttribute("fence","true"),e.rightColor&&n.setAttribute("mathcolor",e.rightColor),r.push(n)}return Dt(r)}}),pt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Ur(t[0],e);if(!e.parser.leftrightDepth)throw new i("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if("."===e.delim)r=At(t,[]);else{r=Rr(e.delim,1,t,e.mode,[]);var a={delim:e.delim,options:t};r.isMiddle=a}return r},mathmlBuilder:(e,t)=>{var r="\\vert"===e.delim||"|"===e.delim?Nt("|","text"):Nt(e.delim,e.mode),a=new It("mo",[r]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var Yr=(e,t)=>{var r,a,n,i=Je(Tt(e.body,t),t),o=e.label.slice(1),s=t.sizeMultiplier,l=0,h=p(e.body);if("sout"===o)(r=je(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/s,l=-.5*t.fontMetrics().xHeight;else if("phase"===o){var m=U({number:.6,unit:"pt"},t),c=U({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;var u=i.height+i.depth+m+c;i.style.paddingLeft=W(u/2+m);var d=Math.floor(1e3*u*s),g="M400000 "+(a=d)+" H0 L"+a/2+" 0 l65 45 L145 "+(a-80)+" H400000z",f=new te([new re("phase",g)],{width:"400em",height:W(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});(r=$e(["hide-tail"],[f],t)).style.height=W(u),l=i.depth+m+c}else{/cancel/.test(o)?h||i.classes.push("cancel-pad"):"angl"===o?i.classes.push("anglpad"):i.classes.push("boxpad");var v=0,b=0,y=0;/box/.test(o)?(y=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=v=t.fontMetrics().fboxsep+("colorbox"===o?0:y)):"angl"===o?(v=4*(y=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),b=Math.max(0,.25-i.depth)):b=v=h?.2:0,r=function(e,t,r,a,n){var i,o=e.height+e.depth+r+a;if(/fbox|color|angl/.test(t)){if(i=je(["stretchy",t],[],n),"fbox"===t){var s=n.color&&n.getColor();s&&(i.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new ae({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new ae({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new te(l,{width:"100%",height:W(o)});i=$e([],[h],n)}return i.height=o,i.style.height=W(o),i}(i,o,v,b,t),/fbox|boxed|fcolorbox/.test(o)?(r.style.borderStyle="solid",r.style.borderWidth=W(y)):"angl"===o&&.049!==y&&(r.style.borderTopWidth=W(y),r.style.borderRightWidth=W(y)),l=i.depth+b,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor&&(r.style.borderColor=e.borderColor))}if(e.backgroundColor)n=Qe({positionType:"individualShift",children:[{type:"elem",elem:r,shift:l},{type:"elem",elem:i,shift:0}]});else{var x=/cancel|phase/.test(o)?["svg-align"]:[];n=Qe({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:r,shift:l,wrapperClasses:x}]})}return/cancel/.test(o)&&(n.height=i.height,n.depth=i.depth),/cancel/.test(o)&&!h?je(["mord","cancel-lap"],[n],t):je(["mord"],[n],t)},Xr=(e,t)=>{var r=0,a=new It(e.label.includes("colorbox")?"mpadded":"menclose",[Gt(e.body,t)]);switch(e.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*r+"pt"),a.setAttribute("height","+"+2*r+"pt"),a.setAttribute("lspace",r+"pt"),a.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){var n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);a.setAttribute("style","border: "+n+"em solid "+String(e.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&a.setAttribute("mathbackground",e.backgroundColor),a};pt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=Kt(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:i,body:o}},htmlBuilder:Yr,mathmlBuilder:Xr}),pt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=Kt(t[0],"color-token").color,o=Kt(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:o,borderColor:i,body:s}},htmlBuilder:Yr,mathmlBuilder:Xr}),pt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),pt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"enclose",mode:r.mode,label:a,body:n}},htmlBuilder:Yr,mathmlBuilder:Xr}),pt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var _r={};function jr(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,s={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},l=0;l<r.length;++l)_r[r[l]]=s;i&&(ct[t]=i),o&&(ut[t]=o)}var $r={};function Zr(e,t){$r[e]=t}function Kr(e){var t=[];e.consumeSpaces();var r=e.fetch().text;for("\\relax"===r&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}var Jr=e=>{if(!e.parser.settings.displayMode)throw new i("{"+e.envName+"} can be used only in display mode.")},Qr=new Set(["gather","gather*"]);function ea(e){if(!e.includes("ed"))return!e.includes("*")}function ta(e,t,r){var{hskipBeforeAndAfter:a,addJot:o,cols:s,arraystretch:l,colSeparationType:h,autoTag:m,singleRow:c,emptySingleRow:u,maxNumCols:p,leqno:d}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!l){var g=e.gullet.expandMacroAsText("\\arraystretch");if(null==g)l=1;else if(!(l=parseFloat(g))||l<0)throw new i("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var f=[],v=[f],b=[],y=[],x=null!=m?[]:void 0;function w(){m&&e.gullet.macros.set("\\@eqnsw","1",!0)}function k(){x&&(e.gullet.macros.get("\\df@tag")?(x.push(e.subparse([new n("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):x.push(Boolean(m)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(w(),y.push(Kr(e));;){var z=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),z={type:"ordgroup",mode:e.mode,body:z},r&&(z={type:"styling",mode:e.mode,style:r,body:[z]}),f.push(z);var S=e.fetch().text;if("&"===S){if(p&&f.length===p){if(c||h)throw new i("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===S){k(),1===f.length&&"styling"===z.type&&0===z.body[0].body.length&&(v.length>1||!u)&&v.pop(),y.length<v.length+1&&y.push([]);break}if("\\\\"!==S)throw new i("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var M=void 0;" "!==e.gullet.future().text&&(M=e.parseSizeGroup(!0)),b.push(M?M.value:null),k(),y.push(Kr(e)),f=[],v.push(f),w()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:o,arraystretch:l,body:v,cols:s,rowGaps:b,hskipBeforeAndAfter:a,hLinesBeforeRow:y,colSeparationType:h,tags:x,leqno:d}}function ra(e){return"d"===e.slice(0,1)?"display":"text"}var aa=function(e,t){var r,a,n=e.body.length,o=e.hLinesBeforeRow,s=0,l=new Array(n),h=[],m=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),c=1/t.fontMetrics().ptPerEm,u=5*c;e.colSeparationType&&"small"===e.colSeparationType&&(u=t.havingStyle(M.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var p="CD"===e.colSeparationType?U({number:3,unit:"ex"},t):12*c,d=3*c,g=e.arraystretch*p,f=.7*g,v=.3*g,b=0;function y(e){for(var t=0;t<e.length;++t)t>0&&(b+=.25),h.push({pos:b,isDashed:e[t]})}for(y(o[0]),r=0;r<e.body.length;++r){var x=e.body[r],w=f,k=v;s<x.length&&(s=x.length);var z=new Array(x.length);for(a=0;a<x.length;++a){var S=Tt(x[a],t);k<S.depth&&(k=S.depth),w<S.height&&(w=S.height),z[a]=S}var A=e.rowGaps[r],T=0;A&&(T=U(A,t))>0&&(k<(T+=v)&&(k=T),T=0),e.addJot&&(k+=d),z.height=w,z.depth=k,b+=w,z.pos=b,b+=k+T,l[r]=z,y(o[r+1])}var B,q,C=b/2+t.fontMetrics().axisHeight,I=e.cols||[],H=[],R=[];if(e.tags&&e.tags.some(e=>e))for(r=0;r<n;++r){var E=l[r],O=E.pos-C,N=e.tags[r],D=void 0;(D=!0===N?je(["eqn-num"],[],t):je([],!1===N?[]:wt(N,t,!0),t)).depth=E.depth,D.height=E.height,R.push({type:"elem",elem:D,shift:O})}for(a=0,q=0;a<s||q<I.length;++a,++q){for(var P=I[q]||{},L=!0;"separator"===P.type;){if(L||((B=je(["arraycolsep"],[])).style.width=W(t.fontMetrics().doubleRuleSep),H.push(B)),"|"!==P.separator&&":"!==P.separator)throw new i("Invalid separator type: "+P.separator);var V="|"===P.separator?"solid":"dashed",F=je(["vertical-separator"],[],t);F.style.height=W(b),F.style.borderRightWidth=W(m),F.style.borderRightStyle=V,F.style.margin="0 "+W(-m/2);var G=b-C;G&&(F.style.verticalAlign=W(-G)),H.push(F),P=I[++q]||{},L=!1}if(!(a>=s)){var Y,X=void 0;(a>0||e.hskipBeforeAndAfter)&&0!==(X=null!=(Y=P.pregap)?Y:u)&&((B=je(["arraycolsep"],[])).style.width=W(X),H.push(B));var _,j=[];for(r=0;r<n;++r){var $=l[r],Z=$[a];if(Z){var K=$.pos-C;Z.depth=$.depth,Z.height=$.height,j.push({type:"elem",elem:Z,shift:K})}}j=Qe({positionType:"individualShift",children:j}),j=je(["col-align-"+(P.align||"c")],[j]),H.push(j),(a<s-1||e.hskipBeforeAndAfter)&&0!==(X=null!=(_=P.postgap)?_:u)&&((B=je(["arraycolsep"],[])).style.width=W(X),H.push(B))}}if(l=je(["mtable"],H),h.length>0){for(var J=Ze("hline",t,m),Q=Ze("hdashline",t,m),ee=[{type:"elem",elem:l,shift:0}];h.length>0;){var te=h.pop(),re=te.pos-C;te.isDashed?ee.push({type:"elem",elem:Q,shift:re}):ee.push({type:"elem",elem:J,shift:re})}l=Qe({positionType:"individualShift",children:ee})}if(0===R.length)return je(["mord"],[l],t);var ae=Qe({positionType:"individualShift",children:R});return ae=je(["tag"],[ae],t),Ke([l,ae])},na={c:"center ",l:"left ",r:"right "},ia=function(e,t){for(var r=[],a=new It("mtd",[],["mtr-glue"]),n=new It("mtd",[],["mml-eqn-num"]),i=0;i<e.body.length;i++){for(var o=e.body[i],s=[],l=0;l<o.length;l++)s.push(new It("mtd",[Gt(o[l],t)]));e.tags&&e.tags[i]&&(s.unshift(a),s.push(a),e.leqno?s.unshift(n):s.push(n)),r.push(new It("mtr",s))}var h=new It("mtable",r),m=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);h.setAttribute("rowspacing",W(m));var c="",u="";if(e.cols&&e.cols.length>0){var p=e.cols,d="",g=!1,f=0,v=p.length;"separator"===p[0].type&&(c+="top ",f=1),"separator"===p[p.length-1].type&&(c+="bottom ",v-=1);for(var b=f;b<v;b++)"align"===p[b].type?(u+=na[p[b].align],g&&(d+="none "),g=!0):"separator"===p[b].type&&g&&(d+="|"===p[b].separator?"solid ":"dashed ",g=!1);h.setAttribute("columnalign",u.trim()),/[sd]/.test(d)&&h.setAttribute("columnlines",d.trim())}if("align"===e.colSeparationType){for(var y=e.cols||[],x="",w=1;w<y.length;w++)x+=w%2?"0em ":"1em ";h.setAttribute("columnspacing",x.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?h.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?h.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?h.setAttribute("columnspacing","0.5em"):h.setAttribute("columnspacing","1em");var k="",z=e.hLinesBeforeRow;c+=z[0].length>0?"left ":"",c+=z[z.length-1].length>0?"right ":"";for(var S=1;S<z.length-1;S++)k+=0===z[S].length?"none ":z[S][0]?"dashed ":"solid ";return/[sd]/.test(k)&&h.setAttribute("rowlines",k.trim()),""!==c&&(h=new It("menclose",[h])).setAttribute("notation",c.trim()),e.arraystretch&&e.arraystretch<1&&(h=new It("mstyle",[h])).setAttribute("scriptlevel","1"),h},oa=function(e,t){e.envName.includes("ed")||Jr(e);var r,a=[],n=e.envName.includes("at")?"alignat":"align",o="split"===e.envName,s=ta(e.parser,{cols:a,addJot:!0,autoTag:o?void 0:ea(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),l=0,h={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var m="",c=0;c<t[0].body.length;c++)m+=Kt(t[0].body[c],"textord").text;r=Number(m),l=2*r}var u=!l;s.body.forEach(function(e){for(var t=1;t<e.length;t+=2){var a=Kt(e[t],"styling");Kt(a.body[0],"ordgroup").body.unshift(h)}if(u)l<e.length&&(l=e.length);else{var n=e.length/2;if(r<n)throw new i("Too many math in a row: expected "+r+", but got "+n,e[0])}});for(var p=0;p<l;++p){var d="r",g=0;p%2==1?d="l":p>0&&u&&(g=1),a[p]={type:"align",align:d,pregap:g,postgap:0}}return s.colSeparationType=u?"align":"alignat",s};jr({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=(Qt(t[0])?[t[0]]:Kt(t[0],"ordgroup").body).map(function(e){var t=Jt(e).text;if("lcr".includes(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new i("Unknown column alignment: "+t,e)}),a={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return ta(e.parser,a,ra(e.envName))},htmlBuilder:aa,mathmlBuilder:ia}),jr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var n=e.parser;if(n.consumeSpaces(),"["===n.fetch().text){if(n.consume(),n.consumeSpaces(),r=n.fetch().text,!"lcr".includes(r))throw new i("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),a.cols=[{type:"align",align:r}]}}var o=ta(e.parser,a,ra(e.envName)),s=Math.max(0,...o.body.map(e=>e.length));return o.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:aa,mathmlBuilder:ia}),jr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=ta(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:aa,mathmlBuilder:ia}),jr({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=(Qt(t[0])?[t[0]]:Kt(t[0],"ordgroup").body).map(function(e){var t=Jt(e).text;if("lc".includes(t))return{type:"align",align:t};throw new i("Unknown column alignment: "+t,e)});if(r.length>1)throw new i("{subarray} can contain only one column");var a={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if((a=ta(e.parser,a,"script")).body.length>0&&a.body[0].length>1)throw new i("{subarray} can contain only one column");return a},htmlBuilder:aa,mathmlBuilder:ia}),jr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=ta(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},ra(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:aa,mathmlBuilder:ia}),jr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:oa,htmlBuilder:aa,mathmlBuilder:ia}),jr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Qr.has(e.envName)&&Jr(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:ea(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return ta(e.parser,t,"display")},htmlBuilder:aa,mathmlBuilder:ia}),jr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:oa,htmlBuilder:aa,mathmlBuilder:ia}),jr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Jr(e);var t={autoTag:ea(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return ta(e.parser,t,"display")},htmlBuilder:aa,mathmlBuilder:ia}),jr({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(Jr(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new i("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var a=[],n=[a],o=0;o<t.length;o++){for(var s=t[o],l=lr(),h=0;h<s.length;h++)if(hr(s[h])){a.push(l);var m=Jt(s[h+=1]).text,c=new Array(2);if(c[0]={type:"ordgroup",mode:"math",body:[]},c[1]={type:"ordgroup",mode:"math",body:[]},"=|.".includes(m));else{if(!"<>AV".includes(m))throw new i('Expected one of "<>AV=|." after @',s[h]);for(var u=0;u<2;u++){for(var p=!0,d=h+1;d<s.length;d++){if(mr(s[d],m)){p=!1,h=d;break}if(hr(s[d]))throw new i("Missing a "+m+" character to complete a CD arrow.",s[d]);c[u].body.push(s[d])}if(p)throw new i("Missing a "+m+" character to complete a CD arrow.",s[h])}}var g={type:"styling",body:[cr(m,c,e)],mode:"math",style:"display"};a.push(g),l=lr()}else l.body.push(s[h]);o%2==0?a.push(l):a.shift(),a=[],n.push(a)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}(e.parser)),htmlBuilder:aa,mathmlBuilder:ia}),Zr("\\nonumber","\\gdef\\@eqnsw{0}"),Zr("\\notag","\\nonumber"),pt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new i(e.funcName+" valid only within array environment")}});var sa=_r;pt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];if("ordgroup"!==n.type)throw new i("Invalid environment name",n);for(var o="",s=0;s<n.body.length;++s)o+=Kt(n.body[s],"textord").text;if("\\begin"===a){if(!sa.hasOwnProperty(o))throw new i("No such environment: "+o,n);var l=sa[o],{args:h,optArgs:m}=r.parseArguments("\\begin{"+o+"}",l),c={mode:r.mode,envName:o,parser:r},u=l.handler(c,h,m);r.expect("\\end",!1);var p=r.nextToken,d=Kt(r.parseFunction(),"environment");if(d.name!==o)throw new i("Mismatch: \\begin{"+o+"} matched by \\end{"+d.name+"}",p);return u}return{type:"environment",mode:r.mode,name:o,nameGroup:n}}});var la=(e,t)=>{var r=e.font,a=t.withFont(r);return Tt(e.body,a)},ha=(e,t)=>{var r=e.font,a=t.withFont(r);return Gt(e.body,a)},ma={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};pt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=gt(t[0]),i=a;return i in ma&&(i=ma[i]),{type:"font",mode:r.mode,font:i.slice(1),body:n}},htmlBuilder:la,mathmlBuilder:ha}),pt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"mclass",mode:r.mode,mclass:or(a),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:a}],isCharacterBox:p(a)}}}),pt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a,breakOnTokenText:n}=e,{mode:i}=r,o=r.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+a.slice(1),body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:la,mathmlBuilder:ha});var ca=(e,t)=>t?{type:"styling",mode:e.mode,style:t,body:[e]}:e;pt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var r,{parser:a,funcName:n}=e,i=t[0],o=t[1],s=null,l=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,s="(",l=")";break;case"\\\\bracefrac":r=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":r=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var h="\\cfrac"===n,m=null;return h||n.startsWith("\\d")?m="display":n.startsWith("\\t")&&(m="text"),ca({type:"genfrac",mode:a.mode,numer:i,denom:o,continued:h,hasBarLine:r,leftDelim:s,rightDelim:l,barSize:null},m)},htmlBuilder:(e,t)=>{var r,a=t.style,n=a.fracNum(),i=a.fracDen();r=t.havingStyle(n);var o=Tt(e.numer,r,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<l?l:o.depth}r=t.havingStyle(i);var h,m,c,u,p,d,g,f,v,b,y=Tt(e.denom,r,t);if(e.hasBarLine?(e.barSize?(m=U(e.barSize,t),h=Ze("frac-line",t,m)):h=Ze("frac-line",t),m=h.height,c=h.height):(h=null,m=0,c=t.fontMetrics().defaultRuleThickness),a.size===M.DISPLAY.size?(u=t.fontMetrics().num1,p=m>0?3*c:7*c,d=t.fontMetrics().denom1):(m>0?(u=t.fontMetrics().num2,p=c):(u=t.fontMetrics().num3,p=3*c),d=t.fontMetrics().denom2),h){var x=t.fontMetrics().axisHeight;u-o.depth-(x+.5*m)<p&&(u+=p-(u-o.depth-(x+.5*m))),x-.5*m-(y.height-d)<p&&(d+=p-(x-.5*m-(y.height-d))),g=Qe({positionType:"individualShift",children:[{type:"elem",elem:y,shift:d},{type:"elem",elem:h,shift:-(x-.5*m)},{type:"elem",elem:o,shift:-u}]})}else{var w=u-o.depth-(y.height-d);w<p&&(u+=.5*(p-w),d+=.5*(p-w)),g=Qe({positionType:"individualShift",children:[{type:"elem",elem:y,shift:d},{type:"elem",elem:o,shift:-u}]})}return r=t.havingStyle(a),g.height*=r.sizeMultiplier/t.sizeMultiplier,g.depth*=r.sizeMultiplier/t.sizeMultiplier,f=a.size===M.DISPLAY.size?t.fontMetrics().delim1:a.size===M.SCRIPTSCRIPT.size?t.havingStyle(M.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,v=null==e.leftDelim?At(t,["mopen"]):Lr(e.leftDelim,f,!0,t.havingStyle(a),e.mode,["mopen"]),b=e.continued?je([]):null==e.rightDelim?At(t,["mclose"]):Lr(e.rightDelim,f,!0,t.havingStyle(a),e.mode,["mclose"]),je(["mord"].concat(r.sizingClasses(t)),[v,je(["mfrac"],[g]),b],t)},mathmlBuilder:(e,t)=>{var r=new It("mfrac",[Gt(e.numer,t),Gt(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var a=U(e.barSize,t);r.setAttribute("linethickness",W(a))}}else r.setAttribute("linethickness","0px");if(null!=e.leftDelim||null!=e.rightDelim){var n=[];if(null!=e.leftDelim){var i=new It("mo",[new Ht(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),n.push(i)}if(n.push(r),null!=e.rightDelim){var o=new It("mo",[new Ht(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),n.push(o)}return Dt(n)}return r}}),pt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:r,funcName:a,token:n}=e;switch(a){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:n}}});var ua=["display","text","script","scriptscript"],pa=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};pt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var r,{parser:a}=e,n=t[4],i=t[5],o=gt(t[0]),s="atom"===o.type&&"open"===o.family?pa(o.text):null,l=gt(t[1]),h="atom"===l.type&&"close"===l.family?pa(l.text):null,m=Kt(t[2],"size"),c=null;r=!!m.isBlank||(c=m.value).number>0;var u=null,p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var d=Kt(p.body[0],"textord");u=ua[Number(d.text)]}}else p=Kt(p,"textord"),u=ua[Number(p.text)];return ca({type:"genfrac",mode:a.mode,numer:n,denom:i,continued:!1,hasBarLine:r,barSize:c,leftDelim:s,rightDelim:h},u)}}),pt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:a,token:n}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Kt(t[0],"size").value,token:n}}}),pt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0],i=Kt(t[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var o=t[2],s=i.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:o,continued:!1,hasBarLine:s,barSize:i,leftDelim:null,rightDelim:null}}});var da=(e,t)=>{var r,a,n=t.style;"supsub"===e.type?(r=e.sup?Tt(e.sup,t.havingStyle(n.sup()),t):Tt(e.sub,t.havingStyle(n.sub()),t),a=Kt(e.base,"horizBrace")):a=Kt(e,"horizBrace");var i,o=Tt(a.base,t.havingBaseStyle(M.DISPLAY)),s=Zt(a,t);if(a.isOver?(i=Qe({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]})).children[0].children[0].children[1].classes.push("svg-align"):(i=Qe({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]})).children[0].children[0].children[0].classes.push("svg-align"),r){var l=je(["mord",a.isOver?"mover":"munder"],[i],t);i=a.isOver?Qe({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]}):Qe({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]})}return je(["mord",a.isOver?"mover":"munder"],[i],t)};pt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"horizBrace",mode:r.mode,label:a,isOver:/^\\over/.test(a),base:t[0]}},htmlBuilder:da,mathmlBuilder:(e,t)=>{var r=_t(e.label);return new It(e.isOver?"mover":"munder",[Gt(e.base,t),r])}}),pt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[1],n=Kt(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:r.mode,href:n,body:ft(a)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=wt(e.body,t,!1);return function(e,t,r,a){var n=new K(e,[],r,a);return _e(n),n}(e.href,0,r,t)},mathmlBuilder:(e,t)=>{var r=Ft(e.body,t);return r instanceof It||(r=new It("mrow",[r])),r.setAttribute("href",e.href),r}}),pt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=Kt(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:a}))return r.formatUnsupportedCmd("\\url");for(var n=[],i=0;i<a.length;i++){var o=a[i];"~"===o&&(o="\\textasciitilde"),n.push({type:"textord",mode:"text",text:o})}var s={type:"text",mode:r.mode,font:"\\texttt",body:n};return{type:"href",mode:r.mode,href:a,body:ft(s)}}}),pt({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:r}=e;return{type:"hbox",mode:r.mode,body:ft(t[0])}},htmlBuilder(e,t){var r=wt(e.body,t,!1);return Ke(r)},mathmlBuilder:(e,t)=>new It("mrow",Vt(e.body,t))}),pt({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var r,{parser:a,funcName:n,token:o}=e,s=Kt(t[0],"raw").string,l=t[1];a.settings.strict&&a.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var h={};switch(n){case"\\htmlClass":h.class=s,r={command:"\\htmlClass",class:s};break;case"\\htmlId":h.id=s,r={command:"\\htmlId",id:s};break;case"\\htmlStyle":h.style=s,r={command:"\\htmlStyle",style:s};break;case"\\htmlData":for(var m=s.split(","),c=0;c<m.length;c++){var u=m[c],p=u.indexOf("=");if(p<0)throw new i("\\htmlData key/value '"+u+"' missing equals sign");var d=u.slice(0,p),g=u.slice(p+1);h["data-"+d.trim()]=g}r={command:"\\htmlData",attributes:h};break;default:throw new Error("Unrecognized html command")}return a.settings.isTrusted(r)?{type:"html",mode:a.mode,attributes:h,body:ft(l)}:a.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var r=wt(e.body,t,!1),a=["enclosing"];e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/));var n=je(a,r,t);for(var i in e.attributes)"class"!==i&&e.attributes.hasOwnProperty(i)&&n.setAttribute(i,e.attributes[i]);return n},mathmlBuilder:(e,t)=>Ft(e.body,t)}),pt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:ft(t[0]),mathml:ft(t[1])}},htmlBuilder:(e,t)=>{var r=wt(e.html,t,!1);return Ke(r)},mathmlBuilder:(e,t)=>Ft(e.mathml,t)});var ga=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new i("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!G(r))throw new i("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};pt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:a}=e,n={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(r[0])for(var h=Kt(r[0],"raw").string.split(","),m=0;m<h.length;m++){var c=h[m].split("=");if(2===c.length){var u=c[1].trim();switch(c[0].trim()){case"alt":l=u;break;case"width":n=ga(u);break;case"height":o=ga(u);break;case"totalheight":s=ga(u);break;default:throw new i("Invalid key: '"+c[0]+"' in \\includegraphics.")}}}var p=Kt(t[0],"url").url;return""===l&&(l=(l=(l=p).replace(/^.*[\\/]/,"")).substring(0,l.lastIndexOf("."))),a.settings.isTrusted({command:"\\includegraphics",url:p})?{type:"includegraphics",mode:a.mode,alt:l,width:n,height:o,totalheight:s,src:p}:a.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var r=U(e.height,t),a=0;e.totalheight.number>0&&(a=U(e.totalheight,t)-r);var n=0;e.width.number>0&&(n=U(e.width,t));var i={height:W(r+a)};n>0&&(i.width=W(n)),a>0&&(i.verticalAlign=W(-a));var o=new J(e.src,e.alt,i);return o.height=r,o.depth=a,o},mathmlBuilder:(e,t)=>{var r=new It("mglyph",[]);r.setAttribute("alt",e.alt);var a=U(e.height,t),n=0;if(e.totalheight.number>0&&(n=U(e.totalheight,t)-a,r.setAttribute("valign",W(-n))),r.setAttribute("height",W(a+n)),e.width.number>0){var i=U(e.width,t);r.setAttribute("width",W(i))}return r.setAttribute("src",e.src),r}}),pt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=Kt(t[0],"size");if(r.settings.strict){var i="m"===a[1],o="mu"===n.value.unit;i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, not "+n.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:n.value}},htmlBuilder:(e,t)=>et(e.dimension,t),mathmlBuilder(e,t){var r=U(e.dimension,t);return new Rt(r)}}),pt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"lap",mode:r.mode,alignment:a.slice(5),body:n}},htmlBuilder:(e,t)=>{var r;"clap"===e.alignment?(r=je([],[Tt(e.body,t)]),r=je(["inner"],[r],t)):r=je(["inner"],[Tt(e.body,t)]);var a=je(["fix"],[]),n=je([e.alignment],[r,a],t),i=je(["strut"]);return i.style.height=W(n.height+n.depth),n.depth&&(i.style.verticalAlign=W(-n.depth)),n.children.unshift(i),n=je(["thinbox"],[n],t),je(["mord","vbox"],[n],t)},mathmlBuilder:(e,t)=>{var r=new It("mpadded",[Gt(e.body,t)]);if("rlap"!==e.alignment){var a="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",a+"width")}return r.setAttribute("width","0px"),r}}),pt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:a}=e,n=a.mode;a.switchMode("math");var i="\\("===r?"\\)":"$",o=a.parseExpression(!1,i);return a.expect(i),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:o}}}),pt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new i("Mismatched "+e.funcName)}});var fa=(e,t)=>{switch(t.style.size){case M.DISPLAY.size:return e.display;case M.TEXT.size:return e.text;case M.SCRIPT.size:return e.script;case M.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};pt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:ft(t[0]),text:ft(t[1]),script:ft(t[2]),scriptscript:ft(t[3])}},htmlBuilder:(e,t)=>{var r=fa(e,t),a=wt(r,t,!1);return Ke(a)},mathmlBuilder:(e,t)=>{var r=fa(e,t);return Ft(r,t)}});var va=(e,t,r,a,n,i,o)=>{e=je([],[e]);var s,l,h,m=r&&p(r);if(t){var c=Tt(t,a.havingStyle(n.sup()),a);l={elem:c,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-c.depth)}}if(r){var u=Tt(r,a.havingStyle(n.sub()),a);s={elem:u,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-u.height)}}if(l&&s){var d=a.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;h=Qe({positionType:"bottom",positionData:d,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:W(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:W(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else if(s){var g=e.height-o;h=Qe({positionType:"top",positionData:g,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:W(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e}]})}else{if(!l)return e;var f=e.depth+o;h=Qe({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:W(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}var v=[h];if(s&&0!==i&&!m){var b=je(["mspace"],[],a);b.style.marginRight=W(i),v.unshift(b)}return je(["mop","op-limits"],v,a)},ba=new Set(["\\smallint"]),ya=(e,t)=>{var r,a,n,i=!1;"supsub"===e.type?(r=e.sup,a=e.sub,n=Kt(e.base,"op"),i=!0):n=Kt(e,"op");var o,s=t.style,l=!1;if(s.size===M.DISPLAY.size&&n.symbol&&!ba.has(n.name)&&(l=!0),n.symbol){var h=l?"Size2-Regular":"Size1-Regular",m="";if("\\oiint"!==n.name&&"\\oiiint"!==n.name||(m=n.name.slice(1),n.name="oiint"===m?"\\iint":"\\iiint"),o=Ge(n.name,h,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),m.length>0){var c=o.italic,u=nt(m+"Size"+(l?"2":"1"),t);o=Qe({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:u,shift:l?.08:0}]}),n.name="\\"+m,o.classes.unshift("mop"),o.italic=c}}else if(n.body){var p=wt(n.body,t,!0);1===p.length&&p[0]instanceof ee?(o=p[0]).classes[0]="mop":o=je(["mop"],p,t)}else{for(var d=[],g=1;g<n.name.length;g++)d.push(Ue(n.name[g],n.mode,t));o=je(["mop"],d,t)}var f=0,v=0;return(o instanceof ee||"\\oiint"===n.name||"\\oiiint"===n.name)&&!n.suppressBaseShift&&(f=(o.height-o.depth)/2-t.fontMetrics().axisHeight,v=o.italic),i?va(o,r,a,t,s,v,f):(f&&(o.style.position="relative",o.style.top=W(f)),o)},xa=(e,t)=>{var r;if(e.symbol)r=new It("mo",[Nt(e.name,e.mode)]),ba.has(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new It("mo",Vt(e.body,t));else{r=new It("mi",[new Ht(e.name.slice(1))]);var a=new It("mo",[Nt("","text")]);r=e.parentIsSupSub?new It("mrow",[r,a]):Ct([r,a])}return r},wa={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};pt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=a;return 1===n.length&&(n=wa[n]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:ya,mathmlBuilder:xa}),pt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ft(a)}},htmlBuilder:ya,mathmlBuilder:xa});var ka={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};pt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:ya,mathmlBuilder:xa}),pt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:ya,mathmlBuilder:xa}),pt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:r}=e,a=r;return 1===a.length&&(a=ka[a]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:ya,mathmlBuilder:xa});var za=(e,t)=>{var r,a,n,i,o=!1;if("supsub"===e.type?(r=e.sup,a=e.sub,n=Kt(e.base,"operatorname"),o=!0):n=Kt(e,"operatorname"),n.body.length>0){for(var s=n.body.map(e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),l=wt(s,t.withFont("mathrm"),!0),h=0;h<l.length;h++){var m=l[h];m instanceof ee&&(m.text=m.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}i=je(["mop"],l,t)}else i=je(["mop"],[],t);return o?va(i,r,a,t,t.style,0,0):i};function Sa(e,t,r){for(var a=wt(e,t,!1),n=t.sizeMultiplier/r.sizeMultiplier,i=0;i<a.length;i++){var o=a[i].classes.indexOf("sizing");o<0?Array.prototype.push.apply(a[i].classes,t.sizingClasses(r)):a[i].classes[o+1]==="reset-size"+t.size&&(a[i].classes[o+1]="reset-size"+r.size),a[i].height*=n,a[i].depth*=n}return Ke(a)}pt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"operatorname",mode:r.mode,body:ft(n),alwaysHandleSupSub:"\\operatornamewithlimits"===a,limits:!1,parentIsSupSub:!1}},htmlBuilder:za,mathmlBuilder:(e,t)=>{for(var r=Vt(e.body,t.withFont("mathrm")),a=!0,n=0;n<r.length;n++){var i=r[n];if(i instanceof Rt);else if(i instanceof It)switch(i.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var o=i.children[0];1===i.children.length&&o instanceof Ht?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):a=!1;break;default:a=!1}else a=!1}if(a){var s=r.map(e=>e.toText()).join("");r=[new Ht(s)]}var l=new It("mi",r);l.setAttribute("mathvariant","normal");var h=new It("mo",[Nt("","text")]);return e.parentIsSupSub?new It("mrow",[l,h]):Ct([l,h])}}),Zr("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),dt({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?Ke(wt(e.body,t,!1)):je(["mord"],wt(e.body,t,!0),t),mathmlBuilder:(e,t)=>Ft(e.body,t,!0)}),pt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,a=t[0];return{type:"overline",mode:r.mode,body:a}},htmlBuilder(e,t){var r=Tt(e.body,t.havingCrampedStyle()),a=Ze("overline-line",t),n=t.fontMetrics().defaultRuleThickness,i=Qe({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]});return je(["mord","overline"],[i],t)},mathmlBuilder(e,t){var r=new It("mo",[new Ht("‾")]);r.setAttribute("stretchy","true");var a=new It("mover",[Gt(e.body,t),r]);return a.setAttribute("accent","true"),a}}),pt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"phantom",mode:r.mode,body:ft(a)}},htmlBuilder:(e,t)=>{var r=wt(e.body,t.withPhantom(),!1);return Ke(r)},mathmlBuilder:(e,t)=>{var r=Vt(e.body,t);return new It("mphantom",r)}}),pt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"hphantom",mode:r.mode,body:a}},htmlBuilder:(e,t)=>{var r=je([],[Tt(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var a=0;a<r.children.length;a++)r.children[a].height=0,r.children[a].depth=0;return r=Qe({positionType:"firstBaseline",children:[{type:"elem",elem:r}]}),je(["mord"],[r],t)},mathmlBuilder:(e,t)=>{var r=Vt(ft(e.body),t),a=new It("mphantom",r),n=new It("mpadded",[a]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}}),pt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"vphantom",mode:r.mode,body:a}},htmlBuilder:(e,t)=>{var r=je(["inner"],[Tt(e.body,t.withPhantom())]),a=je(["fix"],[]);return je(["mord","rlap"],[r,a],t)},mathmlBuilder:(e,t)=>{var r=Vt(ft(e.body),t),a=new It("mphantom",r),n=new It("mpadded",[a]);return n.setAttribute("width","0px"),n}}),pt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,a=Kt(t[0],"size").value,n=t[1];return{type:"raisebox",mode:r.mode,dy:a,body:n}},htmlBuilder(e,t){var r=Tt(e.body,t),a=U(e.dy,t);return Qe({positionType:"shift",positionData:-a,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new It("mpadded",[Gt(e.body,t)]),a=e.dy.number+e.dy.unit;return r.setAttribute("voffset",a),r}}),pt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),pt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:a}=e,n=r[0],i=Kt(t[0],"size"),o=Kt(t[1],"size");return{type:"rule",mode:a.mode,shift:n&&Kt(n,"size").value,width:i.value,height:o.value}},htmlBuilder(e,t){var r=je(["mord","rule"],[],t),a=U(e.width,t),n=U(e.height,t),i=e.shift?U(e.shift,t):0;return r.style.borderRightWidth=W(a),r.style.borderTopWidth=W(n),r.style.bottom=W(i),r.width=a,r.height=n+i,r.depth=-i,r.maxFontSize=1.125*n*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=U(e.width,t),a=U(e.height,t),n=e.shift?U(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new It("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",W(r)),o.setAttribute("height",W(a));var s=new It("mpadded",[o]);return n>=0?s.setAttribute("height",W(n)):(s.setAttribute("height",W(n)),s.setAttribute("depth",W(-n))),s.setAttribute("voffset",W(n)),s}});var Ma=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];pt({type:"sizing",names:Ma,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!1,r);return{type:"sizing",mode:n.mode,size:Ma.indexOf(a)+1,body:i}},htmlBuilder:(e,t)=>{var r=t.havingSize(e.size);return Sa(e.body,r,t)},mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),a=Vt(e.body,r),n=new It("mstyle",a);return n.setAttribute("mathsize",W(r.sizeMultiplier)),n}}),pt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:a}=e,n=!1,i=!1,o=r[0]&&Kt(r[0],"ordgroup");if(o)for(var s="",l=0;l<o.body.length;++l)if("t"===(s=o.body[l].text))n=!0;else{if("b"!==s){n=!1,i=!1;break}i=!0}else n=!0,i=!0;var h=t[0];return{type:"smash",mode:a.mode,body:h,smashHeight:n,smashDepth:i}},htmlBuilder:(e,t)=>{var r=je([],[Tt(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var a=0;a<r.children.length;a++)r.children[a].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].depth=0;var i=Qe({positionType:"firstBaseline",children:[{type:"elem",elem:r}]});return je(["mord"],[i],t)},mathmlBuilder:(e,t)=>{var r=new It("mpadded",[Gt(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),pt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a}=e,n=r[0],i=t[0];return{type:"sqrt",mode:a.mode,body:i,index:n}},htmlBuilder(e,t){var r=Tt(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=Je(r,t);var a=t.fontMetrics().defaultRuleThickness,n=a;t.style.id<M.TEXT.id&&(n=t.fontMetrics().xHeight);var i=a+n/4,o=r.height+r.depth+i+a,{span:s,ruleWidth:l,advanceWidth:h}=function(e,t){var r,a,n=t.havingBaseSizing(),i=Pr("\\surd",e*n.sizeMultiplier,Nr,n),o=n.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,h=0,m=0;return"small"===i.type?(e<1?o=1:e<1.4&&(o=.7),h=(1+s)/o,(r=Br("sqrtMain",l=(1+s+Tr)/o,m=1e3+1e3*s+80,s,t)).style.minWidth="0.853em",a=.833/o):"large"===i.type?(m=1080*Hr[i.size],h=(Hr[i.size]+s)/o,l=(Hr[i.size]+s+Tr)/o,(r=Br("sqrtSize"+i.size,l,m,s,t)).style.minWidth="1.02em",a=1/o):(l=e+s+Tr,h=e+s,m=Math.floor(1e3*e+s)+80,(r=Br("sqrtTall",l,m,s,t)).style.minWidth="0.742em",a=1.056),r.height=h,r.style.height=W(l),{span:r,advanceWidth:a,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}}(o,t),m=s.height-l;m>r.height+r.depth+i&&(i=(i+m-r.height-r.depth)/2);var c=s.height-r.height-i-l;r.style.paddingLeft=W(h);var u=Qe({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+c)},{type:"elem",elem:s},{type:"kern",size:l}]});if(e.index){var p=t.havingStyle(M.SCRIPTSCRIPT),d=Tt(e.index,p,t),g=.6*(u.height-u.depth),f=Qe({positionType:"shift",positionData:-g,children:[{type:"elem",elem:d}]}),v=je(["root"],[f]);return je(["mord","sqrt"],[v,u],t)}return je(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){var{body:r,index:a}=e;return a?new It("mroot",[Gt(r,t),Gt(a,t)]):new It("msqrt",[Gt(r,t)])}});var Aa={display:M.DISPLAY,text:M.TEXT,script:M.SCRIPT,scriptscript:M.SCRIPTSCRIPT};pt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!0,r),o=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:o,body:i}},htmlBuilder(e,t){var r=Aa[e.style],a=t.havingStyle(r).withFont("");return Sa(e.body,a,t)},mathmlBuilder(e,t){var r=Aa[e.style],a=t.havingStyle(r),n=Vt(e.body,a),i=new It("mstyle",n),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}}),dt({type:"supsub",htmlBuilder(e,t){var r=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===M.DISPLAY.size||r.alwaysHandleSupSub)?ya:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===M.DISPLAY.size||r.limits)?za:null:"accent"===r.type?p(r.base)?er:null:"horizBrace"===r.type&&!e.sub===r.isOver?da:null:null}(e,t);if(r)return r(e,t);var a,n,i,{base:o,sup:s,sub:l}=e,h=Tt(o,t),m=t.fontMetrics(),c=0,u=0,d=o&&p(o);if(s){var g=t.havingStyle(t.style.sup());a=Tt(s,g,t),d||(c=h.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier)}if(l){var f=t.havingStyle(t.style.sub());n=Tt(l,f,t),d||(u=h.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}i=t.style===M.DISPLAY?m.sup1:t.style.cramped?m.sup3:m.sup2;var v,b=t.sizeMultiplier,y=W(.5/m.ptPerEm/b),x=null;if(n){var w=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(h instanceof ee||w)&&(x=W(-h.italic))}if(a&&n){c=Math.max(c,i,a.depth+.25*m.xHeight),u=Math.max(u,m.sub2);var k=4*m.defaultRuleThickness;if(c-a.depth-(n.height-u)<k){u=k-(c-a.depth)+n.height;var z=.8*m.xHeight-(c-a.depth);z>0&&(c+=z,u-=z)}v=Qe({positionType:"individualShift",children:[{type:"elem",elem:n,shift:u,marginRight:y,marginLeft:x},{type:"elem",elem:a,shift:-c,marginRight:y}]})}else if(n)u=Math.max(u,m.sub1,n.height-.8*m.xHeight),v=Qe({positionType:"shift",positionData:u,children:[{type:"elem",elem:n,marginLeft:x,marginRight:y}]});else{if(!a)throw new Error("supsub must have either sup or sub.");c=Math.max(c,i,a.depth+.25*m.xHeight),v=Qe({positionType:"shift",positionData:-c,children:[{type:"elem",elem:a,marginRight:y}]})}var S=Mt(h,"right")||"mord";return je([S],[h,je(["msupsub"],[v])],t)},mathmlBuilder(e,t){var r,a=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(a=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var n,i=[Gt(e.base,t)];if(e.sub&&i.push(Gt(e.sub,t)),e.sup&&i.push(Gt(e.sup,t)),a)n=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;n=o&&"op"===o.type&&o.limits&&t.style===M.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===M.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;n=s&&"op"===s.type&&s.limits&&(t.style===M.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===M.DISPLAY)?"munder":"msub"}else{var l=e.base;n=l&&"op"===l.type&&l.limits&&(t.style===M.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===M.DISPLAY)?"mover":"msup"}return new It(n,i)}}),dt({type:"atom",htmlBuilder:(e,t)=>Ue(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var r=new It("mo",[Nt(e.text,e.mode)]);if("bin"===e.family){var a=Pt(e,t);"bold-italic"===a&&r.setAttribute("mathvariant",a)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var Ta={mi:"italic",mn:"normal",mtext:"normal"};dt({type:"mathord",htmlBuilder:(e,t)=>We(e,t,"mathord"),mathmlBuilder(e,t){var r=new It("mi",[Nt(e.text,e.mode,t)]),a=Pt(e,t)||"italic";return a!==Ta[r.type]&&r.setAttribute("mathvariant",a),r}}),dt({type:"textord",htmlBuilder:(e,t)=>We(e,t,"textord"),mathmlBuilder(e,t){var r,a=Nt(e.text,e.mode,t),n=Pt(e,t)||"normal";return r="text"===e.mode?new It("mtext",[a]):/[0-9]/.test(e.text)?new It("mn",[a]):"\\prime"===e.text?new It("mo",[a]):new It("mi",[a]),n!==Ta[r.type]&&r.setAttribute("mathvariant",n),r}});var Ba={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},qa={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};dt({type:"spacing",htmlBuilder(e,t){if(qa.hasOwnProperty(e.text)){var r=qa[e.text].className||"";if("text"===e.mode){var a=We(e,t,"textord");return a.classes.push(r),a}return je(["mspace",r],[Ue(e.text,e.mode,t)],t)}if(Ba.hasOwnProperty(e.text))return je(["mspace",Ba[e.text]],[],t);throw new i('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!qa.hasOwnProperty(e.text)){if(Ba.hasOwnProperty(e.text))return new It("mspace");throw new i('Unknown type of space "'+e.text+'"')}return new It("mtext",[new Ht(" ")])}});var Ca=()=>{var e=new It("mtd",[]);return e.setAttribute("width","50%"),e};dt({type:"tag",mathmlBuilder(e,t){var r=new It("mtable",[new It("mtr",[Ca(),new It("mtd",[Ft(e.body,t)]),Ca(),new It("mtd",[Ft(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var Ia={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ha={"\\textbf":"textbf","\\textmd":"textmd"},Ra={"\\textit":"textit","\\textup":"textup"},Ea=(e,t)=>{var r=e.font;return r?Ia[r]?t.withTextFontFamily(Ia[r]):Ha[r]?t.withTextFontWeight(Ha[r]):"\\emph"===r?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Ra[r]):t};pt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"text",mode:r.mode,body:ft(n),font:a}},htmlBuilder(e,t){var r=Ea(e,t),a=wt(e.body,r,!0);return je(["mord","text"],a,r)},mathmlBuilder(e,t){var r=Ea(e,t);return Ft(e.body,r)}}),pt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Tt(e.body,t),a=Ze("underline-line",t),n=t.fontMetrics().defaultRuleThickness,i=Qe({positionType:"top",positionData:r.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:r}]});return je(["mord","underline"],[i],t)},mathmlBuilder(e,t){var r=new It("mo",[new Ht("‾")]);r.setAttribute("stretchy","true");var a=new It("munder",[Gt(e.body,t),r]);return a.setAttribute("accentunder","true"),a}}),pt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Tt(e.body,t),a=t.fontMetrics().axisHeight,n=.5*(r.height-a-(r.depth+a));return Qe({positionType:"shift",positionData:n,children:[{type:"elem",elem:r}]})},mathmlBuilder:(e,t)=>new It("mpadded",[Gt(e.body,t)],["vcenter"])}),pt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new i("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=Oa(e),a=[],n=t.havingStyle(t.style.text()),i=0;i<r.length;i++){var o=r[i];"~"===o&&(o="\\textasciitilde"),a.push(Ge(o,"Typewriter-Regular",e.mode,n,["mord","texttt"]))}return je(["mord","text"].concat(n.sizingClasses(t)),Xe(a),n)},mathmlBuilder(e,t){var r=new Ht(Oa(e)),a=new It("mtext",[r]);return a.setAttribute("mathvariant","monospace"),a}});var Oa=e=>e.body.replace(/ /g,e.star?"␣":" "),Na=mt,Da="[ \r\n\t]",Pa="(\\\\[a-zA-Z@]+)"+Da+"*",La="[̀-ͯ]",Va=new RegExp(La+"+$"),Fa="("+Da+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧-豈-]"+La+"*|[\ud800-\udbff][\udc00-\udfff]"+La+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Pa+"|\\\\[^\ud800-\udfff])";class Ga{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Fa,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new n("EOF",new a(this,t,t));var r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new i("Unexpected character: '"+e[t]+"'",new n(e[t],new a(this,t,t+1)));var o=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[o]){var s=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===s?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new n(o,new a(this,t,this.tokenRegex.lastIndex))}}class Ua{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new i("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,r){if(void 0===r&&(r=!1),r){for(var a=0;a<this.undefStack.length;a++)delete this.undefStack[a][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var n=this.undefStack[this.undefStack.length-1];n&&!n.hasOwnProperty(e)&&(n[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var Wa=$r;Zr("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),Zr("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),Zr("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),Zr("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),Zr("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),Zr("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Zr("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var Ya={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Zr("\\char",function(e){var t,r=e.popToken(),a="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])a=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new i("\\char` missing argument");a=r.text.charCodeAt(0)}else t=10;if(t){if(null==(a=Ya[r.text])||a>=t)throw new i("Invalid base-"+t+" digit "+r.text);for(var n;null!=(n=Ya[e.future().text])&&n<t;)a*=t,a+=n,e.popToken()}return"\\@char{"+a+"}"});var Xa=(e,t,r,a)=>{var n=e.consumeArg().tokens;if(1!==n.length)throw new i("\\newcommand's first argument must be a macro name");var o=n[0].text,s=e.isDefined(o);if(s&&!t)throw new i("\\newcommand{"+o+"} attempting to redefine "+o+"; use \\renewcommand");if(!s&&!r)throw new i("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var l=0;if(1===(n=e.consumeArg().tokens).length&&"["===n[0].text){for(var h="",m=e.expandNextToken();"]"!==m.text&&"EOF"!==m.text;)h+=m.text,m=e.expandNextToken();if(!h.match(/^\s*[0-9]+\s*$/))throw new i("Invalid number of arguments: "+h);l=parseInt(h),n=e.consumeArg().tokens}return s&&a||e.macros.set(o,{tokens:n,numArgs:l}),""};Zr("\\newcommand",e=>Xa(e,!1,!0,!1)),Zr("\\renewcommand",e=>Xa(e,!0,!1,!1)),Zr("\\providecommand",e=>Xa(e,!0,!0,!0)),Zr("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join("")),""}),Zr("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join("")),""}),Zr("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Na[r],se.math[r],se.text[r]),""}),Zr("\\bgroup","{"),Zr("\\egroup","}"),Zr("~","\\nobreakspace"),Zr("\\lq","`"),Zr("\\rq","'"),Zr("\\aa","\\r a"),Zr("\\AA","\\r A"),Zr("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Zr("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Zr("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Zr("ℬ","\\mathscr{B}"),Zr("ℰ","\\mathscr{E}"),Zr("ℱ","\\mathscr{F}"),Zr("ℋ","\\mathscr{H}"),Zr("ℐ","\\mathscr{I}"),Zr("ℒ","\\mathscr{L}"),Zr("ℳ","\\mathscr{M}"),Zr("ℛ","\\mathscr{R}"),Zr("ℭ","\\mathfrak{C}"),Zr("ℌ","\\mathfrak{H}"),Zr("ℨ","\\mathfrak{Z}"),Zr("\\Bbbk","\\Bbb{k}"),Zr("·","\\cdotp"),Zr("\\llap","\\mathllap{\\textrm{#1}}"),Zr("\\rlap","\\mathrlap{\\textrm{#1}}"),Zr("\\clap","\\mathclap{\\textrm{#1}}"),Zr("\\mathstrut","\\vphantom{(}"),Zr("\\underbar","\\underline{\\text{#1}}"),Zr("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}'),Zr("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Zr("\\ne","\\neq"),Zr("≠","\\neq"),Zr("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Zr("∉","\\notin"),Zr("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Zr("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Zr("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Zr("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Zr("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Zr("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Zr("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Zr("⟂","\\perp"),Zr("‼","\\mathclose{!\\mkern-0.8mu!}"),Zr("∌","\\notni"),Zr("⌜","\\ulcorner"),Zr("⌝","\\urcorner"),Zr("⌞","\\llcorner"),Zr("⌟","\\lrcorner"),Zr("©","\\copyright"),Zr("®","\\textregistered"),Zr("️","\\textregistered"),Zr("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Zr("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Zr("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Zr("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Zr("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Zr("⋮","\\vdots"),Zr("\\varGamma","\\mathit{\\Gamma}"),Zr("\\varDelta","\\mathit{\\Delta}"),Zr("\\varTheta","\\mathit{\\Theta}"),Zr("\\varLambda","\\mathit{\\Lambda}"),Zr("\\varXi","\\mathit{\\Xi}"),Zr("\\varPi","\\mathit{\\Pi}"),Zr("\\varSigma","\\mathit{\\Sigma}"),Zr("\\varUpsilon","\\mathit{\\Upsilon}"),Zr("\\varPhi","\\mathit{\\Phi}"),Zr("\\varPsi","\\mathit{\\Psi}"),Zr("\\varOmega","\\mathit{\\Omega}"),Zr("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Zr("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Zr("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Zr("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Zr("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Zr("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),Zr("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),Zr("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var _a={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},ja=new Set(["bin","rel"]);Zr("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in _a?t=_a[r]:("\\not"===r.slice(0,4)||r in se.math&&ja.has(se.math[r].group))&&(t="\\dotsb"),t});var $a={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Zr("\\dotso",function(e){return e.future().text in $a?"\\ldots\\,":"\\ldots"}),Zr("\\dotsc",function(e){var t=e.future().text;return t in $a&&","!==t?"\\ldots\\,":"\\ldots"}),Zr("\\cdots",function(e){return e.future().text in $a?"\\@cdots\\,":"\\@cdots"}),Zr("\\dotsb","\\cdots"),Zr("\\dotsm","\\cdots"),Zr("\\dotsi","\\!\\cdots"),Zr("\\dotsx","\\ldots\\,"),Zr("\\DOTSI","\\relax"),Zr("\\DOTSB","\\relax"),Zr("\\DOTSX","\\relax"),Zr("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Zr("\\,","\\tmspace+{3mu}{.1667em}"),Zr("\\thinspace","\\,"),Zr("\\>","\\mskip{4mu}"),Zr("\\:","\\tmspace+{4mu}{.2222em}"),Zr("\\medspace","\\:"),Zr("\\;","\\tmspace+{5mu}{.2777em}"),Zr("\\thickspace","\\;"),Zr("\\!","\\tmspace-{3mu}{.1667em}"),Zr("\\negthinspace","\\!"),Zr("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Zr("\\negthickspace","\\tmspace-{5mu}{.277em}"),Zr("\\enspace","\\kern.5em "),Zr("\\enskip","\\hskip.5em\\relax"),Zr("\\quad","\\hskip1em\\relax"),Zr("\\qquad","\\hskip2em\\relax"),Zr("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Zr("\\tag@paren","\\tag@literal{({#1})}"),Zr("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new i("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),Zr("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Zr("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Zr("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Zr("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Zr("\\newline","\\\\\\relax"),Zr("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Za=W(I["Main-Regular"]["T".charCodeAt(0)][1]-.7*I["Main-Regular"]["A".charCodeAt(0)][1]);Zr("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Za+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Zr("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Za+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Zr("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Zr("\\@hspace","\\hskip #1\\relax"),Zr("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Zr("\\ordinarycolon",":"),Zr("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Zr("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Zr("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Zr("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Zr("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Zr("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Zr("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Zr("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Zr("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Zr("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Zr("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Zr("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Zr("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Zr("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Zr("∷","\\dblcolon"),Zr("∹","\\eqcolon"),Zr("≔","\\coloneqq"),Zr("≕","\\eqqcolon"),Zr("⩴","\\Coloneqq"),Zr("\\ratio","\\vcentcolon"),Zr("\\coloncolon","\\dblcolon"),Zr("\\colonequals","\\coloneqq"),Zr("\\coloncolonequals","\\Coloneqq"),Zr("\\equalscolon","\\eqqcolon"),Zr("\\equalscoloncolon","\\Eqqcolon"),Zr("\\colonminus","\\coloneq"),Zr("\\coloncolonminus","\\Coloneq"),Zr("\\minuscolon","\\eqcolon"),Zr("\\minuscoloncolon","\\Eqcolon"),Zr("\\coloncolonapprox","\\Colonapprox"),Zr("\\coloncolonsim","\\Colonsim"),Zr("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Zr("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Zr("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Zr("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Zr("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Zr("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Zr("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Zr("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Zr("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Zr("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Zr("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Zr("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Zr("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Zr("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Zr("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Zr("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Zr("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Zr("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Zr("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Zr("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Zr("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Zr("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Zr("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Zr("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Zr("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Zr("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Zr("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Zr("\\imath","\\html@mathml{\\@imath}{ı}"),Zr("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Zr("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Zr("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Zr("⟦","\\llbracket"),Zr("⟧","\\rrbracket"),Zr("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Zr("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Zr("⦃","\\lBrace"),Zr("⦄","\\rBrace"),Zr("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Zr("⦵","\\minuso"),Zr("\\darr","\\downarrow"),Zr("\\dArr","\\Downarrow"),Zr("\\Darr","\\Downarrow"),Zr("\\lang","\\langle"),Zr("\\rang","\\rangle"),Zr("\\uarr","\\uparrow"),Zr("\\uArr","\\Uparrow"),Zr("\\Uarr","\\Uparrow"),Zr("\\N","\\mathbb{N}"),Zr("\\R","\\mathbb{R}"),Zr("\\Z","\\mathbb{Z}"),Zr("\\alef","\\aleph"),Zr("\\alefsym","\\aleph"),Zr("\\Alpha","\\mathrm{A}"),Zr("\\Beta","\\mathrm{B}"),Zr("\\bull","\\bullet"),Zr("\\Chi","\\mathrm{X}"),Zr("\\clubs","\\clubsuit"),Zr("\\cnums","\\mathbb{C}"),Zr("\\Complex","\\mathbb{C}"),Zr("\\Dagger","\\ddagger"),Zr("\\diamonds","\\diamondsuit"),Zr("\\empty","\\emptyset"),Zr("\\Epsilon","\\mathrm{E}"),Zr("\\Eta","\\mathrm{H}"),Zr("\\exist","\\exists"),Zr("\\harr","\\leftrightarrow"),Zr("\\hArr","\\Leftrightarrow"),Zr("\\Harr","\\Leftrightarrow"),Zr("\\hearts","\\heartsuit"),Zr("\\image","\\Im"),Zr("\\infin","\\infty"),Zr("\\Iota","\\mathrm{I}"),Zr("\\isin","\\in"),Zr("\\Kappa","\\mathrm{K}"),Zr("\\larr","\\leftarrow"),Zr("\\lArr","\\Leftarrow"),Zr("\\Larr","\\Leftarrow"),Zr("\\lrarr","\\leftrightarrow"),Zr("\\lrArr","\\Leftrightarrow"),Zr("\\Lrarr","\\Leftrightarrow"),Zr("\\Mu","\\mathrm{M}"),Zr("\\natnums","\\mathbb{N}"),Zr("\\Nu","\\mathrm{N}"),Zr("\\Omicron","\\mathrm{O}"),Zr("\\plusmn","\\pm"),Zr("\\rarr","\\rightarrow"),Zr("\\rArr","\\Rightarrow"),Zr("\\Rarr","\\Rightarrow"),Zr("\\real","\\Re"),Zr("\\reals","\\mathbb{R}"),Zr("\\Reals","\\mathbb{R}"),Zr("\\Rho","\\mathrm{P}"),Zr("\\sdot","\\cdot"),Zr("\\sect","\\S"),Zr("\\spades","\\spadesuit"),Zr("\\sub","\\subset"),Zr("\\sube","\\subseteq"),Zr("\\supe","\\supseteq"),Zr("\\Tau","\\mathrm{T}"),Zr("\\thetasym","\\vartheta"),Zr("\\weierp","\\wp"),Zr("\\Zeta","\\mathrm{Z}"),Zr("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Zr("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Zr("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Zr("\\bra","\\mathinner{\\langle{#1}|}"),Zr("\\ket","\\mathinner{|{#1}\\rangle}"),Zr("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Zr("\\Bra","\\left\\langle#1\\right|"),Zr("\\Ket","\\left|#1\\right\\rangle");var Ka=e=>t=>{var r=t.consumeArg().tokens,a=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=t=>r=>{e&&(r.macros.set("|",o),n.length&&r.macros.set("\\|",s));var i=t;return!t&&n.length&&"|"===r.future().text&&(r.popToken(),i=!0),{tokens:i?n:a,numArgs:0}};t.macros.set("|",l(!1)),n.length&&t.macros.set("\\|",l(!0));var h=t.consumeArg().tokens,m=t.expandTokens([...i,...h,...r]);return t.macros.endGroup(),{tokens:m.reverse(),numArgs:0}};Zr("\\bra@ket",Ka(!1)),Zr("\\bra@set",Ka(!0)),Zr("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Zr("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Zr("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Zr("\\angln","{\\angl n}"),Zr("\\blue","\\textcolor{##6495ed}{#1}"),Zr("\\orange","\\textcolor{##ffa500}{#1}"),Zr("\\pink","\\textcolor{##ff00af}{#1}"),Zr("\\red","\\textcolor{##df0030}{#1}"),Zr("\\green","\\textcolor{##28ae7b}{#1}"),Zr("\\gray","\\textcolor{gray}{#1}"),Zr("\\purple","\\textcolor{##9d38bd}{#1}"),Zr("\\blueA","\\textcolor{##ccfaff}{#1}"),Zr("\\blueB","\\textcolor{##80f6ff}{#1}"),Zr("\\blueC","\\textcolor{##63d9ea}{#1}"),Zr("\\blueD","\\textcolor{##11accd}{#1}"),Zr("\\blueE","\\textcolor{##0c7f99}{#1}"),Zr("\\tealA","\\textcolor{##94fff5}{#1}"),Zr("\\tealB","\\textcolor{##26edd5}{#1}"),Zr("\\tealC","\\textcolor{##01d1c1}{#1}"),Zr("\\tealD","\\textcolor{##01a995}{#1}"),Zr("\\tealE","\\textcolor{##208170}{#1}"),Zr("\\greenA","\\textcolor{##b6ffb0}{#1}"),Zr("\\greenB","\\textcolor{##8af281}{#1}"),Zr("\\greenC","\\textcolor{##74cf70}{#1}"),Zr("\\greenD","\\textcolor{##1fab54}{#1}"),Zr("\\greenE","\\textcolor{##0d923f}{#1}"),Zr("\\goldA","\\textcolor{##ffd0a9}{#1}"),Zr("\\goldB","\\textcolor{##ffbb71}{#1}"),Zr("\\goldC","\\textcolor{##ff9c39}{#1}"),Zr("\\goldD","\\textcolor{##e07d10}{#1}"),Zr("\\goldE","\\textcolor{##a75a05}{#1}"),Zr("\\redA","\\textcolor{##fca9a9}{#1}"),Zr("\\redB","\\textcolor{##ff8482}{#1}"),Zr("\\redC","\\textcolor{##f9685d}{#1}"),Zr("\\redD","\\textcolor{##e84d39}{#1}"),Zr("\\redE","\\textcolor{##bc2612}{#1}"),Zr("\\maroonA","\\textcolor{##ffbde0}{#1}"),Zr("\\maroonB","\\textcolor{##ff92c6}{#1}"),Zr("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Zr("\\maroonD","\\textcolor{##ca337c}{#1}"),Zr("\\maroonE","\\textcolor{##9e034e}{#1}"),Zr("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Zr("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Zr("\\purpleC","\\textcolor{##aa87ff}{#1}"),Zr("\\purpleD","\\textcolor{##7854ab}{#1}"),Zr("\\purpleE","\\textcolor{##543b78}{#1}"),Zr("\\mintA","\\textcolor{##f5f9e8}{#1}"),Zr("\\mintB","\\textcolor{##edf2df}{#1}"),Zr("\\mintC","\\textcolor{##e0e5cc}{#1}"),Zr("\\grayA","\\textcolor{##f6f7f7}{#1}"),Zr("\\grayB","\\textcolor{##f0f1f2}{#1}"),Zr("\\grayC","\\textcolor{##e3e5e6}{#1}"),Zr("\\grayD","\\textcolor{##d6d8da}{#1}"),Zr("\\grayE","\\textcolor{##babec2}{#1}"),Zr("\\grayF","\\textcolor{##888d93}{#1}"),Zr("\\grayG","\\textcolor{##626569}{#1}"),Zr("\\grayH","\\textcolor{##3b3e40}{#1}"),Zr("\\grayI","\\textcolor{##21242c}{#1}"),Zr("\\kaBlue","\\textcolor{##314453}{#1}"),Zr("\\kaGreen","\\textcolor{##71B307}{#1}");var Ja={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Qa{constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Ua(Wa,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Ga(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,r,i;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:i,end:r}=this.consumeArg(["]"]))}else({tokens:i,start:t,end:r}=this.consumeArg());return this.pushToken(new n("EOF",r.loc)),this.pushTokens(i),new n("",a.range(t,r))}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var a,n=this.future(),o=0,s=0;do{if(a=this.popToken(),t.push(a),"{"===a.text)++o;else if("}"===a.text){if(-1===--o)throw new i("Extra }",a)}else if("EOF"===a.text)throw new i("Unexpected end of input in a macro argument, expected '"+(e&&r?e[s]:"}")+"'",a);if(e&&r)if((0===o||1===o&&"{"===e[s])&&a.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==o||r);return"{"===n.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:a}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new i("The length of delimiters doesn't match the number of args!");for(var r=t[0],a=0;a<r.length;a++){var n=this.popToken();if(r[a]!==n.text)throw new i("Use of the macro doesn't match its definition",n)}}for(var o=[],s=0;s<e;s++)o.push(this.consumeArg(t&&t[s+1]).tokens);return o}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new i("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,a=t.noexpand?null:this._getExpansion(r);if(null==a||e&&a.unexpandable){if(e&&null==a&&"\\"===r[0]&&!this.isDefined(r))throw new i("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var n=a.tokens,o=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs)for(var s=(n=n.slice()).length-1;s>=0;--s){var l=n[s];if("#"===l.text){if(0===s)throw new i("Incomplete placeholder at end of macro body",l);if("#"===(l=n[--s]).text)n.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new i("Not a valid argument number",l);n.splice(s,2,...o[+l.text-1])}}}return this.pushTokens(n),n.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new n(e)]):void 0}expandTokens(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){var a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),t.push(a)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map(e=>e.text).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var a="function"==typeof t?t(this):t;if("string"==typeof a){var n=0;if(a.includes("#"))for(var i=a.replace(/##/g,"");i.includes("#"+(n+1));)++n;for(var o=new Ga(a,this.settings),s=[],l=o.lex();"EOF"!==l.text;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:n}}return a}isDefined(e){return this.macros.has(e)||Na.hasOwnProperty(e)||se.math.hasOwnProperty(e)||se.text.hasOwnProperty(e)||Ja.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Na.hasOwnProperty(e)&&!Na[e].primitive}}var en=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,tn=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9",ₐ:"a",ₑ:"e",ₕ:"h",ᵢ:"i",ⱼ:"j",ₖ:"k",ₗ:"l",ₘ:"m",ₙ:"n",ₒ:"o",ₚ:"p",ᵣ:"r",ₛ:"s",ₜ:"t",ᵤ:"u",ᵥ:"v",ₓ:"x",ᵦ:"β",ᵧ:"γ",ᵨ:"ρ",ᵩ:"ϕ",ᵪ:"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9",ᴬ:"A",ᴮ:"B",ᴰ:"D",ᴱ:"E",ᴳ:"G",ᴴ:"H",ᴵ:"I",ᴶ:"J",ᴷ:"K",ᴸ:"L",ᴹ:"M",ᴺ:"N",ᴼ:"O",ᴾ:"P",ᴿ:"R",ᵀ:"T",ᵁ:"U",ⱽ:"V",ᵂ:"W",ᵃ:"a",ᵇ:"b",ᶜ:"c",ᵈ:"d",ᵉ:"e",ᶠ:"f",ᵍ:"g",ʰ:"h",ⁱ:"i",ʲ:"j",ᵏ:"k",ˡ:"l",ᵐ:"m",ⁿ:"n",ᵒ:"o",ᵖ:"p",ʳ:"r",ˢ:"s",ᵗ:"t",ᵘ:"u",ᵛ:"v",ʷ:"w",ˣ:"x",ʸ:"y",ᶻ:"z",ᵝ:"β",ᵞ:"γ",ᵟ:"δ",ᵠ:"ϕ",ᵡ:"χ",ᶿ:"θ"}),rn={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},an={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class nn{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Qa(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new i("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new n("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(nn.endOfExpression.has(a.text))break;if(t&&a.text===t)break;if(e&&Na[a.text]&&Na[a.text].infix)break;var n=this.parseAtom(t);if(!n)break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r=-1,a=0;a<e.length;a++)if("infix"===e[a].type){if(-1!==r)throw new i("only one infix operator per group",e[a].token);r=a,t=e[a].replaceWith}if(-1!==r&&t){var n,o,s=e.slice(0,r),l=e.slice(r+1);return n=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},o=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},["\\\\abovefrac"===t?this.callFunction(t,[n,e[r],o],[]):this.callFunction(t,[n,o],[])]}return e}handleSupSubscript(e){var t,r=this.fetch(),a=r.text;this.consume(),this.consumeSpaces();do{var n;t=this.parseGroup(e)}while("internal"===(null==(n=t)?void 0:n.type));if(!t)throw new i("Expected group after '"+a+"'",r);return t}formatUnsupportedCmd(e){for(var t=[],r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});var a={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[a]}}parseAtom(e){var t,r,a=this.parseGroup("atom",e);if("internal"===(null==a?void 0:a.type))return a;if("text"===this.mode)return a;for(;;){this.consumeSpaces();var o=this.fetch();if("\\limits"===o.text||"\\nolimits"===o.text){if(a&&"op"===a.type){var s="\\limits"===o.text;a.limits=s,a.alwaysHandleSupSub=!0}else{if(!a||"operatorname"!==a.type)throw new i("Limit controls must follow a math operator",o);a.alwaysHandleSupSub&&(a.limits="\\limits"===o.text)}this.consume()}else if("^"===o.text){if(t)throw new i("Double superscript",o);t=this.handleSupSubscript("superscript")}else if("_"===o.text){if(r)throw new i("Double subscript",o);r=this.handleSupSubscript("subscript")}else if("'"===o.text){if(t)throw new i("Double superscript",o);var l={type:"textord",mode:this.mode,text:"\\prime"},h=[l];for(this.consume();"'"===this.fetch().text;)h.push(l),this.consume();"^"===this.fetch().text&&h.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:h}}else{if(!tn[o.text])break;var m=en.test(o.text),c=[];for(c.push(new n(tn[o.text])),this.consume();;){var u=this.fetch().text;if(!tn[u])break;if(en.test(u)!==m)break;c.unshift(new n(tn[u])),this.consume()}var p=this.subparse(c);m?r={type:"ordgroup",mode:"math",body:p}:t={type:"ordgroup",mode:"math",body:p}}}return t||r?{type:"supsub",mode:this.mode,base:a,sup:t,sub:r}:a}parseFunction(e,t){var r=this.fetch(),a=r.text,n=Na[a];if(!n)return null;if(this.consume(),t&&"atom"!==t&&!n.allowedInArgument)throw new i("Got function '"+a+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!n.allowedInText)throw new i("Can't use function '"+a+"' in text mode",r);if("math"===this.mode&&!1===n.allowedInMath)throw new i("Can't use function '"+a+"' in math mode",r);var{args:o,optArgs:s}=this.parseArguments(a,n);return this.callFunction(a,o,s,r,e)}callFunction(e,t,r,a,n){var o={funcName:e,parser:this,token:a,breakOnTokenText:n},s=Na[e];if(s&&s.handler)return s.handler(o,t,r);throw new i("No function handler for "+e)}parseArguments(e,t){var r=t.numArgs+t.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};for(var a=[],n=[],o=0;o<r;o++){var s=t.argTypes&&t.argTypes[o],l=o<t.numOptionalArgs;(t.primitive&&null==s||"sqrt"===t.type&&1===o&&null==n[0])&&(s="primitive");var h=this.parseGroupOfType("argument to '"+e+"'",s,l);if(l)n.push(h);else{if(null==h)throw new i("Null argument, please report this as a bug");a.push(h)}}return{args:a,optArgs:n}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":var a=this.parseArgumentGroup(r,"text");return null!=a?{type:"styling",mode:a.mode,body:[a],style:"text"}:null;case"raw":var n=this.parseStringGroup("raw",r);return null!=n?{type:"raw",mode:"text",string:n.text}:null;case"primitive":if(r)throw new i("A primitive argument cannot be optional");var o=this.parseGroup(e);if(null==o)throw new i("Expected group as "+e,this.fetch());return o;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new i("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var r=this.gullet.scanArgument(t);if(null==r)return null;for(var a,n="";"EOF"!==(a=this.fetch()).text;)n+=a.text,this.consume();return this.consume(),r.text=n,r}parseRegexGroup(e,t){for(var r,a=this.fetch(),n=a,o="";"EOF"!==(r=this.fetch()).text&&e.test(o+r.text);)o+=(n=r).text,this.consume();if(""===o)throw new i("Invalid "+t+": '"+a.text+"'",a);return a.range(n,o)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var r=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!r)throw new i("Invalid color: '"+t.text+"'",t);var a=r[0];return/^[0-9a-f]{6}$/i.test(a)&&(a="#"+a),{type:"color-token",mode:this.mode,color:a}}parseSizeGroup(e){var t,r=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",r=!0);var a=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!a)throw new i("Invalid size: '"+t.text+"'",t);var n={number:+(a[1]+a[2]),unit:a[3]};if(!G(n))throw new i("Invalid unit: '"+n.unit+"'",t);return{type:"size",mode:this.mode,value:n,isBlank:r}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var r=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(e,t){var r=this.gullet.scanArgument(e);if(null==r)return null;var a=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var n=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var i={type:"ordgroup",mode:this.mode,loc:r.loc,body:n};return t&&this.switchMode(a),i}parseGroup(e,t){var r,n=this.fetch(),o=n.text;if("{"===o||"\\begingroup"===o){this.consume();var s="{"===o?"}":"\\endgroup";this.gullet.beginGroup();var l=this.parseExpression(!1,s),h=this.fetch();this.expect(s),this.gullet.endGroup(),r={type:"ordgroup",mode:this.mode,loc:a.range(n,h),body:l,semisimple:"\\begingroup"===o||void 0}}else if(null==(r=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===o[0]&&!Ja.hasOwnProperty(o)){if(this.settings.throwOnError)throw new i("Undefined control sequence: "+o,n);r=this.formatUnsupportedCmd(o),this.consume()}return r}formLigatures(e){for(var t=e.length-1,r=0;r<t;++r){var n=e[r],i=n.text;"-"===i&&"-"===e[r+1].text&&(r+1<t&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:a.range(n,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:a.range(n,e[r+1]),text:"--"}),t-=1)),"'"!==i&&"`"!==i||e[r+1].text!==i||(e.splice(r,2,{type:"textord",mode:"text",loc:a.range(n,e[r+1]),text:i+i}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var r=t.slice(5),n="*"===r.charAt(0);if(n&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new i("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:r=r.slice(1,-1),star:n}}an.hasOwnProperty(t[0])&&!se[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=an[t[0]]+t.slice(1));var o,s=Va.exec(t);if(s&&("i"===(t=t.substring(0,s.index))?t="ı":"j"===t&&(t="ȷ")),se[this.mode][t]){this.settings.strict&&"math"===this.mode&&"ÐÞþ".includes(t)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var l,h=se[this.mode][t].group,m=a.range(e);if(ie.hasOwnProperty(h)){var c=h;l={type:"atom",mode:this.mode,family:c,loc:m,text:t}}else l={type:h,mode:this.mode,loc:m,text:t};o=l}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(B(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:a.range(e),text:t}}if(this.consume(),s)for(var u=0;u<s[0].length;u++){var p=s[0][u];if(!rn[p])throw new i("Unknown accent ' "+p+"'",e);var d=rn[p][this.mode]||rn[p].text;if(!d)throw new i("Accent "+p+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:a.range(e),label:d,isStretchy:!1,isShifty:!0,base:o}}return o}}nn.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var on=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new nn(e,t);delete r.gullet.macros.current["\\df@tag"];var a=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new i("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:r.subparse([new n("\\df@tag")])}]}return a},sn=function(e,t,r){t.textContent="";var a=hn(e,r).toNode();t.appendChild(a)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),sn=function(){throw new i("KaTeX doesn't work in quirks mode.")});var ln=function(e,t,r){if(r.throwOnError||!(e instanceof i))throw e;var a=je(["katex-error"],[new ee(t)]);return a.setAttribute("title",e.toString()),a.setAttribute("style","color:"+r.errorColor),a},hn=function(e,t){var r=new f(t);try{return function(e,t,r){var a,n=Wt(r);if("mathml"===r.output)return Ut(e,t,n,r.displayMode,!0);if("html"===r.output){var i=qt(e,n);a=je(["katex"],[i])}else{var o=Ut(e,t,n,r.displayMode,!1),s=qt(e,n);a=je(["katex"],[o,s])}return Yt(a,r)}(on(e,r),e,r)}catch(t){return ln(t,e,r)}},mn={version:"0.16.32",render:sn,renderToString:function(e,t){return hn(e,t).toMarkup()},ParseError:i,SETTINGS_SCHEMA:d,__parse:function(e,t){var r=new f(t);return on(e,r)},__renderToDomTree:hn,__renderToHTMLTree:function(e,t){var r=new f(t);try{return function(e,t,r){var a=qt(e,Wt(r)),n=je(["katex"],[a]);return Yt(n,r)}(on(e,r),0,r)}catch(t){return ln(t,e,r)}},__setFontMetrics:function(e,t){I[e]=t},__defineSymbol:le,__defineFunction:pt,__defineMacro:Zr,__domTree:{Span:Z,Anchor:K,SymbolNode:ee,SvgNode:te,PathNode:re,LineNode:ae}}}}]);1 "use strict";(globalThis.webpackChunkmindcat=globalThis.webpackChunkmindcat||[]).push([[130],{2130(e,t,r){r.d(t,{default:()=>mn});class a extends Error{constructor(e,t){var r,n,i="KaTeX parse error: "+e,o=t&&t.loc;if(o&&o.start<=o.end){var s=o.lexer.input;r=o.start,n=o.end,r===s.length?i+=" at end of input: ":i+=" at position "+(r+1)+": ";var l=s.slice(r,n).replace(/[^]/g,"$&̲");i+=(r>15?"…"+s.slice(r-15,r):s.slice(0,r))+l+(n+15<s.length?s.slice(n,n+15)+"…":s.slice(n))}super(i),this.name="ParseError",Object.setPrototypeOf(this,a.prototype),this.position=r,null!=r&&null!=n&&(this.length=n-r),this.rawMessage=e}}var n=/([A-Z])/g,i=e=>e.replace(n,"-$1").toLowerCase(),o={"&":"&",">":">","<":"<",'"':""","'":"'"},s=/[&><"']/g,l=e=>String(e).replace(s,e=>o[e]),h=e=>"ordgroup"===e.type||"color"===e.type?1===e.body.length?h(e.body[0]):e:"font"===e.type?h(e.body):e,m=new Set(["mathord","textord","atom"]),c=e=>m.has(h(e).type),u={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:["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:e=>Math.max(0,e),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:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function p(e){if("default"in e)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class d{constructor(e){for(var t of(void 0===e&&(e={}),e=e||{},Object.keys(u))){var r=u[t],a=e[t];this[t]=void 0!==a?r.processor?r.processor(a):a:p(r)}}reportNonstrict(e,t,r){var n=this.strict;if("function"==typeof n&&(n=n(e,t,r)),n&&"ignore"!==n){if(!0===n||"error"===n)throw new a("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===n?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){var a=this.strict;if("function"==typeof a)try{a=a(e,t,r)}catch(e){a="error"}return!(!a||"ignore"===a||!0!==a&&"error"!==a&&("warn"===a?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]"),1)))}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=(e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"})(e.url);if(null==t)return!1;e.protocol=t}var r="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(r)}}class g{constructor(e,t,r){this.id=e,this.size=t,this.cramped=r}sup(){return f[v[this.id]]}sub(){return f[b[this.id]]}fracNum(){return f[y[this.id]]}fracDen(){return f[x[this.id]]}cramp(){return f[w[this.id]]}text(){return f[k[this.id]]}isTight(){return this.size>=2}}var f=[new g(0,0,!1),new g(1,0,!0),new g(2,1,!1),new g(3,1,!0),new g(4,2,!1),new g(5,2,!0),new g(6,3,!1),new g(7,3,!0)],v=[4,5,4,5,6,7,6,7],b=[5,5,5,5,7,7,7,7],y=[2,3,4,5,6,7,6,7],x=[3,3,5,5,7,7,7,7],w=[1,1,3,3,5,5,7,7],k=[0,1,2,3,2,3,2,3],z={DISPLAY:f[0],TEXT:f[2],SCRIPT:f[4],SCRIPTSCRIPT:f[6]},S=[{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]]}],M=[];function A(e){for(var t=0;t<M.length;t+=2)if(e>=M[t]&&e<=M[t+1])return!0;return!1}S.forEach(e=>e.blocks.forEach(e=>M.push(...e)));var T={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class B{constructor(e){this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>e.toText()).join("")}}var q={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},C={ex:!0,em:!0,mu:!0},I=function(e){return"string"!=typeof e&&(e=e.unit),e in q||e in C||"ex"===e},H=function(e,t){var r;if(e.unit in q)r=q[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var n;if(n=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new a("Invalid unit: '"+e.unit+"'");r=n.fontMetrics().quad}n!==t&&(r*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},R=function(e){return+e.toFixed(4)+"em"},E=function(e){return e.filter(e=>e).join(" ")},N=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var a=t.getColor();a&&(this.style.color=a)}},O=function(e){var t=document.createElement(e);for(var r of(t.className=E(this.classes),Object.keys(this.style)))t.style[r]=this.style[r];for(var a of Object.keys(this.attributes))t.setAttribute(a,this.attributes[a]);for(var n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t},D=/[\s"'>/=\x00-\x1f]/,L=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+l(E(this.classes))+'"');var r="";for(var n of Object.keys(this.style))r+=i(n)+":"+this.style[n]+";";for(var o of(r&&(t+=' style="'+l(r)+'"'),Object.keys(this.attributes))){if(D.test(o))throw new a("Invalid attribute name '"+o+"'");t+=" "+o+'="'+l(this.attributes[o])+'"'}t+=">";for(var s=0;s<this.children.length;s++)t+=this.children[s].toMarkup();return t+"</"+e+">"};class P{constructor(e,t,r,a){N.call(this,e,r,a),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return O.call(this,"span")}toMarkup(){return L.call(this,"span")}}class V{constructor(e,t,r,a){N.call(this,t,a),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return O.call(this,"a")}toMarkup(){return L.call(this,"a")}}class F{constructor(e,t,r){this.alt=t,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=r}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");for(var t of(e.src=this.src,e.alt=this.alt,e.className="mord",Object.keys(this.style)))e.style[t]=this.style[t];return e}toMarkup(){var e='<img src="'+l(this.src)+'" alt="'+l(this.alt)+'"',t="";for(var r of Object.keys(this.style))t+=i(r)+":"+this.style[r]+";";return t&&(e+=' style="'+l(t)+'"'),e+"'/>"}}var G={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class U{constructor(e,t,r,a,n,i,o,s){this.text=e,this.height=t||0,this.depth=r||0,this.italic=a||0,this.skew=n||0,this.width=i||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<S.length;t++)for(var r=S[t],a=0;a<r.blocks.length;a++){var n=r.blocks[a];if(e>=n[0]&&e<=n[1])return r.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=G[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var r of(this.italic>0&&((t=document.createElement("span")).style.marginRight=R(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=E(this.classes)),Object.keys(this.style)))(t=t||document.createElement("span")).style[r]=this.style[r];return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=l(E(this.classes)),t+='"');var r="";for(var a of(this.italic>0&&(r+="margin-right:"+this.italic+"em;"),Object.keys(this.style)))r+=i(a)+":"+this.style[a]+";";r&&(e=!0,t+=' style="'+l(r)+'"');var n=l(this.text);return e?(t+=">",t+=n,t+="</span>"):n}}class Y{constructor(e,t){this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t of Object.keys(this.attributes))e+=" "+t+'="'+l(this.attributes[t])+'"';e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+"</svg>"}}class W{constructor(e,t){this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",T[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+l(this.alternate)+'"/>':'<path d="'+l(T[this.pathName])+'"/>'}}class X{constructor(e){this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="<line";for(var t of Object.keys(this.attributes))e+=" "+t+'="'+l(this.attributes[t])+'"';return e+"/>"}}var j={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},_={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},$={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Z(e,t,r){if(!j[t])throw new Error("Font metrics not found for font: "+t+".");var a=e.charCodeAt(0),n=j[t][a];if(!n&&e[0]in $&&(a=$[e[0]].charCodeAt(0),n=j[t][a]),n||"text"!==r||A(a)&&(n=j[t][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var K={},J={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Q={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ee={math:{},text:{}};function te(e,t,r,a,n,i){ee[e][n]={font:t,group:r,replace:a},i&&a&&(ee[e][a]=ee[e][n])}var re="math",ae="text",ne="main",ie="ams",oe="accent-token",se="bin",le="close",he="inner",me="mathord",ce="op-token",ue="open",pe="punct",de="rel",ge="spacing",fe="textord";te(re,ne,de,"≡","\\equiv",!0),te(re,ne,de,"≺","\\prec",!0),te(re,ne,de,"≻","\\succ",!0),te(re,ne,de,"∼","\\sim",!0),te(re,ne,de,"⊥","\\perp"),te(re,ne,de,"⪯","\\preceq",!0),te(re,ne,de,"⪰","\\succeq",!0),te(re,ne,de,"≃","\\simeq",!0),te(re,ne,de,"∣","\\mid",!0),te(re,ne,de,"≪","\\ll",!0),te(re,ne,de,"≫","\\gg",!0),te(re,ne,de,"≍","\\asymp",!0),te(re,ne,de,"∥","\\parallel"),te(re,ne,de,"⋈","\\bowtie",!0),te(re,ne,de,"⌣","\\smile",!0),te(re,ne,de,"⊑","\\sqsubseteq",!0),te(re,ne,de,"⊒","\\sqsupseteq",!0),te(re,ne,de,"≐","\\doteq",!0),te(re,ne,de,"⌢","\\frown",!0),te(re,ne,de,"∋","\\ni",!0),te(re,ne,de,"∝","\\propto",!0),te(re,ne,de,"⊢","\\vdash",!0),te(re,ne,de,"⊣","\\dashv",!0),te(re,ne,de,"∋","\\owns"),te(re,ne,pe,".","\\ldotp"),te(re,ne,pe,"⋅","\\cdotp"),te(re,ne,pe,"⋅","·"),te(ae,ne,fe,"⋅","·"),te(re,ne,fe,"#","\\#"),te(ae,ne,fe,"#","\\#"),te(re,ne,fe,"&","\\&"),te(ae,ne,fe,"&","\\&"),te(re,ne,fe,"ℵ","\\aleph",!0),te(re,ne,fe,"∀","\\forall",!0),te(re,ne,fe,"ℏ","\\hbar",!0),te(re,ne,fe,"∃","\\exists",!0),te(re,ne,fe,"∇","\\nabla",!0),te(re,ne,fe,"♭","\\flat",!0),te(re,ne,fe,"ℓ","\\ell",!0),te(re,ne,fe,"♮","\\natural",!0),te(re,ne,fe,"♣","\\clubsuit",!0),te(re,ne,fe,"℘","\\wp",!0),te(re,ne,fe,"♯","\\sharp",!0),te(re,ne,fe,"♢","\\diamondsuit",!0),te(re,ne,fe,"ℜ","\\Re",!0),te(re,ne,fe,"♡","\\heartsuit",!0),te(re,ne,fe,"ℑ","\\Im",!0),te(re,ne,fe,"♠","\\spadesuit",!0),te(re,ne,fe,"§","\\S",!0),te(ae,ne,fe,"§","\\S"),te(re,ne,fe,"¶","\\P",!0),te(ae,ne,fe,"¶","\\P"),te(re,ne,fe,"†","\\dag"),te(ae,ne,fe,"†","\\dag"),te(ae,ne,fe,"†","\\textdagger"),te(re,ne,fe,"‡","\\ddag"),te(ae,ne,fe,"‡","\\ddag"),te(ae,ne,fe,"‡","\\textdaggerdbl"),te(re,ne,le,"⎱","\\rmoustache",!0),te(re,ne,ue,"⎰","\\lmoustache",!0),te(re,ne,le,"⟯","\\rgroup",!0),te(re,ne,ue,"⟮","\\lgroup",!0),te(re,ne,se,"∓","\\mp",!0),te(re,ne,se,"⊖","\\ominus",!0),te(re,ne,se,"⊎","\\uplus",!0),te(re,ne,se,"⊓","\\sqcap",!0),te(re,ne,se,"∗","\\ast"),te(re,ne,se,"⊔","\\sqcup",!0),te(re,ne,se,"◯","\\bigcirc",!0),te(re,ne,se,"∙","\\bullet",!0),te(re,ne,se,"‡","\\ddagger"),te(re,ne,se,"≀","\\wr",!0),te(re,ne,se,"⨿","\\amalg"),te(re,ne,se,"&","\\And"),te(re,ne,de,"⟵","\\longleftarrow",!0),te(re,ne,de,"⇐","\\Leftarrow",!0),te(re,ne,de,"⟸","\\Longleftarrow",!0),te(re,ne,de,"⟶","\\longrightarrow",!0),te(re,ne,de,"⇒","\\Rightarrow",!0),te(re,ne,de,"⟹","\\Longrightarrow",!0),te(re,ne,de,"↔","\\leftrightarrow",!0),te(re,ne,de,"⟷","\\longleftrightarrow",!0),te(re,ne,de,"⇔","\\Leftrightarrow",!0),te(re,ne,de,"⟺","\\Longleftrightarrow",!0),te(re,ne,de,"↦","\\mapsto",!0),te(re,ne,de,"⟼","\\longmapsto",!0),te(re,ne,de,"↗","\\nearrow",!0),te(re,ne,de,"↩","\\hookleftarrow",!0),te(re,ne,de,"↪","\\hookrightarrow",!0),te(re,ne,de,"↘","\\searrow",!0),te(re,ne,de,"↼","\\leftharpoonup",!0),te(re,ne,de,"⇀","\\rightharpoonup",!0),te(re,ne,de,"↙","\\swarrow",!0),te(re,ne,de,"↽","\\leftharpoondown",!0),te(re,ne,de,"⇁","\\rightharpoondown",!0),te(re,ne,de,"↖","\\nwarrow",!0),te(re,ne,de,"⇌","\\rightleftharpoons",!0),te(re,ie,de,"≮","\\nless",!0),te(re,ie,de,"","\\@nleqslant"),te(re,ie,de,"","\\@nleqq"),te(re,ie,de,"⪇","\\lneq",!0),te(re,ie,de,"≨","\\lneqq",!0),te(re,ie,de,"","\\@lvertneqq"),te(re,ie,de,"⋦","\\lnsim",!0),te(re,ie,de,"⪉","\\lnapprox",!0),te(re,ie,de,"⊀","\\nprec",!0),te(re,ie,de,"⋠","\\npreceq",!0),te(re,ie,de,"⋨","\\precnsim",!0),te(re,ie,de,"⪹","\\precnapprox",!0),te(re,ie,de,"≁","\\nsim",!0),te(re,ie,de,"","\\@nshortmid"),te(re,ie,de,"∤","\\nmid",!0),te(re,ie,de,"⊬","\\nvdash",!0),te(re,ie,de,"⊭","\\nvDash",!0),te(re,ie,de,"⋪","\\ntriangleleft"),te(re,ie,de,"⋬","\\ntrianglelefteq",!0),te(re,ie,de,"⊊","\\subsetneq",!0),te(re,ie,de,"","\\@varsubsetneq"),te(re,ie,de,"⫋","\\subsetneqq",!0),te(re,ie,de,"","\\@varsubsetneqq"),te(re,ie,de,"≯","\\ngtr",!0),te(re,ie,de,"","\\@ngeqslant"),te(re,ie,de,"","\\@ngeqq"),te(re,ie,de,"⪈","\\gneq",!0),te(re,ie,de,"≩","\\gneqq",!0),te(re,ie,de,"","\\@gvertneqq"),te(re,ie,de,"⋧","\\gnsim",!0),te(re,ie,de,"⪊","\\gnapprox",!0),te(re,ie,de,"⊁","\\nsucc",!0),te(re,ie,de,"⋡","\\nsucceq",!0),te(re,ie,de,"⋩","\\succnsim",!0),te(re,ie,de,"⪺","\\succnapprox",!0),te(re,ie,de,"≆","\\ncong",!0),te(re,ie,de,"","\\@nshortparallel"),te(re,ie,de,"∦","\\nparallel",!0),te(re,ie,de,"⊯","\\nVDash",!0),te(re,ie,de,"⋫","\\ntriangleright"),te(re,ie,de,"⋭","\\ntrianglerighteq",!0),te(re,ie,de,"","\\@nsupseteqq"),te(re,ie,de,"⊋","\\supsetneq",!0),te(re,ie,de,"","\\@varsupsetneq"),te(re,ie,de,"⫌","\\supsetneqq",!0),te(re,ie,de,"","\\@varsupsetneqq"),te(re,ie,de,"⊮","\\nVdash",!0),te(re,ie,de,"⪵","\\precneqq",!0),te(re,ie,de,"⪶","\\succneqq",!0),te(re,ie,de,"","\\@nsubseteqq"),te(re,ie,se,"⊴","\\unlhd"),te(re,ie,se,"⊵","\\unrhd"),te(re,ie,de,"↚","\\nleftarrow",!0),te(re,ie,de,"↛","\\nrightarrow",!0),te(re,ie,de,"⇍","\\nLeftarrow",!0),te(re,ie,de,"⇏","\\nRightarrow",!0),te(re,ie,de,"↮","\\nleftrightarrow",!0),te(re,ie,de,"⇎","\\nLeftrightarrow",!0),te(re,ie,de,"△","\\vartriangle"),te(re,ie,fe,"ℏ","\\hslash"),te(re,ie,fe,"▽","\\triangledown"),te(re,ie,fe,"◊","\\lozenge"),te(re,ie,fe,"Ⓢ","\\circledS"),te(re,ie,fe,"®","\\circledR"),te(ae,ie,fe,"®","\\circledR"),te(re,ie,fe,"∡","\\measuredangle",!0),te(re,ie,fe,"∄","\\nexists"),te(re,ie,fe,"℧","\\mho"),te(re,ie,fe,"Ⅎ","\\Finv",!0),te(re,ie,fe,"⅁","\\Game",!0),te(re,ie,fe,"‵","\\backprime"),te(re,ie,fe,"▲","\\blacktriangle"),te(re,ie,fe,"▼","\\blacktriangledown"),te(re,ie,fe,"■","\\blacksquare"),te(re,ie,fe,"⧫","\\blacklozenge"),te(re,ie,fe,"★","\\bigstar"),te(re,ie,fe,"∢","\\sphericalangle",!0),te(re,ie,fe,"∁","\\complement",!0),te(re,ie,fe,"ð","\\eth",!0),te(ae,ne,fe,"ð","ð"),te(re,ie,fe,"╱","\\diagup"),te(re,ie,fe,"╲","\\diagdown"),te(re,ie,fe,"□","\\square"),te(re,ie,fe,"□","\\Box"),te(re,ie,fe,"◊","\\Diamond"),te(re,ie,fe,"¥","\\yen",!0),te(ae,ie,fe,"¥","\\yen",!0),te(re,ie,fe,"✓","\\checkmark",!0),te(ae,ie,fe,"✓","\\checkmark"),te(re,ie,fe,"ℶ","\\beth",!0),te(re,ie,fe,"ℸ","\\daleth",!0),te(re,ie,fe,"ℷ","\\gimel",!0),te(re,ie,fe,"ϝ","\\digamma",!0),te(re,ie,fe,"ϰ","\\varkappa"),te(re,ie,ue,"┌","\\@ulcorner",!0),te(re,ie,le,"┐","\\@urcorner",!0),te(re,ie,ue,"└","\\@llcorner",!0),te(re,ie,le,"┘","\\@lrcorner",!0),te(re,ie,de,"≦","\\leqq",!0),te(re,ie,de,"⩽","\\leqslant",!0),te(re,ie,de,"⪕","\\eqslantless",!0),te(re,ie,de,"≲","\\lesssim",!0),te(re,ie,de,"⪅","\\lessapprox",!0),te(re,ie,de,"≊","\\approxeq",!0),te(re,ie,se,"⋖","\\lessdot"),te(re,ie,de,"⋘","\\lll",!0),te(re,ie,de,"≶","\\lessgtr",!0),te(re,ie,de,"⋚","\\lesseqgtr",!0),te(re,ie,de,"⪋","\\lesseqqgtr",!0),te(re,ie,de,"≑","\\doteqdot"),te(re,ie,de,"≓","\\risingdotseq",!0),te(re,ie,de,"≒","\\fallingdotseq",!0),te(re,ie,de,"∽","\\backsim",!0),te(re,ie,de,"⋍","\\backsimeq",!0),te(re,ie,de,"⫅","\\subseteqq",!0),te(re,ie,de,"⋐","\\Subset",!0),te(re,ie,de,"⊏","\\sqsubset",!0),te(re,ie,de,"≼","\\preccurlyeq",!0),te(re,ie,de,"⋞","\\curlyeqprec",!0),te(re,ie,de,"≾","\\precsim",!0),te(re,ie,de,"⪷","\\precapprox",!0),te(re,ie,de,"⊲","\\vartriangleleft"),te(re,ie,de,"⊴","\\trianglelefteq"),te(re,ie,de,"⊨","\\vDash",!0),te(re,ie,de,"⊪","\\Vvdash",!0),te(re,ie,de,"⌣","\\smallsmile"),te(re,ie,de,"⌢","\\smallfrown"),te(re,ie,de,"≏","\\bumpeq",!0),te(re,ie,de,"≎","\\Bumpeq",!0),te(re,ie,de,"≧","\\geqq",!0),te(re,ie,de,"⩾","\\geqslant",!0),te(re,ie,de,"⪖","\\eqslantgtr",!0),te(re,ie,de,"≳","\\gtrsim",!0),te(re,ie,de,"⪆","\\gtrapprox",!0),te(re,ie,se,"⋗","\\gtrdot"),te(re,ie,de,"⋙","\\ggg",!0),te(re,ie,de,"≷","\\gtrless",!0),te(re,ie,de,"⋛","\\gtreqless",!0),te(re,ie,de,"⪌","\\gtreqqless",!0),te(re,ie,de,"≖","\\eqcirc",!0),te(re,ie,de,"≗","\\circeq",!0),te(re,ie,de,"≜","\\triangleq",!0),te(re,ie,de,"∼","\\thicksim"),te(re,ie,de,"≈","\\thickapprox"),te(re,ie,de,"⫆","\\supseteqq",!0),te(re,ie,de,"⋑","\\Supset",!0),te(re,ie,de,"⊐","\\sqsupset",!0),te(re,ie,de,"≽","\\succcurlyeq",!0),te(re,ie,de,"⋟","\\curlyeqsucc",!0),te(re,ie,de,"≿","\\succsim",!0),te(re,ie,de,"⪸","\\succapprox",!0),te(re,ie,de,"⊳","\\vartriangleright"),te(re,ie,de,"⊵","\\trianglerighteq"),te(re,ie,de,"⊩","\\Vdash",!0),te(re,ie,de,"∣","\\shortmid"),te(re,ie,de,"∥","\\shortparallel"),te(re,ie,de,"≬","\\between",!0),te(re,ie,de,"⋔","\\pitchfork",!0),te(re,ie,de,"∝","\\varpropto"),te(re,ie,de,"◀","\\blacktriangleleft"),te(re,ie,de,"∴","\\therefore",!0),te(re,ie,de,"∍","\\backepsilon"),te(re,ie,de,"▶","\\blacktriangleright"),te(re,ie,de,"∵","\\because",!0),te(re,ie,de,"⋘","\\llless"),te(re,ie,de,"⋙","\\gggtr"),te(re,ie,se,"⊲","\\lhd"),te(re,ie,se,"⊳","\\rhd"),te(re,ie,de,"≂","\\eqsim",!0),te(re,ne,de,"⋈","\\Join"),te(re,ie,de,"≑","\\Doteq",!0),te(re,ie,se,"∔","\\dotplus",!0),te(re,ie,se,"∖","\\smallsetminus"),te(re,ie,se,"⋒","\\Cap",!0),te(re,ie,se,"⋓","\\Cup",!0),te(re,ie,se,"⩞","\\doublebarwedge",!0),te(re,ie,se,"⊟","\\boxminus",!0),te(re,ie,se,"⊞","\\boxplus",!0),te(re,ie,se,"⋇","\\divideontimes",!0),te(re,ie,se,"⋉","\\ltimes",!0),te(re,ie,se,"⋊","\\rtimes",!0),te(re,ie,se,"⋋","\\leftthreetimes",!0),te(re,ie,se,"⋌","\\rightthreetimes",!0),te(re,ie,se,"⋏","\\curlywedge",!0),te(re,ie,se,"⋎","\\curlyvee",!0),te(re,ie,se,"⊝","\\circleddash",!0),te(re,ie,se,"⊛","\\circledast",!0),te(re,ie,se,"⋅","\\centerdot"),te(re,ie,se,"⊺","\\intercal",!0),te(re,ie,se,"⋒","\\doublecap"),te(re,ie,se,"⋓","\\doublecup"),te(re,ie,se,"⊠","\\boxtimes",!0),te(re,ie,de,"⇢","\\dashrightarrow",!0),te(re,ie,de,"⇠","\\dashleftarrow",!0),te(re,ie,de,"⇇","\\leftleftarrows",!0),te(re,ie,de,"⇆","\\leftrightarrows",!0),te(re,ie,de,"⇚","\\Lleftarrow",!0),te(re,ie,de,"↞","\\twoheadleftarrow",!0),te(re,ie,de,"↢","\\leftarrowtail",!0),te(re,ie,de,"↫","\\looparrowleft",!0),te(re,ie,de,"⇋","\\leftrightharpoons",!0),te(re,ie,de,"↶","\\curvearrowleft",!0),te(re,ie,de,"↺","\\circlearrowleft",!0),te(re,ie,de,"↰","\\Lsh",!0),te(re,ie,de,"⇈","\\upuparrows",!0),te(re,ie,de,"↿","\\upharpoonleft",!0),te(re,ie,de,"⇃","\\downharpoonleft",!0),te(re,ne,de,"⊶","\\origof",!0),te(re,ne,de,"⊷","\\imageof",!0),te(re,ie,de,"⊸","\\multimap",!0),te(re,ie,de,"↭","\\leftrightsquigarrow",!0),te(re,ie,de,"⇉","\\rightrightarrows",!0),te(re,ie,de,"⇄","\\rightleftarrows",!0),te(re,ie,de,"↠","\\twoheadrightarrow",!0),te(re,ie,de,"↣","\\rightarrowtail",!0),te(re,ie,de,"↬","\\looparrowright",!0),te(re,ie,de,"↷","\\curvearrowright",!0),te(re,ie,de,"↻","\\circlearrowright",!0),te(re,ie,de,"↱","\\Rsh",!0),te(re,ie,de,"⇊","\\downdownarrows",!0),te(re,ie,de,"↾","\\upharpoonright",!0),te(re,ie,de,"⇂","\\downharpoonright",!0),te(re,ie,de,"⇝","\\rightsquigarrow",!0),te(re,ie,de,"⇝","\\leadsto"),te(re,ie,de,"⇛","\\Rrightarrow",!0),te(re,ie,de,"↾","\\restriction"),te(re,ne,fe,"‘","`"),te(re,ne,fe,"$","\\$"),te(ae,ne,fe,"$","\\$"),te(ae,ne,fe,"$","\\textdollar"),te(re,ne,fe,"%","\\%"),te(ae,ne,fe,"%","\\%"),te(re,ne,fe,"_","\\_"),te(ae,ne,fe,"_","\\_"),te(ae,ne,fe,"_","\\textunderscore"),te(re,ne,fe,"∠","\\angle",!0),te(re,ne,fe,"∞","\\infty",!0),te(re,ne,fe,"′","\\prime"),te(re,ne,fe,"△","\\triangle"),te(re,ne,fe,"Γ","\\Gamma",!0),te(re,ne,fe,"Δ","\\Delta",!0),te(re,ne,fe,"Θ","\\Theta",!0),te(re,ne,fe,"Λ","\\Lambda",!0),te(re,ne,fe,"Ξ","\\Xi",!0),te(re,ne,fe,"Π","\\Pi",!0),te(re,ne,fe,"Σ","\\Sigma",!0),te(re,ne,fe,"Υ","\\Upsilon",!0),te(re,ne,fe,"Φ","\\Phi",!0),te(re,ne,fe,"Ψ","\\Psi",!0),te(re,ne,fe,"Ω","\\Omega",!0),te(re,ne,fe,"A","Α"),te(re,ne,fe,"B","Β"),te(re,ne,fe,"E","Ε"),te(re,ne,fe,"Z","Ζ"),te(re,ne,fe,"H","Η"),te(re,ne,fe,"I","Ι"),te(re,ne,fe,"K","Κ"),te(re,ne,fe,"M","Μ"),te(re,ne,fe,"N","Ν"),te(re,ne,fe,"O","Ο"),te(re,ne,fe,"P","Ρ"),te(re,ne,fe,"T","Τ"),te(re,ne,fe,"X","Χ"),te(re,ne,fe,"¬","\\neg",!0),te(re,ne,fe,"¬","\\lnot"),te(re,ne,fe,"⊤","\\top"),te(re,ne,fe,"⊥","\\bot"),te(re,ne,fe,"∅","\\emptyset"),te(re,ie,fe,"∅","\\varnothing"),te(re,ne,me,"α","\\alpha",!0),te(re,ne,me,"β","\\beta",!0),te(re,ne,me,"γ","\\gamma",!0),te(re,ne,me,"δ","\\delta",!0),te(re,ne,me,"ϵ","\\epsilon",!0),te(re,ne,me,"ζ","\\zeta",!0),te(re,ne,me,"η","\\eta",!0),te(re,ne,me,"θ","\\theta",!0),te(re,ne,me,"ι","\\iota",!0),te(re,ne,me,"κ","\\kappa",!0),te(re,ne,me,"λ","\\lambda",!0),te(re,ne,me,"μ","\\mu",!0),te(re,ne,me,"ν","\\nu",!0),te(re,ne,me,"ξ","\\xi",!0),te(re,ne,me,"ο","\\omicron",!0),te(re,ne,me,"π","\\pi",!0),te(re,ne,me,"ρ","\\rho",!0),te(re,ne,me,"σ","\\sigma",!0),te(re,ne,me,"τ","\\tau",!0),te(re,ne,me,"υ","\\upsilon",!0),te(re,ne,me,"ϕ","\\phi",!0),te(re,ne,me,"χ","\\chi",!0),te(re,ne,me,"ψ","\\psi",!0),te(re,ne,me,"ω","\\omega",!0),te(re,ne,me,"ε","\\varepsilon",!0),te(re,ne,me,"ϑ","\\vartheta",!0),te(re,ne,me,"ϖ","\\varpi",!0),te(re,ne,me,"ϱ","\\varrho",!0),te(re,ne,me,"ς","\\varsigma",!0),te(re,ne,me,"φ","\\varphi",!0),te(re,ne,se,"∗","*",!0),te(re,ne,se,"+","+"),te(re,ne,se,"−","-",!0),te(re,ne,se,"⋅","\\cdot",!0),te(re,ne,se,"∘","\\circ",!0),te(re,ne,se,"÷","\\div",!0),te(re,ne,se,"±","\\pm",!0),te(re,ne,se,"×","\\times",!0),te(re,ne,se,"∩","\\cap",!0),te(re,ne,se,"∪","\\cup",!0),te(re,ne,se,"∖","\\setminus",!0),te(re,ne,se,"∧","\\land"),te(re,ne,se,"∨","\\lor"),te(re,ne,se,"∧","\\wedge",!0),te(re,ne,se,"∨","\\vee",!0),te(re,ne,fe,"√","\\surd"),te(re,ne,ue,"⟨","\\langle",!0),te(re,ne,ue,"∣","\\lvert"),te(re,ne,ue,"∥","\\lVert"),te(re,ne,le,"?","?"),te(re,ne,le,"!","!"),te(re,ne,le,"⟩","\\rangle",!0),te(re,ne,le,"∣","\\rvert"),te(re,ne,le,"∥","\\rVert"),te(re,ne,de,"=","="),te(re,ne,de,":",":"),te(re,ne,de,"≈","\\approx",!0),te(re,ne,de,"≅","\\cong",!0),te(re,ne,de,"≥","\\ge"),te(re,ne,de,"≥","\\geq",!0),te(re,ne,de,"←","\\gets"),te(re,ne,de,">","\\gt",!0),te(re,ne,de,"∈","\\in",!0),te(re,ne,de,"","\\@not"),te(re,ne,de,"⊂","\\subset",!0),te(re,ne,de,"⊃","\\supset",!0),te(re,ne,de,"⊆","\\subseteq",!0),te(re,ne,de,"⊇","\\supseteq",!0),te(re,ie,de,"⊈","\\nsubseteq",!0),te(re,ie,de,"⊉","\\nsupseteq",!0),te(re,ne,de,"⊨","\\models"),te(re,ne,de,"←","\\leftarrow",!0),te(re,ne,de,"≤","\\le"),te(re,ne,de,"≤","\\leq",!0),te(re,ne,de,"<","\\lt",!0),te(re,ne,de,"→","\\rightarrow",!0),te(re,ne,de,"→","\\to"),te(re,ie,de,"≱","\\ngeq",!0),te(re,ie,de,"≰","\\nleq",!0),te(re,ne,ge," ","\\ "),te(re,ne,ge," ","\\space"),te(re,ne,ge," ","\\nobreakspace"),te(ae,ne,ge," ","\\ "),te(ae,ne,ge," "," "),te(ae,ne,ge," ","\\space"),te(ae,ne,ge," ","\\nobreakspace"),te(re,ne,ge,null,"\\nobreak"),te(re,ne,ge,null,"\\allowbreak"),te(re,ne,pe,",",","),te(re,ne,pe,";",";"),te(re,ie,se,"⊼","\\barwedge",!0),te(re,ie,se,"⊻","\\veebar",!0),te(re,ne,se,"⊙","\\odot",!0),te(re,ne,se,"⊕","\\oplus",!0),te(re,ne,se,"⊗","\\otimes",!0),te(re,ne,fe,"∂","\\partial",!0),te(re,ne,se,"⊘","\\oslash",!0),te(re,ie,se,"⊚","\\circledcirc",!0),te(re,ie,se,"⊡","\\boxdot",!0),te(re,ne,se,"△","\\bigtriangleup"),te(re,ne,se,"▽","\\bigtriangledown"),te(re,ne,se,"†","\\dagger"),te(re,ne,se,"⋄","\\diamond"),te(re,ne,se,"⋆","\\star"),te(re,ne,se,"◃","\\triangleleft"),te(re,ne,se,"▹","\\triangleright"),te(re,ne,ue,"{","\\{"),te(ae,ne,fe,"{","\\{"),te(ae,ne,fe,"{","\\textbraceleft"),te(re,ne,le,"}","\\}"),te(ae,ne,fe,"}","\\}"),te(ae,ne,fe,"}","\\textbraceright"),te(re,ne,ue,"{","\\lbrace"),te(re,ne,le,"}","\\rbrace"),te(re,ne,ue,"[","\\lbrack",!0),te(ae,ne,fe,"[","\\lbrack",!0),te(re,ne,le,"]","\\rbrack",!0),te(ae,ne,fe,"]","\\rbrack",!0),te(re,ne,ue,"(","\\lparen",!0),te(re,ne,le,")","\\rparen",!0),te(ae,ne,fe,"<","\\textless",!0),te(ae,ne,fe,">","\\textgreater",!0),te(re,ne,ue,"⌊","\\lfloor",!0),te(re,ne,le,"⌋","\\rfloor",!0),te(re,ne,ue,"⌈","\\lceil",!0),te(re,ne,le,"⌉","\\rceil",!0),te(re,ne,fe,"\\","\\backslash"),te(re,ne,fe,"∣","|"),te(re,ne,fe,"∣","\\vert"),te(ae,ne,fe,"|","\\textbar",!0),te(re,ne,fe,"∥","\\|"),te(re,ne,fe,"∥","\\Vert"),te(ae,ne,fe,"∥","\\textbardbl"),te(ae,ne,fe,"~","\\textasciitilde"),te(ae,ne,fe,"\\","\\textbackslash"),te(ae,ne,fe,"^","\\textasciicircum"),te(re,ne,de,"↑","\\uparrow",!0),te(re,ne,de,"⇑","\\Uparrow",!0),te(re,ne,de,"↓","\\downarrow",!0),te(re,ne,de,"⇓","\\Downarrow",!0),te(re,ne,de,"↕","\\updownarrow",!0),te(re,ne,de,"⇕","\\Updownarrow",!0),te(re,ne,ce,"∐","\\coprod"),te(re,ne,ce,"⋁","\\bigvee"),te(re,ne,ce,"⋀","\\bigwedge"),te(re,ne,ce,"⨄","\\biguplus"),te(re,ne,ce,"⋂","\\bigcap"),te(re,ne,ce,"⋃","\\bigcup"),te(re,ne,ce,"∫","\\int"),te(re,ne,ce,"∫","\\intop"),te(re,ne,ce,"∬","\\iint"),te(re,ne,ce,"∭","\\iiint"),te(re,ne,ce,"∏","\\prod"),te(re,ne,ce,"∑","\\sum"),te(re,ne,ce,"⨂","\\bigotimes"),te(re,ne,ce,"⨁","\\bigoplus"),te(re,ne,ce,"⨀","\\bigodot"),te(re,ne,ce,"∮","\\oint"),te(re,ne,ce,"∯","\\oiint"),te(re,ne,ce,"∰","\\oiiint"),te(re,ne,ce,"⨆","\\bigsqcup"),te(re,ne,ce,"∫","\\smallint"),te(ae,ne,he,"…","\\textellipsis"),te(re,ne,he,"…","\\mathellipsis"),te(ae,ne,he,"…","\\ldots",!0),te(re,ne,he,"…","\\ldots",!0),te(re,ne,he,"⋯","\\@cdots",!0),te(re,ne,he,"⋱","\\ddots",!0),te(re,ne,fe,"⋮","\\varvdots"),te(ae,ne,fe,"⋮","\\varvdots"),te(re,ne,oe,"ˊ","\\acute"),te(re,ne,oe,"ˋ","\\grave"),te(re,ne,oe,"¨","\\ddot"),te(re,ne,oe,"~","\\tilde"),te(re,ne,oe,"ˉ","\\bar"),te(re,ne,oe,"˘","\\breve"),te(re,ne,oe,"ˇ","\\check"),te(re,ne,oe,"^","\\hat"),te(re,ne,oe,"⃗","\\vec"),te(re,ne,oe,"˙","\\dot"),te(re,ne,oe,"˚","\\mathring"),te(re,ne,me,"","\\@imath"),te(re,ne,me,"","\\@jmath"),te(re,ne,fe,"ı","ı"),te(re,ne,fe,"ȷ","ȷ"),te(ae,ne,fe,"ı","\\i",!0),te(ae,ne,fe,"ȷ","\\j",!0),te(ae,ne,fe,"ß","\\ss",!0),te(ae,ne,fe,"æ","\\ae",!0),te(ae,ne,fe,"œ","\\oe",!0),te(ae,ne,fe,"ø","\\o",!0),te(ae,ne,fe,"Æ","\\AE",!0),te(ae,ne,fe,"Œ","\\OE",!0),te(ae,ne,fe,"Ø","\\O",!0),te(ae,ne,oe,"ˊ","\\'"),te(ae,ne,oe,"ˋ","\\`"),te(ae,ne,oe,"ˆ","\\^"),te(ae,ne,oe,"˜","\\~"),te(ae,ne,oe,"ˉ","\\="),te(ae,ne,oe,"˘","\\u"),te(ae,ne,oe,"˙","\\."),te(ae,ne,oe,"¸","\\c"),te(ae,ne,oe,"˚","\\r"),te(ae,ne,oe,"ˇ","\\v"),te(ae,ne,oe,"¨",'\\"'),te(ae,ne,oe,"˝","\\H"),te(ae,ne,oe,"◯","\\textcircled");var ve={"--":!0,"---":!0,"``":!0,"''":!0};te(ae,ne,fe,"–","--",!0),te(ae,ne,fe,"–","\\textendash"),te(ae,ne,fe,"—","---",!0),te(ae,ne,fe,"—","\\textemdash"),te(ae,ne,fe,"‘","`",!0),te(ae,ne,fe,"‘","\\textquoteleft"),te(ae,ne,fe,"’","'",!0),te(ae,ne,fe,"’","\\textquoteright"),te(ae,ne,fe,"“","``",!0),te(ae,ne,fe,"“","\\textquotedblleft"),te(ae,ne,fe,"”","''",!0),te(ae,ne,fe,"”","\\textquotedblright"),te(re,ne,fe,"°","\\degree",!0),te(ae,ne,fe,"°","\\degree"),te(ae,ne,fe,"°","\\textdegree",!0),te(re,ne,fe,"£","\\pounds"),te(re,ne,fe,"£","\\mathsterling",!0),te(ae,ne,fe,"£","\\pounds"),te(ae,ne,fe,"£","\\textsterling",!0),te(re,ie,fe,"✠","\\maltese"),te(ae,ie,fe,"✠","\\maltese");for(var be=0;be<14;be++){var ye='0123456789/@."'.charAt(be);te(re,ne,fe,ye,ye)}for(var xe=0;xe<25;xe++){var we='0123456789!@*()-=+";:?/.,'.charAt(xe);te(ae,ne,fe,we,we)}for(var ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ze=0;ze<52;ze++){var Se=ke.charAt(ze);te(re,ne,me,Se,Se),te(ae,ne,fe,Se,Se)}te(re,ie,fe,"C","ℂ"),te(ae,ie,fe,"C","ℂ"),te(re,ie,fe,"H","ℍ"),te(ae,ie,fe,"H","ℍ"),te(re,ie,fe,"N","ℕ"),te(ae,ie,fe,"N","ℕ"),te(re,ie,fe,"P","ℙ"),te(ae,ie,fe,"P","ℙ"),te(re,ie,fe,"Q","ℚ"),te(ae,ie,fe,"Q","ℚ"),te(re,ie,fe,"R","ℝ"),te(ae,ie,fe,"R","ℝ"),te(re,ie,fe,"Z","ℤ"),te(ae,ie,fe,"Z","ℤ"),te(re,ne,me,"h","ℎ"),te(ae,ne,me,"h","ℎ");for(var Me="",Ae=0;Ae<52;Ae++){var Te=ke.charAt(Ae);te(re,ne,me,Te,Me=String.fromCharCode(55349,56320+Ae)),te(ae,ne,fe,Te,Me),te(re,ne,me,Te,Me=String.fromCharCode(55349,56372+Ae)),te(ae,ne,fe,Te,Me),te(re,ne,me,Te,Me=String.fromCharCode(55349,56424+Ae)),te(ae,ne,fe,Te,Me),te(re,ne,me,Te,Me=String.fromCharCode(55349,56580+Ae)),te(ae,ne,fe,Te,Me),te(re,ne,me,Te,Me=String.fromCharCode(55349,56684+Ae)),te(ae,ne,fe,Te,Me),te(re,ne,me,Te,Me=String.fromCharCode(55349,56736+Ae)),te(ae,ne,fe,Te,Me),te(re,ne,me,Te,Me=String.fromCharCode(55349,56788+Ae)),te(ae,ne,fe,Te,Me),te(re,ne,me,Te,Me=String.fromCharCode(55349,56840+Ae)),te(ae,ne,fe,Te,Me),te(re,ne,me,Te,Me=String.fromCharCode(55349,56944+Ae)),te(ae,ne,fe,Te,Me),Ae<26&&(te(re,ne,me,Te,Me=String.fromCharCode(55349,56632+Ae)),te(ae,ne,fe,Te,Me),te(re,ne,me,Te,Me=String.fromCharCode(55349,56476+Ae)),te(ae,ne,fe,Te,Me))}te(re,ne,me,"k",Me=String.fromCharCode(55349,56668)),te(ae,ne,fe,"k",Me);for(var Be=0;Be<10;Be++){var qe=Be.toString();te(re,ne,me,qe,Me=String.fromCharCode(55349,57294+Be)),te(ae,ne,fe,qe,Me),te(re,ne,me,qe,Me=String.fromCharCode(55349,57314+Be)),te(ae,ne,fe,qe,Me),te(re,ne,me,qe,Me=String.fromCharCode(55349,57324+Be)),te(ae,ne,fe,qe,Me),te(re,ne,me,qe,Me=String.fromCharCode(55349,57334+Be)),te(ae,ne,fe,qe,Me)}for(var Ce=0;Ce<3;Ce++){var Ie="ÐÞþ".charAt(Ce);te(re,ne,me,Ie,Ie),te(ae,ne,fe,Ie,Ie)}var He=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Re=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ee=function(e,t,r){if(ee[r][e]){var a=ee[r][e].replace;a&&(e=a)}return{value:e,metrics:Z(e,t,r)}},Ne=function(e,t,r,a,n){var i,o=Ee(e,t,r),s=o.metrics;if(e=o.value,s){var l=s.italic;("text"===r||a&&"mathit"===a.font)&&(l=0),i=new U(e,s.height,s.depth,l,s.skew,s.width,n)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),i=new U(e,0,0,0,0,0,n);if(a){i.maxFontSize=a.sizeMultiplier,a.style.isTight()&&i.classes.push("mtight");var h=a.getColor();h&&(i.style.color=h)}return i},Oe=function(e,t,r,a){return void 0===a&&(a=[]),"boldsymbol"===r.font&&Ee(e,"Main-Bold",t).metrics?Ne(e,"Main-Bold",t,r,a.concat(["mathbf"])):"\\"===e||"main"===ee[t][e].font?Ne(e,"Main-Regular",t,r,a):Ne(e,"AMS-Regular",t,r,a.concat(["amsrm"]))},De=function(e,t,r){var n=e.mode,i=e.text,o=["mord"],s="math"===n||"text"===n&&t.font,l=s?t.font:t.fontFamily,h="",m="";if(55349===i.charCodeAt(0)&&([h,m]=((e,t)=>{var r=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,n="math"===t?0:1;if(119808<=r&&r<120484){var i=Math.floor((r-119808)/26);return[He[i][2],He[i][n]]}if(120782<=r&&r<=120831){var o=Math.floor((r-120782)/10);return[Re[o][2],Re[o][n]]}if(120485===r||120486===r)return[He[0][2],He[0][n]];if(120486<r&&r<120782)return["",""];throw new a("Unsupported character: "+e)})(i,n)),h.length>0)return Ne(i,h,n,t,o.concat(m));if(l){var c,u;if("boldsymbol"===l){var p=function(e,t,r,a,n){return"textord"!==n&&Ee(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(i,n,0,0,r);c=p.fontName,u=[p.fontClass]}else s?(c=$e[l].fontName,u=[l]):(c=_e(l,t.fontWeight,t.fontShape),u=[l,t.fontWeight,t.fontShape]);if(Ee(i,c,n).metrics)return Ne(i,c,n,t,o.concat(u));if(ve.hasOwnProperty(i)&&"Typewriter"===c.slice(0,10)){for(var d=[],g=0;g<i.length;g++)d.push(Ne(i[g],c,n,t,o.concat(u)));return Ye(d)}}if("mathord"===r)return Ne(i,"Math-Italic",n,t,o.concat(["mathnormal"]));if("textord"===r){var f=ee[n][i]&&ee[n][i].font;if("ams"===f){var v=_e("amsrm",t.fontWeight,t.fontShape);return Ne(i,v,n,t,o.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==f&&f){var b=_e(f,t.fontWeight,t.fontShape);return Ne(i,b,n,t,o.concat(b,t.fontWeight,t.fontShape))}var y=_e("textrm",t.fontWeight,t.fontShape);return Ne(i,y,n,t,o.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+r+" in makeOrd")},Le=(e,t)=>{if(E(e.classes)!==E(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||0!==e.italic&&e.hasClass("mathnormal"))return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var a of Object.keys(e.style))if(e.style[a]!==t.style[a])return!1;for(var n of Object.keys(t.style))if(e.style[n]!==t.style[n])return!1;return!0},Pe=e=>{for(var t=0;t<e.length-1;t++){var r=e[t],a=e[t+1];r instanceof U&&a instanceof U&&Le(r,a)&&(r.text+=a.text,r.height=Math.max(r.height,a.height),r.depth=Math.max(r.depth,a.depth),r.italic=a.italic,e.splice(t+1,1),t--)}return e},Ve=function(e){for(var t=0,r=0,a=0,n=0;n<e.children.length;n++){var i=e.children[n];i.height>t&&(t=i.height),i.depth>r&&(r=i.depth),i.maxFontSize>a&&(a=i.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=a},Fe=function(e,t,r,a){var n=new P(e,t,r,a);return Ve(n),n},Ge=(e,t,r,a)=>new P(e,t,r,a),Ue=function(e,t,r){var a=Fe([e],[],t);return a.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),a.style.borderBottomWidth=R(a.height),a.maxFontSize=1,a},Ye=function(e){var t=new B(e);return Ve(t),t},We=function(e,t){return e instanceof B?Fe([],[e],t):e},Xe=function(e,t){for(var{children:r,depth:a}=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],a=-t[0].shift-t[0].elem.depth,n=a,i=1;i<t.length;i++){var o=-t[i].shift-n-t[i].elem.depth,s=o-(t[i-1].elem.height+t[i-1].elem.depth);n+=o,r.push({type:"kern",size:s}),r.push(t[i])}return{children:r,depth:a}}var l;if("top"===e.positionType){for(var h=e.positionData,m=0;m<e.children.length;m++){var c=e.children[m];h-="kern"===c.type?c.size:c.elem.height+c.elem.depth}l=h}else if("bottom"===e.positionType)l=-e.positionData;else{var u=e.children[0];if("elem"!==u.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-u.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-u.elem.depth}}return{children:e.children,depth:l}}(e),n=0,i=0;i<r.length;i++){var o=r[i];if("elem"===o.type){var s=o.elem;n=Math.max(n,s.maxFontSize,s.height)}}n+=2;var l=Fe(["pstrut"],[]);l.style.height=R(n);for(var h=[],m=a,c=a,u=a,p=0;p<r.length;p++){var d=r[p];if("kern"===d.type)u+=d.size;else{var g=d.elem,f=d.wrapperClasses||[],v=d.wrapperStyle||{},b=Fe(f,[l,g],void 0,v);b.style.top=R(-n-u-g.depth),d.marginLeft&&(b.style.marginLeft=d.marginLeft),d.marginRight&&(b.style.marginRight=d.marginRight),h.push(b),u+=g.height+g.depth}m=Math.min(m,u),c=Math.max(c,u)}var y,x=Fe(["vlist"],h);if(x.style.height=R(c),m<0){var w=Fe([],[]),k=Fe(["vlist"],[w]);k.style.height=R(-m);var z=Fe(["vlist-s"],[new U("")]);y=[Fe(["vlist-r"],[x,z]),Fe(["vlist-r"],[k])]}else y=[Fe(["vlist-r"],[x])];var S=Fe(["vlist-t"],y);return 2===y.length&&S.classes.push("vlist-t2"),S.height=c,S.depth=-m,S},je=(e,t)=>{var r=Fe(["mspace"],[],t),a=H(e,t);return r.style.marginRight=R(a),r},_e=function(e,t,r){var a="";switch(e){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=e}return a+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},$e={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ze={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Ke=function(e,t){var[r,a,n]=Ze[e],i=new W(r),o=new Y([i],{width:R(a),height:R(n),style:"width:"+R(a),viewBox:"0 0 "+1e3*a+" "+1e3*n,preserveAspectRatio:"xMinYMin"}),s=Ge(["overlay"],[o],t);return s.height=n,s.style.height=R(n),s.style.width=R(a),s},Je={number:3,unit:"mu"},Qe={number:4,unit:"mu"},et={number:5,unit:"mu"},tt={mord:{mop:Je,mbin:Qe,mrel:et,minner:Je},mop:{mord:Je,mop:Je,mrel:et,minner:Je},mbin:{mord:Qe,mop:Qe,mopen:Qe,minner:Qe},mrel:{mord:et,mop:et,mopen:et,minner:et},mopen:{},mclose:{mop:Je,mbin:Qe,mrel:et,minner:Je},mpunct:{mord:Je,mop:Je,mrel:et,mopen:Je,mclose:Je,mpunct:Je,minner:Je},minner:{mord:Je,mop:Je,mbin:Qe,mrel:et,mopen:Je,mpunct:Je,minner:Je}},rt={mord:{mop:Je},mop:{mord:Je,mop:Je},mbin:{},mrel:{},mopen:{},mclose:{mop:Je},mpunct:{},minner:{mop:Je}},at={},nt={},it={};function ot(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,s={type:t,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:void 0===a.allowedInMath||a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:n},l=0;l<r.length;++l)at[r[l]]=s;t&&(i&&(nt[t]=i),o&&(it[t]=o))}function st(e){var{type:t,htmlBuilder:r,mathmlBuilder:a}=e;ot({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:a})}var lt=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},ht=function(e){return"ordgroup"===e.type?e.body:[e]},mt=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),ct=new Set(["rightmost","mrel","mclose","mpunct"]),ut={display:z.DISPLAY,text:z.TEXT,script:z.SCRIPT,scriptscript:z.SCRIPTSCRIPT},pt={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},dt=function(e,t,r,a){void 0===a&&(a=[null,null]);for(var n=[],i=0;i<e.length;i++){var o=xt(e[i],t);if(o instanceof B){var s=o.children;n.push(...s)}else n.push(o)}if(Pe(n),!r)return n;var l=t;if(1===e.length){var h=e[0];"sizing"===h.type?l=t.havingSize(h.size):"styling"===h.type&&(l=t.havingStyle(ut[h.style]))}var m=Fe([a[0]||"leftmost"],[],t),c=Fe([a[1]||"rightmost"],[],t),u="root"===r;return gt(n,(e,t)=>{var r=t.classes[0],a=e.classes[0];"mbin"===r&&ct.has(a)?t.classes[0]="mord":"mbin"===a&&mt.has(r)&&(e.classes[0]="mord")},{node:m},c,u),gt(n,(e,t)=>{var r,a,n=bt(t),i=bt(e),o=n&&i?e.hasClass("mtight")?null==(r=rt[n])?void 0:r[i]:null==(a=tt[n])?void 0:a[i]:null;if(o)return je(o,l)},{node:m},c,u),n},gt=function(e,t,r,a,n){a&&e.push(a);for(var i=0;i<e.length;i++){var o=e[i],s=ft(o);if(s)gt(s.children,t,r,null,n);else{var l=!o.hasClass("mspace");if(l){var h=t(o,r.node);h&&(r.insertAfter?r.insertAfter(h):(e.unshift(h),i++))}l?r.node=o:n&&o.hasClass("newline")&&(r.node=Fe(["leftmost"])),r.insertAfter=(t=>r=>{e.splice(t+1,0,r),i++})(i)}}a&&e.pop()},ft=function(e){return e instanceof B||e instanceof V||e instanceof P&&e.hasClass("enclosing")?e:null},vt=function(e,t){var r=ft(e);if(r){var a=r.children;if(a.length){if("right"===t)return vt(a[a.length-1],"right");if("left"===t)return vt(a[0],"left")}}return e},bt=function(e,t){if(!e)return null;t&&(e=vt(e,t));var r=e.classes[0];return pt[r]||null},yt=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return Fe(t.concat(r))},xt=function(e,t,r){if(!e)return Fe();if(nt[e.type]){var n=nt[e.type](e,t);if(r&&t.size!==r.size){n=Fe(t.sizingClasses(r),[n],t);var i=t.sizeMultiplier/r.sizeMultiplier;n.height*=i,n.depth*=i}return n}throw new a("Got group of unknown type: '"+e.type+"'")};function wt(e,t){var r=Fe(["base"],e,t),a=Fe(["strut"]);return a.style.height=R(r.height+r.depth),r.depth&&(a.style.verticalAlign=R(-r.depth)),r.children.unshift(a),r}function kt(e,t){var r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);var a,n=dt(e,t,"root");2===n.length&&n[1].hasClass("tag")&&(a=n.pop());for(var i,o=[],s=[],l=0;l<n.length;l++)if(s.push(n[l]),n[l].hasClass("mbin")||n[l].hasClass("mrel")||n[l].hasClass("allowbreak")){for(var h=!1;l<n.length-1&&n[l+1].hasClass("mspace")&&!n[l+1].hasClass("newline");)l++,s.push(n[l]),n[l].hasClass("nobreak")&&(h=!0);h||(o.push(wt(s,t)),s=[])}else n[l].hasClass("newline")&&(s.pop(),s.length>0&&(o.push(wt(s,t)),s=[]),o.push(n[l]));s.length>0&&o.push(wt(s,t)),r?((i=wt(dt(r,t,!0),t)).classes=["tag"],o.push(i)):a&&o.push(a);var m=Fe(["katex-html"],o);if(m.setAttribute("aria-hidden","true"),i){var c=i.children[0];c.style.height=R(m.height+m.depth),m.depth&&(c.style.verticalAlign=R(-m.depth))}return m}function zt(e){return new B(e)}class St{constructor(e,t,r){this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=E(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof Mt&&this.children[r+1]instanceof Mt){for(var a=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof Mt;)a+=this.children[++r].toText();e.appendChild(new Mt(a).toNode())}else e.appendChild(this.children[r].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=l(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+l(E(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+"</"+this.type+">"}toText(){return this.children.map(e=>e.toText()).join("")}}class Mt{constructor(e){this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return l(this.toText())}toText(){return this.text}}class At{constructor(e){this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?" ":e>=-.05556&&e<=-.05555?" ":e>=-.1667&&e<=-.1666?" ":e>=-.2223&&e<=-.2222?" ":e>=-.2778&&e<=-.2777?" ":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",R(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+R(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Tt=new Set(["\\imath","\\jmath"]),Bt=new Set(["mrow","mtable"]),qt=function(e,t,r){return!ee[t][e]||!ee[t][e].replace||55349===e.charCodeAt(0)||ve.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=ee[t][e].replace),new Mt(e)},Ct=function(e){return 1===e.length?e[0]:new St("mrow",e)},It=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var r=t.font;if(!r||"mathnormal"===r)return null;var a=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathsfit"===r)return"sans-serif-italic";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";var n=e.text;if(Tt.has(n))return null;if(ee[a][n]){var i=ee[a][n].replace;i&&(n=i)}return Z(n,$e[r].fontName,a)?$e[r].variant:null};function Ht(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof Mt&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var r=e.children[0];return r instanceof Mt&&","===r.text}return!1}var Rt=function(e,t,r){if(1===e.length){var a=Nt(e[0],t);return r&&a instanceof St&&"mo"===a.type&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var n,i=[],o=0;o<e.length;o++){var s=Nt(e[o],t);if(s instanceof St&&n instanceof St){if("mtext"===s.type&&"mtext"===n.type&&s.getAttribute("mathvariant")===n.getAttribute("mathvariant")){n.children.push(...s.children);continue}if("mn"===s.type&&"mn"===n.type){n.children.push(...s.children);continue}if(Ht(s)&&"mn"===n.type){n.children.push(...s.children);continue}if("mn"===s.type&&Ht(n))s.children=[...n.children,...s.children],i.pop();else if(("msup"===s.type||"msub"===s.type)&&s.children.length>=1&&("mn"===n.type||Ht(n))){var l=s.children[0];l instanceof St&&"mn"===l.type&&(l.children=[...n.children,...l.children],i.pop())}else if("mi"===n.type&&1===n.children.length){var h=n.children[0];if(h instanceof Mt&&"̸"===h.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var m=s.children[0];m instanceof Mt&&m.text.length>0&&(m.text=m.text.slice(0,1)+"̸"+m.text.slice(1),i.pop())}}}i.push(s),n=s}return i},Et=function(e,t,r){return Ct(Rt(e,t,r))},Nt=function(e,t){if(!e)return new St("mrow");if(it[e.type])return it[e.type](e,t);throw new a("Got group of unknown type: '"+e.type+"'")};function Ot(e,t,r,a,n){var i,o=Rt(e,r);i=1===o.length&&o[0]instanceof St&&Bt.has(o[0].type)?o[0]:new St("mrow",o);var s=new St("annotation",[new Mt(t)]);s.setAttribute("encoding","application/x-tex");var l=new St("semantics",[i,s]),h=new St("math",[l]);return h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&h.setAttribute("display","block"),Fe([n?"katex":"katex-mathml"],[h])}var Dt=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Lt=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Pt=function(e,t){return t.size<2?e:Dt[e-1][t.size-1]};class Vt{constructor(e){this.style=e.style,this.color=e.color,this.size=e.size||Vt.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Lt[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,e),new Vt(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Pt(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Lt[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Pt(Vt.BASESIZE,e);return this.size===t&&this.textSize===Vt.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Vt.BASESIZE?["sizing","reset-size"+this.size,"size"+Vt.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!K[t=e>=5?0:e>=3?1:2]){var r=K[t]={cssEmPerMu:_.quad[t]/18};for(var a in _)_.hasOwnProperty(a)&&(r[a]=_[a][t])}return K[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Vt.BASESIZE=6;var Ft=function(e){return new Vt({style:e.displayMode?z.DISPLAY:z.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Gt=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Fe(r,[e])}return e},Ut={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Yt=function(e){var t=new St("mo",[new Mt(Ut[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Wt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Xt=new Set(["widehat","widecheck","widetilde","utilde"]),jt=function(e,t){var{span:r,minWidth:a,height:n}=function(){var r=4e5,a=e.label.slice(1);if(Xt.has(a)){var n,i,o,s=e,l="ordgroup"===s.base.type?s.base.body.length:1;if(l>5)"widehat"===a||"widecheck"===a?(n=420,r=2364,o=.42,i=a+"4"):(n=312,r=2340,o=.34,i="tilde4");else{var h=[1,1,2,2,3,3][l];"widehat"===a||"widecheck"===a?(r=[0,1062,2364,2364,2364][h],n=[0,239,300,360,420][h],o=[0,.24,.3,.3,.36,.42][h],i=a+h):(r=[0,600,1033,2339,2340][h],n=[0,260,286,306,312][h],o=[0,.26,.286,.3,.306,.34][h],i="tilde"+h)}var m=new W(i),c=new Y([m],{width:"100%",height:R(o),viewBox:"0 0 "+r+" "+n,preserveAspectRatio:"none"});return{span:Ge([],[c],t),minWidth:0,height:o}}var u,p,d=[],g=Wt[a],[f,v,b]=g,y=b/1e3,x=f.length;if(1===x)u=["hide-tail"],p=[g[3]];else if(2===x)u=["halfarrow-left","halfarrow-right"],p=["xMinYMin","xMaxYMin"];else{if(3!==x)throw new Error("Correct katexImagesData or update code here to support\n "+x+" children.");u=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var w=0;w<x;w++){var k=new W(f[w]),z=new Y([k],{width:"400em",height:R(y),viewBox:"0 0 "+r+" "+b,preserveAspectRatio:p[w]+" slice"}),S=Ge([u[w]],[z],t);if(1===x)return{span:S,minWidth:v,height:y};S.style.height=R(y),d.push(S)}return{span:Fe(["stretchy"],d,t),minWidth:v,height:y}}();return r.height=n,r.style.height=R(n),a>0&&(r.style.minWidth=R(a)),r};function _t(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function $t(e){var t=Zt(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Zt(e){return e&&("atom"===e.type||Q.hasOwnProperty(e.type))?e:null}var Kt=e=>{return e instanceof U?e:((t=e)instanceof P||t instanceof V||t instanceof B)&&1===e.children.length?Kt(e.children[0]):void 0;var t},Jt=(e,t)=>{var r,a,n;e&&"supsub"===e.type?(r=(a=_t(e.base,"accent")).base,e.base=r,n=function(e){if(e instanceof P)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(xt(e,t)),e.base=a):r=(a=_t(e,"accent")).base;var i,o,s=xt(r,t.havingCrampedStyle()),l=0;a.isShifty&&c(r)&&(l=null!=(i=null==(o=Kt(s))?void 0:o.skew)?i:0);var h,m="\\c"===a.label,u=m?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight);if(a.isStretchy)h=jt(a,t),h=Xe({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+R(2*l)+")",marginLeft:R(2*l)}:void 0}]});else{var p,d;"\\vec"===a.label?(p=Ke("vec",t),d=Ze.vec[1]):(p=function(e){if(e instanceof U)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}(p=De({type:"textord",mode:a.mode,text:a.label},t,"textord")),p.italic=0,d=p.width,m&&(u+=p.depth)),h=Fe(["accent-body"],[p]);var g="\\textcircled"===a.label;g&&(h.classes.push("accent-full"),u=s.height);var f=l;g||(f-=d/2),h.style.left=R(f),"\\textcircled"===a.label&&(h.style.top=".2em"),h=Xe({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-u},{type:"elem",elem:h}]})}var v=Fe(["mord","accent"],[h],t);return n?(n.children[0]=v,n.height=Math.max(v.height,n.height),n.classes[0]="mord",n):v},Qt=(e,t)=>{var r=e.isStretchy?Yt(e.label):new St("mo",[qt(e.label,e.mode)]),a=new St("mover",[Nt(e.base,t),r]);return a.setAttribute("accent","true"),a},er=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));ot({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=lt(t[0]),a=!er.test(e.funcName),n=!a||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:a,isShifty:n,base:r}},htmlBuilder:Jt,mathmlBuilder:Qt}),ot({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],a=e.parser.mode;return"math"===a&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:Jt,mathmlBuilder:Qt}),ot({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"accentUnder",mode:r.mode,label:a,base:n}},htmlBuilder:(e,t)=>{var r=xt(e.base,t),a=jt(e,t),n="\\utilde"===e.label?.12:0,i=Xe({positionType:"top",positionData:r.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:r}]});return Fe(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var r=Yt(e.label),a=new St("munder",[Nt(e.base,t),r]);return a.setAttribute("accentunder","true"),a}});var tr=e=>{var t=new St("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};function rr(e,t){var r=dt(e.body,t,!0);return Fe([e.mclass],r,t)}function ar(e,t){var r,a=Rt(e.body,t);return"minner"===e.mclass?r=new St("mpadded",a):"mord"===e.mclass?e.isCharacterBox?(r=a[0]).type="mi":r=new St("mi",a):(e.isCharacterBox?(r=a[0]).type="mo":r=new St("mo",a),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}ot({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a,funcName:n}=e;return{type:"xArrow",mode:a.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,a=t.style,n=t.havingStyle(a.sup()),i=We(xt(e.body,n,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(o+"-arrow-pad"),e.below&&(n=t.havingStyle(a.sub()),(r=We(xt(e.below,n,t),t)).classes.push(o+"-arrow-pad"));var s,l=jt(e,t),h=-t.fontMetrics().axisHeight+.5*l.height,m=-t.fontMetrics().axisHeight-.5*l.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(m-=i.depth),r){var c=-t.fontMetrics().axisHeight+r.height+.5*l.height+.111;s=Xe({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h},{type:"elem",elem:r,shift:c}]})}else s=Xe({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h}]});return s.children[0].children[0].children[1].classes.push("svg-align"),Fe(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var r,a=Yt(e.label);if(a.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var n=tr(Nt(e.body,t));if(e.below){var i=tr(Nt(e.below,t));r=new St("munderover",[a,i,n])}else r=new St("mover",[a,n])}else if(e.below){var o=tr(Nt(e.below,t));r=new St("munder",[a,o])}else r=tr(),r=new St("mover",[a,r]);return r}}),ot({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+a.slice(5),body:ht(n),isCharacterBox:c(n)}},htmlBuilder:rr,mathmlBuilder:ar});var nr=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};ot({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:nr(t[0]),body:ht(t[1]),isCharacterBox:c(t[1])}}}),ot({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var r,{parser:a,funcName:n}=e,i=t[1],o=t[0];r="\\stackrel"!==n?nr(i):"mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:ht(i)},l={type:"supsub",mode:o.mode,base:s,sup:"\\underset"===n?null:o,sub:"\\underset"===n?o:null};return{type:"mclass",mode:a.mode,mclass:r,body:[l],isCharacterBox:c(l)}},htmlBuilder:rr,mathmlBuilder:ar}),ot({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:nr(t[0]),body:ht(t[0])}},htmlBuilder(e,t){var r=dt(e.body,t,!0),a=Fe([e.mclass],r,t);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(e,t){var r=Rt(e.body,t),a=new St("mstyle",r);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var ir={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},or=()=>({type:"styling",body:[],mode:"math",style:"display"}),sr=e=>"textord"===e.type&&"@"===e.text,lr=(e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t;function hr(e,t,r){var a=ir[e];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(a,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var n={type:"atom",text:a,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[n],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[i],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}ot({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"cdlabel",mode:r.mode,side:a.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),a=We(xt(e.label,r,t),t);return a.classes.push("cd-label-"+e.side),a.style.bottom=R(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(e,t){var r=new St("mrow",[Nt(e.label,t)]);return(r=new St("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new St("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),ot({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=We(xt(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:(e,t)=>new St("mrow",[Nt(e.fragment,t)])}),ot({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=_t(t[0],"ordgroup").body,i="",o=0;o<n.length;o++)i+=_t(n[o],"textord").text;var s,l=parseInt(i);if(isNaN(l))throw new a("\\@char has non-numeric argument "+i);if(l<0||l>=1114111)throw new a("\\@char with invalid code point "+i);return l<=65535?s=String.fromCharCode(l):(l-=65536,s=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:s}}});var mr=(e,t)=>{var r=dt(e.body,t.withColor(e.color),!1);return Ye(r)},cr=(e,t)=>{var r=Rt(e.body,t.withColor(e.color)),a=new St("mstyle",r);return a.setAttribute("mathcolor",e.color),a};ot({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,a=_t(t[0],"color-token").color,n=t[1];return{type:"color",mode:r.mode,color:a,body:ht(n)}},htmlBuilder:mr,mathmlBuilder:cr}),ot({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:a}=e,n=_t(t[0],"color-token").color;r.gullet.macros.set("\\current@color",n);var i=r.parseExpression(!0,a);return{type:"color",mode:r.mode,color:n,body:i}},htmlBuilder:mr,mathmlBuilder:cr}),ot({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:a}=e,n="["===a.gullet.future().text?a.parseSizeGroup(!0):null,i=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:i,size:n&&_t(n,"size").value}},htmlBuilder(e,t){var r=Fe(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=R(H(e.size,t)))),r},mathmlBuilder(e,t){var r=new St("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",R(H(e.size,t)))),r}});var ur={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},pr=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new a("Expected a control sequence",e);return t},dr=(e,t,r,a)=>{var n=e.gullet.macros.get(r.text);null==n&&(r.noexpand=!0,n={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,n,a)};ot({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(ur[n.text])return"\\global"!==r&&"\\\\globallong"!==r||(n.text=ur[n.text]),_t(t.parseFunction(),"internal");throw new a("Invalid token after macro prefix",n)}}),ot({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new a("Expected a control sequence",n);for(var o,s=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(n=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[s].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new a('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new a('Argument number "'+n.text+'" out of order');s++,l.push([])}else{if("EOF"===n.text)throw new a("Expected a macro definition");l[s].push(n.text)}var{tokens:h}=t.gullet.consumeArg();return o&&h.unshift(o),"\\edef"!==r&&"\\xdef"!==r||(h=t.gullet.expandTokens(h)).reverse(),t.gullet.macros.set(i,{tokens:h,numArgs:s,delimiters:l},r===ur[r]),{type:"internal",mode:t.mode}}}),ot({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=pr(t.gullet.popToken());t.gullet.consumeSpaces();var n=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return dr(t,a,n,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),ot({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=pr(t.gullet.popToken()),n=t.gullet.popToken(),i=t.gullet.popToken();return dr(t,a,i,"\\\\globalfuture"===r),t.gullet.pushToken(i),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}});var gr=function(e,t,r){var a=Z(ee.math[e]&&ee.math[e].replace||e,t,r);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return a},fr=function(e,t,r,a){var n=r.havingBaseStyle(t),i=Fe(a.concat(n.sizingClasses(r)),[e],r),o=n.sizeMultiplier/r.sizeMultiplier;return i.height*=o,i.depth*=o,i.maxFontSize=n.sizeMultiplier,i},vr=function(e,t,r){var a=t.havingBaseStyle(r),n=(1-t.sizeMultiplier/a.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=R(n),e.height-=n,e.depth+=n},br=function(e,t,r,a,n,i){var o=function(e,t,r,a){return Ne(e,"Size"+t+"-Regular",r,a)}(e,t,n,a),s=fr(Fe(["delimsizing","size"+t],[o],a),z.TEXT,a,i);return r&&vr(s,a,z.TEXT),s},yr=function(e,t,r){return{type:"elem",elem:Fe(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[Fe([],[Ne(e,t,r)])])}},xr=function(e,t,r){var a=j["Size4-Regular"][e.charCodeAt(0)]?j["Size4-Regular"][e.charCodeAt(0)][4]:j["Size1-Regular"][e.charCodeAt(0)][4],n=new W("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),i=new Y([n],{width:R(a),height:R(t),style:"width:"+R(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Ge([],[i],r);return o.height=t,o.style.height=R(t),o.style.width=R(a),{type:"elem",elem:o}},wr={type:"kern",size:-.008},kr=new Set(["|","\\lvert","\\rvert","\\vert"]),zr=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),Sr=function(e,t,r,a,n,i){var o,s,l,h,m="",c=0;o=l=h=e,s=null;var u="Size1-Regular";"\\uparrow"===e?l=h="⏐":"\\Uparrow"===e?l=h="‖":"\\downarrow"===e?o=l="⏐":"\\Downarrow"===e?o=l="‖":"\\updownarrow"===e?(o="\\uparrow",l="⏐",h="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",l="‖",h="\\Downarrow"):kr.has(e)?(l="∣",m="vert",c=333):zr.has(e)?(l="∥",m="doublevert",c=556):"["===e||"\\lbrack"===e?(o="⎡",l="⎢",h="⎣",u="Size4-Regular",m="lbrack",c=667):"]"===e||"\\rbrack"===e?(o="⎤",l="⎥",h="⎦",u="Size4-Regular",m="rbrack",c=667):"\\lfloor"===e||"⌊"===e?(l=o="⎢",h="⎣",u="Size4-Regular",m="lfloor",c=667):"\\lceil"===e||"⌈"===e?(o="⎡",l=h="⎢",u="Size4-Regular",m="lceil",c=667):"\\rfloor"===e||"⌋"===e?(l=o="⎥",h="⎦",u="Size4-Regular",m="rfloor",c=667):"\\rceil"===e||"⌉"===e?(o="⎤",l=h="⎥",u="Size4-Regular",m="rceil",c=667):"("===e||"\\lparen"===e?(o="⎛",l="⎜",h="⎝",u="Size4-Regular",m="lparen",c=875):")"===e||"\\rparen"===e?(o="⎞",l="⎟",h="⎠",u="Size4-Regular",m="rparen",c=875):"\\{"===e||"\\lbrace"===e?(o="⎧",s="⎨",h="⎩",l="⎪",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="⎫",s="⎬",h="⎭",l="⎪",u="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(o="⎧",h="⎩",l="⎪",u="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(o="⎫",h="⎭",l="⎪",u="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(o="⎧",h="⎭",l="⎪",u="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(o="⎫",h="⎩",l="⎪",u="Size4-Regular");var p=gr(o,u,n),d=p.height+p.depth,g=gr(l,u,n),f=g.height+g.depth,v=gr(h,u,n),b=v.height+v.depth,y=0,x=1;if(null!==s){var w=gr(s,u,n);y=w.height+w.depth,x=2}var k=d+b+y,S=k+Math.max(0,Math.ceil((t-k)/(x*f)))*x*f,M=a.fontMetrics().axisHeight;r&&(M*=a.sizeMultiplier);var A=S/2-M,T=[];if(m.length>0){var B=S-d-b,q=Math.round(1e3*S),C=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(m,Math.round(1e3*B)),I=new W(m,C),H=(c/1e3).toFixed(3)+"em",R=(q/1e3).toFixed(3)+"em",E=new Y([I],{width:H,height:R,viewBox:"0 0 "+c+" "+q}),N=Ge([],[E],a);N.height=q/1e3,N.style.width=H,N.style.height=R,T.push({type:"elem",elem:N})}else{if(T.push(yr(h,u,n)),T.push(wr),null===s){var O=S-d-b+.016;T.push(xr(l,O,a))}else{var D=(S-d-b-y)/2+.016;T.push(xr(l,D,a)),T.push(wr),T.push(yr(s,u,n)),T.push(wr),T.push(xr(l,D,a))}T.push(wr),T.push(yr(o,u,n))}var L=a.havingBaseStyle(z.TEXT),P=Xe({positionType:"bottom",positionData:A,children:T});return fr(Fe(["delimsizing","mult"],[P],L),z.TEXT,a,i)},Mr=.08,Ar=function(e,t,r,a,n){var i=function(e,t,r){t*=1e3;var a="";switch(e){case"sqrtMain":a=function(e){return"M95,"+(622+e+80)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.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\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize1":a=function(e){return"M263,"+(601+e+80)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize2":a=function(e){return"M983 "+(10+e+80)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize3":a=function(e){return"M424,"+(2398+e+80)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" 80\nh400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize4":a=function(e){return"M473,"+(2713+e+80)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" 80h400000v"+(40+e)+"H1017.7z"}(t);break;case"sqrtTall":a=function(e,t,r){return"M702 "+(e+80)+"H400000"+(40+e)+"\nH742v"+(r-54-80-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 80H400000v"+(40+e)+"H742z"}(t,0,r)}return a}(e,a,r),o=new W(e,i),s=new Y([o],{width:"400em",height:R(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Ge(["hide-tail"],[s],n)},Tr=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),Br=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),qr=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Cr=[0,1.2,1.8,2.4,3],Ir=function(e,t,r,n,i){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),Tr.has(e)||qr.has(e))return br(e,t,!1,r,n,i);if(Br.has(e))return Sr(e,Cr[t],!1,r,n,i);throw new a("Illegal delimiter: '"+e+"'")},Hr=[{type:"small",style:z.SCRIPTSCRIPT},{type:"small",style:z.SCRIPT},{type:"small",style:z.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Rr=[{type:"small",style:z.SCRIPTSCRIPT},{type:"small",style:z.SCRIPT},{type:"small",style:z.TEXT},{type:"stack"}],Er=[{type:"small",style:z.SCRIPTSCRIPT},{type:"small",style:z.SCRIPT},{type:"small",style:z.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Nr=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";var t=e.type;throw new Error("Add support for delim type '"+t+"' here.")},Or=function(e,t,r,a){for(var n=Math.min(2,3-a.style.size);n<r.length;n++){var i=r[n];if("stack"===i.type)break;var o=gr(e,Nr(i),"math"),s=o.height+o.depth;if("small"===i.type&&(s*=a.havingBaseStyle(i.style).sizeMultiplier),s>t)return i}return r[r.length-1]},Dr=function(e,t,r,a,n,i){var o;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),o=qr.has(e)?Hr:Tr.has(e)?Er:Rr;var s=Or(e,t,o,a);return"small"===s.type?function(e,t,r,a,n,i){var o=Ne(e,"Main-Regular",n,a),s=fr(o,t,a,i);return r&&vr(s,a,t),s}(e,s.style,r,a,n,i):"large"===s.type?br(e,s.size,r,a,n,i):Sr(e,t,r,a,n,i)},Lr=function(e,t,r,a,n,i){var o=a.fontMetrics().axisHeight*a.sizeMultiplier,s=5/a.fontMetrics().ptPerEm,l=Math.max(t-o,r+o),h=Math.max(l/500*901,2*l-s);return Dr(e,h,!0,a,n,i)},Pr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Vr=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function Fr(e,t){var r=Zt(e);if(r&&Vr.has(r.text))return r;throw new a(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Gr(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ot({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=Fr(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Pr[e.funcName].size,mclass:Pr[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>"."===e.delim?Fe([e.mclass]):Ir(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(qt(e.delim,e.mode));var r=new St("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var a=R(Cr[e.size]);return r.setAttribute("minsize",a),r.setAttribute("maxsize",a),r}}),ot({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new a("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Fr(t[0],e).text,color:r}}}),ot({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Fr(t[0],e),a=e.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var i=_t(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{Gr(e);for(var r,a,n=dt(e.body,t,!0,["mopen","mclose"]),i=0,o=0,s=!1,l=0;l<n.length;l++)n[l].isMiddle?s=!0:(i=Math.max(n[l].height,i),o=Math.max(n[l].depth,o));if(i*=t.sizeMultiplier,o*=t.sizeMultiplier,r="."===e.left?yt(t,["mopen"]):Lr(e.left,i,o,t,e.mode,["mopen"]),n.unshift(r),s)for(var h=1;h<n.length;h++){var m=n[h].isMiddle;m&&(n[h]=Lr(m.delim,i,o,m.options,e.mode,[]))}if("."===e.right)a=yt(t,["mclose"]);else{var c=e.rightColor?t.withColor(e.rightColor):t;a=Lr(e.right,i,o,c,e.mode,["mclose"])}return n.push(a),Fe(["minner"],n,t)},mathmlBuilder:(e,t)=>{Gr(e);var r=Rt(e.body,t);if("."!==e.left){var a=new St("mo",[qt(e.left,e.mode)]);a.setAttribute("fence","true"),r.unshift(a)}if("."!==e.right){var n=new St("mo",[qt(e.right,e.mode)]);n.setAttribute("fence","true"),e.rightColor&&n.setAttribute("mathcolor",e.rightColor),r.push(n)}return Ct(r)}}),ot({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Fr(t[0],e);if(!e.parser.leftrightDepth)throw new a("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if("."===e.delim)r=yt(t,[]);else{r=Ir(e.delim,1,t,e.mode,[]);var a={delim:e.delim,options:t};r.isMiddle=a}return r},mathmlBuilder:(e,t)=>{var r="\\vert"===e.delim||"|"===e.delim?qt("|","text"):qt(e.delim,e.mode),a=new St("mo",[r]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var Ur=(e,t)=>{var r,a,n,i=We(xt(e.body,t),t),o=e.label.slice(1),s=t.sizeMultiplier,l=0,h=c(e.body);if("sout"===o)(r=Fe(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/s,l=-.5*t.fontMetrics().xHeight;else if("phase"===o){var m=H({number:.6,unit:"pt"},t),u=H({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;var p=i.height+i.depth+m+u;i.style.paddingLeft=R(p/2+m);var d=Math.floor(1e3*p*s),g="M400000 "+(a=d)+" H0 L"+a/2+" 0 l65 45 L145 "+(a-80)+" H400000z",f=new Y([new W("phase",g)],{width:"400em",height:R(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});(r=Ge(["hide-tail"],[f],t)).style.height=R(p),l=i.depth+m+u}else{/cancel/.test(o)?h||i.classes.push("cancel-pad"):"angl"===o?i.classes.push("anglpad"):i.classes.push("boxpad");var v=0,b=0,y=0;/box/.test(o)?(y=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=v=t.fontMetrics().fboxsep+("colorbox"===o?0:y)):"angl"===o?(v=4*(y=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),b=Math.max(0,.25-i.depth)):b=v=h?.2:0,r=function(e,t,r,a,n){var i,o=e.height+e.depth+r+a;if(/fbox|color|angl/.test(t)){if(i=Fe(["stretchy",t],[],n),"fbox"===t){var s=n.color&&n.getColor();s&&(i.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new X({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new X({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new Y(l,{width:"100%",height:R(o)});i=Ge([],[h],n)}return i.height=o,i.style.height=R(o),i}(i,o,v,b,t),/fbox|boxed|fcolorbox/.test(o)?(r.style.borderStyle="solid",r.style.borderWidth=R(y)):"angl"===o&&.049!==y&&(r.style.borderTopWidth=R(y),r.style.borderRightWidth=R(y)),l=i.depth+b,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor&&(r.style.borderColor=e.borderColor))}if(e.backgroundColor)n=Xe({positionType:"individualShift",children:[{type:"elem",elem:r,shift:l},{type:"elem",elem:i,shift:0}]});else{var x=/cancel|phase/.test(o)?["svg-align"]:[];n=Xe({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:r,shift:l,wrapperClasses:x}]})}return/cancel/.test(o)&&(n.height=i.height,n.depth=i.depth),/cancel/.test(o)&&!h?Fe(["mord","cancel-lap"],[n],t):Fe(["mord"],[n],t)},Yr=(e,t)=>{var r=0,a=new St(e.label.includes("colorbox")?"mpadded":"menclose",[Nt(e.body,t)]);switch(e.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*r+"pt"),a.setAttribute("height","+"+2*r+"pt"),a.setAttribute("lspace",r+"pt"),a.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){var n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);a.setAttribute("style","border: "+n+"em solid "+String(e.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&a.setAttribute("mathbackground",e.backgroundColor),a};ot({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=_t(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:i,body:o}},htmlBuilder:Ur,mathmlBuilder:Yr}),ot({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=_t(t[0],"color-token").color,o=_t(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:o,borderColor:i,body:s}},htmlBuilder:Ur,mathmlBuilder:Yr}),ot({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),ot({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"enclose",mode:r.mode,label:a,body:n}},htmlBuilder:Ur,mathmlBuilder:Yr}),ot({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var Wr={};function Xr(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,s={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},l=0;l<r.length;++l)Wr[r[l]]=s;i&&(nt[t]=i),o&&(it[t]=o)}var jr={};function _r(e,t){jr[e]=t}class $r{constructor(e,t,r){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 $r(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class Zr{constructor(e,t){this.text=e,this.loc=t}range(e,t){return new Zr(t,$r.range(this,e))}}function Kr(e){var t=[];e.consumeSpaces();var r=e.fetch().text;for("\\relax"===r&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}var Jr=e=>{if(!e.parser.settings.displayMode)throw new a("{"+e.envName+"} can be used only in display mode.")},Qr=new Set(["gather","gather*"]);function ea(e){if(!e.includes("ed"))return!e.includes("*")}function ta(e,t,r){var{hskipBeforeAndAfter:n,addJot:i,cols:o,arraystretch:s,colSeparationType:l,autoTag:h,singleRow:m,emptySingleRow:c,maxNumCols:u,leqno:p}=t;if(e.gullet.beginGroup(),m||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var d=e.gullet.expandMacroAsText("\\arraystretch");if(null==d)s=1;else if(!(s=parseFloat(d))||s<0)throw new a("Invalid \\arraystretch: "+d)}e.gullet.beginGroup();var g=[],f=[g],v=[],b=[],y=null!=h?[]:void 0;function x(){h&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new Zr("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(Boolean(h)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(x(),b.push(Kr(e));;){var k=e.parseExpression(!1,m?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var z={type:"ordgroup",mode:e.mode,body:k};r&&(z={type:"styling",mode:e.mode,style:r,body:[z]}),g.push(z);var S=e.fetch().text;if("&"===S){if(u&&g.length===u){if(m||l)throw new a("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===S){w(),1===g.length&&"styling"===z.type&&1===z.body.length&&"ordgroup"===z.body[0].type&&0===z.body[0].body.length&&(f.length>1||!c)&&f.pop(),b.length<f.length+1&&b.push([]);break}if("\\\\"!==S)throw new a("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var M=void 0;" "!==e.gullet.future().text&&(M=e.parseSizeGroup(!0)),v.push(M?M.value:null),w(),b.push(Kr(e)),g=[],f.push(g),x()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:i,arraystretch:s,body:f,cols:o,rowGaps:v,hskipBeforeAndAfter:n,hLinesBeforeRow:b,colSeparationType:l,tags:y,leqno:p}}function ra(e){return"d"===e.slice(0,1)?"display":"text"}var aa=function(e,t){var r,n,i=e.body.length,o=e.hLinesBeforeRow,s=0,l=new Array(i),h=[],m=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),c=1/t.fontMetrics().ptPerEm,u=5*c;e.colSeparationType&&"small"===e.colSeparationType&&(u=t.havingStyle(z.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var p="CD"===e.colSeparationType?H({number:3,unit:"ex"},t):12*c,d=3*c,g=e.arraystretch*p,f=.7*g,v=.3*g,b=0;function y(e){for(var t=0;t<e.length;++t)t>0&&(b+=.25),h.push({pos:b,isDashed:e[t]})}for(y(o[0]),r=0;r<e.body.length;++r){var x=e.body[r],w=f,k=v;s<x.length&&(s=x.length);var S=new Array(x.length);for(n=0;n<x.length;++n){var M=xt(x[n],t);k<M.depth&&(k=M.depth),w<M.height&&(w=M.height),S[n]=M}var A=e.rowGaps[r],T=0;A&&(T=H(A,t))>0&&(k<(T+=v)&&(k=T),T=0),e.addJot&&(k+=d),S.height=w,S.depth=k,b+=w,S.pos=b,b+=k+T,l[r]=S,y(o[r+1])}var B,q,C=b/2+t.fontMetrics().axisHeight,I=e.cols||[],E=[],N=[];if(e.tags&&e.tags.some(e=>e))for(r=0;r<i;++r){var O=l[r],D=O.pos-C,L=e.tags[r],P=void 0;(P=!0===L?Fe(["eqn-num"],[],t):Fe([],!1===L?[]:dt(L,t,!0),t)).depth=O.depth,P.height=O.height,N.push({type:"elem",elem:P,shift:D})}for(n=0,q=0;n<s||q<I.length;++n,++q){for(var V,F=I[q],G=!0;"separator"===(null==(U=F)?void 0:U.type);){var U;if(G||((B=Fe(["arraycolsep"],[])).style.width=R(t.fontMetrics().doubleRuleSep),E.push(B)),"|"!==F.separator&&":"!==F.separator)throw new a("Invalid separator type: "+F.separator);var Y="|"===F.separator?"solid":"dashed",W=Fe(["vertical-separator"],[],t);W.style.height=R(b),W.style.borderRightWidth=R(m),W.style.borderRightStyle=Y,W.style.margin="0 "+R(-m/2);var X=b-C;X&&(W.style.verticalAlign=R(-X)),E.push(W),F=I[++q],G=!1}if(!(n>=s)){var j,_,$=void 0;(n>0||e.hskipBeforeAndAfter)&&0!==($=null!=(j=null==(_=F)?void 0:_.pregap)?j:u)&&((B=Fe(["arraycolsep"],[])).style.width=R($),E.push(B));var Z=[];for(r=0;r<i;++r){var K=l[r],J=K[n];if(J){var Q=K.pos-C;J.depth=K.depth,J.height=K.height,Z.push({type:"elem",elem:J,shift:Q})}}var ee,te,re=Xe({positionType:"individualShift",children:Z}),ae=Fe(["col-align-"+((null==(V=F)?void 0:V.align)||"c")],[re]);E.push(ae),(n<s-1||e.hskipBeforeAndAfter)&&0!==($=null!=(ee=null==(te=F)?void 0:te.postgap)?ee:u)&&((B=Fe(["arraycolsep"],[])).style.width=R($),E.push(B))}}var ne=Fe(["mtable"],E);if(h.length>0){for(var ie=Ue("hline",t,m),oe=Ue("hdashline",t,m),se=[{type:"elem",elem:ne,shift:0}];h.length>0;){var le=h.pop(),he=le.pos-C;le.isDashed?se.push({type:"elem",elem:oe,shift:he}):se.push({type:"elem",elem:ie,shift:he})}ne=Xe({positionType:"individualShift",children:se})}if(0===N.length)return Fe(["mord"],[ne],t);var me=Xe({positionType:"individualShift",children:N}),ce=Fe(["tag"],[me],t);return Ye([ne,ce])},na={c:"center ",l:"left ",r:"right "},ia=function(e,t){for(var r=[],a=new St("mtd",[],["mtr-glue"]),n=new St("mtd",[],["mml-eqn-num"]),i=0;i<e.body.length;i++){for(var o=e.body[i],s=[],l=0;l<o.length;l++)s.push(new St("mtd",[Nt(o[l],t)]));e.tags&&e.tags[i]&&(s.unshift(a),s.push(a),e.leqno?s.unshift(n):s.push(n)),r.push(new St("mtr",s))}var h=new St("mtable",r),m=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);h.setAttribute("rowspacing",R(m));var c="",u="";if(e.cols&&e.cols.length>0){var p=e.cols,d="",g=!1,f=0,v=p.length;"separator"===p[0].type&&(c+="top ",f=1),"separator"===p[p.length-1].type&&(c+="bottom ",v-=1);for(var b=f;b<v;b++){var y=p[b];"align"===y.type?(u+=na[y.align],g&&(d+="none "),g=!0):"separator"===y.type&&g&&(d+="|"===y.separator?"solid ":"dashed ",g=!1)}h.setAttribute("columnalign",u.trim()),/[sd]/.test(d)&&h.setAttribute("columnlines",d.trim())}if("align"===e.colSeparationType){for(var x=e.cols||[],w="",k=1;k<x.length;k++)w+=k%2?"0em ":"1em ";h.setAttribute("columnspacing",w.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?h.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?h.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?h.setAttribute("columnspacing","0.5em"):h.setAttribute("columnspacing","1em");var z="",S=e.hLinesBeforeRow;c+=S[0].length>0?"left ":"",c+=S[S.length-1].length>0?"right ":"";for(var M=1;M<S.length-1;M++)z+=0===S[M].length?"none ":S[M][0]?"dashed ":"solid ";return/[sd]/.test(z)&&h.setAttribute("rowlines",z.trim()),""!==c&&(h=new St("menclose",[h])).setAttribute("notation",c.trim()),e.arraystretch&&e.arraystretch<1&&(h=new St("mstyle",[h])).setAttribute("scriptlevel","1"),h},oa=function(e,t){e.envName.includes("ed")||Jr(e);var r=[],n=e.envName.includes("at")?"alignat":"align",i="split"===e.envName,o=ta(e.parser,{cols:r,addJot:!0,autoTag:i?void 0:ea(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},"display"),s=0,l=0,h={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var m="",c=0;c<t[0].body.length;c++)m+=_t(t[0].body[c],"textord").text;s=Number(m),l=2*s}var u=!l;o.body.forEach(function(e){for(var t=1;t<e.length;t+=2){var r=_t(e[t],"styling");_t(r.body[0],"ordgroup").body.unshift(h)}if(u)l<e.length&&(l=e.length);else{var n=e.length/2;if(s<n)throw new a("Too many math in a row: expected "+s+", but got "+n,e[0])}});for(var p=0;p<l;++p){var d="r",g=0;p%2==1?d="l":p>0&&u&&(g=1),r[p]={type:"align",align:d,pregap:g,postgap:0}}return o.colSeparationType=u?"align":"alignat",o};Xr({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=(Zt(t[0])?[t[0]]:_t(t[0],"ordgroup").body).map(function(e){var t=$t(e).text;if("lcr".includes(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new a("Unknown column alignment: "+t,e)}),n={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return ta(e.parser,n,ra(e.envName))},htmlBuilder:aa,mathmlBuilder:ia}),Xr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var i=e.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,!"lcr".includes(r))throw new a("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var o=ta(e.parser,n,ra(e.envName)),s=Math.max(0,...o.body.map(e=>e.length));return o.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:aa,mathmlBuilder:ia}),Xr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=ta(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:aa,mathmlBuilder:ia}),Xr({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=(Zt(t[0])?[t[0]]:_t(t[0],"ordgroup").body).map(function(e){var t=$t(e).text;if("lc".includes(t))return{type:"align",align:t};throw new a("Unknown column alignment: "+t,e)});if(r.length>1)throw new a("{subarray} can contain only one column");var n={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5},i=ta(e.parser,n,"script");if(i.body.length>0&&i.body[0].length>1)throw new a("{subarray} can contain only one column");return i},htmlBuilder:aa,mathmlBuilder:ia}),Xr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=ta(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},ra(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:aa,mathmlBuilder:ia}),Xr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:oa,htmlBuilder:aa,mathmlBuilder:ia}),Xr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Qr.has(e.envName)&&Jr(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:ea(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return ta(e.parser,t,"display")},htmlBuilder:aa,mathmlBuilder:ia}),Xr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:oa,htmlBuilder:aa,mathmlBuilder:ia}),Xr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Jr(e);var t={autoTag:ea(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return ta(e.parser,t,"display")},htmlBuilder:aa,mathmlBuilder:ia}),Xr({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(Jr(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new a("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var n=[],i=[n],o=0;o<t.length;o++){for(var s=t[o],l=or(),h=0;h<s.length;h++)if(sr(s[h])){n.push(l);var m=$t(s[h+=1]).text,c=new Array(2);if(c[0]={type:"ordgroup",mode:"math",body:[]},c[1]={type:"ordgroup",mode:"math",body:[]},"=|.".includes(m));else{if(!"<>AV".includes(m))throw new a('Expected one of "<>AV=|." after @',s[h]);for(var u=0;u<2;u++){for(var p=!0,d=h+1;d<s.length;d++){if(lr(s[d],m)){p=!1,h=d;break}if(sr(s[d]))throw new a("Missing a "+m+" character to complete a CD arrow.",s[d]);c[u].body.push(s[d])}if(p)throw new a("Missing a "+m+" character to complete a CD arrow.",s[h])}}var g={type:"styling",body:[hr(m,c,e)],mode:"math",style:"display"};n.push(g),l=or()}else l.body.push(s[h]);o%2==0?n.push(l):n.shift(),n=[],i.push(n)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}(e.parser)),htmlBuilder:aa,mathmlBuilder:ia}),_r("\\nonumber","\\gdef\\@eqnsw{0}"),_r("\\notag","\\nonumber"),ot({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new a(e.funcName+" valid only within array environment")}});var sa=Wr;ot({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];if("ordgroup"!==i.type)throw new a("Invalid environment name",i);for(var o="",s=0;s<i.body.length;++s)o+=_t(i.body[s],"textord").text;if("\\begin"===n){if(!sa.hasOwnProperty(o))throw new a("No such environment: "+o,i);var l=sa[o],{args:h,optArgs:m}=r.parseArguments("\\begin{"+o+"}",l),c={mode:r.mode,envName:o,parser:r},u=l.handler(c,h,m);r.expect("\\end",!1);var p=r.nextToken,d=_t(r.parseFunction(),"environment");if(d.name!==o)throw new a("Mismatch: \\begin{"+o+"} matched by \\end{"+d.name+"}",p);return u}return{type:"environment",mode:r.mode,name:o,nameGroup:i}}});var la=(e,t)=>{var r=e.font,a=t.withFont(r);return xt(e.body,a)},ha=(e,t)=>{var r=e.font,a=t.withFont(r);return Nt(e.body,a)},ma={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ot({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=lt(t[0]),i=a;return i in ma&&(i=ma[i]),{type:"font",mode:r.mode,font:i.slice(1),body:n}},htmlBuilder:la,mathmlBuilder:ha}),ot({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"mclass",mode:r.mode,mclass:nr(a),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:a}],isCharacterBox:c(a)}}}),ot({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a,breakOnTokenText:n}=e,{mode:i}=r,o=r.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+a.slice(1),body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:la,mathmlBuilder:ha});var ca=(e,t)=>t?{type:"styling",mode:e.mode,style:t,body:[e]}:e;ot({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var r,{parser:a,funcName:n}=e,i=t[0],o=t[1],s=null,l=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,s="(",l=")";break;case"\\\\bracefrac":r=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":r=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var h="\\cfrac"===n,m=null;return h||n.startsWith("\\d")?m="display":n.startsWith("\\t")&&(m="text"),ca({type:"genfrac",mode:a.mode,numer:i,denom:o,continued:h,hasBarLine:r,leftDelim:s,rightDelim:l,barSize:null},m)},htmlBuilder:(e,t)=>{var r,a=t.style,n=a.fracNum(),i=a.fracDen();r=t.havingStyle(n);var o=xt(e.numer,r,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<l?l:o.depth}r=t.havingStyle(i);var h,m,c,u,p,d,g,f,v,b,y=xt(e.denom,r,t);if(e.hasBarLine?(e.barSize?(m=H(e.barSize,t),h=Ue("frac-line",t,m)):h=Ue("frac-line",t),m=h.height,c=h.height):(h=null,m=0,c=t.fontMetrics().defaultRuleThickness),a.size===z.DISPLAY.size?(u=t.fontMetrics().num1,p=m>0?3*c:7*c,d=t.fontMetrics().denom1):(m>0?(u=t.fontMetrics().num2,p=c):(u=t.fontMetrics().num3,p=3*c),d=t.fontMetrics().denom2),h){var x=t.fontMetrics().axisHeight;u-o.depth-(x+.5*m)<p&&(u+=p-(u-o.depth-(x+.5*m))),x-.5*m-(y.height-d)<p&&(d+=p-(x-.5*m-(y.height-d))),g=Xe({positionType:"individualShift",children:[{type:"elem",elem:y,shift:d},{type:"elem",elem:h,shift:-(x-.5*m)},{type:"elem",elem:o,shift:-u}]})}else{var w=u-o.depth-(y.height-d);w<p&&(u+=.5*(p-w),d+=.5*(p-w)),g=Xe({positionType:"individualShift",children:[{type:"elem",elem:y,shift:d},{type:"elem",elem:o,shift:-u}]})}return r=t.havingStyle(a),g.height*=r.sizeMultiplier/t.sizeMultiplier,g.depth*=r.sizeMultiplier/t.sizeMultiplier,f=a.size===z.DISPLAY.size?t.fontMetrics().delim1:a.size===z.SCRIPTSCRIPT.size?t.havingStyle(z.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,v=null==e.leftDelim?yt(t,["mopen"]):Dr(e.leftDelim,f,!0,t.havingStyle(a),e.mode,["mopen"]),b=e.continued?Fe([]):null==e.rightDelim?yt(t,["mclose"]):Dr(e.rightDelim,f,!0,t.havingStyle(a),e.mode,["mclose"]),Fe(["mord"].concat(r.sizingClasses(t)),[v,Fe(["mfrac"],[g]),b],t)},mathmlBuilder:(e,t)=>{var r=new St("mfrac",[Nt(e.numer,t),Nt(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var a=H(e.barSize,t);r.setAttribute("linethickness",R(a))}}else r.setAttribute("linethickness","0px");if(null!=e.leftDelim||null!=e.rightDelim){var n=[];if(null!=e.leftDelim){var i=new St("mo",[new Mt(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),n.push(i)}if(n.push(r),null!=e.rightDelim){var o=new St("mo",[new Mt(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),n.push(o)}return Ct(n)}return r}}),ot({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:r,funcName:a,token:n}=e;switch(a){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:n}}});var ua=["display","text","script","scriptscript"],pa=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};ot({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var r,{parser:a}=e,n=t[4],i=t[5],o=lt(t[0]),s="atom"===o.type&&"open"===o.family?pa(o.text):null,l=lt(t[1]),h="atom"===l.type&&"close"===l.family?pa(l.text):null,m=_t(t[2],"size"),c=null;r=!!m.isBlank||(c=m.value).number>0;var u=null,p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var d=_t(p.body[0],"textord");u=ua[Number(d.text)]}}else p=_t(p,"textord"),u=ua[Number(p.text)];return ca({type:"genfrac",mode:a.mode,numer:n,denom:i,continued:!1,hasBarLine:r,barSize:c,leftDelim:s,rightDelim:h},u)}}),ot({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:a,token:n}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:_t(t[0],"size").value,token:n}}}),ot({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0],i=_t(t[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var o=t[2],s=i.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:o,continued:!1,hasBarLine:s,barSize:i,leftDelim:null,rightDelim:null}}});var da=(e,t)=>{var r,a,n=t.style;"supsub"===e.type?(r=e.sup?xt(e.sup,t.havingStyle(n.sup()),t):xt(e.sub,t.havingStyle(n.sub()),t),a=_t(e.base,"horizBrace")):a=_t(e,"horizBrace");var i,o=xt(a.base,t.havingBaseStyle(z.DISPLAY)),s=jt(a,t);if(a.isOver?(i=Xe({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]})).children[0].children[0].children[1].classes.push("svg-align"):(i=Xe({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]})).children[0].children[0].children[0].classes.push("svg-align"),r){var l=Fe(["mord",a.isOver?"mover":"munder"],[i],t);i=a.isOver?Xe({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]}):Xe({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]})}return Fe(["mord",a.isOver?"mover":"munder"],[i],t)};ot({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"horizBrace",mode:r.mode,label:a,isOver:/^\\over/.test(a),base:t[0]}},htmlBuilder:da,mathmlBuilder:(e,t)=>{var r=Yt(e.label);return new St(e.isOver?"mover":"munder",[Nt(e.base,t),r])}}),ot({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[1],n=_t(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:r.mode,href:n,body:ht(a)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=dt(e.body,t,!1);return function(e,t,r,a){var n=new V(e,[],r,a);return Ve(n),n}(e.href,0,r,t)},mathmlBuilder:(e,t)=>{var r=Et(e.body,t);return r instanceof St||(r=new St("mrow",[r])),r.setAttribute("href",e.href),r}}),ot({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=_t(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:a}))return r.formatUnsupportedCmd("\\url");for(var n=[],i=0;i<a.length;i++){var o=a[i];"~"===o&&(o="\\textasciitilde"),n.push({type:"textord",mode:"text",text:o})}var s={type:"text",mode:r.mode,font:"\\texttt",body:n};return{type:"href",mode:r.mode,href:a,body:ht(s)}}}),ot({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:r}=e;return{type:"hbox",mode:r.mode,body:ht(t[0])}},htmlBuilder(e,t){var r=dt(e.body,t,!1);return Ye(r)},mathmlBuilder:(e,t)=>new St("mrow",Rt(e.body,t))}),ot({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var r,{parser:n,funcName:i,token:o}=e,s=_t(t[0],"raw").string,l=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var h={};switch(i){case"\\htmlClass":h.class=s,r={command:"\\htmlClass",class:s};break;case"\\htmlId":h.id=s,r={command:"\\htmlId",id:s};break;case"\\htmlStyle":h.style=s,r={command:"\\htmlStyle",style:s};break;case"\\htmlData":for(var m=s.split(","),c=0;c<m.length;c++){var u=m[c],p=u.indexOf("=");if(p<0)throw new a("\\htmlData key/value '"+u+"' missing equals sign");var d=u.slice(0,p),g=u.slice(p+1);h["data-"+d.trim()]=g}r={command:"\\htmlData",attributes:h};break;default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(r)?{type:"html",mode:n.mode,attributes:h,body:ht(l)}:n.formatUnsupportedCmd(i)},htmlBuilder:(e,t)=>{var r=dt(e.body,t,!1),a=["enclosing"];e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/));var n=Fe(a,r,t);for(var i in e.attributes)"class"!==i&&e.attributes.hasOwnProperty(i)&&n.setAttribute(i,e.attributes[i]);return n},mathmlBuilder:(e,t)=>Et(e.body,t)}),ot({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:ht(t[0]),mathml:ht(t[1])}},htmlBuilder:(e,t)=>{var r=dt(e.html,t,!1);return Ye(r)},mathmlBuilder:(e,t)=>Et(e.mathml,t)});var ga=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new a("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!I(r))throw new a("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};ot({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,i={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(r[0])for(var h=_t(r[0],"raw").string.split(","),m=0;m<h.length;m++){var c=h[m].split("=");if(2===c.length){var u=c[1].trim();switch(c[0].trim()){case"alt":l=u;break;case"width":i=ga(u);break;case"height":o=ga(u);break;case"totalheight":s=ga(u);break;default:throw new a("Invalid key: '"+c[0]+"' in \\includegraphics.")}}}var p=_t(t[0],"url").url;return""===l&&(l=(l=(l=p).replace(/^.*[\\/]/,"")).substring(0,l.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:p})?{type:"includegraphics",mode:n.mode,alt:l,width:i,height:o,totalheight:s,src:p}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var r=H(e.height,t),a=0;e.totalheight.number>0&&(a=H(e.totalheight,t)-r);var n=0;e.width.number>0&&(n=H(e.width,t));var i={height:R(r+a)};n>0&&(i.width=R(n)),a>0&&(i.verticalAlign=R(-a));var o=new F(e.src,e.alt,i);return o.height=r,o.depth=a,o},mathmlBuilder:(e,t)=>{var r=new St("mglyph",[]);r.setAttribute("alt",e.alt);var a=H(e.height,t),n=0;if(e.totalheight.number>0&&(n=H(e.totalheight,t)-a,r.setAttribute("valign",R(-n))),r.setAttribute("height",R(a+n)),e.width.number>0){var i=H(e.width,t);r.setAttribute("width",R(i))}return r.setAttribute("src",e.src),r}}),ot({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=_t(t[0],"size");if(r.settings.strict){var i="m"===a[1],o="mu"===n.value.unit;i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, not "+n.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:n.value}},htmlBuilder:(e,t)=>je(e.dimension,t),mathmlBuilder(e,t){var r=H(e.dimension,t);return new At(r)}}),ot({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"lap",mode:r.mode,alignment:a.slice(5),body:n}},htmlBuilder:(e,t)=>{var r;"clap"===e.alignment?(r=Fe([],[xt(e.body,t)]),r=Fe(["inner"],[r],t)):r=Fe(["inner"],[xt(e.body,t)]);var a=Fe(["fix"],[]),n=Fe([e.alignment],[r,a],t),i=Fe(["strut"]);return i.style.height=R(n.height+n.depth),n.depth&&(i.style.verticalAlign=R(-n.depth)),n.children.unshift(i),n=Fe(["thinbox"],[n],t),Fe(["mord","vbox"],[n],t)},mathmlBuilder:(e,t)=>{var r=new St("mpadded",[Nt(e.body,t)]);if("rlap"!==e.alignment){var a="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",a+"width")}return r.setAttribute("width","0px"),r}}),ot({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:a}=e,n=a.mode;a.switchMode("math");var i="\\("===r?"\\)":"$",o=a.parseExpression(!1,i);return a.expect(i),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:o}}}),ot({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new a("Mismatched "+e.funcName)}});var fa=(e,t)=>{switch(t.style.size){case z.DISPLAY.size:return e.display;case z.TEXT.size:return e.text;case z.SCRIPT.size:return e.script;case z.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ot({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:ht(t[0]),text:ht(t[1]),script:ht(t[2]),scriptscript:ht(t[3])}},htmlBuilder:(e,t)=>{var r=fa(e,t),a=dt(r,t,!1);return Ye(a)},mathmlBuilder:(e,t)=>{var r=fa(e,t);return Et(r,t)}});var va=(e,t,r,a,n,i,o)=>{e=Fe([],[e]);var s,l,h,m=r&&c(r);if(t){var u=xt(t,a.havingStyle(n.sup()),a);l={elem:u,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-u.depth)}}if(r){var p=xt(r,a.havingStyle(n.sub()),a);s={elem:p,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-p.height)}}if(l&&s){var d=a.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;h=Xe({positionType:"bottom",positionData:d,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:R(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:R(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else if(s){var g=e.height-o;h=Xe({positionType:"top",positionData:g,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:R(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e}]})}else{if(!l)return e;var f=e.depth+o;h=Xe({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:R(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}var v=[h];if(s&&0!==i&&!m){var b=Fe(["mspace"],[],a);b.style.marginRight=R(i),v.unshift(b)}return Fe(["mop","op-limits"],v,a)},ba=new Set(["\\smallint"]),ya=(e,t)=>{var r,a,n,i=!1;"supsub"===e.type?(r=e.sup,a=e.sub,n=_t(e.base,"op"),i=!0):n=_t(e,"op");var o,s=t.style,l=!1;if(s.size===z.DISPLAY.size&&n.symbol&&!ba.has(n.name)&&(l=!0),n.symbol){var h=l?"Size2-Regular":"Size1-Regular",m="";if("\\oiint"!==n.name&&"\\oiiint"!==n.name||(m=n.name.slice(1),n.name="oiint"===m?"\\iint":"\\iiint"),o=Ne(n.name,h,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),m.length>0){var c=o.italic,u=Ke(m+"Size"+(l?"2":"1"),t);o=Xe({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:u,shift:l?.08:0}]}),n.name="\\"+m,o.classes.unshift("mop"),o.italic=c}}else if(n.body){var p=dt(n.body,t,!0);1===p.length&&p[0]instanceof U?(o=p[0]).classes[0]="mop":o=Fe(["mop"],p,t)}else{for(var d=[],g=1;g<n.name.length;g++)d.push(Oe(n.name[g],n.mode,t));o=Fe(["mop"],d,t)}var f=0,v=0;return(o instanceof U||"\\oiint"===n.name||"\\oiiint"===n.name)&&!n.suppressBaseShift&&(f=(o.height-o.depth)/2-t.fontMetrics().axisHeight,v=o.italic||0),i?va(o,r,a,t,s,v,f):(f&&(o.style.position="relative",o.style.top=R(f)),o)},xa=(e,t)=>{var r;if(e.symbol)r=new St("mo",[qt(e.name,e.mode)]),ba.has(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new St("mo",Rt(e.body,t));else{r=new St("mi",[new Mt(e.name.slice(1))]);var a=new St("mo",[qt("","text")]);r=e.parentIsSupSub?new St("mrow",[r,a]):zt([r,a])}return r},wa={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ot({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=a;return 1===n.length&&(n=wa[n]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:ya,mathmlBuilder:xa}),ot({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ht(a)}},htmlBuilder:ya,mathmlBuilder:xa});var ka={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ot({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:ya,mathmlBuilder:xa}),ot({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:ya,mathmlBuilder:xa}),ot({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:r}=e,a=r;return 1===a.length&&(a=ka[a]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:ya,mathmlBuilder:xa});var za=(e,t)=>{var r,a,n,i,o=!1;if("supsub"===e.type?(r=e.sup,a=e.sub,n=_t(e.base,"operatorname"),o=!0):n=_t(e,"operatorname"),n.body.length>0){for(var s=(n.body.map(e=>{var t="text"in e?e.text:void 0;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=dt(s,t.withFont("mathrm"),!0),h=0;h<l.length;h++){var m=l[h];m instanceof U&&(m.text=m.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}i=Fe(["mop"],l,t)}else i=Fe(["mop"],[],t);return o?va(i,r,a,t,t.style,0,0):i};function Sa(e,t,r){for(var a=dt(e,t,!1),n=t.sizeMultiplier/r.sizeMultiplier,i=0;i<a.length;i++){var o=a[i].classes.indexOf("sizing");o<0?Array.prototype.push.apply(a[i].classes,t.sizingClasses(r)):a[i].classes[o+1]==="reset-size"+t.size&&(a[i].classes[o+1]="reset-size"+r.size),a[i].height*=n,a[i].depth*=n}return Ye(a)}ot({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"operatorname",mode:r.mode,body:ht(n),alwaysHandleSupSub:"\\operatornamewithlimits"===a,limits:!1,parentIsSupSub:!1}},htmlBuilder:za,mathmlBuilder:(e,t)=>{for(var r=Rt(e.body,t.withFont("mathrm")),a=!0,n=0;n<r.length;n++){var i=r[n];if(i instanceof At);else if(i instanceof St)switch(i.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":var o=i.children[0];1===i.children.length&&o instanceof Mt?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):a=!1;break;default:a=!1}else a=!1}if(a){var s=r.map(e=>e.toText()).join("");r=[new Mt(s)]}var l=new St("mi",r);l.setAttribute("mathvariant","normal");var h=new St("mo",[qt("","text")]);return e.parentIsSupSub?new St("mrow",[l,h]):zt([l,h])}}),_r("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),st({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?Ye(dt(e.body,t,!1)):Fe(["mord"],dt(e.body,t,!0),t),mathmlBuilder:(e,t)=>Et(e.body,t,!0)}),ot({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,a=t[0];return{type:"overline",mode:r.mode,body:a}},htmlBuilder(e,t){var r=xt(e.body,t.havingCrampedStyle()),a=Ue("overline-line",t),n=t.fontMetrics().defaultRuleThickness,i=Xe({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]});return Fe(["mord","overline"],[i],t)},mathmlBuilder(e,t){var r=new St("mo",[new Mt("‾")]);r.setAttribute("stretchy","true");var a=new St("mover",[Nt(e.body,t),r]);return a.setAttribute("accent","true"),a}}),ot({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"phantom",mode:r.mode,body:ht(a)}},htmlBuilder:(e,t)=>{var r=dt(e.body,t.withPhantom(),!1);return Ye(r)},mathmlBuilder:(e,t)=>{var r=Rt(e.body,t);return new St("mphantom",r)}}),_r("\\hphantom","\\smash{\\phantom{#1}}"),ot({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"vphantom",mode:r.mode,body:a}},htmlBuilder:(e,t)=>{var r=Fe(["inner"],[xt(e.body,t.withPhantom())]),a=Fe(["fix"],[]);return Fe(["mord","rlap"],[r,a],t)},mathmlBuilder:(e,t)=>{var r=Rt(ht(e.body),t),a=new St("mphantom",r),n=new St("mpadded",[a]);return n.setAttribute("width","0px"),n}}),ot({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,a=_t(t[0],"size").value,n=t[1];return{type:"raisebox",mode:r.mode,dy:a,body:n}},htmlBuilder(e,t){var r=xt(e.body,t),a=H(e.dy,t);return Xe({positionType:"shift",positionData:-a,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new St("mpadded",[Nt(e.body,t)]),a=e.dy.number+e.dy.unit;return r.setAttribute("voffset",a),r}}),ot({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),ot({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:a}=e,n=r[0],i=_t(t[0],"size"),o=_t(t[1],"size");return{type:"rule",mode:a.mode,shift:n&&_t(n,"size").value,width:i.value,height:o.value}},htmlBuilder(e,t){var r=Fe(["mord","rule"],[],t),a=H(e.width,t),n=H(e.height,t),i=e.shift?H(e.shift,t):0;return r.style.borderRightWidth=R(a),r.style.borderTopWidth=R(n),r.style.bottom=R(i),r.width=a,r.height=n+i,r.depth=-i,r.maxFontSize=1.125*n*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=H(e.width,t),a=H(e.height,t),n=e.shift?H(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new St("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",R(r)),o.setAttribute("height",R(a));var s=new St("mpadded",[o]);return n>=0?s.setAttribute("height",R(n)):(s.setAttribute("height",R(n)),s.setAttribute("depth",R(-n))),s.setAttribute("voffset",R(n)),s}});var Ma=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];ot({type:"sizing",names:Ma,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!1,r);return{type:"sizing",mode:n.mode,size:Ma.indexOf(a)+1,body:i}},htmlBuilder:(e,t)=>{var r=t.havingSize(e.size);return Sa(e.body,r,t)},mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),a=Rt(e.body,r),n=new St("mstyle",a);return n.setAttribute("mathsize",R(r.sizeMultiplier)),n}}),ot({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:a}=e,n=!1,i=!1,o=r[0]&&_t(r[0],"ordgroup");if(o)for(var s="",l=0;l<o.body.length;++l)if("t"===(s=$t(o.body[l]).text))n=!0;else{if("b"!==s){n=!1,i=!1;break}i=!0}else n=!0,i=!0;var h=t[0];return{type:"smash",mode:a.mode,body:h,smashHeight:n,smashDepth:i}},htmlBuilder:(e,t)=>{var r=Fe([],[xt(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0),e.smashDepth&&(r.depth=0),e.smashHeight&&e.smashDepth)return Fe(["mord","smash"],[r],t);if(r.children)for(var a=0;a<r.children.length;a++)e.smashHeight&&(r.children[a].height=0),e.smashDepth&&(r.children[a].depth=0);var n=Xe({positionType:"firstBaseline",children:[{type:"elem",elem:r}]});return Fe(["mord"],[n],t)},mathmlBuilder:(e,t)=>{var r=new St("mpadded",[Nt(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),ot({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a}=e,n=r[0],i=t[0];return{type:"sqrt",mode:a.mode,body:i,index:n}},htmlBuilder(e,t){var r=xt(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=We(r,t);var a=t.fontMetrics().defaultRuleThickness,n=a;t.style.id<z.TEXT.id&&(n=t.fontMetrics().xHeight);var i=a+n/4,o=r.height+r.depth+i+a,{span:s,ruleWidth:l,advanceWidth:h}=function(e,t){var r,a,n=t.havingBaseSizing(),i=Or("\\surd",e*n.sizeMultiplier,Er,n),o=n.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,h=0,m=0;return"small"===i.type?(e<1?o=1:e<1.4&&(o=.7),h=(1+s)/o,(r=Ar("sqrtMain",l=(1+s+Mr)/o,m=1e3+1e3*s+80,s,t)).style.minWidth="0.853em",a=.833/o):"large"===i.type?(m=1080*Cr[i.size],h=(Cr[i.size]+s)/o,l=(Cr[i.size]+s+Mr)/o,(r=Ar("sqrtSize"+i.size,l,m,s,t)).style.minWidth="1.02em",a=1/o):(l=e+s+Mr,h=e+s,m=Math.floor(1e3*e+s)+80,(r=Ar("sqrtTall",l,m,s,t)).style.minWidth="0.742em",a=1.056),r.height=h,r.style.height=R(l),{span:r,advanceWidth:a,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}}(o,t),m=s.height-l;m>r.height+r.depth+i&&(i=(i+m-r.height-r.depth)/2);var c=s.height-r.height-i-l;r.style.paddingLeft=R(h);var u=Xe({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+c)},{type:"elem",elem:s},{type:"kern",size:l}]});if(e.index){var p=t.havingStyle(z.SCRIPTSCRIPT),d=xt(e.index,p,t),g=.6*(u.height-u.depth),f=Xe({positionType:"shift",positionData:-g,children:[{type:"elem",elem:d}]}),v=Fe(["root"],[f]);return Fe(["mord","sqrt"],[v,u],t)}return Fe(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){var{body:r,index:a}=e;return a?new St("mroot",[Nt(r,t),Nt(a,t)]):new St("msqrt",[Nt(r,t)])}});var Aa={display:z.DISPLAY,text:z.TEXT,script:z.SCRIPT,scriptscript:z.SCRIPTSCRIPT};ot({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!0,r),o=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:o,body:i}},htmlBuilder(e,t){var r=Aa[e.style],a=t.havingStyle(r).withFont("");return Sa(e.body,a,t)},mathmlBuilder(e,t){var r=Aa[e.style],a=t.havingStyle(r),n=Rt(e.body,a),i=new St("mstyle",n),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}}),st({type:"supsub",htmlBuilder(e,t){var r=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===z.DISPLAY.size||r.alwaysHandleSupSub)?ya:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===z.DISPLAY.size||r.limits)?za:null:"accent"===r.type?c(r.base)?Jt:null:"horizBrace"===r.type&&!e.sub===r.isOver?da:null:null}(e,t);if(r)return r(e,t);var a,n,i,{base:o,sup:s,sub:l}=e,h=xt(o,t),m=t.fontMetrics(),u=0,p=0,d=o&&c(o);if(s){var g=t.havingStyle(t.style.sup());a=xt(s,g,t),d||(u=h.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier)}if(l){var f=t.havingStyle(t.style.sub());n=xt(l,f,t),d||(p=h.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}i=t.style===z.DISPLAY?m.sup1:t.style.cramped?m.sup3:m.sup2;var v,b=t.sizeMultiplier,y=R(.5/m.ptPerEm/b),x=null;if(n){var w=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(h instanceof U||w)&&(x=R(-h.italic))}if(a&&n){u=Math.max(u,i,a.depth+.25*m.xHeight),p=Math.max(p,m.sub2);var k=4*m.defaultRuleThickness;if(u-a.depth-(n.height-p)<k){p=k-(u-a.depth)+n.height;var S=.8*m.xHeight-(u-a.depth);S>0&&(u+=S,p-=S)}v=Xe({positionType:"individualShift",children:[{type:"elem",elem:n,shift:p,marginRight:y,marginLeft:x},{type:"elem",elem:a,shift:-u,marginRight:y}]})}else if(n)p=Math.max(p,m.sub1,n.height-.8*m.xHeight),v=Xe({positionType:"shift",positionData:p,children:[{type:"elem",elem:n,marginLeft:x,marginRight:y}]});else{if(!a)throw new Error("supsub must have either sup or sub.");u=Math.max(u,i,a.depth+.25*m.xHeight),v=Xe({positionType:"shift",positionData:-u,children:[{type:"elem",elem:a,marginRight:y}]})}var M=bt(h,"right")||"mord";return Fe([M],[h,Fe(["msupsub"],[v])],t)},mathmlBuilder(e,t){var r,a=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(a=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var n,i=[Nt(e.base,t)];if(e.sub&&i.push(Nt(e.sub,t)),e.sup&&i.push(Nt(e.sup,t)),a)n=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;n=o&&"op"===o.type&&o.limits&&t.style===z.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===z.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;n=s&&"op"===s.type&&s.limits&&(t.style===z.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===z.DISPLAY)?"munder":"msub"}else{var l=e.base;n=l&&"op"===l.type&&l.limits&&(t.style===z.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===z.DISPLAY)?"mover":"msup"}return new St(n,i)}}),st({type:"atom",htmlBuilder:(e,t)=>Oe(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var r=new St("mo",[qt(e.text,e.mode)]);if("bin"===e.family){var a=It(e,t);"bold-italic"===a&&r.setAttribute("mathvariant",a)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var Ta={mi:"italic",mn:"normal",mtext:"normal"};st({type:"mathord",htmlBuilder:(e,t)=>De(e,t,"mathord"),mathmlBuilder(e,t){var r=new St("mi",[qt(e.text,e.mode,t)]),a=It(e,t)||"italic";return a!==Ta[r.type]&&r.setAttribute("mathvariant",a),r}}),st({type:"textord",htmlBuilder:(e,t)=>De(e,t,"textord"),mathmlBuilder(e,t){var r,a=qt(e.text,e.mode,t),n=It(e,t)||"normal";return r="text"===e.mode?new St("mtext",[a]):/[0-9]/.test(e.text)?new St("mn",[a]):"\\prime"===e.text?new St("mo",[a]):new St("mi",[a]),n!==Ta[r.type]&&r.setAttribute("mathvariant",n),r}});var Ba={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},qa={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};st({type:"spacing",htmlBuilder(e,t){if(qa.hasOwnProperty(e.text)){var r=qa[e.text].className||"";if("text"===e.mode){var n=De(e,t,"textord");return n.classes.push(r),n}return Fe(["mspace",r],[Oe(e.text,e.mode,t)],t)}if(Ba.hasOwnProperty(e.text))return Fe(["mspace",Ba[e.text]],[],t);throw new a('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!qa.hasOwnProperty(e.text)){if(Ba.hasOwnProperty(e.text))return new St("mspace");throw new a('Unknown type of space "'+e.text+'"')}return new St("mtext",[new Mt(" ")])}});var Ca=()=>{var e=new St("mtd",[]);return e.setAttribute("width","50%"),e};st({type:"tag",mathmlBuilder(e,t){var r=new St("mtable",[new St("mtr",[Ca(),new St("mtd",[Et(e.body,t)]),Ca(),new St("mtd",[Et(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var Ia={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ha={"\\textbf":"textbf","\\textmd":"textmd"},Ra={"\\textit":"textit","\\textup":"textup"},Ea=(e,t)=>{var r=e.font;return r?Ia[r]?t.withTextFontFamily(Ia[r]):Ha[r]?t.withTextFontWeight(Ha[r]):"\\emph"===r?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Ra[r]):t};ot({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"text",mode:r.mode,body:ht(n),font:a}},htmlBuilder(e,t){var r=Ea(e,t),a=dt(e.body,r,!0);return Fe(["mord","text"],a,r)},mathmlBuilder(e,t){var r=Ea(e,t);return Et(e.body,r)}}),ot({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=xt(e.body,t),a=Ue("underline-line",t),n=t.fontMetrics().defaultRuleThickness,i=Xe({positionType:"top",positionData:r.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:r}]});return Fe(["mord","underline"],[i],t)},mathmlBuilder(e,t){var r=new St("mo",[new Mt("‾")]);r.setAttribute("stretchy","true");var a=new St("munder",[Nt(e.body,t),r]);return a.setAttribute("accentunder","true"),a}}),ot({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=xt(e.body,t),a=t.fontMetrics().axisHeight,n=.5*(r.height-a-(r.depth+a));return Xe({positionType:"shift",positionData:n,children:[{type:"elem",elem:r}]})},mathmlBuilder:(e,t)=>new St("mpadded",[Nt(e.body,t)],["vcenter"])}),ot({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new a("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=Na(e),a=[],n=t.havingStyle(t.style.text()),i=0;i<r.length;i++){var o=r[i];"~"===o&&(o="\\textasciitilde"),a.push(Ne(o,"Typewriter-Regular",e.mode,n,["mord","texttt"]))}return Fe(["mord","text"].concat(n.sizingClasses(t)),Pe(a),n)},mathmlBuilder(e,t){var r=new Mt(Na(e)),a=new St("mtext",[r]);return a.setAttribute("mathvariant","monospace"),a}});var Na=e=>e.body.replace(/ /g,e.star?"␣":" "),Oa=at,Da="[ \r\n\t]",La="(\\\\[a-zA-Z@]+)"+Da+"*",Pa="[̀-ͯ]",Va=new RegExp(Pa+"+$"),Fa="("+Da+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧-豈-]"+Pa+"*|[\ud800-\udbff][\udc00-\udfff]"+Pa+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+La+"|\\\\[^\ud800-\udfff])";class Ga{constructor(e,t){this.input=e,this.settings=t,this.tokenRegex=new RegExp(Fa,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Zr("EOF",new $r(this,t,t));var r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new a("Unexpected character: '"+e[t]+"'",new Zr(e[t],new $r(this,t,t+1)));var n=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[n]){var i=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===i?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new Zr(n,new $r(this,t,this.tokenRegex.lastIndex))}}class Ua{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new a("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,r){if(void 0===r&&(r=!1),r){for(var a=0;a<this.undefStack.length;a++)delete this.undefStack[a][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var n=this.undefStack[this.undefStack.length-1];n&&!n.hasOwnProperty(e)&&(n[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var Ya=jr;_r("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),_r("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),_r("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),_r("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),_r("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),_r("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),_r("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var Wa={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};_r("\\char",function(e){var t,r=e.popToken(),n=0;if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])n=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new a("\\char` missing argument");n=r.text.charCodeAt(0)}else t=10;if(t){if(null==(n=Wa[r.text])||n>=t)throw new a("Invalid base-"+t+" digit "+r.text);for(var i;null!=(i=Wa[e.future().text])&&i<t;)n*=t,n+=i,e.popToken()}return"\\@char{"+n+"}"});var Xa=(e,t,r,n)=>{var i=e.consumeArg().tokens;if(1!==i.length)throw new a("\\newcommand's first argument must be a macro name");var o=i[0].text,s=e.isDefined(o);if(s&&!t)throw new a("\\newcommand{"+o+"} attempting to redefine "+o+"; use \\renewcommand");if(!s&&!r)throw new a("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var l=0;if(1===(i=e.consumeArg().tokens).length&&"["===i[0].text){for(var h="",m=e.expandNextToken();"]"!==m.text&&"EOF"!==m.text;)h+=m.text,m=e.expandNextToken();if(!h.match(/^\s*[0-9]+\s*$/))throw new a("Invalid number of arguments: "+h);l=parseInt(h),i=e.consumeArg().tokens}return s&&n||e.macros.set(o,{tokens:i,numArgs:l}),""};_r("\\newcommand",e=>Xa(e,!1,!0,!1)),_r("\\renewcommand",e=>Xa(e,!0,!1,!1)),_r("\\providecommand",e=>Xa(e,!0,!0,!0)),_r("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join("")),""}),_r("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join("")),""}),_r("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Oa[r],ee.math[r],ee.text[r]),""}),_r("\\bgroup","{"),_r("\\egroup","}"),_r("~","\\nobreakspace"),_r("\\lq","`"),_r("\\rq","'"),_r("\\aa","\\r a"),_r("\\AA","\\r A"),_r("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),_r("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),_r("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),_r("ℬ","\\mathscr{B}"),_r("ℰ","\\mathscr{E}"),_r("ℱ","\\mathscr{F}"),_r("ℋ","\\mathscr{H}"),_r("ℐ","\\mathscr{I}"),_r("ℒ","\\mathscr{L}"),_r("ℳ","\\mathscr{M}"),_r("ℛ","\\mathscr{R}"),_r("ℭ","\\mathfrak{C}"),_r("ℌ","\\mathfrak{H}"),_r("ℨ","\\mathfrak{Z}"),_r("\\Bbbk","\\Bbb{k}"),_r("\\llap","\\mathllap{\\textrm{#1}}"),_r("\\rlap","\\mathrlap{\\textrm{#1}}"),_r("\\clap","\\mathclap{\\textrm{#1}}"),_r("\\mathstrut","\\vphantom{(}"),_r("\\underbar","\\underline{\\text{#1}}"),_r("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}'),_r("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),_r("\\ne","\\neq"),_r("≠","\\neq"),_r("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),_r("∉","\\notin"),_r("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),_r("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),_r("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),_r("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),_r("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),_r("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),_r("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),_r("⟂","\\perp"),_r("‼","\\mathclose{!\\mkern-0.8mu!}"),_r("∌","\\notni"),_r("⌜","\\ulcorner"),_r("⌝","\\urcorner"),_r("⌞","\\llcorner"),_r("⌟","\\lrcorner"),_r("©","\\copyright"),_r("®","\\textregistered"),_r("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),_r("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),_r("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),_r("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),_r("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),_r("⋮","\\vdots"),_r("\\varGamma","\\mathit{\\Gamma}"),_r("\\varDelta","\\mathit{\\Delta}"),_r("\\varTheta","\\mathit{\\Theta}"),_r("\\varLambda","\\mathit{\\Lambda}"),_r("\\varXi","\\mathit{\\Xi}"),_r("\\varPi","\\mathit{\\Pi}"),_r("\\varSigma","\\mathit{\\Sigma}"),_r("\\varUpsilon","\\mathit{\\Upsilon}"),_r("\\varPhi","\\mathit{\\Phi}"),_r("\\varPsi","\\mathit{\\Psi}"),_r("\\varOmega","\\mathit{\\Omega}"),_r("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),_r("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),_r("\\boxed","\\fbox{$\\displaystyle{#1}$}"),_r("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),_r("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),_r("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),_r("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),_r("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var ja={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},_a=new Set(["bin","rel"]);_r("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in ja?t=ja[r]:("\\not"===r.slice(0,4)||r in ee.math&&_a.has(ee.math[r].group))&&(t="\\dotsb"),t});var $a={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};_r("\\dotso",function(e){return e.future().text in $a?"\\ldots\\,":"\\ldots"}),_r("\\dotsc",function(e){var t=e.future().text;return t in $a&&","!==t?"\\ldots\\,":"\\ldots"}),_r("\\cdots",function(e){return e.future().text in $a?"\\@cdots\\,":"\\@cdots"}),_r("\\dotsb","\\cdots"),_r("\\dotsm","\\cdots"),_r("\\dotsi","\\!\\cdots"),_r("\\dotsx","\\ldots\\,"),_r("\\DOTSI","\\relax"),_r("\\DOTSB","\\relax"),_r("\\DOTSX","\\relax"),_r("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),_r("\\,","\\tmspace+{3mu}{.1667em}"),_r("\\thinspace","\\,"),_r("\\>","\\mskip{4mu}"),_r("\\:","\\tmspace+{4mu}{.2222em}"),_r("\\medspace","\\:"),_r("\\;","\\tmspace+{5mu}{.2777em}"),_r("\\thickspace","\\;"),_r("\\!","\\tmspace-{3mu}{.1667em}"),_r("\\negthinspace","\\!"),_r("\\negmedspace","\\tmspace-{4mu}{.2222em}"),_r("\\negthickspace","\\tmspace-{5mu}{.277em}"),_r("\\enspace","\\kern.5em "),_r("\\enskip","\\hskip.5em\\relax"),_r("\\quad","\\hskip1em\\relax"),_r("\\qquad","\\hskip2em\\relax"),_r("\\tag","\\@ifstar\\tag@literal\\tag@paren"),_r("\\tag@paren","\\tag@literal{({#1})}"),_r("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new a("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),_r("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),_r("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),_r("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),_r("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),_r("\\newline","\\\\\\relax"),_r("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Za=R(j["Main-Regular"]["T".charCodeAt(0)][1]-.7*j["Main-Regular"]["A".charCodeAt(0)][1]);_r("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Za+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),_r("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Za+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),_r("\\hspace","\\@ifstar\\@hspacer\\@hspace"),_r("\\@hspace","\\hskip #1\\relax"),_r("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),_r("\\ordinarycolon",":"),_r("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),_r("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),_r("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),_r("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),_r("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),_r("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),_r("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),_r("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),_r("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),_r("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),_r("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),_r("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),_r("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),_r("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),_r("∷","\\dblcolon"),_r("∹","\\eqcolon"),_r("≔","\\coloneqq"),_r("≕","\\eqqcolon"),_r("⩴","\\Coloneqq"),_r("\\ratio","\\vcentcolon"),_r("\\coloncolon","\\dblcolon"),_r("\\colonequals","\\coloneqq"),_r("\\coloncolonequals","\\Coloneqq"),_r("\\equalscolon","\\eqqcolon"),_r("\\equalscoloncolon","\\Eqqcolon"),_r("\\colonminus","\\coloneq"),_r("\\coloncolonminus","\\Coloneq"),_r("\\minuscolon","\\eqcolon"),_r("\\minuscoloncolon","\\Eqcolon"),_r("\\coloncolonapprox","\\Colonapprox"),_r("\\coloncolonsim","\\Colonsim"),_r("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),_r("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),_r("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),_r("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),_r("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),_r("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),_r("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),_r("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),_r("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),_r("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),_r("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),_r("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),_r("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),_r("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),_r("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),_r("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),_r("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),_r("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),_r("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),_r("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),_r("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),_r("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),_r("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),_r("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),_r("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),_r("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),_r("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),_r("\\imath","\\html@mathml{\\@imath}{ı}"),_r("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),_r("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),_r("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),_r("⟦","\\llbracket"),_r("⟧","\\rrbracket"),_r("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),_r("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),_r("⦃","\\lBrace"),_r("⦄","\\rBrace"),_r("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),_r("⦵","\\minuso"),_r("\\darr","\\downarrow"),_r("\\dArr","\\Downarrow"),_r("\\Darr","\\Downarrow"),_r("\\lang","\\langle"),_r("\\rang","\\rangle"),_r("\\uarr","\\uparrow"),_r("\\uArr","\\Uparrow"),_r("\\Uarr","\\Uparrow"),_r("\\N","\\mathbb{N}"),_r("\\R","\\mathbb{R}"),_r("\\Z","\\mathbb{Z}"),_r("\\alef","\\aleph"),_r("\\alefsym","\\aleph"),_r("\\Alpha","\\mathrm{A}"),_r("\\Beta","\\mathrm{B}"),_r("\\bull","\\bullet"),_r("\\Chi","\\mathrm{X}"),_r("\\clubs","\\clubsuit"),_r("\\cnums","\\mathbb{C}"),_r("\\Complex","\\mathbb{C}"),_r("\\Dagger","\\ddagger"),_r("\\diamonds","\\diamondsuit"),_r("\\empty","\\emptyset"),_r("\\Epsilon","\\mathrm{E}"),_r("\\Eta","\\mathrm{H}"),_r("\\exist","\\exists"),_r("\\harr","\\leftrightarrow"),_r("\\hArr","\\Leftrightarrow"),_r("\\Harr","\\Leftrightarrow"),_r("\\hearts","\\heartsuit"),_r("\\image","\\Im"),_r("\\infin","\\infty"),_r("\\Iota","\\mathrm{I}"),_r("\\isin","\\in"),_r("\\Kappa","\\mathrm{K}"),_r("\\larr","\\leftarrow"),_r("\\lArr","\\Leftarrow"),_r("\\Larr","\\Leftarrow"),_r("\\lrarr","\\leftrightarrow"),_r("\\lrArr","\\Leftrightarrow"),_r("\\Lrarr","\\Leftrightarrow"),_r("\\Mu","\\mathrm{M}"),_r("\\natnums","\\mathbb{N}"),_r("\\Nu","\\mathrm{N}"),_r("\\Omicron","\\mathrm{O}"),_r("\\plusmn","\\pm"),_r("\\rarr","\\rightarrow"),_r("\\rArr","\\Rightarrow"),_r("\\Rarr","\\Rightarrow"),_r("\\real","\\Re"),_r("\\reals","\\mathbb{R}"),_r("\\Reals","\\mathbb{R}"),_r("\\Rho","\\mathrm{P}"),_r("\\sdot","\\cdot"),_r("\\sect","\\S"),_r("\\spades","\\spadesuit"),_r("\\sub","\\subset"),_r("\\sube","\\subseteq"),_r("\\supe","\\supseteq"),_r("\\Tau","\\mathrm{T}"),_r("\\thetasym","\\vartheta"),_r("\\weierp","\\wp"),_r("\\Zeta","\\mathrm{Z}"),_r("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),_r("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),_r("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),_r("\\bra","\\mathinner{\\langle{#1}|}"),_r("\\ket","\\mathinner{|{#1}\\rangle}"),_r("\\braket","\\mathinner{\\langle{#1}\\rangle}"),_r("\\Bra","\\left\\langle#1\\right|"),_r("\\Ket","\\left|#1\\right\\rangle");var Ka=e=>t=>{var r=t.consumeArg().tokens,a=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=t=>r=>{e&&(r.macros.set("|",o),n.length&&r.macros.set("\\|",s));var i=t;return!t&&n.length&&"|"===r.future().text&&(r.popToken(),i=!0),{tokens:i?n:a,numArgs:0}};t.macros.set("|",l(!1)),n.length&&t.macros.set("\\|",l(!0));var h=t.consumeArg().tokens,m=t.expandTokens([...i,...h,...r]);return t.macros.endGroup(),{tokens:m.reverse(),numArgs:0}};_r("\\bra@ket",Ka(!1)),_r("\\bra@set",Ka(!0)),_r("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),_r("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),_r("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),_r("\\angln","{\\angl n}"),_r("\\blue","\\textcolor{##6495ed}{#1}"),_r("\\orange","\\textcolor{##ffa500}{#1}"),_r("\\pink","\\textcolor{##ff00af}{#1}"),_r("\\red","\\textcolor{##df0030}{#1}"),_r("\\green","\\textcolor{##28ae7b}{#1}"),_r("\\gray","\\textcolor{gray}{#1}"),_r("\\purple","\\textcolor{##9d38bd}{#1}"),_r("\\blueA","\\textcolor{##ccfaff}{#1}"),_r("\\blueB","\\textcolor{##80f6ff}{#1}"),_r("\\blueC","\\textcolor{##63d9ea}{#1}"),_r("\\blueD","\\textcolor{##11accd}{#1}"),_r("\\blueE","\\textcolor{##0c7f99}{#1}"),_r("\\tealA","\\textcolor{##94fff5}{#1}"),_r("\\tealB","\\textcolor{##26edd5}{#1}"),_r("\\tealC","\\textcolor{##01d1c1}{#1}"),_r("\\tealD","\\textcolor{##01a995}{#1}"),_r("\\tealE","\\textcolor{##208170}{#1}"),_r("\\greenA","\\textcolor{##b6ffb0}{#1}"),_r("\\greenB","\\textcolor{##8af281}{#1}"),_r("\\greenC","\\textcolor{##74cf70}{#1}"),_r("\\greenD","\\textcolor{##1fab54}{#1}"),_r("\\greenE","\\textcolor{##0d923f}{#1}"),_r("\\goldA","\\textcolor{##ffd0a9}{#1}"),_r("\\goldB","\\textcolor{##ffbb71}{#1}"),_r("\\goldC","\\textcolor{##ff9c39}{#1}"),_r("\\goldD","\\textcolor{##e07d10}{#1}"),_r("\\goldE","\\textcolor{##a75a05}{#1}"),_r("\\redA","\\textcolor{##fca9a9}{#1}"),_r("\\redB","\\textcolor{##ff8482}{#1}"),_r("\\redC","\\textcolor{##f9685d}{#1}"),_r("\\redD","\\textcolor{##e84d39}{#1}"),_r("\\redE","\\textcolor{##bc2612}{#1}"),_r("\\maroonA","\\textcolor{##ffbde0}{#1}"),_r("\\maroonB","\\textcolor{##ff92c6}{#1}"),_r("\\maroonC","\\textcolor{##ed5fa6}{#1}"),_r("\\maroonD","\\textcolor{##ca337c}{#1}"),_r("\\maroonE","\\textcolor{##9e034e}{#1}"),_r("\\purpleA","\\textcolor{##ddd7ff}{#1}"),_r("\\purpleB","\\textcolor{##c6b9fc}{#1}"),_r("\\purpleC","\\textcolor{##aa87ff}{#1}"),_r("\\purpleD","\\textcolor{##7854ab}{#1}"),_r("\\purpleE","\\textcolor{##543b78}{#1}"),_r("\\mintA","\\textcolor{##f5f9e8}{#1}"),_r("\\mintB","\\textcolor{##edf2df}{#1}"),_r("\\mintC","\\textcolor{##e0e5cc}{#1}"),_r("\\grayA","\\textcolor{##f6f7f7}{#1}"),_r("\\grayB","\\textcolor{##f0f1f2}{#1}"),_r("\\grayC","\\textcolor{##e3e5e6}{#1}"),_r("\\grayD","\\textcolor{##d6d8da}{#1}"),_r("\\grayE","\\textcolor{##babec2}{#1}"),_r("\\grayF","\\textcolor{##888d93}{#1}"),_r("\\grayG","\\textcolor{##626569}{#1}"),_r("\\grayH","\\textcolor{##3b3e40}{#1}"),_r("\\grayI","\\textcolor{##21242c}{#1}"),_r("\\kaBlue","\\textcolor{##314453}{#1}"),_r("\\kaGreen","\\textcolor{##71B307}{#1}");var Ja={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Qa{constructor(e,t,r){this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Ua(Ya,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Ga(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,r,a;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:a,end:r}=this.consumeArg(["]"]))}else({tokens:a,start:t,end:r}=this.consumeArg());return this.pushToken(new Zr("EOF",r.loc)),this.pushTokens(a),new Zr("",$r.range(t,r))}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var n,i=this.future(),o=0,s=0;do{if(n=this.popToken(),t.push(n),"{"===n.text)++o;else if("}"===n.text){if(-1===--o)throw new a("Extra }",n)}else if("EOF"===n.text)throw new a("Unexpected end of input in a macro argument, expected '"+(e&&r?e[s]:"}")+"'",n);if(e&&r)if((0===o||1===o&&"{"===e[s])&&n.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==o||r);return"{"===i.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:n}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new a("The length of delimiters doesn't match the number of args!");for(var r=t[0],n=0;n<r.length;n++){var i=this.popToken();if(r[n]!==i.text)throw new a("Use of the macro doesn't match its definition",i)}}for(var o=[],s=0;s<e;s++)o.push(this.consumeArg(t&&t[s+1]).tokens);return o}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new a("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,n=t.noexpand?null:this._getExpansion(r);if(null==n||e&&n.unexpandable){if(e&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new a("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var i=n.tokens,o=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var s=(i=i.slice()).length-1;s>=0;--s){var l=i[s];if("#"===l.text){if(0===s)throw new a("Incomplete placeholder at end of macro body",l);if("#"===(l=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new a("Not a valid argument number",l);i.splice(s,2,...o[+l.text-1])}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Zr(e)]):void 0}expandTokens(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){var a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),t.push(a)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map(e=>e.text).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var a="function"==typeof t?t(this):t;if("string"==typeof a){var n=0;if(a.includes("#"))for(var i=a.replace(/##/g,"");i.includes("#"+(n+1));)++n;for(var o=new Ga(a,this.settings),s=[],l=o.lex();"EOF"!==l.text;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:n}}return a}isDefined(e){return this.macros.has(e)||Oa.hasOwnProperty(e)||ee.math.hasOwnProperty(e)||ee.text.hasOwnProperty(e)||Ja.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Oa.hasOwnProperty(e)&&!Oa[e].primitive}}var en=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,tn=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9",ₐ:"a",ₑ:"e",ₕ:"h",ᵢ:"i",ⱼ:"j",ₖ:"k",ₗ:"l",ₘ:"m",ₙ:"n",ₒ:"o",ₚ:"p",ᵣ:"r",ₛ:"s",ₜ:"t",ᵤ:"u",ᵥ:"v",ₓ:"x",ᵦ:"β",ᵧ:"γ",ᵨ:"ρ",ᵩ:"ϕ",ᵪ:"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9",ᴬ:"A",ᴮ:"B",ᴰ:"D",ᴱ:"E",ᴳ:"G",ᴴ:"H",ᴵ:"I",ᴶ:"J",ᴷ:"K",ᴸ:"L",ᴹ:"M",ᴺ:"N",ᴼ:"O",ᴾ:"P",ᴿ:"R",ᵀ:"T",ᵁ:"U",ⱽ:"V",ᵂ:"W",ᵃ:"a",ᵇ:"b",ᶜ:"c",ᵈ:"d",ᵉ:"e",ᶠ:"f",ᵍ:"g",ʰ:"h",ⁱ:"i",ʲ:"j",ᵏ:"k",ˡ:"l",ᵐ:"m",ⁿ:"n",ᵒ:"o",ᵖ:"p",ʳ:"r",ˢ:"s",ᵗ:"t",ᵘ:"u",ᵛ:"v",ʷ:"w",ˣ:"x",ʸ:"y",ᶻ:"z",ᵝ:"β",ᵞ:"γ",ᵟ:"δ",ᵠ:"ϕ",ᵡ:"χ",ᶿ:"θ"}),rn={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},an={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class nn{constructor(e,t){this.mode="math",this.gullet=new Qa(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new a("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Zr("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(nn.endOfExpression.has(a.text))break;if(t&&a.text===t)break;if(e&&Oa[a.text]&&Oa[a.text].infix)break;var n=this.parseAtom(t);if(!n)break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r=-1,n=0;n<e.length;n++){var i=e[n];if("infix"===i.type){if(-1!==r)throw new a("only one infix operator per group",i.token);r=n,t=i.replaceWith}}if(-1!==r&&t){var o,s,l=e.slice(0,r),h=e.slice(r+1);return o=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},s=1===h.length&&"ordgroup"===h[0].type?h[0]:{type:"ordgroup",mode:this.mode,body:h},["\\\\abovefrac"===t?this.callFunction(t,[o,e[r],s],[]):this.callFunction(t,[o,s],[])]}return e}handleSupSubscript(e){var t,r=this.fetch(),n=r.text;this.consume(),this.consumeSpaces();do{var i;t=this.parseGroup(e)}while("internal"===(null==(i=t)?void 0:i.type));if(!t)throw new a("Expected group after '"+n+"'",r);return t}formatUnsupportedCmd(e){for(var t=[],r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});var a={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[a]}}parseAtom(e){var t,r,n=this.parseGroup("atom",e);if("internal"===(null==n?void 0:n.type))return n;if("text"===this.mode)return n;for(;;){this.consumeSpaces();var i=this.fetch();if("\\limits"===i.text||"\\nolimits"===i.text){if(n&&"op"===n.type){var o="\\limits"===i.text;n.limits=o,n.alwaysHandleSupSub=!0}else{if(!n||"operatorname"!==n.type)throw new a("Limit controls must follow a math operator",i);n.alwaysHandleSupSub&&(n.limits="\\limits"===i.text)}this.consume()}else if("^"===i.text){if(t)throw new a("Double superscript",i);t=this.handleSupSubscript("superscript")}else if("_"===i.text){if(r)throw new a("Double subscript",i);r=this.handleSupSubscript("subscript")}else if("'"===i.text){if(t)throw new a("Double superscript",i);var s={type:"textord",mode:this.mode,text:"\\prime"},l=[s];for(this.consume();"'"===this.fetch().text;)l.push(s),this.consume();"^"===this.fetch().text&&l.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:l}}else{if(!tn[i.text])break;var h=en.test(i.text),m=[];for(m.push(new Zr(tn[i.text])),this.consume();;){var c=this.fetch().text;if(!tn[c])break;if(en.test(c)!==h)break;m.unshift(new Zr(tn[c])),this.consume()}var u=this.subparse(m);h?r={type:"ordgroup",mode:"math",body:u}:t={type:"ordgroup",mode:"math",body:u}}}return t||r?{type:"supsub",mode:this.mode,base:n,sup:t,sub:r}:n}parseFunction(e,t){var r=this.fetch(),n=r.text,i=Oa[n];if(!i)return null;if(this.consume(),t&&"atom"!==t&&!i.allowedInArgument)throw new a("Got function '"+n+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!i.allowedInText)throw new a("Can't use function '"+n+"' in text mode",r);if("math"===this.mode&&!1===i.allowedInMath)throw new a("Can't use function '"+n+"' in math mode",r);var{args:o,optArgs:s}=this.parseArguments(n,i);return this.callFunction(n,o,s,r,e)}callFunction(e,t,r,n,i){var o={funcName:e,parser:this,token:n,breakOnTokenText:i},s=Oa[e];if(s&&s.handler)return s.handler(o,t,r);throw new a("No function handler for "+e)}parseArguments(e,t){var r=t.numArgs+t.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};for(var n=[],i=[],o=0;o<r;o++){var s=t.argTypes&&t.argTypes[o],l=o<t.numOptionalArgs;("primitive"in t&&t.primitive&&null==s||"sqrt"===t.type&&1===o&&null==i[0])&&(s="primitive");var h=this.parseGroupOfType("argument to '"+e+"'",s,l);if(l)i.push(h);else{if(null==h)throw new a("Null argument, please report this as a bug");n.push(h)}}return{args:n,optArgs:i}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":var n=this.parseArgumentGroup(r,"text");return null!=n?{type:"styling",mode:n.mode,body:[n],style:"text"}:null;case"raw":var i=this.parseStringGroup("raw",r);return null!=i?{type:"raw",mode:"text",string:i.text}:null;case"primitive":if(r)throw new a("A primitive argument cannot be optional");var o=this.parseGroup(e);if(null==o)throw new a("Expected group as "+e,this.fetch());return o;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new a("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var r=this.gullet.scanArgument(t);if(null==r)return null;for(var a,n="";"EOF"!==(a=this.fetch()).text;)n+=a.text,this.consume();return this.consume(),r.text=n,r}parseRegexGroup(e,t){for(var r,n=this.fetch(),i=n,o="";"EOF"!==(r=this.fetch()).text&&e.test(o+r.text);)o+=(i=r).text,this.consume();if(""===o)throw new a("Invalid "+t+": '"+n.text+"'",n);return n.range(i,o)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var r=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!r)throw new a("Invalid color: '"+t.text+"'",t);var n=r[0];return/^[0-9a-f]{6}$/i.test(n)&&(n="#"+n),{type:"color-token",mode:this.mode,color:n}}parseSizeGroup(e){var t,r=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",r=!0);var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!n)throw new a("Invalid size: '"+t.text+"'",t);var i={number:+(n[1]+n[2]),unit:n[3]};if(!I(i))throw new a("Invalid unit: '"+i.unit+"'",t);return{type:"size",mode:this.mode,value:i,isBlank:r}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var r=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(e,t){var r=this.gullet.scanArgument(e);if(null==r)return null;var a=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var n=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var i={type:"ordgroup",mode:this.mode,loc:r.loc,body:n};return t&&this.switchMode(a),i}parseGroup(e,t){var r,n=this.fetch(),i=n.text;if("{"===i||"\\begingroup"===i){this.consume();var o="{"===i?"}":"\\endgroup";this.gullet.beginGroup();var s=this.parseExpression(!1,o),l=this.fetch();this.expect(o),this.gullet.endGroup(),r={type:"ordgroup",mode:this.mode,loc:$r.range(n,l),body:s,semisimple:"\\begingroup"===i||void 0}}else if(null==(r=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===i[0]&&!Ja.hasOwnProperty(i)){if(this.settings.throwOnError)throw new a("Undefined control sequence: "+i,n);r=this.formatUnsupportedCmd(i),this.consume()}return r}formLigatures(e){for(var t=e.length-1,r=0;r<t;++r){var a=e[r];if("textord"===a.type){var n=a.text,i=e[r+1];if(i&&"textord"===i.type){if("-"===n&&"-"===i.text){var o=e[r+2];r+1<t&&o&&"textord"===o.type&&"-"===o.text?(e.splice(r,3,{type:"textord",mode:"text",loc:$r.range(a,o),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:$r.range(a,i),text:"--"}),t-=1)}"'"!==n&&"`"!==n||i.text!==n||(e.splice(r,2,{type:"textord",mode:"text",loc:$r.range(a,i),text:n+n}),t-=1)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var r=t.slice(5),n="*"===r.charAt(0);if(n&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new a("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:r=r.slice(1,-1),star:n}}an.hasOwnProperty(t[0])&&!ee[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=an[t[0]]+t.slice(1));var i,o=Va.exec(t);if(o&&("i"===(t=t.substring(0,o.index))?t="ı":"j"===t&&(t="ȷ")),ee[this.mode][t]){this.settings.strict&&"math"===this.mode&&"ÐÞþ".includes(t)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var s,l=ee[this.mode][t].group,h=$r.range(e);if(J.hasOwnProperty(l)){var m=l;s={type:"atom",mode:this.mode,family:m,loc:h,text:t}}else s={type:l,mode:this.mode,loc:h,text:t};i=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(A(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),i={type:"textord",mode:"text",loc:$r.range(e),text:t}}if(this.consume(),o)for(var c=0;c<o[0].length;c++){var u=o[0][c];if(!rn[u])throw new a("Unknown accent ' "+u+"'",e);var p=rn[u][this.mode]||rn[u].text;if(!p)throw new a("Accent "+u+" unsupported in "+this.mode+" mode",e);i={type:"accent",mode:this.mode,loc:$r.range(e),label:p,isStretchy:!1,isShifty:!0,base:i}}return i}}nn.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var on=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new nn(e,t);delete r.gullet.macros.current["\\df@tag"];var n=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new a("\\tag works only in display equations");n=[{type:"tag",mode:"text",body:n,tag:r.subparse([new Zr("\\df@tag")])}]}return n},sn=function(e,t,r){t.textContent="";var a=hn(e,r).toNode();t.appendChild(a)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),sn=function(){throw new a("KaTeX doesn't work in quirks mode.")});var ln=function(e,t,r){if(r.throwOnError||!(e instanceof a))throw e;var n=Fe(["katex-error"],[new U(t)]);return n.setAttribute("title",e.toString()),n.setAttribute("style","color:"+r.errorColor),n},hn=function(e,t){var r=new d(t);try{return function(e,t,r){var a,n=Ft(r);if("mathml"===r.output)return Ot(e,t,n,r.displayMode,!0);if("html"===r.output){var i=kt(e,n);a=Fe(["katex"],[i])}else{var o=Ot(e,t,n,r.displayMode,!1),s=kt(e,n);a=Fe(["katex"],[o,s])}return Gt(a,r)}(on(e,r),e,r)}catch(t){return ln(t,e,r)}},mn={version:"0.16.40",render:sn,renderToString:function(e,t){return hn(e,t).toMarkup()},ParseError:a,SETTINGS_SCHEMA:u,__parse:function(e,t){var r=new d(t);return on(e,r)},__renderToDomTree:hn,__renderToHTMLTree:function(e,t){var r=new d(t);try{return function(e,t,r){var a=kt(e,Ft(r)),n=Fe(["katex"],[a]);return Gt(n,r)}(on(e,r),0,r)}catch(t){return ln(t,e,r)}},__setFontMetrics:function(e,t){j[e]=t},__defineSymbol:te,__defineFunction:ot,__defineMacro:_r,__domTree:{Span:P,Anchor:V,SymbolNode:U,SvgNode:Y,PathNode:W,LineNode:X}}}}]); -
mindcat/trunk/build/620.js
r3467811 r3489132 1 "use strict";(globalThis.webpackChunkmindcat=globalThis.webpackChunkmindcat||[]).push([[620],{7620(e,n,r){r.d(n,{Zp:()=>te});var t=r(6087),o=r(697);class i{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,n=e._prev;if(n!==e)return a(n),n}enqueue(e){var n=this._sentinel;e._prev&&e._next&&a(e),e._next=n._next,n._next._prev=e,n._next=e,e._prev=n}toString(){for(var e=[],n=this._sentinel,r=n._prev;r!==n;)e.push(JSON.stringify(r,s)),r=r._prev;return"["+e.join(", ")+"]"}}function a(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function s(e,n){if("_next"!==e&&"_prev"!==e)return n}var d=t.constant(1);function u(e,n,r,o,i){var a=i?[]:void 0;return t.forEach(e.inEdges(o.v),function(t){var o=e.edge(t),s=e.node(t.v);i&&a.push({v:t.v,w:t.w}),s.out-=o,c(n,r,s)}),t.forEach(e.outEdges(o.v),function(t){var o=e.edge(t),i=t.w,a=e.node(i);a.in-=o,c(n,r,a)}),e.removeNode(o.v),a}function c(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function h(e){var n="greedy"===e.graph().acyclicer?function(e,n){if(e.nodeCount()<=1)return[];var r=function(e,n){var r=new o.T,a=0,s=0;t.forEach(e.nodes(),function(e){r.setNode(e,{v:e,in:0,out:0})}),t.forEach(e.edges(),function(e){var t=r.edge(e.v,e.w)||0,o=n(e),i=t+o;r.setEdge(e.v,e.w,i),s=Math.max(s,r.node(e.v).out+=o),a=Math.max(a,r.node(e.w).in+=o)});var d=t.range(s+a+3).map(function(){return new i}),u=a+1;return t.forEach(r.nodes(),function(e){c(d,u,r.node(e))}),{graph:r,buckets:d,zeroIdx:u}}(e,n||d),a=function(e,n,r){for(var t,o=[],i=n[n.length-1],a=n[0];e.nodeCount();){for(;t=a.dequeue();)u(e,n,r,t);for(;t=i.dequeue();)u(e,n,r,t);if(e.nodeCount())for(var s=n.length-2;s>0;--s)if(t=n[s].dequeue()){o=o.concat(u(e,n,r,t,!0));break}}return o}(r.graph,r.buckets,r.zeroIdx);return t.flatten(t.map(a,function(n){return e.outEdges(n.v,n.w)}))}(e,function(e){return function(n){return e.edge(n).weight}}(e)):function(e){var n=[],r={},o={};return t.forEach(e.nodes(),function i(a){Object.prototype.hasOwnProperty.call(o,a)||(o[a]=!0,r[a]=!0,t.forEach(e.outEdges(a),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):i(e.w)}),delete r[a])}),n}(e);t.forEach(n,function(n){var r=e.edge(n);e.removeEdge(n),r.forwardName=n.name,r.reversed=!0,e.setEdge(n.w,n.v,r,t.uniqueId("rev"))})}function f(e,n,r,o){var i;do{i=t.uniqueId(o)}while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function l(e){var n=new o.T({multigraph:e.isMultigraph()}).setGraph(e.graph());return t.forEach(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),t.forEach(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function g(e,n){var r,t,o=e.x,i=e.y,a=n.x-o,s=n.y-i,d=e.width/2,u=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*d>Math.abs(a)*u?(s<0&&(u=-u),r=u*a/s,t=u):(a<0&&(d=-d),r=d,t=d*s/a),{x:o+r,y:i+t}}function v(e){var n=t.map(t.range(m(e)+1),function(){return[]});return t.forEach(e.nodes(),function(r){var o=e.node(r),i=o.rank;t.isUndefined(i)||(n[i][o.order]=r)}),n}function p(e,n,r,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=t),f(e,"border",o,n)}function m(e){return t.max(t.map(e.nodes(),function(n){var r=e.node(n).rank;if(!t.isUndefined(r))return r}))}function w(e,n){var r=t.now();try{return n()}finally{console.log(e+" time: "+(t.now()-r)+"ms")}}function b(e,n){return n()}function E(e,n,r,t,o,i){var a={width:0,height:0,rank:i,borderType:n},s=o[n][i-1],d=f(e,"border",a,r);o[n][i]=d,e.setParent(d,t),s&&e.setEdge(s,d,{weight:1})}function y(e){t.forEach(e.nodes(),function(n){_(e.node(n))}),t.forEach(e.edges(),function(n){_(e.edge(n))})}function _(e){var n=e.width;e.width=e.height,e.height=n}function k(e){e.y=-e.y}function x(e){var n=e.x;e.x=e.y,e.y=n}function O(e){var n={};t.forEach(e.sources(),function r(o){var i=e.node(o);if(Object.prototype.hasOwnProperty.call(n,o))return i.rank;n[o]=!0;var a=t.min(t.map(e.outEdges(o),function(n){return r(n.w)-e.edge(n).minlen}));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),i.rank=a})}function N(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function P(e){var n,r,t=new o.T({directed:!1}),i=e.nodes()[0],a=e.nodeCount();for(t.setNode(i,{});C(t,e)<a;)n=j(t,e),r=t.hasNode(n.v)?N(e,n):-N(e,n),I(t,e,r);return t}function C(e,n){return t.forEach(e.nodes(),function r(o){t.forEach(n.nodeEdges(o),function(t){var i=t.v,a=o===i?t.w:i;e.hasNode(a)||N(n,t)||(e.setNode(a,{}),e.setEdge(o,a,{}),r(a))})}),e.nodeCount()}function j(e,n){return t.minBy(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return N(n,r)})}function I(e,n,r){t.forEach(e.nodes(),function(e){n.node(e).rank+=r})}function L(e,n,r){t.isArray(n)||(n=[n]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return t.each(n,function(n){if(!e.hasNode(n))throw new Error("Graph does not have node: "+n);T(e,n,"post"===r,a,o,i)}),i}function T(e,n,r,o,i,a){Object.prototype.hasOwnProperty.call(o,n)||(o[n]=!0,r||a.push(n),t.each(i(n),function(n){T(e,n,r,o,i,a)}),r&&a.push(n))}function M(e){e=function(e){var n=(new o.T).setGraph(e.graph());return t.forEach(e.nodes(),function(r){n.setNode(r,e.node(r))}),t.forEach(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},o=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})}),n}(e),O(e);var n,r=P(e);for(D(r),R(r,e);n=S(r);)V(r,e,n,U(r,e,n))}function R(e,n){var r=function(e,n){return L(e,n,"post")}(e,e.nodes());r=r.slice(0,r.length-1),t.forEach(r,function(r){!function(e,n,r){var t=e.node(r).parent;e.edge(r,t).cutvalue=F(e,n,r)}(e,n,r)})}function F(e,n,r){var o=e.node(r).parent,i=!0,a=n.edge(r,o),s=0;return a||(i=!1,a=n.edge(o,r)),s=a.weight,t.forEach(n.nodeEdges(r),function(t){var a,d,u=t.v===r,c=u?t.w:t.v;if(c!==o){var h=u===i,f=n.edge(t).weight;if(s+=h?f:-f,a=r,d=c,e.hasEdge(a,d)){var l=e.edge(r,c).cutvalue;s+=h?-l:l}}}),s}function D(e,n){arguments.length<2&&(n=e.nodes()[0]),B(e,{},1,n)}function B(e,n,r,o,i){var a=r,s=e.node(o);return n[o]=!0,t.forEach(e.neighbors(o),function(t){Object.prototype.hasOwnProperty.call(n,t)||(r=B(e,n,r,t,o))}),s.low=a,s.lim=r++,i?s.parent=i:delete s.parent,r}function S(e){return t.find(e.edges(),function(n){return e.edge(n).cutvalue<0})}function U(e,n,r){var o=r.v,i=r.w;n.hasEdge(o,i)||(o=r.w,i=r.v);var a=e.node(o),s=e.node(i),d=a,u=!1;a.lim>s.lim&&(d=s,u=!0);var c=t.filter(n.edges(),function(n){return u===G(0,e.node(n.v),d)&&u!==G(0,e.node(n.w),d)});return t.minBy(c,function(e){return N(n,e)})}function V(e,n,r,o){var i=r.v,a=r.w;e.removeEdge(i,a),e.setEdge(o.v,o.w,{}),D(e),R(e,n),function(e,n){var r=t.find(e.nodes(),function(e){return!n.node(e).parent}),o=function(e,n){return L(e,n,"pre")}(e,r);o=o.slice(1),t.forEach(o,function(r){var t=e.node(r).parent,o=n.edge(r,t),i=!1;o||(o=n.edge(t,r),i=!0),n.node(r).rank=n.node(t).rank+(i?o.minlen:-o.minlen)})}(e,n)}function G(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function q(e){switch(e.graph().ranker){case"network-simplex":default:!function(e){M(e)}(e);break;case"tight-tree":!function(e){O(e),P(e)}(e);break;case"longest-path":Y(e)}}t.constant(1),t.constant(1),new Error,r(1365),M.initLowLimValues=D,M.initCutValues=R,M.calcCutValue=F,M.leaveEdge=S,M.enterEdge=U,M.exchangeEdges=V;var Y=O;function z(e){var n=f(e,"root",{},"_root"),r=function(e){var n={};function r(o,i){var a=e.children(o);a&&a.length&&t.forEach(a,function(e){r(e,i+1)}),n[o]=i}return t.forEach(e.children(),function(e){r(e,1)}),n}(e),o=t.max(t.values(r))-1,i=2*o+1;e.graph().nestingRoot=n,t.forEach(e.edges(),function(n){e.edge(n).minlen*=i});var a=function(e){return t.reduce(e.edges(),function(n,r){return n+e.edge(r).weight},0)}(e)+1;t.forEach(e.children(),function(t){A(e,n,i,a,o,r,t)}),e.graph().nodeRankFactor=i}function A(e,n,r,o,i,a,s){var d=e.children(s);if(d.length){var u=p(e,"_bt"),c=p(e,"_bb"),h=e.node(s);e.setParent(u,s),h.borderTop=u,e.setParent(c,s),h.borderBottom=c,t.forEach(d,function(t){A(e,n,r,o,i,a,t);var d=e.node(t),h=d.borderTop?d.borderTop:t,f=d.borderBottom?d.borderBottom:t,l=d.borderTop?o:2*o,g=h!==f?1:i-a[s]+1;e.setEdge(u,h,{weight:l,minlen:g,nestingEdge:!0}),e.setEdge(f,c,{weight:l,minlen:g,nestingEdge:!0})}),e.parent(s)||e.setEdge(n,u,{weight:0,minlen:i+a[s]})}else s!==n&&e.setEdge(n,s,{weight:0,minlen:r})}function J(e,n){for(var r=0,t=1;t<n.length;++t)r+=Z(e,n[t-1],n[t]);return r}function Z(e,n,r){for(var o=t.zipObject(r,t.map(r,function(e,n){return n})),i=t.flatten(t.map(n,function(n){return t.sortBy(t.map(e.outEdges(n),function(n){return{pos:o[n.w],weight:e.edge(n).weight}}),"pos")})),a=1;a<r.length;)a<<=1;var s=2*a-1;a-=1;var d=t.map(new Array(s),function(){return 0}),u=0;return t.forEach(i.forEach(function(e){var n=e.pos+a;d[n]+=e.weight;for(var r=0;n>0;)n%2&&(r+=d[n+1]),d[n=n-1>>1]+=e.weight;u+=e.weight*r})),u}function H(e,n){var r,o=function(e){var n={lhs:[],rhs:[]};return t.forEach(e,function(e){var r;r=e,Object.prototype.hasOwnProperty.call(r,"barycenter")?n.lhs.push(e):n.rhs.push(e)}),n}(e),i=o.lhs,a=t.sortBy(o.rhs,function(e){return-e.i}),s=[],d=0,u=0,c=0;i.sort((r=!!n,function(e,n){return e.barycenter<n.barycenter?-1:e.barycenter>n.barycenter?1:r?n.i-e.i:e.i-n.i})),c=K(s,a,c),t.forEach(i,function(e){c+=e.vs.length,s.push(e.vs),d+=e.barycenter*e.weight,u+=e.weight,c=K(s,a,c)});var h={vs:t.flatten(s)};return u&&(h.barycenter=d/u,h.weight=u),h}function K(e,n,r){for(var o;n.length&&(o=t.last(n)).i<=r;)n.pop(),e.push(o.vs),r++;return r}function Q(e,n,r,o){var i=e.children(n),a=e.node(n),s=a?a.borderLeft:void 0,d=a?a.borderRight:void 0,u={};s&&(i=t.filter(i,function(e){return e!==s&&e!==d}));var c=function(e,n){return t.map(n,function(n){var r=e.inEdges(n);if(r.length){var o=t.reduce(r,function(n,r){var t=e.edge(r),o=e.node(r.v);return{sum:n.sum+t.weight*o.order,weight:n.weight+t.weight}},{sum:0,weight:0});return{v:n,barycenter:o.sum/o.weight,weight:o.weight}}return{v:n}})}(e,i);t.forEach(c,function(n){if(e.children(n.v).length){var i=Q(e,n.v,r,o);u[n.v]=i,Object.prototype.hasOwnProperty.call(i,"barycenter")&&(a=n,s=i,t.isUndefined(a.barycenter)?(a.barycenter=s.barycenter,a.weight=s.weight):(a.barycenter=(a.barycenter*a.weight+s.barycenter*s.weight)/(a.weight+s.weight),a.weight+=s.weight))}var a,s});var h=function(e,n){var r={};return t.forEach(e,function(e,n){var o=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};t.isUndefined(e.barycenter)||(o.barycenter=e.barycenter,o.weight=e.weight)}),t.forEach(n.edges(),function(e){var n=r[e.v],o=r[e.w];t.isUndefined(n)||t.isUndefined(o)||(o.indegree++,n.out.push(r[e.w]))}),function(e){var n=[];function r(e){return function(n){var r,o,i,a;n.merged||(t.isUndefined(n.barycenter)||t.isUndefined(e.barycenter)||n.barycenter>=e.barycenter)&&(o=n,i=0,a=0,(r=e).weight&&(i+=r.barycenter*r.weight,a+=r.weight),o.weight&&(i+=o.barycenter*o.weight,a+=o.weight),r.vs=o.vs.concat(r.vs),r.barycenter=i/a,r.weight=a,r.i=Math.min(o.i,r.i),o.merged=!0)}}function o(n){return function(r){r.in.push(n),0===--r.indegree&&e.push(r)}}for(;e.length;){var i=e.pop();n.push(i),t.forEach(i.in.reverse(),r(i)),t.forEach(i.out,o(i))}return t.map(t.filter(n,function(e){return!e.merged}),function(e){return t.pick(e,["vs","i","barycenter","weight"])})}(t.filter(r,function(e){return!e.indegree}))}(c,r);!function(e,n){t.forEach(e,function(e){e.vs=t.flatten(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}(h,u);var f=H(h,o);if(s&&(f.vs=t.flatten([s,f.vs,d]),e.predecessors(s).length)){var l=e.node(e.predecessors(s)[0]),g=e.node(e.predecessors(d)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+l.order+g.order)/(f.weight+2),f.weight+=2}return f}function W(e,n,r){return t.map(n,function(n){return function(e,n,r){var i=function(e){for(var n;e.hasNode(n=t.uniqueId("_root")););return n}(e),a=new o.T({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(n){return e.node(n)});return t.forEach(e.nodes(),function(o){var s=e.node(o),d=e.parent(o);(s.rank===n||s.minRank<=n&&n<=s.maxRank)&&(a.setNode(o),a.setParent(o,d||i),t.forEach(e[r](o),function(n){var r=n.v===o?n.w:n.v,i=a.edge(r,o),s=t.isUndefined(i)?0:i.weight;a.setEdge(r,o,{weight:e.edge(n).weight+s})}),Object.prototype.hasOwnProperty.call(s,"minRank")&&a.setNode(o,{borderLeft:s.borderLeft[n],borderRight:s.borderRight[n]}))}),a}(e,n,r)})}function X(e,n){var r=new o.T;t.forEach(e,function(e){var o=e.graph().root,i=Q(e,o,r,n);t.forEach(i.vs,function(n,r){e.node(n).order=r}),function(e,n,r){var o,i={};t.forEach(r,function(r){for(var t,a,s=e.parent(r);s;){if((t=e.parent(s))?(a=i[t],i[t]=s):(a=o,o=s),a&&a!==s)return void n.setEdge(a,s);s=t}})}(e,r,i.vs)})}function $(e,n){t.forEach(n,function(n){t.forEach(n,function(n,r){e.node(n).order=r})})}function ee(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var o=e[n];Object.defineProperty(o,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function ne(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function re(e){var n,r=v(e),i=t.merge(function(e,n){var r={};return t.reduce(n,function(n,o){var i=0,a=0,s=n.length,d=t.last(o);return t.forEach(o,function(n,u){var c=function(e,n){if(e.node(n).dummy)return t.find(e.predecessors(n),function(n){return e.node(n).dummy})}(e,n),h=c?e.node(c).order:s;(c||n===d)&&(t.forEach(o.slice(a,u+1),function(n){t.forEach(e.predecessors(n),function(t){var o=e.node(t),a=o.order;!(a<i||h<a)||o.dummy&&e.node(n).dummy||ee(r,t,n)})}),a=u+1,i=h)}),o}),r}(e,r),function(e,n){var r={};function o(n,o,i,a,s){var d;t.forEach(t.range(o,i),function(o){d=n[o],e.node(d).dummy&&t.forEach(e.predecessors(d),function(n){var t=e.node(n);t.dummy&&(t.order<a||t.order>s)&&ee(r,n,d)})})}return t.reduce(n,function(n,r){var i,a=-1,s=0;return t.forEach(r,function(t,d){if("border"===e.node(t).dummy){var u=e.predecessors(t);u.length&&(i=e.node(u[0]).order,o(r,s,d,a,i),s=d,a=i)}o(r,s,r.length,i,n.length)}),r}),r}(e,r)),a={};t.forEach(["u","d"],function(s){n="u"===s?r:t.values(r).reverse(),t.forEach(["l","r"],function(r){"r"===r&&(n=t.map(n,function(e){return t.values(e).reverse()}));var d=("u"===s?e.predecessors:e.successors).bind(e),u=function(e,n,r,o){var i={},a={},s={};return t.forEach(n,function(e){t.forEach(e,function(e,n){i[e]=e,a[e]=e,s[e]=n})}),t.forEach(n,function(e){var n=-1;t.forEach(e,function(e){var d=o(e);if(d.length){d=t.sortBy(d,function(e){return s[e]});for(var u=(d.length-1)/2,c=Math.floor(u),h=Math.ceil(u);c<=h;++c){var f=d[c];a[e]===e&&n<s[f]&&!ne(r,e,f)&&(a[f]=e,a[e]=i[e]=i[f],n=s[f])}}})}),{root:i,align:a}}(0,n,i,d),c=function(e,n,r,i,a){var s={},d=function(e,n,r,i){var a=new o.T,s=e.graph(),d=function(e,n,r){return function(t,o,i){var a,s=t.node(o),d=t.node(i),u=0;if(u+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":a=-s.width/2;break;case"r":a=s.width/2}if(a&&(u+=r?a:-a),a=0,u+=(s.dummy?n:e)/2,u+=(d.dummy?n:e)/2,u+=d.width/2,Object.prototype.hasOwnProperty.call(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":a=d.width/2;break;case"r":a=-d.width/2}return a&&(u+=r?a:-a),a=0,u}}(s.nodesep,s.edgesep,i);return t.forEach(n,function(n){var o;t.forEach(n,function(n){var t=r[n];if(a.setNode(t),o){var i=r[o],s=a.edge(i,t);a.setEdge(i,t,Math.max(d(e,n,o),s||0))}o=n})}),a}(e,n,r,a),u=a?"borderLeft":"borderRight";function c(e,n){for(var r=d.nodes(),t=r.pop(),o={};t;)o[t]?e(t):(o[t]=!0,r.push(t),r=r.concat(n(t))),t=r.pop()}return c(function(e){s[e]=d.inEdges(e).reduce(function(e,n){return Math.max(e,s[n.v]+d.edge(n))},0)},d.predecessors.bind(d)),c(function(n){var r=d.outEdges(n).reduce(function(e,n){return Math.min(e,s[n.w]-d.edge(n))},Number.POSITIVE_INFINITY),t=e.node(n);r!==Number.POSITIVE_INFINITY&&t.borderType!==u&&(s[n]=Math.max(s[n],r))},d.successors.bind(d)),t.forEach(i,function(e){s[e]=s[r[e]]}),s}(e,n,u.root,u.align,"r"===r);"r"===r&&(c=t.mapValues(c,function(e){return-e})),a[s+r]=c})});var s=function(e,n){return t.minBy(t.values(n),function(n){var r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return t.forIn(n,function(n,t){var i=function(e,n){return e.node(n).width}(e,t)/2;r=Math.max(n+i,r),o=Math.min(n-i,o)}),r-o})}(e,a);return function(e,n){var r=t.values(n),o=t.min(r),i=t.max(r);t.forEach(["u","d"],function(r){t.forEach(["l","r"],function(a){var s,d=r+a,u=e[d];if(u!==n){var c=t.values(u);(s="l"===a?o-t.min(c):i-t.max(c))&&(e[d]=t.mapValues(u,function(e){return e+s}))}})})}(a,s),function(e,n){return t.mapValues(e.ul,function(r,o){if(n)return e[n.toLowerCase()][o];var i=t.sortBy(t.map(e,o));return(i[1]+i[2])/2})}(a,e.graph().align)}function te(e,n){var r=n&&n.debugTiming?w:b;r("layout",()=>{var n=r(" buildLayoutGraph",()=>function(e){var n=new o.T({multigraph:!0,compound:!0}),r=le(e.graph());return n.setGraph(t.merge({},ie,fe(r,oe),t.pick(r,ae))),t.forEach(e.nodes(),function(r){var o=le(e.node(r));n.setNode(r,t.defaults(fe(o,se),de)),n.setParent(r,e.parent(r))}),t.forEach(e.edges(),function(r){var o=le(e.edge(r));n.setEdge(r,t.merge({},ce,fe(o,ue),t.pick(o,he)))}),n}(e));r(" runLayout",()=>function(e,n){n(" makeSpaceForEdgeLabels",()=>function(e){var n=e.graph();n.ranksep/=2,t.forEach(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}(e)),n(" removeSelfEdges",()=>function(e){t.forEach(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}(e)),n(" acyclic",()=>h(e)),n(" nestingGraph.run",()=>z(e)),n(" rank",()=>q(l(e))),n(" injectEdgeLabelProxies",()=>function(e){t.forEach(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),o={rank:(e.node(n.w).rank-t.rank)/2+t.rank,e:n};f(e,"edge-proxy",o,"_ep")}})}(e)),n(" removeEmptyRanks",()=>function(e){var n=t.min(t.map(e.nodes(),function(n){return e.node(n).rank})),r=[];t.forEach(e.nodes(),function(t){var o=e.node(t).rank-n;r[o]||(r[o]=[]),r[o].push(t)});var o=0,i=e.graph().nodeRankFactor;t.forEach(r,function(n,r){t.isUndefined(n)&&r%i!==0?--o:o&&t.forEach(n,function(n){e.node(n).rank+=o})})}(e)),n(" nestingGraph.cleanup",()=>function(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,t.forEach(e.edges(),function(n){e.edge(n).nestingEdge&&e.removeEdge(n)})}(e)),n(" normalizeRanks",()=>function(e){var n=t.min(t.map(e.nodes(),function(n){return e.node(n).rank}));t.forEach(e.nodes(),function(r){var o=e.node(r);t.has(o,"rank")&&(o.rank-=n)})}(e)),n(" assignRankMinMax",()=>function(e){var n=0;t.forEach(e.nodes(),function(r){var o=e.node(r);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,n=t.max(n,o.maxRank))}),e.graph().maxRank=n}(e)),n(" removeEdgeLabelProxies",()=>function(e){t.forEach(e.nodes(),function(n){var r=e.node(n);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}(e)),n(" normalize.run",()=>function(e){e.graph().dummyChains=[],t.forEach(e.edges(),function(n){!function(e,n){var r=n.v,t=e.node(r).rank,o=n.w,i=e.node(o).rank,a=n.name,s=e.edge(n),d=s.labelRank;if(i!==t+1){e.removeEdge(n);var u,c,h=void 0;for(c=0,++t;t<i;++c,++t)s.points=[],u=f(e,"edge",h={width:0,height:0,edgeLabel:s,edgeObj:n,rank:t},"_d"),t===d&&(h.width=s.width,h.height=s.height,h.dummy="edge-label",h.labelpos=s.labelpos),e.setEdge(r,u,{weight:s.weight},a),0===c&&e.graph().dummyChains.push(u),r=u;e.setEdge(r,o,{weight:s.weight},a)}}(e,n)})}(e)),n(" parentDummyChains",()=>function(e){var n=function(e){var n={},r=0;return t.forEach(e.children(),function o(i){var a=r;t.forEach(e.children(i),o),n[i]={low:a,lim:r++}}),n}(e);t.forEach(e.graph().dummyChains,function(r){for(var t=e.node(r),o=t.edgeObj,i=function(e,n,r,t){var o,i,a=[],s=[],d=Math.min(n[r].low,n[t].low),u=Math.max(n[r].lim,n[t].lim);o=r;do{o=e.parent(o),a.push(o)}while(o&&(n[o].low>d||u>n[o].lim));for(i=o,o=t;(o=e.parent(o))!==i;)s.push(o);return{path:a.concat(s.reverse()),lca:i}}(e,n,o.v,o.w),a=i.path,s=i.lca,d=0,u=a[d],c=!0;r!==o.w;){if(t=e.node(r),c){for(;(u=a[d])!==s&&e.node(u).maxRank<t.rank;)d++;u===s&&(c=!1)}if(!c){for(;d<a.length-1&&e.node(u=a[d+1]).minRank<=t.rank;)d++;u=a[d]}e.setParent(r,u),r=e.successors(r)[0]}})}(e)),n(" addBorderSegments",()=>function(e){t.forEach(e.children(),function n(r){var o=e.children(r),i=e.node(r);if(o.length&&t.forEach(o,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,s=i.maxRank+1;a<s;++a)E(e,"borderLeft","_bl",r,i,a),E(e,"borderRight","_br",r,i,a)}})}(e)),n(" order",()=>function(e){var n=m(e),r=W(e,t.range(1,n+1),"inEdges"),o=W(e,t.range(n-1,-1,-1),"outEdges"),i=function(e){var n={},r=t.filter(e.nodes(),function(n){return!e.children(n).length}),o=t.max(t.map(r,function(n){return e.node(n).rank})),i=t.map(t.range(o+1),function(){return[]}),a=t.sortBy(r,function(n){return e.node(n).rank});return t.forEach(a,function r(o){if(!t.has(n,o)){n[o]=!0;var a=e.node(o);i[a.rank].push(o),t.forEach(e.successors(o),r)}}),i}(e);$(e,i);for(var a,s=Number.POSITIVE_INFINITY,d=0,u=0;u<4;++d,++u){X(d%2?r:o,d%4>=2);var c=J(e,i=v(e));c<s&&(u=0,a=t.cloneDeep(i),s=c)}$(e,a)}(e)),n(" insertSelfEdges",()=>function(e){var n=v(e);t.forEach(n,function(n){var r=0;t.forEach(n,function(n,o){var i=e.node(n);i.order=o+r,t.forEach(i.selfEdges,function(n){f(e,"selfedge",{width:n.label.width,height:n.label.height,rank:i.rank,order:o+ ++r,e:n.e,label:n.label},"_se")}),delete i.selfEdges})})}(e)),n(" adjustCoordinateSystem",()=>function(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||y(e)}(e)),n(" position",()=>function(e){(function(e){var n=v(e),r=e.graph().ranksep,o=0;t.forEach(n,function(n){var i=t.max(t.map(n,function(n){return e.node(n).height}));t.forEach(n,function(n){e.node(n).y=o+i/2}),o+=i+r})})(e=l(e)),t.forOwn(re(e),function(n,r){e.node(r).x=n})}(e)),n(" positionSelfEdges",()=>function(e){t.forEach(e.nodes(),function(n){var r=e.node(n);if("selfedge"===r.dummy){var t=e.node(r.e.v),o=t.x+t.width/2,i=t.y,a=r.x-o,s=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:o+2*a/3,y:i-s},{x:o+5*a/6,y:i-s},{x:o+a,y:i},{x:o+5*a/6,y:i+s},{x:o+2*a/3,y:i+s}],r.label.x=r.x,r.label.y=r.y}})}(e)),n(" removeBorderNodes",()=>function(e){t.forEach(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),o=e.node(r.borderTop),i=e.node(r.borderBottom),a=e.node(t.last(r.borderLeft)),s=e.node(t.last(r.borderRight));r.width=Math.abs(s.x-a.x),r.height=Math.abs(i.y-o.y),r.x=a.x+r.width/2,r.y=o.y+r.height/2}}),t.forEach(e.nodes(),function(n){"border"===e.node(n).dummy&&e.removeNode(n)})}(e)),n(" normalize.undo",()=>function(e){t.forEach(e.graph().dummyChains,function(n){var r,t=e.node(n),o=t.edgeLabel;for(e.setEdge(t.edgeObj,o);t.dummy;)r=e.successors(n)[0],e.removeNode(n),o.points.push({x:t.x,y:t.y}),"edge-label"===t.dummy&&(o.x=t.x,o.y=t.y,o.width=t.width,o.height=t.height),n=r,t=e.node(n)})}(e)),n(" fixupEdgeLabelCoords",()=>function(e){t.forEach(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}(e)),n(" undoCoordinateSystem",()=>function(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){t.forEach(e.nodes(),function(n){k(e.node(n))}),t.forEach(e.edges(),function(n){var r=e.edge(n);t.forEach(r.points,k),Object.prototype.hasOwnProperty.call(r,"y")&&k(r)})}(e),"lr"!==n&&"rl"!==n||(function(e){t.forEach(e.nodes(),function(n){x(e.node(n))}),t.forEach(e.edges(),function(n){var r=e.edge(n);t.forEach(r.points,x),Object.prototype.hasOwnProperty.call(r,"x")&&x(r)})}(e),y(e))}(e)),n(" translateGraph",()=>function(e){var n=Number.POSITIVE_INFINITY,r=0,o=Number.POSITIVE_INFINITY,i=0,a=e.graph(),s=a.marginx||0,d=a.marginy||0;function u(e){var t=e.x,a=e.y,s=e.width,d=e.height;n=Math.min(n,t-s/2),r=Math.max(r,t+s/2),o=Math.min(o,a-d/2),i=Math.max(i,a+d/2)}t.forEach(e.nodes(),function(n){u(e.node(n))}),t.forEach(e.edges(),function(n){var r=e.edge(n);Object.prototype.hasOwnProperty.call(r,"x")&&u(r)}),n-=s,o-=d,t.forEach(e.nodes(),function(r){var t=e.node(r);t.x-=n,t.y-=o}),t.forEach(e.edges(),function(r){var i=e.edge(r);t.forEach(i.points,function(e){e.x-=n,e.y-=o}),Object.prototype.hasOwnProperty.call(i,"x")&&(i.x-=n),Object.prototype.hasOwnProperty.call(i,"y")&&(i.y-=o)}),a.width=r-n+s,a.height=i-o+d}(e)),n(" assignNodeIntersects",()=>function(e){t.forEach(e.edges(),function(n){var r,t,o=e.edge(n),i=e.node(n.v),a=e.node(n.w);o.points?(r=o.points[0],t=o.points[o.points.length-1]):(o.points=[],r=a,t=i),o.points.unshift(g(i,r)),o.points.push(g(a,t))})}(e)),n(" reversePoints",()=>function(e){t.forEach(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}(e)),n(" acyclic.undo",()=>function(e){t.forEach(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}(e))}(n,r)),r(" updateInputGraph",()=>function(e,n){t.forEach(e.nodes(),function(r){var t=e.node(r),o=n.node(r);t&&(t.x=o.x,t.y=o.y,n.children(r).length&&(t.width=o.width,t.height=o.height))}),t.forEach(e.edges(),function(r){var t=e.edge(r),o=n.edge(r);t.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(t.x=o.x,t.y=o.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}(e,n))})}var oe=["nodesep","edgesep","ranksep","marginx","marginy"],ie={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},ae=["acyclicer","ranker","rankdir","align"],se=["width","height"],de={width:0,height:0},ue=["minlen","weight","width","height","labeloffset"],ce={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},he=["labelpos"];function fe(e,n){return t.mapValues(t.pick(e,n),Number)}function le(e){var n={};return t.forEach(e,function(e,r){n[r.toLowerCase()]=e}),n}},1365(e,n,r){r.d(n,{T:()=>i});var t=r(6087),o="\0";class i{constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,"directed")||e.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=t.constant(void 0),this._defaultEdgeLabelFn=t.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[o]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return t.isFunction(e)||(e=t.constant(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return t.keys(this._nodes)}sources(){var e=this;return t.filter(this.nodes(),function(n){return t.isEmpty(e._in[n])})}sinks(){var e=this;return t.filter(this.nodes(),function(n){return t.isEmpty(e._out[n])})}setNodes(e,n){var r=arguments,o=this;return t.each(e,function(e){r.length>1?o.setNode(e,n):o.setNode(e)}),this}setNode(e,n){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=n),this):(this._nodes[e]=arguments.length>1?n:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=o,this._children[e]={},this._children[o][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var n=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],t.each(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),t.each(t.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],t.each(t.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(t.isUndefined(n))n=o;else{for(var r=n+="";!t.isUndefined(r);r=this.parent(r))if(r===e)throw new Error("Setting "+n+" as parent of "+e+" would create a cycle");this.setNode(n)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=n,this._children[n][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var n=this._parent[e];if(n!==o)return n}}children(e){if(t.isUndefined(e)&&(e=o),this._isCompound){var n=this._children[e];if(n)return t.keys(n)}else{if(e===o)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var n=this._preds[e];if(n)return t.keys(n)}successors(e){var n=this._sucs[e];if(n)return t.keys(n)}neighbors(e){var n=this.predecessors(e);if(n)return t.union(n,this.successors(e))}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var r=this;t.each(this._nodes,function(r,t){e(t)&&n.setNode(t,r)}),t.each(this._edgeObjs,function(e){n.hasNode(e.v)&&n.hasNode(e.w)&&n.setEdge(e,r.edge(e))});var o={};function i(e){var t=r.parent(e);return void 0===t||n.hasNode(t)?(o[e]=t,t):t in o?o[t]:i(t)}return this._isCompound&&t.each(n.nodes(),function(e){n.setParent(e,i(e))}),n}setDefaultEdgeLabel(e){return t.isFunction(e)||(e=t.constant(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return t.values(this._edgeObjs)}setPath(e,n){var r=this,o=arguments;return t.reduce(e,function(e,t){return o.length>1?r.setEdge(e,t,n):r.setEdge(e,t),t}),this}setEdge(){var e,n,r,o,i=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,n=s.w,r=s.name,2===arguments.length&&(o=arguments[1],i=!0)):(e=s,n=arguments[1],r=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),e=""+e,n=""+n,t.isUndefined(r)||(r=""+r);var u=d(this._isDirected,e,n,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,u))return i&&(this._edgeLabels[u]=o),this;if(!t.isUndefined(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(n),this._edgeLabels[u]=i?o:this._defaultEdgeLabelFn(e,n,r);var c=function(e,n,r,t){var o=""+n,i=""+r;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return t&&(s.name=t),s}(this._isDirected,e,n,r);return e=c.v,n=c.w,Object.freeze(c),this._edgeObjs[u]=c,a(this._preds[n],e),a(this._sucs[e],n),this._in[n][u]=c,this._out[e][u]=c,this._edgeCount++,this}edge(e,n,r){var t=1===arguments.length?u(this._isDirected,arguments[0]):d(this._isDirected,e,n,r);return this._edgeLabels[t]}hasEdge(e,n,r){var t=1===arguments.length?u(this._isDirected,arguments[0]):d(this._isDirected,e,n,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,t)}removeEdge(e,n,r){var t=1===arguments.length?u(this._isDirected,arguments[0]):d(this._isDirected,e,n,r),o=this._edgeObjs[t];return o&&(e=o.v,n=o.w,delete this._edgeLabels[t],delete this._edgeObjs[t],s(this._preds[n],e),s(this._sucs[e],n),delete this._in[n][t],delete this._out[e][t],this._edgeCount--),this}inEdges(e,n){var r=this._in[e];if(r){var o=t.values(r);return n?t.filter(o,function(e){return e.v===n}):o}}outEdges(e,n){var r=this._out[e];if(r){var o=t.values(r);return n?t.filter(o,function(e){return e.w===n}):o}}nodeEdges(e,n){var r=this.inEdges(e,n);if(r)return r.concat(this.outEdges(e,n))}}function a(e,n){e[n]?e[n]++:e[n]=1}function s(e,n){--e[n]||delete e[n]}function d(e,n,r,o){var i=""+n,a=""+r;if(!e&&i>a){var s=i;i=a,a=s}return i+""+a+""+(t.isUndefined(o)?"\0":o)}function u(e,n){return d(e,n.v,n.w,n.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0},697(e,n,r){r.d(n,{T:()=>t.T});var t=r(1365)}}]);1 "use strict";(globalThis.webpackChunkmindcat=globalThis.webpackChunkmindcat||[]).push([[620],{7620(e,n,r){r.d(n,{Zp:()=>te});var t=r(6087),o=r(697);class a{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,n=e._prev;if(n!==e)return i(n),n}enqueue(e){var n=this._sentinel;e._prev&&e._next&&i(e),e._next=n._next,n._next._prev=e,n._next=e,e._prev=n}toString(){for(var e=[],n=this._sentinel,r=n._prev;r!==n;)e.push(JSON.stringify(r,c)),r=r._prev;return"["+e.join(", ")+"]"}}function i(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function c(e,n){if("_next"!==e&&"_prev"!==e)return n}var u=t.constant(1);function d(e,n,r,o,a){var i=a?[]:void 0;return t.forEach(e.inEdges(o.v),function(t){var o=e.edge(t),c=e.node(t.v);a&&i.push({v:t.v,w:t.w}),c.out-=o,f(n,r,c)}),t.forEach(e.outEdges(o.v),function(t){var o=e.edge(t),a=t.w,i=e.node(a);i.in-=o,f(n,r,i)}),e.removeNode(o.v),i}function f(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function h(e){var n="greedy"===e.graph().acyclicer?function(e,n){if(e.nodeCount()<=1)return[];var r=function(e,n){var r=new o.T,i=0,c=0;t.forEach(e.nodes(),function(e){r.setNode(e,{v:e,in:0,out:0})}),t.forEach(e.edges(),function(e){var t=r.edge(e.v,e.w)||0,o=n(e),a=t+o;r.setEdge(e.v,e.w,a),c=Math.max(c,r.node(e.v).out+=o),i=Math.max(i,r.node(e.w).in+=o)});var u=t.range(c+i+3).map(function(){return new a}),d=i+1;return t.forEach(r.nodes(),function(e){f(u,d,r.node(e))}),{graph:r,buckets:u,zeroIdx:d}}(e,n||u),i=function(e,n,r){for(var t,o=[],a=n[n.length-1],i=n[0];e.nodeCount();){for(;t=i.dequeue();)d(e,n,r,t);for(;t=a.dequeue();)d(e,n,r,t);if(e.nodeCount())for(var c=n.length-2;c>0;--c)if(t=n[c].dequeue()){o=o.concat(d(e,n,r,t,!0));break}}return o}(r.graph,r.buckets,r.zeroIdx);return t.flatten(t.map(i,function(n){return e.outEdges(n.v,n.w)}))}(e,function(e){return function(n){return e.edge(n).weight}}(e)):function(e){var n=[],r={},o={};return t.forEach(e.nodes(),function a(i){Object.prototype.hasOwnProperty.call(o,i)||(o[i]=!0,r[i]=!0,t.forEach(e.outEdges(i),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):a(e.w)}),delete r[i])}),n}(e);t.forEach(n,function(n){var r=e.edge(n);e.removeEdge(n),r.forwardName=n.name,r.reversed=!0,e.setEdge(n.w,n.v,r,t.uniqueId("rev"))})}function s(e,n,r,o){var a;do{a=t.uniqueId(o)}while(e.hasNode(a));return r.dummy=n,e.setNode(a,r),a}function g(e){var n=new o.T({multigraph:e.isMultigraph()}).setGraph(e.graph());return t.forEach(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),t.forEach(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function l(e,n){var r,t,o=e.x,a=e.y,i=n.x-o,c=n.y-a,u=e.width/2,d=e.height/2;if(!i&&!c)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(c)*u>Math.abs(i)*d?(c<0&&(d=-d),r=d*i/c,t=d):(i<0&&(u=-u),r=u,t=u*c/i),{x:o+r,y:a+t}}function v(e){var n=t.map(t.range(m(e)+1),function(){return[]});return t.forEach(e.nodes(),function(r){var o=e.node(r),a=o.rank;t.isUndefined(a)||(n[a][o.order]=r)}),n}function p(e,n,r,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=t),s(e,"border",o,n)}function m(e){return t.max(t.map(e.nodes(),function(n){var r=e.node(n).rank;if(!t.isUndefined(r))return r}))}function w(e,n){var r=t.now();try{return n()}finally{console.log(e+" time: "+(t.now()-r)+"ms")}}function E(e,n){return n()}function b(e,n,r,t,o,a){var i={width:0,height:0,rank:a,borderType:n},c=o[n][a-1],u=s(e,"border",i,r);o[n][a]=u,e.setParent(u,t),c&&e.setEdge(c,u,{weight:1})}function y(e){t.forEach(e.nodes(),function(n){k(e.node(n))}),t.forEach(e.edges(),function(n){k(e.edge(n))})}function k(e){var n=e.width;e.width=e.height,e.height=n}function x(e){e.y=-e.y}function N(e){var n=e.x;e.x=e.y,e.y=n}function O(e){var n={};t.forEach(e.sources(),function r(o){var a=e.node(o);if(Object.prototype.hasOwnProperty.call(n,o))return a.rank;n[o]=!0;var i=t.min(t.map(e.outEdges(o),function(n){return r(n.w)-e.edge(n).minlen}));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),a.rank=i})}function I(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function _(e){var n,r,t=new o.T({directed:!1}),a=e.nodes()[0],i=e.nodeCount();for(t.setNode(a,{});P(t,e)<i;)n=T(t,e),r=t.hasNode(n.v)?I(e,n):-I(e,n),j(t,e,r);return t}function P(e,n){return t.forEach(e.nodes(),function r(o){t.forEach(n.nodeEdges(o),function(t){var a=t.v,i=o===a?t.w:a;e.hasNode(i)||I(n,t)||(e.setNode(i,{}),e.setEdge(o,i,{}),r(i))})}),e.nodeCount()}function T(e,n){return t.minBy(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return I(n,r)})}function j(e,n,r){t.forEach(e.nodes(),function(e){n.node(e).rank+=r})}function R(e,n,r){t.isArray(n)||(n=[n]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],i={};return t.each(n,function(n){if(!e.hasNode(n))throw new Error("Graph does not have node: "+n);L(e,n,"post"===r,i,o,a)}),a}function L(e,n,r,o,a,i){Object.prototype.hasOwnProperty.call(o,n)||(o[n]=!0,r||i.push(n),t.each(a(n),function(n){L(e,n,r,o,a,i)}),r&&i.push(n))}function M(e){e=function(e){var n=(new o.T).setGraph(e.graph());return t.forEach(e.nodes(),function(r){n.setNode(r,e.node(r))}),t.forEach(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},o=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})}),n}(e),O(e);var n,r=_(e);for(S(r),C(r,e);n=q(r);)G(r,e,n,F(r,e,n))}function C(e,n){var r=function(e,n){return R(e,n,"post")}(e,e.nodes());r=r.slice(0,r.length-1),t.forEach(r,function(r){!function(e,n,r){var t=e.node(r).parent;e.edge(r,t).cutvalue=B(e,n,r)}(e,n,r)})}function B(e,n,r){var o=e.node(r).parent,a=!0,i=n.edge(r,o),c=0;return i||(a=!1,i=n.edge(o,r)),c=i.weight,t.forEach(n.nodeEdges(r),function(t){var i,u,d=t.v===r,f=d?t.w:t.v;if(f!==o){var h=d===a,s=n.edge(t).weight;if(c+=h?s:-s,i=r,u=f,e.hasEdge(i,u)){var g=e.edge(r,f).cutvalue;c+=h?-g:g}}}),c}function S(e,n){arguments.length<2&&(n=e.nodes()[0]),V(e,{},1,n)}function V(e,n,r,o,a){var i=r,c=e.node(o);return n[o]=!0,t.forEach(e.neighbors(o),function(t){Object.prototype.hasOwnProperty.call(n,t)||(r=V(e,n,r,t,o))}),c.low=i,c.lim=r++,a?c.parent=a:delete c.parent,r}function q(e){return t.find(e.edges(),function(n){return e.edge(n).cutvalue<0})}function F(e,n,r){var o=r.v,a=r.w;n.hasEdge(o,a)||(o=r.w,a=r.v);var i=e.node(o),c=e.node(a),u=i,d=!1;i.lim>c.lim&&(u=c,d=!0);var f=t.filter(n.edges(),function(n){return d===U(0,e.node(n.v),u)&&d!==U(0,e.node(n.w),u)});return t.minBy(f,function(e){return I(n,e)})}function G(e,n,r,o){var a=r.v,i=r.w;e.removeEdge(a,i),e.setEdge(o.v,o.w,{}),S(e),C(e,n),function(e,n){var r=t.find(e.nodes(),function(e){return!n.node(e).parent}),o=function(e,n){return R(e,n,"pre")}(e,r);o=o.slice(1),t.forEach(o,function(r){var t=e.node(r).parent,o=n.edge(r,t),a=!1;o||(o=n.edge(t,r),a=!0),n.node(r).rank=n.node(t).rank+(a?o.minlen:-o.minlen)})}(e,n)}function U(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function Y(e){switch(e.graph().ranker){case"network-simplex":default:!function(e){M(e)}(e);break;case"tight-tree":!function(e){O(e),_(e)}(e);break;case"longest-path":z(e)}}t.constant(1),t.constant(1),new Error,r(1365),M.initLowLimValues=S,M.initCutValues=C,M.calcCutValue=B,M.leaveEdge=q,M.enterEdge=F,M.exchangeEdges=G;var z=O;function D(e){var n=s(e,"root",{},"_root"),r=function(e){var n={};function r(o,a){var i=e.children(o);i&&i.length&&t.forEach(i,function(e){r(e,a+1)}),n[o]=a}return t.forEach(e.children(),function(e){r(e,1)}),n}(e),o=t.max(t.values(r))-1,a=2*o+1;e.graph().nestingRoot=n,t.forEach(e.edges(),function(n){e.edge(n).minlen*=a});var i=function(e){return t.reduce(e.edges(),function(n,r){return n+e.edge(r).weight},0)}(e)+1;t.forEach(e.children(),function(t){A(e,n,a,i,o,r,t)}),e.graph().nodeRankFactor=a}function A(e,n,r,o,a,i,c){var u=e.children(c);if(u.length){var d=p(e,"_bt"),f=p(e,"_bb"),h=e.node(c);e.setParent(d,c),h.borderTop=d,e.setParent(f,c),h.borderBottom=f,t.forEach(u,function(t){A(e,n,r,o,a,i,t);var u=e.node(t),h=u.borderTop?u.borderTop:t,s=u.borderBottom?u.borderBottom:t,g=u.borderTop?o:2*o,l=h!==s?1:a-i[c]+1;e.setEdge(d,h,{weight:g,minlen:l,nestingEdge:!0}),e.setEdge(s,f,{weight:g,minlen:l,nestingEdge:!0})}),e.parent(c)||e.setEdge(n,d,{weight:0,minlen:a+i[c]})}else c!==n&&e.setEdge(n,c,{weight:0,minlen:r})}function J(e,n){for(var r=0,t=1;t<n.length;++t)r+=Z(e,n[t-1],n[t]);return r}function Z(e,n,r){for(var o=t.zipObject(r,t.map(r,function(e,n){return n})),a=t.flatten(t.map(n,function(n){return t.sortBy(t.map(e.outEdges(n),function(n){return{pos:o[n.w],weight:e.edge(n).weight}}),"pos")})),i=1;i<r.length;)i<<=1;var c=2*i-1;i-=1;var u=t.map(new Array(c),function(){return 0}),d=0;return t.forEach(a.forEach(function(e){var n=e.pos+i;u[n]+=e.weight;for(var r=0;n>0;)n%2&&(r+=u[n+1]),u[n=n-1>>1]+=e.weight;d+=e.weight*r})),d}function H(e,n){var r,o=function(e){var n={lhs:[],rhs:[]};return t.forEach(e,function(e){var r;r=e,Object.prototype.hasOwnProperty.call(r,"barycenter")?n.lhs.push(e):n.rhs.push(e)}),n}(e),a=o.lhs,i=t.sortBy(o.rhs,function(e){return-e.i}),c=[],u=0,d=0,f=0;a.sort((r=!!n,function(e,n){return e.barycenter<n.barycenter?-1:e.barycenter>n.barycenter?1:r?n.i-e.i:e.i-n.i})),f=K(c,i,f),t.forEach(a,function(e){f+=e.vs.length,c.push(e.vs),u+=e.barycenter*e.weight,d+=e.weight,f=K(c,i,f)});var h={vs:t.flatten(c)};return d&&(h.barycenter=u/d,h.weight=d),h}function K(e,n,r){for(var o;n.length&&(o=t.last(n)).i<=r;)n.pop(),e.push(o.vs),r++;return r}function Q(e,n,r,o){var a=e.children(n),i=e.node(n),c=i?i.borderLeft:void 0,u=i?i.borderRight:void 0,d={};c&&(a=t.filter(a,function(e){return e!==c&&e!==u}));var f=function(e,n){return t.map(n,function(n){var r=e.inEdges(n);if(r.length){var o=t.reduce(r,function(n,r){var t=e.edge(r),o=e.node(r.v);return{sum:n.sum+t.weight*o.order,weight:n.weight+t.weight}},{sum:0,weight:0});return{v:n,barycenter:o.sum/o.weight,weight:o.weight}}return{v:n}})}(e,a);t.forEach(f,function(n){if(e.children(n.v).length){var a=Q(e,n.v,r,o);d[n.v]=a,Object.prototype.hasOwnProperty.call(a,"barycenter")&&(i=n,c=a,t.isUndefined(i.barycenter)?(i.barycenter=c.barycenter,i.weight=c.weight):(i.barycenter=(i.barycenter*i.weight+c.barycenter*c.weight)/(i.weight+c.weight),i.weight+=c.weight))}var i,c});var h=function(e,n){var r={};return t.forEach(e,function(e,n){var o=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};t.isUndefined(e.barycenter)||(o.barycenter=e.barycenter,o.weight=e.weight)}),t.forEach(n.edges(),function(e){var n=r[e.v],o=r[e.w];t.isUndefined(n)||t.isUndefined(o)||(o.indegree++,n.out.push(r[e.w]))}),function(e){var n=[];function r(e){return function(n){var r,o,a,i;n.merged||(t.isUndefined(n.barycenter)||t.isUndefined(e.barycenter)||n.barycenter>=e.barycenter)&&(o=n,a=0,i=0,(r=e).weight&&(a+=r.barycenter*r.weight,i+=r.weight),o.weight&&(a+=o.barycenter*o.weight,i+=o.weight),r.vs=o.vs.concat(r.vs),r.barycenter=a/i,r.weight=i,r.i=Math.min(o.i,r.i),o.merged=!0)}}function o(n){return function(r){r.in.push(n),0===--r.indegree&&e.push(r)}}for(;e.length;){var a=e.pop();n.push(a),t.forEach(a.in.reverse(),r(a)),t.forEach(a.out,o(a))}return t.map(t.filter(n,function(e){return!e.merged}),function(e){return t.pick(e,["vs","i","barycenter","weight"])})}(t.filter(r,function(e){return!e.indegree}))}(f,r);!function(e,n){t.forEach(e,function(e){e.vs=t.flatten(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}(h,d);var s=H(h,o);if(c&&(s.vs=t.flatten([c,s.vs,u]),e.predecessors(c).length)){var g=e.node(e.predecessors(c)[0]),l=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(s,"barycenter")||(s.barycenter=0,s.weight=0),s.barycenter=(s.barycenter*s.weight+g.order+l.order)/(s.weight+2),s.weight+=2}return s}function W(e,n,r){return t.map(n,function(n){return function(e,n,r){var a=function(e){for(var n;e.hasNode(n=t.uniqueId("_root")););return n}(e),i=new o.T({compound:!0}).setGraph({root:a}).setDefaultNodeLabel(function(n){return e.node(n)});return t.forEach(e.nodes(),function(o){var c=e.node(o),u=e.parent(o);(c.rank===n||c.minRank<=n&&n<=c.maxRank)&&(i.setNode(o),i.setParent(o,u||a),t.forEach(e[r](o),function(n){var r=n.v===o?n.w:n.v,a=i.edge(r,o),c=t.isUndefined(a)?0:a.weight;i.setEdge(r,o,{weight:e.edge(n).weight+c})}),Object.prototype.hasOwnProperty.call(c,"minRank")&&i.setNode(o,{borderLeft:c.borderLeft[n],borderRight:c.borderRight[n]}))}),i}(e,n,r)})}function X(e,n){var r=new o.T;t.forEach(e,function(e){var o=e.graph().root,a=Q(e,o,r,n);t.forEach(a.vs,function(n,r){e.node(n).order=r}),function(e,n,r){var o,a={};t.forEach(r,function(r){for(var t,i,c=e.parent(r);c;){if((t=e.parent(c))?(i=a[t],a[t]=c):(i=o,o=c),i&&i!==c)return void n.setEdge(i,c);c=t}})}(e,r,a.vs)})}function $(e,n){t.forEach(n,function(n){t.forEach(n,function(n,r){e.node(n).order=r})})}function ee(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var o=e[n];Object.defineProperty(o,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function ne(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function re(e){var n,r=v(e),a=t.merge(function(e,n){var r={};return t.reduce(n,function(n,o){var a=0,i=0,c=n.length,u=t.last(o);return t.forEach(o,function(n,d){var f=function(e,n){if(e.node(n).dummy)return t.find(e.predecessors(n),function(n){return e.node(n).dummy})}(e,n),h=f?e.node(f).order:c;(f||n===u)&&(t.forEach(o.slice(i,d+1),function(n){t.forEach(e.predecessors(n),function(t){var o=e.node(t),i=o.order;!(i<a||h<i)||o.dummy&&e.node(n).dummy||ee(r,t,n)})}),i=d+1,a=h)}),o}),r}(e,r),function(e,n){var r={};function o(n,o,a,i,c){var u;t.forEach(t.range(o,a),function(o){u=n[o],e.node(u).dummy&&t.forEach(e.predecessors(u),function(n){var t=e.node(n);t.dummy&&(t.order<i||t.order>c)&&ee(r,n,u)})})}return t.reduce(n,function(n,r){var a,i=-1,c=0;return t.forEach(r,function(t,u){if("border"===e.node(t).dummy){var d=e.predecessors(t);d.length&&(a=e.node(d[0]).order,o(r,c,u,i,a),c=u,i=a)}o(r,c,r.length,a,n.length)}),r}),r}(e,r)),i={};t.forEach(["u","d"],function(c){n="u"===c?r:t.values(r).reverse(),t.forEach(["l","r"],function(r){"r"===r&&(n=t.map(n,function(e){return t.values(e).reverse()}));var u=("u"===c?e.predecessors:e.successors).bind(e),d=function(e,n,r,o){var a={},i={},c={};return t.forEach(n,function(e){t.forEach(e,function(e,n){a[e]=e,i[e]=e,c[e]=n})}),t.forEach(n,function(e){var n=-1;t.forEach(e,function(e){var u=o(e);if(u.length){u=t.sortBy(u,function(e){return c[e]});for(var d=(u.length-1)/2,f=Math.floor(d),h=Math.ceil(d);f<=h;++f){var s=u[f];i[e]===e&&n<c[s]&&!ne(r,e,s)&&(i[s]=e,i[e]=a[e]=a[s],n=c[s])}}})}),{root:a,align:i}}(0,n,a,u),f=function(e,n,r,a,i){var c={},u=function(e,n,r,a){var i=new o.T,c=e.graph(),u=function(e,n,r){return function(t,o,a){var i,c=t.node(o),u=t.node(a),d=0;if(d+=c.width/2,Object.prototype.hasOwnProperty.call(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":i=-c.width/2;break;case"r":i=c.width/2}if(i&&(d+=r?i:-i),i=0,d+=(c.dummy?n:e)/2,d+=(u.dummy?n:e)/2,d+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":i=u.width/2;break;case"r":i=-u.width/2}return i&&(d+=r?i:-i),i=0,d}}(c.nodesep,c.edgesep,a);return t.forEach(n,function(n){var o;t.forEach(n,function(n){var t=r[n];if(i.setNode(t),o){var a=r[o],c=i.edge(a,t);i.setEdge(a,t,Math.max(u(e,n,o),c||0))}o=n})}),i}(e,n,r,i),d=i?"borderLeft":"borderRight";function f(e,n){for(var r=u.nodes(),t=r.pop(),o={};t;)o[t]?e(t):(o[t]=!0,r.push(t),r=r.concat(n(t))),t=r.pop()}return f(function(e){c[e]=u.inEdges(e).reduce(function(e,n){return Math.max(e,c[n.v]+u.edge(n))},0)},u.predecessors.bind(u)),f(function(n){var r=u.outEdges(n).reduce(function(e,n){return Math.min(e,c[n.w]-u.edge(n))},Number.POSITIVE_INFINITY),t=e.node(n);r!==Number.POSITIVE_INFINITY&&t.borderType!==d&&(c[n]=Math.max(c[n],r))},u.successors.bind(u)),t.forEach(a,function(e){c[e]=c[r[e]]}),c}(e,n,d.root,d.align,"r"===r);"r"===r&&(f=t.mapValues(f,function(e){return-e})),i[c+r]=f})});var c=function(e,n){return t.minBy(t.values(n),function(n){var r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return t.forIn(n,function(n,t){var a=function(e,n){return e.node(n).width}(e,t)/2;r=Math.max(n+a,r),o=Math.min(n-a,o)}),r-o})}(e,i);return function(e,n){var r=t.values(n),o=t.min(r),a=t.max(r);t.forEach(["u","d"],function(r){t.forEach(["l","r"],function(i){var c,u=r+i,d=e[u];if(d!==n){var f=t.values(d);(c="l"===i?o-t.min(f):a-t.max(f))&&(e[u]=t.mapValues(d,function(e){return e+c}))}})})}(i,c),function(e,n){return t.mapValues(e.ul,function(r,o){if(n)return e[n.toLowerCase()][o];var a=t.sortBy(t.map(e,o));return(a[1]+a[2])/2})}(i,e.graph().align)}function te(e,n){var r=n&&n.debugTiming?w:E;r("layout",()=>{var n=r(" buildLayoutGraph",()=>function(e){var n=new o.T({multigraph:!0,compound:!0}),r=ge(e.graph());return n.setGraph(t.merge({},ae,se(r,oe),t.pick(r,ie))),t.forEach(e.nodes(),function(r){var o=ge(e.node(r));n.setNode(r,t.defaults(se(o,ce),ue)),n.setParent(r,e.parent(r))}),t.forEach(e.edges(),function(r){var o=ge(e.edge(r));n.setEdge(r,t.merge({},fe,se(o,de),t.pick(o,he)))}),n}(e));r(" runLayout",()=>function(e,n){n(" makeSpaceForEdgeLabels",()=>function(e){var n=e.graph();n.ranksep/=2,t.forEach(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}(e)),n(" removeSelfEdges",()=>function(e){t.forEach(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}(e)),n(" acyclic",()=>h(e)),n(" nestingGraph.run",()=>D(e)),n(" rank",()=>Y(g(e))),n(" injectEdgeLabelProxies",()=>function(e){t.forEach(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),o={rank:(e.node(n.w).rank-t.rank)/2+t.rank,e:n};s(e,"edge-proxy",o,"_ep")}})}(e)),n(" removeEmptyRanks",()=>function(e){var n=t.min(t.map(e.nodes(),function(n){return e.node(n).rank})),r=[];t.forEach(e.nodes(),function(t){var o=e.node(t).rank-n;r[o]||(r[o]=[]),r[o].push(t)});var o=0,a=e.graph().nodeRankFactor;t.forEach(r,function(n,r){t.isUndefined(n)&&r%a!==0?--o:o&&t.forEach(n,function(n){e.node(n).rank+=o})})}(e)),n(" nestingGraph.cleanup",()=>function(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,t.forEach(e.edges(),function(n){e.edge(n).nestingEdge&&e.removeEdge(n)})}(e)),n(" normalizeRanks",()=>function(e){var n=t.min(t.map(e.nodes(),function(n){return e.node(n).rank}));t.forEach(e.nodes(),function(r){var o=e.node(r);t.has(o,"rank")&&(o.rank-=n)})}(e)),n(" assignRankMinMax",()=>function(e){var n=0;t.forEach(e.nodes(),function(r){var o=e.node(r);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,n=t.max(n,o.maxRank))}),e.graph().maxRank=n}(e)),n(" removeEdgeLabelProxies",()=>function(e){t.forEach(e.nodes(),function(n){var r=e.node(n);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}(e)),n(" normalize.run",()=>function(e){e.graph().dummyChains=[],t.forEach(e.edges(),function(n){!function(e,n){var r=n.v,t=e.node(r).rank,o=n.w,a=e.node(o).rank,i=n.name,c=e.edge(n),u=c.labelRank;if(a!==t+1){e.removeEdge(n);var d,f,h=void 0;for(f=0,++t;t<a;++f,++t)c.points=[],d=s(e,"edge",h={width:0,height:0,edgeLabel:c,edgeObj:n,rank:t},"_d"),t===u&&(h.width=c.width,h.height=c.height,h.dummy="edge-label",h.labelpos=c.labelpos),e.setEdge(r,d,{weight:c.weight},i),0===f&&e.graph().dummyChains.push(d),r=d;e.setEdge(r,o,{weight:c.weight},i)}}(e,n)})}(e)),n(" parentDummyChains",()=>function(e){var n=function(e){var n={},r=0;return t.forEach(e.children(),function o(a){var i=r;t.forEach(e.children(a),o),n[a]={low:i,lim:r++}}),n}(e);t.forEach(e.graph().dummyChains,function(r){for(var t=e.node(r),o=t.edgeObj,a=function(e,n,r,t){var o,a,i=[],c=[],u=Math.min(n[r].low,n[t].low),d=Math.max(n[r].lim,n[t].lim);o=r;do{o=e.parent(o),i.push(o)}while(o&&(n[o].low>u||d>n[o].lim));for(a=o,o=t;(o=e.parent(o))!==a;)c.push(o);return{path:i.concat(c.reverse()),lca:a}}(e,n,o.v,o.w),i=a.path,c=a.lca,u=0,d=i[u],f=!0;r!==o.w;){if(t=e.node(r),f){for(;(d=i[u])!==c&&e.node(d).maxRank<t.rank;)u++;d===c&&(f=!1)}if(!f){for(;u<i.length-1&&e.node(d=i[u+1]).minRank<=t.rank;)u++;d=i[u]}e.setParent(r,d),r=e.successors(r)[0]}})}(e)),n(" addBorderSegments",()=>function(e){t.forEach(e.children(),function n(r){var o=e.children(r),a=e.node(r);if(o.length&&t.forEach(o,n),Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var i=a.minRank,c=a.maxRank+1;i<c;++i)b(e,"borderLeft","_bl",r,a,i),b(e,"borderRight","_br",r,a,i)}})}(e)),n(" order",()=>function(e){var n=m(e),r=W(e,t.range(1,n+1),"inEdges"),o=W(e,t.range(n-1,-1,-1),"outEdges"),a=function(e){var n={},r=t.filter(e.nodes(),function(n){return!e.children(n).length}),o=t.max(t.map(r,function(n){return e.node(n).rank})),a=t.map(t.range(o+1),function(){return[]}),i=t.sortBy(r,function(n){return e.node(n).rank});return t.forEach(i,function r(o){if(!t.has(n,o)){n[o]=!0;var i=e.node(o);a[i.rank].push(o),t.forEach(e.successors(o),r)}}),a}(e);$(e,a);for(var i,c=Number.POSITIVE_INFINITY,u=0,d=0;d<4;++u,++d){X(u%2?r:o,u%4>=2);var f=J(e,a=v(e));f<c&&(d=0,i=t.cloneDeep(a),c=f)}$(e,i)}(e)),n(" insertSelfEdges",()=>function(e){var n=v(e);t.forEach(n,function(n){var r=0;t.forEach(n,function(n,o){var a=e.node(n);a.order=o+r,t.forEach(a.selfEdges,function(n){s(e,"selfedge",{width:n.label.width,height:n.label.height,rank:a.rank,order:o+ ++r,e:n.e,label:n.label},"_se")}),delete a.selfEdges})})}(e)),n(" adjustCoordinateSystem",()=>function(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||y(e)}(e)),n(" position",()=>function(e){(function(e){var n=v(e),r=e.graph().ranksep,o=0;t.forEach(n,function(n){var a=t.max(t.map(n,function(n){return e.node(n).height}));t.forEach(n,function(n){e.node(n).y=o+a/2}),o+=a+r})})(e=g(e)),t.forOwn(re(e),function(n,r){e.node(r).x=n})}(e)),n(" positionSelfEdges",()=>function(e){t.forEach(e.nodes(),function(n){var r=e.node(n);if("selfedge"===r.dummy){var t=e.node(r.e.v),o=t.x+t.width/2,a=t.y,i=r.x-o,c=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:o+2*i/3,y:a-c},{x:o+5*i/6,y:a-c},{x:o+i,y:a},{x:o+5*i/6,y:a+c},{x:o+2*i/3,y:a+c}],r.label.x=r.x,r.label.y=r.y}})}(e)),n(" removeBorderNodes",()=>function(e){t.forEach(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),o=e.node(r.borderTop),a=e.node(r.borderBottom),i=e.node(t.last(r.borderLeft)),c=e.node(t.last(r.borderRight));r.width=Math.abs(c.x-i.x),r.height=Math.abs(a.y-o.y),r.x=i.x+r.width/2,r.y=o.y+r.height/2}}),t.forEach(e.nodes(),function(n){"border"===e.node(n).dummy&&e.removeNode(n)})}(e)),n(" normalize.undo",()=>function(e){t.forEach(e.graph().dummyChains,function(n){var r,t=e.node(n),o=t.edgeLabel;for(e.setEdge(t.edgeObj,o);t.dummy;)r=e.successors(n)[0],e.removeNode(n),o.points.push({x:t.x,y:t.y}),"edge-label"===t.dummy&&(o.x=t.x,o.y=t.y,o.width=t.width,o.height=t.height),n=r,t=e.node(n)})}(e)),n(" fixupEdgeLabelCoords",()=>function(e){t.forEach(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}(e)),n(" undoCoordinateSystem",()=>function(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){t.forEach(e.nodes(),function(n){x(e.node(n))}),t.forEach(e.edges(),function(n){var r=e.edge(n);t.forEach(r.points,x),Object.prototype.hasOwnProperty.call(r,"y")&&x(r)})}(e),"lr"!==n&&"rl"!==n||(function(e){t.forEach(e.nodes(),function(n){N(e.node(n))}),t.forEach(e.edges(),function(n){var r=e.edge(n);t.forEach(r.points,N),Object.prototype.hasOwnProperty.call(r,"x")&&N(r)})}(e),y(e))}(e)),n(" translateGraph",()=>function(e){var n=Number.POSITIVE_INFINITY,r=0,o=Number.POSITIVE_INFINITY,a=0,i=e.graph(),c=i.marginx||0,u=i.marginy||0;function d(e){var t=e.x,i=e.y,c=e.width,u=e.height;n=Math.min(n,t-c/2),r=Math.max(r,t+c/2),o=Math.min(o,i-u/2),a=Math.max(a,i+u/2)}t.forEach(e.nodes(),function(n){d(e.node(n))}),t.forEach(e.edges(),function(n){var r=e.edge(n);Object.prototype.hasOwnProperty.call(r,"x")&&d(r)}),n-=c,o-=u,t.forEach(e.nodes(),function(r){var t=e.node(r);t.x-=n,t.y-=o}),t.forEach(e.edges(),function(r){var a=e.edge(r);t.forEach(a.points,function(e){e.x-=n,e.y-=o}),Object.prototype.hasOwnProperty.call(a,"x")&&(a.x-=n),Object.prototype.hasOwnProperty.call(a,"y")&&(a.y-=o)}),i.width=r-n+c,i.height=a-o+u}(e)),n(" assignNodeIntersects",()=>function(e){t.forEach(e.edges(),function(n){var r,t,o=e.edge(n),a=e.node(n.v),i=e.node(n.w);o.points?(r=o.points[0],t=o.points[o.points.length-1]):(o.points=[],r=i,t=a),o.points.unshift(l(a,r)),o.points.push(l(i,t))})}(e)),n(" reversePoints",()=>function(e){t.forEach(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}(e)),n(" acyclic.undo",()=>function(e){t.forEach(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}(e))}(n,r)),r(" updateInputGraph",()=>function(e,n){t.forEach(e.nodes(),function(r){var t=e.node(r),o=n.node(r);t&&(t.x=o.x,t.y=o.y,n.children(r).length&&(t.width=o.width,t.height=o.height))}),t.forEach(e.edges(),function(r){var t=e.edge(r),o=n.edge(r);t.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(t.x=o.x,t.y=o.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}(e,n))})}var oe=["nodesep","edgesep","ranksep","marginx","marginy"],ae={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},ie=["acyclicer","ranker","rankdir","align"],ce=["width","height"],ue={width:0,height:0},de=["minlen","weight","width","height","labeloffset"],fe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},he=["labelpos"];function se(e,n){return t.mapValues(t.pick(e,n),Number)}function ge(e){var n={};return t.forEach(e,function(e,r){n[r.toLowerCase()]=e}),n}}}]); -
mindcat/trunk/build/731.js
r3467811 r3489132 1 (globalThis.webpackChunkmindcat=globalThis.webpackChunkmindcat||[]).push([[731],{8859(e,t,n){var r=n(3661),i=n(1380),s=n(1459);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}o.prototype.add=o.prototype.push=i,o.prototype.has=s,e.exports=o},3729(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},9770(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}},5325(e,t,n){var r=n(6131);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},9905(e){e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}},4932(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},4528(e){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},882(e){e.exports=function(e,t,n,r){var i=-1,s=null==e?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}},4248(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},909(e,t,n){var r=n(641),i=n(8329)(r);e.exports=i},3599(e,t,n){var r=n(4394);e.exports=function(e,t,n){for(var i=-1,s=e.length;++i<s;){var o=e[i],a=t(o);if(null!=a&&(void 0===c?a==a&&!r(a):n(a,c)))var c=a,l=o}return l}},6574(e,t,n){var r=n(909);e.exports=function(e,t){var n=[];return r(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}},2523(e){e.exports=function(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}},3120(e,t,n){var r=n(4528),i=n(5891);e.exports=function e(t,n,s,o,a){var c=-1,l=t.length;for(s||(s=i),a||(a=[]);++c<l;){var u=t[c];n>0&&s(u)?n>1?e(u,n-1,s,o,a):r(a,u):o||(a[a.length]=u)}return a}},641(e,t,n){var r=n(6649),i=n(5950);e.exports=function(e,t){return e&&r(e,t,i)}},7422(e,t,n){var r=n(1769),i=n(7797);e.exports=function(e,t){for(var n=0,s=(t=r(t,e)).length;null!=e&&n<s;)e=e[i(t[n++])];return n&&n==s?e:void 0}},2199(e,t,n){var r=n(4528),i=n(6449);e.exports=function(e,t,n){var s=t(e);return i(e)?s:r(s,n(e))}},8077(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},6131(e,t,n){var r=n(2523),i=n(5463),s=n(6959);e.exports=function(e,t,n){return t==t?s(e,t,n):r(e,i,n)}},270(e,t,n){var r=n(7068),i=n(346);e.exports=function e(t,n,s,o,a){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,s,o,e,a))}},7068(e,t,n){var r=n(7217),i=n(5911),s=n(1986),o=n(689),a=n(5861),c=n(6449),l=n(3656),u=n(7167),d="[object Arguments]",h="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,g,y){var T=c(e),v=c(t),R=T?h:a(e),E=v?h:a(t),k=(R=R==d?p:R)==p,S=(E=E==d?p:E)==p,C=R==E;if(C&&l(e)){if(!l(t))return!1;T=!0,k=!1}if(C&&!k)return y||(y=new r),T||u(e)?i(e,t,n,m,g,y):s(e,t,R,n,m,g,y);if(!(1&n)){var x=k&&f.call(e,"__wrapped__"),A=S&&f.call(t,"__wrapped__");if(x||A){var b=x?e.value():e,$=A?t.value():t;return y||(y=new r),g(b,$,n,m,y)}}return!!C&&(y||(y=new r),o(e,t,n,m,g,y))}},1799(e,t,n){var r=n(7217),i=n(270);e.exports=function(e,t,n,s){var o=n.length,a=o,c=!s;if(null==e)return!a;for(e=Object(e);o--;){var l=n[o];if(c&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var u=(l=n[o])[0],d=e[u],h=l[1];if(c&&l[2]){if(void 0===d&&!(u in e))return!1}else{var p=new r;if(s)var f=s(d,h,u,e,t,p);if(!(void 0===f?i(h,d,3,s,p):f))return!1}}return!0}},5463(e){e.exports=function(e){return e!=e}},5389(e,t,n){var r=n(3663),i=n(7978),s=n(3488),o=n(6449),a=n(583);e.exports=function(e){return"function"==typeof e?e:null==e?s:"object"==typeof e?o(e)?i(e[0],e[1]):r(e):a(e)}},6176(e){e.exports=function(e,t){return e<t}},5128(e,t,n){var r=n(909),i=n(4894);e.exports=function(e,t){var n=-1,s=i(e)?Array(e.length):[];return r(e,function(e,r,i){s[++n]=t(e,r,i)}),s}},3663(e,t,n){var r=n(1799),i=n(776),s=n(7197);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?s(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},7978(e,t,n){var r=n(270),i=n(8156),s=n(631),o=n(8586),a=n(756),c=n(7197),l=n(7797);e.exports=function(e,t){return o(e)&&a(t)?c(l(e),t):function(n){var o=i(n,e);return void 0===o&&o===t?s(n,e):r(t,o,3)}}},7237(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7255(e,t,n){var r=n(7422);e.exports=function(e){return function(t){return r(t,e)}}},5558(e){e.exports=function(e,t,n,r,i){return i(e,function(e,i,s){n=r?(r=!1,e):t(n,e,i,s)}),n}},7556(e,t,n){var r=n(1873),i=n(4932),s=n(6449),o=n(4394),a=r?r.prototype:void 0,c=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(s(t))return i(t,e)+"";if(o(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},5765(e,t,n){var r=n(8859),i=n(5325),s=n(9905),o=n(9219),a=n(4517),c=n(4247);e.exports=function(e,t,n){var l=-1,u=i,d=e.length,h=!0,p=[],f=p;if(n)h=!1,u=s;else if(d>=200){var m=t?null:a(e);if(m)return c(m);h=!1,u=o,f=new r}else f=t?[]:p;e:for(;++l<d;){var g=e[l],y=t?t(g):g;if(g=n||0!==g?g:0,h&&y==y){for(var T=f.length;T--;)if(f[T]===y)continue e;t&&f.push(y),p.push(g)}else u(f,y,n)||(f!==p&&f.push(y),p.push(g))}return p}},9219(e){e.exports=function(e,t){return e.has(t)}},4066(e,t,n){var r=n(3488);e.exports=function(e){return"function"==typeof e?e:r}},1769(e,t,n){var r=n(6449),i=n(8586),s=n(1802),o=n(3222);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:s(o(e))}},8329(e,t,n){var r=n(4894);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var s=n.length,o=t?s:-1,a=Object(n);(t?o--:++o<s)&&!1!==i(a[o],o,a););return n}}},4517(e,t,n){var r=n(6545),i=n(3950),s=n(4247),o=r&&1/s(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i;e.exports=o},5911(e,t,n){var r=n(8859),i=n(4248),s=n(9219);e.exports=function(e,t,n,o,a,c){var l=1&n,u=e.length,d=t.length;if(u!=d&&!(l&&d>u))return!1;var h=c.get(e),p=c.get(t);if(h&&p)return h==t&&p==e;var f=-1,m=!0,g=2&n?new r:void 0;for(c.set(e,t),c.set(t,e);++f<u;){var y=e[f],T=t[f];if(o)var v=l?o(T,y,f,t,e,c):o(y,T,f,e,t,c);if(void 0!==v){if(v)continue;m=!1;break}if(g){if(!i(t,function(e,t){if(!s(g,t)&&(y===e||a(y,e,n,o,c)))return g.push(t)})){m=!1;break}}else if(y!==T&&!a(y,T,n,o,c)){m=!1;break}}return c.delete(e),c.delete(t),m}},1986(e,t,n){var r=n(1873),i=n(7828),s=n(5288),o=n(5911),a=n(317),c=n(4247),l=r?r.prototype:void 0,u=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=a;case"[object Set]":var f=1&r;if(p||(p=c),e.size!=t.size&&!f)return!1;var m=h.get(e);if(m)return m==t;r|=2,h.set(e,t);var g=o(p(e),p(t),r,l,d,h);return h.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},689(e,t,n){var r=n(2),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,s,o,a){var c=1&n,l=r(e),u=l.length;if(u!=r(t).length&&!c)return!1;for(var d=u;d--;){var h=l[d];if(!(c?h in t:i.call(t,h)))return!1}var p=a.get(e),f=a.get(t);if(p&&f)return p==t&&f==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=c;++d<u;){var y=e[h=l[d]],T=t[h];if(s)var v=c?s(T,y,h,t,e,a):s(y,T,h,e,t,a);if(!(void 0===v?y===T||o(y,T,n,s,a):v)){m=!1;break}g||(g="constructor"==h)}if(m&&!g){var R=e.constructor,E=t.constructor;R==E||!("constructor"in e)||!("constructor"in t)||"function"==typeof R&&R instanceof R&&"function"==typeof E&&E instanceof E||(m=!1)}return a.delete(e),a.delete(t),m}},2(e,t,n){var r=n(2199),i=n(4664),s=n(5950);e.exports=function(e){return r(e,s,i)}},776(e,t,n){var r=n(756),i=n(5950);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var s=t[n],o=e[s];t[n]=[s,o,r(o)]}return t}},4664(e,t,n){var r=n(9770),i=n(3345),s=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,a=o?function(e){return null==e?[]:(e=Object(e),r(o(e),function(t){return s.call(e,t)}))}:i;e.exports=a},9326(e,t,n){var r=n(1769),i=n(2428),s=n(6449),o=n(361),a=n(294),c=n(7797);e.exports=function(e,t,n){for(var l=-1,u=(t=r(t,e)).length,d=!1;++l<u;){var h=c(t[l]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++l!=u?d:!!(u=null==e?0:e.length)&&a(u)&&o(h,u)&&(s(e)||i(e))}},5891(e,t,n){var r=n(1873),i=n(2428),s=n(6449),o=r?r.isConcatSpreadable:void 0;e.exports=function(e){return s(e)||i(e)||!!(o&&e&&e[o])}},8586(e,t,n){var r=n(6449),i=n(4394),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||o.test(e)||!s.test(e)||null!=t&&e in Object(t)}},756(e,t,n){var r=n(3805);e.exports=function(e){return e==e&&!r(e)}},317(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},7197(e){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},2224(e,t,n){var r=n(104);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},1380(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1459(e){e.exports=function(e){return this.__data__.has(e)}},4247(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},6959(e){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},1802(e,t,n){var r=n(2224),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,o=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,n,r,i){t.push(r?i.replace(s,"$1"):n||e)}),t});e.exports=o},7797(e,t,n){var r=n(4394);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7612(e,t,n){var r=n(9770),i=n(6574),s=n(5389),o=n(6449);e.exports=function(e,t){return(o(e)?r:i)(e,s(t,3))}},7307(e,t,n){var r=n(3120),i=n( 5378);e.exports=function(e,t){return r(i(e,t),1)}},5970(e,t,n){var r=n(3120);e.exports=function(e){return null!=e&&e.length?r(e,1):[]}},9754(e,t,n){var r=n(3729),i=n(909),s=n(4066),o=n(6449);e.exports=function(e,t){return(o(e)?r:i)(e,s(t))}},8156(e,t,n){var r=n(7422);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},631(e,t,n){var r=n(8077),i=n(9326);e.exports=function(e,t){return null!=e&&i(e,t,r)}},4394(e,t,n){var r=n(2552),i=n(346);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},5950(e,t,n){var r=n(695),i=n(8984),s=n(4894);e.exports=function(e){return s(e)?r(e):i(e)}},5378(e,t,n){var r=n(4932),i=n(5389),s=n(5128),o=n(6449);e.exports=function(e,t){return(o(e)?r:s)(e,i(t,3))}},1684(e,t,n){var r=n(3599),i=n(6176),s=n(3488);e.exports=function(e){return e&&e.length?r(e,s,i):void 0}},3950(e){e.exports=function(){}},583(e,t,n){var r=n(7237),i=n(7255),s=n(8586),o=n(7797);e.exports=function(e){return s(e)?r(o(e)):i(e)}},860(e,t,n){var r=n(882),i=n(909),s=n(5389),o=n(5558),a=n(6449);e.exports=function(e,t,n){var c=a(e)?r:o,l=arguments.length<3;return c(e,s(t,4),n,l,i)}},3345(e){e.exports=function(){return[]}},3222(e,t,n){var r=n(7556);e.exports=function(e){return null==e?"":r(e)}},14(e,t,n){var r=n(5389),i=n(5765);e.exports=function(e,t){return e&&e.length?i(e,r(t,2)):[]}},2116(e,t,n){"use strict";e.exports=n(6439)},6439(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0,n(4615).default.install();const s=n(3281);i(n(3281),t);class o extends s.AbstractMessageReader{constructor(e){super(),this._onData=new s.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}}t.BrowserMessageReader=o;class a extends s.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.BrowserMessageWriter=a,t.createMessageConnection=function(e,t,n,r){return void 0===n&&(n=s.NullLogger),s.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,s.createMessageConnection)(e,t,n,r)}},4615(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3281);class i extends r.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return i.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}}i.emptyBuffer=new Uint8Array(0);class s{constructor(e){this.socket=e,this._onData=new r.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,r.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}}class o{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,t){if("string"==typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}}const a=new TextEncoder,c=Object.freeze({messageBuffer:Object.freeze({create:e=>new i(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if("utf-8"!==t.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(a.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new s(e),asWritableStream:e=>new o(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){const r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){const n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setInterval(e,t,...n){const r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function l(){return c}!function(e){e.install=function(){r.RAL.install(c)}}(l||(l={})),t.default=l},3281(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;const r=n(6177);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return r.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return r.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return r.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return r.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return r.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return r.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return r.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return r.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return r.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return r.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return r.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return r.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return r.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return r.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return r.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return r.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return r.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return r.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return r.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return r.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return r.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return r.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return r.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return r.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return r.ParameterStructures}});const i=n(3352);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return i.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return i.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return i.Touch}});const s=n(4019);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return s.Disposable}});const o=n(2676);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return o.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return o.Emitter}});const a=n(9850);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return a.CancellationToken}});const c=n(4996);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return c.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return c.SharedArrayReceiverStrategy}});const l=n(9085);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return l.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return l.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return l.ReadableStreamMessageReader}});const u=n(3193);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return u.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return u.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return u.WriteableStreamMessageWriter}});const d=n(9244);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return d.AbstractMessageBuffer}});const h=n(577);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return h.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return h.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return h.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return h.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return h.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return h.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return h.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return h.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return h.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return h.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return h.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return h.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return h.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return h.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return h.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return h.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return h.MessageStrategy}});const p=n(9590);t.RAL=p.default},9850(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const r=n(9590),i=n(8585),s=n(2676);var o;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:s.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:s.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(o||(t.CancellationToken=o={}));const a=Object.freeze(function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}});class c{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new s.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=o.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=o.None}}},577(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const r=n(9590),i=n(8585),s=n(6177),o=n(3352),a=n(2676),c=n(9850);var l,u,d,h,p,f,m,g,y,T,v,R,E,k,S,C,x,A,b;!function(e){e.type=new s.NotificationType("$/cancelRequest")}(l||(l={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(u||(t.ProgressToken=u={})),function(e){e.type=new s.NotificationType("$/progress")}(d||(d={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return i.func(e)}}(h||(h={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(p||(t.Trace=p={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(f||(t.TraceValues=f={})),function(e){e.fromString=function(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(p||(t.Trace=p={})),function(e){e.Text="text",e.JSON="json"}(m||(t.TraceFormat=m={})),function(e){e.fromString=function(t){return i.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(m||(t.TraceFormat=m={})),function(e){e.type=new s.NotificationType("$/setTrace")}(g||(t.SetTraceNotification=g={})),function(e){e.type=new s.NotificationType("$/logTrace")}(y||(t.LogTraceNotification=y={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(T||(t.ConnectionErrors=T={}));class $ extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,$.prototype)}}t.ConnectionError=$,function(e){e.is=function(e){const t=e;return t&&i.func(t.cancelUndispatched)}}(v||(t.ConnectionStrategy=v={})),function(e){e.is=function(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&i.func(t.createCancellationTokenSource)&&(void 0===t.dispose||i.func(t.dispose))}}(R||(t.IdCancellationReceiverStrategy=R={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&i.func(t.createCancellationTokenSource)&&(void 0===t.dispose||i.func(t.dispose))}}(E||(t.RequestCancellationReceiverStrategy=E={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){return R.is(e)||E.is(e)}}(k||(t.CancellationReceiverStrategy=k={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(l.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&i.func(t.sendCancellation)&&i.func(t.cleanup)}}(S||(t.CancellationSenderStrategy=S={})),function(e){e.Message=Object.freeze({receiver:k.Message,sender:S.Message}),e.is=function(e){const t=e;return t&&k.is(t.receiver)&&S.is(t.sender)}}(C||(t.CancellationStrategy=C={})),function(e){e.is=function(e){const t=e;return t&&i.func(t.handleMessage)}}(x||(t.MessageStrategy=x={})),function(e){e.is=function(e){const t=e;return t&&(C.is(t.cancellationStrategy)||v.is(t.connectionStrategy)||x.is(t.messageStrategy))}}(A||(t.ConnectionOptions=A={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(b||(b={})),t.createMessageConnection=function(e,n,f,v){const E=void 0!==f?f:t.NullLogger;let k=0,S=0,A=0;const w="2.0";let N;const I=new Map;let _;const P=new Map,L=new Map;let O,D,M=new o.LinkedMap,F=new Map,q=new Set,j=new Map,U=p.Off,G=m.Text,z=b.New;const B=new a.Emitter,K=new a.Emitter,W=new a.Emitter,V=new a.Emitter,H=new a.Emitter,Y=v&&v.cancellationStrategy?v.cancellationStrategy:C.Message;function X(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function Q(e){}function J(){return z===b.Listening}function Z(){return z===b.Closed}function ee(){return z===b.Disposed}function te(){z!==b.New&&z!==b.Listening||(z=b.Closed,K.fire(void 0))}function ne(){O||0===M.size||(O=(0,r.default)().timer.setImmediate(()=>{O=void 0,function(){if(0===M.size)return;const e=M.shift();try{const t=v?.messageStrategy;x.is(t)?t.handleMessage(e,re):re(e)}finally{ne()}}()}))}function re(e){s.Message.isRequest(e)?function(e){if(ee())return;function t(t,r,i){const o={jsonrpc:w,id:e.id};t instanceof s.ResponseError?o.error=t.toJson():o.result=void 0===t?null:t,oe(o,r,i),n.write(o).catch(()=>E.error("Sending response failed."))}function r(t,r,i){const s={jsonrpc:w,id:e.id,error:t.toJson()};oe(s,r,i),n.write(s).catch(()=>E.error("Sending response failed."))}!function(e){if(U!==p.Off&&D)if(G===m.Text){let t;U!==p.Verbose&&U!==p.Compact||!e.params||(t=`Params: ${se(e.params)}\n\n`),D.log(`Received request '${e.method} - (${e.id})'.`,t)}else ce("receive-request",e)}(e);const o=I.get(e.method);let a,c;o&&(a=o.type,c=o.handler);const l=Date.now();if(c||N){const o=e.id??String(Date.now()),u=R.is(Y.receiver)?Y.receiver.createCancellationTokenSource(o):Y.receiver.createCancellationTokenSource(e);null!==e.id&&q.has(e.id)&&u.cancel(),null!==e.id&&j.set(o,u);try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but received none.`),e.method,l);d=c(u.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===s.ParameterStructures.byName)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,l);d=c(...e.params,u.token)}else{if(void 0!==a&&a.parameterStructures===s.ParameterStructures.byPosition)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,l);d=c(e.params,u.token)}else N&&(d=N(e.method,e.params,u.token));const h=d;d?h.then?h.then(n=>{j.delete(o),t(n,e.method,l)},t=>{j.delete(o),t instanceof s.ResponseError?r(t,e.method,l):t&&i.string(t.message)?r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}):(j.delete(o),t(d,e.method,l)):(j.delete(o),function(t,r,i){void 0===t&&(t=null);const s={jsonrpc:w,id:e.id,result:t};oe(s,r,i),n.write(s).catch(()=>E.error("Sending response failed."))}(d,e.method,l))}catch(n){j.delete(o),n instanceof s.ResponseError?t(n,e.method,l):n&&i.string(n.message)?r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,l):r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}}else r(new s.ResponseError(s.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,l)}(e):s.Message.isNotification(e)?function(e){if(ee())return;let t,n;if(e.method===l.type.method){const t=e.params.id;return q.delete(t),void ae(e)}{const r=P.get(e.method);r&&(n=r.handler,t=r.type)}if(n||_)try{if(ae(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==s.ParameterStructures.byName&&E.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){const r=e.params;e.method===d.type.method&&2===r.length&&u.is(r[0])?n({token:r[0],value:r[1]}):(void 0!==t&&(t.parameterStructures===s.ParameterStructures.byName&&E.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&E.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${r.length} arguments`)),n(...r))}else void 0!==t&&t.parameterStructures===s.ParameterStructures.byPosition&&E.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else _&&_(e.method,e.params)}catch(t){t.message?E.error(`Notification handler '${e.method}' failed with message: ${t.message}`):E.error(`Notification handler '${e.method}' failed unexpectedly.`)}else W.fire(e)}(e):s.Message.isResponse(e)?function(e){if(!ee())if(null===e.id)e.error?E.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):E.error("Received response message without id. No further error information provided.");else{const t=e.id,n=F.get(t);if(function(e,t){if(U!==p.Off&&D)if(G===m.Text){let n;if(U!==p.Verbose&&U!==p.Compact||(e.error&&e.error.data?n=`Error data: ${se(e.error.data)}\n\n`:e.result?n=`Result: ${se(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";D.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else D.log(`Received response ${e.id} without active response promise.`,n)}else ce("receive-response",e)}(e,n),void 0!==n){F.delete(t);try{if(e.error){const t=e.error;n.reject(new s.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(e){e.message?E.error(`Response handler '${n.method}' failed with message: ${e.message}`):E.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void E.error("Received empty message.");E.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(i.string(t.id)||i.number(t.id)){const e=t.id,n=F.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(te),e.onError(function(e){B.fire([e,void 0,void 0])}),n.onClose(te),n.onError(function(e){B.fire(e)});const ie=e=>{try{if(s.Message.isNotification(e)&&e.method===l.type.method){const t=e.params.id,r=X(t),i=M.get(r);if(s.Message.isRequest(i)){const s=v?.connectionStrategy,o=s&&s.cancelUndispatched?s.cancelUndispatched(i,Q):void 0;if(o&&(void 0!==o.error||void 0!==o.result))return M.delete(r),j.delete(t),o.id=i.id,oe(o,e.method,Date.now()),void n.write(o).catch(()=>E.error("Sending response for canceled message failed."))}const o=j.get(t);if(void 0!==o)return o.cancel(),void ae(e);q.add(t)}!function(e,t){var n;s.Message.isRequest(t)?e.set(X(t.id),t):s.Message.isResponse(t)?e.set(null===(n=t.id)?"res-unknown-"+(++A).toString():"res-"+n.toString(),t):e.set("not-"+(++S).toString(),t)}(M,e)}finally{ne()}};function se(e){if(null!=e)switch(U){case p.Verbose:return JSON.stringify(e,null,4);case p.Compact:return JSON.stringify(e);default:return}}function oe(e,t,n){if(U!==p.Off&&D)if(G===m.Text){let r;U!==p.Verbose&&U!==p.Compact||(e.error&&e.error.data?r=`Error data: ${se(e.error.data)}\n\n`:e.result?r=`Result: ${se(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),D.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else ce("send-response",e)}function ae(e){if(U!==p.Off&&D&&e.method!==y.type.method)if(G===m.Text){let t;U!==p.Verbose&&U!==p.Compact||(t=e.params?`Params: ${se(e.params)}\n\n`:"No parameters provided.\n\n"),D.log(`Received notification '${e.method}'.`,t)}else ce("receive-notification",e)}function ce(e,t){if(!D||U===p.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};D.log(n)}function le(){if(Z())throw new $(T.Closed,"Connection is closed.");if(ee())throw new $(T.Disposed,"Connection is disposed.")}function ue(e){return void 0===e?null:e}function de(e){return null===e?void 0:e}function he(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function pe(e,t){switch(e){case s.ParameterStructures.auto:return he(t)?de(t):[ue(t)];case s.ParameterStructures.byName:if(!he(t))throw new Error("Received parameters by name but param is not an object literal.");return de(t);case s.ParameterStructures.byPosition:return[ue(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function fe(e,t){let n;const r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=pe(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(ue(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null)}return n}const me={sendNotification:(e,...t)=>{let r,o;if(le(),i.string(e)){r=e;const n=t[0];let i=0,a=s.ParameterStructures.auto;s.ParameterStructures.is(n)&&(i=1,a=n);let c=t.length;const l=c-i;switch(l){case 0:o=void 0;break;case 1:o=pe(a,t[i]);break;default:if(a===s.ParameterStructures.byName)throw new Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);o=t.slice(i,c).map(e=>ue(e))}}else{const n=t;r=e.method,o=fe(e,n)}const a={jsonrpc:w,method:r,params:o};return function(e){if(U!==p.Off&&D)if(G===m.Text){let t;U!==p.Verbose&&U!==p.Compact||(t=e.params?`Params: ${se(e.params)}\n\n`:"No parameters provided.\n\n"),D.log(`Sending notification '${e.method}'.`,t)}else ce("send-notification",e)}(a),n.write(a).catch(e=>{throw E.error("Sending notification failed."),e})},onNotification:(e,t)=>{let n;return le(),i.func(e)?_=e:t&&(i.string(e)?(n=e,P.set(e,{type:void 0,handler:t})):(n=e.method,P.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?P.delete(n):_=void 0}}},onProgress:(e,t,n)=>{if(L.has(t))throw new Error(`Progress handler for token ${t} already registered`);return L.set(t,n),{dispose:()=>{L.delete(t)}}},sendProgress:(e,t,n)=>me.sendNotification(d.type,{token:t,value:n}),onUnhandledProgress:V.event,sendRequest:(e,...t)=>{let r,o,a;if(le(),function(){if(!J())throw new Error("Call listen() first.")}(),i.string(e)){r=e;const n=t[0],i=t[t.length-1];let l=0,u=s.ParameterStructures.auto;s.ParameterStructures.is(n)&&(l=1,u=n);let d=t.length;c.CancellationToken.is(i)&&(d-=1,a=i);const h=d-l;switch(h){case 0:o=void 0;break;case 1:o=pe(u,t[l]);break;default:if(u===s.ParameterStructures.byName)throw new Error(`Received ${h} parameters for 'by Name' request parameter structure.`);o=t.slice(l,d).map(e=>ue(e))}}else{const n=t;r=e.method,o=fe(e,n);const i=e.numberOfParams;a=c.CancellationToken.is(n[i])?n[i]:void 0}const l=k++;let u;a&&(u=a.onCancellationRequested(()=>{const e=Y.sender.sendCancellation(me,l);return void 0===e?(E.log(`Received no promise from cancellation strategy when cancelling id ${l}`),Promise.resolve()):e.catch(()=>{E.log(`Sending cancellation messages for id ${l} failed`)})}));const d={jsonrpc:w,id:l,method:r,params:o};return function(e){if(U!==p.Off&&D)if(G===m.Text){let t;U!==p.Verbose&&U!==p.Compact||!e.params||(t=`Params: ${se(e.params)}\n\n`),D.log(`Sending request '${e.method} - (${e.id})'.`,t)}else ce("send-request",e)}(d),"function"==typeof Y.sender.enableCancellation&&Y.sender.enableCancellation(d),new Promise(async(e,t)=>{const i={method:r,timerStart:Date.now(),resolve:t=>{e(t),Y.sender.cleanup(l),u?.dispose()},reject:e=>{t(e),Y.sender.cleanup(l),u?.dispose()}};try{await n.write(d),F.set(l,i)}catch(e){throw E.error("Sending request failed."),i.reject(new s.ResponseError(s.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),e}})},onRequest:(e,t)=>{le();let n=null;return h.is(e)?(n=void 0,N=e):i.string(e)?(n=null,void 0!==t&&(n=e,I.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,I.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?I.delete(n):N=void 0)}}},hasPendingResponse:()=>F.size>0,trace:async(e,t,n)=>{let r=!1,s=m.Text;void 0!==n&&(i.boolean(n)?r=n:(r=n.sendNotification||!1,s=n.traceFormat||m.Text)),U=e,G=s,D=U===p.Off?void 0:t,!r||Z()||ee()||await me.sendNotification(g.type,{value:p.toString(e)})},onError:B.event,onClose:K.event,onUnhandledNotification:W.event,onDispose:H.event,end:()=>{n.end()},dispose:()=>{if(ee())return;z=b.Disposed,H.fire(void 0);const t=new s.ResponseError(s.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of F.values())e.reject(t);F=new Map,j=new Map,q=new Set,M=new o.LinkedMap,i.func(n.dispose)&&n.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{le(),function(){if(J())throw new $(T.AlreadyListening,"Connection is already listening")}(),z=b.Listening,e.listen(ie)},inspect:()=>{(0,r.default)().console.log("inspect")}};return me.onNotification(y.type,e=>{if(U===p.Off||!D)return;const t=U===p.Verbose||U===p.Compact;D.log(e.message,t?e.verbose:void 0)}),me.onNotification(d.type,e=>{const t=L.get(e.token);t?t(e.value):V.fire(e)}),me}},4019(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,function(e){e.create=function(e){return{dispose:e}}}(n||(t.Disposable=n={}))},2676(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(9590);var i;!function(e){const t={dispose(){}};e.None=function(){return t}}(i||(t.Event=i={}));class s{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r<i;r++)if(this._callbacks[r]===e){if(this._contexts[r]===t)return this._callbacks.splice(r,1),void this._contexts.splice(r,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],n=this._callbacks.slice(0),i=this._contexts.slice(0);for(let s=0,o=n.length;s<o;s++)try{t.push(n[s].apply(i[s],e))}catch(e){(0,r.default)().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class o{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new s),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=o,o._noop=function(){}},8585(e,t){"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>n(e))}},3352(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(r||(t.Touch=r={}));class i{constructor(){this[n]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=r.None){const n=this._map.get(e);if(n)return t!==r.None&&this.touch(n,t),n.value}set(e,t,n=r.None){let i=this._map.get(e);if(i)i.value=t,n!==r.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(i);break;case r.First:this.addItemFirst(i);break;case r.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===r.First||t===r.Last)if(t===r.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===r.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=i,t.LRUCache=class extends i{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=r.AsNew){return super.get(e,t)}peek(e){return super.get(e,r.None)}set(e,t){return super.set(e,t,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},9244(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,n=0,r=0,i=0;e:for(;n<this._chunks.length;){const e=this._chunks[n];for(r=0;r<e.length;){switch(e[r]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,r++;break e;default:t=0}break;default:t=0}r++}i+=e.byteLength,n++}if(4!==t)return;const s=this._read(i+r),o=new Map,a=this.toString(s,"ascii").split("\r\n");if(a.length<2)return o;for(let t=0;t<a.length-2;t++){const n=a[t],r=n.indexOf(":");if(-1===r)throw new Error(`Message header must separate key and value using ':'\n${n}`);const i=n.substr(0,r),s=n.substr(r+1).trim();o.set(e?i.toLowerCase():i,s)}return o}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const r=this._chunks[0];if(r.byteLength>e){const i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}},9085(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const r=n(9590),i=n(8585),s=n(2676),o=n(4323);var a,c;!function(e){e.is=function(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)}}(a||(t.MessageReader=a={}));class l{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter,this.partialMessageEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=l,function(e){e.fromOptions=function(e){let t,n;const i=new Map;let s;const o=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,i.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)i.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(s=e.contentTypeDecoder,o.set(s.name,s)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)o.set(t.name,t)}return void 0===s&&(s=(0,r.default)().applicationJson.decoder,o.set(s.name,s)),{charset:t,contentDecoder:n,contentDecoders:i,contentTypeDecoder:s,contentTypeDecoders:o}}}(c||(c={})),t.ReadableStreamMessageReader=class extends l{constructor(e,t){super(),this.readable=e,this.options=c.fromOptions(t),this.buffer=(0,r.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new o.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));const n=parseInt(t);if(isNaN(n))return void this.fireError(new Error(`Content-Length value must be a number. Got ${t}`));this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)}).catch(e=>{this.fireError(e)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,r.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},3193(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const r=n(9590),i=n(8585),s=n(4323),o=n(2676);var a,c;!function(e){e.is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)}}(a||(t.MessageWriter=a={}));class l{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=l,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,r.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,r.default)().applicationJson.encoder}}}(c||(c={})),t.WriteableStreamMessageWriter=class extends l{constructor(e,t){super(),this.writable=e,this.options=c.fromOptions(t),this.errorCount=0,this.writeSemaphore=new s.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(t=>{const n=[];return n.push("Content-Length: ",t.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(e,n,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,n){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},6177(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const r=n(8585);var i,s;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(i||(t.ErrorCodes=i={}));class o extends Error{constructor(e,t,n){super(t),this.code=r.number(e)?e:i.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,o.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=o;class a{constructor(e){this.kind=e}static is(e){return e===a.auto||e===a.byName||e===a.byPosition}toString(){return this.kind}}t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");class c{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return a.auto}}t.AbstractMessageSignature=c,t.RequestType0=class extends c{constructor(e){super(e,0)}},t.RequestType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends c{constructor(e){super(e,2)}},t.RequestType3=class extends c{constructor(e){super(e,3)}},t.RequestType4=class extends c{constructor(e){super(e,4)}},t.RequestType5=class extends c{constructor(e){super(e,5)}},t.RequestType6=class extends c{constructor(e){super(e,6)}},t.RequestType7=class extends c{constructor(e){super(e,7)}},t.RequestType8=class extends c{constructor(e){super(e,8)}},t.RequestType9=class extends c{constructor(e){super(e,9)}},t.NotificationType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends c{constructor(e){super(e,0)}},t.NotificationType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends c{constructor(e){super(e,2)}},t.NotificationType3=class extends c{constructor(e){super(e,3)}},t.NotificationType4=class extends c{constructor(e){super(e,4)}},t.NotificationType5=class extends c{constructor(e){super(e,5)}},t.NotificationType6=class extends c{constructor(e){super(e,6)}},t.NotificationType7=class extends c{constructor(e){super(e,7)}},t.NotificationType8=class extends c{constructor(e){super(e,8)}},t.NotificationType9=class extends c{constructor(e){super(e,9)}},function(e){e.isRequest=function(e){const t=e;return t&&r.string(t.method)&&(r.string(t.id)||r.number(t.id))},e.isNotification=function(e){const t=e;return t&&r.string(t.method)&&void 0===e.id},e.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(r.string(t.id)||r.number(t.id)||null===t.id)}}(s||(t.Message=s={}))},9590(e,t){"use strict";let n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},4323(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const r=n(9590);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,r.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},4996(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const r=n(9850);var i;!function(e){e.Continue=0,e.Cancelled=1}(i||(i={})),t.SharedArraySenderStrategy=class{constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=i.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const n=this.buffers.get(t);if(void 0===n)return;const r=new Int32Array(n,0,1);Atomics.store(r,0,i.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class s{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===i.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class o{constructor(e){this.token=new s(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new r.CancellationTokenSource:new o(t)}}},4512(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const s=n(2116);i(n(2116),t),i(n(8766),t),t.createProtocolConnection=function(e,t,n,r){return(0,s.createMessageConnection)(e,t,n,r)}},8766(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,i(n(6439),t),i(n(6203),t),i(n(372),t),i(n(1560),t);var s,o=n(1580);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return o.createProtocolConnection}}),function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800}(s||(t.LSPErrorCodes=s={}))},1580(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(6439);t.createProtocolConnection=function(e,t,n,i){return r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,r.createMessageConnection)(e,t,n,i)}},372(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const r=n(6439);var i;!function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"}(i||(t.MessageDirection=i={})),t.RegistrationType=class{constructor(e){this.method=e}};class s extends r.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=s;class o extends r.RequestType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolRequestType=o;class a extends r.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=a;class c extends r.NotificationType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolNotificationType=c},8765(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const r=n(372);var i,s,o;!function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.CallHierarchyPrepareRequest=i={})),function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.CallHierarchyIncomingCallsRequest=s={})),function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.CallHierarchyOutgoingCallsRequest=o={}))},7672(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const r=n(372);var i,s;!function(e){e.method="textDocument/documentColor",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.DocumentColorRequest=i={})),function(e){e.method="textDocument/colorPresentation",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.ColorPresentationRequest=s={}))},1660(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const r=n(372);var i;!function(e){e.method="workspace/configuration",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(i||(t.ConfigurationRequest=i={}))},6914(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const r=n(372);var i;!function(e){e.method="textDocument/declaration",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.DeclarationRequest=i={}))},6011(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const r=n(6439),i=n(8598),s=n(372);var o,a,c,l,u;!function(e){e.is=function(e){const t=e;return t&&i.boolean(t.retriggerRequest)}}(o||(t.DiagnosticServerCancellationData=o={})),function(e){e.Full="full",e.Unchanged="unchanged"}(a||(t.DocumentDiagnosticReportKind=a={})),function(e){e.method="textDocument/diagnostic",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method),e.partialResult=new r.ProgressType}(c||(t.DocumentDiagnosticRequest=c={})),function(e){e.method="workspace/diagnostic",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method),e.partialResult=new r.ProgressType}(l||(t.WorkspaceDiagnosticRequest=l={})),function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=s.MessageDirection.serverToClient,e.type=new s.ProtocolRequestType0(e.method)}(u||(t.DiagnosticRefreshRequest=u={}))},9840(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const r=n(372);var i,s,o,a,c,l,u;!function(e){e.file="file",e.folder="folder"}(i||(t.FileOperationPatternKind=i={})),function(e){e.method="workspace/willCreateFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.WillCreateFilesRequest=s={})),function(e){e.method="workspace/didCreateFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(o||(t.DidCreateFilesNotification=o={})),function(e){e.method="workspace/willRenameFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(a||(t.WillRenameFilesRequest=a={})),function(e){e.method="workspace/didRenameFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(c||(t.DidRenameFilesNotification=c={})),function(e){e.method="workspace/didDeleteFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(l||(t.DidDeleteFilesNotification=l={})),function(e){e.method="workspace/willDeleteFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(u||(t.WillDeleteFilesRequest=u={}))},2874(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;const r=n(372);var i,s;!function(e){e.method="textDocument/foldingRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.FoldingRangeRequest=i={})),function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(s||(t.FoldingRangeRefreshRequest=s={}))},9574(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const r=n(372);var i;!function(e){e.method="textDocument/implementation",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.ImplementationRequest=i={}))},7752(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const r=n(372);var i,s,o;!function(e){e.method="textDocument/inlayHint",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.InlayHintRequest=i={})),function(e){e.method="inlayHint/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.InlayHintResolveRequest=s={})),function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(o||(t.InlayHintRefreshRequest=o={}))},3307(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;const r=n(372);var i;!function(e){e.method="textDocument/inlineCompletion",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.InlineCompletionRequest=i={}))},3124(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const r=n(372);var i,s;!function(e){e.method="textDocument/inlineValue",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.InlineValueRequest=i={})),function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(s||(t.InlineValueRefreshRequest=s={}))},1560(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=void 0;const r=n(372),i=n(6203),s=n(8598),o=n(9574);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return o.ImplementationRequest}});const a=n(8461);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return a.TypeDefinitionRequest}});const c=n(2316);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return c.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return c.DidChangeWorkspaceFoldersNotification}});const l=n(1660);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return l.ConfigurationRequest}});const u=n(7672);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return u.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return u.ColorPresentationRequest}});const d=n(2874);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return d.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return d.FoldingRangeRefreshRequest}});const h=n(6914);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return h.DeclarationRequest}});const p=n(3487);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return p.SelectionRangeRequest}});const f=n(2687);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return f.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return f.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return f.WorkDoneProgressCancelNotification}});const m=n(8765);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return m.CallHierarchyPrepareRequest}});const g=n(2478);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return g.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return g.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return g.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return g.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return g.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return g.SemanticTokensRegistrationType}});const y=n(908);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return y.ShowDocumentRequest}});const T=n(5316);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return T.LinkedEditingRangeRequest}});const v=n(9840);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return v.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return v.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return v.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return v.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return v.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return v.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return v.WillDeleteFilesRequest}});const R=n(9047);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return R.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return R.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return R.MonikerRequest}});const E=n(645);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return E.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return E.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return E.TypeHierarchySupertypesRequest}});const k=n(3124);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return k.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return k.InlineValueRefreshRequest}});const S=n(7752);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return S.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return S.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return S.InlayHintRefreshRequest}});const C=n(6011);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return C.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return C.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return C.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return C.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return C.DiagnosticRefreshRequest}});const x=n(3557);Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return x.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return x.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return x.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return x.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return x.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return x.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidCloseNotebookDocumentNotification}});const A=n(3307);var b,$,w,N,I,_,P,L,O,D,M,F,q,j,U,G,z,B,K,W,V,H,Y,X,Q,J,Z,ee,te,ne,re,ie,se,oe,ae,ce,le,ue,de,he,pe,fe,me,ge,ye,Te,ve,Re,Ee,ke,Se,Ce,xe,Ae,be,$e,we,Ne,Ie,_e,Pe,Le,Oe,De,Me;Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return A.InlineCompletionRequest}}),function(e){e.is=function(e){const t=e;return s.string(t)||s.string(t.language)||s.string(t.scheme)||s.string(t.pattern)}}(b||(t.TextDocumentFilter=b={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(s.string(t.notebookType)||s.string(t.scheme)||s.string(t.pattern))}}($||(t.NotebookDocumentFilter=$={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(s.string(t.notebook)||$.is(t.notebook))&&(void 0===t.language||s.string(t.language))}}(w||(t.NotebookCellTextDocumentFilter=w={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!s.string(t)&&!b.is(t)&&!w.is(t))return!1;return!0}}(N||(t.DocumentSelector=N={})),function(e){e.method="client/registerCapability",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(I||(t.RegistrationRequest=I={})),function(e){e.method="client/unregisterCapability",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(_||(t.UnregistrationRequest=_={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(P||(t.ResourceOperationKind=P={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(L||(t.FailureHandlingKind=L={})),function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"}(O||(t.PositionEncodingKind=O={})),function(e){e.hasId=function(e){const t=e;return t&&s.string(t.id)&&t.id.length>0}}(D||(t.StaticRegistrationOptions=D={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||N.is(t.documentSelector))}}(M||(t.TextDocumentRegistrationOptions=M={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(void 0===t.workDoneProgress||s.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&s.boolean(t.workDoneProgress)}}(F||(t.WorkDoneProgressOptions=F={})),function(e){e.method="initialize",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(q||(t.InitializeRequest=q={})),function(e){e.unknownProtocolVersion=1}(j||(t.InitializeErrorCodes=j={})),function(e){e.method="initialized",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(U||(t.InitializedNotification=U={})),function(e){e.method="shutdown",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType0(e.method)}(G||(t.ShutdownRequest=G={})),function(e){e.method="exit",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType0(e.method)}(z||(t.ExitNotification=z={})),function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(B||(t.DidChangeConfigurationNotification=B={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5}(K||(t.MessageType=K={})),function(e){e.method="window/showMessage",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(W||(t.ShowMessageNotification=W={})),function(e){e.method="window/showMessageRequest",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(V||(t.ShowMessageRequest=V={})),function(e){e.method="window/logMessage",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(H||(t.LogMessageNotification=H={})),function(e){e.method="telemetry/event",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(Y||(t.TelemetryEventNotification=Y={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(X||(t.TextDocumentSyncKind=X={})),function(e){e.method="textDocument/didOpen",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(Q||(t.DidOpenTextDocumentNotification=Q={})),function(e){e.isIncremental=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(J||(t.TextDocumentContentChangeEvent=J={})),function(e){e.method="textDocument/didChange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(Z||(t.DidChangeTextDocumentNotification=Z={})),function(e){e.method="textDocument/didClose",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(ee||(t.DidCloseTextDocumentNotification=ee={})),function(e){e.method="textDocument/didSave",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(te||(t.DidSaveTextDocumentNotification=te={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(ne||(t.TextDocumentSaveReason=ne={})),function(e){e.method="textDocument/willSave",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(re||(t.WillSaveTextDocumentNotification=re={})),function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ie||(t.WillSaveTextDocumentWaitUntilRequest=ie={})),function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(se||(t.DidChangeWatchedFilesNotification=se={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(oe||(t.FileChangeType=oe={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(i.URI.is(t.baseUri)||i.WorkspaceFolder.is(t.baseUri))&&s.string(t.pattern)}}(ae||(t.RelativePattern=ae={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(ce||(t.WatchKind=ce={})),function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(le||(t.PublishDiagnosticsNotification=le={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(ue||(t.CompletionTriggerKind=ue={})),function(e){e.method="textDocument/completion",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(de||(t.CompletionRequest=de={})),function(e){e.method="completionItem/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(he||(t.CompletionResolveRequest=he={})),function(e){e.method="textDocument/hover",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(pe||(t.HoverRequest=pe={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(fe||(t.SignatureHelpTriggerKind=fe={})),function(e){e.method="textDocument/signatureHelp",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(me||(t.SignatureHelpRequest=me={})),function(e){e.method="textDocument/definition",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ge||(t.DefinitionRequest=ge={})),function(e){e.method="textDocument/references",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ye||(t.ReferencesRequest=ye={})),function(e){e.method="textDocument/documentHighlight",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Te||(t.DocumentHighlightRequest=Te={})),function(e){e.method="textDocument/documentSymbol",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ve||(t.DocumentSymbolRequest=ve={})),function(e){e.method="textDocument/codeAction",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Re||(t.CodeActionRequest=Re={})),function(e){e.method="codeAction/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ee||(t.CodeActionResolveRequest=Ee={})),function(e){e.method="workspace/symbol",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ke||(t.WorkspaceSymbolRequest=ke={})),function(e){e.method="workspaceSymbol/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Se||(t.WorkspaceSymbolResolveRequest=Se={})),function(e){e.method="textDocument/codeLens",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ce||(t.CodeLensRequest=Ce={})),function(e){e.method="codeLens/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(xe||(t.CodeLensResolveRequest=xe={})),function(e){e.method="workspace/codeLens/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(Ae||(t.CodeLensRefreshRequest=Ae={})),function(e){e.method="textDocument/documentLink",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(be||(t.DocumentLinkRequest=be={})),function(e){e.method="documentLink/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}($e||(t.DocumentLinkResolveRequest=$e={})),function(e){e.method="textDocument/formatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(we||(t.DocumentFormattingRequest=we={})),function(e){e.method="textDocument/rangeFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ne||(t.DocumentRangeFormattingRequest=Ne={})),function(e){e.method="textDocument/rangesFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ie||(t.DocumentRangesFormattingRequest=Ie={})),function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(_e||(t.DocumentOnTypeFormattingRequest=_e={})),function(e){e.Identifier=1}(Pe||(t.PrepareSupportDefaultBehavior=Pe={})),function(e){e.method="textDocument/rename",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Le||(t.RenameRequest=Le={})),function(e){e.method="textDocument/prepareRename",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Oe||(t.PrepareRenameRequest=Oe={})),function(e){e.method="workspace/executeCommand",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(De||(t.ExecuteCommandRequest=De={})),function(e){e.method="workspace/applyEdit",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType("workspace/applyEdit")}(Me||(t.ApplyWorkspaceEditRequest=Me={}))},5316(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const r=n(372);var i;!function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.LinkedEditingRangeRequest=i={}))},9047(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const r=n(372);var i,s,o;!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(i||(t.UniquenessLevel=i={})),function(e){e.$import="import",e.$export="export",e.local="local"}(s||(t.MonikerKind=s={})),function(e){e.method="textDocument/moniker",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.MonikerRequest=o={}))},3557(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const r=n(6203),i=n(8598),s=n(372);var o,a,c,l,u,d,h,p,f,m;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(o||(t.NotebookCellKind=o={})),function(e){e.create=function(e,t){const n={executionOrder:e};return!0!==t&&!1!==t||(n.success=t),n},e.is=function(e){const t=e;return i.objectLiteral(t)&&r.uinteger.is(t.executionOrder)&&(void 0===t.success||i.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}}(a||(t.ExecutionSummary=a={})),function(e){function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(typeof e!=typeof n)return!1;if("object"!=typeof e)return!1;const r=Array.isArray(e),s=Array.isArray(n);if(r!==s)return!1;if(r&&s){if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(!t(e[r],n[r]))return!1}if(i.objectLiteral(e)&&i.objectLiteral(n)){const r=Object.keys(e),i=Object.keys(n);if(r.length!==i.length)return!1;if(r.sort(),i.sort(),!t(r,i))return!1;for(let i=0;i<r.length;i++){const s=r[i];if(!t(e[s],n[s]))return!1}}return!0}e.create=function(e,t){return{kind:e,document:t}},e.is=function(e){const t=e;return i.objectLiteral(t)&&o.is(t.kind)&&r.DocumentUri.is(t.document)&&(void 0===t.metadata||i.objectLiteral(t.metadata))},e.diff=function(e,n){const r=new Set;return e.document!==n.document&&r.add("document"),e.kind!==n.kind&&r.add("kind"),e.executionSummary!==n.executionSummary&&r.add("executionSummary"),void 0===e.metadata&&void 0===n.metadata||t(e.metadata,n.metadata)||r.add("metadata"),void 0===e.executionSummary&&void 0===n.executionSummary||a.equals(e.executionSummary,n.executionSummary)||r.add("executionSummary"),r}}(c||(t.NotebookCell=c={})),function(e){e.create=function(e,t,n,r){return{uri:e,notebookType:t,version:n,cells:r}},e.is=function(e){const t=e;return i.objectLiteral(t)&&i.string(t.uri)&&r.integer.is(t.version)&&i.typedArray(t.cells,c.is)}}(l||(t.NotebookDocument=l={})),function(e){e.method="notebookDocument/sync",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.RegistrationType(e.method)}(u||(t.NotebookDocumentSyncRegistrationType=u={})),function(e){e.method="notebookDocument/didOpen",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolNotificationType(e.method),e.registrationMethod=u.method}(d||(t.DidOpenNotebookDocumentNotification=d={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&r.uinteger.is(t.start)&&r.uinteger.is(t.deleteCount)&&(void 0===t.cells||i.typedArray(t.cells,c.is))},e.create=function(e,t,n){const r={start:e,deleteCount:t};return void 0!==n&&(r.cells=n),r}}(h||(t.NotebookCellArrayChange=h={})),function(e){e.method="notebookDocument/didChange",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolNotificationType(e.method),e.registrationMethod=u.method}(p||(t.DidChangeNotebookDocumentNotification=p={})),function(e){e.method="notebookDocument/didSave",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolNotificationType(e.method),e.registrationMethod=u.method}(f||(t.DidSaveNotebookDocumentNotification=f={})),function(e){e.method="notebookDocument/didClose",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolNotificationType(e.method),e.registrationMethod=u.method}(m||(t.DidCloseNotebookDocumentNotification=m={}))},2687(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const r=n(6439),i=n(372);var s,o,a;!function(e){e.type=new r.ProgressType,e.is=function(t){return t===e.type}}(s||(t.WorkDoneProgress=s={})),function(e){e.method="window/workDoneProgress/create",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(o||(t.WorkDoneProgressCreateRequest=o={})),function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(a||(t.WorkDoneProgressCancelNotification=a={}))},3487(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const r=n(372);var i;!function(e){e.method="textDocument/selectionRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.SelectionRangeRequest=i={}))},2478(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const r=n(372);var i,s,o,a,c,l;!function(e){e.Relative="relative"}(i||(t.TokenFormat=i={})),function(e){e.method="textDocument/semanticTokens",e.type=new r.RegistrationType(e.method)}(s||(t.SemanticTokensRegistrationType=s={})),function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=s.method}(o||(t.SemanticTokensRequest=o={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=s.method}(a||(t.SemanticTokensDeltaRequest=a={})),function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=s.method}(c||(t.SemanticTokensRangeRequest=c={})),function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(l||(t.SemanticTokensRefreshRequest=l={}))},908(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const r=n(372);var i;!function(e){e.method="window/showDocument",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(i||(t.ShowDocumentRequest=i={}))},8461(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const r=n(372);var i;!function(e){e.method="textDocument/typeDefinition",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.TypeDefinitionRequest=i={}))},645(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const r=n(372);var i,s,o;!function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.TypeHierarchyPrepareRequest=i={})),function(e){e.method="typeHierarchy/supertypes",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.TypeHierarchySupertypesRequest=s={})),function(e){e.method="typeHierarchy/subtypes",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.TypeHierarchySubtypesRequest=o={}))},2316(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const r=n(372);var i,s;!function(e){e.method="workspace/workspaceFolders",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(i||(t.WorkspaceFoldersRequest=i={})),function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(s||(t.DidChangeWorkspaceFoldersNotification=s={}))},8598(e,t){"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>n(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},2607(e,t,n){"use strict";function r(e){return e.charCodeAt(0)}function i(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function s(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t],e[t]=!0}function o(e){if(void 0===e)throw Error("Internal Error - Should never get here!");return!0}function a(){throw Error("Internal Error - Should never get here!")}function c(e){return"Character"===e.type}n.d(t,{z:()=>g,H:()=>m});const l=[];for(let e=r("0");e<=r("9");e++)l.push(e);const u=[r("_")].concat(l);for(let e=r("a");e<=r("z");e++)u.push(e);for(let e=r("A");e<=r("Z");e++)u.push(e);const d=[r(" "),r("\f"),r("\n"),r("\r"),r("\t"),r("\v"),r("\t"),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r("\u2028"),r("\u2029"),r(" "),r(" "),r(" "),r("\ufeff")],h=/[0-9a-fA-F]/,p=/[0-9]/,f=/[1-9]/;class m{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":s(n,"global");break;case"i":s(n,"ignoreCase");break;case"m":s(n,"multiLine");break;case"u":s(n,"unicode");break;case"y":s(n,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){const e=[],t=this.idx;for(e.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":let t;switch(this.consumeChar("?"),this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}}o(t);const n=this.disjunction();return this.consumeChar(")"),{type:t,value:n,loc:this.loc(e)}}return a()}quantifier(e=!1){let t;const n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":const n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:n,atMost:e}):t={atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;o(t)}if(!0!==e||void 0!==t)return o(t)?("?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(n),t):void 0}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group()}return void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),o(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):a()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[r("\n"),r("\r"),r("\u2028"),r("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=l;break;case"D":e=l,t=!0;break;case"s":e=d;break;case"S":e=d,t=!0;break;case"w":e=u;break;case"W":e=u,t=!0}return o(e)?{type:"Set",value:e,complement:t}:a()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=r("\f");break;case"n":e=r("\n");break;case"r":e=r("\r");break;case"t":e=r("\t");break;case"v":e=r("\v")}return o(e)?{type:"Character",value:e}:a()}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:r("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:r(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:r(this.popChar())}}}characterClass(){const e=[];let t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){const t=this.classAtom();if(t.type,c(t)&&this.isRangeDash()){this.consumeChar("-");const n=this.classAtom();if(n.type,c(n)){if(n.value<t.value)throw Error("Range out of order in character class");e.push({from:t.value,to:n.value})}else i(t.value,e),e.push(r("-")),i(n.value,e)}else i(t.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}}classAtom(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:r("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;this.consumeChar("("),"?"===this.peekChar(0)?(this.consumeChar("?"),this.consumeChar(":"),e=!1):this.groupIdx++;const t=this.disjunction();this.consumeChar(")");const n={type:"Group",capturing:e,value:t};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(!1===f.test(e))throw Error("Expecting a positive integer");for(;p.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(!1===p.test(e))throw Error("Expecting an integer");for(;p.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){const e=this.popChar();switch(e){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:r(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return"-"===this.peekChar()&&this.isClassAtom(1)}isDigit(){return p.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2)||"<"===this.peekChar(2)&&("="===this.peekChar(3)||"!"===this.peekChar(3)));default:return!1}}isQuantifier(){const e=this.saveState();try{return void 0!==this.quantifier(!0)}catch(e){return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let t="";for(let n=0;n<e;n++){const e=this.popChar();if(!1===h.test(e))throw Error("Expecting a HexDecimal digits");t+=e}return{type:"Character",value:parseInt(t,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){const e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(void 0!==e&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}class g{visitChildren(e){for(const t in e){const n=e[t];e.hasOwnProperty(t)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach(e=>{this.visit(e)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}},722(e,t,n){"use strict";n.d(t,{b:()=>l});var r=n(7492),i=n(610),s=n(9364),o=n(1917),a=class extends r.mR{static{(0,r.K2)(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},c={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function l(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.d$,c);return t.ServiceRegistry.register(n),{shared:t,GitGraph:n}}(0,r.K2)(l,"createGitGraphServices")},8562(e,t,n){"use strict";n.d(t,{d:()=>p});var r=n(7492),i=n(610),s=n(9364),o=n(1917),a=class extends r.mR{static{(0,r.K2)(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},c=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,l=class extends r.dg{static{(0,r.K2)(this,"TreemapValueConverter")}runCustomConverter(e,t,n){if("NUMBER2"===e.name)return parseFloat(t.replace(/,/g,""));if("SEPARATOR"===e.name)return t.substring(1,t.length-1);if("STRING2"===e.name)return t.substring(1,t.length-1);if("INDENTATION"===e.name)return t.length;if("ClassDef"===e.name){if("string"!=typeof t)return t;const e=c.exec(t);if(e)return{$type:"ClassDefStatement",className:e[1],styleText:e[2]||void 0}}}};function u(e){const t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){const e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}(0,r.K2)(u,"registerValidationChecks");var d=class{static{(0,r.K2)(this,"TreemapValidator")}checkSingleRoot(e,t){let n;for(const r of e.TreemapRows)r.item&&(void 0===n&&void 0===r.indent?n=0:(void 0===r.indent||void 0!==n&&n>=parseInt(r.indent,10))&&t("error","Multiple root nodes are not allowed in a treemap.",{node:r,property:"item"}))}},h={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new l,"ValueConverter")},validation:{TreemapValidator:(0,r.K2)(()=>new d,"TreemapValidator")}};function p(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.XE,h);return t.ServiceRegistry.register(n),u(n),{shared:t,Treemap:n}}(0,r.K2)(p,"createTreemapServices")},2963(e,t,n){"use strict";n.d(t,{v:()=>l});var r=n(7492),i=n(610),s=n(9364),o=n(1917),a=class extends r.mR{static{(0,r.K2)(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},c={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function l(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.FZ,c);return t.ServiceRegistry.register(n),{shared:t,Info:n}}(0,r.K2)(l,"createInfoServices")},888(e,t,n){"use strict";n.d(t,{f:()=>u});var r=n(7492),i=n(610),s=n(9364),o=n(1917),a=class extends r.mR{static{(0,r.K2)(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},c=class extends r.dg{static{(0,r.K2)(this,"PieValueConverter")}runCustomConverter(e,t,n){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},l={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new c,"ValueConverter")}};function u(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.D_,l);return t.ServiceRegistry.register(n),{shared:t,Pie:n}}(0,r.K2)(u,"createPieServices")},5626(e,t,n){"use strict";n.d(t,{$:()=>l});var r=n(7492),i=n(610),s=n(9364),o=n(1917),a=class extends r.mR{static{(0,r.K2)(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},c={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function l(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.p5,c);return t.ServiceRegistry.register(n),{shared:t,Packet:n}}(0,r.K2)(l,"createPacketServices")},7492(e,t,n){"use strict";n.d(t,{mR:()=>ge,dg:()=>fe,wV:()=>oe,Tm:()=>me,d$:()=>ae,FZ:()=>ce,sr:()=>se,p5:()=>le,D_:()=>ue,Bg:()=>de,XE:()=>he,K2:()=>k});var r=n(2479),i=n(610),s=n(9364),o=n(2151),a=n(1917),c=n(7608);const l={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},u={AstReflection:()=>new o.QX};function d(e){const t=function(){const e=(0,s.WQ)((0,i.u)(a.D),u),t=(0,s.WQ)((0,i.t)({shared:e}),l);return e.ServiceRegistry.register(t),t}(),n=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(n,c.r.parse(`memory:/${n.name??"grammar"}.langium`)),n}var h,p,f,m,g,y,T,v=n(5033),R=n(4326),E=Object.defineProperty,k=(e,t)=>E(e,"name",{value:t,configurable:!0});(h||(h={})).Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[[\w ]+\]/},(p||(p={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/},(f||(f={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(m||(m={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(g||(g={})).Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(y||(y={})).Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(T||(T={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/},h.Terminals,p.Terminals,f.Terminals,m.Terminals,g.Terminals,y.Terminals,T.Terminals;var S="Architecture";k(function(e){return B.isInstance(e,S)},"isArchitecture");var C="Axis",x="Branch";k(function(e){return B.isInstance(e,x)},"isBranch");var A="Commit";k(function(e){return B.isInstance(e,A)},"isCommit");var b="GitGraph";k(function(e){return B.isInstance(e,b)},"isGitGraph");var $="Info";k(function(e){return B.isInstance(e,$)},"isInfo");var w="Item",N="Merge";k(function(e){return B.isInstance(e,N)},"isMerge");var I="Packet";k(function(e){return B.isInstance(e,I)},"isPacket");var _="PacketBlock";k(function(e){return B.isInstance(e,_)},"isPacketBlock");k(function(e){return B.isInstance(e,"Pie")},"isPie");var P="PieSection";k(function(e){return B.isInstance(e,P)},"isPieSection");var L="Statement",O="Treemap";k(function(e){return B.isInstance(e,O)},"isTreemap");var D,M,F,q,j,U,G,z=class extends r.kD{constructor(){super(...arguments),this.types={Architecture:{name:S,properties:{accDescr:{name:"accDescr"},accTitle:{name:"accTitle"},edges:{name:"edges",defaultValue:[]},groups:{name:"groups",defaultValue:[]},junctions:{name:"junctions",defaultValue:[]},services:{name:"services",defaultValue:[]},title:{name:"title"}},superTypes:[]},Axis:{name:C,properties:{label:{name:"label"},name:{name:"name"}},superTypes:[]},Branch:{name:x,properties:{name:{name:"name"},order:{name:"order"}},superTypes:[L]},Checkout:{name:"Checkout",properties:{branch:{name:"branch"}},superTypes:[L]},CherryPicking:{name:"CherryPicking",properties:{id:{name:"id"},parent:{name:"parent"},tags:{name:"tags",defaultValue:[]}},superTypes:[L]},ClassDefStatement:{name:"ClassDefStatement",properties:{className:{name:"className"},styleText:{name:"styleText"}},superTypes:[]},Commit:{name:A,properties:{id:{name:"id"},message:{name:"message"},tags:{name:"tags",defaultValue:[]},type:{name:"type"}},superTypes:[L]},Curve:{name:"Curve",properties:{entries:{name:"entries",defaultValue:[]},label:{name:"label"},name:{name:"name"}},superTypes:[]},Direction:{name:"Direction",properties:{accDescr:{name:"accDescr"},accTitle:{name:"accTitle"},dir:{name:"dir"},statements:{name:"statements",defaultValue:[]},title:{name:"title"}},superTypes:[b]},Edge:{name:"Edge",properties:{lhsDir:{name:"lhsDir"},lhsGroup:{name:"lhsGroup",defaultValue:!1},lhsId:{name:"lhsId"},lhsInto:{name:"lhsInto",defaultValue:!1},rhsDir:{name:"rhsDir"},rhsGroup:{name:"rhsGroup",defaultValue:!1},rhsId:{name:"rhsId"},rhsInto:{name:"rhsInto",defaultValue:!1},title:{name:"title"}},superTypes:[]},Entry:{name:"Entry",properties:{axis:{name:"axis",referenceType:C},value:{name:"value"}},superTypes:[]},GitGraph:{name:b,properties:{accDescr:{name:"accDescr"},accTitle:{name:"accTitle"},statements:{name:"statements",defaultValue:[]},title:{name:"title"}},superTypes:[]},Group:{name:"Group",properties:{icon:{name:"icon"},id:{name:"id"},in:{name:"in"},title:{name:"title"}},superTypes:[]},Info:{name:$,properties:{accDescr:{name:"accDescr"},accTitle:{name:"accTitle"},title:{name:"title"}},superTypes:[]},Item:{name:w,properties:{classSelector:{name:"classSelector"},name:{name:"name"}},superTypes:[]},Junction:{name:"Junction",properties:{id:{name:"id"},in:{name:"in"}},superTypes:[]},Leaf:{name:"Leaf",properties:{classSelector:{name:"classSelector"},name:{name:"name"},value:{name:"value"}},superTypes:[w]},Merge:{name:N,properties:{branch:{name:"branch"},id:{name:"id"},tags:{name:"tags",defaultValue:[]},type:{name:"type"}},superTypes:[L]},Option:{name:"Option",properties:{name:{name:"name"},value:{name:"value",defaultValue:!1}},superTypes:[]},Packet:{name:I,properties:{accDescr:{name:"accDescr"},accTitle:{name:"accTitle"},blocks:{name:"blocks",defaultValue:[]},title:{name:"title"}},superTypes:[]},PacketBlock:{name:_,properties:{bits:{name:"bits"},end:{name:"end"},label:{name:"label"},start:{name:"start"}},superTypes:[]},Pie:{name:"Pie",properties:{accDescr:{name:"accDescr"},accTitle:{name:"accTitle"},sections:{name:"sections",defaultValue:[]},showData:{name:"showData",defaultValue:!1},title:{name:"title"}},superTypes:[]},PieSection:{name:P,properties:{label:{name:"label"},value:{name:"value"}},superTypes:[]},Radar:{name:"Radar",properties:{accDescr:{name:"accDescr"},accTitle:{name:"accTitle"},axes:{name:"axes",defaultValue:[]},curves:{name:"curves",defaultValue:[]},options:{name:"options",defaultValue:[]},title:{name:"title"}},superTypes:[]},Section:{name:"Section",properties:{classSelector:{name:"classSelector"},name:{name:"name"}},superTypes:[w]},Service:{name:"Service",properties:{icon:{name:"icon"},iconText:{name:"iconText"},id:{name:"id"},in:{name:"in"},title:{name:"title"}},superTypes:[]},Statement:{name:L,properties:{},superTypes:[]},Treemap:{name:O,properties:{accDescr:{name:"accDescr"},accTitle:{name:"accTitle"},title:{name:"title"},TreemapRows:{name:"TreemapRows",defaultValue:[]}},superTypes:[]},TreemapRow:{name:"TreemapRow",properties:{indent:{name:"indent"},item:{name:"item"}},superTypes:[]}}}static{k(this,"MermaidAstReflection")}},B=new z,K=k(()=>D??(D=d('{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"ArchitectureGrammarGrammar"),W=k(()=>M??(M=d('{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"GitGraphGrammarGrammar"),V=k(()=>F??(F=d('{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"InfoGrammarGrammar"),H=k(()=>q??(q=d('{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PacketGrammarGrammar"),Y=k(()=>j??(j=d('{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PieGrammarGrammar"),X=k(()=>U??(U=d('{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}')),"RadarGrammarGrammar"),Q=k(()=>G??(G=d('{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}')),"TreemapGrammarGrammar"),J={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Z={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ee={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},te={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ne={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},re={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ie={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},se={AstReflection:k(()=>new z,"AstReflection")},oe={Grammar:k(()=>K(),"Grammar"),LanguageMetaData:k(()=>J,"LanguageMetaData"),parser:{}},ae={Grammar:k(()=>W(),"Grammar"),LanguageMetaData:k(()=>Z,"LanguageMetaData"),parser:{}},ce={Grammar:k(()=>V(),"Grammar"),LanguageMetaData:k(()=>ee,"LanguageMetaData"),parser:{}},le={Grammar:k(()=>H(),"Grammar"),LanguageMetaData:k(()=>te,"LanguageMetaData"),parser:{}},ue={Grammar:k(()=>Y(),"Grammar"),LanguageMetaData:k(()=>ne,"LanguageMetaData"),parser:{}},de={Grammar:k(()=>X(),"Grammar"),LanguageMetaData:k(()=>re,"LanguageMetaData"),parser:{}},he={Grammar:k(()=>Q(),"Grammar"),LanguageMetaData:k(()=>ie,"LanguageMetaData"),parser:{}},pe={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},fe=class extends v.d{static{k(this,"AbstractMermaidValueConverter")}runConverter(e,t,n){let r=this.runCommonConverter(e,t,n);return void 0===r&&(r=this.runCustomConverter(e,t,n)),void 0===r?super.runConverter(e,t,n):r}runCommonConverter(e,t,n){const r=pe[e.name];if(void 0===r)return;const i=r.exec(t);return null!==i?void 0!==i[1]?i[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==i[2]?i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n"):void 0:void 0}},me=class extends fe{static{k(this,"CommonValueConverter")}runCustomConverter(e,t,n){}},ge=class extends R.Q{static{k(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,n){const r=super.buildKeywordTokens(e,t,n);return r.forEach(e=>{this.keywords.has(e.name)&&void 0!==e.PATTERN&&(e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),r}};(class extends ge{static{k(this,"CommonTokenBuilder")}})},6645(e,t,n){"use strict";n.d(t,{f:()=>l});var r=n(7492),i=n(610),s=n(9364),o=n(1917),a=class extends r.mR{static{(0,r.K2)(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},c={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function l(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.Bg,c);return t.ServiceRegistry.register(n),{shared:t,Radar:n}}(0,r.K2)(l,"createRadarServices")},7713(e,t,n){"use strict";n.d(t,{S:()=>u});var r=n(7492),i=n(610),s=n(9364),o=n(1917),a=class extends r.mR{static{(0,r.K2)(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},c=class extends r.dg{static{(0,r.K2)(this,"ArchitectureValueConverter")}runCustomConverter(e,t,n){return"ARCH_ICON"===e.name?t.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===e.name?t.replace(/["()]/g,""):"ARCH_TITLE"===e.name?t.replace(/[[\]]/g,"").trim():void 0}},l={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new c,"ValueConverter")}};function u(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.wV,l);return t.ServiceRegistry.register(n),{shared:t,Architecture:n}}(0,r.K2)(u,"createArchitectureServices")},8731(e,t,n){"use strict";n.d(t,{qg:()=>o}),n(722),n(2963),n(5626),n(888),n(7713),n(6645),n(8562);var r=n(7492),i={},s={info:(0,r.K2)(async()=>{const{createInfoServices:e}=await n.e(356).then(n.bind(n,3356)),t=e().Info.parser.LangiumParser;i.info=t},"info"),packet:(0,r.K2)(async()=>{const{createPacketServices:e}=await n.e(149).then(n.bind(n,5149)),t=e().Packet.parser.LangiumParser;i.packet=t},"packet"),pie:(0,r.K2)(async()=>{const{createPieServices:e}=await n.e(795).then(n.bind(n,8795)),t=e().Pie.parser.LangiumParser;i.pie=t},"pie"),architecture:(0,r.K2)(async()=>{const{createArchitectureServices:e}=await n.e(225).then(n.bind(n,225)),t=e().Architecture.parser.LangiumParser;i.architecture=t},"architecture"),gitGraph:(0,r.K2)(async()=>{const{createGitGraphServices:e}=await n.e(217).then(n.bind(n,2217)),t=e().GitGraph.parser.LangiumParser;i.gitGraph=t},"gitGraph"),radar:(0,r.K2)(async()=>{const{createRadarServices:e}=await n.e(903).then(n.bind(n,1903)),t=e().Radar.parser.LangiumParser;i.radar=t},"radar"),treemap:(0,r.K2)(async()=>{const{createTreemapServices:e}=await n.e(732).then(n.bind(n,4732)),t=e().Treemap.parser.LangiumParser;i.treemap=t},"treemap")};async function o(e,t){const n=s[e];if(!n)throw new Error(`Unknown diagram type: ${e}`);i[e]||await n();const r=i[e].parse(t);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new a(r);return r.value}(0,r.K2)(o,"parse");var a=class extends Error{constructor(e){super(`Parsing failed: ${e.lexerErrors.map(e=>e.message).join("\n")} ${e.parserErrors.map(e=>e.message).join("\n")}`),this.result=e}static{(0,r.K2)(this,"MermaidParseError")}}},1064(e,t,n){"use strict";n.d(t,{ak:()=>f,mT:()=>en,LT:()=>$e,jr:()=>nn,T6:()=>_t,JG:()=>ge,wL:()=>o,c$:()=>l,Y2:()=>h,$P:()=>u,Cy:()=>d,Pp:()=>p,BK:()=>m,PW:()=>pe,my:()=>Ie,jk:()=>Ve,Sk:()=>ye,G:()=>Ne});var r=n(6087);function i(e){function t(){}t.prototype=e;const n=new t;function r(){return typeof n.bar}return r(),r(),e}class s{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),(0,r.forEach)(this.definition,t=>{t.accept(e)})}}class o extends s{constructor(e){super([]),this.idx=1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class a extends s{constructor(e){super(e.definition),this.orgText="",(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}}class c extends s{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}}class l extends s{constructor(e){super(e.definition),this.idx=1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}}class u extends s{constructor(e){super(e.definition),this.idx=1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}}class d extends s{constructor(e){super(e.definition),this.idx=1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}}class h extends s{constructor(e){super(e.definition),this.idx=1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}}class p extends s{constructor(e){super(e.definition),this.idx=1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}}class f extends s{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}}class m{constructor(e){this.idx=1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}accept(e){e.visit(this)}}function g(e){function t(e){return(0,r.map)(e,g)}if(e instanceof o){const t={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return(0,r.isString)(e.label)&&(t.label=e.label),t}if(e instanceof c)return{type:"Alternative",definition:t(e.definition)};if(e instanceof l)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof u)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof d)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:g(new m({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof p)return{type:"RepetitionWithSeparator",idx:e.idx,separator:g(new m({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof h)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof f)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof m){const t={type:"Terminal",name:e.terminalType.name,label:(n=e.terminalType,i=n,(0,r.isString)(i.LABEL)&&""!==i.LABEL?n.LABEL:n.name),idx:e.idx};(0,r.isString)(e.label)&&(t.terminalLabel=e.label);const s=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=(0,r.isRegExp)(s)?s.source:s),t}var n,i;if(e instanceof a)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}class y{visit(e){const t=e;switch(t.constructor){case o:return this.visitNonTerminal(t);case c:return this.visitAlternative(t);case l:return this.visitOption(t);case u:return this.visitRepetitionMandatory(t);case d:return this.visitRepetitionMandatoryWithSeparator(t);case p:return this.visitRepetitionWithSeparator(t);case h:return this.visitRepetition(t);case f:return this.visitAlternation(t);case m:return this.visitTerminal(t);case a:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function T(e,t=[]){return!!(e instanceof l||e instanceof h||e instanceof p)||(e instanceof f?(0,r.some)(e.definition,e=>T(e,t)):!(e instanceof o&&(0,r.includes)(t,e))&&e instanceof s&&(e instanceof o&&t.push(e),(0,r.every)(e.definition,e=>T(e,t))))}function v(e){if(e instanceof o)return"SUBRULE";if(e instanceof l)return"OPTION";if(e instanceof f)return"OR";if(e instanceof u)return"AT_LEAST_ONE";if(e instanceof d)return"AT_LEAST_ONE_SEP";if(e instanceof p)return"MANY_SEP";if(e instanceof h)return"MANY";if(e instanceof m)return"CONSUME";throw Error("non exhaustive match")}class R{walk(e,t=[]){(0,r.forEach)(e.definition,(n,i)=>{const s=(0,r.drop)(e.definition,i+1);if(n instanceof o)this.walkProdRef(n,s,t);else if(n instanceof m)this.walkTerminal(n,s,t);else if(n instanceof c)this.walkFlat(n,s,t);else if(n instanceof l)this.walkOption(n,s,t);else if(n instanceof u)this.walkAtLeastOne(n,s,t);else if(n instanceof d)this.walkAtLeastOneSep(n,s,t);else if(n instanceof p)this.walkManySep(n,s,t);else if(n instanceof h)this.walkMany(n,s,t);else{if(!(n instanceof f))throw Error("non exhaustive match");this.walkOr(n,s,t)}})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){const r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){const r=[new l({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){const r=E(e,t,n);this.walk(e,r)}walkMany(e,t,n){const r=[new l({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){const r=E(e,t,n);this.walk(e,r)}walkOr(e,t,n){const i=t.concat(n);(0,r.forEach)(e.definition,e=>{const t=new c({definition:[e]});this.walk(t,i)})}}function E(e,t,n){return[new l({definition:[new m({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}function k(e){if(e instanceof o)return k(e.referencedRule);if(e instanceof m)return[e.terminalType];if(function(e){return e instanceof c||e instanceof l||e instanceof h||e instanceof u||e instanceof d||e instanceof p||e instanceof m||e instanceof a}(e))return function(e){let t=[];const n=e.definition;let i,s=0,o=n.length>s,a=!0;for(;o&&a;)i=n[s],a=T(i),t=t.concat(k(i)),s+=1,o=n.length>s;return(0,r.uniq)(t)}(e);if(function(e){return e instanceof f}(e))return function(e){const t=(0,r.map)(e.definition,e=>k(e));return(0,r.uniq)((0,r.flatten)(t))}(e);throw Error("non exhaustive match")}const S="_~IN~_";class C extends R{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const r=(i=e.referencedRule,s=e.idx,i.name+s+S+this.topProd.name);var i,s;const o=t.concat(n),a=k(new c({definition:o}));this.follows[r]=a}}var x=n(2607);function A(e){console&&console.error&&console.error(`Error: ${e}`)}function b(e){console&&console.warn&&console.warn(`Warning: ${e}`)}let $={};const w=new x.H;function N(e){const t=e.toString();if($.hasOwnProperty(t))return $[t];{const e=w.pattern(t);return $[t]=e,e}}const I="Complement Sets are not supported for first char optimization",_='Unable to use "first char" lexer optimizations:\n';function P(e,t=!1){try{const t=N(e);return L(t.value,{},t.flags.ignoreCase)}catch(n){if(n.message===I)t&&b(`${_}\tUnable to optimize: < ${e.toString()} >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";t&&(n="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),A(`${_}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function L(e,t,n){switch(e.type){case"Disjunction":for(let r=0;r<e.value.length;r++)L(e.value[r],t,n);break;case"Alternative":const i=e.value;for(let e=0;e<i.length;e++){const s=i[e];switch(s.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"Lookbehind":case"NegativeLookbehind":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}const o=s;switch(o.type){case"Character":O(o.value,t,n);break;case"Set":if(!0===o.complement)throw Error(I);(0,r.forEach)(o.value,e=>{if("number"==typeof e)O(e,t,n);else{const r=e;if(!0===n)for(let e=r.from;e<=r.to;e++)O(e,t,n);else{for(let e=r.from;e<=r.to&&e<ee;e++)O(e,t,n);if(r.to>=ee){const e=r.from>=ee?r.from:ee,n=r.to,i=ne(e),s=ne(n);for(let e=i;e<=s;e++)t[e]=e}}}});break;case"Group":L(o.value,t,n);break;default:throw Error("Non Exhaustive Match")}const a=void 0!==o.quantifier&&0===o.quantifier.atLeast;if("Group"===o.type&&!1===M(o)||"Group"!==o.type&&!1===a)break}break;default:throw Error("non exhaustive match!")}return(0,r.values)(t)}function O(e,t,n){const r=ne(e);t[r]=r,!0===n&&function(e,t){const n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){const e=ne(r.charCodeAt(0));t[e]=e}else{const e=n.toLowerCase();if(e!==n){const n=ne(e.charCodeAt(0));t[n]=n}}}(e,t)}function D(e,t){return(0,r.find)(e.value,e=>{if("number"==typeof e)return(0,r.includes)(t,e);{const n=e;return void 0!==(0,r.find)(t,e=>n.from<=e&&e<=n.to)}})}function M(e){const t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&((0,r.isArray)(e.value)?(0,r.every)(e.value,M):M(e.value))}class F extends x.z{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e);case"Lookbehind":return void this.visitLookbehind(e);case"NegativeLookbehind":return void this.visitNegativeLookbehind(e)}super.visitChildren(e)}}visitCharacter(e){(0,r.includes)(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===D(e,this.targetCharCodes)&&(this.found=!0):void 0!==D(e,this.targetCharCodes)&&(this.found=!0)}}function q(e,t){if(t instanceof RegExp){const n=N(t),r=new F(e);return r.visit(n),r.found}return void 0!==(0,r.find)(t,t=>(0,r.includes)(e,t.charCodeAt(0)))}const j="PATTERN",U="defaultMode",G="modes";let z="boolean"==typeof new RegExp("(?:)").sticky;const B=/[^\\][$]/,K=/[^\\[][\^]|^\^/;function W(e){const t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function V(e){const t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function H(e){const t=e.PATTERN;if((0,r.isRegExp)(t))return!1;if((0,r.isFunction)(t))return!0;if((0,r.has)(t,"exec"))return!0;if((0,r.isString)(t))return!1;throw Error("non exhaustive match")}function Y(e){return!(!(0,r.isString)(e)||1!==e.length)&&e.charCodeAt(0)}const X={test:function(e){const t=e.length;for(let n=this.lastIndex;n<t;n++){const t=e.charCodeAt(n);if(10===t)return this.lastIndex=n+1,!0;if(13===t)return 10===e.charCodeAt(n+1)?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function Q(e,t){if((0,r.has)(e,"LINE_BREAKS"))return!1;if((0,r.isRegExp)(e.PATTERN)){try{q(t,e.PATTERN)}catch(e){return{issue:fe.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if((0,r.isString)(e.PATTERN))return!1;if(H(e))return{issue:fe.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function J(e){return(0,r.map)(e,e=>(0,r.isString)(e)?e.charCodeAt(0):e)}function Z(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}const ee=256;let te=[];function ne(e){return e<ee?e:te[e]}function re(e){const t=(new Date).getTime(),n=e();return{time:(new Date).getTime()-t,value:n}}function ie(e,t){const n=e.tokenTypeIdx;return n===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[n]}function se(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}let oe=1;const ae={};function ce(e){const t=function(e){let t=(0,r.clone)(e),n=e,i=!0;for(;i;){n=(0,r.compact)((0,r.flatten)((0,r.map)(n,e=>e.CATEGORIES)));const e=(0,r.difference)(n,t);t=t.concat(e),(0,r.isEmpty)(e)?i=!1:n=e}return t}(e);!function(e){(0,r.forEach)(e,e=>{var t;ue(e)||(ae[oe]=e,e.tokenTypeIdx=oe++),de(e)&&!(0,r.isArray)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),de(e)||(e.CATEGORIES=[]),t=e,(0,r.has)(t,"categoryMatches")||(e.categoryMatches=[]),function(e){return(0,r.has)(e,"categoryMatchesMap")}(e)||(e.categoryMatchesMap={})})}(t),function(e){(0,r.forEach)(e,e=>{le([],e)})}(t),function(e){(0,r.forEach)(e,e=>{e.categoryMatches=[],(0,r.forEach)(e.categoryMatchesMap,(t,n)=>{e.categoryMatches.push(ae[n].tokenTypeIdx)})})}(t),(0,r.forEach)(t,e=>{e.isParent=e.categoryMatches.length>0})}function le(e,t){(0,r.forEach)(e,e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0}),(0,r.forEach)(t.CATEGORIES,n=>{const i=e.concat(t);(0,r.includes)(i,n)||le(i,n)})}function ue(e){return(0,r.has)(e,"tokenTypeIdx")}function de(e){return(0,r.has)(e,"CATEGORIES")}function he(e){return(0,r.has)(e,"tokenTypeIdx")}const pe={buildUnableToPopLexerModeMessage:e=>`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(e,t,n,r,i,s)=>`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`};var fe;!function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"}(fe||(fe={}));const me={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:pe,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(me);class ge{constructor(e,t=me){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--\x3e <${e}>`);const{time:r,value:i}=re(t),s=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(`${n}<-- <${e}> time: ${r}ms`),this.traceInitIndent--,i}return t()},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=(0,r.assign)({},me,t);const n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof n&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let n,s=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===me.lineTerminatorsPattern)this.config.lineTerminatorsPattern=X;else if(this.config.lineTerminatorCharacters===me.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),(0,r.isArray)(e)?n={modes:{defaultMode:(0,r.clone)(e)},defaultMode:U}:(s=!1,n=(0,r.clone)(e))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(e){const t=[];return(0,r.has)(e,U)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+U+"> property in its definition\n",type:fe.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,r.has)(e,G)||t.push({message:"A MultiMode Lexer cannot be initialized without a <modes> property in its definition\n",type:fe.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,r.has)(e,G)&&(0,r.has)(e,U)&&!(0,r.has)(e.modes,e.defaultMode)&&t.push({message:`A MultiMode Lexer cannot be initialized with a ${U}: <${e.defaultMode}>which does not exist\n`,type:fe.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,r.has)(e,G)&&(0,r.forEach)(e.modes,(e,n)=>{(0,r.forEach)(e,(i,s)=>{if((0,r.isUndefined)(i))t.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${s}>\n`,type:fe.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if((0,r.has)(i,"LONGER_ALT")){const s=(0,r.isArray)(i.LONGER_ALT)?i.LONGER_ALT:[i.LONGER_ALT];(0,r.forEach)(s,s=>{(0,r.isUndefined)(s)||(0,r.includes)(e,s)||t.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${s.name}> on token <${i.name}> outside of mode <${n}>\n`,type:fe.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),t}(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(function(e,t,n){const i=[];let s=!1;const o=(0,r.compact)((0,r.flatten)((0,r.values)(e.modes))),a=(0,r.reject)(o,e=>e[j]===ge.NA),c=J(n);return t&&(0,r.forEach)(a,e=>{const t=Q(e,c);if(!1!==t){const n=function(e,t){if(t.issue===fe.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===fe.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <${e.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}(e,t),r={message:n,type:t.issue,tokenType:e};i.push(r)}else(0,r.has)(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(s=!0):q(c,e.PATTERN)&&(s=!0)}),t&&!s&&i.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:fe.NO_LINE_BREAKS_FLAGS}),i}(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},(0,r.forEach)(n.modes,(e,t)=>{n.modes[t]=(0,r.reject)(e,e=>(0,r.isUndefined)(e))});const o=(0,r.keys)(n.modes);if((0,r.forEach)(n.modes,(e,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,()=>{if(this.modes.push(n),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(e,t){let n=[];const i=function(e){const t=(0,r.filter)(e,e=>!(0,r.has)(e,j));return{errors:(0,r.map)(t,e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:fe.MISSING_PATTERN,tokenTypes:[e]})),valid:(0,r.difference)(e,t)}}(e);n=n.concat(i.errors);const s=function(e){const t=(0,r.filter)(e,e=>{const t=e[j];return!((0,r.isRegExp)(t)||(0,r.isFunction)(t)||(0,r.has)(t,"exec")||(0,r.isString)(t))});return{errors:(0,r.map)(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:fe.INVALID_PATTERN,tokenTypes:[e]})),valid:(0,r.difference)(e,t)}}(i.valid),o=s.valid;return n=n.concat(s.errors),n=n.concat(function(e){let t=[];const n=(0,r.filter)(e,e=>(0,r.isRegExp)(e[j]));return t=t.concat(function(e){class t extends x.z{constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}const n=(0,r.filter)(e,e=>{const n=e.PATTERN;try{const e=N(n),r=new t;return r.visit(e),r.found}catch(e){return B.test(n.source)}});return(0,r.map)(n,e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:fe.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}(n)),t=t.concat(function(e){class t extends x.z{constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}const n=(0,r.filter)(e,e=>{const n=e.PATTERN;try{const e=N(n),r=new t;return r.visit(e),r.found}catch(e){return K.test(n.source)}});return(0,r.map)(n,e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:fe.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}(n)),t=t.concat(function(e){const t=(0,r.filter)(e,e=>{const t=e[j];return t instanceof RegExp&&(t.multiline||t.global)});return(0,r.map)(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:fe.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}(n)),t=t.concat(function(e){const t=[];let n=(0,r.map)(e,n=>(0,r.reduce)(e,(e,i)=>(n.PATTERN.source!==i.PATTERN.source||(0,r.includes)(t,i)||i.PATTERN===ge.NA||(t.push(i),e.push(i)),e),[]));n=(0,r.compact)(n);const i=(0,r.filter)(n,e=>e.length>1);return(0,r.map)(i,e=>{const t=(0,r.map)(e,e=>e.name);return{message:`The same RegExp pattern ->${(0,r.first)(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:fe.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}(n)),t=t.concat(function(e){const t=(0,r.filter)(e,e=>e.PATTERN.test(""));return(0,r.map)(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:fe.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}(n)),t}(o)),n=n.concat(function(e){const t=(0,r.filter)(e,e=>{if(!(0,r.has)(e,"GROUP"))return!1;const t=e.GROUP;return t!==ge.SKIPPED&&t!==ge.NA&&!(0,r.isString)(t)});return(0,r.map)(t,e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:fe.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}(o)),n=n.concat(function(e,t){const n=(0,r.filter)(e,e=>void 0!==e.PUSH_MODE&&!(0,r.includes)(t,e.PUSH_MODE));return(0,r.map)(n,e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:fe.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}(o,t)),n=n.concat(function(e){const t=[],n=(0,r.reduce)(e,(e,t,n)=>{const i=t.PATTERN;return i===ge.NA||((0,r.isString)(i)?e.push({str:i,idx:n,tokenType:t}):(0,r.isRegExp)(i)&&(s=i,void 0===(0,r.find)([".","\\","[","]","|","^","$","(",")","?","*","+","{"],e=>-1!==s.source.indexOf(e)))&&e.push({str:i.source,idx:n,tokenType:t})),e;var s},[]);return(0,r.forEach)(e,(e,i)=>{(0,r.forEach)(n,({str:n,idx:s,tokenType:o})=>{if(i<s&&function(e,t){if((0,r.isRegExp)(t)){if(/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(t.source))return!1;const n=t.exec(e);return null!==n&&0===n.index}if((0,r.isFunction)(t))return t(e,0,[],{});if((0,r.has)(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}(n,e.PATTERN)){const n=`Token: ->${o.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:fe.UNREACHABLE_PATTERN,tokenTypes:[e,o]})}})}),t}(o)),n}(e,o))}),(0,r.isEmpty)(this.lexerDefinitionErrors)){let i;ce(e),this.TRACE_INIT("analyzeTokenTypes",()=>{i=function(e,t){const n=(t=(0,r.defaults)(t,{useSticky:z,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:(e,t)=>t()})).tracer;let i;n("initCharCodeToOptimizedIndexMap",()=>{!function(){if((0,r.isEmpty)(te)){te=new Array(65536);for(let e=0;e<65536;e++)te[e]=e>255?255+~~(e/255):e}}()}),n("Reject Lexer.NA",()=>{i=(0,r.reject)(e,e=>e[j]===ge.NA)});let s,o,a,c,l,u,d,h,p,f,m,g=!1;n("Transform Patterns",()=>{g=!1,s=(0,r.map)(i,e=>{const n=e[j];if((0,r.isRegExp)(n)){const e=n.source;return 1!==e.length||"^"===e||"$"===e||"."===e||n.ignoreCase?2!==e.length||"\\"!==e[0]||(0,r.includes)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?t.useSticky?V(n):W(n):e[1]:e}if((0,r.isFunction)(n))return g=!0,{exec:n};if("object"==typeof n)return g=!0,n;if("string"==typeof n){if(1===n.length)return n;{const e=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),r=new RegExp(e);return t.useSticky?V(r):W(r)}}throw Error("non exhaustive match")})}),n("misc mapping",()=>{o=(0,r.map)(i,e=>e.tokenTypeIdx),a=(0,r.map)(i,e=>{const t=e.GROUP;if(t!==ge.SKIPPED){if((0,r.isString)(t))return t;if((0,r.isUndefined)(t))return!1;throw Error("non exhaustive match")}}),c=(0,r.map)(i,e=>{const t=e.LONGER_ALT;if(t)return(0,r.isArray)(t)?(0,r.map)(t,e=>(0,r.indexOf)(i,e)):[(0,r.indexOf)(i,t)]}),l=(0,r.map)(i,e=>e.PUSH_MODE),u=(0,r.map)(i,e=>(0,r.has)(e,"POP_MODE"))}),n("Line Terminator Handling",()=>{const e=J(t.lineTerminatorCharacters);d=(0,r.map)(i,e=>!1),"onlyOffset"!==t.positionTracking&&(d=(0,r.map)(i,t=>(0,r.has)(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===Q(t,e)&&q(e,t.PATTERN)))}),n("Misc Mapping #2",()=>{h=(0,r.map)(i,H),p=(0,r.map)(s,Y),f=(0,r.reduce)(i,(e,t)=>{const n=t.GROUP;return(0,r.isString)(n)&&n!==ge.SKIPPED&&(e[n]=[]),e},{}),m=(0,r.map)(s,(e,t)=>({pattern:s[t],longerAlt:c[t],canLineTerminator:d[t],isCustom:h[t],short:p[t],group:a[t],push:l[t],pop:u[t],tokenTypeIdx:o[t],tokenType:i[t]}))});let y=!0,T=[];return t.safeMode||n("First Char Optimization",()=>{T=(0,r.reduce)(i,(e,n,i)=>{if("string"==typeof n.PATTERN){const t=ne(n.PATTERN.charCodeAt(0));Z(e,t,m[i])}else if((0,r.isArray)(n.START_CHARS_HINT)){let t;(0,r.forEach)(n.START_CHARS_HINT,n=>{const r=ne("string"==typeof n?n.charCodeAt(0):n);t!==r&&(t=r,Z(e,r,m[i]))})}else if((0,r.isRegExp)(n.PATTERN))if(n.PATTERN.unicode)y=!1,t.ensureOptimizations&&A(`${_}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const s=P(n.PATTERN,t.ensureOptimizations);(0,r.isEmpty)(s)&&(y=!1),(0,r.forEach)(s,t=>{Z(e,t,m[i])})}else t.ensureOptimizations&&A(`${_}\tTokenType: <${n.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),y=!1;return e},[])}),{emptyGroups:f,patternIdxToConfig:m,charCodeToPatternIdxToConfig:T,hasCustom:g,canBeOptimized:y}}(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[n]=i.patternIdxToConfig,this.charCodeToPatternIdxToConfig[n]=i.charCodeToPatternIdxToConfig,this.emptyGroups=(0,r.assign)({},this.emptyGroups,i.emptyGroups),this.hasCustom=i.hasCustom||this.hasCustom,this.canModeBeOptimized[n]=i.canBeOptimized}})}),this.defaultMode=n.defaultMode,!(0,r.isEmpty)(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const e=(0,r.map)(this.lexerDefinitionErrors,e=>e.message).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+e)}(0,r.forEach)(this.lexerDefinitionWarning,e=>{b(e.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(z?(this.chopInput=r.identity,this.match=this.matchWithTest):(this.updateLastIndex=r.noop,this.match=this.matchWithExec),s&&(this.handleModes=r.noop),!1===this.trackStartLines&&(this.computeNewColumn=r.identity),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=r.noop),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const e=(0,r.reduce)(this.canModeBeOptimized,(e,t,n)=>(!1===t&&e.push(n),e),[]);if(t.ensureOptimizations&&!(0,r.isEmpty)(e))throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{$={}}),this.TRACE_INIT("toFastProperties",()=>{i(this)})})}tokenize(e,t=this.defaultMode){if(!(0,r.isEmpty)(this.lexerDefinitionErrors)){const e=(0,r.map)(this.lexerDefinitionErrors,e=>e.message).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,i,s,o,a,c,l,u,d,h,p,f,m,g,y;const T=e,v=T.length;let R=0,E=0;const k=this.hasCustom?0:Math.floor(e.length/10),S=new Array(k),C=[];let x=this.trackStartLines?1:void 0,A=this.trackStartLines?1:void 0;const b=function(e){const t={},n=(0,r.keys)(e);return(0,r.forEach)(n,n=>{const i=e[n];if(!(0,r.isArray)(i))throw Error("non exhaustive match");t[n]=[]}),t}(this.emptyGroups),$=this.trackStartLines,w=this.config.lineTerminatorsPattern;let N=0,I=[],_=[];const P=[],L=[];let O;function D(){return I}function M(e){const t=ne(e),n=_[t];return void 0===n?L:n}Object.freeze(L);const F=e=>{if(1===P.length&&void 0===e.tokenType.PUSH_MODE){const t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);C.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{P.pop();const e=(0,r.last)(P);I=this.patternIdxToConfig[e],_=this.charCodeToPatternIdxToConfig[e],N=I.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;O=_&&t?M:D}};function q(e){P.push(e),_=this.charCodeToPatternIdxToConfig[e],I=this.patternIdxToConfig[e],N=I.length,N=I.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;O=_&&t?M:D}let j;q.call(this,t);const U=this.config.recoveryEnabled;for(;R<v;){c=null;const t=T.charCodeAt(R),k=O(t),_=k.length;for(n=0;n<_;n++){j=k[n];const r=j.pattern;l=null;const i=j.short;if(!1!==i?t===i&&(c=r):!0===j.isCustom?(y=r.exec(T,R,S,b),null!==y?(c=y[0],void 0!==y.payload&&(l=y.payload)):c=null):(this.updateLastIndex(r,R),c=this.match(r,e,R)),null!==c){if(a=j.longerAlt,void 0!==a){const t=a.length;for(s=0;s<t;s++){const t=I[a[s]],n=t.pattern;if(u=null,!0===t.isCustom?(y=n.exec(T,R,S,b),null!==y?(o=y[0],void 0!==y.payload&&(u=y.payload)):o=null):(this.updateLastIndex(n,R),o=this.match(n,e,R)),o&&o.length>c.length){c=o,l=u,j=t;break}}}break}}if(null!==c){if(d=c.length,h=j.group,void 0!==h&&(p=j.tokenTypeIdx,f=this.createTokenInstance(c,R,p,j.tokenType,x,A,d),this.handlePayload(f,l),!1===h?E=this.addToken(S,E,f):b[h].push(f)),e=this.chopInput(e,d),R+=d,A=this.computeNewColumn(A,d),!0===$&&!0===j.canLineTerminator){let e,t,n=0;w.lastIndex=0;do{e=w.test(c),!0===e&&(t=w.lastIndex-1,n++)}while(!0===e);0!==n&&(x+=n,A=d-t,this.updateTokenEndLineColumnLocation(f,h,t,n,x,A,d))}this.handleModes(j,F,q,f)}else{const t=R,n=x,s=A;let o=!1===U;for(;!1===o&&R<v;)for(e=this.chopInput(e,1),R++,i=0;i<N;i++){const t=I[i],n=t.pattern,r=t.short;if(!1!==r?T.charCodeAt(R)===r&&(o=!0):!0===t.isCustom?o=null!==n.exec(T,R,S,b):(this.updateLastIndex(n,R),o=null!==n.exec(e)),!0===o)break}if(m=R-t,A=this.computeNewColumn(A,m),g=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(T,t,m,n,s,(0,r.last)(P)),C.push({offset:t,line:n,column:s,length:m,message:g}),!1===U)break}}return this.hasCustom||(S.length=E),{tokens:S,groups:b,errors:C}}handleModes(e,t,n,r){if(!0===e.pop){const i=e.push;t(r),void 0!==i&&n.call(this,i)}else void 0!==e.push&&n.call(this,e.push)}chopInput(e,t){return e.substring(t)}updateLastIndex(e,t){e.lastIndex=t}updateTokenEndLineColumnLocation(e,t,n,r,i,s,o){let a,c;void 0!==t&&(a=n===o-1,c=a?-1:0,1===r&&!0===a||(e.endLine=i+c,e.endColumn=s-1-c))}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}}createStartOnlyToken(e,t,n,r,i,s){return{image:e,startOffset:t,startLine:i,startColumn:s,tokenTypeIdx:n,tokenType:r}}createFullToken(e,t,n,r,i,s,o){return{image:e,startOffset:t,endOffset:t+o-1,startLine:i,endLine:i,startColumn:s,endColumn:s+o-1,tokenTypeIdx:n,tokenType:r}}addTokenUsingPush(e,t,n){return e.push(n),t}addTokenUsingMemberAccess(e,t,n){return e[t]=n,++t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){null!==t&&(e.payload=t)}matchWithTest(e,t,n){return!0===e.test(t)?t.substring(n,e.lastIndex):null}matchWithExec(e,t){const n=e.exec(t);return null!==n?n[0]:null}}function ye(e){return Te(e)?e.LABEL:e.name}function Te(e){return(0,r.isString)(e.LABEL)&&""!==e.LABEL}ge.SKIPPED="This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",ge.NA=/NOT_APPLICABLE/;const ve="categories",Re="label",Ee="group",ke="push_mode",Se="pop_mode",Ce="longer_alt",xe="line_breaks",Ae="start_chars_hint";function be(e){return function(e){const t=e.pattern,n={};if(n.name=e.name,(0,r.isUndefined)(t)||(n.PATTERN=t),(0,r.has)(e,"parent"))throw"The parent property is no longer supported.\nSee: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.";return(0,r.has)(e,ve)&&(n.CATEGORIES=e[ve]),ce([n]),(0,r.has)(e,Re)&&(n.LABEL=e[Re]),(0,r.has)(e,Ee)&&(n.GROUP=e[Ee]),(0,r.has)(e,Se)&&(n.POP_MODE=e[Se]),(0,r.has)(e,ke)&&(n.PUSH_MODE=e[ke]),(0,r.has)(e,Ce)&&(n.LONGER_ALT=e[Ce]),(0,r.has)(e,xe)&&(n.LINE_BREAKS=e[xe]),(0,r.has)(e,Ae)&&(n.START_CHARS_HINT=e[Ae]),n}(e)}const $e=be({name:"EOF",pattern:ge.NA});function we(e,t,n,r,i,s,o,a){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:s,startColumn:o,endColumn:a,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function Ne(e,t){return ie(e,t)}ce([$e]);const Ie={buildMismatchTokenMessage:({expected:e,actual:t,previous:n,ruleName:r})=>`Expecting ${Te(e)?`--\x3e ${ye(e)} <--`:`token of type --\x3e ${e.name} <--`} but found --\x3e '${t.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:e,ruleName:t})=>"Redundant input, expecting EOF but found: "+e.image,buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:i,ruleName:s}){const o="Expecting: ",a="\nbut found: '"+(0,r.first)(t).image+"'";if(i)return o+i+a;{const t=(0,r.reduce)(e,(e,t)=>e.concat(t),[]),n=(0,r.map)(t,e=>`[${(0,r.map)(e,e=>ye(e)).join(", ")}]`);return o+`one of these possible Token sequences:\n${(0,r.map)(n,(e,t)=>` ${t+1}. ${e}`).join("\n")}`+a}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:i}){const s="Expecting: ",o="\nbut found: '"+(0,r.first)(t).image+"'";return n?s+n+o:s+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${(0,r.map)(e,e=>`[${(0,r.map)(e,e=>ye(e)).join(",")}]`).join(" ,")}>`+o}};Object.freeze(Ie);const _e={buildRuleNotFoundError:(e,t)=>"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"},Pe={buildDuplicateFoundError(e,t){const n=e.name,i=(0,r.first)(t),s=i.idx,a=v(i),c=(l=i)instanceof m?l.terminalType.name:l instanceof o?l.nonTerminalName:"";var l;let u=`->${a}${s>0?s:""}<- ${c?`with argument: ->${c}<-`:""}\n appears more than once (${t.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return u=u.replace(/[ \t]+/g," "),u=u.replace(/\s\s+/g,"\n"),u},buildNamespaceConflictError:e=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(e){const t=(0,r.map)(e.prefixPath,e=>ye(e)).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin <OR${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(e){const t=(0,r.map)(e.prefixPath,e=>ye(e)).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;let i=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return i+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",i},buildEmptyRepetitionError(e){let t=v(e.repetition);return 0!==e.repetition.idx&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError:e=>"deprecated",buildEmptyAlternationError:e=>`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:e=>`An Alternation cannot have more than 256 alternatives:\n<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(e){const t=e.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${t}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${t} --\x3e ${(0,r.map)(e.leftRecursionPath,e=>e.name).concat([t]).join(" --\x3e ")}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:e=>"deprecated",buildDuplicateRuleNameError(e){let t;return t=e.topLevelRule instanceof a?e.topLevelRule.name:e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};class Le extends y{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){(0,r.forEach)((0,r.values)(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:Jt.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}class Oe extends R{constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,r.clone)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,r.clone)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}}updateExpectedNext(){(0,r.isEmpty)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class De extends Oe{constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const e=t.concat(n),r=new c({definition:e});this.possibleTokTypes=k(r),this.found=!0}}}class Me extends R{constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}}class Fe extends Me{walkMany(e,t,n){if(e.idx===this.occurrence){const e=(0,r.first)(t.concat(n));this.result.isEndOfRule=void 0===e,e instanceof m&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkMany(e,t,n)}}class qe extends Me{walkManySep(e,t,n){if(e.idx===this.occurrence){const e=(0,r.first)(t.concat(n));this.result.isEndOfRule=void 0===e,e instanceof m&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkManySep(e,t,n)}}class je extends Me{walkAtLeastOne(e,t,n){if(e.idx===this.occurrence){const e=(0,r.first)(t.concat(n));this.result.isEndOfRule=void 0===e,e instanceof m&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOne(e,t,n)}}class Ue extends Me{walkAtLeastOneSep(e,t,n){if(e.idx===this.occurrence){const e=(0,r.first)(t.concat(n));this.result.isEndOfRule=void 0===e,e instanceof m&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOneSep(e,t,n)}}function Ge(e,t,n=[]){n=(0,r.clone)(n);let i=[],s=0;function a(o){const a=Ge(o.concat((0,r.drop)(e,s+1)),t,n);return i.concat(a)}for(;n.length<t&&s<e.length;){const t=e[s];if(t instanceof c)return a(t.definition);if(t instanceof o)return a(t.definition);if(t instanceof l)i=a(t.definition);else{if(t instanceof u)return a(t.definition.concat([new h({definition:t.definition})]));if(t instanceof d)return a([new c({definition:t.definition}),new h({definition:[new m({terminalType:t.separator})].concat(t.definition)})]);if(t instanceof p){const e=t.definition.concat([new h({definition:[new m({terminalType:t.separator})].concat(t.definition)})]);i=a(e)}else if(t instanceof h){const e=t.definition.concat([new h({definition:t.definition})]);i=a(e)}else{if(t instanceof f)return(0,r.forEach)(t.definition,e=>{!1===(0,r.isEmpty)(e.definition)&&(i=a(e.definition))}),i;if(!(t instanceof m))throw Error("non exhaustive match");n.push(t.terminalType)}}s++}return i.push({partialPath:n,suffixDef:(0,r.drop)(e,s)}),i}function ze(e,t,n,i){const s="EXIT_NONE_TERMINAL",g=[s],y="EXIT_ALTERNATIVE";let T=!1;const v=t.length,R=v-i-1,E=[],k=[];for(k.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!(0,r.isEmpty)(k);){const e=k.pop();if(e===y){T&&(0,r.last)(k).idx<=R&&k.pop();continue}const i=e.def,S=e.idx,C=e.ruleStack,x=e.occurrenceStack;if((0,r.isEmpty)(i))continue;const A=i[0];if(A===s){const e={idx:S,def:(0,r.drop)(i),ruleStack:(0,r.dropRight)(C),occurrenceStack:(0,r.dropRight)(x)};k.push(e)}else if(A instanceof m)if(S<v-1){const e=S+1;if(n(t[e],A.terminalType)){const t={idx:e,def:(0,r.drop)(i),ruleStack:C,occurrenceStack:x};k.push(t)}}else{if(S!==v-1)throw Error("non exhaustive match");E.push({nextTokenType:A.terminalType,nextTokenOccurrence:A.idx,ruleStack:C,occurrenceStack:x}),T=!0}else if(A instanceof o){const e=(0,r.clone)(C);e.push(A.nonTerminalName);const t=(0,r.clone)(x);t.push(A.idx);const n={idx:S,def:A.definition.concat(g,(0,r.drop)(i)),ruleStack:e,occurrenceStack:t};k.push(n)}else if(A instanceof l){const e={idx:S,def:(0,r.drop)(i),ruleStack:C,occurrenceStack:x};k.push(e),k.push(y);const t={idx:S,def:A.definition.concat((0,r.drop)(i)),ruleStack:C,occurrenceStack:x};k.push(t)}else if(A instanceof u){const e=new h({definition:A.definition,idx:A.idx}),t={idx:S,def:A.definition.concat([e],(0,r.drop)(i)),ruleStack:C,occurrenceStack:x};k.push(t)}else if(A instanceof d){const e=new m({terminalType:A.separator}),t=new h({definition:[e].concat(A.definition),idx:A.idx}),n={idx:S,def:A.definition.concat([t],(0,r.drop)(i)),ruleStack:C,occurrenceStack:x};k.push(n)}else if(A instanceof p){const e={idx:S,def:(0,r.drop)(i),ruleStack:C,occurrenceStack:x};k.push(e),k.push(y);const t=new m({terminalType:A.separator}),n=new h({definition:[t].concat(A.definition),idx:A.idx}),s={idx:S,def:A.definition.concat([n],(0,r.drop)(i)),ruleStack:C,occurrenceStack:x};k.push(s)}else if(A instanceof h){const e={idx:S,def:(0,r.drop)(i),ruleStack:C,occurrenceStack:x};k.push(e),k.push(y);const t=new h({definition:A.definition,idx:A.idx}),n={idx:S,def:A.definition.concat([t],(0,r.drop)(i)),ruleStack:C,occurrenceStack:x};k.push(n)}else if(A instanceof f)for(let e=A.definition.length-1;e>=0;e--){const t={idx:S,def:A.definition[e].definition.concat((0,r.drop)(i)),ruleStack:C,occurrenceStack:x};k.push(t),k.push(y)}else if(A instanceof c)k.push({idx:S,def:A.definition.concat((0,r.drop)(i)),ruleStack:C,occurrenceStack:x});else{if(!(A instanceof a))throw Error("non exhaustive match");k.push(Be(A,S,C,x))}}return E}function Be(e,t,n,i){const s=(0,r.clone)(n);s.push(e.name);const o=(0,r.clone)(i);return o.push(1),{idx:t,def:e.definition,ruleStack:s,occurrenceStack:o}}var Ke;function We(e){if(e instanceof l||"Option"===e)return Ke.OPTION;if(e instanceof h||"Repetition"===e)return Ke.REPETITION;if(e instanceof u||"RepetitionMandatory"===e)return Ke.REPETITION_MANDATORY;if(e instanceof d||"RepetitionMandatoryWithSeparator"===e)return Ke.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof p||"RepetitionWithSeparator"===e)return Ke.REPETITION_WITH_SEPARATOR;if(e instanceof f||"Alternation"===e)return Ke.ALTERNATION;throw Error("non exhaustive match")}function Ve(e){const{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e,s=We(r);return s===Ke.ALTERNATION?nt(t,n,i):rt(t,n,s,i)}function He(e,t,n,i){const s=e.length,o=(0,r.every)(e,e=>(0,r.every)(e,e=>1===e.length));if(t)return function(t){const i=(0,r.map)(t,e=>e.GATE);for(let t=0;t<s;t++){const r=e[t],s=r.length,o=i[t];if(void 0===o||!1!==o.call(this))e:for(let e=0;e<s;e++){const i=r[e],s=i.length;for(let e=0;e<s;e++){const t=this.LA(e+1);if(!1===n(t,i[e]))continue e}return t}}};if(o&&!i){const t=(0,r.map)(e,e=>(0,r.flatten)(e)),n=(0,r.reduce)(t,(e,t,n)=>((0,r.forEach)(t,t=>{(0,r.has)(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),(0,r.forEach)(t.categoryMatches,t=>{(0,r.has)(e,t)||(e[t]=n)})}),e),{});return function(){const e=this.LA(1);return n[e.tokenTypeIdx]}}return function(){for(let t=0;t<s;t++){const r=e[t],i=r.length;e:for(let e=0;e<i;e++){const i=r[e],s=i.length;for(let e=0;e<s;e++){const t=this.LA(e+1);if(!1===n(t,i[e]))continue e}return t}}}}function Ye(e,t,n){const i=(0,r.every)(e,e=>1===e.length),s=e.length;if(i&&!n){const t=(0,r.flatten)(e);if(1===t.length&&(0,r.isEmpty)(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=(0,r.reduce)(t,(e,t,n)=>(e[t.tokenTypeIdx]=!0,(0,r.forEach)(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){e:for(let n=0;n<s;n++){const r=e[n],i=r.length;for(let e=0;e<i;e++){const n=this.LA(e+1);if(!1===t(n,r[e]))continue e}return!0}return!1}}!function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"}(Ke||(Ke={}));class Xe extends R{constructor(e,t,n){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,n,r){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=n.concat(r),!0)}walkOption(e,t,n){this.checkIsTarget(e,Ke.OPTION,t,n)||super.walkOption(e,t,n)}walkAtLeastOne(e,t,n){this.checkIsTarget(e,Ke.REPETITION_MANDATORY,t,n)||super.walkOption(e,t,n)}walkAtLeastOneSep(e,t,n){this.checkIsTarget(e,Ke.REPETITION_MANDATORY_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}walkMany(e,t,n){this.checkIsTarget(e,Ke.REPETITION,t,n)||super.walkOption(e,t,n)}walkManySep(e,t,n){this.checkIsTarget(e,Ke.REPETITION_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}}class Qe extends y{constructor(e,t,n){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=n,this.result=[]}checkIsTarget(e,t){e.idx!==this.targetOccurrence||this.targetProdType!==t||void 0!==this.targetRef&&e!==this.targetRef||(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,Ke.OPTION)}visitRepetition(e){this.checkIsTarget(e,Ke.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Ke.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Ke.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Ke.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Ke.ALTERNATION)}}function Je(e){const t=new Array(e);for(let n=0;n<e;n++)t[n]=[];return t}function Ze(e){let t=[""];for(let n=0;n<e.length;n++){const r=e[n],i=[];for(let e=0;e<t.length;e++){const n=t[e];i.push(n+"_"+r.tokenTypeIdx);for(let e=0;e<r.categoryMatches.length;e++){const t="_"+r.categoryMatches[e];i.push(n+t)}}t=i}return t}function et(e,t,n){for(let r=0;r<e.length;r++){if(r===n)continue;const i=e[r];for(let e=0;e<t.length;e++)if(!0===i[t[e]])return!1}return!0}function tt(e,t){const n=(0,r.map)(e,e=>Ge([e],1)),i=Je(n.length),s=(0,r.map)(n,e=>{const t={};return(0,r.forEach)(e,e=>{const n=Ze(e.partialPath);(0,r.forEach)(n,e=>{t[e]=!0})}),t});let o=n;for(let e=1;e<=t;e++){const n=o;o=Je(n.length);for(let a=0;a<n.length;a++){const c=n[a];for(let n=0;n<c.length;n++){const l=c[n].partialPath,u=c[n].suffixDef,d=Ze(l);if(et(s,d,a)||(0,r.isEmpty)(u)||l.length===t){const e=i[a];if(!1===it(e,l)){e.push(l);for(let e=0;e<d.length;e++){const t=d[e];s[a][t]=!0}}}else{const t=Ge(u,e+1,l);o[a]=o[a].concat(t),(0,r.forEach)(t,e=>{const t=Ze(e.partialPath);(0,r.forEach)(t,e=>{s[a][e]=!0})})}}}}return i}function nt(e,t,n,r){const i=new Qe(e,Ke.ALTERNATION,r);return t.accept(i),tt(i.result,n)}function rt(e,t,n,r){const i=new Qe(e,n);t.accept(i);const s=i.result,o=new Xe(t,e,n).startWalking();return tt([new c({definition:s}),new c({definition:o})],r)}function it(e,t){e:for(let n=0;n<e.length;n++){const r=e[n];if(r.length===t.length){for(let e=0;e<r.length;e++){const n=t[e],i=r[e];if(!1==(n===i||void 0!==i.categoryMatchesMap[n.tokenTypeIdx]))continue e}return!0}}return!1}function st(e){return(0,r.every)(e,e=>(0,r.every)(e,e=>(0,r.every)(e,e=>(0,r.isEmpty)(e.categoryMatches))))}function ot(e){return`${v(e)}_#_${e.idx}_#_${at(e)}`}function at(e){return e instanceof m?e.terminalType.name:e instanceof o?e.nonTerminalName:""}class ct extends y{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function lt(e,t,n,i=[]){const s=[],o=ut(t.definition);if((0,r.isEmpty)(o))return[];{const t=e.name;(0,r.includes)(o,e)&&s.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:i}),type:Jt.LEFT_RECURSION,ruleName:t});const a=(0,r.difference)(o,i.concat([e])),c=(0,r.flatMap)(a,t=>{const s=(0,r.clone)(i);return s.push(t),lt(e,t,n,s)});return s.concat(c)}}function ut(e){let t=[];if((0,r.isEmpty)(e))return t;const n=(0,r.first)(e);if(n instanceof o)t.push(n.referencedRule);else if(n instanceof c||n instanceof l||n instanceof u||n instanceof d||n instanceof p||n instanceof h)t=t.concat(ut(n.definition));else if(n instanceof f)t=(0,r.flatten)((0,r.map)(n.definition,e=>ut(e.definition)));else if(!(n instanceof m))throw Error("non exhaustive match");const i=T(n),s=e.length>1;if(i&&s){const n=(0,r.drop)(e);return t.concat(ut(n))}return t}class dt extends y{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}class ht extends y{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}const pt="MismatchedTokenException",ft="NoViableAltException",mt="EarlyExitException",gt="NotAllInputParsedException",yt=[pt,ft,mt,gt];function Tt(e){return(0,r.includes)(yt,e.name)}Object.freeze(yt);class vt extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class Rt extends vt{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=pt}}class Et extends vt{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=ft}}class kt extends vt{constructor(e,t){super(e,t),this.name=gt}}class St extends vt{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=mt}}const Ct={},xt="InRuleRecoveryException";class At extends Error{constructor(e){super(e),this.name=xt}}function bt(e,t,n,r,i,s,o){const a=this.getKeyForAutomaticLookahead(r,i);let c=this.firstAfterRepMap[a];if(void 0===c){const e=this.getCurrRuleFullName();c=new s(this.getGAstProductions()[e],i).startWalking(),this.firstAfterRepMap[a]=c}let l=c.token,u=c.occurrence;const d=c.isEndOfRule;1===this.RULE_STACK.length&&d&&void 0===l&&(l=$e,u=1),void 0!==l&&void 0!==u&&this.shouldInRepetitionRecoveryBeTried(l,u,o)&&this.tryInRepetitionRecovery(e,t,n,l)}const $t=1024,wt=1280,Nt=1536;function It(e,t,n){return n|t|e}class _t{constructor(e){var t;this.maxLookahead=null!==(t=null==e?void 0:e.maxLookahead)&&void 0!==t?t:Xt.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if((0,r.isEmpty)(t)){const n=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...n,...r,...i]}return t}validateNoLeftRecursion(e){return(0,r.flatMap)(e,e=>lt(e,e,Pe))}validateEmptyOrAlternatives(e){return(0,r.flatMap)(e,e=>function(e,t){const n=new dt;e.accept(n);const i=n.alternations;return(0,r.flatMap)(i,n=>{const i=(0,r.dropRight)(n.definition);return(0,r.flatMap)(i,(i,s)=>{const o=ze([i],[],ie,1);return(0,r.isEmpty)(o)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:s}),type:Jt.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:s+1}]:[]})})}(e,Pe))}validateAmbiguousAlternationAlternatives(e,t){return(0,r.flatMap)(e,e=>function(e,t,n){const i=new dt;e.accept(i);let s=i.alternations;s=(0,r.reject)(s,e=>!0===e.ignoreAmbiguities);return(0,r.flatMap)(s,i=>{const s=i.idx,o=i.maxLookahead||t,a=nt(s,e,o,i),c=function(e,t,n,i){const s=[],o=(0,r.reduce)(e,(n,i,o)=>(!0===t.definition[o].ignoreAmbiguities||(0,r.forEach)(i,i=>{const a=[o];(0,r.forEach)(e,(e,n)=>{o!==n&&it(e,i)&&!0!==t.definition[n].ignoreAmbiguities&&a.push(n)}),a.length>1&&!it(s,i)&&(s.push(i),n.push({alts:a,path:i}))}),n),[]);return(0,r.map)(o,e=>{const s=(0,r.map)(e.alts,e=>e+1);return{message:i.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:s,prefixPath:e.path}),type:Jt.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}})}(a,i,e,n),l=function(e,t,n,i){const s=(0,r.reduce)(e,(e,t,n)=>{const i=(0,r.map)(t,e=>({idx:n,path:e}));return e.concat(i)},[]);return(0,r.compact)((0,r.flatMap)(s,e=>{if(!0===t.definition[e.idx].ignoreAmbiguities)return[];const o=e.idx,a=e.path,c=(0,r.filter)(s,e=>{return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx<o&&(n=e.path,i=a,n.length<i.length&&(0,r.every)(n,(e,t)=>{const n=i[t];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]}));var n,i});return(0,r.map)(c,e=>{const r=[e.idx+1,o+1],s=0===t.idx?"":t.idx;return{message:i.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:r,prefixPath:e.path}),type:Jt.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:s,alternatives:r}})}))}(a,i,e,n);return c.concat(l)})}(e,t,Pe))}validateSomeNonEmptyLookaheadPath(e,t){return function(e,t,n){const i=[];return(0,r.forEach)(e,e=>{const s=new ht;e.accept(s);const o=s.allProductions;(0,r.forEach)(o,s=>{const o=We(s),a=s.maxLookahead||t,c=rt(s.idx,e,o,a)[0];if((0,r.isEmpty)((0,r.flatten)(c))){const t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:s});i.push({message:t,type:Jt.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),i}(e,t,Pe)}buildLookaheadForAlternation(e){return function(e,t,n,r,i,s){const o=nt(e,t,n);return s(o,r,st(o)?se:ie,i)}(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,He)}buildLookaheadForOptional(e){return function(e,t,n,r,i,s){const o=rt(e,t,i,n),a=st(o)?se:ie;return s(o[0],a,r)}(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,We(e.prodType),Ye)}}const Pt=new class extends y{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}};function Lt(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset==1&&(e.endOffset=t.endOffset)}function Ot(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset==1&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function Dt(e,t){Object.defineProperty(e,"name",{enumerable:!1,configurable:!0,writable:!1,value:t})}function Mt(e,t){const n=(0,r.keys)(e),i=n.length;for(let r=0;r<i;r++){const i=e[n[r]],s=i.length;for(let e=0;e<s;e++){const n=i[e];void 0===n.tokenTypeIdx&&this[n.name](n.children,t)}}}var Ft;!function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"}(Ft||(Ft={}));const qt={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(qt);const jt=!0,Ut=Math.pow(2,8)-1,Gt=be({name:"RECORDING_PHASE_TOKEN",pattern:ge.NA});ce([Gt]);const zt=we(Gt,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(zt);const Bt={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}};function Kt(e,t,n,i=!1){Ht(n);const s=(0,r.last)(this.recordingProdStack),o=(0,r.isFunction)(t)?t:t.DEF,a=new e({definition:[],idx:n});return i&&(a.separator=t.SEP),(0,r.has)(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(a),o.call(this),s.definition.push(a),this.recordingProdStack.pop(),qt}function Wt(e,t){Ht(t);const n=(0,r.last)(this.recordingProdStack),i=!1===(0,r.isArray)(e),s=!1===i?e:e.DEF,o=new f({definition:[],idx:t,ignoreAmbiguities:i&&!0===e.IGNORE_AMBIGUITIES});(0,r.has)(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD);const a=(0,r.some)(s,e=>(0,r.isFunction)(e.GATE));return o.hasPredicates=a,n.definition.push(o),(0,r.forEach)(s,e=>{const t=new c({definition:[]});o.definition.push(t),(0,r.has)(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:(0,r.has)(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),qt}function Vt(e){return 0===e?"":`${e}`}function Ht(e){if(e<0||e>Ut){const t=new Error(`Invalid DSL Method idx value: <${e}>\n\tIdx value must be a none negative value smaller than ${Ut+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}const Yt=we($e,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Yt);const Xt=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Ie,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Qt=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var Jt,Zt;function en(e=void 0){return function(){return e}}!function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"}(Jt||(Jt={}));class tn{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;const t=this.className;this.TRACE_INIT("toFastProps",()=>{i(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),(0,r.forEach)(this.definedRulesNames,e=>{const t=this[e].originalGrammarAction;let n;this.TRACE_INIT(`${e} Rule`,()=>{n=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=n})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=function(e){const t=(0,r.defaults)(e,{errMsgProvider:_e}),n={};return(0,r.forEach)(e.rules,e=>{n[e.name]=e}),function(e,t){const n=new Le(e,t);return n.resolveRefs(),n.errors}(n,t.errMsgProvider)}({rules:(0,r.values)(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if((0,r.isEmpty)(n)&&!1===this.skipValidations){const n=(e={rules:(0,r.values)(this.gastProductionsCache),tokenTypes:(0,r.values)(this.tokensMap),errMsgProvider:Pe,grammarName:t},function(e,t,n,i){const s=(0,r.flatMap)(e,e=>function(e,t){const n=new ct;e.accept(n);const i=n.allProductions,s=(0,r.groupBy)(i,ot),o=(0,r.pickBy)(s,e=>e.length>1);return(0,r.map)((0,r.values)(o),n=>{const i=(0,r.first)(n),s=t.buildDuplicateFoundError(e,n),o=v(i),a={message:s,type:Jt.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:o,occurrence:i.idx},c=at(i);return c&&(a.parameter=c),a})}(e,n)),o=function(e,t,n){const i=[],s=(0,r.map)(t,e=>e.name);return(0,r.forEach)(e,e=>{const t=e.name;if((0,r.includes)(s,t)){const r=n.buildNamespaceConflictError(e);i.push({message:r,type:Jt.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),i}(e,t,n),a=(0,r.flatMap)(e,e=>function(e,t){const n=new dt;e.accept(n);const i=n.alternations;return(0,r.flatMap)(i,n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:Jt.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[])}(e,n)),c=(0,r.flatMap)(e,t=>function(e,t,n,i){const s=[],o=(0,r.reduce)(t,(t,n)=>n.name===e.name?t+1:t,0);if(o>1){const t=i.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});s.push({message:t,type:Jt.DUPLICATE_RULE_NAME,ruleName:e.name})}return s}(t,e,i,n));return s.concat(o,a,c)}((e=(0,r.defaults)(e,{errMsgProvider:Pe})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)),i=function(e){const t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return(0,r.map)(t,e=>Object.assign({type:Jt.CUSTOM_LOOKAHEAD_VALIDATION},e))}({lookaheadStrategy:this.lookaheadStrategy,rules:(0,r.values)(this.gastProductionsCache),tokenTypes:(0,r.values)(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(n,i)}var e}),(0,r.isEmpty)(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const e=function(e){const t={};return(0,r.forEach)(e,e=>{const n=new C(e).startWalking();(0,r.assign)(t,n)}),t}((0,r.values)(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var e,t;null===(t=(e=this.lookaheadStrategy).initialize)||void 0===t||t.call(e,{rules:(0,r.values)(this.gastProductionsCache)}),this.preComputeLookaheadFunctions((0,r.values)(this.gastProductionsCache))})),!tn.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,r.isEmpty)(this.definitionErrors))throw e=(0,r.map)(this.definitionErrors,e=>e.message),new Error(`Parser Definition Errors detected:\n ${e.join("\n-------------------------------\n")}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;const n=this;if(n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initContentAssist(),n.initGastRecorder(t),n.initPerformanceTracer(t),(0,r.has)(t,"ignoredIssues"))throw new Error("The <ignoredIssues> IParserConfig property has been deprecated.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=(0,r.has)(t,"skipValidations")?t.skipValidations:Xt.skipValidations}}tn.DEFER_DEFINITION_ERRORS_HANDLING=!1,Zt=tn,[class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,r.has)(e,"recoveryEnabled")?e.recoveryEnabled:Xt.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=bt)}getTokenToInsert(e){const t=we(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,i){const s=this.findReSyncTokenType(),o=this.exportLexerState(),a=[];let c=!1;const l=this.LA(1);let u=this.LA(1);const d=()=>{const e=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:e,ruleName:this.getCurrRuleFullName()}),n=new Rt(t,l,this.LA(0));n.resyncedTokens=(0,r.dropRight)(a),this.SAVE_ERROR(n)};for(;!c;){if(this.tokenMatcher(u,i))return void d();if(n.call(this))return d(),void e.apply(this,t);this.tokenMatcher(u,s)?c=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,a))}this.importLexerState(o)}shouldInRepetitionRecoveryBeTried(e,t,n){return!1!==n&&!this.tokenMatcher(this.LA(1),e)&&!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t))}getFollowsForInRuleRecovery(e,t){const n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new At("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if((0,r.isEmpty)(t))return!1;const n=this.LA(1);return void 0!==(0,r.find)(t,e=>this.tokenMatcher(n,e))}canRecoverWithSingleTokenDeletion(e){return!!this.canTokenTypeBeDeletedInRecovery(e)&&this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(t);return(0,r.includes)(n,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),n=2;for(;;){const i=(0,r.find)(e,e=>Ne(t,e));if(void 0!==i)return i;t=this.LA(n),n++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return Ct;const e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return(0,r.map)(e,(n,r)=>0===r?Ct:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])})}flattenFollowSet(){const e=(0,r.map)(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e));return(0,r.flatten)(e)}getFollowSetFromFollowKey(e){if(e===Ct)return[$e];const t=e.ruleName+e.idxInCallingRule+S+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,$e)||t.push(e),t}reSyncTo(e){const t=[];let n=this.LA(1);for(;!1===this.tokenMatcher(n,e);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return(0,r.dropRight)(t)}attemptInRepetitionRecovery(e,t,n,r,i,s,o){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,r.clone)(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return(0,r.map)(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},class{initLooksAhead(e){this.dynamicTokensEnabled=(0,r.has)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Xt.dynamicTokensEnabled,this.maxLookahead=(0,r.has)(e,"maxLookahead")?e.maxLookahead:Xt.maxLookahead,this.lookaheadStrategy=(0,r.has)(e,"lookaheadStrategy")?e.lookaheadStrategy:new _t({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){(0,r.forEach)(e,e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,()=>{const{alternation:t,repetition:n,option:i,repetitionMandatory:s,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:a}=function(e){Pt.reset(),e.accept(Pt);const t=Pt.dslMethods;return Pt.reset(),t}(e);(0,r.forEach)(t,t=>{const n=0===t.idx?"":t.idx;this.TRACE_INIT(`${v(t)}${n}`,()=>{const n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=It(this.fullRuleNameToShort[e.name],256,t.idx);this.setLaFuncCache(r,n)})}),(0,r.forEach)(n,t=>{this.computeLookaheadFunc(e,t.idx,768,"Repetition",t.maxLookahead,v(t))}),(0,r.forEach)(i,t=>{this.computeLookaheadFunc(e,t.idx,512,"Option",t.maxLookahead,v(t))}),(0,r.forEach)(s,t=>{this.computeLookaheadFunc(e,t.idx,$t,"RepetitionMandatory",t.maxLookahead,v(t))}),(0,r.forEach)(o,t=>{this.computeLookaheadFunc(e,t.idx,Nt,"RepetitionMandatoryWithSeparator",t.maxLookahead,v(t))}),(0,r.forEach)(a,t=>{this.computeLookaheadFunc(e,t.idx,wt,"RepetitionWithSeparator",t.maxLookahead,v(t))})})})}computeLookaheadFunc(e,t,n,r,i,s){this.TRACE_INIT(`${s}${0===t?"":t}`,()=>{const s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),o=It(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(o,s)})}getKeyForAutomaticLookahead(e,t){return It(this.getLastExplicitRuleShortName(),e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,r.has)(e,"nodeLocationTracking")?e.nodeLocationTracking:Xt.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ot,this.setNodeLocationFromNode=Ot,this.cstPostRule=r.noop,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=r.noop,this.setNodeLocationFromNode=r.noop,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Lt,this.setNodeLocationFromNode=Lt,this.cstPostRule=r.noop,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=r.noop,this.setNodeLocationFromNode=r.noop,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=r.noop,this.setNodeLocationFromNode=r.noop,this.cstPostRule=r.noop,this.setInitialNodeLocation=r.noop}else this.cstInvocationStateUpdate=r.noop,this.cstFinallyStateUpdate=r.noop,this.cstPostTerminal=r.noop,this.cstPostNonTerminal=r.noop,this.cstPostRule=r.noop}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];var r,i,s;i=t,s=e,void 0===(r=n).children[s]?r.children[s]=[i]:r.children[s].push(i),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];!function(e,t,n){void 0===e.children[t]?e.children[t]=[n]:e.children[t].push(n)}(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if((0,r.isUndefined)(this.baseCstVisitorConstructor)){const e=function(e,t){const n=function(){};Dt(n,e+"BaseSemantics");const i={visit:function(e,t){if((0,r.isArray)(e)&&(e=e[0]),!(0,r.isUndefined)(e))return this[e.name](e.children,t)},validateVisitor:function(){const e=function(e,t){const n=function(e,t){const n=(0,r.filter)(t,t=>!1===(0,r.isFunction)(e[t])),i=(0,r.map)(n,t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:Ft.MISSING_METHOD,methodName:t}));return(0,r.compact)(i)}(e,t);return n}(this,t);if(!(0,r.isEmpty)(e)){const t=(0,r.map)(e,e=>e.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join("\n\n").replace(/\n/g,"\n\t")}`)}}};return(n.prototype=i).constructor=n,n._RULE_NAMES=t,n}(this.className,(0,r.keys)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if((0,r.isUndefined)(this.baseCstVisitorWithDefaultsConstructor)){const e=function(e,t,n){const i=function(){};Dt(i,e+"BaseSemanticsWithDefaults");const s=Object.create(n.prototype);return(0,r.forEach)(t,e=>{s[e]=Mt}),(i.prototype=s).constructor=i,i}(this.className,(0,r.keys)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Yt}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Yt:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=se,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,r.has)(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if((0,r.isArray)(e)){if((0,r.isEmpty)(e))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if((0,r.isArray)(e))this.tokensMap=(0,r.reduce)(e,(e,t)=>(e[t.name]=t,e),{});else if((0,r.has)(e,"modes")&&(0,r.every)((0,r.flatten)((0,r.values)(e.modes)),he)){const t=(0,r.flatten)((0,r.values)(e.modes)),n=(0,r.uniq)(t);this.tokensMap=(0,r.reduce)(n,(e,t)=>(e[t.name]=t,e),{})}else{if(!(0,r.isObject)(e))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=(0,r.clone)(e)}this.tokensMap.EOF=$e;const n=(0,r.has)(e,"modes")?(0,r.flatten)((0,r.values)(e.modes)):(0,r.values)(e),i=(0,r.every)(n,e=>(0,r.isEmpty)(e.categoryMatches));this.tokenMatcher=i?se:ie,ce((0,r.values)(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const i=(0,r.has)(n,"resyncEnabled")?n.resyncEnabled:Qt.resyncEnabled,s=(0,r.has)(n,"recoveryValueFunc")?n.recoveryValueFunc:Qt.recoveryValueFunc,o=this.ruleShortNameIdx<<12;let a;return this.ruleShortNameIdx++,this.shortRuleNameToFull[o]=e,this.fullRuleNameToShort[e]=o,a=!0===this.outputCst?function(...n){try{this.ruleInvocationStateUpdate(o,e,this.subruleIdx),t.apply(this,n);const r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(e){return this.invokeRuleCatch(e,i,s)}finally{this.ruleFinallyStateUpdate()}}:function(...n){try{return this.ruleInvocationStateUpdate(o,e,this.subruleIdx),t.apply(this,n)}catch(e){return this.invokeRuleCatch(e,i,s)}finally{this.ruleFinallyStateUpdate()}},Object.assign(a,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,n){const r=1===this.RULE_STACK.length,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(Tt(e)){const t=e;if(i){const r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r)){if(t.resyncedTokens=this.reSyncTo(r),this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}return n(e)}if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}if(r)return this.moveToTerminatedState(),n(e);throw t}throw e}optionInternal(e,t){const n=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof e){r=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=()=>t.call(this)&&e.call(this)}}else r=e;if(!0===i.call(this))return r.call(this)}atLeastOneInternal(e,t){const n=this.getKeyForAutomaticLookahead($t,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;if(!0!==i.call(this))throw this.raiseEarlyExitException(e,Ke.REPETITION_MANDATORY,t.ERR_MSG);{let e=this.doSingleRepetition(r);for(;!0===i.call(this)&&!0===e;)e=this.doSingleRepetition(r)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,$t,e,je)}atLeastOneSepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(Nt,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(e,Ke.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);{r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,Ue],t,Nt,e,Ue)}}manyInternal(e,t){const n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;let s=!0;for(;!0===i.call(this)&&!0===s;)s=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,768,e,Fe,s)}manySepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(wt,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,qe],t,wt,e,qe)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,Nt,e,i)}doSingleRepetition(e){const t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){const n=this.getKeyForAutomaticLookahead(256,t),i=(0,r.isArray)(e)?e:e.DEF,s=this.getLaFuncFromCache(n).call(this,i);if(void 0!==s)return i[s].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){const e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new kt(t,e))}}subruleInternal(e,t,n){let r;try{const i=void 0!==n?n.ARGS:void 0;return this.subruleIdx=t,r=e.apply(this,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:e.ruleName),r}catch(t){throw this.subruleInternalError(t,n,e.ruleName)}}subruleInternalError(e,t,n){throw Tt(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{const t=this.LA(1);!0===this.tokenMatcher(t,e)?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r;const i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Rt(r,t,i))}consumeInternalRecovery(e,t,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;{const r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(e){throw e.name===xt?n:e}}}saveRecogState(){const e=this.errors,t=(0,r.clone)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),$e)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},class{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=Qt){if((0,r.includes)(this.definedRulesNames,e)){const t={message:Pe.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Jt.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);const i=this.defineRule(e,t,n);return this[e]=i,i}OVERRIDE_RULE(e,t,n=Qt){const i=function(e,t,n){const i=[];let s;return(0,r.includes)(t,e)||(s=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,i.push({message:s,type:Jt.INVALID_RULE_OVERRIDE,ruleName:e})),i}(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);const s=this.defineRule(e,t,n);return this[e]=s,s}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if(Tt(e))return!1;throw e}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return e=(0,r.values)(this.gastProductionsCache),(0,r.map)(e,g);var e}},class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=(0,r.has)(e,"errorMessageProvider")?e.errorMessageProvider:Xt.errorMessageProvider}SAVE_ERROR(e){if(Tt(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,r.clone)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return(0,r.clone)(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){const r=this.getCurrRuleFullName(),i=rt(e,this.getGAstProductions()[r],t,this.maxLookahead)[0],s=[];for(let e=1;e<=this.maxLookahead;e++)s.push(this.LA(e));const o=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:s,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new St(o,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const n=this.getCurrRuleFullName(),r=nt(e,this.getGAstProductions()[n],this.maxLookahead),i=[];for(let e=1;e<=this.maxLookahead;e++)i.push(this.LA(e));const s=this.LA(0),o=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:s,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Et(o,this.LA(1),s))}},class{initContentAssist(){}computeContentAssist(e,t){const n=this.gastProductionsCache[e];if((0,r.isUndefined)(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return ze([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=(0,r.first)(e.ruleStack),n=this.getGAstProductions()[t];return new De(n,e).startWalking()}},class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const e=this;for(let t=0;t<10;t++){const n=t>0?t:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return Yt}topLevelRuleRecord(e,t){try{const n=new a({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(e){if(!0!==e.KNOWN_RECORDER_ERROR)try{e.message=e.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(t){throw e}throw e}}optionInternalRecord(e,t){return Kt.call(this,l,e,t)}atLeastOneInternalRecord(e,t){Kt.call(this,u,t,e)}atLeastOneSepFirstInternalRecord(e,t){Kt.call(this,d,t,e,jt)}manyInternalRecord(e,t){Kt.call(this,h,t,e)}manySepFirstInternalRecord(e,t){Kt.call(this,p,t,e,jt)}orInternalRecord(e,t){return Wt.call(this,e,t)}subruleInternalRecord(e,t,n){if(Ht(t),!e||!1===(0,r.has)(e,"ruleName")){const n=new Error(`<SUBRULE${Vt(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const i=(0,r.last)(this.recordingProdStack),s=e.ruleName,a=new o({idx:t,nonTerminalName:s,label:null==n?void 0:n.LABEL,referencedRule:void 0});return i.definition.push(a),this.outputCst?Bt:qt}consumeInternalRecord(e,t,n){if(Ht(t),!ue(e)){const n=new Error(`<CONSUME${Vt(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const i=(0,r.last)(this.recordingProdStack),s=new m({idx:t,terminalType:e,label:null==n?void 0:n.LABEL});return i.definition.push(s),zt}},class{initPerformanceTracer(e){if((0,r.has)(e,"traceInitPerf")){const t=e.traceInitPerf,n="number"==typeof t;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Xt.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--\x3e <${e}>`);const{time:r,value:i}=re(t),s=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(`${n}<-- <${e}> time: ${r}ms`),this.traceInitIndent--,i}return t()}}].forEach(e=>{const t=e.prototype;Object.getOwnPropertyNames(t).forEach(n=>{if("constructor"===n)return;const r=Object.getOwnPropertyDescriptor(t,n);r&&(r.get||r.set)?Object.defineProperty(Zt.prototype,n,r):Zt.prototype[n]=e.prototype[n]})});class nn extends tn{constructor(e,t=Xt){const n=(0,r.clone)(t);n.outputCst=!1,super(e,n)}}},610(e,t,n){"use strict";n.d(t,{t:()=>dn,u:()=>hn});var r=n(6373),i=n(418),s=n(2806),o=n(2151),a=n(1064),c=n(5378),l=n(7612);function u(e,t,n){return`${e.name}_${t}_${n}`}class d{constructor(e){this.target=e}isEpsilon(){return!1}}class h extends d{constructor(e,t){super(e),this.tokenType=t}}class p extends d{constructor(e){super(e)}isEpsilon(){return!0}}class f extends d{constructor(e,t,n){super(e),this.rule=t,this.followState=n}isEpsilon(){return!0}}function m(e,t,n){return n instanceof a.BK?E(e,t,n.terminalType,n):n instanceof a.wL?function(e,t,n){const r=n.referencedRule,i=e.ruleToStartState.get(r),s=C(e,t,n,{type:1}),o=C(e,t,n,{type:1});return x(s,new f(i,r,o)),{left:s,right:o}}(e,t,n):n instanceof a.ak?function(e,t,n){const r=C(e,t,n,{type:1});v(e,r);const i=c(n.definition,n=>m(e,t,n));return R(e,t,r,n,...i)}(e,t,n):n instanceof a.c$?function(e,t,n){const r=C(e,t,n,{type:1});v(e,r);return function(e,t,n,r){const i=r.left;return S(i,r.right),e.decisionMap[u(t,"Option",n.idx)]=i,r}(e,t,n,R(e,t,r,n,g(e,t,n)))}(e,t,n):n instanceof a.Y2?function(e,t,n){const r=C(e,t,n,{type:5});v(e,r);return T(e,t,n,R(e,t,r,n,g(e,t,n)))}(e,t,n):n instanceof a.Pp?function(e,t,n){const r=C(e,t,n,{type:5});v(e,r);return T(e,t,n,R(e,t,r,n,g(e,t,n)),E(e,t,n.separator,n))}(e,t,n):n instanceof a.$P?function(e,t,n){const r=C(e,t,n,{type:4});v(e,r);return y(e,t,n,R(e,t,r,n,g(e,t,n)))}(e,t,n):n instanceof a.Cy?function(e,t,n){const r=C(e,t,n,{type:4});v(e,r);return y(e,t,n,R(e,t,r,n,g(e,t,n)),E(e,t,n.separator,n))}(e,t,n):g(e,t,n)}function g(e,t,n){const r=l(c(n.definition,n=>m(e,t,n)),e=>void 0!==e);return 1===r.length?r[0]:0===r.length?void 0:function(e,t){const n=t.length;for(let r=0;r<n-1;r++){const n=t[r];let i;1===n.left.transitions.length&&(i=n.left.transitions[0]);const s=i instanceof f,o=i,a=t[r+1].left;1===n.left.type&&1===n.right.type&&void 0!==i&&(s&&o.followState===n.right||i.target===n.right)?(s?o.followState=a:i.target=a,A(e,n.right)):S(n.right,a)}const r=t[0],i=t[n-1];return{left:r.left,right:i.right}}(e,r)}function y(e,t,n,r,i){const s=r.left,o=r.right,a=C(e,t,n,{type:11});v(e,a);const c=C(e,t,n,{type:12});return s.loopback=a,c.loopback=a,e.decisionMap[u(t,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",n.idx)]=a,S(o,a),void 0===i?(S(a,s),S(a,c)):(S(a,c),S(a,i.left),S(i.right,s)),{left:s,right:c}}function T(e,t,n,r,i){const s=r.left,o=r.right,a=C(e,t,n,{type:10});v(e,a);const c=C(e,t,n,{type:12}),l=C(e,t,n,{type:9});return a.loopback=l,c.loopback=l,S(a,s),S(a,c),S(o,l),void 0!==i?(S(l,c),S(l,i.left),S(i.right,s)):S(l,a),e.decisionMap[u(t,i?"RepetitionWithSeparator":"Repetition",n.idx)]=a,{left:a,right:c}}function v(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function R(e,t,n,r,...i){const s=C(e,t,r,{type:8,start:n});n.end=s;for(const e of i)void 0!==e?(S(n,e.left),S(e.right,s)):S(n,s);const o={left:n,right:s};return e.decisionMap[u(t,function(e){if(e instanceof a.ak)return"Alternation";if(e instanceof a.c$)return"Option";if(e instanceof a.Y2)return"Repetition";if(e instanceof a.Pp)return"RepetitionWithSeparator";if(e instanceof a.$P)return"RepetitionMandatory";if(e instanceof a.Cy)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}(r),r.idx)]=n,o}function E(e,t,n,r){const i=C(e,t,r,{type:1}),s=C(e,t,r,{type:1});return x(i,new h(s,n)),{left:i,right:s}}function k(e,t,n){const r=e.ruleToStartState.get(t);S(r,n.left);const i=e.ruleToStopState.get(t);return S(n.right,i),{left:r,right:i}}function S(e,t){x(e,new p(t))}function C(e,t,n,r){const i=Object.assign({atn:e,production:n,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},r);return e.states.push(i),i}function x(e,t){0===e.transitions.length&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}function A(e,t){e.states.splice(e.states.indexOf(t),1)}const b={};class ${constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const t=w(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return c(this.configs,e=>e.alt)}get key(){let e="";for(const t in this.map)e+=t+":";return e}}function w(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map(e=>e.stateNumber.toString()).join("_")}`}var N=n(1684),I=n(7307),_=n(14),P=n(5970),L=n(9754),O=n(2193),D=n(860);function M(e,t){const n={};return r=>{const i=r.toString();let s=n[i];return void 0!==s||(s={atnStartState:e,decision:t,states:{}},n[i]=s),s}}class F{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let n=0;n<t;n++)e+=!0===this.predicates[n]?"1":"0";return e}}const q=new F;class j extends a.T6{constructor(e){var t;super(),this.logging=null!==(t=null==e?void 0:e.logging)&&void 0!==t?t:e=>console.log(e)}initialize(e){this.atn=function(e){const t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};!function(e,t){const n=t.length;for(let r=0;r<n;r++){const n=t[r],i=C(e,n,void 0,{type:2}),s=C(e,n,void 0,{type:7});i.stop=s,e.ruleToStartState.set(n,i),e.ruleToStopState.set(n,s)}}(t,e);const n=e.length;for(let r=0;r<n;r++){const n=e[r],i=g(t,n,n);void 0!==i&&k(t,n,i)}return t}(e.rules),this.dfas=function(e){const t=e.decisionStates.length,n=Array(t);for(let r=0;r<t;r++)n[r]=M(e.decisionStates[r],r);return n}(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:t,rule:n,hasPredicates:r,dynamicTokensEnabled:i}=e,s=this.dfas,o=this.logging,l=u(n,"Alternation",t),d=this.atn.decisionMap[l].decision,h=c((0,a.jk)({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:n}),e=>c(e,e=>e[0]));if(U(h,!1)&&!i){const e=D(h,(e,t,n)=>(L(t,t=>{t&&(e[t.tokenTypeIdx]=n,L(t.categoryMatches,t=>{e[t]=n}))}),e),{});return r?function(t){var n;const r=this.LA(1),i=e[r.tokenTypeIdx];if(void 0!==t&&void 0!==i){const e=null===(n=t[i])||void 0===n?void 0:n.GATE;if(void 0!==e&&!1===e.call(this))return}return i}:function(){const t=this.LA(1);return e[t.tokenTypeIdx]}}return r?function(e){const t=new F,n=void 0===e?0:e.length;for(let r=0;r<n;r++){const n=null==e?void 0:e[r].GATE;t.set(r,void 0===n||n.call(this))}const r=G.call(this,s,d,t,o);return"number"==typeof r?r:void 0}:function(){const e=G.call(this,s,d,q,o);return"number"==typeof e?e:void 0}}buildLookaheadForOptional(e){const{prodOccurrence:t,rule:n,prodType:r,dynamicTokensEnabled:i}=e,s=this.dfas,o=this.logging,l=u(n,r,t),d=this.atn.decisionMap[l].decision,h=c((0,a.jk)({maxLookahead:1,occurrence:t,prodType:r,rule:n}),e=>c(e,e=>e[0]));if(U(h)&&h[0][0]&&!i){const e=h[0],t=P(e);if(1===t.length&&O(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=D(t,(e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,L(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){const e=G.call(this,s,d,q,o);return"object"!=typeof e&&0===e}}}function U(e,t=!0){const n=new Set;for(const r of e){const e=new Set;for(const i of r){if(void 0===i){if(t)break;return!1}const r=[i.tokenTypeIdx].concat(i.categoryMatches);for(const t of r)if(n.has(t)){if(!e.has(t))return!1}else n.add(t),e.add(t)}}return!0}function G(e,t,n,r){const i=e[t](n);let s=i.start;return void 0===s&&(s=Q(i,Y(function(e){const t=new $,n=e.transitions.length;for(let r=0;r<n;r++)J({state:e.transitions[r].target,alt:r,stack:[]},t);return t}(i.atnStartState))),i.start=s),z.apply(this,[i,s,n,r])}function z(e,t,n,r){let i=t,s=1;const o=[];let a=this.LA(s++);for(;;){let t=V(i,a);if(void 0===t&&(t=B.apply(this,[e,i,a,s,n,r])),t===b)return W(o,i,a);if(!0===t.isAcceptState)return t.prediction;i=t,o.push(a),a=this.LA(s++)}}function B(e,t,n,r,i,s){const o=function(e,t,n){const r=new $,i=[];for(const s of e.elements){if(!1===n.is(s.alt))continue;if(7===s.state.type){i.push(s);continue}const e=s.state.transitions.length;for(let n=0;n<e;n++){const e=H(s.state.transitions[n],t);void 0!==e&&r.add({state:e,alt:s.alt,stack:s.stack})}}let s;if(0===i.length&&1===r.size&&(s=r),void 0===s){s=new $;for(const e of r.elements)J(e,s)}if(i.length>0&&!function(e){for(const t of e.elements)if(7===t.state.type)return!0;return!1}(s))for(const e of i)s.add(e);return s}(t.configs,n,i);if(0===o.size)return X(e,t,n,b),b;let a=Y(o);const c=function(e,t){let n;for(const r of e.elements)if(!0===t.is(r.alt))if(void 0===n)n=r.alt;else if(n!==r.alt)return;return n}(o,i);if(void 0!==c)a.isAcceptState=!0,a.prediction=c,a.configs.uniqueAlt=c;else if(function(e){if(function(e){for(const t of e.elements)if(7!==t.state.type)return!1;return!0}(e))return!0;const t=function(e){const t=new Map;for(const n of e){const e=w(n,!1);let r=t.get(e);void 0===r&&(r={},t.set(e,r)),r[n.alt]=!0}return t}(e.elements);return function(e){for(const t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}(t)&&!function(e){for(const t of Array.from(e.values()))if(1===Object.keys(t).length)return!0;return!1}(t)}(o)){const t=N(o.alts);a.isAcceptState=!0,a.prediction=t,a.configs.uniqueAlt=t,K.apply(this,[e,r,o.alts,s])}return a=X(e,t,n,a),a}function K(e,t,n,r){const i=[];for(let e=1;e<=t;e++)i.push(this.LA(e).tokenType);const s=e.atnStartState;r(function(e){const t=c(e.prefixPath,e=>(0,a.Sk)(e)).join(", "),n=0===e.production.idx?"":e.production.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${function(e){if(e instanceof a.wL)return"SUBRULE";if(e instanceof a.c$)return"OPTION";if(e instanceof a.ak)return"OR";if(e instanceof a.$P)return"AT_LEAST_ONE";if(e instanceof a.Cy)return"AT_LEAST_ONE_SEP";if(e instanceof a.Pp)return"MANY_SEP";if(e instanceof a.Y2)return"MANY";if(e instanceof a.BK)return"CONSUME";throw Error("non exhaustive match")}(e.production)}${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r}({topLevelRule:s.rule,ambiguityIndices:n,production:s.production,prefixPath:i}))}function W(e,t,n){const r=I(t.configs.elements,e=>e.state.transitions);return{actualToken:n,possibleTokenTypes:_(r.filter(e=>e instanceof h).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function V(e,t){return e.edges[t.tokenTypeIdx]}function H(e,t){if(e instanceof h&&(0,a.G)(t,e.tokenType))return e.target}function Y(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function X(e,t,n,r){return r=Q(e,r),t.edges[n.tokenTypeIdx]=r,r}function Q(e,t){if(t===b)return t;const n=t.configs.key,r=e.states[n];return void 0!==r?r:(t.configs.finalize(),e.states[n]=t,t)}function J(e,t){const n=e.state;if(7===n.type){if(e.stack.length>0){const n=[...e.stack];J({state:n.pop(),alt:e.alt,stack:n},t)}else t.add(e);return}n.epsilonOnlyTransitions||t.add(e);const r=n.transitions.length;for(let i=0;i<r;i++){const r=Z(e,n.transitions[i]);void 0!==r&&J(r,t)}}function Z(e,t){if(t instanceof p)return{state:t.target,alt:e.alt,stack:e.stack};if(t instanceof f){const n=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:n}}}var ee=n(9683),te=n(6203);class ne{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new ae(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const t=new se;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){const n=new ie(e.startOffset,e.image.length,(0,r.wf)(e),e.tokenType,!t);return n.grammarSource=t,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){const t=e.container;if(t){const n=t.content.indexOf(e);n>=0&&t.content.splice(n,1)}}addHiddenNodes(e){const t=[];for(const n of e){const e=new ie(n.startOffset,n.image.length,(0,r.wf)(n),n.tokenType,!0);e.root=this.rootNode,t.push(e)}let n=this.current,i=!1;if(n.content.length>0)n.content.push(...t);else{for(;n.container;){const e=n.container.content.indexOf(n);if(e>0){n.container.content.splice(e,0,...t),i=!0;break}n=n.container}i||this.rootNode.content.unshift(...t)}}construct(e){const t=this.current;"string"!=typeof e.$type||e.$infixName||(this.current.astNode=e),e.$cstNode=t;const n=this.nodeStack.pop();0===n?.content.length&&this.removeNode(n)}}class re{get hidden(){return!1}get astNode(){const e="string"==typeof this._astNode?.$type?this._astNode:this.container?.astNode;if(!e)throw new Error("This node has no associated AST element");return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}}class ie extends re{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,n,r,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=r,this._length=t,this._range=n}}class se extends re{constructor(){super(...arguments),this.content=new oe(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){const e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(void 0===this._rangeCache){const{range:n}=e,{range:r}=t;this._rangeCache={start:n.start,end:r.end.line<n.start.line?n.start:r.end}}return this._rangeCache}return{start:te.Position.create(0,0),end:te.Position.create(0,0)}}get firstNonHiddenNode(){for(const e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){const t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}}class oe extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,oe.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...n){return this.addParents(n),super.splice(e,t,...n)}addParents(e){for(const t of e)t.container=this.parent}}class ae extends se{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}const ce=Symbol("Datatype");function le(e){return e.$type===ce}const ue=e=>e.endsWith("")?e:e+"";class de{constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;const t=this.lexer.definition,n="production"===e.LanguageMetaData.mode;e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new Te(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new ye(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class he extends de{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new ne,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){const n=this.computeRuleType(e);let r;(0,o.NT)(e)&&(r=e.name,this.registerPrecedenceMap(e));const i=this.wrapper.DEFINE_RULE(ue(e.name),this.startImplementation(n,r,t).bind(this));return this.allRules.set(e.name,i),(0,o.s7)(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){const t=e.name,n=new Map;for(let t=0;t<e.operators.precedences.length;t++){const r=e.operators.precedences[t];for(const e of r.operators)n.set(e.value,{precedence:t,rightAssoc:"right"===r.associativity})}this.operatorPrecedence.set(t,n)}computeRuleType(e){return(0,o.NT)(e)?(0,i.Uz)(e):e.fragment?void 0:(0,i.Xq)(e)?ce:(0,i.Uz)(e)}parse(e,t={}){this.nodeBuilder.buildRootNode(e);const n=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=n.tokens;const r=t.rule?this.allRules.get(t.rule):this.mainRule;if(!r)throw new Error(t.rule?`No rule found with name '${t.rule}'`:"No main rule available.");const i=this.doParse(r);return this.nodeBuilder.addHiddenNodes(n.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,(0,ee.SD)(i,{deep:!0}),{value:i,lexerErrors:n.errors,lexerReport:n.report,parserErrors:this.wrapper.errors}}doParse(e){let t=this.wrapper.rule(e);if(this.stack.length>0&&(t=this.construct()),void 0===t)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return t}startImplementation(e,t,n){return r=>{const i=!this.isRecording()&&void 0!==e;if(i){const n={$type:e};this.stack.push(n),e===ce?n.value="":void 0!==t&&(n.$infixName=t)}return n(r),i?this.construct():void 0}}extractHiddenTokens(e){const t=this.lexerResult.hidden;if(!t.length)return[];const n=e.startOffset;for(let e=0;e<t.length;e++)if(t[e].startOffset>n)return t.splice(0,e);return t.splice(0,t.length)}consume(e,t,n){const r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){const e=this.extractHiddenTokens(r);this.nodeBuilder.addHiddenNodes(e);const t=this.nodeBuilder.buildLeafNode(r,n),{assignment:i,crossRef:s}=this.getAssignment(n),a=this.current;if(i){const e=(0,o.wb)(n)?r.image:this.converter.convert(r.image,t);this.assign(i.operator,i.feature,e,t,s)}else if(le(a)){let e=r.image;(0,o.wb)(n)||(e=this.converter.convert(e,t).toString()),a.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&"number"==typeof e.endOffset&&!isNaN(e.endOffset)}subrule(e,t,n,r,i){let s,o;this.isRecording()||n||(s=this.nodeBuilder.buildCompositeNode(r));try{o=this.wrapper.wrapSubrule(e,t,i)}finally{this.isRecording()||(void 0!==o||n||(o=this.construct()),void 0!==o&&s&&s.length>0&&this.performSubruleAssignment(o,r,s))}}performSubruleAssignment(e,t,n){const{assignment:r,crossRef:i}=this.getAssignment(t);if(r)this.assign(r.operator,r.feature,e,n,i);else if(!r){const t=this.current;if(le(t))t.value+=e.toString();else if("object"==typeof e&&e){const n=this.assignWithoutOverride(e,t);this.stack.pop(),this.stack.push(n)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(t.feature&&t.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(t).content.push(n.$cstNode);const r={$type:e};this.stack.push(r),this.assign(t.operator,t.feature,n,n.$cstNode)}else n.$type=e}}construct(){if(this.isRecording())return;const e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):le(e)?this.converter.convert(e.value,e.$cstNode):((0,ee.OP)(this.astReflection,e),e)}constructInfix(e,t){const n=e.parts;if(!Array.isArray(n)||0===n.length)return;const r=e.operators;if(!Array.isArray(r)||n.length<2)return n[0];let i=0,s=-1;for(let e=0;e<r.length;e++){const n=r[e],o=t.get(n)??{precedence:1/0,rightAssoc:!1};o.precedence>s?(s=o.precedence,i=e):o.precedence===s&&(o.rightAssoc||(i=e))}const o=r.slice(0,i),a=r.slice(i+1),c=n.slice(0,i+1),l=n.slice(i+1),u={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:o},d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:a},h=this.constructInfix(u,t),p=this.constructInfix(d,t);return{$type:e.$type,$cstNode:e.$cstNode,left:h,operator:r[i],right:p}}getAssignment(e){if(!this.assignmentMap.has(e)){const t=(0,ee.XG)(e,o.wh);this.assignmentMap.set(e,{assignment:t,crossRef:t&&(0,o._c)(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){const s=this.current;let o;switch(o="single"===i&&"string"==typeof n?this.linker.buildReference(s,t,r,n):"multi"===i&&"string"==typeof n?this.linker.buildMultiReference(s,t,r,n):n,e){case"=":s[t]=o;break;case"?=":s[t]=!0;break;case"+=":Array.isArray(s[t])||(s[t]=[]),s[t].push(o)}}assignWithoutOverride(e,t){for(const[n,r]of Object.entries(t)){const t=e[n];void 0===t?e[n]=r:Array.isArray(t)&&Array.isArray(r)&&(r.push(...t),e[n]=r)}const n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}}class pe{buildMismatchTokenMessage(e){return a.my.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return a.my.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return a.my.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return a.my.buildEarlyExitMessage(e)}}class fe extends pe{buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class me extends de{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const t=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){const n=this.wrapper.DEFINE_RULE(ue(e.name),this.startImplementation(t).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{const n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,n,r,i){this.before(r),this.wrapper.wrapSubrule(e,t,i),this.after(r)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}}const ge={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new fe};class ye extends a.jr{constructor(e,t){super(e,{...ge,lookaheadStrategy:t&&"maxLookahead"in t?new a.T6({maxLookahead:t.maxLookahead}):new j({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,n){return this.RULE(e,t,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}}class Te extends ye{constructor(e,t,n){super(e,t),this.task=n}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,n){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,n)}finally{this.task.stopSubTask(this.ruleName(t))}}}var ve=n(1564),Re=n(1719);function Ee(e,t,n){return function(e,t){const n=(0,i.YV)(t,!1),r=(0,Re.Td)(t.rules).filter(o.s7).filter(e=>n.has(e));for(const t of r){const n={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(t,Se(n,t.definition))}const s=(0,Re.Td)(t.rules).filter(o.NT).filter(e=>n.has(e));for(const t of s)e.parser.rule(t,ke(e,t))}({parser:t,tokens:n,ruleNames:new Map},e),t}function ke(e,t){const n=t.call.rule.ref;if(!n)throw new Error("Could not resolve reference to infix operator rule: "+t.call.rule.$refText);if((0,o.rE)(n))throw new Error("Cannot use terminal rule in infix expression");const r=t.operators.precedences.flatMap(e=>e.operators),i={$type:"Group",elements:[]},s={$container:i,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call},a={$container:i,$type:"Group",elements:[],cardinality:"*"};i.elements.push(s,a);const c={$container:a,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:r}},l={...s,$container:a};a.elements.push(c,l);const u=r.map(t=>e.tokens[t.value]).map((t,n)=>({ALT:()=>e.parser.consume(n,t,c)}));let d;return t=>{d??(d=$e(e,n)),e.parser.subrule(0,d,!1,s,t),e.parser.many(0,{DEF:()=>{e.parser.alternatives(0,u),e.parser.subrule(1,d,!1,l,t)}})}}function Se(e,t,n=!1){let r;if((0,o.wb)(t))r=function(e,t){const n=e.consume++,r=e.tokens[t.value];if(!r)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(n,r,t)}(e,t);else if((0,o.ve)(t))r=function(e,t){const n=(0,i.Uz)(t);return()=>e.parser.action(n,t)}(e,t);else if((0,o.wh)(t))r=Se(e,t.terminal);else if((0,o._c)(t))r=Ae(e,t);else if((0,o.$g)(t))r=function(e,t){const n=t.rule.ref;if((0,o.cM)(n)){const r=e.subrule++,i=(0,o.s7)(n)&&n.fragment,s=t.arguments.length>0?function(e,t){if(t.some(e=>e.calledByName)){const e=t.map(e=>({parameterName:e.parameter?.ref?.name,predicate:Ce(e.value)}));return t=>{const n={};for(const{parameterName:r,predicate:i}of e)r&&(n[r]=i(t));return n}}{const n=t.map(e=>Ce(e.value));return t=>{const r={};for(let i=0;i<n.length;i++)if(i<e.parameters.length){const s=e.parameters[i].name,o=n[i];r[s]=o(t)}return r}}}(n,t.arguments):()=>({});let a;return o=>{a??(a=$e(e,n)),e.parser.subrule(r,a,i,t,s(o))}}if((0,o.rE)(n)){const r=e.consume++,i=we(e,n.name);return()=>e.parser.consume(r,i,t)}if(!n)throw new ve.WB(t.$cstNode,`Undefined rule: ${t.rule.$refText}`);(0,ve.dr)(n)}(e,t);else if((0,o.jp)(t))r=function(e,t){if(1===t.elements.length)return Se(e,t.elements[0]);{const n=[];for(const r of t.elements){const t={ALT:Se(e,r,!0)},i=xe(r);i&&(t.GATE=Ce(i)),n.push(t)}const r=e.or++;return t=>e.parser.alternatives(r,n.map(e=>{const n={ALT:()=>e.ALT(t)},r=e.GATE;return r&&(n.GATE=()=>r(t)),n}))}}(e,t);else if((0,o.cY)(t))r=function(e,t){if(1===t.elements.length)return Se(e,t.elements[0]);const n=[];for(const r of t.elements){const t={ALT:Se(e,r,!0)},i=xe(r);i&&(t.GATE=Ce(i)),n.push(t)}const r=e.or++,i=(e,t)=>`uGroup_${e}_${t.getRuleStack().join("-")}`,s=be(e,xe(t),t=>e.parser.alternatives(r,n.map((n,s)=>{const o={ALT:()=>!0},a=e.parser;o.ALT=()=>{if(n.ALT(t),!a.isRecording()){const e=i(r,a);a.unorderedGroups.get(e)||a.unorderedGroups.set(e,[]);const t=a.unorderedGroups.get(e);void 0===t?.[s]&&(t[s]=!0)}};const c=n.GATE;return o.GATE=c?()=>c(t):()=>{const e=a.unorderedGroups.get(i(r,a));return!e?.[s]},o})),"*");return t=>{s(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(r,e.parser))}}(e,t);else if((0,o.IZ)(t))r=function(e,t){const n=t.elements.map(t=>Se(e,t));return e=>n.forEach(t=>t(e))}(e,t);else{if(!(0,o.FO)(t))throw new ve.WB(t.$cstNode,`Unexpected element type: ${t.$type}`);{const n=e.consume++;r=()=>e.parser.consume(n,a.LT,t)}}return be(e,n?void 0:xe(t),r,t.cardinality)}function Ce(e){if((0,o.RP)(e)){const t=Ce(e.left),n=Ce(e.right);return e=>t(e)||n(e)}if((0,o.Tu)(e)){const t=Ce(e.left),n=Ce(e.right);return e=>t(e)&&n(e)}if((0,o.Ct)(e)){const t=Ce(e.value);return e=>!t(e)}if((0,o.TF)(e)){const t=e.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if((0,o.Cz)(e)){const t=Boolean(e.true);return()=>t}(0,ve.dr)(e)}function xe(e){if((0,o.IZ)(e))return e.guardCondition}function Ae(e,t,n=t.terminal){if(n){if((0,o.$g)(n)&&(0,o.s7)(n.rule.ref)){const r=n.rule.ref,i=e.subrule++;let s;return n=>{s??(s=$e(e,r)),e.parser.subrule(i,s,!1,t,n)}}if((0,o.$g)(n)&&(0,o.rE)(n.rule.ref)){const r=e.consume++,i=we(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}if((0,o.wb)(n)){const r=e.consume++,i=we(e,n.value);return()=>e.parser.consume(r,i,t)}throw new Error("Could not build cross reference parser")}{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);const n=(0,i.U5)(t.type.ref),r=n?.terminal;if(!r)throw new Error("Could not find name assignment for type: "+(0,i.Uz)(t.type.ref));return Ae(e,t,r)}}function be(e,t,n,r){const i=t&&Ce(t);if(!r){if(i){const t=e.or++;return r=>e.parser.alternatives(t,[{ALT:()=>n(r),GATE:()=>i(r)},{ALT:(0,a.mT)(),GATE:()=>!i(r)}])}return n}if("*"===r){const t=e.many++;return r=>e.parser.many(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}if("+"===r){const t=e.many++;if(i){const r=e.or++;return s=>e.parser.alternatives(r,[{ALT:()=>e.parser.atLeastOne(t,{DEF:()=>n(s)}),GATE:()=>i(s)},{ALT:(0,a.mT)(),GATE:()=>!i(s)}])}return r=>e.parser.atLeastOne(t,{DEF:()=>n(r)})}if("?"===r){const t=e.optional++;return r=>e.parser.optional(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}(0,ve.dr)(r)}function $e(e,t){const n=function(e,t){if((0,o.cM)(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let n=t,r=n.$container,i=t.$type;for(;!(0,o.s7)(r);)((0,o.IZ)(r)||(0,o.jp)(r)||(0,o.cY)(r))&&(i=r.elements.indexOf(n).toString()+":"+i),n=r,r=r.$container;return i=r.name+":"+i,e.ruleNames.set(t,i),i}}(e,t),r=e.parser.getRule(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function we(e,t){const n=e.tokens[t];if(!n)throw new Error(`Token "${t}" not found."`);return n}var Ne=n(4326),Ie=n(5033),_e=n(9850),Pe=n(2479);let Le=0;const Oe=Symbol("OperationCancelled");function De(e){return e===Oe}async function Me(e){if(e===_e.CancellationToken.None)return;const t=performance.now();if(t-Le>=10&&(Le=t,await new Promise(e=>{"undefined"==typeof setImmediate?setTimeout(e,0):setImmediate(e)}),Le=performance.now()),e.isCancellationRequested)throw Oe}class Fe{constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}}class qe{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(const t of e)if(qe.isIncremental(t)){const e=Be(t.range),n=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,n)+t.text+this._content.substring(r,this._content.length);const i=Math.max(e.start.line,0),s=Math.max(e.end.line,0);let o=this._lineOffsets;const a=Ge(t.text,!1,n);if(s-i===a.length)for(let e=0,t=a.length;e<t;e++)o[e+i+1]=a[e];else a.length<1e4?o.splice(i+1,s-i,...a):this._lineOffsets=o=o.slice(0,i+1).concat(a,o.slice(s+1));const c=t.text.length-(r-n);if(0!==c)for(let e=i+1+a.length,t=o.length;e<t;e++)o[e]=o[e]+c}else{if(!qe.isFull(t))throw new Error("Unknown change event received");this._content=t.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=Ge(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let n=0,r=t.length;if(0===r)return{line:0,character:e};for(;n<r;){const i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}const i=n-1;return{line:i,character:(e=this.ensureBeforeEOL(e,t[i]))-t[i]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line];if(e.character<=0)return n;const r=e.line+1<t.length?t[e.line+1]:this._content.length,i=Math.min(n+e.character,r);return this.ensureBeforeEOL(i,n)}ensureBeforeEOL(e,t){for(;e>t&&ze(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}var je;function Ue(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Ue(r,t),Ue(i,t);let s=0,o=0,a=0;for(;s<r.length&&o<i.length;){const n=t(r[s],i[o]);e[a++]=n<=0?r[s++]:i[o++]}for(;s<r.length;)e[a++]=r[s++];for(;o<i.length;)e[a++]=i[o++];return e}function Ge(e,t,n=0){const r=t?[n]:[];for(let t=0;t<e.length;t++){const i=e.charCodeAt(t);ze(i)&&(13===i&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,r.push(n+t+1))}return r}function ze(e){return 13===e||10===e}function Be(e){const t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Ke(e){const t=Be(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new qe(e,t,n,r)},e.update=function(e,t,n){if(e instanceof qe)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){const n=e.getText(),r=Ue(t.map(Ke),(e,t)=>{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n});let i=0;const s=[];for(const t of r){const r=e.offsetAt(t.range.start);if(r<i)throw new Error("Overlapping edit");r>i&&s.push(n.substring(i,r)),t.newText.length&&s.push(t.newText),i=e.offsetAt(t.range.end)}return s.push(n.substr(i)),s.join("")}}(je||(je={}));var We,Ve,He=n(7608);!function(e){e.basename=He.A.basename,e.dirname=He.A.dirname,e.extname=He.A.extname,e.joinPath=He.A.joinPath,e.resolvePath=He.A.resolvePath;const t="object"==typeof process&&"win32"===process?.platform;e.equals=function(e,t){return e?.toString()===t?.toString()},e.relative=function(e,n){const r="string"==typeof e?He.r.parse(e).path:e.path,i="string"==typeof n?He.r.parse(n).path:n.path,s=r.split("/").filter(e=>e.length>0),o=i.split("/").filter(e=>e.length>0);if(t){const e=/^[A-Z]:$/;if(s[0]&&e.test(s[0])&&(s[0]=s[0].toLowerCase()),o[0]&&e.test(o[0])&&(o[0]=o[0].toLowerCase()),s[0]!==o[0])return i.substring(1)}let a=0;for(;a<s.length&&s[a]===o[a];a++);return"../".repeat(s.length-a)+o.slice(a).join("/")},e.normalize=function(e){return He.r.parse(e.toString()).toString()},e.contains=function(e,t){let n="string"==typeof e?e:e.path,r="string"==typeof t?t:t.path;return"/"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),"/"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),r===n||!(r.length<n.length)&&"/"===r.charAt(n.length)&&r.startsWith(n)}}(We||(We={}));class Ye{constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return We.normalize(e)}clear(){this.root.children.clear()}insert(e,t){this.getNode(this.normalizeUri(e),!0).element=t}delete(e){const t=this.getNode(this.normalizeUri(e),!1);t?.parent&&t.parent.children.delete(t.name)}has(e){return void 0!==this.getNode(this.normalizeUri(e),!1)?.element}hasNode(e){return void 0!==this.getNode(this.normalizeUri(e),!1)}find(e){return this.getNode(this.normalizeUri(e),!1)?.element}findNode(e){const t=this.normalizeUri(e),n=this.getNode(t,!1);if(n)return{name:n.name,uri:We.joinPath(He.r.parse(t),n.name).toString(),element:n.element}}findChildren(e){const t=this.normalizeUri(e),n=this.getNode(t,!1);return n?Array.from(n.children.values()).map(e=>({name:e.name,uri:We.joinPath(He.r.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){const t=this.getNode(We.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){const n=e.split("/");"/"===e.charAt(e.length-1)&&n.pop();let r=this.root;for(const e of n){let n=r.children.get(e);if(!n){if(!t)return;n={name:e,children:new Map,parent:r},r.children.set(e,n)}r=n}return r}collectValues(e){const t=[];e.element&&t.push(e.element);for(const n of e.children.values())t.push(...this.collectValues(n));return t}}!function(e){e[e.Changed=0]="Changed",e[e.Parsed=1]="Parsed",e[e.IndexedContent=2]="IndexedContent",e[e.ComputedScopes=3]="ComputedScopes",e[e.Linked=4]="Linked",e[e.IndexedReferences=5]="IndexedReferences",e[e.Validated=6]="Validated"}(Ve||(Ve={}));class Xe{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=_e.CancellationToken.None){const n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,t)}fromTextDocument(e,t,n){return t=t??He.r.parse(e.uri),_e.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromString(e,t,n){return _e.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,n){if("string"==typeof t){const r=this.parse(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}if("$model"in t){const n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}{const r=this.parse(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}async createAsync(e,t,n){if("string"==typeof t){const r=await this.parseAsync(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}{const r=await this.parseAsync(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}createLangiumDocument(e,t,n,r){let i;if(n)i={parseResult:e,uri:t,state:Ve.Parsed,references:[],textDocument:n};else{const n=this.createTextDocumentGetter(t,r);i={parseResult:e,uri:t,state:Ve.Parsed,references:[],get textDocument(){return n()}}}return e.value.$document=i,i}async update(e,t){const n=e.parseResult.value.$cstNode?.root.fullText,r=this.textDocuments?.get(e.uri.toString()),i=r?r.getText():await this.fileSystemProvider.readFile(e.uri);if(r)Object.defineProperty(e,"textDocument",{value:r});else{const t=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,"textDocument",{get:t})}return n!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=Ve.Parsed,e}parse(e,t,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,n)}parseAsync(e,t,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,n)}createTextDocumentGetter(e,t){const n=this.serviceRegistry;let r;return()=>r??(r=je.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,t??""))}}class Qe{constructor(e){this.documentTrie=new Ye,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return(0,Re.Td)(this.documentTrie.all())}addDocument(e){const t=e.uri.toString();if(this.documentTrie.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){const t=e.toString();return this.documentTrie.find(t)}getDocuments(e){const t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(n),n)}createDocument(e,t,n){if(n)return this.langiumDocumentFactory.fromString(t,e,n).then(e=>(this.addDocument(e),e));{const n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){const t=e.toString(),n=this.documentTrie.find(t);return n&&this.documentBuilder().resetToState(n,Ve.Changed),n}deleteDocument(e){const t=e.toString(),n=this.documentTrie.find(t);return n&&(n.state=Ve.Changed,this.documentTrie.delete(t)),n}deleteDocuments(e){const t=e.toString(),n=this.documentTrie.findAll(t);for(const e of n)e.state=Ve.Changed;return this.documentTrie.delete(t),n}}const Je=Symbol("RefResolving");class Ze{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=_e.CancellationToken.None){if(this.profiler?.isActive("linking")){const n=this.profiler.createTask("linking",this.languageId);n.start();try{for(const r of(0,ee.jm)(e.parseResult.value))await Me(t),(0,ee.DM)(r).forEach(t=>{const i=`${r.$type}:${t.property}`;n.startSubTask(i);try{this.doLink(t,e)}finally{n.stopSubTask(i)}})}finally{n.stop()}}else for(const n of(0,ee.jm)(e.parseResult.value))await Me(t),(0,ee.DM)(n).forEach(t=>this.doLink(t,e))}doLink(e,t){const n=e.reference;if("_ref"in n&&void 0===n._ref){n._ref=Je;try{const t=this.getCandidate(e);if((0,Pe.Zl)(t))n._ref=t;else{n._nodeDescription=t;const r=this.loadAstNode(t);n._ref=r??this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${n.$refText}':`,t);const r=t.message??String(t);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${r}`}}t.references.push(n)}else if("_items"in n&&void 0===n._items){n._items=Je;try{const t=this.getCandidates(e),r=[];if((0,Pe.Zl)(t))n._linkingError=t;else for(const e of t){const t=this.loadAstNode(e);t&&r.push({ref:t,$nodeDescription:e})}n._items=r}catch(t){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${t}`},n._items=[]}t.references.push(n)}}unlink(e){for(const t of e.references)"_ref"in t?(t._ref=void 0,delete t._nodeDescription):"_items"in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){const t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>`${e.documentUri}#${e.path}`).toArray();return t.length>0?t:this.createLinkingError(e)}buildReference(e,t,n,r){const i=this,s={$refNode:n,$refText:r,_ref:void 0,get ref(){if((0,Pe.ng)(this._ref))return this._ref;if((0,Pe.Nr)(this._nodeDescription)){const n=i.loadAstNode(this._nodeDescription);this._ref=n??i.createLinkingError({reference:s,container:e,property:t},this._nodeDescription)}else if(void 0===this._ref){this._ref=Je;const n=(0,ee.cQ)(e).$document,r=i.getLinkedNode({reference:s,container:e,property:t});if(r.error&&n&&n.state<Ve.ComputedScopes)return this._ref=void 0;this._ref=r.node??r.error,this._nodeDescription=r.descr,n?.references.push(this)}else this._ref===Je&&i.throwCyclicReferenceError(e,t,r);return(0,Pe.ng)(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return(0,Pe.Zl)(this._ref)?this._ref:void 0}};return s}buildMultiReference(e,t,n,r){const i=this,s={$refNode:n,$refText:r,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(void 0===this._items){this._items=Je;const n=(0,ee.cQ)(e).$document,r=i.getCandidates({reference:s,container:e,property:t}),o=[];if((0,Pe.Zl)(r))this._linkingError=r;else for(const e of r){const t=i.loadAstNode(e);t&&o.push({ref:t,$nodeDescription:e})}this._items=o,n?.references.push(this)}else this._items===Je&&i.throwCyclicReferenceError(e,t,r);return Array.isArray(this._items)?this._items:[]},get error(){return this._linkingError?this._linkingError:this.items.length>0?void 0:this._linkingError=i.createLinkingError({reference:s,container:e,property:t})}};return s}throwCyclicReferenceError(e,t,n){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${n}')`)}getLinkedNode(e){try{const t=this.getCandidate(e);if((0,Pe.Zl)(t))return{error:t};const n=this.loadAstNode(t);return n?{node:n,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);const n=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${n}`}}}}loadAstNode(e){if(e.node)return e.node;const t=this.langiumDocuments().getDocument(e.documentUri);return t?this.astNodeLocator.getAstNode(t.parseResult.value,e.path):void 0}createLinkingError(e,t){const n=(0,ee.cQ)(e.container).$document;return n&&n.state<Ve.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`),{info:e,message:`Could not resolve reference to ${this.reflection.getReferenceType(e)} named '${e.reference.$refText}'.`,targetDescription:t}}}class et{getName(e){if(function(e){return"string"==typeof e.name}(e))return e.name}getNameNode(e){return(0,i.qO)(e.$cstNode,"name")}}class tt{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator,this.documents=e.shared.workspace.LangiumDocuments,this.hasMultiReference=(0,ee.jm)(e.Grammar).some(e=>(0,o._c)(e)&&e.isMulti)}findDeclarations(e){if(e){const t=(0,i.Rp)(e),n=e.astNode;if(t&&n){const r=n[t.feature];if((0,Pe.A_)(r)||(0,Pe.Dm)(r))return(0,ee.tC)(r);if(Array.isArray(r))for(const t of r)if(((0,Pe.A_)(t)||(0,Pe.Dm)(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return(0,ee.tC)(t)}if(n){const t=this.nameProvider.getNameNode(n);if(t&&(t===e||(0,r.pO)(e,t)))return this.getSelfNodes(n)}}return[]}getSelfNodes(e){if(this.hasMultiReference){const t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),n=this.getNodeFromReferenceDescription(t.head());if(n)for(const t of(0,ee.DM)(n))if((0,Pe.Dm)(t.reference)&&t.reference.items.some(t=>t.ref===e))return t.reference.items.map(e=>e.ref);return[e]}return[e]}getNodeFromReferenceDescription(e){if(!e)return;const t=this.documents.getDocument(e.sourceUri);return t?this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath):void 0}findDeclarationNodes(e){const t=this.findDeclarations(e),n=[];for(const e of t){const t=this.nameProvider.getNameNode(e)??e.$cstNode;t&&n.push(t)}return n}findReferences(e,t){const n=[];t.includeDeclaration&&n.push(...this.getSelfReferences(e));let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(r=r.filter(e=>We.equals(e.sourceUri,t.documentUri))),n.push(...r),(0,Re.Td)(n)}getSelfReferences(e){const t=this.getSelfNodes(e),n=[];for(const e of t){const t=this.nameProvider.getNameNode(e);if(t){const i=(0,ee.YE)(e),s=this.nodeLocator.getAstNodePath(e);n.push({sourceUri:i.uri,sourcePath:s,targetUri:i.uri,targetPath:s,segment:(0,r.SX)(t),local:!0})}}return n}}class nt{constructor(e){if(this.map=new Map,e)for(const[t,n]of e)this.add(t,n)}get size(){return Re.iD.sum((0,Re.Td)(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(void 0===t)return this.map.delete(e);{const n=this.map.get(e);if(n){const r=n.indexOf(t);if(r>=0)return 1===n.length?this.map.delete(e):n.splice(r,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){const t=this.map.get(e);return t?(0,Re.Td)(t):Re.B5}has(e,t){if(void 0===t)return this.map.has(e);{const n=this.map.get(e);return!!n&&n.indexOf(t)>=0}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,n)=>t.forEach(t=>e(t,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return(0,Re.Td)(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return(0,Re.Td)(this.map.keys())}values(){return(0,Re.Td)(this.map.values()).flat()}entriesGroupedByKey(){return(0,Re.Td)(this.map.entries())}}class rt{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[t,n]of e)this.set(t,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.inverse.delete(t),!0)}}class it{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=_e.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,n=ee.VN,r=_e.CancellationToken.None){const i=[];this.addExportedSymbol(e,i,t);for(const s of n(e))await Me(r),this.addExportedSymbol(s,i,t);return i}addExportedSymbol(e,t,n){const r=this.nameProvider.getName(e);r&&t.push(this.descriptions.createDescription(e,r,n))}async collectLocalSymbols(e,t=_e.CancellationToken.None){const n=e.parseResult.value,r=new nt;for(const i of(0,ee.Uo)(n))await Me(t),this.addLocalSymbol(i,e,r);return r}addLocalSymbol(e,t,n){const r=e.$container;if(r){const i=this.nameProvider.getName(e);i&&n.add(r,this.descriptions.createDescription(e,i,t))}}}class st{constructor(e,t,n){this.elements=e,this.outerScope=t,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e;return(this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t):this.elements.find(t=>t.name===e))||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===t):this.elements.filter(t=>t.name===e);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(e)):n}}class ot{constructor(e,t,n){this.elements=new nt,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(const t of e){const e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.add(e,t)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e;return this.elements.get(t)[0]||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);return(this.concatOuterScope||0===n.length)&&this.outerScope?(0,Re.Td)(n).concat(this.outerScope.getElements(e)):(0,Re.Td)(n)}getAllElements(){let e=(0,Re.Td)(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}class at{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}}class ct extends at{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){const n=t();return this.cache.set(e,n),n}}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}}class lt extends at{constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed(),this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();const r=this.cacheForContext(e);if(r.has(t))return r.get(t);if(n){const e=n();return r.set(t,e),e}}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){const t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){const t=this.converter(e);let n=this.cache.get(t);return n||(n=new Map,this.cache.set(t,n)),n}}class ut extends ct{constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{t.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}class dt{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new ut(e.shared)}getScope(e){const t=[],n=this.reflection.getReferenceType(e),r=(0,ee.YE)(e.container).localSymbols;if(r){let i=e.container;do{r.has(i)&&t.push(r.getStream(i).filter(e=>this.reflection.isSubtype(e.type,n))),i=i.$container}while(i)}let i=this.getGlobalScope(n,e);for(let e=t.length-1;e>=0;e--)i=this.createScope(t[e],i);return i}createScope(e,t,n){return new st((0,Re.Td)(e),t,n)}createScopeForNodes(e,t,n){const r=(0,Re.Td)(e).map(e=>{const t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable();return new st(r,t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new ot(this.indexManager.allElements(e)))}}function ht(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}class pt{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){const n=t??{},r=t?.replacer,i=(e,t)=>this.replacer(e,t,n),s=r?(e,t)=>r(e,t,i):i;try{return this.currentDocument=(0,ee.YE)(e),JSON.stringify(e,s,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){const n=t??{},r=JSON.parse(e);return this.linkNode(r,r,n),r}replacer(e,t,{refText:n,sourceText:r,textRegions:i,comments:s,uriConverter:o}){if(!this.ignoreProperties.has(e)){if((0,Pe.A_)(t)){const e=t.ref,r=n?t.$refText:void 0;if(e){const t=(0,ee.YE)(e);let n="";return this.currentDocument&&this.currentDocument!==t&&(n=o?o(t.uri,e):t.uri.toString()),{$ref:`${n}#${this.astNodeLocator.getAstNodePath(e)}`,$refText:r}}return{$error:t.error?.message??"Could not resolve reference",$refText:r}}if((0,Pe.Dm)(t)){const e=n?t.$refText:void 0,r=[];for(const e of t.items){const t=e.ref,n=(0,ee.YE)(e.ref);let i="";this.currentDocument&&this.currentDocument!==n&&(i=o?o(n.uri,t):n.uri.toString());const s=this.astNodeLocator.getAstNodePath(t);r.push(`${i}#${s}`)}return{$refs:r,$refText:e}}if((0,Pe.ng)(t)){let n;if(i&&(n=this.addAstNodeRegionWithAssignmentsTo({...t}),e&&!t.$document||!n?.$textRegion||(n.$textRegion.documentURI=this.currentDocument?.uri.toString())),r&&!e&&(n??(n={...t}),n.$sourceText=t.$cstNode?.text),s){n??(n={...t});const e=this.commentProvider.getComment(t);e&&(n.$comment=e.replace(/\r/g,""))}return n??t}return t}}addAstNodeRegionWithAssignmentsTo(e){const t=e=>({offset:e.offset,end:e.end,length:e.length,range:e.range});if(e.$cstNode){const n=(e.$textRegion=t(e.$cstNode)).assignments={};return Object.keys(e).filter(e=>!e.startsWith("$")).forEach(r=>{const s=(0,i.Bd)(e.$cstNode,r).map(t);0!==s.length&&(n[r]=s)}),e}}linkNode(e,t,n,r,i,s){for(const[r,i]of Object.entries(e))if(Array.isArray(i))for(let s=0;s<i.length;s++){const o=i[s];ht(o)?i[s]=this.reviveReference(e,r,t,o,n):(0,Pe.ng)(o)&&this.linkNode(o,t,n,e,r,s)}else ht(i)?e[r]=this.reviveReference(e,r,t,i,n):(0,Pe.ng)(i)&&this.linkNode(i,t,n,e,r);const o=e;o.$container=r,o.$containerProperty=i,o.$containerIndex=s}reviveReference(e,t,n,r,i){let s,o=r.$refText,a=r.$error;if(r.$ref){const e=this.getRefNode(n,r.$ref,i.uriConverter);if((0,Pe.ng)(e))return o||(o=this.nameProvider.getName(e)),{$refText:o??"",ref:e};a=e}else if(r.$refs){const e=[];for(const t of r.$refs){const r=this.getRefNode(n,t,i.uriConverter);(0,Pe.ng)(r)&&e.push({ref:r})}if(0!==e.length)return{$refText:o??"",items:e};s={$refText:o??"",items:e},a??(a="Could not resolve multi-reference")}return a?(s??(s={$refText:o??"",ref:void 0}),s.error={info:{container:e,property:t,reference:s},message:a},s):void 0}getRefNode(e,t,n){try{const r=t.indexOf("#");if(0===r){return this.astNodeLocator.getAstNode(e,t.substring(1))||"Could not resolve path: "+t}if(r<0){const e=n?n(t):He.r.parse(t),r=this.langiumDocuments.getDocument(e);return r?r.parseResult.value:"Could not find document for URI: "+t}const i=n?n(t.substring(0,r)):He.r.parse(t.substring(0,r)),s=this.langiumDocuments.getDocument(i);if(!s)return"Could not find document for URI: "+t;if(r===t.length-1)return s.parseResult.value;return this.astNodeLocator.getAstNode(s.parseResult.value,t.substring(r+1))||"Could not resolve URI: "+t}catch(e){return String(e)}}}class ft{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=e?.workspace.TextDocuments}register(e){const t=e.LanguageMetaData;for(const n of t.fileExtensions)this.fileExtensionMap.has(n)&&console.warn(`The file extension ${n} is used by multiple languages. It is now assigned to '${t.languageId}'.`),this.fileExtensionMap.set(n,e);if(t.fileNames)for(const n of t.fileNames)this.fileNameMap.has(n)&&console.warn(`The file name ${n} is used by multiple languages. It is now assigned to '${t.languageId}'.`),this.fileNameMap.set(n,e);this.languageIdMap.set(t.languageId,e)}getServices(e){if(0===this.languageIdMap.size)throw new Error("The service registry is empty. Use `register` to register the services of a language.");const t=this.textDocuments?.get(e)?.languageId;if(void 0!==t){const e=this.languageIdMap.get(t);if(e)return e}const n=We.extname(e),r=We.basename(e),i=this.fileNameMap.get(r)??this.fileExtensionMap.get(n);if(!i)throw t?new Error(`The service registry contains no services for the extension '${n}' for language '${t}'.`):new Error(`The service registry contains no services for the extension '${n}'.`);return i}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}function mt(e){return{code:e}}var gt;!function(e){e.defaults=["fast","slow","built-in"],e.all=e.defaults}(gt||(gt={}));class yt{constructor(e){this.entries=new nt,this.knownCategories=new Set(gt.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,t=this,n="fast"){if("built-in"===n)throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");this.knownCategories.add(n);for(const[r,i]of Object.entries(e)){const e=i;if(Array.isArray(e))for(const i of e){const e={check:this.wrapValidationException(i,t),category:n};this.addEntry(r,e)}else if("function"==typeof e){const i={check:this.wrapValidationException(e,t),category:n};this.addEntry(r,i)}else(0,ve.dr)(e)}}wrapValidationException(e,t){return async(n,r,i)=>{await this.handleException(()=>e.call(t,n,r,i),"An error occurred during validation",r,n)}}async handleException(e,t,n,r){try{await e()}catch(e){if(De(e))throw e;console.error(`${t}:`,e),e instanceof Error&&e.stack&&console.error(e.stack),n("error",`${t}: ${e instanceof Error?e.message:String(e)}`,{node:r})}}addEntry(e,t){if("AstNode"!==e)for(const n of this.reflection.getAllSubTypes(e))this.entries.add(n,t);else this.entries.add("AstNode",t)}getChecks(e,t){let n=(0,Re.Td)(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(n=n.filter(e=>t.includes(e.category))),n.map(e=>e.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",t))}wrapPreparationException(e,t,n){return async(r,i,s,o)=>{await this.handleException(()=>e.call(n,r,i,s,o),t,i,r)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}}const Tt=Object.freeze({validateNode:!0,validateChildren:!0});class vt{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},n=_e.CancellationToken.None){const r=e.parseResult,i=[];if(await Me(n),!t.categories||t.categories.includes("built-in")){if(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some(e=>e.data?.code===St.LexingError))return i;if(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some(e=>e.data?.code===St.ParsingError))return i;if(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>e.data?.code===St.LinkingError))return i}try{i.push(...await this.validateAst(r.value,t,n))}catch(e){if(De(e))throw e;console.error("An error occurred during validation:",e)}return await Me(n),i}processLexingErrors(e,t,n){const r=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(const e of r){const n=e.severity??"error",r={severity:Et(n),range:{start:{line:e.line-1,character:e.column-1},end:{line:e.line-1,character:e.column+e.length-1}},message:e.message,data:kt(n),source:this.getSource()};t.push(r)}}processParsingErrors(e,t,n){for(const n of e.parserErrors){let e;if(isNaN(n.token.startOffset)){if("previousToken"in n){const t=n.previousToken;if(isNaN(t.startOffset)){const t={line:0,character:0};e={start:t,end:t}}else{const n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}}}else e=(0,r.wf)(n.token);if(e){const r={severity:Et("error"),range:e,message:n.message,data:mt(St.ParsingError),source:this.getSource()};t.push(r)}}}processLinkingErrors(e,t,n){for(const n of e.references){const e=n.error;if(e){const r={node:e.info.container,range:n.$refNode?.range,property:e.info.property,index:e.info.index,data:{code:St.LinkingError,containerType:e.info.container.$type,property:e.info.property,refText:e.info.reference.$refText}};t.push(this.toDiagnostic("error",e.message,r))}}}async validateAst(e,t,n=_e.CancellationToken.None){const r=[],i=(e,t,n)=>{r.push(this.toDiagnostic(e,t,n))};return await this.validateAstBefore(e,t,i,n),await this.validateAstNodes(e,t,i,n),await this.validateAstAfter(e,t,i,n),r}async validateAstBefore(e,t,n,r=_e.CancellationToken.None){const i=this.validationRegistry.checksBefore;for(const s of i)await Me(r),await s(e,n,t.categories??[],r)}async validateAstNodes(e,t,n,r=_e.CancellationToken.None){if(this.profiler?.isActive("validating")){const i=this.profiler.createTask("validating",this.languageId);i.start();try{const s=(0,ee.jm)(e).iterator();for(const e of s){i.startSubTask(e.$type);const o=this.validateSingleNodeOptions(e,t);if(o.validateNode)try{const i=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of i)await t(e,n,r)}finally{i.stopSubTask(e.$type)}o.validateChildren||s.prune()}}finally{i.stop()}}else{const i=(0,ee.jm)(e).iterator();for(const e of i){await Me(r);const s=this.validateSingleNodeOptions(e,t);if(s.validateNode){const i=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of i)await t(e,n,r)}s.validateChildren||i.prune()}}}validateSingleNodeOptions(e,t){return Tt}async validateAstAfter(e,t,n,r=_e.CancellationToken.None){const i=this.validationRegistry.checksAfter;for(const s of i)await Me(r),await s(e,n,t.categories??[],r)}toDiagnostic(e,t,n){return{message:t,range:Rt(n),severity:Et(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function Rt(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=(0,i.qO)(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=(0,i.SS)(e.node.$cstNode,e.keyword,e.index)),t??(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Et(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}function kt(e){switch(e){case"error":return mt(St.LexingError);case"warning":return mt(St.LexingWarning);case"info":return mt(St.LexingInfo);case"hint":return mt(St.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}var St;!function(e){e.LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"}(St||(St={}));class Ct{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n){const i=n??(0,ee.YE)(e);t??(t=this.nameProvider.getName(e));const s=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${s} has no name.`);let o;const a=()=>o??(o=(0,r.SX)(this.nameProvider.getNameNode(e)??e.$cstNode));return{node:e,name:t,get nameSegment(){return a()},selectionSegment:(0,r.SX)(e.$cstNode),type:e.$type,documentUri:i.uri,path:s}}}class xt{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=_e.CancellationToken.None){const n=[],r=e.parseResult.value;for(const e of(0,ee.jm)(r))await Me(t),(0,ee.DM)(e).forEach(e=>{e.reference.error||n.push(...this.createInfoDescriptions(e))});return n}createInfoDescriptions(e){const t=e.reference;if(t.error||!t.$refNode)return[];let n=[];(0,Pe.A_)(t)&&t.$nodeDescription?n=[t.$nodeDescription]:(0,Pe.Dm)(t)&&(n=t.items.map(e=>e.$nodeDescription).filter(e=>void 0!==e));const i=(0,ee.YE)(e.container).uri,s=this.nodeLocator.getAstNodePath(e.container),o=[],a=(0,r.SX)(t.$refNode);for(const e of n)o.push({sourceUri:i,sourcePath:s,targetUri:e.documentUri,targetPath:e.path,segment:a,local:We.equals(e.documentUri,i)});return o}}class At{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return t+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return void 0!==t?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{if(!e||0===t.length)return e;const n=t.indexOf(this.indexSeparator);if(n>0){const r=t.substring(0,n),i=parseInt(t.substring(n+1)),s=e[r];return s?.[i]}return e[t]},e)}}var bt=n(2676);class $t{constructor(e){this._ready=new Fe,this.onConfigurationSectionUpdateEmitter=new bt.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(t);t.forEach((e,t)=>{this.updateSectionConfiguration(e.section,n[t])})}}this._ready.resolve()}updateConfiguration(e){"object"==typeof e.settings&&null!==e.settings&&Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const n=this.toSectionName(e);if(this.settings[n])return this.settings[n][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}var wt,Nt=n(4512);!function(e){e.create=function(e){return{dispose:async()=>await e()}}}(wt||(wt={}));class It{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new nt,this.documentPhaseListeners=new nt,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Ve.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=_e.CancellationToken.None){for(const n of e){const e=n.uri.toString();if(n.state===Ve.Validated){if("boolean"==typeof t.validation&&t.validation)this.resetToState(n,Ve.IndexedReferences);else if("object"==typeof t.validation){const r=this.findMissingValidationCategories(n,t);r.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:{categories:r}},result:this.buildState.get(e)?.result}),n.state=Ve.IndexedReferences)}}else this.buildState.delete(e)}this.currentState=Ve.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=_e.CancellationToken.None){this.currentState=Ve.Changed;const r=[];for(const e of t){const t=this.langiumDocuments.deleteDocuments(e);for(const e of t)r.push(e.uri),this.cleanUpDeleted(e)}const i=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat();for(const e of i){let t=this.langiumDocuments.getDocument(e);void 0===t&&(t=this.langiumDocumentFactory.fromModel({$type:"INVALID"},e),t.state=Ve.Changed,this.langiumDocuments.addDocument(t)),this.resetToState(t,Ve.Changed)}const s=(0,Re.Td)(i).concat(r).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!s.has(e.uri.toString())&&this.shouldRelink(e,s)).forEach(e=>this.resetToState(e,Ve.ComputedScopes)),await this.emitUpdate(i,r),await Me(n);const o=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state<Ve.Validated||!this.buildState.get(e.uri.toString())?.completed||this.resultsAreIncomplete(e,this.updateBuildOptions)).toArray());await this.buildDocuments(o,this.updateBuildOptions,n)}resultsAreIncomplete(e,t){return this.findMissingValidationCategories(e,t).length>=1}findMissingValidationCategories(e,t){const n=this.buildState.get(e.uri.toString()),r=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=n?.result?.validationChecks?new Set(n?.result?.validationChecks):n?.completed?r:new Set,s=void 0===t||!0===t.validation?r:"object"==typeof t.validation?t.validation.categories??r:[];return(0,Re.Td)(s).filter(e=>!i.has(e)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{const t=await this.fileSystemProvider.stat(e);if(t.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(t))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(n=>n(e,t)))}sortDocuments(e){let t=0,n=e.length-1;for(;t<n;){for(;t<e.length&&this.hasTextDocument(e[t]);)t++;for(;n>=0&&!this.hasTextDocument(e[n]);)n--;t<n&&([e[t],e[n]]=[e[n],e[t]])}return e}hasTextDocument(e){return Boolean(this.textDocuments?.get(e.uri))}shouldRelink(e,t){return!!e.references.some(e=>void 0!==e.error)||this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),wt.create(()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case Ve.Changed:case Ve.Parsed:this.indexManager.removeContent(e.uri);case Ve.IndexedContent:e.localSymbols=void 0;case Ve.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case Ve.Linked:this.indexManager.removeReferences(e.uri);case Ve.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case Ve.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=Ve.Changed}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,Ve.Parsed,n,e=>this.langiumDocumentFactory.update(e,n)),await this.runCancelable(e,Ve.IndexedContent,n,e=>this.indexManager.updateContent(e,n)),await this.runCancelable(e,Ve.ComputedScopes,n,async e=>{const t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.localSymbols=await t.collectLocalSymbols(e,n)});const r=e.filter(e=>this.shouldLink(e));await this.runCancelable(r,Ve.Linked,n,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n)),await this.runCancelable(r,Ve.IndexedReferences,n,e=>this.indexManager.updateReferences(e,n));const i=e.filter(e=>!!this.shouldValidate(e)||(this.markAsCompleted(e),!1));await this.runCancelable(i,Ve.Validated,n,async e=>{await this.validate(e,n),this.markAsCompleted(e)})}markAsCompleted(e){const t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(const n of e){const e=n.uri.toString(),r=this.buildState.get(e);r&&!r.completed||this.buildState.set(e,{completed:!1,options:t,result:r?.result})}}async runCancelable(e,t,n,r){for(const i of e)i.state<t&&(await Me(n),await r(i),i.state=t,await this.notifyDocumentPhase(i,t,n));const i=e.filter(e=>e.state===t);await this.notifyBuildPhase(i,t,n),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),wt.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),wt.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,n){let r;return t&&"path"in t?r=t:n=t,n??(n=_e.CancellationToken.None),r?this.awaitDocumentState(e,r,n):this.awaitBuilderState(e,n)}awaitDocumentState(e,t,n){const r=this.langiumDocuments.getDocument(t);return r?r.state>=e?Promise.resolve(t):n.isCancellationRequested?Promise.reject(Oe):this.currentState>=e&&e>r.state?Promise.reject(new Nt.ResponseError(Nt.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${Ve[r.state]}, requiring ${Ve[e]}, but workspace state is already ${Ve[this.currentState]}. Returning undefined.`)):new Promise((r,i)=>{const s=this.onDocumentPhase(e,e=>{We.equals(e.uri,t)&&(s.dispose(),o.dispose(),r(e.uri))}),o=n.onCancellationRequested(()=>{s.dispose(),o.dispose(),i(Oe)})}):Promise.reject(new Nt.ResponseError(Nt.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(Oe):new Promise((n,r)=>{const i=this.onBuildPhase(e,()=>{i.dispose(),s.dispose(),n()}),s=t.onCancellationRequested(()=>{i.dispose(),s.dispose(),r(Oe)})})}async notifyDocumentPhase(e,t,n){const r=this.documentPhaseListeners.get(t).slice();for(const t of r)try{await Me(n),await t(e,n)}catch(e){if(!De(e))throw e}}async notifyBuildPhase(e,t,n){if(0===e.length)return;const r=this.buildPhaseListeners.get(t).slice();for(const t of r)await Me(n),await t(e,n)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return Boolean(this.getBuildOptions(e).validation)}async validate(e,t){const n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,r=this.getBuildOptions(e),i="object"==typeof r.validation?{...r.validation}:{};i.categories=this.findMissingValidationCategories(e,r);const s=await n.validateDocument(e,i,t);e.diagnostics?e.diagnostics.push(...s):e.diagnostics=s;const o=this.buildState.get(e.uri.toString());o&&(o.result??(o.result={}),o.result.validationChecks?o.result.validationChecks=(0,Re.Td)(o.result.validationChecks).concat(i.categories).distinct().toArray():o.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}}class _t{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new lt,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const n=(0,ee.YE)(e).uri,r=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{We.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)})}),(0,Re.Td)(r)}allElements(e,t){let n=(0,Re.Td)(this.symbolIndex.keys());return t&&(n=n.filter(e=>!t||t.has(e))),n.map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){const t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){const t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=_e.CancellationToken.None){const n=this.serviceRegistry.getServices(e.uri),r=await n.references.ScopeComputation.collectExportedSymbols(e,t),i=e.uri.toString();this.symbolIndex.set(i,r),this.symbolByTypeIndex.clear(i)}async updateReferences(e,t=_e.CancellationToken.None){const n=this.serviceRegistry.getServices(e.uri),r=await n.workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),r)}isAffected(e,t){const n=this.referenceIndex.get(e.uri.toString());return!!n&&n.some(e=>!e.local&&t.has(e.targetUri.toString()))}}class Pt{constructor(e){this.initialBuildOptions={},this._ready=new Fe,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=_e.CancellationToken.None){const n=await this.performStartup(e);await Me(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){const t=[],n=e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)};await this.loadAdditionalDocuments(e,n);const r=[];await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,r)));const i=(0,Re.Td)(r).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e));return await this.loadWorkspaceDocuments(i,n),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{const n=await this.langiumDocuments.getOrCreateDocument(e);t(n)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return He.r.parse(e.uri)}async traverseFolder(e,t){try{const n=await this.fileSystemProvider.readDirectory(e);await Promise.all(n.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(t){console.error("Failure to read directory content of "+e.toString(!0),t)}}async searchFolder(e){const t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){const t=We.basename(e.uri);return!t.startsWith(".")&&(e.isDirectory?"node_modules"!==t&&"out"!==t:!!e.isFile&&this.serviceRegistry.hasServices(e.uri))}}class Lt{buildUnexpectedCharactersMessage(e,t,n,r,i){return a.PW.buildUnexpectedCharactersMessage(e,t,n,r,i)}buildUnableToPopLexerModeMessage(e){return a.PW.buildUnableToPopLexerModeMessage(e)}}const Ot={mode:"full"};class Dt{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;const t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const n=Ft(t)?Object.values(t):t,r="production"===e.LanguageMetaData.mode;this.chevrotainLexer=new a.JG(n,{positionTracking:"full",skipValidations:r,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=Ot){const n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:n.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(Ft(e))return e;const t=Mt(e)?Object.values(e.modes).flat():e,n={};return t.forEach(e=>n[e.name]=e),n}}function Mt(e){return e&&"modes"in e&&"defaultMode"in e}function Ft(e){return!function(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}(e)&&!Mt(e)}function qt(e){let t="";return t="string"==typeof e?e:e.text,t.split(s.TH)}const jt=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Ut=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function Gt(e,t,n,r){const i=[];if(0===e.length){const e=te.Position.create(n,r),s=te.Position.create(n,r+t.length);i.push({type:"text",content:t,range:te.Range.create(e,s)})}else{let s=0;for(const o of e){const e=o.index,a=t.substring(s,e);a.length>0&&i.push({type:"text",content:t.substring(s,e),range:te.Range.create(te.Position.create(n,s+r),te.Position.create(n,e+r))});let c=a.length+1;const l=o[1];if(i.push({type:"inline-tag",content:l,range:te.Range.create(te.Position.create(n,s+c+r),te.Position.create(n,s+c+l.length+r))}),c+=l.length,4===o.length){c+=o[2].length;const e=o[3];i.push({type:"text",content:e,range:te.Range.create(te.Position.create(n,s+c+r),te.Position.create(n,s+c+e.length+r))})}else i.push({type:"text",content:"",range:te.Range.create(te.Position.create(n,s+c+r),te.Position.create(n,s+c+r))});s=e+o[0].length}const o=t.substring(s);o.length>0&&i.push({type:"text",content:o,range:te.Range.create(te.Position.create(n,s+r),te.Position.create(n,s+r+o.length))})}return i}const zt=/\S/,Bt=/\s*$/;function Kt(e,t){const n=e.substring(t).match(zt);return n?t+n.index:e.length}function Wt(e){const t=e.match(Bt);if(t&&"number"==typeof t.index)return t.index}function Vt(e,t){const n=e.tokens[e.index];return"tag"===n.type?Xt(e,!1):"text"===n.type||"inline-tag"===n.type?Ht(e):(function(e,t){if(t){const n=new rn("",e.range);"inlines"in t?t.inlines.push(n):t.content.inlines.push(n)}}(n,t),void e.index++)}function Ht(e){let t=e.tokens[e.index];const n=t;let r=t;const i=[];for(;t&&"break"!==t.type&&"tag"!==t.type;)i.push(Yt(e)),r=t,t=e.tokens[e.index];return new nn(i,te.Range.create(n.range.start,r.range.end))}function Yt(e){return"inline-tag"===e.tokens[e.index].type?Xt(e,!0):Qt(e)}function Xt(e,t){const n=e.tokens[e.index++],r=n.content.substring(1),i=e.tokens[e.index];if("text"===i?.type){if(t){const i=Qt(e);return new tn(r,new nn([i],i.range),t,te.Range.create(n.range.start,i.range.end))}{const i=Ht(e);return new tn(r,i,t,te.Range.create(n.range.start,i.range.end))}}{const e=n.range;return new tn(r,new nn([],e),t,e)}}function Qt(e){const t=e.tokens[e.index++];return new rn(t.content,t.range)}function Jt(e){if(!e)return Jt({start:"/**",end:"*/",line:"*"});const{start:t,end:n,line:r}=e;return{start:Zt(t,!0),end:Zt(n,!1),line:Zt(r,!0)}}function Zt(e,t){if("string"==typeof e||"object"==typeof e){const n="string"==typeof e?(0,s.Nt)(e):e.source;return t?new RegExp(`^\\s*${n}`):new RegExp(`\\s*${n}\\s*$`)}return e}class en{constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(const t of this.elements)if(0===e.length)e=t.toString();else{const n=t.toString();e+=sn(e)+n}return e.trim()}toMarkdown(e){let t="";for(const n of this.elements)if(0===t.length)t=n.toMarkdown(e);else{const r=n.toMarkdown(e);t+=sn(t)+r}return t.trim()}}class tn{constructor(e,t,n,r){this.name=e,this.content=t,this.inline=n,this.range=r}toString(){let e=`@${this.name}`;const t=this.content.toString();return 1===this.content.inlines.length?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}\n${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const n=function(e,t,n){if("linkplain"===e||"linkcode"===e||"link"===e){const r=t.indexOf(" ");let i=t;if(r>0){const e=Kt(t,r);i=t.substring(e),t=t.substring(0,r)}("linkcode"===e||"link"===e&&"code"===n.link)&&(i=`\`${i}\``);const s=n.renderLink?.(t,i)??function(e,t){try{return He.r.parse(e,!0),`[${t}](${e})`}catch{return e}}(t,i);return s}}(this.name,t,e??{});if("string"==typeof n)return n}let n="";"italic"===e?.tag||void 0===e?.tag?n="*":"bold"===e?.tag?n="**":"bold-italic"===e?.tag&&(n="***");let r=`${n}@${this.name}${n}`;return 1===this.content.inlines.length?r=`${r} — ${t}`:this.content.inlines.length>1&&(r=`${r}\n${t}`),this.inline?`{${r}}`:r}}class nn{constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;t<this.inlines.length;t++){const n=this.inlines[t],r=this.inlines[t+1];e+=n.toString(),r&&r.range.start.line>n.range.start.line&&(e+="\n")}return e}toMarkdown(e){let t="";for(let n=0;n<this.inlines.length;n++){const r=this.inlines[n],i=this.inlines[n+1];t+=r.toMarkdown(e),i&&i.range.start.line>r.range.start.line&&(t+="\n")}return t}}class rn{constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}}function sn(e){return e.endsWith("\n")?"\n":"\n\n"}class on{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&function(e){const t=Jt(void 0),n=qt(e);if(0===n.length)return!1;const r=n[0],i=n[n.length-1],s=t.start,o=t.end;return Boolean(s?.exec(r))&&Boolean(o?.exec(i))}(t))return function(e,t,n){let r,i;"string"==typeof e?(i=t,r=n):(i=e.range.start,r=t),i||(i=te.Position.create(0,0));const s=function(e){const t=[];let n=e.position.line,r=e.position.character;for(let i=0;i<e.lines.length;i++){const s=0===i,o=i===e.lines.length-1;let a=e.lines[i],c=0;if(s&&e.options.start){const t=e.options.start?.exec(a);t&&(c=t.index+t[0].length)}else{const t=e.options.line?.exec(a);t&&(c=t.index+t[0].length)}if(o){const t=e.options.end?.exec(a);t&&(a=a.substring(0,t.index))}if(a=a.substring(0,Wt(a)),Kt(a,c)>=a.length){if(t.length>0){const e=te.Position.create(n,r);t.push({type:"break",content:"",range:te.Range.create(e,e)})}}else{jt.lastIndex=c;const e=jt.exec(a);if(e){const i=e[0],s=e[1],o=te.Position.create(n,r+c),l=te.Position.create(n,r+c+i.length);t.push({type:"tag",content:s,range:te.Range.create(o,l)}),c+=i.length,c=Kt(a,c)}if(c<a.length){const e=a.substring(c),i=Array.from(e.matchAll(Ut));t.push(...Gt(i,e,n,r+c))}}n++,r=0}return t.length>0&&"break"===t[t.length-1].type?t.slice(0,-1):t}({lines:qt(e),position:i,options:Jt(r)});return function(e){const t=te.Position.create(e.position.line,e.position.character);if(0===e.tokens.length)return new en([],te.Range.create(t,t));const n=[];for(;e.index<e.tokens.length;){const t=Vt(e,n[n.length-1]);t&&n.push(t)}const r=n[0]?.range.start??t,i=n[n.length-1]?.range.end??t;return new en(n,te.Range.create(r,i))}({index:0,tokens:s,position:i})}(t).toMarkdown({renderLink:(t,n)=>this.documentationLinkRenderer(e,t,n),renderTag:t=>this.documentationTagRenderer(e,t)})}documentationLinkRenderer(e,t,n){const r=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(r&&r.nameSegment){const e=r.nameSegment.range.start.line+1,t=r.nameSegment.range.start.character+1;return`[${n}](${r.documentUri.with({fragment:`L${e},${t}`}).toString()})`}}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){const n=(0,ee.YE)(e).localSymbols;if(!n)return;let r=e;do{const e=n.getStream(r).find(e=>e.name===t);if(e)return e;r=r.$container}while(r)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}}class an{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return function(e){return"string"==typeof e.$comment}(e)?e.$comment:(0,r.v)(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}}class cn{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}}class ln{constructor(){this.previousTokenSource=new _e.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=(Le=performance.now(),new _e.CancellationTokenSource);return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,n=_e.CancellationToken.None){const r=new Fe,i={action:t,deferred:r,cancellationToken:n};return e.push(i),this.performNextOperation(),r.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else{if(!(this.readQueue.length>0))return;e.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(e.map(async({action:e,deferred:t,cancellationToken:n})=>{try{const r=await Promise.resolve().then(()=>e(n));t.resolve(r)}catch(e){De(e)?t.resolve(void 0):t.reject(e)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class un{constructor(e){this.grammarElementIdMap=new rt,this.tokenTypeIdMap=new rt,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(e=>({...e,message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){const t=new Map,n=new Map;for(const n of(0,ee.jm)(e))t.set(n,{});if(e.$cstNode)for(const t of(0,r.NS)(e.$cstNode))n.set(t,{});return{astNodes:t,cstNodes:n}}dehydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(const[r,i]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(i)){const e=[];n[r]=e;for(const n of i)(0,Pe.ng)(n)?e.push(this.dehydrateAstNode(n,t)):(0,Pe.A_)(n)?e.push(this.dehydrateReference(n,t)):e.push(n)}else(0,Pe.ng)(i)?n[r]=this.dehydrateAstNode(i,t):(0,Pe.A_)(i)?n[r]=this.dehydrateReference(i,t):void 0!==i&&(n[r]=i);return n}dehydrateReference(e,t){const n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=t.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,t){const n=t.cstNodes.get(e);return(0,Pe.br)(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=t.astNodes.get(e.astNode),(0,Pe.mD)(e)?n.content=e.content.map(e=>this.dehydrateCstNode(e,t)):(0,Pe.FC)(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){const t=e.value,n=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,n)}}createHydrationContext(e){const t=new Map,n=new Map;for(const n of(0,ee.jm)(e))t.set(n,{});let i;if(e.$cstNode)for(const t of(0,r.NS)(e.$cstNode)){let e;"fullText"in t?(e=new ae(t.fullText),i=e):"content"in t?e=new se:"tokenType"in t&&(e=this.hydrateCstLeafNode(t)),e&&(n.set(t,e),e.root=i)}return{astNodes:t,cstNodes:n}}hydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=t.cstNodes.get(e.$cstNode));for(const[r,i]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(i)){const e=[];n[r]=e;for(const s of i)(0,Pe.ng)(s)?e.push(this.setParent(this.hydrateAstNode(s,t),n)):(0,Pe.A_)(s)?e.push(this.hydrateReference(s,n,r,t)):e.push(s)}else(0,Pe.ng)(i)?n[r]=this.setParent(this.hydrateAstNode(i,t),n):(0,Pe.A_)(i)?n[r]=this.hydrateReference(i,n,r,t):void 0!==i&&(n[r]=i);return n}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,n,r){return this.linker.buildReference(t,n,r.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,n=0){const r=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(r.grammarSource=this.getGrammarElement(e.grammarSource)),r.astNode=t.astNodes.get(e.astNode),(0,Pe.mD)(r))for(const i of e.content){const e=this.hydrateCstNode(i,t,n++);r.content.push(e)}return r}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType),n=e.offset,r=e.length,i=e.startLine,s=e.startColumn,o=e.endLine,a=e.endColumn,c=e.hidden;return new ie(n,r,{start:{line:i,character:s},end:{line:o,character:a}},t,c)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(const t of(0,ee.jm)(this.grammar))(0,o.r1)(t)&&this.grammarElementIdMap.set(t,e++)}}function dn(e){return{documentation:{CommentProvider:e=>new an(e),DocumentationProvider:e=>new on(e)},parser:{AsyncParser:e=>new cn(e),GrammarConfig:e=>function(e){const t=[],n=e.Grammar;for(const e of n.rules)(0,o.rE)(e)&&(0,i.eb)(e)&&(0,s.lU)((0,i.S)(e))&&t.push(e.name);return{multilineCommentRules:t,nameRegexp:r.El}}(e),LangiumParser:e=>function(e){const t=function(e){const t=e.Grammar,n=e.parser.Lexer;return Ee(t,new he(e),n.definition)}(e);return t.finalize(),t}(e),CompletionParser:e=>function(e){const t=e.Grammar,n=e.parser.Lexer,r=new me(e);return Ee(t,r,n.definition),r.finalize(),r}(e),ValueConverter:()=>new Ie.d,TokenBuilder:()=>new Ne.Q,Lexer:e=>new Dt(e),ParserErrorMessageProvider:()=>new fe,LexerErrorMessageProvider:()=>new Lt},workspace:{AstNodeLocator:()=>new At,AstNodeDescriptionProvider:e=>new Ct(e),ReferenceDescriptionProvider:e=>new xt(e)},references:{Linker:e=>new Ze(e),NameProvider:()=>new et,ScopeProvider:e=>new dt(e),ScopeComputation:e=>new it(e),References:e=>new tt(e)},serializer:{Hydrator:e=>new un(e),JsonSerializer:e=>new pt(e)},validation:{DocumentValidator:e=>new vt(e),ValidationRegistry:e=>new yt(e)},shared:()=>e.shared}}function hn(e){return{ServiceRegistry:e=>new ft(e),workspace:{LangiumDocuments:e=>new Qe(e),LangiumDocumentFactory:e=>new Xe(e),DocumentBuilder:e=>new It(e),IndexManager:e=>new _t(e),WorkspaceManager:e=>new Pt(e),FileSystemProvider:t=>e.fileSystemProvider(t),WorkspaceLock:()=>new ln,ConfigurationProvider:e=>new $t(e)},profilers:{}}}},9364(e,t,n){"use strict";var r;function i(e,t,n,r,i,s,a,c,u){return o([e,t,n,r,i,s,a,c,u].reduce(l,{}))}n.d(t,{WQ:()=>i}),function(e){e.merge=(e,t)=>l(l({},e),t)}(r||(r={}));const s=Symbol("isProxy");function o(e,t){const n=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw new Error("Cannot set property on injected service container")},get:(r,i)=>i===s||c(r,i,e,t||n),getOwnPropertyDescriptor:(r,i)=>(c(r,i,e,t||n),Object.getOwnPropertyDescriptor(r,i)),has:(t,n)=>n in e,ownKeys:()=>[...Object.getOwnPropertyNames(e)]});return n}const a=Symbol();function c(e,t,n,r){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+e[t]);if(e[t]===a)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}if(t in n){const i=n[t];e[t]=a;try{e[t]="function"==typeof i?i(r):o(i,r)}catch(n){throw e[t]=n instanceof Error?n:void 0,n}return e[t]}}function l(e,t){if(t)for(const[n,r]of Object.entries(t))if(null!=r)if("object"==typeof r){const t=e[n];e[n]=l("object"==typeof t&&null!==t?t:{},r)}else e[n]=r;return e}},2151(e,t,n){"use strict";n.d(t,{$g:()=>Z,Bg:()=>v,Ct:()=>G,Cz:()=>y,D8:()=>te,FO:()=>$,Fy:()=>re,GL:()=>j,IZ:()=>N,Mz:()=>ye,NT:()=>L,O4:()=>oe,QX:()=>Ee,RP:()=>A,S2:()=>D,SP:()=>_,TF:()=>K,Tu:()=>k,Xj:()=>he,_c:()=>C,cM:()=>a,cY:()=>me,fG:()=>Q,jp:()=>p,lF:()=>ue,r1:()=>s,rE:()=>ce,s7:()=>V,vd:()=>Y,ve:()=>d,wb:()=>F,wh:()=>m,z2:()=>Re});var r=n(2479);const i="AbstractElement";function s(e){return ke.isInstance(e,i)}const o="AbstractParserRule";function a(e){return ke.isInstance(e,o)}const c="AbstractRule",l="AbstractType",u="Action";function d(e){return ke.isInstance(e,u)}const h="Alternatives";function p(e){return ke.isInstance(e,h)}const f="Assignment";function m(e){return ke.isInstance(e,f)}const g="BooleanLiteral";function y(e){return ke.isInstance(e,g)}const T="CharacterRange";function v(e){return ke.isInstance(e,T)}const R="Condition",E="Conjunction";function k(e){return ke.isInstance(e,E)}const S="CrossReference";function C(e){return ke.isInstance(e,S)}const x="Disjunction";function A(e){return ke.isInstance(e,x)}const b="EndOfFile";function $(e){return ke.isInstance(e,b)}const w="Group";function N(e){return ke.isInstance(e,w)}const I="InferredType";function _(e){return ke.isInstance(e,I)}const P="InfixRule";function L(e){return ke.isInstance(e,P)}const O="Interface";function D(e){return ke.isInstance(e,O)}const M="Keyword";function F(e){return ke.isInstance(e,M)}const q="NegatedToken";function j(e){return ke.isInstance(e,q)}const U="Negation";function G(e){return ke.isInstance(e,U)}const z="Parameter",B="ParameterReference";function K(e){return ke.isInstance(e,B)}const W="ParserRule";function V(e){return ke.isInstance(e,W)}const H="RegexToken";function Y(e){return ke.isInstance(e,H)}const X="ReturnType";function Q(e){return ke.isInstance(e,X)}const J="RuleCall";function Z(e){return ke.isInstance(e,J)}const ee="SimpleType";function te(e){return ke.isInstance(e,ee)}const ne="TerminalAlternatives";function re(e){return ke.isInstance(e,ne)}const ie="TerminalElement",se="TerminalGroup";function oe(e){return ke.isInstance(e,se)}const ae="TerminalRule";function ce(e){return ke.isInstance(e,ae)}const le="TerminalRuleCall";function ue(e){return ke.isInstance(e,le)}const de="Type";function he(e){return ke.isInstance(e,de)}const pe="TypeDefinition",fe="UnorderedGroup";function me(e){return ke.isInstance(e,fe)}const ge="UntilToken";function ye(e){return ke.isInstance(e,ge)}const Te="ValueLiteral",ve="Wildcard";function Re(e){return ke.isInstance(e,ve)}class Ee extends r.kD{constructor(){super(...arguments),this.types={AbstractElement:{name:i,properties:{cardinality:{name:"cardinality"}},superTypes:[]},AbstractParserRule:{name:o,properties:{},superTypes:[c,l]},AbstractRule:{name:c,properties:{},superTypes:[]},AbstractType:{name:l,properties:{},superTypes:[]},Action:{name:u,properties:{cardinality:{name:"cardinality"},feature:{name:"feature"},inferredType:{name:"inferredType"},operator:{name:"operator"},type:{name:"type",referenceType:l}},superTypes:[i]},Alternatives:{name:h,properties:{cardinality:{name:"cardinality"},elements:{name:"elements",defaultValue:[]}},superTypes:[i]},ArrayLiteral:{name:"ArrayLiteral",properties:{elements:{name:"elements",defaultValue:[]}},superTypes:[Te]},ArrayType:{name:"ArrayType",properties:{elementType:{name:"elementType"}},superTypes:[pe]},Assignment:{name:f,properties:{cardinality:{name:"cardinality"},feature:{name:"feature"},operator:{name:"operator"},predicate:{name:"predicate"},terminal:{name:"terminal"}},superTypes:[i]},BooleanLiteral:{name:g,properties:{true:{name:"true",defaultValue:!1}},superTypes:[R,Te]},CharacterRange:{name:T,properties:{cardinality:{name:"cardinality"},left:{name:"left"},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1},right:{name:"right"}},superTypes:[ie]},Condition:{name:R,properties:{},superTypes:[]},Conjunction:{name:E,properties:{left:{name:"left"},right:{name:"right"}},superTypes:[R]},CrossReference:{name:S,properties:{cardinality:{name:"cardinality"},deprecatedSyntax:{name:"deprecatedSyntax",defaultValue:!1},isMulti:{name:"isMulti",defaultValue:!1},terminal:{name:"terminal"},type:{name:"type",referenceType:l}},superTypes:[i]},Disjunction:{name:x,properties:{left:{name:"left"},right:{name:"right"}},superTypes:[R]},EndOfFile:{name:b,properties:{cardinality:{name:"cardinality"}},superTypes:[i]},Grammar:{name:"Grammar",properties:{imports:{name:"imports",defaultValue:[]},interfaces:{name:"interfaces",defaultValue:[]},isDeclared:{name:"isDeclared",defaultValue:!1},name:{name:"name"},rules:{name:"rules",defaultValue:[]},types:{name:"types",defaultValue:[]}},superTypes:[]},GrammarImport:{name:"GrammarImport",properties:{path:{name:"path"}},superTypes:[]},Group:{name:w,properties:{cardinality:{name:"cardinality"},elements:{name:"elements",defaultValue:[]},guardCondition:{name:"guardCondition"},predicate:{name:"predicate"}},superTypes:[i]},InferredType:{name:I,properties:{name:{name:"name"}},superTypes:[l]},InfixRule:{name:P,properties:{call:{name:"call"},dataType:{name:"dataType"},inferredType:{name:"inferredType"},name:{name:"name"},operators:{name:"operators"},parameters:{name:"parameters",defaultValue:[]},returnType:{name:"returnType",referenceType:l}},superTypes:[o]},InfixRuleOperatorList:{name:"InfixRuleOperatorList",properties:{associativity:{name:"associativity"},operators:{name:"operators",defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:"InfixRuleOperators",properties:{precedences:{name:"precedences",defaultValue:[]}},superTypes:[]},Interface:{name:O,properties:{attributes:{name:"attributes",defaultValue:[]},name:{name:"name"},superTypes:{name:"superTypes",defaultValue:[],referenceType:l}},superTypes:[l]},Keyword:{name:M,properties:{cardinality:{name:"cardinality"},predicate:{name:"predicate"},value:{name:"value"}},superTypes:[i]},NamedArgument:{name:"NamedArgument",properties:{calledByName:{name:"calledByName",defaultValue:!1},parameter:{name:"parameter",referenceType:z},value:{name:"value"}},superTypes:[]},NegatedToken:{name:q,properties:{cardinality:{name:"cardinality"},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1},terminal:{name:"terminal"}},superTypes:[ie]},Negation:{name:U,properties:{value:{name:"value"}},superTypes:[R]},NumberLiteral:{name:"NumberLiteral",properties:{value:{name:"value"}},superTypes:[Te]},Parameter:{name:z,properties:{name:{name:"name"}},superTypes:[]},ParameterReference:{name:B,properties:{parameter:{name:"parameter",referenceType:z}},superTypes:[R]},ParserRule:{name:W,properties:{dataType:{name:"dataType"},definition:{name:"definition"},entry:{name:"entry",defaultValue:!1},fragment:{name:"fragment",defaultValue:!1},inferredType:{name:"inferredType"},name:{name:"name"},parameters:{name:"parameters",defaultValue:[]},returnType:{name:"returnType",referenceType:l}},superTypes:[o]},ReferenceType:{name:"ReferenceType",properties:{isMulti:{name:"isMulti",defaultValue:!1},referenceType:{name:"referenceType"}},superTypes:[pe]},RegexToken:{name:H,properties:{cardinality:{name:"cardinality"},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1},regex:{name:"regex"}},superTypes:[ie]},ReturnType:{name:X,properties:{name:{name:"name"}},superTypes:[]},RuleCall:{name:J,properties:{arguments:{name:"arguments",defaultValue:[]},cardinality:{name:"cardinality"},predicate:{name:"predicate"},rule:{name:"rule",referenceType:c}},superTypes:[i]},SimpleType:{name:ee,properties:{primitiveType:{name:"primitiveType"},stringType:{name:"stringType"},typeRef:{name:"typeRef",referenceType:l}},superTypes:[pe]},StringLiteral:{name:"StringLiteral",properties:{value:{name:"value"}},superTypes:[Te]},TerminalAlternatives:{name:ne,properties:{cardinality:{name:"cardinality"},elements:{name:"elements",defaultValue:[]},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1}},superTypes:[ie]},TerminalElement:{name:ie,properties:{cardinality:{name:"cardinality"},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1}},superTypes:[i]},TerminalGroup:{name:se,properties:{cardinality:{name:"cardinality"},elements:{name:"elements",defaultValue:[]},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1}},superTypes:[ie]},TerminalRule:{name:ae,properties:{definition:{name:"definition"},fragment:{name:"fragment",defaultValue:!1},hidden:{name:"hidden",defaultValue:!1},name:{name:"name"},type:{name:"type"}},superTypes:[c]},TerminalRuleCall:{name:le,properties:{cardinality:{name:"cardinality"},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1},rule:{name:"rule",referenceType:ae}},superTypes:[ie]},Type:{name:de,properties:{name:{name:"name"},type:{name:"type"}},superTypes:[l]},TypeAttribute:{name:"TypeAttribute",properties:{defaultValue:{name:"defaultValue"},isOptional:{name:"isOptional",defaultValue:!1},name:{name:"name"},type:{name:"type"}},superTypes:[]},TypeDefinition:{name:pe,properties:{},superTypes:[]},UnionType:{name:"UnionType",properties:{types:{name:"types",defaultValue:[]}},superTypes:[pe]},UnorderedGroup:{name:fe,properties:{cardinality:{name:"cardinality"},elements:{name:"elements",defaultValue:[]}},superTypes:[i]},UntilToken:{name:ge,properties:{cardinality:{name:"cardinality"},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1},terminal:{name:"terminal"}},superTypes:[ie]},ValueLiteral:{name:Te,properties:{},superTypes:[]},Wildcard:{name:ve,properties:{cardinality:{name:"cardinality"},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1}},superTypes:[ie]}}}}const ke=new Ee},4326(e,t,n){"use strict";n.d(t,{Q:()=>l});var r=n(1064),i=n(2151),s=n(9683),o=n(418),a=n(2806),c=n(1719);class l{constructor(){this.diagnostics=[]}buildTokens(e,t){const n=(0,c.Td)((0,o.YV)(e,!1)),r=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,r,t);return i.push(...r),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(i.rE).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){const t=(0,o.S)(e),n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,i={name:e.name,PATTERN:n};return"function"==typeof n&&(i.LINE_BREAKS=!0),e.hidden&&(i.GROUP=(0,a.Yv)(t)?r.JG.SKIPPED:"hidden"),i}requiresCustomPattern(e){return!(!e.flags.includes("u")&&!e.flags.includes("s"))}regexPatternFunction(e){const t=new RegExp(e,e.flags+"y");return(e,n)=>(t.lastIndex=n,t.exec(e))}buildKeywordTokens(e,t,n){return e.filter(i.cM).flatMap(e=>(0,s.Uo)(e).filter(i.wb)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,Boolean(n?.caseInsensitive)))}buildKeywordToken(e,t,n){const r=this.buildKeywordPattern(e,n),i={name:e.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(e,t)};return"function"==typeof r&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,t){return t?new RegExp((0,a.Nt)(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((t,n)=>{const r=n?.PATTERN;return r?.source&&(0,a.PC)("^"+r.source+"$",e.value)&&t.push(n),t},[])}}},5033(e,t,n){"use strict";n.d(t,{d:()=>o});var r,i=n(2151),s=n(418);class o{convert(e,t){let n=t.grammarSource;if((0,i._c)(n)&&(n=(0,s.g4)(n)),(0,i.$g)(n)){const r=n.rule.ref;if(!r)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(r,e,t)}return e}runConverter(e,t,n){switch(e.name.toUpperCase()){case"INT":return r.convertInt(t);case"STRING":return r.convertString(t);case"ID":return r.convertID(t)}switch((0,s.P3)(e)?.toLowerCase()){case"number":return r.convertNumber(t);case"boolean":return r.convertBoolean(t);case"bigint":return r.convertBigint(t);case"date":return r.convertDate(t);default:return t}}}!function(e){function t(e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return e}}e.convertString=function(e){let n="";for(let r=1;r<e.length-1;r++){const i=e.charAt(r);n+="\\"===i?t(e.charAt(++r)):i}return n},e.convertID=function(e){return"^"===e.charAt(0)?e.substring(1):e},e.convertInt=function(e){return parseInt(e)},e.convertBigint=function(e){return BigInt(e)},e.convertDate=function(e){return new Date(e)},e.convertNumber=function(e){return Number(e)},e.convertBoolean=function(e){return"true"===e.toLowerCase()}}(r||(r={}))},2479(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function i(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"ref"in e}function s(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"items"in e}function o(e){return"object"==typeof e&&null!==e&&"string"==typeof e.name&&"string"==typeof e.type&&"string"==typeof e.path}function a(e){return"object"==typeof e&&null!==e&&"object"==typeof e.info&&"string"==typeof e.message}n.d(t,{A_:()=>i,Dm:()=>s,FC:()=>u,Nr:()=>o,Zl:()=>a,br:()=>d,kD:()=>c,mD:()=>l,ng:()=>r});class c{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){const t=this.types[e.container.$type];if(!t)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=t.properties[e.property]?.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return r(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const r=n[t];if(void 0!==r)return r;{const r=this.types[e],i=!!r&&r.superTypes.some(e=>this.isSubtype(e,t));return n[t]=i,i}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t)return t;{const t=this.getAllTypes(),n=[];for(const r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}}function l(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function u(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function d(e){return l(e)&&"string"==typeof e.fullText}},9683(e,t,n){"use strict";n.d(t,{DM:()=>m,OP:()=>g,SD:()=>o,Uo:()=>h,VN:()=>d,XG:()=>a,YE:()=>c,cQ:()=>l,jm:()=>p,tC:()=>u});var r=n(2479),i=n(1719),s=n(6373);function o(e,t={}){for(const[n,i]of Object.entries(e))n.startsWith("$")||(Array.isArray(i)?i.forEach((i,s)=>{(0,r.ng)(i)&&(i.$container=e,i.$containerProperty=n,i.$containerIndex=s,t.deep&&o(i,t))}):(0,r.ng)(i)&&(i.$container=e,i.$containerProperty=n,t.deep&&o(i,t)))}function a(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}function c(e){const t=l(e).$document;if(!t)throw new Error("AST node has no document.");return t}function l(e){for(;e.$container;)e=e.$container;return e}function u(e){return(0,r.A_)(e)?e.ref?[e.ref]:[]:(0,r.Dm)(e)?e.items.map(e=>e.ref):[]}function d(e,t){if(!e)throw new Error("Node must be an AstNode.");const n=t?.range;return new i.fq(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){const i=t.keys[t.keyIndex];if(!i.startsWith("$")){const s=e[i];if((0,r.ng)(s)){if(t.keyIndex++,f(s,n))return{done:!1,value:s}}else if(Array.isArray(s)){for(;t.arrayIndex<s.length;){const e=s[t.arrayIndex++];if((0,r.ng)(e)&&f(e,n))return{done:!1,value:e}}t.arrayIndex=0}}t.keyIndex++}return i.Rf})}function h(e,t){if(!e)throw new Error("Root node must be an AstNode.");return new i.Vj(e,e=>d(e,t))}function p(e,t){if(!e)throw new Error("Root node must be an AstNode.");return t?.range&&!f(e,t.range)?new i.Vj(e,()=>[]):new i.Vj(e,e=>d(e,t),{includeRoot:!0})}function f(e,t){if(!t)return!0;const n=e.$cstNode?.range;return!!n&&(0,s.r4)(n,t)}function m(e){return new i.fq(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){const n=t.keys[t.keyIndex];if(!n.startsWith("$")){const i=e[n];if((0,r.A_)(i)||(0,r.Dm)(i))return t.keyIndex++,{done:!1,value:{reference:i,container:e,property:n}};if(Array.isArray(i)){for(;t.arrayIndex<i.length;){const s=t.arrayIndex++,o=i[s];if((0,r.A_)(o)||(0,r.Dm)(i))return{done:!1,value:{reference:o,container:e,property:n,index:s}}}t.arrayIndex=0}}t.keyIndex++}return i.Rf})}function g(e,t){const n=e.getTypeMetaData(t.$type),r=t;for(const e of Object.values(n.properties))void 0!==e.defaultValue&&void 0===r[e.name]&&(r[e.name]=y(e.defaultValue))}function y(e){return Array.isArray(e)?[...e.map(y)]:e}},6373(e,t,n){"use strict";n.d(t,{El:()=>d,NS:()=>o,SX:()=>l,pO:()=>a,r4:()=>u,v:()=>h,wf:()=>c});var r,i=n(2479),s=n(1719);function o(e){return new s.Vj(e,e=>(0,i.mD)(e)?e.content:[],{includeRoot:!0})}function a(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}function c(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function l(e){if(!e)return;const{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}function u(e,t){const n=function(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character)return r.Before;if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return r.After;const n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,i=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;return n&&i?r.Inside:n?r.OverlapBack:i?r.OverlapFront:r.Outside}(e,t);return n>r.After}!function(e){e[e.Before=0]="Before",e[e.After=1]="After",e[e.OverlapFront=2]="OverlapFront",e[e.OverlapBack=3]="OverlapBack",e[e.Inside=4]="Inside",e[e.Outside=5]="Outside"}(r||(r={}));const d=/^[\w\p{L}]$/u;function h(e,t){if(e){const n=function(e,t=!0){for(;e.container;){const n=e.container;let r=n.content.indexOf(e);for(;r>0;){r--;const e=n.content[r];if(t||!e.hidden)return e}e=n}}(e,!0);if(n&&p(n,t))return n;if((0,i.br)(e))for(let n=e.content.findIndex(e=>!e.hidden)-1;n>=0;n--){const r=e.content[n];if(p(r,t))return r}}}function p(e,t){return(0,i.FC)(e)&&t.includes(e.tokenType.name)}},1564(e,t,n){"use strict";n.d(t,{WB:()=>r,dr:()=>i});class r extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}}function i(e,t="Error: Got unexpected value."){throw new Error(t)}},418(e,t,n){"use strict";n.d(t,{Bd:()=>p,P3:()=>C,Rp:()=>y,S:()=>x,SS:()=>g,U5:()=>T,Uz:()=>S,Xq:()=>R,YV:()=>l,eb:()=>h,g4:()=>d,qO:()=>f});var r=n(1564),i=n(2151),s=n(2479),o=n(9683),a=n(6373),c=n(2806);function l(e,t){const n=new Set,r=function(e){return e.rules.find(e=>i.s7(e)&&e.entry)}(e);if(!r)return new Set(e.rules);const s=[r].concat(function(e){return e.rules.filter(e=>i.rE(e)&&e.hidden)}(e));for(const e of s)u(e,n,t);const o=new Set;for(const t of e.rules)(n.has(t.name)||i.rE(t)&&t.hidden)&&o.add(t);return o}function u(e,t,n){t.add(e.name),(0,o.Uo)(e).forEach(e=>{if(i.$g(e)||n&&i.lF(e)){const r=e.rule.ref;r&&!t.has(r.name)&&u(r,t,n)}})}function d(e){if(e.terminal)return e.terminal;if(e.type.ref){const t=T(e.type.ref);return t?.terminal}}function h(e){return e.hidden&&!(0,c.Yv)(x(e))}function p(e,t){return e&&t?m(e,t,e.astNode,!0):[]}function f(e,t,n){if(!e||!t)return;const r=m(e,t,e.astNode,!0);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}function m(e,t,n,r){if(!r){const n=(0,o.XG)(e.grammarSource,i.wh);if(n&&n.feature===t)return[e]}return(0,s.mD)(e)&&e.astNode===n?e.content.flatMap(e=>m(e,t,n,!1)):[]}function g(e,t,n){if(!e)return;const r=function(e,t,n){if(e.astNode!==n)return[];if(i.wb(e.grammarSource)&&e.grammarSource.value===t)return[e];const r=(0,a.NS)(e).iterator();let s;const o=[];do{if(s=r.next(),!s.done){const e=s.value;e.astNode===n?i.wb(e.grammarSource)&&e.grammarSource.value===t&&o.push(e):r.prune()}}while(!s.done);return o}(e,t,e?.astNode);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}function y(e){const t=e.astNode;for(;t===e.container?.astNode;){const t=(0,o.XG)(e.grammarSource,i.wh);if(t)return t;e=e.container}}function T(e){let t=e;return i.SP(t)&&(i.ve(t.$container)?t=t.$container.$container:i.cM(t.$container)?t=t.$container:(0,r.dr)(t.$container)),v(e,t,new Map)}function v(e,t,n){function r(t,r){let s;return(0,o.XG)(t,i.wh)||(s=v(r,r,n)),n.set(e,s),s}if(n.has(e))return n.get(e);n.set(e,void 0);for(const s of(0,o.Uo)(t)){if(i.wh(s)&&"name"===s.feature.toLowerCase())return n.set(e,s),s;if(i.$g(s)&&i.s7(s.rule.ref))return r(s,s.rule.ref);if(i.D8(s)&&s.typeRef?.ref)return r(s,s.typeRef.ref)}}function R(e){return E(e,new Set)}function E(e,t){if(t.has(e))return!0;t.add(e);for(const n of(0,o.Uo)(e))if(i.$g(n)){if(!n.rule.ref)return!1;if(i.s7(n.rule.ref)&&!E(n.rule.ref,t))return!1;if(i.NT(n.rule.ref))return!1}else{if(i.wh(n))return!1;if(i.ve(n))return!1}return Boolean(e.definition)}function k(e){if(!i.rE(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){const t=e.returnType.ref;if(t)return t.name}}}function S(e){if(i.cM(e))return i.s7(e)&&R(e)?e.name:k(e)??e.name;if(i.S2(e)||i.Xj(e)||i.fG(e))return e.name;if(i.ve(e)){const n=(t=e).inferredType?t.inferredType.name:t.type?.ref?S(t.type.ref):void 0;if(n)return n}else if(i.SP(e))return e.name;var t;throw new Error("Cannot get name of Unknown Type")}function C(e){return i.rE(e)?e.type?.name??"string":k(e)??e.name}function x(e){const t={s:!1,i:!1,u:!1},n=b(e.definition,t),r=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join("");return new RegExp(n,r)}const A=/[\s\S]/.source;function b(e,t){if(i.Fy(e))return w((a=e).elements.map(e=>b(e)).join("|"),{cardinality:a.cardinality,lookahead:a.lookahead,parenthesized:a.parenthesized,wrap:!1});if(i.O4(e))return w((o=e).elements.map(e=>b(e)).join(""),{cardinality:o.cardinality,lookahead:o.lookahead,parenthesized:o.parenthesized,wrap:!1});if(i.Bg(e))return(n=e).right?w(`[${$(n.left)}-${$(n.right)}]`,{cardinality:n.cardinality,lookahead:n.lookahead,parenthesized:n.parenthesized,wrap:!1}):w($(n.left),{cardinality:n.cardinality,lookahead:n.lookahead,parenthesized:n.parenthesized,wrap:!1});var n,r,s,o,a;if(i.lF(e)){const t=e.rule.ref;if(!t)throw new Error("Missing rule reference.");return w(b(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}if(i.GL(e))return w(`(?!${b((s=e).terminal)})${A}*?`,{cardinality:s.cardinality,lookahead:s.lookahead,parenthesized:s.parenthesized});if(i.Mz(e))return w(`${A}*?${b((r=e).terminal)}`,{cardinality:r.cardinality,lookahead:r.lookahead,parenthesized:r.parenthesized});if(i.vd(e)){const n=e.regex.lastIndexOf("/"),r=e.regex.substring(1,n),i=e.regex.substring(n+1);return t&&(t.i=i.includes("i"),t.s=i.includes("s"),t.u=i.includes("u")),w(r,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}if(i.z2(e))return w(A,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}function $(e){return(0,c.Nt)(e.value)}function w(e,t){return(t.parenthesized||t.lookahead||!1!==t.wrap)&&(e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`),t.cardinality?`${e}${t.cardinality}`:e}},2806(e,t,n){"use strict";n.d(t,{Nt:()=>d,PC:()=>h,TH:()=>i,Yv:()=>u,lU:()=>c});var r=n(2607);const i=/\r?\n/gm,s=new r.H;class o extends r.z{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const t=String.fromCharCode(e.value);if(this.multiline||"\n"!==t||(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const e=d(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(t);this.multiline=Boolean("\n".match(n))}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){"Group"===e.type&&e.quantifier||super.visitChildren(e)}}const a=new o;function c(e){try{return"string"==typeof e&&(e=new RegExp(e)),e=e.toString(),a.reset(e),a.visit(s.pattern(e)),a.multiline}catch{return!1}}const l="\f\n\r\t\v \u2028\u2029 \ufeff".split("");function u(e){const t="string"==typeof e?new RegExp(e):e;return l.some(e=>t.test(e))}function d(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function h(e,t){const n=function(e){"string"==typeof e&&(e=new RegExp(e));const t=e,n=e.source;let r=0;return new RegExp(function e(){let i,s="";function o(e){s+=n.substr(r,e),r+=e}function a(e){s+="(?:"+n.substr(r,e)+"|$)",r+=e}for(;r<n.length;)switch(n[r]){case"\\":switch(n[r+1]){case"c":a(3);break;case"x":a(4);break;case"u":t.unicode?"{"===n[r+2]?a(n.indexOf("}",r)-r+1):a(6):a(2);break;case"p":case"P":t.unicode?a(n.indexOf("}",r)-r+1):a(2);break;case"k":a(n.indexOf(">",r)-r+1);break;default:a(2)}break;case"[":i=/\[(?:\\.|.)*?\]/g,i.lastIndex=r,i=i.exec(n)||[],a(i[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":i=/\{\d+,?\d*\}/g,i.lastIndex=r,i=i.exec(n),i?o(i[0].length):a(1);break;case"(":if("?"===n[r+1])switch(n[r+2]){case":":s+="(?:",r+=3,s+=e()+"|$)";break;case"=":s+="(?=",r+=3,s+=e()+")";break;case"!":i=r,r+=3,e(),s+=n.substr(i,r-i);break;case"<":switch(n[r+3]){case"=":case"!":i=r,r+=4,e(),s+=n.substr(i,r-i);break;default:o(n.indexOf(">",r)-r+1),s+=e()+"|$)"}}else o(1),s+=e()+"|$)";break;case")":return++r,s;default:a(1)}return s}(),e.flags)}(e),r=t.match(n);return!!r&&r[0].length>0}},1719(e,t,n){"use strict";n.d(t,{B5:()=>o,Rf:()=>a,Td:()=>c,Vj:()=>l,fq:()=>r,iD:()=>u});class r{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){const e=this.iterator();return Boolean(e.next().done)}count(){const e=this.iterator();let t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){const e=[],t=this.iterator();let n;do{n=t.next(),void 0!==n.value&&e.push(n.value)}while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){const n=this.map(n=>[e?e(n):n,t?t(n):n]);return new Map(n)}toString(){return this.join()}concat(e){return new r(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do{if(t=this.nextFn(e.first),!t.done)return t}while(!t.done);e.firstDone=!0}do{if(t=e.iterator.next(),!t.done)return t}while(!t.done);return a})}join(e=","){const t=this.iterator();let n,r="",s=!1;do{n=t.next(),n.done||(s&&(r+=e),r+=i(n.value)),s=!0}while(!n.done);return r}indexOf(e,t=0){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){const t=this.iterator();let n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(e){return new r(this.startFn,t=>{const{done:n,value:r}=this.nextFn(t);return n?a:{done:!1,value:e(r)}})}filter(e){return new r(this.startFn,t=>{let n;do{if(n=this.nextFn(t),!n.done&&e(n.value))return n}while(!n.done);return a})}nonNullable(){return this.filter(e=>null!=e)}reduce(e,t){const n=this.iterator();let r=t,i=n.next();for(;!i.done;)r=void 0===r?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){const r=e.next();if(r.done)return n;const i=this.recursiveReduce(e,t,n);return void 0===i?r.value:t(i,r.value)}find(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){const t=this.iterator();let n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(e){return new r(()=>({this:this.startFn()}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}const{done:n,value:r}=this.nextFn(t.this);if(!n){const n=e(r);if(!s(n))return{done:!1,value:n};t.iterator=n[Symbol.iterator]()}}while(t.iterator);return a})}flat(e){if(void 0===e&&(e=1),e<=0)return this;const t=e>1?this.flat(e-1):this;return new r(()=>({this:t.startFn()}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}const{done:n,value:r}=t.nextFn(e.this);if(!n){if(!s(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return a})}head(){const e=this.iterator().next();if(!e.done)return e.value}tail(e=1){return new r(()=>{const t=this.startFn();for(let n=0;n<e;n++)if(this.nextFn(t).done)return t;return t},this.nextFn)}limit(e){return new r(()=>({size:0,state:this.startFn()}),t=>(t.size++,t.size>e?a:this.nextFn(t.state)))}distinct(e){return new r(()=>({set:new Set,internalState:this.startFn()}),t=>{let n;do{if(n=this.nextFn(t.internalState),!n.done){const r=e?e(n.value):n.value;if(!t.set.has(r))return t.set.add(r),n}}while(!n.done);return a})}exclude(e,t){const n=new Set;for(const r of e){const e=t?t(r):r;n.add(e)}return this.filter(e=>{const r=t?t(e):e;return!n.has(r)})}}function i(e){return"string"==typeof e?e:void 0===e?"undefined":"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}function s(e){return!!e&&"function"==typeof e[Symbol.iterator]}const o=new r(()=>{},()=>a),a=Object.freeze({done:!0,value:void 0});function c(...e){if(1===e.length){const t=e[0];if(t instanceof r)return t;if(s(t))return new r(()=>t[Symbol.iterator](),e=>e.next());if("number"==typeof t.length)return new r(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:a)}return e.length>1?new r(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}if(t.collIndex<e.length){const n=e[t.collIndex++];s(n)?t.iterator=n[Symbol.iterator]():n&&"number"==typeof n.length&&(t.array=n)}}while(t.iterator||t.array||t.collIndex<e.length);return a}):o}class l extends r{constructor(e,t,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);e.iterators.length>0;){const n=e.iterators[e.iterators.length-1].next();if(!n.done)return e.iterators.push(t(n.value)[Symbol.iterator]()),n;e.iterators.pop()}return a})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var u;!function(e){e.sum=function(e){return e.reduce((e,t)=>e+t,0)},e.product=function(e){return e.reduce((e,t)=>e*t,0)},e.min=function(e){return e.reduce((e,t)=>Math.min(e,t))},e.max=function(e){return e.reduce((e,t)=>Math.max(e,t))}}(u||(u={}))},1917(e,t,n){"use strict";n.d(t,{D:()=>i});class r{stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}}const i={fileSystemProvider:()=>new r}},6203(e,t,n){"use strict";var r,i,s,o,a,c,l,u,d,h,p,f,m,g,y,T,v,R,E,k,S,C,x,A,b,$,w,N,I,_,P,L,O,D,M,F,q,j,U,G,z,B,K,W,V,H,Y,X,Q,J,Z,ee,te,ne,re,ie,se,oe,ae,ce,le,ue,de,he,pe,fe,me,ge,ye,Te,ve,Re,Ee,ke,Se,Ce,xe,Ae;n.r(t),n.d(t,{AnnotatedTextEdit:()=>x,ChangeAnnotation:()=>S,ChangeAnnotationIdentifier:()=>C,CodeAction:()=>se,CodeActionContext:()=>ie,CodeActionKind:()=>ne,CodeActionTriggerKind:()=>re,CodeDescription:()=>v,CodeLens:()=>oe,Color:()=>d,ColorInformation:()=>h,ColorPresentation:()=>p,Command:()=>E,CompletionItem:()=>z,CompletionItemKind:()=>M,CompletionItemLabelDetails:()=>G,CompletionItemTag:()=>q,CompletionList:()=>B,CreateFile:()=>b,DeleteFile:()=>w,Diagnostic:()=>R,DiagnosticRelatedInformation:()=>g,DiagnosticSeverity:()=>y,DiagnosticTag:()=>T,DocumentHighlight:()=>X,DocumentHighlightKind:()=>Y,DocumentLink:()=>ce,DocumentSymbol:()=>te,DocumentUri:()=>r,EOL:()=>Ne,FoldingRange:()=>m,FoldingRangeKind:()=>f,FormattingOptions:()=>ae,Hover:()=>W,InlayHint:()=>ve,InlayHintKind:()=>ye,InlayHintLabelPart:()=>Te,InlineCompletionContext:()=>xe,InlineCompletionItem:()=>Ee,InlineCompletionList:()=>ke,InlineCompletionTriggerKind:()=>Se,InlineValueContext:()=>ge,InlineValueEvaluatableExpression:()=>me,InlineValueText:()=>pe,InlineValueVariableLookup:()=>fe,InsertReplaceEdit:()=>j,InsertTextFormat:()=>F,InsertTextMode:()=>U,Location:()=>l,LocationLink:()=>u,MarkedString:()=>K,MarkupContent:()=>D,MarkupKind:()=>O,OptionalVersionedTextDocumentIdentifier:()=>P,ParameterInformation:()=>V,Position:()=>a,Range:()=>c,RenameFile:()=>$,SelectedCompletionInfo:()=>Ce,SelectionRange:()=>le,SemanticTokenModifiers:()=>de,SemanticTokenTypes:()=>ue,SemanticTokens:()=>he,SignatureInformation:()=>H,StringValue:()=>Re,SymbolInformation:()=>Z,SymbolKind:()=>Q,SymbolTag:()=>J,TextDocument:()=>Ie,TextDocumentEdit:()=>A,TextDocumentIdentifier:()=>I,TextDocumentItem:()=>L,TextEdit:()=>k,URI:()=>i,VersionedTextDocumentIdentifier:()=>_,WorkspaceChange:()=>we,WorkspaceEdit:()=>N,WorkspaceFolder:()=>Ae,WorkspaceSymbol:()=>ee,integer:()=>s,uinteger:()=>o}),function(e){e.is=function(e){return"string"==typeof e}}(r||(r={})),function(e){e.is=function(e){return"string"==typeof e}}(i||(i={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(o||(o={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=o.MAX_VALUE),t===Number.MAX_VALUE&&(t=o.MAX_VALUE),{line:e,character:t}},e.is=function(e){let t=e;return _e.objectLiteral(t)&&_e.uinteger(t.line)&&_e.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,n,r){if(_e.uinteger(e)&&_e.uinteger(t)&&_e.uinteger(n)&&_e.uinteger(r))return{start:a.create(e,t),end:a.create(n,r)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},e.is=function(e){let t=e;return _e.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}}(c||(c={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){let t=e;return _e.objectLiteral(t)&&c.is(t.range)&&(_e.string(t.uri)||_e.undefined(t.uri))}}(l||(l={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){let t=e;return _e.objectLiteral(t)&&c.is(t.targetRange)&&_e.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||_e.undefined(t.originSelectionRange))}}(u||(u={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){const t=e;return _e.objectLiteral(t)&&_e.numberRange(t.red,0,1)&&_e.numberRange(t.green,0,1)&&_e.numberRange(t.blue,0,1)&&_e.numberRange(t.alpha,0,1)}}(d||(d={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return _e.objectLiteral(t)&&c.is(t.range)&&d.is(t.color)}}(h||(h={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return _e.objectLiteral(t)&&_e.string(t.label)&&(_e.undefined(t.textEdit)||k.is(t))&&(_e.undefined(t.additionalTextEdits)||_e.typedArray(t.additionalTextEdits,k.is))}}(p||(p={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(f||(f={})),function(e){e.create=function(e,t,n,r,i,s){const o={startLine:e,endLine:t};return _e.defined(n)&&(o.startCharacter=n),_e.defined(r)&&(o.endCharacter=r),_e.defined(i)&&(o.kind=i),_e.defined(s)&&(o.collapsedText=s),o},e.is=function(e){const t=e;return _e.objectLiteral(t)&&_e.uinteger(t.startLine)&&_e.uinteger(t.startLine)&&(_e.undefined(t.startCharacter)||_e.uinteger(t.startCharacter))&&(_e.undefined(t.endCharacter)||_e.uinteger(t.endCharacter))&&(_e.undefined(t.kind)||_e.string(t.kind))}}(m||(m={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){let t=e;return _e.defined(t)&&l.is(t.location)&&_e.string(t.message)}}(g||(g={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(y||(y={})),function(e){e.Unnecessary=1,e.Deprecated=2}(T||(T={})),function(e){e.is=function(e){const t=e;return _e.objectLiteral(t)&&_e.string(t.href)}}(v||(v={})),function(e){e.create=function(e,t,n,r,i,s){let o={range:e,message:t};return _e.defined(n)&&(o.severity=n),_e.defined(r)&&(o.code=r),_e.defined(i)&&(o.source=i),_e.defined(s)&&(o.relatedInformation=s),o},e.is=function(e){var t;let n=e;return _e.defined(n)&&c.is(n.range)&&_e.string(n.message)&&(_e.number(n.severity)||_e.undefined(n.severity))&&(_e.integer(n.code)||_e.string(n.code)||_e.undefined(n.code))&&(_e.undefined(n.codeDescription)||_e.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(_e.string(n.source)||_e.undefined(n.source))&&(_e.undefined(n.relatedInformation)||_e.typedArray(n.relatedInformation,g.is))}}(R||(R={})),function(e){e.create=function(e,t,...n){let r={title:e,command:t};return _e.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){let t=e;return _e.defined(t)&&_e.string(t.title)&&_e.string(t.command)}}(E||(E={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return _e.objectLiteral(t)&&_e.string(t.newText)&&c.is(t.range)}}(k||(k={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return _e.objectLiteral(t)&&_e.string(t.label)&&(_e.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(_e.string(t.description)||void 0===t.description)}}(S||(S={})),function(e){e.is=function(e){const t=e;return _e.string(t)}}(C||(C={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return k.is(t)&&(S.is(t.annotationId)||C.is(t.annotationId))}}(x||(x={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return _e.defined(t)&&P.is(t.textDocument)&&Array.isArray(t.edits)}}(A||(A={})),function(e){e.create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"create"===t.kind&&_e.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||_e.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||_e.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(b||(b={})),function(e){e.create=function(e,t,n,r){let i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},e.is=function(e){let t=e;return t&&"rename"===t.kind&&_e.string(t.oldUri)&&_e.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||_e.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||_e.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}($||($={})),function(e){e.create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"delete"===t.kind&&_e.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||_e.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||_e.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(w||(w={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>_e.string(e.kind)?b.is(e)||$.is(e)||w.is(e):A.is(e)))}}(N||(N={}));class be{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let r,i;if(void 0===n?r=k.insert(e,t):C.is(n)?(i=n,r=x.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=x.insert(e,t,i)),this.edits.push(r),void 0!==i)return i}replace(e,t,n){let r,i;if(void 0===n?r=k.replace(e,t):C.is(n)?(i=n,r=x.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=x.replace(e,t,i)),this.edits.push(r),void 0!==i)return i}delete(e,t){let n,r;if(void 0===t?n=k.del(e):C.is(t)?(r=t,n=x.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=x.del(e,r)),this.edits.push(n),void 0!==r)return r}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}}class $e{constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(C.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error(`Id ${n} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}}class we{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new $e(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(A.is(e)){const t=new be(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{const n=new be(e.changes[t]);this._textEditChanges[t]=n})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(P.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let n=this._textEditChanges[t.uri];if(!n){const e=[],r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r),n=new be(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n,t=new be(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new $e,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,i,s;if(S.is(t)||C.is(t)?r=t:n=t,void 0===r?i=b.create(e,n):(s=C.is(r)?r:this._changeAnnotations.manage(r),i=b.create(e,n,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s}renameFile(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,s,o;if(S.is(n)||C.is(n)?i=n:r=n,void 0===i?s=$.create(e,t,r):(o=C.is(i)?i:this._changeAnnotations.manage(i),s=$.create(e,t,r,o)),this._workspaceEdit.documentChanges.push(s),void 0!==o)return o}deleteFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,i,s;if(S.is(t)||C.is(t)?r=t:n=t,void 0===r?i=w.create(e,n):(s=C.is(r)?r:this._changeAnnotations.manage(r),i=w.create(e,n,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s}}!function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return _e.defined(t)&&_e.string(t.uri)}}(I||(I={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return _e.defined(t)&&_e.string(t.uri)&&_e.integer(t.version)}}(_||(_={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return _e.defined(t)&&_e.string(t.uri)&&(null===t.version||_e.integer(t.version))}}(P||(P={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){let t=e;return _e.defined(t)&&_e.string(t.uri)&&_e.string(t.languageId)&&_e.integer(t.version)&&_e.string(t.text)}}(L||(L={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(O||(O={})),function(e){e.is=function(e){const t=e;return _e.objectLiteral(e)&&O.is(t.kind)&&_e.string(t.value)}}(D||(D={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(M||(M={})),function(e){e.PlainText=1,e.Snippet=2}(F||(F={})),function(e){e.Deprecated=1}(q||(q={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&_e.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}(j||(j={})),function(e){e.asIs=1,e.adjustIndentation=2}(U||(U={})),function(e){e.is=function(e){const t=e;return t&&(_e.string(t.detail)||void 0===t.detail)&&(_e.string(t.description)||void 0===t.description)}}(G||(G={})),function(e){e.create=function(e){return{label:e}}}(z||(z={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(B||(B={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return _e.string(t)||_e.objectLiteral(t)&&_e.string(t.language)&&_e.string(t.value)}}(K||(K={})),function(e){e.is=function(e){let t=e;return!!t&&_e.objectLiteral(t)&&(D.is(t.contents)||K.is(t.contents)||_e.typedArray(t.contents,K.is))&&(void 0===e.range||c.is(e.range))}}(W||(W={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(V||(V={})),function(e){e.create=function(e,t,...n){let r={label:e};return _e.defined(t)&&(r.documentation=t),_e.defined(n)?r.parameters=n:r.parameters=[],r}}(H||(H={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Y||(Y={})),function(e){e.create=function(e,t){let n={range:e};return _e.number(t)&&(n.kind=t),n}}(X||(X={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Q||(Q={})),function(e){e.Deprecated=1}(J||(J={})),function(e){e.create=function(e,t,n,r,i){let s={name:e,kind:t,location:{uri:r,range:n}};return i&&(s.containerName=i),s}}(Z||(Z={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(ee||(ee={})),function(e){e.create=function(e,t,n,r,i,s){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==s&&(o.children=s),o},e.is=function(e){let t=e;return t&&_e.string(t.name)&&_e.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||_e.string(t.detail))&&(void 0===t.deprecated||_e.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(te||(te={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(ne||(ne={})),function(e){e.Invoked=1,e.Automatic=2}(re||(re={})),function(e){e.create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){let t=e;return _e.defined(t)&&_e.typedArray(t.diagnostics,R.is)&&(void 0===t.only||_e.typedArray(t.only,_e.string))&&(void 0===t.triggerKind||t.triggerKind===re.Invoked||t.triggerKind===re.Automatic)}}(ie||(ie={})),function(e){e.create=function(e,t,n){let r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):E.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},e.is=function(e){let t=e;return t&&_e.string(t.title)&&(void 0===t.diagnostics||_e.typedArray(t.diagnostics,R.is))&&(void 0===t.kind||_e.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||E.is(t.command))&&(void 0===t.isPreferred||_e.boolean(t.isPreferred))&&(void 0===t.edit||N.is(t.edit))}}(se||(se={})),function(e){e.create=function(e,t){let n={range:e};return _e.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return _e.defined(t)&&c.is(t.range)&&(_e.undefined(t.command)||E.is(t.command))}}(oe||(oe={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return _e.defined(t)&&_e.uinteger(t.tabSize)&&_e.boolean(t.insertSpaces)}}(ae||(ae={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return _e.defined(t)&&c.is(t.range)&&(_e.undefined(t.target)||_e.string(t.target))}}(ce||(ce={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return _e.objectLiteral(n)&&c.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(le||(le={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(ue||(ue={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(de||(de={})),function(e){e.is=function(e){const t=e;return _e.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(he||(he={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&_e.string(t.text)}}(pe||(pe={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&_e.boolean(t.caseSensitiveLookup)&&(_e.string(t.variableName)||void 0===t.variableName)}}(fe||(fe={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&(_e.string(t.expression)||void 0===t.expression)}}(me||(me={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return _e.defined(t)&&c.is(e.stoppedLocation)}}(ge||(ge={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(ye||(ye={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return _e.objectLiteral(t)&&(void 0===t.tooltip||_e.string(t.tooltip)||D.is(t.tooltip))&&(void 0===t.location||l.is(t.location))&&(void 0===t.command||E.is(t.command))}}(Te||(Te={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return _e.objectLiteral(t)&&a.is(t.position)&&(_e.string(t.label)||_e.typedArray(t.label,Te.is))&&(void 0===t.kind||ye.is(t.kind))&&void 0===t.textEdits||_e.typedArray(t.textEdits,k.is)&&(void 0===t.tooltip||_e.string(t.tooltip)||D.is(t.tooltip))&&(void 0===t.paddingLeft||_e.boolean(t.paddingLeft))&&(void 0===t.paddingRight||_e.boolean(t.paddingRight))}}(ve||(ve={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(Re||(Re={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(Ee||(Ee={})),function(e){e.create=function(e){return{items:e}}}(ke||(ke={})),function(e){e.Invoked=0,e.Automatic=1}(Se||(Se={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Ce||(Ce={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(xe||(xe={})),function(e){e.is=function(e){const t=e;return _e.objectLiteral(t)&&i.is(t.uri)&&_e.string(t.name)}}(Ae||(Ae={}));const Ne=["\n","\r\n","\r"];var Ie,_e;!function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,i=e.slice(0,r),s=e.slice(r);t(i,n),t(s,n);let o=0,a=0,c=0;for(;o<i.length&&a<s.length;){let t=n(i[o],s[a]);e[c++]=t<=0?i[o++]:s[a++]}for(;o<i.length;)e[c++]=i[o++];for(;a<s.length;)e[c++]=s[a++];return e}e.create=function(e,t,n,r){return new Pe(e,t,n,r)},e.is=function(e){let t=e;return!!(_e.defined(t)&&_e.string(t.uri)&&(_e.undefined(t.languageId)||_e.string(t.languageId))&&_e.uinteger(t.lineCount)&&_e.func(t.getText)&&_e.func(t.positionAt)&&_e.func(t.offsetAt))},e.applyEdits=function(e,n){let r=e.getText(),i=t(n,(e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}),s=r.length;for(let t=i.length-1;t>=0;t--){let n=i[t],o=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=s))throw new Error("Overlapping edit");r=r.substring(0,o)+n.newText+r.substring(a,r.length),s=o}return r}}(Ie||(Ie={}));class Pe{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&(e.push(r),n=!1);let i=t.charAt(r);n="\r"===i||"\n"===i,"\r"===i&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return a.create(0,e);for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return a.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(_e||(_e={}))},7608(e,t,n){"use strict";var r;n.d(t,{A:()=>s,r:()=>i}),(()=>{var e={975:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,s=-1,o=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(s===a-1||1===o);else if(s!==a-1&&2===o){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),s=a,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,s=a,o=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(s+1,a):r=e.slice(s+1,a),i=a-s-1;s=a,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(r=o+"/"+r,i=47===o.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var s=e.length,o=s-i,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var c=n.length-a,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else o>l&&(47===e.charCodeAt(i+d)?u=d:0===d&&(u=0));break}var h=e.charCodeAt(i+d);if(h!==n.charCodeAt(a+d))break;47===h&&(u=d)}var p="";for(d=i+u+1;d<=s;++d)d!==s&&47!==e.charCodeAt(d)||(0===p.length?p+="..":p+="/..");return p.length>0?p+n.slice(a+u):(a+=u,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!s){i=o;break}}else s=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,s=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(47===l){if(!o){i=r+1;break}}else-1===c&&(o=!1,c=r+1),a>=0&&(l===n.charCodeAt(a)?-1==--a&&(s=r):(a=-1,s=c))}return i===s?s=c:-1===s&&(s=e.length),e.slice(i,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){i=r+1;break}}else-1===s&&(o=!1,s=r+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===i&&(s=!1,i=a+1),46===c?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1);else if(!s){r=a+1;break}}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),s=47===i;s?(n.root="/",r=1):r=0;for(var o=-1,a=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if(47!==(i=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===i?-1===o?o=u:1!==d&&(d=1):-1!==o&&(d=-1);else if(!l){a=u+1;break}return-1===o||-1===c||0===d||1===d&&o===c-1&&o===a+1?-1!==c&&(n.base=n.name=0===a&&s?e.slice(1,c):e.slice(a,c)):(0===a&&s?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(a,o),n.base=e.slice(a,c)),n.ext=e.slice(o,c)),a>0?n.dir=e.slice(0,a-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};let s;if(n.r(i),n.d(i,{URI:()=>p,Utils:()=>b}),"object"==typeof process)s="win32"===process.platform;else if("object"==typeof navigator){let e=navigator.userAgent;s=e.indexOf("Windows")>=0}const o=/^\w[\w\d+.-]*$/,a=/^\//,c=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!a.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(c.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const u="",d="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static isUri(e){return e instanceof p||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,s=!1){"object"==typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||u,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==d&&(t=d+t):t=d}return t}(this.scheme,n||u),this.query=r||u,this.fragment=i||u,l(this,s))}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===n?n=this.authority:null===n&&(n=u),void 0===r?r=this.path:null===r&&(r=u),void 0===i?i=this.query:null===i&&(i=u),void 0===s?s=this.fragment:null===s&&(s=u),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new m(t,n,r,i,s)}static parse(e,t=!1){const n=h.exec(e);return n?new m(n[2]||u,S(n[4]||u),S(n[5]||u),S(n[7]||u),S(n[9]||u),t):new m(u,u,u,u,u)}static file(e){let t=u;if(s&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){const n=e.indexOf(d,2);-1===n?(t=e.substring(2),e=d):(t=e.substring(2,n),e=e.substring(n)||d)}return new m("file",t,e,u,u)}static from(e){const t=new m(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}toString(e=!1){return R(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof p)return e;{const t=new m(e);return t._formatted=e.external,t._fsPath=e._sep===f?e.fsPath:null,t}}return e}}const f=s?1:void 0;class m extends p{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?R(this,!0):(this._formatted||(this._formatted=R(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function y(e,t,n){let r,i=-1;for(let s=0;s<e.length;s++){const o=e.charCodeAt(s);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=g[o];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function T(e){let t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=g[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function v(e,t){let n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,s&&(n=n.replace(/\//g,"\\")),n}function R(e,t){const n=t?T:y;let r="",{scheme:i,authority:s,path:o,query:a,fragment:c}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=d,r+=d),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),c&&(r+="#",r+=t?c:y(c,!1,!1)),r}function E(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+E(e.substr(3)):e}}const k=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function S(e){return e.match(k)?e.replace(k,e=>E(e)):e}var C=n(975);const x=C.posix||C,A="/";var b;!function(e){e.joinPath=function(e,...t){return e.with({path:x.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==A&&(n=A+n,r=!0);let i=x.resolve(n,...t);return r&&i[0]===A&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(0===e.path.length||e.path===A)return e;let t=x.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return x.basename(e.path)},e.extname=function(e){return x.extname(e.path)}}(b||(b={})),r=i})();const{URI:i,Utils:s}=r}}]);1 (globalThis.webpackChunkmindcat=globalThis.webpackChunkmindcat||[]).push([[731],{8859(e,t,n){var r=n(3661),i=n(1380),s=n(1459);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}o.prototype.add=o.prototype.push=i,o.prototype.has=s,e.exports=o},3729(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},9770(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}},5325(e,t,n){var r=n(6131);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},9905(e){e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}},4932(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},4528(e){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},882(e){e.exports=function(e,t,n,r){var i=-1,s=null==e?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}},4248(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},909(e,t,n){var r=n(641),i=n(8329)(r);e.exports=i},3599(e,t,n){var r=n(4394);e.exports=function(e,t,n){for(var i=-1,s=e.length;++i<s;){var o=e[i],a=t(o);if(null!=a&&(void 0===c?a==a&&!r(a):n(a,c)))var c=a,l=o}return l}},6574(e,t,n){var r=n(909);e.exports=function(e,t){var n=[];return r(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}},2523(e){e.exports=function(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}},3120(e,t,n){var r=n(4528),i=n(5891);e.exports=function e(t,n,s,o,a){var c=-1,l=t.length;for(s||(s=i),a||(a=[]);++c<l;){var u=t[c];n>0&&s(u)?n>1?e(u,n-1,s,o,a):r(a,u):o||(a[a.length]=u)}return a}},641(e,t,n){var r=n(6649),i=n(5950);e.exports=function(e,t){return e&&r(e,t,i)}},7422(e,t,n){var r=n(1769),i=n(7797);e.exports=function(e,t){for(var n=0,s=(t=r(t,e)).length;null!=e&&n<s;)e=e[i(t[n++])];return n&&n==s?e:void 0}},2199(e,t,n){var r=n(4528),i=n(6449);e.exports=function(e,t,n){var s=t(e);return i(e)?s:r(s,n(e))}},8077(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},6131(e,t,n){var r=n(2523),i=n(5463),s=n(6959);e.exports=function(e,t,n){return t==t?s(e,t,n):r(e,i,n)}},270(e,t,n){var r=n(7068),i=n(346);e.exports=function e(t,n,s,o,a){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,s,o,e,a))}},7068(e,t,n){var r=n(7217),i=n(5911),s=n(1986),o=n(689),a=n(5861),c=n(6449),l=n(3656),u=n(7167),d="[object Arguments]",h="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,g,y){var T=c(e),v=c(t),R=T?h:a(e),E=v?h:a(t),k=(R=R==d?p:R)==p,S=(E=E==d?p:E)==p,C=R==E;if(C&&l(e)){if(!l(t))return!1;T=!0,k=!1}if(C&&!k)return y||(y=new r),T||u(e)?i(e,t,n,m,g,y):s(e,t,R,n,m,g,y);if(!(1&n)){var x=k&&f.call(e,"__wrapped__"),A=S&&f.call(t,"__wrapped__");if(x||A){var b=x?e.value():e,$=A?t.value():t;return y||(y=new r),g(b,$,n,m,y)}}return!!C&&(y||(y=new r),o(e,t,n,m,g,y))}},1799(e,t,n){var r=n(7217),i=n(270);e.exports=function(e,t,n,s){var o=n.length,a=o,c=!s;if(null==e)return!a;for(e=Object(e);o--;){var l=n[o];if(c&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var u=(l=n[o])[0],d=e[u],h=l[1];if(c&&l[2]){if(void 0===d&&!(u in e))return!1}else{var p=new r;if(s)var f=s(d,h,u,e,t,p);if(!(void 0===f?i(h,d,3,s,p):f))return!1}}return!0}},5463(e){e.exports=function(e){return e!=e}},5389(e,t,n){var r=n(3663),i=n(7978),s=n(3488),o=n(6449),a=n(583);e.exports=function(e){return"function"==typeof e?e:null==e?s:"object"==typeof e?o(e)?i(e[0],e[1]):r(e):a(e)}},6176(e){e.exports=function(e,t){return e<t}},5128(e,t,n){var r=n(909),i=n(4894);e.exports=function(e,t){var n=-1,s=i(e)?Array(e.length):[];return r(e,function(e,r,i){s[++n]=t(e,r,i)}),s}},3663(e,t,n){var r=n(1799),i=n(776),s=n(7197);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?s(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},7978(e,t,n){var r=n(270),i=n(8156),s=n(631),o=n(8586),a=n(756),c=n(7197),l=n(7797);e.exports=function(e,t){return o(e)&&a(t)?c(l(e),t):function(n){var o=i(n,e);return void 0===o&&o===t?s(n,e):r(t,o,3)}}},7237(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7255(e,t,n){var r=n(7422);e.exports=function(e){return function(t){return r(t,e)}}},5558(e){e.exports=function(e,t,n,r,i){return i(e,function(e,i,s){n=r?(r=!1,e):t(n,e,i,s)}),n}},7556(e,t,n){var r=n(1873),i=n(4932),s=n(6449),o=n(4394),a=r?r.prototype:void 0,c=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(s(t))return i(t,e)+"";if(o(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},5765(e,t,n){var r=n(8859),i=n(5325),s=n(9905),o=n(9219),a=n(4517),c=n(4247);e.exports=function(e,t,n){var l=-1,u=i,d=e.length,h=!0,p=[],f=p;if(n)h=!1,u=s;else if(d>=200){var m=t?null:a(e);if(m)return c(m);h=!1,u=o,f=new r}else f=t?[]:p;e:for(;++l<d;){var g=e[l],y=t?t(g):g;if(g=n||0!==g?g:0,h&&y==y){for(var T=f.length;T--;)if(f[T]===y)continue e;t&&f.push(y),p.push(g)}else u(f,y,n)||(f!==p&&f.push(y),p.push(g))}return p}},9219(e){e.exports=function(e,t){return e.has(t)}},4066(e,t,n){var r=n(3488);e.exports=function(e){return"function"==typeof e?e:r}},1769(e,t,n){var r=n(6449),i=n(8586),s=n(1802),o=n(3222);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:s(o(e))}},8329(e,t,n){var r=n(4894);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var s=n.length,o=t?s:-1,a=Object(n);(t?o--:++o<s)&&!1!==i(a[o],o,a););return n}}},4517(e,t,n){var r=n(6545),i=n(3950),s=n(4247),o=r&&1/s(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i;e.exports=o},5911(e,t,n){var r=n(8859),i=n(4248),s=n(9219);e.exports=function(e,t,n,o,a,c){var l=1&n,u=e.length,d=t.length;if(u!=d&&!(l&&d>u))return!1;var h=c.get(e),p=c.get(t);if(h&&p)return h==t&&p==e;var f=-1,m=!0,g=2&n?new r:void 0;for(c.set(e,t),c.set(t,e);++f<u;){var y=e[f],T=t[f];if(o)var v=l?o(T,y,f,t,e,c):o(y,T,f,e,t,c);if(void 0!==v){if(v)continue;m=!1;break}if(g){if(!i(t,function(e,t){if(!s(g,t)&&(y===e||a(y,e,n,o,c)))return g.push(t)})){m=!1;break}}else if(y!==T&&!a(y,T,n,o,c)){m=!1;break}}return c.delete(e),c.delete(t),m}},1986(e,t,n){var r=n(1873),i=n(7828),s=n(5288),o=n(5911),a=n(317),c=n(4247),l=r?r.prototype:void 0,u=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=a;case"[object Set]":var f=1&r;if(p||(p=c),e.size!=t.size&&!f)return!1;var m=h.get(e);if(m)return m==t;r|=2,h.set(e,t);var g=o(p(e),p(t),r,l,d,h);return h.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},689(e,t,n){var r=n(2),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,s,o,a){var c=1&n,l=r(e),u=l.length;if(u!=r(t).length&&!c)return!1;for(var d=u;d--;){var h=l[d];if(!(c?h in t:i.call(t,h)))return!1}var p=a.get(e),f=a.get(t);if(p&&f)return p==t&&f==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=c;++d<u;){var y=e[h=l[d]],T=t[h];if(s)var v=c?s(T,y,h,t,e,a):s(y,T,h,e,t,a);if(!(void 0===v?y===T||o(y,T,n,s,a):v)){m=!1;break}g||(g="constructor"==h)}if(m&&!g){var R=e.constructor,E=t.constructor;R==E||!("constructor"in e)||!("constructor"in t)||"function"==typeof R&&R instanceof R&&"function"==typeof E&&E instanceof E||(m=!1)}return a.delete(e),a.delete(t),m}},2(e,t,n){var r=n(2199),i=n(4664),s=n(5950);e.exports=function(e){return r(e,s,i)}},776(e,t,n){var r=n(756),i=n(5950);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var s=t[n],o=e[s];t[n]=[s,o,r(o)]}return t}},4664(e,t,n){var r=n(9770),i=n(3345),s=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,a=o?function(e){return null==e?[]:(e=Object(e),r(o(e),function(t){return s.call(e,t)}))}:i;e.exports=a},9326(e,t,n){var r=n(1769),i=n(2428),s=n(6449),o=n(361),a=n(294),c=n(7797);e.exports=function(e,t,n){for(var l=-1,u=(t=r(t,e)).length,d=!1;++l<u;){var h=c(t[l]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++l!=u?d:!!(u=null==e?0:e.length)&&a(u)&&o(h,u)&&(s(e)||i(e))}},5891(e,t,n){var r=n(1873),i=n(2428),s=n(6449),o=r?r.isConcatSpreadable:void 0;e.exports=function(e){return s(e)||i(e)||!!(o&&e&&e[o])}},8586(e,t,n){var r=n(6449),i=n(4394),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||o.test(e)||!s.test(e)||null!=t&&e in Object(t)}},756(e,t,n){var r=n(3805);e.exports=function(e){return e==e&&!r(e)}},317(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},7197(e){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},2224(e,t,n){var r=n(104);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},1380(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1459(e){e.exports=function(e){return this.__data__.has(e)}},4247(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},6959(e){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},1802(e,t,n){var r=n(2224),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,o=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,n,r,i){t.push(r?i.replace(s,"$1"):n||e)}),t});e.exports=o},7797(e,t,n){var r=n(4394);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7612(e,t,n){var r=n(9770),i=n(6574),s=n(5389),o=n(6449);e.exports=function(e,t){return(o(e)?r:i)(e,s(t,3))}},7307(e,t,n){var r=n(3120),i=n(2997);e.exports=function(e,t){return r(i(e,t),1)}},5970(e,t,n){var r=n(3120);e.exports=function(e){return null!=e&&e.length?r(e,1):[]}},9754(e,t,n){var r=n(3729),i=n(909),s=n(4066),o=n(6449);e.exports=function(e,t){return(o(e)?r:i)(e,s(t))}},8156(e,t,n){var r=n(7422);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},631(e,t,n){var r=n(8077),i=n(9326);e.exports=function(e,t){return null!=e&&i(e,t,r)}},4394(e,t,n){var r=n(2552),i=n(346);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},5950(e,t,n){var r=n(695),i=n(8984),s=n(4894);e.exports=function(e){return s(e)?r(e):i(e)}},2997(e,t,n){var r=n(4932),i=n(5389),s=n(5128),o=n(6449);e.exports=function(e,t){return(o(e)?r:s)(e,i(t,3))}},1684(e,t,n){var r=n(3599),i=n(6176),s=n(3488);e.exports=function(e){return e&&e.length?r(e,s,i):void 0}},3950(e){e.exports=function(){}},583(e,t,n){var r=n(7237),i=n(7255),s=n(8586),o=n(7797);e.exports=function(e){return s(e)?r(o(e)):i(e)}},860(e,t,n){var r=n(882),i=n(909),s=n(5389),o=n(5558),a=n(6449);e.exports=function(e,t,n){var c=a(e)?r:o,l=arguments.length<3;return c(e,s(t,4),n,l,i)}},3345(e){e.exports=function(){return[]}},3222(e,t,n){var r=n(7556);e.exports=function(e){return null==e?"":r(e)}},14(e,t,n){var r=n(5389),i=n(5765);e.exports=function(e,t){return e&&e.length?i(e,r(t,2)):[]}},2116(e,t,n){"use strict";e.exports=n(6439)},6439(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0,n(4615).default.install();const s=n(3281);i(n(3281),t);class o extends s.AbstractMessageReader{constructor(e){super(),this._onData=new s.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}}t.BrowserMessageReader=o;class a extends s.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.BrowserMessageWriter=a,t.createMessageConnection=function(e,t,n,r){return void 0===n&&(n=s.NullLogger),s.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,s.createMessageConnection)(e,t,n,r)}},4615(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3281);class i extends r.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return i.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}}i.emptyBuffer=new Uint8Array(0);class s{constructor(e){this.socket=e,this._onData=new r.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,r.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}}class o{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,t){if("string"==typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}}const a=new TextEncoder,c=Object.freeze({messageBuffer:Object.freeze({create:e=>new i(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if("utf-8"!==t.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(a.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new s(e),asWritableStream:e=>new o(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){const r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){const n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setInterval(e,t,...n){const r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function l(){return c}!function(e){e.install=function(){r.RAL.install(c)}}(l||(l={})),t.default=l},3281(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;const r=n(6177);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return r.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return r.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return r.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return r.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return r.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return r.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return r.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return r.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return r.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return r.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return r.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return r.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return r.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return r.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return r.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return r.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return r.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return r.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return r.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return r.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return r.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return r.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return r.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return r.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return r.ParameterStructures}});const i=n(3352);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return i.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return i.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return i.Touch}});const s=n(4019);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return s.Disposable}});const o=n(2676);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return o.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return o.Emitter}});const a=n(9850);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return a.CancellationToken}});const c=n(4996);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return c.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return c.SharedArrayReceiverStrategy}});const l=n(9085);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return l.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return l.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return l.ReadableStreamMessageReader}});const u=n(3193);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return u.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return u.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return u.WriteableStreamMessageWriter}});const d=n(9244);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return d.AbstractMessageBuffer}});const h=n(577);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return h.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return h.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return h.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return h.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return h.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return h.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return h.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return h.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return h.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return h.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return h.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return h.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return h.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return h.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return h.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return h.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return h.MessageStrategy}});const p=n(9590);t.RAL=p.default},9850(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const r=n(9590),i=n(8585),s=n(2676);var o;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:s.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:s.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(o||(t.CancellationToken=o={}));const a=Object.freeze(function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}});class c{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new s.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=o.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=o.None}}},577(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const r=n(9590),i=n(8585),s=n(6177),o=n(3352),a=n(2676),c=n(9850);var l,u,d,h,p,f,m,g,y,T,v,R,E,k,S,C,x,A,b;!function(e){e.type=new s.NotificationType("$/cancelRequest")}(l||(l={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(u||(t.ProgressToken=u={})),function(e){e.type=new s.NotificationType("$/progress")}(d||(d={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return i.func(e)}}(h||(h={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(p||(t.Trace=p={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(f||(t.TraceValues=f={})),function(e){e.fromString=function(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(p||(t.Trace=p={})),function(e){e.Text="text",e.JSON="json"}(m||(t.TraceFormat=m={})),function(e){e.fromString=function(t){return i.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(m||(t.TraceFormat=m={})),function(e){e.type=new s.NotificationType("$/setTrace")}(g||(t.SetTraceNotification=g={})),function(e){e.type=new s.NotificationType("$/logTrace")}(y||(t.LogTraceNotification=y={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(T||(t.ConnectionErrors=T={}));class $ extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,$.prototype)}}t.ConnectionError=$,function(e){e.is=function(e){const t=e;return t&&i.func(t.cancelUndispatched)}}(v||(t.ConnectionStrategy=v={})),function(e){e.is=function(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&i.func(t.createCancellationTokenSource)&&(void 0===t.dispose||i.func(t.dispose))}}(R||(t.IdCancellationReceiverStrategy=R={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&i.func(t.createCancellationTokenSource)&&(void 0===t.dispose||i.func(t.dispose))}}(E||(t.RequestCancellationReceiverStrategy=E={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){return R.is(e)||E.is(e)}}(k||(t.CancellationReceiverStrategy=k={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(l.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&i.func(t.sendCancellation)&&i.func(t.cleanup)}}(S||(t.CancellationSenderStrategy=S={})),function(e){e.Message=Object.freeze({receiver:k.Message,sender:S.Message}),e.is=function(e){const t=e;return t&&k.is(t.receiver)&&S.is(t.sender)}}(C||(t.CancellationStrategy=C={})),function(e){e.is=function(e){const t=e;return t&&i.func(t.handleMessage)}}(x||(t.MessageStrategy=x={})),function(e){e.is=function(e){const t=e;return t&&(C.is(t.cancellationStrategy)||v.is(t.connectionStrategy)||x.is(t.messageStrategy))}}(A||(t.ConnectionOptions=A={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(b||(b={})),t.createMessageConnection=function(e,n,f,v){const E=void 0!==f?f:t.NullLogger;let k=0,S=0,A=0;const w="2.0";let N;const I=new Map;let _;const P=new Map,L=new Map;let O,D,M=new o.LinkedMap,F=new Map,q=new Set,j=new Map,U=p.Off,G=m.Text,z=b.New;const B=new a.Emitter,K=new a.Emitter,W=new a.Emitter,V=new a.Emitter,H=new a.Emitter,Y=v&&v.cancellationStrategy?v.cancellationStrategy:C.Message;function X(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function Q(e){}function J(){return z===b.Listening}function Z(){return z===b.Closed}function ee(){return z===b.Disposed}function te(){z!==b.New&&z!==b.Listening||(z=b.Closed,K.fire(void 0))}function ne(){O||0===M.size||(O=(0,r.default)().timer.setImmediate(()=>{O=void 0,function(){if(0===M.size)return;const e=M.shift();try{const t=v?.messageStrategy;x.is(t)?t.handleMessage(e,re):re(e)}finally{ne()}}()}))}function re(e){s.Message.isRequest(e)?function(e){if(ee())return;function t(t,r,i){const o={jsonrpc:w,id:e.id};t instanceof s.ResponseError?o.error=t.toJson():o.result=void 0===t?null:t,oe(o,r,i),n.write(o).catch(()=>E.error("Sending response failed."))}function r(t,r,i){const s={jsonrpc:w,id:e.id,error:t.toJson()};oe(s,r,i),n.write(s).catch(()=>E.error("Sending response failed."))}!function(e){if(U!==p.Off&&D)if(G===m.Text){let t;U!==p.Verbose&&U!==p.Compact||!e.params||(t=`Params: ${se(e.params)}\n\n`),D.log(`Received request '${e.method} - (${e.id})'.`,t)}else ce("receive-request",e)}(e);const o=I.get(e.method);let a,c;o&&(a=o.type,c=o.handler);const l=Date.now();if(c||N){const o=e.id??String(Date.now()),u=R.is(Y.receiver)?Y.receiver.createCancellationTokenSource(o):Y.receiver.createCancellationTokenSource(e);null!==e.id&&q.has(e.id)&&u.cancel(),null!==e.id&&j.set(o,u);try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but received none.`),e.method,l);d=c(u.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===s.ParameterStructures.byName)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,l);d=c(...e.params,u.token)}else{if(void 0!==a&&a.parameterStructures===s.ParameterStructures.byPosition)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,l);d=c(e.params,u.token)}else N&&(d=N(e.method,e.params,u.token));const h=d;d?h.then?h.then(n=>{j.delete(o),t(n,e.method,l)},t=>{j.delete(o),t instanceof s.ResponseError?r(t,e.method,l):t&&i.string(t.message)?r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}):(j.delete(o),t(d,e.method,l)):(j.delete(o),function(t,r,i){void 0===t&&(t=null);const s={jsonrpc:w,id:e.id,result:t};oe(s,r,i),n.write(s).catch(()=>E.error("Sending response failed."))}(d,e.method,l))}catch(n){j.delete(o),n instanceof s.ResponseError?t(n,e.method,l):n&&i.string(n.message)?r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,l):r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}}else r(new s.ResponseError(s.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,l)}(e):s.Message.isNotification(e)?function(e){if(ee())return;let t,n;if(e.method===l.type.method){const t=e.params.id;return q.delete(t),void ae(e)}{const r=P.get(e.method);r&&(n=r.handler,t=r.type)}if(n||_)try{if(ae(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==s.ParameterStructures.byName&&E.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){const r=e.params;e.method===d.type.method&&2===r.length&&u.is(r[0])?n({token:r[0],value:r[1]}):(void 0!==t&&(t.parameterStructures===s.ParameterStructures.byName&&E.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&E.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${r.length} arguments`)),n(...r))}else void 0!==t&&t.parameterStructures===s.ParameterStructures.byPosition&&E.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else _&&_(e.method,e.params)}catch(t){t.message?E.error(`Notification handler '${e.method}' failed with message: ${t.message}`):E.error(`Notification handler '${e.method}' failed unexpectedly.`)}else W.fire(e)}(e):s.Message.isResponse(e)?function(e){if(!ee())if(null===e.id)e.error?E.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):E.error("Received response message without id. No further error information provided.");else{const t=e.id,n=F.get(t);if(function(e,t){if(U!==p.Off&&D)if(G===m.Text){let n;if(U!==p.Verbose&&U!==p.Compact||(e.error&&e.error.data?n=`Error data: ${se(e.error.data)}\n\n`:e.result?n=`Result: ${se(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";D.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else D.log(`Received response ${e.id} without active response promise.`,n)}else ce("receive-response",e)}(e,n),void 0!==n){F.delete(t);try{if(e.error){const t=e.error;n.reject(new s.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(e){e.message?E.error(`Response handler '${n.method}' failed with message: ${e.message}`):E.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void E.error("Received empty message.");E.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(i.string(t.id)||i.number(t.id)){const e=t.id,n=F.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(te),e.onError(function(e){B.fire([e,void 0,void 0])}),n.onClose(te),n.onError(function(e){B.fire(e)});const ie=e=>{try{if(s.Message.isNotification(e)&&e.method===l.type.method){const t=e.params.id,r=X(t),i=M.get(r);if(s.Message.isRequest(i)){const s=v?.connectionStrategy,o=s&&s.cancelUndispatched?s.cancelUndispatched(i,Q):void 0;if(o&&(void 0!==o.error||void 0!==o.result))return M.delete(r),j.delete(t),o.id=i.id,oe(o,e.method,Date.now()),void n.write(o).catch(()=>E.error("Sending response for canceled message failed."))}const o=j.get(t);if(void 0!==o)return o.cancel(),void ae(e);q.add(t)}!function(e,t){var n;s.Message.isRequest(t)?e.set(X(t.id),t):s.Message.isResponse(t)?e.set(null===(n=t.id)?"res-unknown-"+(++A).toString():"res-"+n.toString(),t):e.set("not-"+(++S).toString(),t)}(M,e)}finally{ne()}};function se(e){if(null!=e)switch(U){case p.Verbose:return JSON.stringify(e,null,4);case p.Compact:return JSON.stringify(e);default:return}}function oe(e,t,n){if(U!==p.Off&&D)if(G===m.Text){let r;U!==p.Verbose&&U!==p.Compact||(e.error&&e.error.data?r=`Error data: ${se(e.error.data)}\n\n`:e.result?r=`Result: ${se(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),D.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else ce("send-response",e)}function ae(e){if(U!==p.Off&&D&&e.method!==y.type.method)if(G===m.Text){let t;U!==p.Verbose&&U!==p.Compact||(t=e.params?`Params: ${se(e.params)}\n\n`:"No parameters provided.\n\n"),D.log(`Received notification '${e.method}'.`,t)}else ce("receive-notification",e)}function ce(e,t){if(!D||U===p.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};D.log(n)}function le(){if(Z())throw new $(T.Closed,"Connection is closed.");if(ee())throw new $(T.Disposed,"Connection is disposed.")}function ue(e){return void 0===e?null:e}function de(e){return null===e?void 0:e}function he(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function pe(e,t){switch(e){case s.ParameterStructures.auto:return he(t)?de(t):[ue(t)];case s.ParameterStructures.byName:if(!he(t))throw new Error("Received parameters by name but param is not an object literal.");return de(t);case s.ParameterStructures.byPosition:return[ue(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function fe(e,t){let n;const r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=pe(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(ue(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null)}return n}const me={sendNotification:(e,...t)=>{let r,o;if(le(),i.string(e)){r=e;const n=t[0];let i=0,a=s.ParameterStructures.auto;s.ParameterStructures.is(n)&&(i=1,a=n);let c=t.length;const l=c-i;switch(l){case 0:o=void 0;break;case 1:o=pe(a,t[i]);break;default:if(a===s.ParameterStructures.byName)throw new Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);o=t.slice(i,c).map(e=>ue(e))}}else{const n=t;r=e.method,o=fe(e,n)}const a={jsonrpc:w,method:r,params:o};return function(e){if(U!==p.Off&&D)if(G===m.Text){let t;U!==p.Verbose&&U!==p.Compact||(t=e.params?`Params: ${se(e.params)}\n\n`:"No parameters provided.\n\n"),D.log(`Sending notification '${e.method}'.`,t)}else ce("send-notification",e)}(a),n.write(a).catch(e=>{throw E.error("Sending notification failed."),e})},onNotification:(e,t)=>{let n;return le(),i.func(e)?_=e:t&&(i.string(e)?(n=e,P.set(e,{type:void 0,handler:t})):(n=e.method,P.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?P.delete(n):_=void 0}}},onProgress:(e,t,n)=>{if(L.has(t))throw new Error(`Progress handler for token ${t} already registered`);return L.set(t,n),{dispose:()=>{L.delete(t)}}},sendProgress:(e,t,n)=>me.sendNotification(d.type,{token:t,value:n}),onUnhandledProgress:V.event,sendRequest:(e,...t)=>{let r,o,a;if(le(),function(){if(!J())throw new Error("Call listen() first.")}(),i.string(e)){r=e;const n=t[0],i=t[t.length-1];let l=0,u=s.ParameterStructures.auto;s.ParameterStructures.is(n)&&(l=1,u=n);let d=t.length;c.CancellationToken.is(i)&&(d-=1,a=i);const h=d-l;switch(h){case 0:o=void 0;break;case 1:o=pe(u,t[l]);break;default:if(u===s.ParameterStructures.byName)throw new Error(`Received ${h} parameters for 'by Name' request parameter structure.`);o=t.slice(l,d).map(e=>ue(e))}}else{const n=t;r=e.method,o=fe(e,n);const i=e.numberOfParams;a=c.CancellationToken.is(n[i])?n[i]:void 0}const l=k++;let u;a&&(u=a.onCancellationRequested(()=>{const e=Y.sender.sendCancellation(me,l);return void 0===e?(E.log(`Received no promise from cancellation strategy when cancelling id ${l}`),Promise.resolve()):e.catch(()=>{E.log(`Sending cancellation messages for id ${l} failed`)})}));const d={jsonrpc:w,id:l,method:r,params:o};return function(e){if(U!==p.Off&&D)if(G===m.Text){let t;U!==p.Verbose&&U!==p.Compact||!e.params||(t=`Params: ${se(e.params)}\n\n`),D.log(`Sending request '${e.method} - (${e.id})'.`,t)}else ce("send-request",e)}(d),"function"==typeof Y.sender.enableCancellation&&Y.sender.enableCancellation(d),new Promise(async(e,t)=>{const i={method:r,timerStart:Date.now(),resolve:t=>{e(t),Y.sender.cleanup(l),u?.dispose()},reject:e=>{t(e),Y.sender.cleanup(l),u?.dispose()}};try{await n.write(d),F.set(l,i)}catch(e){throw E.error("Sending request failed."),i.reject(new s.ResponseError(s.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),e}})},onRequest:(e,t)=>{le();let n=null;return h.is(e)?(n=void 0,N=e):i.string(e)?(n=null,void 0!==t&&(n=e,I.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,I.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?I.delete(n):N=void 0)}}},hasPendingResponse:()=>F.size>0,trace:async(e,t,n)=>{let r=!1,s=m.Text;void 0!==n&&(i.boolean(n)?r=n:(r=n.sendNotification||!1,s=n.traceFormat||m.Text)),U=e,G=s,D=U===p.Off?void 0:t,!r||Z()||ee()||await me.sendNotification(g.type,{value:p.toString(e)})},onError:B.event,onClose:K.event,onUnhandledNotification:W.event,onDispose:H.event,end:()=>{n.end()},dispose:()=>{if(ee())return;z=b.Disposed,H.fire(void 0);const t=new s.ResponseError(s.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of F.values())e.reject(t);F=new Map,j=new Map,q=new Set,M=new o.LinkedMap,i.func(n.dispose)&&n.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{le(),function(){if(J())throw new $(T.AlreadyListening,"Connection is already listening")}(),z=b.Listening,e.listen(ie)},inspect:()=>{(0,r.default)().console.log("inspect")}};return me.onNotification(y.type,e=>{if(U===p.Off||!D)return;const t=U===p.Verbose||U===p.Compact;D.log(e.message,t?e.verbose:void 0)}),me.onNotification(d.type,e=>{const t=L.get(e.token);t?t(e.value):V.fire(e)}),me}},4019(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,function(e){e.create=function(e){return{dispose:e}}}(n||(t.Disposable=n={}))},2676(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(9590);var i;!function(e){const t={dispose(){}};e.None=function(){return t}}(i||(t.Event=i={}));class s{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r<i;r++)if(this._callbacks[r]===e){if(this._contexts[r]===t)return this._callbacks.splice(r,1),void this._contexts.splice(r,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],n=this._callbacks.slice(0),i=this._contexts.slice(0);for(let s=0,o=n.length;s<o;s++)try{t.push(n[s].apply(i[s],e))}catch(e){(0,r.default)().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class o{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new s),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=o,o._noop=function(){}},8585(e,t){"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>n(e))}},3352(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(r||(t.Touch=r={}));class i{constructor(){this[n]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=r.None){const n=this._map.get(e);if(n)return t!==r.None&&this.touch(n,t),n.value}set(e,t,n=r.None){let i=this._map.get(e);if(i)i.value=t,n!==r.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(i);break;case r.First:this.addItemFirst(i);break;case r.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===r.First||t===r.Last)if(t===r.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===r.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=i,t.LRUCache=class extends i{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=r.AsNew){return super.get(e,t)}peek(e){return super.get(e,r.None)}set(e,t){return super.set(e,t,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},9244(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,n=0,r=0,i=0;e:for(;n<this._chunks.length;){const e=this._chunks[n];for(r=0;r<e.length;){switch(e[r]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,r++;break e;default:t=0}break;default:t=0}r++}i+=e.byteLength,n++}if(4!==t)return;const s=this._read(i+r),o=new Map,a=this.toString(s,"ascii").split("\r\n");if(a.length<2)return o;for(let t=0;t<a.length-2;t++){const n=a[t],r=n.indexOf(":");if(-1===r)throw new Error(`Message header must separate key and value using ':'\n${n}`);const i=n.substr(0,r),s=n.substr(r+1).trim();o.set(e?i.toLowerCase():i,s)}return o}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const r=this._chunks[0];if(r.byteLength>e){const i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}},9085(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const r=n(9590),i=n(8585),s=n(2676),o=n(4323);var a,c;!function(e){e.is=function(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)}}(a||(t.MessageReader=a={}));class l{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter,this.partialMessageEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=l,function(e){e.fromOptions=function(e){let t,n;const i=new Map;let s;const o=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,i.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)i.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(s=e.contentTypeDecoder,o.set(s.name,s)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)o.set(t.name,t)}return void 0===s&&(s=(0,r.default)().applicationJson.decoder,o.set(s.name,s)),{charset:t,contentDecoder:n,contentDecoders:i,contentTypeDecoder:s,contentTypeDecoders:o}}}(c||(c={})),t.ReadableStreamMessageReader=class extends l{constructor(e,t){super(),this.readable=e,this.options=c.fromOptions(t),this.buffer=(0,r.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new o.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));const n=parseInt(t);if(isNaN(n))return void this.fireError(new Error(`Content-Length value must be a number. Got ${t}`));this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)}).catch(e=>{this.fireError(e)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,r.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},3193(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const r=n(9590),i=n(8585),s=n(4323),o=n(2676);var a,c;!function(e){e.is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)}}(a||(t.MessageWriter=a={}));class l{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=l,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,r.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,r.default)().applicationJson.encoder}}}(c||(c={})),t.WriteableStreamMessageWriter=class extends l{constructor(e,t){super(),this.writable=e,this.options=c.fromOptions(t),this.errorCount=0,this.writeSemaphore=new s.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(t=>{const n=[];return n.push("Content-Length: ",t.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(e,n,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,n){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},6177(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const r=n(8585);var i,s;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(i||(t.ErrorCodes=i={}));class o extends Error{constructor(e,t,n){super(t),this.code=r.number(e)?e:i.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,o.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=o;class a{constructor(e){this.kind=e}static is(e){return e===a.auto||e===a.byName||e===a.byPosition}toString(){return this.kind}}t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");class c{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return a.auto}}t.AbstractMessageSignature=c,t.RequestType0=class extends c{constructor(e){super(e,0)}},t.RequestType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends c{constructor(e){super(e,2)}},t.RequestType3=class extends c{constructor(e){super(e,3)}},t.RequestType4=class extends c{constructor(e){super(e,4)}},t.RequestType5=class extends c{constructor(e){super(e,5)}},t.RequestType6=class extends c{constructor(e){super(e,6)}},t.RequestType7=class extends c{constructor(e){super(e,7)}},t.RequestType8=class extends c{constructor(e){super(e,8)}},t.RequestType9=class extends c{constructor(e){super(e,9)}},t.NotificationType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends c{constructor(e){super(e,0)}},t.NotificationType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends c{constructor(e){super(e,2)}},t.NotificationType3=class extends c{constructor(e){super(e,3)}},t.NotificationType4=class extends c{constructor(e){super(e,4)}},t.NotificationType5=class extends c{constructor(e){super(e,5)}},t.NotificationType6=class extends c{constructor(e){super(e,6)}},t.NotificationType7=class extends c{constructor(e){super(e,7)}},t.NotificationType8=class extends c{constructor(e){super(e,8)}},t.NotificationType9=class extends c{constructor(e){super(e,9)}},function(e){e.isRequest=function(e){const t=e;return t&&r.string(t.method)&&(r.string(t.id)||r.number(t.id))},e.isNotification=function(e){const t=e;return t&&r.string(t.method)&&void 0===e.id},e.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(r.string(t.id)||r.number(t.id)||null===t.id)}}(s||(t.Message=s={}))},9590(e,t){"use strict";let n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},4323(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const r=n(9590);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,r.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},4996(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const r=n(9850);var i;!function(e){e.Continue=0,e.Cancelled=1}(i||(i={})),t.SharedArraySenderStrategy=class{constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=i.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const n=this.buffers.get(t);if(void 0===n)return;const r=new Int32Array(n,0,1);Atomics.store(r,0,i.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class s{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===i.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class o{constructor(e){this.token=new s(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new r.CancellationTokenSource:new o(t)}}},4512(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const s=n(2116);i(n(2116),t),i(n(8766),t),t.createProtocolConnection=function(e,t,n,r){return(0,s.createMessageConnection)(e,t,n,r)}},8766(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,i(n(6439),t),i(n(6203),t),i(n(372),t),i(n(1560),t);var s,o=n(1580);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return o.createProtocolConnection}}),function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800}(s||(t.LSPErrorCodes=s={}))},1580(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(6439);t.createProtocolConnection=function(e,t,n,i){return r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,r.createMessageConnection)(e,t,n,i)}},372(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const r=n(6439);var i;!function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"}(i||(t.MessageDirection=i={})),t.RegistrationType=class{constructor(e){this.method=e}};class s extends r.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=s;class o extends r.RequestType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolRequestType=o;class a extends r.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=a;class c extends r.NotificationType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolNotificationType=c},8765(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const r=n(372);var i,s,o;!function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.CallHierarchyPrepareRequest=i={})),function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.CallHierarchyIncomingCallsRequest=s={})),function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.CallHierarchyOutgoingCallsRequest=o={}))},7672(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const r=n(372);var i,s;!function(e){e.method="textDocument/documentColor",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.DocumentColorRequest=i={})),function(e){e.method="textDocument/colorPresentation",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.ColorPresentationRequest=s={}))},1660(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const r=n(372);var i;!function(e){e.method="workspace/configuration",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(i||(t.ConfigurationRequest=i={}))},6914(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const r=n(372);var i;!function(e){e.method="textDocument/declaration",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.DeclarationRequest=i={}))},6011(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const r=n(6439),i=n(8598),s=n(372);var o,a,c,l,u;!function(e){e.is=function(e){const t=e;return t&&i.boolean(t.retriggerRequest)}}(o||(t.DiagnosticServerCancellationData=o={})),function(e){e.Full="full",e.Unchanged="unchanged"}(a||(t.DocumentDiagnosticReportKind=a={})),function(e){e.method="textDocument/diagnostic",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method),e.partialResult=new r.ProgressType}(c||(t.DocumentDiagnosticRequest=c={})),function(e){e.method="workspace/diagnostic",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method),e.partialResult=new r.ProgressType}(l||(t.WorkspaceDiagnosticRequest=l={})),function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=s.MessageDirection.serverToClient,e.type=new s.ProtocolRequestType0(e.method)}(u||(t.DiagnosticRefreshRequest=u={}))},9840(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const r=n(372);var i,s,o,a,c,l,u;!function(e){e.file="file",e.folder="folder"}(i||(t.FileOperationPatternKind=i={})),function(e){e.method="workspace/willCreateFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.WillCreateFilesRequest=s={})),function(e){e.method="workspace/didCreateFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(o||(t.DidCreateFilesNotification=o={})),function(e){e.method="workspace/willRenameFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(a||(t.WillRenameFilesRequest=a={})),function(e){e.method="workspace/didRenameFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(c||(t.DidRenameFilesNotification=c={})),function(e){e.method="workspace/didDeleteFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(l||(t.DidDeleteFilesNotification=l={})),function(e){e.method="workspace/willDeleteFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(u||(t.WillDeleteFilesRequest=u={}))},2874(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;const r=n(372);var i,s;!function(e){e.method="textDocument/foldingRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.FoldingRangeRequest=i={})),function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(s||(t.FoldingRangeRefreshRequest=s={}))},9574(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const r=n(372);var i;!function(e){e.method="textDocument/implementation",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.ImplementationRequest=i={}))},7752(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const r=n(372);var i,s,o;!function(e){e.method="textDocument/inlayHint",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.InlayHintRequest=i={})),function(e){e.method="inlayHint/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.InlayHintResolveRequest=s={})),function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(o||(t.InlayHintRefreshRequest=o={}))},3307(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;const r=n(372);var i;!function(e){e.method="textDocument/inlineCompletion",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.InlineCompletionRequest=i={}))},3124(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const r=n(372);var i,s;!function(e){e.method="textDocument/inlineValue",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.InlineValueRequest=i={})),function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(s||(t.InlineValueRefreshRequest=s={}))},1560(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=void 0;const r=n(372),i=n(6203),s=n(8598),o=n(9574);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return o.ImplementationRequest}});const a=n(8461);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return a.TypeDefinitionRequest}});const c=n(2316);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return c.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return c.DidChangeWorkspaceFoldersNotification}});const l=n(1660);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return l.ConfigurationRequest}});const u=n(7672);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return u.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return u.ColorPresentationRequest}});const d=n(2874);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return d.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return d.FoldingRangeRefreshRequest}});const h=n(6914);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return h.DeclarationRequest}});const p=n(3487);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return p.SelectionRangeRequest}});const f=n(2687);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return f.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return f.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return f.WorkDoneProgressCancelNotification}});const m=n(8765);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return m.CallHierarchyPrepareRequest}});const g=n(2478);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return g.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return g.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return g.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return g.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return g.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return g.SemanticTokensRegistrationType}});const y=n(908);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return y.ShowDocumentRequest}});const T=n(5316);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return T.LinkedEditingRangeRequest}});const v=n(9840);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return v.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return v.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return v.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return v.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return v.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return v.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return v.WillDeleteFilesRequest}});const R=n(9047);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return R.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return R.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return R.MonikerRequest}});const E=n(645);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return E.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return E.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return E.TypeHierarchySupertypesRequest}});const k=n(3124);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return k.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return k.InlineValueRefreshRequest}});const S=n(7752);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return S.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return S.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return S.InlayHintRefreshRequest}});const C=n(6011);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return C.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return C.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return C.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return C.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return C.DiagnosticRefreshRequest}});const x=n(3557);Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return x.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return x.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return x.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return x.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return x.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return x.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidCloseNotebookDocumentNotification}});const A=n(3307);var b,$,w,N,I,_,P,L,O,D,M,F,q,j,U,G,z,B,K,W,V,H,Y,X,Q,J,Z,ee,te,ne,re,ie,se,oe,ae,ce,le,ue,de,he,pe,fe,me,ge,ye,Te,ve,Re,Ee,ke,Se,Ce,xe,Ae,be,$e,we,Ne,Ie,_e,Pe,Le,Oe,De,Me;Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return A.InlineCompletionRequest}}),function(e){e.is=function(e){const t=e;return s.string(t)||s.string(t.language)||s.string(t.scheme)||s.string(t.pattern)}}(b||(t.TextDocumentFilter=b={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(s.string(t.notebookType)||s.string(t.scheme)||s.string(t.pattern))}}($||(t.NotebookDocumentFilter=$={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(s.string(t.notebook)||$.is(t.notebook))&&(void 0===t.language||s.string(t.language))}}(w||(t.NotebookCellTextDocumentFilter=w={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!s.string(t)&&!b.is(t)&&!w.is(t))return!1;return!0}}(N||(t.DocumentSelector=N={})),function(e){e.method="client/registerCapability",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(I||(t.RegistrationRequest=I={})),function(e){e.method="client/unregisterCapability",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(_||(t.UnregistrationRequest=_={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(P||(t.ResourceOperationKind=P={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(L||(t.FailureHandlingKind=L={})),function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"}(O||(t.PositionEncodingKind=O={})),function(e){e.hasId=function(e){const t=e;return t&&s.string(t.id)&&t.id.length>0}}(D||(t.StaticRegistrationOptions=D={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||N.is(t.documentSelector))}}(M||(t.TextDocumentRegistrationOptions=M={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(void 0===t.workDoneProgress||s.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&s.boolean(t.workDoneProgress)}}(F||(t.WorkDoneProgressOptions=F={})),function(e){e.method="initialize",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(q||(t.InitializeRequest=q={})),function(e){e.unknownProtocolVersion=1}(j||(t.InitializeErrorCodes=j={})),function(e){e.method="initialized",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(U||(t.InitializedNotification=U={})),function(e){e.method="shutdown",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType0(e.method)}(G||(t.ShutdownRequest=G={})),function(e){e.method="exit",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType0(e.method)}(z||(t.ExitNotification=z={})),function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(B||(t.DidChangeConfigurationNotification=B={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5}(K||(t.MessageType=K={})),function(e){e.method="window/showMessage",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(W||(t.ShowMessageNotification=W={})),function(e){e.method="window/showMessageRequest",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(V||(t.ShowMessageRequest=V={})),function(e){e.method="window/logMessage",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(H||(t.LogMessageNotification=H={})),function(e){e.method="telemetry/event",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(Y||(t.TelemetryEventNotification=Y={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(X||(t.TextDocumentSyncKind=X={})),function(e){e.method="textDocument/didOpen",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(Q||(t.DidOpenTextDocumentNotification=Q={})),function(e){e.isIncremental=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(J||(t.TextDocumentContentChangeEvent=J={})),function(e){e.method="textDocument/didChange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(Z||(t.DidChangeTextDocumentNotification=Z={})),function(e){e.method="textDocument/didClose",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(ee||(t.DidCloseTextDocumentNotification=ee={})),function(e){e.method="textDocument/didSave",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(te||(t.DidSaveTextDocumentNotification=te={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(ne||(t.TextDocumentSaveReason=ne={})),function(e){e.method="textDocument/willSave",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(re||(t.WillSaveTextDocumentNotification=re={})),function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ie||(t.WillSaveTextDocumentWaitUntilRequest=ie={})),function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(se||(t.DidChangeWatchedFilesNotification=se={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(oe||(t.FileChangeType=oe={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(i.URI.is(t.baseUri)||i.WorkspaceFolder.is(t.baseUri))&&s.string(t.pattern)}}(ae||(t.RelativePattern=ae={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(ce||(t.WatchKind=ce={})),function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(le||(t.PublishDiagnosticsNotification=le={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(ue||(t.CompletionTriggerKind=ue={})),function(e){e.method="textDocument/completion",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(de||(t.CompletionRequest=de={})),function(e){e.method="completionItem/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(he||(t.CompletionResolveRequest=he={})),function(e){e.method="textDocument/hover",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(pe||(t.HoverRequest=pe={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(fe||(t.SignatureHelpTriggerKind=fe={})),function(e){e.method="textDocument/signatureHelp",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(me||(t.SignatureHelpRequest=me={})),function(e){e.method="textDocument/definition",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ge||(t.DefinitionRequest=ge={})),function(e){e.method="textDocument/references",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ye||(t.ReferencesRequest=ye={})),function(e){e.method="textDocument/documentHighlight",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Te||(t.DocumentHighlightRequest=Te={})),function(e){e.method="textDocument/documentSymbol",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ve||(t.DocumentSymbolRequest=ve={})),function(e){e.method="textDocument/codeAction",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Re||(t.CodeActionRequest=Re={})),function(e){e.method="codeAction/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ee||(t.CodeActionResolveRequest=Ee={})),function(e){e.method="workspace/symbol",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ke||(t.WorkspaceSymbolRequest=ke={})),function(e){e.method="workspaceSymbol/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Se||(t.WorkspaceSymbolResolveRequest=Se={})),function(e){e.method="textDocument/codeLens",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ce||(t.CodeLensRequest=Ce={})),function(e){e.method="codeLens/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(xe||(t.CodeLensResolveRequest=xe={})),function(e){e.method="workspace/codeLens/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(Ae||(t.CodeLensRefreshRequest=Ae={})),function(e){e.method="textDocument/documentLink",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(be||(t.DocumentLinkRequest=be={})),function(e){e.method="documentLink/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}($e||(t.DocumentLinkResolveRequest=$e={})),function(e){e.method="textDocument/formatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(we||(t.DocumentFormattingRequest=we={})),function(e){e.method="textDocument/rangeFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ne||(t.DocumentRangeFormattingRequest=Ne={})),function(e){e.method="textDocument/rangesFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ie||(t.DocumentRangesFormattingRequest=Ie={})),function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(_e||(t.DocumentOnTypeFormattingRequest=_e={})),function(e){e.Identifier=1}(Pe||(t.PrepareSupportDefaultBehavior=Pe={})),function(e){e.method="textDocument/rename",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Le||(t.RenameRequest=Le={})),function(e){e.method="textDocument/prepareRename",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Oe||(t.PrepareRenameRequest=Oe={})),function(e){e.method="workspace/executeCommand",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(De||(t.ExecuteCommandRequest=De={})),function(e){e.method="workspace/applyEdit",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType("workspace/applyEdit")}(Me||(t.ApplyWorkspaceEditRequest=Me={}))},5316(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const r=n(372);var i;!function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.LinkedEditingRangeRequest=i={}))},9047(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const r=n(372);var i,s,o;!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(i||(t.UniquenessLevel=i={})),function(e){e.$import="import",e.$export="export",e.local="local"}(s||(t.MonikerKind=s={})),function(e){e.method="textDocument/moniker",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.MonikerRequest=o={}))},3557(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const r=n(6203),i=n(8598),s=n(372);var o,a,c,l,u,d,h,p,f,m;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(o||(t.NotebookCellKind=o={})),function(e){e.create=function(e,t){const n={executionOrder:e};return!0!==t&&!1!==t||(n.success=t),n},e.is=function(e){const t=e;return i.objectLiteral(t)&&r.uinteger.is(t.executionOrder)&&(void 0===t.success||i.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}}(a||(t.ExecutionSummary=a={})),function(e){function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(typeof e!=typeof n)return!1;if("object"!=typeof e)return!1;const r=Array.isArray(e),s=Array.isArray(n);if(r!==s)return!1;if(r&&s){if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(!t(e[r],n[r]))return!1}if(i.objectLiteral(e)&&i.objectLiteral(n)){const r=Object.keys(e),i=Object.keys(n);if(r.length!==i.length)return!1;if(r.sort(),i.sort(),!t(r,i))return!1;for(let i=0;i<r.length;i++){const s=r[i];if(!t(e[s],n[s]))return!1}}return!0}e.create=function(e,t){return{kind:e,document:t}},e.is=function(e){const t=e;return i.objectLiteral(t)&&o.is(t.kind)&&r.DocumentUri.is(t.document)&&(void 0===t.metadata||i.objectLiteral(t.metadata))},e.diff=function(e,n){const r=new Set;return e.document!==n.document&&r.add("document"),e.kind!==n.kind&&r.add("kind"),e.executionSummary!==n.executionSummary&&r.add("executionSummary"),void 0===e.metadata&&void 0===n.metadata||t(e.metadata,n.metadata)||r.add("metadata"),void 0===e.executionSummary&&void 0===n.executionSummary||a.equals(e.executionSummary,n.executionSummary)||r.add("executionSummary"),r}}(c||(t.NotebookCell=c={})),function(e){e.create=function(e,t,n,r){return{uri:e,notebookType:t,version:n,cells:r}},e.is=function(e){const t=e;return i.objectLiteral(t)&&i.string(t.uri)&&r.integer.is(t.version)&&i.typedArray(t.cells,c.is)}}(l||(t.NotebookDocument=l={})),function(e){e.method="notebookDocument/sync",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.RegistrationType(e.method)}(u||(t.NotebookDocumentSyncRegistrationType=u={})),function(e){e.method="notebookDocument/didOpen",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolNotificationType(e.method),e.registrationMethod=u.method}(d||(t.DidOpenNotebookDocumentNotification=d={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&r.uinteger.is(t.start)&&r.uinteger.is(t.deleteCount)&&(void 0===t.cells||i.typedArray(t.cells,c.is))},e.create=function(e,t,n){const r={start:e,deleteCount:t};return void 0!==n&&(r.cells=n),r}}(h||(t.NotebookCellArrayChange=h={})),function(e){e.method="notebookDocument/didChange",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolNotificationType(e.method),e.registrationMethod=u.method}(p||(t.DidChangeNotebookDocumentNotification=p={})),function(e){e.method="notebookDocument/didSave",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolNotificationType(e.method),e.registrationMethod=u.method}(f||(t.DidSaveNotebookDocumentNotification=f={})),function(e){e.method="notebookDocument/didClose",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolNotificationType(e.method),e.registrationMethod=u.method}(m||(t.DidCloseNotebookDocumentNotification=m={}))},2687(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const r=n(6439),i=n(372);var s,o,a;!function(e){e.type=new r.ProgressType,e.is=function(t){return t===e.type}}(s||(t.WorkDoneProgress=s={})),function(e){e.method="window/workDoneProgress/create",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(o||(t.WorkDoneProgressCreateRequest=o={})),function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(a||(t.WorkDoneProgressCancelNotification=a={}))},3487(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const r=n(372);var i;!function(e){e.method="textDocument/selectionRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.SelectionRangeRequest=i={}))},2478(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const r=n(372);var i,s,o,a,c,l;!function(e){e.Relative="relative"}(i||(t.TokenFormat=i={})),function(e){e.method="textDocument/semanticTokens",e.type=new r.RegistrationType(e.method)}(s||(t.SemanticTokensRegistrationType=s={})),function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=s.method}(o||(t.SemanticTokensRequest=o={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=s.method}(a||(t.SemanticTokensDeltaRequest=a={})),function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=s.method}(c||(t.SemanticTokensRangeRequest=c={})),function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(l||(t.SemanticTokensRefreshRequest=l={}))},908(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const r=n(372);var i;!function(e){e.method="window/showDocument",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(i||(t.ShowDocumentRequest=i={}))},8461(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const r=n(372);var i;!function(e){e.method="textDocument/typeDefinition",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.TypeDefinitionRequest=i={}))},645(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const r=n(372);var i,s,o;!function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.TypeHierarchyPrepareRequest=i={})),function(e){e.method="typeHierarchy/supertypes",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.TypeHierarchySupertypesRequest=s={})),function(e){e.method="typeHierarchy/subtypes",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.TypeHierarchySubtypesRequest=o={}))},2316(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const r=n(372);var i,s;!function(e){e.method="workspace/workspaceFolders",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(i||(t.WorkspaceFoldersRequest=i={})),function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(s||(t.DidChangeWorkspaceFoldersNotification=s={}))},8598(e,t){"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>n(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},2607(e,t,n){"use strict";function r(e){return e.charCodeAt(0)}function i(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function s(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t],e[t]=!0}function o(e){if(void 0===e)throw Error("Internal Error - Should never get here!");return!0}function a(){throw Error("Internal Error - Should never get here!")}function c(e){return"Character"===e.type}n.d(t,{z:()=>g,H:()=>m});const l=[];for(let e=r("0");e<=r("9");e++)l.push(e);const u=[r("_")].concat(l);for(let e=r("a");e<=r("z");e++)u.push(e);for(let e=r("A");e<=r("Z");e++)u.push(e);const d=[r(" "),r("\f"),r("\n"),r("\r"),r("\t"),r("\v"),r("\t"),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r("\u2028"),r("\u2029"),r(" "),r(" "),r(" "),r("\ufeff")],h=/[0-9a-fA-F]/,p=/[0-9]/,f=/[1-9]/;class m{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":s(n,"global");break;case"i":s(n,"ignoreCase");break;case"m":s(n,"multiLine");break;case"u":s(n,"unicode");break;case"y":s(n,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){const e=[],t=this.idx;for(e.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":let t;switch(this.consumeChar("?"),this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}}o(t);const n=this.disjunction();return this.consumeChar(")"),{type:t,value:n,loc:this.loc(e)}}return a()}quantifier(e=!1){let t;const n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":const n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:n,atMost:e}):t={atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;o(t)}if(!0!==e||void 0!==t)return o(t)?("?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(n),t):void 0}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group()}return void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),o(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):a()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[r("\n"),r("\r"),r("\u2028"),r("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=l;break;case"D":e=l,t=!0;break;case"s":e=d;break;case"S":e=d,t=!0;break;case"w":e=u;break;case"W":e=u,t=!0}return o(e)?{type:"Set",value:e,complement:t}:a()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=r("\f");break;case"n":e=r("\n");break;case"r":e=r("\r");break;case"t":e=r("\t");break;case"v":e=r("\v")}return o(e)?{type:"Character",value:e}:a()}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:r("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:r(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:r(this.popChar())}}}characterClass(){const e=[];let t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){const t=this.classAtom();if(t.type,c(t)&&this.isRangeDash()){this.consumeChar("-");const n=this.classAtom();if(n.type,c(n)){if(n.value<t.value)throw Error("Range out of order in character class");e.push({from:t.value,to:n.value})}else i(t.value,e),e.push(r("-")),i(n.value,e)}else i(t.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}}classAtom(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:r("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;this.consumeChar("("),"?"===this.peekChar(0)?(this.consumeChar("?"),this.consumeChar(":"),e=!1):this.groupIdx++;const t=this.disjunction();this.consumeChar(")");const n={type:"Group",capturing:e,value:t};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(!1===f.test(e))throw Error("Expecting a positive integer");for(;p.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(!1===p.test(e))throw Error("Expecting an integer");for(;p.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){const e=this.popChar();switch(e){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:r(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return"-"===this.peekChar()&&this.isClassAtom(1)}isDigit(){return p.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2)||"<"===this.peekChar(2)&&("="===this.peekChar(3)||"!"===this.peekChar(3)));default:return!1}}isQuantifier(){const e=this.saveState();try{return void 0!==this.quantifier(!0)}catch(e){return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let t="";for(let n=0;n<e;n++){const e=this.popChar();if(!1===h.test(e))throw Error("Expecting a HexDecimal digits");t+=e}return{type:"Character",value:parseInt(t,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){const e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(void 0!==e&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}class g{visitChildren(e){for(const t in e){const n=e[t];e.hasOwnProperty(t)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach(e=>{this.visit(e)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}},6729(e,t,n){"use strict";n.d(t,{b:()=>l});var r=n(830),i=n(610),s=n(9364),o=n(1917),a=class extends r.mR{static{(0,r.K2)(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},c={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function l(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.d$,c);return t.ServiceRegistry.register(n),{shared:t,GitGraph:n}}(0,r.K2)(l,"createGitGraphServices")},6527(e,t,n){"use strict";n.d(t,{$:()=>l});var r=n(830),i=n(610),s=n(9364),o=n(1917),a=class extends r.mR{static{(0,r.K2)(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},c={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function l(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.p5,c);return t.ServiceRegistry.register(n),{shared:t,Packet:n}}(0,r.K2)(l,"createPacketServices")},1009(e,t,n){"use strict";n.d(t,{v:()=>l});var r=n(830),i=n(610),s=n(9364),o=n(1917),a=class extends r.mR{static{(0,r.K2)(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},c={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function l(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.FZ,c);return t.ServiceRegistry.register(n),{shared:t,Info:n}}(0,r.K2)(l,"createInfoServices")},6299(e,t,n){"use strict";n.d(t,{f:()=>l});var r=n(830),i=n(610),s=n(9364),o=n(1917),a=class extends r.mR{static{(0,r.K2)(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},c={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function l(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.Bg,c);return t.ServiceRegistry.register(n),{shared:t,Radar:n}}(0,r.K2)(l,"createRadarServices")},1592(e,t,n){"use strict";n.d(t,{d:()=>p});var r=n(830),i=n(610),s=n(9364),o=n(1917),a=class extends r.mR{static{(0,r.K2)(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},c=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,l=class extends r.dg{static{(0,r.K2)(this,"TreemapValueConverter")}runCustomConverter(e,t,n){if("NUMBER2"===e.name)return parseFloat(t.replace(/,/g,""));if("SEPARATOR"===e.name)return t.substring(1,t.length-1);if("STRING2"===e.name)return t.substring(1,t.length-1);if("INDENTATION"===e.name)return t.length;if("ClassDef"===e.name){if("string"!=typeof t)return t;const e=c.exec(t);if(e)return{$type:"ClassDefStatement",className:e[1],styleText:e[2]||void 0}}}};function u(e){const t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){const e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}(0,r.K2)(u,"registerValidationChecks");var d=class{static{(0,r.K2)(this,"TreemapValidator")}checkSingleRoot(e,t){let n;for(const r of e.TreemapRows)r.item&&(void 0===n&&void 0===r.indent?n=0:(void 0===r.indent||void 0!==n&&n>=parseInt(r.indent,10))&&t("error","Multiple root nodes are not allowed in a treemap.",{node:r,property:"item"}))}},h={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new l,"ValueConverter")},validation:{TreemapValidator:(0,r.K2)(()=>new d,"TreemapValidator")}};function p(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.XE,h);return t.ServiceRegistry.register(n),u(n),{shared:t,Treemap:n}}(0,r.K2)(p,"createTreemapServices")},5877(e,t,n){"use strict";n.d(t,{S:()=>u});var r=n(830),i=n(610),s=n(9364),o=n(1917),a=class extends r.mR{static{(0,r.K2)(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},c=class extends r.dg{static{(0,r.K2)(this,"ArchitectureValueConverter")}runCustomConverter(e,t,n){if("ARCH_ICON"===e.name)return t.replace(/[()]/g,"").trim();if("ARCH_TEXT_ICON"===e.name)return t.replace(/["()]/g,"");if("ARCH_TITLE"===e.name){let e=t.replace(/^\[|]$/g,"").trim();return(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1),e=e.replace(/\\"/g,'"').replace(/\\'/g,"'")),e.trim()}}},l={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new c,"ValueConverter")}};function u(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.wV,l);return t.ServiceRegistry.register(n),{shared:t,Architecture:n}}(0,r.K2)(u,"createArchitectureServices")},7761(e,t,n){"use strict";n.d(t,{f:()=>u});var r=n(830),i=n(610),s=n(9364),o=n(1917),a=class extends r.mR{static{(0,r.K2)(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},c=class extends r.dg{static{(0,r.K2)(this,"PieValueConverter")}runCustomConverter(e,t,n){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},l={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new c,"ValueConverter")}};function u(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.D_,l);return t.ServiceRegistry.register(n),{shared:t,Pie:n}}(0,r.K2)(u,"createPieServices")},830(e,t,n){"use strict";n.d(t,{mR:()=>ge,dg:()=>fe,wV:()=>oe,Tm:()=>me,d$:()=>ae,FZ:()=>ce,sr:()=>se,p5:()=>le,D_:()=>ue,Bg:()=>de,XE:()=>he,K2:()=>k});var r=n(2479),i=n(610),s=n(9364),o=n(2151),a=n(1917),c=n(7608);const l={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},u={AstReflection:()=>new o.QX};function d(e){const t=function(){const e=(0,s.WQ)((0,i.u)(a.D),u),t=(0,s.WQ)((0,i.t)({shared:e}),l);return e.ServiceRegistry.register(t),t}(),n=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(n,c.r.parse(`memory:/${n.name??"grammar"}.langium`)),n}var h,p,f,m,g,y,T,v=n(5033),R=n(4326),E=Object.defineProperty,k=(e,t)=>E(e,"name",{value:t,configurable:!0});(h||(h={})).Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/},(p||(p={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/},(f||(f={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(m||(m={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(g||(g={})).Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(y||(y={})).Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(T||(T={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/},h.Terminals,p.Terminals,f.Terminals,m.Terminals,g.Terminals,y.Terminals,T.Terminals;var S="Architecture";k(function(e){return B.isInstance(e,S)},"isArchitecture");var C="Axis",x="Branch";k(function(e){return B.isInstance(e,x)},"isBranch");var A="Commit";k(function(e){return B.isInstance(e,A)},"isCommit");var b="GitGraph";k(function(e){return B.isInstance(e,b)},"isGitGraph");var $="Info";k(function(e){return B.isInstance(e,$)},"isInfo");var w="Item",N="Merge";k(function(e){return B.isInstance(e,N)},"isMerge");var I="Packet";k(function(e){return B.isInstance(e,I)},"isPacket");var _="PacketBlock";k(function(e){return B.isInstance(e,_)},"isPacketBlock");k(function(e){return B.isInstance(e,"Pie")},"isPie");var P="PieSection";k(function(e){return B.isInstance(e,P)},"isPieSection");var L="Statement",O="Treemap";k(function(e){return B.isInstance(e,O)},"isTreemap");var D,M,F,q,j,U,G,z=class extends r.kD{constructor(){super(...arguments),this.types={Architecture:{name:S,properties:{accDescr:{name:"accDescr"},accTitle:{name:"accTitle"},edges:{name:"edges",defaultValue:[]},groups:{name:"groups",defaultValue:[]},junctions:{name:"junctions",defaultValue:[]},services:{name:"services",defaultValue:[]},title:{name:"title"}},superTypes:[]},Axis:{name:C,properties:{label:{name:"label"},name:{name:"name"}},superTypes:[]},Branch:{name:x,properties:{name:{name:"name"},order:{name:"order"}},superTypes:[L]},Checkout:{name:"Checkout",properties:{branch:{name:"branch"}},superTypes:[L]},CherryPicking:{name:"CherryPicking",properties:{id:{name:"id"},parent:{name:"parent"},tags:{name:"tags",defaultValue:[]}},superTypes:[L]},ClassDefStatement:{name:"ClassDefStatement",properties:{className:{name:"className"},styleText:{name:"styleText"}},superTypes:[]},Commit:{name:A,properties:{id:{name:"id"},message:{name:"message"},tags:{name:"tags",defaultValue:[]},type:{name:"type"}},superTypes:[L]},Curve:{name:"Curve",properties:{entries:{name:"entries",defaultValue:[]},label:{name:"label"},name:{name:"name"}},superTypes:[]},Direction:{name:"Direction",properties:{accDescr:{name:"accDescr"},accTitle:{name:"accTitle"},dir:{name:"dir"},statements:{name:"statements",defaultValue:[]},title:{name:"title"}},superTypes:[b]},Edge:{name:"Edge",properties:{lhsDir:{name:"lhsDir"},lhsGroup:{name:"lhsGroup",defaultValue:!1},lhsId:{name:"lhsId"},lhsInto:{name:"lhsInto",defaultValue:!1},rhsDir:{name:"rhsDir"},rhsGroup:{name:"rhsGroup",defaultValue:!1},rhsId:{name:"rhsId"},rhsInto:{name:"rhsInto",defaultValue:!1},title:{name:"title"}},superTypes:[]},Entry:{name:"Entry",properties:{axis:{name:"axis",referenceType:C},value:{name:"value"}},superTypes:[]},GitGraph:{name:b,properties:{accDescr:{name:"accDescr"},accTitle:{name:"accTitle"},statements:{name:"statements",defaultValue:[]},title:{name:"title"}},superTypes:[]},Group:{name:"Group",properties:{icon:{name:"icon"},id:{name:"id"},in:{name:"in"},title:{name:"title"}},superTypes:[]},Info:{name:$,properties:{accDescr:{name:"accDescr"},accTitle:{name:"accTitle"},title:{name:"title"}},superTypes:[]},Item:{name:w,properties:{classSelector:{name:"classSelector"},name:{name:"name"}},superTypes:[]},Junction:{name:"Junction",properties:{id:{name:"id"},in:{name:"in"}},superTypes:[]},Leaf:{name:"Leaf",properties:{classSelector:{name:"classSelector"},name:{name:"name"},value:{name:"value"}},superTypes:[w]},Merge:{name:N,properties:{branch:{name:"branch"},id:{name:"id"},tags:{name:"tags",defaultValue:[]},type:{name:"type"}},superTypes:[L]},Option:{name:"Option",properties:{name:{name:"name"},value:{name:"value",defaultValue:!1}},superTypes:[]},Packet:{name:I,properties:{accDescr:{name:"accDescr"},accTitle:{name:"accTitle"},blocks:{name:"blocks",defaultValue:[]},title:{name:"title"}},superTypes:[]},PacketBlock:{name:_,properties:{bits:{name:"bits"},end:{name:"end"},label:{name:"label"},start:{name:"start"}},superTypes:[]},Pie:{name:"Pie",properties:{accDescr:{name:"accDescr"},accTitle:{name:"accTitle"},sections:{name:"sections",defaultValue:[]},showData:{name:"showData",defaultValue:!1},title:{name:"title"}},superTypes:[]},PieSection:{name:P,properties:{label:{name:"label"},value:{name:"value"}},superTypes:[]},Radar:{name:"Radar",properties:{accDescr:{name:"accDescr"},accTitle:{name:"accTitle"},axes:{name:"axes",defaultValue:[]},curves:{name:"curves",defaultValue:[]},options:{name:"options",defaultValue:[]},title:{name:"title"}},superTypes:[]},Section:{name:"Section",properties:{classSelector:{name:"classSelector"},name:{name:"name"}},superTypes:[w]},Service:{name:"Service",properties:{icon:{name:"icon"},iconText:{name:"iconText"},id:{name:"id"},in:{name:"in"},title:{name:"title"}},superTypes:[]},Statement:{name:L,properties:{},superTypes:[]},Treemap:{name:O,properties:{accDescr:{name:"accDescr"},accTitle:{name:"accTitle"},title:{name:"title"},TreemapRows:{name:"TreemapRows",defaultValue:[]}},superTypes:[]},TreemapRow:{name:"TreemapRow",properties:{indent:{name:"indent"},item:{name:"item"}},superTypes:[]}}}static{k(this,"MermaidAstReflection")}},B=new z,K=k(()=>D??(D=d('{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"ArchitectureGrammarGrammar"),W=k(()=>M??(M=d('{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"GitGraphGrammarGrammar"),V=k(()=>F??(F=d('{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"InfoGrammarGrammar"),H=k(()=>q??(q=d('{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PacketGrammarGrammar"),Y=k(()=>j??(j=d('{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PieGrammarGrammar"),X=k(()=>U??(U=d('{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}')),"RadarGrammarGrammar"),Q=k(()=>G??(G=d('{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}')),"TreemapGrammarGrammar"),J={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Z={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ee={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},te={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ne={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},re={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ie={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},se={AstReflection:k(()=>new z,"AstReflection")},oe={Grammar:k(()=>K(),"Grammar"),LanguageMetaData:k(()=>J,"LanguageMetaData"),parser:{}},ae={Grammar:k(()=>W(),"Grammar"),LanguageMetaData:k(()=>Z,"LanguageMetaData"),parser:{}},ce={Grammar:k(()=>V(),"Grammar"),LanguageMetaData:k(()=>ee,"LanguageMetaData"),parser:{}},le={Grammar:k(()=>H(),"Grammar"),LanguageMetaData:k(()=>te,"LanguageMetaData"),parser:{}},ue={Grammar:k(()=>Y(),"Grammar"),LanguageMetaData:k(()=>ne,"LanguageMetaData"),parser:{}},de={Grammar:k(()=>X(),"Grammar"),LanguageMetaData:k(()=>re,"LanguageMetaData"),parser:{}},he={Grammar:k(()=>Q(),"Grammar"),LanguageMetaData:k(()=>ie,"LanguageMetaData"),parser:{}},pe={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},fe=class extends v.d{static{k(this,"AbstractMermaidValueConverter")}runConverter(e,t,n){let r=this.runCommonConverter(e,t,n);return void 0===r&&(r=this.runCustomConverter(e,t,n)),void 0===r?super.runConverter(e,t,n):r}runCommonConverter(e,t,n){const r=pe[e.name];if(void 0===r)return;const i=r.exec(t);return null!==i?void 0!==i[1]?i[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==i[2]?i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n"):void 0:void 0}},me=class extends fe{static{k(this,"CommonValueConverter")}runCustomConverter(e,t,n){}},ge=class extends R.Q{static{k(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,n){const r=super.buildKeywordTokens(e,t,n);return r.forEach(e=>{this.keywords.has(e.name)&&void 0!==e.PATTERN&&(e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),r}};(class extends ge{static{k(this,"CommonTokenBuilder")}})},8731(e,t,n){"use strict";n.d(t,{qg:()=>o}),n(6729),n(1009),n(6527),n(7761),n(5877),n(6299),n(1592);var r=n(830),i={},s={info:(0,r.K2)(async()=>{const{createInfoServices:e}=await n.e(235).then(n.bind(n,6235)),t=e().Info.parser.LangiumParser;i.info=t},"info"),packet:(0,r.K2)(async()=>{const{createPacketServices:e}=await n.e(982).then(n.bind(n,5982)),t=e().Packet.parser.LangiumParser;i.packet=t},"packet"),pie:(0,r.K2)(async()=>{const{createPieServices:e}=await n.e(201).then(n.bind(n,7963)),t=e().Pie.parser.LangiumParser;i.pie=t},"pie"),architecture:(0,r.K2)(async()=>{const{createArchitectureServices:e}=await n.e(644).then(n.bind(n,8644)),t=e().Architecture.parser.LangiumParser;i.architecture=t},"architecture"),gitGraph:(0,r.K2)(async()=>{const{createGitGraphServices:e}=await n.e(427).then(n.bind(n,6427)),t=e().GitGraph.parser.LangiumParser;i.gitGraph=t},"gitGraph"),radar:(0,r.K2)(async()=>{const{createRadarServices:e}=await n.e(736).then(n.bind(n,4736)),t=e().Radar.parser.LangiumParser;i.radar=t},"radar"),treemap:(0,r.K2)(async()=>{const{createTreemapServices:e}=await n.e(187).then(n.bind(n,5187)),t=e().Treemap.parser.LangiumParser;i.treemap=t},"treemap")};async function o(e,t){const n=s[e];if(!n)throw new Error(`Unknown diagram type: ${e}`);i[e]||await n();const r=i[e].parse(t);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new a(r);return r.value}(0,r.K2)(o,"parse");var a=class extends Error{constructor(e){super(`Parsing failed: ${e.lexerErrors.map(e=>`Lexer error on line ${void 0===e.line||isNaN(e.line)?"?":e.line}, column ${void 0===e.column||isNaN(e.column)?"?":e.column}: ${e.message}`).join("\n")} ${e.parserErrors.map(e=>`Parse error on line ${void 0===e.token.startLine||isNaN(e.token.startLine)?"?":e.token.startLine}, column ${void 0===e.token.startColumn||isNaN(e.token.startColumn)?"?":e.token.startColumn}: ${e.message}`).join("\n")}`),this.result=e}static{(0,r.K2)(this,"MermaidParseError")}}},1064(e,t,n){"use strict";n.d(t,{ak:()=>f,mT:()=>Jt,LT:()=>Ae,jr:()=>en,T6:()=>Nt,JG:()=>fe,wL:()=>o,c$:()=>l,Y2:()=>h,$P:()=>u,Cy:()=>d,Pp:()=>p,BK:()=>m,PW:()=>de,my:()=>we,jk:()=>Ke,Sk:()=>me,G:()=>$e});var r=n(6087);function i(e){function t(){}t.prototype=e;const n=new t;function r(){return typeof n.bar}return r(),r(),e}class s{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),(0,r.forEach)(this.definition,t=>{t.accept(e)})}}class o extends s{constructor(e){super([]),this.idx=1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class a extends s{constructor(e){super(e.definition),this.orgText="",(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}}class c extends s{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}}class l extends s{constructor(e){super(e.definition),this.idx=1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}}class u extends s{constructor(e){super(e.definition),this.idx=1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}}class d extends s{constructor(e){super(e.definition),this.idx=1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}}class h extends s{constructor(e){super(e.definition),this.idx=1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}}class p extends s{constructor(e){super(e.definition),this.idx=1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}}class f extends s{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}}class m{constructor(e){this.idx=1,(0,r.assign)(this,(0,r.pickBy)(e,e=>void 0!==e))}accept(e){e.visit(this)}}function g(e){function t(e){return(0,r.map)(e,g)}if(e instanceof o){const t={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return(0,r.isString)(e.label)&&(t.label=e.label),t}if(e instanceof c)return{type:"Alternative",definition:t(e.definition)};if(e instanceof l)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof u)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof d)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:g(new m({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof p)return{type:"RepetitionWithSeparator",idx:e.idx,separator:g(new m({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof h)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof f)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof m){const t={type:"Terminal",name:e.terminalType.name,label:(n=e.terminalType,i=n,(0,r.isString)(i.LABEL)&&""!==i.LABEL?n.LABEL:n.name),idx:e.idx};(0,r.isString)(e.label)&&(t.terminalLabel=e.label);const s=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=(0,r.isRegExp)(s)?s.source:s),t}var n,i;if(e instanceof a)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}class y{visit(e){const t=e;switch(t.constructor){case o:return this.visitNonTerminal(t);case c:return this.visitAlternative(t);case l:return this.visitOption(t);case u:return this.visitRepetitionMandatory(t);case d:return this.visitRepetitionMandatoryWithSeparator(t);case p:return this.visitRepetitionWithSeparator(t);case h:return this.visitRepetition(t);case f:return this.visitAlternation(t);case m:return this.visitTerminal(t);case a:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function T(e,t=[]){return!!(e instanceof l||e instanceof h||e instanceof p)||(e instanceof f?(0,r.some)(e.definition,e=>T(e,t)):!(e instanceof o&&(0,r.includes)(t,e))&&e instanceof s&&(e instanceof o&&t.push(e),(0,r.every)(e.definition,e=>T(e,t))))}function v(e){if(e instanceof o)return"SUBRULE";if(e instanceof l)return"OPTION";if(e instanceof f)return"OR";if(e instanceof u)return"AT_LEAST_ONE";if(e instanceof d)return"AT_LEAST_ONE_SEP";if(e instanceof p)return"MANY_SEP";if(e instanceof h)return"MANY";if(e instanceof m)return"CONSUME";throw Error("non exhaustive match")}class R{walk(e,t=[]){(0,r.forEach)(e.definition,(n,i)=>{const s=(0,r.drop)(e.definition,i+1);if(n instanceof o)this.walkProdRef(n,s,t);else if(n instanceof m)this.walkTerminal(n,s,t);else if(n instanceof c)this.walkFlat(n,s,t);else if(n instanceof l)this.walkOption(n,s,t);else if(n instanceof u)this.walkAtLeastOne(n,s,t);else if(n instanceof d)this.walkAtLeastOneSep(n,s,t);else if(n instanceof p)this.walkManySep(n,s,t);else if(n instanceof h)this.walkMany(n,s,t);else{if(!(n instanceof f))throw Error("non exhaustive match");this.walkOr(n,s,t)}})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){const r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){const r=[new l({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){const r=E(e,t,n);this.walk(e,r)}walkMany(e,t,n){const r=[new l({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){const r=E(e,t,n);this.walk(e,r)}walkOr(e,t,n){const i=t.concat(n);(0,r.forEach)(e.definition,e=>{const t=new c({definition:[e]});this.walk(t,i)})}}function E(e,t,n){return[new l({definition:[new m({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}function k(e){if(e instanceof o)return k(e.referencedRule);if(e instanceof m)return[e.terminalType];if(function(e){return e instanceof c||e instanceof l||e instanceof h||e instanceof u||e instanceof d||e instanceof p||e instanceof m||e instanceof a}(e))return function(e){let t=[];const n=e.definition;let i,s=0,o=n.length>s,a=!0;for(;o&&a;)i=n[s],a=T(i),t=t.concat(k(i)),s+=1,o=n.length>s;return(0,r.uniq)(t)}(e);if(function(e){return e instanceof f}(e))return function(e){const t=(0,r.map)(e.definition,e=>k(e));return(0,r.uniq)((0,r.flatten)(t))}(e);throw Error("non exhaustive match")}const S="_~IN~_";class C extends R{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const r=(i=e.referencedRule,s=e.idx,i.name+s+S+this.topProd.name);var i,s;const o=t.concat(n),a=k(new c({definition:o}));this.follows[r]=a}}var x=n(2607);function A(e){console&&console.error&&console.error(`Error: ${e}`)}function b(e){console&&console.warn&&console.warn(`Warning: ${e}`)}let $={};const w=new x.H;function N(e){const t=e.toString();if($.hasOwnProperty(t))return $[t];{const e=w.pattern(t);return $[t]=e,e}}const I="Complement Sets are not supported for first char optimization",_='Unable to use "first char" lexer optimizations:\n';function P(e,t=!1){try{const t=N(e);return L(t.value,{},t.flags.ignoreCase)}catch(n){if(n.message===I)t&&b(`${_}\tUnable to optimize: < ${e.toString()} >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";t&&(n="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),A(`${_}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function L(e,t,n){switch(e.type){case"Disjunction":for(let r=0;r<e.value.length;r++)L(e.value[r],t,n);break;case"Alternative":const i=e.value;for(let e=0;e<i.length;e++){const s=i[e];switch(s.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"Lookbehind":case"NegativeLookbehind":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}const o=s;switch(o.type){case"Character":O(o.value,t,n);break;case"Set":if(!0===o.complement)throw Error(I);(0,r.forEach)(o.value,e=>{if("number"==typeof e)O(e,t,n);else{const r=e;if(!0===n)for(let e=r.from;e<=r.to;e++)O(e,t,n);else{for(let e=r.from;e<=r.to&&e<J;e++)O(e,t,n);if(r.to>=J){const e=r.from>=J?r.from:J,n=r.to,i=ee(e),s=ee(n);for(let e=i;e<=s;e++)t[e]=e}}}});break;case"Group":L(o.value,t,n);break;default:throw Error("Non Exhaustive Match")}const a=void 0!==o.quantifier&&0===o.quantifier.atLeast;if("Group"===o.type&&!1===M(o)||"Group"!==o.type&&!1===a)break}break;default:throw Error("non exhaustive match!")}return(0,r.values)(t)}function O(e,t,n){const r=ee(e);t[r]=r,!0===n&&function(e,t){const n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){const e=ee(r.charCodeAt(0));t[e]=e}else{const e=n.toLowerCase();if(e!==n){const n=ee(e.charCodeAt(0));t[n]=n}}}(e,t)}function D(e,t){return(0,r.find)(e.value,e=>{if("number"==typeof e)return(0,r.includes)(t,e);{const n=e;return void 0!==(0,r.find)(t,e=>n.from<=e&&e<=n.to)}})}function M(e){const t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&((0,r.isArray)(e.value)?(0,r.every)(e.value,M):M(e.value))}class F extends x.z{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e);case"Lookbehind":return void this.visitLookbehind(e);case"NegativeLookbehind":return void this.visitNegativeLookbehind(e)}super.visitChildren(e)}}visitCharacter(e){(0,r.includes)(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===D(e,this.targetCharCodes)&&(this.found=!0):void 0!==D(e,this.targetCharCodes)&&(this.found=!0)}}function q(e,t){if(t instanceof RegExp){const n=N(t),r=new F(e);return r.visit(n),r.found}return void 0!==(0,r.find)(t,t=>(0,r.includes)(e,t.charCodeAt(0)))}const j="PATTERN",U="defaultMode",G="modes";const z=/[^\\][$]/,B=/[^\\[][\^]|^\^/;function K(e){const t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function W(e){const t=e.PATTERN;if((0,r.isRegExp)(t))return!1;if((0,r.isFunction)(t))return!0;if((0,r.has)(t,"exec"))return!0;if((0,r.isString)(t))return!1;throw Error("non exhaustive match")}function V(e){return!(!(0,r.isString)(e)||1!==e.length)&&e.charCodeAt(0)}const H={test:function(e){const t=e.length;for(let n=this.lastIndex;n<t;n++){const t=e.charCodeAt(n);if(10===t)return this.lastIndex=n+1,!0;if(13===t)return 10===e.charCodeAt(n+1)?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function Y(e,t){if((0,r.has)(e,"LINE_BREAKS"))return!1;if((0,r.isRegExp)(e.PATTERN)){try{q(t,e.PATTERN)}catch(e){return{issue:he.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if((0,r.isString)(e.PATTERN))return!1;if(W(e))return{issue:he.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function X(e){return(0,r.map)(e,e=>(0,r.isString)(e)?e.charCodeAt(0):e)}function Q(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}const J=256;let Z=[];function ee(e){return e<J?e:Z[e]}function te(e){const t=(new Date).getTime(),n=e();return{time:(new Date).getTime()-t,value:n}}function ne(e,t){const n=e.tokenTypeIdx;return n===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[n]}function re(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}let ie=1;const se={};function oe(e){const t=function(e){let t=(0,r.clone)(e),n=e,i=!0;for(;i;){n=(0,r.compact)((0,r.flatten)((0,r.map)(n,e=>e.CATEGORIES)));const e=(0,r.difference)(n,t);t=t.concat(e),(0,r.isEmpty)(e)?i=!1:n=e}return t}(e);!function(e){(0,r.forEach)(e,e=>{var t;ce(e)||(se[ie]=e,e.tokenTypeIdx=ie++),le(e)&&!(0,r.isArray)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),le(e)||(e.CATEGORIES=[]),t=e,(0,r.has)(t,"categoryMatches")||(e.categoryMatches=[]),function(e){return(0,r.has)(e,"categoryMatchesMap")}(e)||(e.categoryMatchesMap={})})}(t),function(e){(0,r.forEach)(e,e=>{ae([],e)})}(t),function(e){(0,r.forEach)(e,e=>{e.categoryMatches=[],(0,r.forEach)(e.categoryMatchesMap,(t,n)=>{e.categoryMatches.push(se[n].tokenTypeIdx)})})}(t),(0,r.forEach)(t,e=>{e.isParent=e.categoryMatches.length>0})}function ae(e,t){(0,r.forEach)(e,e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0}),(0,r.forEach)(t.CATEGORIES,n=>{const i=e.concat(t);(0,r.includes)(i,n)||ae(i,n)})}function ce(e){return(0,r.has)(e,"tokenTypeIdx")}function le(e){return(0,r.has)(e,"CATEGORIES")}function ue(e){return(0,r.has)(e,"tokenTypeIdx")}const de={buildUnableToPopLexerModeMessage:e=>`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(e,t,n,r,i,s)=>`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`};var he;!function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"}(he||(he={}));const pe={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:de,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(pe);class fe{constructor(e,t=pe){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--\x3e <${e}>`);const{time:r,value:i}=te(t),s=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(`${n}<-- <${e}> time: ${r}ms`),this.traceInitIndent--,i}return t()},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=(0,r.assign)({},pe,t);const n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof n&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let n,s=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===pe.lineTerminatorsPattern)this.config.lineTerminatorsPattern=H;else if(this.config.lineTerminatorCharacters===pe.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),(0,r.isArray)(e)?n={modes:{defaultMode:(0,r.clone)(e)},defaultMode:U}:(s=!1,n=(0,r.clone)(e))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(e){const t=[];return(0,r.has)(e,U)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+U+"> property in its definition\n",type:he.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,r.has)(e,G)||t.push({message:"A MultiMode Lexer cannot be initialized without a <modes> property in its definition\n",type:he.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,r.has)(e,G)&&(0,r.has)(e,U)&&!(0,r.has)(e.modes,e.defaultMode)&&t.push({message:`A MultiMode Lexer cannot be initialized with a ${U}: <${e.defaultMode}>which does not exist\n`,type:he.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,r.has)(e,G)&&(0,r.forEach)(e.modes,(e,n)=>{(0,r.forEach)(e,(i,s)=>{if((0,r.isUndefined)(i))t.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${s}>\n`,type:he.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if((0,r.has)(i,"LONGER_ALT")){const s=(0,r.isArray)(i.LONGER_ALT)?i.LONGER_ALT:[i.LONGER_ALT];(0,r.forEach)(s,s=>{(0,r.isUndefined)(s)||(0,r.includes)(e,s)||t.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${s.name}> on token <${i.name}> outside of mode <${n}>\n`,type:he.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),t}(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(function(e,t,n){const i=[];let s=!1;const o=(0,r.compact)((0,r.flatten)((0,r.values)(e.modes))),a=(0,r.reject)(o,e=>e[j]===fe.NA),c=X(n);return t&&(0,r.forEach)(a,e=>{const t=Y(e,c);if(!1!==t){const n=function(e,t){if(t.issue===he.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===he.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <${e.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}(e,t),r={message:n,type:t.issue,tokenType:e};i.push(r)}else(0,r.has)(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(s=!0):q(c,e.PATTERN)&&(s=!0)}),t&&!s&&i.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:he.NO_LINE_BREAKS_FLAGS}),i}(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},(0,r.forEach)(n.modes,(e,t)=>{n.modes[t]=(0,r.reject)(e,e=>(0,r.isUndefined)(e))});const o=(0,r.keys)(n.modes);if((0,r.forEach)(n.modes,(e,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,()=>{if(this.modes.push(n),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(e,t){let n=[];const i=function(e){const t=(0,r.filter)(e,e=>!(0,r.has)(e,j));return{errors:(0,r.map)(t,e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:he.MISSING_PATTERN,tokenTypes:[e]})),valid:(0,r.difference)(e,t)}}(e);n=n.concat(i.errors);const s=function(e){const t=(0,r.filter)(e,e=>{const t=e[j];return!((0,r.isRegExp)(t)||(0,r.isFunction)(t)||(0,r.has)(t,"exec")||(0,r.isString)(t))});return{errors:(0,r.map)(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:he.INVALID_PATTERN,tokenTypes:[e]})),valid:(0,r.difference)(e,t)}}(i.valid),o=s.valid;return n=n.concat(s.errors),n=n.concat(function(e){let t=[];const n=(0,r.filter)(e,e=>(0,r.isRegExp)(e[j]));return t=t.concat(function(e){class t extends x.z{constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}const n=(0,r.filter)(e,e=>{const n=e.PATTERN;try{const e=N(n),r=new t;return r.visit(e),r.found}catch(e){return z.test(n.source)}});return(0,r.map)(n,e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:he.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}(n)),t=t.concat(function(e){class t extends x.z{constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}const n=(0,r.filter)(e,e=>{const n=e.PATTERN;try{const e=N(n),r=new t;return r.visit(e),r.found}catch(e){return B.test(n.source)}});return(0,r.map)(n,e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:he.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}(n)),t=t.concat(function(e){const t=(0,r.filter)(e,e=>{const t=e[j];return t instanceof RegExp&&(t.multiline||t.global)});return(0,r.map)(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:he.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}(n)),t=t.concat(function(e){const t=[];let n=(0,r.map)(e,n=>(0,r.reduce)(e,(e,i)=>(n.PATTERN.source!==i.PATTERN.source||(0,r.includes)(t,i)||i.PATTERN===fe.NA||(t.push(i),e.push(i)),e),[]));n=(0,r.compact)(n);const i=(0,r.filter)(n,e=>e.length>1);return(0,r.map)(i,e=>{const t=(0,r.map)(e,e=>e.name);return{message:`The same RegExp pattern ->${(0,r.first)(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:he.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}(n)),t=t.concat(function(e){const t=(0,r.filter)(e,e=>e.PATTERN.test(""));return(0,r.map)(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:he.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}(n)),t}(o)),n=n.concat(function(e){const t=(0,r.filter)(e,e=>{if(!(0,r.has)(e,"GROUP"))return!1;const t=e.GROUP;return t!==fe.SKIPPED&&t!==fe.NA&&!(0,r.isString)(t)});return(0,r.map)(t,e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:he.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}(o)),n=n.concat(function(e,t){const n=(0,r.filter)(e,e=>void 0!==e.PUSH_MODE&&!(0,r.includes)(t,e.PUSH_MODE));return(0,r.map)(n,e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:he.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}(o,t)),n=n.concat(function(e){const t=[],n=(0,r.reduce)(e,(e,t,n)=>{const i=t.PATTERN;return i===fe.NA||((0,r.isString)(i)?e.push({str:i,idx:n,tokenType:t}):(0,r.isRegExp)(i)&&(s=i,void 0===(0,r.find)([".","\\","[","]","|","^","$","(",")","?","*","+","{"],e=>-1!==s.source.indexOf(e)))&&e.push({str:i.source,idx:n,tokenType:t})),e;var s},[]);return(0,r.forEach)(e,(e,i)=>{(0,r.forEach)(n,({str:n,idx:s,tokenType:o})=>{if(i<s&&function(e,t){if((0,r.isRegExp)(t)){if(/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(t.source))return!1;const n=t.exec(e);return null!==n&&0===n.index}if((0,r.isFunction)(t))return t(e,0,[],{});if((0,r.has)(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}(n,e.PATTERN)){const n=`Token: ->${o.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:he.UNREACHABLE_PATTERN,tokenTypes:[e,o]})}})}),t}(o)),n}(e,o))}),(0,r.isEmpty)(this.lexerDefinitionErrors)){let i;oe(e),this.TRACE_INIT("analyzeTokenTypes",()=>{i=function(e,t){const n=(t=(0,r.defaults)(t,{debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:(e,t)=>t()})).tracer;let i;n("initCharCodeToOptimizedIndexMap",()=>{!function(){if((0,r.isEmpty)(Z)){Z=new Array(65536);for(let e=0;e<65536;e++)Z[e]=e>255?255+~~(e/255):e}}()}),n("Reject Lexer.NA",()=>{i=(0,r.reject)(e,e=>e[j]===fe.NA)});let s,o,a,c,l,u,d,h,p,f,m,g=!1;n("Transform Patterns",()=>{g=!1,s=(0,r.map)(i,e=>{const t=e[j];if((0,r.isRegExp)(t)){const e=t.source;return 1!==e.length||"^"===e||"$"===e||"."===e||t.ignoreCase?2!==e.length||"\\"!==e[0]||(0,r.includes)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?K(t):e[1]:e}if((0,r.isFunction)(t))return g=!0,{exec:t};if("object"==typeof t)return g=!0,t;if("string"==typeof t){if(1===t.length)return t;{const e=t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&");return K(new RegExp(e))}}throw Error("non exhaustive match")})}),n("misc mapping",()=>{o=(0,r.map)(i,e=>e.tokenTypeIdx),a=(0,r.map)(i,e=>{const t=e.GROUP;if(t!==fe.SKIPPED){if((0,r.isString)(t))return t;if((0,r.isUndefined)(t))return!1;throw Error("non exhaustive match")}}),c=(0,r.map)(i,e=>{const t=e.LONGER_ALT;if(t)return(0,r.isArray)(t)?(0,r.map)(t,e=>(0,r.indexOf)(i,e)):[(0,r.indexOf)(i,t)]}),l=(0,r.map)(i,e=>e.PUSH_MODE),u=(0,r.map)(i,e=>(0,r.has)(e,"POP_MODE"))}),n("Line Terminator Handling",()=>{const e=X(t.lineTerminatorCharacters);d=(0,r.map)(i,e=>!1),"onlyOffset"!==t.positionTracking&&(d=(0,r.map)(i,t=>(0,r.has)(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===Y(t,e)&&q(e,t.PATTERN)))}),n("Misc Mapping #2",()=>{h=(0,r.map)(i,W),p=(0,r.map)(s,V),f=(0,r.reduce)(i,(e,t)=>{const n=t.GROUP;return(0,r.isString)(n)&&n!==fe.SKIPPED&&(e[n]=[]),e},{}),m=(0,r.map)(s,(e,t)=>({pattern:s[t],longerAlt:c[t],canLineTerminator:d[t],isCustom:h[t],short:p[t],group:a[t],push:l[t],pop:u[t],tokenTypeIdx:o[t],tokenType:i[t]}))});let y=!0,T=[];return t.safeMode||n("First Char Optimization",()=>{T=(0,r.reduce)(i,(e,n,i)=>{if("string"==typeof n.PATTERN){const t=ee(n.PATTERN.charCodeAt(0));Q(e,t,m[i])}else if((0,r.isArray)(n.START_CHARS_HINT)){let t;(0,r.forEach)(n.START_CHARS_HINT,n=>{const r=ee("string"==typeof n?n.charCodeAt(0):n);t!==r&&(t=r,Q(e,r,m[i]))})}else if((0,r.isRegExp)(n.PATTERN))if(n.PATTERN.unicode)y=!1,t.ensureOptimizations&&A(`${_}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const s=P(n.PATTERN,t.ensureOptimizations);(0,r.isEmpty)(s)&&(y=!1),(0,r.forEach)(s,t=>{Q(e,t,m[i])})}else t.ensureOptimizations&&A(`${_}\tTokenType: <${n.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),y=!1;return e},[])}),{emptyGroups:f,patternIdxToConfig:m,charCodeToPatternIdxToConfig:T,hasCustom:g,canBeOptimized:y}}(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[n]=i.patternIdxToConfig,this.charCodeToPatternIdxToConfig[n]=i.charCodeToPatternIdxToConfig,this.emptyGroups=(0,r.assign)({},this.emptyGroups,i.emptyGroups),this.hasCustom=i.hasCustom||this.hasCustom,this.canModeBeOptimized[n]=i.canBeOptimized}})}),this.defaultMode=n.defaultMode,!(0,r.isEmpty)(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const e=(0,r.map)(this.lexerDefinitionErrors,e=>e.message).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+e)}(0,r.forEach)(this.lexerDefinitionWarning,e=>{b(e.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(s&&(this.handleModes=r.noop),!1===this.trackStartLines&&(this.computeNewColumn=r.identity),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=r.noop),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const e=(0,r.reduce)(this.canModeBeOptimized,(e,t,n)=>(!1===t&&e.push(n),e),[]);if(t.ensureOptimizations&&!(0,r.isEmpty)(e))throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{$={}}),this.TRACE_INIT("toFastProperties",()=>{i(this)})})}tokenize(e,t=this.defaultMode){if(!(0,r.isEmpty)(this.lexerDefinitionErrors)){const e=(0,r.map)(this.lexerDefinitionErrors,e=>e.message).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,i,s,o,a,c,l,u,d,h,p,f,m,g,y;const T=e,v=T.length;let R=0,E=0;const k=this.hasCustom?0:Math.floor(e.length/10),S=new Array(k),C=[];let x=this.trackStartLines?1:void 0,A=this.trackStartLines?1:void 0;const b=function(e){const t={},n=(0,r.keys)(e);return(0,r.forEach)(n,n=>{const i=e[n];if(!(0,r.isArray)(i))throw Error("non exhaustive match");t[n]=[]}),t}(this.emptyGroups),$=this.trackStartLines,w=this.config.lineTerminatorsPattern;let N=0,I=[],_=[];const P=[],L=[];Object.freeze(L);let O=!1;const D=e=>{if(1===P.length&&void 0===e.tokenType.PUSH_MODE){const t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);C.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{P.pop();const e=(0,r.last)(P);I=this.patternIdxToConfig[e],_=this.charCodeToPatternIdxToConfig[e],N=I.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;O=!(!_||!t)}};function M(e){P.push(e),_=this.charCodeToPatternIdxToConfig[e],I=this.patternIdxToConfig[e],N=I.length,N=I.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;O=!(!_||!t)}let F;M.call(this,t);const q=this.config.recoveryEnabled;for(;R<v;){c=null,d=-1;const t=T.charCodeAt(R);let k;if(O){const e=ee(t),n=_[e];k=void 0!==n?n:L}else k=I;const j=k.length;for(n=0;n<j;n++){F=k[n];const r=F.pattern;l=null;const i=F.short;if(!1!==i?t===i&&(d=1,c=r):!0===F.isCustom?(y=r.exec(T,R,S,b),null!==y?(c=y[0],d=c.length,void 0!==y.payload&&(l=y.payload)):c=null):(r.lastIndex=R,d=this.matchLength(r,e,R)),-1!==d){if(a=F.longerAlt,void 0!==a){c=e.substring(R,R+d);const t=a.length;for(s=0;s<t;s++){const t=I[a[s]],n=t.pattern;if(u=null,!0===t.isCustom?(y=n.exec(T,R,S,b),null!==y?(o=y[0],void 0!==y.payload&&(u=y.payload)):o=null):(n.lastIndex=R,o=this.match(n,e,R)),o&&o.length>c.length){c=o,d=o.length,l=u,F=t;break}}}break}}if(-1!==d){if(h=F.group,void 0!==h&&(c=null!==c?c:e.substring(R,R+d),p=F.tokenTypeIdx,f=this.createTokenInstance(c,R,p,F.tokenType,x,A,d),this.handlePayload(f,l),!1===h?E=this.addToken(S,E,f):b[h].push(f)),!0===$&&!0===F.canLineTerminator){let t,n,r=0;w.lastIndex=0;do{c=null!==c?c:e.substring(R,R+d),t=w.test(c),!0===t&&(n=w.lastIndex-1,r++)}while(!0===t);0!==r?(x+=r,A=d-n,this.updateTokenEndLineColumnLocation(f,h,n,r,x,A,d)):A=this.computeNewColumn(A,d)}else A=this.computeNewColumn(A,d);R+=d,this.handleModes(F,D,M,f)}else{const t=R,n=x,s=A;let o=!1===q;for(;!1===o&&R<v;)for(R++,i=0;i<N;i++){const t=I[i],n=t.pattern,r=t.short;if(!1!==r?T.charCodeAt(R)===r&&(o=!0):!0===t.isCustom?o=null!==n.exec(T,R,S,b):(n.lastIndex=R,o=null!==n.exec(e)),!0===o)break}if(m=R-t,A=this.computeNewColumn(A,m),g=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(T,t,m,n,s,(0,r.last)(P)),C.push({offset:t,line:n,column:s,length:m,message:g}),!1===q)break}}return this.hasCustom||(S.length=E),{tokens:S,groups:b,errors:C}}handleModes(e,t,n,r){if(!0===e.pop){const i=e.push;t(r),void 0!==i&&n.call(this,i)}else void 0!==e.push&&n.call(this,e.push)}updateTokenEndLineColumnLocation(e,t,n,r,i,s,o){let a,c;void 0!==t&&(a=n===o-1,c=a?-1:0,1===r&&!0===a||(e.endLine=i+c,e.endColumn=s-1-c))}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}}createStartOnlyToken(e,t,n,r,i,s){return{image:e,startOffset:t,startLine:i,startColumn:s,tokenTypeIdx:n,tokenType:r}}createFullToken(e,t,n,r,i,s,o){return{image:e,startOffset:t,endOffset:t+o-1,startLine:i,endLine:i,startColumn:s,endColumn:s+o-1,tokenTypeIdx:n,tokenType:r}}addTokenUsingPush(e,t,n){return e.push(n),t}addTokenUsingMemberAccess(e,t,n){return e[t]=n,++t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){null!==t&&(e.payload=t)}match(e,t,n){return!0===e.test(t)?t.substring(n,e.lastIndex):null}matchLength(e,t,n){return!0===e.test(t)?e.lastIndex-n:-1}}function me(e){return ge(e)?e.LABEL:e.name}function ge(e){return(0,r.isString)(e.LABEL)&&""!==e.LABEL}fe.SKIPPED="This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",fe.NA=/NOT_APPLICABLE/;const ye="categories",Te="label",ve="group",Re="push_mode",Ee="pop_mode",ke="longer_alt",Se="line_breaks",Ce="start_chars_hint";function xe(e){return function(e){const t=e.pattern,n={};if(n.name=e.name,(0,r.isUndefined)(t)||(n.PATTERN=t),(0,r.has)(e,"parent"))throw"The parent property is no longer supported.\nSee: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.";return(0,r.has)(e,ye)&&(n.CATEGORIES=e[ye]),oe([n]),(0,r.has)(e,Te)&&(n.LABEL=e[Te]),(0,r.has)(e,ve)&&(n.GROUP=e[ve]),(0,r.has)(e,Ee)&&(n.POP_MODE=e[Ee]),(0,r.has)(e,Re)&&(n.PUSH_MODE=e[Re]),(0,r.has)(e,ke)&&(n.LONGER_ALT=e[ke]),(0,r.has)(e,Se)&&(n.LINE_BREAKS=e[Se]),(0,r.has)(e,Ce)&&(n.START_CHARS_HINT=e[Ce]),n}(e)}const Ae=xe({name:"EOF",pattern:fe.NA});function be(e,t,n,r,i,s,o,a){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:s,startColumn:o,endColumn:a,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function $e(e,t){return ne(e,t)}oe([Ae]);const we={buildMismatchTokenMessage:({expected:e,actual:t,previous:n,ruleName:r})=>`Expecting ${ge(e)?`--\x3e ${me(e)} <--`:`token of type --\x3e ${e.name} <--`} but found --\x3e '${t.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:e,ruleName:t})=>"Redundant input, expecting EOF but found: "+e.image,buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:i,ruleName:s}){const o="Expecting: ",a="\nbut found: '"+(0,r.first)(t).image+"'";if(i)return o+i+a;{const t=(0,r.reduce)(e,(e,t)=>e.concat(t),[]),n=(0,r.map)(t,e=>`[${(0,r.map)(e,e=>me(e)).join(", ")}]`);return o+`one of these possible Token sequences:\n${(0,r.map)(n,(e,t)=>` ${t+1}. ${e}`).join("\n")}`+a}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:i}){const s="Expecting: ",o="\nbut found: '"+(0,r.first)(t).image+"'";return n?s+n+o:s+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${(0,r.map)(e,e=>`[${(0,r.map)(e,e=>me(e)).join(",")}]`).join(" ,")}>`+o}};Object.freeze(we);const Ne={buildRuleNotFoundError:(e,t)=>"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"},Ie={buildDuplicateFoundError(e,t){const n=e.name,i=(0,r.first)(t),s=i.idx,a=v(i),c=(l=i)instanceof m?l.terminalType.name:l instanceof o?l.nonTerminalName:"";var l;let u=`->${a}${s>0?s:""}<- ${c?`with argument: ->${c}<-`:""}\n appears more than once (${t.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return u=u.replace(/[ \t]+/g," "),u=u.replace(/\s\s+/g,"\n"),u},buildNamespaceConflictError:e=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(e){const t=(0,r.map)(e.prefixPath,e=>me(e)).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin <OR${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(e){const t=0===e.alternation.idx?"":e.alternation.idx,n=0===e.prefixPath.length;let i=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${t}> inside <${e.topLevelRule.name}> Rule,\n`;return i+=n?"These alternatives are all empty (match no tokens), making them indistinguishable.\nOnly the last alternative may be empty.\n":`<${(0,r.map)(e.prefixPath,e=>me(e)).join(", ")}> may appears as a prefix path in all these alternatives.\n`,i+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",i},buildEmptyRepetitionError(e){let t=v(e.repetition);return 0!==e.repetition.idx&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError:e=>"deprecated",buildEmptyAlternationError:e=>`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:e=>`An Alternation cannot have more than 256 alternatives:\n<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(e){const t=e.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${t}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${t} --\x3e ${(0,r.map)(e.leftRecursionPath,e=>e.name).concat([t]).join(" --\x3e ")}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:e=>"deprecated",buildDuplicateRuleNameError(e){let t;return t=e.topLevelRule instanceof a?e.topLevelRule.name:e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};class _e extends y{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){(0,r.forEach)((0,r.values)(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:Xt.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}class Pe extends R{constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,r.clone)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,r.clone)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}}updateExpectedNext(){(0,r.isEmpty)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class Le extends Pe{constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const e=t.concat(n),r=new c({definition:e});this.possibleTokTypes=k(r),this.found=!0}}}class Oe extends R{constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}}class De extends Oe{walkMany(e,t,n){if(e.idx===this.occurrence){const e=(0,r.first)(t.concat(n));this.result.isEndOfRule=void 0===e,e instanceof m&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkMany(e,t,n)}}class Me extends Oe{walkManySep(e,t,n){if(e.idx===this.occurrence){const e=(0,r.first)(t.concat(n));this.result.isEndOfRule=void 0===e,e instanceof m&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkManySep(e,t,n)}}class Fe extends Oe{walkAtLeastOne(e,t,n){if(e.idx===this.occurrence){const e=(0,r.first)(t.concat(n));this.result.isEndOfRule=void 0===e,e instanceof m&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOne(e,t,n)}}class qe extends Oe{walkAtLeastOneSep(e,t,n){if(e.idx===this.occurrence){const e=(0,r.first)(t.concat(n));this.result.isEndOfRule=void 0===e,e instanceof m&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOneSep(e,t,n)}}function je(e,t,n=[]){n=(0,r.clone)(n);let i=[],s=0;function a(o){const a=je(o.concat((0,r.drop)(e,s+1)),t,n);return i.concat(a)}for(;n.length<t&&s<e.length;){const t=e[s];if(t instanceof c)return a(t.definition);if(t instanceof o)return a(t.definition);if(t instanceof l)i=a(t.definition);else{if(t instanceof u)return a(t.definition.concat([new h({definition:t.definition})]));if(t instanceof d)return a([new c({definition:t.definition}),new h({definition:[new m({terminalType:t.separator})].concat(t.definition)})]);if(t instanceof p){const e=t.definition.concat([new h({definition:[new m({terminalType:t.separator})].concat(t.definition)})]);i=a(e)}else if(t instanceof h){const e=t.definition.concat([new h({definition:t.definition})]);i=a(e)}else{if(t instanceof f)return(0,r.forEach)(t.definition,e=>{!1===(0,r.isEmpty)(e.definition)&&(i=a(e.definition))}),i;if(!(t instanceof m))throw Error("non exhaustive match");n.push(t.terminalType)}}s++}return i.push({partialPath:n,suffixDef:(0,r.drop)(e,s)}),i}function Ue(e,t,n,i){const s="EXIT_NONE_TERMINAL",g=[s],y="EXIT_ALTERNATIVE";let T=!1;const v=t.length,R=v-i-1,E=[],k=[];for(k.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!(0,r.isEmpty)(k);){const e=k.pop();if(e===y){T&&(0,r.last)(k).idx<=R&&k.pop();continue}const i=e.def,S=e.idx,C=e.ruleStack,x=e.occurrenceStack;if((0,r.isEmpty)(i))continue;const A=i[0];if(A===s){const e={idx:S,def:(0,r.drop)(i),ruleStack:(0,r.dropRight)(C),occurrenceStack:(0,r.dropRight)(x)};k.push(e)}else if(A instanceof m)if(S<v-1){const e=S+1;if(n(t[e],A.terminalType)){const t={idx:e,def:(0,r.drop)(i),ruleStack:C,occurrenceStack:x};k.push(t)}}else{if(S!==v-1)throw Error("non exhaustive match");E.push({nextTokenType:A.terminalType,nextTokenOccurrence:A.idx,ruleStack:C,occurrenceStack:x}),T=!0}else if(A instanceof o){const e=(0,r.clone)(C);e.push(A.nonTerminalName);const t=(0,r.clone)(x);t.push(A.idx);const n={idx:S,def:A.definition.concat(g,(0,r.drop)(i)),ruleStack:e,occurrenceStack:t};k.push(n)}else if(A instanceof l){const e={idx:S,def:(0,r.drop)(i),ruleStack:C,occurrenceStack:x};k.push(e),k.push(y);const t={idx:S,def:A.definition.concat((0,r.drop)(i)),ruleStack:C,occurrenceStack:x};k.push(t)}else if(A instanceof u){const e=new h({definition:A.definition,idx:A.idx}),t={idx:S,def:A.definition.concat([e],(0,r.drop)(i)),ruleStack:C,occurrenceStack:x};k.push(t)}else if(A instanceof d){const e=new m({terminalType:A.separator}),t=new h({definition:[e].concat(A.definition),idx:A.idx}),n={idx:S,def:A.definition.concat([t],(0,r.drop)(i)),ruleStack:C,occurrenceStack:x};k.push(n)}else if(A instanceof p){const e={idx:S,def:(0,r.drop)(i),ruleStack:C,occurrenceStack:x};k.push(e),k.push(y);const t=new m({terminalType:A.separator}),n=new h({definition:[t].concat(A.definition),idx:A.idx}),s={idx:S,def:A.definition.concat([n],(0,r.drop)(i)),ruleStack:C,occurrenceStack:x};k.push(s)}else if(A instanceof h){const e={idx:S,def:(0,r.drop)(i),ruleStack:C,occurrenceStack:x};k.push(e),k.push(y);const t=new h({definition:A.definition,idx:A.idx}),n={idx:S,def:A.definition.concat([t],(0,r.drop)(i)),ruleStack:C,occurrenceStack:x};k.push(n)}else if(A instanceof f)for(let e=A.definition.length-1;e>=0;e--){const t={idx:S,def:A.definition[e].definition.concat((0,r.drop)(i)),ruleStack:C,occurrenceStack:x};k.push(t),k.push(y)}else if(A instanceof c)k.push({idx:S,def:A.definition.concat((0,r.drop)(i)),ruleStack:C,occurrenceStack:x});else{if(!(A instanceof a))throw Error("non exhaustive match");k.push(Ge(A,S,C,x))}}return E}function Ge(e,t,n,i){const s=(0,r.clone)(n);s.push(e.name);const o=(0,r.clone)(i);return o.push(1),{idx:t,def:e.definition,ruleStack:s,occurrenceStack:o}}var ze;function Be(e){if(e instanceof l||"Option"===e)return ze.OPTION;if(e instanceof h||"Repetition"===e)return ze.REPETITION;if(e instanceof u||"RepetitionMandatory"===e)return ze.REPETITION_MANDATORY;if(e instanceof d||"RepetitionMandatoryWithSeparator"===e)return ze.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof p||"RepetitionWithSeparator"===e)return ze.REPETITION_WITH_SEPARATOR;if(e instanceof f||"Alternation"===e)return ze.ALTERNATION;throw Error("non exhaustive match")}function Ke(e){const{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e,s=Be(r);return s===ze.ALTERNATION?et(t,n,i):tt(t,n,s,i)}function We(e,t,n,i){const s=e.length,o=(0,r.every)(e,e=>(0,r.every)(e,e=>1===e.length));if(t)return function(t){const i=(0,r.map)(t,e=>e.GATE);for(let t=0;t<s;t++){const r=e[t],s=r.length,o=i[t];if(void 0===o||!1!==o.call(this))e:for(let e=0;e<s;e++){const i=r[e],s=i.length;for(let e=0;e<s;e++){const t=this.LA(e+1);if(!1===n(t,i[e]))continue e}return t}}};if(o&&!i){const t=(0,r.map)(e,e=>(0,r.flatten)(e)),n=(0,r.reduce)(t,(e,t,n)=>((0,r.forEach)(t,t=>{(0,r.has)(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),(0,r.forEach)(t.categoryMatches,t=>{(0,r.has)(e,t)||(e[t]=n)})}),e),{});return function(){const e=this.LA(1);return n[e.tokenTypeIdx]}}return function(){for(let t=0;t<s;t++){const r=e[t],i=r.length;e:for(let e=0;e<i;e++){const i=r[e],s=i.length;for(let e=0;e<s;e++){const t=this.LA(e+1);if(!1===n(t,i[e]))continue e}return t}}}}function Ve(e,t,n){const i=(0,r.every)(e,e=>1===e.length),s=e.length;if(i&&!n){const t=(0,r.flatten)(e);if(1===t.length&&(0,r.isEmpty)(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=(0,r.reduce)(t,(e,t,n)=>(e[t.tokenTypeIdx]=!0,(0,r.forEach)(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){e:for(let n=0;n<s;n++){const r=e[n],i=r.length;for(let e=0;e<i;e++){const n=this.LA(e+1);if(!1===t(n,r[e]))continue e}return!0}return!1}}!function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"}(ze||(ze={}));class He extends R{constructor(e,t,n){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,n,r){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=n.concat(r),!0)}walkOption(e,t,n){this.checkIsTarget(e,ze.OPTION,t,n)||super.walkOption(e,t,n)}walkAtLeastOne(e,t,n){this.checkIsTarget(e,ze.REPETITION_MANDATORY,t,n)||super.walkOption(e,t,n)}walkAtLeastOneSep(e,t,n){this.checkIsTarget(e,ze.REPETITION_MANDATORY_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}walkMany(e,t,n){this.checkIsTarget(e,ze.REPETITION,t,n)||super.walkOption(e,t,n)}walkManySep(e,t,n){this.checkIsTarget(e,ze.REPETITION_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}}class Ye extends y{constructor(e,t,n){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=n,this.result=[]}checkIsTarget(e,t){e.idx!==this.targetOccurrence||this.targetProdType!==t||void 0!==this.targetRef&&e!==this.targetRef||(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,ze.OPTION)}visitRepetition(e){this.checkIsTarget(e,ze.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,ze.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,ze.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,ze.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,ze.ALTERNATION)}}function Xe(e){const t=new Array(e);for(let n=0;n<e;n++)t[n]=[];return t}function Qe(e){let t=[""];for(let n=0;n<e.length;n++){const r=e[n],i=[];for(let e=0;e<t.length;e++){const n=t[e];i.push(n+"_"+r.tokenTypeIdx);for(let e=0;e<r.categoryMatches.length;e++){const t="_"+r.categoryMatches[e];i.push(n+t)}}t=i}return t}function Je(e,t,n){for(let r=0;r<e.length;r++){if(r===n)continue;const i=e[r];for(let e=0;e<t.length;e++)if(!0===i[t[e]])return!1}return!0}function Ze(e,t){const n=(0,r.map)(e,e=>je([e],1)),i=Xe(n.length),s=(0,r.map)(n,e=>{const t={};return(0,r.forEach)(e,e=>{const n=Qe(e.partialPath);(0,r.forEach)(n,e=>{t[e]=!0})}),t});let o=n;for(let e=1;e<=t;e++){const n=o;o=Xe(n.length);for(let a=0;a<n.length;a++){const c=n[a];for(let n=0;n<c.length;n++){const l=c[n].partialPath,u=c[n].suffixDef,d=Qe(l);if(Je(s,d,a)||(0,r.isEmpty)(u)||l.length===t){const e=i[a];if(!1===nt(e,l)){e.push(l);for(let e=0;e<d.length;e++){const t=d[e];s[a][t]=!0}}}else{const t=je(u,e+1,l);o[a]=o[a].concat(t),(0,r.forEach)(t,e=>{const t=Qe(e.partialPath);(0,r.forEach)(t,e=>{s[a][e]=!0})})}}}}return i}function et(e,t,n,r){const i=new Ye(e,ze.ALTERNATION,r);return t.accept(i),Ze(i.result,n)}function tt(e,t,n,r){const i=new Ye(e,n);t.accept(i);const s=i.result,o=new He(t,e,n).startWalking();return Ze([new c({definition:s}),new c({definition:o})],r)}function nt(e,t){e:for(let n=0;n<e.length;n++){const r=e[n];if(r.length===t.length){for(let e=0;e<r.length;e++){const n=t[e],i=r[e];if(!1==(n===i||void 0!==i.categoryMatchesMap[n.tokenTypeIdx]))continue e}return!0}}return!1}function rt(e){return(0,r.every)(e,e=>(0,r.every)(e,e=>(0,r.every)(e,e=>(0,r.isEmpty)(e.categoryMatches))))}function it(e){return`${v(e)}_#_${e.idx}_#_${st(e)}`}function st(e){return e instanceof m?e.terminalType.name:e instanceof o?e.nonTerminalName:""}class ot extends y{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function at(e,t,n,i=[]){const s=[],o=ct(t.definition);if((0,r.isEmpty)(o))return[];{const t=e.name;(0,r.includes)(o,e)&&s.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:i}),type:Xt.LEFT_RECURSION,ruleName:t});const a=(0,r.difference)(o,i.concat([e])),c=(0,r.flatMap)(a,t=>{const s=(0,r.clone)(i);return s.push(t),at(e,t,n,s)});return s.concat(c)}}function ct(e){let t=[];if((0,r.isEmpty)(e))return t;const n=(0,r.first)(e);if(n instanceof o)t.push(n.referencedRule);else if(n instanceof c||n instanceof l||n instanceof u||n instanceof d||n instanceof p||n instanceof h)t=t.concat(ct(n.definition));else if(n instanceof f)t=(0,r.flatten)((0,r.map)(n.definition,e=>ct(e.definition)));else if(!(n instanceof m))throw Error("non exhaustive match");const i=T(n),s=e.length>1;if(i&&s){const n=(0,r.drop)(e);return t.concat(ct(n))}return t}class lt extends y{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}class ut extends y{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}const dt="MismatchedTokenException",ht="NoViableAltException",pt="EarlyExitException",ft="NotAllInputParsedException",mt=[dt,ht,pt,ft];function gt(e){return(0,r.includes)(mt,e.name)}Object.freeze(mt);class yt extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class Tt extends yt{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=dt}}class vt extends yt{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=ht}}class Rt extends yt{constructor(e,t){super(e,t),this.name=ft}}class Et extends yt{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=pt}}const kt={},St="InRuleRecoveryException";class Ct extends Error{constructor(e){super(e),this.name=St}}function xt(e,t,n,r,i,s,o){const a=this.getKeyForAutomaticLookahead(r,i);let c=this.firstAfterRepMap[a];if(void 0===c){const e=this.getCurrRuleFullName();c=new s(this.getGAstProductions()[e],i).startWalking(),this.firstAfterRepMap[a]=c}let l=c.token,u=c.occurrence;const d=c.isEndOfRule;1===this.RULE_STACK.length&&d&&void 0===l&&(l=Ae,u=1),void 0!==l&&void 0!==u&&this.shouldInRepetitionRecoveryBeTried(l,u,o)&&this.tryInRepetitionRecovery(e,t,n,l)}const At=1024,bt=1280,$t=1536;function wt(e,t,n){return n|t|e}class Nt{constructor(e){var t;this.maxLookahead=null!==(t=null==e?void 0:e.maxLookahead)&&void 0!==t?t:Ht.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if((0,r.isEmpty)(t)){const n=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...n,...r,...i]}return t}validateNoLeftRecursion(e){return(0,r.flatMap)(e,e=>at(e,e,Ie))}validateEmptyOrAlternatives(e){return(0,r.flatMap)(e,e=>function(e,t){const n=new lt;e.accept(n);const i=n.alternations;return(0,r.flatMap)(i,n=>{const i=(0,r.dropRight)(n.definition);return(0,r.flatMap)(i,(i,s)=>{const o=Ue([i],[],ne,1);return(0,r.isEmpty)(o)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:s}),type:Xt.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:s+1}]:[]})})}(e,Ie))}validateAmbiguousAlternationAlternatives(e,t){return(0,r.flatMap)(e,e=>function(e,t,n){const i=new lt;e.accept(i);let s=i.alternations;s=(0,r.reject)(s,e=>!0===e.ignoreAmbiguities);return(0,r.flatMap)(s,i=>{const s=i.idx,o=i.maxLookahead||t,a=et(s,e,o,i),c=function(e,t,n,i){const s=[],o=(0,r.reduce)(e,(n,i,o)=>(!0===t.definition[o].ignoreAmbiguities||(0,r.forEach)(i,i=>{const a=[o];(0,r.forEach)(e,(e,n)=>{o!==n&&nt(e,i)&&!0!==t.definition[n].ignoreAmbiguities&&a.push(n)}),a.length>1&&!nt(s,i)&&(s.push(i),n.push({alts:a,path:i}))}),n),[]);return(0,r.map)(o,e=>{const s=(0,r.map)(e.alts,e=>e+1);return{message:i.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:s,prefixPath:e.path}),type:Xt.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}})}(a,i,e,n),l=function(e,t,n,i){const s=(0,r.reduce)(e,(e,t,n)=>{const i=(0,r.map)(t,e=>({idx:n,path:e}));return e.concat(i)},[]);return(0,r.compact)((0,r.flatMap)(s,e=>{if(!0===t.definition[e.idx].ignoreAmbiguities)return[];const o=e.idx,a=e.path,c=(0,r.filter)(s,e=>{return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx<o&&(n=e.path,i=a,n.length<i.length&&(0,r.every)(n,(e,t)=>{const n=i[t];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]}));var n,i});return(0,r.map)(c,e=>{const r=[e.idx+1,o+1],s=0===t.idx?"":t.idx;return{message:i.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:r,prefixPath:e.path}),type:Xt.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:s,alternatives:r}})}))}(a,i,e,n);return c.concat(l)})}(e,t,Ie))}validateSomeNonEmptyLookaheadPath(e,t){return function(e,t,n){const i=[];return(0,r.forEach)(e,e=>{const s=new ut;e.accept(s);const o=s.allProductions;(0,r.forEach)(o,s=>{const o=Be(s),a=s.maxLookahead||t,c=tt(s.idx,e,o,a)[0];if((0,r.isEmpty)((0,r.flatten)(c))){const t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:s});i.push({message:t,type:Xt.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),i}(e,t,Ie)}buildLookaheadForAlternation(e){return function(e,t,n,r,i,s){const o=et(e,t,n);return s(o,r,rt(o)?re:ne,i)}(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,We)}buildLookaheadForOptional(e){return function(e,t,n,r,i,s){const o=tt(e,t,i,n),a=rt(o)?re:ne;return s(o[0],a,r)}(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Be(e.prodType),Ve)}}const It=new class extends y{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}};function _t(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset==1&&(e.endOffset=t.endOffset)}function Pt(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset==1&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function Lt(e,t){Object.defineProperty(e,"name",{enumerable:!1,configurable:!0,writable:!1,value:t})}function Ot(e,t){const n=(0,r.keys)(e),i=n.length;for(let r=0;r<i;r++){const i=e[n[r]],s=i.length;for(let e=0;e<s;e++){const n=i[e];void 0===n.tokenTypeIdx&&this[n.name](n.children,t)}}}var Dt;!function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"}(Dt||(Dt={}));const Mt={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Mt);const Ft=!0,qt=Math.pow(2,8)-1,jt=xe({name:"RECORDING_PHASE_TOKEN",pattern:fe.NA});oe([jt]);const Ut=be(jt,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(Ut);const Gt={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}};function zt(e,t,n,i=!1){Wt(n);const s=(0,r.last)(this.recordingProdStack),o=(0,r.isFunction)(t)?t:t.DEF,a=new e({definition:[],idx:n});return i&&(a.separator=t.SEP),(0,r.has)(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(a),o.call(this),s.definition.push(a),this.recordingProdStack.pop(),Mt}function Bt(e,t){Wt(t);const n=(0,r.last)(this.recordingProdStack),i=!1===(0,r.isArray)(e),s=!1===i?e:e.DEF,o=new f({definition:[],idx:t,ignoreAmbiguities:i&&!0===e.IGNORE_AMBIGUITIES});(0,r.has)(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD);const a=(0,r.some)(s,e=>(0,r.isFunction)(e.GATE));return o.hasPredicates=a,n.definition.push(o),(0,r.forEach)(s,e=>{const t=new c({definition:[]});o.definition.push(t),(0,r.has)(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:(0,r.has)(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),Mt}function Kt(e){return 0===e?"":`${e}`}function Wt(e){if(e<0||e>qt){const t=new Error(`Invalid DSL Method idx value: <${e}>\n\tIdx value must be a none negative value smaller than ${qt+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}const Vt=be(Ae,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Vt);const Ht=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:we,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Yt=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var Xt,Qt;function Jt(e=void 0){return function(){return e}}!function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"}(Xt||(Xt={}));class Zt{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;const t=this.className;this.TRACE_INIT("toFastProps",()=>{i(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),(0,r.forEach)(this.definedRulesNames,e=>{const t=this[e].originalGrammarAction;let n;this.TRACE_INIT(`${e} Rule`,()=>{n=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=n})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=function(e){const t=(0,r.defaults)(e,{errMsgProvider:Ne}),n={};return(0,r.forEach)(e.rules,e=>{n[e.name]=e}),function(e,t){const n=new _e(e,t);return n.resolveRefs(),n.errors}(n,t.errMsgProvider)}({rules:(0,r.values)(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if((0,r.isEmpty)(n)&&!1===this.skipValidations){const n=(e={rules:(0,r.values)(this.gastProductionsCache),tokenTypes:(0,r.values)(this.tokensMap),errMsgProvider:Ie,grammarName:t},function(e,t,n,i){const s=(0,r.flatMap)(e,e=>function(e,t){const n=new ot;e.accept(n);const i=n.allProductions,s=(0,r.groupBy)(i,it),o=(0,r.pickBy)(s,e=>e.length>1);return(0,r.map)((0,r.values)(o),n=>{const i=(0,r.first)(n),s=t.buildDuplicateFoundError(e,n),o=v(i),a={message:s,type:Xt.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:o,occurrence:i.idx},c=st(i);return c&&(a.parameter=c),a})}(e,n)),o=function(e,t,n){const i=[],s=(0,r.map)(t,e=>e.name);return(0,r.forEach)(e,e=>{const t=e.name;if((0,r.includes)(s,t)){const r=n.buildNamespaceConflictError(e);i.push({message:r,type:Xt.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),i}(e,t,n),a=(0,r.flatMap)(e,e=>function(e,t){const n=new lt;e.accept(n);const i=n.alternations;return(0,r.flatMap)(i,n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:Xt.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[])}(e,n)),c=(0,r.flatMap)(e,t=>function(e,t,n,i){const s=[],o=(0,r.reduce)(t,(t,n)=>n.name===e.name?t+1:t,0);if(o>1){const t=i.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});s.push({message:t,type:Xt.DUPLICATE_RULE_NAME,ruleName:e.name})}return s}(t,e,i,n));return s.concat(o,a,c)}((e=(0,r.defaults)(e,{errMsgProvider:Ie})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)),i=function(e){const t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return(0,r.map)(t,e=>Object.assign({type:Xt.CUSTOM_LOOKAHEAD_VALIDATION},e))}({lookaheadStrategy:this.lookaheadStrategy,rules:(0,r.values)(this.gastProductionsCache),tokenTypes:(0,r.values)(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(n,i)}var e}),(0,r.isEmpty)(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const e=function(e){const t={};return(0,r.forEach)(e,e=>{const n=new C(e).startWalking();(0,r.assign)(t,n)}),t}((0,r.values)(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var e,t;null===(t=(e=this.lookaheadStrategy).initialize)||void 0===t||t.call(e,{rules:(0,r.values)(this.gastProductionsCache)}),this.preComputeLookaheadFunctions((0,r.values)(this.gastProductionsCache))})),!Zt.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,r.isEmpty)(this.definitionErrors))throw e=(0,r.map)(this.definitionErrors,e=>e.message),new Error(`Parser Definition Errors detected:\n ${e.join("\n-------------------------------\n")}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;const n=this;if(n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initContentAssist(),n.initGastRecorder(t),n.initPerformanceTracer(t),(0,r.has)(t,"ignoredIssues"))throw new Error("The <ignoredIssues> IParserConfig property has been deprecated.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=(0,r.has)(t,"skipValidations")?t.skipValidations:Ht.skipValidations}}Zt.DEFER_DEFINITION_ERRORS_HANDLING=!1,Qt=Zt,[class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,r.has)(e,"recoveryEnabled")?e.recoveryEnabled:Ht.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=xt)}getTokenToInsert(e){const t=be(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,i){const s=this.findReSyncTokenType(),o=this.exportLexerState(),a=[];let c=!1;const l=this.LA(1);let u=this.LA(1);const d=()=>{const e=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:e,ruleName:this.getCurrRuleFullName()}),n=new Tt(t,l,this.LA(0));n.resyncedTokens=(0,r.dropRight)(a),this.SAVE_ERROR(n)};for(;!c;){if(this.tokenMatcher(u,i))return void d();if(n.call(this))return d(),void e.apply(this,t);this.tokenMatcher(u,s)?c=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,a))}this.importLexerState(o)}shouldInRepetitionRecoveryBeTried(e,t,n){return!1!==n&&!this.tokenMatcher(this.LA(1),e)&&!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t))}getFollowsForInRuleRecovery(e,t){const n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new Ct("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if((0,r.isEmpty)(t))return!1;const n=this.LA(1);return void 0!==(0,r.find)(t,e=>this.tokenMatcher(n,e))}canRecoverWithSingleTokenDeletion(e){return!!this.canTokenTypeBeDeletedInRecovery(e)&&this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(t);return(0,r.includes)(n,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),n=2;for(;;){const i=(0,r.find)(e,e=>$e(t,e));if(void 0!==i)return i;t=this.LA(n),n++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return kt;const e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return(0,r.map)(e,(n,r)=>0===r?kt:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])})}flattenFollowSet(){const e=(0,r.map)(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e));return(0,r.flatten)(e)}getFollowSetFromFollowKey(e){if(e===kt)return[Ae];const t=e.ruleName+e.idxInCallingRule+S+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,Ae)||t.push(e),t}reSyncTo(e){const t=[];let n=this.LA(1);for(;!1===this.tokenMatcher(n,e);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return(0,r.dropRight)(t)}attemptInRepetitionRecovery(e,t,n,r,i,s,o){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,r.clone)(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return(0,r.map)(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},class{initLooksAhead(e){this.dynamicTokensEnabled=(0,r.has)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Ht.dynamicTokensEnabled,this.maxLookahead=(0,r.has)(e,"maxLookahead")?e.maxLookahead:Ht.maxLookahead,this.lookaheadStrategy=(0,r.has)(e,"lookaheadStrategy")?e.lookaheadStrategy:new Nt({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){(0,r.forEach)(e,e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,()=>{const{alternation:t,repetition:n,option:i,repetitionMandatory:s,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:a}=function(e){It.reset(),e.accept(It);const t=It.dslMethods;return It.reset(),t}(e);(0,r.forEach)(t,t=>{const n=0===t.idx?"":t.idx;this.TRACE_INIT(`${v(t)}${n}`,()=>{const n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=wt(this.fullRuleNameToShort[e.name],256,t.idx);this.setLaFuncCache(r,n)})}),(0,r.forEach)(n,t=>{this.computeLookaheadFunc(e,t.idx,768,"Repetition",t.maxLookahead,v(t))}),(0,r.forEach)(i,t=>{this.computeLookaheadFunc(e,t.idx,512,"Option",t.maxLookahead,v(t))}),(0,r.forEach)(s,t=>{this.computeLookaheadFunc(e,t.idx,At,"RepetitionMandatory",t.maxLookahead,v(t))}),(0,r.forEach)(o,t=>{this.computeLookaheadFunc(e,t.idx,$t,"RepetitionMandatoryWithSeparator",t.maxLookahead,v(t))}),(0,r.forEach)(a,t=>{this.computeLookaheadFunc(e,t.idx,bt,"RepetitionWithSeparator",t.maxLookahead,v(t))})})})}computeLookaheadFunc(e,t,n,r,i,s){this.TRACE_INIT(`${s}${0===t?"":t}`,()=>{const s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),o=wt(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(o,s)})}getKeyForAutomaticLookahead(e,t){return wt(this.getLastExplicitRuleShortName(),e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,r.has)(e,"nodeLocationTracking")?e.nodeLocationTracking:Ht.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Pt,this.setNodeLocationFromNode=Pt,this.cstPostRule=r.noop,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=r.noop,this.setNodeLocationFromNode=r.noop,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=_t,this.setNodeLocationFromNode=_t,this.cstPostRule=r.noop,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=r.noop,this.setNodeLocationFromNode=r.noop,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=r.noop,this.setNodeLocationFromNode=r.noop,this.cstPostRule=r.noop,this.setInitialNodeLocation=r.noop}else this.cstInvocationStateUpdate=r.noop,this.cstFinallyStateUpdate=r.noop,this.cstPostTerminal=r.noop,this.cstPostNonTerminal=r.noop,this.cstPostRule=r.noop}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];var r,i,s;i=t,s=e,void 0===(r=n).children[s]?r.children[s]=[i]:r.children[s].push(i),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];!function(e,t,n){void 0===e.children[t]?e.children[t]=[n]:e.children[t].push(n)}(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if((0,r.isUndefined)(this.baseCstVisitorConstructor)){const e=function(e,t){const n=function(){};Lt(n,e+"BaseSemantics");const i={visit:function(e,t){if((0,r.isArray)(e)&&(e=e[0]),!(0,r.isUndefined)(e))return this[e.name](e.children,t)},validateVisitor:function(){const e=function(e,t){const n=function(e,t){const n=(0,r.filter)(t,t=>!1===(0,r.isFunction)(e[t])),i=(0,r.map)(n,t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:Dt.MISSING_METHOD,methodName:t}));return(0,r.compact)(i)}(e,t);return n}(this,t);if(!(0,r.isEmpty)(e)){const t=(0,r.map)(e,e=>e.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join("\n\n").replace(/\n/g,"\n\t")}`)}}};return(n.prototype=i).constructor=n,n._RULE_NAMES=t,n}(this.className,(0,r.keys)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if((0,r.isUndefined)(this.baseCstVisitorWithDefaultsConstructor)){const e=function(e,t,n){const i=function(){};Lt(i,e+"BaseSemanticsWithDefaults");const s=Object.create(n.prototype);return(0,r.forEach)(t,e=>{s[e]=Ot}),(i.prototype=s).constructor=i,i}(this.className,(0,r.keys)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Vt}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Vt:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=re,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,r.has)(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if((0,r.isArray)(e)){if((0,r.isEmpty)(e))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if((0,r.isArray)(e))this.tokensMap=(0,r.reduce)(e,(e,t)=>(e[t.name]=t,e),{});else if((0,r.has)(e,"modes")&&(0,r.every)((0,r.flatten)((0,r.values)(e.modes)),ue)){const t=(0,r.flatten)((0,r.values)(e.modes)),n=(0,r.uniq)(t);this.tokensMap=(0,r.reduce)(n,(e,t)=>(e[t.name]=t,e),{})}else{if(!(0,r.isObject)(e))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=(0,r.clone)(e)}this.tokensMap.EOF=Ae;const n=(0,r.has)(e,"modes")?(0,r.flatten)((0,r.values)(e.modes)):(0,r.values)(e),i=(0,r.every)(n,e=>(0,r.isEmpty)(e.categoryMatches));this.tokenMatcher=i?re:ne,oe((0,r.values)(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const i=(0,r.has)(n,"resyncEnabled")?n.resyncEnabled:Yt.resyncEnabled,s=(0,r.has)(n,"recoveryValueFunc")?n.recoveryValueFunc:Yt.recoveryValueFunc,o=this.ruleShortNameIdx<<12;let a;return this.ruleShortNameIdx++,this.shortRuleNameToFull[o]=e,this.fullRuleNameToShort[e]=o,a=!0===this.outputCst?function(...n){try{this.ruleInvocationStateUpdate(o,e,this.subruleIdx),t.apply(this,n);const r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(e){return this.invokeRuleCatch(e,i,s)}finally{this.ruleFinallyStateUpdate()}}:function(...n){try{return this.ruleInvocationStateUpdate(o,e,this.subruleIdx),t.apply(this,n)}catch(e){return this.invokeRuleCatch(e,i,s)}finally{this.ruleFinallyStateUpdate()}},Object.assign(a,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,n){const r=1===this.RULE_STACK.length,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(gt(e)){const t=e;if(i){const r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r)){if(t.resyncedTokens=this.reSyncTo(r),this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}return n(e)}if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}if(r)return this.moveToTerminatedState(),n(e);throw t}throw e}optionInternal(e,t){const n=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof e){r=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=()=>t.call(this)&&e.call(this)}}else r=e;if(!0===i.call(this))return r.call(this)}atLeastOneInternal(e,t){const n=this.getKeyForAutomaticLookahead(At,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;if(!0!==i.call(this))throw this.raiseEarlyExitException(e,ze.REPETITION_MANDATORY,t.ERR_MSG);{let e=this.doSingleRepetition(r);for(;!0===i.call(this)&&!0===e;)e=this.doSingleRepetition(r)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,At,e,Fe)}atLeastOneSepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead($t,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(e,ze.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);{r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,qe],t,$t,e,qe)}}manyInternal(e,t){const n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;let s=!0;for(;!0===i.call(this)&&!0===s;)s=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,768,e,De,s)}manySepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(bt,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,Me],t,bt,e,Me)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,$t,e,i)}doSingleRepetition(e){const t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){const n=this.getKeyForAutomaticLookahead(256,t),i=(0,r.isArray)(e)?e:e.DEF,s=this.getLaFuncFromCache(n).call(this,i);if(void 0!==s)return i[s].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){const e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Rt(t,e))}}subruleInternal(e,t,n){let r;try{const i=void 0!==n?n.ARGS:void 0;return this.subruleIdx=t,r=e.apply(this,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:e.ruleName),r}catch(t){throw this.subruleInternalError(t,n,e.ruleName)}}subruleInternalError(e,t,n){throw gt(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{const t=this.LA(1);!0===this.tokenMatcher(t,e)?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r;const i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Tt(r,t,i))}consumeInternalRecovery(e,t,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;{const r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(e){throw e.name===St?n:e}}}saveRecogState(){const e=this.errors,t=(0,r.clone)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Ae)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},class{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=Yt){if((0,r.includes)(this.definedRulesNames,e)){const t={message:Ie.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Xt.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);const i=this.defineRule(e,t,n);return this[e]=i,i}OVERRIDE_RULE(e,t,n=Yt){const i=function(e,t,n){const i=[];let s;return(0,r.includes)(t,e)||(s=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,i.push({message:s,type:Xt.INVALID_RULE_OVERRIDE,ruleName:e})),i}(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);const s=this.defineRule(e,t,n);return this[e]=s,s}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if(gt(e))return!1;throw e}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return e=(0,r.values)(this.gastProductionsCache),(0,r.map)(e,g);var e}},class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=(0,r.has)(e,"errorMessageProvider")?e.errorMessageProvider:Ht.errorMessageProvider}SAVE_ERROR(e){if(gt(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,r.clone)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return(0,r.clone)(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){const r=this.getCurrRuleFullName(),i=tt(e,this.getGAstProductions()[r],t,this.maxLookahead)[0],s=[];for(let e=1;e<=this.maxLookahead;e++)s.push(this.LA(e));const o=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:s,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new Et(o,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const n=this.getCurrRuleFullName(),r=et(e,this.getGAstProductions()[n],this.maxLookahead),i=[];for(let e=1;e<=this.maxLookahead;e++)i.push(this.LA(e));const s=this.LA(0),o=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:s,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new vt(o,this.LA(1),s))}},class{initContentAssist(){}computeContentAssist(e,t){const n=this.gastProductionsCache[e];if((0,r.isUndefined)(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return Ue([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=(0,r.first)(e.ruleStack),n=this.getGAstProductions()[t];return new Le(n,e).startWalking()}},class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const e=this;for(let t=0;t<10;t++){const n=t>0?t:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return Vt}topLevelRuleRecord(e,t){try{const n=new a({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(e){if(!0!==e.KNOWN_RECORDER_ERROR)try{e.message=e.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(t){throw e}throw e}}optionInternalRecord(e,t){return zt.call(this,l,e,t)}atLeastOneInternalRecord(e,t){zt.call(this,u,t,e)}atLeastOneSepFirstInternalRecord(e,t){zt.call(this,d,t,e,Ft)}manyInternalRecord(e,t){zt.call(this,h,t,e)}manySepFirstInternalRecord(e,t){zt.call(this,p,t,e,Ft)}orInternalRecord(e,t){return Bt.call(this,e,t)}subruleInternalRecord(e,t,n){if(Wt(t),!e||!1===(0,r.has)(e,"ruleName")){const n=new Error(`<SUBRULE${Kt(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const i=(0,r.last)(this.recordingProdStack),s=e.ruleName,a=new o({idx:t,nonTerminalName:s,label:null==n?void 0:n.LABEL,referencedRule:void 0});return i.definition.push(a),this.outputCst?Gt:Mt}consumeInternalRecord(e,t,n){if(Wt(t),!ce(e)){const n=new Error(`<CONSUME${Kt(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const i=(0,r.last)(this.recordingProdStack),s=new m({idx:t,terminalType:e,label:null==n?void 0:n.LABEL});return i.definition.push(s),Ut}},class{initPerformanceTracer(e){if((0,r.has)(e,"traceInitPerf")){const t=e.traceInitPerf,n="number"==typeof t;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Ht.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--\x3e <${e}>`);const{time:r,value:i}=te(t),s=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(`${n}<-- <${e}> time: ${r}ms`),this.traceInitIndent--,i}return t()}}].forEach(e=>{const t=e.prototype;Object.getOwnPropertyNames(t).forEach(n=>{if("constructor"===n)return;const r=Object.getOwnPropertyDescriptor(t,n);r&&(r.get||r.set)?Object.defineProperty(Qt.prototype,n,r):Qt.prototype[n]=e.prototype[n]})});class en extends Zt{constructor(e,t=Ht){const n=(0,r.clone)(t);n.outputCst=!1,super(e,n)}}},610(e,t,n){"use strict";n.d(t,{t:()=>dn,u:()=>hn});var r=n(6373),i=n(418),s=n(2806),o=n(2151),a=n(1064),c=n(2997),l=n(7612);function u(e,t,n){return`${e.name}_${t}_${n}`}class d{constructor(e){this.target=e}isEpsilon(){return!1}}class h extends d{constructor(e,t){super(e),this.tokenType=t}}class p extends d{constructor(e){super(e)}isEpsilon(){return!0}}class f extends d{constructor(e,t,n){super(e),this.rule=t,this.followState=n}isEpsilon(){return!0}}function m(e,t,n){return n instanceof a.BK?E(e,t,n.terminalType,n):n instanceof a.wL?function(e,t,n){const r=n.referencedRule,i=e.ruleToStartState.get(r),s=C(e,t,n,{type:1}),o=C(e,t,n,{type:1});return x(s,new f(i,r,o)),{left:s,right:o}}(e,t,n):n instanceof a.ak?function(e,t,n){const r=C(e,t,n,{type:1});v(e,r);const i=c(n.definition,n=>m(e,t,n));return R(e,t,r,n,...i)}(e,t,n):n instanceof a.c$?function(e,t,n){const r=C(e,t,n,{type:1});v(e,r);return function(e,t,n,r){const i=r.left;return S(i,r.right),e.decisionMap[u(t,"Option",n.idx)]=i,r}(e,t,n,R(e,t,r,n,g(e,t,n)))}(e,t,n):n instanceof a.Y2?function(e,t,n){const r=C(e,t,n,{type:5});v(e,r);return T(e,t,n,R(e,t,r,n,g(e,t,n)))}(e,t,n):n instanceof a.Pp?function(e,t,n){const r=C(e,t,n,{type:5});v(e,r);return T(e,t,n,R(e,t,r,n,g(e,t,n)),E(e,t,n.separator,n))}(e,t,n):n instanceof a.$P?function(e,t,n){const r=C(e,t,n,{type:4});v(e,r);return y(e,t,n,R(e,t,r,n,g(e,t,n)))}(e,t,n):n instanceof a.Cy?function(e,t,n){const r=C(e,t,n,{type:4});v(e,r);return y(e,t,n,R(e,t,r,n,g(e,t,n)),E(e,t,n.separator,n))}(e,t,n):g(e,t,n)}function g(e,t,n){const r=l(c(n.definition,n=>m(e,t,n)),e=>void 0!==e);return 1===r.length?r[0]:0===r.length?void 0:function(e,t){const n=t.length;for(let r=0;r<n-1;r++){const n=t[r];let i;1===n.left.transitions.length&&(i=n.left.transitions[0]);const s=i instanceof f,o=i,a=t[r+1].left;1===n.left.type&&1===n.right.type&&void 0!==i&&(s&&o.followState===n.right||i.target===n.right)?(s?o.followState=a:i.target=a,A(e,n.right)):S(n.right,a)}const r=t[0],i=t[n-1];return{left:r.left,right:i.right}}(e,r)}function y(e,t,n,r,i){const s=r.left,o=r.right,a=C(e,t,n,{type:11});v(e,a);const c=C(e,t,n,{type:12});return s.loopback=a,c.loopback=a,e.decisionMap[u(t,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",n.idx)]=a,S(o,a),void 0===i?(S(a,s),S(a,c)):(S(a,c),S(a,i.left),S(i.right,s)),{left:s,right:c}}function T(e,t,n,r,i){const s=r.left,o=r.right,a=C(e,t,n,{type:10});v(e,a);const c=C(e,t,n,{type:12}),l=C(e,t,n,{type:9});return a.loopback=l,c.loopback=l,S(a,s),S(a,c),S(o,l),void 0!==i?(S(l,c),S(l,i.left),S(i.right,s)):S(l,a),e.decisionMap[u(t,i?"RepetitionWithSeparator":"Repetition",n.idx)]=a,{left:a,right:c}}function v(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function R(e,t,n,r,...i){const s=C(e,t,r,{type:8,start:n});n.end=s;for(const e of i)void 0!==e?(S(n,e.left),S(e.right,s)):S(n,s);const o={left:n,right:s};return e.decisionMap[u(t,function(e){if(e instanceof a.ak)return"Alternation";if(e instanceof a.c$)return"Option";if(e instanceof a.Y2)return"Repetition";if(e instanceof a.Pp)return"RepetitionWithSeparator";if(e instanceof a.$P)return"RepetitionMandatory";if(e instanceof a.Cy)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}(r),r.idx)]=n,o}function E(e,t,n,r){const i=C(e,t,r,{type:1}),s=C(e,t,r,{type:1});return x(i,new h(s,n)),{left:i,right:s}}function k(e,t,n){const r=e.ruleToStartState.get(t);S(r,n.left);const i=e.ruleToStopState.get(t);return S(n.right,i),{left:r,right:i}}function S(e,t){x(e,new p(t))}function C(e,t,n,r){const i=Object.assign({atn:e,production:n,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},r);return e.states.push(i),i}function x(e,t){0===e.transitions.length&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}function A(e,t){e.states.splice(e.states.indexOf(t),1)}const b={};class ${constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const t=w(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return c(this.configs,e=>e.alt)}get key(){let e="";for(const t in this.map)e+=t+":";return e}}function w(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map(e=>e.stateNumber.toString()).join("_")}`}var N=n(1684),I=n(7307),_=n(14),P=n(5970),L=n(9754),O=n(2193),D=n(860);function M(e,t){const n={};return r=>{const i=r.toString();let s=n[i];return void 0!==s||(s={atnStartState:e,decision:t,states:{}},n[i]=s),s}}class F{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let n=0;n<t;n++)e+=!0===this.predicates[n]?"1":"0";return e}}const q=new F;class j extends a.T6{constructor(e){var t;super(),this.logging=null!==(t=null==e?void 0:e.logging)&&void 0!==t?t:e=>console.log(e)}initialize(e){this.atn=function(e){const t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};!function(e,t){const n=t.length;for(let r=0;r<n;r++){const n=t[r],i=C(e,n,void 0,{type:2}),s=C(e,n,void 0,{type:7});i.stop=s,e.ruleToStartState.set(n,i),e.ruleToStopState.set(n,s)}}(t,e);const n=e.length;for(let r=0;r<n;r++){const n=e[r],i=g(t,n,n);void 0!==i&&k(t,n,i)}return t}(e.rules),this.dfas=function(e){const t=e.decisionStates.length,n=Array(t);for(let r=0;r<t;r++)n[r]=M(e.decisionStates[r],r);return n}(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:t,rule:n,hasPredicates:r,dynamicTokensEnabled:i}=e,s=this.dfas,o=this.logging,l=u(n,"Alternation",t),d=this.atn.decisionMap[l].decision,h=c((0,a.jk)({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:n}),e=>c(e,e=>e[0]));if(U(h,!1)&&!i){const e=D(h,(e,t,n)=>(L(t,t=>{t&&(e[t.tokenTypeIdx]=n,L(t.categoryMatches,t=>{e[t]=n}))}),e),{});return r?function(t){var n;const r=this.LA(1),i=e[r.tokenTypeIdx];if(void 0!==t&&void 0!==i){const e=null===(n=t[i])||void 0===n?void 0:n.GATE;if(void 0!==e&&!1===e.call(this))return}return i}:function(){const t=this.LA(1);return e[t.tokenTypeIdx]}}return r?function(e){const t=new F,n=void 0===e?0:e.length;for(let r=0;r<n;r++){const n=null==e?void 0:e[r].GATE;t.set(r,void 0===n||n.call(this))}const r=G.call(this,s,d,t,o);return"number"==typeof r?r:void 0}:function(){const e=G.call(this,s,d,q,o);return"number"==typeof e?e:void 0}}buildLookaheadForOptional(e){const{prodOccurrence:t,rule:n,prodType:r,dynamicTokensEnabled:i}=e,s=this.dfas,o=this.logging,l=u(n,r,t),d=this.atn.decisionMap[l].decision,h=c((0,a.jk)({maxLookahead:1,occurrence:t,prodType:r,rule:n}),e=>c(e,e=>e[0]));if(U(h)&&h[0][0]&&!i){const e=h[0],t=P(e);if(1===t.length&&O(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=D(t,(e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,L(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){const e=G.call(this,s,d,q,o);return"object"!=typeof e&&0===e}}}function U(e,t=!0){const n=new Set;for(const r of e){const e=new Set;for(const i of r){if(void 0===i){if(t)break;return!1}const r=[i.tokenTypeIdx].concat(i.categoryMatches);for(const t of r)if(n.has(t)){if(!e.has(t))return!1}else n.add(t),e.add(t)}}return!0}function G(e,t,n,r){const i=e[t](n);let s=i.start;return void 0===s&&(s=Q(i,Y(function(e){const t=new $,n=e.transitions.length;for(let r=0;r<n;r++)J({state:e.transitions[r].target,alt:r,stack:[]},t);return t}(i.atnStartState))),i.start=s),z.apply(this,[i,s,n,r])}function z(e,t,n,r){let i=t,s=1;const o=[];let a=this.LA(s++);for(;;){let t=V(i,a);if(void 0===t&&(t=B.apply(this,[e,i,a,s,n,r])),t===b)return W(o,i,a);if(!0===t.isAcceptState)return t.prediction;i=t,o.push(a),a=this.LA(s++)}}function B(e,t,n,r,i,s){const o=function(e,t,n){const r=new $,i=[];for(const s of e.elements){if(!1===n.is(s.alt))continue;if(7===s.state.type){i.push(s);continue}const e=s.state.transitions.length;for(let n=0;n<e;n++){const e=H(s.state.transitions[n],t);void 0!==e&&r.add({state:e,alt:s.alt,stack:s.stack})}}let s;if(0===i.length&&1===r.size&&(s=r),void 0===s){s=new $;for(const e of r.elements)J(e,s)}if(i.length>0&&!function(e){for(const t of e.elements)if(7===t.state.type)return!0;return!1}(s))for(const e of i)s.add(e);return s}(t.configs,n,i);if(0===o.size)return X(e,t,n,b),b;let a=Y(o);const c=function(e,t){let n;for(const r of e.elements)if(!0===t.is(r.alt))if(void 0===n)n=r.alt;else if(n!==r.alt)return;return n}(o,i);if(void 0!==c)a.isAcceptState=!0,a.prediction=c,a.configs.uniqueAlt=c;else if(function(e){if(function(e){for(const t of e.elements)if(7!==t.state.type)return!1;return!0}(e))return!0;const t=function(e){const t=new Map;for(const n of e){const e=w(n,!1);let r=t.get(e);void 0===r&&(r={},t.set(e,r)),r[n.alt]=!0}return t}(e.elements);return function(e){for(const t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}(t)&&!function(e){for(const t of Array.from(e.values()))if(1===Object.keys(t).length)return!0;return!1}(t)}(o)){const t=N(o.alts);a.isAcceptState=!0,a.prediction=t,a.configs.uniqueAlt=t,K.apply(this,[e,r,o.alts,s])}return a=X(e,t,n,a),a}function K(e,t,n,r){const i=[];for(let e=1;e<=t;e++)i.push(this.LA(e).tokenType);const s=e.atnStartState;r(function(e){const t=c(e.prefixPath,e=>(0,a.Sk)(e)).join(", "),n=0===e.production.idx?"":e.production.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${function(e){if(e instanceof a.wL)return"SUBRULE";if(e instanceof a.c$)return"OPTION";if(e instanceof a.ak)return"OR";if(e instanceof a.$P)return"AT_LEAST_ONE";if(e instanceof a.Cy)return"AT_LEAST_ONE_SEP";if(e instanceof a.Pp)return"MANY_SEP";if(e instanceof a.Y2)return"MANY";if(e instanceof a.BK)return"CONSUME";throw Error("non exhaustive match")}(e.production)}${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r}({topLevelRule:s.rule,ambiguityIndices:n,production:s.production,prefixPath:i}))}function W(e,t,n){const r=I(t.configs.elements,e=>e.state.transitions);return{actualToken:n,possibleTokenTypes:_(r.filter(e=>e instanceof h).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function V(e,t){return e.edges[t.tokenTypeIdx]}function H(e,t){if(e instanceof h&&(0,a.G)(t,e.tokenType))return e.target}function Y(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function X(e,t,n,r){return r=Q(e,r),t.edges[n.tokenTypeIdx]=r,r}function Q(e,t){if(t===b)return t;const n=t.configs.key,r=e.states[n];return void 0!==r?r:(t.configs.finalize(),e.states[n]=t,t)}function J(e,t){const n=e.state;if(7===n.type){if(e.stack.length>0){const n=[...e.stack];J({state:n.pop(),alt:e.alt,stack:n},t)}else t.add(e);return}n.epsilonOnlyTransitions||t.add(e);const r=n.transitions.length;for(let i=0;i<r;i++){const r=Z(e,n.transitions[i]);void 0!==r&&J(r,t)}}function Z(e,t){if(t instanceof p)return{state:t.target,alt:e.alt,stack:e.stack};if(t instanceof f){const n=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:n}}}var ee=n(9683),te=n(6203);class ne{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new ae(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const t=new se;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){const n=new ie(e.startOffset,e.image.length,(0,r.wf)(e),e.tokenType,!t);return n.grammarSource=t,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){const t=e.container;if(t){const n=t.content.indexOf(e);n>=0&&t.content.splice(n,1)}}addHiddenNodes(e){const t=[];for(const n of e){const e=new ie(n.startOffset,n.image.length,(0,r.wf)(n),n.tokenType,!0);e.root=this.rootNode,t.push(e)}let n=this.current,i=!1;if(n.content.length>0)n.content.push(...t);else{for(;n.container;){const e=n.container.content.indexOf(n);if(e>0){n.container.content.splice(e,0,...t),i=!0;break}n=n.container}i||this.rootNode.content.unshift(...t)}}construct(e){const t=this.current;"string"!=typeof e.$type||e.$infixName||(this.current.astNode=e),e.$cstNode=t;const n=this.nodeStack.pop();0===n?.content.length&&this.removeNode(n)}}class re{get hidden(){return!1}get astNode(){const e="string"==typeof this._astNode?.$type?this._astNode:this.container?.astNode;if(!e)throw new Error("This node has no associated AST element");return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}}class ie extends re{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,n,r,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=r,this._length=t,this._range=n}}class se extends re{constructor(){super(...arguments),this.content=new oe(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){const e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(void 0===this._rangeCache){const{range:n}=e,{range:r}=t;this._rangeCache={start:n.start,end:r.end.line<n.start.line?n.start:r.end}}return this._rangeCache}return{start:te.Position.create(0,0),end:te.Position.create(0,0)}}get firstNonHiddenNode(){for(const e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){const t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}}class oe extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,oe.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...n){return this.addParents(n),super.splice(e,t,...n)}addParents(e){for(const t of e)t.container=this.parent}}class ae extends se{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}const ce=Symbol("Datatype");function le(e){return e.$type===ce}const ue=e=>e.endsWith("")?e:e+"";class de{constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;const t=this.lexer.definition,n="production"===e.LanguageMetaData.mode;e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new Te(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new ye(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class he extends de{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new ne,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){const n=this.computeRuleType(e);let r;(0,o.NT)(e)&&(r=e.name,this.registerPrecedenceMap(e));const i=this.wrapper.DEFINE_RULE(ue(e.name),this.startImplementation(n,r,t).bind(this));return this.allRules.set(e.name,i),(0,o.s7)(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){const t=e.name,n=new Map;for(let t=0;t<e.operators.precedences.length;t++){const r=e.operators.precedences[t];for(const e of r.operators)n.set(e.value,{precedence:t,rightAssoc:"right"===r.associativity})}this.operatorPrecedence.set(t,n)}computeRuleType(e){return(0,o.NT)(e)?(0,i.Uz)(e):e.fragment?void 0:(0,i.Xq)(e)?ce:(0,i.Uz)(e)}parse(e,t={}){this.nodeBuilder.buildRootNode(e);const n=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=n.tokens;const r=t.rule?this.allRules.get(t.rule):this.mainRule;if(!r)throw new Error(t.rule?`No rule found with name '${t.rule}'`:"No main rule available.");const i=this.doParse(r);return this.nodeBuilder.addHiddenNodes(n.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,(0,ee.SD)(i,{deep:!0}),{value:i,lexerErrors:n.errors,lexerReport:n.report,parserErrors:this.wrapper.errors}}doParse(e){let t=this.wrapper.rule(e);if(this.stack.length>0&&(t=this.construct()),void 0===t)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return t}startImplementation(e,t,n){return r=>{const i=!this.isRecording()&&void 0!==e;if(i){const n={$type:e};this.stack.push(n),e===ce?n.value="":void 0!==t&&(n.$infixName=t)}return n(r),i?this.construct():void 0}}extractHiddenTokens(e){const t=this.lexerResult.hidden;if(!t.length)return[];const n=e.startOffset;for(let e=0;e<t.length;e++)if(t[e].startOffset>n)return t.splice(0,e);return t.splice(0,t.length)}consume(e,t,n){const r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){const e=this.extractHiddenTokens(r);this.nodeBuilder.addHiddenNodes(e);const t=this.nodeBuilder.buildLeafNode(r,n),{assignment:i,crossRef:s}=this.getAssignment(n),a=this.current;if(i){const e=(0,o.wb)(n)?r.image:this.converter.convert(r.image,t);this.assign(i.operator,i.feature,e,t,s)}else if(le(a)){let e=r.image;(0,o.wb)(n)||(e=this.converter.convert(e,t).toString()),a.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&"number"==typeof e.endOffset&&!isNaN(e.endOffset)}subrule(e,t,n,r,i){let s,o;this.isRecording()||n||(s=this.nodeBuilder.buildCompositeNode(r));try{o=this.wrapper.wrapSubrule(e,t,i)}finally{this.isRecording()||(void 0!==o||n||(o=this.construct()),void 0!==o&&s&&s.length>0&&this.performSubruleAssignment(o,r,s))}}performSubruleAssignment(e,t,n){const{assignment:r,crossRef:i}=this.getAssignment(t);if(r)this.assign(r.operator,r.feature,e,n,i);else if(!r){const t=this.current;if(le(t))t.value+=e.toString();else if("object"==typeof e&&e){const n=this.assignWithoutOverride(e,t);this.stack.pop(),this.stack.push(n)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(t.feature&&t.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(t).content.push(n.$cstNode);const r={$type:e};this.stack.push(r),this.assign(t.operator,t.feature,n,n.$cstNode)}else n.$type=e}}construct(){if(this.isRecording())return;const e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):le(e)?this.converter.convert(e.value,e.$cstNode):((0,ee.OP)(this.astReflection,e),e)}constructInfix(e,t){const n=e.parts;if(!Array.isArray(n)||0===n.length)return;const r=e.operators;if(!Array.isArray(r)||n.length<2)return n[0];let i=0,s=-1;for(let e=0;e<r.length;e++){const n=r[e],o=t.get(n)??{precedence:1/0,rightAssoc:!1};o.precedence>s?(s=o.precedence,i=e):o.precedence===s&&(o.rightAssoc||(i=e))}const o=r.slice(0,i),a=r.slice(i+1),c=n.slice(0,i+1),l=n.slice(i+1),u={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:o},d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:a},h=this.constructInfix(u,t),p=this.constructInfix(d,t);return{$type:e.$type,$cstNode:e.$cstNode,left:h,operator:r[i],right:p}}getAssignment(e){if(!this.assignmentMap.has(e)){const t=(0,ee.XG)(e,o.wh);this.assignmentMap.set(e,{assignment:t,crossRef:t&&(0,o._c)(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){const s=this.current;let o;switch(o="single"===i&&"string"==typeof n?this.linker.buildReference(s,t,r,n):"multi"===i&&"string"==typeof n?this.linker.buildMultiReference(s,t,r,n):n,e){case"=":s[t]=o;break;case"?=":s[t]=!0;break;case"+=":Array.isArray(s[t])||(s[t]=[]),s[t].push(o)}}assignWithoutOverride(e,t){for(const[n,r]of Object.entries(t)){const t=e[n];void 0===t?e[n]=r:Array.isArray(t)&&Array.isArray(r)&&(r.push(...t),e[n]=r)}const n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}}class pe{buildMismatchTokenMessage(e){return a.my.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return a.my.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return a.my.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return a.my.buildEarlyExitMessage(e)}}class fe extends pe{buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class me extends de{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const t=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){const n=this.wrapper.DEFINE_RULE(ue(e.name),this.startImplementation(t).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{const n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,n,r,i){this.before(r),this.wrapper.wrapSubrule(e,t,i),this.after(r)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}}const ge={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new fe};class ye extends a.jr{constructor(e,t){super(e,{...ge,lookaheadStrategy:t&&"maxLookahead"in t?new a.T6({maxLookahead:t.maxLookahead}):new j({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,n){return this.RULE(e,t,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}}class Te extends ye{constructor(e,t,n){super(e,t),this.task=n}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,n){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,n)}finally{this.task.stopSubTask(this.ruleName(t))}}}var ve=n(1564),Re=n(1719);function Ee(e,t,n){return function(e,t){const n=(0,i.YV)(t,!1),r=(0,Re.Td)(t.rules).filter(o.s7).filter(e=>n.has(e));for(const t of r){const n={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(t,Se(n,t.definition))}const s=(0,Re.Td)(t.rules).filter(o.NT).filter(e=>n.has(e));for(const t of s)e.parser.rule(t,ke(e,t))}({parser:t,tokens:n,ruleNames:new Map},e),t}function ke(e,t){const n=t.call.rule.ref;if(!n)throw new Error("Could not resolve reference to infix operator rule: "+t.call.rule.$refText);if((0,o.rE)(n))throw new Error("Cannot use terminal rule in infix expression");const r=t.operators.precedences.flatMap(e=>e.operators),i={$type:"Group",elements:[]},s={$container:i,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call},a={$container:i,$type:"Group",elements:[],cardinality:"*"};i.elements.push(s,a);const c={$container:a,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:r}},l={...s,$container:a};a.elements.push(c,l);const u=r.map(t=>e.tokens[t.value]).map((t,n)=>({ALT:()=>e.parser.consume(n,t,c)}));let d;return t=>{d??(d=$e(e,n)),e.parser.subrule(0,d,!1,s,t),e.parser.many(0,{DEF:()=>{e.parser.alternatives(0,u),e.parser.subrule(1,d,!1,l,t)}})}}function Se(e,t,n=!1){let r;if((0,o.wb)(t))r=function(e,t){const n=e.consume++,r=e.tokens[t.value];if(!r)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(n,r,t)}(e,t);else if((0,o.ve)(t))r=function(e,t){const n=(0,i.Uz)(t);return()=>e.parser.action(n,t)}(e,t);else if((0,o.wh)(t))r=Se(e,t.terminal);else if((0,o._c)(t))r=Ae(e,t);else if((0,o.$g)(t))r=function(e,t){const n=t.rule.ref;if((0,o.cM)(n)){const r=e.subrule++,i=(0,o.s7)(n)&&n.fragment,s=t.arguments.length>0?function(e,t){if(t.some(e=>e.calledByName)){const e=t.map(e=>({parameterName:e.parameter?.ref?.name,predicate:Ce(e.value)}));return t=>{const n={};for(const{parameterName:r,predicate:i}of e)r&&(n[r]=i(t));return n}}{const n=t.map(e=>Ce(e.value));return t=>{const r={};for(let i=0;i<n.length;i++)if(i<e.parameters.length){const s=e.parameters[i].name,o=n[i];r[s]=o(t)}return r}}}(n,t.arguments):()=>({});let a;return o=>{a??(a=$e(e,n)),e.parser.subrule(r,a,i,t,s(o))}}if((0,o.rE)(n)){const r=e.consume++,i=we(e,n.name);return()=>e.parser.consume(r,i,t)}if(!n)throw new ve.WB(t.$cstNode,`Undefined rule: ${t.rule.$refText}`);(0,ve.dr)(n)}(e,t);else if((0,o.jp)(t))r=function(e,t){if(1===t.elements.length)return Se(e,t.elements[0]);{const n=[];for(const r of t.elements){const t={ALT:Se(e,r,!0)},i=xe(r);i&&(t.GATE=Ce(i)),n.push(t)}const r=e.or++;return t=>e.parser.alternatives(r,n.map(e=>{const n={ALT:()=>e.ALT(t)},r=e.GATE;return r&&(n.GATE=()=>r(t)),n}))}}(e,t);else if((0,o.cY)(t))r=function(e,t){if(1===t.elements.length)return Se(e,t.elements[0]);const n=[];for(const r of t.elements){const t={ALT:Se(e,r,!0)},i=xe(r);i&&(t.GATE=Ce(i)),n.push(t)}const r=e.or++,i=(e,t)=>`uGroup_${e}_${t.getRuleStack().join("-")}`,s=be(e,xe(t),t=>e.parser.alternatives(r,n.map((n,s)=>{const o={ALT:()=>!0},a=e.parser;o.ALT=()=>{if(n.ALT(t),!a.isRecording()){const e=i(r,a);a.unorderedGroups.get(e)||a.unorderedGroups.set(e,[]);const t=a.unorderedGroups.get(e);void 0===t?.[s]&&(t[s]=!0)}};const c=n.GATE;return o.GATE=c?()=>c(t):()=>{const e=a.unorderedGroups.get(i(r,a));return!e?.[s]},o})),"*");return t=>{s(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(r,e.parser))}}(e,t);else if((0,o.IZ)(t))r=function(e,t){const n=t.elements.map(t=>Se(e,t));return e=>n.forEach(t=>t(e))}(e,t);else{if(!(0,o.FO)(t))throw new ve.WB(t.$cstNode,`Unexpected element type: ${t.$type}`);{const n=e.consume++;r=()=>e.parser.consume(n,a.LT,t)}}return be(e,n?void 0:xe(t),r,t.cardinality)}function Ce(e){if((0,o.RP)(e)){const t=Ce(e.left),n=Ce(e.right);return e=>t(e)||n(e)}if((0,o.Tu)(e)){const t=Ce(e.left),n=Ce(e.right);return e=>t(e)&&n(e)}if((0,o.Ct)(e)){const t=Ce(e.value);return e=>!t(e)}if((0,o.TF)(e)){const t=e.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if((0,o.Cz)(e)){const t=Boolean(e.true);return()=>t}(0,ve.dr)(e)}function xe(e){if((0,o.IZ)(e))return e.guardCondition}function Ae(e,t,n=t.terminal){if(n){if((0,o.$g)(n)&&(0,o.s7)(n.rule.ref)){const r=n.rule.ref,i=e.subrule++;let s;return n=>{s??(s=$e(e,r)),e.parser.subrule(i,s,!1,t,n)}}if((0,o.$g)(n)&&(0,o.rE)(n.rule.ref)){const r=e.consume++,i=we(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}if((0,o.wb)(n)){const r=e.consume++,i=we(e,n.value);return()=>e.parser.consume(r,i,t)}throw new Error("Could not build cross reference parser")}{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);const n=(0,i.U5)(t.type.ref),r=n?.terminal;if(!r)throw new Error("Could not find name assignment for type: "+(0,i.Uz)(t.type.ref));return Ae(e,t,r)}}function be(e,t,n,r){const i=t&&Ce(t);if(!r){if(i){const t=e.or++;return r=>e.parser.alternatives(t,[{ALT:()=>n(r),GATE:()=>i(r)},{ALT:(0,a.mT)(),GATE:()=>!i(r)}])}return n}if("*"===r){const t=e.many++;return r=>e.parser.many(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}if("+"===r){const t=e.many++;if(i){const r=e.or++;return s=>e.parser.alternatives(r,[{ALT:()=>e.parser.atLeastOne(t,{DEF:()=>n(s)}),GATE:()=>i(s)},{ALT:(0,a.mT)(),GATE:()=>!i(s)}])}return r=>e.parser.atLeastOne(t,{DEF:()=>n(r)})}if("?"===r){const t=e.optional++;return r=>e.parser.optional(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}(0,ve.dr)(r)}function $e(e,t){const n=function(e,t){if((0,o.cM)(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let n=t,r=n.$container,i=t.$type;for(;!(0,o.s7)(r);)((0,o.IZ)(r)||(0,o.jp)(r)||(0,o.cY)(r))&&(i=r.elements.indexOf(n).toString()+":"+i),n=r,r=r.$container;return i=r.name+":"+i,e.ruleNames.set(t,i),i}}(e,t),r=e.parser.getRule(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function we(e,t){const n=e.tokens[t];if(!n)throw new Error(`Token "${t}" not found."`);return n}var Ne=n(4326),Ie=n(5033),_e=n(9850),Pe=n(2479);let Le=0;const Oe=Symbol("OperationCancelled");function De(e){return e===Oe}async function Me(e){if(e===_e.CancellationToken.None)return;const t=performance.now();if(t-Le>=10&&(Le=t,await new Promise(e=>{"undefined"==typeof setImmediate?setTimeout(e,0):setImmediate(e)}),Le=performance.now()),e.isCancellationRequested)throw Oe}class Fe{constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}}class qe{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(const t of e)if(qe.isIncremental(t)){const e=Be(t.range),n=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,n)+t.text+this._content.substring(r,this._content.length);const i=Math.max(e.start.line,0),s=Math.max(e.end.line,0);let o=this._lineOffsets;const a=Ge(t.text,!1,n);if(s-i===a.length)for(let e=0,t=a.length;e<t;e++)o[e+i+1]=a[e];else a.length<1e4?o.splice(i+1,s-i,...a):this._lineOffsets=o=o.slice(0,i+1).concat(a,o.slice(s+1));const c=t.text.length-(r-n);if(0!==c)for(let e=i+1+a.length,t=o.length;e<t;e++)o[e]=o[e]+c}else{if(!qe.isFull(t))throw new Error("Unknown change event received");this._content=t.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=Ge(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let n=0,r=t.length;if(0===r)return{line:0,character:e};for(;n<r;){const i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}const i=n-1;return{line:i,character:(e=this.ensureBeforeEOL(e,t[i]))-t[i]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line];if(e.character<=0)return n;const r=e.line+1<t.length?t[e.line+1]:this._content.length,i=Math.min(n+e.character,r);return this.ensureBeforeEOL(i,n)}ensureBeforeEOL(e,t){for(;e>t&&ze(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}var je;function Ue(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Ue(r,t),Ue(i,t);let s=0,o=0,a=0;for(;s<r.length&&o<i.length;){const n=t(r[s],i[o]);e[a++]=n<=0?r[s++]:i[o++]}for(;s<r.length;)e[a++]=r[s++];for(;o<i.length;)e[a++]=i[o++];return e}function Ge(e,t,n=0){const r=t?[n]:[];for(let t=0;t<e.length;t++){const i=e.charCodeAt(t);ze(i)&&(13===i&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,r.push(n+t+1))}return r}function ze(e){return 13===e||10===e}function Be(e){const t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Ke(e){const t=Be(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new qe(e,t,n,r)},e.update=function(e,t,n){if(e instanceof qe)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){const n=e.getText(),r=Ue(t.map(Ke),(e,t)=>{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n});let i=0;const s=[];for(const t of r){const r=e.offsetAt(t.range.start);if(r<i)throw new Error("Overlapping edit");r>i&&s.push(n.substring(i,r)),t.newText.length&&s.push(t.newText),i=e.offsetAt(t.range.end)}return s.push(n.substr(i)),s.join("")}}(je||(je={}));var We,Ve,He=n(7608);!function(e){e.basename=He.A.basename,e.dirname=He.A.dirname,e.extname=He.A.extname,e.joinPath=He.A.joinPath,e.resolvePath=He.A.resolvePath;const t="object"==typeof process&&"win32"===process?.platform;e.equals=function(e,t){return e?.toString()===t?.toString()},e.relative=function(e,n){const r="string"==typeof e?He.r.parse(e).path:e.path,i="string"==typeof n?He.r.parse(n).path:n.path,s=r.split("/").filter(e=>e.length>0),o=i.split("/").filter(e=>e.length>0);if(t){const e=/^[A-Z]:$/;if(s[0]&&e.test(s[0])&&(s[0]=s[0].toLowerCase()),o[0]&&e.test(o[0])&&(o[0]=o[0].toLowerCase()),s[0]!==o[0])return i.substring(1)}let a=0;for(;a<s.length&&s[a]===o[a];a++);return"../".repeat(s.length-a)+o.slice(a).join("/")},e.normalize=function(e){return He.r.parse(e.toString()).toString()},e.contains=function(e,t){let n="string"==typeof e?e:e.path,r="string"==typeof t?t:t.path;return"/"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),"/"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),r===n||!(r.length<n.length)&&"/"===r.charAt(n.length)&&r.startsWith(n)}}(We||(We={}));class Ye{constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return We.normalize(e)}clear(){this.root.children.clear()}insert(e,t){this.getNode(this.normalizeUri(e),!0).element=t}delete(e){const t=this.getNode(this.normalizeUri(e),!1);t?.parent&&t.parent.children.delete(t.name)}has(e){return void 0!==this.getNode(this.normalizeUri(e),!1)?.element}hasNode(e){return void 0!==this.getNode(this.normalizeUri(e),!1)}find(e){return this.getNode(this.normalizeUri(e),!1)?.element}findNode(e){const t=this.normalizeUri(e),n=this.getNode(t,!1);if(n)return{name:n.name,uri:We.joinPath(He.r.parse(t),n.name).toString(),element:n.element}}findChildren(e){const t=this.normalizeUri(e),n=this.getNode(t,!1);return n?Array.from(n.children.values()).map(e=>({name:e.name,uri:We.joinPath(He.r.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){const t=this.getNode(We.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){const n=e.split("/");"/"===e.charAt(e.length-1)&&n.pop();let r=this.root;for(const e of n){let n=r.children.get(e);if(!n){if(!t)return;n={name:e,children:new Map,parent:r},r.children.set(e,n)}r=n}return r}collectValues(e){const t=[];e.element&&t.push(e.element);for(const n of e.children.values())t.push(...this.collectValues(n));return t}}!function(e){e[e.Changed=0]="Changed",e[e.Parsed=1]="Parsed",e[e.IndexedContent=2]="IndexedContent",e[e.ComputedScopes=3]="ComputedScopes",e[e.Linked=4]="Linked",e[e.IndexedReferences=5]="IndexedReferences",e[e.Validated=6]="Validated"}(Ve||(Ve={}));class Xe{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=_e.CancellationToken.None){const n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,t)}fromTextDocument(e,t,n){return t=t??He.r.parse(e.uri),_e.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromString(e,t,n){return _e.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,n){if("string"==typeof t){const r=this.parse(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}if("$model"in t){const n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}{const r=this.parse(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}async createAsync(e,t,n){if("string"==typeof t){const r=await this.parseAsync(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}{const r=await this.parseAsync(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}createLangiumDocument(e,t,n,r){let i;if(n)i={parseResult:e,uri:t,state:Ve.Parsed,references:[],textDocument:n};else{const n=this.createTextDocumentGetter(t,r);i={parseResult:e,uri:t,state:Ve.Parsed,references:[],get textDocument(){return n()}}}return e.value.$document=i,i}async update(e,t){const n=e.parseResult.value.$cstNode?.root.fullText,r=this.textDocuments?.get(e.uri.toString()),i=r?r.getText():await this.fileSystemProvider.readFile(e.uri);if(r)Object.defineProperty(e,"textDocument",{value:r});else{const t=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,"textDocument",{get:t})}return n!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=Ve.Parsed,e}parse(e,t,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,n)}parseAsync(e,t,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,n)}createTextDocumentGetter(e,t){const n=this.serviceRegistry;let r;return()=>r??(r=je.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,t??""))}}class Qe{constructor(e){this.documentTrie=new Ye,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return(0,Re.Td)(this.documentTrie.all())}addDocument(e){const t=e.uri.toString();if(this.documentTrie.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){const t=e.toString();return this.documentTrie.find(t)}getDocuments(e){const t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(n),n)}createDocument(e,t,n){if(n)return this.langiumDocumentFactory.fromString(t,e,n).then(e=>(this.addDocument(e),e));{const n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){const t=e.toString(),n=this.documentTrie.find(t);return n&&this.documentBuilder().resetToState(n,Ve.Changed),n}deleteDocument(e){const t=e.toString(),n=this.documentTrie.find(t);return n&&(n.state=Ve.Changed,this.documentTrie.delete(t)),n}deleteDocuments(e){const t=e.toString(),n=this.documentTrie.findAll(t);for(const e of n)e.state=Ve.Changed;return this.documentTrie.delete(t),n}}const Je=Symbol("RefResolving");class Ze{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=_e.CancellationToken.None){if(this.profiler?.isActive("linking")){const n=this.profiler.createTask("linking",this.languageId);n.start();try{for(const r of(0,ee.jm)(e.parseResult.value))await Me(t),(0,ee.DM)(r).forEach(t=>{const i=`${r.$type}:${t.property}`;n.startSubTask(i);try{this.doLink(t,e)}finally{n.stopSubTask(i)}})}finally{n.stop()}}else for(const n of(0,ee.jm)(e.parseResult.value))await Me(t),(0,ee.DM)(n).forEach(t=>this.doLink(t,e))}doLink(e,t){const n=e.reference;if("_ref"in n&&void 0===n._ref){n._ref=Je;try{const t=this.getCandidate(e);if((0,Pe.Zl)(t))n._ref=t;else{n._nodeDescription=t;const r=this.loadAstNode(t);n._ref=r??this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${n.$refText}':`,t);const r=t.message??String(t);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${r}`}}t.references.push(n)}else if("_items"in n&&void 0===n._items){n._items=Je;try{const t=this.getCandidates(e),r=[];if((0,Pe.Zl)(t))n._linkingError=t;else for(const e of t){const t=this.loadAstNode(e);t&&r.push({ref:t,$nodeDescription:e})}n._items=r}catch(t){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${t}`},n._items=[]}t.references.push(n)}}unlink(e){for(const t of e.references)"_ref"in t?(t._ref=void 0,delete t._nodeDescription):"_items"in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){const t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>`${e.documentUri}#${e.path}`).toArray();return t.length>0?t:this.createLinkingError(e)}buildReference(e,t,n,r){const i=this,s={$refNode:n,$refText:r,_ref:void 0,get ref(){if((0,Pe.ng)(this._ref))return this._ref;if((0,Pe.Nr)(this._nodeDescription)){const n=i.loadAstNode(this._nodeDescription);this._ref=n??i.createLinkingError({reference:s,container:e,property:t},this._nodeDescription)}else if(void 0===this._ref){this._ref=Je;const n=(0,ee.cQ)(e).$document,r=i.getLinkedNode({reference:s,container:e,property:t});if(r.error&&n&&n.state<Ve.ComputedScopes)return this._ref=void 0;this._ref=r.node??r.error,this._nodeDescription=r.descr,n?.references.push(this)}else this._ref===Je&&i.throwCyclicReferenceError(e,t,r);return(0,Pe.ng)(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return(0,Pe.Zl)(this._ref)?this._ref:void 0}};return s}buildMultiReference(e,t,n,r){const i=this,s={$refNode:n,$refText:r,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(void 0===this._items){this._items=Je;const n=(0,ee.cQ)(e).$document,r=i.getCandidates({reference:s,container:e,property:t}),o=[];if((0,Pe.Zl)(r))this._linkingError=r;else for(const e of r){const t=i.loadAstNode(e);t&&o.push({ref:t,$nodeDescription:e})}this._items=o,n?.references.push(this)}else this._items===Je&&i.throwCyclicReferenceError(e,t,r);return Array.isArray(this._items)?this._items:[]},get error(){return this._linkingError?this._linkingError:this.items.length>0?void 0:this._linkingError=i.createLinkingError({reference:s,container:e,property:t})}};return s}throwCyclicReferenceError(e,t,n){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${n}')`)}getLinkedNode(e){try{const t=this.getCandidate(e);if((0,Pe.Zl)(t))return{error:t};const n=this.loadAstNode(t);return n?{node:n,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);const n=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${n}`}}}}loadAstNode(e){if(e.node)return e.node;const t=this.langiumDocuments().getDocument(e.documentUri);return t?this.astNodeLocator.getAstNode(t.parseResult.value,e.path):void 0}createLinkingError(e,t){const n=(0,ee.cQ)(e.container).$document;return n&&n.state<Ve.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`),{info:e,message:`Could not resolve reference to ${this.reflection.getReferenceType(e)} named '${e.reference.$refText}'.`,targetDescription:t}}}class et{getName(e){if(function(e){return"string"==typeof e.name}(e))return e.name}getNameNode(e){return(0,i.qO)(e.$cstNode,"name")}}class tt{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator,this.documents=e.shared.workspace.LangiumDocuments,this.hasMultiReference=(0,ee.jm)(e.Grammar).some(e=>(0,o._c)(e)&&e.isMulti)}findDeclarations(e){if(e){const t=(0,i.Rp)(e),n=e.astNode;if(t&&n){const r=n[t.feature];if((0,Pe.A_)(r)||(0,Pe.Dm)(r))return(0,ee.tC)(r);if(Array.isArray(r))for(const t of r)if(((0,Pe.A_)(t)||(0,Pe.Dm)(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return(0,ee.tC)(t)}if(n){const t=this.nameProvider.getNameNode(n);if(t&&(t===e||(0,r.pO)(e,t)))return this.getSelfNodes(n)}}return[]}getSelfNodes(e){if(this.hasMultiReference){const t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),n=this.getNodeFromReferenceDescription(t.head());if(n)for(const t of(0,ee.DM)(n))if((0,Pe.Dm)(t.reference)&&t.reference.items.some(t=>t.ref===e))return t.reference.items.map(e=>e.ref);return[e]}return[e]}getNodeFromReferenceDescription(e){if(!e)return;const t=this.documents.getDocument(e.sourceUri);return t?this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath):void 0}findDeclarationNodes(e){const t=this.findDeclarations(e),n=[];for(const e of t){const t=this.nameProvider.getNameNode(e)??e.$cstNode;t&&n.push(t)}return n}findReferences(e,t){const n=[];t.includeDeclaration&&n.push(...this.getSelfReferences(e));let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(r=r.filter(e=>We.equals(e.sourceUri,t.documentUri))),n.push(...r),(0,Re.Td)(n)}getSelfReferences(e){const t=this.getSelfNodes(e),n=[];for(const e of t){const t=this.nameProvider.getNameNode(e);if(t){const i=(0,ee.YE)(e),s=this.nodeLocator.getAstNodePath(e);n.push({sourceUri:i.uri,sourcePath:s,targetUri:i.uri,targetPath:s,segment:(0,r.SX)(t),local:!0})}}return n}}class nt{constructor(e){if(this.map=new Map,e)for(const[t,n]of e)this.add(t,n)}get size(){return Re.iD.sum((0,Re.Td)(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(void 0===t)return this.map.delete(e);{const n=this.map.get(e);if(n){const r=n.indexOf(t);if(r>=0)return 1===n.length?this.map.delete(e):n.splice(r,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){const t=this.map.get(e);return t?(0,Re.Td)(t):Re.B5}has(e,t){if(void 0===t)return this.map.has(e);{const n=this.map.get(e);return!!n&&n.indexOf(t)>=0}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,n)=>t.forEach(t=>e(t,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return(0,Re.Td)(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return(0,Re.Td)(this.map.keys())}values(){return(0,Re.Td)(this.map.values()).flat()}entriesGroupedByKey(){return(0,Re.Td)(this.map.entries())}}class rt{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[t,n]of e)this.set(t,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.inverse.delete(t),!0)}}class it{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=_e.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,n=ee.VN,r=_e.CancellationToken.None){const i=[];this.addExportedSymbol(e,i,t);for(const s of n(e))await Me(r),this.addExportedSymbol(s,i,t);return i}addExportedSymbol(e,t,n){const r=this.nameProvider.getName(e);r&&t.push(this.descriptions.createDescription(e,r,n))}async collectLocalSymbols(e,t=_e.CancellationToken.None){const n=e.parseResult.value,r=new nt;for(const i of(0,ee.Uo)(n))await Me(t),this.addLocalSymbol(i,e,r);return r}addLocalSymbol(e,t,n){const r=e.$container;if(r){const i=this.nameProvider.getName(e);i&&n.add(r,this.descriptions.createDescription(e,i,t))}}}class st{constructor(e,t,n){this.elements=e,this.outerScope=t,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e;return(this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t):this.elements.find(t=>t.name===e))||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===t):this.elements.filter(t=>t.name===e);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(e)):n}}class ot{constructor(e,t,n){this.elements=new nt,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(const t of e){const e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.add(e,t)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e;return this.elements.get(t)[0]||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);return(this.concatOuterScope||0===n.length)&&this.outerScope?(0,Re.Td)(n).concat(this.outerScope.getElements(e)):(0,Re.Td)(n)}getAllElements(){let e=(0,Re.Td)(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}class at{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}}class ct extends at{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){const n=t();return this.cache.set(e,n),n}}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}}class lt extends at{constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed(),this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();const r=this.cacheForContext(e);if(r.has(t))return r.get(t);if(n){const e=n();return r.set(t,e),e}}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){const t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){const t=this.converter(e);let n=this.cache.get(t);return n||(n=new Map,this.cache.set(t,n)),n}}class ut extends ct{constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{t.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}class dt{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new ut(e.shared)}getScope(e){const t=[],n=this.reflection.getReferenceType(e),r=(0,ee.YE)(e.container).localSymbols;if(r){let i=e.container;do{r.has(i)&&t.push(r.getStream(i).filter(e=>this.reflection.isSubtype(e.type,n))),i=i.$container}while(i)}let i=this.getGlobalScope(n,e);for(let e=t.length-1;e>=0;e--)i=this.createScope(t[e],i);return i}createScope(e,t,n){return new st((0,Re.Td)(e),t,n)}createScopeForNodes(e,t,n){const r=(0,Re.Td)(e).map(e=>{const t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable();return new st(r,t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new ot(this.indexManager.allElements(e)))}}function ht(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}class pt{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){const n=t??{},r=t?.replacer,i=(e,t)=>this.replacer(e,t,n),s=r?(e,t)=>r(e,t,i):i;try{return this.currentDocument=(0,ee.YE)(e),JSON.stringify(e,s,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){const n=t??{},r=JSON.parse(e);return this.linkNode(r,r,n),r}replacer(e,t,{refText:n,sourceText:r,textRegions:i,comments:s,uriConverter:o}){if(!this.ignoreProperties.has(e)){if((0,Pe.A_)(t)){const e=t.ref,r=n?t.$refText:void 0;if(e){const t=(0,ee.YE)(e);let n="";return this.currentDocument&&this.currentDocument!==t&&(n=o?o(t.uri,e):t.uri.toString()),{$ref:`${n}#${this.astNodeLocator.getAstNodePath(e)}`,$refText:r}}return{$error:t.error?.message??"Could not resolve reference",$refText:r}}if((0,Pe.Dm)(t)){const e=n?t.$refText:void 0,r=[];for(const e of t.items){const t=e.ref,n=(0,ee.YE)(e.ref);let i="";this.currentDocument&&this.currentDocument!==n&&(i=o?o(n.uri,t):n.uri.toString());const s=this.astNodeLocator.getAstNodePath(t);r.push(`${i}#${s}`)}return{$refs:r,$refText:e}}if((0,Pe.ng)(t)){let n;if(i&&(n=this.addAstNodeRegionWithAssignmentsTo({...t}),e&&!t.$document||!n?.$textRegion||(n.$textRegion.documentURI=this.currentDocument?.uri.toString())),r&&!e&&(n??(n={...t}),n.$sourceText=t.$cstNode?.text),s){n??(n={...t});const e=this.commentProvider.getComment(t);e&&(n.$comment=e.replace(/\r/g,""))}return n??t}return t}}addAstNodeRegionWithAssignmentsTo(e){const t=e=>({offset:e.offset,end:e.end,length:e.length,range:e.range});if(e.$cstNode){const n=(e.$textRegion=t(e.$cstNode)).assignments={};return Object.keys(e).filter(e=>!e.startsWith("$")).forEach(r=>{const s=(0,i.Bd)(e.$cstNode,r).map(t);0!==s.length&&(n[r]=s)}),e}}linkNode(e,t,n,r,i,s){for(const[r,i]of Object.entries(e))if(Array.isArray(i))for(let s=0;s<i.length;s++){const o=i[s];ht(o)?i[s]=this.reviveReference(e,r,t,o,n):(0,Pe.ng)(o)&&this.linkNode(o,t,n,e,r,s)}else ht(i)?e[r]=this.reviveReference(e,r,t,i,n):(0,Pe.ng)(i)&&this.linkNode(i,t,n,e,r);const o=e;o.$container=r,o.$containerProperty=i,o.$containerIndex=s}reviveReference(e,t,n,r,i){let s,o=r.$refText,a=r.$error;if(r.$ref){const e=this.getRefNode(n,r.$ref,i.uriConverter);if((0,Pe.ng)(e))return o||(o=this.nameProvider.getName(e)),{$refText:o??"",ref:e};a=e}else if(r.$refs){const e=[];for(const t of r.$refs){const r=this.getRefNode(n,t,i.uriConverter);(0,Pe.ng)(r)&&e.push({ref:r})}if(0!==e.length)return{$refText:o??"",items:e};s={$refText:o??"",items:e},a??(a="Could not resolve multi-reference")}return a?(s??(s={$refText:o??"",ref:void 0}),s.error={info:{container:e,property:t,reference:s},message:a},s):void 0}getRefNode(e,t,n){try{const r=t.indexOf("#");if(0===r){return this.astNodeLocator.getAstNode(e,t.substring(1))||"Could not resolve path: "+t}if(r<0){const e=n?n(t):He.r.parse(t),r=this.langiumDocuments.getDocument(e);return r?r.parseResult.value:"Could not find document for URI: "+t}const i=n?n(t.substring(0,r)):He.r.parse(t.substring(0,r)),s=this.langiumDocuments.getDocument(i);if(!s)return"Could not find document for URI: "+t;if(r===t.length-1)return s.parseResult.value;return this.astNodeLocator.getAstNode(s.parseResult.value,t.substring(r+1))||"Could not resolve URI: "+t}catch(e){return String(e)}}}class ft{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=e?.workspace.TextDocuments}register(e){const t=e.LanguageMetaData;for(const n of t.fileExtensions)this.fileExtensionMap.has(n)&&console.warn(`The file extension ${n} is used by multiple languages. It is now assigned to '${t.languageId}'.`),this.fileExtensionMap.set(n,e);if(t.fileNames)for(const n of t.fileNames)this.fileNameMap.has(n)&&console.warn(`The file name ${n} is used by multiple languages. It is now assigned to '${t.languageId}'.`),this.fileNameMap.set(n,e);this.languageIdMap.set(t.languageId,e)}getServices(e){if(0===this.languageIdMap.size)throw new Error("The service registry is empty. Use `register` to register the services of a language.");const t=this.textDocuments?.get(e)?.languageId;if(void 0!==t){const e=this.languageIdMap.get(t);if(e)return e}const n=We.extname(e),r=We.basename(e),i=this.fileNameMap.get(r)??this.fileExtensionMap.get(n);if(!i)throw t?new Error(`The service registry contains no services for the extension '${n}' for language '${t}'.`):new Error(`The service registry contains no services for the extension '${n}'.`);return i}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}function mt(e){return{code:e}}var gt;!function(e){e.defaults=["fast","slow","built-in"],e.all=e.defaults}(gt||(gt={}));class yt{constructor(e){this.entries=new nt,this.knownCategories=new Set(gt.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,t=this,n="fast"){if("built-in"===n)throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");this.knownCategories.add(n);for(const[r,i]of Object.entries(e)){const e=i;if(Array.isArray(e))for(const i of e){const e={check:this.wrapValidationException(i,t),category:n};this.addEntry(r,e)}else if("function"==typeof e){const i={check:this.wrapValidationException(e,t),category:n};this.addEntry(r,i)}else(0,ve.dr)(e)}}wrapValidationException(e,t){return async(n,r,i)=>{await this.handleException(()=>e.call(t,n,r,i),"An error occurred during validation",r,n)}}async handleException(e,t,n,r){try{await e()}catch(e){if(De(e))throw e;console.error(`${t}:`,e),e instanceof Error&&e.stack&&console.error(e.stack),n("error",`${t}: ${e instanceof Error?e.message:String(e)}`,{node:r})}}addEntry(e,t){if("AstNode"!==e)for(const n of this.reflection.getAllSubTypes(e))this.entries.add(n,t);else this.entries.add("AstNode",t)}getChecks(e,t){let n=(0,Re.Td)(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(n=n.filter(e=>t.includes(e.category))),n.map(e=>e.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",t))}wrapPreparationException(e,t,n){return async(r,i,s,o)=>{await this.handleException(()=>e.call(n,r,i,s,o),t,i,r)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}}const Tt=Object.freeze({validateNode:!0,validateChildren:!0});class vt{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},n=_e.CancellationToken.None){const r=e.parseResult,i=[];if(await Me(n),!t.categories||t.categories.includes("built-in")){if(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some(e=>e.data?.code===St.LexingError))return i;if(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some(e=>e.data?.code===St.ParsingError))return i;if(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>e.data?.code===St.LinkingError))return i}try{i.push(...await this.validateAst(r.value,t,n))}catch(e){if(De(e))throw e;console.error("An error occurred during validation:",e)}return await Me(n),i}processLexingErrors(e,t,n){const r=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(const e of r){const n=e.severity??"error",r={severity:Et(n),range:{start:{line:e.line-1,character:e.column-1},end:{line:e.line-1,character:e.column+e.length-1}},message:e.message,data:kt(n),source:this.getSource()};t.push(r)}}processParsingErrors(e,t,n){for(const n of e.parserErrors){let e;if(isNaN(n.token.startOffset)){if("previousToken"in n){const t=n.previousToken;if(isNaN(t.startOffset)){const t={line:0,character:0};e={start:t,end:t}}else{const n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}}}else e=(0,r.wf)(n.token);if(e){const r={severity:Et("error"),range:e,message:n.message,data:mt(St.ParsingError),source:this.getSource()};t.push(r)}}}processLinkingErrors(e,t,n){for(const n of e.references){const e=n.error;if(e){const r={node:e.info.container,range:n.$refNode?.range,property:e.info.property,index:e.info.index,data:{code:St.LinkingError,containerType:e.info.container.$type,property:e.info.property,refText:e.info.reference.$refText}};t.push(this.toDiagnostic("error",e.message,r))}}}async validateAst(e,t,n=_e.CancellationToken.None){const r=[],i=(e,t,n)=>{r.push(this.toDiagnostic(e,t,n))};return await this.validateAstBefore(e,t,i,n),await this.validateAstNodes(e,t,i,n),await this.validateAstAfter(e,t,i,n),r}async validateAstBefore(e,t,n,r=_e.CancellationToken.None){const i=this.validationRegistry.checksBefore;for(const s of i)await Me(r),await s(e,n,t.categories??[],r)}async validateAstNodes(e,t,n,r=_e.CancellationToken.None){if(this.profiler?.isActive("validating")){const i=this.profiler.createTask("validating",this.languageId);i.start();try{const s=(0,ee.jm)(e).iterator();for(const e of s){i.startSubTask(e.$type);const o=this.validateSingleNodeOptions(e,t);if(o.validateNode)try{const i=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of i)await t(e,n,r)}finally{i.stopSubTask(e.$type)}o.validateChildren||s.prune()}}finally{i.stop()}}else{const i=(0,ee.jm)(e).iterator();for(const e of i){await Me(r);const s=this.validateSingleNodeOptions(e,t);if(s.validateNode){const i=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of i)await t(e,n,r)}s.validateChildren||i.prune()}}}validateSingleNodeOptions(e,t){return Tt}async validateAstAfter(e,t,n,r=_e.CancellationToken.None){const i=this.validationRegistry.checksAfter;for(const s of i)await Me(r),await s(e,n,t.categories??[],r)}toDiagnostic(e,t,n){return{message:t,range:Rt(n),severity:Et(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function Rt(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=(0,i.qO)(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=(0,i.SS)(e.node.$cstNode,e.keyword,e.index)),t??(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Et(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}function kt(e){switch(e){case"error":return mt(St.LexingError);case"warning":return mt(St.LexingWarning);case"info":return mt(St.LexingInfo);case"hint":return mt(St.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}var St;!function(e){e.LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"}(St||(St={}));class Ct{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n){const i=n??(0,ee.YE)(e);t??(t=this.nameProvider.getName(e));const s=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${s} has no name.`);let o;const a=()=>o??(o=(0,r.SX)(this.nameProvider.getNameNode(e)??e.$cstNode));return{node:e,name:t,get nameSegment(){return a()},selectionSegment:(0,r.SX)(e.$cstNode),type:e.$type,documentUri:i.uri,path:s}}}class xt{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=_e.CancellationToken.None){const n=[],r=e.parseResult.value;for(const e of(0,ee.jm)(r))await Me(t),(0,ee.DM)(e).forEach(e=>{e.reference.error||n.push(...this.createInfoDescriptions(e))});return n}createInfoDescriptions(e){const t=e.reference;if(t.error||!t.$refNode)return[];let n=[];(0,Pe.A_)(t)&&t.$nodeDescription?n=[t.$nodeDescription]:(0,Pe.Dm)(t)&&(n=t.items.map(e=>e.$nodeDescription).filter(e=>void 0!==e));const i=(0,ee.YE)(e.container).uri,s=this.nodeLocator.getAstNodePath(e.container),o=[],a=(0,r.SX)(t.$refNode);for(const e of n)o.push({sourceUri:i,sourcePath:s,targetUri:e.documentUri,targetPath:e.path,segment:a,local:We.equals(e.documentUri,i)});return o}}class At{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return t+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return void 0!==t?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{if(!e||0===t.length)return e;const n=t.indexOf(this.indexSeparator);if(n>0){const r=t.substring(0,n),i=parseInt(t.substring(n+1)),s=e[r];return s?.[i]}return e[t]},e)}}var bt=n(2676);class $t{constructor(e){this._ready=new Fe,this.onConfigurationSectionUpdateEmitter=new bt.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(t);t.forEach((e,t)=>{this.updateSectionConfiguration(e.section,n[t])})}}this._ready.resolve()}updateConfiguration(e){"object"==typeof e.settings&&null!==e.settings&&Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const n=this.toSectionName(e);if(this.settings[n])return this.settings[n][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}var wt,Nt=n(4512);!function(e){e.create=function(e){return{dispose:async()=>await e()}}}(wt||(wt={}));class It{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new nt,this.documentPhaseListeners=new nt,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Ve.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=_e.CancellationToken.None){for(const n of e){const e=n.uri.toString();if(n.state===Ve.Validated){if("boolean"==typeof t.validation&&t.validation)this.resetToState(n,Ve.IndexedReferences);else if("object"==typeof t.validation){const r=this.findMissingValidationCategories(n,t);r.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:{categories:r}},result:this.buildState.get(e)?.result}),n.state=Ve.IndexedReferences)}}else this.buildState.delete(e)}this.currentState=Ve.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=_e.CancellationToken.None){this.currentState=Ve.Changed;const r=[];for(const e of t){const t=this.langiumDocuments.deleteDocuments(e);for(const e of t)r.push(e.uri),this.cleanUpDeleted(e)}const i=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat();for(const e of i){let t=this.langiumDocuments.getDocument(e);void 0===t&&(t=this.langiumDocumentFactory.fromModel({$type:"INVALID"},e),t.state=Ve.Changed,this.langiumDocuments.addDocument(t)),this.resetToState(t,Ve.Changed)}const s=(0,Re.Td)(i).concat(r).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!s.has(e.uri.toString())&&this.shouldRelink(e,s)).forEach(e=>this.resetToState(e,Ve.ComputedScopes)),await this.emitUpdate(i,r),await Me(n);const o=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state<Ve.Validated||!this.buildState.get(e.uri.toString())?.completed||this.resultsAreIncomplete(e,this.updateBuildOptions)).toArray());await this.buildDocuments(o,this.updateBuildOptions,n)}resultsAreIncomplete(e,t){return this.findMissingValidationCategories(e,t).length>=1}findMissingValidationCategories(e,t){const n=this.buildState.get(e.uri.toString()),r=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=n?.result?.validationChecks?new Set(n?.result?.validationChecks):n?.completed?r:new Set,s=void 0===t||!0===t.validation?r:"object"==typeof t.validation?t.validation.categories??r:[];return(0,Re.Td)(s).filter(e=>!i.has(e)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{const t=await this.fileSystemProvider.stat(e);if(t.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(t))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(n=>n(e,t)))}sortDocuments(e){let t=0,n=e.length-1;for(;t<n;){for(;t<e.length&&this.hasTextDocument(e[t]);)t++;for(;n>=0&&!this.hasTextDocument(e[n]);)n--;t<n&&([e[t],e[n]]=[e[n],e[t]])}return e}hasTextDocument(e){return Boolean(this.textDocuments?.get(e.uri))}shouldRelink(e,t){return!!e.references.some(e=>void 0!==e.error)||this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),wt.create(()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case Ve.Changed:case Ve.Parsed:this.indexManager.removeContent(e.uri);case Ve.IndexedContent:e.localSymbols=void 0;case Ve.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case Ve.Linked:this.indexManager.removeReferences(e.uri);case Ve.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case Ve.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=Ve.Changed}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,Ve.Parsed,n,e=>this.langiumDocumentFactory.update(e,n)),await this.runCancelable(e,Ve.IndexedContent,n,e=>this.indexManager.updateContent(e,n)),await this.runCancelable(e,Ve.ComputedScopes,n,async e=>{const t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.localSymbols=await t.collectLocalSymbols(e,n)});const r=e.filter(e=>this.shouldLink(e));await this.runCancelable(r,Ve.Linked,n,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n)),await this.runCancelable(r,Ve.IndexedReferences,n,e=>this.indexManager.updateReferences(e,n));const i=e.filter(e=>!!this.shouldValidate(e)||(this.markAsCompleted(e),!1));await this.runCancelable(i,Ve.Validated,n,async e=>{await this.validate(e,n),this.markAsCompleted(e)})}markAsCompleted(e){const t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(const n of e){const e=n.uri.toString(),r=this.buildState.get(e);r&&!r.completed||this.buildState.set(e,{completed:!1,options:t,result:r?.result})}}async runCancelable(e,t,n,r){for(const i of e)i.state<t&&(await Me(n),await r(i),i.state=t,await this.notifyDocumentPhase(i,t,n));const i=e.filter(e=>e.state===t);await this.notifyBuildPhase(i,t,n),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),wt.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),wt.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,n){let r;return t&&"path"in t?r=t:n=t,n??(n=_e.CancellationToken.None),r?this.awaitDocumentState(e,r,n):this.awaitBuilderState(e,n)}awaitDocumentState(e,t,n){const r=this.langiumDocuments.getDocument(t);return r?r.state>=e?Promise.resolve(t):n.isCancellationRequested?Promise.reject(Oe):this.currentState>=e&&e>r.state?Promise.reject(new Nt.ResponseError(Nt.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${Ve[r.state]}, requiring ${Ve[e]}, but workspace state is already ${Ve[this.currentState]}. Returning undefined.`)):new Promise((r,i)=>{const s=this.onDocumentPhase(e,e=>{We.equals(e.uri,t)&&(s.dispose(),o.dispose(),r(e.uri))}),o=n.onCancellationRequested(()=>{s.dispose(),o.dispose(),i(Oe)})}):Promise.reject(new Nt.ResponseError(Nt.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(Oe):new Promise((n,r)=>{const i=this.onBuildPhase(e,()=>{i.dispose(),s.dispose(),n()}),s=t.onCancellationRequested(()=>{i.dispose(),s.dispose(),r(Oe)})})}async notifyDocumentPhase(e,t,n){const r=this.documentPhaseListeners.get(t).slice();for(const t of r)try{await Me(n),await t(e,n)}catch(e){if(!De(e))throw e}}async notifyBuildPhase(e,t,n){if(0===e.length)return;const r=this.buildPhaseListeners.get(t).slice();for(const t of r)await Me(n),await t(e,n)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return Boolean(this.getBuildOptions(e).validation)}async validate(e,t){const n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,r=this.getBuildOptions(e),i="object"==typeof r.validation?{...r.validation}:{};i.categories=this.findMissingValidationCategories(e,r);const s=await n.validateDocument(e,i,t);e.diagnostics?e.diagnostics.push(...s):e.diagnostics=s;const o=this.buildState.get(e.uri.toString());o&&(o.result??(o.result={}),o.result.validationChecks?o.result.validationChecks=(0,Re.Td)(o.result.validationChecks).concat(i.categories).distinct().toArray():o.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}}class _t{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new lt,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const n=(0,ee.YE)(e).uri,r=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{We.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)})}),(0,Re.Td)(r)}allElements(e,t){let n=(0,Re.Td)(this.symbolIndex.keys());return t&&(n=n.filter(e=>!t||t.has(e))),n.map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){const t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){const t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=_e.CancellationToken.None){const n=this.serviceRegistry.getServices(e.uri),r=await n.references.ScopeComputation.collectExportedSymbols(e,t),i=e.uri.toString();this.symbolIndex.set(i,r),this.symbolByTypeIndex.clear(i)}async updateReferences(e,t=_e.CancellationToken.None){const n=this.serviceRegistry.getServices(e.uri),r=await n.workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),r)}isAffected(e,t){const n=this.referenceIndex.get(e.uri.toString());return!!n&&n.some(e=>!e.local&&t.has(e.targetUri.toString()))}}class Pt{constructor(e){this.initialBuildOptions={},this._ready=new Fe,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=_e.CancellationToken.None){const n=await this.performStartup(e);await Me(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){const t=[],n=e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)};await this.loadAdditionalDocuments(e,n);const r=[];await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,r)));const i=(0,Re.Td)(r).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e));return await this.loadWorkspaceDocuments(i,n),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{const n=await this.langiumDocuments.getOrCreateDocument(e);t(n)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return He.r.parse(e.uri)}async traverseFolder(e,t){try{const n=await this.fileSystemProvider.readDirectory(e);await Promise.all(n.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(t){console.error("Failure to read directory content of "+e.toString(!0),t)}}async searchFolder(e){const t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){const t=We.basename(e.uri);return!t.startsWith(".")&&(e.isDirectory?"node_modules"!==t&&"out"!==t:!!e.isFile&&this.serviceRegistry.hasServices(e.uri))}}class Lt{buildUnexpectedCharactersMessage(e,t,n,r,i){return a.PW.buildUnexpectedCharactersMessage(e,t,n,r,i)}buildUnableToPopLexerModeMessage(e){return a.PW.buildUnableToPopLexerModeMessage(e)}}const Ot={mode:"full"};class Dt{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;const t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const n=Ft(t)?Object.values(t):t,r="production"===e.LanguageMetaData.mode;this.chevrotainLexer=new a.JG(n,{positionTracking:"full",skipValidations:r,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=Ot){const n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:n.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(Ft(e))return e;const t=Mt(e)?Object.values(e.modes).flat():e,n={};return t.forEach(e=>n[e.name]=e),n}}function Mt(e){return e&&"modes"in e&&"defaultMode"in e}function Ft(e){return!function(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}(e)&&!Mt(e)}function qt(e){let t="";return t="string"==typeof e?e:e.text,t.split(s.TH)}const jt=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Ut=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function Gt(e,t,n,r){const i=[];if(0===e.length){const e=te.Position.create(n,r),s=te.Position.create(n,r+t.length);i.push({type:"text",content:t,range:te.Range.create(e,s)})}else{let s=0;for(const o of e){const e=o.index,a=t.substring(s,e);a.length>0&&i.push({type:"text",content:t.substring(s,e),range:te.Range.create(te.Position.create(n,s+r),te.Position.create(n,e+r))});let c=a.length+1;const l=o[1];if(i.push({type:"inline-tag",content:l,range:te.Range.create(te.Position.create(n,s+c+r),te.Position.create(n,s+c+l.length+r))}),c+=l.length,4===o.length){c+=o[2].length;const e=o[3];i.push({type:"text",content:e,range:te.Range.create(te.Position.create(n,s+c+r),te.Position.create(n,s+c+e.length+r))})}else i.push({type:"text",content:"",range:te.Range.create(te.Position.create(n,s+c+r),te.Position.create(n,s+c+r))});s=e+o[0].length}const o=t.substring(s);o.length>0&&i.push({type:"text",content:o,range:te.Range.create(te.Position.create(n,s+r),te.Position.create(n,s+r+o.length))})}return i}const zt=/\S/,Bt=/\s*$/;function Kt(e,t){const n=e.substring(t).match(zt);return n?t+n.index:e.length}function Wt(e){const t=e.match(Bt);if(t&&"number"==typeof t.index)return t.index}function Vt(e,t){const n=e.tokens[e.index];return"tag"===n.type?Xt(e,!1):"text"===n.type||"inline-tag"===n.type?Ht(e):(function(e,t){if(t){const n=new rn("",e.range);"inlines"in t?t.inlines.push(n):t.content.inlines.push(n)}}(n,t),void e.index++)}function Ht(e){let t=e.tokens[e.index];const n=t;let r=t;const i=[];for(;t&&"break"!==t.type&&"tag"!==t.type;)i.push(Yt(e)),r=t,t=e.tokens[e.index];return new nn(i,te.Range.create(n.range.start,r.range.end))}function Yt(e){return"inline-tag"===e.tokens[e.index].type?Xt(e,!0):Qt(e)}function Xt(e,t){const n=e.tokens[e.index++],r=n.content.substring(1),i=e.tokens[e.index];if("text"===i?.type){if(t){const i=Qt(e);return new tn(r,new nn([i],i.range),t,te.Range.create(n.range.start,i.range.end))}{const i=Ht(e);return new tn(r,i,t,te.Range.create(n.range.start,i.range.end))}}{const e=n.range;return new tn(r,new nn([],e),t,e)}}function Qt(e){const t=e.tokens[e.index++];return new rn(t.content,t.range)}function Jt(e){if(!e)return Jt({start:"/**",end:"*/",line:"*"});const{start:t,end:n,line:r}=e;return{start:Zt(t,!0),end:Zt(n,!1),line:Zt(r,!0)}}function Zt(e,t){if("string"==typeof e||"object"==typeof e){const n="string"==typeof e?(0,s.Nt)(e):e.source;return t?new RegExp(`^\\s*${n}`):new RegExp(`\\s*${n}\\s*$`)}return e}class en{constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(const t of this.elements)if(0===e.length)e=t.toString();else{const n=t.toString();e+=sn(e)+n}return e.trim()}toMarkdown(e){let t="";for(const n of this.elements)if(0===t.length)t=n.toMarkdown(e);else{const r=n.toMarkdown(e);t+=sn(t)+r}return t.trim()}}class tn{constructor(e,t,n,r){this.name=e,this.content=t,this.inline=n,this.range=r}toString(){let e=`@${this.name}`;const t=this.content.toString();return 1===this.content.inlines.length?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}\n${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const n=function(e,t,n){if("linkplain"===e||"linkcode"===e||"link"===e){const r=t.indexOf(" ");let i=t;if(r>0){const e=Kt(t,r);i=t.substring(e),t=t.substring(0,r)}("linkcode"===e||"link"===e&&"code"===n.link)&&(i=`\`${i}\``);const s=n.renderLink?.(t,i)??function(e,t){try{return He.r.parse(e,!0),`[${t}](${e})`}catch{return e}}(t,i);return s}}(this.name,t,e??{});if("string"==typeof n)return n}let n="";"italic"===e?.tag||void 0===e?.tag?n="*":"bold"===e?.tag?n="**":"bold-italic"===e?.tag&&(n="***");let r=`${n}@${this.name}${n}`;return 1===this.content.inlines.length?r=`${r} — ${t}`:this.content.inlines.length>1&&(r=`${r}\n${t}`),this.inline?`{${r}}`:r}}class nn{constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;t<this.inlines.length;t++){const n=this.inlines[t],r=this.inlines[t+1];e+=n.toString(),r&&r.range.start.line>n.range.start.line&&(e+="\n")}return e}toMarkdown(e){let t="";for(let n=0;n<this.inlines.length;n++){const r=this.inlines[n],i=this.inlines[n+1];t+=r.toMarkdown(e),i&&i.range.start.line>r.range.start.line&&(t+="\n")}return t}}class rn{constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}}function sn(e){return e.endsWith("\n")?"\n":"\n\n"}class on{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&function(e){const t=Jt(void 0),n=qt(e);if(0===n.length)return!1;const r=n[0],i=n[n.length-1],s=t.start,o=t.end;return Boolean(s?.exec(r))&&Boolean(o?.exec(i))}(t))return function(e,t,n){let r,i;"string"==typeof e?(i=t,r=n):(i=e.range.start,r=t),i||(i=te.Position.create(0,0));const s=function(e){const t=[];let n=e.position.line,r=e.position.character;for(let i=0;i<e.lines.length;i++){const s=0===i,o=i===e.lines.length-1;let a=e.lines[i],c=0;if(s&&e.options.start){const t=e.options.start?.exec(a);t&&(c=t.index+t[0].length)}else{const t=e.options.line?.exec(a);t&&(c=t.index+t[0].length)}if(o){const t=e.options.end?.exec(a);t&&(a=a.substring(0,t.index))}if(a=a.substring(0,Wt(a)),Kt(a,c)>=a.length){if(t.length>0){const e=te.Position.create(n,r);t.push({type:"break",content:"",range:te.Range.create(e,e)})}}else{jt.lastIndex=c;const e=jt.exec(a);if(e){const i=e[0],s=e[1],o=te.Position.create(n,r+c),l=te.Position.create(n,r+c+i.length);t.push({type:"tag",content:s,range:te.Range.create(o,l)}),c+=i.length,c=Kt(a,c)}if(c<a.length){const e=a.substring(c),i=Array.from(e.matchAll(Ut));t.push(...Gt(i,e,n,r+c))}}n++,r=0}return t.length>0&&"break"===t[t.length-1].type?t.slice(0,-1):t}({lines:qt(e),position:i,options:Jt(r)});return function(e){const t=te.Position.create(e.position.line,e.position.character);if(0===e.tokens.length)return new en([],te.Range.create(t,t));const n=[];for(;e.index<e.tokens.length;){const t=Vt(e,n[n.length-1]);t&&n.push(t)}const r=n[0]?.range.start??t,i=n[n.length-1]?.range.end??t;return new en(n,te.Range.create(r,i))}({index:0,tokens:s,position:i})}(t).toMarkdown({renderLink:(t,n)=>this.documentationLinkRenderer(e,t,n),renderTag:t=>this.documentationTagRenderer(e,t)})}documentationLinkRenderer(e,t,n){const r=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(r&&r.nameSegment){const e=r.nameSegment.range.start.line+1,t=r.nameSegment.range.start.character+1;return`[${n}](${r.documentUri.with({fragment:`L${e},${t}`}).toString()})`}}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){const n=(0,ee.YE)(e).localSymbols;if(!n)return;let r=e;do{const e=n.getStream(r).find(e=>e.name===t);if(e)return e;r=r.$container}while(r)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}}class an{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return function(e){return"string"==typeof e.$comment}(e)?e.$comment:(0,r.v)(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}}class cn{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}}class ln{constructor(){this.previousTokenSource=new _e.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=(Le=performance.now(),new _e.CancellationTokenSource);return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,n=_e.CancellationToken.None){const r=new Fe,i={action:t,deferred:r,cancellationToken:n};return e.push(i),this.performNextOperation(),r.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else{if(!(this.readQueue.length>0))return;e.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(e.map(async({action:e,deferred:t,cancellationToken:n})=>{try{const r=await Promise.resolve().then(()=>e(n));t.resolve(r)}catch(e){De(e)?t.resolve(void 0):t.reject(e)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class un{constructor(e){this.grammarElementIdMap=new rt,this.tokenTypeIdMap=new rt,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(e=>({...e,message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){const t=new Map,n=new Map;for(const n of(0,ee.jm)(e))t.set(n,{});if(e.$cstNode)for(const t of(0,r.NS)(e.$cstNode))n.set(t,{});return{astNodes:t,cstNodes:n}}dehydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(const[r,i]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(i)){const e=[];n[r]=e;for(const n of i)(0,Pe.ng)(n)?e.push(this.dehydrateAstNode(n,t)):(0,Pe.A_)(n)?e.push(this.dehydrateReference(n,t)):e.push(n)}else(0,Pe.ng)(i)?n[r]=this.dehydrateAstNode(i,t):(0,Pe.A_)(i)?n[r]=this.dehydrateReference(i,t):void 0!==i&&(n[r]=i);return n}dehydrateReference(e,t){const n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=t.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,t){const n=t.cstNodes.get(e);return(0,Pe.br)(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=t.astNodes.get(e.astNode),(0,Pe.mD)(e)?n.content=e.content.map(e=>this.dehydrateCstNode(e,t)):(0,Pe.FC)(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){const t=e.value,n=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,n)}}createHydrationContext(e){const t=new Map,n=new Map;for(const n of(0,ee.jm)(e))t.set(n,{});let i;if(e.$cstNode)for(const t of(0,r.NS)(e.$cstNode)){let e;"fullText"in t?(e=new ae(t.fullText),i=e):"content"in t?e=new se:"tokenType"in t&&(e=this.hydrateCstLeafNode(t)),e&&(n.set(t,e),e.root=i)}return{astNodes:t,cstNodes:n}}hydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=t.cstNodes.get(e.$cstNode));for(const[r,i]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(i)){const e=[];n[r]=e;for(const s of i)(0,Pe.ng)(s)?e.push(this.setParent(this.hydrateAstNode(s,t),n)):(0,Pe.A_)(s)?e.push(this.hydrateReference(s,n,r,t)):e.push(s)}else(0,Pe.ng)(i)?n[r]=this.setParent(this.hydrateAstNode(i,t),n):(0,Pe.A_)(i)?n[r]=this.hydrateReference(i,n,r,t):void 0!==i&&(n[r]=i);return n}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,n,r){return this.linker.buildReference(t,n,r.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,n=0){const r=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(r.grammarSource=this.getGrammarElement(e.grammarSource)),r.astNode=t.astNodes.get(e.astNode),(0,Pe.mD)(r))for(const i of e.content){const e=this.hydrateCstNode(i,t,n++);r.content.push(e)}return r}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType),n=e.offset,r=e.length,i=e.startLine,s=e.startColumn,o=e.endLine,a=e.endColumn,c=e.hidden;return new ie(n,r,{start:{line:i,character:s},end:{line:o,character:a}},t,c)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(const t of(0,ee.jm)(this.grammar))(0,o.r1)(t)&&this.grammarElementIdMap.set(t,e++)}}function dn(e){return{documentation:{CommentProvider:e=>new an(e),DocumentationProvider:e=>new on(e)},parser:{AsyncParser:e=>new cn(e),GrammarConfig:e=>function(e){const t=[],n=e.Grammar;for(const e of n.rules)(0,o.rE)(e)&&(0,i.eb)(e)&&(0,s.lU)((0,i.S)(e))&&t.push(e.name);return{multilineCommentRules:t,nameRegexp:r.El}}(e),LangiumParser:e=>function(e){const t=function(e){const t=e.Grammar,n=e.parser.Lexer;return Ee(t,new he(e),n.definition)}(e);return t.finalize(),t}(e),CompletionParser:e=>function(e){const t=e.Grammar,n=e.parser.Lexer,r=new me(e);return Ee(t,r,n.definition),r.finalize(),r}(e),ValueConverter:()=>new Ie.d,TokenBuilder:()=>new Ne.Q,Lexer:e=>new Dt(e),ParserErrorMessageProvider:()=>new fe,LexerErrorMessageProvider:()=>new Lt},workspace:{AstNodeLocator:()=>new At,AstNodeDescriptionProvider:e=>new Ct(e),ReferenceDescriptionProvider:e=>new xt(e)},references:{Linker:e=>new Ze(e),NameProvider:()=>new et,ScopeProvider:e=>new dt(e),ScopeComputation:e=>new it(e),References:e=>new tt(e)},serializer:{Hydrator:e=>new un(e),JsonSerializer:e=>new pt(e)},validation:{DocumentValidator:e=>new vt(e),ValidationRegistry:e=>new yt(e)},shared:()=>e.shared}}function hn(e){return{ServiceRegistry:e=>new ft(e),workspace:{LangiumDocuments:e=>new Qe(e),LangiumDocumentFactory:e=>new Xe(e),DocumentBuilder:e=>new It(e),IndexManager:e=>new _t(e),WorkspaceManager:e=>new Pt(e),FileSystemProvider:t=>e.fileSystemProvider(t),WorkspaceLock:()=>new ln,ConfigurationProvider:e=>new $t(e)},profilers:{}}}},9364(e,t,n){"use strict";var r;function i(e,t,n,r,i,s,a,c,u){return o([e,t,n,r,i,s,a,c,u].reduce(l,{}))}n.d(t,{WQ:()=>i}),function(e){e.merge=(e,t)=>l(l({},e),t)}(r||(r={}));const s=Symbol("isProxy");function o(e,t){const n=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw new Error("Cannot set property on injected service container")},get:(r,i)=>i===s||c(r,i,e,t||n),getOwnPropertyDescriptor:(r,i)=>(c(r,i,e,t||n),Object.getOwnPropertyDescriptor(r,i)),has:(t,n)=>n in e,ownKeys:()=>[...Object.getOwnPropertyNames(e)]});return n}const a=Symbol();function c(e,t,n,r){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+e[t]);if(e[t]===a)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}if(t in n){const i=n[t];e[t]=a;try{e[t]="function"==typeof i?i(r):o(i,r)}catch(n){throw e[t]=n instanceof Error?n:void 0,n}return e[t]}}function l(e,t){if(t)for(const[n,r]of Object.entries(t))if(null!=r)if("object"==typeof r){const t=e[n];e[n]=l("object"==typeof t&&null!==t?t:{},r)}else e[n]=r;return e}},2151(e,t,n){"use strict";n.d(t,{$g:()=>Z,Bg:()=>v,Ct:()=>G,Cz:()=>y,D8:()=>te,FO:()=>$,Fy:()=>re,GL:()=>j,IZ:()=>N,Mz:()=>ye,NT:()=>L,O4:()=>oe,QX:()=>Ee,RP:()=>A,S2:()=>D,SP:()=>_,TF:()=>K,Tu:()=>k,Xj:()=>he,_c:()=>C,cM:()=>a,cY:()=>me,fG:()=>Q,jp:()=>p,lF:()=>ue,r1:()=>s,rE:()=>ce,s7:()=>V,vd:()=>Y,ve:()=>d,wb:()=>F,wh:()=>m,z2:()=>Re});var r=n(2479);const i="AbstractElement";function s(e){return ke.isInstance(e,i)}const o="AbstractParserRule";function a(e){return ke.isInstance(e,o)}const c="AbstractRule",l="AbstractType",u="Action";function d(e){return ke.isInstance(e,u)}const h="Alternatives";function p(e){return ke.isInstance(e,h)}const f="Assignment";function m(e){return ke.isInstance(e,f)}const g="BooleanLiteral";function y(e){return ke.isInstance(e,g)}const T="CharacterRange";function v(e){return ke.isInstance(e,T)}const R="Condition",E="Conjunction";function k(e){return ke.isInstance(e,E)}const S="CrossReference";function C(e){return ke.isInstance(e,S)}const x="Disjunction";function A(e){return ke.isInstance(e,x)}const b="EndOfFile";function $(e){return ke.isInstance(e,b)}const w="Group";function N(e){return ke.isInstance(e,w)}const I="InferredType";function _(e){return ke.isInstance(e,I)}const P="InfixRule";function L(e){return ke.isInstance(e,P)}const O="Interface";function D(e){return ke.isInstance(e,O)}const M="Keyword";function F(e){return ke.isInstance(e,M)}const q="NegatedToken";function j(e){return ke.isInstance(e,q)}const U="Negation";function G(e){return ke.isInstance(e,U)}const z="Parameter",B="ParameterReference";function K(e){return ke.isInstance(e,B)}const W="ParserRule";function V(e){return ke.isInstance(e,W)}const H="RegexToken";function Y(e){return ke.isInstance(e,H)}const X="ReturnType";function Q(e){return ke.isInstance(e,X)}const J="RuleCall";function Z(e){return ke.isInstance(e,J)}const ee="SimpleType";function te(e){return ke.isInstance(e,ee)}const ne="TerminalAlternatives";function re(e){return ke.isInstance(e,ne)}const ie="TerminalElement",se="TerminalGroup";function oe(e){return ke.isInstance(e,se)}const ae="TerminalRule";function ce(e){return ke.isInstance(e,ae)}const le="TerminalRuleCall";function ue(e){return ke.isInstance(e,le)}const de="Type";function he(e){return ke.isInstance(e,de)}const pe="TypeDefinition",fe="UnorderedGroup";function me(e){return ke.isInstance(e,fe)}const ge="UntilToken";function ye(e){return ke.isInstance(e,ge)}const Te="ValueLiteral",ve="Wildcard";function Re(e){return ke.isInstance(e,ve)}class Ee extends r.kD{constructor(){super(...arguments),this.types={AbstractElement:{name:i,properties:{cardinality:{name:"cardinality"}},superTypes:[]},AbstractParserRule:{name:o,properties:{},superTypes:[c,l]},AbstractRule:{name:c,properties:{},superTypes:[]},AbstractType:{name:l,properties:{},superTypes:[]},Action:{name:u,properties:{cardinality:{name:"cardinality"},feature:{name:"feature"},inferredType:{name:"inferredType"},operator:{name:"operator"},type:{name:"type",referenceType:l}},superTypes:[i]},Alternatives:{name:h,properties:{cardinality:{name:"cardinality"},elements:{name:"elements",defaultValue:[]}},superTypes:[i]},ArrayLiteral:{name:"ArrayLiteral",properties:{elements:{name:"elements",defaultValue:[]}},superTypes:[Te]},ArrayType:{name:"ArrayType",properties:{elementType:{name:"elementType"}},superTypes:[pe]},Assignment:{name:f,properties:{cardinality:{name:"cardinality"},feature:{name:"feature"},operator:{name:"operator"},predicate:{name:"predicate"},terminal:{name:"terminal"}},superTypes:[i]},BooleanLiteral:{name:g,properties:{true:{name:"true",defaultValue:!1}},superTypes:[R,Te]},CharacterRange:{name:T,properties:{cardinality:{name:"cardinality"},left:{name:"left"},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1},right:{name:"right"}},superTypes:[ie]},Condition:{name:R,properties:{},superTypes:[]},Conjunction:{name:E,properties:{left:{name:"left"},right:{name:"right"}},superTypes:[R]},CrossReference:{name:S,properties:{cardinality:{name:"cardinality"},deprecatedSyntax:{name:"deprecatedSyntax",defaultValue:!1},isMulti:{name:"isMulti",defaultValue:!1},terminal:{name:"terminal"},type:{name:"type",referenceType:l}},superTypes:[i]},Disjunction:{name:x,properties:{left:{name:"left"},right:{name:"right"}},superTypes:[R]},EndOfFile:{name:b,properties:{cardinality:{name:"cardinality"}},superTypes:[i]},Grammar:{name:"Grammar",properties:{imports:{name:"imports",defaultValue:[]},interfaces:{name:"interfaces",defaultValue:[]},isDeclared:{name:"isDeclared",defaultValue:!1},name:{name:"name"},rules:{name:"rules",defaultValue:[]},types:{name:"types",defaultValue:[]}},superTypes:[]},GrammarImport:{name:"GrammarImport",properties:{path:{name:"path"}},superTypes:[]},Group:{name:w,properties:{cardinality:{name:"cardinality"},elements:{name:"elements",defaultValue:[]},guardCondition:{name:"guardCondition"},predicate:{name:"predicate"}},superTypes:[i]},InferredType:{name:I,properties:{name:{name:"name"}},superTypes:[l]},InfixRule:{name:P,properties:{call:{name:"call"},dataType:{name:"dataType"},inferredType:{name:"inferredType"},name:{name:"name"},operators:{name:"operators"},parameters:{name:"parameters",defaultValue:[]},returnType:{name:"returnType",referenceType:l}},superTypes:[o]},InfixRuleOperatorList:{name:"InfixRuleOperatorList",properties:{associativity:{name:"associativity"},operators:{name:"operators",defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:"InfixRuleOperators",properties:{precedences:{name:"precedences",defaultValue:[]}},superTypes:[]},Interface:{name:O,properties:{attributes:{name:"attributes",defaultValue:[]},name:{name:"name"},superTypes:{name:"superTypes",defaultValue:[],referenceType:l}},superTypes:[l]},Keyword:{name:M,properties:{cardinality:{name:"cardinality"},predicate:{name:"predicate"},value:{name:"value"}},superTypes:[i]},NamedArgument:{name:"NamedArgument",properties:{calledByName:{name:"calledByName",defaultValue:!1},parameter:{name:"parameter",referenceType:z},value:{name:"value"}},superTypes:[]},NegatedToken:{name:q,properties:{cardinality:{name:"cardinality"},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1},terminal:{name:"terminal"}},superTypes:[ie]},Negation:{name:U,properties:{value:{name:"value"}},superTypes:[R]},NumberLiteral:{name:"NumberLiteral",properties:{value:{name:"value"}},superTypes:[Te]},Parameter:{name:z,properties:{name:{name:"name"}},superTypes:[]},ParameterReference:{name:B,properties:{parameter:{name:"parameter",referenceType:z}},superTypes:[R]},ParserRule:{name:W,properties:{dataType:{name:"dataType"},definition:{name:"definition"},entry:{name:"entry",defaultValue:!1},fragment:{name:"fragment",defaultValue:!1},inferredType:{name:"inferredType"},name:{name:"name"},parameters:{name:"parameters",defaultValue:[]},returnType:{name:"returnType",referenceType:l}},superTypes:[o]},ReferenceType:{name:"ReferenceType",properties:{isMulti:{name:"isMulti",defaultValue:!1},referenceType:{name:"referenceType"}},superTypes:[pe]},RegexToken:{name:H,properties:{cardinality:{name:"cardinality"},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1},regex:{name:"regex"}},superTypes:[ie]},ReturnType:{name:X,properties:{name:{name:"name"}},superTypes:[]},RuleCall:{name:J,properties:{arguments:{name:"arguments",defaultValue:[]},cardinality:{name:"cardinality"},predicate:{name:"predicate"},rule:{name:"rule",referenceType:c}},superTypes:[i]},SimpleType:{name:ee,properties:{primitiveType:{name:"primitiveType"},stringType:{name:"stringType"},typeRef:{name:"typeRef",referenceType:l}},superTypes:[pe]},StringLiteral:{name:"StringLiteral",properties:{value:{name:"value"}},superTypes:[Te]},TerminalAlternatives:{name:ne,properties:{cardinality:{name:"cardinality"},elements:{name:"elements",defaultValue:[]},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1}},superTypes:[ie]},TerminalElement:{name:ie,properties:{cardinality:{name:"cardinality"},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1}},superTypes:[i]},TerminalGroup:{name:se,properties:{cardinality:{name:"cardinality"},elements:{name:"elements",defaultValue:[]},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1}},superTypes:[ie]},TerminalRule:{name:ae,properties:{definition:{name:"definition"},fragment:{name:"fragment",defaultValue:!1},hidden:{name:"hidden",defaultValue:!1},name:{name:"name"},type:{name:"type"}},superTypes:[c]},TerminalRuleCall:{name:le,properties:{cardinality:{name:"cardinality"},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1},rule:{name:"rule",referenceType:ae}},superTypes:[ie]},Type:{name:de,properties:{name:{name:"name"},type:{name:"type"}},superTypes:[l]},TypeAttribute:{name:"TypeAttribute",properties:{defaultValue:{name:"defaultValue"},isOptional:{name:"isOptional",defaultValue:!1},name:{name:"name"},type:{name:"type"}},superTypes:[]},TypeDefinition:{name:pe,properties:{},superTypes:[]},UnionType:{name:"UnionType",properties:{types:{name:"types",defaultValue:[]}},superTypes:[pe]},UnorderedGroup:{name:fe,properties:{cardinality:{name:"cardinality"},elements:{name:"elements",defaultValue:[]}},superTypes:[i]},UntilToken:{name:ge,properties:{cardinality:{name:"cardinality"},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1},terminal:{name:"terminal"}},superTypes:[ie]},ValueLiteral:{name:Te,properties:{},superTypes:[]},Wildcard:{name:ve,properties:{cardinality:{name:"cardinality"},lookahead:{name:"lookahead"},parenthesized:{name:"parenthesized",defaultValue:!1}},superTypes:[ie]}}}}const ke=new Ee},4326(e,t,n){"use strict";n.d(t,{Q:()=>l});var r=n(1064),i=n(2151),s=n(9683),o=n(418),a=n(2806),c=n(1719);class l{constructor(){this.diagnostics=[]}buildTokens(e,t){const n=(0,c.Td)((0,o.YV)(e,!1)),r=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,r,t);return i.push(...r),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(i.rE).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){const t=(0,o.S)(e),n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,i={name:e.name,PATTERN:n};return"function"==typeof n&&(i.LINE_BREAKS=!0),e.hidden&&(i.GROUP=(0,a.Yv)(t)?r.JG.SKIPPED:"hidden"),i}requiresCustomPattern(e){return!(!e.flags.includes("u")&&!e.flags.includes("s"))}regexPatternFunction(e){const t=new RegExp(e,e.flags+"y");return(e,n)=>(t.lastIndex=n,t.exec(e))}buildKeywordTokens(e,t,n){return e.filter(i.cM).flatMap(e=>(0,s.Uo)(e).filter(i.wb)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,Boolean(n?.caseInsensitive)))}buildKeywordToken(e,t,n){const r=this.buildKeywordPattern(e,n),i={name:e.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(e,t)};return"function"==typeof r&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,t){return t?new RegExp((0,a.Nt)(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((t,n)=>{const r=n?.PATTERN;return r?.source&&(0,a.PC)("^"+r.source+"$",e.value)&&t.push(n),t},[])}}},5033(e,t,n){"use strict";n.d(t,{d:()=>o});var r,i=n(2151),s=n(418);class o{convert(e,t){let n=t.grammarSource;if((0,i._c)(n)&&(n=(0,s.g4)(n)),(0,i.$g)(n)){const r=n.rule.ref;if(!r)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(r,e,t)}return e}runConverter(e,t,n){switch(e.name.toUpperCase()){case"INT":return r.convertInt(t);case"STRING":return r.convertString(t);case"ID":return r.convertID(t)}switch((0,s.P3)(e)?.toLowerCase()){case"number":return r.convertNumber(t);case"boolean":return r.convertBoolean(t);case"bigint":return r.convertBigint(t);case"date":return r.convertDate(t);default:return t}}}!function(e){function t(e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return e}}e.convertString=function(e){let n="";for(let r=1;r<e.length-1;r++){const i=e.charAt(r);n+="\\"===i?t(e.charAt(++r)):i}return n},e.convertID=function(e){return"^"===e.charAt(0)?e.substring(1):e},e.convertInt=function(e){return parseInt(e)},e.convertBigint=function(e){return BigInt(e)},e.convertDate=function(e){return new Date(e)},e.convertNumber=function(e){return Number(e)},e.convertBoolean=function(e){return"true"===e.toLowerCase()}}(r||(r={}))},2479(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function i(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"ref"in e}function s(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"items"in e}function o(e){return"object"==typeof e&&null!==e&&"string"==typeof e.name&&"string"==typeof e.type&&"string"==typeof e.path}function a(e){return"object"==typeof e&&null!==e&&"object"==typeof e.info&&"string"==typeof e.message}n.d(t,{A_:()=>i,Dm:()=>s,FC:()=>u,Nr:()=>o,Zl:()=>a,br:()=>d,kD:()=>c,mD:()=>l,ng:()=>r});class c{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){const t=this.types[e.container.$type];if(!t)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=t.properties[e.property]?.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return r(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const r=n[t];if(void 0!==r)return r;{const r=this.types[e],i=!!r&&r.superTypes.some(e=>this.isSubtype(e,t));return n[t]=i,i}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t)return t;{const t=this.getAllTypes(),n=[];for(const r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}}function l(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function u(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function d(e){return l(e)&&"string"==typeof e.fullText}},9683(e,t,n){"use strict";n.d(t,{DM:()=>m,OP:()=>g,SD:()=>o,Uo:()=>h,VN:()=>d,XG:()=>a,YE:()=>c,cQ:()=>l,jm:()=>p,tC:()=>u});var r=n(2479),i=n(1719),s=n(6373);function o(e,t={}){for(const[n,i]of Object.entries(e))n.startsWith("$")||(Array.isArray(i)?i.forEach((i,s)=>{(0,r.ng)(i)&&(i.$container=e,i.$containerProperty=n,i.$containerIndex=s,t.deep&&o(i,t))}):(0,r.ng)(i)&&(i.$container=e,i.$containerProperty=n,t.deep&&o(i,t)))}function a(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}function c(e){const t=l(e).$document;if(!t)throw new Error("AST node has no document.");return t}function l(e){for(;e.$container;)e=e.$container;return e}function u(e){return(0,r.A_)(e)?e.ref?[e.ref]:[]:(0,r.Dm)(e)?e.items.map(e=>e.ref):[]}function d(e,t){if(!e)throw new Error("Node must be an AstNode.");const n=t?.range;return new i.fq(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){const i=t.keys[t.keyIndex];if(!i.startsWith("$")){const s=e[i];if((0,r.ng)(s)){if(t.keyIndex++,f(s,n))return{done:!1,value:s}}else if(Array.isArray(s)){for(;t.arrayIndex<s.length;){const e=s[t.arrayIndex++];if((0,r.ng)(e)&&f(e,n))return{done:!1,value:e}}t.arrayIndex=0}}t.keyIndex++}return i.Rf})}function h(e,t){if(!e)throw new Error("Root node must be an AstNode.");return new i.Vj(e,e=>d(e,t))}function p(e,t){if(!e)throw new Error("Root node must be an AstNode.");return t?.range&&!f(e,t.range)?new i.Vj(e,()=>[]):new i.Vj(e,e=>d(e,t),{includeRoot:!0})}function f(e,t){if(!t)return!0;const n=e.$cstNode?.range;return!!n&&(0,s.r4)(n,t)}function m(e){return new i.fq(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){const n=t.keys[t.keyIndex];if(!n.startsWith("$")){const i=e[n];if((0,r.A_)(i)||(0,r.Dm)(i))return t.keyIndex++,{done:!1,value:{reference:i,container:e,property:n}};if(Array.isArray(i)){for(;t.arrayIndex<i.length;){const s=t.arrayIndex++,o=i[s];if((0,r.A_)(o)||(0,r.Dm)(i))return{done:!1,value:{reference:o,container:e,property:n,index:s}}}t.arrayIndex=0}}t.keyIndex++}return i.Rf})}function g(e,t){const n=e.getTypeMetaData(t.$type),r=t;for(const e of Object.values(n.properties))void 0!==e.defaultValue&&void 0===r[e.name]&&(r[e.name]=y(e.defaultValue))}function y(e){return Array.isArray(e)?[...e.map(y)]:e}},6373(e,t,n){"use strict";n.d(t,{El:()=>d,NS:()=>o,SX:()=>l,pO:()=>a,r4:()=>u,v:()=>h,wf:()=>c});var r,i=n(2479),s=n(1719);function o(e){return new s.Vj(e,e=>(0,i.mD)(e)?e.content:[],{includeRoot:!0})}function a(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}function c(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function l(e){if(!e)return;const{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}function u(e,t){const n=function(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character)return r.Before;if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return r.After;const n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,i=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;return n&&i?r.Inside:n?r.OverlapBack:i?r.OverlapFront:r.Outside}(e,t);return n>r.After}!function(e){e[e.Before=0]="Before",e[e.After=1]="After",e[e.OverlapFront=2]="OverlapFront",e[e.OverlapBack=3]="OverlapBack",e[e.Inside=4]="Inside",e[e.Outside=5]="Outside"}(r||(r={}));const d=/^[\w\p{L}]$/u;function h(e,t){if(e){const n=function(e,t=!0){for(;e.container;){const n=e.container;let r=n.content.indexOf(e);for(;r>0;){r--;const e=n.content[r];if(t||!e.hidden)return e}e=n}}(e,!0);if(n&&p(n,t))return n;if((0,i.br)(e))for(let n=e.content.findIndex(e=>!e.hidden)-1;n>=0;n--){const r=e.content[n];if(p(r,t))return r}}}function p(e,t){return(0,i.FC)(e)&&t.includes(e.tokenType.name)}},1564(e,t,n){"use strict";n.d(t,{WB:()=>r,dr:()=>i});class r extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}}function i(e,t="Error: Got unexpected value."){throw new Error(t)}},418(e,t,n){"use strict";n.d(t,{Bd:()=>p,P3:()=>C,Rp:()=>y,S:()=>x,SS:()=>g,U5:()=>T,Uz:()=>S,Xq:()=>R,YV:()=>l,eb:()=>h,g4:()=>d,qO:()=>f});var r=n(1564),i=n(2151),s=n(2479),o=n(9683),a=n(6373),c=n(2806);function l(e,t){const n=new Set,r=function(e){return e.rules.find(e=>i.s7(e)&&e.entry)}(e);if(!r)return new Set(e.rules);const s=[r].concat(function(e){return e.rules.filter(e=>i.rE(e)&&e.hidden)}(e));for(const e of s)u(e,n,t);const o=new Set;for(const t of e.rules)(n.has(t.name)||i.rE(t)&&t.hidden)&&o.add(t);return o}function u(e,t,n){t.add(e.name),(0,o.Uo)(e).forEach(e=>{if(i.$g(e)||n&&i.lF(e)){const r=e.rule.ref;r&&!t.has(r.name)&&u(r,t,n)}})}function d(e){if(e.terminal)return e.terminal;if(e.type.ref){const t=T(e.type.ref);return t?.terminal}}function h(e){return e.hidden&&!(0,c.Yv)(x(e))}function p(e,t){return e&&t?m(e,t,e.astNode,!0):[]}function f(e,t,n){if(!e||!t)return;const r=m(e,t,e.astNode,!0);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}function m(e,t,n,r){if(!r){const n=(0,o.XG)(e.grammarSource,i.wh);if(n&&n.feature===t)return[e]}return(0,s.mD)(e)&&e.astNode===n?e.content.flatMap(e=>m(e,t,n,!1)):[]}function g(e,t,n){if(!e)return;const r=function(e,t,n){if(e.astNode!==n)return[];if(i.wb(e.grammarSource)&&e.grammarSource.value===t)return[e];const r=(0,a.NS)(e).iterator();let s;const o=[];do{if(s=r.next(),!s.done){const e=s.value;e.astNode===n?i.wb(e.grammarSource)&&e.grammarSource.value===t&&o.push(e):r.prune()}}while(!s.done);return o}(e,t,e?.astNode);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}function y(e){const t=e.astNode;for(;t===e.container?.astNode;){const t=(0,o.XG)(e.grammarSource,i.wh);if(t)return t;e=e.container}}function T(e){let t=e;return i.SP(t)&&(i.ve(t.$container)?t=t.$container.$container:i.cM(t.$container)?t=t.$container:(0,r.dr)(t.$container)),v(e,t,new Map)}function v(e,t,n){function r(t,r){let s;return(0,o.XG)(t,i.wh)||(s=v(r,r,n)),n.set(e,s),s}if(n.has(e))return n.get(e);n.set(e,void 0);for(const s of(0,o.Uo)(t)){if(i.wh(s)&&"name"===s.feature.toLowerCase())return n.set(e,s),s;if(i.$g(s)&&i.s7(s.rule.ref))return r(s,s.rule.ref);if(i.D8(s)&&s.typeRef?.ref)return r(s,s.typeRef.ref)}}function R(e){return E(e,new Set)}function E(e,t){if(t.has(e))return!0;t.add(e);for(const n of(0,o.Uo)(e))if(i.$g(n)){if(!n.rule.ref)return!1;if(i.s7(n.rule.ref)&&!E(n.rule.ref,t))return!1;if(i.NT(n.rule.ref))return!1}else{if(i.wh(n))return!1;if(i.ve(n))return!1}return Boolean(e.definition)}function k(e){if(!i.rE(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){const t=e.returnType.ref;if(t)return t.name}}}function S(e){if(i.cM(e))return i.s7(e)&&R(e)?e.name:k(e)??e.name;if(i.S2(e)||i.Xj(e)||i.fG(e))return e.name;if(i.ve(e)){const n=(t=e).inferredType?t.inferredType.name:t.type?.ref?S(t.type.ref):void 0;if(n)return n}else if(i.SP(e))return e.name;var t;throw new Error("Cannot get name of Unknown Type")}function C(e){return i.rE(e)?e.type?.name??"string":k(e)??e.name}function x(e){const t={s:!1,i:!1,u:!1},n=b(e.definition,t),r=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join("");return new RegExp(n,r)}const A=/[\s\S]/.source;function b(e,t){if(i.Fy(e))return w((a=e).elements.map(e=>b(e)).join("|"),{cardinality:a.cardinality,lookahead:a.lookahead,parenthesized:a.parenthesized,wrap:!1});if(i.O4(e))return w((o=e).elements.map(e=>b(e)).join(""),{cardinality:o.cardinality,lookahead:o.lookahead,parenthesized:o.parenthesized,wrap:!1});if(i.Bg(e))return(n=e).right?w(`[${$(n.left)}-${$(n.right)}]`,{cardinality:n.cardinality,lookahead:n.lookahead,parenthesized:n.parenthesized,wrap:!1}):w($(n.left),{cardinality:n.cardinality,lookahead:n.lookahead,parenthesized:n.parenthesized,wrap:!1});var n,r,s,o,a;if(i.lF(e)){const t=e.rule.ref;if(!t)throw new Error("Missing rule reference.");return w(b(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}if(i.GL(e))return w(`(?!${b((s=e).terminal)})${A}*?`,{cardinality:s.cardinality,lookahead:s.lookahead,parenthesized:s.parenthesized});if(i.Mz(e))return w(`${A}*?${b((r=e).terminal)}`,{cardinality:r.cardinality,lookahead:r.lookahead,parenthesized:r.parenthesized});if(i.vd(e)){const n=e.regex.lastIndexOf("/"),r=e.regex.substring(1,n),i=e.regex.substring(n+1);return t&&(t.i=i.includes("i"),t.s=i.includes("s"),t.u=i.includes("u")),w(r,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}if(i.z2(e))return w(A,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}function $(e){return(0,c.Nt)(e.value)}function w(e,t){return(t.parenthesized||t.lookahead||!1!==t.wrap)&&(e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`),t.cardinality?`${e}${t.cardinality}`:e}},2806(e,t,n){"use strict";n.d(t,{Nt:()=>d,PC:()=>h,TH:()=>i,Yv:()=>u,lU:()=>c});var r=n(2607);const i=/\r?\n/gm,s=new r.H;class o extends r.z{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const t=String.fromCharCode(e.value);if(this.multiline||"\n"!==t||(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const e=d(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(t);this.multiline=Boolean("\n".match(n))}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){"Group"===e.type&&e.quantifier||super.visitChildren(e)}}const a=new o;function c(e){try{return"string"==typeof e&&(e=new RegExp(e)),e=e.toString(),a.reset(e),a.visit(s.pattern(e)),a.multiline}catch{return!1}}const l="\f\n\r\t\v \u2028\u2029 \ufeff".split("");function u(e){const t="string"==typeof e?new RegExp(e):e;return l.some(e=>t.test(e))}function d(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function h(e,t){const n=function(e){"string"==typeof e&&(e=new RegExp(e));const t=e,n=e.source;let r=0;return new RegExp(function e(){let i,s="";function o(e){s+=n.substr(r,e),r+=e}function a(e){s+="(?:"+n.substr(r,e)+"|$)",r+=e}for(;r<n.length;)switch(n[r]){case"\\":switch(n[r+1]){case"c":a(3);break;case"x":a(4);break;case"u":t.unicode?"{"===n[r+2]?a(n.indexOf("}",r)-r+1):a(6):a(2);break;case"p":case"P":t.unicode?a(n.indexOf("}",r)-r+1):a(2);break;case"k":a(n.indexOf(">",r)-r+1);break;default:a(2)}break;case"[":i=/\[(?:\\.|.)*?\]/g,i.lastIndex=r,i=i.exec(n)||[],a(i[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":i=/\{\d+,?\d*\}/g,i.lastIndex=r,i=i.exec(n),i?o(i[0].length):a(1);break;case"(":if("?"===n[r+1])switch(n[r+2]){case":":s+="(?:",r+=3,s+=e()+"|$)";break;case"=":s+="(?=",r+=3,s+=e()+")";break;case"!":i=r,r+=3,e(),s+=n.substr(i,r-i);break;case"<":switch(n[r+3]){case"=":case"!":i=r,r+=4,e(),s+=n.substr(i,r-i);break;default:o(n.indexOf(">",r)-r+1),s+=e()+"|$)"}}else o(1),s+=e()+"|$)";break;case")":return++r,s;default:a(1)}return s}(),e.flags)}(e),r=t.match(n);return!!r&&r[0].length>0}},1719(e,t,n){"use strict";n.d(t,{B5:()=>o,Rf:()=>a,Td:()=>c,Vj:()=>l,fq:()=>r,iD:()=>u});class r{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){const e=this.iterator();return Boolean(e.next().done)}count(){const e=this.iterator();let t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){const e=[],t=this.iterator();let n;do{n=t.next(),void 0!==n.value&&e.push(n.value)}while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){const n=this.map(n=>[e?e(n):n,t?t(n):n]);return new Map(n)}toString(){return this.join()}concat(e){return new r(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do{if(t=this.nextFn(e.first),!t.done)return t}while(!t.done);e.firstDone=!0}do{if(t=e.iterator.next(),!t.done)return t}while(!t.done);return a})}join(e=","){const t=this.iterator();let n,r="",s=!1;do{n=t.next(),n.done||(s&&(r+=e),r+=i(n.value)),s=!0}while(!n.done);return r}indexOf(e,t=0){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){const t=this.iterator();let n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(e){return new r(this.startFn,t=>{const{done:n,value:r}=this.nextFn(t);return n?a:{done:!1,value:e(r)}})}filter(e){return new r(this.startFn,t=>{let n;do{if(n=this.nextFn(t),!n.done&&e(n.value))return n}while(!n.done);return a})}nonNullable(){return this.filter(e=>null!=e)}reduce(e,t){const n=this.iterator();let r=t,i=n.next();for(;!i.done;)r=void 0===r?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){const r=e.next();if(r.done)return n;const i=this.recursiveReduce(e,t,n);return void 0===i?r.value:t(i,r.value)}find(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){const t=this.iterator();let n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(e){return new r(()=>({this:this.startFn()}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}const{done:n,value:r}=this.nextFn(t.this);if(!n){const n=e(r);if(!s(n))return{done:!1,value:n};t.iterator=n[Symbol.iterator]()}}while(t.iterator);return a})}flat(e){if(void 0===e&&(e=1),e<=0)return this;const t=e>1?this.flat(e-1):this;return new r(()=>({this:t.startFn()}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}const{done:n,value:r}=t.nextFn(e.this);if(!n){if(!s(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return a})}head(){const e=this.iterator().next();if(!e.done)return e.value}tail(e=1){return new r(()=>{const t=this.startFn();for(let n=0;n<e;n++)if(this.nextFn(t).done)return t;return t},this.nextFn)}limit(e){return new r(()=>({size:0,state:this.startFn()}),t=>(t.size++,t.size>e?a:this.nextFn(t.state)))}distinct(e){return new r(()=>({set:new Set,internalState:this.startFn()}),t=>{let n;do{if(n=this.nextFn(t.internalState),!n.done){const r=e?e(n.value):n.value;if(!t.set.has(r))return t.set.add(r),n}}while(!n.done);return a})}exclude(e,t){const n=new Set;for(const r of e){const e=t?t(r):r;n.add(e)}return this.filter(e=>{const r=t?t(e):e;return!n.has(r)})}}function i(e){return"string"==typeof e?e:void 0===e?"undefined":"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}function s(e){return!!e&&"function"==typeof e[Symbol.iterator]}const o=new r(()=>{},()=>a),a=Object.freeze({done:!0,value:void 0});function c(...e){if(1===e.length){const t=e[0];if(t instanceof r)return t;if(s(t))return new r(()=>t[Symbol.iterator](),e=>e.next());if("number"==typeof t.length)return new r(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:a)}return e.length>1?new r(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}if(t.collIndex<e.length){const n=e[t.collIndex++];s(n)?t.iterator=n[Symbol.iterator]():n&&"number"==typeof n.length&&(t.array=n)}}while(t.iterator||t.array||t.collIndex<e.length);return a}):o}class l extends r{constructor(e,t,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);e.iterators.length>0;){const n=e.iterators[e.iterators.length-1].next();if(!n.done)return e.iterators.push(t(n.value)[Symbol.iterator]()),n;e.iterators.pop()}return a})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var u;!function(e){e.sum=function(e){return e.reduce((e,t)=>e+t,0)},e.product=function(e){return e.reduce((e,t)=>e*t,0)},e.min=function(e){return e.reduce((e,t)=>Math.min(e,t))},e.max=function(e){return e.reduce((e,t)=>Math.max(e,t))}}(u||(u={}))},1917(e,t,n){"use strict";n.d(t,{D:()=>i});class r{stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}}const i={fileSystemProvider:()=>new r}},6203(e,t,n){"use strict";var r,i,s,o,a,c,l,u,d,h,p,f,m,g,y,T,v,R,E,k,S,C,x,A,b,$,w,N,I,_,P,L,O,D,M,F,q,j,U,G,z,B,K,W,V,H,Y,X,Q,J,Z,ee,te,ne,re,ie,se,oe,ae,ce,le,ue,de,he,pe,fe,me,ge,ye,Te,ve,Re,Ee,ke,Se,Ce,xe,Ae;n.r(t),n.d(t,{AnnotatedTextEdit:()=>x,ChangeAnnotation:()=>S,ChangeAnnotationIdentifier:()=>C,CodeAction:()=>se,CodeActionContext:()=>ie,CodeActionKind:()=>ne,CodeActionTriggerKind:()=>re,CodeDescription:()=>v,CodeLens:()=>oe,Color:()=>d,ColorInformation:()=>h,ColorPresentation:()=>p,Command:()=>E,CompletionItem:()=>z,CompletionItemKind:()=>M,CompletionItemLabelDetails:()=>G,CompletionItemTag:()=>q,CompletionList:()=>B,CreateFile:()=>b,DeleteFile:()=>w,Diagnostic:()=>R,DiagnosticRelatedInformation:()=>g,DiagnosticSeverity:()=>y,DiagnosticTag:()=>T,DocumentHighlight:()=>X,DocumentHighlightKind:()=>Y,DocumentLink:()=>ce,DocumentSymbol:()=>te,DocumentUri:()=>r,EOL:()=>Ne,FoldingRange:()=>m,FoldingRangeKind:()=>f,FormattingOptions:()=>ae,Hover:()=>W,InlayHint:()=>ve,InlayHintKind:()=>ye,InlayHintLabelPart:()=>Te,InlineCompletionContext:()=>xe,InlineCompletionItem:()=>Ee,InlineCompletionList:()=>ke,InlineCompletionTriggerKind:()=>Se,InlineValueContext:()=>ge,InlineValueEvaluatableExpression:()=>me,InlineValueText:()=>pe,InlineValueVariableLookup:()=>fe,InsertReplaceEdit:()=>j,InsertTextFormat:()=>F,InsertTextMode:()=>U,Location:()=>l,LocationLink:()=>u,MarkedString:()=>K,MarkupContent:()=>D,MarkupKind:()=>O,OptionalVersionedTextDocumentIdentifier:()=>P,ParameterInformation:()=>V,Position:()=>a,Range:()=>c,RenameFile:()=>$,SelectedCompletionInfo:()=>Ce,SelectionRange:()=>le,SemanticTokenModifiers:()=>de,SemanticTokenTypes:()=>ue,SemanticTokens:()=>he,SignatureInformation:()=>H,StringValue:()=>Re,SymbolInformation:()=>Z,SymbolKind:()=>Q,SymbolTag:()=>J,TextDocument:()=>Ie,TextDocumentEdit:()=>A,TextDocumentIdentifier:()=>I,TextDocumentItem:()=>L,TextEdit:()=>k,URI:()=>i,VersionedTextDocumentIdentifier:()=>_,WorkspaceChange:()=>we,WorkspaceEdit:()=>N,WorkspaceFolder:()=>Ae,WorkspaceSymbol:()=>ee,integer:()=>s,uinteger:()=>o}),function(e){e.is=function(e){return"string"==typeof e}}(r||(r={})),function(e){e.is=function(e){return"string"==typeof e}}(i||(i={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(o||(o={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=o.MAX_VALUE),t===Number.MAX_VALUE&&(t=o.MAX_VALUE),{line:e,character:t}},e.is=function(e){let t=e;return _e.objectLiteral(t)&&_e.uinteger(t.line)&&_e.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,n,r){if(_e.uinteger(e)&&_e.uinteger(t)&&_e.uinteger(n)&&_e.uinteger(r))return{start:a.create(e,t),end:a.create(n,r)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},e.is=function(e){let t=e;return _e.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}}(c||(c={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){let t=e;return _e.objectLiteral(t)&&c.is(t.range)&&(_e.string(t.uri)||_e.undefined(t.uri))}}(l||(l={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){let t=e;return _e.objectLiteral(t)&&c.is(t.targetRange)&&_e.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||_e.undefined(t.originSelectionRange))}}(u||(u={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){const t=e;return _e.objectLiteral(t)&&_e.numberRange(t.red,0,1)&&_e.numberRange(t.green,0,1)&&_e.numberRange(t.blue,0,1)&&_e.numberRange(t.alpha,0,1)}}(d||(d={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return _e.objectLiteral(t)&&c.is(t.range)&&d.is(t.color)}}(h||(h={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return _e.objectLiteral(t)&&_e.string(t.label)&&(_e.undefined(t.textEdit)||k.is(t))&&(_e.undefined(t.additionalTextEdits)||_e.typedArray(t.additionalTextEdits,k.is))}}(p||(p={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(f||(f={})),function(e){e.create=function(e,t,n,r,i,s){const o={startLine:e,endLine:t};return _e.defined(n)&&(o.startCharacter=n),_e.defined(r)&&(o.endCharacter=r),_e.defined(i)&&(o.kind=i),_e.defined(s)&&(o.collapsedText=s),o},e.is=function(e){const t=e;return _e.objectLiteral(t)&&_e.uinteger(t.startLine)&&_e.uinteger(t.startLine)&&(_e.undefined(t.startCharacter)||_e.uinteger(t.startCharacter))&&(_e.undefined(t.endCharacter)||_e.uinteger(t.endCharacter))&&(_e.undefined(t.kind)||_e.string(t.kind))}}(m||(m={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){let t=e;return _e.defined(t)&&l.is(t.location)&&_e.string(t.message)}}(g||(g={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(y||(y={})),function(e){e.Unnecessary=1,e.Deprecated=2}(T||(T={})),function(e){e.is=function(e){const t=e;return _e.objectLiteral(t)&&_e.string(t.href)}}(v||(v={})),function(e){e.create=function(e,t,n,r,i,s){let o={range:e,message:t};return _e.defined(n)&&(o.severity=n),_e.defined(r)&&(o.code=r),_e.defined(i)&&(o.source=i),_e.defined(s)&&(o.relatedInformation=s),o},e.is=function(e){var t;let n=e;return _e.defined(n)&&c.is(n.range)&&_e.string(n.message)&&(_e.number(n.severity)||_e.undefined(n.severity))&&(_e.integer(n.code)||_e.string(n.code)||_e.undefined(n.code))&&(_e.undefined(n.codeDescription)||_e.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(_e.string(n.source)||_e.undefined(n.source))&&(_e.undefined(n.relatedInformation)||_e.typedArray(n.relatedInformation,g.is))}}(R||(R={})),function(e){e.create=function(e,t,...n){let r={title:e,command:t};return _e.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){let t=e;return _e.defined(t)&&_e.string(t.title)&&_e.string(t.command)}}(E||(E={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return _e.objectLiteral(t)&&_e.string(t.newText)&&c.is(t.range)}}(k||(k={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return _e.objectLiteral(t)&&_e.string(t.label)&&(_e.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(_e.string(t.description)||void 0===t.description)}}(S||(S={})),function(e){e.is=function(e){const t=e;return _e.string(t)}}(C||(C={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return k.is(t)&&(S.is(t.annotationId)||C.is(t.annotationId))}}(x||(x={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return _e.defined(t)&&P.is(t.textDocument)&&Array.isArray(t.edits)}}(A||(A={})),function(e){e.create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"create"===t.kind&&_e.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||_e.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||_e.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(b||(b={})),function(e){e.create=function(e,t,n,r){let i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},e.is=function(e){let t=e;return t&&"rename"===t.kind&&_e.string(t.oldUri)&&_e.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||_e.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||_e.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}($||($={})),function(e){e.create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"delete"===t.kind&&_e.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||_e.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||_e.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(w||(w={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>_e.string(e.kind)?b.is(e)||$.is(e)||w.is(e):A.is(e)))}}(N||(N={}));class be{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let r,i;if(void 0===n?r=k.insert(e,t):C.is(n)?(i=n,r=x.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=x.insert(e,t,i)),this.edits.push(r),void 0!==i)return i}replace(e,t,n){let r,i;if(void 0===n?r=k.replace(e,t):C.is(n)?(i=n,r=x.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=x.replace(e,t,i)),this.edits.push(r),void 0!==i)return i}delete(e,t){let n,r;if(void 0===t?n=k.del(e):C.is(t)?(r=t,n=x.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=x.del(e,r)),this.edits.push(n),void 0!==r)return r}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}}class $e{constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(C.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error(`Id ${n} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}}class we{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new $e(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(A.is(e)){const t=new be(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{const n=new be(e.changes[t]);this._textEditChanges[t]=n})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(P.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let n=this._textEditChanges[t.uri];if(!n){const e=[],r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r),n=new be(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n,t=new be(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new $e,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,i,s;if(S.is(t)||C.is(t)?r=t:n=t,void 0===r?i=b.create(e,n):(s=C.is(r)?r:this._changeAnnotations.manage(r),i=b.create(e,n,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s}renameFile(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,s,o;if(S.is(n)||C.is(n)?i=n:r=n,void 0===i?s=$.create(e,t,r):(o=C.is(i)?i:this._changeAnnotations.manage(i),s=$.create(e,t,r,o)),this._workspaceEdit.documentChanges.push(s),void 0!==o)return o}deleteFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,i,s;if(S.is(t)||C.is(t)?r=t:n=t,void 0===r?i=w.create(e,n):(s=C.is(r)?r:this._changeAnnotations.manage(r),i=w.create(e,n,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s}}!function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return _e.defined(t)&&_e.string(t.uri)}}(I||(I={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return _e.defined(t)&&_e.string(t.uri)&&_e.integer(t.version)}}(_||(_={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return _e.defined(t)&&_e.string(t.uri)&&(null===t.version||_e.integer(t.version))}}(P||(P={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){let t=e;return _e.defined(t)&&_e.string(t.uri)&&_e.string(t.languageId)&&_e.integer(t.version)&&_e.string(t.text)}}(L||(L={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(O||(O={})),function(e){e.is=function(e){const t=e;return _e.objectLiteral(e)&&O.is(t.kind)&&_e.string(t.value)}}(D||(D={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(M||(M={})),function(e){e.PlainText=1,e.Snippet=2}(F||(F={})),function(e){e.Deprecated=1}(q||(q={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&_e.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}(j||(j={})),function(e){e.asIs=1,e.adjustIndentation=2}(U||(U={})),function(e){e.is=function(e){const t=e;return t&&(_e.string(t.detail)||void 0===t.detail)&&(_e.string(t.description)||void 0===t.description)}}(G||(G={})),function(e){e.create=function(e){return{label:e}}}(z||(z={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(B||(B={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return _e.string(t)||_e.objectLiteral(t)&&_e.string(t.language)&&_e.string(t.value)}}(K||(K={})),function(e){e.is=function(e){let t=e;return!!t&&_e.objectLiteral(t)&&(D.is(t.contents)||K.is(t.contents)||_e.typedArray(t.contents,K.is))&&(void 0===e.range||c.is(e.range))}}(W||(W={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(V||(V={})),function(e){e.create=function(e,t,...n){let r={label:e};return _e.defined(t)&&(r.documentation=t),_e.defined(n)?r.parameters=n:r.parameters=[],r}}(H||(H={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Y||(Y={})),function(e){e.create=function(e,t){let n={range:e};return _e.number(t)&&(n.kind=t),n}}(X||(X={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Q||(Q={})),function(e){e.Deprecated=1}(J||(J={})),function(e){e.create=function(e,t,n,r,i){let s={name:e,kind:t,location:{uri:r,range:n}};return i&&(s.containerName=i),s}}(Z||(Z={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(ee||(ee={})),function(e){e.create=function(e,t,n,r,i,s){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==s&&(o.children=s),o},e.is=function(e){let t=e;return t&&_e.string(t.name)&&_e.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||_e.string(t.detail))&&(void 0===t.deprecated||_e.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(te||(te={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(ne||(ne={})),function(e){e.Invoked=1,e.Automatic=2}(re||(re={})),function(e){e.create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){let t=e;return _e.defined(t)&&_e.typedArray(t.diagnostics,R.is)&&(void 0===t.only||_e.typedArray(t.only,_e.string))&&(void 0===t.triggerKind||t.triggerKind===re.Invoked||t.triggerKind===re.Automatic)}}(ie||(ie={})),function(e){e.create=function(e,t,n){let r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):E.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},e.is=function(e){let t=e;return t&&_e.string(t.title)&&(void 0===t.diagnostics||_e.typedArray(t.diagnostics,R.is))&&(void 0===t.kind||_e.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||E.is(t.command))&&(void 0===t.isPreferred||_e.boolean(t.isPreferred))&&(void 0===t.edit||N.is(t.edit))}}(se||(se={})),function(e){e.create=function(e,t){let n={range:e};return _e.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return _e.defined(t)&&c.is(t.range)&&(_e.undefined(t.command)||E.is(t.command))}}(oe||(oe={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return _e.defined(t)&&_e.uinteger(t.tabSize)&&_e.boolean(t.insertSpaces)}}(ae||(ae={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return _e.defined(t)&&c.is(t.range)&&(_e.undefined(t.target)||_e.string(t.target))}}(ce||(ce={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return _e.objectLiteral(n)&&c.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(le||(le={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(ue||(ue={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(de||(de={})),function(e){e.is=function(e){const t=e;return _e.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(he||(he={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&_e.string(t.text)}}(pe||(pe={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&_e.boolean(t.caseSensitiveLookup)&&(_e.string(t.variableName)||void 0===t.variableName)}}(fe||(fe={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&(_e.string(t.expression)||void 0===t.expression)}}(me||(me={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return _e.defined(t)&&c.is(e.stoppedLocation)}}(ge||(ge={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(ye||(ye={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return _e.objectLiteral(t)&&(void 0===t.tooltip||_e.string(t.tooltip)||D.is(t.tooltip))&&(void 0===t.location||l.is(t.location))&&(void 0===t.command||E.is(t.command))}}(Te||(Te={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return _e.objectLiteral(t)&&a.is(t.position)&&(_e.string(t.label)||_e.typedArray(t.label,Te.is))&&(void 0===t.kind||ye.is(t.kind))&&void 0===t.textEdits||_e.typedArray(t.textEdits,k.is)&&(void 0===t.tooltip||_e.string(t.tooltip)||D.is(t.tooltip))&&(void 0===t.paddingLeft||_e.boolean(t.paddingLeft))&&(void 0===t.paddingRight||_e.boolean(t.paddingRight))}}(ve||(ve={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(Re||(Re={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(Ee||(Ee={})),function(e){e.create=function(e){return{items:e}}}(ke||(ke={})),function(e){e.Invoked=0,e.Automatic=1}(Se||(Se={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Ce||(Ce={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(xe||(xe={})),function(e){e.is=function(e){const t=e;return _e.objectLiteral(t)&&i.is(t.uri)&&_e.string(t.name)}}(Ae||(Ae={}));const Ne=["\n","\r\n","\r"];var Ie,_e;!function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,i=e.slice(0,r),s=e.slice(r);t(i,n),t(s,n);let o=0,a=0,c=0;for(;o<i.length&&a<s.length;){let t=n(i[o],s[a]);e[c++]=t<=0?i[o++]:s[a++]}for(;o<i.length;)e[c++]=i[o++];for(;a<s.length;)e[c++]=s[a++];return e}e.create=function(e,t,n,r){return new Pe(e,t,n,r)},e.is=function(e){let t=e;return!!(_e.defined(t)&&_e.string(t.uri)&&(_e.undefined(t.languageId)||_e.string(t.languageId))&&_e.uinteger(t.lineCount)&&_e.func(t.getText)&&_e.func(t.positionAt)&&_e.func(t.offsetAt))},e.applyEdits=function(e,n){let r=e.getText(),i=t(n,(e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}),s=r.length;for(let t=i.length-1;t>=0;t--){let n=i[t],o=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=s))throw new Error("Overlapping edit");r=r.substring(0,o)+n.newText+r.substring(a,r.length),s=o}return r}}(Ie||(Ie={}));class Pe{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&(e.push(r),n=!1);let i=t.charAt(r);n="\r"===i||"\n"===i,"\r"===i&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return a.create(0,e);for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return a.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(_e||(_e={}))},7608(e,t,n){"use strict";var r;n.d(t,{A:()=>s,r:()=>i}),(()=>{var e={975:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,s=-1,o=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(s===a-1||1===o);else if(s!==a-1&&2===o){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),s=a,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,s=a,o=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(s+1,a):r=e.slice(s+1,a),i=a-s-1;s=a,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(r=o+"/"+r,i=47===o.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var s=e.length,o=s-i,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var c=n.length-a,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else o>l&&(47===e.charCodeAt(i+d)?u=d:0===d&&(u=0));break}var h=e.charCodeAt(i+d);if(h!==n.charCodeAt(a+d))break;47===h&&(u=d)}var p="";for(d=i+u+1;d<=s;++d)d!==s&&47!==e.charCodeAt(d)||(0===p.length?p+="..":p+="/..");return p.length>0?p+n.slice(a+u):(a+=u,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!s){i=o;break}}else s=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,s=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(47===l){if(!o){i=r+1;break}}else-1===c&&(o=!1,c=r+1),a>=0&&(l===n.charCodeAt(a)?-1==--a&&(s=r):(a=-1,s=c))}return i===s?s=c:-1===s&&(s=e.length),e.slice(i,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){i=r+1;break}}else-1===s&&(o=!1,s=r+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===i&&(s=!1,i=a+1),46===c?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1);else if(!s){r=a+1;break}}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),s=47===i;s?(n.root="/",r=1):r=0;for(var o=-1,a=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if(47!==(i=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===i?-1===o?o=u:1!==d&&(d=1):-1!==o&&(d=-1);else if(!l){a=u+1;break}return-1===o||-1===c||0===d||1===d&&o===c-1&&o===a+1?-1!==c&&(n.base=n.name=0===a&&s?e.slice(1,c):e.slice(a,c)):(0===a&&s?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(a,o),n.base=e.slice(a,c)),n.ext=e.slice(o,c)),a>0?n.dir=e.slice(0,a-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};let s;if(n.r(i),n.d(i,{URI:()=>p,Utils:()=>b}),"object"==typeof process)s="win32"===process.platform;else if("object"==typeof navigator){let e=navigator.userAgent;s=e.indexOf("Windows")>=0}const o=/^\w[\w\d+.-]*$/,a=/^\//,c=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!a.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(c.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const u="",d="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static isUri(e){return e instanceof p||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,s=!1){"object"==typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||u,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==d&&(t=d+t):t=d}return t}(this.scheme,n||u),this.query=r||u,this.fragment=i||u,l(this,s))}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===n?n=this.authority:null===n&&(n=u),void 0===r?r=this.path:null===r&&(r=u),void 0===i?i=this.query:null===i&&(i=u),void 0===s?s=this.fragment:null===s&&(s=u),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new m(t,n,r,i,s)}static parse(e,t=!1){const n=h.exec(e);return n?new m(n[2]||u,S(n[4]||u),S(n[5]||u),S(n[7]||u),S(n[9]||u),t):new m(u,u,u,u,u)}static file(e){let t=u;if(s&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){const n=e.indexOf(d,2);-1===n?(t=e.substring(2),e=d):(t=e.substring(2,n),e=e.substring(n)||d)}return new m("file",t,e,u,u)}static from(e){const t=new m(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}toString(e=!1){return R(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof p)return e;{const t=new m(e);return t._formatted=e.external,t._fsPath=e._sep===f?e.fsPath:null,t}}return e}}const f=s?1:void 0;class m extends p{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?R(this,!0):(this._formatted||(this._formatted=R(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function y(e,t,n){let r,i=-1;for(let s=0;s<e.length;s++){const o=e.charCodeAt(s);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=g[o];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function T(e){let t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=g[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function v(e,t){let n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,s&&(n=n.replace(/\//g,"\\")),n}function R(e,t){const n=t?T:y;let r="",{scheme:i,authority:s,path:o,query:a,fragment:c}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=d,r+=d),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),c&&(r+="#",r+=t?c:y(c,!1,!1)),r}function E(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+E(e.substr(3)):e}}const k=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function S(e){return e.match(k)?e.replace(k,e=>E(e)):e}var C=n(975);const x=C.posix||C,A="/";var b;!function(e){e.joinPath=function(e,...t){return e.with({path:x.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==A&&(n=A+n,r=!0);let i=x.resolve(n,...t);return r&&i[0]===A&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(0===e.path.length||e.path===A)return e;let t=x.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return x.basename(e.path)},e.extname=function(e){return x.extname(e.path)}}(b||(b={})),r=i})();const{URI:i,Utils:s}=r}}]); -
mindcat/trunk/build/mindmap/mindmap.asset.php
r3467811 r3489132 1 <?php return array('dependencies' => array('lodash'), 'version' => '3 f90aae77741b3d406a3');1 <?php return array('dependencies' => array('lodash'), 'version' => '38479ae9c74352ca3de9'); -
mindcat/trunk/build/mindmap/mindmap.js
r3467811 r3489132 1 (()=>{var t,e,r={9119(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},6750(t,e,r){"use strict";e.J=function(t){if(!t)return i.BLANK_URL;var e,r=a(t.trim());do{e=(r=a(r=n(r).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim())).match(i.ctrlCharactersRegex)||r.match(i.htmlEntitiesRegex)||r.match(i.htmlCtrlEntityRegex)||r.match(i.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var o=r;if(!o)return i.BLANK_URL;if(function(t){return i.relativeFirstCharacters.indexOf(t[0])>-1}(o))return o;var s=o.trimStart(),l=s.match(i.urlSchemeRegex);if(!l)return o;var h=l[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(h))return i.BLANK_URL;var c=s.replace(/\\/g,"/");if("mailto:"===h||h.includes("://"))return c;if("http:"===h||"https:"===h){if(!function(t){return URL.canParse(t)}(c))return i.BLANK_URL;var u=new URL(c);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return c};var i=r(9119);function n(t){return t.replace(i.ctrlCharactersRegex,"").replace(i.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function a(t){try{return decodeURIComponent(t)}catch(e){return t}}},4353(t){t.exports=function(){"use strict";var t=6e4,e=36e5,r="millisecond",i="second",n="minute",a="hour",o="day",s="week",l="month",h="quarter",c="year",u="date",d="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},y=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},m={s:y,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),n=r%60;return(e<=0?"+":"-")+y(i,2,"0")+":"+y(n,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var i=12*(r.year()-e.year())+(r.month()-e.month()),n=e.clone().add(i,l),a=r-n<0,o=e.clone().add(i+(a?-1:1),l);return+(-(i+(r-n)/(a?n-o:o-n))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:l,y:c,w:s,d:o,D:u,h:a,m:n,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},x="en",b={};b[x]=g;var k="$isDayjsObject", w=function(t){return t instanceof S||!(!t||!t[k])},C=function t(e,r,i){var n;if(!e)return x;if("string"==typeof e){var a=e.toLowerCase();b[a]&&(n=a),r&&(b[a]=r,n=a);var o=e.split("-");if(!n&&o.length>1)return t(o[0])}else{var s=e.name;b[s]=e,n=s}return!i&&n&&(x=n),n||!i&&x},_=function(t,e){if(w(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new S(r)},v=m;v.l=C,v.i=w,v.w=function(t,e){return _(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function g(t){this.$L=C(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var y=g.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(v.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(p);if(i){var n=i[2]-1||0,a=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return v},y.isValid=function(){return!(this.$d.toString()===d)},y.isSame=function(t,e){var r=_(t);return this.startOf(e)<=r&&r<=this.endOf(e)},y.isAfter=function(t,e){return _(t)<this.startOf(e)},y.isBefore=function(t,e){return this.endOf(e)<_(t)},y.$g=function(t,e,r){return v.u(t)?this[e]:this.set(r,t)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(t,e){var r=this,h=!!v.u(e)||e,d=v.p(t),p=function(t,e){var i=v.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return h?i:i.endOf(o)},f=function(t,e){return v.w(r.toDate()[t].apply(r.toDate("s"),(h?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},g=this.$W,y=this.$M,m=this.$D,x="set"+(this.$u?"UTC":"");switch(d){case c:return h?p(1,0):p(31,11);case l:return h?p(1,y):p(0,y+1);case s:var b=this.$locale().weekStart||0,k=(g<b?g+7:g)-b;return p(h?m-k:m+(6-k),y);case o:case u:return f(x+"Hours",0);case a:return f(x+"Minutes",1);case n:return f(x+"Seconds",2);case i:return f(x+"Milliseconds",3);default:return this.clone()}},y.endOf=function(t){return this.startOf(t,!1)},y.$set=function(t,e){var s,h=v.p(t),d="set"+(this.$u?"UTC":""),p=(s={},s[o]=d+"Date",s[u]=d+"Date",s[l]=d+"Month",s[c]=d+"FullYear",s[a]=d+"Hours",s[n]=d+"Minutes",s[i]=d+"Seconds",s[r]=d+"Milliseconds",s)[h],f=h===o?this.$D+(e-this.$W):e;if(h===l||h===c){var g=this.clone().set(u,1);g.$d[p](f),g.init(),this.$d=g.set(u,Math.min(this.$D,g.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},y.set=function(t,e){return this.clone().$set(t,e)},y.get=function(t){return this[v.p(t)]()},y.add=function(r,h){var u,d=this;r=Number(r);var p=v.p(h),f=function(t){var e=_(d);return v.w(e.date(e.date()+Math.round(t*r)),d)};if(p===l)return this.set(l,this.$M+r);if(p===c)return this.set(c,this.$y+r);if(p===o)return f(1);if(p===s)return f(7);var g=(u={},u[n]=t,u[a]=e,u[i]=1e3,u)[p]||1,y=this.$d.getTime()+r*g;return v.w(y,this)},y.subtract=function(t,e){return this.add(-1*t,e)},y.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var i=t||"YYYY-MM-DDTHH:mm:ssZ",n=v.z(this),a=this.$H,o=this.$m,s=this.$M,l=r.weekdays,h=r.months,c=r.meridiem,u=function(t,r,n,a){return t&&(t[r]||t(e,i))||n[r].slice(0,a)},p=function(t){return v.s(a%12||12,t,"0")},g=c||function(t,e,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(f,function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return v.s(e.$y,4,"0");case"M":return s+1;case"MM":return v.s(s+1,2,"0");case"MMM":return u(r.monthsShort,s,h,3);case"MMMM":return u(h,s);case"D":return e.$D;case"DD":return v.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return u(r.weekdaysMin,e.$W,l,2);case"ddd":return u(r.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(a);case"HH":return v.s(a,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return g(a,o,!0);case"A":return g(a,o,!1);case"m":return String(o);case"mm":return v.s(o,2,"0");case"s":return String(e.$s);case"ss":return v.s(e.$s,2,"0");case"SSS":return v.s(e.$ms,3,"0");case"Z":return n}return null}(t)||n.replace(":","")})},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,u,d){var p,f=this,g=v.p(u),y=_(r),m=(y.utcOffset()-this.utcOffset())*t,x=this-y,b=function(){return v.m(f,y)};switch(g){case c:p=b()/12;break;case l:p=b();break;case h:p=b()/3;break;case s:p=(x-m)/6048e5;break;case o:p=(x-m)/864e5;break;case a:p=x/e;break;case n:p=x/t;break;case i:p=x/1e3;break;default:p=x}return d?p:v.a(p)},y.daysInMonth=function(){return this.endOf(l).$D},y.$locale=function(){return b[this.$L]},y.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),i=C(t,e,!0);return i&&(r.$L=i),r},y.clone=function(){return v.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},g}(),T=S.prototype;return _.prototype=T,[["$ms",r],["$s",i],["$m",n],["$H",a],["$W",o],["$M",l],["$y",c],["$D",u]].forEach(function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),_.extend=function(t,e){return t.$i||(t(e,S,_),t.$i=!0),_},_.locale=C,_.isDayjs=w,_.unix=function(t){return _(1e3*t)},_.en=b[x],_.Ls=b,_.p={},_}()},5580(t,e,r){var i=r(6110)(r(9325),"DataView");t.exports=i},1549(t,e,r){var i=r(2032),n=r(3862),a=r(6721),o=r(2749),s=r(5749);function l(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=n,l.prototype.get=a,l.prototype.has=o,l.prototype.set=s,t.exports=l},79(t,e,r){var i=r(3702),n=r(80),a=r(4739),o=r(8655),s=r(1175);function l(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=n,l.prototype.get=a,l.prototype.has=o,l.prototype.set=s,t.exports=l},8223(t,e,r){var i=r(6110)(r(9325),"Map");t.exports=i},3661(t,e,r){var i=r(3040),n=r(7670),a=r(289),o=r(4509),s=r(2949);function l(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=n,l.prototype.get=a,l.prototype.has=o,l.prototype.set=s,t.exports=l},2804(t,e,r){var i=r(6110)(r(9325),"Promise");t.exports=i},6545(t,e,r){var i=r(6110)(r(9325),"Set");t.exports=i},7217(t,e,r){var i=r(79),n=r(1420),a=r(938),o=r(3605),s=r(9817),l=r(945);function h(t){var e=this.__data__=new i(t);this.size=e.size}h.prototype.clear=n,h.prototype.delete=a,h.prototype.get=o,h.prototype.has=s,h.prototype.set=l,t.exports=h},1873(t,e,r){var i=r(9325).Symbol;t.exports=i},7828(t,e,r){var i=r(9325).Uint8Array;t.exports=i},8303(t,e,r){var i=r(6110)(r(9325),"WeakMap");t.exports=i},1033(t){t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},695(t,e,r){var i=r(8096),n=r(2428),a=r(6449),o=r(3656),s=r(361),l=r(7167),h=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=a(t),c=!r&&n(t),u=!r&&!c&&o(t),d=!r&&!c&&!u&&l(t),p=r||c||u||d,f=p?i(t.length,String):[],g=f.length;for(var y in t)!e&&!h.call(t,y)||p&&("length"==y||u&&("offset"==y||"parent"==y)||d&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,g))||f.push(y);return f}},7805(t,e,r){var i=r(3360),n=r(5288);t.exports=function(t,e,r){(void 0!==r&&!n(t[e],r)||void 0===r&&!(e in t))&&i(t,e,r)}},6547(t,e,r){var i=r(3360),n=r(5288),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var o=t[e];a.call(t,e)&&n(o,r)&&(void 0!==r||e in t)||i(t,e,r)}},6025(t,e,r){var i=r(5288);t.exports=function(t,e){for(var r=t.length;r--;)if(i(t[r][0],e))return r;return-1}},3360(t,e,r){var i=r(3243);t.exports=function(t,e,r){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},9344(t,e,r){var i=r(3805),n=Object.create,a=function(){function t(){}return function(e){if(!i(e))return{};if(n)return n(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=a},6649(t,e,r){var i=r(3221)();t.exports=i},2552(t,e,r){var i=r(1873),n=r(659),a=r(9350),o=i?i.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?n(t):a(t)}},7534(t,e,r){var i=r(2552),n=r(346);t.exports=function(t){return n(t)&&"[object Arguments]"==i(t)}},5083(t,e,r){var i=r(1882),n=r(7296),a=r(3805),o=r(7473),s=/^\[object .+?Constructor\]$/,l=Function.prototype,h=Object.prototype,c=l.toString,u=h.hasOwnProperty,d=RegExp("^"+c.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||n(t))&&(i(t)?d:s).test(o(t))}},4901(t,e,r){var i=r(2552),n=r(294),a=r(346),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=function(t){return a(t)&&n(t.length)&&!!o[i(t)]}},8984(t,e,r){var i=r(5527),n=r(3650),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return n(t);var e=[];for(var r in Object(t))a.call(t,r)&&"constructor"!=r&&e.push(r);return e}},2903(t,e,r){var i=r(3805),n=r(5527),a=r(181),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return a(t);var e=n(t),r=[];for(var s in t)("constructor"!=s||!e&&o.call(t,s))&&r.push(s);return r}},5250(t,e,r){var i=r(7217),n=r(7805),a=r(6649),o=r(2824),s=r(3805),l=r(7241),h=r(4974);t.exports=function t(e,r,c,u,d){e!==r&&a(r,function(a,l){if(d||(d=new i),s(a))o(e,r,l,c,t,u,d);else{var p=u?u(h(e,l),a,l+"",e,r,d):void 0;void 0===p&&(p=a),n(e,l,p)}},l)}},2824(t,e,r){var i=r(7805),n=r(3290),a=r(1961),o=r(3007),s=r(5529),l=r(2428),h=r(6449),c=r(3693),u=r(3656),d=r(1882),p=r(3805),f=r(1331),g=r(7167),y=r(4974),m=r(9884);t.exports=function(t,e,r,x,b,k,w){var C=y(t,r),_=y(e,r),v=w.get(_);if(v)i(t,r,v);else{var S=k?k(C,_,r+"",t,e,w):void 0,T=void 0===S;if(T){var A=h(_),M=!A&&u(_),B=!A&&!M&&g(_);S=_,A||M||B?h(C)?S=C:c(C)?S=o(C):M?(T=!1,S=n(_,!0)):B?(T=!1,S=a(_,!0)):S=[]:f(_)||l(_)?(S=C,l(C)?S=m(C):p(C)&&!d(C)||(S=s(_))):T=!1}T&&(w.set(_,S),b(S,_,x,k,w),w.delete(_)),i(t,r,S)}}},9302(t,e,r){var i=r(3488),n=r(6757),a=r(2865);t.exports=function(t,e){return a(n(t,e,i),t+"")}},9570(t,e,r){var i=r(7334),n=r(3243),a=r(3488),o=n?function(t,e){return n(t,"toString",{configurable:!0,enumerable:!1,value:i(e),writable:!0})}:a;t.exports=o},8096(t){t.exports=function(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}},7301(t){t.exports=function(t){return function(e){return t(e)}}},9653(t,e,r){var i=r(7828);t.exports=function(t){var e=new t.constructor(t.byteLength);return new i(e).set(new i(t)),e}},3290(t,e,r){t=r.nmd(t);var i=r(9325),n=e&&!e.nodeType&&e,a=n&&t&&!t.nodeType&&t,o=a&&a.exports===n?i.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,i=s?s(r):new t.constructor(r);return t.copy(i),i}},1961(t,e,r){var i=r(9653);t.exports=function(t,e){var r=e?i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},3007(t){t.exports=function(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}},1791(t,e,r){var i=r(6547),n=r(3360);t.exports=function(t,e,r,a){var o=!r;r||(r={});for(var s=-1,l=e.length;++s<l;){var h=e[s],c=a?a(r[h],t[h],h,r,t):void 0;void 0===c&&(c=t[h]),o?n(r,h,c):i(r,h,c)}return r}},5481(t,e,r){var i=r(9325)["__core-js_shared__"];t.exports=i},999(t,e,r){var i=r(9302),n=r(6800);t.exports=function(t){return i(function(e,r){var i=-1,a=r.length,o=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&n(r[0],r[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++i<a;){var l=r[i];l&&t(e,l,i,o)}return e})}},3221(t){t.exports=function(t){return function(e,r,i){for(var n=-1,a=Object(e),o=i(e),s=o.length;s--;){var l=o[t?s:++n];if(!1===r(a[l],l,a))break}return e}}},3243(t,e,r){var i=r(6110),n=function(){try{var t=i(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=n},4840(t){var e="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis;t.exports=e},2651(t,e,r){var i=r(4218);t.exports=function(t,e){var r=t.__data__;return i(e)?r["string"==typeof e?"string":"hash"]:r.map}},6110(t,e,r){var i=r(5083),n=r(392);t.exports=function(t,e){var r=n(t,e);return i(r)?r:void 0}},8879(t,e,r){var i=r(4335)(Object.getPrototypeOf,Object);t.exports=i},659(t,e,r){var i=r(1873),n=Object.prototype,a=n.hasOwnProperty,o=n.toString,s=i?i.toStringTag:void 0;t.exports=function(t){var e=a.call(t,s),r=t[s];try{t[s]=void 0;var i=!0}catch(t){}var n=o.call(t);return i&&(e?t[s]=r:delete t[s]),n}},5861(t,e,r){var i=r(5580),n=r(8223),a=r(2804),o=r(6545),s=r(8303),l=r(2552),h=r(7473),c="[object Map]",u="[object Promise]",d="[object Set]",p="[object WeakMap]",f="[object DataView]",g=h(i),y=h(n),m=h(a),x=h(o),b=h(s),k=l;(i&&k(new i(new ArrayBuffer(1)))!=f||n&&k(new n)!=c||a&&k(a.resolve())!=u||o&&k(new o)!=d||s&&k(new s)!=p)&&(k=function(t){var e=l(t),r="[object Object]"==e?t.constructor:void 0,i=r?h(r):"";if(i)switch(i){case g:return f;case y:return c;case m:return u;case x:return d;case b:return p}return e}),t.exports=k},392(t){t.exports=function(t,e){return null==t?void 0:t[e]}},2032(t,e,r){var i=r(1042);t.exports=function(){this.__data__=i?i(null):{},this.size=0}},3862(t){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},6721(t,e,r){var i=r(1042),n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(i){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return n.call(e,t)?e[t]:void 0}},2749(t,e,r){var i=r(1042),n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return i?void 0!==e[t]:n.call(e,t)}},5749(t,e,r){var i=r(1042);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this}},5529(t,e,r){var i=r(9344),n=r(8879),a=r(5527);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:i(n(t))}},361(t){var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,r){var i=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&e.test(t))&&t>-1&&t%1==0&&t<r}},6800(t,e,r){var i=r(5288),n=r(4894),a=r(361),o=r(3805);t.exports=function(t,e,r){if(!o(r))return!1;var s=typeof e;return!!("number"==s?n(r)&&a(e,r.length):"string"==s&&e in r)&&i(r[e],t)}},4218(t){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},7296(t,e,r){var i,n=r(5481),a=(i=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";t.exports=function(t){return!!a&&a in t}},5527(t){var e=Object.prototype;t.exports=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||e)}},3702(t){t.exports=function(){this.__data__=[],this.size=0}},80(t,e,r){var i=r(6025),n=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=i(e,t);return!(r<0||(r==e.length-1?e.pop():n.call(e,r,1),--this.size,0))}},4739(t,e,r){var i=r(6025);t.exports=function(t){var e=this.__data__,r=i(e,t);return r<0?void 0:e[r][1]}},8655(t,e,r){var i=r(6025);t.exports=function(t){return i(this.__data__,t)>-1}},1175(t,e,r){var i=r(6025);t.exports=function(t,e){var r=this.__data__,n=i(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}},3040(t,e,r){var i=r(1549),n=r(79),a=r(8223);t.exports=function(){this.size=0,this.__data__={hash:new i,map:new(a||n),string:new i}}},7670(t,e,r){var i=r(2651);t.exports=function(t){var e=i(this,t).delete(t);return this.size-=e?1:0,e}},289(t,e,r){var i=r(2651);t.exports=function(t){return i(this,t).get(t)}},4509(t,e,r){var i=r(2651);t.exports=function(t){return i(this,t).has(t)}},2949(t,e,r){var i=r(2651);t.exports=function(t,e){var r=i(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}},1042(t,e,r){var i=r(6110)(Object,"create");t.exports=i},3650(t,e,r){var i=r(4335)(Object.keys,Object);t.exports=i},181(t){t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},6009(t,e,r){t=r.nmd(t);var i=r(4840),n=e&&!e.nodeType&&e,a=n&&t&&!t.nodeType&&t,o=a&&a.exports===n&&i.process,s=function(){try{return a&&a.require&&a.require("util").types||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=s},9350(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},4335(t){t.exports=function(t,e){return function(r){return t(e(r))}}},6757(t,e,r){var i=r(1033),n=Math.max;t.exports=function(t,e,r){return e=n(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,s=n(a.length-e,0),l=Array(s);++o<s;)l[o]=a[e+o];o=-1;for(var h=Array(e+1);++o<e;)h[o]=a[o];return h[e]=r(l),i(t,this,h)}}},9325(t,e,r){var i=r(4840),n="object"==typeof self&&self&&self.Object===Object&&self,a=i||n||Function("return this")();t.exports=a},4974(t){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},2865(t,e,r){var i=r(9570),n=r(1811)(i);t.exports=n},1811(t){var e=Date.now;t.exports=function(t){var r=0,i=0;return function(){var n=e(),a=16-(n-i);if(i=n,a>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}},1420(t,e,r){var i=r(79);t.exports=function(){this.__data__=new i,this.size=0}},938(t){t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},3605(t){t.exports=function(t){return this.__data__.get(t)}},9817(t){t.exports=function(t){return this.__data__.has(t)}},945(t,e,r){var i=r(79),n=r(8223),a=r(3661);t.exports=function(t,e){var r=this.__data__;if(r instanceof i){var o=r.__data__;if(!n||o.length<199)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new a(o)}return r.set(t,e),this.size=r.size,this}},7473(t){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},7334(t){t.exports=function(t){return function(){return t}}},5288(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},3488(t){t.exports=function(t){return t}},2428(t,e,r){var i=r(7534),n=r(346),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(t){return n(t)&&o.call(t,"callee")&&!s.call(t,"callee")};t.exports=l},6449(t){var e=Array.isArray;t.exports=e},4894(t,e,r){var i=r(1882),n=r(294);t.exports=function(t){return null!=t&&n(t.length)&&!i(t)}},3693(t,e,r){var i=r(4894),n=r(346);t.exports=function(t){return n(t)&&i(t)}},3656(t,e,r){t=r.nmd(t);var i=r(9325),n=r(9935),a=e&&!e.nodeType&&e,o=a&&t&&!t.nodeType&&t,s=o&&o.exports===a?i.Buffer:void 0,l=(s?s.isBuffer:void 0)||n;t.exports=l},2193(t,e,r){var i=r(8984),n=r(5861),a=r(2428),o=r(6449),s=r(4894),l=r(3656),h=r(5527),c=r(7167),u=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(o(t)||"string"==typeof t||"function"==typeof t.splice||l(t)||c(t)||a(t)))return!t.length;var e=n(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(h(t))return!i(t).length;for(var r in t)if(u.call(t,r))return!1;return!0}},1882(t,e,r){var i=r(2552),n=r(3805);t.exports=function(t){if(!n(t))return!1;var e=i(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},294(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3805(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},346(t){t.exports=function(t){return null!=t&&"object"==typeof t}},1331(t,e,r){var i=r(2552),n=r(8879),a=r(346),o=Function.prototype,s=Object.prototype,l=o.toString,h=s.hasOwnProperty,c=l.call(Object);t.exports=function(t){if(!a(t)||"[object Object]"!=i(t))return!1;var e=n(t);if(null===e)return!0;var r=h.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&l.call(r)==c}},7167(t,e,r){var i=r(4901),n=r(7301),a=r(6009),o=a&&a.isTypedArray,s=o?n(o):i;t.exports=s},7241(t,e,r){var i=r(695),n=r(2903),a=r(4894);t.exports=function(t){return a(t)?i(t,!0):n(t)}},104(t,e,r){var i=r(3661);function n(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var o=t.apply(this,i);return r.cache=a.set(n,o)||a,o};return r.cache=new(n.Cache||i),r}n.Cache=i,t.exports=n},5364(t,e,r){var i=r(5250),n=r(999)(function(t,e,r){i(t,e,r)});t.exports=n},9935(t){t.exports=function(){return!1}},9884(t,e,r){var i=r(1791),n=r(7241);t.exports=function(t){return i(t,n(t))}},2274(t,e,r){"use strict";function i(t,e,r){if(t&&t.length){const[i,n]=e,a=Math.PI/180*r,o=Math.cos(a),s=Math.sin(a);for(const e of t){const[t,r]=e;e[0]=(t-i)*o-(r-n)*s+i,e[1]=(t-i)*s+(r-n)*o+n}}}function n(t,e){return t[0]===e[0]&&t[1]===e[1]}function a(t,e,r,a=1){const o=r,s=Math.max(e,.1),l=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,h=[0,0];if(o)for(const t of l)i(t,h,o);const c=function(t,e,r){const i=[];for(const e of t){const t=[...e];n(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const a=[];e=Math.max(e,.1);const o=[];for(const t of i)for(let e=0;e<t.length-1;e++){const r=t[e],i=t[e+1];if(r[1]!==i[1]){const t=Math.min(r[1],i[1]);o.push({ymin:t,ymax:Math.max(r[1],i[1]),x:t===r[1]?r[0]:i[0],islope:(i[0]-r[0])/(i[1]-r[1])})}}if(o.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!o.length)return a;let s=[],l=o[0].ymin,h=0;for(;s.length||o.length;){if(o.length){let t=-1;for(let e=0;e<o.length&&!(o[e].ymin>l);e++)t=e;o.splice(0,t+1).forEach(t=>{s.push({s:l,edge:t})})}if(s=s.filter(t=>!(t.edge.ymax<=l)),s.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==r||h%e==0)&&s.length>1)for(let t=0;t<s.length;t+=2){const e=t+1;if(e>=s.length)break;const r=s[t].edge,i=s[e].edge;a.push([[Math.round(r.x),l],[Math.round(i.x),l]])}l+=r,s.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),h++}return a}(l,s,a);if(o){for(const t of l)i(t,h,-o);!function(t,e,r){const n=[];t.forEach(t=>n.push(...t)),i(n,e,r)}(c,h,-o)}return c}function o(t,e){var r;const i=e.hachureAngle+90;let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1));let o=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(o=n),a(t,n,i,o||1)}r.d(e,{A:()=>nt});class s{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=o(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function l(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class h extends s{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=o(t,Object.assign({},e,{hachureGap:r})),n=Math.PI/180*e.hachureAngle,a=[],s=.5*r*Math.cos(n),h=.5*r*Math.sin(n);for(const[t,e]of i)l([t,e])&&a.push([[t[0]-s,t[1]+h],[...e]],[[t[0]+s,t[1]-h],[...e]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class c extends s{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),n=this._fillPolygons(t,i);return r.ops=r.ops.concat(n.ops),r}}class u{constructor(t){this.helper=t}fillPolygons(t,e){const r=o(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let n=e.fillWeight;n<0&&(n=e.strokeWidth/2);const a=i/4;for(const o of t){const t=l(o),s=t/i,h=Math.ceil(s)-1,c=t-h*i,u=(o[0][0]+o[1][0])/2-i/4,d=Math.min(o[0][1],o[1][1]);for(let t=0;t<h;t++){const o=d+c+t*i,s=u-a+2*Math.random()*a,l=o-a+2*Math.random()*a,h=this.helper.ellipse(s,l,n,n,e);r.push(...h.ops)}}return{type:"fillSketch",ops:r}}}class d{constructor(t){this.helper=t}fillPolygons(t,e){const r=o(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){const r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,i=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,n=[];return t.forEach(t=>{const a=l(t),o=Math.floor(a/(r+i)),s=(a+i-o*(r+i))/2;let h=t[0],c=t[1];h[0]>c[0]&&(h=t[1],c=t[0]);const u=Math.atan((c[1]-h[1])/(c[0]-h[0]));for(let t=0;t<o;t++){const a=t*(r+i),o=a+r,l=[h[0]+a*Math.cos(u)+s*Math.cos(u),h[1]+a*Math.sin(u)+s*Math.sin(u)],c=[h[0]+o*Math.cos(u)+s*Math.cos(u),h[1]+o*Math.sin(u)+s*Math.sin(u)];n.push(...this.helper.doubleLineOps(l[0],l[1],c[0],c[1],e))}}),n}}class p{constructor(t){this.helper=t}fillPolygons(t,e){const r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset,n=o(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(n,i,e)}}zigzagLines(t,e,r){const i=[];return t.forEach(t=>{const n=l(t),a=Math.round(n/(2*e));let o=t[0],s=t[1];o[0]>s[0]&&(o=t[1],s=t[0]);const h=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let t=0;t<a;t++){const n=2*t*e,a=2*(t+1)*e,s=Math.sqrt(2*Math.pow(e,2)),l=[o[0]+n*Math.cos(h),o[1]+n*Math.sin(h)],c=[o[0]+a*Math.cos(h),o[1]+a*Math.sin(h)],u=[l[0]+s*Math.cos(h+Math.PI/4),l[1]+s*Math.sin(h+Math.PI/4)];i.push(...this.helper.doubleLineOps(l[0],l[1],u[0],u[1],r),...this.helper.doubleLineOps(u[0],u[1],c[0],c[1],r))}}),i}}const f={};class g{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const y={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function m(t,e){return t.type===e}function x(t){const e=[],r=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let i="BOD",n=0,a=r[n];for(;!m(a,2);){let o=0;const s=[];if("BOD"===i){if("M"!==a.text&&"m"!==a.text)return x("M0,0"+t);n++,o=y[a.text],i=a.text}else m(a,1)?o=y[i]:(n++,o=y[a.text],i=a.text);if(!(n+o<r.length))throw new Error("Path data ended short");for(let t=n;t<n+o;t++){const e=r[t];if(!m(e,1))throw new Error("Param not a number: "+i+","+e.text);s[s.length]=+e.text}if("number"!=typeof y[i])throw new Error("Bad segment: "+i);{const t={key:i,data:s};e.push(t),n+=o,a=r[n],"M"===i&&(i="L"),"m"===i&&(i="l")}}return e}function b(t){let e=0,r=0,i=0,n=0;const a=[];for(const{key:o,data:s}of t)switch(o){case"M":a.push({key:"M",data:[...s]}),[e,r]=s,[i,n]=s;break;case"m":e+=s[0],r+=s[1],a.push({key:"M",data:[e,r]}),i=e,n=r;break;case"L":a.push({key:"L",data:[...s]}),[e,r]=s;break;case"l":e+=s[0],r+=s[1],a.push({key:"L",data:[e,r]});break;case"C":a.push({key:"C",data:[...s]}),e=s[4],r=s[5];break;case"c":{const t=s.map((t,i)=>i%2?t+r:t+e);a.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":a.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.map((t,i)=>i%2?t+r:t+e);a.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":a.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":a.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.map((t,i)=>i%2?t+r:t+e);a.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":a.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=i,r=n}return a}function k(t){const e=[];let r="",i=0,n=0,a=0,o=0,s=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,n]=c,[a,o]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],n=c[5],s=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,n]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,n]});break;case"V":n=c[0],e.push({key:"L",data:[i,n]});break;case"S":{let t=0,a=0;"C"===r||"S"===r?(t=i+(i-s),a=n+(n-l)):(t=i,a=n),e.push({key:"C",data:[t,a,...c]}),s=c[0],l=c[1],i=c[2],n=c[3];break}case"T":{const[t,a]=c;let o=0,h=0;"Q"===r||"T"===r?(o=i+(i-s),h=n+(n-l)):(o=i,h=n);const u=i+2*(o-i)/3,d=n+2*(h-n)/3,p=t+2*(o-t)/3,f=a+2*(h-a)/3;e.push({key:"C",data:[u,d,p,f,t,a]}),s=o,l=h,i=t,n=a;break}case"Q":{const[t,r,a,o]=c,h=i+2*(t-i)/3,u=n+2*(r-n)/3,d=a+2*(t-a)/3,p=o+2*(r-o)/3;e.push({key:"C",data:[h,u,d,p,a,o]}),s=t,l=r,i=a,n=o;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),a=c[2],o=c[3],s=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,n,l,h,l,h]}),i=l,n=h):i===l&&n===h||(C(i,n,l,h,t,r,a,o,s).forEach(function(t){e.push({key:"C",data:t})}),i=l,n=h);break}case"Z":e.push({key:"Z",data:[]}),i=a,n=o}r=h}return e}function w(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function C(t,e,r,i,n,a,o,s,l,h){const c=(u=o,Math.PI*u/180);var u;let d=[],p=0,f=0,g=0,y=0;if(h)[p,f,g,y]=h;else{[t,e]=w(t,e,-c),[r,i]=w(r,i,-c);const o=(t-r)/2,h=(e-i)/2;let u=o*o/(n*n)+h*h/(a*a);u>1&&(u=Math.sqrt(u),n*=u,a*=u);const d=n*n,m=a*a,x=d*m-d*h*h-m*o*o,b=d*h*h+m*o*o,k=(s===l?-1:1)*Math.sqrt(Math.abs(x/b));g=k*n*h/a+(t+r)/2,y=k*-a*o/n+(e+i)/2,p=Math.asin(parseFloat(((e-y)/a).toFixed(9))),f=Math.asin(parseFloat(((i-y)/a).toFixed(9))),t<g&&(p=Math.PI-p),r<g&&(f=Math.PI-f),p<0&&(p=2*Math.PI+p),f<0&&(f=2*Math.PI+f),l&&p>f&&(p-=2*Math.PI),!l&&f>p&&(f-=2*Math.PI)}let m=f-p;if(Math.abs(m)>120*Math.PI/180){const t=f,e=r,s=i;f=l&&f>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=C(r=g+n*Math.cos(f),i=y+a*Math.sin(f),e,s,n,a,o,0,l,[f,t,g,y])}m=f-p;const x=Math.cos(p),b=Math.sin(p),k=Math.cos(f),_=Math.sin(f),v=Math.tan(m/4),S=4/3*n*v,T=4/3*a*v,A=[t,e],M=[t+S*b,e-T*x],B=[r+S*_,i-T*k],L=[r,i];if(M[0]=2*A[0]-M[0],M[1]=2*A[1]-M[1],h)return[M,B,L].concat(d);{d=[M,B,L].concat(d);const t=[];for(let e=0;e<d.length;e+=3){const r=w(d[e][0],d[e][1],c),i=w(d[e+1][0],d[e+1][1],c),n=w(d[e+2][0],d[e+2][1],c);t.push([r[0],r[1],i[0],i[1],n[0],n[1]])}return t}}const _={randOffset:function(t,e){return R(t,e)},randOffsetWithRange:function(t,e,r){return O(t,e,r)},ellipse:function(t,e,r,i,n){return M(t,e,n,A(r,i,n)).opset},doubleLineOps:function(t,e,r,i,n){return K(t,e,r,i,n,!0)}};function v(t,e,r,i,n){return{type:"path",ops:K(t,e,r,i,n)}}function S(t,e,r){const i=(t||[]).length;if(i>2){const n=[];for(let e=0;e<i-1;e++)n.push(...K(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&n.push(...K(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:n}}return 2===i?v(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function T(t,e){if(t.length){const r="number"==typeof t[0][0]?[t]:t,i=N(r[0],1*(1+.2*e.roughness),e),n=e.disableMultiStroke?[]:N(r[0],1.5*(1+.22*e.roughness),E(e));for(let t=1;t<r.length;t++){const a=r[t];if(a.length){const t=N(a,1*(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:N(a,1.5*(1+.22*e.roughness),E(e));for(const e of t)"move"!==e.op&&i.push(e);for(const t of r)"move"!==t.op&&n.push(t)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function A(t,e,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/n;let o=Math.abs(t/2),s=Math.abs(e/2);const l=1-r.curveFitting;return o+=R(o*l,r),s+=R(s*l,r),{increment:a,rx:o,ry:s}}function M(t,e,r,i){const[n,a]=z(i.increment,t,e,i.rx,i.ry,1,i.increment*O(.1,O(.4,1,r),r),r);let o=P(n,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[n]=z(i.increment,t,e,i.rx,i.ry,1.5,0,r),a=P(n,null,r);o=o.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function B(t,e,r,i,n,a,o,s,l){const h=t,c=e;let u=Math.abs(r/2),d=Math.abs(i/2);u+=R(.01*u,l),d+=R(.01*d,l);let p=n,f=a;for(;p<0;)p+=2*Math.PI,f+=2*Math.PI;f-p>2*Math.PI&&(p=0,f=2*Math.PI);const g=2*Math.PI/l.curveStepCount,y=Math.min(g/2,(f-p)/2),m=q(y,h,c,u,d,p,f,1,l);if(!l.disableMultiStroke){const t=q(y,h,c,u,d,p,f,1.5,l);m.push(...t)}return o&&(s?m.push(...K(h,c,h+u*Math.cos(p),c+d*Math.sin(p),l),...K(h,c,h+u*Math.cos(f),c+d*Math.sin(f),l)):m.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+u*Math.cos(p),c+d*Math.sin(p)]})),{type:"path",ops:m}}function L(t,e){const r=k(b(x(t))),i=[];let n=[0,0],a=[0,0];for(const{key:t,data:o}of r)switch(t){case"M":a=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...K(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":{const[t,r,n,s,l,h]=o;i.push(...j(t,r,n,s,l,h,a,e)),a=[l,h];break}case"Z":i.push(...K(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]]}return{type:"path",ops:i}}function F(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,n=i.length;if(n>2){r.push({op:"move",data:[i[0][0]+R(t,e),i[0][1]+R(t,e)]});for(let a=1;a<n;a++)r.push({op:"lineTo",data:[i[a][0]+R(t,e),i[a][1]+R(t,e)]})}}return{type:"fillPath",ops:r}}function $(t,e){return function(t,e){let r=t.fillStyle||"hachure";if(!f[r])switch(r){case"zigzag":f[r]||(f[r]=new h(e));break;case"cross-hatch":f[r]||(f[r]=new c(e));break;case"dots":f[r]||(f[r]=new u(e));break;case"dashed":f[r]||(f[r]=new d(e));break;case"zigzag-line":f[r]||(f[r]=new p(e));break;default:r="hachure",f[r]||(f[r]=new s(e))}return f[r]}(e,_).fillPolygons(t,e)}function E(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function D(t){return t.randomizer||(t.randomizer=new g(t.seed||0)),t.randomizer.next()}function O(t,e,r,i=1){return r.roughness*i*(D(r)*(e-t)+t)}function R(t,e,r=1){return O(-t,t,e,r)}function K(t,e,r,i,n,a=!1){const o=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=I(t,e,r,i,n,!0,!1);if(o)return s;const l=I(t,e,r,i,n,!0,!0);return s.concat(l)}function I(t,e,r,i,n,a,o){const s=Math.pow(t-r,2)+Math.pow(e-i,2),l=Math.sqrt(s);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=n.maxRandomnessOffset||0;c*c*100>s&&(c=l/10);const u=c/2,d=.2+.2*D(n);let p=n.bowing*n.maxRandomnessOffset*(i-e)/200,f=n.bowing*n.maxRandomnessOffset*(t-r)/200;p=R(p,n,h),f=R(f,n,h);const g=[],y=()=>R(u,n,h),m=()=>R(c,n,h),x=n.preserveVertices;return a&&(o?g.push({op:"move",data:[t+(x?0:y()),e+(x?0:y())]}):g.push({op:"move",data:[t+(x?0:R(c,n,h)),e+(x?0:R(c,n,h))]})),o?g.push({op:"bcurveTo",data:[p+t+(r-t)*d+y(),f+e+(i-e)*d+y(),p+t+2*(r-t)*d+y(),f+e+2*(i-e)*d+y(),r+(x?0:y()),i+(x?0:y())]}):g.push({op:"bcurveTo",data:[p+t+(r-t)*d+m(),f+e+(i-e)*d+m(),p+t+2*(r-t)*d+m(),f+e+2*(i-e)*d+m(),r+(x?0:m()),i+(x?0:m())]}),g}function N(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+R(e,r),t[0][1]+R(e,r)]),i.push([t[0][0]+R(e,r),t[0][1]+R(e,r)]);for(let n=1;n<t.length;n++)i.push([t[n][0]+R(e,r),t[n][1]+R(e,r)]),n===t.length-1&&i.push([t[n][0]+R(e,r),t[n][1]+R(e,r)]);return P(i,null,r)}function P(t,e,r){const i=t.length,n=[];if(i>3){const a=[],o=1-r.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<i;e++){const r=t[e];a[0]=[r[0],r[1]],a[1]=[r[0]+(o*t[e+1][0]-o*t[e-1][0])/6,r[1]+(o*t[e+1][1]-o*t[e-1][1])/6],a[2]=[t[e+1][0]+(o*t[e][0]-o*t[e+2][0])/6,t[e+1][1]+(o*t[e][1]-o*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){const t=r.maxRandomnessOffset;n.push({op:"lineTo",data:[e[0]+R(t,r),e[1]+R(t,r)]})}}else 3===i?(n.push({op:"move",data:[t[1][0],t[1][1]]}),n.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&n.push(...I(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return n}function z(t,e,r,i,n,a,o,s){const l=[],h=[];if(0===s.roughness){t/=4,h.push([e+i*Math.cos(-t),r+n*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){const t=[e+i*Math.cos(a),r+n*Math.sin(a)];l.push(t),h.push(t)}h.push([e+i*Math.cos(0),r+n*Math.sin(0)]),h.push([e+i*Math.cos(t),r+n*Math.sin(t)])}else{const c=R(.5,s)-Math.PI/2;h.push([R(a,s)+e+.9*i*Math.cos(c-t),R(a,s)+r+.9*n*Math.sin(c-t)]);const u=2*Math.PI+c-.01;for(let o=c;o<u;o+=t){const t=[R(a,s)+e+i*Math.cos(o),R(a,s)+r+n*Math.sin(o)];l.push(t),h.push(t)}h.push([R(a,s)+e+i*Math.cos(c+2*Math.PI+.5*o),R(a,s)+r+n*Math.sin(c+2*Math.PI+.5*o)]),h.push([R(a,s)+e+.98*i*Math.cos(c+o),R(a,s)+r+.98*n*Math.sin(c+o)]),h.push([R(a,s)+e+.9*i*Math.cos(c+.5*o),R(a,s)+r+.9*n*Math.sin(c+.5*o)])}return[h,l]}function q(t,e,r,i,n,a,o,s,l){const h=a+R(.1,l),c=[];c.push([R(s,l)+e+.9*i*Math.cos(h-t),R(s,l)+r+.9*n*Math.sin(h-t)]);for(let a=h;a<=o;a+=t)c.push([R(s,l)+e+i*Math.cos(a),R(s,l)+r+n*Math.sin(a)]);return c.push([e+i*Math.cos(o),r+n*Math.sin(o)]),c.push([e+i*Math.cos(o),r+n*Math.sin(o)]),P(c,null,l)}function j(t,e,r,i,n,a,o,s){const l=[],h=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let c=[0,0];const u=s.disableMultiStroke?1:2,d=s.preserveVertices;for(let p=0;p<u;p++)0===p?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(d?0:R(h[0],s)),o[1]+(d?0:R(h[0],s))]}),c=d?[n,a]:[n+R(h[p],s),a+R(h[p],s)],l.push({op:"bcurveTo",data:[t+R(h[p],s),e+R(h[p],s),r+R(h[p],s),i+R(h[p],s),c[0],c[1]]});return l}function W(t){return[...t]}function H(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(3===r)i.push(W(t[0]),W(t[1]),W(t[2]),W(t[2]));else{const r=[];r.push(t[0],t[0]);for(let e=1;e<t.length;e++)r.push(t[e]),e===t.length-1&&r.push(t[e]);const n=[],a=1-e;i.push(W(r[0]));for(let t=1;t+2<r.length;t++){const e=r[t];n[0]=[e[0],e[1]],n[1]=[e[0]+(a*r[t+1][0]-a*r[t-1][0])/6,e[1]+(a*r[t+1][1]-a*r[t-1][1])/6],n[2]=[r[t+1][0]+(a*r[t][0]-a*r[t+2][0])/6,r[t+1][1]+(a*r[t][1]-a*r[t+2][1])/6],n[3]=[r[t+1][0],r[t+1][1]],i.push(n[1],n[2],n[3])}}return i}function U(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function Y(t,e,r){const i=U(e,r);if(0===i)return U(t,e);let n=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return n=Math.max(0,Math.min(1,n)),U(t,G(e,r,n))}function G(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function X(t,e,r,i){const n=i||[];if(function(t,e){const r=t[e+0],i=t[e+1],n=t[e+2],a=t[e+3];let o=3*i[0]-2*r[0]-a[0];o*=o;let s=3*i[1]-2*r[1]-a[1];s*=s;let l=3*n[0]-2*a[0]-r[0];l*=l;let h=3*n[1]-2*a[1]-r[1];return h*=h,o<l&&(o=l),s<h&&(s=h),o+s}(t,e)<r){const r=t[e+0];n.length?(a=n[n.length-1],o=r,Math.sqrt(U(a,o))>1&&n.push(r)):n.push(r),n.push(t[e+3])}else{const i=.5,a=t[e+0],o=t[e+1],s=t[e+2],l=t[e+3],h=G(a,o,i),c=G(o,s,i),u=G(s,l,i),d=G(h,c,i),p=G(c,u,i),f=G(d,p,i);X([a,h,d,f],0,r,n),X([f,p,u,l],0,r,n)}var a,o;return n}function V(t,e){return Z(t,0,t.length,e)}function Z(t,e,r,i,n){const a=n||[],o=t[e],s=t[r-1];let l=0,h=1;for(let i=e+1;i<r-1;++i){const e=Y(t[i],o,s);e>l&&(l=e,h=i)}return Math.sqrt(l)>i?(Z(t,e,h+1,i,a),Z(t,h,r,i,a)):(a.length||a.push(o),a.push(s)),a}function Q(t,e=.15,r){const i=[],n=(t.length-1)/3;for(let r=0;r<n;r++)X(t,3*r,e,i);return r&&r>0?Z(i,0,i.length,r):i}const J="none";class tt{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,n){const a=this._o(n);return this._d("line",[v(t,e,r,i,a)],a)}rectangle(t,e,r,i,n){const a=this._o(n),o=[],s=function(t,e,r,i,n){return function(t,e){return S(t,!0,e)}([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],n)}(t,e,r,i,a);if(a.fill){const n=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===a.fillStyle?o.push(F([n],a)):o.push($([n],a))}return a.stroke!==J&&o.push(s),this._d("rectangle",o,a)}ellipse(t,e,r,i,n){const a=this._o(n),o=[],s=A(r,i,a),l=M(t,e,a,s);if(a.fill)if("solid"===a.fillStyle){const r=M(t,e,a,s).opset;r.type="fillPath",o.push(r)}else o.push($([l.estimatedPoints],a));return a.stroke!==J&&o.push(l.opset),this._d("ellipse",o,a)}circle(t,e,r,i){const n=this.ellipse(t,e,r,r,i);return n.shape="circle",n}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[S(t,!1,r)],r)}arc(t,e,r,i,n,a,o=!1,s){const l=this._o(s),h=[],c=B(t,e,r,i,n,a,o,!0,l);if(o&&l.fill)if("solid"===l.fillStyle){const o=Object.assign({},l);o.disableMultiStroke=!0;const s=B(t,e,r,i,n,a,!0,!1,o);s.type="fillPath",h.push(s)}else h.push(function(t,e,r,i,n,a,o){const s=t,l=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=R(.01*h,o),c+=R(.01*c,o);let u=n,d=a;for(;u<0;)u+=2*Math.PI,d+=2*Math.PI;d-u>2*Math.PI&&(u=0,d=2*Math.PI);const p=(d-u)/o.curveStepCount,f=[];for(let t=u;t<=d;t+=p)f.push([s+h*Math.cos(t),l+c*Math.sin(t)]);return f.push([s+h*Math.cos(d),l+c*Math.sin(d)]),f.push([s,l]),$([f],o)}(t,e,r,i,n,a,l));return l.stroke!==J&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],n=T(t,r);if(r.fill&&r.fill!==J)if("solid"===r.fillStyle){const e=T(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],n=t;if(n.length){const t="number"==typeof n[0][0]?[n]:n;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...Q(H([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...Q(H(i),10,(1+r.roughness)/2))}e.length&&i.push($([e],r))}return r.stroke!==J&&i.push(n),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],n=S(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(F([t],r)):i.push($([t],r))),r.stroke!==J&&i.push(n),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const n=r.fill&&"transparent"!==r.fill&&r.fill!==J,a=r.stroke!==J,o=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const i=k(b(x(t))),n=[];let a=[],o=[0,0],s=[];const l=()=>{s.length>=4&&a.push(...Q(s,1)),s=[]},h=()=>{l(),a.length&&(n.push(a),a=[])};for(const{key:t,data:e}of i)switch(t){case"M":h(),o=[e[0],e[1]],a.push(o);break;case"L":l(),a.push([e[0],e[1]]);break;case"C":if(!s.length){const t=a.length?a[a.length-1]:o;s.push([t[0],t[1]])}s.push([e[0],e[1]]),s.push([e[2],e[3]]),s.push([e[4],e[5]]);break;case"Z":l(),a.push([o[0],o[1]])}if(h(),!r)return n;const c=[];for(const t of n){const e=V(t,r);e.length&&c.push(e)}return c}(t,0,o?4-4*(r.simplification||1):(1+r.roughness)/2),l=L(t,r);if(n)if("solid"===r.fillStyle)if(1===s.length){const e=L(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(F(s,r));else i.push($(s,r));return a&&(o?s.forEach(t=>{i.push(S(t,!1,r))}):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:J};break;case"fillPath":e={d:this.opsToPath(t),stroke:J,strokeWidth:0,fill:r.fill||J};break;case"fillSketch":e=this.fillSketch(t,r)}e&&i.push(e)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||J,strokeWidth:r,fill:J}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class et{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,n=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":i.save(),i.strokeStyle="none"===r.stroke?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,a,n),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,a,n,e),i.restore();break}case"fillSketch":this.fillSketch(i,a,r)}}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,i="nonzero"){t.beginPath();for(const i of e.ops){const e="number"==typeof r&&r>=0?i.data.map(t=>+t.toFixed(r)):i.data;switch(i.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,i,n){const a=this.gen.line(t,e,r,i,n);return this.draw(a),a}rectangle(t,e,r,i,n){const a=this.gen.rectangle(t,e,r,i,n);return this.draw(a),a}ellipse(t,e,r,i,n){const a=this.gen.ellipse(t,e,r,i,n);return this.draw(a),a}circle(t,e,r,i){const n=this.gen.circle(t,e,r,i);return this.draw(n),n}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,i,n,a,o=!1,s){const l=this.gen.arc(t,e,r,i,n,a,o,s);return this.draw(l),l}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}}const rt="http://www.w3.org/2000/svg";class it{constructor(t,e){this.svg=t,this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,n=i.createElementNS(rt,"g"),a=t.options.fixedDecimalPlaceDigits;for(const o of e){let e=null;switch(o.type){case"path":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(o,a)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(o,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,o,r)}e&&n.appendChild(e)}return n}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const n=t.createElementNS(rt,"path");return n.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),n.setAttribute("stroke",r.fill||""),n.setAttribute("stroke-width",i+""),n.setAttribute("fill","none"),r.fillLineDash&&n.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&n.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),n}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,n){const a=this.gen.line(t,e,r,i,n);return this.draw(a)}rectangle(t,e,r,i,n){const a=this.gen.rectangle(t,e,r,i,n);return this.draw(a)}ellipse(t,e,r,i,n){const a=this.gen.ellipse(t,e,r,i,n);return this.draw(a)}circle(t,e,r,i){const n=this.gen.circle(t,e,r,i);return this.draw(n)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,n,a,o=!1,s){const l=this.gen.arc(t,e,r,i,n,a,o,s);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var nt={canvas:(t,e)=>new et(t,e),svg:(t,e)=>new it(t,e),generator:t=>new tt(t),newSeed:()=>tt.newSeed()}},513(t,e,r){"use strict";function i(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from("string"==typeof t?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(t,e){var r=e.match(/\n([\t ]+|(?!\s).)/g);return r?t.concat(r.map(function(t){var e,r;return null!==(r=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==r?r:0})):t},[]);if(n.length){var a=new RegExp("\n[\t ]{"+Math.min.apply(Math,n)+"}","g");i=i.map(function(t){return t.replace(a,"\n")})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return e.forEach(function(t,e){var r=o.match(/(?:^|\n)( *)$/),n=r?r[1]:"",a=t;"string"==typeof t&&t.includes("\n")&&(a=String(t).split("\n").map(function(t,e){return 0===e?t:""+n+t}).join("\n")),o+=a+i[e+1]}),o}r.d(e,{T:()=>i})},6087(t){"use strict";t.exports=window.lodash},1444(t,e,r){"use strict";function i(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r<e||void 0===r&&e>=e)&&(r=e);else{let i=-1;for(let n of t)null!=(n=e(n,++i,t))&&(r<n||void 0===r&&n>=n)&&(r=n)}return r}function n(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r>e||void 0===r&&e>=e)&&(r=e);else{let i=-1;for(let n of t)null!=(n=e(n,++i,t))&&(r>n||void 0===r&&n>=n)&&(r=n)}return r}function a(t){return t}r.d(e,{JLW:()=>Vo,l78:()=>f,tlR:()=>p,qrM:()=>hs,Yu4:()=>us,IA3:()=>ps,Wi0:()=>gs,PGM:()=>ys,OEq:()=>xs,y8u:()=>ws,olC:()=>_s,IrU:()=>Ss,oDi:()=>Ms,Q7f:()=>Ls,cVp:()=>$s,lUB:()=>Jo,Lx9:()=>Ds,nVG:()=>qs,uxU:()=>js,Xf2:()=>Us,GZz:()=>Gs,UPb:()=>Vs,dyv:()=>Xs,GPZ:()=>Nr,Sk5:()=>Wr,bEH:()=>wi,n8j:()=>rs,T9B:()=>i,jkA:()=>n,rLf:()=>as,WH:()=>Mi,m4Y:()=>nn,UMr:()=>Ai,w7C:()=>wo,zt:()=>Co,Ltv:()=>_o,UAC:()=>kn,DCK:()=>Jn,TUC:()=>Ln,Agd:()=>xn,t6C:()=>fn,wXd:()=>yn,ABi:()=>Tn,Ui6:()=>Pn,rGn:()=>Fn,ucG:()=>gn,YPH:()=>Sn,Mol:()=>Bn,PGu:()=>An,GuW:()=>Mn,hkb:()=>ri});var o=1e-6;function s(t){return"translate("+t+",0)"}function l(t){return"translate(0,"+t+")"}function h(t){return e=>+t(e)}function c(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function u(){return!this.__axis}function d(t,e){var r=[],i=null,n=null,d=6,p=6,f=3,g="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,y=1===t||4===t?-1:1,m=4===t||2===t?"x":"y",x=1===t||3===t?s:l;function b(s){var l=null==i?e.ticks?e.ticks.apply(e,r):e.domain():i,b=null==n?e.tickFormat?e.tickFormat.apply(e,r):a:n,k=Math.max(d,0)+f,w=e.range(),C=+w[0]+g,_=+w[w.length-1]+g,v=(e.bandwidth?c:h)(e.copy(),g),S=s.selection?s.selection():s,T=S.selectAll(".domain").data([null]),A=S.selectAll(".tick").data(l,e).order(),M=A.exit(),B=A.enter().append("g").attr("class","tick"),L=A.select("line"),F=A.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge(B),L=L.merge(B.append("line").attr("stroke","currentColor").attr(m+"2",y*d)),F=F.merge(B.append("text").attr("fill","currentColor").attr(m,y*k).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),s!==S&&(T=T.transition(s),A=A.transition(s),L=L.transition(s),F=F.transition(s),M=M.transition(s).attr("opacity",o).attr("transform",function(t){return isFinite(t=v(t))?x(t+g):this.getAttribute("transform")}),B.attr("opacity",o).attr("transform",function(t){var e=this.parentNode.__axis;return x((e&&isFinite(e=e(t))?e:v(t))+g)})),M.remove(),T.attr("d",4===t||2===t?p?"M"+y*p+","+C+"H"+g+"V"+_+"H"+y*p:"M"+g+","+C+"V"+_:p?"M"+C+","+y*p+"V"+g+"H"+_+"V"+y*p:"M"+C+","+g+"H"+_),A.attr("opacity",1).attr("transform",function(t){return x(v(t)+g)}),L.attr(m+"2",y*d),F.attr(m,y*k).text(b),S.filter(u).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),S.each(function(){this.__axis=v})}return b.scale=function(t){return arguments.length?(e=t,b):e},b.ticks=function(){return r=Array.from(arguments),b},b.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),b):r.slice()},b.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),b):i&&i.slice()},b.tickFormat=function(t){return arguments.length?(n=t,b):n},b.tickSize=function(t){return arguments.length?(d=p=+t,b):d},b.tickSizeInner=function(t){return arguments.length?(d=+t,b):d},b.tickSizeOuter=function(t){return arguments.length?(p=+t,b):p},b.tickPadding=function(t){return arguments.length?(f=+t,b):f},b.offset=function(t){return arguments.length?(g=+t,b):g},b}function p(t){return d(1,t)}function f(t){return d(3,t)}function g(){}function y(t){return null==t?g:function(){return this.querySelector(t)}}function m(){return[]}function x(t){return null==t?m:function(){return this.querySelectorAll(t)}}function b(t){return function(){return this.matches(t)}}function k(t){return function(e){return e.matches(t)}}var w=Array.prototype.find;function C(){return this.firstElementChild}var _=Array.prototype.filter;function v(){return Array.from(this.children)}function S(t){return new Array(t.length)}function T(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function A(t,e,r,i,n,a){for(var o,s=0,l=e.length,h=a.length;s<h;++s)(o=e[s])?(o.__data__=a[s],i[s]=o):r[s]=new T(t,a[s]);for(;s<l;++s)(o=e[s])&&(n[s]=o)}function M(t,e,r,i,n,a,o){var s,l,h,c=new Map,u=e.length,d=a.length,p=new Array(u);for(s=0;s<u;++s)(l=e[s])&&(p[s]=h=o.call(l,l.__data__,s,e)+"",c.has(h)?n[s]=l:c.set(h,l));for(s=0;s<d;++s)h=o.call(t,a[s],s,a)+"",(l=c.get(h))?(i[s]=l,l.__data__=a[s],c.delete(h)):r[s]=new T(t,a[s]);for(s=0;s<u;++s)(l=e[s])&&c.get(p[s])===l&&(n[s]=l)}function B(t){return t.__data__}function L(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function F(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}T.prototype={constructor:T,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var $="http://www.w3.org/1999/xhtml";const E={svg:"http://www.w3.org/2000/svg",xhtml:$,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function D(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),E.hasOwnProperty(e)?{space:E[e],local:t}:t}function O(t){return function(){this.removeAttribute(t)}}function R(t){return function(){this.removeAttributeNS(t.space,t.local)}}function K(t,e){return function(){this.setAttribute(t,e)}}function I(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function N(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function P(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function z(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function q(t){return function(){this.style.removeProperty(t)}}function j(t,e,r){return function(){this.style.setProperty(t,e,r)}}function W(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function H(t,e){return t.style.getPropertyValue(e)||z(t).getComputedStyle(t,null).getPropertyValue(e)}function U(t){return function(){delete this[t]}}function Y(t,e){return function(){this[t]=e}}function G(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function X(t){return t.trim().split(/^|\s+/)}function V(t){return t.classList||new Z(t)}function Z(t){this._node=t,this._names=X(t.getAttribute("class")||"")}function Q(t,e){for(var r=V(t),i=-1,n=e.length;++i<n;)r.add(e[i])}function J(t,e){for(var r=V(t),i=-1,n=e.length;++i<n;)r.remove(e[i])}function tt(t){return function(){Q(this,t)}}function et(t){return function(){J(this,t)}}function rt(t,e){return function(){(e.apply(this,arguments)?Q:J)(this,t)}}function it(){this.textContent=""}function nt(t){return function(){this.textContent=t}}function at(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ot(){this.innerHTML=""}function st(t){return function(){this.innerHTML=t}}function lt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ht(){this.nextSibling&&this.parentNode.appendChild(this)}function ct(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ut(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===$&&e.documentElement.namespaceURI===$?e.createElement(t):e.createElementNS(r,t)}}function dt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function pt(t){var e=D(t);return(e.local?dt:ut)(e)}function ft(){return null}function gt(){var t=this.parentNode;t&&t.removeChild(this)}function yt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function mt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function xt(t){return function(){var e=this.__on;if(e){for(var r,i=0,n=-1,a=e.length;i<a;++i)r=e[i],t.type&&r.type!==t.type||r.name!==t.name?e[++n]=r:this.removeEventListener(r.type,r.listener,r.options);++n?e.length=n:delete this.__on}}}function bt(t,e,r){return function(){var i,n=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(n)for(var o=0,s=n.length;o<s;++o)if((i=n[o]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=r),void(i.value=e);this.addEventListener(t.type,a,r),i={type:t.type,name:t.name,value:e,listener:a,options:r},n?n.push(i):this.__on=[i]}}function kt(t,e,r){var i=z(t),n=i.CustomEvent;"function"==typeof n?n=new n(e,r):(n=i.document.createEvent("Event"),r?(n.initEvent(e,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(e,!1,!1)),t.dispatchEvent(n)}function wt(t,e){return function(){return kt(this,t,e)}}function Ct(t,e){return function(){return kt(this,t,e.apply(this,arguments))}}Z.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var _t=[null];function vt(t,e){this._groups=t,this._parents=e}function St(){return new vt([[document.documentElement]],_t)}vt.prototype=St.prototype={constructor:vt,select:function(t){"function"!=typeof t&&(t=y(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var a,o,s=e[n],l=s.length,h=i[n]=new Array(l),c=0;c<l;++c)(a=s[c])&&(o=t.call(a,a.__data__,c,s))&&("__data__"in a&&(o.__data__=a.__data__),h[c]=o);return new vt(i,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}(t):x(t);for(var e=this._groups,r=e.length,i=[],n=[],a=0;a<r;++a)for(var o,s=e[a],l=s.length,h=0;h<l;++h)(o=s[h])&&(i.push(t.call(o,o.__data__,h,s)),n.push(o));return new vt(i,n)},selectChild:function(t){return this.select(null==t?C:function(t){return function(){return w.call(this.children,t)}}("function"==typeof t?t:k(t)))},selectChildren:function(t){return this.selectAll(null==t?v:function(t){return function(){return _.call(this.children,t)}}("function"==typeof t?t:k(t)))},filter:function(t){"function"!=typeof t&&(t=b(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var a,o=e[n],s=o.length,l=i[n]=[],h=0;h<s;++h)(a=o[h])&&t.call(a,a.__data__,h,o)&&l.push(a);return new vt(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,B);var r,i=e?M:A,n=this._parents,a=this._groups;"function"!=typeof t&&(r=t,t=function(){return r});for(var o=a.length,s=new Array(o),l=new Array(o),h=new Array(o),c=0;c<o;++c){var u=n[c],d=a[c],p=d.length,f=L(t.call(u,u&&u.__data__,c,n)),g=f.length,y=l[c]=new Array(g),m=s[c]=new Array(g);i(u,d,y,m,h[c]=new Array(p),f,e);for(var x,b,k=0,w=0;k<g;++k)if(x=y[k]){for(k>=w&&(w=k+1);!(b=m[w])&&++w<g;);x._next=b||null}}return(s=new vt(s,n))._enter=l,s._exit=h,s},enter:function(){return new vt(this._enter||this._groups.map(S),this._parents)},exit:function(){return new vt(this._exit||this._groups.map(S),this._parents)},join:function(t,e,r){var i=this.enter(),n=this,a=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(n=e(n))&&(n=n.selection()),null==r?a.remove():r(a),i&&n?i.merge(n).order():n},merge:function(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,n=r.length,a=i.length,o=Math.min(n,a),s=new Array(n),l=0;l<o;++l)for(var h,c=r[l],u=i[l],d=c.length,p=s[l]=new Array(d),f=0;f<d;++f)(h=c[f]||u[f])&&(p[f]=h);for(;l<n;++l)s[l]=r[l];return new vt(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i,n=t[e],a=n.length-1,o=n[a];--a>=0;)(i=n[a])&&(o&&4^i.compareDocumentPosition(o)&&o.parentNode.insertBefore(i,o),o=i);return this},sort:function(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=F);for(var r=this._groups,i=r.length,n=new Array(i),a=0;a<i;++a){for(var o,s=r[a],l=s.length,h=n[a]=new Array(l),c=0;c<l;++c)(o=s[c])&&(h[c]=o);h.sort(e)}return new vt(n,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,a=i.length;n<a;++n){var o=i[n];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var n,a=e[r],o=0,s=a.length;o<s;++o)(n=a[o])&&t.call(n,n.__data__,o,a);return this},attr:function(t,e){var r=D(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==e?r.local?R:O:"function"==typeof e?r.local?P:N:r.local?I:K)(r,e))},style:function(t,e,r){return arguments.length>1?this.each((null==e?q:"function"==typeof e?W:j)(t,e,null==r?"":r)):H(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?U:"function"==typeof e?G:Y)(t,e)):this.node()[t]},classed:function(t,e){var r=X(t+"");if(arguments.length<2){for(var i=V(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each(("function"==typeof e?rt:e?tt:et)(r,e))},text:function(t){return arguments.length?this.each(null==t?it:("function"==typeof t?at:nt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ot:("function"==typeof t?lt:st)(t)):this.node().innerHTML},raise:function(){return this.each(ht)},lower:function(){return this.each(ct)},append:function(t){var e="function"==typeof t?t:pt(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var r="function"==typeof t?t:pt(t),i=null==e?ft:"function"==typeof e?e:y(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(gt)},clone:function(t){return this.select(t?mt:yt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,r){var i,n,a=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?bt:xt,i=0;i<o;++i)this.each(s(a[i],e,r));return this}var s=this.node().__on;if(s)for(var l,h=0,c=s.length;h<c;++h)for(i=0,l=s[h];i<o;++i)if((n=a[i]).type===l.type&&n.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Ct:wt)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i,n=t[e],a=0,o=n.length;a<o;++a)(i=n[a])&&(yield i)}};const Tt=St;var At={value:()=>{}};function Mt(){for(var t,e=0,r=arguments.length,i={};e<r;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new Bt(i)}function Bt(t){this._=t}function Lt(t,e){for(var r,i=0,n=t.length;i<n;++i)if((r=t[i]).name===e)return r.value}function Ft(t,e,r){for(var i=0,n=t.length;i<n;++i)if(t[i].name===e){t[i]=At,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=r&&t.push({name:e,value:r}),t}Bt.prototype=Mt.prototype={constructor:Bt,on:function(t,e){var r,i,n=this._,a=(i=n,(t+"").trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(r=(t=a[o]).type)n[r]=Ft(n[r],t.name,e);else if(null==e)for(r in n)n[r]=Ft(n[r],t.name,null);return this}for(;++o<s;)if((r=(t=a[o]).type)&&(r=Lt(n[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new Bt(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,i,n=new Array(r),a=0;a<r;++a)n[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,r=(i=this._[t]).length;a<r;++a)i[a].value.apply(e,n)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],n=0,a=i.length;n<a;++n)i[n].value.apply(e,r)}};const $t=Mt;var Et,Dt,Ot=0,Rt=0,Kt=0,It=0,Nt=0,Pt=0,zt="object"==typeof performance&&performance.now?performance:Date,qt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function jt(){return Nt||(qt(Wt),Nt=zt.now()+Pt)}function Wt(){Nt=0}function Ht(){this._call=this._time=this._next=null}function Ut(t,e,r){var i=new Ht;return i.restart(t,e,r),i}function Yt(){Nt=(It=zt.now())+Pt,Ot=Rt=0;try{!function(){jt(),++Ot;for(var t,e=Et;e;)(t=Nt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ot}()}finally{Ot=0,function(){for(var t,e,r=Et,i=1/0;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:Et=e);Dt=t,Xt(i)}(),Nt=0}}function Gt(){var t=zt.now(),e=t-It;e>1e3&&(Pt-=e,It=t)}function Xt(t){Ot||(Rt&&(Rt=clearTimeout(Rt)),t-Nt>24?(t<1/0&&(Rt=setTimeout(Yt,t-zt.now()-Pt)),Kt&&(Kt=clearInterval(Kt))):(Kt||(It=zt.now(),Kt=setInterval(Gt,1e3)),Ot=1,qt(Yt)))}function Vt(t,e,r){var i=new Ht;return e=null==e?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,r),i}Ht.prototype=Ut.prototype={constructor:Ht,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?jt():+r)+(null==e?0:+e),this._next||Dt===this||(Dt?Dt._next=this:Et=this,Dt=this),this._call=t,this._time=r,Xt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xt())}};var Zt=$t("start","end","cancel","interrupt"),Qt=[];function Jt(t,e,r,i,n,a){var o=t.__transition;if(o){if(r in o)return}else t.__transition={};!function(t,e,r){var i,n=t.__transition;function a(l){var h,c,u,d;if(1!==r.state)return s();for(h in n)if((d=n[h]).name===r.name){if(3===d.state)return Vt(a);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete n[h]):+h<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete n[h])}if(Vt(function(){3===r.state&&(r.state=4,r.timer.restart(o,r.delay,r.time),o(l))}),r.state=2,r.on.call("start",t,t.__data__,r.index,r.group),2===r.state){for(r.state=3,i=new Array(u=r.tween.length),h=0,c=-1;h<u;++h)(d=r.tween[h].value.call(t,t.__data__,r.index,r.group))&&(i[++c]=d);i.length=c+1}}function o(e){for(var n=e<r.duration?r.ease.call(null,e/r.duration):(r.timer.restart(s),r.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(t,n);5===r.state&&(r.on.call("end",t,t.__data__,r.index,r.group),s())}function s(){for(var i in r.state=6,r.timer.stop(),delete n[e],n)return;delete t.__transition}n[e]=r,r.timer=Ut(function(t){r.state=1,r.timer.restart(a,r.delay,r.time),r.delay<=t&&a(t-r.delay)},0,r.time)}(t,r,{name:e,index:i,group:n,on:Zt,tween:Qt,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function te(t,e){var r=re(t,e);if(r.state>0)throw new Error("too late; already scheduled");return r}function ee(t,e){var r=re(t,e);if(r.state>3)throw new Error("too late; already running");return r}function re(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function ie(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var ne,ae=180/Math.PI,oe={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function se(t,e,r,i,n,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),t*i<e*r&&(t=-t,e=-e,l=-l,o=-o),{translateX:n,translateY:a,rotate:Math.atan2(e,t)*ae,skewX:Math.atan(l)*ae,scaleX:o,scaleY:s}}function le(t,e,r,i){function n(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],l=[];return a=t(a),o=t(o),function(t,i,n,a,o,s){if(t!==n||i!==a){var l=o.push("translate(",null,e,null,r);s.push({i:l-4,x:ie(t,n)},{i:l-2,x:ie(i,a)})}else(n||a)&&o.push("translate("+n+e+a+r)}(a.translateX,a.translateY,o.translateX,o.translateY,s,l),function(t,e,r,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(n(r)+"rotate(",null,i)-2,x:ie(t,e)})):e&&r.push(n(r)+"rotate("+e+i)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(n(r)+"skewX(",null,i)-2,x:ie(t,e)}):e&&r.push(n(r)+"skewX("+e+i)}(a.skewX,o.skewX,s,l),function(t,e,r,i,a,o){if(t!==r||e!==i){var s=a.push(n(a)+"scale(",null,",",null,")");o.push({i:s-4,x:ie(t,r)},{i:s-2,x:ie(e,i)})}else 1===r&&1===i||a.push(n(a)+"scale("+r+","+i+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,r=-1,i=l.length;++r<i;)s[(e=l[r]).i]=e.x(t);return s.join("")}}}var he=le(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?oe:se(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),ce=le(function(t){return null==t?oe:(ne||(ne=document.createElementNS("http://www.w3.org/2000/svg","g")),ne.setAttribute("transform",t),(t=ne.transform.baseVal.consolidate())?se((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):oe)},", ",")",")");function ue(t,e){var r,i;return function(){var n=ee(this,t),a=n.tween;if(a!==r)for(var o=0,s=(i=r=a).length;o<s;++o)if(i[o].name===e){(i=i.slice()).splice(o,1);break}n.tween=i}}function de(t,e,r){var i,n;if("function"!=typeof r)throw new Error;return function(){var a=ee(this,t),o=a.tween;if(o!==i){n=(i=o).slice();for(var s={name:e,value:r},l=0,h=n.length;l<h;++l)if(n[l].name===e){n[l]=s;break}l===h&&n.push(s)}a.tween=n}}function pe(t,e,r){var i=t._id;return t.each(function(){var t=ee(this,i);(t.value||(t.value={}))[e]=r.apply(this,arguments)}),function(t){return re(t,i).value[e]}}function fe(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function ge(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function ye(){}var me=.7,xe=1/me,be="\\s*([+-]?\\d+)\\s*",ke="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",we="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ce=/^#([0-9a-f]{3,8})$/,_e=new RegExp(`^rgb\\(${be},${be},${be}\\)$`),ve=new RegExp(`^rgb\\(${we},${we},${we}\\)$`),Se=new RegExp(`^rgba\\(${be},${be},${be},${ke}\\)$`),Te=new RegExp(`^rgba\\(${we},${we},${we},${ke}\\)$`),Ae=new RegExp(`^hsl\\(${ke},${we},${we}\\)$`),Me=new RegExp(`^hsla\\(${ke},${we},${we},${ke}\\)$`),Be={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Le(){return this.rgb().formatHex()}function Fe(){return this.rgb().formatRgb()}function $e(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Ce.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?Ee(e):3===r?new Ke(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?De(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?De(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=_e.exec(t))?new Ke(e[1],e[2],e[3],1):(e=ve.exec(t))?new Ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Se.exec(t))?De(e[1],e[2],e[3],e[4]):(e=Te.exec(t))?De(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ae.exec(t))?je(e[1],e[2]/100,e[3]/100,1):(e=Me.exec(t))?je(e[1],e[2]/100,e[3]/100,e[4]):Be.hasOwnProperty(t)?Ee(Be[t]):"transparent"===t?new Ke(NaN,NaN,NaN,0):null}function Ee(t){return new Ke(t>>16&255,t>>8&255,255&t,1)}function De(t,e,r,i){return i<=0&&(t=e=r=NaN),new Ke(t,e,r,i)}function Oe(t){return t instanceof ye||(t=$e(t)),t?new Ke((t=t.rgb()).r,t.g,t.b,t.opacity):new Ke}function Re(t,e,r,i){return 1===arguments.length?Oe(t):new Ke(t,e,r,null==i?1:i)}function Ke(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function Ie(){return`#${qe(this.r)}${qe(this.g)}${qe(this.b)}`}function Ne(){const t=Pe(this.opacity);return`${1===t?"rgb(":"rgba("}${ze(this.r)}, ${ze(this.g)}, ${ze(this.b)}${1===t?")":`, ${t})`}`}function Pe(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ze(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function qe(t){return((t=ze(t))<16?"0":"")+t.toString(16)}function je(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new He(t,e,r,i)}function We(t){if(t instanceof He)return new He(t.h,t.s,t.l,t.opacity);if(t instanceof ye||(t=$e(t)),!t)return new He;if(t instanceof He)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),a=Math.max(e,r,i),o=NaN,s=a-n,l=(a+n)/2;return s?(o=e===a?(r-i)/s+6*(r<i):r===a?(i-e)/s+2:(e-r)/s+4,s/=l<.5?a+n:2-a-n,o*=60):s=l>0&&l<1?0:o,new He(o,s,l,t.opacity)}function He(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function Ue(t){return(t=(t||0)%360)<0?t+360:t}function Ye(t){return Math.max(0,Math.min(1,t||0))}function Ge(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}function Xe(t,e,r,i,n){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*i+o*n)/6}fe(ye,$e,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Le,formatHex:Le,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return We(this).formatHsl()},formatRgb:Fe,toString:Fe}),fe(Ke,Re,ge(ye,{brighter(t){return t=null==t?xe:Math.pow(xe,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?me:Math.pow(me,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ke(ze(this.r),ze(this.g),ze(this.b),Pe(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ie,formatHex:Ie,formatHex8:function(){return`#${qe(this.r)}${qe(this.g)}${qe(this.b)}${qe(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ne,toString:Ne})),fe(He,function(t,e,r,i){return 1===arguments.length?We(t):new He(t,e,r,null==i?1:i)},ge(ye,{brighter(t){return t=null==t?xe:Math.pow(xe,t),new He(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?me:Math.pow(me,t),new He(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,n=2*r-i;return new Ke(Ge(t>=240?t-240:t+120,n,i),Ge(t,n,i),Ge(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new He(Ue(this.h),Ye(this.s),Ye(this.l),Pe(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Pe(this.opacity);return`${1===t?"hsl(":"hsla("}${Ue(this.h)}, ${100*Ye(this.s)}%, ${100*Ye(this.l)}%${1===t?")":`, ${t})`}`}}));const Ve=t=>()=>t;function Ze(t,e){return function(r){return t+r*e}}function Qe(t,e){var r=e-t;return r?Ze(t,r):Ve(isNaN(t)?e:t)}const Je=function t(e){var r=function(t){return 1===(t=+t)?Qe:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}(e,r,t):Ve(isNaN(e)?r:e)}}(e);function i(t,e){var i=r((t=Re(t)).r,(e=Re(e)).r),n=r(t.g,e.g),a=r(t.b,e.b),o=Qe(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=n(e),t.b=a(e),t.opacity=o(e),t+""}}return i.gamma=t,i}(1);function tr(t){return function(e){var r,i,n=e.length,a=new Array(n),o=new Array(n),s=new Array(n);for(r=0;r<n;++r)i=Re(e[r]),a[r]=i.r||0,o[r]=i.g||0,s[r]=i.b||0;return a=t(a),o=t(o),s=t(s),i.opacity=1,function(t){return i.r=a(t),i.g=o(t),i.b=s(t),i+""}}}tr(function(t){var e=t.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),n=t[i],a=t[i+1],o=i>0?t[i-1]:2*n-a,s=i<e-1?t[i+2]:2*a-n;return Xe((r-i/e)*e,o,n,a,s)}}),tr(function(t){var e=t.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*e),n=t[(i+e-1)%e],a=t[i%e],o=t[(i+1)%e],s=t[(i+2)%e];return Xe((r-i/e)*e,n,a,o,s)}});var er=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rr=new RegExp(er.source,"g");function ir(t,e){var r,i,n,a=er.lastIndex=rr.lastIndex=0,o=-1,s=[],l=[];for(t+="",e+="";(r=er.exec(t))&&(i=rr.exec(e));)(n=i.index)>a&&(n=e.slice(a,n),s[o]?s[o]+=n:s[++o]=n),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:ie(r,i)})),a=rr.lastIndex;return a<e.length&&(n=e.slice(a),s[o]?s[o]+=n:s[++o]=n),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var r,i=0;i<e;++i)s[(r=l[i]).i]=r.x(t);return s.join("")})}function nr(t,e){var r;return("number"==typeof e?ie:e instanceof $e?Je:(r=$e(e))?(e=r,Je):ir)(t,e)}function ar(t){return function(){this.removeAttribute(t)}}function or(t){return function(){this.removeAttributeNS(t.space,t.local)}}function sr(t,e,r){var i,n,a=r+"";return function(){var o=this.getAttribute(t);return o===a?null:o===i?n:n=e(i=o,r)}}function lr(t,e,r){var i,n,a=r+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===i?n:n=e(i=o,r)}}function hr(t,e,r){var i,n,a;return function(){var o,s,l=r(this);if(null!=l)return(o=this.getAttribute(t))===(s=l+"")?null:o===i&&s===n?a:(n=s,a=e(i=o,l));this.removeAttribute(t)}}function cr(t,e,r){var i,n,a;return function(){var o,s,l=r(this);if(null!=l)return(o=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:o===i&&s===n?a:(n=s,a=e(i=o,l));this.removeAttributeNS(t.space,t.local)}}function ur(t,e){var r,i;function n(){var n=e.apply(this,arguments);return n!==i&&(r=(i=n)&&function(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}(t,n)),r}return n._value=e,n}function dr(t,e){var r,i;function n(){var n=e.apply(this,arguments);return n!==i&&(r=(i=n)&&function(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}(t,n)),r}return n._value=e,n}function pr(t,e){return function(){te(this,t).delay=+e.apply(this,arguments)}}function fr(t,e){return e=+e,function(){te(this,t).delay=e}}function gr(t,e){return function(){ee(this,t).duration=+e.apply(this,arguments)}}function yr(t,e){return e=+e,function(){ee(this,t).duration=e}}var mr=Tt.prototype.constructor;function xr(t){return function(){this.style.removeProperty(t)}}var br=0;function kr(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function wr(){return++br}var Cr=Tt.prototype;kr.prototype=function(t){return Tt().transition(t)}.prototype={constructor:kr,select:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=y(t));for(var i=this._groups,n=i.length,a=new Array(n),o=0;o<n;++o)for(var s,l,h=i[o],c=h.length,u=a[o]=new Array(c),d=0;d<c;++d)(s=h[d])&&(l=t.call(s,s.__data__,d,h))&&("__data__"in s&&(l.__data__=s.__data__),u[d]=l,Jt(u[d],e,r,d,u,re(s,r)));return new kr(a,this._parents,e,r)},selectAll:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=x(t));for(var i=this._groups,n=i.length,a=[],o=[],s=0;s<n;++s)for(var l,h=i[s],c=h.length,u=0;u<c;++u)if(l=h[u]){for(var d,p=t.call(l,l.__data__,u,h),f=re(l,r),g=0,y=p.length;g<y;++g)(d=p[g])&&Jt(d,e,r,g,p,f);a.push(p),o.push(l)}return new kr(a,o,e,r)},selectChild:Cr.selectChild,selectChildren:Cr.selectChildren,filter:function(t){"function"!=typeof t&&(t=b(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var a,o=e[n],s=o.length,l=i[n]=[],h=0;h<s;++h)(a=o[h])&&t.call(a,a.__data__,h,o)&&l.push(a);return new kr(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,n=r.length,a=Math.min(i,n),o=new Array(i),s=0;s<a;++s)for(var l,h=e[s],c=r[s],u=h.length,d=o[s]=new Array(u),p=0;p<u;++p)(l=h[p]||c[p])&&(d[p]=l);for(;s<i;++s)o[s]=e[s];return new kr(o,this._parents,this._name,this._id)},selection:function(){return new mr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,r=wr(),i=this._groups,n=i.length,a=0;a<n;++a)for(var o,s=i[a],l=s.length,h=0;h<l;++h)if(o=s[h]){var c=re(o,e);Jt(o,t,r,h,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new kr(i,this._parents,t,r)},call:Cr.call,nodes:Cr.nodes,node:Cr.node,size:Cr.size,empty:Cr.empty,each:Cr.each,on:function(t,e){var r=this._id;return arguments.length<2?re(this.node(),r).on.on(t):this.each(function(t,e,r){var i,n,a=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?te:ee;return function(){var o=a(this,t),s=o.on;s!==i&&(n=(i=s).copy()).on(e,r),o.on=n}}(r,t,e))},attr:function(t,e){var r=D(t),i="transform"===r?ce:nr;return this.attrTween(t,"function"==typeof e?(r.local?cr:hr)(r,i,pe(this,"attr."+t,e)):null==e?(r.local?or:ar)(r):(r.local?lr:sr)(r,i,e))},attrTween:function(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var i=D(t);return this.tween(r,(i.local?ur:dr)(i,e))},style:function(t,e,r){var i="transform"==(t+="")?he:nr;return null==e?this.styleTween(t,function(t,e){var r,i,n;return function(){var a=H(this,t),o=(this.style.removeProperty(t),H(this,t));return a===o?null:a===r&&o===i?n:n=e(r=a,i=o)}}(t,i)).on("end.style."+t,xr(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,n,a;return function(){var o=H(this,t),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=H(this,t)),o===l?null:o===i&&l===n?a:(n=l,a=e(i=o,s))}}(t,i,pe(this,"style."+t,e))).each(function(t,e){var r,i,n,a,o="style."+e,s="end."+o;return function(){var l=ee(this,t),h=l.on,c=null==l.value[o]?a||(a=xr(e)):void 0;h===r&&n===c||(i=(r=h).copy()).on(s,n=c),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,r){var i,n,a=r+"";return function(){var o=H(this,t);return o===a?null:o===i?n:n=e(i=o,r)}}(t,i,e),r).on("end.style."+t,null)},styleTween:function(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,r){var i,n;function a(){var a=e.apply(this,arguments);return a!==n&&(i=(n=a)&&function(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}(t,a,r)),i}return a._value=e,a}(t,e,null==r?"":r))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(pe(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,r;function i(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,n=re(this.node(),r).tween,a=0,o=n.length;a<o;++a)if((i=n[a]).name===t)return i.value;return null}return this.each((null==e?ue:de)(r,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?pr:fr)(e,t)):re(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?gr:yr)(e,t)):re(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){ee(this,t).ease=e}}(e,t)):re(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var r=e.apply(this,arguments);if("function"!=typeof r)throw new Error;ee(this,t).ease=r}}(this._id,t))},end:function(){var t,e,r=this,i=r._id,n=r.size();return new Promise(function(a,o){var s={value:o},l={value:function(){0===--n&&a()}};r.each(function(){var r=ee(this,i),n=r.on;n!==t&&((e=(t=n).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),r.on=e}),0===n&&a()})},[Symbol.iterator]:Cr[Symbol.iterator]};var _r={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function vr(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}Tt.prototype.interrupt=function(t){return this.each(function(){!function(t,e){var r,i,n,a=t.__transition,o=!0;if(a){for(n in e=null==e?null:e+"",a)(r=a[n]).name===e?(i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[n]):o=!1;o&&delete t.__transition}}(this,t)})},Tt.prototype.transition=function(t){var e,r;t instanceof kr?(e=t._id,t=t._name):(e=wr(),(r=_r).time=jt(),t=null==t?null:t+"");for(var i=this._groups,n=i.length,a=0;a<n;++a)for(var o,s=i[a],l=s.length,h=0;h<l;++h)(o=s[h])&&Jt(o,t,e,h,s,r||vr(o,e));return new kr(i,this._parents,t,e)};const{abs:Sr,max:Tr,min:Ar}=Math;function Mr(t){return{type:t}}function Br(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function Lr(t){return(t=Br(Math.abs(t)))?t[1]:NaN}["w","e"].map(Mr),["n","s"].map(Mr),["n","w","e","s","nw","ne","sw","se"].map(Mr);var Fr,$r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Er(t){if(!(e=$r.exec(t)))throw new Error("invalid format: "+t);var e;return new Dr({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Dr(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Or(t,e){var r=Br(t,e);if(!r)return t+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}Er.prototype=Dr.prototype,Dr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Rr={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Or(100*t,e),r:Or,s:function(t,e){var r=Br(t,e);if(!r)return t+"";var i=r[0],n=r[1],a=n-(Fr=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Br(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Kr(t){return t}var Ir,Nr,Pr,zr=Array.prototype.map,qr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function jr(t){var e=0,r=t.children,i=r&&r.length;if(i)for(;--i>=0;)e+=r[i].value;else e=1;t.value=e}function Wr(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Ur)):void 0===e&&(e=Hr);for(var r,i,n,a,o,s=new Xr(t),l=[s];r=l.pop();)if((n=e(r.data))&&(o=(n=Array.from(n)).length))for(r.children=n,a=o-1;a>=0;--a)l.push(i=n[a]=new Xr(n[a])),i.parent=r,i.depth=r.depth+1;return s.eachBefore(Gr)}function Hr(t){return t.children}function Ur(t){return Array.isArray(t)?t[1]:null}function Yr(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Gr(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Xr(t){this.data=t,this.depth=this.height=0,this.parent=null}function Vr(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Zr(t,e,r,i,n){for(var a,o=t.children,s=-1,l=o.length,h=t.value&&(i-e)/t.value;++s<l;)(a=o[s]).y0=r,a.y1=n,a.x0=e,a.x1=e+=a.value*h}function Qr(t,e,r,i,n){for(var a,o=t.children,s=-1,l=o.length,h=t.value&&(n-r)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=i,a.y0=r,a.y1=r+=a.value*h}Ir=function(t){var e,r,i=void 0===t.grouping||void 0===t.thousands?Kr:(e=zr.call(t.grouping,Number),r=t.thousands+"",function(t,i){for(var n=t.length,a=[],o=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),a.push(t.substring(n-=s,n+s)),!((l+=s+1)>i));)s=e[o=(o+1)%e.length];return a.reverse().join(r)}),n=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Kr:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(zr.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",h=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function u(t){var e=(t=Er(t)).fill,r=t.align,u=t.sign,d=t.symbol,p=t.zero,f=t.width,g=t.comma,y=t.precision,m=t.trim,x=t.type;"n"===x?(g=!0,x="g"):Rr[x]||(void 0===y&&(y=12),m=!0,x="g"),(p||"0"===e&&"="===r)&&(p=!0,e="0",r="=");var b="$"===d?n:"#"===d&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",k="$"===d?a:/[%p]/.test(x)?l:"",w=Rr[x],C=/[defgprs%]/.test(x);function _(t){var n,a,l,d=b,_=k;if("c"===x)_=w(t)+_,t="";else{var v=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:w(Math.abs(t),y),m&&(t=function(t){t:for(var e,r=t.length,i=1,n=-1;i<r;++i)switch(t[i]){case".":n=e=i;break;case"0":0===n&&(n=i),e=i;break;default:if(!+t[i])break t;n>0&&(n=0)}return n>0?t.slice(0,n)+t.slice(e+1):t}(t)),v&&0===+t&&"+"!==u&&(v=!1),d=(v?"("===u?u:h:"-"===u||"("===u?"":u)+d,_=("s"===x?qr[8+Fr/3]:"")+_+(v&&"("===u?")":""),C)for(n=-1,a=t.length;++n<a;)if(48>(l=t.charCodeAt(n))||l>57){_=(46===l?o+t.slice(n+1):t.slice(n))+_,t=t.slice(0,n);break}}g&&!p&&(t=i(t,1/0));var S=d.length+t.length+_.length,T=S<f?new Array(f-S+1).join(e):"";switch(g&&p&&(t=i(T+t,T.length?f-_.length:1/0),T=""),r){case"<":t=d+t+_+T;break;case"=":t=d+T+t+_;break;case"^":t=T.slice(0,S=T.length>>1)+d+t+_+T.slice(S);break;default:t=T+d+t+_}return s(t)}return y=void 0===y?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),_.toString=function(){return t+""},_}return{format:u,formatPrefix:function(t,e){var r=u(((t=Er(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(Lr(e)/3))),n=Math.pow(10,-i),a=qr[8+i/3];return function(t){return r(n*t)+a}}}}({thousands:",",grouping:[3],currency:["$",""]}),Nr=Ir.format,Pr=Ir.formatPrefix,Xr.prototype=Wr.prototype={constructor:Xr,count:function(){return this.eachAfter(jr)},each:function(t,e){let r=-1;for(const i of this)t.call(e,i,++r,this);return this},eachAfter:function(t,e){for(var r,i,n,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),r=a.children)for(i=0,n=r.length;i<n;++i)o.push(r[i]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var r,i,n=this,a=[n],o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;i>=0;--i)a.push(r[i]);return this},find:function(t,e){let r=-1;for(const i of this)if(t.call(e,i,++r,this))return i},sum:function(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,i=e.children,n=i&&i.length;--n>=0;)r+=i[n].value;e.value=r})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),i=e.ancestors(),n=null;for(t=r.pop(),e=i.pop();t===e;)n=t,t=r.pop(),e=i.pop();return n}(e,t),i=[e];e!==r;)e=e.parent,i.push(e);for(var n=i.length;t!==r;)i.splice(n,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e},copy:function(){return Wr(this).eachBefore(Yr)},[Symbol.iterator]:function*(){var t,e,r,i,n=this,a=[n];do{for(t=a.reverse(),a=[];n=t.pop();)if(yield n,e=n.children)for(r=0,i=e.length;r<i;++r)a.push(e[r])}while(a.length)}};const Jr=function t(e){function r(t,r,i,n,a){!function(t,e,r,i,n,a){for(var o,s,l,h,c,u,d,p,f,g,y,m=[],x=e.children,b=0,k=0,w=x.length,C=e.value;b<w;){l=n-r,h=a-i;do{c=x[k++].value}while(!c&&k<w);for(u=d=c,y=c*c*(g=Math.max(h/l,l/h)/(C*t)),f=Math.max(d/y,y/u);k<w;++k){if(c+=s=x[k].value,s<u&&(u=s),s>d&&(d=s),y=c*c*g,(p=Math.max(d/y,y/u))>f){c-=s;break}f=p}m.push(o={value:c,dice:l<h,children:x.slice(b,k)}),o.dice?Zr(o,r,i,n,C?i+=h*c/C:a):Qr(o,r,i,C?r+=l*c/C:n,a),C-=c,b=k}}(e,t,r,i,n,a)}return r.ratio=function(e){return t((e=+e)>1?e:1)},r}((1+Math.sqrt(5))/2);function ti(){return 0}function ei(t){return function(){return t}}function ri(){var t=Jr,e=!1,r=1,i=1,n=[0],a=ti,o=ti,s=ti,l=ti,h=ti;function c(t){return t.x0=t.y0=0,t.x1=r,t.y1=i,t.eachBefore(u),n=[0],e&&t.eachBefore(Vr),t}function u(e){var r=n[e.depth],i=e.x0+r,c=e.y0+r,u=e.x1-r,d=e.y1-r;u<i&&(i=u=(i+u)/2),d<c&&(c=d=(c+d)/2),e.x0=i,e.y0=c,e.x1=u,e.y1=d,e.children&&(r=n[e.depth+1]=a(e)/2,i+=h(e)-r,c+=o(e)-r,(u-=s(e)-r)<i&&(i=u=(i+u)/2),(d-=l(e)-r)<c&&(c=d=(c+d)/2),t(e,i,c,u,d))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(r=+t[0],i=+t[1],c):[r,i]},c.tile=function(e){return arguments.length?(t=function(t){if("function"!=typeof t)throw new Error;return t}(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:ei(+t),c):a},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:ei(+t),c):o},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:ei(+t),c):s},c.paddingBottom=function(t){return arguments.length?(l="function"==typeof t?t:ei(+t),c):l},c.paddingLeft=function(t){return arguments.length?(h="function"==typeof t?t:ei(+t),c):h},c}const ii=Math.PI/180,ni=180/Math.PI,ai=.96422,oi=.82521,si=4/29,li=6/29,hi=3*li*li,ci=li*li*li;function ui(t){if(t instanceof di)return new di(t.l,t.a,t.b,t.opacity);if(t instanceof xi)return bi(t);t instanceof Ke||(t=Oe(t));var e,r,i=yi(t.r),n=yi(t.g),a=yi(t.b),o=pi((.2225045*i+.7168786*n+.0606169*a)/1);return i===n&&n===a?e=r=o:(e=pi((.4360747*i+.3850649*n+.1430804*a)/ai),r=pi((.0139322*i+.0971045*n+.7141733*a)/oi)),new di(116*o-16,500*(e-o),200*(o-r),t.opacity)}function di(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}function pi(t){return t>ci?Math.pow(t,1/3):t/hi+si}function fi(t){return t>li?t*t*t:hi*(t-si)}function gi(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function yi(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function mi(t,e,r,i){return 1===arguments.length?function(t){if(t instanceof xi)return new xi(t.h,t.c,t.l,t.opacity);if(t instanceof di||(t=ui(t)),0===t.a&&0===t.b)return new xi(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*ni;return new xi(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new xi(t,e,r,null==i?1:i)}function xi(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function bi(t){if(isNaN(t.h))return new di(t.l,0,0,t.opacity);var e=t.h*ii;return new di(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function ki(t){return function(e,r){var i=t((e=mi(e)).h,(r=mi(r)).h),n=Qe(e.c,r.c),a=Qe(e.l,r.l),o=Qe(e.opacity,r.opacity);return function(t){return e.h=i(t),e.c=n(t),e.l=a(t),e.opacity=o(t),e+""}}}fe(di,function(t,e,r,i){return 1===arguments.length?ui(t):new di(t,e,r,null==i?1:i)},ge(ye,{brighter(t){return new di(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new di(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new Ke(gi(3.1338561*(e=ai*fi(e))-1.6168667*(t=1*fi(t))-.4906146*(r=oi*fi(r))),gi(-.9787684*e+1.9161415*t+.033454*r),gi(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),fe(xi,mi,ge(ye,{brighter(t){return new xi(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new xi(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return bi(this).rgb()}}));const wi=ki(function(t,e){var r=e-t;return r?Ze(t,r>180||r<-180?r-360*Math.round(r/360):r):Ve(isNaN(t)?e:t)});function Ci(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}ki(Qe);class _i extends Map{constructor(t,e=Si){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,r]of t)this.set(e,r)}get(t){return super.get(vi(this,t))}has(t){return super.has(vi(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},r){const i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}(this,t))}}function vi({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):r}function Si(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const Ti=Symbol("implicit");function Ai(){var t=new _i,e=[],r=[],i=Ti;function n(n){let a=t.get(n);if(void 0===a){if(i!==Ti)return i;t.set(n,a=e.push(n)-1)}return r[a%r.length]}return n.domain=function(r){if(!arguments.length)return e.slice();e=[],t=new _i;for(const i of r)t.has(i)||t.set(i,e.push(i)-1);return n},n.range=function(t){return arguments.length?(r=Array.from(t),n):r.slice()},n.unknown=function(t){return arguments.length?(i=t,n):i},n.copy=function(){return Ai(e,r).unknown(i)},Ci.apply(n,arguments),n}function Mi(){var t,e,r=Ai().unknown(void 0),i=r.domain,n=r.range,a=0,o=1,s=!1,l=0,h=0,c=.5;function u(){var r=i().length,u=o<a,d=u?o:a,p=u?a:o;t=(p-d)/Math.max(1,r-l+2*h),s&&(t=Math.floor(t)),d+=(p-d-t*(r-l))*c,e=t*(1-l),s&&(d=Math.round(d),e=Math.round(e));var f=function(t,e,r){t=+t,e=+e,r=(n=arguments.length)<2?(e=t,t=0,1):n<3?1:+r;for(var i=-1,n=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(n);++i<n;)a[i]=t+i*r;return a}(r).map(function(e){return d+t*e});return n(u?f.reverse():f)}return delete r.unknown,r.domain=function(t){return arguments.length?(i(t),u()):i()},r.range=function(t){return arguments.length?([a,o]=t,a=+a,o=+o,u()):[a,o]},r.rangeRound=function(t){return[a,o]=t,a=+a,o=+o,s=!0,u()},r.bandwidth=function(){return e},r.step=function(){return t},r.round=function(t){return arguments.length?(s=!!t,u()):s},r.padding=function(t){return arguments.length?(l=Math.min(1,h=+t),u()):l},r.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),u()):l},r.paddingOuter=function(t){return arguments.length?(h=+t,u()):h},r.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),u()):c},r.copy=function(){return Mi(i(),[a,o]).round(s).paddingInner(l).paddingOuter(h).align(c)},Ci.apply(u(),arguments)}const Bi=Math.sqrt(50),Li=Math.sqrt(10),Fi=Math.sqrt(2);function $i(t,e,r){const i=(e-t)/Math.max(0,r),n=Math.floor(Math.log10(i)),a=i/Math.pow(10,n),o=a>=Bi?10:a>=Li?5:a>=Fi?2:1;let s,l,h;return n<0?(h=Math.pow(10,-n)/o,s=Math.round(t*h),l=Math.round(e*h),s/h<t&&++s,l/h>e&&--l,h=-h):(h=Math.pow(10,n)*o,s=Math.round(t/h),l=Math.round(e/h),s*h<t&&++s,l*h>e&&--l),l<s&&.5<=r&&r<2?$i(t,e,2*r):[s,l,h]}function Ei(t,e,r){return $i(t=+t,e=+e,r=+r)[2]}function Di(t,e,r){r=+r;const i=(e=+e)<(t=+t),n=i?Ei(e,t,r):Ei(t,e,r);return(i?-1:1)*(n<0?1/-n:n)}function Oi(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ri(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ki(t){let e,r,i;function n(t,i,n=0,a=t.length){if(n<a){if(0!==e(i,i))return a;do{const e=n+a>>>1;r(t[e],i)<0?n=e+1:a=e}while(n<a)}return n}return 2!==t.length?(e=Oi,r=(e,r)=>Oi(t(e),r),i=(e,r)=>t(e)-r):(e=t===Oi||t===Ri?t:Ii,r=t,i=t),{left:n,center:function(t,e,r=0,a=t.length){const o=n(t,e,r,a-1);return o>r&&i(t[o-1],e)>-i(t[o],e)?o-1:o},right:function(t,i,n=0,a=t.length){if(n<a){if(0!==e(i,i))return a;do{const e=n+a>>>1;r(t[e],i)<=0?n=e+1:a=e}while(n<a)}return n}}}function Ii(){return 0}const Ni=Ki(Oi),Pi=Ni.right,zi=(Ni.left,Ki(function(t){return null===t?NaN:+t}).center,Pi);function qi(t,e){var r,i=e?e.length:0,n=t?Math.min(i,t.length):0,a=new Array(n),o=new Array(i);for(r=0;r<n;++r)a[r]=Ui(t[r],e[r]);for(;r<i;++r)o[r]=e[r];return function(t){for(r=0;r<n;++r)o[r]=a[r](t);return o}}function ji(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}function Wi(t,e){var r,i={},n={};for(r in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)r in t?i[r]=Ui(t[r],e[r]):n[r]=e[r];return function(t){for(r in i)n[r]=i[r](t);return n}}function Hi(t,e){e||(e=[]);var r,i=t?Math.min(e.length,t.length):0,n=e.slice();return function(a){for(r=0;r<i;++r)n[r]=t[r]*(1-a)+e[r]*a;return n}}function Ui(t,e){var r,i,n=typeof e;return null==e||"boolean"===n?Ve(e):("number"===n?ie:"string"===n?(r=$e(e))?(e=r,Je):ir:e instanceof $e?Je:e instanceof Date?ji:(i=e,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(e)?qi:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Wi:ie:Hi))(t,e)}function Yi(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function Gi(t){return+t}var Xi=[0,1];function Vi(t){return t}function Zi(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:(r=isNaN(e)?NaN:.5,function(){return r});var r}function Qi(t,e,r){var i=t[0],n=t[1],a=e[0],o=e[1];return n<i?(i=Zi(n,i),a=r(o,a)):(i=Zi(i,n),a=r(a,o)),function(t){return a(i(t))}}function Ji(t,e,r){var i=Math.min(t.length,e.length)-1,n=new Array(i),a=new Array(i),o=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<i;)n[o]=Zi(t[o],t[o+1]),a[o]=r(e[o],e[o+1]);return function(e){var r=zi(t,e,1,i)-1;return a[r](n[r](e))}}function tn(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function en(){return function(){var t,e,r,i,n,a,o=Xi,s=Xi,l=Ui,h=Vi;function c(){var t,e,r,l=Math.min(o.length,s.length);return h!==Vi&&(t=o[0],e=o[l-1],t>e&&(r=t,t=e,e=r),h=function(r){return Math.max(t,Math.min(e,r))}),i=l>2?Ji:Qi,n=a=null,u}function u(e){return null==e||isNaN(e=+e)?r:(n||(n=i(o.map(t),s,l)))(t(h(e)))}return u.invert=function(r){return h(e((a||(a=i(s,o.map(t),ie)))(r)))},u.domain=function(t){return arguments.length?(o=Array.from(t,Gi),c()):o.slice()},u.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},u.rangeRound=function(t){return s=Array.from(t),l=Yi,c()},u.clamp=function(t){return arguments.length?(h=!!t||Vi,c()):h!==Vi},u.interpolate=function(t){return arguments.length?(l=t,c()):l},u.unknown=function(t){return arguments.length?(r=t,u):r},function(r,i){return t=r,e=i,c()}}()(Vi,Vi)}function rn(t){var e=t.domain;return t.ticks=function(t){var r=e();return function(t,e,r){if(!((r=+r)>0))return[];if((t=+t)===(e=+e))return[t];const i=e<t,[n,a,o]=i?$i(e,t,r):$i(t,e,r);if(!(a>=n))return[];const s=a-n+1,l=new Array(s);if(i)if(o<0)for(let t=0;t<s;++t)l[t]=(a-t)/-o;else for(let t=0;t<s;++t)l[t]=(a-t)*o;else if(o<0)for(let t=0;t<s;++t)l[t]=(n+t)/-o;else for(let t=0;t<s;++t)l[t]=(n+t)*o;return l}(r[0],r[r.length-1],null==t?10:t)},t.tickFormat=function(t,r){var i=e();return function(t,e,r,i){var n,a=Di(t,e,r);switch((i=Er(null==i?",f":i)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(n=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Lr(e)/3)))-Lr(Math.abs(t)))}(a,o))||(i.precision=n),Pr(i,o);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(n=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Lr(e)-Lr(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=n-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(n=function(t){return Math.max(0,-Lr(Math.abs(t)))}(a))||(i.precision=n-2*("%"===i.type))}return Nr(i)}(i[0],i[i.length-1],null==t?10:t,r)},t.nice=function(r){null==r&&(r=10);var i,n,a=e(),o=0,s=a.length-1,l=a[o],h=a[s],c=10;for(h<l&&(n=l,l=h,h=n,n=o,o=s,s=n);c-- >0;){if((n=Ei(l,h,r))===i)return a[o]=l,a[s]=h,e(a);if(n>0)l=Math.floor(l/n)*n,h=Math.ceil(h/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,h=Math.floor(h*n)/n}i=n}return t},t}function nn(){var t=en();return t.copy=function(){return tn(t,nn())},Ci.apply(t,arguments),rn(t)}const an=1e3,on=6e4,sn=36e5,ln=864e5,hn=6048e5,cn=31536e6,un=new Date,dn=new Date;function pn(t,e,r,i){function n(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return n.floor=e=>(t(e=new Date(+e)),e),n.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),n.round=t=>{const e=n(t),r=n.ceil(t);return t-e<r-t?e:r},n.offset=(t,r)=>(e(t=new Date(+t),null==r?1:Math.floor(r)),t),n.range=(r,i,a)=>{const o=[];if(r=n.ceil(r),a=null==a?1:Math.floor(a),!(r<i&&a>0))return o;let s;do{o.push(s=new Date(+r)),e(r,a),t(r)}while(s<r&&r<i);return o},n.filter=r=>pn(e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)},(t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!r(t););else for(;--i>=0;)for(;e(t,1),!r(t););}),r&&(n.count=(e,i)=>(un.setTime(+e),dn.setTime(+i),t(un),t(dn),Math.floor(r(un,dn))),n.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?n.filter(i?e=>i(e)%t===0:e=>n.count(0,e)%t===0):n:null)),n}const fn=pn(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);fn.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?pn(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):fn:null),fn.range;const gn=pn(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*an)},(t,e)=>(e-t)/an,t=>t.getUTCSeconds()),yn=(gn.range,pn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*an)},(t,e)=>{t.setTime(+t+e*on)},(t,e)=>(e-t)/on,t=>t.getMinutes())),mn=(yn.range,pn(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*on)},(t,e)=>(e-t)/on,t=>t.getUTCMinutes())),xn=(mn.range,pn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*an-t.getMinutes()*on)},(t,e)=>{t.setTime(+t+e*sn)},(t,e)=>(e-t)/sn,t=>t.getHours())),bn=(xn.range,pn(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*sn)},(t,e)=>(e-t)/sn,t=>t.getUTCHours())),kn=(bn.range,pn(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*on)/ln,t=>t.getDate()-1)),wn=(kn.range,pn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/ln,t=>t.getUTCDate()-1)),Cn=(wn.range,pn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/ln,t=>Math.floor(t/ln)));function vn(t){return pn(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*on)/hn)}Cn.range;const Sn=vn(0),Tn=vn(1),An=vn(2),Mn=vn(3),Bn=vn(4),Ln=vn(5),Fn=vn(6);function $n(t){return pn(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/hn)}Sn.range,Tn.range,An.range,Mn.range,Bn.range,Ln.range,Fn.range;const En=$n(0),Dn=$n(1),On=$n(2),Rn=$n(3),Kn=$n(4),In=$n(5),Nn=$n(6),Pn=(En.range,Dn.range,On.range,Rn.range,Kn.range,In.range,Nn.range,pn(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth())),zn=(Pn.range,pn(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth())),qn=(zn.range,pn(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear()));qn.every=t=>isFinite(t=Math.floor(t))&&t>0?pn(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)}):null,qn.range;const jn=pn(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());function Wn(t,e,r,i,n,a){const o=[[gn,1,an],[gn,5,5e3],[gn,15,15e3],[gn,30,3e4],[a,1,on],[a,5,3e5],[a,15,9e5],[a,30,18e5],[n,1,sn],[n,3,108e5],[n,6,216e5],[n,12,432e5],[i,1,ln],[i,2,1728e5],[r,1,hn],[e,1,2592e6],[e,3,7776e6],[t,1,cn]];function s(e,r,i){const n=Math.abs(r-e)/i,a=Ki(([,,t])=>t).right(o,n);if(a===o.length)return t.every(Di(e/cn,r/cn,i));if(0===a)return fn.every(Math.max(Di(e,r,i),1));const[s,l]=o[n/o[a-1][2]<o[a][2]/n?a-1:a];return s.every(l)}return[function(t,e,r){const i=e<t;i&&([t,e]=[e,t]);const n=r&&"function"==typeof r.range?r:s(t,e,r),a=n?n.range(t,+e+1):[];return i?a.reverse():a},s]}jn.every=t=>isFinite(t=Math.floor(t))&&t>0?pn(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)}):null,jn.range;const[Hn,Un]=Wn(jn,zn,En,Cn,bn,mn),[Yn,Gn]=Wn(qn,Pn,Sn,kn,xn,yn);function Xn(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Vn(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Zn(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}var Qn,Jn,ta={"-":"",_:" ",0:"0"},ea=/^\s*\d+/,ra=/^%/,ia=/[\\^$*+?|[\]().{}]/g;function na(t,e,r){var i=t<0?"-":"",n=(i?-t:t)+"",a=n.length;return i+(a<r?new Array(r-a+1).join(e)+n:n)}function aa(t){return t.replace(ia,"\\$&")}function oa(t){return new RegExp("^(?:"+t.map(aa).join("|")+")","i")}function sa(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function la(t,e,r){var i=ea.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function ha(t,e,r){var i=ea.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function ca(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function ua(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function da(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function pa(t,e,r){var i=ea.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function fa(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function ga(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function ya(t,e,r){var i=ea.exec(e.slice(r,r+1));return i?(t.q=3*i[0]-3,r+i[0].length):-1}function ma(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function xa(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function ba(t,e,r){var i=ea.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function ka(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function wa(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function Ca(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function _a(t,e,r){var i=ea.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function va(t,e,r){var i=ea.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function Sa(t,e,r){var i=ra.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function Ta(t,e,r){var i=ea.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function Aa(t,e,r){var i=ea.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function Ma(t,e){return na(t.getDate(),e,2)}function Ba(t,e){return na(t.getHours(),e,2)}function La(t,e){return na(t.getHours()%12||12,e,2)}function Fa(t,e){return na(1+kn.count(qn(t),t),e,3)}function $a(t,e){return na(t.getMilliseconds(),e,3)}function Ea(t,e){return $a(t,e)+"000"}function Da(t,e){return na(t.getMonth()+1,e,2)}function Oa(t,e){return na(t.getMinutes(),e,2)}function Ra(t,e){return na(t.getSeconds(),e,2)}function Ka(t){var e=t.getDay();return 0===e?7:e}function Ia(t,e){return na(Sn.count(qn(t)-1,t),e,2)}function Na(t){var e=t.getDay();return e>=4||0===e?Bn(t):Bn.ceil(t)}function Pa(t,e){return t=Na(t),na(Bn.count(qn(t),t)+(4===qn(t).getDay()),e,2)}function za(t){return t.getDay()}function qa(t,e){return na(Tn.count(qn(t)-1,t),e,2)}function ja(t,e){return na(t.getFullYear()%100,e,2)}function Wa(t,e){return na((t=Na(t)).getFullYear()%100,e,2)}function Ha(t,e){return na(t.getFullYear()%1e4,e,4)}function Ua(t,e){var r=t.getDay();return na((t=r>=4||0===r?Bn(t):Bn.ceil(t)).getFullYear()%1e4,e,4)}function Ya(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+na(e/60|0,"0",2)+na(e%60,"0",2)}function Ga(t,e){return na(t.getUTCDate(),e,2)}function Xa(t,e){return na(t.getUTCHours(),e,2)}function Va(t,e){return na(t.getUTCHours()%12||12,e,2)}function Za(t,e){return na(1+wn.count(jn(t),t),e,3)}function Qa(t,e){return na(t.getUTCMilliseconds(),e,3)}function Ja(t,e){return Qa(t,e)+"000"}function to(t,e){return na(t.getUTCMonth()+1,e,2)}function eo(t,e){return na(t.getUTCMinutes(),e,2)}function ro(t,e){return na(t.getUTCSeconds(),e,2)}function io(t){var e=t.getUTCDay();return 0===e?7:e}function no(t,e){return na(En.count(jn(t)-1,t),e,2)}function ao(t){var e=t.getUTCDay();return e>=4||0===e?Kn(t):Kn.ceil(t)}function oo(t,e){return t=ao(t),na(Kn.count(jn(t),t)+(4===jn(t).getUTCDay()),e,2)}function so(t){return t.getUTCDay()}function lo(t,e){return na(Dn.count(jn(t)-1,t),e,2)}function ho(t,e){return na(t.getUTCFullYear()%100,e,2)}function co(t,e){return na((t=ao(t)).getUTCFullYear()%100,e,2)}function uo(t,e){return na(t.getUTCFullYear()%1e4,e,4)}function po(t,e){var r=t.getUTCDay();return na((t=r>=4||0===r?Kn(t):Kn.ceil(t)).getUTCFullYear()%1e4,e,4)}function fo(){return"+0000"}function go(){return"%"}function yo(t){return+t}function mo(t){return Math.floor(+t/1e3)}function xo(t){return new Date(t)}function bo(t){return t instanceof Date?+t:+new Date(+t)}function ko(t,e,r,i,n,a,o,s,l,h){var c=en(),u=c.invert,d=c.domain,p=h(".%L"),f=h(":%S"),g=h("%I:%M"),y=h("%I %p"),m=h("%a %d"),x=h("%b %d"),b=h("%B"),k=h("%Y");function w(t){return(l(t)<t?p:s(t)<t?f:o(t)<t?g:a(t)<t?y:i(t)<t?n(t)<t?m:x:r(t)<t?b:k)(t)}return c.invert=function(t){return new Date(u(t))},c.domain=function(t){return arguments.length?d(Array.from(t,bo)):d().map(xo)},c.ticks=function(e){var r=d();return t(r[0],r[r.length-1],null==e?10:e)},c.tickFormat=function(t,e){return null==e?w:h(e)},c.nice=function(t){var r=d();return t&&"function"==typeof t.range||(t=e(r[0],r[r.length-1],null==t?10:t)),t?d(function(t,e){var r,i=0,n=(t=t.slice()).length-1,a=t[i],o=t[n];return o<a&&(r=i,i=n,n=r,r=a,a=o,o=r),t[i]=e.floor(a),t[n]=e.ceil(o),t}(r,t)):c},c.copy=function(){return tn(c,ko(t,e,r,i,n,a,o,s,l,h))},c}function wo(){return Ci.apply(ko(Yn,Gn,qn,Pn,Sn,kn,xn,yn,gn,Jn).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}Qn=function(t){var e=t.dateTime,r=t.date,i=t.time,n=t.periods,a=t.days,o=t.shortDays,s=t.months,l=t.shortMonths,h=oa(n),c=sa(n),u=oa(a),d=sa(a),p=oa(o),f=sa(o),g=oa(s),y=sa(s),m=oa(l),x=sa(l),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Ma,e:Ma,f:Ea,g:Wa,G:Ua,H:Ba,I:La,j:Fa,L:$a,m:Da,M:Oa,p:function(t){return n[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:yo,s:mo,S:Ra,u:Ka,U:Ia,V:Pa,w:za,W:qa,x:null,X:null,y:ja,Y:Ha,Z:Ya,"%":go},k={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Ga,e:Ga,f:Ja,g:co,G:po,H:Xa,I:Va,j:Za,L:Qa,m:to,M:eo,p:function(t){return n[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:yo,s:mo,S:ro,u:io,U:no,V:oo,w:so,W:lo,x:null,X:null,y:ho,Y:uo,Z:fo,"%":go},w={a:function(t,e,r){var i=p.exec(e.slice(r));return i?(t.w=f.get(i[0].toLowerCase()),r+i[0].length):-1},A:function(t,e,r){var i=u.exec(e.slice(r));return i?(t.w=d.get(i[0].toLowerCase()),r+i[0].length):-1},b:function(t,e,r){var i=m.exec(e.slice(r));return i?(t.m=x.get(i[0].toLowerCase()),r+i[0].length):-1},B:function(t,e,r){var i=g.exec(e.slice(r));return i?(t.m=y.get(i[0].toLowerCase()),r+i[0].length):-1},c:function(t,r,i){return v(t,e,r,i)},d:xa,e:xa,f:va,g:fa,G:pa,H:ka,I:ka,j:ba,L:_a,m:ma,M:wa,p:function(t,e,r){var i=h.exec(e.slice(r));return i?(t.p=c.get(i[0].toLowerCase()),r+i[0].length):-1},q:ya,Q:Ta,s:Aa,S:Ca,u:ha,U:ca,V:ua,w:la,W:da,x:function(t,e,i){return v(t,r,e,i)},X:function(t,e,r){return v(t,i,e,r)},y:fa,Y:pa,Z:ga,"%":Sa};function C(t,e){return function(r){var i,n,a,o=[],s=-1,l=0,h=t.length;for(r instanceof Date||(r=new Date(+r));++s<h;)37===t.charCodeAt(s)&&(o.push(t.slice(l,s)),null!=(n=ta[i=t.charAt(++s)])?i=t.charAt(++s):n="e"===i?" ":"0",(a=e[i])&&(i=a(r,n)),o.push(i),l=s+1);return o.push(t.slice(l,s)),o.join("")}}function _(t,e){return function(r){var i,n,a=Zn(1900,void 0,1);if(v(a,t,r+="",0)!=r.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(n=(i=Vn(Zn(a.y,0,1))).getUTCDay(),i=n>4||0===n?Dn.ceil(i):Dn(i),i=wn.offset(i,7*(a.V-1)),a.y=i.getUTCFullYear(),a.m=i.getUTCMonth(),a.d=i.getUTCDate()+(a.w+6)%7):(n=(i=Xn(Zn(a.y,0,1))).getDay(),i=n>4||0===n?Tn.ceil(i):Tn(i),i=kn.offset(i,7*(a.V-1)),a.y=i.getFullYear(),a.m=i.getMonth(),a.d=i.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),n="Z"in a?Vn(Zn(a.y,0,1)).getUTCDay():Xn(Zn(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(n+5)%7:a.w+7*a.U-(n+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Vn(a)):Xn(a)}}function v(t,e,r,i){for(var n,a,o=0,s=e.length,l=r.length;o<s;){if(i>=l)return-1;if(37===(n=e.charCodeAt(o++))){if(n=e.charAt(o++),!(a=w[n in ta?e.charAt(o++):n])||(i=a(t,r,i))<0)return-1}else if(n!=r.charCodeAt(i++))return-1}return i}return b.x=C(r,b),b.X=C(i,b),b.c=C(e,b),k.x=C(r,k),k.X=C(i,k),k.c=C(e,k),{format:function(t){var e=C(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=_(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=C(t+="",k);return e.toString=function(){return t},e},utcParse:function(t){var e=_(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Jn=Qn.format,Qn.parse,Qn.utcFormat,Qn.utcParse;const Co=function(t){for(var e=new Array(10),r=0;r<10;)e[r]="#"+t.slice(6*r,6*++r);return e}("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function _o(t){return"string"==typeof t?new vt([[document.querySelector(t)]],[document.documentElement]):new vt([[t]],_t)}function vo(t){return function(){return t}}const So=Math.abs,To=Math.atan2,Ao=Math.cos,Mo=Math.max,Bo=Math.min,Lo=Math.sin,Fo=Math.sqrt,$o=1e-12,Eo=Math.PI,Do=Eo/2,Oo=2*Eo;function Ro(t){return t>=1?Do:t<=-1?-Do:Math.asin(t)}const Ko=Math.PI,Io=2*Ko,No=1e-6,Po=Io-No;function zo(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}class qo{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?zo:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return zo;const r=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,r,i){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,e,r,i,n,a){this._append`C${+t},${+e},${+r},${+i},${this._x1=+n},${this._y1=+a}`}arcTo(t,e,r,i,n){if(t=+t,e=+e,r=+r,i=+i,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=this._x1,o=this._y1,s=r-t,l=i-e,h=a-t,c=o-e,u=h*h+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(u>No)if(Math.abs(c*s-l*h)>No&&n){let d=r-a,p=i-o,f=s*s+l*l,g=d*d+p*p,y=Math.sqrt(f),m=Math.sqrt(u),x=n*Math.tan((Ko-Math.acos((f+u-g)/(2*y*m)))/2),b=x/m,k=x/y;Math.abs(b-1)>No&&this._append`L${t+b*h},${e+b*c}`,this._append`A${n},${n},0,0,${+(c*d>h*p)},${this._x1=t+k*s},${this._y1=e+k*l}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,r,i,n,a){if(t=+t,e=+e,a=!!a,(r=+r)<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),s=r*Math.sin(i),l=t+o,h=e+s,c=1^a,u=a?i-n:n-i;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>No||Math.abs(this._y1-h)>No)&&this._append`L${l},${h}`,r&&(u<0&&(u=u%Io+Io),u>Po?this._append`A${r},${r},0,1,${c},${t-o},${e-s}A${r},${r},0,1,${c},${this._x1=l},${this._y1=h}`:u>No&&this._append`A${r},${r},0,${+(u>=Ko)},${c},${this._x1=t+r*Math.cos(n)},${this._y1=e+r*Math.sin(n)}`)}rect(t,e,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function jo(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new qo(e)}function Wo(t){return t.innerRadius}function Ho(t){return t.outerRadius}function Uo(t){return t.startAngle}function Yo(t){return t.endAngle}function Go(t){return t&&t.padAngle}function Xo(t,e,r,i,n,a,o){var s=t-r,l=e-i,h=(o?a:-a)/Fo(s*s+l*l),c=h*l,u=-h*s,d=t+c,p=e+u,f=r+c,g=i+u,y=(d+f)/2,m=(p+g)/2,x=f-d,b=g-p,k=x*x+b*b,w=n-a,C=d*g-f*p,_=(b<0?-1:1)*Fo(Mo(0,w*w*k-C*C)),v=(C*b-x*_)/k,S=(-C*x-b*_)/k,T=(C*b+x*_)/k,A=(-C*x+b*_)/k,M=v-y,B=S-m,L=T-y,F=A-m;return M*M+B*B>L*L+F*F&&(v=T,S=A),{cx:v,cy:S,x01:-c,y01:-u,x11:v*(n/w-1),y11:S*(n/w-1)}}function Vo(){var t=Wo,e=Ho,r=vo(0),i=null,n=Uo,a=Yo,o=Go,s=null,l=jo(h);function h(){var h,c,u,d=+t.apply(this,arguments),p=+e.apply(this,arguments),f=n.apply(this,arguments)-Do,g=a.apply(this,arguments)-Do,y=So(g-f),m=g>f;if(s||(s=h=l()),p<d&&(c=p,p=d,d=c),p>$o)if(y>Oo-$o)s.moveTo(p*Ao(f),p*Lo(f)),s.arc(0,0,p,f,g,!m),d>$o&&(s.moveTo(d*Ao(g),d*Lo(g)),s.arc(0,0,d,g,f,m));else{var x,b,k=f,w=g,C=f,_=g,v=y,S=y,T=o.apply(this,arguments)/2,A=T>$o&&(i?+i.apply(this,arguments):Fo(d*d+p*p)),M=Bo(So(p-d)/2,+r.apply(this,arguments)),B=M,L=M;if(A>$o){var F=Ro(A/d*Lo(T)),$=Ro(A/p*Lo(T));(v-=2*F)>$o?(C+=F*=m?1:-1,_-=F):(v=0,C=_=(f+g)/2),(S-=2*$)>$o?(k+=$*=m?1:-1,w-=$):(S=0,k=w=(f+g)/2)}var E=p*Ao(k),D=p*Lo(k),O=d*Ao(_),R=d*Lo(_);if(M>$o){var K,I=p*Ao(w),N=p*Lo(w),P=d*Ao(C),z=d*Lo(C);if(y<Eo)if(K=function(t,e,r,i,n,a,o,s){var l=r-t,h=i-e,c=o-n,u=s-a,d=u*l-c*h;if(!(d*d<$o))return[t+(d=(c*(e-a)-u*(t-n))/d)*l,e+d*h]}(E,D,P,z,I,N,O,R)){var q=E-K[0],j=D-K[1],W=I-K[0],H=N-K[1],U=1/Lo(((u=(q*W+j*H)/(Fo(q*q+j*j)*Fo(W*W+H*H)))>1?0:u<-1?Eo:Math.acos(u))/2),Y=Fo(K[0]*K[0]+K[1]*K[1]);B=Bo(M,(d-Y)/(U-1)),L=Bo(M,(p-Y)/(U+1))}else B=L=0}S>$o?L>$o?(x=Xo(P,z,E,D,p,L,m),b=Xo(I,N,O,R,p,L,m),s.moveTo(x.cx+x.x01,x.cy+x.y01),L<M?s.arc(x.cx,x.cy,L,To(x.y01,x.x01),To(b.y01,b.x01),!m):(s.arc(x.cx,x.cy,L,To(x.y01,x.x01),To(x.y11,x.x11),!m),s.arc(0,0,p,To(x.cy+x.y11,x.cx+x.x11),To(b.cy+b.y11,b.cx+b.x11),!m),s.arc(b.cx,b.cy,L,To(b.y11,b.x11),To(b.y01,b.x01),!m))):(s.moveTo(E,D),s.arc(0,0,p,k,w,!m)):s.moveTo(E,D),d>$o&&v>$o?B>$o?(x=Xo(O,R,I,N,d,-B,m),b=Xo(E,D,P,z,d,-B,m),s.lineTo(x.cx+x.x01,x.cy+x.y01),B<M?s.arc(x.cx,x.cy,B,To(x.y01,x.x01),To(b.y01,b.x01),!m):(s.arc(x.cx,x.cy,B,To(x.y01,x.x01),To(x.y11,x.x11),!m),s.arc(0,0,d,To(x.cy+x.y11,x.cx+x.x11),To(b.cy+b.y11,b.cx+b.x11),m),s.arc(b.cx,b.cy,B,To(b.y11,b.x11),To(b.y01,b.x01),!m))):s.arc(0,0,d,_,C,m):s.lineTo(O,R)}else s.moveTo(0,0);if(s.closePath(),h)return s=null,h+""||null}return h.centroid=function(){var r=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+n.apply(this,arguments)+ +a.apply(this,arguments))/2-Eo/2;return[Ao(i)*r,Lo(i)*r]},h.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:vo(+e),h):t},h.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:vo(+t),h):e},h.cornerRadius=function(t){return arguments.length?(r="function"==typeof t?t:vo(+t),h):r},h.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:vo(+t),h):i},h.startAngle=function(t){return arguments.length?(n="function"==typeof t?t:vo(+t),h):n},h.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:vo(+t),h):a},h.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:vo(+t),h):o},h.context=function(t){return arguments.length?(s=null==t?null:t,h):s},h}function Zo(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Qo(t){this._context=t}function Jo(t){return new Qo(t)}function ts(t){return t[0]}function es(t){return t[1]}function rs(t,e){var r=vo(!0),i=null,n=Jo,a=null,o=jo(s);function s(s){var l,h,c,u=(s=Zo(s)).length,d=!1;for(null==i&&(a=n(c=o())),l=0;l<=u;++l)!(l<u&&r(h=s[l],l,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+t(h,l,s),+e(h,l,s));if(c)return a=null,c+""||null}return t="function"==typeof t?t:void 0===t?ts:vo(t),e="function"==typeof e?e:void 0===e?es:vo(e),s.x=function(e){return arguments.length?(t="function"==typeof e?e:vo(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:vo(+t),s):e},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:vo(!!t),s):r},s.curve=function(t){return arguments.length?(n=t,null!=i&&(a=n(i)),s):n},s.context=function(t){return arguments.length?(null==t?i=a=null:a=n(i=t),s):i},s}function is(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function ns(t){return t}function as(){var t=ns,e=is,r=null,i=vo(0),n=vo(Oo),a=vo(0);function o(o){var s,l,h,c,u,d=(o=Zo(o)).length,p=0,f=new Array(d),g=new Array(d),y=+i.apply(this,arguments),m=Math.min(Oo,Math.max(-Oo,n.apply(this,arguments)-y)),x=Math.min(Math.abs(m)/d,a.apply(this,arguments)),b=x*(m<0?-1:1);for(s=0;s<d;++s)(u=g[f[s]=s]=+t(o[s],s,o))>0&&(p+=u);for(null!=e?f.sort(function(t,r){return e(g[t],g[r])}):null!=r&&f.sort(function(t,e){return r(o[t],o[e])}),s=0,h=p?(m-d*b)/p:0;s<d;++s,y=c)l=f[s],c=y+((u=g[l])>0?u*h:0)+b,g[l]={data:o[l],index:s,value:u,startAngle:y,endAngle:c,padAngle:x};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:vo(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,r=null,o):e},o.sort=function(t){return arguments.length?(r=t,e=null,o):r},o.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:vo(+t),o):i},o.endAngle=function(t){return arguments.length?(n="function"==typeof t?t:vo(+t),o):n},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:vo(+t),o):a},o}function os(){}function ss(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function ls(t){this._context=t}function hs(t){return new ls(t)}function cs(t){this._context=t}function us(t){return new cs(t)}function ds(t){this._context=t}function ps(t){return new ds(t)}Array.prototype.slice,Qo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},ls.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ss(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ss(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},cs.prototype={areaStart:os,areaEnd:os,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ss(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ds.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:ss(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class fs{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function gs(t){return new fs(t,!0)}function ys(t){return new fs(t,!1)}function ms(t,e){this._basis=new ls(t),this._beta=e}ms.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i,n=t[0],a=e[0],o=t[r]-n,s=e[r]-a,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(n+i*o),this._beta*e[l]+(1-this._beta)*(a+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const xs=function t(e){function r(t){return 1===e?new ls(t):new ms(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function bs(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function ks(t,e){this._context=t,this._k=(1-e)/6}ks.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:bs(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:bs(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ws=function t(e){function r(t){return new ks(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Cs(t,e){this._context=t,this._k=(1-e)/6}Cs.prototype={areaStart:os,areaEnd:os,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:bs(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const _s=function t(e){function r(t){return new Cs(t,e)}return r.tension=function(e){return t(+e)},r}(0);function vs(t,e){this._context=t,this._k=(1-e)/6}vs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:bs(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ss=function t(e){function r(t){return new vs(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Ts(t,e,r){var i=t._x1,n=t._y1,a=t._x2,o=t._y2;if(t._l01_a>$o){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,n=(n*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>$o){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*h+t._x1*t._l23_2a-e*t._l12_2a)/c,o=(o*h+t._y1*t._l23_2a-r*t._l12_2a)/c}t._context.bezierCurveTo(i,n,a,o,t._x2,t._y2)}function As(t,e){this._context=t,this._alpha=e}As.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Ts(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ms=function t(e){function r(t){return e?new As(t,e):new ks(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Bs(t,e){this._context=t,this._alpha=e}Bs.prototype={areaStart:os,areaEnd:os,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ts(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ls=function t(e){function r(t){return e?new Bs(t,e):new Cs(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Fs(t,e){this._context=t,this._alpha=e}Fs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ts(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $s=function t(e){function r(t){return e?new Fs(t,e):new vs(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Es(t){this._context=t}function Ds(t){return new Es(t)}function Os(t){return t<0?-1:1}function Rs(t,e,r){var i=t._x1-t._x0,n=e-t._x1,a=(t._y1-t._y0)/(i||n<0&&-0),o=(r-t._y1)/(n||i<0&&-0),s=(a*n+o*i)/(i+n);return(Os(a)+Os(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Ks(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Is(t,e,r){var i=t._x0,n=t._y0,a=t._x1,o=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,n+s*e,a-s,o-s*r,a,o)}function Ns(t){this._context=t}function Ps(t){this._context=new zs(t)}function zs(t){this._context=t}function qs(t){return new Ns(t)}function js(t){return new Ps(t)}function Ws(t){this._context=t}function Hs(t){var e,r,i=t.length-1,n=new Array(i),a=new Array(i),o=new Array(i);for(n[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<i-1;++e)n[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(n[i-1]=2,a[i-1]=7,o[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)r=n[e]/a[e-1],a[e]-=r,o[e]-=r*o[e-1];for(n[i-1]=o[i-1]/a[i-1],e=i-2;e>=0;--e)n[e]=(o[e]-n[e+1])/a[e];for(a[i-1]=(t[i]+n[i-1])/2,e=0;e<i-1;++e)a[e]=2*t[e+1]-n[e+1];return[n,a]}function Us(t){return new Ws(t)}function Ys(t,e){this._context=t,this._t=e}function Gs(t){return new Ys(t,.5)}function Xs(t){return new Ys(t,0)}function Vs(t){return new Ys(t,1)}function Zs(t,e,r){this.k=t,this.x=e,this.y=r}Es.prototype={areaStart:os,areaEnd:os,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Ns.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Is(this,this._t0,Ks(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Is(this,Ks(this,r=Rs(this,t,e)),r);break;default:Is(this,this._t0,r=Rs(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}},(Ps.prototype=Object.create(Ns.prototype)).point=function(t,e){Ns.prototype.point.call(this,e,t)},zs.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,n,a){this._context.bezierCurveTo(e,t,i,r,a,n)}},Ws.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===r)this._context.lineTo(t[1],e[1]);else for(var i=Hs(t),n=Hs(e),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],t[o],e[o]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},Ys.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},Zs.prototype={constructor:Zs,scale:function(t){return 1===t?this:new Zs(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Zs(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new Zs(1,0,0),Zs.prototype},9418(t,e,r){"use strict";r.d(e,{A:()=>rt});const{entries:i,setPrototypeOf:n,isFrozen:a,getPrototypeOf:o,getOwnPropertyDescriptor:s}=Object;let{freeze:l,seal:h,create:c}=Object,{apply:u,construct:d}="undefined"!=typeof Reflect&&Reflect;l||(l=function(t){return t}),h||(h=function(t){return t}),u||(u=function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),n=2;n<r;n++)i[n-2]=arguments[n];return t.apply(e,i)}),d||(d=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return new t(...r)});const p=M(Array.prototype.forEach),f=M(Array.prototype.lastIndexOf),g=M(Array.prototype.pop),y=M(Array.prototype.push),m=M(Array.prototype.splice),x=M(String.prototype.toLowerCase),b=M(String.prototype.toString),k=M(String.prototype.match),w=M(String.prototype.replace),C=M(String.prototype.indexOf),_=M(String.prototype.trim),v=M(Object.prototype.hasOwnProperty),S=M(RegExp.prototype.test),T=(A=TypeError,function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return d(A,e)});var A;function M(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return u(t,e,i)}}function B(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x;n&&n(t,null);let i=e.length;for(;i--;){let n=e[i];if("string"==typeof n){const t=r(n);t!==n&&(a(e)||(e[i]=t),n=t)}t[n]=!0}return t}function L(t){for(let e=0;e<t.length;e++)v(t,e)||(t[e]=null);return t}function F(t){const e=c(null);for(const[r,n]of i(t))v(t,r)&&(Array.isArray(n)?e[r]=L(n):n&&"object"==typeof n&&n.constructor===Object?e[r]=F(n):e[r]=n);return e}function $(t,e){for(;null!==t;){const r=s(t,e);if(r){if(r.get)return M(r.get);if("function"==typeof r.value)return M(r.value)}t=o(t)}return function(){return null}}const E=l(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),O=l(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),R=l(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),K=l(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),N=l(["#text"]),P=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),z=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),q=l(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),j=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),W=h(/\{\{[\w\W]*|[\w\W]*\}\}/gm),H=h(/<%[\w\W]*|[\w\W]*%>/gm),U=h(/\$\{[\w\W]*/gm),Y=h(/^data-[\-\w.\u00B7-\uFFFF]+$/),G=h(/^aria-[\-\w]+$/),X=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=h(/^(?:\w+script|data):/i),Z=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Q=h(/^html$/i),J=h(/^[a-z][.\w]*(-[.\w]+)+$/i);var tt=Object.freeze({__proto__:null,ARIA_ATTR:G,ATTR_WHITESPACE:Z,CUSTOM_ELEMENT:J,DATA_ATTR:Y,DOCTYPE_NAME:Q,ERB_EXPR:H,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:V,MUSTACHE_EXPR:W,TMPLIT_EXPR:U});const et=function(){return"undefined"==typeof window?null:window};var rt=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:et();const r=e=>t(e);if(r.version="3.3.1",r.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return r.isSupported=!1,r;let{document:n}=e;const a=n,o=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:h,Node:u,Element:d,NodeFilter:A,NamedNodeMap:M=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:L,DOMParser:W,trustedTypes:H}=e,U=d.prototype,Y=$(U,"cloneNode"),G=$(U,"remove"),V=$(U,"nextSibling"),Z=$(U,"childNodes"),J=$(U,"parentNode");if("function"==typeof h){const t=n.createElement("template");t.content&&t.content.ownerDocument&&(n=t.content.ownerDocument)}let rt,it="";const{implementation:nt,createNodeIterator:at,createDocumentFragment:ot,getElementsByTagName:st}=n,{importNode:lt}=a;let ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof i&&"function"==typeof J&&nt&&void 0!==nt.createHTMLDocument;const{MUSTACHE_EXPR:ct,ERB_EXPR:ut,TMPLIT_EXPR:dt,DATA_ATTR:pt,ARIA_ATTR:ft,IS_SCRIPT_OR_DATA:gt,ATTR_WHITESPACE:yt,CUSTOM_ELEMENT:mt}=tt;let{IS_ALLOWED_URI:xt}=tt,bt=null;const kt=B({},[...E,...D,...O,...K,...N]);let wt=null;const Ct=B({},[...P,...z,...q,...j]);let _t=Object.seal(c(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),vt=null,St=null;const Tt=Object.seal(c(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let At=!0,Mt=!0,Bt=!1,Lt=!0,Ft=!1,$t=!0,Et=!1,Dt=!1,Ot=!1,Rt=!1,Kt=!1,It=!1,Nt=!0,Pt=!1,zt=!0,qt=!1,jt={},Wt=null;const Ht=B({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ut=null;const Yt=B({},["audio","video","img","source","image","track"]);let Gt=null;const Xt=B({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Vt="http://www.w3.org/1998/Math/MathML",Zt="http://www.w3.org/2000/svg",Qt="http://www.w3.org/1999/xhtml";let Jt=Qt,te=!1,ee=null;const re=B({},[Vt,Zt,Qt],b);let ie=B({},["mi","mo","mn","ms","mtext"]),ne=B({},["annotation-xml"]);const ae=B({},["title","style","font","a","script"]);let oe=null;const se=["application/xhtml+xml","text/html"];let le=null,he=null;const ce=n.createElement("form"),ue=function(t){return t instanceof RegExp||t instanceof Function},de=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!he||he!==t){if(t&&"object"==typeof t||(t={}),t=F(t),oe=-1===se.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,le="application/xhtml+xml"===oe?b:x,bt=v(t,"ALLOWED_TAGS")?B({},t.ALLOWED_TAGS,le):kt,wt=v(t,"ALLOWED_ATTR")?B({},t.ALLOWED_ATTR,le):Ct,ee=v(t,"ALLOWED_NAMESPACES")?B({},t.ALLOWED_NAMESPACES,b):re,Gt=v(t,"ADD_URI_SAFE_ATTR")?B(F(Xt),t.ADD_URI_SAFE_ATTR,le):Xt,Ut=v(t,"ADD_DATA_URI_TAGS")?B(F(Yt),t.ADD_DATA_URI_TAGS,le):Yt,Wt=v(t,"FORBID_CONTENTS")?B({},t.FORBID_CONTENTS,le):Ht,vt=v(t,"FORBID_TAGS")?B({},t.FORBID_TAGS,le):F({}),St=v(t,"FORBID_ATTR")?B({},t.FORBID_ATTR,le):F({}),jt=!!v(t,"USE_PROFILES")&&t.USE_PROFILES,At=!1!==t.ALLOW_ARIA_ATTR,Mt=!1!==t.ALLOW_DATA_ATTR,Bt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Lt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Ft=t.SAFE_FOR_TEMPLATES||!1,$t=!1!==t.SAFE_FOR_XML,Et=t.WHOLE_DOCUMENT||!1,Rt=t.RETURN_DOM||!1,Kt=t.RETURN_DOM_FRAGMENT||!1,It=t.RETURN_TRUSTED_TYPE||!1,Ot=t.FORCE_BODY||!1,Nt=!1!==t.SANITIZE_DOM,Pt=t.SANITIZE_NAMED_PROPS||!1,zt=!1!==t.KEEP_CONTENT,qt=t.IN_PLACE||!1,xt=t.ALLOWED_URI_REGEXP||X,Jt=t.NAMESPACE||Qt,ie=t.MATHML_TEXT_INTEGRATION_POINTS||ie,ne=t.HTML_INTEGRATION_POINTS||ne,_t=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ue(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_t.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ue(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_t.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(_t.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ft&&(Mt=!1),Kt&&(Rt=!0),jt&&(bt=B({},N),wt=[],!0===jt.html&&(B(bt,E),B(wt,P)),!0===jt.svg&&(B(bt,D),B(wt,z),B(wt,j)),!0===jt.svgFilters&&(B(bt,O),B(wt,z),B(wt,j)),!0===jt.mathMl&&(B(bt,K),B(wt,q),B(wt,j))),t.ADD_TAGS&&("function"==typeof t.ADD_TAGS?Tt.tagCheck=t.ADD_TAGS:(bt===kt&&(bt=F(bt)),B(bt,t.ADD_TAGS,le))),t.ADD_ATTR&&("function"==typeof t.ADD_ATTR?Tt.attributeCheck=t.ADD_ATTR:(wt===Ct&&(wt=F(wt)),B(wt,t.ADD_ATTR,le))),t.ADD_URI_SAFE_ATTR&&B(Gt,t.ADD_URI_SAFE_ATTR,le),t.FORBID_CONTENTS&&(Wt===Ht&&(Wt=F(Wt)),B(Wt,t.FORBID_CONTENTS,le)),t.ADD_FORBID_CONTENTS&&(Wt===Ht&&(Wt=F(Wt)),B(Wt,t.ADD_FORBID_CONTENTS,le)),zt&&(bt["#text"]=!0),Et&&B(bt,["html","head","body"]),bt.table&&(B(bt,["tbody"]),delete vt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');rt=t.TRUSTED_TYPES_POLICY,it=rt.createHTML("")}else void 0===rt&&(rt=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const n="dompurify"+(r?"#"+r:"");try{return t.createPolicy(n,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+n+" could not be created."),null}}(H,o)),null!==rt&&"string"==typeof it&&(it=rt.createHTML(""));l&&l(t),he=t}},pe=B({},[...D,...O,...R]),fe=B({},[...K,...I]),ge=function(t){y(r.removed,{element:t});try{J(t).removeChild(t)}catch(e){G(t)}},ye=function(t,e){try{y(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){y(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(Rt||Kt)try{ge(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},me=function(t){let e=null,r=null;if(Ot)t="<remove></remove>"+t;else{const e=k(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===oe&&Jt===Qt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const i=rt?rt.createHTML(t):t;if(Jt===Qt)try{e=(new W).parseFromString(i,oe)}catch(t){}if(!e||!e.documentElement){e=nt.createDocument(Jt,"template",null);try{e.documentElement.innerHTML=te?it:i}catch(t){}}const a=e.body||e.documentElement;return t&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Jt===Qt?st.call(e,Et?"html":"body")[0]:Et?e.documentElement:a},xe=function(t){return at.call(t.ownerDocument||t,t,A.SHOW_ELEMENT|A.SHOW_COMMENT|A.SHOW_TEXT|A.SHOW_PROCESSING_INSTRUCTION|A.SHOW_CDATA_SECTION,null)},be=function(t){return t instanceof L&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof M)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},ke=function(t){return"function"==typeof u&&t instanceof u};function we(t,e,i){p(t,t=>{t.call(r,e,i,he)})}const Ce=function(t){let e=null;if(we(ht.beforeSanitizeElements,t,null),be(t))return ge(t),!0;const i=le(t.nodeName);if(we(ht.uponSanitizeElement,t,{tagName:i,allowedTags:bt}),$t&&t.hasChildNodes()&&!ke(t.firstElementChild)&&S(/<[/\w!]/g,t.innerHTML)&&S(/<[/\w!]/g,t.textContent))return ge(t),!0;if(7===t.nodeType)return ge(t),!0;if($t&&8===t.nodeType&&S(/<[/\w]/g,t.data))return ge(t),!0;if(!(Tt.tagCheck instanceof Function&&Tt.tagCheck(i))&&(!bt[i]||vt[i])){if(!vt[i]&&ve(i)){if(_t.tagNameCheck instanceof RegExp&&S(_t.tagNameCheck,i))return!1;if(_t.tagNameCheck instanceof Function&&_t.tagNameCheck(i))return!1}if(zt&&!Wt[i]){const e=J(t)||t.parentNode,r=Z(t)||t.childNodes;if(r&&e)for(let i=r.length-1;i>=0;--i){const n=Y(r[i],!0);n.__removalCount=(t.__removalCount||0)+1,e.insertBefore(n,V(t))}}return ge(t),!0}return t instanceof d&&!function(t){let e=J(t);e&&e.tagName||(e={namespaceURI:Jt,tagName:"template"});const r=x(t.tagName),i=x(e.tagName);return!!ee[t.namespaceURI]&&(t.namespaceURI===Zt?e.namespaceURI===Qt?"svg"===r:e.namespaceURI===Vt?"svg"===r&&("annotation-xml"===i||ie[i]):Boolean(pe[r]):t.namespaceURI===Vt?e.namespaceURI===Qt?"math"===r:e.namespaceURI===Zt?"math"===r&&ne[i]:Boolean(fe[r]):t.namespaceURI===Qt?!(e.namespaceURI===Zt&&!ne[i])&&!(e.namespaceURI===Vt&&!ie[i])&&!fe[r]&&(ae[r]||!pe[r]):!("application/xhtml+xml"!==oe||!ee[t.namespaceURI]))}(t)?(ge(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!S(/<\/no(script|embed|frames)/i,t.innerHTML)?(Ft&&3===t.nodeType&&(e=t.textContent,p([ct,ut,dt],t=>{e=w(e,t," ")}),t.textContent!==e&&(y(r.removed,{element:t.cloneNode()}),t.textContent=e)),we(ht.afterSanitizeElements,t,null),!1):(ge(t),!0)},_e=function(t,e,r){if(Nt&&("id"===e||"name"===e)&&(r in n||r in ce))return!1;if(Mt&&!St[e]&&S(pt,e));else if(At&&S(ft,e));else if(Tt.attributeCheck instanceof Function&&Tt.attributeCheck(e,t));else if(!wt[e]||St[e]){if(!(ve(t)&&(_t.tagNameCheck instanceof RegExp&&S(_t.tagNameCheck,t)||_t.tagNameCheck instanceof Function&&_t.tagNameCheck(t))&&(_t.attributeNameCheck instanceof RegExp&&S(_t.attributeNameCheck,e)||_t.attributeNameCheck instanceof Function&&_t.attributeNameCheck(e,t))||"is"===e&&_t.allowCustomizedBuiltInElements&&(_t.tagNameCheck instanceof RegExp&&S(_t.tagNameCheck,r)||_t.tagNameCheck instanceof Function&&_t.tagNameCheck(r))))return!1}else if(Gt[e]);else if(S(xt,w(r,yt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==C(r,"data:")||!Ut[t])if(Bt&&!S(gt,w(r,yt,"")));else if(r)return!1;return!0},ve=function(t){return"annotation-xml"!==t&&k(t,mt)},Se=function(t){we(ht.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||be(t))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:wt,forceKeepAttr:void 0};let n=e.length;for(;n--;){const a=e[n],{name:o,namespaceURI:s,value:l}=a,h=le(o),c=l;let u="value"===o?c:_(c);if(i.attrName=h,i.attrValue=u,i.keepAttr=!0,i.forceKeepAttr=void 0,we(ht.uponSanitizeAttribute,t,i),u=i.attrValue,!Pt||"id"!==h&&"name"!==h||(ye(o,t),u="user-content-"+u),$t&&S(/((--!?|])>)|<\/(style|title|textarea)/i,u)){ye(o,t);continue}if("attributename"===h&&k(u,"href")){ye(o,t);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){ye(o,t);continue}if(!Lt&&S(/\/>/i,u)){ye(o,t);continue}Ft&&p([ct,ut,dt],t=>{u=w(u,t," ")});const d=le(t.nodeName);if(_e(d,h,u)){if(rt&&"object"==typeof H&&"function"==typeof H.getAttributeType)if(s);else switch(H.getAttributeType(d,h)){case"TrustedHTML":u=rt.createHTML(u);break;case"TrustedScriptURL":u=rt.createScriptURL(u)}if(u!==c)try{s?t.setAttributeNS(s,o,u):t.setAttribute(o,u),be(t)?ge(t):g(r.removed)}catch(e){ye(o,t)}}else ye(o,t)}we(ht.afterSanitizeAttributes,t,null)},Te=function t(e){let r=null;const i=xe(e);for(we(ht.beforeSanitizeShadowDOM,e,null);r=i.nextNode();)we(ht.uponSanitizeShadowNode,r,null),Ce(r),Se(r),r.content instanceof s&&t(r.content);we(ht.afterSanitizeShadowDOM,e,null)};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,n=null,o=null,l=null;if(te=!t,te&&(t="\x3c!--\x3e"),"string"!=typeof t&&!ke(t)){if("function"!=typeof t.toString)throw T("toString is not a function");if("string"!=typeof(t=t.toString()))throw T("dirty is not a string, aborting")}if(!r.isSupported)return t;if(Dt||de(e),r.removed=[],"string"==typeof t&&(qt=!1),qt){if(t.nodeName){const e=le(t.nodeName);if(!bt[e]||vt[e])throw T("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof u)i=me("\x3c!----\x3e"),n=i.ownerDocument.importNode(t,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?i=n:i.appendChild(n);else{if(!Rt&&!Ft&&!Et&&-1===t.indexOf("<"))return rt&&It?rt.createHTML(t):t;if(i=me(t),!i)return Rt?null:It?it:""}i&&Ot&&ge(i.firstChild);const h=xe(qt?t:i);for(;o=h.nextNode();)Ce(o),Se(o),o.content instanceof s&&Te(o.content);if(qt)return t;if(Rt){if(Kt)for(l=ot.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(wt.shadowroot||wt.shadowrootmode)&&(l=lt.call(a,l,!0)),l}let c=Et?i.outerHTML:i.innerHTML;return Et&&bt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&S(Q,i.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+c),Ft&&p([ct,ut,dt],t=>{c=w(c,t," ")}),rt&&It?rt.createHTML(c):c},r.setConfig=function(){de(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Dt=!0},r.clearConfig=function(){he=null,Dt=!1},r.isValidAttribute=function(t,e,r){he||de({});const i=le(t),n=le(e);return _e(i,n,r)},r.addHook=function(t,e){"function"==typeof e&&y(ht[t],e)},r.removeHook=function(t,e){if(void 0!==e){const r=f(ht[t],e);return-1===r?void 0:m(ht[t],r,1)[0]}return g(ht[t])},r.removeHooks=function(t){ht[t]=[]},r.removeAllHooks=function(){ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}()},7266(t,e,r){"use strict";r.d(e,{A:()=>o});var i=r(6309),n=r(3122);const a=class{constructor(){this.type=n.Z.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=n.Z.ALL}is(t){return this.type===t}},o=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=n.Z.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=i.A.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=i.A.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=i.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=i.A.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=i.A.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=i.A.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},1931(t,e,r){"use strict";r.d(e,{A:()=>g});var i=r(7266),n=r(3122);const a={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(a.re);if(!e)return;const r=e[1],n=parseInt(r,16),o=r.length,s=o%4==0,l=o>4,h=l?1:17,c=l?8:4,u=s?0:-1,d=l?255:15;return i.A.set({r:(n>>c*(u+3)&d)*h,g:(n>>c*(u+2)&d)*h,b:(n>>c*(u+1)&d)*h,a:s?(n&d)*h/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a}=t;return a<1?`#${n.Y[Math.round(e)]}${n.Y[Math.round(r)]}${n.Y[Math.round(i)]}${n.Y[Math.round(255*a)]}`:`#${n.Y[Math.round(e)]}${n.Y[Math.round(r)]}${n.Y[Math.round(i)]}`}},o=a;var s=r(6309);const l={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(l.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return s.A.channel.clamp.h(.9*parseFloat(t));case"rad":return s.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return s.A.channel.clamp.h(360*parseFloat(t))}}return s.A.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(l.re);if(!r)return;const[,n,a,o,h,c]=r;return i.A.set({h:l._hue2deg(n),s:s.A.channel.clamp.s(parseFloat(a)),l:s.A.channel.clamp.l(parseFloat(o)),a:h?s.A.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:n}=t;return n<1?`hsla(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%, ${n})`:`hsl(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%)`}},h=l,c={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=c.colors[t];if(e)return o.parse(e)},stringify:t=>{const e=o.stringify(t);for(const t in c.colors)if(c.colors[t]===e)return t}},u=c,d={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(d.re);if(!r)return;const[,n,a,o,l,h,c,u,p]=r;return i.A.set({r:s.A.channel.clamp.r(a?2.55*parseFloat(n):parseFloat(n)),g:s.A.channel.clamp.g(l?2.55*parseFloat(o):parseFloat(o)),b:s.A.channel.clamp.b(c?2.55*parseFloat(h):parseFloat(h)),a:u?s.A.channel.clamp.a(p?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`rgba(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)}, ${s.A.lang.round(n)})`:`rgb(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)})`}},p=d,f={format:{keyword:c,hex:o,rgb:d,rgba:d,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=o.parse(t)||p.parse(t)||h.parse(t)||u.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(n.Z.HSL)||void 0===t.data.r?h.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?p.stringify(t):o.stringify(t)},g=f},3122(t,e,r){"use strict";r.d(e,{Y:()=>n,Z:()=>a});var i=r(6309);const n={};for(let t=0;t<=255;t++)n[t]=i.A.unit.dec2hex(t);const a={ALL:0,RGB:1,HSL:2}},5635(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(6309),n=r(1931);const a=(t,e,r)=>{const a=n.A.parse(t),o=a[e],s=i.A.channel.clamp[e](o+r);return o!==s&&(a[e]=s),n.A.stringify(a)}},8232(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(6309),n=r(1931);const a=(t,e)=>{const r=n.A.parse(t);for(const t in e)r[t]=i.A.channel.clamp[t](e[t]);return n.A.stringify(r)}},5263(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(5635);const n=(t,e)=>(0,i.A)(t,"l",-e)},5097(t,e,r){"use strict";r.d(e,{A:()=>o});var i=r(6309),n=r(1931);const a=t=>(t=>{const{r:e,g:r,b:a}=n.A.parse(t),o=.2126*i.A.channel.toLinear(e)+.7152*i.A.channel.toLinear(r)+.0722*i.A.channel.toLinear(a);return i.A.lang.round(o)})(t)>=.5,o=t=>!a(t)},8041(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(5635);const n=(t,e)=>(0,i.A)(t,"l",e)},5582(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r(6309),n=r(7266),a=r(1931),o=r(8232);const s=(t,e,r=0,s=1)=>{if("number"!=typeof t)return(0,o.A)(t,{a:e});const l=n.A.set({r:i.A.channel.clamp.r(t),g:i.A.channel.clamp.g(e),b:i.A.channel.clamp.b(r),a:i.A.channel.clamp.a(s)});return a.A.stringify(l)}},6309(t,e,r){"use strict";r.d(e,{A:()=>n});const i={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return 2.55*r;t/=360,e/=100;const a=(r/=100)<.5?r*(1+e):r+e-r*e,o=2*r-a;switch(n){case"r":return 255*i.hue2rgb(o,a,t+1/3);case"g":return 255*i.hue2rgb(o,a,t);case"b":return 255*i.hue2rgb(o,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const n=Math.max(t,e,r),a=Math.min(t,e,r),o=(n+a)/2;if("l"===i)return 100*o;if(n===a)return 0;const s=n-a;if("s"===i)return 100*(o>.5?s/(2-n-a):s/(n+a));switch(n){case t:return 60*((e-r)/s+(e<r?6:0));case e:return 60*((r-t)/s+2);case r:return 60*((t-e)/s+4);default:return-1}}},n={channel:i,lang:{clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},144(t,e,r){"use strict";r.d(e,{C0:()=>m,xA:()=>it,hH:()=>v,Dl:()=>Et,IU:()=>Vt,Wt:()=>Ht,Y2:()=>Rt,a$:()=>Nt,sb:()=>H,ME:()=>se,UI:()=>q,Ch:()=>b,mW:()=>x,DB:()=>g,_3:()=>_t,EJ:()=>f,m7:()=>te,iN:()=>Qt,zj:()=>et,D7:()=>ae,Gs:()=>pe,J$:()=>C,ab:()=>re,Q2:()=>J,P$:()=>E,ID:()=>Ct,TM:()=>ht,Wi:()=>$t,H1:()=>ct,QO:()=>Tt,Js:()=>de,Xd:()=>k,dj:()=>Ot,cL:()=>nt,$i:()=>j,jZ:()=>yt,oB:()=>le,wZ:()=>Z,EI:()=>Jt,SV:()=>Zt,Nk:()=>tt,XV:()=>oe,ke:()=>ee,UU:()=>V,ot:()=>Pt,mj:()=>he,tM:()=>Wt,H$:()=>K,B6:()=>Q});var i=r(797),n=r(1931),a=r(8232);const o=(t,e)=>{const r=n.A.parse(t),i={};for(const t in e)e[t]&&(i[t]=r[t]+e[t]);return(0,a.A)(t,i)};var s=r(5582);const l=(t,e=100)=>{const r=n.A.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((t,e,r=50)=>{const{r:i,g:a,b:o,a:l}=n.A.parse(t),{r:h,g:c,b:u,a:d}=n.A.parse(e),p=r/100,f=2*p-1,g=l-d,y=((f*g===-1?f:(f+g)/(1+f*g))+1)/2,m=1-y,x=i*y+h*m,b=a*y+c*m,k=o*y+u*m,w=l*p+d*(1-p);return(0,s.A)(x,b,k,w)})(r,t,e)};var h,c=r(5263),u=r(8041),d=r(5097),p=r(9418),f=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,g=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,y=/\s*%%.*\n/gm,m=class extends Error{static{(0,i.K2)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},x={},b=(0,i.K2)(function(t,e){t=t.replace(f,"").replace(g,"").replace(y,"\n");for(const[r,{detector:i}]of Object.entries(x))if(i(t,e))return r;throw new m(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),k=(0,i.K2)((...t)=>{for(const{id:e,detector:r,loader:i}of t)w(e,r,i)},"registerLazyLoadedDiagrams"),w=(0,i.K2)((t,e,r)=>{x[t]&&i.Rm.warn(`Detector with key ${t} already exists. Overwriting.`),x[t]={detector:e,loader:r},i.Rm.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),C=(0,i.K2)(t=>x[t].loader,"getDiagramLoader"),_=(0,i.K2)((t,e,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(e=>_(t,e,n)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach(n=>{"object"!=typeof e[n]||void 0!==t[n]&&"object"!=typeof t[n]?(i||"object"!=typeof t[n]&&"object"!=typeof e[n])&&(t[n]=e[n]):(void 0===t[n]&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=_(t[n],e[n],{depth:r-1,clobber:i}))}),t)},"assignWithDepth"),v=_,S="#ffffff",T="#f2f2f2",A=(0,i.K2)((t,e)=>o(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),M=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||l(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||l(this.tertiaryColor),this.lineColor=this.lineColor||l(this.background),this.arrowheadColor=this.arrowheadColor||l(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,c.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,c.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||l(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||(0,c.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,c.A)(this.mainBkg,10)):(this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,c.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,c.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||l(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,c.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||o(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||o(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||o(this.primaryColor,{h:64}),this.fillType3=this.fillType3||o(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||o(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||o(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||o(this.primaryColor,{h:128}),this.fillType7=this.fillType7||o(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||o(this.primaryColor,{l:-10}),this.pie5=this.pie5||o(this.secondaryColor,{l:-10}),this.pie6=this.pie6||o(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||o(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||o(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,d.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,c.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,c.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||o(this.primaryColor,{h:-30}),this.git4=this.git4||o(this.primaryColor,{h:-60}),this.git5=this.git5||o(this.primaryColor,{h:-90}),this.git6=this.git6||o(this.primaryColor,{h:60}),this.git7=this.git7||o(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)):(this.git0=(0,c.A)(this.git0,25),this.git1=(0,c.A)(this.git1,25),this.git2=(0,c.A)(this.git2,25),this.git3=(0,c.A)(this.git3,25),this.git4=(0,c.A)(this.git4,25),this.git5=(0,c.A)(this.git5,25),this.git6=(0,c.A)(this.git6,25),this.git7=(0,c.A)(this.git7,25)),this.gitInv0=this.gitInv0||l(this.git0),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||T}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},B=(0,i.K2)(t=>{const e=new M;return e.calculate(t),e},"getThemeVariables"),L=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,u.A)(this.primaryColor,16),this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=l(this.background),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.tertiaryColor),this.lineColor=l(this.background),this.textColor=l(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,u.A)(l("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,s.A)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=(0,c.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,c.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,s.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,s.A)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,c.A)(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,u.A)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=(0,u.A)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,u.A)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||l(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{h:30,s:-30,l:-(4*t-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,d.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,c.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,c.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,u.A)(this.secondaryColor,20),this.git1=(0,u.A)(this.pie2||this.secondaryColor,20),this.git2=(0,u.A)(this.pie3||this.tertiaryColor,20),this.git3=(0,u.A)(this.pie4||o(this.primaryColor,{h:-30}),20),this.git4=(0,u.A)(this.pie5||o(this.primaryColor,{h:-60}),20),this.git5=(0,u.A)(this.pie6||o(this.primaryColor,{h:-90}),10),this.git6=(0,u.A)(this.pie7||o(this.primaryColor,{h:60}),10),this.git7=(0,u.A)(this.pie8||o(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||l(this.git0),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||l(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||l(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||(0,u.A)(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||(0,u.A)(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},F=(0,i.K2)(t=>{const e=new L;return e.calculate(t),e},"getThemeVariables"),$=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=o(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.tertiaryColor),this.lineColor=l(this.background),this.textColor=l(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=(0,s.A)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,c.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,c.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,c.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,c.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||o(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{h:30,l:-(7+5*t)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||l(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||l(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=(0,u.A)(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,u.A)(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||o(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||o(this.primaryColor,{l:-10}),this.pie5=this.pie5||o(this.secondaryColor,{l:-30}),this.pie6=this.pie6||o(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||o(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||o(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,d.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,c.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||o(this.primaryColor,{h:-30}),this.git4=this.git4||o(this.primaryColor,{h:-60}),this.git5=this.git5||o(this.primaryColor,{h:-90}),this.git6=this.git6||o(this.primaryColor,{h:60}),this.git7=this.git7||o(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)):(this.git0=(0,c.A)(this.git0,25),this.git1=(0,c.A)(this.git1,25),this.git2=(0,c.A)(this.git2,25),this.git3=(0,c.A)(this.git3,25),this.git4=(0,c.A)(this.git4,25),this.git5=(0,c.A)(this.git5,25),this.git6=(0,c.A)(this.git6,25),this.git7=(0,c.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,c.A)(l(this.git0),25),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||l(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||l(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||T}calculate(t){if(Object.keys(this).forEach(t=>{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},E=(0,i.K2)(t=>{const e=new $;return e.calculate(t),e},"getThemeVariables"),D=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,u.A)("#cde498",10),this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.primaryColor),this.lineColor=l(this.background),this.textColor=l(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=(0,c.A)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,c.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,c.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,c.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,c.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||o(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||o(this.primaryColor,{l:-30}),this.pie5=this.pie5||o(this.secondaryColor,{l:-30}),this.pie6=this.pie6||o(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||o(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||o(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,d.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,c.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||o(this.primaryColor,{h:-30}),this.git4=this.git4||o(this.primaryColor,{h:-60}),this.git5=this.git5||o(this.primaryColor,{h:-90}),this.git6=this.git6||o(this.primaryColor,{h:60}),this.git7=this.git7||o(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)):(this.git0=(0,c.A)(this.git0,25),this.git1=(0,c.A)(this.git1,25),this.git2=(0,c.A)(this.git2,25),this.git3=(0,c.A)(this.git3,25),this.git4=(0,c.A)(this.git4,25),this.git5=(0,c.A)(this.git5,25),this.git6=(0,c.A)(this.git6,25),this.git7=(0,c.A)(this.git7,25)),this.gitInv0=this.gitInv0||l(this.git0),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||l(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||l(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||T}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},O=(0,i.K2)(t=>{const e=new D;return e.calculate(t),e},"getThemeVariables"),R=class{static{(0,i.K2)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,u.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.tertiaryColor),this.lineColor=l(this.background),this.textColor=l(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=(0,u.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,u.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||l(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,c.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=(0,u.A)(this.contrast,30),this.sectionBkgColor2=(0,u.A)(this.contrast,30),this.taskBorderColor=(0,c.A)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=(0,u.A)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=(0,c.A)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,d.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,c.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,c.A)(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||o(this.primaryColor,{h:-30}),this.git4=this.pie5||o(this.primaryColor,{h:-60}),this.git5=this.pie6||o(this.primaryColor,{h:-90}),this.git6=this.pie7||o(this.primaryColor,{h:60}),this.git7=this.pie8||o(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||l(this.git0),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||T}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},K={base:{getThemeVariables:B},dark:{getThemeVariables:F},default:{getThemeVariables:E},forest:{getThemeVariables:O},neutral:{getThemeVariables:(0,i.K2)(t=>{const e=new R;return e.calculate(t),e},"getThemeVariables")}},I={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},N={...I,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:K.default.getThemeVariables(),sequence:{...I.sequence,messageFont:(0,i.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:(0,i.K2)(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:(0,i.K2)(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...I.gantt,tickInterval:void 0,useWidth:void 0},c4:{...I.c4,useWidth:void 0,personFont:(0,i.K2)(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...I.flowchart,inheritDir:!1},external_personFont:(0,i.K2)(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:(0,i.K2)(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:(0,i.K2)(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:(0,i.K2)(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:(0,i.K2)(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:(0,i.K2)(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:(0,i.K2)(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:(0,i.K2)(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:(0,i.K2)(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:(0,i.K2)(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:(0,i.K2)(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:(0,i.K2)(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:(0,i.K2)(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:(0,i.K2)(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:(0,i.K2)(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:(0,i.K2)(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:(0,i.K2)(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:(0,i.K2)(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:(0,i.K2)(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:(0,i.K2)(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:(0,i.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...I.pie,useWidth:984},xyChart:{...I.xyChart,useWidth:void 0},requirement:{...I.requirement,useWidth:void 0},packet:{...I.packet},radar:{...I.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},P=(0,i.K2)((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...P(t[i],"")]:[...r,e+i],[]),"keyify"),z=new Set(P(N,"")),q=N,j=(0,i.K2)(t=>{if(i.Rm.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>j(t));else{for(const e of Object.keys(t)){if(i.Rm.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!z.has(e)||null==t[e]){i.Rm.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){i.Rm.debug("sanitizing object",e),j(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(i.Rm.debug("sanitizing css option",e),t[e]=W(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}i.Rm.debug("After sanitization",t)}},"sanitizeDirective"),W=(0,i.K2)(t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?e++:"}"===i&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),H=Object.freeze(q),U=v({},H),Y=[],G=v({},H),X=(0,i.K2)((t,e)=>{let r=v({},t),i={};for(const t of e)rt(t),i=v(i,t);if(r=v(r,i),i.theme&&i.theme in K){const t=v({},h),e=v(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in K&&(r.themeVariables=K[r.theme].getThemeVariables(e))}return lt(G=r),G},"updateCurrentConfig"),V=(0,i.K2)(t=>(U=v({},H),U=v(U,t),t.theme&&K[t.theme]&&(U.themeVariables=K[t.theme].getThemeVariables(t.themeVariables)),X(U,Y),U),"setSiteConfig"),Z=(0,i.K2)(t=>{h=v({},t)},"saveConfigFromInitialize"),Q=(0,i.K2)(t=>(U=v(U,t),X(U,Y),U),"updateSiteConfig"),J=(0,i.K2)(()=>v({},U),"getSiteConfig"),tt=(0,i.K2)(t=>(lt(t),v(G,t),et()),"setConfig"),et=(0,i.K2)(()=>v({},G),"getConfig"),rt=(0,i.K2)(t=>{t&&(["secure",...U.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(i.Rm.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&rt(t[e])}))},"sanitize"),it=(0,i.K2)(t=>{j(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Y.push(t),X(U,Y)},"addDirective"),nt=(0,i.K2)((t=U)=>{X(t,Y=[])},"reset"),at={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},ot={},st=(0,i.K2)(t=>{ot[t]||(i.Rm.warn(at[t]),ot[t]=!0)},"issueWarning"),lt=(0,i.K2)(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&st("LAZY_LOAD_DEPRECATED")},"checkConfig"),ht=(0,i.K2)(()=>{let t={};h&&(t=v(t,h));for(const e of Y)t=v(t,e);return t},"getUserDefinedConfig"),ct=/<br\s*\/?>/gi,ut=(0,i.K2)(t=>t?wt(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),dt=(()=>{let t=!1;return()=>{t||(pt(),t=!0)}})();function pt(){const t="data-temp-href-target";p.A.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),p.A.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}(0,i.K2)(pt,"setupDompurifyHooks");var ft=(0,i.K2)(t=>(dt(),p.A.sanitize(t)),"removeScript"),gt=(0,i.K2)((t,e)=>{if(!1!==e.flowchart?.htmlLabels){const r=e.securityLevel;"antiscript"===r||"strict"===r?t=ft(t):"loose"!==r&&(t=(t=(t=wt(t)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),t=kt(t))}return t},"sanitizeMore"),yt=(0,i.K2)((t,e)=>t?t=e.dompurifyConfig?p.A.sanitize(gt(t,e),e.dompurifyConfig).toString():p.A.sanitize(gt(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),mt=(0,i.K2)((t,e)=>"string"==typeof t?yt(t,e):t.flat().map(t=>yt(t,e)),"sanitizeTextOrArray"),xt=(0,i.K2)(t=>ct.test(t),"hasBreaks"),bt=(0,i.K2)(t=>t.split(ct),"splitBreaks"),kt=(0,i.K2)(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),wt=(0,i.K2)(t=>t.replace(ct,"#br#"),"breakToPlaceholder"),Ct=(0,i.K2)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),_t=(0,i.K2)(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),vt=(0,i.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),St=(0,i.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),Tt=(0,i.K2)(function(t){const e=t.split(/(,)/),r=[];for(let t=0;t<e.length;t++){let i=e[t];if(","===i&&t>0&&t+1<e.length){const n=e[t-1],a=e[t+1];Mt(n,a)&&(i=n+","+a,t++,r.pop())}r.push(Bt(i))}return r.join("")},"parseGenericTypes"),At=(0,i.K2)((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),Mt=(0,i.K2)((t,e)=>{const r=At(t,"~"),i=At(e,"~");return 1===r&&1===i},"shouldCombineSets"),Bt=(0,i.K2)(t=>{const e=At(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;-1!==n&&-1!==a&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Lt=(0,i.K2)(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Ft=/\$\$(.*)\$\$/g,$t=(0,i.K2)(t=>(t.match(Ft)?.length??0)>0,"hasKatex"),Et=(0,i.K2)(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await Ot(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),Dt=(0,i.K2)(async(t,e)=>{if(!$t(t))return t;if(!(Lt()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Ft,"MathML is unsupported in this environment.");{const{default:i}=await r.e(130).then(r.bind(r,2130)),n=e.forceLegacyMathML||!Lt()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(ct).map(t=>$t(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(Ft,(t,e)=>i.renderToString(e,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Ot=(0,i.K2)(async(t,e)=>yt(await Dt(t,e),e),"renderKatexSanitized"),Rt={getRows:ut,sanitizeText:yt,sanitizeTextOrArray:mt,hasBreaks:xt,splitBreaks:bt,lineBreakRegex:ct,removeScript:ft,getUrl:Ct,evaluate:_t,getMax:vt,getMin:St},Kt=(0,i.K2)(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),It=(0,i.K2)(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),Nt=(0,i.K2)(function(t,e,r,i){const n=It(e,r,i);Kt(t,n)},"configureSvgSize"),Pt=(0,i.K2)(function(t,e,r,n){const a=e.node().getBBox(),o=a.width,s=a.height;i.Rm.info(`SVG bounds: ${o}x${s}`,a);let l=0,h=0;i.Rm.info(`Graph bounds: ${l}x${h}`,t),l=o+2*r,h=s+2*r,i.Rm.info(`Calculated bounds: ${l}x${h}`),Nt(e,h,l,n);const c=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;e.attr("viewBox",c)},"setupGraphViewbox"),zt={},qt=(0,i.K2)((t,e,r)=>{let n="";return t in zt&&zt[t]?n=zt[t](r):i.Rm.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${n}\n\n ${e}\n`},"getStyles"),jt=(0,i.K2)((t,e)=>{void 0!==e&&(zt[t]=e)},"addStylesForDiagram"),Wt=qt,Ht={};(0,i.VA)(Ht,{clear:()=>Vt,getAccDescription:()=>te,getAccTitle:()=>Qt,getDiagramTitle:()=>re,setAccDescription:()=>Jt,setAccTitle:()=>Zt,setDiagramTitle:()=>ee});var Ut="",Yt="",Gt="",Xt=(0,i.K2)(t=>yt(t,et()),"sanitizeText"),Vt=(0,i.K2)(()=>{Ut="",Gt="",Yt=""},"clear"),Zt=(0,i.K2)(t=>{Ut=Xt(t).replace(/^\s+/g,"")},"setAccTitle"),Qt=(0,i.K2)(()=>Ut,"getAccTitle"),Jt=(0,i.K2)(t=>{Gt=Xt(t).replace(/\n\s+/g,"\n")},"setAccDescription"),te=(0,i.K2)(()=>Gt,"getAccDescription"),ee=(0,i.K2)(t=>{Yt=Xt(t)},"setDiagramTitle"),re=(0,i.K2)(()=>Yt,"getDiagramTitle"),ie=i.Rm,ne=i.He,ae=et,oe=tt,se=H,le=(0,i.K2)(t=>yt(t,ae()),"sanitizeText"),he=Pt,ce=(0,i.K2)(()=>Ht,"getCommonDb"),ue={},de=(0,i.K2)((t,e,r)=>{ue[t]&&ie.warn(`Diagram with id ${t} already registered. Overwriting.`),ue[t]=e,r&&w(t,r),jt(t,e.styles),e.injectUtils?.(ie,ne,ae,le,he,ce(),()=>{})},"registerDiagram"),pe=(0,i.K2)(t=>{if(t in ue)return ue[t];throw new fe(t)},"getDiagram"),fe=class extends Error{static{(0,i.K2)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},797(t,e,r){"use strict";r.d(e,{He:()=>h,K2:()=>a,Rm:()=>l,VA:()=>o});var i=r(4353),n=Object.defineProperty,a=(t,e)=>n(t,"name",{value:e,configurable:!0}),o=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},s={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:a((...t)=>{},"trace"),debug:a((...t)=>{},"debug"),info:a((...t)=>{},"info"),warn:a((...t)=>{},"warn"),error:a((...t)=>{},"error"),fatal:a((...t)=>{},"fatal")},h=a(function(t="fatal"){let e=s.fatal;"string"==typeof t?t.toLowerCase()in s&&(e=s[t]):"number"==typeof t&&(e=t),l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=s.fatal&&(l.fatal=console.error?console.error.bind(console,c("FATAL"),"color: orange"):console.log.bind(console,"[35m",c("FATAL"))),e<=s.error&&(l.error=console.error?console.error.bind(console,c("ERROR"),"color: orange"):console.log.bind(console,"[31m",c("ERROR"))),e<=s.warn&&(l.warn=console.warn?console.warn.bind(console,c("WARN"),"color: orange"):console.log.bind(console,"[33m",c("WARN"))),e<=s.info&&(l.info=console.info?console.info.bind(console,c("INFO"),"color: lightblue"):console.log.bind(console,"[34m",c("INFO"))),e<=s.debug&&(l.debug=console.debug?console.debug.bind(console,c("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",c("DEBUG"))),e<=s.trace&&(l.trace=console.debug?console.debug.bind(console,c("TRACE"),"color: lightgreen"):console.log.bind(console,"[32m",c("TRACE")))},"setLogLevel"),c=a(t=>`%c${i().format("ss.SSS")} : ${t} : `,"format")},2387(t,e,r){"use strict";r.d(e,{Fr:()=>c,GX:()=>h,KX:()=>l,WW:()=>o,ue:()=>a});var i=r(144),n=r(797),a=(0,n.K2)(t=>{const{handDrawnSeed:e}=(0,i.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),o=(0,n.K2)(t=>{const e=s([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),s=(0,n.K2)(t=>{const e=new Map;return t.forEach(t=>{const[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),l=(0,n.K2)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),h=(0,n.K2)(t=>{const{stylesArray:e}=o(t),r=[],i=[],n=[],a=[];return e.forEach(t=>{const e=t[0];l(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&n.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:n,backgroundStyles:a}},"styles2String"),c=(0,n.K2)((t,e)=>{const{themeVariables:r,handDrawnSeed:n}=(0,i.D7)(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:l}=o(t);return Object.assign({roughness:.7,fill:l.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:l.get("stroke")||a,seed:n,strokeWidth:l.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:u(l.get("stroke-dasharray"))},e)},"userNodeOverrides"),u=(0,n.K2)(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray")},3245(t,e,r){"use strict";r.d(e,{O:()=>i});var i=(0,r(797).K2)(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins")},5553(t,e,r){"use strict";r.d(e,{n:()=>i});var i={name:"mermaid",version:"11.12.3",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.23",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}},3590(t,e,r){"use strict";r.d(e,{D:()=>o});var i=r(144),n=r(797),a=r(1444),o=(0,n.K2)(t=>{const{securityLevel:e}=(0,i.D7)();let r=(0,a.Ltv)("body");if("sandbox"===e){const e=(0,a.Ltv)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,a.Ltv)(i.body)}return r.select(`#${t}`)},"selectSvgElement")},8698(t,e,r){"use strict";r.d(e,{Nq:()=>a,RI:()=>l,hq:()=>n});var i=r(797),n={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},a={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function o(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=s(t),e=s(e);const[r,i]=[t.x,t.y],[n,a]=[e.x,e.y],o=n-r,l=a-i;return{angle:Math.atan(l/o),deltaX:o,deltaY:l}}(0,i.K2)(o,"calculateDeltaAndAngle");var s=(0,i.K2)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),l=(0,i.K2)(t=>({x:(0,i.K2)(function(e,r,i){let a=0;const l=s(i[0]).x<s(i[i.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(n,t.arrowTypeStart)){const{angle:e,deltaX:r}=o(i[0],i[1]);a=n[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(n,t.arrowTypeEnd)){const{angle:e,deltaX:r}=o(i[i.length-1],i[i.length-2]);a=n[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const h=Math.abs(s(e).x-s(i[i.length-1]).x),c=Math.abs(s(e).y-s(i[i.length-1]).y),u=Math.abs(s(e).x-s(i[0]).x),d=Math.abs(s(e).y-s(i[0]).y),p=n[t.arrowTypeStart],f=n[t.arrowTypeEnd];if(h<f&&h>0&&c<f){let t=f+1-h;t*="right"===l?-1:1,a-=t}if(u<p&&u>0&&d<p){let t=p+1-u;t*="right"===l?-1:1,a+=t}return s(e).x+a},"x"),y:(0,i.K2)(function(e,r,i){let a=0;const l=s(i[0]).y<s(i[i.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(n,t.arrowTypeStart)){const{angle:e,deltaY:r}=o(i[0],i[1]);a=n[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(n,t.arrowTypeEnd)){const{angle:e,deltaY:r}=o(i[i.length-1],i[i.length-2]);a=n[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const h=Math.abs(s(e).y-s(i[i.length-1]).y),c=Math.abs(s(e).x-s(i[i.length-1]).x),u=Math.abs(s(e).y-s(i[0]).y),d=Math.abs(s(e).x-s(i[0]).x),p=n[t.arrowTypeStart],f=n[t.arrowTypeEnd];if(h<f&&h>0&&c<f){let t=f+1-h;t*="up"===l?-1:1,a-=t}if(u<p&&u>0&&d<p){let t=p+1-u;t*="up"===l?-1:1,a+=t}return s(e).y+a},"y")}),"getLineFunctionsWithOffset")},7682(t,e,r){"use strict";r.d(e,{W6:()=>te,GZ:()=>ne,WY:()=>zt,pC:()=>It,hE:()=>ie,Gc:()=>Ot});var i=r(3226),n=r(144),a=r(797);const o=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),s=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),h=Object.freeze({...s,...l}),c=Object.freeze({...h,body:"",hidden:!1});function u(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in c)i in l?i in t&&!(i in r)&&(r[i]=l[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function d(t,e,r){const i=t.icons,n=t.aliases||Object.create(null);let a={};function o(t){a=u(i[t]||n[t],a)}return o(e),r.forEach(o),u(t,a)}const p=Object.freeze({width:null,height:null}),f=Object.freeze({...p,...l}),g=/(-?[0-9.]*[0-9]+[0-9.]*)/g,y=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function m(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(g);if(null===i||!i.length)return t;const n=[];let a=i.shift(),o=y.test(a);for(;;){if(o){const t=parseFloat(a);isNaN(t)?n.push(a):n.push(Math.ceil(t*e*r)/r)}else n.push(a);if(a=i.shift(),void 0===a)return n.join("");o=!o}}const x=/\sid="(\S+)"/g,b=new Map;var k=r(1444);var w={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function C(t){w=t}var _={exec:()=>null};function v(t,e=""){let r="string"==typeof t?t:t.source,i={replace:(t,e)=>{let n="string"==typeof e?e:e.source;return n=n.replace(T.caret,"$1"),r=r.replace(t,n),i},getRegex:()=>new RegExp(r,e)};return i}var S=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),T={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},A=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,M=/(?:[*+-]|\d{1,9}[.)])/,B=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,L=v(B).replace(/bull/g,M).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),F=v(B).replace(/bull/g,M).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),$=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,E=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,D=v(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",E).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),O=v(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,M).getRegex(),R="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",K=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,I=v("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",K).replace("tag",R).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),N=v($).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex(),P={blockquote:v(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",N).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:D,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:A,html:I,lheading:L,list:O,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:N,table:_,text:/^[^\n]+/},z=v("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex(),q={...P,lheading:F,table:z,paragraph:v($).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",z).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex()},j={...P,html:v("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",K).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:v($).replace("hr",A).replace("heading"," *#{1,6} *[^\n]").replace("lheading",L).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},W=/^( {2,}|\\)\n(?!\s*$)/,H=/[\p{P}\p{S}]/u,U=/[\s\p{P}\p{S}]/u,Y=/[^\s\p{P}\p{S}]/u,G=v(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,U).getRegex(),X=/(?!~)[\p{P}\p{S}]/u,V=v(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",S?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Z=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Q=v(Z,"u").replace(/punct/g,H).getRegex(),J=v(Z,"u").replace(/punct/g,X).getRegex(),tt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",et=v(tt,"gu").replace(/notPunctSpace/g,Y).replace(/punctSpace/g,U).replace(/punct/g,H).getRegex(),rt=v(tt,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,X).getRegex(),it=v("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Y).replace(/punctSpace/g,U).replace(/punct/g,H).getRegex(),nt=v(/\\(punct)/,"gu").replace(/punct/g,H).getRegex(),at=v(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ot=v(K).replace("(?:--\x3e|$)","--\x3e").getRegex(),st=v("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ot).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),lt=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ht=v(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",lt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ct=v(/^!?\[(label)\]\[(ref)\]/).replace("label",lt).replace("ref",E).getRegex(),ut=v(/^!?\[(ref)\](?:\[\])?/).replace("ref",E).getRegex(),dt=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,pt={_backpedal:_,anyPunctuation:nt,autolink:at,blockSkip:V,br:W,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:_,emStrongLDelim:Q,emStrongRDelimAst:et,emStrongRDelimUnd:it,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:ht,nolink:ut,punctuation:G,reflink:ct,reflinkSearch:v("reflink|nolink(?!\\()","g").replace("reflink",ct).replace("nolink",ut).getRegex(),tag:st,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:_},ft={...pt,link:v(/^!?\[(label)\]\((.*?)\)/).replace("label",lt).getRegex(),reflink:v(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",lt).getRegex()},gt={...pt,emStrongRDelimAst:rt,emStrongLDelim:J,url:v(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",dt).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:v(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",dt).getRegex()},yt={...gt,br:v(W).replace("{2,}","*").getRegex(),text:v(gt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},mt={normal:P,gfm:q,pedantic:j},xt={normal:pt,gfm:gt,breaks:yt,pedantic:ft},bt={"&":"&","<":"<",">":">",'"':""","'":"'"},kt=t=>bt[t];function wt(t,e){if(e){if(T.escapeTest.test(t))return t.replace(T.escapeReplace,kt)}else if(T.escapeTestNoEncode.test(t))return t.replace(T.escapeReplaceNoEncode,kt);return t}function Ct(t){try{t=encodeURI(t).replace(T.percentDecode,"%")}catch{return null}return t}function _t(t,e){let r=t.replace(T.findPipe,(t,e,r)=>{let i=!1,n=e;for(;--n>=0&&"\\"===r[n];)i=!i;return i?"|":" |"}).split(T.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(T.slashPipe,"|");return r}function vt(t,e,r){let i=t.length;if(0===i)return"";let n=0;for(;n<i;){let a=t.charAt(i-n-1);if(a!==e||r){if(a===e||!r)break;n++}else n++}return t.slice(0,i-n)}function St(t,e,r,i,n){let a=e.href,o=e.title||null,s=t[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:"!"===t[0].charAt(0)?"image":"link",raw:r,href:a,title:o,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}var Tt=class{options;rules;lexer;constructor(t){this.options=t||w}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:vt(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],r=function(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(null===i)return e;let n=i[1];return e.split("\n").map(t=>{let e=t.match(r.other.beginningSpace);if(null===e)return t;let[i]=e;return i.length>=n.length?t.slice(n.length):t}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=vt(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:vt(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=vt(e[0],"\n").split("\n"),r="",i="",n=[];for(;t.length>0;){let e,a=!1,o=[];for(e=0;e<t.length;e++)if(this.rules.other.blockquoteStart.test(t[e]))o.push(t[e]),a=!0;else{if(a)break;o.push(t[e])}t=t.slice(e);let s=o.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${s}`:s,i=i?`${i}\n${l}`:l;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,n,!0),this.lexer.state.top=h,0===t.length)break;let c=n.at(-1);if("code"===c?.type)break;if("blockquote"===c?.type){let e=c,a=e.raw+"\n"+t.join("\n"),o=this.blockquote(a);n[n.length-1]=o,r=r.substring(0,r.length-e.raw.length)+o.raw,i=i.substring(0,i.length-e.text.length)+o.text;break}if("list"===c?.type){let e=c,a=e.raw+"\n"+t.join("\n"),o=this.list(a);n[n.length-1]=o,r=r.substring(0,r.length-c.raw.length)+o.raw,i=i.substring(0,i.length-e.raw.length)+o.raw,t=a.substring(n.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:n,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),i=r.length>1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let a=this.rules.other.listItemRegex(r),o=!1;for(;t;){let r=!1,i="",s="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),h=t.split("\n",1)[0],c=!l.trim(),u=0;if(this.options.pedantic?(u=2,s=l.trimStart()):c?u=e[1].length+1:(u=e[2].search(this.rules.other.nonSpaceChar),u=u>4?1:u,s=l.slice(u),u+=e[1].length),c&&this.rules.other.blankLine.test(h)&&(i+=h+"\n",t=t.substring(h.length+1),r=!0),!r){let e=this.rules.other.nextBulletRegex(u),r=this.rules.other.hrRegex(u),n=this.rules.other.fencesBeginRegex(u),a=this.rules.other.headingBeginRegex(u),o=this.rules.other.htmlBeginRegex(u);for(;t;){let d,p=t.split("\n",1)[0];if(h=p,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),d=h):d=h.replace(this.rules.other.tabCharGlobal," "),n.test(h)||a.test(h)||o.test(h)||e.test(h)||r.test(h))break;if(d.search(this.rules.other.nonSpaceChar)>=u||!h.trim())s+="\n"+d.slice(u);else{if(c||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||n.test(l)||a.test(l)||r.test(l))break;s+="\n"+h}!c&&!h.trim()&&(c=!0),i+=p+"\n",t=t.substring(p.length+1),l=d.slice(u)}}n.loose||(o?n.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(o=!0));let d,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(s),p&&(d="[ ] "!==p[0],s=s.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:i,task:!!p,checked:d,loose:!1,text:s,tokens:[]}),n.raw+=i}let s=n.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),n.raw=n.raw.trimEnd();for(let t=0;t<n.items.length;t++)if(this.lexer.state.top=!1,n.items[t].tokens=this.lexer.blockTokens(n.items[t].text,[]),!n.loose){let e=n.items[t].tokens.filter(t=>"space"===t.type),r=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));n.loose=r}if(n.loose)for(let t=0;t<n.items.length;t++)n.items[t].loose=!0;return n}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=_t(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let t of i)this.rules.other.tableAlignRight.test(t)?a.align.push("right"):this.rules.other.tableAlignCenter.test(t)?a.align.push("center"):this.rules.other.tableAlignLeft.test(t)?a.align.push("left"):a.align.push(null);for(let t=0;t<r.length;t++)a.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:a.align[t]});for(let t of n)a.rows.push(_t(t,a.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=vt(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let i=0;i<t.length;i++)if("\\"===t[i])i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return r>0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){let r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),St(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return St(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!r||this.rules.inline.punctuation.exec(r))){let r,n,a=[...i[0]].length-1,o=a,s=0,l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+a);null!=(i=l.exec(e));){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(n=[...r].length,i[3]||i[4]){o+=n;continue}if((i[5]||i[6])&&a%3&&!((a+n)%3)){s+=n;continue}if(o-=n,o>0)continue;n=Math.min(n,n+o+s);let e=[...i[0]][0].length,l=t.slice(0,a+i.index+e+n);if(Math.min(a,n)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=e[0],r="mailto:"+t;else{let i;do{i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(i!==e[0]);t=e[0],r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},At=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||w,this.options.tokenizer=this.options.tokenizer||new Tt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:T,block:mt.normal,inline:xt.normal};this.options.pedantic?(e.block=mt.pedantic,e.inline=xt.pedantic):this.options.gfm&&(e.block=mt.gfm,this.options.breaks?e.inline=xt.breaks:e.inline=xt.gfm),this.tokenizer.rules=e}static get rules(){return{block:mt,inline:xt}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(t){t=t.replace(T.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],r=!1){for(this.options.pedantic&&(t=t.replace(T.tabCharGlobal," ").replace(T.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let r=e.at(-1);1===i.raw.length&&void 0!==r?r.raw+="\n":e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},e.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),e.push(i);continue}let n=t;if(this.options.extensions?.startBlock){let e,r=1/0,i=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(n=t.substring(0,r+1))}if(this.state.top&&(i=this.tokenizer.paragraph(n))){let a=e.at(-1);r&&"paragraph"===a?.type?(a.raw+=(a.raw.endsWith("\n")?"":"\n")+i.raw,a.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(i),r=n.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let r=e.at(-1);"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i=t,n=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(i));)t.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(i));)r=n[2]?n[2].length:0,i=i.slice(0,n.index+r)+"["+"a".repeat(n[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,o="";for(;t;){let r;if(a||(o=""),a=!1,this.options.extensions?.inline?.some(i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);let i=e.at(-1);"text"===r.type&&"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,i,o)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let n=t;if(this.options.extensions?.startInline){let e,r=1/0,i=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(n=t.substring(0,r+1))}if(r=this.tokenizer.inlineText(n)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(o=r.raw.slice(-1)),a=!0;let i=e.at(-1);"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},Mt=class{options;parser;constructor(t){this.options=t||w}space(t){return""}code({text:t,lang:e,escaped:r}){let i=(e||"").match(T.notSpaceStart)?.[0],n=t.replace(T.endingNewline,"")+"\n";return i?'<pre><code class="language-'+wt(i)+'">'+(r?n:wt(n,!0))+"</code></pre>\n":"<pre><code>"+(r?n:wt(n,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){let e=t.ordered,r=t.start,i="";for(let e=0;e<t.items.length;e++){let r=t.items[e];i+=this.listitem(r)}let n=e?"ol":"ul";return"<"+n+(e&&1!==r?' start="'+r+'"':"")+">\n"+i+"</"+n+">\n"}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+wt(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",r="";for(let e=0;e<t.header.length;e++)r+=this.tablecell(t.header[e]);e+=this.tablerow({text:r});let i="";for(let e=0;e<t.rows.length;e++){let n=t.rows[e];r="";for(let t=0;t<n.length;t++)r+=this.tablecell(n[t]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+i+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${wt(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let i=this.parser.parseInline(r),n=Ct(t);if(null===n)return i;let a='<a href="'+(t=n)+'"';return e&&(a+=' title="'+wt(e)+'"'),a+=">"+i+"</a>",a}image({href:t,title:e,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let n=Ct(t);if(null===n)return wt(r);let a=`<img src="${t=n}" alt="${r}"`;return e&&(a+=` title="${wt(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:wt(t.text)}},Bt=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Lt=class t{options;renderer;textRenderer;constructor(t){this.options=t||w,this.options.renderer=this.options.renderer||new Mt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Bt}static parse(e,r){return new t(r).parse(e)}static parseInline(e,r){return new t(r).parseInline(e)}parse(t,e=!0){let r="";for(let i=0;i<t.length;i++){let n=t[i];if(this.options.extensions?.renderers?.[n.type]){let t=n,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(t.type)){r+=e||"";continue}}let a=n;switch(a.type){case"space":r+=this.renderer.space(a);continue;case"hr":r+=this.renderer.hr(a);continue;case"heading":r+=this.renderer.heading(a);continue;case"code":r+=this.renderer.code(a);continue;case"table":r+=this.renderer.table(a);continue;case"blockquote":r+=this.renderer.blockquote(a);continue;case"list":r+=this.renderer.list(a);continue;case"html":r+=this.renderer.html(a);continue;case"def":r+=this.renderer.def(a);continue;case"paragraph":r+=this.renderer.paragraph(a);continue;case"text":{let n=a,o=this.renderer.text(n);for(;i+1<t.length&&"text"===t[i+1].type;)n=t[++i],o+="\n"+this.renderer.text(n);r+=e?this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):o;continue}default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e=this.renderer){let r="";for(let i=0;i<t.length;i++){let n=t[i];if(this.options.extensions?.renderers?.[n.type]){let t=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){r+=t||"";continue}}let a=n;switch(a.type){case"escape":case"text":r+=e.text(a);break;case"html":r+=e.html(a);break;case"link":r+=e.link(a);break;case"image":r+=e.image(a);break;case"strong":r+=e.strong(a);break;case"em":r+=e.em(a);break;case"codespan":r+=e.codespan(a);break;case"br":r+=e.br(a);break;case"del":r+=e.del(a);break;default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}},Ft=class{options;block;constructor(t){this.options=t||w}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?At.lex:At.lexInline}provideParser(){return this.block?Lt.parse:Lt.parseInline}},$t=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Lt;Renderer=Mt;TextRenderer=Bt;Lexer=At;Tokenizer=Tt;Hooks=Ft;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let t=i;for(let i of t.header)r=r.concat(this.walkTokens(i.tokens,e));for(let i of t.rows)for(let t of i)r=r.concat(this.walkTokens(t.tokens,e));break}case"list":{let t=i;r=r.concat(this.walkTokens(t.items,e));break}default:{let t=i;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(i=>{let n=t[i].flat(1/0);r=r.concat(this.walkTokens(n,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),r.extensions=e),t.renderer){let e=this.defaults.renderer||new Mt(this.defaults);for(let r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let i=r,n=t.renderer[i],a=e[i];e[i]=(...t)=>{let r=n.apply(e,t);return!1===r&&(r=a.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new Tt(this.defaults);for(let r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let i=r,n=t.tokenizer[i],a=e[i];e[i]=(...t)=>{let r=n.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new Ft;for(let r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let i=r,n=t.hooks[i],a=e[i];Ft.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async&&Ft.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await n.call(e,t);return a.call(e,r)})();let i=n.call(e,t);return a.call(e,i)}:e[i]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await n.apply(e,t);return!1===r&&(r=await a.apply(e,t)),r})();let r=n.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return At.lex(t,e??this.defaults)}parser(t,e){return Lt.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let i={...r},n={...this.defaults,...i},a=this.onError(!!n.silent,!!n.async);if(!0===this.defaults.async&&!1===i.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||null===e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=t),n.async)return(async()=>{let r=n.hooks?await n.hooks.preprocess(e):e,i=await(n.hooks?await n.hooks.provideLexer():t?At.lex:At.lexInline)(r,n),a=n.hooks?await n.hooks.processAllTokens(i):i;n.walkTokens&&await Promise.all(this.walkTokens(a,n.walkTokens));let o=await(n.hooks?await n.hooks.provideParser():t?Lt.parse:Lt.parseInline)(a,n);return n.hooks?await n.hooks.postprocess(o):o})().catch(a);try{n.hooks&&(e=n.hooks.preprocess(e));let r=(n.hooks?n.hooks.provideLexer():t?At.lex:At.lexInline)(e,n);n.hooks&&(r=n.hooks.processAllTokens(r)),n.walkTokens&&this.walkTokens(r,n.walkTokens);let i=(n.hooks?n.hooks.provideParser():t?Lt.parse:Lt.parseInline)(r,n);return n.hooks&&(i=n.hooks.postprocess(i)),i}catch(t){return a(t)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="<p>An error occurred:</p><pre>"+wt(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function Et(t,e){return $t.parse(t,e)}Et.options=Et.setOptions=function(t){return $t.setOptions(t),Et.defaults=$t.defaults,C(Et.defaults),Et},Et.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},Et.defaults=w,Et.use=function(...t){return $t.use(...t),Et.defaults=$t.defaults,C(Et.defaults),Et},Et.walkTokens=function(t,e){return $t.walkTokens(t,e)},Et.parseInline=$t.parseInline,Et.Parser=Lt,Et.parser=Lt.parse,Et.Renderer=Mt,Et.TextRenderer=Bt,Et.Lexer=At,Et.lexer=At.lex,Et.Tokenizer=Tt,Et.Hooks=Ft,Et.parse=Et,Et.options,Et.setOptions,Et.use,Et.walkTokens,Et.parseInline,Lt.parse,At.lex;var Dt=r(513),Ot={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},Rt=new Map,Kt=new Map,It=(0,a.K2)(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(a.Rm.debug("Registering icon pack:",e.name),"loader"in e)Kt.set(e.name,e.loader);else{if(!("icons"in e))throw a.Rm.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Rt.set(e.name,e.icons)}}},"registerIconPacks"),Nt=(0,a.K2)(async(t,e)=>{const r=((t,e,r,i="")=>{const n=t.split(":");if("@"===t.slice(0,1)){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const t=n.pop(),r=n.pop(),a={provider:n.length>0?n[0]:i,prefix:r,name:t};return e&&!o(a)?null:a}const a=n[0],s=a.split("-");if(s.length>1){const t={provider:i,prefix:s.shift(),name:s.join("-")};return e&&!o(t)?null:t}if(r&&""===i){const t={provider:i,prefix:"",name:a};return e&&!o(t,r)?null:t}return null})(t,!0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let n=Rt.get(i);if(!n){const t=Kt.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await t(),prefix:i},Rt.set(i,n)}catch(t){throw a.Rm.error(t),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=function(t,e){if(t.icons[e])return d(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),n=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach(function t(e){if(r[e])return n[e]=[];if(!(e in n)){n[e]=null;const r=i[e]&&i[e].parent,a=r&&t(r);a&&(n[e]=[r].concat(a))}return n[e]}),n}(t,[e])[e];return r?d(t,e,r):null}(n,r.name);if(!s)throw new Error(`Icon not found: ${t}`);return s},"getRegisteredIconData"),Pt=(0,a.K2)(async t=>{try{return await Nt(t),!0}catch{return!1}},"isIconAvailable"),zt=(0,a.K2)(async(t,e,r)=>{let i;try{i=await Nt(t,e?.fallbackPrefix)}catch(t){a.Rm.error(t),i=Ot}const o=function(t,e){const r={...h,...t},i={...f,...e},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(t=>{const e=[],r=t.hFlip,i=t.vFlip;let o,s=t.rotate;switch(r?i?s+=2:(e.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),e.push("scale(-1 1)"),n.top=n.left=0):i&&(e.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),e.push("scale(1 -1)"),n.top=n.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:o=n.height/2+n.top,e.unshift("rotate(90 "+o.toString()+" "+o.toString()+")");break;case 2:e.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:o=n.width/2+n.left,e.unshift("rotate(-90 "+o.toString()+" "+o.toString()+")")}s%2==1&&(n.left!==n.top&&(o=n.left,n.left=n.top,n.top=o),n.width!==n.height&&(o=n.width,n.width=n.height,n.height=o)),e.length&&(a=function(t,e){const r=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const n=t.indexOf(">",i),a=t.indexOf("</"+e);if(-1===n||-1===a)break;const o=t.indexOf(">",a);if(-1===o)break;r+=t.slice(n+1,a).trim(),t=t.slice(0,i).trim()+t.slice(o+1)}return{defs:r,content:t}}(t);return i=r.defs,n=e+r.content+"</g>",i?"<defs>"+i+"</defs>"+n:n;var i,n}(a,'<g transform="'+e.join(" ")+'">'))});const o=i.width,s=i.height,l=n.width,c=n.height;let u,d;null===o?(d=null===s?"1em":"auto"===s?c:s,u=m(d,l/c)):(u="auto"===o?l:o,d=null===s?m(u,c/l):"auto"===s?c:s);const p={},g=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};g("width",u),g("height",d);const y=[n.left,n.top,l,c];return p.viewBox=y.join(" "),{attributes:p,viewBox:y,body:a}}(i,e),s=function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)r+=" "+t+'="'+e[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}(function(t){const e=[];let r;for(;r=x.exec(t);)e.push(r[1]);if(!e.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return e.forEach(e=>{const r=function(t){t=t.replace(/[0-9]+$/,"")||"a";const e=b.get(t)||0;return b.set(t,e+1),e?`${t}${e}`:t}(e),n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),"")}(o.body),{...o.attributes,...r});return(0,n.jZ)(s,(0,n.zj)())},"getIconSVG");function qt(t,{markdownAutoWrap:e}){const r=t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n"),i=(0,Dt.T)(r);return!1===e?i.replace(/ /g," "):i}function jt(t,e={}){const r=qt(t,e),i=Et.lexer(r),n=[[]];let o=0;function s(t,e="normal"){"text"===t.type?t.text.split("\n").forEach((t,r)=>{0!==r&&(o++,n.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&n[o].push({content:t,type:e})})}):"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&n[o].push({content:t.text,type:"normal"})}return(0,a.K2)(s,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type?n[o].push({content:t.text,type:"normal"}):n[o].push({content:t.raw,type:"normal"})}),n}function Wt(t,{markdownAutoWrap:e}={}){const r=Et.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g," "):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(i).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(i).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(i).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(a.Rm.warn(`Unsupported markdown: ${t.type}`),t.raw)}return(0,a.K2)(i,"output"),r.map(i).join("")}function Ht(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function Ut(t,e){return Yt(t,[],Ht(e.content),e.type)}function Yt(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[n,...a]=r,o=[...e,n];return t([{content:o.join(""),type:i}])?Yt(t,o,a,i):(0===e.length&&n&&(e.push(n),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function Gt(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return Xt(t,e)}function Xt(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let n="";" "===t[0].content&&(n=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},o=[...i];if(""!==n&&o.push({content:n,type:"normal"}),o.push(a),e(o))return Xt(t,e,r,o);if(i.length>0)r.push(i),t.unshift(a);else if(a.content){const[i,n]=Ut(e,a);r.push([i]),n.content&&t.unshift(n)}return Xt(t,e,r)}function Vt(t,e){e&&t.attr("style",e)}async function Zt(t,e,r,i,a=!1,o=(0,n.zj)()){const s=t.append("foreignObject");s.attr("width",10*r+"px"),s.attr("height",10*r+"px");const l=s.append("xhtml:div"),h=(0,n.Wi)(e.label)?await(0,n.dj)(e.label.replace(n.Y2.lineBreakRegex,"\n"),o):(0,n.jZ)(e.label,o),c=e.isNode?"nodeLabel":"edgeLabel",u=l.append("span");u.html(h),Vt(u,e.labelStyle),u.attr("class",`${c} ${i}`),Vt(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),l.style("max-width",r+"px"),l.style("text-align","center"),l.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&l.attr("class","labelBkg");let d=l.node().getBoundingClientRect();return d.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),d=l.node().getBoundingClientRect()),s.node()}function Qt(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function Jt(t,e,r){const i=t.append("text"),n=Qt(i,1,e);re(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}function te(t,e,r){const i=t.append("text"),n=Qt(i,1,e);re(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}function ee(t,e,r,i=!1){const n=e.append("g"),o=n.insert("rect").attr("class","background").attr("style","stroke: none"),s=n.append("text").attr("y","-10.1");let l=0;for(const e of r){const r=(0,a.K2)(e=>Jt(n,1.1,e)<=t,"checkWidth"),i=r(e)?[e]:Gt(e,r);for(const t of i)re(Qt(s,l,1.1),t),l++}if(i){const t=s.node().getBBox(),e=2;return o.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),n.node()}return s.node()}function re(t,e){t.text(""),e.forEach((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(e.content):i.text(" "+e.content)})}async function ie(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,i,a)=>(r.push((async()=>{const r=`${i}:${a}`;return await Pt(r)?await zt(r,void 0,{class:"label-icon"}):`<i class='${(0,n.jZ)(t,e).replace(":"," ")}'></i>`})()),t));const i=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}(0,a.K2)(qt,"preprocessMarkdown"),(0,a.K2)(jt,"markdownToLines"),(0,a.K2)(Wt,"markdownToHTML"),(0,a.K2)(Ht,"splitTextToChars"),(0,a.K2)(Ut,"splitWordToFitWidth"),(0,a.K2)(Yt,"splitWordToFitWidthRecursion"),(0,a.K2)(Gt,"splitLineToFitWidth"),(0,a.K2)(Xt,"splitLineToFitWidthRecursion"),(0,a.K2)(Vt,"applyStyle"),(0,a.K2)(Zt,"addHtmlSpan"),(0,a.K2)(Qt,"createTspan"),(0,a.K2)(Jt,"computeWidthOfText"),(0,a.K2)(te,"computeDimensionOfText"),(0,a.K2)(ee,"createFormattedText"),(0,a.K2)(re,"updateTextContentAndStyles"),(0,a.K2)(ie,"replaceIconSubstring");var ne=(0,a.K2)(async(t,e="",{style:r="",isTitle:o=!1,classes:s="",useHtmlLabels:l=!0,isNode:h=!0,width:c=200,addSvgBackground:u=!1}={},d)=>{if(a.Rm.debug("XYZ createText",e,r,o,s,l,h,"addSvgBackground: ",u),l){const a=Wt(e,d),o=await ie((0,i.Sm)(a),d),l=e.replace(/\\\\/g,"\\"),p={isNode:h,label:(0,n.Wi)(e)?l:o,labelStyle:r.replace("fill:","color:")};return await Zt(t,p,c,s,u,d)}{const i=ee(c,t,jt(e.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),d),!!e&&u);if(h){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,k.Ltv)(i).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,k.Ltv)(i).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,k.Ltv)(i).select("text").attr("style",e)}return i}},"createText")},5894(t,e,r){"use strict";r.d(e,{DA:()=>w,IU:()=>L,U:()=>B,U7:()=>Te,U_:()=>Me,Zk:()=>u,aP:()=>_e,gh:()=>Ae,lC:()=>p,on:()=>Se});var i=r(3245),n=r(2387),a=r(7682),o=r(3226),s=r(144),l=r(797),h=r(1444),c=r(2274),u=(0,l.K2)(async(t,e,r)=>{let i;const n=e.useHtmlLabels||(0,s._3)((0,s.D7)()?.htmlLabels);i=r||"node default";const c=t.insert("g").attr("class",i).attr("id",e.domId||e.id),u=c.insert("g").attr("class","label").attr("style",(0,o.KL)(e.labelStyle));let d;d=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const p=await(0,a.GZ)(u,(0,s.jZ)((0,o.Sm)(d),(0,s.D7)()),{useHtmlLabels:n,width:e.width||(0,s.D7)().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let f=p.getBBox();const g=(e?.padding??0)/2;if(n){const t=p.children[0],e=(0,h.Ltv)(p),r=t.getElementsByTagName("img");if(r){const t=""===d.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=(0,s.D7)().fontSize?(0,s.D7)().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[i=s.UI.fontSize]=(0,o.I5)(t),n=i*r+"px";e.style.minWidth=n,e.style.maxWidth=n}else e.style.width="100%";r(e)}(0,l.K2)(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}return n?u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):u.attr("transform","translate(0, "+-f.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:c,bbox:f,halfPadding:g,label:u}},"labelHelper"),d=(0,l.K2)(async(t,e,r)=>{const i=r.useHtmlLabels||(0,s._3)((0,s.D7)()?.flowchart?.htmlLabels),n=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),l=await(0,a.GZ)(n,(0,s.jZ)((0,o.Sm)(e),(0,s.D7)()),{useHtmlLabels:i,width:r.width||(0,s.D7)()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let c=l.getBBox();const u=r.padding/2;if((0,s._3)((0,s.D7)()?.flowchart?.htmlLabels)){const t=l.children[0],e=(0,h.Ltv)(l);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}return i?n.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):n.attr("transform","translate(0, "+-c.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:t,bbox:c,halfPadding:u,label:n}},"insertLabel"),p=(0,l.K2)((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),f=(0,l.K2)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function g(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function y(t,e,r,i,n,a){const o=[],s=r-t,l=i-e,h=s/a,c=2*Math.PI/h,u=e+l/2;for(let e=0;e<=50;e++){const r=t+e/50*s,i=u+n*Math.sin(c*(r-t));o.push({x:r,y:i})}return o}function m(t,e,r,i,n,a){const o=[],s=n*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let n=0;n<i;n++){const i=s+n*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);o.push({x:-a,y:-h})}return o}(0,l.K2)(g,"createPathFromPoints"),(0,l.K2)(y,"generateFullSineWavePoints"),(0,l.K2)(m,"generateCirclePoints");var x=(0,l.K2)((t,e)=>{var r,i,n=t.x,a=t.y,o=e.x-n,s=e.y-a,l=t.width/2,h=t.height/2;return Math.abs(s)*l>Math.abs(o)*h?(s<0&&(h=-h),r=0===s?0:h*o/s,i=h):(o<0&&(l=-l),r=l,i=0===o?0:l*s/o),{x:n+r,y:a+i}},"intersectRect");function b(t,e){e&&t.attr("style",e)}async function k(t){const e=(0,h.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),i=(0,s.D7)();let n=t.label;t.label&&(0,s.Wi)(t.label)&&(n=await(0,s.dj)(t.label.replace(s.Y2.lineBreakRegex,"\n"),i));const a='<span class="'+(t.isNode?"nodeLabel":"edgeLabel")+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+n+"</span>";return r.html((0,s.jZ)(a,i)),b(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,l.K2)(b,"applyStyle"),(0,l.K2)(k,"addHtmlLabel");var w=(0,l.K2)(async(t,e,r,i)=>{let n=t||"";if("object"==typeof n&&(n=n[0]),(0,s._3)((0,s.D7)().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),l.Rm.info("vertexText"+n);const t={isNode:i,label:(0,o.Sm)(n).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:e?e.replace("fill:","color:"):e};return await k(t)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let i=[];i="string"==typeof n?n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?n:[];for(const e of i){const i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),r?i.setAttribute("class","title-row"):i.setAttribute("class","row"),i.textContent=e.trim(),t.appendChild(i)}return t}},"createLabel"),C=(0,l.K2)((t,e,r,i,n)=>["M",t+n,e,"H",t+r-n,"A",n,n,0,0,1,t+r,e+n,"V",e+i-n,"A",n,n,0,0,1,t+r-n,e+i,"H",t+n,"A",n,n,0,0,1,t,e+i-n,"V",e+n,"A",n,n,0,0,1,t+n,e,"Z"].join(" "),"createRoundedRectPathD"),_=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:o,handDrawnSeed:u}=r,{clusterBkg:d,clusterBorder:p}=o,{labelStyles:f,nodeStyles:g,borderStyles:y,backgroundStyles:m}=(0,n.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),k=(0,s._3)(r.flowchart.htmlLabels),w=b.insert("g").attr("class","cluster-label "),_=await(0,a.GZ)(w,e.label,{style:e.labelStyle,useHtmlLabels:k,isNode:!0});let v=_.getBBox();if((0,s._3)(r.flowchart.htmlLabels)){const t=_.children[0],e=(0,h.Ltv)(_);v=t.getBoundingClientRect(),e.attr("width",v.width),e.attr("height",v.height)}const S=e.width<=v.width+e.padding?v.width+e.padding:e.width;e.width<=v.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height,A=e.x-S/2,M=e.y-T/2;let B;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=c.A.svg(b),r=(0,n.Fr)(e,{roughness:.7,fill:d,stroke:p,fillWeight:3,seed:u}),i=t.path(C(A,M,S,T,0),r);B=b.insert(()=>(l.Rm.debug("Rough node insert CXC",i),i),":first-child"),B.select("path:nth-child(2)").attr("style",y.join(";")),B.select("path").attr("style",m.join(";").replace("fill","stroke"))}else B=b.insert("rect",":first-child"),B.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",A).attr("y",M).attr("width",S).attr("height",T);const{subGraphTitleTopMargin:L}=(0,i.O)(r);if(w.attr("transform",`translate(${e.x-v.width/2}, ${e.y-e.height/2+L})`),f){const t=w.select("span");t&&t.attr("style",f)}const F=B.node().getBBox();return e.offsetX=0,e.width=F.width,e.height=F.height,e.offsetY=v.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:b,labelBBox:v}},"rect"),v=(0,l.K2)((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),n=0*e.padding,a=n/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");const o=i.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return x(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),S=(0,l.K2)(async(t,e)=>{const r=(0,s.D7)(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:l,nodeBorder:u}=i,d=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),p=d.insert("g",":first-child"),f=d.insert("g").attr("class","cluster-label");let g=d.append("rect");const y=f.node().appendChild(await w(e.label,e.labelStyle,void 0,!0));let m=y.getBBox();if((0,s._3)(r.flowchart.htmlLabels)){const t=y.children[0],e=(0,h.Ltv)(y);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}const b=0*e.padding,k=b/2,_=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+b;e.width<=m.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height+b,S=e.height+b-m.height-6,T=e.x-_/2,A=e.y-v/2;e.width=_;const M=e.y-e.height/2-k+m.height+2;let B;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=c.A.svg(d),i=e.rx||e.ry?r.path(C(T,A,_,v,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:n}):r.rectangle(T,A,_,v,{seed:n});B=d.insert(()=>i,":first-child");const s=r.rectangle(T,M,_,S,{fill:t?a:o,fillStyle:t?"hachure":"solid",stroke:u,seed:n});B=d.insert(()=>i,":first-child"),g=d.insert(()=>s)}else{B=p.insert("rect",":first-child");const t="outer";B.attr("class",t).attr("x",T).attr("y",A).attr("width",_).attr("height",v).attr("data-look",e.look),g.attr("class","inner").attr("x",T).attr("y",M).attr("width",_).attr("height",S)}f.attr("transform",`translate(${e.x-m.width/2}, ${A+1-((0,s._3)(r.flowchart.htmlLabels)?0:3)})`);const L=B.node().getBBox();return e.height=L.height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(t){return x(e,t)},{cluster:d,labelBBox:m}},"roundedWithTitle"),T=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:o,handDrawnSeed:u}=r,{clusterBkg:d,clusterBorder:p}=o,{labelStyles:f,nodeStyles:g,borderStyles:y,backgroundStyles:m}=(0,n.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),k=(0,s._3)(r.flowchart.htmlLabels),w=b.insert("g").attr("class","cluster-label "),_=await(0,a.GZ)(w,e.label,{style:e.labelStyle,useHtmlLabels:k,isNode:!0,width:e.width});let v=_.getBBox();if((0,s._3)(r.flowchart.htmlLabels)){const t=_.children[0],e=(0,h.Ltv)(_);v=t.getBoundingClientRect(),e.attr("width",v.width),e.attr("height",v.height)}const S=e.width<=v.width+e.padding?v.width+e.padding:e.width;e.width<=v.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height,A=e.x-S/2,M=e.y-T/2;let B;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=c.A.svg(b),r=(0,n.Fr)(e,{roughness:.7,fill:d,stroke:p,fillWeight:4,seed:u}),i=t.path(C(A,M,S,T,e.rx),r);B=b.insert(()=>(l.Rm.debug("Rough node insert CXC",i),i),":first-child"),B.select("path:nth-child(2)").attr("style",y.join(";")),B.select("path").attr("style",m.join(";").replace("fill","stroke"))}else B=b.insert("rect",":first-child"),B.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",A).attr("y",M).attr("width",S).attr("height",T);const{subGraphTitleTopMargin:L}=(0,i.O)(r);if(w.attr("transform",`translate(${e.x-v.width/2}, ${e.y-e.height/2+L})`),f){const t=w.select("span");t&&t.attr("style",f)}const F=B.node().getBBox();return e.offsetX=0,e.width=F.width,e.height=F.height,e.offsetY=v.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:b,labelBBox:v}},"kanbanSection"),A={rect:_,squareRect:_,roundedWithTitle:S,noteGroup:v,divider:(0,l.K2)((t,e)=>{const r=(0,s.D7)(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=o.insert("g",":first-child"),h=0*e.padding,u=e.width+h;e.diff=-e.padding;const d=e.height+h,p=e.x-u/2,f=e.y-d/2;let g;if(e.width=u,"handDrawn"===e.look){const t=c.A.svg(o).rectangle(p,f,u,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});g=o.insert(()=>t,":first-child")}else{g=l.insert("rect",":first-child");const t="divider";g.attr("class",t).attr("x",p).attr("y",f).attr("width",u).attr("height",d).attr("data-look",e.look)}const y=g.node().getBBox();return e.height=y.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:o,labelBBox:{}}},"divider"),kanbanSection:T},M=new Map,B=(0,l.K2)(async(t,e)=>{const r=e.shape||"rect",i=await A[r](t,e);return M.set(e.id,i),i},"insertCluster"),L=(0,l.K2)(()=>{M=new Map},"clear");function F(t,e){return t.intersect(e)}(0,l.K2)(F,"intersectNode");var $=F;function E(t,e,r,i){var n=t.x,a=t.y,o=n-i.x,s=a-i.y,l=Math.sqrt(e*e*s*s+r*r*o*o),h=Math.abs(e*r*o/l);i.x<n&&(h=-h);var c=Math.abs(e*r*s/l);return i.y<a&&(c=-c),{x:n+h,y:a+c}}(0,l.K2)(E,"intersectEllipse");var D=E;function O(t,e,r){return D(t,e,e,r)}(0,l.K2)(O,"intersectCircle");var R=O;function K(t,e,r,i){{const n=e.y-t.y,a=t.x-e.x,o=e.x*t.y-t.x*e.y,s=n*r.x+a*r.y+o,l=n*i.x+a*i.y+o,h=1e-6;if(0!==s&&0!==l&&I(s,l))return;const c=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,p=c*t.x+u*t.y+d,f=c*e.x+u*e.y+d;if(Math.abs(p)<h&&Math.abs(f)<h&&I(p,f))return;const g=n*u-c*a;if(0===g)return;const y=Math.abs(g/2);let m=a*d-u*o;const x=m<0?(m-y)/g:(m+y)/g;return m=c*o-n*d,{x,y:m<0?(m-y)/g:(m+y)/g}}}function I(t,e){return t*e>0}(0,l.K2)(K,"intersectLine"),(0,l.K2)(I,"sameSign");var N=K;function P(t,e,r){let i=t.x,n=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)}):(o=Math.min(o,e.x),s=Math.min(s,e.y));let l=i-t.width/2-o,h=n-t.height/2-s;for(let i=0;i<e.length;i++){let n=e[i],o=e[i<e.length-1?i+1:0],s=N(t,r,{x:l+n.x,y:h+n.y},{x:l+o.x,y:h+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(t,e){let i=t.x-r.x,n=t.y-r.y,a=Math.sqrt(i*i+n*n),o=e.x-r.x,s=e.y-r.y,l=Math.sqrt(o*o+s*s);return a<l?-1:a===l?0:1}),a[0]):t}(0,l.K2)(P,"intersectPolygon");var z={node:$,circle:R,ellipse:D,polygon:P,rect:x};function q(t,e){const{labelStyles:r}=(0,n.GX)(e);e.labelStyle=r;const i=f(e);let a=i;i||(a="anchor");const s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),{cssStyles:h}=e,u=c.A.svg(s),d=(0,n.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);const g=u.circle(0,0,2,d),y=s.insert(()=>g,":first-child");return y.attr("class","anchor").attr("style",(0,o.KL)(h)),p(e,y),e.intersect=function(t){return l.Rm.info("Circle intersect",e,1,t),z.circle(e,1,t)},s}function j(t,e,r,i,n,a,o){const s=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/n,u=(i-e)/2/a,d=Math.sqrt(c**2+u**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-d**2),f=s+p*a*Math.sin(h)*(o?-1:1),g=l-p*n*Math.cos(h)*(o?-1:1),y=Math.atan2((e-g)/a,(t-f)/n);let m=Math.atan2((i-g)/a,(r-f)/n)-y;o&&m<0&&(m+=2*Math.PI),!o&&m>0&&(m-=2*Math.PI);const x=[];for(let t=0;t<20;t++){const e=y+t/19*m,r=f+n*Math.cos(e),i=g+a*Math.sin(e);x.push({x:r,y:i})}return x}async function W(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.width+e.padding+20,l=o.height+e.padding,h=l/2,d=h/(2.5+l/50),{cssStyles:y}=e,m=[{x:s/2,y:-l/2},{x:-s/2,y:-l/2},...j(-s/2,-l/2,-s/2,l/2,d,h,!1),{x:s/2,y:l/2},...j(s/2,l/2,s/2,-l/2,d,h,!0)],x=c.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=g(m),w=x.path(k,b),C=a.insert(()=>w,":first-child");return C.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${d/2}, 0)`),p(e,C),e.intersect=function(t){return z.polygon(e,m,t)},a}function H(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}async function U(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.height+e.padding,l=o.width+e.padding+12,h=-s,d=[{x:12,y:h},{x:l,y:h},{x:l,y:0},{x:0,y:0},{x:0,y:h+12},{x:12,y:h}];let y;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=g(d),o=t.path(i,r);y=a.insert(()=>o,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),m&&y.attr("style",m)}else y=H(a,l,s,d);return i&&y.attr("style",i),p(e,y),e.intersect=function(t){return z.polygon(e,d,t)},a}function Y(t,e){const{nodeStyles:r}=(0,n.GX)(e);e.label="";const i=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,o=Math.max(28,e.width??0),s=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],l=c.A.svg(i),h=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const u=g(s),d=l.path(u,h),p=i.insert(()=>d,":first-child");return a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),r&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return z.polygon(e,s,t)},i}async function G(t,e,r){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.labelStyle=i;const{shapeSvg:s,bbox:h,halfPadding:d}=await u(t,e,f(e)),g=r?.padding??d,y=h.width/2+g;let m;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=c.A.svg(s),r=(0,n.Fr)(e,{}),i=t.circle(0,0,2*y,r);m=s.insert(()=>i,":first-child"),m.attr("class","basic label-container").attr("style",(0,o.KL)(x))}else m=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",y).attr("cx",0).attr("cy",0);return p(e,m),e.calcIntersect=function(t,e){const r=t.width/2;return z.circle(t,r,e)},e.intersect=function(t){return l.Rm.info("Circle intersect",e,y,t),z.circle(e,y,t)},s}function X(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}function V(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r,e.label="";const a=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),o=Math.max(30,e?.width??0),{cssStyles:s}=e,h=c.A.svg(a),u=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,2*o,u),g=X(o),y=h.path(g,u),m=a.insert(()=>d,":first-child");return m.insert(()=>y),s&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),p(e,m),e.intersect=function(t){return l.Rm.info("crossedCircle intersect",e,{radius:o,point:t}),z.circle(e,o,t)},a}function Z(t,e,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let n=0;n<i;n++){const i=s+n*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);o.push({x:-a,y:-h})}return o}async function Q(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=o.width+(e.padding??0),h=o.height+(e.padding??0),d=Math.max(5,.1*h),{cssStyles:y}=e,m=[...Z(l/2,-h/2,d,30,-90,0),{x:-l/2-d,y:d},...Z(l/2+2*d,-d,d,20,-180,-270),...Z(l/2+2*d,d,d,20,-90,-180),{x:-l/2-d,y:-h/2},...Z(l/2,h/2,d,20,0,90)],x=[{x:l/2,y:-h/2-d},{x:-l/2,y:-h/2-d},...Z(l/2,-h/2,d,20,-90,0),{x:-l/2-d,y:-d},...Z(l/2+.1*l,-d,d,20,-180,-270),...Z(l/2+.1*l,d,d,20,-90,-180),{x:-l/2-d,y:h/2},...Z(l/2,h/2,d,20,0,90),{x:-l/2,y:h/2+d},{x:l/2,y:h/2+d}],b=c.A.svg(a),k=(0,n.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=g(m).replace("Z",""),C=b.path(w,k),_=g(x),v=b.path(_,{...k}),S=a.insert("g",":first-child");return S.insert(()=>v,":first-child").attr("stroke-opacity",0),S.insert(()=>C,":first-child"),S.attr("class","text"),y&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${d}, 0)`),s.attr("transform",`translate(${-l/2+d-(o.x-(o.left??0))},${-h/2+(e.padding??0)/2-(o.y-(o.top??0))})`),p(e,S),e.intersect=function(t){return z.polygon(e,x,t)},a}function J(t,e,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let n=0;n<i;n++){const i=s+n*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);o.push({x:a,y:h})}return o}async function tt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=o.width+(e.padding??0),h=o.height+(e.padding??0),d=Math.max(5,.1*h),{cssStyles:y}=e,m=[...J(l/2,-h/2,d,20,-90,0),{x:l/2+d,y:-d},...J(l/2+2*d,-d,d,20,-180,-270),...J(l/2+2*d,d,d,20,-90,-180),{x:l/2+d,y:h/2},...J(l/2,h/2,d,20,0,90)],x=[{x:-l/2,y:-h/2-d},{x:l/2,y:-h/2-d},...J(l/2,-h/2,d,20,-90,0),{x:l/2+d,y:-d},...J(l/2+2*d,-d,d,20,-180,-270),...J(l/2+2*d,d,d,20,-90,-180),{x:l/2+d,y:h/2},...J(l/2,h/2,d,20,0,90),{x:l/2,y:h/2+d},{x:-l/2,y:h/2+d}],b=c.A.svg(a),k=(0,n.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=g(m).replace("Z",""),C=b.path(w,k),_=g(x),v=b.path(_,{...k}),S=a.insert("g",":first-child");return S.insert(()=>v,":first-child").attr("stroke-opacity",0),S.insert(()=>C,":first-child"),S.attr("class","text"),y&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-d}, 0)`),s.attr("transform",`translate(${-l/2+(e.padding??0)/2-(o.x-(o.left??0))},${-h/2+(e.padding??0)/2-(o.y-(o.top??0))})`),p(e,S),e.intersect=function(t){return z.polygon(e,x,t)},a}function et(t,e,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let n=0;n<i;n++){const i=s+n*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);o.push({x:-a,y:-h})}return o}async function rt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=o.width+(e.padding??0),h=o.height+(e.padding??0),d=Math.max(5,.1*h),{cssStyles:y}=e,m=[...et(l/2,-h/2,d,30,-90,0),{x:-l/2-d,y:d},...et(l/2+2*d,-d,d,20,-180,-270),...et(l/2+2*d,d,d,20,-90,-180),{x:-l/2-d,y:-h/2},...et(l/2,h/2,d,20,0,90)],x=[...et(-l/2+d+d/2,-h/2,d,20,-90,-180),{x:l/2-d/2,y:d},...et(-l/2-d/2,-d,d,20,0,90),...et(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...et(-l/2+d+d/2,h/2,d,30,-180,-270)],b=[{x:l/2,y:-h/2-d},{x:-l/2,y:-h/2-d},...et(l/2,-h/2,d,20,-90,0),{x:-l/2-d,y:-d},...et(l/2+2*d,-d,d,20,-180,-270),...et(l/2+2*d,d,d,20,-90,-180),{x:-l/2-d,y:h/2},...et(l/2,h/2,d,20,0,90),{x:-l/2,y:h/2+d},{x:l/2-d-d/2,y:h/2+d},...et(-l/2+d+d/2,-h/2,d,20,-90,-180),{x:l/2-d/2,y:d},...et(-l/2-d/2,-d,d,20,0,90),...et(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...et(-l/2+d+d/2,h/2,d,30,-180,-270)],k=c.A.svg(a),w=(0,n.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const C=g(m).replace("Z",""),_=k.path(C,w),v=g(x).replace("Z",""),S=k.path(v,w),T=g(b),A=k.path(T,{...w}),M=a.insert("g",":first-child");return M.insert(()=>A,":first-child").attr("stroke-opacity",0),M.insert(()=>_,":first-child"),M.insert(()=>S,":first-child"),M.attr("class","text"),y&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(${d-d/4}, 0)`),s.attr("transform",`translate(${-l/2+(e.padding??0)/2-(o.x-(o.left??0))},${-h/2+(e.padding??0)/2-(o.y-(o.top??0))})`),p(e,M),e.intersect=function(t){return z.polygon(e,b,t)},a}async function it(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(80,1.25*(o.width+2*(e.padding??0)),e?.width??0),l=Math.max(20,o.height+2*(e.padding??0),e?.height??0),h=l/2,{cssStyles:d}=e,y=c.A.svg(a),x=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=s-h,k=l/4,w=[{x:b,y:0},{x:k,y:0},{x:0,y:l/2},{x:k,y:l},{x:b,y:l},...m(-b,-l/2,h,50,270,90)],C=g(w),_=y.path(C,x),v=a.insert(()=>_,":first-child");return v.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-s/2}, ${-l/2})`),p(e,v),e.intersect=function(t){return z.polygon(e,w,t)},a}(0,l.K2)(q,"anchor"),(0,l.K2)(j,"generateArcPoints"),(0,l.K2)(W,"bowTieRect"),(0,l.K2)(H,"insertPolygonShape"),(0,l.K2)(U,"card"),(0,l.K2)(Y,"choice"),(0,l.K2)(G,"circle"),(0,l.K2)(X,"createLine"),(0,l.K2)(V,"crossedCircle"),(0,l.K2)(Z,"generateCirclePoints"),(0,l.K2)(Q,"curlyBraceLeft"),(0,l.K2)(J,"generateCirclePoints"),(0,l.K2)(tt,"curlyBraceRight"),(0,l.K2)(et,"generateCirclePoints"),(0,l.K2)(rt,"curlyBraces"),(0,l.K2)(it,"curvedTrapezoid");var nt=(0,l.K2)((t,e,r,i,n,a)=>[`M${t},${e+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),at=(0,l.K2)((t,e,r,i,n,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),ot=(0,l.K2)((t,e,r,i,n,a)=>[`M${t-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function st(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l}=await u(t,e,f(e)),h=Math.max(s.width+e.padding,e.width??0),d=h/2,g=d/(2.5+h/50),y=Math.max(s.height+g+e.padding,e.height??0);let m;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=at(0,0,h,y,d,g),i=ot(0,g,h,y,d,g),o=t.path(r,(0,n.Fr)(e,{})),s=t.path(i,(0,n.Fr)(e,{fill:"none"}));m=a.insert(()=>s,":first-child"),m=a.insert(()=>o,":first-child"),m.attr("class","basic label-container"),x&&m.attr("style",x)}else{const t=nt(0,0,h,y,d,g);m=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(x)).attr("style",i)}return m.attr("label-offset-y",g),m.attr("transform",`translate(${-h/2}, ${-(y/2+g)})`),p(e,m),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2+(e.padding??0)/1.5-(s.y-(s.top??0))})`),e.intersect=function(t){const r=z.rect(e,t),i=r.x-(e.x??0);if(0!=d&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-g)){let n=g*g*(1-i*i/(d*d));n>0&&(n=Math.sqrt(n)),n=g-n,t.y-(e.y??0)>0&&(n=-n),r.y+=n}return r},a}async function lt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=o.width+e.padding,h=o.height+e.padding,d=.2*h,g=-l/2,y=-h/2-d/2,{cssStyles:m}=e,x=c.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=[{x:g,y:y+d},{x:-g,y:y+d},{x:-g,y:-y},{x:g,y:-y},{x:g,y},{x:-g,y},{x:-g,y:y+d}],w=x.polygon(k.map(t=>[t.x,t.y]),b),C=a.insert(()=>w,":first-child");return C.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),s.attr("transform",`translate(${g+(e.padding??0)/2-(o.x-(o.left??0))}, ${y+d+(e.padding??0)/2-(o.y-(o.top??0))})`),p(e,C),e.intersect=function(t){return z.rect(e,t)},a}async function ht(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:h}=await u(t,e,f(e)),d=s.width/2+h+5,g=s.width/2+h;let y;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{roughness:.2,strokeWidth:2.5}),i=(0,n.Fr)(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*d,r),l=t.circle(0,0,2*g,i);y=a.insert("g",":first-child"),y.attr("class",(0,o.KL)(e.cssClasses)).attr("style",(0,o.KL)(m)),y.node()?.appendChild(s),y.node()?.appendChild(l)}else{y=a.insert("g",":first-child");const t=y.insert("circle",":first-child"),e=y.insert("circle");y.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",d).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",g).attr("cx",0).attr("cy",0)}return p(e,y),e.intersect=function(t){return l.Rm.info("DoubleCircle intersect",e,d,t),z.circle(e,d,t)},a}function ct(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.label="",e.labelStyle=i;const o=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,h=c.A.svg(o),{nodeBorder:u}=r,d=(0,n.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);const g=h.circle(0,0,14,d),y=o.insert(()=>g,":first-child");return y.selectAll("path").attr("style",`fill: ${u} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",s),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),p(e,y),e.intersect=function(t){return l.Rm.info("filledCircle intersect",e,{radius:7,point:t}),z.circle(e,7,t)},o}async function ut(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),h=o.width+(e.padding??0),d=h+o.height,y=h+o.height,m=[{x:0,y:-d},{x:y,y:-d},{x:y/2,y:0}],{cssStyles:x}=e,b=c.A.svg(a),k=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=g(m),C=b.path(w,k),_=a.insert(()=>C,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`);return x&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",i),e.width=h,e.height=d,p(e,_),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-d/2+(e.padding??0)/2+(o.y-(o.top??0))})`),e.intersect=function(t){return l.Rm.info("Triangle intersect",e,m,t),z.polygon(e,m,t)},a}function dt(t,e,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:o}=(0,n.GX)(e);e.label="";const s=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:l}=e;let h=Math.max(70,e?.width??0),u=Math.max(10,e?.height??0);"LR"===r&&(h=Math.max(10,e?.width??0),u=Math.max(70,e?.height??0));const d=-1*h/2,g=-1*u/2,y=c.A.svg(s),m=(0,n.Fr)(e,{stroke:a.lineColor,fill:a.lineColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const x=y.rectangle(d,g,h,u,m),b=s.insert(()=>x,":first-child");l&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",l),o&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",o),p(e,b);const k=i?.padding??0;return e.width&&e.height&&(e.width+=k/2||0,e.height+=k/2||0),e.intersect=function(t){return z.rect(e,t)},s}async function pt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(80,o.width+2*(e.padding??0),e?.width??0),h=Math.max(50,o.height+2*(e.padding??0),e?.height??0),d=h/2,{cssStyles:y}=e,x=c.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=[{x:-s/2,y:-h/2},{x:s/2-d,y:-h/2},...m(-s/2+d,0,d,50,90,270),{x:s/2-d,y:h/2},{x:-s/2,y:h/2}],w=g(k),C=x.path(w,b),_=a.insert(()=>C,":first-child");return _.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",y),i&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",i),p(e,_),e.intersect=function(t){return l.Rm.info("Pill intersect",e,{radius:d,point:t}),z.polygon(e,k,t)},a}async function ft(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.height+(e.padding??0),l=o.width+2.5*(e.padding??0),{cssStyles:h}=e,d=c.A.svg(a),y=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");let m=l/2;m+=m/6;const x=s/2,b=m-x/2,k=[{x:-b,y:-x},{x:0,y:-x},{x:b,y:-x},{x:m,y:0},{x:b,y:x},{x:0,y:x},{x:-b,y:x},{x:-m,y:0}],w=g(k),C=d.path(w,y),_=a.insert(()=>C,":first-child");return _.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",i),e.width=l,e.height=s,p(e,_),e.intersect=function(t){return z.polygon(e,k,t)},a}async function gt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.label="",e.labelStyle=r;const{shapeSvg:a}=await u(t,e,f(e)),o=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:h}=e,d=c.A.svg(a),y=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],x=g(m),b=d.path(x,y),k=a.insert(()=>b,":first-child");return k.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",i),k.attr("transform",`translate(${-o/2}, ${-s/2})`),p(e,k),e.intersect=function(t){return l.Rm.info("Pill intersect",e,{points:m}),z.polygon(e,m,t)},a}async function yt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=(0,n.GX)(e);e.labelStyle=o;const s=e.assetHeight??48,h=e.assetWidth??48,d=Math.max(s,h),f=i?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:y,label:m}=await u(t,e,"icon-shape default"),x="t"===e.pos,b=d,k=d,{nodeBorder:w}=r,{stylesMap:C}=(0,n.WW)(e),_=-k/2,v=-b/2,S=e.label?8:0,T=c.A.svg(g),A=(0,n.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");const M=T.rectangle(_,v,k,b,A),B=Math.max(k,y.width),L=b+y.height+S,F=T.rectangle(-B/2,-L/2,B,L,{...A,fill:"transparent",stroke:"none"}),$=g.insert(()=>M,":first-child"),E=g.insert(()=>F);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,n=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-i/2-o},${x?y.height/2+S/2-n/2-s:-y.height/2-S/2-n/2-s})`),t.attr("style",`color: ${C.get("stroke")??w};`)}return m.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${x?-L/2:L/2-y.height})`),$.attr("transform",`translate(0,${x?y.height/2+S/2:-y.height/2-S/2})`),p(e,E),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return z.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let a=[];return a=x?[{x:r-y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2+y.height+S},{x:r+k/2,y:i-n/2+y.height+S},{x:r+k/2,y:i+n/2},{x:r-k/2,y:i+n/2},{x:r-k/2,y:i-n/2+y.height+S},{x:r-y.width/2,y:i-n/2+y.height+S}]:[{x:r-k/2,y:i-n/2},{x:r+k/2,y:i-n/2},{x:r+k/2,y:i-n/2+b},{x:r+y.width/2,y:i-n/2+b},{x:r+y.width/2/2,y:i+n/2},{x:r-y.width/2,y:i+n/2},{x:r-y.width/2,y:i-n/2+b},{x:r-k/2,y:i-n/2+b}],z.polygon(e,a,t)},g}async function mt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=(0,n.GX)(e);e.labelStyle=o;const s=e.assetHeight??48,h=e.assetWidth??48,d=Math.max(s,h),f=i?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:y,label:m}=await u(t,e,"icon-shape default"),x=e.label?8:0,b="t"===e.pos,{nodeBorder:k,mainBkg:w}=r,{stylesMap:C}=(0,n.WW)(e),_=c.A.svg(g),v=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const S=C.get("fill");v.stroke=S??w;const T=g.append("g");e.icon&&T.html(`<g>${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const A=T.node().getBBox(),M=A.width,B=A.height,L=A.x,F=A.y,$=Math.max(M,B)*Math.SQRT2+40,E=_.circle(0,0,$,v),D=Math.max($,y.width),O=$+y.height+x,R=_.rectangle(-D/2,-O/2,D,O,{...v,fill:"transparent",stroke:"none"}),K=g.insert(()=>E,":first-child"),I=g.insert(()=>R);return T.attr("transform",`translate(${-M/2-L},${b?y.height/2+x/2-B/2-F:-y.height/2-x/2-B/2-F})`),T.attr("style",`color: ${C.get("stroke")??k};`),m.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${b?-O/2:O/2-y.height})`),K.attr("transform",`translate(0,${b?y.height/2+x/2:-y.height/2-x/2})`),p(e,I),e.intersect=function(t){return l.Rm.info("iconSquare intersect",e,t),z.rect(e,t)},g}async function xt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=(0,n.GX)(e);e.labelStyle=o;const s=e.assetHeight??48,h=e.assetWidth??48,d=Math.max(s,h),f=i?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:y,halfPadding:m,label:x}=await u(t,e,"icon-shape default"),b="t"===e.pos,k=d+2*m,w=d+2*m,{nodeBorder:_,mainBkg:v}=r,{stylesMap:S}=(0,n.WW)(e),T=-w/2,A=-k/2,M=e.label?8:0,B=c.A.svg(g),L=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const F=S.get("fill");L.stroke=F??v;const $=B.path(C(T,A,w,k,5),L),E=Math.max(w,y.width),D=k+y.height+M,O=B.rectangle(-E/2,-D/2,E,D,{...L,fill:"transparent",stroke:"none"}),R=g.insert(()=>$,":first-child").attr("class","icon-shape2"),K=g.insert(()=>O);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,n=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-i/2-o},${b?y.height/2+M/2-n/2-s:-y.height/2-M/2-n/2-s})`),t.attr("style",`color: ${S.get("stroke")??_};`)}return x.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${b?-D/2:D/2-y.height})`),R.attr("transform",`translate(0,${b?y.height/2+M/2:-y.height/2-M/2})`),p(e,K),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return z.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let a=[];return a=b?[{x:r-y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2+y.height+M},{x:r+w/2,y:i-n/2+y.height+M},{x:r+w/2,y:i+n/2},{x:r-w/2,y:i+n/2},{x:r-w/2,y:i-n/2+y.height+M},{x:r-y.width/2,y:i-n/2+y.height+M}]:[{x:r-w/2,y:i-n/2},{x:r+w/2,y:i-n/2},{x:r+w/2,y:i-n/2+k},{x:r+y.width/2,y:i-n/2+k},{x:r+y.width/2/2,y:i+n/2},{x:r-y.width/2,y:i+n/2},{x:r-y.width/2,y:i-n/2+k},{x:r-w/2,y:i-n/2+k}],z.polygon(e,a,t)},g}async function bt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=(0,n.GX)(e);e.labelStyle=o;const s=e.assetHeight??48,h=e.assetWidth??48,d=Math.max(s,h),f=i?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:y,halfPadding:m,label:x}=await u(t,e,"icon-shape default"),b="t"===e.pos,k=d+2*m,w=d+2*m,{nodeBorder:_,mainBkg:v}=r,{stylesMap:S}=(0,n.WW)(e),T=-w/2,A=-k/2,M=e.label?8:0,B=c.A.svg(g),L=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const F=S.get("fill");L.stroke=F??v;const $=B.path(C(T,A,w,k,.1),L),E=Math.max(w,y.width),D=k+y.height+M,O=B.rectangle(-E/2,-D/2,E,D,{...L,fill:"transparent",stroke:"none"}),R=g.insert(()=>$,":first-child"),K=g.insert(()=>O);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,n=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-i/2-o},${b?y.height/2+M/2-n/2-s:-y.height/2-M/2-n/2-s})`),t.attr("style",`color: ${S.get("stroke")??_};`)}return x.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${b?-D/2:D/2-y.height})`),R.attr("transform",`translate(0,${b?y.height/2+M/2:-y.height/2-M/2})`),p(e,K),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return z.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let a=[];return a=b?[{x:r-y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2+y.height+M},{x:r+w/2,y:i-n/2+y.height+M},{x:r+w/2,y:i+n/2},{x:r-w/2,y:i+n/2},{x:r-w/2,y:i-n/2+y.height+M},{x:r-y.width/2,y:i-n/2+y.height+M}]:[{x:r-w/2,y:i-n/2},{x:r+w/2,y:i-n/2},{x:r+w/2,y:i-n/2+k},{x:r+y.width/2,y:i-n/2+k},{x:r+y.width/2/2,y:i+n/2},{x:r-y.width/2,y:i+n/2},{x:r-y.width/2,y:i-n/2+k},{x:r-w/2,y:i-n/2+k}],z.polygon(e,a,t)},g}async function kt(t,e,{config:{flowchart:r}}){const i=new Image;i.src=e?.img??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/o;const{labelStyles:s}=(0,n.GX)(e);e.labelStyle=s;const h=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const d=Math.max(e.label?h??0:0,e?.assetWidth??a),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:d,g="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??o;e.width=Math.max(f,h??0);const{shapeSvg:y,bbox:m,label:x}=await u(t,e,"image-shape default"),b="t"===e.pos,k=-f/2,w=-g/2,C=e.label?8:0,_=c.A.svg(y),v=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const S=_.rectangle(k,w,f,g,v),T=Math.max(f,m.width),A=g+m.height+C,M=_.rectangle(-T/2,-A/2,T,A,{...v,fill:"none",stroke:"none"}),B=y.insert(()=>S,":first-child"),L=y.insert(()=>M);if(e.img){const t=y.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",g),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${b?A/2-g:-A/2})`)}return x.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${b?-g/2-m.height/2-C/2:g/2-m.height/2+C/2})`),B.attr("transform",`translate(0,${b?m.height/2+C/2:-m.height/2-C/2})`),p(e,L),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return z.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let a=[];return a=b?[{x:r-m.width/2,y:i-n/2},{x:r+m.width/2,y:i-n/2},{x:r+m.width/2,y:i-n/2+m.height+C},{x:r+f/2,y:i-n/2+m.height+C},{x:r+f/2,y:i+n/2},{x:r-f/2,y:i+n/2},{x:r-f/2,y:i-n/2+m.height+C},{x:r-m.width/2,y:i-n/2+m.height+C}]:[{x:r-f/2,y:i-n/2},{x:r+f/2,y:i-n/2},{x:r+f/2,y:i-n/2+g},{x:r+m.width/2,y:i-n/2+g},{x:r+m.width/2/2,y:i+n/2},{x:r-m.width/2,y:i+n/2},{x:r-m.width/2,y:i-n/2+g},{x:r-f/2,y:i-n/2+g}],z.polygon(e,a,t)},y}async function wt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),h=[{x:0,y:0},{x:s,y:0},{x:s+3*l/6,y:-l},{x:-3*l/6,y:-l}];let d;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=g(h),o=t.path(i,r);d=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),y&&d.attr("style",y)}else d=H(a,s,l,h);return i&&d.attr("style",i),e.width=s,e.height=l,p(e,d),e.intersect=function(t){return z.polygon(e,h,t)},a}async function Ct(t,e,r){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.labelStyle=i;const{shapeSvg:s,bbox:l}=await u(t,e,f(e)),h=Math.max(l.width+2*r.labelPaddingX,e?.width||0),d=Math.max(l.height+2*r.labelPaddingY,e?.height||0),g=-h/2,y=-d/2;let m,{rx:x,ry:b}=e;const{cssStyles:k}=e;if(r?.rx&&r.ry&&(x=r.rx,b=r.ry),"handDrawn"===e.look){const t=c.A.svg(s),r=(0,n.Fr)(e,{}),i=x||b?t.path(C(g,y,h,d,x||0),r):t.rectangle(g,y,h,d,r);m=s.insert(()=>i,":first-child"),m.attr("class","basic label-container").attr("style",(0,o.KL)(k))}else m=s.insert("rect",":first-child"),m.attr("class","basic label-container").attr("style",a).attr("rx",(0,o.KL)(x)).attr("ry",(0,o.KL)(b)).attr("x",g).attr("y",y).attr("width",h).attr("height",d);return p(e,m),e.calcIntersect=function(t,e){return z.rect(t,e)},e.intersect=function(t){return z.rect(e,t)},s}async function _t(t,e){const{shapeSvg:r,bbox:i,label:n}=await u(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),p(e,a),e.intersect=function(t){return z.rect(e,t)},r}async function vt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+(e.padding??0),e?.width??0),l=Math.max(o.height+(e.padding??0),e?.height??0),h=[{x:0,y:0},{x:s+3*l/6,y:0},{x:s,y:-l},{x:-3*l/6,y:-l}];let d;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=g(h),o=t.path(i,r);d=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),y&&d.attr("style",y)}else d=H(a,s,l,h);return i&&d.attr("style",i),e.width=s,e.height=l,p(e,d),e.intersect=function(t){return z.polygon(e,h,t)},a}async function St(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+(e.padding??0),e?.width??0),l=Math.max(o.height+(e.padding??0),e?.height??0),h=[{x:-3*l/6,y:0},{x:s,y:0},{x:s+3*l/6,y:-l},{x:0,y:-l}];let d;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=g(h),o=t.path(i,r);d=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),y&&d.attr("style",y)}else d=H(a,s,l,h);return i&&d.attr("style",i),e.width=s,e.height=l,p(e,d),e.intersect=function(t){return z.polygon(e,h,t)},a}function Tt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.label="",e.labelStyle=r;const a=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,s=Math.max(35,e?.width??0),h=Math.max(35,e?.height??0),u=[{x:s,y:0},{x:0,y:h+3.5},{x:s-14,y:h+3.5},{x:0,y:2*h},{x:s,y:h-3.5},{x:14,y:h-3.5}],d=c.A.svg(a),y=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=g(u),x=d.path(m,y),b=a.insert(()=>x,":first-child");return o&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",o),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(-${s/2},${-h})`),p(e,b),e.intersect=function(t){return l.Rm.info("lightningBolt intersect",e,t),z.polygon(e,u,t)},a}(0,l.K2)(st,"cylinder"),(0,l.K2)(lt,"dividedRectangle"),(0,l.K2)(ht,"doublecircle"),(0,l.K2)(ct,"filledCircle"),(0,l.K2)(ut,"flippedTriangle"),(0,l.K2)(dt,"forkJoin"),(0,l.K2)(pt,"halfRoundedRectangle"),(0,l.K2)(ft,"hexagon"),(0,l.K2)(gt,"hourglass"),(0,l.K2)(yt,"icon"),(0,l.K2)(mt,"iconCircle"),(0,l.K2)(xt,"iconRounded"),(0,l.K2)(bt,"iconSquare"),(0,l.K2)(kt,"imageSquare"),(0,l.K2)(wt,"inv_trapezoid"),(0,l.K2)(Ct,"drawRect"),(0,l.K2)(_t,"labelRect"),(0,l.K2)(vt,"lean_left"),(0,l.K2)(St,"lean_right"),(0,l.K2)(Tt,"lightningBolt");var At=(0,l.K2)((t,e,r,i,n,a,o)=>[`M${t},${e+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Mt=(0,l.K2)((t,e,r,i,n,a,o)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Bt=(0,l.K2)((t,e,r,i,n,a)=>[`M${t-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Lt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l}=await u(t,e,f(e)),h=Math.max(s.width+(e.padding??0),e.width??0),d=h/2,g=d/(2.5+h/50),y=Math.max(s.height+g+(e.padding??0),e.height??0),m=.1*y;let x;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=Mt(0,0,h,y,d,g,m),i=Bt(0,g,h,y,d,g),o=(0,n.Fr)(e,{}),s=t.path(r,o),l=t.path(i,o);a.insert(()=>l,":first-child").attr("class","line"),x=a.insert(()=>s,":first-child"),x.attr("class","basic label-container"),b&&x.attr("style",b)}else{const t=At(0,0,h,y,d,g,m);x=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(b)).attr("style",i)}return x.attr("label-offset-y",g),x.attr("transform",`translate(${-h/2}, ${-(y/2+g)})`),p(e,x),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2+g-(s.y-(s.top??0))})`),e.intersect=function(t){const r=z.rect(e,t),i=r.x-(e.x??0);if(0!=d&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-g)){let n=g*g*(1-i*i/(d*d));n>0&&(n=Math.sqrt(n)),n=g-n,t.y-(e.y??0)>0&&(n=-n),r.y+=n}return r},a}async function Ft(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),h=Math.max(o.height+2*(e.padding??0),e?.height??0),d=h/4,g=h+d,{cssStyles:m}=e,x=c.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=[{x:-l/2-l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:g/2},...y(-l/2-l/2*.1,g/2,l/2+l/2*.1,g/2,d,.8),{x:l/2+l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:-g/2},{x:-l/2,y:-g/2},{x:-l/2,y:g/2*1.1},{x:-l/2,y:-g/2}],w=x.polygon(k.map(t=>[t.x,t.y]),b),C=a.insert(()=>w,":first-child");return C.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)+l/2*.1/2-(o.x-(o.left??0))},${-h/2+(e.padding??0)-d/2-(o.y-(o.top??0))})`),p(e,C),e.intersect=function(t){return z.polygon(e,k,t)},a}async function $t(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),h=Math.max(o.height+2*(e.padding??0),e?.height??0),d=-l/2,y=-h/2,{cssStyles:m}=e,x=c.A.svg(a),b=(0,n.Fr)(e,{}),k=[{x:d-5,y:y+5},{x:d-5,y:y+h+5},{x:d+l-5,y:y+h+5},{x:d+l-5,y:y+h},{x:d+l,y:y+h},{x:d+l,y:y+h-5},{x:d+l+5,y:y+h-5},{x:d+l+5,y:y-5},{x:d+5,y:y-5},{x:d+5,y},{x:d,y},{x:d,y:y+5}],w=[{x:d,y:y+5},{x:d+l-5,y:y+5},{x:d+l-5,y:y+h},{x:d+l,y:y+h},{x:d+l,y},{x:d,y}];"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const C=g(k),_=x.path(C,b),v=g(w),S=x.path(v,{...b,fill:"none"}),T=a.insert(()=>S,":first-child");return T.insert(()=>_,":first-child"),T.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),s.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-(o.y-(o.top??0))})`),p(e,T),e.intersect=function(t){return z.polygon(e,k,t)},a}async function Et(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),h=Math.max(o.height+2*(e.padding??0),e?.height??0),d=h/4,m=h+d,x=-l/2,b=-m/2,{cssStyles:k}=e,w=y(x-5,b+m+5,x+l-5,b+m+5,d,.8),C=w?.[w.length-1],_=[{x:x-5,y:b+5},{x:x-5,y:b+m+5},...w,{x:x+l-5,y:C.y-5},{x:x+l,y:C.y-5},{x:x+l,y:C.y-10},{x:x+l+5,y:C.y-10},{x:x+l+5,y:b-5},{x:x+5,y:b-5},{x:x+5,y:b},{x,y:b},{x,y:b+5}],v=[{x,y:b+5},{x:x+l-5,y:b+5},{x:x+l-5,y:C.y-5},{x:x+l,y:C.y-5},{x:x+l,y:b},{x,y:b}],S=c.A.svg(a),T=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const A=g(_),M=S.path(A,T),B=g(v),L=S.path(B,T),F=a.insert(()=>M,":first-child");return F.insert(()=>L),F.attr("class","basic label-container"),k&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-d/2-(o.y-(o.top??0))})`),p(e,F),e.intersect=function(t){return z.polygon(e,_,t)},a}async function Dt(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.labelStyle=i,e.useHtmlLabels||!1!==(0,s.zj)().flowchart?.htmlLabels||(e.centerLabel=!0);const{shapeSvg:o,bbox:l,label:h}=await u(t,e,f(e)),d=Math.max(l.width+2*(e.padding??0),e?.width??0),g=Math.max(l.height+2*(e.padding??0),e?.height??0),y=-d/2,m=-g/2,{cssStyles:x}=e,b=c.A.svg(o),k=(0,n.Fr)(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=b.rectangle(y,m,d,g,k),C=o.insert(()=>w,":first-child");return C.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",x),a&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",a),h.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),p(e,C),e.intersect=function(t){return z.rect(e,t)},o}(0,l.K2)(Lt,"linedCylinder"),(0,l.K2)(Ft,"linedWaveEdgedRect"),(0,l.K2)($t,"multiRect"),(0,l.K2)(Et,"multiWaveEdgedRectangle"),(0,l.K2)(Dt,"note");var Ot=(0,l.K2)((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Rt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.width+e.padding+(o.height+e.padding),l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let h;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=Ot(0,0,s),o=t.path(i,r);h=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2+.5}, ${s/2})`),d&&h.attr("style",d)}else h=H(a,s,s,l),h.attr("transform",`translate(${-s/2+.5}, ${s/2})`);return i&&h.attr("style",i),p(e,h),e.calcIntersect=function(t,e){const r=t.width,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],n=z.polygon(t,i,e);return{x:n.x-.5,y:n.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},a}async function Kt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=-Math.max(o.width+(e.padding??0),e?.width??0)/2,h=-Math.max(o.height+(e.padding??0),e?.height??0)/2,d=h/2,y=[{x:l+d,y:h},{x:l,y:0},{x:l+d,y:-h},{x:-l,y:-h},{x:-l,y:h}],{cssStyles:m}=e,x=c.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=g(y),w=x.path(k,b),C=a.insert(()=>w,":first-child");return C.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${-d/2},0)`),s.attr("transform",`translate(${-d/2-o.width/2-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),p(e,C),e.intersect=function(t){return z.polygon(e,y,t)},a}async function It(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);let a;e.labelStyle=r,a=e.cssClasses?"node "+e.cssClasses:"node default";const o=t.insert("g").attr("class",a).attr("id",e.domId||e.id),u=o.insert("g"),d=o.insert("g").attr("class","label").attr("style",i),f=e.description,g=e.label,y=d.node().appendChild(await w(g,e.labelStyle,!0,!0));let m={width:0,height:0};if((0,s._3)((0,s.D7)()?.flowchart?.htmlLabels)){const t=y.children[0],e=(0,h.Ltv)(y);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}l.Rm.info("Text 2",f);const x=f||[],b=y.getBBox(),k=d.node().appendChild(await w(x.join?x.join("<br/>"):x,e.labelStyle,!0,!0)),_=k.children[0],v=(0,h.Ltv)(k);m=_.getBoundingClientRect(),v.attr("width",m.width),v.attr("height",m.height);const S=(e.padding||0)/2;(0,h.Ltv)(k).attr("transform","translate( "+(m.width>b.width?0:(b.width-m.width)/2)+", "+(b.height+S+5)+")"),(0,h.Ltv)(y).attr("transform","translate( "+(m.width<b.width?0:-(b.width-m.width)/2)+", 0)"),m=d.node().getBBox(),d.attr("transform","translate("+-m.width/2+", "+(-m.height/2-S+3)+")");const T=m.width+(e.padding||0),A=m.height+(e.padding||0),M=-m.width/2-S,B=-m.height/2-S;let L,F;if("handDrawn"===e.look){const t=c.A.svg(o),r=(0,n.Fr)(e,{}),i=t.path(C(M,B,T,A,e.rx||0),r),a=t.line(-m.width/2-S,-m.height/2-S+b.height+S,m.width/2+S,-m.height/2-S+b.height+S,r);F=o.insert(()=>(l.Rm.debug("Rough node insert CXC",i),a),":first-child"),L=o.insert(()=>(l.Rm.debug("Rough node insert CXC",i),i),":first-child")}else L=u.insert("rect",":first-child"),F=u.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-m.width/2-S).attr("y",-m.height/2-S).attr("width",m.width+(e.padding||0)).attr("height",m.height+(e.padding||0)),F.attr("class","divider").attr("x1",-m.width/2-S).attr("x2",m.width/2+S).attr("y1",-m.height/2-S+b.height+S).attr("y2",-m.height/2-S+b.height+S);return p(e,L),e.intersect=function(t){return z.rect(e,t)},o}function Nt(t,e,r,i,n,a,o){const s=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/n,u=(i-e)/2/a,d=Math.sqrt(c**2+u**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-d**2),f=s+p*a*Math.sin(h)*(o?-1:1),g=l-p*n*Math.cos(h)*(o?-1:1),y=Math.atan2((e-g)/a,(t-f)/n);let m=Math.atan2((i-g)/a,(r-f)/n)-y;o&&m<0&&(m+=2*Math.PI),!o&&m>0&&(m-=2*Math.PI);const x=[];for(let t=0;t<20;t++){const e=y+t/19*m,r=f+n*Math.cos(e),i=g+a*Math.sin(e);x.push({x:r,y:i})}return x}async function Pt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=e?.padding??0,l=e?.padding??0,h=(e?.width?e?.width:o.width)+2*s,d=(e?.height?e?.height:o.height)+2*l,y=e.radius||5,m=e.taper||5,{cssStyles:x}=e,b=c.A.svg(a),k=(0,n.Fr)(e,{});e.stroke&&(k.stroke=e.stroke),"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=[{x:-h/2+m,y:-d/2},{x:h/2-m,y:-d/2},...Nt(h/2-m,-d/2,h/2,-d/2+m,y,y,!0),{x:h/2,y:-d/2+m},{x:h/2,y:d/2-m},...Nt(h/2,d/2-m,h/2-m,d/2,y,y,!0),{x:h/2-m,y:d/2},{x:-h/2+m,y:d/2},...Nt(-h/2+m,d/2,-h/2,d/2-m,y,y,!0),{x:-h/2,y:d/2-m},{x:-h/2,y:-d/2+m},...Nt(-h/2,-d/2+m,-h/2+m,-d/2,y,y,!0)],C=g(w),_=b.path(C,k),v=a.insert(()=>_,":first-child");return v.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",i),p(e,v),e.intersect=function(t){return z.polygon(e,w,t)},a}async function zt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l}=await u(t,e,f(e)),h=e?.padding??0,d=Math.max(s.width+2*(e.padding??0),e?.width??0),g=Math.max(s.height+2*(e.padding??0),e?.height??0),y=-s.width/2-h,m=-s.height/2-h,{cssStyles:x}=e,b=c.A.svg(a),k=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=[{x:y,y:m},{x:y+d+8,y:m},{x:y+d+8,y:m+g},{x:y-8,y:m+g},{x:y-8,y:m},{x:y,y:m},{x:y,y:m+g}],C=b.polygon(w.map(t=>[t.x,t.y]),k),_=a.insert(()=>C,":first-child");return _.attr("class","basic label-container").attr("style",(0,o.KL)(x)),i&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",i),x&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",i),l.attr("transform",`translate(${-d/2+4+(e.padding??0)-(s.x-(s.left??0))},${-g/2+(e.padding??0)-(s.y-(s.top??0))})`),p(e,_),e.intersect=function(t){return z.rect(e,t)},a}async function qt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),h=Math.max(o.height+2*(e.padding??0),e?.height??0),d=-l/2,y=-h/2,{cssStyles:m}=e,x=c.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=[{x:d,y},{x:d,y:y+h},{x:d+l,y:y+h},{x:d+l,y:y-h/2}],w=g(k),C=x.path(w,b),_=a.insert(()=>C,":first-child");return _.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",m),i&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${h/4})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))}, ${-h/4+(e.padding??0)-(o.y-(o.top??0))})`),p(e,_),e.intersect=function(t){return z.polygon(e,k,t)},a}async function jt(t,e){return Ct(t,e,{rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})}async function Wt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.height+e.padding,l=o.width+s/4+e.padding,h=s/2,{cssStyles:d}=e,y=c.A.svg(a),x=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-l/2+h,y:-s/2},{x:l/2-h,y:-s/2},...m(-l/2+h,0,h,50,90,270),{x:l/2-h,y:s/2},...m(l/2-h,0,h,50,270,450)],k=g(b),w=y.path(k,x),C=a.insert(()=>w,":first-child");return C.attr("class","basic label-container outer-path"),d&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",i),p(e,C),e.intersect=function(t){return z.polygon(e,b,t)},a}async function Ht(t,e){return Ct(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function Ut(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.labelStyle=i;const{cssStyles:o}=e,{lineColor:s,stateBorder:l,nodeBorder:h}=r,u=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),d=c.A.svg(u),f=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const g=d.circle(0,0,14,{...f,stroke:s,strokeWidth:2}),y=l??h,m=d.circle(0,0,5,{...f,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),x=u.insert(()=>g,":first-child");return x.insert(()=>m),o&&x.selectAll("path").attr("style",o),a&&x.selectAll("path").attr("style",a),p(e,x),e.intersect=function(t){return z.circle(e,7,t)},u}function Yt(t,e,{config:{themeVariables:r}}){const{lineColor:i}=r,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let o;if("handDrawn"===e.look){const t=c.A.svg(a).circle(0,0,14,(0,n.ue)(i));o=a.insert(()=>t),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return p(e,o),e.intersect=function(t){return z.circle(e,7,t)},a}async function Gt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),l=(e?.padding||0)/2,h=s.width+e.padding,d=s.height+e.padding,g=-s.width/2-l,y=-s.height/2-l,m=[{x:0,y:0},{x:h,y:0},{x:h,y:-d},{x:0,y:-d},{x:0,y:0},{x:-8,y:0},{x:h+8,y:0},{x:h+8,y:-d},{x:-8,y:-d},{x:-8,y:0}];if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=t.rectangle(g-8,y,h+16,d,r),s=t.line(g,y,g,y+d,r),l=t.line(g+h,y,g+h,y+d,r);a.insert(()=>s,":first-child"),a.insert(()=>l,":first-child");const u=a.insert(()=>i,":first-child"),{cssStyles:f}=e;u.attr("class","basic label-container").attr("style",(0,o.KL)(f)),p(e,u)}else{const t=H(a,h,d,m);i&&t.attr("style",i),p(e,t)}return e.intersect=function(t){return z.polygon(e,m,t)},a}async function Xt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),h=-s/2,d=-l/2,y=.2*l,m=.2*l,{cssStyles:x}=e,b=c.A.svg(a),k=(0,n.Fr)(e,{}),w=[{x:h-y/2,y:d},{x:h+s+y/2,y:d},{x:h+s+y/2,y:d+l},{x:h-y/2,y:d+l}],C=[{x:h+s-y/2,y:d+l},{x:h+s+y/2,y:d+l},{x:h+s+y/2,y:d+l-m}];"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const _=g(w),v=b.path(_,k),S=g(C),T=b.path(S,{...k,fillStyle:"solid"}),A=a.insert(()=>T,":first-child");return A.insert(()=>v,":first-child"),A.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",x),i&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",i),p(e,A),e.intersect=function(t){return z.polygon(e,w,t)},a}async function Vt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),h=Math.max(o.height+2*(e.padding??0),e?.height??0),d=h/4,m=.2*l,x=.2*h,b=h+d,{cssStyles:k}=e,w=c.A.svg(a),C=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-l/2-l/2*.1,y:b/2},...y(-l/2-l/2*.1,b/2,l/2+l/2*.1,b/2,d,.8),{x:l/2+l/2*.1,y:-b/2},{x:-l/2-l/2*.1,y:-b/2}],v=-l/2+l/2*.1,S=-b/2-.4*x,T=[{x:v+l-m,y:1.4*(S+h)},{x:v+l,y:S+h-x},{x:v+l,y:.9*(S+h)},...y(v+l,1.3*(S+h),v+l-m,1.5*(S+h),.03*-h,.5)],A=g(_),M=w.path(A,C),B=g(T),L=w.path(B,{...C,fillStyle:"solid"}),F=a.insert(()=>L,":first-child");return F.insert(()=>M,":first-child"),F.attr("class","basic label-container"),k&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))},${-h/2+(e.padding??0)-d/2-(o.y-(o.top??0))})`),p(e,F),e.intersect=function(t){return z.polygon(e,_,t)},a}async function Zt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+e.padding,e?.width||0),l=Math.max(o.height+e.padding,e?.height||0),h=-s/2,c=-l/2,d=a.insert("rect",":first-child");return d.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",h).attr("y",c).attr("width",s).attr("height",l),p(e,d),e.intersect=function(t){return z.rect(e,t)},a}(0,l.K2)(Rt,"question"),(0,l.K2)(Kt,"rect_left_inv_arrow"),(0,l.K2)(It,"rectWithTitle"),(0,l.K2)(Nt,"generateArcPoints"),(0,l.K2)(Pt,"roundedRect"),(0,l.K2)(zt,"shadedProcess"),(0,l.K2)(qt,"slopedRect"),(0,l.K2)(jt,"squareRect"),(0,l.K2)(Wt,"stadium"),(0,l.K2)(Ht,"state"),(0,l.K2)(Ut,"stateEnd"),(0,l.K2)(Yt,"stateStart"),(0,l.K2)(Gt,"subroutine"),(0,l.K2)(Xt,"taggedRect"),(0,l.K2)(Vt,"taggedWaveEdgedRectangle"),(0,l.K2)(Zt,"text");var Qt=(0,l.K2)((t,e,r,i,n,a)=>`M${t},${e}\n a${n},${a} 0,0,1 0,${-i}\n l${r},0\n a${n},${a} 0,0,1 0,${i}\n M${r},${-i}\n a${n},${a} 0,0,0 0,${i}\n l${-r},0`,"createCylinderPathD"),Jt=(0,l.K2)((t,e,r,i,n,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),te=(0,l.K2)((t,e,r,i,n,a)=>[`M${t+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function ee(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l,halfPadding:h}=await u(t,e,f(e)),d="neo"===e.look?2*h:h,g=s.height+d,y=g/2,m=y/(2.5+g/50),x=s.width+m+d,{cssStyles:b}=e;let k;if("handDrawn"===e.look){const t=c.A.svg(a),r=Jt(0,0,x,g,m,y),i=te(0,0,x,g,m,y),o=t.path(r,(0,n.Fr)(e,{})),s=t.path(i,(0,n.Fr)(e,{fill:"none"}));k=a.insert(()=>s,":first-child"),k=a.insert(()=>o,":first-child"),k.attr("class","basic label-container"),b&&k.attr("style",b)}else{const t=Qt(0,0,x,g,m,y);k=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(b)).attr("style",i),k.attr("class","basic label-container"),b&&k.selectAll("path").attr("style",b),i&&k.selectAll("path").attr("style",i)}return k.attr("label-offset-x",m),k.attr("transform",`translate(${-x/2}, ${g/2} )`),l.attr("transform",`translate(${-s.width/2-m-(s.x-(s.left??0))}, ${-s.height/2-(s.y-(s.top??0))})`),p(e,k),e.intersect=function(t){const r=z.rect(e,t),i=r.y-(e.y??0);if(0!=y&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-m)){let n=m*m*(1-i*i/(y*y));0!=n&&(n=Math.sqrt(Math.abs(n))),n=m-n,t.x-(e.x??0)>0&&(n=-n),r.x+=n}return r},a}async function re(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.width+e.padding,l=o.height+e.padding,h=[{x:-3*l/6,y:0},{x:s+3*l/6,y:0},{x:s,y:-l},{x:0,y:-l}];let d;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=g(h),o=t.path(i,r);d=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),y&&d.attr("style",y)}else d=H(a,s,l,h);return i&&d.attr("style",i),e.width=s,e.height=l,p(e,d),e.intersect=function(t){return z.polygon(e,h,t)},a}async function ie(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(60,o.width+2*(e.padding??0),e?.width??0),l=Math.max(20,o.height+2*(e.padding??0),e?.height??0),{cssStyles:h}=e,d=c.A.svg(a),y=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:-s/2*.8,y:-l/2},{x:s/2*.8,y:-l/2},{x:s/2,y:-l/2*.6},{x:s/2,y:l/2},{x:-s/2,y:l/2},{x:-s/2,y:-l/2*.6}],x=g(m),b=d.path(x,y),k=a.insert(()=>b,":first-child");return k.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",i),p(e,k),e.intersect=function(t){return z.polygon(e,m,t)},a}async function ne(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:h}=await u(t,e,f(e)),d=(0,s._3)((0,s.D7)().flowchart?.htmlLabels),y=o.width+(e.padding??0),m=y+o.height,x=y+o.height,b=[{x:0,y:0},{x,y:0},{x:x/2,y:-m}],{cssStyles:k}=e,w=c.A.svg(a),C=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const _=g(b),v=w.path(_,C),S=a.insert(()=>v,":first-child").attr("transform",`translate(${-m/2}, ${m/2})`);return k&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",k),i&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",i),e.width=y,e.height=m,p(e,S),h.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${m/2-(o.height+(e.padding??0)/(d?2:1)-(o.y-(o.top??0)))})`),e.intersect=function(t){return l.Rm.info("Triangle intersect",e,b,t),z.polygon(e,b,t)},a}async function ae(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),h=Math.max(o.height+2*(e.padding??0),e?.height??0),d=h/8,m=h+d,{cssStyles:x}=e,b=70-l,k=b>0?b/2:0,w=c.A.svg(a),C=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-l/2-k,y:m/2},...y(-l/2-k,m/2,l/2+k,m/2,d,.8),{x:l/2+k,y:-m/2},{x:-l/2-k,y:-m/2}],v=g(_),S=w.path(v,C),T=a.insert(()=>S,":first-child");return T.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",x),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))},${-h/2+(e.padding??0)-d-(o.y-(o.top??0))})`),p(e,T),e.intersect=function(t){return z.polygon(e,_,t)},a}async function oe(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),h=s/l;let d=s,m=l;d>m*h?m=d/h:d=m*h,d=Math.max(d,100),m=Math.max(m,50);const x=Math.min(.2*m,m/4),b=m+2*x,{cssStyles:k}=e,w=c.A.svg(a),C=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-d/2,y:b/2},...y(-d/2,b/2,d/2,b/2,x,1),{x:d/2,y:-b/2},...y(d/2,-b/2,-d/2,-b/2,x,-1)],v=g(_),S=w.path(v,C),T=a.insert(()=>S,":first-child");return T.attr("class","basic label-container"),k&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),p(e,T),e.intersect=function(t){return z.polygon(e,_,t)},a}async function se(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),h=Math.max(o.height+2*(e.padding??0),e?.height??0),d=-l/2,g=-h/2,{cssStyles:y}=e,m=c.A.svg(a),x=(0,n.Fr)(e,{}),b=[{x:d-5,y:g-5},{x:d-5,y:g+h},{x:d+l,y:g+h},{x:d+l,y:g-5}],k=`M${d-5},${g-5} L${d+l},${g-5} L${d+l},${g+h} L${d-5},${g+h} L${d-5},${g-5}\n M${d-5},${g} L${d+l},${g}\n M${d},${g-5} L${d},${g+h}`;"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const w=m.path(k,x),C=a.insert(()=>w,":first-child");return C.attr("transform","translate(2.5, 2.5)"),C.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),s.attr("transform",`translate(${-o.width/2+2.5-(o.x-(o.left??0))}, ${-o.height/2+2.5-(o.y-(o.top??0))})`),p(e,C),e.intersect=function(t){return z.polygon(e,b,t)},a}async function le(t,e){const r=e;if(r.alias&&(e.label=r.alias),"handDrawn"===e.look){const{themeVariables:r}=(0,s.zj)(),{background:i}=r,n={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${i}`]};await le(t,n)}const i=(0,s.zj)();e.useHtmlLabels=i.htmlLabels;let a=i.er?.diagramPadding??10,l=i.er?.entityPadding??6;const{cssStyles:u}=e,{labelStyles:d,nodeStyles:g}=(0,n.GX)(e);if(0===r.attributes.length&&e.label){const r={rx:0,ry:0,labelPaddingX:a,labelPaddingY:1.5*a,classes:""};(0,o.Un)(e.label,i)+2*r.labelPaddingX<i.er.minEntityWidth&&(e.width=i.er.minEntityWidth);const n=await Ct(t,e,r);if(!(0,s._3)(i.htmlLabels)){const t=n.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return n}i.htmlLabels||(a*=1.25,l*=1.25);let y=f(e);y||(y="node default");const m=t.insert("g").attr("class",y).attr("id",e.domId||e.id),x=await he(m,e.label??"",i,0,0,["name"],d);x.height+=l;let b=0;const k=[],w=[];let C=0,_=0,v=0,S=0,T=!0,A=!0;for(const t of r.attributes){const e=await he(m,t.type,i,0,b,["attribute-type"],d);C=Math.max(C,e.width+a);const r=await he(m,t.name,i,0,b,["attribute-name"],d);_=Math.max(_,r.width+a);const n=await he(m,t.keys.join(),i,0,b,["attribute-keys"],d);v=Math.max(v,n.width+a);const o=await he(m,t.comment,i,0,b,["attribute-comment"],d);S=Math.max(S,o.width+a);const s=Math.max(e.height,r.height,n.height,o.height)+l;w.push({yOffset:b,rowHeight:s}),b+=s}let M=4;v<=a&&(T=!1,v=0,M--),S<=a&&(A=!1,S=0,M--);const B=m.node().getBBox();if(x.width+2*a-(C+_+v+S)>0){const t=x.width+2*a-(C+_+v+S);C+=t/M,_+=t/M,v>0&&(v+=t/M),S>0&&(S+=t/M)}const L=C+_+v+S,F=c.A.svg(m),$=(0,n.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let E=0;w.length>0&&(E=w.reduce((t,e)=>t+(e?.rowHeight??0),0));const D=Math.max(B.width+2*a,e?.width||0,L),O=Math.max((E??0)+x.height,e?.height||0),R=-D/2,K=-O/2;m.selectAll("g:not(:first-child)").each((t,e,r)=>{const i=(0,h.Ltv)(r[e]),n=i.attr("transform");let o=0,s=0;if(n){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(o=parseFloat(t[1]),s=parseFloat(t[2]),i.attr("class").includes("attribute-name")?o+=C:i.attr("class").includes("attribute-keys")?o+=C+_:i.attr("class").includes("attribute-comment")&&(o+=C+_+v))}i.attr("transform",`translate(${R+a/2+o}, ${s+K+x.height+l/2})`)}),m.select(".name").attr("transform","translate("+-x.width/2+", "+(K+l/2)+")");const I=F.rectangle(R,K,D,O,$),N=m.insert(()=>I,":first-child").attr("style",u.join("")),{themeVariables:P}=(0,s.zj)(),{rowEven:q,rowOdd:j,nodeBorder:W}=P;k.push(0);for(const[t,e]of w.entries()){const r=(t+1)%2==0&&0!==e.yOffset,i=F.rectangle(R,x.height+K+e?.yOffset,D,e?.rowHeight,{...$,fill:r?q:j,stroke:W});m.insert(()=>i,"g.label").attr("style",u.join("")).attr("class","row-rect-"+(r?"even":"odd"))}let H=F.line(R,x.height+K,D+R,x.height+K,$);m.insert(()=>H).attr("class","divider"),H=F.line(C+R,x.height+K,C+R,O+K,$),m.insert(()=>H).attr("class","divider"),T&&(H=F.line(C+_+R,x.height+K,C+_+R,O+K,$),m.insert(()=>H).attr("class","divider")),A&&(H=F.line(C+_+v+R,x.height+K,C+_+v+R,O+K,$),m.insert(()=>H).attr("class","divider"));for(const t of k)H=F.line(R,x.height+K+t,D+R,x.height+K+t,$),m.insert(()=>H).attr("class","divider");if(p(e,N),g&&"handDrawn"!==e.look){const t=g.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");m.selectAll("path").attr("style",e??""),m.selectAll(".row-rect-even path").attr("style",g)}return e.intersect=function(t){return z.rect(e,t)},m}async function he(t,e,r,i=0,n=0,l=[],c=""){const u=t.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",c);e!==(0,s.QO)(e)&&(e=(e=(0,s.QO)(e)).replaceAll("<","<").replaceAll(">",">"));const d=u.node().appendChild(await(0,a.GZ)(u,e,{width:(0,o.Un)(e,r)+100,style:c,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let t=d.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let p=d.getBBox();if((0,s._3)(r.htmlLabels)){const t=d.children[0];t.style.textAlign="start";const e=(0,h.Ltv)(d);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return p}async function ce(t,e,r,i,n=r.class.padding??12){const a=i?0:3,o=t.insert("g").attr("class",f(e)).attr("id",e.domId||e.id);let s=null,l=null,h=null,c=null,u=0,d=0,p=0;if(s=o.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await ue(s,{text:`«${t}»`},0),u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await ue(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,h=o.insert("g").attr("class","members-group text");let y=0;for(const t of e.members)y+=await ue(h,t,y,[t.parseClassifier()])+a;p=h.node().getBBox().height,p<=0&&(p=n/2),c=o.insert("g").attr("class","methods-group text");let m=0;for(const t of e.methods)m+=await ue(c,t,m,[t.parseClassifier()])+a;let x=o.node().getBBox();if(null!==s){const t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+d+2*n})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+d+(p?p+4*n:2*n)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}async function ue(t,e,r,i=[]){const n=t.insert("g").attr("class","label").attr("style",i.join("; ")),c=(0,s.zj)();let u="useHtmlLabels"in e?e.useHtmlLabels:(0,s._3)(c.htmlLabels)??!0,d="";d="text"in e?e.text:e.label,!u&&d.startsWith("\\")&&(d=d.substring(1)),(0,s.Wi)(d)&&(u=!0);const p=await(0,a.GZ)(n,(0,s.oB)((0,o.Sm)(d)),{width:(0,o.Un)(d,c)+50,classes:"markdown-node-label",useHtmlLabels:u},c);let f,g=1;if(u){const t=p.children[0],e=(0,h.Ltv)(p);g=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(g+=t.innerHTML.split("<mrow>").length-1);const r=t.getElementsByTagName("img");if(r){const t=""===d.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=c.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,r=5,i=parseInt(t,10)*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}(0,l.K2)(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}else{i.includes("font-weight: bolder")&&(0,h.Ltv)(p).selectAll("tspan").attr("font-weight",""),g=p.children.length;const t=p.children[0];(""===p.textContent||p.textContent.includes(">"))&&(t.textContent=d[0]+d.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "===d[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),f=p.getBBox()}return n.attr("transform","translate(0,"+(-f.height/(2*g)+r)+")"),f.height}async function de(t,e){const r=(0,s.D7)(),i=r.class.padding??12,a=i,o=e.useHtmlLabels??(0,s._3)(r.htmlLabels)??!0,l=e;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:u,bbox:d}=await ce(t,e,r,o,a),{labelStyles:f,nodeStyles:g}=(0,n.GX)(e);e.labelStyle=f,e.cssStyles=l.styles||"";const y=l.styles?.join(";")||g||"";e.cssStyles||(e.cssStyles=y.replaceAll("!important","").split(";"));const m=0===l.members.length&&0===l.methods.length&&!r.class?.hideEmptyMembersBox,x=c.A.svg(u),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=d.width;let w=d.height;0===l.members.length&&0===l.methods.length?w+=a:l.members.length>0&&0===l.methods.length&&(w+=2*a);const C=-k/2,_=-w/2,v=x.rectangle(C-i,_-i-(m?i:0===l.members.length&&0===l.methods.length?-i/2:0),k+2*i,w+2*i+(m?2*i:0===l.members.length&&0===l.methods.length?-i:0),b),S=u.insert(()=>v,":first-child");S.attr("class","basic label-container");const T=S.node().getBBox();u.selectAll(".text").each((t,e,r)=>{const n=(0,h.Ltv)(r[e]),a=n.attr("transform");let s=0;if(a){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);t&&(s=parseFloat(t[2]))}let c=s+_+i-(m?i:0===l.members.length&&0===l.methods.length?-i/2:0);o||(c-=4);let d=C;(n.attr("class").includes("label-group")||n.attr("class").includes("annotation-group"))&&(d=-n.node()?.getBBox().width/2||0,u.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(d=0)})),n.attr("transform",`translate(${d}, ${c})`)});const A=u.select(".annotation-group").node().getBBox().height-(m?i/2:0)||0,M=u.select(".label-group").node().getBBox().height-(m?i/2:0)||0,B=u.select(".members-group").node().getBBox().height-(m?i/2:0)||0;if(l.members.length>0||l.methods.length>0||m){const t=x.line(T.x,A+M+_+i,T.x+T.width,A+M+_+i,b);u.insert(()=>t).attr("class","divider").attr("style",y)}if(m||l.members.length>0||l.methods.length>0){const t=x.line(T.x,A+M+B+_+2*a+i,T.x+T.width,A+M+B+_+i+2*a,b);u.insert(()=>t).attr("class","divider").attr("style",y)}if("handDrawn"!==l.look&&u.selectAll("path").attr("style",y),S.select(":nth-child(2)").attr("style",y),u.selectAll(".divider").select("path").attr("style",y),e.labelStyle?u.selectAll("span").attr("style",e.labelStyle):u.selectAll("span").attr("style",y),!o){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(y);if(e){const t=e[0].replace("color","fill");u.selectAll("tspan").attr("style",t)}else if(f){const e=t.exec(f);if(e){const t=e[0].replace("color","fill");u.selectAll("tspan").attr("style",t)}}}return p(e,S),e.intersect=function(t){return z.rect(e,t)},u}async function pe(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const a=e,o=e,s="verifyMethod"in e,l=f(e),u=t.insert("g").attr("class",l).attr("id",e.domId??e.id);let d;d=s?await fe(u,`<<${a.type}>>`,0,e.labelStyle):await fe(u,"<<Element>>",0,e.labelStyle);let g=d;const y=await fe(u,a.name,g,e.labelStyle+"; font-weight: bold;");g+=y+20,s?(g+=await fe(u,a.requirementId?`ID: ${a.requirementId}`:"",g,e.labelStyle),g+=await fe(u,a.text?`Text: ${a.text}`:"",g,e.labelStyle),g+=await fe(u,a.risk?`Risk: ${a.risk}`:"",g,e.labelStyle),await fe(u,a.verifyMethod?`Verification: ${a.verifyMethod}`:"",g,e.labelStyle)):(g+=await fe(u,o.type?`Type: ${o.type}`:"",g,e.labelStyle),await fe(u,o.docRef?`Doc Ref: ${o.docRef}`:"",g,e.labelStyle));const m=(u.node()?.getBBox().width??200)+20,x=(u.node()?.getBBox().height??200)+20,b=-m/2,k=-x/2,w=c.A.svg(u),C=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const _=w.rectangle(b,k,m,x,C),v=u.insert(()=>_,":first-child");if(v.attr("class","basic label-container").attr("style",i),u.selectAll(".label").each((t,e,r)=>{const i=(0,h.Ltv)(r[e]),n=i.attr("transform");let a=0,o=0;if(n){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(a=parseFloat(t[1]),o=parseFloat(t[2]))}const s=o-x/2;let l=b+10;0!==e&&1!==e||(l=a),i.attr("transform",`translate(${l}, ${s+20})`)}),g>d+y+20){const t=w.line(b,k+d+y+20,b+m,k+d+y+20,C);u.insert(()=>t).attr("style",i)}return p(e,v),e.intersect=function(t){return z.rect(e,t)},u}async function fe(t,e,r,i=""){if(""===e)return 0;const n=t.insert("g").attr("class","label").attr("style",i),l=(0,s.D7)(),c=l.htmlLabels??!0,u=await(0,a.GZ)(n,(0,s.oB)((0,o.Sm)(e)),{width:(0,o.Un)(e,l)+50,classes:"markdown-node-label",useHtmlLabels:c,style:i},l);let d;if(c){const t=u.children[0],e=(0,h.Ltv)(u);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}else{const t=u.children[0];for(const e of t.children)e.textContent=e.textContent.replaceAll(">",">").replaceAll("<","<"),i&&e.setAttribute("style",i);d=u.getBBox(),d.height+=6}return n.attr("transform",`translate(${-d.width/2},${-d.height/2+r})`),d.height}(0,l.K2)(ee,"tiltedCylinder"),(0,l.K2)(re,"trapezoid"),(0,l.K2)(ie,"trapezoidalPentagon"),(0,l.K2)(ne,"triangle"),(0,l.K2)(ae,"waveEdgedRectangle"),(0,l.K2)(oe,"waveRectangle"),(0,l.K2)(se,"windowPane"),(0,l.K2)(le,"erBox"),(0,l.K2)(he,"addText"),(0,l.K2)(ce,"textHelper"),(0,l.K2)(ue,"addText"),(0,l.K2)(de,"classBox"),(0,l.K2)(pe,"requirementBox"),(0,l.K2)(fe,"addText");var ge=(0,l.K2)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ye(t,e,{config:r}){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.labelStyle=i||"";const o=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:l,label:h}=await u(t,e,f(e)),g=e.padding||10;let y,m="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(m=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),y=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",m).attr("target","_blank"));const x={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let b,k;({label:b,bbox:k}=y?await d(y,"ticket"in e&&e.ticket||"",x):await d(s,"ticket"in e&&e.ticket||"",x));const{label:w,bbox:_}=await d(s,"assigned"in e&&e.assigned||"",x);e.width=o;const v=e?.width||0,S=Math.max(k.height,_.height)/2,T=Math.max(l.height+20,e?.height||0)+S,A=-v/2,M=-T/2;let B;h.attr("transform","translate("+(g-v/2)+", "+(-S-l.height/2)+")"),b.attr("transform","translate("+(g-v/2)+", "+(-S+l.height/2)+")"),w.attr("transform","translate("+(g+v/2-_.width-20)+", "+(-S+l.height/2)+")");const{rx:L,ry:F}=e,{cssStyles:$}=e;if("handDrawn"===e.look){const t=c.A.svg(s),r=(0,n.Fr)(e,{}),i=L||F?t.path(C(A,M,v,T,L||0),r):t.rectangle(A,M,v,T,r);B=s.insert(()=>i,":first-child"),B.attr("class","basic label-container").attr("style",$||null)}else{B=s.insert("rect",":first-child"),B.attr("class","basic label-container __APA__").attr("style",a).attr("rx",L??5).attr("ry",F??5).attr("x",A).attr("y",M).attr("width",v).attr("height",T);const t="priority"in e&&e.priority;if(t){const e=s.append("line"),r=A+2,i=M+Math.floor((L??0)/2),n=M+T-Math.floor((L??0)/2);e.attr("x1",r).attr("y1",i).attr("x2",r).attr("y2",n).attr("stroke-width","4").attr("stroke",ge(t))}}return p(e,B),e.height=T,e.intersect=function(t){return z.rect(e,t)},s}async function me(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:h,label:d}=await u(t,e,f(e)),g=s.width+10*h,y=s.height+8*h,m=.15*g,{cssStyles:x}=e,b=s.width+20,k=s.height+20,w=Math.max(g,b),C=Math.max(y,k);let _;d.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);const v=`M0 0 \n a${m},${m} 1 0,0 ${.25*w},${-1*C*.1}\n a${m},${m} 1 0,0 ${.25*w},0\n a${m},${m} 1 0,0 ${.25*w},0\n a${m},${m} 1 0,0 ${.25*w},${.1*C}\n\n a${m},${m} 1 0,0 ${.15*w},${.33*C}\n a${.8*m},${.8*m} 1 0,0 0,${.34*C}\n a${m},${m} 1 0,0 ${-1*w*.15},${.33*C}\n\n a${m},${m} 1 0,0 ${-1*w*.25},${.15*C}\n a${m},${m} 1 0,0 ${-1*w*.25},0\n a${m},${m} 1 0,0 ${-1*w*.25},0\n a${m},${m} 1 0,0 ${-1*w*.25},${-1*C*.15}\n\n a${m},${m} 1 0,0 ${-1*w*.1},${-1*C*.33}\n a${.8*m},${.8*m} 1 0,0 0,${-1*C*.34}\n a${m},${m} 1 0,0 ${.1*w},${-1*C*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=t.path(v,r);_=a.insert(()=>i,":first-child"),_.attr("class","basic label-container").attr("style",(0,o.KL)(x))}else _=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",v);return _.attr("transform",`translate(${-w/2}, ${-C/2})`),p(e,_),e.calcIntersect=function(t,e){return z.rect(t,e)},e.intersect=function(t){return l.Rm.info("Bang intersect",e,t),z.rect(e,t)},a}async function xe(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:h,label:d}=await u(t,e,f(e)),g=s.width+2*h,y=s.height+2*h,m=.15*g,x=.25*g,b=.35*g,k=.2*g,{cssStyles:w}=e;let C;const _=`M0 0 \n a${m},${m} 0 0,1 ${.25*g},${-1*g*.1}\n a${b},${b} 1 0,1 ${.4*g},${-1*g*.1}\n a${x},${x} 1 0,1 ${.35*g},${.2*g}\n\n a${m},${m} 1 0,1 ${.15*g},${.35*y}\n a${k},${k} 1 0,1 ${-1*g*.15},${.65*y}\n\n a${x},${m} 1 0,1 ${-1*g*.25},${.15*g}\n a${b},${b} 1 0,1 ${-1*g*.5},0\n a${m},${m} 1 0,1 ${-1*g*.25},${-1*g*.15}\n\n a${m},${m} 1 0,1 ${-1*g*.1},${-1*y*.35}\n a${k},${k} 1 0,1 ${.1*g},${-1*y*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=t.path(_,r);C=a.insert(()=>i,":first-child"),C.attr("class","basic label-container").attr("style",(0,o.KL)(w))}else C=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",_);return d.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),C.attr("transform",`translate(${-g/2}, ${-y/2})`),p(e,C),e.calcIntersect=function(t,e){return z.rect(t,e)},e.intersect=function(t){return l.Rm.info("Cloud intersect",e,t),z.rect(e,t)},a}async function be(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:s,label:l}=await u(t,e,f(e)),h=o.width+8*s,c=o.height+2*s,d=`\n M${-h/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${h-10}\n q5,0 5,5\n v${c-10}\n q0,5 -5,5\n h${10-h}\n q-5,0 -5,-5\n Z\n `,g=a.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",i).attr("d",d);return a.append("line").attr("class","node-line-").attr("x1",-h/2).attr("y1",c/2).attr("x2",h/2).attr("y2",c/2),l.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.append(()=>l.node()),p(e,g),e.calcIntersect=function(t,e){return z.rect(t,e)},e.intersect=function(t){return z.rect(e,t)},a}async function ke(t,e){return G(t,e,{padding:e.padding??0})}(0,l.K2)(ye,"kanbanItem"),(0,l.K2)(me,"bang"),(0,l.K2)(xe,"cloud"),(0,l.K2)(be,"defaultMindmapNode"),(0,l.K2)(ke,"mindmapCircle");var we=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:jt},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Pt},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Wt},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Gt},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:st},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:G},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:me},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:xe},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Rt},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:ft},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:St},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:vt},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:re},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:wt},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ht},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Zt},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:U},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:zt},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Yt},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Ut},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:dt},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:gt},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Q},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:tt},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:rt},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Tt},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ae},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:pt},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ee},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Lt},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:it},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:lt},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ne},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:se},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ct},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:ie},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ut},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:qt},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Et},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:$t},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:W},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:V},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Vt},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Xt},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:oe},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Kt},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Ft}],Ce=(0,l.K2)(()=>{const t={state:Ht,choice:Y,note:Dt,rectWithTitle:It,labelRect:_t,iconSquare:bt,iconCircle:mt,icon:yt,iconRounded:xt,imageSquare:kt,anchor:q,kanbanItem:ye,mindmapCircle:ke,defaultMindmapNode:be,classBox:de,erBox:le,requirementBox:pe},e=[...Object.entries(t),...we.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function _e(t){return t in Ce}(0,l.K2)(_e,"isValidShape");var ve=new Map;async function Se(t,e,r){let i,n;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?Ce[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let o;"sandbox"===r.config.securityLevel?o="_top":e.linkTarget&&(o=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",o??null),n=await a(i,e,r)}else n=await a(t,e,r),i=n;return e.tooltip&&n.attr("title",e.tooltip),ve.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}(0,l.K2)(Se,"insertNode");var Te=(0,l.K2)((t,e)=>{ve.set(e.id,t)},"setNodeElem"),Ae=(0,l.K2)(()=>{ve.clear()},"clear"),Me=(0,l.K2)(t=>{const e=ve.get(t.id);l.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")},3981(t,e,r){"use strict";r.d(e,{H:()=>er,r:()=>tr});var i=r(797);function n(t){return null==t}function a(t){return"object"==typeof t&&null!==t}function o(t){return Array.isArray(t)?t:n(t)?[]:[t]}function s(t,e){var r,i,n,a;if(e)for(r=0,i=(a=Object.keys(e)).length;r<i;r+=1)t[n=a[r]]=e[n];return t}function l(t,e){var r,i="";for(r=0;r<e;r+=1)i+=t;return i}function h(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}(0,i.K2)(n,"isNothing"),(0,i.K2)(a,"isObject"),(0,i.K2)(o,"toArray"),(0,i.K2)(s,"extend"),(0,i.K2)(l,"repeat"),(0,i.K2)(h,"isNegativeZero");var c={isNothing:n,isObject:a,toArray:o,repeat:l,isNegativeZero:h,extend:s};function u(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+="\n\n"+t.mark.snippet),i+" "+r):i}function d(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=u(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(0,i.K2)(u,"formatError"),(0,i.K2)(d,"YAMLException$1"),d.prototype=Object.create(Error.prototype),d.prototype.constructor=d,d.prototype.toString=(0,i.K2)(function(t){return this.name+": "+u(this,t)},"toString");var p=d;function f(t,e,r,i,n){var a="",o="",s=Math.floor(n/2)-1;return i-e>s&&(e=i-s+(a=" ... ").length),r-i>s&&(r=i+s-(o=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"→")+o,pos:i-e+a.length}}function g(t,e){return c.repeat(" ",e-t.length)+t}function y(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,n=[0],a=[],o=-1;r=i.exec(t.buffer);)a.push(r.index),n.push(r.index+r[0].length),t.position<=r.index&&o<0&&(o=n.length-2);o<0&&(o=n.length-1);var s,l,h="",u=Math.min(t.line+e.linesAfter,a.length).toString().length,d=e.maxLength-(e.indent+u+3);for(s=1;s<=e.linesBefore&&!(o-s<0);s++)l=f(t.buffer,n[o-s],a[o-s],t.position-(n[o]-n[o-s]),d),h=c.repeat(" ",e.indent)+g((t.line-s+1).toString(),u)+" | "+l.str+"\n"+h;for(l=f(t.buffer,n[o],a[o],t.position,d),h+=c.repeat(" ",e.indent)+g((t.line+1).toString(),u)+" | "+l.str+"\n",h+=c.repeat("-",e.indent+u+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(o+s>=a.length);s++)l=f(t.buffer,n[o+s],a[o+s],t.position-(n[o]-n[o+s]),d),h+=c.repeat(" ",e.indent)+g((t.line+s+1).toString(),u)+" | "+l.str+"\n";return h.replace(/\n$/,"")}(0,i.K2)(f,"getLine"),(0,i.K2)(g,"padStart"),(0,i.K2)(y,"makeSnippet");var m=y,x=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],b=["scalar","sequence","mapping"];function k(t){var e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function w(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===x.indexOf(e))throw new p('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=k(e.styleAliases||null),-1===b.indexOf(this.kind))throw new p('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}(0,i.K2)(k,"compileStyleAliases"),(0,i.K2)(w,"Type$1");var C=w;function _(t,e){var r=[];return t[e].forEach(function(t){var e=r.length;r.forEach(function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)}),r[e]=t}),r}function v(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for((0,i.K2)(n,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(n);return r}function S(t){return this.extend(t)}(0,i.K2)(_,"compileList"),(0,i.K2)(v,"compileMap"),(0,i.K2)(S,"Schema$1"),S.prototype.extend=(0,i.K2)(function(t){var e=[],r=[];if(t instanceof C)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new p("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}e.forEach(function(t){if(!(t instanceof C))throw new p("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new p("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new p("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof C))throw new p("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(S.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=_(i,"implicit"),i.compiledExplicit=_(i,"explicit"),i.compiledTypeMap=v(i.compiledImplicit,i.compiledExplicit),i},"extend");var T=new S({explicit:[new C("tag:yaml.org,2002:str",{kind:"scalar",construct:(0,i.K2)(function(t){return null!==t?t:""},"construct")}),new C("tag:yaml.org,2002:seq",{kind:"sequence",construct:(0,i.K2)(function(t){return null!==t?t:[]},"construct")}),new C("tag:yaml.org,2002:map",{kind:"mapping",construct:(0,i.K2)(function(t){return null!==t?t:{}},"construct")})]});function A(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function M(){return null}function B(t){return null===t}(0,i.K2)(A,"resolveYamlNull"),(0,i.K2)(M,"constructYamlNull"),(0,i.K2)(B,"isNull");var L=new C("tag:yaml.org,2002:null",{kind:"scalar",resolve:A,construct:M,predicate:B,represent:{canonical:(0,i.K2)(function(){return"~"},"canonical"),lowercase:(0,i.K2)(function(){return"null"},"lowercase"),uppercase:(0,i.K2)(function(){return"NULL"},"uppercase"),camelcase:(0,i.K2)(function(){return"Null"},"camelcase"),empty:(0,i.K2)(function(){return""},"empty")},defaultStyle:"lowercase"});function F(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function $(t){return"true"===t||"True"===t||"TRUE"===t}function E(t){return"[object Boolean]"===Object.prototype.toString.call(t)}(0,i.K2)(F,"resolveYamlBoolean"),(0,i.K2)($,"constructYamlBoolean"),(0,i.K2)(E,"isBoolean");var D=new C("tag:yaml.org,2002:bool",{kind:"scalar",resolve:F,construct:$,predicate:E,represent:{lowercase:(0,i.K2)(function(t){return t?"true":"false"},"lowercase"),uppercase:(0,i.K2)(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:(0,i.K2)(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function O(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function R(t){return 48<=t&&t<=55}function K(t){return 48<=t&&t<=57}function I(t){if(null===t)return!1;var e,r=t.length,i=0,n=!1;if(!r)return!1;if("-"!==(e=t[i])&&"+"!==e||(e=t[++i]),"0"===e){if(i+1===r)return!0;if("b"===(e=t[++i])){for(i++;i<r;i++)if("_"!==(e=t[i])){if("0"!==e&&"1"!==e)return!1;n=!0}return n&&"_"!==e}if("x"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!O(t.charCodeAt(i)))return!1;n=!0}return n&&"_"!==e}if("o"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!R(t.charCodeAt(i)))return!1;n=!0}return n&&"_"!==e}}if("_"===e)return!1;for(;i<r;i++)if("_"!==(e=t[i])){if(!K(t.charCodeAt(i)))return!1;n=!0}return!(!n||"_"===e)}function N(t){var e,r=t,i=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(e=r[0])&&"+"!==e||("-"===e&&(i=-1),e=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===e){if("b"===r[1])return i*parseInt(r.slice(2),2);if("x"===r[1])return i*parseInt(r.slice(2),16);if("o"===r[1])return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function P(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!c.isNegativeZero(t)}(0,i.K2)(O,"isHexCode"),(0,i.K2)(R,"isOctCode"),(0,i.K2)(K,"isDecCode"),(0,i.K2)(I,"resolveYamlInteger"),(0,i.K2)(N,"constructYamlInteger"),(0,i.K2)(P,"isInteger");var z=new C("tag:yaml.org,2002:int",{kind:"scalar",resolve:I,construct:N,predicate:P,represent:{binary:(0,i.K2)(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,i.K2)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,i.K2)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,i.K2)(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),q=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function j(t){return null!==t&&!(!q.test(t)||"_"===t[t.length-1])}function W(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,i.K2)(j,"resolveYamlFloat"),(0,i.K2)(W,"constructYamlFloat");var H=/^[-+]?[0-9]+e/;function U(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(c.isNegativeZero(t))return"-0.0";return r=t.toString(10),H.test(r)?r.replace("e",".e"):r}function Y(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||c.isNegativeZero(t))}(0,i.K2)(U,"representYamlFloat"),(0,i.K2)(Y,"isFloat");var G=new C("tag:yaml.org,2002:float",{kind:"scalar",resolve:j,construct:W,predicate:Y,represent:U,defaultStyle:"lowercase"}),X=T.extend({implicit:[L,D,z,G]}),V=X,Z=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Q=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function J(t){return null!==t&&(null!==Z.exec(t)||null!==Q.exec(t))}function tt(t){var e,r,i,n,a,o,s,l,h=0,c=null;if(null===(e=Z.exec(t))&&(e=Q.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,i,n));if(a=+e[4],o=+e[5],s=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h=+h}return e[9]&&(c=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(c=-c)),l=new Date(Date.UTC(r,i,n,a,o,s,h)),c&&l.setTime(l.getTime()-c),l}function et(t){return t.toISOString()}(0,i.K2)(J,"resolveYamlTimestamp"),(0,i.K2)(tt,"constructYamlTimestamp"),(0,i.K2)(et,"representYamlTimestamp");var rt=new C("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:J,construct:tt,instanceOf:Date,represent:et});function it(t){return"<<"===t||null===t}(0,i.K2)(it,"resolveYamlMerge");var nt=new C("tag:yaml.org,2002:merge",{kind:"scalar",resolve:it}),at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function ot(t){if(null===t)return!1;var e,r,i=0,n=t.length,a=at;for(r=0;r<n;r++)if(!((e=a.indexOf(t.charAt(r)))>64)){if(e<0)return!1;i+=6}return i%8==0}function st(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,a=at,o=0,s=[];for(e=0;e<n;e++)e%4==0&&e&&(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)),o=o<<6|a.indexOf(i.charAt(e));return 0==(r=n%4*6)?(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)):18===r?(s.push(o>>10&255),s.push(o>>2&255)):12===r&&s.push(o>>4&255),new Uint8Array(s)}function lt(t){var e,r,i="",n=0,a=t.length,o=at;for(e=0;e<a;e++)e%3==0&&e&&(i+=o[n>>18&63],i+=o[n>>12&63],i+=o[n>>6&63],i+=o[63&n]),n=(n<<8)+t[e];return 0==(r=a%3)?(i+=o[n>>18&63],i+=o[n>>12&63],i+=o[n>>6&63],i+=o[63&n]):2===r?(i+=o[n>>10&63],i+=o[n>>4&63],i+=o[n<<2&63],i+=o[64]):1===r&&(i+=o[n>>2&63],i+=o[n<<4&63],i+=o[64],i+=o[64]),i}function ht(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,i.K2)(ot,"resolveYamlBinary"),(0,i.K2)(st,"constructYamlBinary"),(0,i.K2)(lt,"representYamlBinary"),(0,i.K2)(ht,"isBinary");var ct=new C("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ot,construct:st,predicate:ht,represent:lt}),ut=Object.prototype.hasOwnProperty,dt=Object.prototype.toString;function pt(t){if(null===t)return!0;var e,r,i,n,a,o=[],s=t;for(e=0,r=s.length;e<r;e+=1){if(i=s[e],a=!1,"[object Object]"!==dt.call(i))return!1;for(n in i)if(ut.call(i,n)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==o.indexOf(n))return!1;o.push(n)}return!0}function ft(t){return null!==t?t:[]}(0,i.K2)(pt,"resolveYamlOmap"),(0,i.K2)(ft,"constructYamlOmap");var gt=new C("tag:yaml.org,2002:omap",{kind:"sequence",resolve:pt,construct:ft}),yt=Object.prototype.toString;function mt(t){if(null===t)return!0;var e,r,i,n,a,o=t;for(a=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(i=o[e],"[object Object]"!==yt.call(i))return!1;if(1!==(n=Object.keys(i)).length)return!1;a[e]=[n[0],i[n[0]]]}return!0}function xt(t){if(null===t)return[];var e,r,i,n,a,o=t;for(a=new Array(o.length),e=0,r=o.length;e<r;e+=1)i=o[e],n=Object.keys(i),a[e]=[n[0],i[n[0]]];return a}(0,i.K2)(mt,"resolveYamlPairs"),(0,i.K2)(xt,"constructYamlPairs");var bt=new C("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:mt,construct:xt}),kt=Object.prototype.hasOwnProperty;function wt(t){if(null===t)return!0;var e,r=t;for(e in r)if(kt.call(r,e)&&null!==r[e])return!1;return!0}function Ct(t){return null!==t?t:{}}(0,i.K2)(wt,"resolveYamlSet"),(0,i.K2)(Ct,"constructYamlSet");var _t=new C("tag:yaml.org,2002:set",{kind:"mapping",resolve:wt,construct:Ct}),vt=V.extend({implicit:[rt,nt],explicit:[ct,gt,bt,_t]}),St=Object.prototype.hasOwnProperty,Tt=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,At=/[\x85\u2028\u2029]/,Mt=/[,\[\]\{\}]/,Bt=/^(?:!|!!|![a-z\-]+!)$/i,Lt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ft(t){return Object.prototype.toString.call(t)}function $t(t){return 10===t||13===t}function Et(t){return 9===t||32===t}function Dt(t){return 9===t||32===t||10===t||13===t}function Ot(t){return 44===t||91===t||93===t||123===t||125===t}function Rt(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function Kt(t){return 120===t?2:117===t?4:85===t?8:0}function It(t){return 48<=t&&t<=57?t-48:-1}function Nt(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"2 ":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function Pt(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))} (0,i.K2)(Ft,"_class"),(0,i.K2)($t,"is_EOL"),(0,i.K2)(Et,"is_WHITE_SPACE"),(0,i.K2)(Dt,"is_WS_OR_EOL"),(0,i.K2)(Ot,"is_FLOW_INDICATOR"),(0,i.K2)(Rt,"fromHexCode"),(0,i.K2)(Kt,"escapedHexLen"),(0,i.K2)(It,"fromDecimalCode"),(0,i.K2)(Nt,"simpleEscapeSequence"),(0,i.K2)(Pt,"charFromCodepoint");var zt,qt=new Array(256),jt=new Array(256);for(zt=0;zt<256;zt++)qt[zt]=Nt(zt)?1:0,jt[zt]=Nt(zt);function Wt(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||vt,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ht(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=m(r),new p(e,r)}function Ut(t,e){throw Ht(t,e)}function Yt(t,e){t.onWarning&&t.onWarning.call(null,Ht(t,e))}(0,i.K2)(Wt,"State$1"),(0,i.K2)(Ht,"generateError"),(0,i.K2)(Ut,"throwError"),(0,i.K2)(Yt,"throwWarning");var Gt={YAML:(0,i.K2)(function(t,e,r){var i,n,a;null!==t.version&&Ut(t,"duplication of %YAML directive"),1!==r.length&&Ut(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&Ut(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),a=parseInt(i[2],10),1!==n&&Ut(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&Yt(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,i.K2)(function(t,e,r){var i,n;2!==r.length&&Ut(t,"TAG directive accepts exactly two arguments"),i=r[0],n=r[1],Bt.test(i)||Ut(t,"ill-formed tag handle (first argument) of the TAG directive"),St.call(t.tagMap,i)&&Ut(t,'there is a previously declared suffix for "'+i+'" tag handle'),Lt.test(n)||Ut(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(e){Ut(t,"tag prefix is malformed: "+n)}t.tagMap[i]=n},"handleTagDirective")};function Xt(t,e,r,i){var n,a,o,s;if(e<r){if(s=t.input.slice(e,r),i)for(n=0,a=s.length;n<a;n+=1)9===(o=s.charCodeAt(n))||32<=o&&o<=1114111||Ut(t,"expected valid JSON character");else Tt.test(s)&&Ut(t,"the stream contains non-printable characters");t.result+=s}}function Vt(t,e,r,i){var n,a,o,s;for(c.isObject(r)||Ut(t,"cannot merge mappings; the provided source object is unacceptable"),o=0,s=(n=Object.keys(r)).length;o<s;o+=1)a=n[o],St.call(e,a)||(e[a]=r[a],i[a]=!0)}function Zt(t,e,r,i,n,a,o,s,l){var h,c;if(Array.isArray(n))for(h=0,c=(n=Array.prototype.slice.call(n)).length;h<c;h+=1)Array.isArray(n[h])&&Ut(t,"nested arrays are not supported inside keys"),"object"==typeof n&&"[object Object]"===Ft(n[h])&&(n[h]="[object Object]");if("object"==typeof n&&"[object Object]"===Ft(n)&&(n="[object Object]"),n=String(n),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(a))for(h=0,c=a.length;h<c;h+=1)Vt(t,e,a[h],r);else Vt(t,e,a,r);else t.json||St.call(r,n)||!St.call(e,n)||(t.line=o||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,Ut(t,"duplicated mapping key")),"__proto__"===n?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):e[n]=a,delete r[n];return e}function Qt(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):Ut(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Jt(t,e,r){for(var i=0,n=t.input.charCodeAt(t.position);0!==n;){for(;Et(n);)9===n&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&35===n)do{n=t.input.charCodeAt(++t.position)}while(10!==n&&13!==n&&0!==n);if(!$t(n))break;for(Qt(t),n=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===n;)t.lineIndent++,n=t.input.charCodeAt(++t.position)}return-1!==r&&0!==i&&t.lineIndent<r&&Yt(t,"deficient indentation"),i}function te(t){var e,r=t.position;return!(45!==(e=t.input.charCodeAt(r))&&46!==e||e!==t.input.charCodeAt(r+1)||e!==t.input.charCodeAt(r+2)||(r+=3,0!==(e=t.input.charCodeAt(r))&&!Dt(e)))}function ee(t,e){1===e?t.result+=" ":e>1&&(t.result+=c.repeat("\n",e-1))}function re(t,e,r){var i,n,a,o,s,l,h,c,u=t.kind,d=t.result;if(Dt(c=t.input.charCodeAt(t.position))||Ot(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(Dt(i=t.input.charCodeAt(t.position+1))||r&&Ot(i)))return!1;for(t.kind="scalar",t.result="",n=a=t.position,o=!1;0!==c;){if(58===c){if(Dt(i=t.input.charCodeAt(t.position+1))||r&&Ot(i))break}else if(35===c){if(Dt(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&te(t)||r&&Ot(c))break;if($t(c)){if(s=t.line,l=t.lineStart,h=t.lineIndent,Jt(t,!1,-1),t.lineIndent>=e){o=!0,c=t.input.charCodeAt(t.position);continue}t.position=a,t.line=s,t.lineStart=l,t.lineIndent=h;break}}o&&(Xt(t,n,a,!1),ee(t,t.line-s),n=a=t.position,o=!1),Et(c)||(a=t.position+1),c=t.input.charCodeAt(++t.position)}return Xt(t,n,a,!1),!!t.result||(t.kind=u,t.result=d,!1)}function ie(t,e){var r,i,n;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(Xt(t,i,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,n=t.position}else $t(r)?(Xt(t,i,n,!0),ee(t,Jt(t,!1,e)),i=n=t.position):t.position===t.lineStart&&te(t)?Ut(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);Ut(t,"unexpected end of the stream within a single quoted scalar")}function ne(t,e){var r,i,n,a,o,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return Xt(t,r,t.position,!0),t.position++,!0;if(92===s){if(Xt(t,r,t.position,!0),$t(s=t.input.charCodeAt(++t.position)))Jt(t,!1,e);else if(s<256&&qt[s])t.result+=jt[s],t.position++;else if((o=Kt(s))>0){for(n=o,a=0;n>0;n--)(o=Rt(s=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+o:Ut(t,"expected hexadecimal character");t.result+=Pt(a),t.position++}else Ut(t,"unknown escape sequence");r=i=t.position}else $t(s)?(Xt(t,r,i,!0),ee(t,Jt(t,!1,e)),r=i=t.position):t.position===t.lineStart&&te(t)?Ut(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Ut(t,"unexpected end of the stream within a double quoted scalar")}function ae(t,e){var r,i,n,a,o,s,l,h,c,u,d,p,f=!0,g=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))o=93,h=!1,a=[];else{if(123!==p)return!1;o=125,h=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),p=t.input.charCodeAt(++t.position);0!==p;){if(Jt(t,!0,e),(p=t.input.charCodeAt(t.position))===o)return t.position++,t.tag=g,t.anchor=y,t.kind=h?"mapping":"sequence",t.result=a,!0;f?44===p&&Ut(t,"expected the node content, but found ','"):Ut(t,"missed comma between flow collection entries"),d=null,s=l=!1,63===p&&Dt(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,Jt(t,!0,e)),r=t.line,i=t.lineStart,n=t.position,de(t,e,1,!1,!0),u=t.tag,c=t.result,Jt(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(s=!0,p=t.input.charCodeAt(++t.position),Jt(t,!0,e),de(t,e,1,!1,!0),d=t.result),h?Zt(t,a,m,u,c,d,r,i,n):s?a.push(Zt(t,null,m,u,c,d,r,i,n)):a.push(c),Jt(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(f=!0,p=t.input.charCodeAt(++t.position)):f=!1}Ut(t,"unexpected end of the stream within a flow collection")}function oe(t,e){var r,i,n,a,o=1,s=!1,l=!1,h=e,u=0,d=!1;if(124===(a=t.input.charCodeAt(t.position)))i=!1;else{if(62!==a)return!1;i=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===o?o=43===a?3:2:Ut(t,"repeat of a chomping mode identifier");else{if(!((n=It(a))>=0))break;0===n?Ut(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Ut(t,"repeat of an indentation width identifier"):(h=e+n-1,l=!0)}if(Et(a)){do{a=t.input.charCodeAt(++t.position)}while(Et(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!$t(a)&&0!==a)}for(;0!==a;){for(Qt(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndent<h)&&32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>h&&(h=t.lineIndent),$t(a))u++;else{if(t.lineIndent<h){3===o?t.result+=c.repeat("\n",s?1+u:u):1===o&&s&&(t.result+="\n");break}for(i?Et(a)?(d=!0,t.result+=c.repeat("\n",s?1+u:u)):d?(d=!1,t.result+=c.repeat("\n",u+1)):0===u?s&&(t.result+=" "):t.result+=c.repeat("\n",u):t.result+=c.repeat("\n",s?1+u:u),s=!0,l=!0,u=0,r=t.position;!$t(a)&&0!==a;)a=t.input.charCodeAt(++t.position);Xt(t,r,t.position,!1)}}return!0}function se(t,e){var r,i,n=t.tag,a=t.anchor,o=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,Ut(t,"tab characters must not be used in indentation")),45===i)&&Dt(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,Jt(t,!0,-1)&&t.lineIndent<=e)o.push(null),i=t.input.charCodeAt(t.position);else if(r=t.line,de(t,e,3,!1,!0),o.push(t.result),Jt(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==i)Ut(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!s&&(t.tag=n,t.anchor=a,t.kind="sequence",t.result=o,!0)}function le(t,e,r){var i,n,a,o,s,l,h,c=t.tag,u=t.anchor,d={},p=Object.create(null),f=null,g=null,y=null,m=!1,x=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=d),h=t.input.charCodeAt(t.position);0!==h;){if(m||-1===t.firstTabInLine||(t.position=t.firstTabInLine,Ut(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),a=t.line,63!==h&&58!==h||!Dt(i)){if(o=t.line,s=t.lineStart,l=t.position,!de(t,r,2,!1,!0))break;if(t.line===a){for(h=t.input.charCodeAt(t.position);Et(h);)h=t.input.charCodeAt(++t.position);if(58===h)Dt(h=t.input.charCodeAt(++t.position))||Ut(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(Zt(t,d,p,f,g,null,o,s,l),f=g=y=null),x=!0,m=!1,n=!1,f=t.tag,g=t.result;else{if(!x)return t.tag=c,t.anchor=u,!0;Ut(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!x)return t.tag=c,t.anchor=u,!0;Ut(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===h?(m&&(Zt(t,d,p,f,g,null,o,s,l),f=g=y=null),x=!0,m=!0,n=!0):m?(m=!1,n=!0):Ut(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,h=i;if((t.line===a||t.lineIndent>e)&&(m&&(o=t.line,s=t.lineStart,l=t.position),de(t,e,4,!0,n)&&(m?g=t.result:y=t.result),m||(Zt(t,d,p,f,g,y,o,s,l),f=g=y=null),Jt(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==h)Ut(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&Zt(t,d,p,f,g,null,o,s,l),x&&(t.tag=c,t.anchor=u,t.kind="mapping",t.result=d),x}function he(t){var e,r,i,n,a=!1,o=!1;if(33!==(n=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&Ut(t,"duplication of a tag property"),60===(n=t.input.charCodeAt(++t.position))?(a=!0,n=t.input.charCodeAt(++t.position)):33===n?(o=!0,r="!!",n=t.input.charCodeAt(++t.position)):r="!",e=t.position,a){do{n=t.input.charCodeAt(++t.position)}while(0!==n&&62!==n);t.position<t.length?(i=t.input.slice(e,t.position),n=t.input.charCodeAt(++t.position)):Ut(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==n&&!Dt(n);)33===n&&(o?Ut(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),Bt.test(r)||Ut(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),n=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),Mt.test(i)&&Ut(t,"tag suffix cannot contain flow indicator characters")}i&&!Lt.test(i)&&Ut(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(e){Ut(t,"tag name is malformed: "+i)}return a?t.tag=i:St.call(t.tagMap,r)?t.tag=t.tagMap[r]+i:"!"===r?t.tag="!"+i:"!!"===r?t.tag="tag:yaml.org,2002:"+i:Ut(t,'undeclared tag handle "'+r+'"'),!0}function ce(t){var e,r;if(38!==(r=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&Ut(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!Dt(r)&&!Ot(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Ut(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function ue(t){var e,r,i;if(42!==(i=t.input.charCodeAt(t.position)))return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!Dt(i)&&!Ot(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&Ut(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),St.call(t.anchorMap,r)||Ut(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Jt(t,!0,-1),!0}function de(t,e,r,i,n){var a,o,s,l,h,c,u,d,p,f=1,g=!1,y=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=o=s=4===r||3===r,i&&Jt(t,!0,-1)&&(g=!0,t.lineIndent>e?f=1:t.lineIndent===e?f=0:t.lineIndent<e&&(f=-1)),1===f)for(;he(t)||ce(t);)Jt(t,!0,-1)?(g=!0,s=a,t.lineIndent>e?f=1:t.lineIndent===e?f=0:t.lineIndent<e&&(f=-1)):s=!1;if(s&&(s=g||n),1!==f&&4!==r||(d=1===r||2===r?e:e+1,p=t.position-t.lineStart,1===f?s&&(se(t,p)||le(t,p,d))||ae(t,d)?y=!0:(o&&oe(t,d)||ie(t,d)||ne(t,d)?y=!0:ue(t)?(y=!0,null===t.tag&&null===t.anchor||Ut(t,"alias node should not have any properties")):re(t,d,1===r)&&(y=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===f&&(y=s&&se(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&Ut(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,h=t.implicitTypes.length;l<h;l+=1)if((u=t.implicitTypes[l]).resolve(t.result)){t.result=u.construct(t.result),t.tag=u.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(St.call(t.typeMap[t.kind||"fallback"],t.tag))u=t.typeMap[t.kind||"fallback"][t.tag];else for(u=null,l=0,h=(c=t.typeMap.multi[t.kind||"fallback"]).length;l<h;l+=1)if(t.tag.slice(0,c[l].tag.length)===c[l].tag){u=c[l];break}u||Ut(t,"unknown tag !<"+t.tag+">"),null!==t.result&&u.kind!==t.kind&&Ut(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Ut(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function pe(t){var e,r,i,n,a=t.position,o=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(n=t.input.charCodeAt(t.position))&&(Jt(t,!0,-1),n=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==n));){for(o=!0,n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!Dt(n);)n=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&Ut(t,"directive name must not be less than one character in length");0!==n;){for(;Et(n);)n=t.input.charCodeAt(++t.position);if(35===n){do{n=t.input.charCodeAt(++t.position)}while(0!==n&&!$t(n));break}if($t(n))break;for(e=t.position;0!==n&&!Dt(n);)n=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==n&&Qt(t),St.call(Gt,r)?Gt[r](t,r,i):Yt(t,'unknown document directive "'+r+'"')}Jt(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,Jt(t,!0,-1)):o&&Ut(t,"directives end mark is expected"),de(t,t.lineIndent-1,4,!1,!0),Jt(t,!0,-1),t.checkLineBreaks&&At.test(t.input.slice(a,t.position))&&Yt(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&te(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,Jt(t,!0,-1)):t.position<t.length-1&&Ut(t,"end of the stream or a document separator is expected")}function fe(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var r=new Wt(t,e),i=t.indexOf("\0");for(-1!==i&&(r.position=i,Ut(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)pe(r);return r.documents}function ge(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);var i=fe(t,r);if("function"!=typeof e)return i;for(var n=0,a=i.length;n<a;n+=1)e(i[n])}function ye(t,e){var r=fe(t,e);if(0!==r.length){if(1===r.length)return r[0];throw new p("expected a single document in the stream, but found more")}}(0,i.K2)(Xt,"captureSegment"),(0,i.K2)(Vt,"mergeMappings"),(0,i.K2)(Zt,"storeMappingPair"),(0,i.K2)(Qt,"readLineBreak"),(0,i.K2)(Jt,"skipSeparationSpace"),(0,i.K2)(te,"testDocumentSeparator"),(0,i.K2)(ee,"writeFoldedLines"),(0,i.K2)(re,"readPlainScalar"),(0,i.K2)(ie,"readSingleQuotedScalar"),(0,i.K2)(ne,"readDoubleQuotedScalar"),(0,i.K2)(ae,"readFlowCollection"),(0,i.K2)(oe,"readBlockScalar"),(0,i.K2)(se,"readBlockSequence"),(0,i.K2)(le,"readBlockMapping"),(0,i.K2)(he,"readTagProperty"),(0,i.K2)(ce,"readAnchorProperty"),(0,i.K2)(ue,"readAlias"),(0,i.K2)(de,"composeNode"),(0,i.K2)(pe,"readDocument"),(0,i.K2)(fe,"loadDocuments"),(0,i.K2)(ge,"loadAll$1"),(0,i.K2)(ye,"load$1");var me=ye,xe=Object.prototype.toString,be=Object.prototype.hasOwnProperty,ke=65279,we={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Ce=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],_e=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ve(t,e){var r,i,n,a,o,s,l;if(null===e)return{};for(r={},n=0,a=(i=Object.keys(e)).length;n<a;n+=1)o=i[n],s=String(e[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(l=t.compiledTypeMap.fallback[o])&&be.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}function Se(t){var e,r,i;if(e=t.toString(16).toUpperCase(),t<=255)r="x",i=2;else if(t<=65535)r="u",i=4;else{if(!(t<=4294967295))throw new p("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+c.repeat("0",i-e.length)+e}function Te(t){this.schema=t.schema||vt,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=c.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=ve(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ae(t,e){for(var r,i=c.repeat(" ",e),n=0,a=-1,o="",s=t.length;n<s;)-1===(a=t.indexOf("\n",n))?(r=t.slice(n),n=s):(r=t.slice(n,a+1),n=a+1),r.length&&"\n"!==r&&(o+=i),o+=r;return o}function Me(t,e){return"\n"+c.repeat(" ",t.indent*e)}function Be(t,e){var r,i;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function Le(t){return 32===t||9===t}function Fe(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==ke||65536<=t&&t<=1114111}function $e(t){return Fe(t)&&t!==ke&&13!==t&&10!==t}function Ee(t,e,r){var i=$e(t),n=i&&!Le(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!n)||$e(e)&&!Le(e)&&35===t||58===e&&n}function De(t){return Fe(t)&&t!==ke&&!Le(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function Oe(t){return!Le(t)&&58!==t}function Re(t,e){var r,i=t.charCodeAt(e);return i>=55296&&i<=56319&&e+1<t.length&&(r=t.charCodeAt(e+1))>=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function Ke(t){return/^\n* /.test(t)}function Ie(t,e,r,i,n,a,o,s){var l,h=0,c=null,u=!1,d=!1,p=-1!==i,f=-1,g=De(Re(t,0))&&Oe(Re(t,t.length-1));if(e||o)for(l=0;l<t.length;h>=65536?l+=2:l++){if(!Fe(h=Re(t,l)))return 5;g=g&&Ee(h,c,s),c=h}else{for(l=0;l<t.length;h>=65536?l+=2:l++){if(10===(h=Re(t,l)))u=!0,p&&(d=d||l-f-1>i&&" "!==t[f+1],f=l);else if(!Fe(h))return 5;g=g&&Ee(h,c,s),c=h}d=d||p&&l-f-1>i&&" "!==t[f+1]}return u||d?r>9&&Ke(t)?5:o?2===a?5:2:d?4:3:!g||o||n(t)?2===a?5:2:1}function Ne(t,e,r,n,a){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==Ce.indexOf(e)||_e.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var o=t.indent*Math.max(1,r),s=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),l=n||t.flowLevel>-1&&r>=t.flowLevel;function h(e){return Be(t,e)}switch((0,i.K2)(h,"testAmbiguity"),Ie(e,l,t.indent,s,h,t.quotingType,t.forceQuotes&&!n,a)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+Pe(e,t.indent)+ze(Ae(e,o));case 4:return">"+Pe(e,t.indent)+ze(Ae(qe(e,s),o));case 5:return'"'+We(e)+'"';default:throw new p("impossible error: invalid scalar style")}}()}function Pe(t,e){var r=Ke(t)?String(e):"",i="\n"===t[t.length-1];return r+(!i||"\n"!==t[t.length-2]&&"\n"!==t?i?"":"-":"+")+"\n"}function ze(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function qe(t,e){for(var r,i,n,a=/(\n+)([^\n]*)/g,o=(r=-1!==(r=t.indexOf("\n"))?r:t.length,a.lastIndex=r,je(t.slice(0,r),e)),s="\n"===t[0]||" "===t[0];n=a.exec(t);){var l=n[1],h=n[2];i=" "===h[0],o+=l+(s||i||""===h?"":"\n")+je(h,e),s=i}return o}function je(t,e){if(""===t||" "===t[0])return t;for(var r,i,n=/ [^ ]/g,a=0,o=0,s=0,l="";r=n.exec(t);)(s=r.index)-a>e&&(i=o>a?o:s,l+="\n"+t.slice(a,i),a=i+1),o=s;return l+="\n",t.length-a>e&&o>a?l+=t.slice(a,o)+"\n"+t.slice(o+1):l+=t.slice(a),l.slice(1)}function We(t){for(var e,r="",i=0,n=0;n<t.length;i>=65536?n+=2:n++)i=Re(t,n),!(e=we[i])&&Fe(i)?(r+=t[n],i>=65536&&(r+=t[n+1])):r+=e||Se(i);return r}function He(t,e,r){var i,n,a,o="",s=t.tag;for(i=0,n=r.length;i<n;i+=1)a=r[i],t.replacer&&(a=t.replacer.call(r,String(i),a)),(Ve(t,e,a,!1,!1)||void 0===a&&Ve(t,e,null,!1,!1))&&(""!==o&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=s,t.dump="["+o+"]"}function Ue(t,e,r,i){var n,a,o,s="",l=t.tag;for(n=0,a=r.length;n<a;n+=1)o=r[n],t.replacer&&(o=t.replacer.call(r,String(n),o)),(Ve(t,e+1,o,!0,!0,!1,!0)||void 0===o&&Ve(t,e+1,null,!0,!0,!1,!0))&&(i&&""===s||(s+=Me(t,e)),t.dump&&10===t.dump.charCodeAt(0)?s+="-":s+="- ",s+=t.dump);t.tag=l,t.dump=s||"[]"}function Ye(t,e,r){var i,n,a,o,s,l="",h=t.tag,c=Object.keys(r);for(i=0,n=c.length;i<n;i+=1)s="",""!==l&&(s+=", "),t.condenseFlow&&(s+='"'),o=r[a=c[i]],t.replacer&&(o=t.replacer.call(r,a,o)),Ve(t,e,a,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Ve(t,e,o,!1,!1)&&(l+=s+=t.dump));t.tag=h,t.dump="{"+l+"}"}function Ge(t,e,r,i){var n,a,o,s,l,h,c="",u=t.tag,d=Object.keys(r);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new p("sortKeys must be a boolean or a function");for(n=0,a=d.length;n<a;n+=1)h="",i&&""===c||(h+=Me(t,e)),s=r[o=d[n]],t.replacer&&(s=t.replacer.call(r,o,s)),Ve(t,e+1,o,!0,!0,!0)&&((l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,l&&(h+=Me(t,e)),Ve(t,e+1,s,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?h+=":":h+=": ",c+=h+=t.dump));t.tag=u,t.dump=c||"{}"}function Xe(t,e,r){var i,n,a,o,s,l;for(a=0,o=(n=r?t.explicitTypes:t.implicitTypes).length;a<o;a+=1)if(((s=n[a]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof e&&e instanceof s.instanceOf)&&(!s.predicate||s.predicate(e))){if(r?s.multi&&s.representName?t.tag=s.representName(e):t.tag=s.tag:t.tag="?",s.represent){if(l=t.styleMap[s.tag]||s.defaultStyle,"[object Function]"===xe.call(s.represent))i=s.represent(e,l);else{if(!be.call(s.represent,l))throw new p("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');i=s.represent[l](e,l)}t.dump=i}return!0}return!1}function Ve(t,e,r,i,n,a,o){t.tag=null,t.dump=r,Xe(t,r,!1)||Xe(t,r,!0);var s,l=xe.call(t.dump),h=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var c,u,d="[object Object]"===l||"[object Array]"===l;if(d&&(u=-1!==(c=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(n=!1),u&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(d&&u&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(Ge(t,e,t.dump,n),u&&(t.dump="&ref_"+c+t.dump)):(Ye(t,e,t.dump),u&&(t.dump="&ref_"+c+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!o&&e>0?Ue(t,e-1,t.dump,n):Ue(t,e,t.dump,n),u&&(t.dump="&ref_"+c+t.dump)):(He(t,e,t.dump),u&&(t.dump="&ref_"+c+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new p("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&Ne(t,t.dump,e,a,h)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function Ze(t,e){var r,i,n=[],a=[];for(Qe(t,n,a),r=0,i=a.length;r<i;r+=1)e.duplicates.push(n[a[r]]);e.usedDuplicates=new Array(i)}function Qe(t,e,r){var i,n,a;if(null!==t&&"object"==typeof t)if(-1!==(n=e.indexOf(t)))-1===r.indexOf(n)&&r.push(n);else if(e.push(t),Array.isArray(t))for(n=0,a=t.length;n<a;n+=1)Qe(t[n],e,r);else for(n=0,a=(i=Object.keys(t)).length;n<a;n+=1)Qe(t[i[n]],e,r)}function Je(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}(0,i.K2)(ve,"compileStyleMap"),(0,i.K2)(Se,"encodeHex"),(0,i.K2)(Te,"State"),(0,i.K2)(Ae,"indentString"),(0,i.K2)(Me,"generateNextLine"),(0,i.K2)(Be,"testImplicitResolving"),(0,i.K2)(Le,"isWhitespace"),(0,i.K2)(Fe,"isPrintable"),(0,i.K2)($e,"isNsCharOrWhitespace"),(0,i.K2)(Ee,"isPlainSafe"),(0,i.K2)(De,"isPlainSafeFirst"),(0,i.K2)(Oe,"isPlainSafeLast"),(0,i.K2)(Re,"codePointAt"),(0,i.K2)(Ke,"needIndentIndicator"),(0,i.K2)(Ie,"chooseScalarStyle"),(0,i.K2)(Ne,"writeScalar"),(0,i.K2)(Pe,"blockHeader"),(0,i.K2)(ze,"dropEndingNewline"),(0,i.K2)(qe,"foldString"),(0,i.K2)(je,"foldLine"),(0,i.K2)(We,"escapeString"),(0,i.K2)(He,"writeFlowSequence"),(0,i.K2)(Ue,"writeBlockSequence"),(0,i.K2)(Ye,"writeFlowMapping"),(0,i.K2)(Ge,"writeBlockMapping"),(0,i.K2)(Xe,"detectType"),(0,i.K2)(Ve,"writeNode"),(0,i.K2)(Ze,"getDuplicateReferences"),(0,i.K2)(Qe,"inspectNode"),(0,i.K2)(function(t,e){var r=new Te(e=e||{});r.noRefs||Ze(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Ve(r,0,i,!0,!0)?r.dump+"\n":""},"dump$1"),(0,i.K2)(Je,"renamed");var tr=X,er=me;Je("safeLoad","load"),Je("safeLoadAll","loadAll"),Je("safeDump","dump")},45(t,e,r){"use strict";r.d(e,{XX:()=>u,q7:()=>d,sO:()=>c});var i=r(5164),n=r(5894),a=r(3226),o=r(144),s=r(797),l={common:o.Y2,getConfig:o.zj,insertCluster:n.U,insertEdge:i.Jo,insertEdgeLabel:i.jP,insertMarkers:i.g0,insertNode:n.on,interpolateToCurve:a.Ib,labelHelper:n.Zk,log:s.Rm,positionEdgeLabel:i.T_},h={},c=(0,s.K2)(t=>{for(const e of t)h[e.name]=e},"registerLayoutLoaders");(0,s.K2)(()=>{c([{name:"dagre",loader:(0,s.K2)(async()=>await Promise.all([r.e(620),r.e(127)]).then(r.bind(r,1127)),"loader")},{name:"cose-bilkent",loader:(0,s.K2)(async()=>await Promise.all([r.e(165),r.e(928)]).then(r.bind(r,7928)),"loader")}])},"registerDefaultLayoutLoaders")();var u=(0,s.K2)(async(t,e)=>{if(!(t.layoutAlgorithm in h))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=h[t.layoutAlgorithm];return(await r.loader()).render(t,e,l,{algorithm:r.algorithm})},"render"),d=(0,s.K2)((t="",{fallback:e="dagre"}={})=>{if(t in h)return t;if(e in h)return s.Rm.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")},5164(t,e,r){"use strict";r.d(e,{IU:()=>x,Jo:()=>L,T_:()=>C,g0:()=>R,jP:()=>k});var i=r(8698),n=r(5894),a=r(3245),o=r(2387),s=r(7682),l=r(3226),h=r(144),c=r(797),u=r(1444),d=r(2274),p=(0,c.K2)((t,e,r,i,n,a)=>{e.arrowTypeStart&&g(t,"start",e.arrowTypeStart,r,i,n,a),e.arrowTypeEnd&&g(t,"end",e.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),f={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},g=(0,c.K2)((t,e,r,i,n,a,o)=>{const s=f[r];if(!s)return void c.Rm.warn(`Unknown arrow type: ${r}`);const l=`${n}_${a}-${s.type}${"start"===e?"Start":"End"}`;if(o&&""!==o.trim()){const r=`${l}_${o.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const t=document.getElementById(l);if(t){const e=t.cloneNode(!0);e.id=r,e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",o),s.fill&&t.setAttribute("fill",o)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${i}#${r})`)}else t.attr(`marker-${e}`,`url(${i}#${l})`)},"addEdgeMarker"),y=new Map,m=new Map,x=(0,c.K2)(()=>{y.clear(),m.clear()},"clear"),b=(0,c.K2)(t=>t?t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),k=(0,c.K2)(async(t,e)=>{let r=(0,h._3)((0,h.D7)().flowchart.htmlLabels);const{labelStyles:i}=(0,o.GX)(e);e.labelStyle=i;const a=await(0,s.GZ)(t,e.label,{style:e.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});c.Rm.info("abc82",e,e.labelType);const l=t.insert("g").attr("class","edgeLabel"),d=l.insert("g").attr("class","label").attr("data-id",e.id);d.node().appendChild(a);let p,f=a.getBBox();if(r){const t=a.children[0],e=(0,u.Ltv)(a);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}if(d.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),y.set(e.id,l),e.width=f.width,e.height=f.height,e.startLabelLeft){const r=await(0,n.DA)(e.startLabelLeft,b(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");p=a.node().appendChild(r);const o=r.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),m.get(e.id)||m.set(e.id,{}),m.get(e.id).startLeft=i,w(p,e.startLabelLeft)}if(e.startLabelRight){const r=await(0,n.DA)(e.startLabelRight,b(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");p=i.node().appendChild(r),a.node().appendChild(r);const o=r.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),m.get(e.id)||m.set(e.id,{}),m.get(e.id).startRight=i,w(p,e.startLabelRight)}if(e.endLabelLeft){const r=await(0,n.DA)(e.endLabelLeft,b(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");p=a.node().appendChild(r);const o=r.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),i.node().appendChild(r),m.get(e.id)||m.set(e.id,{}),m.get(e.id).endLeft=i,w(p,e.endLabelLeft)}if(e.endLabelRight){const r=await(0,n.DA)(e.endLabelRight,b(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");p=a.node().appendChild(r);const o=r.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),i.node().appendChild(r),m.get(e.id)||m.set(e.id,{}),m.get(e.id).endRight=i,w(p,e.endLabelRight)}return a},"insertEdgeLabel");function w(t,e){(0,h.D7)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,c.K2)(w,"setTerminalWidth");var C=(0,c.K2)((t,e)=>{c.Rm.debug("Moving label abc88 ",t.id,t.label,y.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=(0,h.D7)(),{subGraphTitleTotalMargin:n}=(0,a.O)(i);if(t.label){const i=y.get(t.id);let a=t.x,o=t.y;if(r){const i=l._K.calcLabelPosition(r);c.Rm.debug("Moving label "+t.label+" from (",a,",",o,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(a=i.x,o=i.y)}i.attr("transform",`translate(${a}, ${o+n/2})`)}if(t.startLabelLeft){const e=m.get(t.id).startLeft;let i=t.x,n=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.startLabelRight){const e=m.get(t.id).startRight;let i=t.x,n=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelLeft){const e=m.get(t.id).endLeft;let i=t.x,n=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelRight){const e=m.get(t.id).endRight;let i=t.x,n=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}},"positionEdgeLabel"),_=(0,c.K2)((t,e)=>{const r=t.x,i=t.y,n=Math.abs(e.x-r),a=Math.abs(e.y-i),o=t.width/2,s=t.height/2;return n>=o||a>=s},"outsideNode"),v=(0,c.K2)((t,e,r)=>{c.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,n=t.y,a=Math.abs(i-r.x),o=t.width/2;let s=r.x<e.x?o-a:o+a;const l=t.height/2,h=Math.abs(e.y-r.y),u=Math.abs(e.x-r.x);if(Math.abs(n-e.y)*o>Math.abs(i-e.x)*l){let t=r.y<e.y?e.y-l-n:n-l-e.y;s=u*t/h;const i={x:r.x<e.x?r.x+s:r.x-u+s,y:r.y<e.y?r.y+h-t:r.y-h+t};return 0===s&&(i.x=e.x,i.y=e.y),0===u&&(i.x=e.x),0===h&&(i.y=e.y),c.Rm.debug(`abc89 top/bottom calc, Q ${h}, q ${t}, R ${u}, r ${s}`,i),i}{s=r.x<e.x?e.x-o-i:i-o-e.x;let t=h*s/u,_x=r.x<e.x?r.x+u-s:r.x-u+s,n=r.y<e.y?r.y+t:r.y-t;return c.Rm.debug(`sides calc abc89, Q ${h}, q ${t}, R ${u}, r ${s}`,{_x,_y:n}),0===s&&(_x=e.x,n=e.y),0===u&&(_x=e.x),0===h&&(n=e.y),{x:_x,y:n}}},"intersection"),S=(0,c.K2)((t,e)=>{c.Rm.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],n=!1;return t.forEach(t=>{if(c.Rm.info("abc88 checking point",t,e),_(e,t)||n)c.Rm.warn("abc88 outside",t,i),i=t,n||r.push(t);else{const a=v(e,i,t);c.Rm.debug("abc88 inside",t,i,a),c.Rm.debug("abc88 intersection",a,e);let o=!1;r.forEach(t=>{o=o||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)?c.Rm.warn("abc88 no intersect",a,r):r.push(a),n=!0}}),c.Rm.debug("returning points",r),r},"cutPathAtIntersect");function T(t){const e=[],r=[];for(let i=1;i<t.length-1;i++){const n=t[i-1],a=t[i],o=t[i+1];(n.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===o.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-o.y)>5)&&(e.push(a),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}(0,c.K2)(T,"extractCornerPoints");var A=(0,c.K2)(function(t,e,r){const i=e.x-t.x,n=e.y-t.y,a=r/Math.sqrt(i*i+n*n);return{x:e.x-a*i,y:e.y-a*n}},"findAdjacentPoint"),M=(0,c.K2)(function(t){const{cornerPointPositions:e}=T(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){const e=t[i-1],n=t[i+1],a=t[i],o=A(e,a,5),s=A(n,a,5),l=s.x-o.x,h=s.y-o.y;r.push(o);const u=2*Math.sqrt(2);let d={x:a.x,y:a.y};if(Math.abs(n.x-e.x)>10&&Math.abs(n.y-e.y)>=10){c.Rm.debug("Corner point fixing",Math.abs(n.x-e.x),Math.abs(n.y-e.y));const t=5;d=a.x===o.x?{x:l<0?o.x-t+u:o.x+t-u,y:h<0?o.y-u:o.y+u}:{x:l<0?o.x-u:o.x+u,y:h<0?o.y-t+u:o.y+t-u}}else c.Rm.debug("Corner point skipping fixing",Math.abs(n.x-e.x),Math.abs(n.y-e.y));r.push(d,s)}else r.push(t[i]);return r},"fixCorners"),B=(0,c.K2)((t,e,r)=>{const i=t-e-r,n=Math.floor(i/4);return`0 ${e} ${Array(n).fill("2 2").join(" ")} ${r}`},"generateDashArray"),L=(0,c.K2)(function(t,e,r,n,a,s,f,g=!1){const{handDrawnSeed:y}=(0,h.D7)();let m=e.points,x=!1;const b=a;var k=s;const w=[];for(const t in e.cssCompiledStyles)(0,o.KX)(t)||w.push(e.cssCompiledStyles[t]);c.Rm.debug("UIO intersect check",e.points,k.x,b.x),k.intersect&&b.intersect&&!g&&(m=m.slice(1,e.points.length-1),m.unshift(b.intersect(m[0])),c.Rm.debug("Last point UIO",e.start,"--\x3e",e.end,m[m.length-1],k,k.intersect(m[m.length-1])),m.push(k.intersect(m[m.length-1])));const C=btoa(JSON.stringify(m));e.toCluster&&(c.Rm.info("to cluster abc88",r.get(e.toCluster)),m=S(e.points,r.get(e.toCluster).node),x=!0),e.fromCluster&&(c.Rm.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(m,null,2)),m=S(m.reverse(),r.get(e.fromCluster).node).reverse(),x=!0);let _=m.filter(t=>!Number.isNaN(t.y));_=M(_);let v=u.qrM;switch(v=u.lUB,e.curve){case"linear":v=u.lUB;break;case"basis":default:v=u.qrM;break;case"cardinal":v=u.y8u;break;case"bumpX":v=u.Wi0;break;case"bumpY":v=u.PGM;break;case"catmullRom":v=u.oDi;break;case"monotoneX":v=u.nVG;break;case"monotoneY":v=u.uxU;break;case"natural":v=u.Xf2;break;case"step":v=u.GZz;break;case"stepAfter":v=u.UPb;break;case"stepBefore":v=u.dyv}const{x:T,y:A}=(0,i.RI)(e),L=(0,u.n8j)().x(T).y(A).curve(v);let $,D;switch(e.thickness){case"normal":default:$="edge-thickness-normal";break;case"thick":$="edge-thickness-thick";break;case"invisible":$="edge-thickness-invisible"}switch(e.pattern){case"solid":default:$+=" edge-pattern-solid";break;case"dotted":$+=" edge-pattern-dotted";break;case"dashed":$+=" edge-pattern-dashed"}let O="rounded"===e.curve?F(E(_,e),5):L(_);const R=Array.isArray(e.style)?e.style:[e.style];let K=R.find(t=>t?.startsWith("stroke:")),I=!1;if("handDrawn"===e.look){const r=d.A.svg(t);Object.assign([],_);const i=r.path(O,{roughness:.3,seed:y});$+=" transition",D=(0,u.Ltv)(i).select("path").attr("id",e.id).attr("class"," "+$+(e.classes?" "+e.classes:"")).attr("style",R?R.reduce((t,e)=>t+";"+e,""):"");let n=D.attr("d");D.attr("d",n),t.node().appendChild(D.node())}else{const r=w.join(";"),n=R?R.reduce((t,e)=>t+e+";",""):"";let a="";e.animate&&(a=" edge-animation-fast"),e.animation&&(a=" edge-animation-"+e.animation);const o=(r?r+";"+n+";":n)+";"+(R?R.reduce((t,e)=>t+";"+e,""):"");D=t.append("path").attr("d",O).attr("id",e.id).attr("class"," "+$+(e.classes?" "+e.classes:"")+(a??"")).attr("style",o),K=o.match(/stroke:([^;]+)/)?.[1],I=!0===e.animate||!!e.animation||r.includes("animation");const s=D.node(),l="function"==typeof s.getTotalLength?s.getTotalLength():0,h=i.Nq[e.arrowTypeStart]||0,c=i.Nq[e.arrowTypeEnd]||0;if("neo"===e.look&&!I){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?B(l,h,c):`0 ${h} ${l-h-c} ${c}`}; stroke-dashoffset: 0;`;D.attr("style",t+D.attr("style"))}}D.attr("data-edge",!0),D.attr("data-et","edge"),D.attr("data-id",e.id),D.attr("data-points",C),e.showPoints&&_.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let N="";((0,h.D7)().flowchart.arrowMarkerAbsolute||(0,h.D7)().state.arrowMarkerAbsolute)&&(N=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,N=N.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),c.Rm.info("arrowTypeStart",e.arrowTypeStart),c.Rm.info("arrowTypeEnd",e.arrowTypeEnd),p(D,e,N,f,n,K);const P=m[Math.floor(m.length/2)];l._K.isLabelCoordinateInPath(P,D.attr("d"))||(x=!0);let z={};return x&&(z.updatedPath=m),z.originalPath=e.points,z},"insertEdge");function F(t,e){if(t.length<2)return"";let r="";const i=t.length,n=1e-5;for(let a=0;a<i;a++){const o=t[a],s=t[a-1],l=t[a+1];if(0===a)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const t=o.x-s.x,i=o.y-s.y,a=l.x-o.x,h=l.y-o.y,c=Math.hypot(t,i),u=Math.hypot(a,h);if(c<n||u<n){r+=`L${o.x},${o.y}`;continue}const d=t/c,p=i/c,f=a/u,g=h/u,y=d*f+p*g,m=Math.max(-1,Math.min(1,y)),x=Math.acos(m);if(x<n||Math.abs(Math.PI-x)<n){r+=`L${o.x},${o.y}`;continue}const b=Math.min(e/Math.sin(x/2),c/2,u/2),k=o.x-d*b,w=o.y-p*b,C=o.x+f*b,_=o.y+g*b;r+=`L${k},${w}`,r+=`Q${o.x},${o.y} ${C},${_}`}}return r}function $(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-t.x,i=e.y-t.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}function E(t,e){const r=t.map(t=>({...t}));if(t.length>=2&&i.hq[e.arrowTypeStart]){const n=i.hq[e.arrowTypeStart],a=t[0],o=t[1],{angle:s}=$(a,o),l=n*Math.cos(s),h=n*Math.sin(s);r[0].x=a.x+l,r[0].y=a.y+h}const n=t.length;if(n>=2&&i.hq[e.arrowTypeEnd]){const a=i.hq[e.arrowTypeEnd],o=t[n-1],s=t[n-2],{angle:l}=$(s,o),h=a*Math.cos(l),c=a*Math.sin(l);r[n-1].x=o.x-h,r[n-1].y=o.y-c}return r}(0,c.K2)(F,"generateRoundedPath"),(0,c.K2)($,"calculateDeltaAndAngle"),(0,c.K2)(E,"applyMarkerOffsetsToPoints");var D=(0,c.K2)((t,e,r,i)=>{e.forEach(e=>{O[e](t,r,i)})},"insertMarkers"),O={extension:(0,c.K2)((t,e,r)=>{c.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),only_one:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),zero_or_one:(0,c.K2)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),one_or_more:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),zero_or_more:(0,c.K2)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),requirement_arrow:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),requirement_contains:(0,c.K2)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains")},R=D},3226(t,e,r){"use strict";r.d(e,{$C:()=>M,$t:()=>W,C4:()=>U,I5:()=>j,Ib:()=>y,KL:()=>X,Sm:()=>Y,Un:()=>R,_K:()=>H,bH:()=>E,dq:()=>z,pe:()=>h,rY:()=>G,ru:()=>O,sM:()=>T,vU:()=>f,yT:()=>L});var i=r(144),n=r(797),a=r(6750),o=r(1444),s=r(104),l=r(5364),h="",c={curveBasis:o.qrM,curveBasisClosed:o.Yu4,curveBasisOpen:o.IA3,curveBumpX:o.Wi0,curveBumpY:o.PGM,curveBundle:o.OEq,curveCardinalClosed:o.olC,curveCardinalOpen:o.IrU,curveCardinal:o.y8u,curveCatmullRomClosed:o.Q7f,curveCatmullRomOpen:o.cVp,curveCatmullRom:o.oDi,curveLinear:o.lUB,curveLinearClosed:o.Lx9,curveMonotoneX:o.nVG,curveMonotoneY:o.uxU,curveNatural:o.Xf2,curveStep:o.GZz,curveStepAfter:o.UPb,curveStepBefore:o.dyv},u=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,d=(0,n.K2)(function(t,e){const r=p(t,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const t=r.map(t=>t.args);(0,i.$i)(t),n=(0,i.hH)(n,[...t])}else n=r.args;if(!n)return;let a=(0,i.Ch)(t,e);const o="config";return void 0!==n[o]&&("flowchart-v2"===a&&(a="flowchart"),n[a]=n[o],delete n[o]),n},"detectInit"),p=(0,n.K2)(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${u.source})(?=[}][%]{2}).*\n`,"ig");let a;t=t.trim().replace(r,"").replace(/'/gm,'"'),n.Rm.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(a=i.DB.exec(t));)if(a.index===i.DB.lastIndex&&i.DB.lastIndex++,a&&!e||e&&a[1]?.match(e)||e&&a[2]?.match(e)){const t=a[1]?a[1]:a[2],e=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(r){return n.Rm.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),f=(0,n.K2)(function(t){return t.replace(i.DB,"")},"removeDirectives"),g=(0,n.K2)(function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function y(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return c[r]??e}function m(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,a.J)(r):r}(0,n.K2)(y,"interpolateToCurve"),(0,n.K2)(m,"formatUrl");var x=(0,n.K2)((t,...e)=>{const r=t.split("."),i=r.length-1,a=r[i];let o=window;for(let e=0;e<i;e++)if(o=o[r[e]],!o)return void n.Rm.error(`Function name: ${t} not found in window`);o[a](...e)},"runFunc");function b(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function k(t){let e,r=0;return t.forEach(t=>{r+=b(t,e),e=t}),_(t,r/2)}function w(t){return 1===t.length?t[0]:k(t)}(0,n.K2)(b,"distance"),(0,n.K2)(k,"traverseEdge"),(0,n.K2)(w,"calcLabelPosition");var C=(0,n.K2)((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),_=(0,n.K2)((t,e)=>{let r,i=e;for(const e of t){if(r){const t=b(e,r);if(0===t)return r;if(t<i)i-=t;else{const n=i/t;if(n<=0)return r;if(n>=1)return{x:e.x,y:e.y};if(n>0&&n<1)return{x:C((1-n)*r.x+n*e.x,5),y:C((1-n)*r.y+n*e.y,5)}}}r=e}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),v=(0,n.K2)((t,e,r)=>{n.Rm.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=_(e,25),a=t?10:5,o=Math.atan2(e[0].y-i.y,e[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(e[0].x+i.x)/2,s.y=-Math.cos(o)*a+(e[0].y+i.y)/2,s},"calcCardinalityPosition");function S(t,e,r){const i=structuredClone(r);n.Rm.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const a=_(i,25+t),o=10+.5*t,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):"end_right"===e?(l.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):"end_left"===e?(l.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(s)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2),l}function T(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}(0,n.K2)(S,"calcTerminalLabelPosition"),(0,n.K2)(T,"getStylesFromArray");var A=0,M=(0,n.K2)(()=>(A++,"id-"+Math.random().toString(36).substr(2,12)+"-"+A),"generateId");function B(t){let e="";for(let r=0;r<t;r++)e+="0123456789abcdef".charAt(Math.floor(16*Math.random()));return e}(0,n.K2)(B,"makeRandomHex");var L=(0,n.K2)(t=>B(t.length),"random"),F=(0,n.K2)(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),$=(0,n.K2)(function(t,e){const r=e.text.replace(i.Y2.lineBreakRegex," "),[,n]=j(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",n),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);const o=a.append("tspan");return o.attr("x",e.x+2*e.textMargin),o.attr("fill",e.fill),o.text(r),a},"drawSimpleText"),E=s((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),i.Y2.lineBreakRegex.test(t))return t;const n=t.split(" ").filter(Boolean),a=[];let o="";return n.forEach((t,i)=>{const s=R(`${t} `,r),l=R(o,r);if(s>e){const{hyphenatedStrings:i,remainingWord:n}=D(t,e,"-",r);a.push(o,...i),o=n}else l+s>=e?(a.push(o),o=t):o=[o,t].filter(Boolean).join(" ");i+1===n.length&&a.push(o)}),a.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),D=s((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...t],a=[];let o="";return n.forEach((t,s)=>{const l=`${o}${t}`;if(R(l,i)>=e){const t=s+1,e=n.length===t,i=`${l}${r}`;a.push(e?l:i),o=""}else o=l}),{hyphenatedStrings:a,remainingWord:o}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function O(t,e){return I(t,e).height}function R(t,e){return I(t,e).width}(0,n.K2)(O,"calculateTextHeight"),(0,n.K2)(R,"calculateTextWidth");var K,I=s((t,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,s]=j(r),l=["sans-serif",n],c=t.split(i.Y2.lineBreakRegex),u=[],d=(0,o.Ltv)("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const p=d.append("svg");for(const t of l){let e=0;const r={width:0,height:0,lineHeight:0};for(const i of c){const n=F();n.text=i||h;const o=$(p,n).style("font-size",s).style("font-weight",a).style("font-family",t),l=(o._groups||o)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,l.width)),e=Math.round(l.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}u.push(r)}return p.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),N=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,n.K2)(this,"InitIDGenerator")}},P=(0,n.K2)(function(t){return K=K||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),K.innerHTML=t,unescape(K.textContent)},"entityDecode");function z(t){return"str"in t}(0,n.K2)(z,"isDetailedError");var q=(0,n.K2)((t,e,r,i)=>{if(!i)return;const n=t.node()?.getBBox();n&&t.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},"insertTitle"),j=(0,n.K2)(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function W(t,e){return l({},t,e)}(0,n.K2)(W,"cleanAndMerge");var H={assignWithDepth:i.hH,wrapLabel:E,calculateTextHeight:O,calculateTextWidth:R,calculateTextDimensions:I,cleanAndMerge:W,detectInit:d,detectDirective:p,isSubstringInArray:g,interpolateToCurve:y,calcLabelPosition:w,calcCardinalityPosition:v,calcTerminalLabelPosition:S,formatUrl:m,getStylesFromArray:T,generateId:M,random:L,runFunc:x,entityDecode:P,insertTitle:q,isLabelCoordinateInPath:V,parseFontSize:j,InitIDGenerator:N},U=(0,n.K2)(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}),e},"encodeEntities"),Y=(0,n.K2)(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),G=(0,n.K2)((t,e,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${t}_${e}_${r}${n?`_${n}`:""}`,"getEdgeId");function X(t){return t??null}function V(t,e){const r=Math.round(t.x),i=Math.round(t.y),n=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return n.includes(r.toString())||n.includes(i.toString())}(0,n.K2)(X,"handleUndefinedAttr"),(0,n.K2)(V,"isLabelCoordinateInPath")}},i={};function n(t){var e=i[t];if(void 0!==e)return e.exports;var a=i[t]={id:t,loaded:!1,exports:{}};return r[t].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.m=r,n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.f={},n.e=t=>Promise.all(Object.keys(n.f).reduce((e,r)=>(n.f[r](t,e),e),[])),n.u=t=>t+".js?ver="+{9:"1e53a8e3159e1e5cb3c8",32:"c71557053e3f0143e231",127:"840611333d5ecc8445a3",130:"5c3a3a05e0332ca23916",142:"7e0e013f33538b24e29c",149:"a651bf668aea04ec052d",165:"4f19a871fd02e7bcc008",203:"4e4f1ca97da2d8065d1d",217:"2d00b52e51efe1bbdb68",225:"713a226c10d2d882a71b",239:"c8b8bdc8c0d036329701",241:"fd93937e61bc3277a948",249:"4d69cd5f6e63f801ce83",291:"c5e38af9aba51a5482a6",312:"5360969e245914a1a5a0",356:"95ef6a792f3e2cd6d629",412:"701d7c1382f11d3bdadc",480:"a90253d0680adeb8b368",492:"4778a3938c1f3b959ee0",510:"a8366657e7fd2a719400",567:"f97f1bfed4695407689d",592:"1b83dd6a08285cee9d40",616:"e55dba6670e69a2fca6f",620:"81d51072dfa7a4102f71",672:"16d16ad3bbebccf24141",731:"8bf06b95448bd97dc6cc",732:"afb3e4a2fbe7fad3cf49",746:"a649f3aa7faa6c019391",756:"eccb3962194c01f3f5fc",795:"e70c46416e50ff20e4c0",802:"c0583546625bcaba9c99",815:"378a3bc9b002623c0e09",821:"a660a7910d0c837cdfab",900:"9fd4d59d573d1f499c8a",903:"44cd6943a25b2e9a49d0",928:"11d59d6f59be5cdf8131",955:"20a912e50b19825d9edc",981:"4da2ee1dd8c1efe92410",992:"d796990b8eaf7ed02a18",996:"35778efbeadec2e64702"}[t],n.miniCssF=t=>{},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="mindcat:",n.l=(r,i,a,o)=>{if(t[r])t[r].push(i);else{var s,l;if(void 0!==a)for(var h=document.getElementsByTagName("script"),c=0;c<h.length;c++){var u=h[c];if(u.getAttribute("src")==r||u.getAttribute("data-webpack")==e+a){s=u;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",e+a),s.src=r),t[r]=[i];var d=(e,i)=>{s.onerror=s.onload=null,clearTimeout(p);var n=t[r];if(delete t[r],s.parentNode&&s.parentNode.removeChild(s),n&&n.forEach(t=>t(i)),e)return e(i)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),l&&document.head.appendChild(s)}},n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t;globalThis.importScripts&&(t=globalThis.location+"");var e=globalThis.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!t||!/^http(s?):/.test(t));)t=r[i--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t+"../"})(),(()=>{var t={12:0};n.f.j=(e,r)=>{var i=n.o(t,e)?t[e]:void 0;if(0!==i)if(i)r.push(i[2]);else{var a=new Promise((r,n)=>i=t[e]=[r,n]);r.push(i[2]=a);var o=n.p+n.u(e),s=new Error;n.l(o,r=>{if(n.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var a=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;s.message="Loading chunk "+e+" failed.\n("+a+": "+o+")",s.name="ChunkLoadError",s.type=a,s.request=o,i[1](s)}},"chunk-"+e,e)}};var e=(e,r)=>{var i,a,[o,s,l]=r,h=0;if(o.some(e=>0!==t[e])){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);l&&l(n)}for(e&&e(r);h<o.length;h++)a=o[h],n.o(t,a)&&t[a]&&t[a][0](),t[a]=0},r=globalThis.webpackChunkmindcat=globalThis.webpackChunkmindcat||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})(),(()=>{"use strict";var t=n(5553),e=n(3590),r=n(3981),i=n(45),a=(n(5164),n(8698),n(5894),n(3245),n(2387),n(7682)),o=n(3226),s=n(144),l=n(797),h=n(513),c=n(1444),u="comm",d="rule",p="decl",f=Math.abs,g=String.fromCharCode;function y(t){return t.trim()}function m(t,e,r){return t.replace(e,r)}function x(t,e,r){return t.indexOf(e,r)}function b(t,e){return 0|t.charCodeAt(e)}function k(t,e,r){return t.slice(e,r)}function w(t){return t.length}function C(t,e){return e.push(t),t}function _(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function v(t,e,r,i){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case"@namespace":case p:return t.return=t.return||t.value;case u:return"";case"@keyframes":return t.return=t.value+"{"+_(t.children,i)+"}";case d:if(!w(t.value=t.props.join(",")))return""}return w(r=_(t.children,i))?t.return=t.value+"{"+r+"}":""}Object.assign;var S=1,T=1,A=0,M=0,B=0,L="";function F(t,e,r,i,n,a,o,s){return{value:t,root:e,parent:r,type:i,props:n,children:a,line:S,column:T,length:o,return:"",siblings:s}}function $(){return B=M>0?b(L,--M):0,T--,10===B&&(T=1,S--),B}function E(){return B=M<A?b(L,M++):0,T++,10===B&&(T=1,S++),B}function D(){return b(L,M)}function O(){return M}function R(t,e){return k(L,t,e)}function K(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function I(t){return y(R(M-1,z(91===t?t+2:40===t?t+1:t)))}function N(t){for(;(B=D())&&B<33;)E();return K(t)>2||K(B)>3?"":" "}function P(t,e){for(;--e&&E()&&!(B<48||B>102||B>57&&B<65||B>70&&B<97););return R(t,O()+(e<6&&32==D()&&32==E()))}function z(t){for(;E();)switch(B){case t:return M;case 34:case 39:34!==t&&39!==t&&z(B);break;case 40:41===t&&z(t);break;case 92:E()}return M}function q(t,e){for(;E()&&t+B!==57&&(t+B!==84||47!==D()););return"/*"+R(e,M-1)+"*"+g(47===t?t:E())}function j(t){for(;!K(D());)E();return R(t,M)}function W(t){return function(t){return L="",t}(H("",null,null,null,[""],t=function(t){return S=T=1,A=w(L=t),M=0,[]}(t),0,[0],t))}function H(t,e,r,i,n,a,o,s,l){for(var h=0,c=0,u=o,d=0,p=0,y=0,_=1,v=1,S=1,T=0,A="",M=n,B=a,L=i,F=A;v;)switch(y=T,T=E()){case 40:if(108!=y&&58==b(F,u-1)){-1!=x(F+=m(I(T),"&","&\f"),"&\f",f(h?s[h-1]:0))&&(S=-1);break}case 34:case 39:case 91:F+=I(T);break;case 9:case 10:case 13:case 32:F+=N(y);break;case 92:F+=P(O()-1,7);continue;case 47:switch(D()){case 42:case 47:C(Y(q(E(),O()),e,r,l),l),5!=K(y||1)&&5!=K(D()||1)||!w(F)||" "===k(F,-1,void 0)||(F+=" ");break;default:F+="/"}break;case 123*_:s[h++]=w(F)*S;case 125*_:case 59:case 0:switch(T){case 0:case 125:v=0;case 59+c:-1==S&&(F=m(F,/\f/g,"")),p>0&&(w(F)-u||0===_&&47===y)&&C(p>32?G(F+";",i,r,u-1,l):G(m(F," ","")+";",i,r,u-2,l),l);break;case 59:F+=";";default:if(C(L=U(F,e,r,h,c,n,s,A,M=[],B=[],u,a),a),123===T)if(0===c)H(F,e,L,L,M,a,u,s,B);else{switch(d){case 99:if(110===b(F,3))break;case 108:if(97===b(F,2))break;default:c=0;case 100:case 109:case 115:}c?H(t,L,L,i&&C(U(t,L,L,0,0,n,s,A,n,M=[],u,B),B),n,B,u,s,i?M:B):H(F,L,L,L,[""],B,0,s,B)}}h=c=p=0,_=S=1,A=F="",u=o;break;case 58:u=1+w(F),p=y;default:if(_<1)if(123==T)--_;else if(125==T&&0==_++&&125==$())continue;switch(F+=g(T),T*_){case 38:S=c>0?1:(F+="\f",-1);break;case 44:s[h++]=(w(F)-1)*S,S=1;break;case 64:45===D()&&(F+=I(E())),d=D(),c=u=w(A=F+=j(O())),T++;break;case 45:45===y&&2==w(F)&&(_=0)}}return a}function U(t,e,r,i,n,a,o,s,l,h,c,u){for(var p=n-1,g=0===n?a:[""],x=function(t){return t.length}(g),b=0,w=0,C=0;b<i;++b)for(var _=0,v=k(t,p+1,p=f(w=o[b])),S=t;_<x;++_)(S=y(w>0?g[_]+" "+v:m(v,/&\f/g,g[_])))&&(l[C++]=S);return F(t,e,r,0===n?d:s,l,h,c,u)}function Y(t,e,r,i){return F(t,e,r,u,g(B),k(t,2,-2),0,i)}function G(t,e,r,i,n){return F(t,e,r,p,k(t,0,i),k(t,i+1,-1),i,n)}var X=n(9418),V=n(2193),Z={id:"c4",detector:(0,l.K2)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await n.e(981).then(n.bind(n,4981));return{id:"c4",diagram:t}},"loader")},Q="flowchart",J={id:Q,detector:(0,l.K2)((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await n.e(672).then(n.bind(n,2291));return{id:Q,diagram:t}},"loader")},tt="flowchart-v2",et={id:tt,detector:(0,l.K2)((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await n.e(672).then(n.bind(n,2291));return{id:tt,diagram:t}},"loader")},rt={id:"er",detector:(0,l.K2)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await n.e(756).then(n.bind(n,8756));return{id:"er",diagram:t}},"loader")},it="gitGraph",nt={id:it,detector:(0,l.K2)(t=>/^\s*gitGraph/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(731),n.e(312)]).then(n.bind(n,4312));return{id:it,diagram:t}},"loader")},at="gantt",ot={id:at,detector:(0,l.K2)(t=>/^\s*gantt/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await n.e(492).then(n.bind(n,2492));return{id:at,diagram:t}},"loader")},st="info",lt={id:st,detector:(0,l.K2)(t=>/^\s*info/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(731),n.e(239)]).then(n.bind(n,9620));return{id:st,diagram:t}},"loader")},ht={id:"pie",detector:(0,l.K2)(t=>/^\s*pie/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(731),n.e(412)]).then(n.bind(n,9412));return{id:"pie",diagram:t}},"loader")},ct="quadrantChart",ut={id:ct,detector:(0,l.K2)(t=>/^\s*quadrantChart/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await n.e(203).then(n.bind(n,1203));return{id:ct,diagram:t}},"loader")},dt="xychart",pt={id:dt,detector:(0,l.K2)(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await n.e(955).then(n.bind(n,5955));return{id:dt,diagram:t}},"loader")},ft="requirement",gt={id:ft,detector:(0,l.K2)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await n.e(32).then(n.bind(n,9032));return{id:ft,diagram:t}},"loader")},yt="sequence",mt={id:yt,detector:(0,l.K2)(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await n.e(592).then(n.bind(n,7592));return{id:yt,diagram:t}},"loader")},xt="class",bt={id:xt,detector:(0,l.K2)((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(746),n.e(510)]).then(n.bind(n,9510));return{id:xt,diagram:t}},"loader")},kt="classDiagram",wt={id:kt,detector:(0,l.K2)((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(746),n.e(815)]).then(n.bind(n,3815));return{id:kt,diagram:t}},"loader")},Ct="state",_t={id:Ct,detector:(0,l.K2)((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(620),n.e(616),n.e(142)]).then(n.bind(n,8142));return{id:Ct,diagram:t}},"loader")},vt="stateDiagram",St={id:vt,detector:(0,l.K2)((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(616),n.e(802)]).then(n.bind(n,4802));return{id:vt,diagram:t}},"loader")},Tt="journey",At={id:Tt,detector:(0,l.K2)(t=>/^\s*journey/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await n.e(480).then(n.bind(n,5480));return{id:Tt,diagram:t}},"loader")},Mt={draw:(0,l.K2)((t,r,i)=>{l.Rm.debug("rendering svg for syntax error\n");const n=(0,e.D)(r),a=n.append("g");n.attr("viewBox","0 0 2412 512"),(0,s.a$)(n,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${i}`)},"draw")},Bt=Mt,Lt={db:{},renderer:Mt,parser:{parse:(0,l.K2)(()=>{},"parse")}},Ft="flowchart-elk",$t={id:Ft,detector:(0,l.K2)((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await n.e(672).then(n.bind(n,2291));return{id:Ft,diagram:t}},"loader")},Et="timeline",Dt={id:Et,detector:(0,l.K2)(t=>/^\s*timeline/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await n.e(291).then(n.bind(n,291));return{id:Et,diagram:t}},"loader")},Ot="mindmap",Rt={id:Ot,detector:(0,l.K2)(t=>/^\s*mindmap/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await n.e(900).then(n.bind(n,4900));return{id:Ot,diagram:t}},"loader")},Kt="kanban",It={id:Kt,detector:(0,l.K2)(t=>/^\s*kanban/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await n.e(241).then(n.bind(n,6241));return{id:Kt,diagram:t}},"loader")},Nt="sankey",Pt={id:Nt,detector:(0,l.K2)(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await n.e(9).then(n.bind(n,2009));return{id:Nt,diagram:t}},"loader")},zt="packet",qt={id:zt,detector:(0,l.K2)(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(731),n.e(567)]).then(n.bind(n,6567));return{id:zt,diagram:t}},"loader")},jt="radar",Wt={id:jt,detector:(0,l.K2)(t=>/^\s*radar-beta/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(731),n.e(992)]).then(n.bind(n,6992));return{id:jt,diagram:t}},"loader")},Ht="block",Ut={id:Ht,detector:(0,l.K2)(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await n.e(996).then(n.bind(n,5996));return{id:Ht,diagram:t}},"loader")},Yt="architecture",Gt={id:Yt,detector:(0,l.K2)(t=>/^\s*architecture/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(731),n.e(165),n.e(249)]).then(n.bind(n,8249));return{id:Yt,diagram:t}},"loader")},Xt="treemap",Vt={id:Xt,detector:(0,l.K2)(t=>/^\s*treemap/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(731),n.e(821)]).then(n.bind(n,2821));return{id:Xt,diagram:t}},"loader")},Zt=!1,Qt=(0,l.K2)(()=>{Zt||(Zt=!0,(0,s.Js)("error",Lt,t=>"error"===t.toLowerCase().trim()),(0,s.Js)("---",{db:{clear:(0,l.K2)(()=>{},"clear")},styles:{},renderer:{draw:(0,l.K2)(()=>{},"draw")},parser:{parse:(0,l.K2)(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:(0,l.K2)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,s.Xd)($t,Rt,Gt),(0,s.Xd)(Z,It,wt,bt,rt,ot,lt,ht,gt,mt,et,J,Dt,nt,St,_t,At,ut,Pt,qt,pt,Ut,Wt,Vt))},"addDiagrams"),Jt=(0,l.K2)(async()=>{l.Rm.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(s.mW).map(async([t,{detector:e,loader:r}])=>{if(r)try{(0,s.Gs)(t)}catch{try{const{diagram:t,id:i}=await r();(0,s.Js)(i,t,e)}catch(e){throw l.Rm.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete s.mW[t],e}}}))).filter(t=>"rejected"===t.status);if(t.length>0){l.Rm.error(`Failed to load ${t.length} external diagrams`);for(const e of t)l.Rm.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function te(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function ee(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,l.K2)(te,"setA11yDiagramInfo"),(0,l.K2)(ee,"addSVGa11yTitleDescription");var re=class t{constructor(t,e,r,i,n){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=n}static{(0,l.K2)(this,"Diagram")}static async fromText(e,r={}){const i=(0,s.zj)(),n=(0,s.Ch)(e,i);e=(0,o.C4)(e)+"\n";try{(0,s.Gs)(n)}catch{const t=(0,s.J$)(n);if(!t)throw new s.C0(`Diagram ${n} not found.`);const{id:e,diagram:r}=await t();(0,s.Js)(e,r)}const{db:a,parser:l,renderer:h,init:c}=(0,s.Gs)(n);return l.parser&&(l.parser.yy=a),a.clear?.(),c?.(i),r.title&&a.setDiagramTitle?.(r.title),await l.parse(e),new t(n,e,a,l,h)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},ie=[],ne=(0,l.K2)(()=>{ie.forEach(t=>{t()}),ie=[]},"attachFunctions"),ae=(0,l.K2)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function oe(t){const e=t.match(s.EJ);if(!e)return{text:t,metadata:{}};let i=(0,r.H)(e[1],{schema:r.r})??{};i="object"!=typeof i||Array.isArray(i)?{}:i;const n={};return i.displayMode&&(n.displayMode=i.displayMode.toString()),i.title&&(n.title=i.title.toString()),i.config&&(n.config=i.config),{text:t.slice(e[0].length),metadata:n}}(0,l.K2)(oe,"extractFrontMatter");var se=(0,l.K2)(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),le=(0,l.K2)(t=>{const{text:e,metadata:r}=oe(t),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:e}},"processFrontmatter"),he=(0,l.K2)(t=>{const e=o._K.detectInit(t)??{},r=o._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:(0,o.vU)(t),directive:e}},"processDirectives");function ce(t){const e=se(t),r=le(e),i=he(r.text),n=(0,o.$t)(r.config,i.directive);return{code:t=ae(i.text),title:r.title,config:n}}function ue(t){const e=(new TextEncoder).encode(t),r=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(r)}(0,l.K2)(ce,"preprocessDiagram"),(0,l.K2)(ue,"toBase64");var de=["foreignobject"],pe=["dominant-baseline"];function fe(t){const e=ce(t);return(0,s.cL)(),(0,s.xA)(e.config??{}),e}async function ge(t,e){Qt();try{const{code:e,config:r}=fe(t);return{diagramType:(await Te(e)).type,config:r}}catch(t){if(e?.suppressErrors)return!1;throw t}}(0,l.K2)(fe,"processAndSetConfigs"),(0,l.K2)(ge,"parse");var ye=(0,l.K2)((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),me=(0,l.K2)((t,e=new Map)=>{let r="";if(void 0!==t.themeCSS&&(r+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const i=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{V(t.styles)||i.forEach(e=>{r+=ye(t.id,e,t.styles)}),V(t.textStyles)||(r+=ye(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return r},"createCssStyles"),xe=(0,l.K2)((t,e,r,i)=>{const n=me(t,r);return _(W(`${i}{${(0,s.tM)(e,n,t.themeVariables)}}`),v)},"createUserStyles"),be=(0,l.K2)((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(0,o.Sm)(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),ke=(0,l.K2)((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${ue(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`,"putIntoIFrame"),we=(0,l.K2)((t,e,r,i,n)=>{const a=t.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return n&&o.attr("xmlns:xlink",n),o.append("g"),t},"appendDivSvgG");function Ce(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,l.K2)(Ce,"sandboxedIframe");var _e=(0,l.K2)((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),ve=(0,l.K2)(async function(e,r,i){Qt();const n=fe(r);r=n.code;const a=(0,s.zj)();l.Rm.debug(a),r.length>(a?.maxTextSize??5e4)&&(r="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const o="#"+e,h="i"+e,u="#"+h,d="d"+e,p="#"+d,f=(0,l.K2)(()=>{const t=y?u:p,e=(0,c.Ltv)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements");let g=(0,c.Ltv)("body");const y="sandbox"===a.securityLevel,m="loose"===a.securityLevel,x=a.fontFamily;if(void 0!==i){if(i&&(i.innerHTML=""),y){const t=Ce((0,c.Ltv)(i),h);g=(0,c.Ltv)(t.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=(0,c.Ltv)(i);we(g,e,d,`font-family: ${x}`,"http://www.w3.org/1999/xlink")}else{if(_e(document,e,d,h),y){const t=Ce((0,c.Ltv)("body"),h);g=(0,c.Ltv)(t.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=(0,c.Ltv)("body");we(g,e,d)}let b,k;try{b=await re.fromText(r,{title:n.title})}catch(t){if(a.suppressErrorRendering)throw f(),t;b=await re.fromText("error"),k=t}const w=g.select(p).node(),C=b.type,_=w.firstChild,v=_.firstChild,S=b.renderer.getClasses?.(r,b),T=xe(a,C,S,o),A=document.createElement("style");A.innerHTML=T,_.insertBefore(A,v);try{await b.renderer.draw(r,e,t.n.version,b)}catch(i){throw a.suppressErrorRendering?f():Bt.draw(r,e,t.n.version),i}const M=g.select(`${p} svg`),B=b.db.getAccTitle?.(),L=b.db.getAccDescription?.();Ae(C,M,B,L),g.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let F=g.select(p).node().innerHTML;if(l.Rm.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),F=be(F,y,(0,s._3)(a.arrowMarkerAbsolute)),y){const t=g.select(p+" svg").node();F=ke(F,t)}else m||(F=X.A.sanitize(F,{ADD_TAGS:de,ADD_ATTR:pe,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(ne(),k)throw k;return f(),{diagramType:C,svg:F,bindFunctions:b.db.bindFunctions}},"render");function Se(t={}){const e=(0,s.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,s.wZ)(e),e?.theme&&e.theme in s.H$?e.themeVariables=s.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=s.H$.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?(0,s.UU)(e):(0,s.Q2)();(0,l.He)(r.logLevel),Qt()}(0,l.K2)(Se,"initialize");var Te=(0,l.K2)((t,e={})=>{const{code:r}=ce(t);return re.fromText(r,e)},"getDiagramFromText");function Ae(t,e,r,i){te(e,t),ee(e,r,i,e.attr("id"))}(0,l.K2)(Ae,"addA11yInfo");var Me=Object.freeze({render:ve,parse:ge,getDiagramFromText:Te,initialize:Se,getConfig:s.zj,setConfig:s.Nk,getSiteConfig:s.Q2,updateSiteConfig:s.B6,reset:(0,l.K2)(()=>{(0,s.cL)()},"reset"),globalReset:(0,l.K2)(()=>{(0,s.cL)(s.sb)},"globalReset"),defaultConfig:s.sb});(0,l.He)((0,s.zj)().logLevel),(0,s.cL)((0,s.zj)());var Be=(0,l.K2)((t,e,r)=>{l.Rm.warn(t),(0,o.dq)(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),Le=(0,l.K2)(async function(t={querySelector:".mermaid"}){try{await Fe(t)}catch(e){if((0,o.dq)(e)&&l.Rm.error(e.str),je.parseError&&je.parseError(e),!t.suppressErrors)throw l.Rm.error("Use the suppressErrors option to suppress these errors"),e}},"run"),Fe=(0,l.K2)(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=Me.getConfig();let n;if(l.Rm.debug((t?"":"No ")+"Callback function found"),r)n=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");n=document.querySelectorAll(e)}l.Rm.debug(`Found ${n.length} diagrams`),void 0!==i?.startOnLoad&&(l.Rm.debug("Start On Load: "+i?.startOnLoad),Me.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new o._K.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const c=[];for(const e of Array.from(n)){if(l.Rm.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");const r=`mermaid-${a.next()}`;s=e.innerHTML,s=(0,h.T)(o._K.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const i=o._K.detectInit(s);i&&l.Rm.debug("Detected early reinit: ",i);try{const{svg:i,bindFunctions:n}=await ze(r,s,e);e.innerHTML=i,t&&await t(r),n&&n(e)}catch(t){Be(t,c,je.parseError)}}if(c.length>0)throw c[0]},"runThrowsErrors"),$e=(0,l.K2)(function(t){Me.initialize(t)},"initialize"),Ee=(0,l.K2)(async function(t,e,r){l.Rm.warn("mermaid.init is deprecated. Please use run instead."),t&&$e(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await Le(i)},"init"),De=(0,l.K2)(async(t,{lazyLoad:e=!0}={})=>{Qt(),(0,s.Xd)(...t),!1===e&&await Jt()},"registerExternalDiagrams"),Oe=(0,l.K2)(function(){if(je.startOnLoad){const{startOnLoad:t}=Me.getConfig();t&&je.run().catch(t=>l.Rm.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",Oe,!1);var Re=(0,l.K2)(function(t){je.parseError=t},"setParseErrorHandler"),Ke=[],Ie=!1,Ne=(0,l.K2)(async()=>{if(!Ie){for(Ie=!0;Ke.length>0;){const t=Ke.shift();if(t)try{await t()}catch(t){l.Rm.error("Error executing queue",t)}}Ie=!1}},"executeQueue"),Pe=(0,l.K2)(async(t,e)=>new Promise((r,i)=>{const n=(0,l.K2)(()=>new Promise((n,a)=>{Me.parse(t,e).then(t=>{n(t),r(t)},t=>{l.Rm.error("Error parsing",t),je.parseError?.(t),a(t),i(t)})}),"performCall");Ke.push(n),Ne().catch(i)}),"parse"),ze=(0,l.K2)((t,e,r)=>new Promise((i,n)=>{const a=(0,l.K2)(()=>new Promise((a,o)=>{Me.render(t,e,r).then(t=>{a(t),i(t)},t=>{l.Rm.error("Error parsing",t),je.parseError?.(t),o(t),n(t)})}),"performCall");Ke.push(a),Ne().catch(n)}),"render"),qe=(0,l.K2)(()=>Object.keys(s.mW).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),je={startOnLoad:!0,mermaidAPI:Me,parse:Pe,render:ze,init:Ee,run:Le,registerExternalDiagrams:De,registerLayoutLoaders:i.sO,initialize:$e,parseError:void 0,contentLoaded:Oe,setParseErrorHandler:Re,detectType:s.Ch,registerIconPacks:a.pC,getRegisteredDiagramsMetadata:qe},We=je,He=0,Ue=[];jQuery(document).ready(function(){function t(e,r,i,n){Ue[e.data("id")]=e.children("ul").children("li").length,0!=Ue[e.data("id")]&&e.children("ul").children("li").each(function(){var a=Ue[e.data("id")],o=jQuery(this).parent().parent(),s=o.offset();s.height=o.height(),s.width=o.width(),s.centerx=s.left+s.width/2,s.centery=s.top+s.height/2;var l=jQuery(this).children("a").outerWidth(),h=(jQuery(this).children("a").outerHeight(),0);jQuery(this).children("a").css({left:"-"+l/2+"px"}),0==He?(jQuery(this).offset({top:s.centery,left:s.centerx}),He=1):(h=360/a*i+n,console.log(h),jQuery(this).height(r).css({"-transform":"rotate("+h+"deg)","-moz-transform":"rotate("+h+"deg)","-webkit-transform":"rotate("+h+"deg)"}),jQuery(this).children("a,ul").css({transform:"rotate(-"+h+"deg)","-moz-transform":"rotate(-"+h+"deg)","-webkit-transform":"rotate(-"+h+"deg)"})),i++,t(jQuery(this),r/2,0,8*a+n)})}jQuery(".mindcat").each(function(){var e=jQuery(this),r=e.data("size");isNaN(r)&&(r=50),e.height(12*r);var i=e.offset();i.height=e.height(),i.width=e.width();var n=90*Math.random();t(jQuery(this),10*r,0,n)}),jQuery(".mindcat-color-field").length>0&&jQuery(".mindcat-color-field").wpColorPicker(),jQuery(".mermaid").length>0&&We.initialize({startOnLoad:!0})})})()})();1 (()=>{var t,e,r={9119(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},6750(t,e,r){"use strict";e.J=function(t){if(!t)return i.BLANK_URL;var e,r=a(t.trim());do{e=(r=a(r=n(r).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim())).match(i.ctrlCharactersRegex)||r.match(i.htmlEntitiesRegex)||r.match(i.htmlCtrlEntityRegex)||r.match(i.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var o=r;if(!o)return i.BLANK_URL;if(function(t){return i.relativeFirstCharacters.indexOf(t[0])>-1}(o))return o;var s=o.trimStart(),l=s.match(i.urlSchemeRegex);if(!l)return o;var h=l[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(h))return i.BLANK_URL;var c=s.replace(/\\/g,"/");if("mailto:"===h||h.includes("://"))return c;if("http:"===h||"https:"===h){if(!function(t){return URL.canParse(t)}(c))return i.BLANK_URL;var u=new URL(c);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return c};var i=r(9119);function n(t){return t.replace(i.ctrlCharactersRegex,"").replace(i.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function a(t){try{return decodeURIComponent(t)}catch(e){return t}}},4353(t){t.exports=function(){"use strict";var t=6e4,e=36e5,r="millisecond",i="second",n="minute",a="hour",o="day",s="week",l="month",h="quarter",c="year",u="date",d="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},y=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},m={s:y,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),n=r%60;return(e<=0?"+":"-")+y(i,2,"0")+":"+y(n,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var i=12*(r.year()-e.year())+(r.month()-e.month()),n=e.clone().add(i,l),a=r-n<0,o=e.clone().add(i+(a?-1:1),l);return+(-(i+(r-n)/(a?n-o:o-n))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:l,y:c,w:s,d:o,D:u,h:a,m:n,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},x="en",b={};b[x]=g;var k="$isDayjsObject",C=function(t){return t instanceof S||!(!t||!t[k])},w=function t(e,r,i){var n;if(!e)return x;if("string"==typeof e){var a=e.toLowerCase();b[a]&&(n=a),r&&(b[a]=r,n=a);var o=e.split("-");if(!n&&o.length>1)return t(o[0])}else{var s=e.name;b[s]=e,n=s}return!i&&n&&(x=n),n||!i&&x},_=function(t,e){if(C(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new S(r)},v=m;v.l=w,v.i=C,v.w=function(t,e){return _(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function g(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var y=g.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(v.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(p);if(i){var n=i[2]-1||0,a=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return v},y.isValid=function(){return!(this.$d.toString()===d)},y.isSame=function(t,e){var r=_(t);return this.startOf(e)<=r&&r<=this.endOf(e)},y.isAfter=function(t,e){return _(t)<this.startOf(e)},y.isBefore=function(t,e){return this.endOf(e)<_(t)},y.$g=function(t,e,r){return v.u(t)?this[e]:this.set(r,t)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(t,e){var r=this,h=!!v.u(e)||e,d=v.p(t),p=function(t,e){var i=v.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return h?i:i.endOf(o)},f=function(t,e){return v.w(r.toDate()[t].apply(r.toDate("s"),(h?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},g=this.$W,y=this.$M,m=this.$D,x="set"+(this.$u?"UTC":"");switch(d){case c:return h?p(1,0):p(31,11);case l:return h?p(1,y):p(0,y+1);case s:var b=this.$locale().weekStart||0,k=(g<b?g+7:g)-b;return p(h?m-k:m+(6-k),y);case o:case u:return f(x+"Hours",0);case a:return f(x+"Minutes",1);case n:return f(x+"Seconds",2);case i:return f(x+"Milliseconds",3);default:return this.clone()}},y.endOf=function(t){return this.startOf(t,!1)},y.$set=function(t,e){var s,h=v.p(t),d="set"+(this.$u?"UTC":""),p=(s={},s[o]=d+"Date",s[u]=d+"Date",s[l]=d+"Month",s[c]=d+"FullYear",s[a]=d+"Hours",s[n]=d+"Minutes",s[i]=d+"Seconds",s[r]=d+"Milliseconds",s)[h],f=h===o?this.$D+(e-this.$W):e;if(h===l||h===c){var g=this.clone().set(u,1);g.$d[p](f),g.init(),this.$d=g.set(u,Math.min(this.$D,g.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},y.set=function(t,e){return this.clone().$set(t,e)},y.get=function(t){return this[v.p(t)]()},y.add=function(r,h){var u,d=this;r=Number(r);var p=v.p(h),f=function(t){var e=_(d);return v.w(e.date(e.date()+Math.round(t*r)),d)};if(p===l)return this.set(l,this.$M+r);if(p===c)return this.set(c,this.$y+r);if(p===o)return f(1);if(p===s)return f(7);var g=(u={},u[n]=t,u[a]=e,u[i]=1e3,u)[p]||1,y=this.$d.getTime()+r*g;return v.w(y,this)},y.subtract=function(t,e){return this.add(-1*t,e)},y.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var i=t||"YYYY-MM-DDTHH:mm:ssZ",n=v.z(this),a=this.$H,o=this.$m,s=this.$M,l=r.weekdays,h=r.months,c=r.meridiem,u=function(t,r,n,a){return t&&(t[r]||t(e,i))||n[r].slice(0,a)},p=function(t){return v.s(a%12||12,t,"0")},g=c||function(t,e,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(f,function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return v.s(e.$y,4,"0");case"M":return s+1;case"MM":return v.s(s+1,2,"0");case"MMM":return u(r.monthsShort,s,h,3);case"MMMM":return u(h,s);case"D":return e.$D;case"DD":return v.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return u(r.weekdaysMin,e.$W,l,2);case"ddd":return u(r.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(a);case"HH":return v.s(a,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return g(a,o,!0);case"A":return g(a,o,!1);case"m":return String(o);case"mm":return v.s(o,2,"0");case"s":return String(e.$s);case"ss":return v.s(e.$s,2,"0");case"SSS":return v.s(e.$ms,3,"0");case"Z":return n}return null}(t)||n.replace(":","")})},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,u,d){var p,f=this,g=v.p(u),y=_(r),m=(y.utcOffset()-this.utcOffset())*t,x=this-y,b=function(){return v.m(f,y)};switch(g){case c:p=b()/12;break;case l:p=b();break;case h:p=b()/3;break;case s:p=(x-m)/6048e5;break;case o:p=(x-m)/864e5;break;case a:p=x/e;break;case n:p=x/t;break;case i:p=x/1e3;break;default:p=x}return d?p:v.a(p)},y.daysInMonth=function(){return this.endOf(l).$D},y.$locale=function(){return b[this.$L]},y.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),i=w(t,e,!0);return i&&(r.$L=i),r},y.clone=function(){return v.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},g}(),T=S.prototype;return _.prototype=T,[["$ms",r],["$s",i],["$m",n],["$H",a],["$W",o],["$M",l],["$y",c],["$D",u]].forEach(function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),_.extend=function(t,e){return t.$i||(t(e,S,_),t.$i=!0),_},_.locale=w,_.isDayjs=C,_.unix=function(t){return _(1e3*t)},_.en=b[x],_.Ls=b,_.p={},_}()},5580(t,e,r){var i=r(6110)(r(9325),"DataView");t.exports=i},1549(t,e,r){var i=r(2032),n=r(3862),a=r(6721),o=r(2749),s=r(5749);function l(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=n,l.prototype.get=a,l.prototype.has=o,l.prototype.set=s,t.exports=l},79(t,e,r){var i=r(3702),n=r(80),a=r(4739),o=r(8655),s=r(1175);function l(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=n,l.prototype.get=a,l.prototype.has=o,l.prototype.set=s,t.exports=l},8223(t,e,r){var i=r(6110)(r(9325),"Map");t.exports=i},3661(t,e,r){var i=r(3040),n=r(7670),a=r(289),o=r(4509),s=r(2949);function l(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=n,l.prototype.get=a,l.prototype.has=o,l.prototype.set=s,t.exports=l},2804(t,e,r){var i=r(6110)(r(9325),"Promise");t.exports=i},6545(t,e,r){var i=r(6110)(r(9325),"Set");t.exports=i},7217(t,e,r){var i=r(79),n=r(1420),a=r(938),o=r(3605),s=r(9817),l=r(945);function h(t){var e=this.__data__=new i(t);this.size=e.size}h.prototype.clear=n,h.prototype.delete=a,h.prototype.get=o,h.prototype.has=s,h.prototype.set=l,t.exports=h},1873(t,e,r){var i=r(9325).Symbol;t.exports=i},7828(t,e,r){var i=r(9325).Uint8Array;t.exports=i},8303(t,e,r){var i=r(6110)(r(9325),"WeakMap");t.exports=i},1033(t){t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},695(t,e,r){var i=r(8096),n=r(2428),a=r(6449),o=r(3656),s=r(361),l=r(7167),h=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=a(t),c=!r&&n(t),u=!r&&!c&&o(t),d=!r&&!c&&!u&&l(t),p=r||c||u||d,f=p?i(t.length,String):[],g=f.length;for(var y in t)!e&&!h.call(t,y)||p&&("length"==y||u&&("offset"==y||"parent"==y)||d&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,g))||f.push(y);return f}},7805(t,e,r){var i=r(3360),n=r(5288);t.exports=function(t,e,r){(void 0!==r&&!n(t[e],r)||void 0===r&&!(e in t))&&i(t,e,r)}},6547(t,e,r){var i=r(3360),n=r(5288),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var o=t[e];a.call(t,e)&&n(o,r)&&(void 0!==r||e in t)||i(t,e,r)}},6025(t,e,r){var i=r(5288);t.exports=function(t,e){for(var r=t.length;r--;)if(i(t[r][0],e))return r;return-1}},3360(t,e,r){var i=r(3243);t.exports=function(t,e,r){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},9344(t,e,r){var i=r(3805),n=Object.create,a=function(){function t(){}return function(e){if(!i(e))return{};if(n)return n(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=a},6649(t,e,r){var i=r(3221)();t.exports=i},2552(t,e,r){var i=r(1873),n=r(659),a=r(9350),o=i?i.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?n(t):a(t)}},7534(t,e,r){var i=r(2552),n=r(346);t.exports=function(t){return n(t)&&"[object Arguments]"==i(t)}},5083(t,e,r){var i=r(1882),n=r(7296),a=r(3805),o=r(7473),s=/^\[object .+?Constructor\]$/,l=Function.prototype,h=Object.prototype,c=l.toString,u=h.hasOwnProperty,d=RegExp("^"+c.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||n(t))&&(i(t)?d:s).test(o(t))}},4901(t,e,r){var i=r(2552),n=r(294),a=r(346),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=function(t){return a(t)&&n(t.length)&&!!o[i(t)]}},8984(t,e,r){var i=r(5527),n=r(3650),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return n(t);var e=[];for(var r in Object(t))a.call(t,r)&&"constructor"!=r&&e.push(r);return e}},2903(t,e,r){var i=r(3805),n=r(5527),a=r(181),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return a(t);var e=n(t),r=[];for(var s in t)("constructor"!=s||!e&&o.call(t,s))&&r.push(s);return r}},5250(t,e,r){var i=r(7217),n=r(7805),a=r(6649),o=r(2824),s=r(3805),l=r(7241),h=r(4974);t.exports=function t(e,r,c,u,d){e!==r&&a(r,function(a,l){if(d||(d=new i),s(a))o(e,r,l,c,t,u,d);else{var p=u?u(h(e,l),a,l+"",e,r,d):void 0;void 0===p&&(p=a),n(e,l,p)}},l)}},2824(t,e,r){var i=r(7805),n=r(3290),a=r(1961),o=r(3007),s=r(5529),l=r(2428),h=r(6449),c=r(3693),u=r(3656),d=r(1882),p=r(3805),f=r(1331),g=r(7167),y=r(4974),m=r(9884);t.exports=function(t,e,r,x,b,k,C){var w=y(t,r),_=y(e,r),v=C.get(_);if(v)i(t,r,v);else{var S=k?k(w,_,r+"",t,e,C):void 0,T=void 0===S;if(T){var A=h(_),M=!A&&u(_),B=!A&&!M&&g(_);S=_,A||M||B?h(w)?S=w:c(w)?S=o(w):M?(T=!1,S=n(_,!0)):B?(T=!1,S=a(_,!0)):S=[]:f(_)||l(_)?(S=w,l(w)?S=m(w):p(w)&&!d(w)||(S=s(_))):T=!1}T&&(C.set(_,S),b(S,_,x,k,C),C.delete(_)),i(t,r,S)}}},9302(t,e,r){var i=r(3488),n=r(6757),a=r(2865);t.exports=function(t,e){return a(n(t,e,i),t+"")}},9570(t,e,r){var i=r(7334),n=r(3243),a=r(3488),o=n?function(t,e){return n(t,"toString",{configurable:!0,enumerable:!1,value:i(e),writable:!0})}:a;t.exports=o},8096(t){t.exports=function(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}},7301(t){t.exports=function(t){return function(e){return t(e)}}},9653(t,e,r){var i=r(7828);t.exports=function(t){var e=new t.constructor(t.byteLength);return new i(e).set(new i(t)),e}},3290(t,e,r){t=r.nmd(t);var i=r(9325),n=e&&!e.nodeType&&e,a=n&&t&&!t.nodeType&&t,o=a&&a.exports===n?i.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,i=s?s(r):new t.constructor(r);return t.copy(i),i}},1961(t,e,r){var i=r(9653);t.exports=function(t,e){var r=e?i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},3007(t){t.exports=function(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}},1791(t,e,r){var i=r(6547),n=r(3360);t.exports=function(t,e,r,a){var o=!r;r||(r={});for(var s=-1,l=e.length;++s<l;){var h=e[s],c=a?a(r[h],t[h],h,r,t):void 0;void 0===c&&(c=t[h]),o?n(r,h,c):i(r,h,c)}return r}},5481(t,e,r){var i=r(9325)["__core-js_shared__"];t.exports=i},999(t,e,r){var i=r(9302),n=r(6800);t.exports=function(t){return i(function(e,r){var i=-1,a=r.length,o=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&n(r[0],r[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++i<a;){var l=r[i];l&&t(e,l,i,o)}return e})}},3221(t){t.exports=function(t){return function(e,r,i){for(var n=-1,a=Object(e),o=i(e),s=o.length;s--;){var l=o[t?s:++n];if(!1===r(a[l],l,a))break}return e}}},3243(t,e,r){var i=r(6110),n=function(){try{var t=i(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=n},4840(t){var e="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis;t.exports=e},2651(t,e,r){var i=r(4218);t.exports=function(t,e){var r=t.__data__;return i(e)?r["string"==typeof e?"string":"hash"]:r.map}},6110(t,e,r){var i=r(5083),n=r(392);t.exports=function(t,e){var r=n(t,e);return i(r)?r:void 0}},8879(t,e,r){var i=r(4335)(Object.getPrototypeOf,Object);t.exports=i},659(t,e,r){var i=r(1873),n=Object.prototype,a=n.hasOwnProperty,o=n.toString,s=i?i.toStringTag:void 0;t.exports=function(t){var e=a.call(t,s),r=t[s];try{t[s]=void 0;var i=!0}catch(t){}var n=o.call(t);return i&&(e?t[s]=r:delete t[s]),n}},5861(t,e,r){var i=r(5580),n=r(8223),a=r(2804),o=r(6545),s=r(8303),l=r(2552),h=r(7473),c="[object Map]",u="[object Promise]",d="[object Set]",p="[object WeakMap]",f="[object DataView]",g=h(i),y=h(n),m=h(a),x=h(o),b=h(s),k=l;(i&&k(new i(new ArrayBuffer(1)))!=f||n&&k(new n)!=c||a&&k(a.resolve())!=u||o&&k(new o)!=d||s&&k(new s)!=p)&&(k=function(t){var e=l(t),r="[object Object]"==e?t.constructor:void 0,i=r?h(r):"";if(i)switch(i){case g:return f;case y:return c;case m:return u;case x:return d;case b:return p}return e}),t.exports=k},392(t){t.exports=function(t,e){return null==t?void 0:t[e]}},2032(t,e,r){var i=r(1042);t.exports=function(){this.__data__=i?i(null):{},this.size=0}},3862(t){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},6721(t,e,r){var i=r(1042),n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(i){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return n.call(e,t)?e[t]:void 0}},2749(t,e,r){var i=r(1042),n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return i?void 0!==e[t]:n.call(e,t)}},5749(t,e,r){var i=r(1042);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this}},5529(t,e,r){var i=r(9344),n=r(8879),a=r(5527);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:i(n(t))}},361(t){var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,r){var i=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&e.test(t))&&t>-1&&t%1==0&&t<r}},6800(t,e,r){var i=r(5288),n=r(4894),a=r(361),o=r(3805);t.exports=function(t,e,r){if(!o(r))return!1;var s=typeof e;return!!("number"==s?n(r)&&a(e,r.length):"string"==s&&e in r)&&i(r[e],t)}},4218(t){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},7296(t,e,r){var i,n=r(5481),a=(i=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";t.exports=function(t){return!!a&&a in t}},5527(t){var e=Object.prototype;t.exports=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||e)}},3702(t){t.exports=function(){this.__data__=[],this.size=0}},80(t,e,r){var i=r(6025),n=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=i(e,t);return!(r<0||(r==e.length-1?e.pop():n.call(e,r,1),--this.size,0))}},4739(t,e,r){var i=r(6025);t.exports=function(t){var e=this.__data__,r=i(e,t);return r<0?void 0:e[r][1]}},8655(t,e,r){var i=r(6025);t.exports=function(t){return i(this.__data__,t)>-1}},1175(t,e,r){var i=r(6025);t.exports=function(t,e){var r=this.__data__,n=i(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}},3040(t,e,r){var i=r(1549),n=r(79),a=r(8223);t.exports=function(){this.size=0,this.__data__={hash:new i,map:new(a||n),string:new i}}},7670(t,e,r){var i=r(2651);t.exports=function(t){var e=i(this,t).delete(t);return this.size-=e?1:0,e}},289(t,e,r){var i=r(2651);t.exports=function(t){return i(this,t).get(t)}},4509(t,e,r){var i=r(2651);t.exports=function(t){return i(this,t).has(t)}},2949(t,e,r){var i=r(2651);t.exports=function(t,e){var r=i(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}},1042(t,e,r){var i=r(6110)(Object,"create");t.exports=i},3650(t,e,r){var i=r(4335)(Object.keys,Object);t.exports=i},181(t){t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},6009(t,e,r){t=r.nmd(t);var i=r(4840),n=e&&!e.nodeType&&e,a=n&&t&&!t.nodeType&&t,o=a&&a.exports===n&&i.process,s=function(){try{return a&&a.require&&a.require("util").types||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=s},9350(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},4335(t){t.exports=function(t,e){return function(r){return t(e(r))}}},6757(t,e,r){var i=r(1033),n=Math.max;t.exports=function(t,e,r){return e=n(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,s=n(a.length-e,0),l=Array(s);++o<s;)l[o]=a[e+o];o=-1;for(var h=Array(e+1);++o<e;)h[o]=a[o];return h[e]=r(l),i(t,this,h)}}},9325(t,e,r){var i=r(4840),n="object"==typeof self&&self&&self.Object===Object&&self,a=i||n||Function("return this")();t.exports=a},4974(t){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},2865(t,e,r){var i=r(9570),n=r(1811)(i);t.exports=n},1811(t){var e=Date.now;t.exports=function(t){var r=0,i=0;return function(){var n=e(),a=16-(n-i);if(i=n,a>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}},1420(t,e,r){var i=r(79);t.exports=function(){this.__data__=new i,this.size=0}},938(t){t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},3605(t){t.exports=function(t){return this.__data__.get(t)}},9817(t){t.exports=function(t){return this.__data__.has(t)}},945(t,e,r){var i=r(79),n=r(8223),a=r(3661);t.exports=function(t,e){var r=this.__data__;if(r instanceof i){var o=r.__data__;if(!n||o.length<199)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new a(o)}return r.set(t,e),this.size=r.size,this}},7473(t){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},7334(t){t.exports=function(t){return function(){return t}}},5288(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},3488(t){t.exports=function(t){return t}},2428(t,e,r){var i=r(7534),n=r(346),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(t){return n(t)&&o.call(t,"callee")&&!s.call(t,"callee")};t.exports=l},6449(t){var e=Array.isArray;t.exports=e},4894(t,e,r){var i=r(1882),n=r(294);t.exports=function(t){return null!=t&&n(t.length)&&!i(t)}},3693(t,e,r){var i=r(4894),n=r(346);t.exports=function(t){return n(t)&&i(t)}},3656(t,e,r){t=r.nmd(t);var i=r(9325),n=r(9935),a=e&&!e.nodeType&&e,o=a&&t&&!t.nodeType&&t,s=o&&o.exports===a?i.Buffer:void 0,l=(s?s.isBuffer:void 0)||n;t.exports=l},2193(t,e,r){var i=r(8984),n=r(5861),a=r(2428),o=r(6449),s=r(4894),l=r(3656),h=r(5527),c=r(7167),u=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(o(t)||"string"==typeof t||"function"==typeof t.splice||l(t)||c(t)||a(t)))return!t.length;var e=n(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(h(t))return!i(t).length;for(var r in t)if(u.call(t,r))return!1;return!0}},1882(t,e,r){var i=r(2552),n=r(3805);t.exports=function(t){if(!n(t))return!1;var e=i(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},294(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3805(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},346(t){t.exports=function(t){return null!=t&&"object"==typeof t}},1331(t,e,r){var i=r(2552),n=r(8879),a=r(346),o=Function.prototype,s=Object.prototype,l=o.toString,h=s.hasOwnProperty,c=l.call(Object);t.exports=function(t){if(!a(t)||"[object Object]"!=i(t))return!1;var e=n(t);if(null===e)return!0;var r=h.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&l.call(r)==c}},7167(t,e,r){var i=r(4901),n=r(7301),a=r(6009),o=a&&a.isTypedArray,s=o?n(o):i;t.exports=s},7241(t,e,r){var i=r(695),n=r(2903),a=r(4894);t.exports=function(t){return a(t)?i(t,!0):n(t)}},104(t,e,r){var i=r(3661);function n(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var o=t.apply(this,i);return r.cache=a.set(n,o)||a,o};return r.cache=new(n.Cache||i),r}n.Cache=i,t.exports=n},5364(t,e,r){var i=r(5250),n=r(999)(function(t,e,r){i(t,e,r)});t.exports=n},9935(t){t.exports=function(){return!1}},9884(t,e,r){var i=r(1791),n=r(7241);t.exports=function(t){return i(t,n(t))}},2274(t,e,r){"use strict";function i(t,e,r){if(t&&t.length){const[i,n]=e,a=Math.PI/180*r,o=Math.cos(a),s=Math.sin(a);for(const e of t){const[t,r]=e;e[0]=(t-i)*o-(r-n)*s+i,e[1]=(t-i)*s+(r-n)*o+n}}}function n(t,e){return t[0]===e[0]&&t[1]===e[1]}function a(t,e,r,a=1){const o=r,s=Math.max(e,.1),l=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,h=[0,0];if(o)for(const t of l)i(t,h,o);const c=function(t,e,r){const i=[];for(const e of t){const t=[...e];n(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const a=[];e=Math.max(e,.1);const o=[];for(const t of i)for(let e=0;e<t.length-1;e++){const r=t[e],i=t[e+1];if(r[1]!==i[1]){const t=Math.min(r[1],i[1]);o.push({ymin:t,ymax:Math.max(r[1],i[1]),x:t===r[1]?r[0]:i[0],islope:(i[0]-r[0])/(i[1]-r[1])})}}if(o.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!o.length)return a;let s=[],l=o[0].ymin,h=0;for(;s.length||o.length;){if(o.length){let t=-1;for(let e=0;e<o.length&&!(o[e].ymin>l);e++)t=e;o.splice(0,t+1).forEach(t=>{s.push({s:l,edge:t})})}if(s=s.filter(t=>!(t.edge.ymax<=l)),s.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==r||h%e==0)&&s.length>1)for(let t=0;t<s.length;t+=2){const e=t+1;if(e>=s.length)break;const r=s[t].edge,i=s[e].edge;a.push([[Math.round(r.x),l],[Math.round(i.x),l]])}l+=r,s.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),h++}return a}(l,s,a);if(o){for(const t of l)i(t,h,-o);!function(t,e,r){const n=[];t.forEach(t=>n.push(...t)),i(n,e,r)}(c,h,-o)}return c}function o(t,e){var r;const i=e.hachureAngle+90;let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1));let o=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(o=n),a(t,n,i,o||1)}r.d(e,{A:()=>nt});class s{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=o(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function l(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class h extends s{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=o(t,Object.assign({},e,{hachureGap:r})),n=Math.PI/180*e.hachureAngle,a=[],s=.5*r*Math.cos(n),h=.5*r*Math.sin(n);for(const[t,e]of i)l([t,e])&&a.push([[t[0]-s,t[1]+h],[...e]],[[t[0]+s,t[1]-h],[...e]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class c extends s{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),n=this._fillPolygons(t,i);return r.ops=r.ops.concat(n.ops),r}}class u{constructor(t){this.helper=t}fillPolygons(t,e){const r=o(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let n=e.fillWeight;n<0&&(n=e.strokeWidth/2);const a=i/4;for(const o of t){const t=l(o),s=t/i,h=Math.ceil(s)-1,c=t-h*i,u=(o[0][0]+o[1][0])/2-i/4,d=Math.min(o[0][1],o[1][1]);for(let t=0;t<h;t++){const o=d+c+t*i,s=u-a+2*Math.random()*a,l=o-a+2*Math.random()*a,h=this.helper.ellipse(s,l,n,n,e);r.push(...h.ops)}}return{type:"fillSketch",ops:r}}}class d{constructor(t){this.helper=t}fillPolygons(t,e){const r=o(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){const r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,i=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,n=[];return t.forEach(t=>{const a=l(t),o=Math.floor(a/(r+i)),s=(a+i-o*(r+i))/2;let h=t[0],c=t[1];h[0]>c[0]&&(h=t[1],c=t[0]);const u=Math.atan((c[1]-h[1])/(c[0]-h[0]));for(let t=0;t<o;t++){const a=t*(r+i),o=a+r,l=[h[0]+a*Math.cos(u)+s*Math.cos(u),h[1]+a*Math.sin(u)+s*Math.sin(u)],c=[h[0]+o*Math.cos(u)+s*Math.cos(u),h[1]+o*Math.sin(u)+s*Math.sin(u)];n.push(...this.helper.doubleLineOps(l[0],l[1],c[0],c[1],e))}}),n}}class p{constructor(t){this.helper=t}fillPolygons(t,e){const r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset,n=o(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(n,i,e)}}zigzagLines(t,e,r){const i=[];return t.forEach(t=>{const n=l(t),a=Math.round(n/(2*e));let o=t[0],s=t[1];o[0]>s[0]&&(o=t[1],s=t[0]);const h=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let t=0;t<a;t++){const n=2*t*e,a=2*(t+1)*e,s=Math.sqrt(2*Math.pow(e,2)),l=[o[0]+n*Math.cos(h),o[1]+n*Math.sin(h)],c=[o[0]+a*Math.cos(h),o[1]+a*Math.sin(h)],u=[l[0]+s*Math.cos(h+Math.PI/4),l[1]+s*Math.sin(h+Math.PI/4)];i.push(...this.helper.doubleLineOps(l[0],l[1],u[0],u[1],r),...this.helper.doubleLineOps(u[0],u[1],c[0],c[1],r))}}),i}}const f={};class g{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const y={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function m(t,e){return t.type===e}function x(t){const e=[],r=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let i="BOD",n=0,a=r[n];for(;!m(a,2);){let o=0;const s=[];if("BOD"===i){if("M"!==a.text&&"m"!==a.text)return x("M0,0"+t);n++,o=y[a.text],i=a.text}else m(a,1)?o=y[i]:(n++,o=y[a.text],i=a.text);if(!(n+o<r.length))throw new Error("Path data ended short");for(let t=n;t<n+o;t++){const e=r[t];if(!m(e,1))throw new Error("Param not a number: "+i+","+e.text);s[s.length]=+e.text}if("number"!=typeof y[i])throw new Error("Bad segment: "+i);{const t={key:i,data:s};e.push(t),n+=o,a=r[n],"M"===i&&(i="L"),"m"===i&&(i="l")}}return e}function b(t){let e=0,r=0,i=0,n=0;const a=[];for(const{key:o,data:s}of t)switch(o){case"M":a.push({key:"M",data:[...s]}),[e,r]=s,[i,n]=s;break;case"m":e+=s[0],r+=s[1],a.push({key:"M",data:[e,r]}),i=e,n=r;break;case"L":a.push({key:"L",data:[...s]}),[e,r]=s;break;case"l":e+=s[0],r+=s[1],a.push({key:"L",data:[e,r]});break;case"C":a.push({key:"C",data:[...s]}),e=s[4],r=s[5];break;case"c":{const t=s.map((t,i)=>i%2?t+r:t+e);a.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":a.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.map((t,i)=>i%2?t+r:t+e);a.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":a.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":a.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.map((t,i)=>i%2?t+r:t+e);a.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":a.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=i,r=n}return a}function k(t){const e=[];let r="",i=0,n=0,a=0,o=0,s=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,n]=c,[a,o]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],n=c[5],s=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,n]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,n]});break;case"V":n=c[0],e.push({key:"L",data:[i,n]});break;case"S":{let t=0,a=0;"C"===r||"S"===r?(t=i+(i-s),a=n+(n-l)):(t=i,a=n),e.push({key:"C",data:[t,a,...c]}),s=c[0],l=c[1],i=c[2],n=c[3];break}case"T":{const[t,a]=c;let o=0,h=0;"Q"===r||"T"===r?(o=i+(i-s),h=n+(n-l)):(o=i,h=n);const u=i+2*(o-i)/3,d=n+2*(h-n)/3,p=t+2*(o-t)/3,f=a+2*(h-a)/3;e.push({key:"C",data:[u,d,p,f,t,a]}),s=o,l=h,i=t,n=a;break}case"Q":{const[t,r,a,o]=c,h=i+2*(t-i)/3,u=n+2*(r-n)/3,d=a+2*(t-a)/3,p=o+2*(r-o)/3;e.push({key:"C",data:[h,u,d,p,a,o]}),s=t,l=r,i=a,n=o;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),a=c[2],o=c[3],s=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,n,l,h,l,h]}),i=l,n=h):i===l&&n===h||(w(i,n,l,h,t,r,a,o,s).forEach(function(t){e.push({key:"C",data:t})}),i=l,n=h);break}case"Z":e.push({key:"Z",data:[]}),i=a,n=o}r=h}return e}function C(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function w(t,e,r,i,n,a,o,s,l,h){const c=(u=o,Math.PI*u/180);var u;let d=[],p=0,f=0,g=0,y=0;if(h)[p,f,g,y]=h;else{[t,e]=C(t,e,-c),[r,i]=C(r,i,-c);const o=(t-r)/2,h=(e-i)/2;let u=o*o/(n*n)+h*h/(a*a);u>1&&(u=Math.sqrt(u),n*=u,a*=u);const d=n*n,m=a*a,x=d*m-d*h*h-m*o*o,b=d*h*h+m*o*o,k=(s===l?-1:1)*Math.sqrt(Math.abs(x/b));g=k*n*h/a+(t+r)/2,y=k*-a*o/n+(e+i)/2,p=Math.asin(parseFloat(((e-y)/a).toFixed(9))),f=Math.asin(parseFloat(((i-y)/a).toFixed(9))),t<g&&(p=Math.PI-p),r<g&&(f=Math.PI-f),p<0&&(p=2*Math.PI+p),f<0&&(f=2*Math.PI+f),l&&p>f&&(p-=2*Math.PI),!l&&f>p&&(f-=2*Math.PI)}let m=f-p;if(Math.abs(m)>120*Math.PI/180){const t=f,e=r,s=i;f=l&&f>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=w(r=g+n*Math.cos(f),i=y+a*Math.sin(f),e,s,n,a,o,0,l,[f,t,g,y])}m=f-p;const x=Math.cos(p),b=Math.sin(p),k=Math.cos(f),_=Math.sin(f),v=Math.tan(m/4),S=4/3*n*v,T=4/3*a*v,A=[t,e],M=[t+S*b,e-T*x],B=[r+S*_,i-T*k],L=[r,i];if(M[0]=2*A[0]-M[0],M[1]=2*A[1]-M[1],h)return[M,B,L].concat(d);{d=[M,B,L].concat(d);const t=[];for(let e=0;e<d.length;e+=3){const r=C(d[e][0],d[e][1],c),i=C(d[e+1][0],d[e+1][1],c),n=C(d[e+2][0],d[e+2][1],c);t.push([r[0],r[1],i[0],i[1],n[0],n[1]])}return t}}const _={randOffset:function(t,e){return R(t,e)},randOffsetWithRange:function(t,e,r){return O(t,e,r)},ellipse:function(t,e,r,i,n){return M(t,e,n,A(r,i,n)).opset},doubleLineOps:function(t,e,r,i,n){return K(t,e,r,i,n,!0)}};function v(t,e,r,i,n){return{type:"path",ops:K(t,e,r,i,n)}}function S(t,e,r){const i=(t||[]).length;if(i>2){const n=[];for(let e=0;e<i-1;e++)n.push(...K(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&n.push(...K(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:n}}return 2===i?v(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function T(t,e){if(t.length){const r="number"==typeof t[0][0]?[t]:t,i=N(r[0],1*(1+.2*e.roughness),e),n=e.disableMultiStroke?[]:N(r[0],1.5*(1+.22*e.roughness),E(e));for(let t=1;t<r.length;t++){const a=r[t];if(a.length){const t=N(a,1*(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:N(a,1.5*(1+.22*e.roughness),E(e));for(const e of t)"move"!==e.op&&i.push(e);for(const t of r)"move"!==t.op&&n.push(t)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function A(t,e,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/n;let o=Math.abs(t/2),s=Math.abs(e/2);const l=1-r.curveFitting;return o+=R(o*l,r),s+=R(s*l,r),{increment:a,rx:o,ry:s}}function M(t,e,r,i){const[n,a]=z(i.increment,t,e,i.rx,i.ry,1,i.increment*O(.1,O(.4,1,r),r),r);let o=P(n,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[n]=z(i.increment,t,e,i.rx,i.ry,1.5,0,r),a=P(n,null,r);o=o.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function B(t,e,r,i,n,a,o,s,l){const h=t,c=e;let u=Math.abs(r/2),d=Math.abs(i/2);u+=R(.01*u,l),d+=R(.01*d,l);let p=n,f=a;for(;p<0;)p+=2*Math.PI,f+=2*Math.PI;f-p>2*Math.PI&&(p=0,f=2*Math.PI);const g=2*Math.PI/l.curveStepCount,y=Math.min(g/2,(f-p)/2),m=q(y,h,c,u,d,p,f,1,l);if(!l.disableMultiStroke){const t=q(y,h,c,u,d,p,f,1.5,l);m.push(...t)}return o&&(s?m.push(...K(h,c,h+u*Math.cos(p),c+d*Math.sin(p),l),...K(h,c,h+u*Math.cos(f),c+d*Math.sin(f),l)):m.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+u*Math.cos(p),c+d*Math.sin(p)]})),{type:"path",ops:m}}function L(t,e){const r=k(b(x(t))),i=[];let n=[0,0],a=[0,0];for(const{key:t,data:o}of r)switch(t){case"M":a=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...K(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":{const[t,r,n,s,l,h]=o;i.push(...W(t,r,n,s,l,h,a,e)),a=[l,h];break}case"Z":i.push(...K(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]]}return{type:"path",ops:i}}function F(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,n=i.length;if(n>2){r.push({op:"move",data:[i[0][0]+R(t,e),i[0][1]+R(t,e)]});for(let a=1;a<n;a++)r.push({op:"lineTo",data:[i[a][0]+R(t,e),i[a][1]+R(t,e)]})}}return{type:"fillPath",ops:r}}function $(t,e){return function(t,e){let r=t.fillStyle||"hachure";if(!f[r])switch(r){case"zigzag":f[r]||(f[r]=new h(e));break;case"cross-hatch":f[r]||(f[r]=new c(e));break;case"dots":f[r]||(f[r]=new u(e));break;case"dashed":f[r]||(f[r]=new d(e));break;case"zigzag-line":f[r]||(f[r]=new p(e));break;default:r="hachure",f[r]||(f[r]=new s(e))}return f[r]}(e,_).fillPolygons(t,e)}function E(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function D(t){return t.randomizer||(t.randomizer=new g(t.seed||0)),t.randomizer.next()}function O(t,e,r,i=1){return r.roughness*i*(D(r)*(e-t)+t)}function R(t,e,r=1){return O(-t,t,e,r)}function K(t,e,r,i,n,a=!1){const o=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=I(t,e,r,i,n,!0,!1);if(o)return s;const l=I(t,e,r,i,n,!0,!0);return s.concat(l)}function I(t,e,r,i,n,a,o){const s=Math.pow(t-r,2)+Math.pow(e-i,2),l=Math.sqrt(s);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=n.maxRandomnessOffset||0;c*c*100>s&&(c=l/10);const u=c/2,d=.2+.2*D(n);let p=n.bowing*n.maxRandomnessOffset*(i-e)/200,f=n.bowing*n.maxRandomnessOffset*(t-r)/200;p=R(p,n,h),f=R(f,n,h);const g=[],y=()=>R(u,n,h),m=()=>R(c,n,h),x=n.preserveVertices;return a&&(o?g.push({op:"move",data:[t+(x?0:y()),e+(x?0:y())]}):g.push({op:"move",data:[t+(x?0:R(c,n,h)),e+(x?0:R(c,n,h))]})),o?g.push({op:"bcurveTo",data:[p+t+(r-t)*d+y(),f+e+(i-e)*d+y(),p+t+2*(r-t)*d+y(),f+e+2*(i-e)*d+y(),r+(x?0:y()),i+(x?0:y())]}):g.push({op:"bcurveTo",data:[p+t+(r-t)*d+m(),f+e+(i-e)*d+m(),p+t+2*(r-t)*d+m(),f+e+2*(i-e)*d+m(),r+(x?0:m()),i+(x?0:m())]}),g}function N(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+R(e,r),t[0][1]+R(e,r)]),i.push([t[0][0]+R(e,r),t[0][1]+R(e,r)]);for(let n=1;n<t.length;n++)i.push([t[n][0]+R(e,r),t[n][1]+R(e,r)]),n===t.length-1&&i.push([t[n][0]+R(e,r),t[n][1]+R(e,r)]);return P(i,null,r)}function P(t,e,r){const i=t.length,n=[];if(i>3){const a=[],o=1-r.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<i;e++){const r=t[e];a[0]=[r[0],r[1]],a[1]=[r[0]+(o*t[e+1][0]-o*t[e-1][0])/6,r[1]+(o*t[e+1][1]-o*t[e-1][1])/6],a[2]=[t[e+1][0]+(o*t[e][0]-o*t[e+2][0])/6,t[e+1][1]+(o*t[e][1]-o*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){const t=r.maxRandomnessOffset;n.push({op:"lineTo",data:[e[0]+R(t,r),e[1]+R(t,r)]})}}else 3===i?(n.push({op:"move",data:[t[1][0],t[1][1]]}),n.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&n.push(...I(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return n}function z(t,e,r,i,n,a,o,s){const l=[],h=[];if(0===s.roughness){t/=4,h.push([e+i*Math.cos(-t),r+n*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){const t=[e+i*Math.cos(a),r+n*Math.sin(a)];l.push(t),h.push(t)}h.push([e+i*Math.cos(0),r+n*Math.sin(0)]),h.push([e+i*Math.cos(t),r+n*Math.sin(t)])}else{const c=R(.5,s)-Math.PI/2;h.push([R(a,s)+e+.9*i*Math.cos(c-t),R(a,s)+r+.9*n*Math.sin(c-t)]);const u=2*Math.PI+c-.01;for(let o=c;o<u;o+=t){const t=[R(a,s)+e+i*Math.cos(o),R(a,s)+r+n*Math.sin(o)];l.push(t),h.push(t)}h.push([R(a,s)+e+i*Math.cos(c+2*Math.PI+.5*o),R(a,s)+r+n*Math.sin(c+2*Math.PI+.5*o)]),h.push([R(a,s)+e+.98*i*Math.cos(c+o),R(a,s)+r+.98*n*Math.sin(c+o)]),h.push([R(a,s)+e+.9*i*Math.cos(c+.5*o),R(a,s)+r+.9*n*Math.sin(c+.5*o)])}return[h,l]}function q(t,e,r,i,n,a,o,s,l){const h=a+R(.1,l),c=[];c.push([R(s,l)+e+.9*i*Math.cos(h-t),R(s,l)+r+.9*n*Math.sin(h-t)]);for(let a=h;a<=o;a+=t)c.push([R(s,l)+e+i*Math.cos(a),R(s,l)+r+n*Math.sin(a)]);return c.push([e+i*Math.cos(o),r+n*Math.sin(o)]),c.push([e+i*Math.cos(o),r+n*Math.sin(o)]),P(c,null,l)}function W(t,e,r,i,n,a,o,s){const l=[],h=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let c=[0,0];const u=s.disableMultiStroke?1:2,d=s.preserveVertices;for(let p=0;p<u;p++)0===p?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(d?0:R(h[0],s)),o[1]+(d?0:R(h[0],s))]}),c=d?[n,a]:[n+R(h[p],s),a+R(h[p],s)],l.push({op:"bcurveTo",data:[t+R(h[p],s),e+R(h[p],s),r+R(h[p],s),i+R(h[p],s),c[0],c[1]]});return l}function j(t){return[...t]}function H(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(3===r)i.push(j(t[0]),j(t[1]),j(t[2]),j(t[2]));else{const r=[];r.push(t[0],t[0]);for(let e=1;e<t.length;e++)r.push(t[e]),e===t.length-1&&r.push(t[e]);const n=[],a=1-e;i.push(j(r[0]));for(let t=1;t+2<r.length;t++){const e=r[t];n[0]=[e[0],e[1]],n[1]=[e[0]+(a*r[t+1][0]-a*r[t-1][0])/6,e[1]+(a*r[t+1][1]-a*r[t-1][1])/6],n[2]=[r[t+1][0]+(a*r[t][0]-a*r[t+2][0])/6,r[t+1][1]+(a*r[t][1]-a*r[t+2][1])/6],n[3]=[r[t+1][0],r[t+1][1]],i.push(n[1],n[2],n[3])}}return i}function U(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function Y(t,e,r){const i=U(e,r);if(0===i)return U(t,e);let n=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return n=Math.max(0,Math.min(1,n)),U(t,G(e,r,n))}function G(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function X(t,e,r,i){const n=i||[];if(function(t,e){const r=t[e+0],i=t[e+1],n=t[e+2],a=t[e+3];let o=3*i[0]-2*r[0]-a[0];o*=o;let s=3*i[1]-2*r[1]-a[1];s*=s;let l=3*n[0]-2*a[0]-r[0];l*=l;let h=3*n[1]-2*a[1]-r[1];return h*=h,o<l&&(o=l),s<h&&(s=h),o+s}(t,e)<r){const r=t[e+0];n.length?(a=n[n.length-1],o=r,Math.sqrt(U(a,o))>1&&n.push(r)):n.push(r),n.push(t[e+3])}else{const i=.5,a=t[e+0],o=t[e+1],s=t[e+2],l=t[e+3],h=G(a,o,i),c=G(o,s,i),u=G(s,l,i),d=G(h,c,i),p=G(c,u,i),f=G(d,p,i);X([a,h,d,f],0,r,n),X([f,p,u,l],0,r,n)}var a,o;return n}function V(t,e){return Z(t,0,t.length,e)}function Z(t,e,r,i,n){const a=n||[],o=t[e],s=t[r-1];let l=0,h=1;for(let i=e+1;i<r-1;++i){const e=Y(t[i],o,s);e>l&&(l=e,h=i)}return Math.sqrt(l)>i?(Z(t,e,h+1,i,a),Z(t,h,r,i,a)):(a.length||a.push(o),a.push(s)),a}function Q(t,e=.15,r){const i=[],n=(t.length-1)/3;for(let r=0;r<n;r++)X(t,3*r,e,i);return r&&r>0?Z(i,0,i.length,r):i}const J="none";class tt{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,n){const a=this._o(n);return this._d("line",[v(t,e,r,i,a)],a)}rectangle(t,e,r,i,n){const a=this._o(n),o=[],s=function(t,e,r,i,n){return function(t,e){return S(t,!0,e)}([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],n)}(t,e,r,i,a);if(a.fill){const n=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===a.fillStyle?o.push(F([n],a)):o.push($([n],a))}return a.stroke!==J&&o.push(s),this._d("rectangle",o,a)}ellipse(t,e,r,i,n){const a=this._o(n),o=[],s=A(r,i,a),l=M(t,e,a,s);if(a.fill)if("solid"===a.fillStyle){const r=M(t,e,a,s).opset;r.type="fillPath",o.push(r)}else o.push($([l.estimatedPoints],a));return a.stroke!==J&&o.push(l.opset),this._d("ellipse",o,a)}circle(t,e,r,i){const n=this.ellipse(t,e,r,r,i);return n.shape="circle",n}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[S(t,!1,r)],r)}arc(t,e,r,i,n,a,o=!1,s){const l=this._o(s),h=[],c=B(t,e,r,i,n,a,o,!0,l);if(o&&l.fill)if("solid"===l.fillStyle){const o=Object.assign({},l);o.disableMultiStroke=!0;const s=B(t,e,r,i,n,a,!0,!1,o);s.type="fillPath",h.push(s)}else h.push(function(t,e,r,i,n,a,o){const s=t,l=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=R(.01*h,o),c+=R(.01*c,o);let u=n,d=a;for(;u<0;)u+=2*Math.PI,d+=2*Math.PI;d-u>2*Math.PI&&(u=0,d=2*Math.PI);const p=(d-u)/o.curveStepCount,f=[];for(let t=u;t<=d;t+=p)f.push([s+h*Math.cos(t),l+c*Math.sin(t)]);return f.push([s+h*Math.cos(d),l+c*Math.sin(d)]),f.push([s,l]),$([f],o)}(t,e,r,i,n,a,l));return l.stroke!==J&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],n=T(t,r);if(r.fill&&r.fill!==J)if("solid"===r.fillStyle){const e=T(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],n=t;if(n.length){const t="number"==typeof n[0][0]?[n]:n;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...Q(H([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...Q(H(i),10,(1+r.roughness)/2))}e.length&&i.push($([e],r))}return r.stroke!==J&&i.push(n),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],n=S(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(F([t],r)):i.push($([t],r))),r.stroke!==J&&i.push(n),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const n=r.fill&&"transparent"!==r.fill&&r.fill!==J,a=r.stroke!==J,o=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const i=k(b(x(t))),n=[];let a=[],o=[0,0],s=[];const l=()=>{s.length>=4&&a.push(...Q(s,1)),s=[]},h=()=>{l(),a.length&&(n.push(a),a=[])};for(const{key:t,data:e}of i)switch(t){case"M":h(),o=[e[0],e[1]],a.push(o);break;case"L":l(),a.push([e[0],e[1]]);break;case"C":if(!s.length){const t=a.length?a[a.length-1]:o;s.push([t[0],t[1]])}s.push([e[0],e[1]]),s.push([e[2],e[3]]),s.push([e[4],e[5]]);break;case"Z":l(),a.push([o[0],o[1]])}if(h(),!r)return n;const c=[];for(const t of n){const e=V(t,r);e.length&&c.push(e)}return c}(t,0,o?4-4*(r.simplification||1):(1+r.roughness)/2),l=L(t,r);if(n)if("solid"===r.fillStyle)if(1===s.length){const e=L(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(F(s,r));else i.push($(s,r));return a&&(o?s.forEach(t=>{i.push(S(t,!1,r))}):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:J};break;case"fillPath":e={d:this.opsToPath(t),stroke:J,strokeWidth:0,fill:r.fill||J};break;case"fillSketch":e=this.fillSketch(t,r)}e&&i.push(e)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||J,strokeWidth:r,fill:J}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class et{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,n=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":i.save(),i.strokeStyle="none"===r.stroke?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,a,n),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,a,n,e),i.restore();break}case"fillSketch":this.fillSketch(i,a,r)}}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,i="nonzero"){t.beginPath();for(const i of e.ops){const e="number"==typeof r&&r>=0?i.data.map(t=>+t.toFixed(r)):i.data;switch(i.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,i,n){const a=this.gen.line(t,e,r,i,n);return this.draw(a),a}rectangle(t,e,r,i,n){const a=this.gen.rectangle(t,e,r,i,n);return this.draw(a),a}ellipse(t,e,r,i,n){const a=this.gen.ellipse(t,e,r,i,n);return this.draw(a),a}circle(t,e,r,i){const n=this.gen.circle(t,e,r,i);return this.draw(n),n}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,i,n,a,o=!1,s){const l=this.gen.arc(t,e,r,i,n,a,o,s);return this.draw(l),l}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}}const rt="http://www.w3.org/2000/svg";class it{constructor(t,e){this.svg=t,this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,n=i.createElementNS(rt,"g"),a=t.options.fixedDecimalPlaceDigits;for(const o of e){let e=null;switch(o.type){case"path":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(o,a)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(o,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,o,r)}e&&n.appendChild(e)}return n}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const n=t.createElementNS(rt,"path");return n.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),n.setAttribute("stroke",r.fill||""),n.setAttribute("stroke-width",i+""),n.setAttribute("fill","none"),r.fillLineDash&&n.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&n.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),n}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,n){const a=this.gen.line(t,e,r,i,n);return this.draw(a)}rectangle(t,e,r,i,n){const a=this.gen.rectangle(t,e,r,i,n);return this.draw(a)}ellipse(t,e,r,i,n){const a=this.gen.ellipse(t,e,r,i,n);return this.draw(a)}circle(t,e,r,i){const n=this.gen.circle(t,e,r,i);return this.draw(n)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,n,a,o=!1,s){const l=this.gen.arc(t,e,r,i,n,a,o,s);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var nt={canvas:(t,e)=>new et(t,e),svg:(t,e)=>new it(t,e),generator:t=>new tt(t),newSeed:()=>tt.newSeed()}},513(t,e,r){"use strict";function i(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from("string"==typeof t?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(t,e){var r=e.match(/\n([\t ]+|(?!\s).)/g);return r?t.concat(r.map(function(t){var e,r;return null!==(r=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==r?r:0})):t},[]);if(n.length){var a=new RegExp("\n[\t ]{"+Math.min.apply(Math,n)+"}","g");i=i.map(function(t){return t.replace(a,"\n")})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return e.forEach(function(t,e){var r=o.match(/(?:^|\n)( *)$/),n=r?r[1]:"",a=t;"string"==typeof t&&t.includes("\n")&&(a=String(t).split("\n").map(function(t,e){return 0===e?t:""+n+t}).join("\n")),o+=a+i[e+1]}),o}r.d(e,{T:()=>i})},6087(t){"use strict";t.exports=window.lodash},1444(t,e,r){"use strict";function i(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r<e||void 0===r&&e>=e)&&(r=e);else{let i=-1;for(let n of t)null!=(n=e(n,++i,t))&&(r<n||void 0===r&&n>=n)&&(r=n)}return r}function n(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r>e||void 0===r&&e>=e)&&(r=e);else{let i=-1;for(let n of t)null!=(n=e(n,++i,t))&&(r>n||void 0===r&&n>=n)&&(r=n)}return r}function a(t){return t}r.d(e,{JLW:()=>Vo,l78:()=>f,tlR:()=>p,qrM:()=>hs,Yu4:()=>us,IA3:()=>ps,Wi0:()=>gs,PGM:()=>ys,OEq:()=>xs,y8u:()=>Cs,olC:()=>_s,IrU:()=>Ss,oDi:()=>Ms,Q7f:()=>Ls,cVp:()=>$s,lUB:()=>Jo,Lx9:()=>Ds,nVG:()=>qs,uxU:()=>Ws,Xf2:()=>Us,GZz:()=>Gs,UPb:()=>Vs,dyv:()=>Xs,GPZ:()=>Nr,Sk5:()=>jr,bEH:()=>Ci,n8j:()=>rs,T9B:()=>i,jkA:()=>n,rLf:()=>as,WH:()=>Mi,m4Y:()=>nn,UMr:()=>Ai,w7C:()=>Co,zt:()=>wo,Ltv:()=>_o,UAC:()=>kn,DCK:()=>Jn,TUC:()=>Ln,Agd:()=>xn,t6C:()=>fn,wXd:()=>yn,ABi:()=>Tn,Ui6:()=>Pn,rGn:()=>Fn,ucG:()=>gn,YPH:()=>Sn,Mol:()=>Bn,PGu:()=>An,GuW:()=>Mn,hkb:()=>ri});var o=1e-6;function s(t){return"translate("+t+",0)"}function l(t){return"translate(0,"+t+")"}function h(t){return e=>+t(e)}function c(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function u(){return!this.__axis}function d(t,e){var r=[],i=null,n=null,d=6,p=6,f=3,g="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,y=1===t||4===t?-1:1,m=4===t||2===t?"x":"y",x=1===t||3===t?s:l;function b(s){var l=null==i?e.ticks?e.ticks.apply(e,r):e.domain():i,b=null==n?e.tickFormat?e.tickFormat.apply(e,r):a:n,k=Math.max(d,0)+f,C=e.range(),w=+C[0]+g,_=+C[C.length-1]+g,v=(e.bandwidth?c:h)(e.copy(),g),S=s.selection?s.selection():s,T=S.selectAll(".domain").data([null]),A=S.selectAll(".tick").data(l,e).order(),M=A.exit(),B=A.enter().append("g").attr("class","tick"),L=A.select("line"),F=A.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge(B),L=L.merge(B.append("line").attr("stroke","currentColor").attr(m+"2",y*d)),F=F.merge(B.append("text").attr("fill","currentColor").attr(m,y*k).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),s!==S&&(T=T.transition(s),A=A.transition(s),L=L.transition(s),F=F.transition(s),M=M.transition(s).attr("opacity",o).attr("transform",function(t){return isFinite(t=v(t))?x(t+g):this.getAttribute("transform")}),B.attr("opacity",o).attr("transform",function(t){var e=this.parentNode.__axis;return x((e&&isFinite(e=e(t))?e:v(t))+g)})),M.remove(),T.attr("d",4===t||2===t?p?"M"+y*p+","+w+"H"+g+"V"+_+"H"+y*p:"M"+g+","+w+"V"+_:p?"M"+w+","+y*p+"V"+g+"H"+_+"V"+y*p:"M"+w+","+g+"H"+_),A.attr("opacity",1).attr("transform",function(t){return x(v(t)+g)}),L.attr(m+"2",y*d),F.attr(m,y*k).text(b),S.filter(u).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),S.each(function(){this.__axis=v})}return b.scale=function(t){return arguments.length?(e=t,b):e},b.ticks=function(){return r=Array.from(arguments),b},b.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),b):r.slice()},b.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),b):i&&i.slice()},b.tickFormat=function(t){return arguments.length?(n=t,b):n},b.tickSize=function(t){return arguments.length?(d=p=+t,b):d},b.tickSizeInner=function(t){return arguments.length?(d=+t,b):d},b.tickSizeOuter=function(t){return arguments.length?(p=+t,b):p},b.tickPadding=function(t){return arguments.length?(f=+t,b):f},b.offset=function(t){return arguments.length?(g=+t,b):g},b}function p(t){return d(1,t)}function f(t){return d(3,t)}function g(){}function y(t){return null==t?g:function(){return this.querySelector(t)}}function m(){return[]}function x(t){return null==t?m:function(){return this.querySelectorAll(t)}}function b(t){return function(){return this.matches(t)}}function k(t){return function(e){return e.matches(t)}}var C=Array.prototype.find;function w(){return this.firstElementChild}var _=Array.prototype.filter;function v(){return Array.from(this.children)}function S(t){return new Array(t.length)}function T(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function A(t,e,r,i,n,a){for(var o,s=0,l=e.length,h=a.length;s<h;++s)(o=e[s])?(o.__data__=a[s],i[s]=o):r[s]=new T(t,a[s]);for(;s<l;++s)(o=e[s])&&(n[s]=o)}function M(t,e,r,i,n,a,o){var s,l,h,c=new Map,u=e.length,d=a.length,p=new Array(u);for(s=0;s<u;++s)(l=e[s])&&(p[s]=h=o.call(l,l.__data__,s,e)+"",c.has(h)?n[s]=l:c.set(h,l));for(s=0;s<d;++s)h=o.call(t,a[s],s,a)+"",(l=c.get(h))?(i[s]=l,l.__data__=a[s],c.delete(h)):r[s]=new T(t,a[s]);for(s=0;s<u;++s)(l=e[s])&&c.get(p[s])===l&&(n[s]=l)}function B(t){return t.__data__}function L(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function F(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}T.prototype={constructor:T,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var $="http://www.w3.org/1999/xhtml";const E={svg:"http://www.w3.org/2000/svg",xhtml:$,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function D(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),E.hasOwnProperty(e)?{space:E[e],local:t}:t}function O(t){return function(){this.removeAttribute(t)}}function R(t){return function(){this.removeAttributeNS(t.space,t.local)}}function K(t,e){return function(){this.setAttribute(t,e)}}function I(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function N(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function P(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function z(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function q(t){return function(){this.style.removeProperty(t)}}function W(t,e,r){return function(){this.style.setProperty(t,e,r)}}function j(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function H(t,e){return t.style.getPropertyValue(e)||z(t).getComputedStyle(t,null).getPropertyValue(e)}function U(t){return function(){delete this[t]}}function Y(t,e){return function(){this[t]=e}}function G(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function X(t){return t.trim().split(/^|\s+/)}function V(t){return t.classList||new Z(t)}function Z(t){this._node=t,this._names=X(t.getAttribute("class")||"")}function Q(t,e){for(var r=V(t),i=-1,n=e.length;++i<n;)r.add(e[i])}function J(t,e){for(var r=V(t),i=-1,n=e.length;++i<n;)r.remove(e[i])}function tt(t){return function(){Q(this,t)}}function et(t){return function(){J(this,t)}}function rt(t,e){return function(){(e.apply(this,arguments)?Q:J)(this,t)}}function it(){this.textContent=""}function nt(t){return function(){this.textContent=t}}function at(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ot(){this.innerHTML=""}function st(t){return function(){this.innerHTML=t}}function lt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ht(){this.nextSibling&&this.parentNode.appendChild(this)}function ct(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ut(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===$&&e.documentElement.namespaceURI===$?e.createElement(t):e.createElementNS(r,t)}}function dt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function pt(t){var e=D(t);return(e.local?dt:ut)(e)}function ft(){return null}function gt(){var t=this.parentNode;t&&t.removeChild(this)}function yt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function mt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function xt(t){return function(){var e=this.__on;if(e){for(var r,i=0,n=-1,a=e.length;i<a;++i)r=e[i],t.type&&r.type!==t.type||r.name!==t.name?e[++n]=r:this.removeEventListener(r.type,r.listener,r.options);++n?e.length=n:delete this.__on}}}function bt(t,e,r){return function(){var i,n=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(n)for(var o=0,s=n.length;o<s;++o)if((i=n[o]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=r),void(i.value=e);this.addEventListener(t.type,a,r),i={type:t.type,name:t.name,value:e,listener:a,options:r},n?n.push(i):this.__on=[i]}}function kt(t,e,r){var i=z(t),n=i.CustomEvent;"function"==typeof n?n=new n(e,r):(n=i.document.createEvent("Event"),r?(n.initEvent(e,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(e,!1,!1)),t.dispatchEvent(n)}function Ct(t,e){return function(){return kt(this,t,e)}}function wt(t,e){return function(){return kt(this,t,e.apply(this,arguments))}}Z.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var _t=[null];function vt(t,e){this._groups=t,this._parents=e}function St(){return new vt([[document.documentElement]],_t)}vt.prototype=St.prototype={constructor:vt,select:function(t){"function"!=typeof t&&(t=y(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var a,o,s=e[n],l=s.length,h=i[n]=new Array(l),c=0;c<l;++c)(a=s[c])&&(o=t.call(a,a.__data__,c,s))&&("__data__"in a&&(o.__data__=a.__data__),h[c]=o);return new vt(i,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}(t):x(t);for(var e=this._groups,r=e.length,i=[],n=[],a=0;a<r;++a)for(var o,s=e[a],l=s.length,h=0;h<l;++h)(o=s[h])&&(i.push(t.call(o,o.__data__,h,s)),n.push(o));return new vt(i,n)},selectChild:function(t){return this.select(null==t?w:function(t){return function(){return C.call(this.children,t)}}("function"==typeof t?t:k(t)))},selectChildren:function(t){return this.selectAll(null==t?v:function(t){return function(){return _.call(this.children,t)}}("function"==typeof t?t:k(t)))},filter:function(t){"function"!=typeof t&&(t=b(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var a,o=e[n],s=o.length,l=i[n]=[],h=0;h<s;++h)(a=o[h])&&t.call(a,a.__data__,h,o)&&l.push(a);return new vt(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,B);var r,i=e?M:A,n=this._parents,a=this._groups;"function"!=typeof t&&(r=t,t=function(){return r});for(var o=a.length,s=new Array(o),l=new Array(o),h=new Array(o),c=0;c<o;++c){var u=n[c],d=a[c],p=d.length,f=L(t.call(u,u&&u.__data__,c,n)),g=f.length,y=l[c]=new Array(g),m=s[c]=new Array(g);i(u,d,y,m,h[c]=new Array(p),f,e);for(var x,b,k=0,C=0;k<g;++k)if(x=y[k]){for(k>=C&&(C=k+1);!(b=m[C])&&++C<g;);x._next=b||null}}return(s=new vt(s,n))._enter=l,s._exit=h,s},enter:function(){return new vt(this._enter||this._groups.map(S),this._parents)},exit:function(){return new vt(this._exit||this._groups.map(S),this._parents)},join:function(t,e,r){var i=this.enter(),n=this,a=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(n=e(n))&&(n=n.selection()),null==r?a.remove():r(a),i&&n?i.merge(n).order():n},merge:function(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,n=r.length,a=i.length,o=Math.min(n,a),s=new Array(n),l=0;l<o;++l)for(var h,c=r[l],u=i[l],d=c.length,p=s[l]=new Array(d),f=0;f<d;++f)(h=c[f]||u[f])&&(p[f]=h);for(;l<n;++l)s[l]=r[l];return new vt(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i,n=t[e],a=n.length-1,o=n[a];--a>=0;)(i=n[a])&&(o&&4^i.compareDocumentPosition(o)&&o.parentNode.insertBefore(i,o),o=i);return this},sort:function(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=F);for(var r=this._groups,i=r.length,n=new Array(i),a=0;a<i;++a){for(var o,s=r[a],l=s.length,h=n[a]=new Array(l),c=0;c<l;++c)(o=s[c])&&(h[c]=o);h.sort(e)}return new vt(n,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,a=i.length;n<a;++n){var o=i[n];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var n,a=e[r],o=0,s=a.length;o<s;++o)(n=a[o])&&t.call(n,n.__data__,o,a);return this},attr:function(t,e){var r=D(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==e?r.local?R:O:"function"==typeof e?r.local?P:N:r.local?I:K)(r,e))},style:function(t,e,r){return arguments.length>1?this.each((null==e?q:"function"==typeof e?j:W)(t,e,null==r?"":r)):H(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?U:"function"==typeof e?G:Y)(t,e)):this.node()[t]},classed:function(t,e){var r=X(t+"");if(arguments.length<2){for(var i=V(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each(("function"==typeof e?rt:e?tt:et)(r,e))},text:function(t){return arguments.length?this.each(null==t?it:("function"==typeof t?at:nt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ot:("function"==typeof t?lt:st)(t)):this.node().innerHTML},raise:function(){return this.each(ht)},lower:function(){return this.each(ct)},append:function(t){var e="function"==typeof t?t:pt(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var r="function"==typeof t?t:pt(t),i=null==e?ft:"function"==typeof e?e:y(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(gt)},clone:function(t){return this.select(t?mt:yt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,r){var i,n,a=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?bt:xt,i=0;i<o;++i)this.each(s(a[i],e,r));return this}var s=this.node().__on;if(s)for(var l,h=0,c=s.length;h<c;++h)for(i=0,l=s[h];i<o;++i)if((n=a[i]).type===l.type&&n.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?wt:Ct)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i,n=t[e],a=0,o=n.length;a<o;++a)(i=n[a])&&(yield i)}};const Tt=St;var At={value:()=>{}};function Mt(){for(var t,e=0,r=arguments.length,i={};e<r;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new Bt(i)}function Bt(t){this._=t}function Lt(t,e){for(var r,i=0,n=t.length;i<n;++i)if((r=t[i]).name===e)return r.value}function Ft(t,e,r){for(var i=0,n=t.length;i<n;++i)if(t[i].name===e){t[i]=At,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=r&&t.push({name:e,value:r}),t}Bt.prototype=Mt.prototype={constructor:Bt,on:function(t,e){var r,i,n=this._,a=(i=n,(t+"").trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(r=(t=a[o]).type)n[r]=Ft(n[r],t.name,e);else if(null==e)for(r in n)n[r]=Ft(n[r],t.name,null);return this}for(;++o<s;)if((r=(t=a[o]).type)&&(r=Lt(n[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new Bt(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,i,n=new Array(r),a=0;a<r;++a)n[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,r=(i=this._[t]).length;a<r;++a)i[a].value.apply(e,n)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],n=0,a=i.length;n<a;++n)i[n].value.apply(e,r)}};const $t=Mt;var Et,Dt,Ot=0,Rt=0,Kt=0,It=0,Nt=0,Pt=0,zt="object"==typeof performance&&performance.now?performance:Date,qt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Wt(){return Nt||(qt(jt),Nt=zt.now()+Pt)}function jt(){Nt=0}function Ht(){this._call=this._time=this._next=null}function Ut(t,e,r){var i=new Ht;return i.restart(t,e,r),i}function Yt(){Nt=(It=zt.now())+Pt,Ot=Rt=0;try{!function(){Wt(),++Ot;for(var t,e=Et;e;)(t=Nt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ot}()}finally{Ot=0,function(){for(var t,e,r=Et,i=1/0;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:Et=e);Dt=t,Xt(i)}(),Nt=0}}function Gt(){var t=zt.now(),e=t-It;e>1e3&&(Pt-=e,It=t)}function Xt(t){Ot||(Rt&&(Rt=clearTimeout(Rt)),t-Nt>24?(t<1/0&&(Rt=setTimeout(Yt,t-zt.now()-Pt)),Kt&&(Kt=clearInterval(Kt))):(Kt||(It=zt.now(),Kt=setInterval(Gt,1e3)),Ot=1,qt(Yt)))}function Vt(t,e,r){var i=new Ht;return e=null==e?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,r),i}Ht.prototype=Ut.prototype={constructor:Ht,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?Wt():+r)+(null==e?0:+e),this._next||Dt===this||(Dt?Dt._next=this:Et=this,Dt=this),this._call=t,this._time=r,Xt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xt())}};var Zt=$t("start","end","cancel","interrupt"),Qt=[];function Jt(t,e,r,i,n,a){var o=t.__transition;if(o){if(r in o)return}else t.__transition={};!function(t,e,r){var i,n=t.__transition;function a(l){var h,c,u,d;if(1!==r.state)return s();for(h in n)if((d=n[h]).name===r.name){if(3===d.state)return Vt(a);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete n[h]):+h<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete n[h])}if(Vt(function(){3===r.state&&(r.state=4,r.timer.restart(o,r.delay,r.time),o(l))}),r.state=2,r.on.call("start",t,t.__data__,r.index,r.group),2===r.state){for(r.state=3,i=new Array(u=r.tween.length),h=0,c=-1;h<u;++h)(d=r.tween[h].value.call(t,t.__data__,r.index,r.group))&&(i[++c]=d);i.length=c+1}}function o(e){for(var n=e<r.duration?r.ease.call(null,e/r.duration):(r.timer.restart(s),r.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(t,n);5===r.state&&(r.on.call("end",t,t.__data__,r.index,r.group),s())}function s(){for(var i in r.state=6,r.timer.stop(),delete n[e],n)return;delete t.__transition}n[e]=r,r.timer=Ut(function(t){r.state=1,r.timer.restart(a,r.delay,r.time),r.delay<=t&&a(t-r.delay)},0,r.time)}(t,r,{name:e,index:i,group:n,on:Zt,tween:Qt,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function te(t,e){var r=re(t,e);if(r.state>0)throw new Error("too late; already scheduled");return r}function ee(t,e){var r=re(t,e);if(r.state>3)throw new Error("too late; already running");return r}function re(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function ie(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var ne,ae=180/Math.PI,oe={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function se(t,e,r,i,n,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),t*i<e*r&&(t=-t,e=-e,l=-l,o=-o),{translateX:n,translateY:a,rotate:Math.atan2(e,t)*ae,skewX:Math.atan(l)*ae,scaleX:o,scaleY:s}}function le(t,e,r,i){function n(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],l=[];return a=t(a),o=t(o),function(t,i,n,a,o,s){if(t!==n||i!==a){var l=o.push("translate(",null,e,null,r);s.push({i:l-4,x:ie(t,n)},{i:l-2,x:ie(i,a)})}else(n||a)&&o.push("translate("+n+e+a+r)}(a.translateX,a.translateY,o.translateX,o.translateY,s,l),function(t,e,r,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(n(r)+"rotate(",null,i)-2,x:ie(t,e)})):e&&r.push(n(r)+"rotate("+e+i)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(n(r)+"skewX(",null,i)-2,x:ie(t,e)}):e&&r.push(n(r)+"skewX("+e+i)}(a.skewX,o.skewX,s,l),function(t,e,r,i,a,o){if(t!==r||e!==i){var s=a.push(n(a)+"scale(",null,",",null,")");o.push({i:s-4,x:ie(t,r)},{i:s-2,x:ie(e,i)})}else 1===r&&1===i||a.push(n(a)+"scale("+r+","+i+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,r=-1,i=l.length;++r<i;)s[(e=l[r]).i]=e.x(t);return s.join("")}}}var he=le(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?oe:se(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),ce=le(function(t){return null==t?oe:(ne||(ne=document.createElementNS("http://www.w3.org/2000/svg","g")),ne.setAttribute("transform",t),(t=ne.transform.baseVal.consolidate())?se((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):oe)},", ",")",")");function ue(t,e){var r,i;return function(){var n=ee(this,t),a=n.tween;if(a!==r)for(var o=0,s=(i=r=a).length;o<s;++o)if(i[o].name===e){(i=i.slice()).splice(o,1);break}n.tween=i}}function de(t,e,r){var i,n;if("function"!=typeof r)throw new Error;return function(){var a=ee(this,t),o=a.tween;if(o!==i){n=(i=o).slice();for(var s={name:e,value:r},l=0,h=n.length;l<h;++l)if(n[l].name===e){n[l]=s;break}l===h&&n.push(s)}a.tween=n}}function pe(t,e,r){var i=t._id;return t.each(function(){var t=ee(this,i);(t.value||(t.value={}))[e]=r.apply(this,arguments)}),function(t){return re(t,i).value[e]}}function fe(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function ge(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function ye(){}var me=.7,xe=1/me,be="\\s*([+-]?\\d+)\\s*",ke="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ce="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",we=/^#([0-9a-f]{3,8})$/,_e=new RegExp(`^rgb\\(${be},${be},${be}\\)$`),ve=new RegExp(`^rgb\\(${Ce},${Ce},${Ce}\\)$`),Se=new RegExp(`^rgba\\(${be},${be},${be},${ke}\\)$`),Te=new RegExp(`^rgba\\(${Ce},${Ce},${Ce},${ke}\\)$`),Ae=new RegExp(`^hsl\\(${ke},${Ce},${Ce}\\)$`),Me=new RegExp(`^hsla\\(${ke},${Ce},${Ce},${ke}\\)$`),Be={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Le(){return this.rgb().formatHex()}function Fe(){return this.rgb().formatRgb()}function $e(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=we.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?Ee(e):3===r?new Ke(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?De(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?De(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=_e.exec(t))?new Ke(e[1],e[2],e[3],1):(e=ve.exec(t))?new Ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Se.exec(t))?De(e[1],e[2],e[3],e[4]):(e=Te.exec(t))?De(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ae.exec(t))?We(e[1],e[2]/100,e[3]/100,1):(e=Me.exec(t))?We(e[1],e[2]/100,e[3]/100,e[4]):Be.hasOwnProperty(t)?Ee(Be[t]):"transparent"===t?new Ke(NaN,NaN,NaN,0):null}function Ee(t){return new Ke(t>>16&255,t>>8&255,255&t,1)}function De(t,e,r,i){return i<=0&&(t=e=r=NaN),new Ke(t,e,r,i)}function Oe(t){return t instanceof ye||(t=$e(t)),t?new Ke((t=t.rgb()).r,t.g,t.b,t.opacity):new Ke}function Re(t,e,r,i){return 1===arguments.length?Oe(t):new Ke(t,e,r,null==i?1:i)}function Ke(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function Ie(){return`#${qe(this.r)}${qe(this.g)}${qe(this.b)}`}function Ne(){const t=Pe(this.opacity);return`${1===t?"rgb(":"rgba("}${ze(this.r)}, ${ze(this.g)}, ${ze(this.b)}${1===t?")":`, ${t})`}`}function Pe(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ze(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function qe(t){return((t=ze(t))<16?"0":"")+t.toString(16)}function We(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new He(t,e,r,i)}function je(t){if(t instanceof He)return new He(t.h,t.s,t.l,t.opacity);if(t instanceof ye||(t=$e(t)),!t)return new He;if(t instanceof He)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),a=Math.max(e,r,i),o=NaN,s=a-n,l=(a+n)/2;return s?(o=e===a?(r-i)/s+6*(r<i):r===a?(i-e)/s+2:(e-r)/s+4,s/=l<.5?a+n:2-a-n,o*=60):s=l>0&&l<1?0:o,new He(o,s,l,t.opacity)}function He(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function Ue(t){return(t=(t||0)%360)<0?t+360:t}function Ye(t){return Math.max(0,Math.min(1,t||0))}function Ge(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}function Xe(t,e,r,i,n){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*i+o*n)/6}fe(ye,$e,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Le,formatHex:Le,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return je(this).formatHsl()},formatRgb:Fe,toString:Fe}),fe(Ke,Re,ge(ye,{brighter(t){return t=null==t?xe:Math.pow(xe,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?me:Math.pow(me,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ke(ze(this.r),ze(this.g),ze(this.b),Pe(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ie,formatHex:Ie,formatHex8:function(){return`#${qe(this.r)}${qe(this.g)}${qe(this.b)}${qe(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ne,toString:Ne})),fe(He,function(t,e,r,i){return 1===arguments.length?je(t):new He(t,e,r,null==i?1:i)},ge(ye,{brighter(t){return t=null==t?xe:Math.pow(xe,t),new He(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?me:Math.pow(me,t),new He(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,n=2*r-i;return new Ke(Ge(t>=240?t-240:t+120,n,i),Ge(t,n,i),Ge(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new He(Ue(this.h),Ye(this.s),Ye(this.l),Pe(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Pe(this.opacity);return`${1===t?"hsl(":"hsla("}${Ue(this.h)}, ${100*Ye(this.s)}%, ${100*Ye(this.l)}%${1===t?")":`, ${t})`}`}}));const Ve=t=>()=>t;function Ze(t,e){return function(r){return t+r*e}}function Qe(t,e){var r=e-t;return r?Ze(t,r):Ve(isNaN(t)?e:t)}const Je=function t(e){var r=function(t){return 1===(t=+t)?Qe:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}(e,r,t):Ve(isNaN(e)?r:e)}}(e);function i(t,e){var i=r((t=Re(t)).r,(e=Re(e)).r),n=r(t.g,e.g),a=r(t.b,e.b),o=Qe(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=n(e),t.b=a(e),t.opacity=o(e),t+""}}return i.gamma=t,i}(1);function tr(t){return function(e){var r,i,n=e.length,a=new Array(n),o=new Array(n),s=new Array(n);for(r=0;r<n;++r)i=Re(e[r]),a[r]=i.r||0,o[r]=i.g||0,s[r]=i.b||0;return a=t(a),o=t(o),s=t(s),i.opacity=1,function(t){return i.r=a(t),i.g=o(t),i.b=s(t),i+""}}}tr(function(t){var e=t.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),n=t[i],a=t[i+1],o=i>0?t[i-1]:2*n-a,s=i<e-1?t[i+2]:2*a-n;return Xe((r-i/e)*e,o,n,a,s)}}),tr(function(t){var e=t.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*e),n=t[(i+e-1)%e],a=t[i%e],o=t[(i+1)%e],s=t[(i+2)%e];return Xe((r-i/e)*e,n,a,o,s)}});var er=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rr=new RegExp(er.source,"g");function ir(t,e){var r,i,n,a=er.lastIndex=rr.lastIndex=0,o=-1,s=[],l=[];for(t+="",e+="";(r=er.exec(t))&&(i=rr.exec(e));)(n=i.index)>a&&(n=e.slice(a,n),s[o]?s[o]+=n:s[++o]=n),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:ie(r,i)})),a=rr.lastIndex;return a<e.length&&(n=e.slice(a),s[o]?s[o]+=n:s[++o]=n),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var r,i=0;i<e;++i)s[(r=l[i]).i]=r.x(t);return s.join("")})}function nr(t,e){var r;return("number"==typeof e?ie:e instanceof $e?Je:(r=$e(e))?(e=r,Je):ir)(t,e)}function ar(t){return function(){this.removeAttribute(t)}}function or(t){return function(){this.removeAttributeNS(t.space,t.local)}}function sr(t,e,r){var i,n,a=r+"";return function(){var o=this.getAttribute(t);return o===a?null:o===i?n:n=e(i=o,r)}}function lr(t,e,r){var i,n,a=r+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===i?n:n=e(i=o,r)}}function hr(t,e,r){var i,n,a;return function(){var o,s,l=r(this);if(null!=l)return(o=this.getAttribute(t))===(s=l+"")?null:o===i&&s===n?a:(n=s,a=e(i=o,l));this.removeAttribute(t)}}function cr(t,e,r){var i,n,a;return function(){var o,s,l=r(this);if(null!=l)return(o=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:o===i&&s===n?a:(n=s,a=e(i=o,l));this.removeAttributeNS(t.space,t.local)}}function ur(t,e){var r,i;function n(){var n=e.apply(this,arguments);return n!==i&&(r=(i=n)&&function(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}(t,n)),r}return n._value=e,n}function dr(t,e){var r,i;function n(){var n=e.apply(this,arguments);return n!==i&&(r=(i=n)&&function(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}(t,n)),r}return n._value=e,n}function pr(t,e){return function(){te(this,t).delay=+e.apply(this,arguments)}}function fr(t,e){return e=+e,function(){te(this,t).delay=e}}function gr(t,e){return function(){ee(this,t).duration=+e.apply(this,arguments)}}function yr(t,e){return e=+e,function(){ee(this,t).duration=e}}var mr=Tt.prototype.constructor;function xr(t){return function(){this.style.removeProperty(t)}}var br=0;function kr(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function Cr(){return++br}var wr=Tt.prototype;kr.prototype=function(t){return Tt().transition(t)}.prototype={constructor:kr,select:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=y(t));for(var i=this._groups,n=i.length,a=new Array(n),o=0;o<n;++o)for(var s,l,h=i[o],c=h.length,u=a[o]=new Array(c),d=0;d<c;++d)(s=h[d])&&(l=t.call(s,s.__data__,d,h))&&("__data__"in s&&(l.__data__=s.__data__),u[d]=l,Jt(u[d],e,r,d,u,re(s,r)));return new kr(a,this._parents,e,r)},selectAll:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=x(t));for(var i=this._groups,n=i.length,a=[],o=[],s=0;s<n;++s)for(var l,h=i[s],c=h.length,u=0;u<c;++u)if(l=h[u]){for(var d,p=t.call(l,l.__data__,u,h),f=re(l,r),g=0,y=p.length;g<y;++g)(d=p[g])&&Jt(d,e,r,g,p,f);a.push(p),o.push(l)}return new kr(a,o,e,r)},selectChild:wr.selectChild,selectChildren:wr.selectChildren,filter:function(t){"function"!=typeof t&&(t=b(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var a,o=e[n],s=o.length,l=i[n]=[],h=0;h<s;++h)(a=o[h])&&t.call(a,a.__data__,h,o)&&l.push(a);return new kr(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,n=r.length,a=Math.min(i,n),o=new Array(i),s=0;s<a;++s)for(var l,h=e[s],c=r[s],u=h.length,d=o[s]=new Array(u),p=0;p<u;++p)(l=h[p]||c[p])&&(d[p]=l);for(;s<i;++s)o[s]=e[s];return new kr(o,this._parents,this._name,this._id)},selection:function(){return new mr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,r=Cr(),i=this._groups,n=i.length,a=0;a<n;++a)for(var o,s=i[a],l=s.length,h=0;h<l;++h)if(o=s[h]){var c=re(o,e);Jt(o,t,r,h,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new kr(i,this._parents,t,r)},call:wr.call,nodes:wr.nodes,node:wr.node,size:wr.size,empty:wr.empty,each:wr.each,on:function(t,e){var r=this._id;return arguments.length<2?re(this.node(),r).on.on(t):this.each(function(t,e,r){var i,n,a=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?te:ee;return function(){var o=a(this,t),s=o.on;s!==i&&(n=(i=s).copy()).on(e,r),o.on=n}}(r,t,e))},attr:function(t,e){var r=D(t),i="transform"===r?ce:nr;return this.attrTween(t,"function"==typeof e?(r.local?cr:hr)(r,i,pe(this,"attr."+t,e)):null==e?(r.local?or:ar)(r):(r.local?lr:sr)(r,i,e))},attrTween:function(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var i=D(t);return this.tween(r,(i.local?ur:dr)(i,e))},style:function(t,e,r){var i="transform"==(t+="")?he:nr;return null==e?this.styleTween(t,function(t,e){var r,i,n;return function(){var a=H(this,t),o=(this.style.removeProperty(t),H(this,t));return a===o?null:a===r&&o===i?n:n=e(r=a,i=o)}}(t,i)).on("end.style."+t,xr(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,n,a;return function(){var o=H(this,t),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=H(this,t)),o===l?null:o===i&&l===n?a:(n=l,a=e(i=o,s))}}(t,i,pe(this,"style."+t,e))).each(function(t,e){var r,i,n,a,o="style."+e,s="end."+o;return function(){var l=ee(this,t),h=l.on,c=null==l.value[o]?a||(a=xr(e)):void 0;h===r&&n===c||(i=(r=h).copy()).on(s,n=c),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,r){var i,n,a=r+"";return function(){var o=H(this,t);return o===a?null:o===i?n:n=e(i=o,r)}}(t,i,e),r).on("end.style."+t,null)},styleTween:function(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,r){var i,n;function a(){var a=e.apply(this,arguments);return a!==n&&(i=(n=a)&&function(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}(t,a,r)),i}return a._value=e,a}(t,e,null==r?"":r))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(pe(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,r;function i(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,n=re(this.node(),r).tween,a=0,o=n.length;a<o;++a)if((i=n[a]).name===t)return i.value;return null}return this.each((null==e?ue:de)(r,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?pr:fr)(e,t)):re(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?gr:yr)(e,t)):re(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){ee(this,t).ease=e}}(e,t)):re(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var r=e.apply(this,arguments);if("function"!=typeof r)throw new Error;ee(this,t).ease=r}}(this._id,t))},end:function(){var t,e,r=this,i=r._id,n=r.size();return new Promise(function(a,o){var s={value:o},l={value:function(){0===--n&&a()}};r.each(function(){var r=ee(this,i),n=r.on;n!==t&&((e=(t=n).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),r.on=e}),0===n&&a()})},[Symbol.iterator]:wr[Symbol.iterator]};var _r={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function vr(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}Tt.prototype.interrupt=function(t){return this.each(function(){!function(t,e){var r,i,n,a=t.__transition,o=!0;if(a){for(n in e=null==e?null:e+"",a)(r=a[n]).name===e?(i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[n]):o=!1;o&&delete t.__transition}}(this,t)})},Tt.prototype.transition=function(t){var e,r;t instanceof kr?(e=t._id,t=t._name):(e=Cr(),(r=_r).time=Wt(),t=null==t?null:t+"");for(var i=this._groups,n=i.length,a=0;a<n;++a)for(var o,s=i[a],l=s.length,h=0;h<l;++h)(o=s[h])&&Jt(o,t,e,h,s,r||vr(o,e));return new kr(i,this._parents,t,e)};const{abs:Sr,max:Tr,min:Ar}=Math;function Mr(t){return{type:t}}function Br(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function Lr(t){return(t=Br(Math.abs(t)))?t[1]:NaN}["w","e"].map(Mr),["n","s"].map(Mr),["n","w","e","s","nw","ne","sw","se"].map(Mr);var Fr,$r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Er(t){if(!(e=$r.exec(t)))throw new Error("invalid format: "+t);var e;return new Dr({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Dr(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Or(t,e){var r=Br(t,e);if(!r)return t+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}Er.prototype=Dr.prototype,Dr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Rr={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Or(100*t,e),r:Or,s:function(t,e){var r=Br(t,e);if(!r)return t+"";var i=r[0],n=r[1],a=n-(Fr=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Br(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Kr(t){return t}var Ir,Nr,Pr,zr=Array.prototype.map,qr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Wr(t){var e=0,r=t.children,i=r&&r.length;if(i)for(;--i>=0;)e+=r[i].value;else e=1;t.value=e}function jr(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Ur)):void 0===e&&(e=Hr);for(var r,i,n,a,o,s=new Xr(t),l=[s];r=l.pop();)if((n=e(r.data))&&(o=(n=Array.from(n)).length))for(r.children=n,a=o-1;a>=0;--a)l.push(i=n[a]=new Xr(n[a])),i.parent=r,i.depth=r.depth+1;return s.eachBefore(Gr)}function Hr(t){return t.children}function Ur(t){return Array.isArray(t)?t[1]:null}function Yr(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Gr(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Xr(t){this.data=t,this.depth=this.height=0,this.parent=null}function Vr(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Zr(t,e,r,i,n){for(var a,o=t.children,s=-1,l=o.length,h=t.value&&(i-e)/t.value;++s<l;)(a=o[s]).y0=r,a.y1=n,a.x0=e,a.x1=e+=a.value*h}function Qr(t,e,r,i,n){for(var a,o=t.children,s=-1,l=o.length,h=t.value&&(n-r)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=i,a.y0=r,a.y1=r+=a.value*h}Ir=function(t){var e,r,i=void 0===t.grouping||void 0===t.thousands?Kr:(e=zr.call(t.grouping,Number),r=t.thousands+"",function(t,i){for(var n=t.length,a=[],o=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),a.push(t.substring(n-=s,n+s)),!((l+=s+1)>i));)s=e[o=(o+1)%e.length];return a.reverse().join(r)}),n=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Kr:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(zr.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",h=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function u(t){var e=(t=Er(t)).fill,r=t.align,u=t.sign,d=t.symbol,p=t.zero,f=t.width,g=t.comma,y=t.precision,m=t.trim,x=t.type;"n"===x?(g=!0,x="g"):Rr[x]||(void 0===y&&(y=12),m=!0,x="g"),(p||"0"===e&&"="===r)&&(p=!0,e="0",r="=");var b="$"===d?n:"#"===d&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",k="$"===d?a:/[%p]/.test(x)?l:"",C=Rr[x],w=/[defgprs%]/.test(x);function _(t){var n,a,l,d=b,_=k;if("c"===x)_=C(t)+_,t="";else{var v=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:C(Math.abs(t),y),m&&(t=function(t){t:for(var e,r=t.length,i=1,n=-1;i<r;++i)switch(t[i]){case".":n=e=i;break;case"0":0===n&&(n=i),e=i;break;default:if(!+t[i])break t;n>0&&(n=0)}return n>0?t.slice(0,n)+t.slice(e+1):t}(t)),v&&0===+t&&"+"!==u&&(v=!1),d=(v?"("===u?u:h:"-"===u||"("===u?"":u)+d,_=("s"===x?qr[8+Fr/3]:"")+_+(v&&"("===u?")":""),w)for(n=-1,a=t.length;++n<a;)if(48>(l=t.charCodeAt(n))||l>57){_=(46===l?o+t.slice(n+1):t.slice(n))+_,t=t.slice(0,n);break}}g&&!p&&(t=i(t,1/0));var S=d.length+t.length+_.length,T=S<f?new Array(f-S+1).join(e):"";switch(g&&p&&(t=i(T+t,T.length?f-_.length:1/0),T=""),r){case"<":t=d+t+_+T;break;case"=":t=d+T+t+_;break;case"^":t=T.slice(0,S=T.length>>1)+d+t+_+T.slice(S);break;default:t=T+d+t+_}return s(t)}return y=void 0===y?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),_.toString=function(){return t+""},_}return{format:u,formatPrefix:function(t,e){var r=u(((t=Er(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(Lr(e)/3))),n=Math.pow(10,-i),a=qr[8+i/3];return function(t){return r(n*t)+a}}}}({thousands:",",grouping:[3],currency:["$",""]}),Nr=Ir.format,Pr=Ir.formatPrefix,Xr.prototype=jr.prototype={constructor:Xr,count:function(){return this.eachAfter(Wr)},each:function(t,e){let r=-1;for(const i of this)t.call(e,i,++r,this);return this},eachAfter:function(t,e){for(var r,i,n,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),r=a.children)for(i=0,n=r.length;i<n;++i)o.push(r[i]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var r,i,n=this,a=[n],o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;i>=0;--i)a.push(r[i]);return this},find:function(t,e){let r=-1;for(const i of this)if(t.call(e,i,++r,this))return i},sum:function(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,i=e.children,n=i&&i.length;--n>=0;)r+=i[n].value;e.value=r})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),i=e.ancestors(),n=null;for(t=r.pop(),e=i.pop();t===e;)n=t,t=r.pop(),e=i.pop();return n}(e,t),i=[e];e!==r;)e=e.parent,i.push(e);for(var n=i.length;t!==r;)i.splice(n,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e},copy:function(){return jr(this).eachBefore(Yr)},[Symbol.iterator]:function*(){var t,e,r,i,n=this,a=[n];do{for(t=a.reverse(),a=[];n=t.pop();)if(yield n,e=n.children)for(r=0,i=e.length;r<i;++r)a.push(e[r])}while(a.length)}};const Jr=function t(e){function r(t,r,i,n,a){!function(t,e,r,i,n,a){for(var o,s,l,h,c,u,d,p,f,g,y,m=[],x=e.children,b=0,k=0,C=x.length,w=e.value;b<C;){l=n-r,h=a-i;do{c=x[k++].value}while(!c&&k<C);for(u=d=c,y=c*c*(g=Math.max(h/l,l/h)/(w*t)),f=Math.max(d/y,y/u);k<C;++k){if(c+=s=x[k].value,s<u&&(u=s),s>d&&(d=s),y=c*c*g,(p=Math.max(d/y,y/u))>f){c-=s;break}f=p}m.push(o={value:c,dice:l<h,children:x.slice(b,k)}),o.dice?Zr(o,r,i,n,w?i+=h*c/w:a):Qr(o,r,i,w?r+=l*c/w:n,a),w-=c,b=k}}(e,t,r,i,n,a)}return r.ratio=function(e){return t((e=+e)>1?e:1)},r}((1+Math.sqrt(5))/2);function ti(){return 0}function ei(t){return function(){return t}}function ri(){var t=Jr,e=!1,r=1,i=1,n=[0],a=ti,o=ti,s=ti,l=ti,h=ti;function c(t){return t.x0=t.y0=0,t.x1=r,t.y1=i,t.eachBefore(u),n=[0],e&&t.eachBefore(Vr),t}function u(e){var r=n[e.depth],i=e.x0+r,c=e.y0+r,u=e.x1-r,d=e.y1-r;u<i&&(i=u=(i+u)/2),d<c&&(c=d=(c+d)/2),e.x0=i,e.y0=c,e.x1=u,e.y1=d,e.children&&(r=n[e.depth+1]=a(e)/2,i+=h(e)-r,c+=o(e)-r,(u-=s(e)-r)<i&&(i=u=(i+u)/2),(d-=l(e)-r)<c&&(c=d=(c+d)/2),t(e,i,c,u,d))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(r=+t[0],i=+t[1],c):[r,i]},c.tile=function(e){return arguments.length?(t=function(t){if("function"!=typeof t)throw new Error;return t}(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:ei(+t),c):a},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:ei(+t),c):o},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:ei(+t),c):s},c.paddingBottom=function(t){return arguments.length?(l="function"==typeof t?t:ei(+t),c):l},c.paddingLeft=function(t){return arguments.length?(h="function"==typeof t?t:ei(+t),c):h},c}const ii=Math.PI/180,ni=180/Math.PI,ai=.96422,oi=.82521,si=4/29,li=6/29,hi=3*li*li,ci=li*li*li;function ui(t){if(t instanceof di)return new di(t.l,t.a,t.b,t.opacity);if(t instanceof xi)return bi(t);t instanceof Ke||(t=Oe(t));var e,r,i=yi(t.r),n=yi(t.g),a=yi(t.b),o=pi((.2225045*i+.7168786*n+.0606169*a)/1);return i===n&&n===a?e=r=o:(e=pi((.4360747*i+.3850649*n+.1430804*a)/ai),r=pi((.0139322*i+.0971045*n+.7141733*a)/oi)),new di(116*o-16,500*(e-o),200*(o-r),t.opacity)}function di(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}function pi(t){return t>ci?Math.pow(t,1/3):t/hi+si}function fi(t){return t>li?t*t*t:hi*(t-si)}function gi(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function yi(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function mi(t,e,r,i){return 1===arguments.length?function(t){if(t instanceof xi)return new xi(t.h,t.c,t.l,t.opacity);if(t instanceof di||(t=ui(t)),0===t.a&&0===t.b)return new xi(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*ni;return new xi(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new xi(t,e,r,null==i?1:i)}function xi(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function bi(t){if(isNaN(t.h))return new di(t.l,0,0,t.opacity);var e=t.h*ii;return new di(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function ki(t){return function(e,r){var i=t((e=mi(e)).h,(r=mi(r)).h),n=Qe(e.c,r.c),a=Qe(e.l,r.l),o=Qe(e.opacity,r.opacity);return function(t){return e.h=i(t),e.c=n(t),e.l=a(t),e.opacity=o(t),e+""}}}fe(di,function(t,e,r,i){return 1===arguments.length?ui(t):new di(t,e,r,null==i?1:i)},ge(ye,{brighter(t){return new di(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new di(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new Ke(gi(3.1338561*(e=ai*fi(e))-1.6168667*(t=1*fi(t))-.4906146*(r=oi*fi(r))),gi(-.9787684*e+1.9161415*t+.033454*r),gi(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),fe(xi,mi,ge(ye,{brighter(t){return new xi(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new xi(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return bi(this).rgb()}}));const Ci=ki(function(t,e){var r=e-t;return r?Ze(t,r>180||r<-180?r-360*Math.round(r/360):r):Ve(isNaN(t)?e:t)});function wi(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}ki(Qe);class _i extends Map{constructor(t,e=Si){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,r]of t)this.set(e,r)}get(t){return super.get(vi(this,t))}has(t){return super.has(vi(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},r){const i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}(this,t))}}function vi({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):r}function Si(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const Ti=Symbol("implicit");function Ai(){var t=new _i,e=[],r=[],i=Ti;function n(n){let a=t.get(n);if(void 0===a){if(i!==Ti)return i;t.set(n,a=e.push(n)-1)}return r[a%r.length]}return n.domain=function(r){if(!arguments.length)return e.slice();e=[],t=new _i;for(const i of r)t.has(i)||t.set(i,e.push(i)-1);return n},n.range=function(t){return arguments.length?(r=Array.from(t),n):r.slice()},n.unknown=function(t){return arguments.length?(i=t,n):i},n.copy=function(){return Ai(e,r).unknown(i)},wi.apply(n,arguments),n}function Mi(){var t,e,r=Ai().unknown(void 0),i=r.domain,n=r.range,a=0,o=1,s=!1,l=0,h=0,c=.5;function u(){var r=i().length,u=o<a,d=u?o:a,p=u?a:o;t=(p-d)/Math.max(1,r-l+2*h),s&&(t=Math.floor(t)),d+=(p-d-t*(r-l))*c,e=t*(1-l),s&&(d=Math.round(d),e=Math.round(e));var f=function(t,e,r){t=+t,e=+e,r=(n=arguments.length)<2?(e=t,t=0,1):n<3?1:+r;for(var i=-1,n=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(n);++i<n;)a[i]=t+i*r;return a}(r).map(function(e){return d+t*e});return n(u?f.reverse():f)}return delete r.unknown,r.domain=function(t){return arguments.length?(i(t),u()):i()},r.range=function(t){return arguments.length?([a,o]=t,a=+a,o=+o,u()):[a,o]},r.rangeRound=function(t){return[a,o]=t,a=+a,o=+o,s=!0,u()},r.bandwidth=function(){return e},r.step=function(){return t},r.round=function(t){return arguments.length?(s=!!t,u()):s},r.padding=function(t){return arguments.length?(l=Math.min(1,h=+t),u()):l},r.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),u()):l},r.paddingOuter=function(t){return arguments.length?(h=+t,u()):h},r.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),u()):c},r.copy=function(){return Mi(i(),[a,o]).round(s).paddingInner(l).paddingOuter(h).align(c)},wi.apply(u(),arguments)}const Bi=Math.sqrt(50),Li=Math.sqrt(10),Fi=Math.sqrt(2);function $i(t,e,r){const i=(e-t)/Math.max(0,r),n=Math.floor(Math.log10(i)),a=i/Math.pow(10,n),o=a>=Bi?10:a>=Li?5:a>=Fi?2:1;let s,l,h;return n<0?(h=Math.pow(10,-n)/o,s=Math.round(t*h),l=Math.round(e*h),s/h<t&&++s,l/h>e&&--l,h=-h):(h=Math.pow(10,n)*o,s=Math.round(t/h),l=Math.round(e/h),s*h<t&&++s,l*h>e&&--l),l<s&&.5<=r&&r<2?$i(t,e,2*r):[s,l,h]}function Ei(t,e,r){return $i(t=+t,e=+e,r=+r)[2]}function Di(t,e,r){r=+r;const i=(e=+e)<(t=+t),n=i?Ei(e,t,r):Ei(t,e,r);return(i?-1:1)*(n<0?1/-n:n)}function Oi(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ri(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ki(t){let e,r,i;function n(t,i,n=0,a=t.length){if(n<a){if(0!==e(i,i))return a;do{const e=n+a>>>1;r(t[e],i)<0?n=e+1:a=e}while(n<a)}return n}return 2!==t.length?(e=Oi,r=(e,r)=>Oi(t(e),r),i=(e,r)=>t(e)-r):(e=t===Oi||t===Ri?t:Ii,r=t,i=t),{left:n,center:function(t,e,r=0,a=t.length){const o=n(t,e,r,a-1);return o>r&&i(t[o-1],e)>-i(t[o],e)?o-1:o},right:function(t,i,n=0,a=t.length){if(n<a){if(0!==e(i,i))return a;do{const e=n+a>>>1;r(t[e],i)<=0?n=e+1:a=e}while(n<a)}return n}}}function Ii(){return 0}const Ni=Ki(Oi),Pi=Ni.right,zi=(Ni.left,Ki(function(t){return null===t?NaN:+t}).center,Pi);function qi(t,e){var r,i=e?e.length:0,n=t?Math.min(i,t.length):0,a=new Array(n),o=new Array(i);for(r=0;r<n;++r)a[r]=Ui(t[r],e[r]);for(;r<i;++r)o[r]=e[r];return function(t){for(r=0;r<n;++r)o[r]=a[r](t);return o}}function Wi(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}function ji(t,e){var r,i={},n={};for(r in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)r in t?i[r]=Ui(t[r],e[r]):n[r]=e[r];return function(t){for(r in i)n[r]=i[r](t);return n}}function Hi(t,e){e||(e=[]);var r,i=t?Math.min(e.length,t.length):0,n=e.slice();return function(a){for(r=0;r<i;++r)n[r]=t[r]*(1-a)+e[r]*a;return n}}function Ui(t,e){var r,i,n=typeof e;return null==e||"boolean"===n?Ve(e):("number"===n?ie:"string"===n?(r=$e(e))?(e=r,Je):ir:e instanceof $e?Je:e instanceof Date?Wi:(i=e,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(e)?qi:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?ji:ie:Hi))(t,e)}function Yi(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function Gi(t){return+t}var Xi=[0,1];function Vi(t){return t}function Zi(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:(r=isNaN(e)?NaN:.5,function(){return r});var r}function Qi(t,e,r){var i=t[0],n=t[1],a=e[0],o=e[1];return n<i?(i=Zi(n,i),a=r(o,a)):(i=Zi(i,n),a=r(a,o)),function(t){return a(i(t))}}function Ji(t,e,r){var i=Math.min(t.length,e.length)-1,n=new Array(i),a=new Array(i),o=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<i;)n[o]=Zi(t[o],t[o+1]),a[o]=r(e[o],e[o+1]);return function(e){var r=zi(t,e,1,i)-1;return a[r](n[r](e))}}function tn(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function en(){return function(){var t,e,r,i,n,a,o=Xi,s=Xi,l=Ui,h=Vi;function c(){var t,e,r,l=Math.min(o.length,s.length);return h!==Vi&&(t=o[0],e=o[l-1],t>e&&(r=t,t=e,e=r),h=function(r){return Math.max(t,Math.min(e,r))}),i=l>2?Ji:Qi,n=a=null,u}function u(e){return null==e||isNaN(e=+e)?r:(n||(n=i(o.map(t),s,l)))(t(h(e)))}return u.invert=function(r){return h(e((a||(a=i(s,o.map(t),ie)))(r)))},u.domain=function(t){return arguments.length?(o=Array.from(t,Gi),c()):o.slice()},u.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},u.rangeRound=function(t){return s=Array.from(t),l=Yi,c()},u.clamp=function(t){return arguments.length?(h=!!t||Vi,c()):h!==Vi},u.interpolate=function(t){return arguments.length?(l=t,c()):l},u.unknown=function(t){return arguments.length?(r=t,u):r},function(r,i){return t=r,e=i,c()}}()(Vi,Vi)}function rn(t){var e=t.domain;return t.ticks=function(t){var r=e();return function(t,e,r){if(!((r=+r)>0))return[];if((t=+t)===(e=+e))return[t];const i=e<t,[n,a,o]=i?$i(e,t,r):$i(t,e,r);if(!(a>=n))return[];const s=a-n+1,l=new Array(s);if(i)if(o<0)for(let t=0;t<s;++t)l[t]=(a-t)/-o;else for(let t=0;t<s;++t)l[t]=(a-t)*o;else if(o<0)for(let t=0;t<s;++t)l[t]=(n+t)/-o;else for(let t=0;t<s;++t)l[t]=(n+t)*o;return l}(r[0],r[r.length-1],null==t?10:t)},t.tickFormat=function(t,r){var i=e();return function(t,e,r,i){var n,a=Di(t,e,r);switch((i=Er(null==i?",f":i)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(n=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Lr(e)/3)))-Lr(Math.abs(t)))}(a,o))||(i.precision=n),Pr(i,o);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(n=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Lr(e)-Lr(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=n-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(n=function(t){return Math.max(0,-Lr(Math.abs(t)))}(a))||(i.precision=n-2*("%"===i.type))}return Nr(i)}(i[0],i[i.length-1],null==t?10:t,r)},t.nice=function(r){null==r&&(r=10);var i,n,a=e(),o=0,s=a.length-1,l=a[o],h=a[s],c=10;for(h<l&&(n=l,l=h,h=n,n=o,o=s,s=n);c-- >0;){if((n=Ei(l,h,r))===i)return a[o]=l,a[s]=h,e(a);if(n>0)l=Math.floor(l/n)*n,h=Math.ceil(h/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,h=Math.floor(h*n)/n}i=n}return t},t}function nn(){var t=en();return t.copy=function(){return tn(t,nn())},wi.apply(t,arguments),rn(t)}const an=1e3,on=6e4,sn=36e5,ln=864e5,hn=6048e5,cn=31536e6,un=new Date,dn=new Date;function pn(t,e,r,i){function n(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return n.floor=e=>(t(e=new Date(+e)),e),n.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),n.round=t=>{const e=n(t),r=n.ceil(t);return t-e<r-t?e:r},n.offset=(t,r)=>(e(t=new Date(+t),null==r?1:Math.floor(r)),t),n.range=(r,i,a)=>{const o=[];if(r=n.ceil(r),a=null==a?1:Math.floor(a),!(r<i&&a>0))return o;let s;do{o.push(s=new Date(+r)),e(r,a),t(r)}while(s<r&&r<i);return o},n.filter=r=>pn(e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)},(t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!r(t););else for(;--i>=0;)for(;e(t,1),!r(t););}),r&&(n.count=(e,i)=>(un.setTime(+e),dn.setTime(+i),t(un),t(dn),Math.floor(r(un,dn))),n.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?n.filter(i?e=>i(e)%t===0:e=>n.count(0,e)%t===0):n:null)),n}const fn=pn(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);fn.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?pn(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):fn:null),fn.range;const gn=pn(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*an)},(t,e)=>(e-t)/an,t=>t.getUTCSeconds()),yn=(gn.range,pn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*an)},(t,e)=>{t.setTime(+t+e*on)},(t,e)=>(e-t)/on,t=>t.getMinutes())),mn=(yn.range,pn(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*on)},(t,e)=>(e-t)/on,t=>t.getUTCMinutes())),xn=(mn.range,pn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*an-t.getMinutes()*on)},(t,e)=>{t.setTime(+t+e*sn)},(t,e)=>(e-t)/sn,t=>t.getHours())),bn=(xn.range,pn(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*sn)},(t,e)=>(e-t)/sn,t=>t.getUTCHours())),kn=(bn.range,pn(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*on)/ln,t=>t.getDate()-1)),Cn=(kn.range,pn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/ln,t=>t.getUTCDate()-1)),wn=(Cn.range,pn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/ln,t=>Math.floor(t/ln)));function vn(t){return pn(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*on)/hn)}wn.range;const Sn=vn(0),Tn=vn(1),An=vn(2),Mn=vn(3),Bn=vn(4),Ln=vn(5),Fn=vn(6);function $n(t){return pn(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/hn)}Sn.range,Tn.range,An.range,Mn.range,Bn.range,Ln.range,Fn.range;const En=$n(0),Dn=$n(1),On=$n(2),Rn=$n(3),Kn=$n(4),In=$n(5),Nn=$n(6),Pn=(En.range,Dn.range,On.range,Rn.range,Kn.range,In.range,Nn.range,pn(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth())),zn=(Pn.range,pn(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth())),qn=(zn.range,pn(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear()));qn.every=t=>isFinite(t=Math.floor(t))&&t>0?pn(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)}):null,qn.range;const Wn=pn(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());function jn(t,e,r,i,n,a){const o=[[gn,1,an],[gn,5,5e3],[gn,15,15e3],[gn,30,3e4],[a,1,on],[a,5,3e5],[a,15,9e5],[a,30,18e5],[n,1,sn],[n,3,108e5],[n,6,216e5],[n,12,432e5],[i,1,ln],[i,2,1728e5],[r,1,hn],[e,1,2592e6],[e,3,7776e6],[t,1,cn]];function s(e,r,i){const n=Math.abs(r-e)/i,a=Ki(([,,t])=>t).right(o,n);if(a===o.length)return t.every(Di(e/cn,r/cn,i));if(0===a)return fn.every(Math.max(Di(e,r,i),1));const[s,l]=o[n/o[a-1][2]<o[a][2]/n?a-1:a];return s.every(l)}return[function(t,e,r){const i=e<t;i&&([t,e]=[e,t]);const n=r&&"function"==typeof r.range?r:s(t,e,r),a=n?n.range(t,+e+1):[];return i?a.reverse():a},s]}Wn.every=t=>isFinite(t=Math.floor(t))&&t>0?pn(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)}):null,Wn.range;const[Hn,Un]=jn(Wn,zn,En,wn,bn,mn),[Yn,Gn]=jn(qn,Pn,Sn,kn,xn,yn);function Xn(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Vn(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Zn(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}var Qn,Jn,ta={"-":"",_:" ",0:"0"},ea=/^\s*\d+/,ra=/^%/,ia=/[\\^$*+?|[\]().{}]/g;function na(t,e,r){var i=t<0?"-":"",n=(i?-t:t)+"",a=n.length;return i+(a<r?new Array(r-a+1).join(e)+n:n)}function aa(t){return t.replace(ia,"\\$&")}function oa(t){return new RegExp("^(?:"+t.map(aa).join("|")+")","i")}function sa(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function la(t,e,r){var i=ea.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function ha(t,e,r){var i=ea.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function ca(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function ua(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function da(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function pa(t,e,r){var i=ea.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function fa(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function ga(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function ya(t,e,r){var i=ea.exec(e.slice(r,r+1));return i?(t.q=3*i[0]-3,r+i[0].length):-1}function ma(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function xa(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function ba(t,e,r){var i=ea.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function ka(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function Ca(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function wa(t,e,r){var i=ea.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function _a(t,e,r){var i=ea.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function va(t,e,r){var i=ea.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function Sa(t,e,r){var i=ra.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function Ta(t,e,r){var i=ea.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function Aa(t,e,r){var i=ea.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function Ma(t,e){return na(t.getDate(),e,2)}function Ba(t,e){return na(t.getHours(),e,2)}function La(t,e){return na(t.getHours()%12||12,e,2)}function Fa(t,e){return na(1+kn.count(qn(t),t),e,3)}function $a(t,e){return na(t.getMilliseconds(),e,3)}function Ea(t,e){return $a(t,e)+"000"}function Da(t,e){return na(t.getMonth()+1,e,2)}function Oa(t,e){return na(t.getMinutes(),e,2)}function Ra(t,e){return na(t.getSeconds(),e,2)}function Ka(t){var e=t.getDay();return 0===e?7:e}function Ia(t,e){return na(Sn.count(qn(t)-1,t),e,2)}function Na(t){var e=t.getDay();return e>=4||0===e?Bn(t):Bn.ceil(t)}function Pa(t,e){return t=Na(t),na(Bn.count(qn(t),t)+(4===qn(t).getDay()),e,2)}function za(t){return t.getDay()}function qa(t,e){return na(Tn.count(qn(t)-1,t),e,2)}function Wa(t,e){return na(t.getFullYear()%100,e,2)}function ja(t,e){return na((t=Na(t)).getFullYear()%100,e,2)}function Ha(t,e){return na(t.getFullYear()%1e4,e,4)}function Ua(t,e){var r=t.getDay();return na((t=r>=4||0===r?Bn(t):Bn.ceil(t)).getFullYear()%1e4,e,4)}function Ya(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+na(e/60|0,"0",2)+na(e%60,"0",2)}function Ga(t,e){return na(t.getUTCDate(),e,2)}function Xa(t,e){return na(t.getUTCHours(),e,2)}function Va(t,e){return na(t.getUTCHours()%12||12,e,2)}function Za(t,e){return na(1+Cn.count(Wn(t),t),e,3)}function Qa(t,e){return na(t.getUTCMilliseconds(),e,3)}function Ja(t,e){return Qa(t,e)+"000"}function to(t,e){return na(t.getUTCMonth()+1,e,2)}function eo(t,e){return na(t.getUTCMinutes(),e,2)}function ro(t,e){return na(t.getUTCSeconds(),e,2)}function io(t){var e=t.getUTCDay();return 0===e?7:e}function no(t,e){return na(En.count(Wn(t)-1,t),e,2)}function ao(t){var e=t.getUTCDay();return e>=4||0===e?Kn(t):Kn.ceil(t)}function oo(t,e){return t=ao(t),na(Kn.count(Wn(t),t)+(4===Wn(t).getUTCDay()),e,2)}function so(t){return t.getUTCDay()}function lo(t,e){return na(Dn.count(Wn(t)-1,t),e,2)}function ho(t,e){return na(t.getUTCFullYear()%100,e,2)}function co(t,e){return na((t=ao(t)).getUTCFullYear()%100,e,2)}function uo(t,e){return na(t.getUTCFullYear()%1e4,e,4)}function po(t,e){var r=t.getUTCDay();return na((t=r>=4||0===r?Kn(t):Kn.ceil(t)).getUTCFullYear()%1e4,e,4)}function fo(){return"+0000"}function go(){return"%"}function yo(t){return+t}function mo(t){return Math.floor(+t/1e3)}function xo(t){return new Date(t)}function bo(t){return t instanceof Date?+t:+new Date(+t)}function ko(t,e,r,i,n,a,o,s,l,h){var c=en(),u=c.invert,d=c.domain,p=h(".%L"),f=h(":%S"),g=h("%I:%M"),y=h("%I %p"),m=h("%a %d"),x=h("%b %d"),b=h("%B"),k=h("%Y");function C(t){return(l(t)<t?p:s(t)<t?f:o(t)<t?g:a(t)<t?y:i(t)<t?n(t)<t?m:x:r(t)<t?b:k)(t)}return c.invert=function(t){return new Date(u(t))},c.domain=function(t){return arguments.length?d(Array.from(t,bo)):d().map(xo)},c.ticks=function(e){var r=d();return t(r[0],r[r.length-1],null==e?10:e)},c.tickFormat=function(t,e){return null==e?C:h(e)},c.nice=function(t){var r=d();return t&&"function"==typeof t.range||(t=e(r[0],r[r.length-1],null==t?10:t)),t?d(function(t,e){var r,i=0,n=(t=t.slice()).length-1,a=t[i],o=t[n];return o<a&&(r=i,i=n,n=r,r=a,a=o,o=r),t[i]=e.floor(a),t[n]=e.ceil(o),t}(r,t)):c},c.copy=function(){return tn(c,ko(t,e,r,i,n,a,o,s,l,h))},c}function Co(){return wi.apply(ko(Yn,Gn,qn,Pn,Sn,kn,xn,yn,gn,Jn).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}Qn=function(t){var e=t.dateTime,r=t.date,i=t.time,n=t.periods,a=t.days,o=t.shortDays,s=t.months,l=t.shortMonths,h=oa(n),c=sa(n),u=oa(a),d=sa(a),p=oa(o),f=sa(o),g=oa(s),y=sa(s),m=oa(l),x=sa(l),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Ma,e:Ma,f:Ea,g:ja,G:Ua,H:Ba,I:La,j:Fa,L:$a,m:Da,M:Oa,p:function(t){return n[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:yo,s:mo,S:Ra,u:Ka,U:Ia,V:Pa,w:za,W:qa,x:null,X:null,y:Wa,Y:Ha,Z:Ya,"%":go},k={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Ga,e:Ga,f:Ja,g:co,G:po,H:Xa,I:Va,j:Za,L:Qa,m:to,M:eo,p:function(t){return n[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:yo,s:mo,S:ro,u:io,U:no,V:oo,w:so,W:lo,x:null,X:null,y:ho,Y:uo,Z:fo,"%":go},C={a:function(t,e,r){var i=p.exec(e.slice(r));return i?(t.w=f.get(i[0].toLowerCase()),r+i[0].length):-1},A:function(t,e,r){var i=u.exec(e.slice(r));return i?(t.w=d.get(i[0].toLowerCase()),r+i[0].length):-1},b:function(t,e,r){var i=m.exec(e.slice(r));return i?(t.m=x.get(i[0].toLowerCase()),r+i[0].length):-1},B:function(t,e,r){var i=g.exec(e.slice(r));return i?(t.m=y.get(i[0].toLowerCase()),r+i[0].length):-1},c:function(t,r,i){return v(t,e,r,i)},d:xa,e:xa,f:va,g:fa,G:pa,H:ka,I:ka,j:ba,L:_a,m:ma,M:Ca,p:function(t,e,r){var i=h.exec(e.slice(r));return i?(t.p=c.get(i[0].toLowerCase()),r+i[0].length):-1},q:ya,Q:Ta,s:Aa,S:wa,u:ha,U:ca,V:ua,w:la,W:da,x:function(t,e,i){return v(t,r,e,i)},X:function(t,e,r){return v(t,i,e,r)},y:fa,Y:pa,Z:ga,"%":Sa};function w(t,e){return function(r){var i,n,a,o=[],s=-1,l=0,h=t.length;for(r instanceof Date||(r=new Date(+r));++s<h;)37===t.charCodeAt(s)&&(o.push(t.slice(l,s)),null!=(n=ta[i=t.charAt(++s)])?i=t.charAt(++s):n="e"===i?" ":"0",(a=e[i])&&(i=a(r,n)),o.push(i),l=s+1);return o.push(t.slice(l,s)),o.join("")}}function _(t,e){return function(r){var i,n,a=Zn(1900,void 0,1);if(v(a,t,r+="",0)!=r.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(n=(i=Vn(Zn(a.y,0,1))).getUTCDay(),i=n>4||0===n?Dn.ceil(i):Dn(i),i=Cn.offset(i,7*(a.V-1)),a.y=i.getUTCFullYear(),a.m=i.getUTCMonth(),a.d=i.getUTCDate()+(a.w+6)%7):(n=(i=Xn(Zn(a.y,0,1))).getDay(),i=n>4||0===n?Tn.ceil(i):Tn(i),i=kn.offset(i,7*(a.V-1)),a.y=i.getFullYear(),a.m=i.getMonth(),a.d=i.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),n="Z"in a?Vn(Zn(a.y,0,1)).getUTCDay():Xn(Zn(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(n+5)%7:a.w+7*a.U-(n+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Vn(a)):Xn(a)}}function v(t,e,r,i){for(var n,a,o=0,s=e.length,l=r.length;o<s;){if(i>=l)return-1;if(37===(n=e.charCodeAt(o++))){if(n=e.charAt(o++),!(a=C[n in ta?e.charAt(o++):n])||(i=a(t,r,i))<0)return-1}else if(n!=r.charCodeAt(i++))return-1}return i}return b.x=w(r,b),b.X=w(i,b),b.c=w(e,b),k.x=w(r,k),k.X=w(i,k),k.c=w(e,k),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=_(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",k);return e.toString=function(){return t},e},utcParse:function(t){var e=_(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Jn=Qn.format,Qn.parse,Qn.utcFormat,Qn.utcParse;const wo=function(t){for(var e=new Array(10),r=0;r<10;)e[r]="#"+t.slice(6*r,6*++r);return e}("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function _o(t){return"string"==typeof t?new vt([[document.querySelector(t)]],[document.documentElement]):new vt([[t]],_t)}function vo(t){return function(){return t}}const So=Math.abs,To=Math.atan2,Ao=Math.cos,Mo=Math.max,Bo=Math.min,Lo=Math.sin,Fo=Math.sqrt,$o=1e-12,Eo=Math.PI,Do=Eo/2,Oo=2*Eo;function Ro(t){return t>=1?Do:t<=-1?-Do:Math.asin(t)}const Ko=Math.PI,Io=2*Ko,No=1e-6,Po=Io-No;function zo(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}class qo{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?zo:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return zo;const r=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,r,i){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,e,r,i,n,a){this._append`C${+t},${+e},${+r},${+i},${this._x1=+n},${this._y1=+a}`}arcTo(t,e,r,i,n){if(t=+t,e=+e,r=+r,i=+i,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=this._x1,o=this._y1,s=r-t,l=i-e,h=a-t,c=o-e,u=h*h+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(u>No)if(Math.abs(c*s-l*h)>No&&n){let d=r-a,p=i-o,f=s*s+l*l,g=d*d+p*p,y=Math.sqrt(f),m=Math.sqrt(u),x=n*Math.tan((Ko-Math.acos((f+u-g)/(2*y*m)))/2),b=x/m,k=x/y;Math.abs(b-1)>No&&this._append`L${t+b*h},${e+b*c}`,this._append`A${n},${n},0,0,${+(c*d>h*p)},${this._x1=t+k*s},${this._y1=e+k*l}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,r,i,n,a){if(t=+t,e=+e,a=!!a,(r=+r)<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),s=r*Math.sin(i),l=t+o,h=e+s,c=1^a,u=a?i-n:n-i;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>No||Math.abs(this._y1-h)>No)&&this._append`L${l},${h}`,r&&(u<0&&(u=u%Io+Io),u>Po?this._append`A${r},${r},0,1,${c},${t-o},${e-s}A${r},${r},0,1,${c},${this._x1=l},${this._y1=h}`:u>No&&this._append`A${r},${r},0,${+(u>=Ko)},${c},${this._x1=t+r*Math.cos(n)},${this._y1=e+r*Math.sin(n)}`)}rect(t,e,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Wo(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new qo(e)}function jo(t){return t.innerRadius}function Ho(t){return t.outerRadius}function Uo(t){return t.startAngle}function Yo(t){return t.endAngle}function Go(t){return t&&t.padAngle}function Xo(t,e,r,i,n,a,o){var s=t-r,l=e-i,h=(o?a:-a)/Fo(s*s+l*l),c=h*l,u=-h*s,d=t+c,p=e+u,f=r+c,g=i+u,y=(d+f)/2,m=(p+g)/2,x=f-d,b=g-p,k=x*x+b*b,C=n-a,w=d*g-f*p,_=(b<0?-1:1)*Fo(Mo(0,C*C*k-w*w)),v=(w*b-x*_)/k,S=(-w*x-b*_)/k,T=(w*b+x*_)/k,A=(-w*x+b*_)/k,M=v-y,B=S-m,L=T-y,F=A-m;return M*M+B*B>L*L+F*F&&(v=T,S=A),{cx:v,cy:S,x01:-c,y01:-u,x11:v*(n/C-1),y11:S*(n/C-1)}}function Vo(){var t=jo,e=Ho,r=vo(0),i=null,n=Uo,a=Yo,o=Go,s=null,l=Wo(h);function h(){var h,c,u,d=+t.apply(this,arguments),p=+e.apply(this,arguments),f=n.apply(this,arguments)-Do,g=a.apply(this,arguments)-Do,y=So(g-f),m=g>f;if(s||(s=h=l()),p<d&&(c=p,p=d,d=c),p>$o)if(y>Oo-$o)s.moveTo(p*Ao(f),p*Lo(f)),s.arc(0,0,p,f,g,!m),d>$o&&(s.moveTo(d*Ao(g),d*Lo(g)),s.arc(0,0,d,g,f,m));else{var x,b,k=f,C=g,w=f,_=g,v=y,S=y,T=o.apply(this,arguments)/2,A=T>$o&&(i?+i.apply(this,arguments):Fo(d*d+p*p)),M=Bo(So(p-d)/2,+r.apply(this,arguments)),B=M,L=M;if(A>$o){var F=Ro(A/d*Lo(T)),$=Ro(A/p*Lo(T));(v-=2*F)>$o?(w+=F*=m?1:-1,_-=F):(v=0,w=_=(f+g)/2),(S-=2*$)>$o?(k+=$*=m?1:-1,C-=$):(S=0,k=C=(f+g)/2)}var E=p*Ao(k),D=p*Lo(k),O=d*Ao(_),R=d*Lo(_);if(M>$o){var K,I=p*Ao(C),N=p*Lo(C),P=d*Ao(w),z=d*Lo(w);if(y<Eo)if(K=function(t,e,r,i,n,a,o,s){var l=r-t,h=i-e,c=o-n,u=s-a,d=u*l-c*h;if(!(d*d<$o))return[t+(d=(c*(e-a)-u*(t-n))/d)*l,e+d*h]}(E,D,P,z,I,N,O,R)){var q=E-K[0],W=D-K[1],j=I-K[0],H=N-K[1],U=1/Lo(((u=(q*j+W*H)/(Fo(q*q+W*W)*Fo(j*j+H*H)))>1?0:u<-1?Eo:Math.acos(u))/2),Y=Fo(K[0]*K[0]+K[1]*K[1]);B=Bo(M,(d-Y)/(U-1)),L=Bo(M,(p-Y)/(U+1))}else B=L=0}S>$o?L>$o?(x=Xo(P,z,E,D,p,L,m),b=Xo(I,N,O,R,p,L,m),s.moveTo(x.cx+x.x01,x.cy+x.y01),L<M?s.arc(x.cx,x.cy,L,To(x.y01,x.x01),To(b.y01,b.x01),!m):(s.arc(x.cx,x.cy,L,To(x.y01,x.x01),To(x.y11,x.x11),!m),s.arc(0,0,p,To(x.cy+x.y11,x.cx+x.x11),To(b.cy+b.y11,b.cx+b.x11),!m),s.arc(b.cx,b.cy,L,To(b.y11,b.x11),To(b.y01,b.x01),!m))):(s.moveTo(E,D),s.arc(0,0,p,k,C,!m)):s.moveTo(E,D),d>$o&&v>$o?B>$o?(x=Xo(O,R,I,N,d,-B,m),b=Xo(E,D,P,z,d,-B,m),s.lineTo(x.cx+x.x01,x.cy+x.y01),B<M?s.arc(x.cx,x.cy,B,To(x.y01,x.x01),To(b.y01,b.x01),!m):(s.arc(x.cx,x.cy,B,To(x.y01,x.x01),To(x.y11,x.x11),!m),s.arc(0,0,d,To(x.cy+x.y11,x.cx+x.x11),To(b.cy+b.y11,b.cx+b.x11),m),s.arc(b.cx,b.cy,B,To(b.y11,b.x11),To(b.y01,b.x01),!m))):s.arc(0,0,d,_,w,m):s.lineTo(O,R)}else s.moveTo(0,0);if(s.closePath(),h)return s=null,h+""||null}return h.centroid=function(){var r=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+n.apply(this,arguments)+ +a.apply(this,arguments))/2-Eo/2;return[Ao(i)*r,Lo(i)*r]},h.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:vo(+e),h):t},h.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:vo(+t),h):e},h.cornerRadius=function(t){return arguments.length?(r="function"==typeof t?t:vo(+t),h):r},h.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:vo(+t),h):i},h.startAngle=function(t){return arguments.length?(n="function"==typeof t?t:vo(+t),h):n},h.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:vo(+t),h):a},h.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:vo(+t),h):o},h.context=function(t){return arguments.length?(s=null==t?null:t,h):s},h}function Zo(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Qo(t){this._context=t}function Jo(t){return new Qo(t)}function ts(t){return t[0]}function es(t){return t[1]}function rs(t,e){var r=vo(!0),i=null,n=Jo,a=null,o=Wo(s);function s(s){var l,h,c,u=(s=Zo(s)).length,d=!1;for(null==i&&(a=n(c=o())),l=0;l<=u;++l)!(l<u&&r(h=s[l],l,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+t(h,l,s),+e(h,l,s));if(c)return a=null,c+""||null}return t="function"==typeof t?t:void 0===t?ts:vo(t),e="function"==typeof e?e:void 0===e?es:vo(e),s.x=function(e){return arguments.length?(t="function"==typeof e?e:vo(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:vo(+t),s):e},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:vo(!!t),s):r},s.curve=function(t){return arguments.length?(n=t,null!=i&&(a=n(i)),s):n},s.context=function(t){return arguments.length?(null==t?i=a=null:a=n(i=t),s):i},s}function is(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function ns(t){return t}function as(){var t=ns,e=is,r=null,i=vo(0),n=vo(Oo),a=vo(0);function o(o){var s,l,h,c,u,d=(o=Zo(o)).length,p=0,f=new Array(d),g=new Array(d),y=+i.apply(this,arguments),m=Math.min(Oo,Math.max(-Oo,n.apply(this,arguments)-y)),x=Math.min(Math.abs(m)/d,a.apply(this,arguments)),b=x*(m<0?-1:1);for(s=0;s<d;++s)(u=g[f[s]=s]=+t(o[s],s,o))>0&&(p+=u);for(null!=e?f.sort(function(t,r){return e(g[t],g[r])}):null!=r&&f.sort(function(t,e){return r(o[t],o[e])}),s=0,h=p?(m-d*b)/p:0;s<d;++s,y=c)l=f[s],c=y+((u=g[l])>0?u*h:0)+b,g[l]={data:o[l],index:s,value:u,startAngle:y,endAngle:c,padAngle:x};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:vo(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,r=null,o):e},o.sort=function(t){return arguments.length?(r=t,e=null,o):r},o.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:vo(+t),o):i},o.endAngle=function(t){return arguments.length?(n="function"==typeof t?t:vo(+t),o):n},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:vo(+t),o):a},o}function os(){}function ss(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function ls(t){this._context=t}function hs(t){return new ls(t)}function cs(t){this._context=t}function us(t){return new cs(t)}function ds(t){this._context=t}function ps(t){return new ds(t)}Array.prototype.slice,Qo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},ls.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ss(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ss(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},cs.prototype={areaStart:os,areaEnd:os,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ss(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ds.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:ss(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class fs{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function gs(t){return new fs(t,!0)}function ys(t){return new fs(t,!1)}function ms(t,e){this._basis=new ls(t),this._beta=e}ms.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i,n=t[0],a=e[0],o=t[r]-n,s=e[r]-a,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(n+i*o),this._beta*e[l]+(1-this._beta)*(a+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const xs=function t(e){function r(t){return 1===e?new ls(t):new ms(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function bs(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function ks(t,e){this._context=t,this._k=(1-e)/6}ks.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:bs(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:bs(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Cs=function t(e){function r(t){return new ks(t,e)}return r.tension=function(e){return t(+e)},r}(0);function ws(t,e){this._context=t,this._k=(1-e)/6}ws.prototype={areaStart:os,areaEnd:os,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:bs(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const _s=function t(e){function r(t){return new ws(t,e)}return r.tension=function(e){return t(+e)},r}(0);function vs(t,e){this._context=t,this._k=(1-e)/6}vs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:bs(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ss=function t(e){function r(t){return new vs(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Ts(t,e,r){var i=t._x1,n=t._y1,a=t._x2,o=t._y2;if(t._l01_a>$o){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,n=(n*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>$o){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*h+t._x1*t._l23_2a-e*t._l12_2a)/c,o=(o*h+t._y1*t._l23_2a-r*t._l12_2a)/c}t._context.bezierCurveTo(i,n,a,o,t._x2,t._y2)}function As(t,e){this._context=t,this._alpha=e}As.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Ts(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ms=function t(e){function r(t){return e?new As(t,e):new ks(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Bs(t,e){this._context=t,this._alpha=e}Bs.prototype={areaStart:os,areaEnd:os,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ts(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ls=function t(e){function r(t){return e?new Bs(t,e):new ws(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Fs(t,e){this._context=t,this._alpha=e}Fs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ts(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $s=function t(e){function r(t){return e?new Fs(t,e):new vs(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Es(t){this._context=t}function Ds(t){return new Es(t)}function Os(t){return t<0?-1:1}function Rs(t,e,r){var i=t._x1-t._x0,n=e-t._x1,a=(t._y1-t._y0)/(i||n<0&&-0),o=(r-t._y1)/(n||i<0&&-0),s=(a*n+o*i)/(i+n);return(Os(a)+Os(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Ks(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Is(t,e,r){var i=t._x0,n=t._y0,a=t._x1,o=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,n+s*e,a-s,o-s*r,a,o)}function Ns(t){this._context=t}function Ps(t){this._context=new zs(t)}function zs(t){this._context=t}function qs(t){return new Ns(t)}function Ws(t){return new Ps(t)}function js(t){this._context=t}function Hs(t){var e,r,i=t.length-1,n=new Array(i),a=new Array(i),o=new Array(i);for(n[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<i-1;++e)n[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(n[i-1]=2,a[i-1]=7,o[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)r=n[e]/a[e-1],a[e]-=r,o[e]-=r*o[e-1];for(n[i-1]=o[i-1]/a[i-1],e=i-2;e>=0;--e)n[e]=(o[e]-n[e+1])/a[e];for(a[i-1]=(t[i]+n[i-1])/2,e=0;e<i-1;++e)a[e]=2*t[e+1]-n[e+1];return[n,a]}function Us(t){return new js(t)}function Ys(t,e){this._context=t,this._t=e}function Gs(t){return new Ys(t,.5)}function Xs(t){return new Ys(t,0)}function Vs(t){return new Ys(t,1)}function Zs(t,e,r){this.k=t,this.x=e,this.y=r}Es.prototype={areaStart:os,areaEnd:os,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Ns.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Is(this,this._t0,Ks(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Is(this,Ks(this,r=Rs(this,t,e)),r);break;default:Is(this,this._t0,r=Rs(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}},(Ps.prototype=Object.create(Ns.prototype)).point=function(t,e){Ns.prototype.point.call(this,e,t)},zs.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,n,a){this._context.bezierCurveTo(e,t,i,r,a,n)}},js.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===r)this._context.lineTo(t[1],e[1]);else for(var i=Hs(t),n=Hs(e),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],t[o],e[o]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},Ys.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},Zs.prototype={constructor:Zs,scale:function(t){return 1===t?this:new Zs(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Zs(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new Zs(1,0,0),Zs.prototype},9418(t,e,r){"use strict";r.d(e,{A:()=>rt});const{entries:i,setPrototypeOf:n,isFrozen:a,getPrototypeOf:o,getOwnPropertyDescriptor:s}=Object;let{freeze:l,seal:h,create:c}=Object,{apply:u,construct:d}="undefined"!=typeof Reflect&&Reflect;l||(l=function(t){return t}),h||(h=function(t){return t}),u||(u=function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),n=2;n<r;n++)i[n-2]=arguments[n];return t.apply(e,i)}),d||(d=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return new t(...r)});const p=M(Array.prototype.forEach),f=M(Array.prototype.lastIndexOf),g=M(Array.prototype.pop),y=M(Array.prototype.push),m=M(Array.prototype.splice),x=M(String.prototype.toLowerCase),b=M(String.prototype.toString),k=M(String.prototype.match),C=M(String.prototype.replace),w=M(String.prototype.indexOf),_=M(String.prototype.trim),v=M(Object.prototype.hasOwnProperty),S=M(RegExp.prototype.test),T=(A=TypeError,function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return d(A,e)});var A;function M(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return u(t,e,i)}}function B(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x;n&&n(t,null);let i=e.length;for(;i--;){let n=e[i];if("string"==typeof n){const t=r(n);t!==n&&(a(e)||(e[i]=t),n=t)}t[n]=!0}return t}function L(t){for(let e=0;e<t.length;e++)v(t,e)||(t[e]=null);return t}function F(t){const e=c(null);for(const[r,n]of i(t))v(t,r)&&(Array.isArray(n)?e[r]=L(n):n&&"object"==typeof n&&n.constructor===Object?e[r]=F(n):e[r]=n);return e}function $(t,e){for(;null!==t;){const r=s(t,e);if(r){if(r.get)return M(r.get);if("function"==typeof r.value)return M(r.value)}t=o(t)}return function(){return null}}const E=l(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),O=l(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),R=l(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),K=l(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),N=l(["#text"]),P=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),z=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),q=l(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),W=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),j=h(/\{\{[\w\W]*|[\w\W]*\}\}/gm),H=h(/<%[\w\W]*|[\w\W]*%>/gm),U=h(/\$\{[\w\W]*/gm),Y=h(/^data-[\-\w.\u00B7-\uFFFF]+$/),G=h(/^aria-[\-\w]+$/),X=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=h(/^(?:\w+script|data):/i),Z=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Q=h(/^html$/i),J=h(/^[a-z][.\w]*(-[.\w]+)+$/i);var tt=Object.freeze({__proto__:null,ARIA_ATTR:G,ATTR_WHITESPACE:Z,CUSTOM_ELEMENT:J,DATA_ATTR:Y,DOCTYPE_NAME:Q,ERB_EXPR:H,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:V,MUSTACHE_EXPR:j,TMPLIT_EXPR:U});const et=function(){return"undefined"==typeof window?null:window};var rt=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:et();const r=e=>t(e);if(r.version="3.3.3",r.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return r.isSupported=!1,r;let{document:n}=e;const a=n,o=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:h,Node:u,Element:d,NodeFilter:A,NamedNodeMap:M=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:L,DOMParser:j,trustedTypes:H}=e,U=d.prototype,Y=$(U,"cloneNode"),G=$(U,"remove"),V=$(U,"nextSibling"),Z=$(U,"childNodes"),J=$(U,"parentNode");if("function"==typeof h){const t=n.createElement("template");t.content&&t.content.ownerDocument&&(n=t.content.ownerDocument)}let rt,it="";const{implementation:nt,createNodeIterator:at,createDocumentFragment:ot,getElementsByTagName:st}=n,{importNode:lt}=a;let ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof i&&"function"==typeof J&&nt&&void 0!==nt.createHTMLDocument;const{MUSTACHE_EXPR:ct,ERB_EXPR:ut,TMPLIT_EXPR:dt,DATA_ATTR:pt,ARIA_ATTR:ft,IS_SCRIPT_OR_DATA:gt,ATTR_WHITESPACE:yt,CUSTOM_ELEMENT:mt}=tt;let{IS_ALLOWED_URI:xt}=tt,bt=null;const kt=B({},[...E,...D,...O,...K,...N]);let Ct=null;const wt=B({},[...P,...z,...q,...W]);let _t=Object.seal(c(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),vt=null,St=null;const Tt=Object.seal(c(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let At=!0,Mt=!0,Bt=!1,Lt=!0,Ft=!1,$t=!0,Et=!1,Dt=!1,Ot=!1,Rt=!1,Kt=!1,It=!1,Nt=!0,Pt=!1,zt=!0,qt=!1,Wt={},jt=null;const Ht=B({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ut=null;const Yt=B({},["audio","video","img","source","image","track"]);let Gt=null;const Xt=B({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Vt="http://www.w3.org/1998/Math/MathML",Zt="http://www.w3.org/2000/svg",Qt="http://www.w3.org/1999/xhtml";let Jt=Qt,te=!1,ee=null;const re=B({},[Vt,Zt,Qt],b);let ie=B({},["mi","mo","mn","ms","mtext"]),ne=B({},["annotation-xml"]);const ae=B({},["title","style","font","a","script"]);let oe=null;const se=["application/xhtml+xml","text/html"];let le=null,he=null;const ce=n.createElement("form"),ue=function(t){return t instanceof RegExp||t instanceof Function},de=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!he||he!==t){if(t&&"object"==typeof t||(t={}),t=F(t),oe=-1===se.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,le="application/xhtml+xml"===oe?b:x,bt=v(t,"ALLOWED_TAGS")?B({},t.ALLOWED_TAGS,le):kt,Ct=v(t,"ALLOWED_ATTR")?B({},t.ALLOWED_ATTR,le):wt,ee=v(t,"ALLOWED_NAMESPACES")?B({},t.ALLOWED_NAMESPACES,b):re,Gt=v(t,"ADD_URI_SAFE_ATTR")?B(F(Xt),t.ADD_URI_SAFE_ATTR,le):Xt,Ut=v(t,"ADD_DATA_URI_TAGS")?B(F(Yt),t.ADD_DATA_URI_TAGS,le):Yt,jt=v(t,"FORBID_CONTENTS")?B({},t.FORBID_CONTENTS,le):Ht,vt=v(t,"FORBID_TAGS")?B({},t.FORBID_TAGS,le):F({}),St=v(t,"FORBID_ATTR")?B({},t.FORBID_ATTR,le):F({}),Wt=!!v(t,"USE_PROFILES")&&t.USE_PROFILES,At=!1!==t.ALLOW_ARIA_ATTR,Mt=!1!==t.ALLOW_DATA_ATTR,Bt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Lt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Ft=t.SAFE_FOR_TEMPLATES||!1,$t=!1!==t.SAFE_FOR_XML,Et=t.WHOLE_DOCUMENT||!1,Rt=t.RETURN_DOM||!1,Kt=t.RETURN_DOM_FRAGMENT||!1,It=t.RETURN_TRUSTED_TYPE||!1,Ot=t.FORCE_BODY||!1,Nt=!1!==t.SANITIZE_DOM,Pt=t.SANITIZE_NAMED_PROPS||!1,zt=!1!==t.KEEP_CONTENT,qt=t.IN_PLACE||!1,xt=t.ALLOWED_URI_REGEXP||X,Jt=t.NAMESPACE||Qt,ie=t.MATHML_TEXT_INTEGRATION_POINTS||ie,ne=t.HTML_INTEGRATION_POINTS||ne,_t=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ue(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_t.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ue(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_t.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(_t.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ft&&(Mt=!1),Kt&&(Rt=!0),Wt&&(bt=B({},N),Ct=c(null),!0===Wt.html&&(B(bt,E),B(Ct,P)),!0===Wt.svg&&(B(bt,D),B(Ct,z),B(Ct,W)),!0===Wt.svgFilters&&(B(bt,O),B(Ct,z),B(Ct,W)),!0===Wt.mathMl&&(B(bt,K),B(Ct,q),B(Ct,W))),v(t,"ADD_TAGS")||(Tt.tagCheck=null),v(t,"ADD_ATTR")||(Tt.attributeCheck=null),t.ADD_TAGS&&("function"==typeof t.ADD_TAGS?Tt.tagCheck=t.ADD_TAGS:(bt===kt&&(bt=F(bt)),B(bt,t.ADD_TAGS,le))),t.ADD_ATTR&&("function"==typeof t.ADD_ATTR?Tt.attributeCheck=t.ADD_ATTR:(Ct===wt&&(Ct=F(Ct)),B(Ct,t.ADD_ATTR,le))),t.ADD_URI_SAFE_ATTR&&B(Gt,t.ADD_URI_SAFE_ATTR,le),t.FORBID_CONTENTS&&(jt===Ht&&(jt=F(jt)),B(jt,t.FORBID_CONTENTS,le)),t.ADD_FORBID_CONTENTS&&(jt===Ht&&(jt=F(jt)),B(jt,t.ADD_FORBID_CONTENTS,le)),zt&&(bt["#text"]=!0),Et&&B(bt,["html","head","body"]),bt.table&&(B(bt,["tbody"]),delete vt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');rt=t.TRUSTED_TYPES_POLICY,it=rt.createHTML("")}else void 0===rt&&(rt=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const n="dompurify"+(r?"#"+r:"");try{return t.createPolicy(n,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+n+" could not be created."),null}}(H,o)),null!==rt&&"string"==typeof it&&(it=rt.createHTML(""));l&&l(t),he=t}},pe=B({},[...D,...O,...R]),fe=B({},[...K,...I]),ge=function(t){y(r.removed,{element:t});try{J(t).removeChild(t)}catch(e){G(t)}},ye=function(t,e){try{y(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){y(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(Rt||Kt)try{ge(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},me=function(t){let e=null,r=null;if(Ot)t="<remove></remove>"+t;else{const e=k(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===oe&&Jt===Qt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const i=rt?rt.createHTML(t):t;if(Jt===Qt)try{e=(new j).parseFromString(i,oe)}catch(t){}if(!e||!e.documentElement){e=nt.createDocument(Jt,"template",null);try{e.documentElement.innerHTML=te?it:i}catch(t){}}const a=e.body||e.documentElement;return t&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Jt===Qt?st.call(e,Et?"html":"body")[0]:Et?e.documentElement:a},xe=function(t){return at.call(t.ownerDocument||t,t,A.SHOW_ELEMENT|A.SHOW_COMMENT|A.SHOW_TEXT|A.SHOW_PROCESSING_INSTRUCTION|A.SHOW_CDATA_SECTION,null)},be=function(t){return t instanceof L&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof M)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},ke=function(t){return"function"==typeof u&&t instanceof u};function Ce(t,e,i){p(t,t=>{t.call(r,e,i,he)})}const we=function(t){let e=null;if(Ce(ht.beforeSanitizeElements,t,null),be(t))return ge(t),!0;const i=le(t.nodeName);if(Ce(ht.uponSanitizeElement,t,{tagName:i,allowedTags:bt}),$t&&t.hasChildNodes()&&!ke(t.firstElementChild)&&S(/<[/\w!]/g,t.innerHTML)&&S(/<[/\w!]/g,t.textContent))return ge(t),!0;if(7===t.nodeType)return ge(t),!0;if($t&&8===t.nodeType&&S(/<[/\w]/g,t.data))return ge(t),!0;if(!(Tt.tagCheck instanceof Function&&Tt.tagCheck(i))&&(!bt[i]||vt[i])){if(!vt[i]&&ve(i)){if(_t.tagNameCheck instanceof RegExp&&S(_t.tagNameCheck,i))return!1;if(_t.tagNameCheck instanceof Function&&_t.tagNameCheck(i))return!1}if(zt&&!jt[i]){const e=J(t)||t.parentNode,r=Z(t)||t.childNodes;if(r&&e)for(let i=r.length-1;i>=0;--i){const n=Y(r[i],!0);n.__removalCount=(t.__removalCount||0)+1,e.insertBefore(n,V(t))}}return ge(t),!0}return t instanceof d&&!function(t){let e=J(t);e&&e.tagName||(e={namespaceURI:Jt,tagName:"template"});const r=x(t.tagName),i=x(e.tagName);return!!ee[t.namespaceURI]&&(t.namespaceURI===Zt?e.namespaceURI===Qt?"svg"===r:e.namespaceURI===Vt?"svg"===r&&("annotation-xml"===i||ie[i]):Boolean(pe[r]):t.namespaceURI===Vt?e.namespaceURI===Qt?"math"===r:e.namespaceURI===Zt?"math"===r&&ne[i]:Boolean(fe[r]):t.namespaceURI===Qt?!(e.namespaceURI===Zt&&!ne[i])&&!(e.namespaceURI===Vt&&!ie[i])&&!fe[r]&&(ae[r]||!pe[r]):!("application/xhtml+xml"!==oe||!ee[t.namespaceURI]))}(t)?(ge(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!S(/<\/no(script|embed|frames)/i,t.innerHTML)?(Ft&&3===t.nodeType&&(e=t.textContent,p([ct,ut,dt],t=>{e=C(e,t," ")}),t.textContent!==e&&(y(r.removed,{element:t.cloneNode()}),t.textContent=e)),Ce(ht.afterSanitizeElements,t,null),!1):(ge(t),!0)},_e=function(t,e,r){if(St[e])return!1;if(Nt&&("id"===e||"name"===e)&&(r in n||r in ce))return!1;if(Mt&&!St[e]&&S(pt,e));else if(At&&S(ft,e));else if(Tt.attributeCheck instanceof Function&&Tt.attributeCheck(e,t));else if(!Ct[e]||St[e]){if(!(ve(t)&&(_t.tagNameCheck instanceof RegExp&&S(_t.tagNameCheck,t)||_t.tagNameCheck instanceof Function&&_t.tagNameCheck(t))&&(_t.attributeNameCheck instanceof RegExp&&S(_t.attributeNameCheck,e)||_t.attributeNameCheck instanceof Function&&_t.attributeNameCheck(e,t))||"is"===e&&_t.allowCustomizedBuiltInElements&&(_t.tagNameCheck instanceof RegExp&&S(_t.tagNameCheck,r)||_t.tagNameCheck instanceof Function&&_t.tagNameCheck(r))))return!1}else if(Gt[e]);else if(S(xt,C(r,yt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==w(r,"data:")||!Ut[t])if(Bt&&!S(gt,C(r,yt,"")));else if(r)return!1;return!0},ve=function(t){return"annotation-xml"!==t&&k(t,mt)},Se=function(t){Ce(ht.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||be(t))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ct,forceKeepAttr:void 0};let n=e.length;for(;n--;){const a=e[n],{name:o,namespaceURI:s,value:l}=a,h=le(o),c=l;let u="value"===o?c:_(c);if(i.attrName=h,i.attrValue=u,i.keepAttr=!0,i.forceKeepAttr=void 0,Ce(ht.uponSanitizeAttribute,t,i),u=i.attrValue,!Pt||"id"!==h&&"name"!==h||(ye(o,t),u="user-content-"+u),$t&&S(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){ye(o,t);continue}if("attributename"===h&&k(u,"href")){ye(o,t);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){ye(o,t);continue}if(!Lt&&S(/\/>/i,u)){ye(o,t);continue}Ft&&p([ct,ut,dt],t=>{u=C(u,t," ")});const d=le(t.nodeName);if(_e(d,h,u)){if(rt&&"object"==typeof H&&"function"==typeof H.getAttributeType)if(s);else switch(H.getAttributeType(d,h)){case"TrustedHTML":u=rt.createHTML(u);break;case"TrustedScriptURL":u=rt.createScriptURL(u)}if(u!==c)try{s?t.setAttributeNS(s,o,u):t.setAttribute(o,u),be(t)?ge(t):g(r.removed)}catch(e){ye(o,t)}}else ye(o,t)}Ce(ht.afterSanitizeAttributes,t,null)},Te=function t(e){let r=null;const i=xe(e);for(Ce(ht.beforeSanitizeShadowDOM,e,null);r=i.nextNode();)Ce(ht.uponSanitizeShadowNode,r,null),we(r),Se(r),r.content instanceof s&&t(r.content);Ce(ht.afterSanitizeShadowDOM,e,null)};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,n=null,o=null,l=null;if(te=!t,te&&(t="\x3c!--\x3e"),"string"!=typeof t&&!ke(t)){if("function"!=typeof t.toString)throw T("toString is not a function");if("string"!=typeof(t=t.toString()))throw T("dirty is not a string, aborting")}if(!r.isSupported)return t;if(Dt||de(e),r.removed=[],"string"==typeof t&&(qt=!1),qt){if(t.nodeName){const e=le(t.nodeName);if(!bt[e]||vt[e])throw T("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof u)i=me("\x3c!----\x3e"),n=i.ownerDocument.importNode(t,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?i=n:i.appendChild(n);else{if(!Rt&&!Ft&&!Et&&-1===t.indexOf("<"))return rt&&It?rt.createHTML(t):t;if(i=me(t),!i)return Rt?null:It?it:""}i&&Ot&&ge(i.firstChild);const h=xe(qt?t:i);for(;o=h.nextNode();)we(o),Se(o),o.content instanceof s&&Te(o.content);if(qt)return t;if(Rt){if(Kt)for(l=ot.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(Ct.shadowroot||Ct.shadowrootmode)&&(l=lt.call(a,l,!0)),l}let c=Et?i.outerHTML:i.innerHTML;return Et&&bt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&S(Q,i.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+c),Ft&&p([ct,ut,dt],t=>{c=C(c,t," ")}),rt&&It?rt.createHTML(c):c},r.setConfig=function(){de(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Dt=!0},r.clearConfig=function(){he=null,Dt=!1},r.isValidAttribute=function(t,e,r){he||de({});const i=le(t),n=le(e);return _e(i,n,r)},r.addHook=function(t,e){"function"==typeof e&&y(ht[t],e)},r.removeHook=function(t,e){if(void 0!==e){const r=f(ht[t],e);return-1===r?void 0:m(ht[t],r,1)[0]}return g(ht[t])},r.removeHooks=function(t){ht[t]=[]},r.removeAllHooks=function(){ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}()},7266(t,e,r){"use strict";r.d(e,{A:()=>o});var i=r(6309),n=r(3122);const a=class{constructor(){this.type=n.Z.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=n.Z.ALL}is(t){return this.type===t}},o=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=n.Z.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=i.A.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=i.A.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=i.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=i.A.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=i.A.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=i.A.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},1931(t,e,r){"use strict";r.d(e,{A:()=>g});var i=r(7266),n=r(3122);const a={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(a.re);if(!e)return;const r=e[1],n=parseInt(r,16),o=r.length,s=o%4==0,l=o>4,h=l?1:17,c=l?8:4,u=s?0:-1,d=l?255:15;return i.A.set({r:(n>>c*(u+3)&d)*h,g:(n>>c*(u+2)&d)*h,b:(n>>c*(u+1)&d)*h,a:s?(n&d)*h/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a}=t;return a<1?`#${n.Y[Math.round(e)]}${n.Y[Math.round(r)]}${n.Y[Math.round(i)]}${n.Y[Math.round(255*a)]}`:`#${n.Y[Math.round(e)]}${n.Y[Math.round(r)]}${n.Y[Math.round(i)]}`}},o=a;var s=r(6309);const l={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(l.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return s.A.channel.clamp.h(.9*parseFloat(t));case"rad":return s.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return s.A.channel.clamp.h(360*parseFloat(t))}}return s.A.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(l.re);if(!r)return;const[,n,a,o,h,c]=r;return i.A.set({h:l._hue2deg(n),s:s.A.channel.clamp.s(parseFloat(a)),l:s.A.channel.clamp.l(parseFloat(o)),a:h?s.A.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:n}=t;return n<1?`hsla(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%, ${n})`:`hsl(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%)`}},h=l,c={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=c.colors[t];if(e)return o.parse(e)},stringify:t=>{const e=o.stringify(t);for(const t in c.colors)if(c.colors[t]===e)return t}},u=c,d={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(d.re);if(!r)return;const[,n,a,o,l,h,c,u,p]=r;return i.A.set({r:s.A.channel.clamp.r(a?2.55*parseFloat(n):parseFloat(n)),g:s.A.channel.clamp.g(l?2.55*parseFloat(o):parseFloat(o)),b:s.A.channel.clamp.b(c?2.55*parseFloat(h):parseFloat(h)),a:u?s.A.channel.clamp.a(p?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`rgba(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)}, ${s.A.lang.round(n)})`:`rgb(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)})`}},p=d,f={format:{keyword:c,hex:o,rgb:d,rgba:d,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=o.parse(t)||p.parse(t)||h.parse(t)||u.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(n.Z.HSL)||void 0===t.data.r?h.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?p.stringify(t):o.stringify(t)},g=f},3122(t,e,r){"use strict";r.d(e,{Y:()=>n,Z:()=>a});var i=r(6309);const n={};for(let t=0;t<=255;t++)n[t]=i.A.unit.dec2hex(t);const a={ALL:0,RGB:1,HSL:2}},5635(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(6309),n=r(1931);const a=(t,e,r)=>{const a=n.A.parse(t),o=a[e],s=i.A.channel.clamp[e](o+r);return o!==s&&(a[e]=s),n.A.stringify(a)}},8232(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(6309),n=r(1931);const a=(t,e)=>{const r=n.A.parse(t);for(const t in e)r[t]=i.A.channel.clamp[t](e[t]);return n.A.stringify(r)}},5263(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(5635);const n=(t,e)=>(0,i.A)(t,"l",-e)},5097(t,e,r){"use strict";r.d(e,{A:()=>o});var i=r(6309),n=r(1931);const a=t=>(t=>{const{r:e,g:r,b:a}=n.A.parse(t),o=.2126*i.A.channel.toLinear(e)+.7152*i.A.channel.toLinear(r)+.0722*i.A.channel.toLinear(a);return i.A.lang.round(o)})(t)>=.5,o=t=>!a(t)},8041(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(5635);const n=(t,e)=>(0,i.A)(t,"l",e)},5582(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r(6309),n=r(7266),a=r(1931),o=r(8232);const s=(t,e,r=0,s=1)=>{if("number"!=typeof t)return(0,o.A)(t,{a:e});const l=n.A.set({r:i.A.channel.clamp.r(t),g:i.A.channel.clamp.g(e),b:i.A.channel.clamp.b(r),a:i.A.channel.clamp.a(s)});return a.A.stringify(l)}},6309(t,e,r){"use strict";r.d(e,{A:()=>n});const i={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return 2.55*r;t/=360,e/=100;const a=(r/=100)<.5?r*(1+e):r+e-r*e,o=2*r-a;switch(n){case"r":return 255*i.hue2rgb(o,a,t+1/3);case"g":return 255*i.hue2rgb(o,a,t);case"b":return 255*i.hue2rgb(o,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const n=Math.max(t,e,r),a=Math.min(t,e,r),o=(n+a)/2;if("l"===i)return 100*o;if(n===a)return 0;const s=n-a;if("s"===i)return 100*(o>.5?s/(2-n-a):s/(n+a));switch(n){case t:return 60*((e-r)/s+(e<r?6:0));case e:return 60*((r-t)/s+2);case r:return 60*((t-e)/s+4);default:return-1}}},n={channel:i,lang:{clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},4098(t,e,r){"use strict";r.d(e,{C0:()=>m,xA:()=>nt,hH:()=>v,Dl:()=>Dt,IU:()=>Zt,Wt:()=>Ut,Y2:()=>Kt,a$:()=>Pt,sb:()=>H,ME:()=>le,UI:()=>q,Ch:()=>b,mW:()=>x,DB:()=>g,_3:()=>U,EJ:()=>f,m7:()=>ee,iN:()=>Jt,zj:()=>rt,D7:()=>oe,Gs:()=>fe,J$:()=>w,ab:()=>ie,E:()=>ut,Q2:()=>tt,P$:()=>E,ID:()=>vt,TM:()=>ct,Wi:()=>Et,H1:()=>dt,QO:()=>At,Js:()=>pe,Xd:()=>k,dj:()=>Rt,cL:()=>at,$i:()=>W,jZ:()=>xt,oB:()=>he,wZ:()=>Q,EI:()=>te,SV:()=>Qt,Nk:()=>et,XV:()=>se,ke:()=>re,UU:()=>Z,ot:()=>zt,mj:()=>ce,tM:()=>Ht,H$:()=>K,B6:()=>J});var i=r(797),n=r(1931),a=r(8232);const o=(t,e)=>{const r=n.A.parse(t),i={};for(const t in e)e[t]&&(i[t]=r[t]+e[t]);return(0,a.A)(t,i)};var s=r(5582);const l=(t,e=100)=>{const r=n.A.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((t,e,r=50)=>{const{r:i,g:a,b:o,a:l}=n.A.parse(t),{r:h,g:c,b:u,a:d}=n.A.parse(e),p=r/100,f=2*p-1,g=l-d,y=((f*g===-1?f:(f+g)/(1+f*g))+1)/2,m=1-y,x=i*y+h*m,b=a*y+c*m,k=o*y+u*m,C=l*p+d*(1-p);return(0,s.A)(x,b,k,C)})(r,t,e)};var h,c=r(5263),u=r(8041),d=r(5097),p=r(9418),f=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,g=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,y=/\s*%%.*\n/gm,m=class extends Error{static{(0,i.K2)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},x={},b=(0,i.K2)(function(t,e){t=t.replace(f,"").replace(g,"").replace(y,"\n");for(const[r,{detector:i}]of Object.entries(x))if(i(t,e))return r;throw new m(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),k=(0,i.K2)((...t)=>{for(const{id:e,detector:r,loader:i}of t)C(e,r,i)},"registerLazyLoadedDiagrams"),C=(0,i.K2)((t,e,r)=>{x[t]&&i.Rm.warn(`Detector with key ${t} already exists. Overwriting.`),x[t]={detector:e,loader:r},i.Rm.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),w=(0,i.K2)(t=>x[t].loader,"getDiagramLoader"),_=(0,i.K2)((t,e,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(e=>_(t,e,n)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach(n=>{"object"!=typeof e[n]||null===e[n]||void 0!==t[n]&&"object"!=typeof t[n]?(i||"object"!=typeof t[n]&&"object"!=typeof e[n])&&(t[n]=e[n]):(void 0===t[n]&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=_(t[n],e[n],{depth:r-1,clobber:i}))}),t)},"assignWithDepth"),v=_,S="#ffffff",T="#f2f2f2",A=(0,i.K2)((t,e)=>o(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),M=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||l(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||l(this.tertiaryColor),this.lineColor=this.lineColor||l(this.background),this.arrowheadColor=this.arrowheadColor||l(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,c.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,c.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||l(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||(0,c.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,c.A)(this.mainBkg,10)):(this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,c.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,c.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||l(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,c.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||o(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||o(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||o(this.primaryColor,{h:64}),this.fillType3=this.fillType3||o(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||o(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||o(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||o(this.primaryColor,{h:128}),this.fillType7=this.fillType7||o(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||o(this.primaryColor,{l:-10}),this.pie5=this.pie5||o(this.secondaryColor,{l:-10}),this.pie6=this.pie6||o(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||o(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||o(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??o(this.primaryColor,{l:-30}),this.venn2=this.venn2??o(this.secondaryColor,{l:-30}),this.venn3=this.venn3??o(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??o(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??o(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??o(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??o(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??o(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,d.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,c.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,c.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||o(this.primaryColor,{h:-30}),this.git4=this.git4||o(this.primaryColor,{h:-60}),this.git5=this.git5||o(this.primaryColor,{h:-90}),this.git6=this.git6||o(this.primaryColor,{h:60}),this.git7=this.git7||o(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)):(this.git0=(0,c.A)(this.git0,25),this.git1=(0,c.A)(this.git1,25),this.git2=(0,c.A)(this.git2,25),this.git3=(0,c.A)(this.git3,25),this.git4=(0,c.A)(this.git4,25),this.git5=(0,c.A)(this.git5,25),this.git6=(0,c.A)(this.git6,25),this.git7=(0,c.A)(this.git7,25)),this.gitInv0=this.gitInv0||l(this.git0),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||T}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},B=(0,i.K2)(t=>{const e=new M;return e.calculate(t),e},"getThemeVariables"),L=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,u.A)(this.primaryColor,16),this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=l(this.background),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.tertiaryColor),this.lineColor=l(this.background),this.textColor=l(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,u.A)(l("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,s.A)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=(0,c.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,c.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,s.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,s.A)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,c.A)(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,u.A)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=(0,u.A)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,u.A)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=l(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||l(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{h:30,s:-30,l:-(4*t-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??(0,u.A)(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,d.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,c.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,c.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,u.A)(this.secondaryColor,20),this.git1=(0,u.A)(this.pie2||this.secondaryColor,20),this.git2=(0,u.A)(this.pie3||this.tertiaryColor,20),this.git3=(0,u.A)(this.pie4||o(this.primaryColor,{h:-30}),20),this.git4=(0,u.A)(this.pie5||o(this.primaryColor,{h:-60}),20),this.git5=(0,u.A)(this.pie6||o(this.primaryColor,{h:-90}),10),this.git6=(0,u.A)(this.pie7||o(this.primaryColor,{h:60}),10),this.git7=(0,u.A)(this.pie8||o(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||l(this.git0),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||l(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||l(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||(0,u.A)(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||(0,u.A)(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},F=(0,i.K2)(t=>{const e=new L;return e.calculate(t),e},"getThemeVariables"),$=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=o(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.tertiaryColor),this.lineColor=l(this.background),this.textColor=l(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=(0,s.A)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,c.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,c.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,c.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,c.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||o(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{h:30,l:-(7+5*t)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||l(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||l(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=(0,u.A)(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,u.A)(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||o(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||o(this.primaryColor,{l:-10}),this.pie5=this.pie5||o(this.secondaryColor,{l:-30}),this.pie6=this.pie6||o(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||o(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||o(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??o(this.primaryColor,{l:-30}),this.venn2=this.venn2??o(this.secondaryColor,{l:-30}),this.venn3=this.venn3??o(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??o(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??o(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??o(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??o(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??o(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,d.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,c.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||o(this.primaryColor,{h:-30}),this.git4=this.git4||o(this.primaryColor,{h:-60}),this.git5=this.git5||o(this.primaryColor,{h:-90}),this.git6=this.git6||o(this.primaryColor,{h:60}),this.git7=this.git7||o(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)):(this.git0=(0,c.A)(this.git0,25),this.git1=(0,c.A)(this.git1,25),this.git2=(0,c.A)(this.git2,25),this.git3=(0,c.A)(this.git3,25),this.git4=(0,c.A)(this.git4,25),this.git5=(0,c.A)(this.git5,25),this.git6=(0,c.A)(this.git6,25),this.git7=(0,c.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,c.A)(l(this.git0),25),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||l(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||l(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||T}calculate(t){if(Object.keys(this).forEach(t=>{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},E=(0,i.K2)(t=>{const e=new $;return e.calculate(t),e},"getThemeVariables"),D=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,u.A)("#cde498",10),this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.primaryColor),this.lineColor=l(this.background),this.textColor=l(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=(0,c.A)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,c.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,c.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,c.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,c.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||o(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||o(this.primaryColor,{l:-30}),this.pie5=this.pie5||o(this.secondaryColor,{l:-30}),this.pie6=this.pie6||o(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||o(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||o(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??o(this.primaryColor,{l:-30}),this.venn2=this.venn2??o(this.secondaryColor,{l:-30}),this.venn3=this.venn3??o(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??o(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??o(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??o(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??o(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??o(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,d.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,c.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||o(this.primaryColor,{h:-30}),this.git4=this.git4||o(this.primaryColor,{h:-60}),this.git5=this.git5||o(this.primaryColor,{h:-90}),this.git6=this.git6||o(this.primaryColor,{h:60}),this.git7=this.git7||o(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)):(this.git0=(0,c.A)(this.git0,25),this.git1=(0,c.A)(this.git1,25),this.git2=(0,c.A)(this.git2,25),this.git3=(0,c.A)(this.git3,25),this.git4=(0,c.A)(this.git4,25),this.git5=(0,c.A)(this.git5,25),this.git6=(0,c.A)(this.git6,25),this.git7=(0,c.A)(this.git7,25)),this.gitInv0=this.gitInv0||l(this.git0),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||l(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||l(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||T}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},O=(0,i.K2)(t=>{const e=new D;return e.calculate(t),e},"getThemeVariables"),R=class{static{(0,i.K2)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,u.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.tertiaryColor),this.lineColor=l(this.background),this.textColor=l(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=(0,u.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,u.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||l(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,c.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=(0,u.A)(this.contrast,30),this.sectionBkgColor2=(0,u.A)(this.contrast,30),this.taskBorderColor=(0,c.A)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=(0,u.A)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=(0,c.A)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,d.A)(this.quadrant1Fill)?(0,u.A)(this.quadrant1Fill):(0,c.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,c.A)(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||o(this.primaryColor,{h:-30}),this.git4=this.pie5||o(this.primaryColor,{h:-60}),this.git5=this.pie6||o(this.primaryColor,{h:-90}),this.git6=this.pie7||o(this.primaryColor,{h:60}),this.git7=this.pie8||o(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||l(this.git0),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||T}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},K={base:{getThemeVariables:B},dark:{getThemeVariables:F},default:{getThemeVariables:E},forest:{getThemeVariables:O},neutral:{getThemeVariables:(0,i.K2)(t=>{const e=new R;return e.calculate(t),e},"getThemeVariables")}},I={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},N={...I,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:K.default.getThemeVariables(),sequence:{...I.sequence,messageFont:(0,i.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:(0,i.K2)(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:(0,i.K2)(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...I.gantt,tickInterval:void 0,useWidth:void 0},c4:{...I.c4,useWidth:void 0,personFont:(0,i.K2)(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...I.flowchart,inheritDir:!1},external_personFont:(0,i.K2)(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:(0,i.K2)(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:(0,i.K2)(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:(0,i.K2)(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:(0,i.K2)(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:(0,i.K2)(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:(0,i.K2)(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:(0,i.K2)(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:(0,i.K2)(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:(0,i.K2)(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:(0,i.K2)(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:(0,i.K2)(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:(0,i.K2)(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:(0,i.K2)(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:(0,i.K2)(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:(0,i.K2)(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:(0,i.K2)(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:(0,i.K2)(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:(0,i.K2)(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:(0,i.K2)(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:(0,i.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...I.pie,useWidth:984},xyChart:{...I.xyChart,useWidth:void 0},requirement:{...I.requirement,useWidth:void 0},packet:{...I.packet},radar:{...I.radar},ishikawa:{...I.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...I.venn}},P=(0,i.K2)((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...P(t[i],"")]:[...r,e+i],[]),"keyify"),z=new Set(P(N,"")),q=N,W=(0,i.K2)(t=>{if(i.Rm.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>W(t));else{for(const e of Object.keys(t)){if(i.Rm.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!z.has(e)||null==t[e]){i.Rm.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){i.Rm.debug("sanitizing object",e),W(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(i.Rm.debug("sanitizing css option",e),t[e]=j(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}i.Rm.debug("After sanitization",t)}},"sanitizeDirective"),j=(0,i.K2)(t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?e++:"}"===i&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),H=Object.freeze(q),U=(0,i.K2)(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),Y=v({},H),G=[],X=v({},H),V=(0,i.K2)((t,e)=>{let r=v({},t),i={};for(const t of e)it(t),i=v(i,t);if(r=v(r,i),i.theme&&i.theme in K){const t=v({},h),e=v(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in K&&(r.themeVariables=K[r.theme].getThemeVariables(e))}return ht(X=r),X},"updateCurrentConfig"),Z=(0,i.K2)(t=>(Y=v({},H),Y=v(Y,t),t.theme&&K[t.theme]&&(Y.themeVariables=K[t.theme].getThemeVariables(t.themeVariables)),V(Y,G),Y),"setSiteConfig"),Q=(0,i.K2)(t=>{h=v({},t)},"saveConfigFromInitialize"),J=(0,i.K2)(t=>(Y=v(Y,t),V(Y,G),Y),"updateSiteConfig"),tt=(0,i.K2)(()=>v({},Y),"getSiteConfig"),et=(0,i.K2)(t=>(ht(t),v(X,t),rt()),"setConfig"),rt=(0,i.K2)(()=>v({},X),"getConfig"),it=(0,i.K2)(t=>{t&&(["secure",...Y.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(i.Rm.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&it(t[e])}))},"sanitize"),nt=(0,i.K2)(t=>{W(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),G.push(t),V(Y,G)},"addDirective"),at=(0,i.K2)((t=Y)=>{V(t,G=[])},"reset"),ot={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},st={},lt=(0,i.K2)(t=>{st[t]||(i.Rm.warn(ot[t]),st[t]=!0)},"issueWarning"),ht=(0,i.K2)(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&<("LAZY_LOAD_DEPRECATED")},"checkConfig"),ct=(0,i.K2)(()=>{let t={};h&&(t=v(t,h));for(const e of G)t=v(t,e);return t},"getUserDefinedConfig"),ut=(0,i.K2)(t=>(null!=t.flowchart?.htmlLabels&<("FLOWCHART_HTML_LABELS_DEPRECATED"),U(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),dt=/<br\s*\/?>/gi,pt=(0,i.K2)(t=>t?_t(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),ft=(()=>{let t=!1;return()=>{t||(gt(),t=!0)}})();function gt(){const t="data-temp-href-target";p.A.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),p.A.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}(0,i.K2)(gt,"setupDompurifyHooks");var yt=(0,i.K2)(t=>(ft(),p.A.sanitize(t)),"removeScript"),mt=(0,i.K2)((t,e)=>{if(ut(e)){const r=e.securityLevel;"antiscript"===r||"strict"===r||"sandbox"===r?t=yt(t):"loose"!==r&&(t=(t=(t=_t(t)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),t=wt(t))}return t},"sanitizeMore"),xt=(0,i.K2)((t,e)=>t?t=e.dompurifyConfig?p.A.sanitize(mt(t,e),e.dompurifyConfig).toString():p.A.sanitize(mt(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),bt=(0,i.K2)((t,e)=>"string"==typeof t?xt(t,e):t.flat().map(t=>xt(t,e)),"sanitizeTextOrArray"),kt=(0,i.K2)(t=>dt.test(t),"hasBreaks"),Ct=(0,i.K2)(t=>t.split(dt),"splitBreaks"),wt=(0,i.K2)(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),_t=(0,i.K2)(t=>t.replace(dt,"#br#"),"breakToPlaceholder"),vt=(0,i.K2)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),St=(0,i.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),Tt=(0,i.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),At=(0,i.K2)(function(t){const e=t.split(/(,)/),r=[];for(let t=0;t<e.length;t++){let i=e[t];if(","===i&&t>0&&t+1<e.length){const n=e[t-1],a=e[t+1];Bt(n,a)&&(i=n+","+a,t++,r.pop())}r.push(Lt(i))}return r.join("")},"parseGenericTypes"),Mt=(0,i.K2)((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),Bt=(0,i.K2)((t,e)=>{const r=Mt(t,"~"),i=Mt(e,"~");return 1===r&&1===i},"shouldCombineSets"),Lt=(0,i.K2)(t=>{const e=Mt(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;-1!==n&&-1!==a&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Ft=(0,i.K2)(()=>void 0!==window.MathMLElement,"isMathMLSupported"),$t=/\$\$(.*)\$\$/g,Et=(0,i.K2)(t=>(t.match($t)?.length??0)>0,"hasKatex"),Dt=(0,i.K2)(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await Rt(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),Ot=(0,i.K2)(async(t,e)=>{if(!Et(t))return t;if(!(Ft()||e.legacyMathML||e.forceLegacyMathML))return t.replace($t,"MathML is unsupported in this environment.");{const{default:i}=await r.e(130).then(r.bind(r,2130)),n=e.forceLegacyMathML||!Ft()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(dt).map(t=>Et(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace($t,(t,e)=>i.renderToString(e,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Rt=(0,i.K2)(async(t,e)=>xt(await Ot(t,e),e),"renderKatexSanitized"),Kt={getRows:pt,sanitizeText:xt,sanitizeTextOrArray:bt,hasBreaks:kt,splitBreaks:Ct,lineBreakRegex:dt,removeScript:yt,getUrl:vt,evaluate:U,getMax:St,getMin:Tt},It=(0,i.K2)(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),Nt=(0,i.K2)(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),Pt=(0,i.K2)(function(t,e,r,i){const n=Nt(e,r,i);It(t,n)},"configureSvgSize"),zt=(0,i.K2)(function(t,e,r,n){const a=e.node().getBBox(),o=a.width,s=a.height;i.Rm.info(`SVG bounds: ${o}x${s}`,a);let l=0,h=0;i.Rm.info(`Graph bounds: ${l}x${h}`,t),l=o+2*r,h=s+2*r,i.Rm.info(`Calculated bounds: ${l}x${h}`),Pt(e,h,l,n);const c=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;e.attr("viewBox",c)},"setupGraphViewbox"),qt={},Wt=(0,i.K2)((t,e,r)=>{let n="";return t in qt&&qt[t]?n=qt[t](r):i.Rm.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${n}\n\n ${e}\n`},"getStyles"),jt=(0,i.K2)((t,e)=>{void 0!==e&&(qt[t]=e)},"addStylesForDiagram"),Ht=Wt,Ut={};(0,i.VA)(Ut,{clear:()=>Zt,getAccDescription:()=>ee,getAccTitle:()=>Jt,getDiagramTitle:()=>ie,setAccDescription:()=>te,setAccTitle:()=>Qt,setDiagramTitle:()=>re});var Yt="",Gt="",Xt="",Vt=(0,i.K2)(t=>xt(t,rt()),"sanitizeText"),Zt=(0,i.K2)(()=>{Yt="",Xt="",Gt=""},"clear"),Qt=(0,i.K2)(t=>{Yt=Vt(t).replace(/^\s+/g,"")},"setAccTitle"),Jt=(0,i.K2)(()=>Yt,"getAccTitle"),te=(0,i.K2)(t=>{Xt=Vt(t).replace(/\n\s+/g,"\n")},"setAccDescription"),ee=(0,i.K2)(()=>Xt,"getAccDescription"),re=(0,i.K2)(t=>{Gt=Vt(t)},"setDiagramTitle"),ie=(0,i.K2)(()=>Gt,"getDiagramTitle"),ne=i.Rm,ae=i.He,oe=rt,se=et,le=H,he=(0,i.K2)(t=>xt(t,oe()),"sanitizeText"),ce=zt,ue=(0,i.K2)(()=>Ut,"getCommonDb"),de={},pe=(0,i.K2)((t,e,r)=>{de[t]&&ne.warn(`Diagram with id ${t} already registered. Overwriting.`),de[t]=e,r&&C(t,r),jt(t,e.styles),e.injectUtils?.(ne,ae,oe,he,ce,ue(),()=>{})},"registerDiagram"),fe=(0,i.K2)(t=>{if(t in de)return de[t];throw new ge(t)},"getDiagram"),ge=class extends Error{static{(0,i.K2)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},797(t,e,r){"use strict";r.d(e,{He:()=>h,K2:()=>a,Rm:()=>l,VA:()=>o});var i=r(4353),n=Object.defineProperty,a=(t,e)=>n(t,"name",{value:e,configurable:!0}),o=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},s={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:a((...t)=>{},"trace"),debug:a((...t)=>{},"debug"),info:a((...t)=>{},"info"),warn:a((...t)=>{},"warn"),error:a((...t)=>{},"error"),fatal:a((...t)=>{},"fatal")},h=a(function(t="fatal"){let e=s.fatal;"string"==typeof t?t.toLowerCase()in s&&(e=s[t]):"number"==typeof t&&(e=t),l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=s.fatal&&(l.fatal=console.error?console.error.bind(console,c("FATAL"),"color: orange"):console.log.bind(console,"[35m",c("FATAL"))),e<=s.error&&(l.error=console.error?console.error.bind(console,c("ERROR"),"color: orange"):console.log.bind(console,"[31m",c("ERROR"))),e<=s.warn&&(l.warn=console.warn?console.warn.bind(console,c("WARN"),"color: orange"):console.log.bind(console,"[33m",c("WARN"))),e<=s.info&&(l.info=console.info?console.info.bind(console,c("INFO"),"color: lightblue"):console.log.bind(console,"[34m",c("INFO"))),e<=s.debug&&(l.debug=console.debug?console.debug.bind(console,c("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",c("DEBUG"))),e<=s.trace&&(l.trace=console.debug?console.debug.bind(console,c("TRACE"),"color: lightgreen"):console.log.bind(console,"[32m",c("TRACE")))},"setLogLevel"),c=a(t=>`%c${i().format("ss.SSS")} : ${t} : `,"format")},796(t,e,r){"use strict";r.d(e,{$C:()=>M,$t:()=>j,C4:()=>U,I5:()=>W,Ib:()=>y,KL:()=>X,Sm:()=>Y,Un:()=>R,_K:()=>H,bH:()=>E,dq:()=>z,pe:()=>h,rY:()=>G,ru:()=>O,sM:()=>T,vU:()=>f,yT:()=>L});var i=r(4098),n=r(797),a=r(6750),o=r(1444),s=r(104),l=r(5364),h="",c={curveBasis:o.qrM,curveBasisClosed:o.Yu4,curveBasisOpen:o.IA3,curveBumpX:o.Wi0,curveBumpY:o.PGM,curveBundle:o.OEq,curveCardinalClosed:o.olC,curveCardinalOpen:o.IrU,curveCardinal:o.y8u,curveCatmullRomClosed:o.Q7f,curveCatmullRomOpen:o.cVp,curveCatmullRom:o.oDi,curveLinear:o.lUB,curveLinearClosed:o.Lx9,curveMonotoneX:o.nVG,curveMonotoneY:o.uxU,curveNatural:o.Xf2,curveStep:o.GZz,curveStepAfter:o.UPb,curveStepBefore:o.dyv},u=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,d=(0,n.K2)(function(t,e){const r=p(t,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const t=r.map(t=>t.args);(0,i.$i)(t),n=(0,i.hH)(n,[...t])}else n=r.args;if(!n)return;let a=(0,i.Ch)(t,e);const o="config";return void 0!==n[o]&&("flowchart-v2"===a&&(a="flowchart"),n[a]=n[o],delete n[o]),n},"detectInit"),p=(0,n.K2)(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${u.source})(?=[}][%]{2}).*\n`,"ig");let a;t=t.trim().replace(r,"").replace(/'/gm,'"'),n.Rm.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(a=i.DB.exec(t));)if(a.index===i.DB.lastIndex&&i.DB.lastIndex++,a&&!e||e&&a[1]?.match(e)||e&&a[2]?.match(e)){const t=a[1]?a[1]:a[2],e=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(r){return n.Rm.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),f=(0,n.K2)(function(t){return t.replace(i.DB,"")},"removeDirectives"),g=(0,n.K2)(function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function y(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return c[r]??e}function m(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,a.J)(r):r}(0,n.K2)(y,"interpolateToCurve"),(0,n.K2)(m,"formatUrl");var x=(0,n.K2)((t,...e)=>{const r=t.split("."),i=r.length-1,a=r[i];let o=window;for(let e=0;e<i;e++)if(o=o[r[e]],!o)return void n.Rm.error(`Function name: ${t} not found in window`);o[a](...e)},"runFunc");function b(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function k(t){let e,r=0;return t.forEach(t=>{r+=b(t,e),e=t}),_(t,r/2)}function C(t){return 1===t.length?t[0]:k(t)}(0,n.K2)(b,"distance"),(0,n.K2)(k,"traverseEdge"),(0,n.K2)(C,"calcLabelPosition");var w=(0,n.K2)((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),_=(0,n.K2)((t,e)=>{let r,i=e;for(const e of t){if(r){const t=b(e,r);if(0===t)return r;if(t<i)i-=t;else{const n=i/t;if(n<=0)return r;if(n>=1)return{x:e.x,y:e.y};if(n>0&&n<1)return{x:w((1-n)*r.x+n*e.x,5),y:w((1-n)*r.y+n*e.y,5)}}}r=e}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),v=(0,n.K2)((t,e,r)=>{n.Rm.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=_(e,25),a=t?10:5,o=Math.atan2(e[0].y-i.y,e[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(e[0].x+i.x)/2,s.y=-Math.cos(o)*a+(e[0].y+i.y)/2,s},"calcCardinalityPosition");function S(t,e,r){const i=structuredClone(r);n.Rm.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const a=_(i,25+t),o=10+.5*t,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):"end_right"===e?(l.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):"end_left"===e?(l.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(s)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2),l}function T(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}(0,n.K2)(S,"calcTerminalLabelPosition"),(0,n.K2)(T,"getStylesFromArray");var A=0,M=(0,n.K2)(()=>(A++,"id-"+Math.random().toString(36).substr(2,12)+"-"+A),"generateId");function B(t){let e="";for(let r=0;r<t;r++)e+="0123456789abcdef".charAt(Math.floor(16*Math.random()));return e}(0,n.K2)(B,"makeRandomHex");var L=(0,n.K2)(t=>B(t.length),"random"),F=(0,n.K2)(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),$=(0,n.K2)(function(t,e){const r=e.text.replace(i.Y2.lineBreakRegex," "),[,n]=W(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",n),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);const o=a.append("tspan");return o.attr("x",e.x+2*e.textMargin),o.attr("fill",e.fill),o.text(r),a},"drawSimpleText"),E=s((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),i.Y2.lineBreakRegex.test(t))return t;const n=t.split(" ").filter(Boolean),a=[];let o="";return n.forEach((t,i)=>{const s=R(`${t} `,r),l=R(o,r);if(s>e){const{hyphenatedStrings:i,remainingWord:n}=D(t,e,"-",r);a.push(o,...i),o=n}else l+s>=e?(a.push(o),o=t):o=[o,t].filter(Boolean).join(" ");i+1===n.length&&a.push(o)}),a.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),D=s((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...t],a=[];let o="";return n.forEach((t,s)=>{const l=`${o}${t}`;if(R(l,i)>=e){const t=s+1,e=n.length===t,i=`${l}${r}`;a.push(e?l:i),o=""}else o=l}),{hyphenatedStrings:a,remainingWord:o}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function O(t,e){return I(t,e).height}function R(t,e){return I(t,e).width}(0,n.K2)(O,"calculateTextHeight"),(0,n.K2)(R,"calculateTextWidth");var K,I=s((t,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,s]=W(r),l=["sans-serif",n],c=t.split(i.Y2.lineBreakRegex),u=[],d=(0,o.Ltv)("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const p=d.append("svg");for(const t of l){let e=0;const r={width:0,height:0,lineHeight:0};for(const i of c){const n=F();n.text=i||h;const o=$(p,n).style("font-size",s).style("font-weight",a).style("font-family",t),l=(o._groups||o)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,l.width)),e=Math.round(l.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}u.push(r)}return p.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),N=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,n.K2)(this,"InitIDGenerator")}},P=(0,n.K2)(function(t){return K=K||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),K.innerHTML=t,unescape(K.textContent)},"entityDecode");function z(t){return"str"in t}(0,n.K2)(z,"isDetailedError");var q=(0,n.K2)((t,e,r,i)=>{if(!i)return;const n=t.node()?.getBBox();n&&t.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},"insertTitle"),W=(0,n.K2)(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function j(t,e){return l({},t,e)}(0,n.K2)(j,"cleanAndMerge");var H={assignWithDepth:i.hH,wrapLabel:E,calculateTextHeight:O,calculateTextWidth:R,calculateTextDimensions:I,cleanAndMerge:j,detectInit:d,detectDirective:p,isSubstringInArray:g,interpolateToCurve:y,calcLabelPosition:C,calcCardinalityPosition:v,calcTerminalLabelPosition:S,formatUrl:m,getStylesFromArray:T,generateId:M,random:L,runFunc:x,entityDecode:P,insertTitle:q,isLabelCoordinateInPath:V,parseFontSize:W,InitIDGenerator:N},U=(0,n.K2)(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}),e},"encodeEntities"),Y=(0,n.K2)(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),G=(0,n.K2)((t,e,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${t}_${e}_${r}${n?`_${n}`:""}`,"getEdgeId");function X(t){return t??null}function V(t,e){const r=Math.round(t.x),i=Math.round(t.y),n=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return n.includes(r.toString())||n.includes(i.toString())}(0,n.K2)(X,"handleUndefinedAttr"),(0,n.K2)(V,"isLabelCoordinateInPath")},9856(t,e,r){"use strict";r.d(e,{XX:()=>u,q7:()=>d,sO:()=>c});var i=r(5948),n=r(1174),a=r(796),o=r(4098),s=r(797),l={common:o.Y2,getConfig:o.zj,insertCluster:n.U,insertEdge:i.Jo,insertEdgeLabel:i.jP,insertMarkers:i.g0,insertNode:n.on,interpolateToCurve:a.Ib,labelHelper:n.Zk,log:s.Rm,positionEdgeLabel:i.T_},h={},c=(0,s.K2)(t=>{for(const e of t)h[e.name]=e},"registerLayoutLoaders");(0,s.K2)(()=>{c([{name:"dagre",loader:(0,s.K2)(async()=>await Promise.all([r.e(697),r.e(620),r.e(215)]).then(r.bind(r,5215)),"loader")},{name:"cose-bilkent",loader:(0,s.K2)(async()=>await Promise.all([r.e(165),r.e(928)]).then(r.bind(r,7928)),"loader")}])},"registerDefaultLayoutLoaders")();var u=(0,s.K2)(async(t,e)=>{if(!(t.layoutAlgorithm in h))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=h[t.layoutAlgorithm];return(await r.loader()).render(t,e,l,{algorithm:r.algorithm})},"render"),d=(0,s.K2)((t="",{fallback:e="dagre"}={})=>{if(t in h)return t;if(e in h)return s.Rm.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")},1475(t,e,r){"use strict";r.d(e,{D:()=>o});var i=r(4098),n=r(797),a=r(1444),o=(0,n.K2)(t=>{const{securityLevel:e}=(0,i.D7)();let r=(0,a.Ltv)("body");if("sandbox"===e){const e=(0,a.Ltv)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,a.Ltv)(i.body)}return r.select(`#${t}`)},"selectSvgElement")},1174(t,e,r){"use strict";r.d(e,{DA:()=>b,IU:()=>M,U:()=>A,U7:()=>ve,U_:()=>Te,Zk:()=>u,aP:()=>Ce,gh:()=>Se,lC:()=>p,on:()=>_e});var i=r(7879),n=r(1960),a=r(6866),o=r(796),s=r(4098),l=r(797),h=r(1444),c=r(2274),u=(0,l.K2)(async(t,e,r)=>{let n;const l=e.useHtmlLabels||(0,s._3)((0,s.D7)()?.htmlLabels);n=r||"node default";const c=t.insert("g").attr("class",n).attr("id",e.domId||e.id),u=c.insert("g").attr("class","label").attr("style",(0,o.KL)(e.labelStyle));let d;d=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const p=!!e.icon||!!e.img,f="markdown"===e.labelType,g=await(0,a.GZ)(u,(0,s.jZ)((0,o.Sm)(d),(0,s.D7)()),{useHtmlLabels:l,width:e.width||(0,s.D7)().flowchart?.wrappingWidth,cssClasses:f?"markdown-node-label":void 0,style:e.labelStyle,addSvgBackground:p,markdown:f},(0,s.D7)());let y=g.getBBox();const m=(e?.padding??0)/2;if(l){const t=g.children[0],e=(0,h.Ltv)(g);await(0,i.X)(t,d),y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return l?u.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):u.attr("transform","translate(0, "+-y.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:c,bbox:y,halfPadding:m,label:u}},"labelHelper"),d=(0,l.K2)(async(t,e,r)=>{const i=r.useHtmlLabels??(0,s.E)((0,s.D7)()),n=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),l=await(0,a.GZ)(n,(0,s.jZ)((0,o.Sm)(e),(0,s.D7)()),{useHtmlLabels:i,width:r.width||(0,s.D7)()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let c=l.getBBox();const u=r.padding/2;if((0,s.E)((0,s.D7)())){const t=l.children[0],e=(0,h.Ltv)(l);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}return i?n.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):n.attr("transform","translate(0, "+-c.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:t,bbox:c,halfPadding:u,label:n}},"insertLabel"),p=(0,l.K2)((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),f=(0,l.K2)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function g(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function y(t,e,r,i,n,a){const o=[],s=r-t,l=i-e,h=s/a,c=2*Math.PI/h,u=e+l/2;for(let e=0;e<=50;e++){const r=t+e/50*s,i=u+n*Math.sin(c*(r-t));o.push({x:r,y:i})}return o}function m(t,e,r,i,n,a){const o=[],s=n*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let n=0;n<i;n++){const i=s+n*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);o.push({x:-a,y:-h})}return o}(0,l.K2)(g,"createPathFromPoints"),(0,l.K2)(y,"generateFullSineWavePoints"),(0,l.K2)(m,"generateCirclePoints");var x=(0,l.K2)((t,e)=>{var r,i,n=t.x,a=t.y,o=e.x-n,s=e.y-a,l=t.width/2,h=t.height/2;return Math.abs(s)*l>Math.abs(o)*h?(s<0&&(h=-h),r=0===s?0:h*o/s,i=h):(o<0&&(l=-l),r=l,i=0===o?0:l*s/o),{x:n+r,y:a+i}},"intersectRect"),b=(0,l.K2)(async(t,e,r,i=!1,n=!1)=>{let o=e||"";"object"==typeof o&&(o=o[0]);const l=(0,s.D7)(),h=(0,s.E)(l);return await(0,a.GZ)(t,o,{style:r,isTitle:i,useHtmlLabels:h,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},l)},"createLabel"),k=(0,l.K2)((t,e,r,i,n)=>["M",t+n,e,"H",t+r-n,"A",n,n,0,0,1,t+r,e+n,"V",e+i-n,"A",n,n,0,0,1,t+r-n,e+i,"H",t+n,"A",n,n,0,0,1,t,e+i-n,"V",e+n,"A",n,n,0,0,1,t+n,e,"Z"].join(" "),"createRoundedRectPathD"),C=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:o,handDrawnSeed:u}=r,{clusterBkg:d,clusterBorder:p}=o,{labelStyles:f,nodeStyles:g,borderStyles:y,backgroundStyles:m}=(0,n.GX)(e),C=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),w=(0,s.E)(r),_=C.insert("g").attr("class","cluster-label ");let v;v="markdown"===e.labelType?await(0,a.GZ)(_,e.label,{style:e.labelStyle,useHtmlLabels:w,isNode:!0,width:e.width}):await b(_,e.label,e.labelStyle||"",!1,!0);let S=v.getBBox();if((0,s.E)(r)){const t=v.children[0],e=(0,h.Ltv)(v);S=t.getBoundingClientRect(),e.attr("width",S.width),e.attr("height",S.height)}const T=e.width<=S.width+e.padding?S.width+e.padding:e.width;e.width<=S.width+e.padding?e.diff=(T-e.width)/2-e.padding:e.diff=-e.padding;const A=e.height,M=e.x-T/2,B=e.y-A/2;let L;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=c.A.svg(C),r=(0,n.Fr)(e,{roughness:.7,fill:d,stroke:p,fillWeight:3,seed:u}),i=t.path(k(M,B,T,A,0),r);L=C.insert(()=>(l.Rm.debug("Rough node insert CXC",i),i),":first-child"),L.select("path:nth-child(2)").attr("style",y.join(";")),L.select("path").attr("style",m.join(";").replace("fill","stroke"))}else L=C.insert("rect",":first-child"),L.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",M).attr("y",B).attr("width",T).attr("height",A);const{subGraphTitleTopMargin:F}=(0,i.O)(r);if(_.attr("transform",`translate(${e.x-S.width/2}, ${e.y-e.height/2+F})`),f){const t=_.select("span");t&&t.attr("style",f)}const $=L.node().getBBox();return e.offsetX=0,e.width=$.width,e.height=$.height,e.offsetY=S.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:C,labelBBox:S}},"rect"),w=(0,l.K2)((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),n=0*e.padding,a=n/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");const o=i.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return x(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),_=(0,l.K2)(async(t,e)=>{const r=(0,s.D7)(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:l,nodeBorder:u}=i,d=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),p=d.insert("g",":first-child"),f=d.insert("g").attr("class","cluster-label");let g=d.append("rect");const y=await b(f,e.label,e.labelStyle,void 0,!0);let m=y.getBBox();if((0,s.E)(r)){const t=y.children[0],e=(0,h.Ltv)(y);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}const C=0*e.padding,w=C/2,_=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+C;e.width<=m.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height+C,S=e.height+C-m.height-6,T=e.x-_/2,A=e.y-v/2;e.width=_;const M=e.y-e.height/2-w+m.height+2;let B;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=c.A.svg(d),i=e.rx||e.ry?r.path(k(T,A,_,v,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:n}):r.rectangle(T,A,_,v,{seed:n});B=d.insert(()=>i,":first-child");const s=r.rectangle(T,M,_,S,{fill:t?a:o,fillStyle:t?"hachure":"solid",stroke:u,seed:n});B=d.insert(()=>i,":first-child"),g=d.insert(()=>s)}else{B=p.insert("rect",":first-child");const t="outer";B.attr("class",t).attr("x",T).attr("y",A).attr("width",_).attr("height",v).attr("data-look",e.look),g.attr("class","inner").attr("x",T).attr("y",M).attr("width",_).attr("height",S)}f.attr("transform",`translate(${e.x-m.width/2}, ${A+1-((0,s.E)(r)?0:3)})`);const L=B.node().getBBox();return e.height=L.height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(t){return x(e,t)},{cluster:d,labelBBox:m}},"roundedWithTitle"),v=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:o,handDrawnSeed:u}=r,{clusterBkg:d,clusterBorder:p}=o,{labelStyles:f,nodeStyles:g,borderStyles:y,backgroundStyles:m}=(0,n.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),C=(0,s.E)(r),w=b.insert("g").attr("class","cluster-label "),_=await(0,a.GZ)(w,e.label,{style:e.labelStyle,useHtmlLabels:C,isNode:!0,width:e.width});let v=_.getBBox();if((0,s.E)(r)){const t=_.children[0],e=(0,h.Ltv)(_);v=t.getBoundingClientRect(),e.attr("width",v.width),e.attr("height",v.height)}const S=e.width<=v.width+e.padding?v.width+e.padding:e.width;e.width<=v.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height,A=e.x-S/2,M=e.y-T/2;let B;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=c.A.svg(b),r=(0,n.Fr)(e,{roughness:.7,fill:d,stroke:p,fillWeight:4,seed:u}),i=t.path(k(A,M,S,T,e.rx),r);B=b.insert(()=>(l.Rm.debug("Rough node insert CXC",i),i),":first-child"),B.select("path:nth-child(2)").attr("style",y.join(";")),B.select("path").attr("style",m.join(";").replace("fill","stroke"))}else B=b.insert("rect",":first-child"),B.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",A).attr("y",M).attr("width",S).attr("height",T);const{subGraphTitleTopMargin:L}=(0,i.O)(r);if(w.attr("transform",`translate(${e.x-v.width/2}, ${e.y-e.height/2+L})`),f){const t=w.select("span");t&&t.attr("style",f)}const F=B.node().getBBox();return e.offsetX=0,e.width=F.width,e.height=F.height,e.offsetY=v.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:b,labelBBox:v}},"kanbanSection"),S={rect:C,squareRect:C,roundedWithTitle:_,noteGroup:w,divider:(0,l.K2)((t,e)=>{const r=(0,s.D7)(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=o.insert("g",":first-child"),h=0*e.padding,u=e.width+h;e.diff=-e.padding;const d=e.height+h,p=e.x-u/2,f=e.y-d/2;let g;if(e.width=u,"handDrawn"===e.look){const t=c.A.svg(o).rectangle(p,f,u,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});g=o.insert(()=>t,":first-child")}else{g=l.insert("rect",":first-child");const t="divider";g.attr("class",t).attr("x",p).attr("y",f).attr("width",u).attr("height",d).attr("data-look",e.look)}const y=g.node().getBBox();return e.height=y.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:o,labelBBox:{}}},"divider"),kanbanSection:v},T=new Map,A=(0,l.K2)(async(t,e)=>{const r=e.shape||"rect",i=await S[r](t,e);return T.set(e.id,i),i},"insertCluster"),M=(0,l.K2)(()=>{T=new Map},"clear");function B(t,e){return t.intersect(e)}(0,l.K2)(B,"intersectNode");var L=B;function F(t,e,r,i){var n=t.x,a=t.y,o=n-i.x,s=a-i.y,l=Math.sqrt(e*e*s*s+r*r*o*o),h=Math.abs(e*r*o/l);i.x<n&&(h=-h);var c=Math.abs(e*r*s/l);return i.y<a&&(c=-c),{x:n+h,y:a+c}}(0,l.K2)(F,"intersectEllipse");var $=F;function E(t,e,r){return $(t,e,e,r)}(0,l.K2)(E,"intersectCircle");var D=E;function O(t,e,r,i){{const n=e.y-t.y,a=t.x-e.x,o=e.x*t.y-t.x*e.y,s=n*r.x+a*r.y+o,l=n*i.x+a*i.y+o,h=1e-6;if(0!==s&&0!==l&&R(s,l))return;const c=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,p=c*t.x+u*t.y+d,f=c*e.x+u*e.y+d;if(Math.abs(p)<h&&Math.abs(f)<h&&R(p,f))return;const g=n*u-c*a;if(0===g)return;const y=Math.abs(g/2);let m=a*d-u*o;const x=m<0?(m-y)/g:(m+y)/g;return m=c*o-n*d,{x,y:m<0?(m-y)/g:(m+y)/g}}}function R(t,e){return t*e>0}(0,l.K2)(O,"intersectLine"),(0,l.K2)(R,"sameSign");var K=O;function I(t,e,r){let i=t.x,n=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)}):(o=Math.min(o,e.x),s=Math.min(s,e.y));let l=i-t.width/2-o,h=n-t.height/2-s;for(let i=0;i<e.length;i++){let n=e[i],o=e[i<e.length-1?i+1:0],s=K(t,r,{x:l+n.x,y:h+n.y},{x:l+o.x,y:h+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(t,e){let i=t.x-r.x,n=t.y-r.y,a=Math.sqrt(i*i+n*n),o=e.x-r.x,s=e.y-r.y,l=Math.sqrt(o*o+s*s);return a<l?-1:a===l?0:1}),a[0]):t}(0,l.K2)(I,"intersectPolygon");var N={node:L,circle:D,ellipse:$,polygon:I,rect:x};function P(t,e){const{labelStyles:r}=(0,n.GX)(e);e.labelStyle=r;const i=f(e);let a=i;i||(a="anchor");const s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),{cssStyles:h}=e,u=c.A.svg(s),d=(0,n.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);const g=u.circle(0,0,2,d),y=s.insert(()=>g,":first-child");return y.attr("class","anchor").attr("style",(0,o.KL)(h)),p(e,y),e.intersect=function(t){return l.Rm.info("Circle intersect",e,1,t),N.circle(e,1,t)},s}function z(t,e,r,i,n,a,o){const s=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/n,u=(i-e)/2/a,d=Math.sqrt(c**2+u**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-d**2),f=s+p*a*Math.sin(h)*(o?-1:1),g=l-p*n*Math.cos(h)*(o?-1:1),y=Math.atan2((e-g)/a,(t-f)/n);let m=Math.atan2((i-g)/a,(r-f)/n)-y;o&&m<0&&(m+=2*Math.PI),!o&&m>0&&(m-=2*Math.PI);const x=[];for(let t=0;t<20;t++){const e=y+t/19*m,r=f+n*Math.cos(e),i=g+a*Math.sin(e);x.push({x:r,y:i})}return x}async function q(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.width+e.padding+20,l=o.height+e.padding,h=l/2,d=h/(2.5+l/50),{cssStyles:y}=e,m=[{x:s/2,y:-l/2},{x:-s/2,y:-l/2},...z(-s/2,-l/2,-s/2,l/2,d,h,!1),{x:s/2,y:l/2},...z(s/2,l/2,s/2,-l/2,d,h,!0)],x=c.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=g(m),C=x.path(k,b),w=a.insert(()=>C,":first-child");return w.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${d/2}, 0)`),p(e,w),e.intersect=function(t){return N.polygon(e,m,t)},a}function W(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}async function j(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.height+e.padding,l=o.width+e.padding+12,h=-s,d=[{x:12,y:h},{x:l,y:h},{x:l,y:0},{x:0,y:0},{x:0,y:h+12},{x:12,y:h}];let y;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=g(d),o=t.path(i,r);y=a.insert(()=>o,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),m&&y.attr("style",m)}else y=W(a,l,s,d);return i&&y.attr("style",i),p(e,y),e.intersect=function(t){return N.polygon(e,d,t)},a}function H(t,e){const{nodeStyles:r}=(0,n.GX)(e);e.label="";const i=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,o=Math.max(28,e.width??0),s=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],l=c.A.svg(i),h=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const u=g(s),d=l.path(u,h),p=i.insert(()=>d,":first-child");return a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),r&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return N.polygon(e,s,t)},i}async function U(t,e,r){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.labelStyle=i;const{shapeSvg:s,bbox:h,halfPadding:d}=await u(t,e,f(e)),g=r?.padding??d,y=h.width/2+g;let m;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=c.A.svg(s),r=(0,n.Fr)(e,{}),i=t.circle(0,0,2*y,r);m=s.insert(()=>i,":first-child"),m.attr("class","basic label-container").attr("style",(0,o.KL)(x))}else m=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",y).attr("cx",0).attr("cy",0);return p(e,m),e.calcIntersect=function(t,e){const r=t.width/2;return N.circle(t,r,e)},e.intersect=function(t){return l.Rm.info("Circle intersect",e,y,t),N.circle(e,y,t)},s}function Y(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}function G(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r,e.label="";const a=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),o=Math.max(30,e?.width??0),{cssStyles:s}=e,h=c.A.svg(a),u=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,2*o,u),g=Y(o),y=h.path(g,u),m=a.insert(()=>d,":first-child");return m.insert(()=>y),s&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),p(e,m),e.intersect=function(t){return l.Rm.info("crossedCircle intersect",e,{radius:o,point:t}),N.circle(e,o,t)},a}function X(t,e,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let n=0;n<i;n++){const i=s+n*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);o.push({x:-a,y:-h})}return o}async function V(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=o.width+(e.padding??0),h=o.height+(e.padding??0),d=Math.max(5,.1*h),{cssStyles:y}=e,m=[...X(l/2,-h/2,d,30,-90,0),{x:-l/2-d,y:d},...X(l/2+2*d,-d,d,20,-180,-270),...X(l/2+2*d,d,d,20,-90,-180),{x:-l/2-d,y:-h/2},...X(l/2,h/2,d,20,0,90)],x=[{x:l/2,y:-h/2-d},{x:-l/2,y:-h/2-d},...X(l/2,-h/2,d,20,-90,0),{x:-l/2-d,y:-d},...X(l/2+.1*l,-d,d,20,-180,-270),...X(l/2+.1*l,d,d,20,-90,-180),{x:-l/2-d,y:h/2},...X(l/2,h/2,d,20,0,90),{x:-l/2,y:h/2+d},{x:l/2,y:h/2+d}],b=c.A.svg(a),k=(0,n.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const C=g(m).replace("Z",""),w=b.path(C,k),_=g(x),v=b.path(_,{...k}),S=a.insert("g",":first-child");return S.insert(()=>v,":first-child").attr("stroke-opacity",0),S.insert(()=>w,":first-child"),S.attr("class","text"),y&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${d}, 0)`),s.attr("transform",`translate(${-l/2+d-(o.x-(o.left??0))},${-h/2+(e.padding??0)/2-(o.y-(o.top??0))})`),p(e,S),e.intersect=function(t){return N.polygon(e,x,t)},a}function Z(t,e,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let n=0;n<i;n++){const i=s+n*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);o.push({x:a,y:h})}return o}async function Q(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=o.width+(e.padding??0),h=o.height+(e.padding??0),d=Math.max(5,.1*h),{cssStyles:y}=e,m=[...Z(l/2,-h/2,d,20,-90,0),{x:l/2+d,y:-d},...Z(l/2+2*d,-d,d,20,-180,-270),...Z(l/2+2*d,d,d,20,-90,-180),{x:l/2+d,y:h/2},...Z(l/2,h/2,d,20,0,90)],x=[{x:-l/2,y:-h/2-d},{x:l/2,y:-h/2-d},...Z(l/2,-h/2,d,20,-90,0),{x:l/2+d,y:-d},...Z(l/2+2*d,-d,d,20,-180,-270),...Z(l/2+2*d,d,d,20,-90,-180),{x:l/2+d,y:h/2},...Z(l/2,h/2,d,20,0,90),{x:l/2,y:h/2+d},{x:-l/2,y:h/2+d}],b=c.A.svg(a),k=(0,n.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const C=g(m).replace("Z",""),w=b.path(C,k),_=g(x),v=b.path(_,{...k}),S=a.insert("g",":first-child");return S.insert(()=>v,":first-child").attr("stroke-opacity",0),S.insert(()=>w,":first-child"),S.attr("class","text"),y&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-d}, 0)`),s.attr("transform",`translate(${-l/2+(e.padding??0)/2-(o.x-(o.left??0))},${-h/2+(e.padding??0)/2-(o.y-(o.top??0))})`),p(e,S),e.intersect=function(t){return N.polygon(e,x,t)},a}function J(t,e,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let n=0;n<i;n++){const i=s+n*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);o.push({x:-a,y:-h})}return o}async function tt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=o.width+(e.padding??0),h=o.height+(e.padding??0),d=Math.max(5,.1*h),{cssStyles:y}=e,m=[...J(l/2,-h/2,d,30,-90,0),{x:-l/2-d,y:d},...J(l/2+2*d,-d,d,20,-180,-270),...J(l/2+2*d,d,d,20,-90,-180),{x:-l/2-d,y:-h/2},...J(l/2,h/2,d,20,0,90)],x=[...J(-l/2+d+d/2,-h/2,d,20,-90,-180),{x:l/2-d/2,y:d},...J(-l/2-d/2,-d,d,20,0,90),...J(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...J(-l/2+d+d/2,h/2,d,30,-180,-270)],b=[{x:l/2,y:-h/2-d},{x:-l/2,y:-h/2-d},...J(l/2,-h/2,d,20,-90,0),{x:-l/2-d,y:-d},...J(l/2+2*d,-d,d,20,-180,-270),...J(l/2+2*d,d,d,20,-90,-180),{x:-l/2-d,y:h/2},...J(l/2,h/2,d,20,0,90),{x:-l/2,y:h/2+d},{x:l/2-d-d/2,y:h/2+d},...J(-l/2+d+d/2,-h/2,d,20,-90,-180),{x:l/2-d/2,y:d},...J(-l/2-d/2,-d,d,20,0,90),...J(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...J(-l/2+d+d/2,h/2,d,30,-180,-270)],k=c.A.svg(a),C=(0,n.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const w=g(m).replace("Z",""),_=k.path(w,C),v=g(x).replace("Z",""),S=k.path(v,C),T=g(b),A=k.path(T,{...C}),M=a.insert("g",":first-child");return M.insert(()=>A,":first-child").attr("stroke-opacity",0),M.insert(()=>_,":first-child"),M.insert(()=>S,":first-child"),M.attr("class","text"),y&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(${d-d/4}, 0)`),s.attr("transform",`translate(${-l/2+(e.padding??0)/2-(o.x-(o.left??0))},${-h/2+(e.padding??0)/2-(o.y-(o.top??0))})`),p(e,M),e.intersect=function(t){return N.polygon(e,b,t)},a}async function et(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(80,1.25*(o.width+2*(e.padding??0)),e?.width??0),l=Math.max(20,o.height+2*(e.padding??0),e?.height??0),h=l/2,{cssStyles:d}=e,y=c.A.svg(a),x=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=s-h,k=l/4,C=[{x:b,y:0},{x:k,y:0},{x:0,y:l/2},{x:k,y:l},{x:b,y:l},...m(-b,-l/2,h,50,270,90)],w=g(C),_=y.path(w,x),v=a.insert(()=>_,":first-child");return v.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-s/2}, ${-l/2})`),p(e,v),e.intersect=function(t){return N.polygon(e,C,t)},a}(0,l.K2)(P,"anchor"),(0,l.K2)(z,"generateArcPoints"),(0,l.K2)(q,"bowTieRect"),(0,l.K2)(W,"insertPolygonShape"),(0,l.K2)(j,"card"),(0,l.K2)(H,"choice"),(0,l.K2)(U,"circle"),(0,l.K2)(Y,"createLine"),(0,l.K2)(G,"crossedCircle"),(0,l.K2)(X,"generateCirclePoints"),(0,l.K2)(V,"curlyBraceLeft"),(0,l.K2)(Z,"generateCirclePoints"),(0,l.K2)(Q,"curlyBraceRight"),(0,l.K2)(J,"generateCirclePoints"),(0,l.K2)(tt,"curlyBraces"),(0,l.K2)(et,"curvedTrapezoid");var rt=(0,l.K2)((t,e,r,i,n,a)=>[`M${t},${e+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),it=(0,l.K2)((t,e,r,i,n,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),nt=(0,l.K2)((t,e,r,i,n,a)=>[`M${t-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function at(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l}=await u(t,e,f(e)),h=Math.max(s.width+e.padding,e.width??0),d=h/2,g=d/(2.5+h/50),y=Math.max(s.height+g+e.padding,e.height??0);let m;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=it(0,0,h,y,d,g),i=nt(0,g,h,y,d,g),o=t.path(r,(0,n.Fr)(e,{})),s=t.path(i,(0,n.Fr)(e,{fill:"none"}));m=a.insert(()=>s,":first-child"),m=a.insert(()=>o,":first-child"),m.attr("class","basic label-container"),x&&m.attr("style",x)}else{const t=rt(0,0,h,y,d,g);m=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(x)).attr("style",i)}return m.attr("label-offset-y",g),m.attr("transform",`translate(${-h/2}, ${-(y/2+g)})`),p(e,m),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2+(e.padding??0)/1.5-(s.y-(s.top??0))})`),e.intersect=function(t){const r=N.rect(e,t),i=r.x-(e.x??0);if(0!=d&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-g)){let n=g*g*(1-i*i/(d*d));n>0&&(n=Math.sqrt(n)),n=g-n,t.y-(e.y??0)>0&&(n=-n),r.y+=n}return r},a}async function ot(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=o.width+e.padding,h=o.height+e.padding,d=.2*h,g=-l/2,y=-h/2-d/2,{cssStyles:m}=e,x=c.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=[{x:g,y:y+d},{x:-g,y:y+d},{x:-g,y:-y},{x:g,y:-y},{x:g,y},{x:-g,y},{x:-g,y:y+d}],C=x.polygon(k.map(t=>[t.x,t.y]),b),w=a.insert(()=>C,":first-child");return w.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",i),s.attr("transform",`translate(${g+(e.padding??0)/2-(o.x-(o.left??0))}, ${y+d+(e.padding??0)/2-(o.y-(o.top??0))})`),p(e,w),e.intersect=function(t){return N.rect(e,t)},a}async function st(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:h}=await u(t,e,f(e)),d=s.width/2+h+5,g=s.width/2+h;let y;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{roughness:.2,strokeWidth:2.5}),i=(0,n.Fr)(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*d,r),l=t.circle(0,0,2*g,i);y=a.insert("g",":first-child"),y.attr("class",(0,o.KL)(e.cssClasses)).attr("style",(0,o.KL)(m)),y.node()?.appendChild(s),y.node()?.appendChild(l)}else{y=a.insert("g",":first-child");const t=y.insert("circle",":first-child"),e=y.insert("circle");y.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",d).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",g).attr("cx",0).attr("cy",0)}return p(e,y),e.intersect=function(t){return l.Rm.info("DoubleCircle intersect",e,d,t),N.circle(e,d,t)},a}function lt(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.label="",e.labelStyle=i;const o=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,h=c.A.svg(o),{nodeBorder:u}=r,d=(0,n.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);const g=h.circle(0,0,14,d),y=o.insert(()=>g,":first-child");return y.selectAll("path").attr("style",`fill: ${u} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",s),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),p(e,y),e.intersect=function(t){return l.Rm.info("filledCircle intersect",e,{radius:7,point:t}),N.circle(e,7,t)},o}async function ht(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),h=o.width+(e.padding??0),d=h+o.height,y=h+o.height,m=[{x:0,y:-d},{x:y,y:-d},{x:y/2,y:0}],{cssStyles:x}=e,b=c.A.svg(a),k=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const C=g(m),w=b.path(C,k),_=a.insert(()=>w,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`);return x&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",i),e.width=h,e.height=d,p(e,_),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-d/2+(e.padding??0)/2+(o.y-(o.top??0))})`),e.intersect=function(t){return l.Rm.info("Triangle intersect",e,m,t),N.polygon(e,m,t)},a}function ct(t,e,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:o}=(0,n.GX)(e);e.label="";const s=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:l}=e;let h=Math.max(70,e?.width??0),u=Math.max(10,e?.height??0);"LR"===r&&(h=Math.max(10,e?.width??0),u=Math.max(70,e?.height??0));const d=-1*h/2,g=-1*u/2,y=c.A.svg(s),m=(0,n.Fr)(e,{stroke:a.lineColor,fill:a.lineColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const x=y.rectangle(d,g,h,u,m),b=s.insert(()=>x,":first-child");l&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",l),o&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",o),p(e,b);const k=i?.padding??0;return e.width&&e.height&&(e.width+=k/2||0,e.height+=k/2||0),e.intersect=function(t){return N.rect(e,t)},s}async function ut(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(80,o.width+2*(e.padding??0),e?.width??0),h=Math.max(50,o.height+2*(e.padding??0),e?.height??0),d=h/2,{cssStyles:y}=e,x=c.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=[{x:-s/2,y:-h/2},{x:s/2-d,y:-h/2},...m(-s/2+d,0,d,50,90,270),{x:s/2-d,y:h/2},{x:-s/2,y:h/2}],C=g(k),w=x.path(C,b),_=a.insert(()=>w,":first-child");return _.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",y),i&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",i),p(e,_),e.intersect=function(t){return l.Rm.info("Pill intersect",e,{radius:d,point:t}),N.polygon(e,k,t)},a}(0,l.K2)(at,"cylinder"),(0,l.K2)(ot,"dividedRectangle"),(0,l.K2)(st,"doublecircle"),(0,l.K2)(lt,"filledCircle"),(0,l.K2)(ht,"flippedTriangle"),(0,l.K2)(ct,"forkJoin"),(0,l.K2)(ut,"halfRoundedRectangle");var dt=(0,l.K2)((t,e,r,i,n)=>[`M${t+n},${e}`,`L${t+r-n},${e}`,`L${t+r},${e-i/2}`,`L${t+r-n},${e-i}`,`L${t+n},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" "),"createHexagonPathD");async function pt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.height+e.padding,l=s/4,h=o.width+2*l+e.padding,d=[{x:l,y:0},{x:h-l,y:0},{x:h,y:-s/2},{x:h-l,y:-s},{x:l,y:-s},{x:0,y:-s/2}];let g;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=dt(0,0,h,s,l),o=t.path(i,r);g=a.insert(()=>o,":first-child").attr("transform",`translate(${-h/2}, ${s/2})`),y&&g.attr("style",y)}else g=W(a,h,s,d);return i&&g.attr("style",i),e.width=h,e.height=s,p(e,g),e.intersect=function(t){return N.polygon(e,d,t)},a}async function ft(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.label="",e.labelStyle=r;const{shapeSvg:a}=await u(t,e,f(e)),o=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:h}=e,d=c.A.svg(a),y=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],x=g(m),b=d.path(x,y),k=a.insert(()=>b,":first-child");return k.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",i),k.attr("transform",`translate(${-o/2}, ${-s/2})`),p(e,k),e.intersect=function(t){return l.Rm.info("Pill intersect",e,{points:m}),N.polygon(e,m,t)},a}async function gt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=(0,n.GX)(e);e.labelStyle=o;const s=e.assetHeight??48,h=e.assetWidth??48,d=Math.max(s,h),f=i?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:y,label:m}=await u(t,e,"icon-shape default"),x="t"===e.pos,b=d,k=d,{nodeBorder:C}=r,{stylesMap:w}=(0,n.WW)(e),_=-k/2,v=-b/2,S=e.label?8:0,T=c.A.svg(g),A=(0,n.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");const M=T.rectangle(_,v,k,b,A),B=Math.max(k,y.width),L=b+y.height+S,F=T.rectangle(-B/2,-L/2,B,L,{...A,fill:"transparent",stroke:"none"}),$=g.insert(()=>M,":first-child"),E=g.insert(()=>F);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,n=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-i/2-o},${x?y.height/2+S/2-n/2-s:-y.height/2-S/2-n/2-s})`),t.attr("style",`color: ${w.get("stroke")??C};`)}return m.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${x?-L/2:L/2-y.height})`),$.attr("transform",`translate(0,${x?y.height/2+S/2:-y.height/2-S/2})`),p(e,E),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return N.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let a=[];return a=x?[{x:r-y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2+y.height+S},{x:r+k/2,y:i-n/2+y.height+S},{x:r+k/2,y:i+n/2},{x:r-k/2,y:i+n/2},{x:r-k/2,y:i-n/2+y.height+S},{x:r-y.width/2,y:i-n/2+y.height+S}]:[{x:r-k/2,y:i-n/2},{x:r+k/2,y:i-n/2},{x:r+k/2,y:i-n/2+b},{x:r+y.width/2,y:i-n/2+b},{x:r+y.width/2/2,y:i+n/2},{x:r-y.width/2,y:i+n/2},{x:r-y.width/2,y:i-n/2+b},{x:r-k/2,y:i-n/2+b}],N.polygon(e,a,t)},g}async function yt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=(0,n.GX)(e);e.labelStyle=o;const s=e.assetHeight??48,h=e.assetWidth??48,d=Math.max(s,h),f=i?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:y,label:m}=await u(t,e,"icon-shape default"),x=e.label?8:0,b="t"===e.pos,{nodeBorder:k,mainBkg:C}=r,{stylesMap:w}=(0,n.WW)(e),_=c.A.svg(g),v=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const S=w.get("fill");v.stroke=S??C;const T=g.append("g");e.icon&&T.html(`<g>${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const A=T.node().getBBox(),M=A.width,B=A.height,L=A.x,F=A.y,$=Math.max(M,B)*Math.SQRT2+40,E=_.circle(0,0,$,v),D=Math.max($,y.width),O=$+y.height+x,R=_.rectangle(-D/2,-O/2,D,O,{...v,fill:"transparent",stroke:"none"}),K=g.insert(()=>E,":first-child"),I=g.insert(()=>R);return T.attr("transform",`translate(${-M/2-L},${b?y.height/2+x/2-B/2-F:-y.height/2-x/2-B/2-F})`),T.attr("style",`color: ${w.get("stroke")??k};`),m.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${b?-O/2:O/2-y.height})`),K.attr("transform",`translate(0,${b?y.height/2+x/2:-y.height/2-x/2})`),p(e,I),e.intersect=function(t){return l.Rm.info("iconSquare intersect",e,t),N.rect(e,t)},g}async function mt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=(0,n.GX)(e);e.labelStyle=o;const s=e.assetHeight??48,h=e.assetWidth??48,d=Math.max(s,h),f=i?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:y,halfPadding:m,label:x}=await u(t,e,"icon-shape default"),b="t"===e.pos,C=d+2*m,w=d+2*m,{nodeBorder:_,mainBkg:v}=r,{stylesMap:S}=(0,n.WW)(e),T=-w/2,A=-C/2,M=e.label?8:0,B=c.A.svg(g),L=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const F=S.get("fill");L.stroke=F??v;const $=B.path(k(T,A,w,C,5),L),E=Math.max(w,y.width),D=C+y.height+M,O=B.rectangle(-E/2,-D/2,E,D,{...L,fill:"transparent",stroke:"none"}),R=g.insert(()=>$,":first-child").attr("class","icon-shape2"),K=g.insert(()=>O);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,n=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-i/2-o},${b?y.height/2+M/2-n/2-s:-y.height/2-M/2-n/2-s})`),t.attr("style",`color: ${S.get("stroke")??_};`)}return x.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${b?-D/2:D/2-y.height})`),R.attr("transform",`translate(0,${b?y.height/2+M/2:-y.height/2-M/2})`),p(e,K),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return N.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let a=[];return a=b?[{x:r-y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2+y.height+M},{x:r+w/2,y:i-n/2+y.height+M},{x:r+w/2,y:i+n/2},{x:r-w/2,y:i+n/2},{x:r-w/2,y:i-n/2+y.height+M},{x:r-y.width/2,y:i-n/2+y.height+M}]:[{x:r-w/2,y:i-n/2},{x:r+w/2,y:i-n/2},{x:r+w/2,y:i-n/2+C},{x:r+y.width/2,y:i-n/2+C},{x:r+y.width/2/2,y:i+n/2},{x:r-y.width/2,y:i+n/2},{x:r-y.width/2,y:i-n/2+C},{x:r-w/2,y:i-n/2+C}],N.polygon(e,a,t)},g}async function xt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=(0,n.GX)(e);e.labelStyle=o;const s=e.assetHeight??48,h=e.assetWidth??48,d=Math.max(s,h),f=i?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:y,halfPadding:m,label:x}=await u(t,e,"icon-shape default"),b="t"===e.pos,C=d+2*m,w=d+2*m,{nodeBorder:_,mainBkg:v}=r,{stylesMap:S}=(0,n.WW)(e),T=-w/2,A=-C/2,M=e.label?8:0,B=c.A.svg(g),L=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const F=S.get("fill");L.stroke=F??v;const $=B.path(k(T,A,w,C,.1),L),E=Math.max(w,y.width),D=C+y.height+M,O=B.rectangle(-E/2,-D/2,E,D,{...L,fill:"transparent",stroke:"none"}),R=g.insert(()=>$,":first-child"),K=g.insert(()=>O);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,n=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-i/2-o},${b?y.height/2+M/2-n/2-s:-y.height/2-M/2-n/2-s})`),t.attr("style",`color: ${S.get("stroke")??_};`)}return x.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${b?-D/2:D/2-y.height})`),R.attr("transform",`translate(0,${b?y.height/2+M/2:-y.height/2-M/2})`),p(e,K),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return N.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let a=[];return a=b?[{x:r-y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2+y.height+M},{x:r+w/2,y:i-n/2+y.height+M},{x:r+w/2,y:i+n/2},{x:r-w/2,y:i+n/2},{x:r-w/2,y:i-n/2+y.height+M},{x:r-y.width/2,y:i-n/2+y.height+M}]:[{x:r-w/2,y:i-n/2},{x:r+w/2,y:i-n/2},{x:r+w/2,y:i-n/2+C},{x:r+y.width/2,y:i-n/2+C},{x:r+y.width/2/2,y:i+n/2},{x:r-y.width/2,y:i+n/2},{x:r-y.width/2,y:i-n/2+C},{x:r-w/2,y:i-n/2+C}],N.polygon(e,a,t)},g}async function bt(t,e,{config:{flowchart:r}}){const i=new Image;i.src=e?.img??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/o;const{labelStyles:s}=(0,n.GX)(e);e.labelStyle=s;const h=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const d=Math.max(e.label?h??0:0,e?.assetWidth??a),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:d,g="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??o;e.width=Math.max(f,h??0);const{shapeSvg:y,bbox:m,label:x}=await u(t,e,"image-shape default"),b="t"===e.pos,k=-f/2,C=-g/2,w=e.label?8:0,_=c.A.svg(y),v=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const S=_.rectangle(k,C,f,g,v),T=Math.max(f,m.width),A=g+m.height+w,M=_.rectangle(-T/2,-A/2,T,A,{...v,fill:"none",stroke:"none"}),B=y.insert(()=>S,":first-child"),L=y.insert(()=>M);if(e.img){const t=y.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",g),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${b?A/2-g:-A/2})`)}return x.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${b?-g/2-m.height/2-w/2:g/2-m.height/2+w/2})`),B.attr("transform",`translate(0,${b?m.height/2+w/2:-m.height/2-w/2})`),p(e,L),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return N.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let a=[];return a=b?[{x:r-m.width/2,y:i-n/2},{x:r+m.width/2,y:i-n/2},{x:r+m.width/2,y:i-n/2+m.height+w},{x:r+f/2,y:i-n/2+m.height+w},{x:r+f/2,y:i+n/2},{x:r-f/2,y:i+n/2},{x:r-f/2,y:i-n/2+m.height+w},{x:r-m.width/2,y:i-n/2+m.height+w}]:[{x:r-f/2,y:i-n/2},{x:r+f/2,y:i-n/2},{x:r+f/2,y:i-n/2+g},{x:r+m.width/2,y:i-n/2+g},{x:r+m.width/2/2,y:i+n/2},{x:r-m.width/2,y:i+n/2},{x:r-m.width/2,y:i-n/2+g},{x:r-f/2,y:i-n/2+g}],N.polygon(e,a,t)},y}async function kt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),h=[{x:0,y:0},{x:s,y:0},{x:s+3*l/6,y:-l},{x:-3*l/6,y:-l}];let d;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=g(h),o=t.path(i,r);d=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),y&&d.attr("style",y)}else d=W(a,s,l,h);return i&&d.attr("style",i),e.width=s,e.height=l,p(e,d),e.intersect=function(t){return N.polygon(e,h,t)},a}async function Ct(t,e,r){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.labelStyle=i;const{shapeSvg:s,bbox:l}=await u(t,e,f(e)),h=Math.max(l.width+2*r.labelPaddingX,e?.width||0),d=Math.max(l.height+2*r.labelPaddingY,e?.height||0),g=-h/2,y=-d/2;let m,{rx:x,ry:b}=e;const{cssStyles:C}=e;if(r?.rx&&r.ry&&(x=r.rx,b=r.ry),"handDrawn"===e.look){const t=c.A.svg(s),r=(0,n.Fr)(e,{}),i=x||b?t.path(k(g,y,h,d,x||0),r):t.rectangle(g,y,h,d,r);m=s.insert(()=>i,":first-child"),m.attr("class","basic label-container").attr("style",(0,o.KL)(C))}else m=s.insert("rect",":first-child"),m.attr("class","basic label-container").attr("style",a).attr("rx",(0,o.KL)(x)).attr("ry",(0,o.KL)(b)).attr("x",g).attr("y",y).attr("width",h).attr("height",d);return p(e,m),e.calcIntersect=function(t,e){return N.rect(t,e)},e.intersect=function(t){return N.rect(e,t)},s}async function wt(t,e){const{shapeSvg:r,bbox:i,label:n}=await u(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),p(e,a),e.intersect=function(t){return N.rect(e,t)},r}async function _t(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+(e.padding??0),e?.width??0),l=Math.max(o.height+(e.padding??0),e?.height??0),h=[{x:0,y:0},{x:s+3*l/6,y:0},{x:s,y:-l},{x:-3*l/6,y:-l}];let d;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=g(h),o=t.path(i,r);d=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),y&&d.attr("style",y)}else d=W(a,s,l,h);return i&&d.attr("style",i),e.width=s,e.height=l,p(e,d),e.intersect=function(t){return N.polygon(e,h,t)},a}async function vt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+(e.padding??0),e?.width??0),l=Math.max(o.height+(e.padding??0),e?.height??0),h=[{x:-3*l/6,y:0},{x:s,y:0},{x:s+3*l/6,y:-l},{x:0,y:-l}];let d;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=g(h),o=t.path(i,r);d=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),y&&d.attr("style",y)}else d=W(a,s,l,h);return i&&d.attr("style",i),e.width=s,e.height=l,p(e,d),e.intersect=function(t){return N.polygon(e,h,t)},a}function St(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.label="",e.labelStyle=r;const a=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,s=Math.max(35,e?.width??0),h=Math.max(35,e?.height??0),u=[{x:s,y:0},{x:0,y:h+3.5},{x:s-14,y:h+3.5},{x:0,y:2*h},{x:s,y:h-3.5},{x:14,y:h-3.5}],d=c.A.svg(a),y=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=g(u),x=d.path(m,y),b=a.insert(()=>x,":first-child");return o&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",o),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(-${s/2},${-h})`),p(e,b),e.intersect=function(t){return l.Rm.info("lightningBolt intersect",e,t),N.polygon(e,u,t)},a}(0,l.K2)(pt,"hexagon"),(0,l.K2)(ft,"hourglass"),(0,l.K2)(gt,"icon"),(0,l.K2)(yt,"iconCircle"),(0,l.K2)(mt,"iconRounded"),(0,l.K2)(xt,"iconSquare"),(0,l.K2)(bt,"imageSquare"),(0,l.K2)(kt,"inv_trapezoid"),(0,l.K2)(Ct,"drawRect"),(0,l.K2)(wt,"labelRect"),(0,l.K2)(_t,"lean_left"),(0,l.K2)(vt,"lean_right"),(0,l.K2)(St,"lightningBolt");var Tt=(0,l.K2)((t,e,r,i,n,a,o)=>[`M${t},${e+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),At=(0,l.K2)((t,e,r,i,n,a,o)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Mt=(0,l.K2)((t,e,r,i,n,a)=>[`M${t-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Bt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l}=await u(t,e,f(e)),h=Math.max(s.width+(e.padding??0),e.width??0),d=h/2,g=d/(2.5+h/50),y=Math.max(s.height+g+(e.padding??0),e.height??0),m=.1*y;let x;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=At(0,0,h,y,d,g,m),i=Mt(0,g,h,y,d,g),o=(0,n.Fr)(e,{}),s=t.path(r,o),l=t.path(i,o);a.insert(()=>l,":first-child").attr("class","line"),x=a.insert(()=>s,":first-child"),x.attr("class","basic label-container"),b&&x.attr("style",b)}else{const t=Tt(0,0,h,y,d,g,m);x=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(b)).attr("style",i)}return x.attr("label-offset-y",g),x.attr("transform",`translate(${-h/2}, ${-(y/2+g)})`),p(e,x),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2+g-(s.y-(s.top??0))})`),e.intersect=function(t){const r=N.rect(e,t),i=r.x-(e.x??0);if(0!=d&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-g)){let n=g*g*(1-i*i/(d*d));n>0&&(n=Math.sqrt(n)),n=g-n,t.y-(e.y??0)>0&&(n=-n),r.y+=n}return r},a}async function Lt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),h=Math.max(o.height+2*(e.padding??0),e?.height??0),d=h/4,g=h+d,{cssStyles:m}=e,x=c.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=[{x:-l/2-l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:g/2},...y(-l/2-l/2*.1,g/2,l/2+l/2*.1,g/2,d,.8),{x:l/2+l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:-g/2},{x:-l/2,y:-g/2},{x:-l/2,y:g/2*1.1},{x:-l/2,y:-g/2}],C=x.polygon(k.map(t=>[t.x,t.y]),b),w=a.insert(()=>C,":first-child");return w.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)+l/2*.1/2-(o.x-(o.left??0))},${-h/2+(e.padding??0)-d/2-(o.y-(o.top??0))})`),p(e,w),e.intersect=function(t){return N.polygon(e,k,t)},a}async function Ft(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),h=Math.max(o.height+2*(e.padding??0),e?.height??0),d=-l/2,y=-h/2,{cssStyles:m}=e,x=c.A.svg(a),b=(0,n.Fr)(e,{}),k=[{x:d-5,y:y+5},{x:d-5,y:y+h+5},{x:d+l-5,y:y+h+5},{x:d+l-5,y:y+h},{x:d+l,y:y+h},{x:d+l,y:y+h-5},{x:d+l+5,y:y+h-5},{x:d+l+5,y:y-5},{x:d+5,y:y-5},{x:d+5,y},{x:d,y},{x:d,y:y+5}],C=[{x:d,y:y+5},{x:d+l-5,y:y+5},{x:d+l-5,y:y+h},{x:d+l,y:y+h},{x:d+l,y},{x:d,y}];"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=g(k),_=x.path(w,b),v=g(C),S=x.path(v,{...b,fill:"none"}),T=a.insert(()=>S,":first-child");return T.insert(()=>_,":first-child"),T.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),s.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-(o.y-(o.top??0))})`),p(e,T),e.intersect=function(t){return N.polygon(e,k,t)},a}async function $t(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),h=Math.max(o.height+2*(e.padding??0),e?.height??0),d=h/4,m=h+d,x=-l/2,b=-m/2,{cssStyles:k}=e,C=y(x-5,b+m+5,x+l-5,b+m+5,d,.8),w=C?.[C.length-1],_=[{x:x-5,y:b+5},{x:x-5,y:b+m+5},...C,{x:x+l-5,y:w.y-5},{x:x+l,y:w.y-5},{x:x+l,y:w.y-10},{x:x+l+5,y:w.y-10},{x:x+l+5,y:b-5},{x:x+5,y:b-5},{x:x+5,y:b},{x,y:b},{x,y:b+5}],v=[{x,y:b+5},{x:x+l-5,y:b+5},{x:x+l-5,y:w.y-5},{x:x+l,y:w.y-5},{x:x+l,y:b},{x,y:b}],S=c.A.svg(a),T=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const A=g(_),M=S.path(A,T),B=g(v),L=S.path(B,T),F=a.insert(()=>M,":first-child");return F.insert(()=>L),F.attr("class","basic label-container"),k&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-d/2-(o.y-(o.top??0))})`),p(e,F),e.intersect=function(t){return N.polygon(e,_,t)},a}async function Et(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.labelStyle=i,e.useHtmlLabels||(0,s.E)((0,s.zj)())||(e.centerLabel=!0);const{shapeSvg:o,bbox:l,label:h}=await u(t,e,f(e)),d=Math.max(l.width+2*(e.padding??0),e?.width??0),g=Math.max(l.height+2*(e.padding??0),e?.height??0),y=-d/2,m=-g/2,{cssStyles:x}=e,b=c.A.svg(o),k=(0,n.Fr)(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const C=b.rectangle(y,m,d,g,k),w=o.insert(()=>C,":first-child");return w.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",x),a&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",a),h.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),p(e,w),e.intersect=function(t){return N.rect(e,t)},o}(0,l.K2)(Bt,"linedCylinder"),(0,l.K2)(Lt,"linedWaveEdgedRect"),(0,l.K2)(Ft,"multiRect"),(0,l.K2)($t,"multiWaveEdgedRectangle"),(0,l.K2)(Et,"note");var Dt=(0,l.K2)((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Ot(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.width+e.padding+(o.height+e.padding),l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let h;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=Dt(0,0,s),o=t.path(i,r);h=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2+.5}, ${s/2})`),d&&h.attr("style",d)}else h=W(a,s,s,l),h.attr("transform",`translate(${-s/2+.5}, ${s/2})`);return i&&h.attr("style",i),p(e,h),e.calcIntersect=function(t,e){const r=t.width,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],n=N.polygon(t,i,e);return{x:n.x-.5,y:n.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},a}async function Rt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=-Math.max(o.width+(e.padding??0),e?.width??0)/2,h=-Math.max(o.height+(e.padding??0),e?.height??0)/2,d=h/2,y=[{x:l+d,y:h},{x:l,y:0},{x:l+d,y:-h},{x:-l,y:-h},{x:-l,y:h}],{cssStyles:m}=e,x=c.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=g(y),C=x.path(k,b),w=a.insert(()=>C,":first-child");return w.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-d/2},0)`),s.attr("transform",`translate(${-d/2-o.width/2-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),p(e,w),e.intersect=function(t){return N.polygon(e,y,t)},a}async function Kt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);let a;e.labelStyle=r,a=e.cssClasses?"node "+e.cssClasses:"node default";const o=t.insert("g").attr("class",a).attr("id",e.domId||e.id),u=o.insert("g"),d=o.insert("g").attr("class","label").attr("style",i),f=e.description,g=e.label,y=await b(d,g,e.labelStyle,!0,!0);let m={width:0,height:0};if((0,s.E)((0,s.D7)())){const t=y.children[0],e=(0,h.Ltv)(y);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}l.Rm.info("Text 2",f);const x=f||[],C=y.getBBox(),w=await b(d,Array.isArray(x)?x.join("<br/>"):x,e.labelStyle,!0,!0),_=w.children[0],v=(0,h.Ltv)(w);m=_.getBoundingClientRect(),v.attr("width",m.width),v.attr("height",m.height);const S=(e.padding||0)/2;(0,h.Ltv)(w).attr("transform","translate( "+(m.width>C.width?0:(C.width-m.width)/2)+", "+(C.height+S+5)+")"),(0,h.Ltv)(y).attr("transform","translate( "+(m.width<C.width?0:-(C.width-m.width)/2)+", 0)"),m=d.node().getBBox(),d.attr("transform","translate("+-m.width/2+", "+(-m.height/2-S+3)+")");const T=m.width+(e.padding||0),A=m.height+(e.padding||0),M=-m.width/2-S,B=-m.height/2-S;let L,F;if("handDrawn"===e.look){const t=c.A.svg(o),r=(0,n.Fr)(e,{}),i=t.path(k(M,B,T,A,e.rx||0),r),a=t.line(-m.width/2-S,-m.height/2-S+C.height+S,m.width/2+S,-m.height/2-S+C.height+S,r);F=o.insert(()=>(l.Rm.debug("Rough node insert CXC",i),a),":first-child"),L=o.insert(()=>(l.Rm.debug("Rough node insert CXC",i),i),":first-child")}else L=u.insert("rect",":first-child"),F=u.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-m.width/2-S).attr("y",-m.height/2-S).attr("width",m.width+(e.padding||0)).attr("height",m.height+(e.padding||0)),F.attr("class","divider").attr("x1",-m.width/2-S).attr("x2",m.width/2+S).attr("y1",-m.height/2-S+C.height+S).attr("y2",-m.height/2-S+C.height+S);return p(e,L),e.intersect=function(t){return N.rect(e,t)},o}async function It(t,e){return Ct(t,e,{rx:5,ry:5,classes:"",labelPaddingX:1*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})}async function Nt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l}=await u(t,e,f(e)),h=e?.padding??0,d=Math.max(s.width+2*(e.padding??0),e?.width??0),g=Math.max(s.height+2*(e.padding??0),e?.height??0),y=-s.width/2-h,m=-s.height/2-h,{cssStyles:x}=e,b=c.A.svg(a),k=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const C=[{x:y,y:m},{x:y+d+8,y:m},{x:y+d+8,y:m+g},{x:y-8,y:m+g},{x:y-8,y:m},{x:y,y:m},{x:y,y:m+g}],w=b.polygon(C.map(t=>[t.x,t.y]),k),_=a.insert(()=>w,":first-child");return _.attr("class","basic label-container").attr("style",(0,o.KL)(x)),i&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",i),x&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",i),l.attr("transform",`translate(${-d/2+4+(e.padding??0)-(s.x-(s.left??0))},${-g/2+(e.padding??0)-(s.y-(s.top??0))})`),p(e,_),e.intersect=function(t){return N.rect(e,t)},a}async function Pt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),h=Math.max(o.height+2*(e.padding??0),e?.height??0),d=-l/2,y=-h/2,{cssStyles:m}=e,x=c.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=[{x:d,y},{x:d,y:y+h},{x:d+l,y:y+h},{x:d+l,y:y-h/2}],C=g(k),w=x.path(C,b),_=a.insert(()=>w,":first-child");return _.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",m),i&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${h/4})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))}, ${-h/4+(e.padding??0)-(o.y-(o.top??0))})`),p(e,_),e.intersect=function(t){return N.polygon(e,k,t)},a}async function zt(t,e){return Ct(t,e,{rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})}async function qt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.height+e.padding,l=o.width+s/4+e.padding,h=s/2,{cssStyles:d}=e,y=c.A.svg(a),x=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-l/2+h,y:-s/2},{x:l/2-h,y:-s/2},...m(-l/2+h,0,h,50,90,270),{x:l/2-h,y:s/2},...m(l/2-h,0,h,50,270,450)],k=g(b),C=y.path(k,x),w=a.insert(()=>C,":first-child");return w.attr("class","basic label-container outer-path"),d&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",i),p(e,w),e.intersect=function(t){return N.polygon(e,b,t)},a}async function Wt(t,e){return Ct(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function jt(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.labelStyle=i;const{cssStyles:o}=e,{lineColor:s,stateBorder:l,nodeBorder:h}=r,u=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),d=c.A.svg(u),f=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const g=d.circle(0,0,14,{...f,stroke:s,strokeWidth:2}),y=l??h,m=d.circle(0,0,5,{...f,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),x=u.insert(()=>g,":first-child");return x.insert(()=>m),o&&x.selectAll("path").attr("style",o),a&&x.selectAll("path").attr("style",a),p(e,x),e.intersect=function(t){return N.circle(e,7,t)},u}function Ht(t,e,{config:{themeVariables:r}}){const{lineColor:i}=r,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let o;if("handDrawn"===e.look){const t=c.A.svg(a).circle(0,0,14,(0,n.ue)(i));o=a.insert(()=>t),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return p(e,o),e.intersect=function(t){return N.circle(e,7,t)},a}async function Ut(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),l=(e?.padding||0)/2,h=s.width+e.padding,d=s.height+e.padding,g=-s.width/2-l,y=-s.height/2-l,m=[{x:0,y:0},{x:h,y:0},{x:h,y:-d},{x:0,y:-d},{x:0,y:0},{x:-8,y:0},{x:h+8,y:0},{x:h+8,y:-d},{x:-8,y:-d},{x:-8,y:0}];if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=t.rectangle(g-8,y,h+16,d,r),s=t.line(g,y,g,y+d,r),l=t.line(g+h,y,g+h,y+d,r);a.insert(()=>s,":first-child"),a.insert(()=>l,":first-child");const u=a.insert(()=>i,":first-child"),{cssStyles:f}=e;u.attr("class","basic label-container").attr("style",(0,o.KL)(f)),p(e,u)}else{const t=W(a,h,d,m);i&&t.attr("style",i),p(e,t)}return e.intersect=function(t){return N.polygon(e,m,t)},a}async function Yt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),h=-s/2,d=-l/2,y=.2*l,m=.2*l,{cssStyles:x}=e,b=c.A.svg(a),k=(0,n.Fr)(e,{}),C=[{x:h-y/2,y:d},{x:h+s+y/2,y:d},{x:h+s+y/2,y:d+l},{x:h-y/2,y:d+l}],w=[{x:h+s-y/2,y:d+l},{x:h+s+y/2,y:d+l},{x:h+s+y/2,y:d+l-m}];"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const _=g(C),v=b.path(_,k),S=g(w),T=b.path(S,{...k,fillStyle:"solid"}),A=a.insert(()=>T,":first-child");return A.insert(()=>v,":first-child"),A.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",x),i&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",i),p(e,A),e.intersect=function(t){return N.polygon(e,C,t)},a}async function Gt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),h=Math.max(o.height+2*(e.padding??0),e?.height??0),d=h/4,m=.2*l,x=.2*h,b=h+d,{cssStyles:k}=e,C=c.A.svg(a),w=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const _=[{x:-l/2-l/2*.1,y:b/2},...y(-l/2-l/2*.1,b/2,l/2+l/2*.1,b/2,d,.8),{x:l/2+l/2*.1,y:-b/2},{x:-l/2-l/2*.1,y:-b/2}],v=-l/2+l/2*.1,S=-b/2-.4*x,T=[{x:v+l-m,y:1.4*(S+h)},{x:v+l,y:S+h-x},{x:v+l,y:.9*(S+h)},...y(v+l,1.3*(S+h),v+l-m,1.5*(S+h),.03*-h,.5)],A=g(_),M=C.path(A,w),B=g(T),L=C.path(B,{...w,fillStyle:"solid"}),F=a.insert(()=>L,":first-child");return F.insert(()=>M,":first-child"),F.attr("class","basic label-container"),k&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))},${-h/2+(e.padding??0)-d/2-(o.y-(o.top??0))})`),p(e,F),e.intersect=function(t){return N.polygon(e,_,t)},a}async function Xt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+e.padding,e?.width||0),l=Math.max(o.height+e.padding,e?.height||0),h=-s/2,c=-l/2,d=a.insert("rect",":first-child");return d.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",h).attr("y",c).attr("width",s).attr("height",l),p(e,d),e.intersect=function(t){return N.rect(e,t)},a}(0,l.K2)(Ot,"question"),(0,l.K2)(Rt,"rect_left_inv_arrow"),(0,l.K2)(Kt,"rectWithTitle"),(0,l.K2)(It,"roundedRect"),(0,l.K2)(Nt,"shadedProcess"),(0,l.K2)(Pt,"slopedRect"),(0,l.K2)(zt,"squareRect"),(0,l.K2)(qt,"stadium"),(0,l.K2)(Wt,"state"),(0,l.K2)(jt,"stateEnd"),(0,l.K2)(Ht,"stateStart"),(0,l.K2)(Ut,"subroutine"),(0,l.K2)(Yt,"taggedRect"),(0,l.K2)(Gt,"taggedWaveEdgedRectangle"),(0,l.K2)(Xt,"text");var Vt=(0,l.K2)((t,e,r,i,n,a)=>`M${t},${e}\n a${n},${a} 0,0,1 0,${-i}\n l${r},0\n a${n},${a} 0,0,1 0,${i}\n M${r},${-i}\n a${n},${a} 0,0,0 0,${i}\n l${-r},0`,"createCylinderPathD"),Zt=(0,l.K2)((t,e,r,i,n,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Qt=(0,l.K2)((t,e,r,i,n,a)=>[`M${t+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Jt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l,halfPadding:h}=await u(t,e,f(e)),d="neo"===e.look?2*h:h,g=s.height+d,y=g/2,m=y/(2.5+g/50),x=s.width+m+d,{cssStyles:b}=e;let k;if("handDrawn"===e.look){const t=c.A.svg(a),r=Zt(0,0,x,g,m,y),i=Qt(0,0,x,g,m,y),o=t.path(r,(0,n.Fr)(e,{})),s=t.path(i,(0,n.Fr)(e,{fill:"none"}));k=a.insert(()=>s,":first-child"),k=a.insert(()=>o,":first-child"),k.attr("class","basic label-container"),b&&k.attr("style",b)}else{const t=Vt(0,0,x,g,m,y);k=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(b)).attr("style",i),k.attr("class","basic label-container"),b&&k.selectAll("path").attr("style",b),i&&k.selectAll("path").attr("style",i)}return k.attr("label-offset-x",m),k.attr("transform",`translate(${-x/2}, ${g/2} )`),l.attr("transform",`translate(${-s.width/2-m-(s.x-(s.left??0))}, ${-s.height/2-(s.y-(s.top??0))})`),p(e,k),e.intersect=function(t){const r=N.rect(e,t),i=r.y-(e.y??0);if(0!=y&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-m)){let n=m*m*(1-i*i/(y*y));0!=n&&(n=Math.sqrt(Math.abs(n))),n=m-n,t.x-(e.x??0)>0&&(n=-n),r.x+=n}return r},a}async function te(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.width+e.padding,l=o.height+e.padding,h=[{x:-3*l/6,y:0},{x:s+3*l/6,y:0},{x:s,y:-l},{x:0,y:-l}];let d;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=g(h),o=t.path(i,r);d=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),y&&d.attr("style",y)}else d=W(a,s,l,h);return i&&d.attr("style",i),e.width=s,e.height=l,p(e,d),e.intersect=function(t){return N.polygon(e,h,t)},a}async function ee(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(60,o.width+2*(e.padding??0),e?.width??0),l=Math.max(20,o.height+2*(e.padding??0),e?.height??0),{cssStyles:h}=e,d=c.A.svg(a),y=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:-s/2*.8,y:-l/2},{x:s/2*.8,y:-l/2},{x:s/2,y:-l/2*.6},{x:s/2,y:l/2},{x:-s/2,y:l/2},{x:-s/2,y:-l/2*.6}],x=g(m),b=d.path(x,y),k=a.insert(()=>b,":first-child");return k.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",i),p(e,k),e.intersect=function(t){return N.polygon(e,m,t)},a}async function re(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:h}=await u(t,e,f(e)),d=e.useHtmlLabels||(0,s.E)((0,s.D7)()),y=o.width+(e.padding??0),m=y+o.height,x=y+o.height,b=[{x:0,y:0},{x,y:0},{x:x/2,y:-m}],{cssStyles:k}=e,C=c.A.svg(a),w=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const _=g(b),v=C.path(_,w),S=a.insert(()=>v,":first-child").attr("transform",`translate(${-m/2}, ${m/2})`);return k&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",k),i&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",i),e.width=y,e.height=m,p(e,S),h.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${m/2-(o.height+(e.padding??0)/(d?2:1)-(o.y-(o.top??0)))})`),e.intersect=function(t){return l.Rm.info("Triangle intersect",e,b,t),N.polygon(e,b,t)},a}async function ie(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),h=Math.max(o.height+2*(e.padding??0),e?.height??0),d=h/8,m=h+d,{cssStyles:x}=e,b=70-l,k=b>0?b/2:0,C=c.A.svg(a),w=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const _=[{x:-l/2-k,y:m/2},...y(-l/2-k,m/2,l/2+k,m/2,d,.8),{x:l/2+k,y:-m/2},{x:-l/2-k,y:-m/2}],v=g(_),S=C.path(v,w),T=a.insert(()=>S,":first-child");return T.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",x),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))},${-h/2+(e.padding??0)-d-(o.y-(o.top??0))})`),p(e,T),e.intersect=function(t){return N.polygon(e,_,t)},a}async function ne(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),h=s/l;let d=s,m=l;d>m*h?m=d/h:d=m*h,d=Math.max(d,100),m=Math.max(m,50);const x=Math.min(.2*m,m/4),b=m+2*x,{cssStyles:k}=e,C=c.A.svg(a),w=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const _=[{x:-d/2,y:b/2},...y(-d/2,b/2,d/2,b/2,x,1),{x:d/2,y:-b/2},...y(d/2,-b/2,-d/2,-b/2,x,-1)],v=g(_),S=C.path(v,w),T=a.insert(()=>S,":first-child");return T.attr("class","basic label-container"),k&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),p(e,T),e.intersect=function(t){return N.polygon(e,_,t)},a}async function ae(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),h=Math.max(o.height+2*(e.padding??0),e?.height??0),d=-l/2,g=-h/2,{cssStyles:y}=e,m=c.A.svg(a),x=(0,n.Fr)(e,{}),b=[{x:d-5,y:g-5},{x:d-5,y:g+h},{x:d+l,y:g+h},{x:d+l,y:g-5}],k=`M${d-5},${g-5} L${d+l},${g-5} L${d+l},${g+h} L${d-5},${g+h} L${d-5},${g-5}\n M${d-5},${g} L${d+l},${g}\n M${d},${g-5} L${d},${g+h}`;"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const C=m.path(k,x),w=a.insert(()=>C,":first-child");return w.attr("transform","translate(2.5, 2.5)"),w.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",i),s.attr("transform",`translate(${-o.width/2+2.5-(o.x-(o.left??0))}, ${-o.height/2+2.5-(o.y-(o.top??0))})`),p(e,w),e.intersect=function(t){return N.polygon(e,b,t)},a}async function oe(t,e){const r=e;if(r.alias&&(e.label=r.alias),"handDrawn"===e.look){const{themeVariables:r}=(0,s.zj)(),{background:i}=r,n={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${i}`]};await oe(t,n)}const i=(0,s.zj)();e.useHtmlLabels=i.htmlLabels;let a=i.er?.diagramPadding??10,l=i.er?.entityPadding??6;const{cssStyles:u}=e,{labelStyles:d,nodeStyles:g}=(0,n.GX)(e);if(0===r.attributes.length&&e.label){const r={rx:0,ry:0,labelPaddingX:a,labelPaddingY:1.5*a,classes:""};(0,o.Un)(e.label,i)+2*r.labelPaddingX<i.er.minEntityWidth&&(e.width=i.er.minEntityWidth);const n=await Ct(t,e,r);if(!(0,s._3)(i.htmlLabels)){const t=n.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return n}i.htmlLabels||(a*=1.25,l*=1.25);let y=f(e);y||(y="node default");const m=t.insert("g").attr("class",y).attr("id",e.domId||e.id),x=await se(m,e.label??"",i,0,0,["name"],d);x.height+=l;let b=0;const k=[],C=[];let w=0,_=0,v=0,S=0,T=!0,A=!0;for(const t of r.attributes){const e=await se(m,t.type,i,0,b,["attribute-type"],d);w=Math.max(w,e.width+a);const r=await se(m,t.name,i,0,b,["attribute-name"],d);_=Math.max(_,r.width+a);const n=await se(m,t.keys.join(),i,0,b,["attribute-keys"],d);v=Math.max(v,n.width+a);const o=await se(m,t.comment,i,0,b,["attribute-comment"],d);S=Math.max(S,o.width+a);const s=Math.max(e.height,r.height,n.height,o.height)+l;C.push({yOffset:b,rowHeight:s}),b+=s}let M=4;v<=a&&(T=!1,v=0,M--),S<=a&&(A=!1,S=0,M--);const B=m.node().getBBox();if(x.width+2*a-(w+_+v+S)>0){const t=x.width+2*a-(w+_+v+S);w+=t/M,_+=t/M,v>0&&(v+=t/M),S>0&&(S+=t/M)}const L=w+_+v+S,F=c.A.svg(m),$=(0,n.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let E=0;C.length>0&&(E=C.reduce((t,e)=>t+(e?.rowHeight??0),0));const D=Math.max(B.width+2*a,e?.width||0,L),O=Math.max((E??0)+x.height,e?.height||0),R=-D/2,K=-O/2;m.selectAll("g:not(:first-child)").each((t,e,r)=>{const i=(0,h.Ltv)(r[e]),n=i.attr("transform");let o=0,s=0;if(n){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(o=parseFloat(t[1]),s=parseFloat(t[2]),i.attr("class").includes("attribute-name")?o+=w:i.attr("class").includes("attribute-keys")?o+=w+_:i.attr("class").includes("attribute-comment")&&(o+=w+_+v))}i.attr("transform",`translate(${R+a/2+o}, ${s+K+x.height+l/2})`)}),m.select(".name").attr("transform","translate("+-x.width/2+", "+(K+l/2)+")");const I=F.rectangle(R,K,D,O,$),P=m.insert(()=>I,":first-child").attr("style",u.join("")),{themeVariables:z}=(0,s.zj)(),{rowEven:q,rowOdd:W,nodeBorder:j}=z;k.push(0);for(const[t,e]of C.entries()){const r=(t+1)%2==0&&0!==e.yOffset,i=F.rectangle(R,x.height+K+e?.yOffset,D,e?.rowHeight,{...$,fill:r?q:W,stroke:j});m.insert(()=>i,"g.label").attr("style",u.join("")).attr("class","row-rect-"+(r?"even":"odd"))}let H=F.line(R,x.height+K,D+R,x.height+K,$);m.insert(()=>H).attr("class","divider"),H=F.line(w+R,x.height+K,w+R,O+K,$),m.insert(()=>H).attr("class","divider"),T&&(H=F.line(w+_+R,x.height+K,w+_+R,O+K,$),m.insert(()=>H).attr("class","divider")),A&&(H=F.line(w+_+v+R,x.height+K,w+_+v+R,O+K,$),m.insert(()=>H).attr("class","divider"));for(const t of k)H=F.line(R,x.height+K+t,D+R,x.height+K+t,$),m.insert(()=>H).attr("class","divider");if(p(e,P),g&&"handDrawn"!==e.look){const t=g.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");m.selectAll("path").attr("style",e??""),m.selectAll(".row-rect-even path").attr("style",g)}return e.intersect=function(t){return N.rect(e,t)},m}async function se(t,e,r,i=0,n=0,l=[],c=""){const u=t.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",c);e!==(0,s.QO)(e)&&(e=(e=(0,s.QO)(e)).replaceAll("<","<").replaceAll(">",">"));const d=u.node().appendChild(await(0,a.GZ)(u,e,{width:(0,o.Un)(e,r)+100,style:c,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let t=d.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let p=d.getBBox();if((0,s._3)(r.htmlLabels)){const t=d.children[0];t.style.textAlign="start";const e=(0,h.Ltv)(d);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return p}async function le(t,e,r,i,n=r.class.padding??12){const a=i?0:3,o=t.insert("g").attr("class",f(e)).attr("id",e.domId||e.id);let s=null,l=null,h=null,c=null,u=0,d=0,p=0;if(s=o.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await he(s,{text:`«${t}»`},0),u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await he(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,h=o.insert("g").attr("class","members-group text");let y=0;for(const t of e.members)y+=await he(h,t,y,[t.parseClassifier()])+a;p=h.node().getBBox().height,p<=0&&(p=n/2),c=o.insert("g").attr("class","methods-group text");let m=0;for(const t of e.methods)m+=await he(c,t,m,[t.parseClassifier()])+a;let x=o.node().getBBox();if(null!==s){const t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+d+2*n})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+d+(p?p+4*n:2*n)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}async function he(t,e,r,i=[]){const n=t.insert("g").attr("class","label").attr("style",i.join("; ")),c=(0,s.zj)();let u="useHtmlLabels"in e?e.useHtmlLabels:(0,s._3)(c.htmlLabels)??!0,d="";d="text"in e?e.text:e.label,!u&&d.startsWith("\\")&&(d=d.substring(1)),(0,s.Wi)(d)&&(u=!0);const p=await(0,a.GZ)(n,(0,s.oB)((0,o.Sm)(d)),{width:(0,o.Un)(d,c)+50,classes:"markdown-node-label",useHtmlLabels:u},c);let f,g=1;if(u){const t=p.children[0],e=(0,h.Ltv)(p);g=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(g+=t.innerHTML.split("<mrow>").length-1);const r=t.getElementsByTagName("img");if(r){const t=""===d.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=c.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,r=5,i=parseInt(t,10)*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}(0,l.K2)(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}else{i.includes("font-weight: bolder")&&(0,h.Ltv)(p).selectAll("tspan").attr("font-weight",""),g=p.children.length;const t=p.children[0];(""===p.textContent||p.textContent.includes(">"))&&(t.textContent=d[0]+d.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "===d[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),f=p.getBBox()}return n.attr("transform","translate(0,"+(-f.height/(2*g)+r)+")"),f.height}async function ce(t,e){const r=(0,s.D7)(),i=r.class.padding??12,a=i,o=e.useHtmlLabels??(0,s._3)(r.htmlLabels)??!0,l=e;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:u,bbox:d}=await le(t,e,r,o,a),{labelStyles:f,nodeStyles:g}=(0,n.GX)(e);e.labelStyle=f,e.cssStyles=l.styles||"";const y=l.styles?.join(";")||g||"";e.cssStyles||(e.cssStyles=y.replaceAll("!important","").split(";"));const m=0===l.members.length&&0===l.methods.length&&!r.class?.hideEmptyMembersBox,x=c.A.svg(u),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=d.width;let C=d.height;0===l.members.length&&0===l.methods.length?C+=a:l.members.length>0&&0===l.methods.length&&(C+=2*a);const w=-k/2,_=-C/2,v=x.rectangle(w-i,_-i-(m?i:0===l.members.length&&0===l.methods.length?-i/2:0),k+2*i,C+2*i+(m?2*i:0===l.members.length&&0===l.methods.length?-i:0),b),S=u.insert(()=>v,":first-child");S.attr("class","basic label-container");const T=S.node().getBBox();u.selectAll(".text").each((t,e,r)=>{const n=(0,h.Ltv)(r[e]),a=n.attr("transform");let s=0;if(a){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);t&&(s=parseFloat(t[2]))}let c=s+_+i-(m?i:0===l.members.length&&0===l.methods.length?-i/2:0);o||(c-=4);let d=w;(n.attr("class").includes("label-group")||n.attr("class").includes("annotation-group"))&&(d=-n.node()?.getBBox().width/2||0,u.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(d=0)})),n.attr("transform",`translate(${d}, ${c})`)});const A=u.select(".annotation-group").node().getBBox().height-(m?i/2:0)||0,M=u.select(".label-group").node().getBBox().height-(m?i/2:0)||0,B=u.select(".members-group").node().getBBox().height-(m?i/2:0)||0;if(l.members.length>0||l.methods.length>0||m){const t=x.line(T.x,A+M+_+i,T.x+T.width,A+M+_+i,b);u.insert(()=>t).attr("class","divider").attr("style",y)}if(m||l.members.length>0||l.methods.length>0){const t=x.line(T.x,A+M+B+_+2*a+i,T.x+T.width,A+M+B+_+i+2*a,b);u.insert(()=>t).attr("class","divider").attr("style",y)}if("handDrawn"!==l.look&&u.selectAll("path").attr("style",y),S.select(":nth-child(2)").attr("style",y),u.selectAll(".divider").select("path").attr("style",y),e.labelStyle?u.selectAll("span").attr("style",e.labelStyle):u.selectAll("span").attr("style",y),!o){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(y);if(e){const t=e[0].replace("color","fill");u.selectAll("tspan").attr("style",t)}else if(f){const e=t.exec(f);if(e){const t=e[0].replace("color","fill");u.selectAll("tspan").attr("style",t)}}}return p(e,S),e.intersect=function(t){return N.rect(e,t)},u}async function ue(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const a=e,o=e,s="verifyMethod"in e,l=f(e),u=t.insert("g").attr("class",l).attr("id",e.domId??e.id);let d;d=s?await de(u,`<<${a.type}>>`,0,e.labelStyle):await de(u,"<<Element>>",0,e.labelStyle);let g=d;const y=await de(u,a.name,g,e.labelStyle+"; font-weight: bold;");g+=y+20,s?(g+=await de(u,a.requirementId?`ID: ${a.requirementId}`:"",g,e.labelStyle),g+=await de(u,a.text?`Text: ${a.text}`:"",g,e.labelStyle),g+=await de(u,a.risk?`Risk: ${a.risk}`:"",g,e.labelStyle),await de(u,a.verifyMethod?`Verification: ${a.verifyMethod}`:"",g,e.labelStyle)):(g+=await de(u,o.type?`Type: ${o.type}`:"",g,e.labelStyle),await de(u,o.docRef?`Doc Ref: ${o.docRef}`:"",g,e.labelStyle));const m=(u.node()?.getBBox().width??200)+20,x=(u.node()?.getBBox().height??200)+20,b=-m/2,k=-x/2,C=c.A.svg(u),w=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const _=C.rectangle(b,k,m,x,w),v=u.insert(()=>_,":first-child");if(v.attr("class","basic label-container").attr("style",i),u.selectAll(".label").each((t,e,r)=>{const i=(0,h.Ltv)(r[e]),n=i.attr("transform");let a=0,o=0;if(n){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(a=parseFloat(t[1]),o=parseFloat(t[2]))}const s=o-x/2;let l=b+10;0!==e&&1!==e||(l=a),i.attr("transform",`translate(${l}, ${s+20})`)}),g>d+y+20){const t=C.line(b,k+d+y+20,b+m,k+d+y+20,w);u.insert(()=>t).attr("style",i)}return p(e,v),e.intersect=function(t){return N.rect(e,t)},u}async function de(t,e,r,i=""){if(""===e)return 0;const n=t.insert("g").attr("class","label").attr("style",i),l=(0,s.D7)(),c=l.htmlLabels??!0,u=await(0,a.GZ)(n,(0,s.oB)((0,o.Sm)(e)),{width:(0,o.Un)(e,l)+50,classes:"markdown-node-label",useHtmlLabels:c,style:i},l);let d;if(c){const t=u.children[0],e=(0,h.Ltv)(u);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}else{const t=u.children[0];for(const e of t.children)e.textContent=e.textContent.replaceAll(">",">").replaceAll("<","<"),i&&e.setAttribute("style",i);d=u.getBBox(),d.height+=6}return n.attr("transform",`translate(${-d.width/2},${-d.height/2+r})`),d.height}(0,l.K2)(Jt,"tiltedCylinder"),(0,l.K2)(te,"trapezoid"),(0,l.K2)(ee,"trapezoidalPentagon"),(0,l.K2)(re,"triangle"),(0,l.K2)(ie,"waveEdgedRectangle"),(0,l.K2)(ne,"waveRectangle"),(0,l.K2)(ae,"windowPane"),(0,l.K2)(oe,"erBox"),(0,l.K2)(se,"addText"),(0,l.K2)(le,"textHelper"),(0,l.K2)(he,"addText"),(0,l.K2)(ce,"classBox"),(0,l.K2)(ue,"requirementBox"),(0,l.K2)(de,"addText");var pe=(0,l.K2)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function fe(t,e,{config:r}){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.labelStyle=i||"";const o=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:l,label:h}=await u(t,e,f(e)),g=e.padding||10;let y,m="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(m=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),y=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",m).attr("target","_blank"));const x={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let b,C;({label:b,bbox:C}=y?await d(y,"ticket"in e&&e.ticket||"",x):await d(s,"ticket"in e&&e.ticket||"",x));const{label:w,bbox:_}=await d(s,"assigned"in e&&e.assigned||"",x);e.width=o;const v=e?.width||0,S=Math.max(C.height,_.height)/2,T=Math.max(l.height+20,e?.height||0)+S,A=-v/2,M=-T/2;let B;h.attr("transform","translate("+(g-v/2)+", "+(-S-l.height/2)+")"),b.attr("transform","translate("+(g-v/2)+", "+(-S+l.height/2)+")"),w.attr("transform","translate("+(g+v/2-_.width-20)+", "+(-S+l.height/2)+")");const{rx:L,ry:F}=e,{cssStyles:$}=e;if("handDrawn"===e.look){const t=c.A.svg(s),r=(0,n.Fr)(e,{}),i=L||F?t.path(k(A,M,v,T,L||0),r):t.rectangle(A,M,v,T,r);B=s.insert(()=>i,":first-child"),B.attr("class","basic label-container").attr("style",$||null)}else{B=s.insert("rect",":first-child"),B.attr("class","basic label-container __APA__").attr("style",a).attr("rx",L??5).attr("ry",F??5).attr("x",A).attr("y",M).attr("width",v).attr("height",T);const t="priority"in e&&e.priority;if(t){const e=s.append("line"),r=A+2,i=M+Math.floor((L??0)/2),n=M+T-Math.floor((L??0)/2);e.attr("x1",r).attr("y1",i).attr("x2",r).attr("y2",n).attr("stroke-width","4").attr("stroke",pe(t))}}return p(e,B),e.height=T,e.intersect=function(t){return N.rect(e,t)},s}async function ge(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:h,label:d}=await u(t,e,f(e)),g=s.width+10*h,y=s.height+8*h,m=.15*g,{cssStyles:x}=e,b=s.width+20,k=s.height+20,C=Math.max(g,b),w=Math.max(y,k);let _;d.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);const v=`M0 0 \n a${m},${m} 1 0,0 ${.25*C},${-1*w*.1}\n a${m},${m} 1 0,0 ${.25*C},0\n a${m},${m} 1 0,0 ${.25*C},0\n a${m},${m} 1 0,0 ${.25*C},${.1*w}\n\n a${m},${m} 1 0,0 ${.15*C},${.33*w}\n a${.8*m},${.8*m} 1 0,0 0,${.34*w}\n a${m},${m} 1 0,0 ${-1*C*.15},${.33*w}\n\n a${m},${m} 1 0,0 ${-1*C*.25},${.15*w}\n a${m},${m} 1 0,0 ${-1*C*.25},0\n a${m},${m} 1 0,0 ${-1*C*.25},0\n a${m},${m} 1 0,0 ${-1*C*.25},${-1*w*.15}\n\n a${m},${m} 1 0,0 ${-1*C*.1},${-1*w*.33}\n a${.8*m},${.8*m} 1 0,0 0,${-1*w*.34}\n a${m},${m} 1 0,0 ${.1*C},${-1*w*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=t.path(v,r);_=a.insert(()=>i,":first-child"),_.attr("class","basic label-container").attr("style",(0,o.KL)(x))}else _=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",v);return _.attr("transform",`translate(${-C/2}, ${-w/2})`),p(e,_),e.calcIntersect=function(t,e){return N.rect(t,e)},e.intersect=function(t){return l.Rm.info("Bang intersect",e,t),N.rect(e,t)},a}async function ye(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:h,label:d}=await u(t,e,f(e)),g=s.width+2*h,y=s.height+2*h,m=.15*g,x=.25*g,b=.35*g,k=.2*g,{cssStyles:C}=e;let w;const _=`M0 0 \n a${m},${m} 0 0,1 ${.25*g},${-1*g*.1}\n a${b},${b} 1 0,1 ${.4*g},${-1*g*.1}\n a${x},${x} 1 0,1 ${.35*g},${.2*g}\n\n a${m},${m} 1 0,1 ${.15*g},${.35*y}\n a${k},${k} 1 0,1 ${-1*g*.15},${.65*y}\n\n a${x},${m} 1 0,1 ${-1*g*.25},${.15*g}\n a${b},${b} 1 0,1 ${-1*g*.5},0\n a${m},${m} 1 0,1 ${-1*g*.25},${-1*g*.15}\n\n a${m},${m} 1 0,1 ${-1*g*.1},${-1*y*.35}\n a${k},${k} 1 0,1 ${.1*g},${-1*y*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,n.Fr)(e,{}),i=t.path(_,r);w=a.insert(()=>i,":first-child"),w.attr("class","basic label-container").attr("style",(0,o.KL)(C))}else w=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",_);return d.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),w.attr("transform",`translate(${-g/2}, ${-y/2})`),p(e,w),e.calcIntersect=function(t,e){return N.rect(t,e)},e.intersect=function(t){return l.Rm.info("Cloud intersect",e,t),N.rect(e,t)},a}async function me(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:s,label:l}=await u(t,e,f(e)),h=o.width+8*s,c=o.height+2*s,d=`\n M${-h/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${h-10}\n q5,0 5,5\n v${c-10}\n q0,5 -5,5\n h${10-h}\n q-5,0 -5,-5\n Z\n `,g=a.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",i).attr("d",d);return a.append("line").attr("class","node-line-").attr("x1",-h/2).attr("y1",c/2).attr("x2",h/2).attr("y2",c/2),l.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.append(()=>l.node()),p(e,g),e.calcIntersect=function(t,e){return N.rect(t,e)},e.intersect=function(t){return N.rect(e,t)},a}async function xe(t,e){return U(t,e,{padding:e.padding??0})}(0,l.K2)(fe,"kanbanItem"),(0,l.K2)(ge,"bang"),(0,l.K2)(ye,"cloud"),(0,l.K2)(me,"defaultMindmapNode"),(0,l.K2)(xe,"mindmapCircle");var be=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:zt},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:It},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:qt},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Ut},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:at},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:U},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ge},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ye},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Ot},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:pt},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:vt},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:_t},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:te},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:kt},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:st},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Xt},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:j},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Nt},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Ht},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:jt},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ct},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:ft},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:V},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Q},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:tt},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:St},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ie},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:ut},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Jt},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Bt},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:et},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ot},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:re},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ae},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:lt},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:ee},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ht},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Pt},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:$t},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Ft},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:q},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:G},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Gt},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Yt},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:ne},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Rt},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Lt}],ke=(0,l.K2)(()=>{const t={state:Wt,choice:H,note:Et,rectWithTitle:Kt,labelRect:wt,iconSquare:xt,iconCircle:yt,icon:gt,iconRounded:mt,imageSquare:bt,anchor:P,kanbanItem:fe,mindmapCircle:xe,defaultMindmapNode:me,classBox:ce,erBox:oe,requirementBox:ue},e=[...Object.entries(t),...be.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function Ce(t){return t in ke}(0,l.K2)(Ce,"isValidShape");var we=new Map;async function _e(t,e,r){let i,n;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?ke[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let o;"sandbox"===r.config.securityLevel?o="_top":e.linkTarget&&(o=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",o??null),n=await a(i,e,r)}else n=await a(t,e,r),i=n;return e.tooltip&&n.attr("title",e.tooltip),we.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}(0,l.K2)(_e,"insertNode");var ve=(0,l.K2)((t,e)=>{we.set(e.id,t)},"setNodeElem"),Se=(0,l.K2)(()=>{we.clear()},"clear"),Te=(0,l.K2)(t=>{const e=we.get(t.id);l.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")},4769(t,e,r){"use strict";r.d(e,{Nq:()=>o,RI:()=>h,Wg:()=>n,hq:()=>a});var i=r(797),n=(0,i.K2)((t,e)=>{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";const r=t.x??0,i=t.y??0;return"translate("+-(r+t.width/2)+", "+-(i+t.height/2)+")"},"computeLabelTransform"),a={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},o={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function s(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=l(t),e=l(e);const[r,i]=[t.x,t.y],[n,a]=[e.x,e.y],o=n-r,s=a-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}(0,i.K2)(s,"calculateDeltaAndAngle");var l=(0,i.K2)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),h=(0,i.K2)(t=>({x:(0,i.K2)(function(e,r,i){let n=0;const o=l(i[0]).x<l(i[i.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(a,t.arrowTypeStart)){const{angle:e,deltaX:r}=s(i[0],i[1]);n=a[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(a,t.arrowTypeEnd)){const{angle:e,deltaX:r}=s(i[i.length-1],i[i.length-2]);n=a[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const h=Math.abs(l(e).x-l(i[i.length-1]).x),c=Math.abs(l(e).y-l(i[i.length-1]).y),u=Math.abs(l(e).x-l(i[0]).x),d=Math.abs(l(e).y-l(i[0]).y),p=a[t.arrowTypeStart],f=a[t.arrowTypeEnd];if(h<f&&h>0&&c<f){let t=f+1-h;t*="right"===o?-1:1,n-=t}if(u<p&&u>0&&d<p){let t=p+1-u;t*="right"===o?-1:1,n+=t}return l(e).x+n},"x"),y:(0,i.K2)(function(e,r,i){let n=0;const o=l(i[0]).y<l(i[i.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(a,t.arrowTypeStart)){const{angle:e,deltaY:r}=s(i[0],i[1]);n=a[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(a,t.arrowTypeEnd)){const{angle:e,deltaY:r}=s(i[i.length-1],i[i.length-2]);n=a[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const h=Math.abs(l(e).y-l(i[i.length-1]).y),c=Math.abs(l(e).x-l(i[i.length-1]).x),u=Math.abs(l(e).y-l(i[0]).y),d=Math.abs(l(e).x-l(i[0]).x),p=a[t.arrowTypeStart],f=a[t.arrowTypeEnd];if(h<f&&h>0&&c<f){let t=f+1-h;t*="up"===o?-1:1,n-=t}if(u<p&&u>0&&d<p){let t=p+1-u;t*="up"===o?-1:1,n+=t}return l(e).y+n},"y")}),"getLineFunctionsWithOffset")},5948(t,e,r){"use strict";r.d(e,{IU:()=>b,Jo:()=>F,T_:()=>_,g0:()=>K,jP:()=>C});var i=r(4769),n=r(1174),a=r(7879),o=r(1960),s=r(6866),l=r(796),h=r(4098),c=r(797),u=r(1444),d=r(2274),p=(0,c.K2)((t,e,r,i,n,a)=>{e.arrowTypeStart&&g(t,"start",e.arrowTypeStart,r,i,n,a),e.arrowTypeEnd&&g(t,"end",e.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),f={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},g=(0,c.K2)((t,e,r,i,n,a,o)=>{const s=f[r];if(!s)return void c.Rm.warn(`Unknown arrow type: ${r}`);const l=`${n}_${a}-${s.type}${"start"===e?"Start":"End"}`;if(o&&""!==o.trim()){const r=`${l}_${o.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const t=document.getElementById(l);if(t){const e=t.cloneNode(!0);e.id=r,e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",o),s.fill&&t.setAttribute("fill",o)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${i}#${r})`)}else t.attr(`marker-${e}`,`url(${i}#${l})`)},"addEdgeMarker"),y=(0,c.K2)(t=>"string"==typeof t?t:(0,h.D7)()?.flowchart?.curve,"resolveEdgeCurveType"),m=new Map,x=new Map,b=(0,c.K2)(()=>{m.clear(),x.clear()},"clear"),k=(0,c.K2)(t=>t?"string"==typeof t?t:t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),C=(0,c.K2)(async(t,e)=>{const r=(0,h.D7)();let a=(0,h.E)(r);const{labelStyles:l}=(0,o.GX)(e);e.labelStyle=l;const d=t.insert("g").attr("class","edgeLabel"),p=d.insert("g").attr("class","label").attr("data-id",e.id),f="markdown"===e.labelType,g=await(0,s.GZ)(t,e.label,{style:k(e.labelStyle),useHtmlLabels:a,addSvgBackground:!0,isNode:!1,markdown:f,width:void 0},r);p.node().appendChild(g),c.Rm.info("abc82",e,e.labelType);let y,b=g.getBBox(),C=b;if(a){const t=g.children[0],e=(0,u.Ltv)(g);b=t.getBoundingClientRect(),C=b,e.attr("width",b.width),e.attr("height",b.height)}else{const t=(0,u.Ltv)(g).select("text").node();t&&"function"==typeof t.getBBox&&(C=t.getBBox())}if(p.attr("transform",(0,i.Wg)(C,a)),m.set(e.id,d),e.width=b.width,e.height=b.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),s=await(0,n.DA)(o,e.startLabelLeft,k(e.labelStyle)||"",!1,!1);y=s;let l=s.getBBox();if(a){const t=s.children[0],e=(0,u.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}o.attr("transform",(0,i.Wg)(l,a)),x.get(e.id)||x.set(e.id,{}),x.get(e.id).startLeft=r,w(y,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),s=await(0,n.DA)(o,e.startLabelRight,k(e.labelStyle)||"",!1,!1);y=s,o.node().appendChild(s);let l=s.getBBox();if(a){const t=s.children[0],e=(0,u.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}o.attr("transform",(0,i.Wg)(l,a)),x.get(e.id)||x.set(e.id,{}),x.get(e.id).startRight=r,w(y,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),s=await(0,n.DA)(o,e.endLabelLeft,k(e.labelStyle)||"",!1,!1);y=s;let l=s.getBBox();if(a){const t=s.children[0],e=(0,u.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}o.attr("transform",(0,i.Wg)(l,a)),r.node().appendChild(s),x.get(e.id)||x.set(e.id,{}),x.get(e.id).endLeft=r,w(y,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),s=await(0,n.DA)(o,e.endLabelRight,k(e.labelStyle)||"",!1,!1);y=s;let l=s.getBBox();if(a){const t=s.children[0],e=(0,u.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}o.attr("transform",(0,i.Wg)(l,a)),r.node().appendChild(s),x.get(e.id)||x.set(e.id,{}),x.get(e.id).endRight=r,w(y,e.endLabelRight)}return g},"insertEdgeLabel");function w(t,e){(0,h.E)((0,h.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,c.K2)(w,"setTerminalWidth");var _=(0,c.K2)((t,e)=>{c.Rm.debug("Moving label abc88 ",t.id,t.label,m.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=(0,h.D7)(),{subGraphTitleTotalMargin:n}=(0,a.O)(i);if(t.label){const i=m.get(t.id);let a=t.x,o=t.y;if(r){const i=l._K.calcLabelPosition(r);c.Rm.debug("Moving label "+t.label+" from (",a,",",o,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(a=i.x,o=i.y)}i.attr("transform",`translate(${a}, ${o+n/2})`)}if(t.startLabelLeft){const e=x.get(t.id).startLeft;let i=t.x,n=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.startLabelRight){const e=x.get(t.id).startRight;let i=t.x,n=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelLeft){const e=x.get(t.id).endLeft;let i=t.x,n=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelRight){const e=x.get(t.id).endRight;let i=t.x,n=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}},"positionEdgeLabel"),v=(0,c.K2)((t,e)=>{const r=t.x,i=t.y,n=Math.abs(e.x-r),a=Math.abs(e.y-i),o=t.width/2,s=t.height/2;return n>=o||a>=s},"outsideNode"),S=(0,c.K2)((t,e,r)=>{c.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,n=t.y,a=Math.abs(i-r.x),o=t.width/2;let s=r.x<e.x?o-a:o+a;const l=t.height/2,h=Math.abs(e.y-r.y),u=Math.abs(e.x-r.x);if(Math.abs(n-e.y)*o>Math.abs(i-e.x)*l){let t=r.y<e.y?e.y-l-n:n-l-e.y;s=u*t/h;const i={x:r.x<e.x?r.x+s:r.x-u+s,y:r.y<e.y?r.y+h-t:r.y-h+t};return 0===s&&(i.x=e.x,i.y=e.y),0===u&&(i.x=e.x),0===h&&(i.y=e.y),c.Rm.debug(`abc89 top/bottom calc, Q ${h}, q ${t}, R ${u}, r ${s}`,i),i}{s=r.x<e.x?e.x-o-i:i-o-e.x;let t=h*s/u,_x=r.x<e.x?r.x+u-s:r.x-u+s,n=r.y<e.y?r.y+t:r.y-t;return c.Rm.debug(`sides calc abc89, Q ${h}, q ${t}, R ${u}, r ${s}`,{_x,_y:n}),0===s&&(_x=e.x,n=e.y),0===u&&(_x=e.x),0===h&&(n=e.y),{x:_x,y:n}}},"intersection"),T=(0,c.K2)((t,e)=>{c.Rm.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],n=!1;return t.forEach(t=>{if(c.Rm.info("abc88 checking point",t,e),v(e,t)||n)c.Rm.warn("abc88 outside",t,i),i=t,n||r.push(t);else{const a=S(e,i,t);c.Rm.debug("abc88 inside",t,i,a),c.Rm.debug("abc88 intersection",a,e);let o=!1;r.forEach(t=>{o=o||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)?c.Rm.warn("abc88 no intersect",a,r):r.push(a),n=!0}}),c.Rm.debug("returning points",r),r},"cutPathAtIntersect");function A(t){const e=[],r=[];for(let i=1;i<t.length-1;i++){const n=t[i-1],a=t[i],o=t[i+1];(n.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===o.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-o.y)>5)&&(e.push(a),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}(0,c.K2)(A,"extractCornerPoints");var M=(0,c.K2)(function(t,e,r){const i=e.x-t.x,n=e.y-t.y,a=r/Math.sqrt(i*i+n*n);return{x:e.x-a*i,y:e.y-a*n}},"findAdjacentPoint"),B=(0,c.K2)(function(t){const{cornerPointPositions:e}=A(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){const e=t[i-1],n=t[i+1],a=t[i],o=M(e,a,5),s=M(n,a,5),l=s.x-o.x,h=s.y-o.y;r.push(o);const u=2*Math.sqrt(2);let d={x:a.x,y:a.y};if(Math.abs(n.x-e.x)>10&&Math.abs(n.y-e.y)>=10){c.Rm.debug("Corner point fixing",Math.abs(n.x-e.x),Math.abs(n.y-e.y));const t=5;d=a.x===o.x?{x:l<0?o.x-t+u:o.x+t-u,y:h<0?o.y-u:o.y+u}:{x:l<0?o.x-u:o.x+u,y:h<0?o.y-t+u:o.y+t-u}}else c.Rm.debug("Corner point skipping fixing",Math.abs(n.x-e.x),Math.abs(n.y-e.y));r.push(d,s)}else r.push(t[i]);return r},"fixCorners"),L=(0,c.K2)((t,e,r)=>{const i=t-e-r,n=Math.floor(i/4);return`0 ${e} ${Array(n).fill("2 2").join(" ")} ${r}`},"generateDashArray"),F=(0,c.K2)(function(t,e,r,n,a,s,f,g=!1){const{handDrawnSeed:m}=(0,h.D7)();let x=e.points,b=!1;const k=a;var C=s;const w=[];for(const t in e.cssCompiledStyles)(0,o.KX)(t)||w.push(e.cssCompiledStyles[t]);c.Rm.debug("UIO intersect check",e.points,C.x,k.x),C.intersect&&k.intersect&&!g&&(x=x.slice(1,e.points.length-1),x.unshift(k.intersect(x[0])),c.Rm.debug("Last point UIO",e.start,"--\x3e",e.end,x[x.length-1],C,C.intersect(x[x.length-1])),x.push(C.intersect(x[x.length-1])));const _=btoa(JSON.stringify(x));e.toCluster&&(c.Rm.info("to cluster abc88",r.get(e.toCluster)),x=T(e.points,r.get(e.toCluster).node),b=!0),e.fromCluster&&(c.Rm.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(x,null,2)),x=T(x.reverse(),r.get(e.fromCluster).node).reverse(),b=!0);let v=x.filter(t=>!Number.isNaN(t.y));const S=y(e.curve);"rounded"!==S&&(v=B(v));let A=u.lUB;switch(S){case"linear":case"rounded":A=u.lUB;break;case"basis":default:A=u.qrM;break;case"cardinal":A=u.y8u;break;case"bumpX":A=u.Wi0;break;case"bumpY":A=u.PGM;break;case"catmullRom":A=u.oDi;break;case"monotoneX":A=u.nVG;break;case"monotoneY":A=u.uxU;break;case"natural":A=u.Xf2;break;case"step":A=u.GZz;break;case"stepAfter":A=u.UPb;break;case"stepBefore":A=u.dyv}const{x:M,y:F}=(0,i.RI)(e),E=(0,u.n8j)().x(M).y(F).curve(A);let O,R;switch(e.thickness){case"normal":default:O="edge-thickness-normal";break;case"thick":O="edge-thickness-thick";break;case"invisible":O="edge-thickness-invisible"}switch(e.pattern){case"solid":default:O+=" edge-pattern-solid";break;case"dotted":O+=" edge-pattern-dotted";break;case"dashed":O+=" edge-pattern-dashed"}let K="rounded"===S?$(D(v,e),5):E(v);const I=Array.isArray(e.style)?e.style:[e.style];let N=I.find(t=>t?.startsWith("stroke:")),P="";e.animate&&(P="edge-animation-fast"),e.animation&&(P="edge-animation-"+e.animation);let z=!1;if("handDrawn"===e.look){const r=d.A.svg(t);Object.assign([],v);const i=r.path(K,{roughness:.3,seed:m});O+=" transition",R=(0,u.Ltv)(i).select("path").attr("id",e.id).attr("class"," "+O+(e.classes?" "+e.classes:"")+(P?" "+P:"")).attr("style",I?I.reduce((t,e)=>t+";"+e,""):"");let n=R.attr("d");R.attr("d",n),t.node().appendChild(R.node())}else{const r=w.join(";"),n=I?I.reduce((t,e)=>t+e+";",""):"",a=(r?r+";"+n+";":n)+";"+(I?I.reduce((t,e)=>t+";"+e,""):"");R=t.append("path").attr("d",K).attr("id",e.id).attr("class"," "+O+(e.classes?" "+e.classes:"")+(P?" "+P:"")).attr("style",a),N=a.match(/stroke:([^;]+)/)?.[1],z=!0===e.animate||!!e.animation||r.includes("animation");const o=R.node(),s="function"==typeof o.getTotalLength?o.getTotalLength():0,l=i.Nq[e.arrowTypeStart]||0,h=i.Nq[e.arrowTypeEnd]||0;if("neo"===e.look&&!z){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?L(s,l,h):`0 ${l} ${s-l-h} ${h}`}; stroke-dashoffset: 0;`;R.attr("style",t+R.attr("style"))}}R.attr("data-edge",!0),R.attr("data-et","edge"),R.attr("data-id",e.id),R.attr("data-points",_),e.showPoints&&v.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let q="";((0,h.D7)().flowchart.arrowMarkerAbsolute||(0,h.D7)().state.arrowMarkerAbsolute)&&(q=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,q=q.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),c.Rm.info("arrowTypeStart",e.arrowTypeStart),c.Rm.info("arrowTypeEnd",e.arrowTypeEnd),p(R,e,q,f,n,N);const W=x[Math.floor(x.length/2)];l._K.isLabelCoordinateInPath(W,R.attr("d"))||(b=!0);let j={};return b&&(j.updatedPath=x),j.originalPath=e.points,j},"insertEdge");function $(t,e){if(t.length<2)return"";let r="";const i=t.length,n=1e-5;for(let a=0;a<i;a++){const o=t[a],s=t[a-1],l=t[a+1];if(0===a)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const t=o.x-s.x,i=o.y-s.y,a=l.x-o.x,h=l.y-o.y,c=Math.hypot(t,i),u=Math.hypot(a,h);if(c<n||u<n){r+=`L${o.x},${o.y}`;continue}const d=t/c,p=i/c,f=a/u,g=h/u,y=d*f+p*g,m=Math.max(-1,Math.min(1,y)),x=Math.acos(m);if(x<n||Math.abs(Math.PI-x)<n){r+=`L${o.x},${o.y}`;continue}const b=Math.min(e/Math.sin(x/2),c/2,u/2),k=o.x-d*b,C=o.y-p*b,w=o.x+f*b,_=o.y+g*b;r+=`L${k},${C}`,r+=`Q${o.x},${o.y} ${w},${_}`}}return r}function E(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-t.x,i=e.y-t.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}function D(t,e){const r=t.map(t=>({...t}));if(t.length>=2&&i.hq[e.arrowTypeStart]){const n=i.hq[e.arrowTypeStart],a=t[0],o=t[1],{angle:s}=E(a,o),l=n*Math.cos(s),h=n*Math.sin(s);r[0].x=a.x+l,r[0].y=a.y+h}const n=t.length;if(n>=2&&i.hq[e.arrowTypeEnd]){const a=i.hq[e.arrowTypeEnd],o=t[n-1],s=t[n-2],{angle:l}=E(s,o),h=a*Math.cos(l),c=a*Math.sin(l);r[n-1].x=o.x-h,r[n-1].y=o.y-c}return r}(0,c.K2)($,"generateRoundedPath"),(0,c.K2)(E,"calculateDeltaAndAngle"),(0,c.K2)(D,"applyMarkerOffsetsToPoints");var O=(0,c.K2)((t,e,r,i)=>{e.forEach(e=>{R[e](t,r,i)})},"insertMarkers"),R={extension:(0,c.K2)((t,e,r)=>{c.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),only_one:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),zero_or_one:(0,c.K2)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),one_or_more:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),zero_or_more:(0,c.K2)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),requirement_arrow:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),requirement_contains:(0,c.K2)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains")},K=O},1960(t,e,r){"use strict";r.d(e,{Fr:()=>c,GX:()=>h,KX:()=>l,WW:()=>o,ue:()=>a});var i=r(4098),n=r(797),a=(0,n.K2)(t=>{const{handDrawnSeed:e}=(0,i.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),o=(0,n.K2)(t=>{const e=s([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),s=(0,n.K2)(t=>{const e=new Map;return t.forEach(t=>{const[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),l=(0,n.K2)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),h=(0,n.K2)(t=>{const{stylesArray:e}=o(t),r=[],i=[],n=[],a=[];return e.forEach(t=>{const e=t[0];l(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&n.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:n,backgroundStyles:a}},"styles2String"),c=(0,n.K2)((t,e)=>{const{themeVariables:r,handDrawnSeed:n}=(0,i.D7)(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:l}=o(t);return Object.assign({roughness:.7,fill:l.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:l.get("stroke")||a,seed:n,strokeWidth:l.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:u(l.get("stroke-dasharray"))},e)},"userNodeOverrides"),u=(0,n.K2)(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray")},6866(t,e,r){"use strict";r.d(e,{W6:()=>re,GZ:()=>oe,WY:()=>zt,pC:()=>It,Gc:()=>Ot});var i=r(796),n=r(4098),a=r(797);const o=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),s=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),h=Object.freeze({...s,...l}),c=Object.freeze({...h,body:"",hidden:!1});function u(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in c)i in l?i in t&&!(i in r)&&(r[i]=l[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function d(t,e,r){const i=t.icons,n=t.aliases||Object.create(null);let a={};function o(t){a=u(i[t]||n[t],a)}return o(e),r.forEach(o),u(t,a)}const p=Object.freeze({width:null,height:null}),f=Object.freeze({...p,...l}),g=/(-?[0-9.]*[0-9]+[0-9.]*)/g,y=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function m(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(g);if(null===i||!i.length)return t;const n=[];let a=i.shift(),o=y.test(a);for(;;){if(o){const t=parseFloat(a);isNaN(t)?n.push(a):n.push(Math.ceil(t*e*r)/r)}else n.push(a);if(a=i.shift(),void 0===a)return n.join("");o=!o}}const x=/\sid="(\S+)"/g,b=new Map;var k=r(1444);var C={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function w(t){C=t}var _={exec:()=>null};function v(t,e=""){let r="string"==typeof t?t:t.source,i={replace:(t,e)=>{let n="string"==typeof e?e:e.source;return n=n.replace(T.caret,"$1"),r=r.replace(t,n),i},getRegex:()=>new RegExp(r,e)};return i}var S=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),T={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},A=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,M=/(?:[*+-]|\d{1,9}[.)])/,B=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,L=v(B).replace(/bull/g,M).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),F=v(B).replace(/bull/g,M).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),$=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,E=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,D=v(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",E).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),O=v(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,M).getRegex(),R="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",K=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,I=v("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",K).replace("tag",R).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),N=v($).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex(),P={blockquote:v(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",N).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:D,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:A,html:I,lheading:L,list:O,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:N,table:_,text:/^[^\n]+/},z=v("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex(),q={...P,lheading:F,table:z,paragraph:v($).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",z).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex()},W={...P,html:v("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",K).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:v($).replace("hr",A).replace("heading"," *#{1,6} *[^\n]").replace("lheading",L).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},j=/^( {2,}|\\)\n(?!\s*$)/,H=/[\p{P}\p{S}]/u,U=/[\s\p{P}\p{S}]/u,Y=/[^\s\p{P}\p{S}]/u,G=v(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,U).getRegex(),X=/(?!~)[\p{P}\p{S}]/u,V=v(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",S?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Z=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Q=v(Z,"u").replace(/punct/g,H).getRegex(),J=v(Z,"u").replace(/punct/g,X).getRegex(),tt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",et=v(tt,"gu").replace(/notPunctSpace/g,Y).replace(/punctSpace/g,U).replace(/punct/g,H).getRegex(),rt=v(tt,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,X).getRegex(),it=v("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Y).replace(/punctSpace/g,U).replace(/punct/g,H).getRegex(),nt=v(/\\(punct)/,"gu").replace(/punct/g,H).getRegex(),at=v(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ot=v(K).replace("(?:--\x3e|$)","--\x3e").getRegex(),st=v("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ot).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),lt=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ht=v(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",lt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ct=v(/^!?\[(label)\]\[(ref)\]/).replace("label",lt).replace("ref",E).getRegex(),ut=v(/^!?\[(ref)\](?:\[\])?/).replace("ref",E).getRegex(),dt=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,pt={_backpedal:_,anyPunctuation:nt,autolink:at,blockSkip:V,br:j,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:_,emStrongLDelim:Q,emStrongRDelimAst:et,emStrongRDelimUnd:it,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:ht,nolink:ut,punctuation:G,reflink:ct,reflinkSearch:v("reflink|nolink(?!\\()","g").replace("reflink",ct).replace("nolink",ut).getRegex(),tag:st,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:_},ft={...pt,link:v(/^!?\[(label)\]\((.*?)\)/).replace("label",lt).getRegex(),reflink:v(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",lt).getRegex()},gt={...pt,emStrongRDelimAst:rt,emStrongLDelim:J,url:v(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",dt).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:v(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",dt).getRegex()},yt={...gt,br:v(j).replace("{2,}","*").getRegex(),text:v(gt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},mt={normal:P,gfm:q,pedantic:W},xt={normal:pt,gfm:gt,breaks:yt,pedantic:ft},bt={"&":"&","<":"<",">":">",'"':""","'":"'"},kt=t=>bt[t];function Ct(t,e){if(e){if(T.escapeTest.test(t))return t.replace(T.escapeReplace,kt)}else if(T.escapeTestNoEncode.test(t))return t.replace(T.escapeReplaceNoEncode,kt);return t}function wt(t){try{t=encodeURI(t).replace(T.percentDecode,"%")}catch{return null}return t}function _t(t,e){let r=t.replace(T.findPipe,(t,e,r)=>{let i=!1,n=e;for(;--n>=0&&"\\"===r[n];)i=!i;return i?"|":" |"}).split(T.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(T.slashPipe,"|");return r}function vt(t,e,r){let i=t.length;if(0===i)return"";let n=0;for(;n<i;){let a=t.charAt(i-n-1);if(a!==e||r){if(a===e||!r)break;n++}else n++}return t.slice(0,i-n)}function St(t,e,r,i,n){let a=e.href,o=e.title||null,s=t[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:"!"===t[0].charAt(0)?"image":"link",raw:r,href:a,title:o,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}var Tt=class{options;rules;lexer;constructor(t){this.options=t||C}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:vt(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],r=function(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(null===i)return e;let n=i[1];return e.split("\n").map(t=>{let e=t.match(r.other.beginningSpace);if(null===e)return t;let[i]=e;return i.length>=n.length?t.slice(n.length):t}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=vt(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:vt(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=vt(e[0],"\n").split("\n"),r="",i="",n=[];for(;t.length>0;){let e,a=!1,o=[];for(e=0;e<t.length;e++)if(this.rules.other.blockquoteStart.test(t[e]))o.push(t[e]),a=!0;else{if(a)break;o.push(t[e])}t=t.slice(e);let s=o.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${s}`:s,i=i?`${i}\n${l}`:l;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,n,!0),this.lexer.state.top=h,0===t.length)break;let c=n.at(-1);if("code"===c?.type)break;if("blockquote"===c?.type){let e=c,a=e.raw+"\n"+t.join("\n"),o=this.blockquote(a);n[n.length-1]=o,r=r.substring(0,r.length-e.raw.length)+o.raw,i=i.substring(0,i.length-e.text.length)+o.text;break}if("list"===c?.type){let e=c,a=e.raw+"\n"+t.join("\n"),o=this.list(a);n[n.length-1]=o,r=r.substring(0,r.length-c.raw.length)+o.raw,i=i.substring(0,i.length-e.raw.length)+o.raw,t=a.substring(n.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:n,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),i=r.length>1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let a=this.rules.other.listItemRegex(r),o=!1;for(;t;){let r=!1,i="",s="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),h=t.split("\n",1)[0],c=!l.trim(),u=0;if(this.options.pedantic?(u=2,s=l.trimStart()):c?u=e[1].length+1:(u=e[2].search(this.rules.other.nonSpaceChar),u=u>4?1:u,s=l.slice(u),u+=e[1].length),c&&this.rules.other.blankLine.test(h)&&(i+=h+"\n",t=t.substring(h.length+1),r=!0),!r){let e=this.rules.other.nextBulletRegex(u),r=this.rules.other.hrRegex(u),n=this.rules.other.fencesBeginRegex(u),a=this.rules.other.headingBeginRegex(u),o=this.rules.other.htmlBeginRegex(u);for(;t;){let d,p=t.split("\n",1)[0];if(h=p,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),d=h):d=h.replace(this.rules.other.tabCharGlobal," "),n.test(h)||a.test(h)||o.test(h)||e.test(h)||r.test(h))break;if(d.search(this.rules.other.nonSpaceChar)>=u||!h.trim())s+="\n"+d.slice(u);else{if(c||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||n.test(l)||a.test(l)||r.test(l))break;s+="\n"+h}!c&&!h.trim()&&(c=!0),i+=p+"\n",t=t.substring(p.length+1),l=d.slice(u)}}n.loose||(o?n.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(o=!0));let d,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(s),p&&(d="[ ] "!==p[0],s=s.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:i,task:!!p,checked:d,loose:!1,text:s,tokens:[]}),n.raw+=i}let s=n.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),n.raw=n.raw.trimEnd();for(let t=0;t<n.items.length;t++)if(this.lexer.state.top=!1,n.items[t].tokens=this.lexer.blockTokens(n.items[t].text,[]),!n.loose){let e=n.items[t].tokens.filter(t=>"space"===t.type),r=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));n.loose=r}if(n.loose)for(let t=0;t<n.items.length;t++)n.items[t].loose=!0;return n}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=_t(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let t of i)this.rules.other.tableAlignRight.test(t)?a.align.push("right"):this.rules.other.tableAlignCenter.test(t)?a.align.push("center"):this.rules.other.tableAlignLeft.test(t)?a.align.push("left"):a.align.push(null);for(let t=0;t<r.length;t++)a.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:a.align[t]});for(let t of n)a.rows.push(_t(t,a.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=vt(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let i=0;i<t.length;i++)if("\\"===t[i])i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return r>0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){let r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),St(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return St(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!r||this.rules.inline.punctuation.exec(r))){let r,n,a=[...i[0]].length-1,o=a,s=0,l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+a);null!=(i=l.exec(e));){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(n=[...r].length,i[3]||i[4]){o+=n;continue}if((i[5]||i[6])&&a%3&&!((a+n)%3)){s+=n;continue}if(o-=n,o>0)continue;n=Math.min(n,n+o+s);let e=[...i[0]][0].length,l=t.slice(0,a+i.index+e+n);if(Math.min(a,n)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=e[0],r="mailto:"+t;else{let i;do{i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(i!==e[0]);t=e[0],r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},At=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||C,this.options.tokenizer=this.options.tokenizer||new Tt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:T,block:mt.normal,inline:xt.normal};this.options.pedantic?(e.block=mt.pedantic,e.inline=xt.pedantic):this.options.gfm&&(e.block=mt.gfm,this.options.breaks?e.inline=xt.breaks:e.inline=xt.gfm),this.tokenizer.rules=e}static get rules(){return{block:mt,inline:xt}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(t){t=t.replace(T.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],r=!1){for(this.options.pedantic&&(t=t.replace(T.tabCharGlobal," ").replace(T.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let r=e.at(-1);1===i.raw.length&&void 0!==r?r.raw+="\n":e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},e.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),e.push(i);continue}let n=t;if(this.options.extensions?.startBlock){let e,r=1/0,i=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(n=t.substring(0,r+1))}if(this.state.top&&(i=this.tokenizer.paragraph(n))){let a=e.at(-1);r&&"paragraph"===a?.type?(a.raw+=(a.raw.endsWith("\n")?"":"\n")+i.raw,a.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(i),r=n.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let r=e.at(-1);"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i=t,n=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(i));)t.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(i));)r=n[2]?n[2].length:0,i=i.slice(0,n.index+r)+"["+"a".repeat(n[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,o="";for(;t;){let r;if(a||(o=""),a=!1,this.options.extensions?.inline?.some(i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);let i=e.at(-1);"text"===r.type&&"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,i,o)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let n=t;if(this.options.extensions?.startInline){let e,r=1/0,i=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(n=t.substring(0,r+1))}if(r=this.tokenizer.inlineText(n)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(o=r.raw.slice(-1)),a=!0;let i=e.at(-1);"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},Mt=class{options;parser;constructor(t){this.options=t||C}space(t){return""}code({text:t,lang:e,escaped:r}){let i=(e||"").match(T.notSpaceStart)?.[0],n=t.replace(T.endingNewline,"")+"\n";return i?'<pre><code class="language-'+Ct(i)+'">'+(r?n:Ct(n,!0))+"</code></pre>\n":"<pre><code>"+(r?n:Ct(n,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){let e=t.ordered,r=t.start,i="";for(let e=0;e<t.items.length;e++){let r=t.items[e];i+=this.listitem(r)}let n=e?"ol":"ul";return"<"+n+(e&&1!==r?' start="'+r+'"':"")+">\n"+i+"</"+n+">\n"}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+Ct(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",r="";for(let e=0;e<t.header.length;e++)r+=this.tablecell(t.header[e]);e+=this.tablerow({text:r});let i="";for(let e=0;e<t.rows.length;e++){let n=t.rows[e];r="";for(let t=0;t<n.length;t++)r+=this.tablecell(n[t]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+i+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Ct(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let i=this.parser.parseInline(r),n=wt(t);if(null===n)return i;let a='<a href="'+(t=n)+'"';return e&&(a+=' title="'+Ct(e)+'"'),a+=">"+i+"</a>",a}image({href:t,title:e,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let n=wt(t);if(null===n)return Ct(r);let a=`<img src="${t=n}" alt="${r}"`;return e&&(a+=` title="${Ct(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ct(t.text)}},Bt=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Lt=class t{options;renderer;textRenderer;constructor(t){this.options=t||C,this.options.renderer=this.options.renderer||new Mt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Bt}static parse(e,r){return new t(r).parse(e)}static parseInline(e,r){return new t(r).parseInline(e)}parse(t,e=!0){let r="";for(let i=0;i<t.length;i++){let n=t[i];if(this.options.extensions?.renderers?.[n.type]){let t=n,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(t.type)){r+=e||"";continue}}let a=n;switch(a.type){case"space":r+=this.renderer.space(a);continue;case"hr":r+=this.renderer.hr(a);continue;case"heading":r+=this.renderer.heading(a);continue;case"code":r+=this.renderer.code(a);continue;case"table":r+=this.renderer.table(a);continue;case"blockquote":r+=this.renderer.blockquote(a);continue;case"list":r+=this.renderer.list(a);continue;case"html":r+=this.renderer.html(a);continue;case"def":r+=this.renderer.def(a);continue;case"paragraph":r+=this.renderer.paragraph(a);continue;case"text":{let n=a,o=this.renderer.text(n);for(;i+1<t.length&&"text"===t[i+1].type;)n=t[++i],o+="\n"+this.renderer.text(n);r+=e?this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):o;continue}default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e=this.renderer){let r="";for(let i=0;i<t.length;i++){let n=t[i];if(this.options.extensions?.renderers?.[n.type]){let t=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){r+=t||"";continue}}let a=n;switch(a.type){case"escape":case"text":r+=e.text(a);break;case"html":r+=e.html(a);break;case"link":r+=e.link(a);break;case"image":r+=e.image(a);break;case"strong":r+=e.strong(a);break;case"em":r+=e.em(a);break;case"codespan":r+=e.codespan(a);break;case"br":r+=e.br(a);break;case"del":r+=e.del(a);break;default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}},Ft=class{options;block;constructor(t){this.options=t||C}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?At.lex:At.lexInline}provideParser(){return this.block?Lt.parse:Lt.parseInline}},$t=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Lt;Renderer=Mt;TextRenderer=Bt;Lexer=At;Tokenizer=Tt;Hooks=Ft;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let t=i;for(let i of t.header)r=r.concat(this.walkTokens(i.tokens,e));for(let i of t.rows)for(let t of i)r=r.concat(this.walkTokens(t.tokens,e));break}case"list":{let t=i;r=r.concat(this.walkTokens(t.items,e));break}default:{let t=i;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(i=>{let n=t[i].flat(1/0);r=r.concat(this.walkTokens(n,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),r.extensions=e),t.renderer){let e=this.defaults.renderer||new Mt(this.defaults);for(let r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let i=r,n=t.renderer[i],a=e[i];e[i]=(...t)=>{let r=n.apply(e,t);return!1===r&&(r=a.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new Tt(this.defaults);for(let r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let i=r,n=t.tokenizer[i],a=e[i];e[i]=(...t)=>{let r=n.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new Ft;for(let r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let i=r,n=t.hooks[i],a=e[i];Ft.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async&&Ft.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await n.call(e,t);return a.call(e,r)})();let i=n.call(e,t);return a.call(e,i)}:e[i]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await n.apply(e,t);return!1===r&&(r=await a.apply(e,t)),r})();let r=n.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return At.lex(t,e??this.defaults)}parser(t,e){return Lt.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let i={...r},n={...this.defaults,...i},a=this.onError(!!n.silent,!!n.async);if(!0===this.defaults.async&&!1===i.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||null===e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=t),n.async)return(async()=>{let r=n.hooks?await n.hooks.preprocess(e):e,i=await(n.hooks?await n.hooks.provideLexer():t?At.lex:At.lexInline)(r,n),a=n.hooks?await n.hooks.processAllTokens(i):i;n.walkTokens&&await Promise.all(this.walkTokens(a,n.walkTokens));let o=await(n.hooks?await n.hooks.provideParser():t?Lt.parse:Lt.parseInline)(a,n);return n.hooks?await n.hooks.postprocess(o):o})().catch(a);try{n.hooks&&(e=n.hooks.preprocess(e));let r=(n.hooks?n.hooks.provideLexer():t?At.lex:At.lexInline)(e,n);n.hooks&&(r=n.hooks.processAllTokens(r)),n.walkTokens&&this.walkTokens(r,n.walkTokens);let i=(n.hooks?n.hooks.provideParser():t?Lt.parse:Lt.parseInline)(r,n);return n.hooks&&(i=n.hooks.postprocess(i)),i}catch(t){return a(t)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="<p>An error occurred:</p><pre>"+Ct(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function Et(t,e){return $t.parse(t,e)}Et.options=Et.setOptions=function(t){return $t.setOptions(t),Et.defaults=$t.defaults,w(Et.defaults),Et},Et.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},Et.defaults=C,Et.use=function(...t){return $t.use(...t),Et.defaults=$t.defaults,w(Et.defaults),Et},Et.walkTokens=function(t,e){return $t.walkTokens(t,e)},Et.parseInline=$t.parseInline,Et.Parser=Lt,Et.parser=Lt.parse,Et.Renderer=Mt,Et.TextRenderer=Bt,Et.Lexer=At,Et.lexer=At.lex,Et.Tokenizer=Tt,Et.Hooks=Ft,Et.parse=Et,Et.options,Et.setOptions,Et.use,Et.walkTokens,Et.parseInline,Lt.parse,At.lex;var Dt=r(513),Ot={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},Rt=new Map,Kt=new Map,It=(0,a.K2)(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(a.Rm.debug("Registering icon pack:",e.name),"loader"in e)Kt.set(e.name,e.loader);else{if(!("icons"in e))throw a.Rm.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Rt.set(e.name,e.icons)}}},"registerIconPacks"),Nt=(0,a.K2)(async(t,e)=>{const r=((t,e,r,i="")=>{const n=t.split(":");if("@"===t.slice(0,1)){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const t=n.pop(),r=n.pop(),a={provider:n.length>0?n[0]:i,prefix:r,name:t};return e&&!o(a)?null:a}const a=n[0],s=a.split("-");if(s.length>1){const t={provider:i,prefix:s.shift(),name:s.join("-")};return e&&!o(t)?null:t}if(r&&""===i){const t={provider:i,prefix:"",name:a};return e&&!o(t,r)?null:t}return null})(t,!0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let n=Rt.get(i);if(!n){const t=Kt.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await t(),prefix:i},Rt.set(i,n)}catch(t){throw a.Rm.error(t),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=function(t,e){if(t.icons[e])return d(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),n=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach(function t(e){if(r[e])return n[e]=[];if(!(e in n)){n[e]=null;const r=i[e]&&i[e].parent,a=r&&t(r);a&&(n[e]=[r].concat(a))}return n[e]}),n}(t,[e])[e];return r?d(t,e,r):null}(n,r.name);if(!s)throw new Error(`Icon not found: ${t}`);return s},"getRegisteredIconData"),Pt=(0,a.K2)(async t=>{try{return await Nt(t),!0}catch{return!1}},"isIconAvailable"),zt=(0,a.K2)(async(t,e,r)=>{let i;try{i=await Nt(t,e?.fallbackPrefix)}catch(t){a.Rm.error(t),i=Ot}const o=function(t,e){const r={...h,...t},i={...f,...e},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(t=>{const e=[],r=t.hFlip,i=t.vFlip;let o,s=t.rotate;switch(r?i?s+=2:(e.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),e.push("scale(-1 1)"),n.top=n.left=0):i&&(e.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),e.push("scale(1 -1)"),n.top=n.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:o=n.height/2+n.top,e.unshift("rotate(90 "+o.toString()+" "+o.toString()+")");break;case 2:e.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:o=n.width/2+n.left,e.unshift("rotate(-90 "+o.toString()+" "+o.toString()+")")}s%2==1&&(n.left!==n.top&&(o=n.left,n.left=n.top,n.top=o),n.width!==n.height&&(o=n.width,n.width=n.height,n.height=o)),e.length&&(a=function(t,e){const r=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const n=t.indexOf(">",i),a=t.indexOf("</"+e);if(-1===n||-1===a)break;const o=t.indexOf(">",a);if(-1===o)break;r+=t.slice(n+1,a).trim(),t=t.slice(0,i).trim()+t.slice(o+1)}return{defs:r,content:t}}(t);return i=r.defs,n=e+r.content+"</g>",i?"<defs>"+i+"</defs>"+n:n;var i,n}(a,'<g transform="'+e.join(" ")+'">'))});const o=i.width,s=i.height,l=n.width,c=n.height;let u,d;null===o?(d=null===s?"1em":"auto"===s?c:s,u=m(d,l/c)):(u="auto"===o?l:o,d=null===s?m(u,c/l):"auto"===s?c:s);const p={},g=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};g("width",u),g("height",d);const y=[n.left,n.top,l,c];return p.viewBox=y.join(" "),{attributes:p,viewBox:y,body:a}}(i,e),s=function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)r+=" "+t+'="'+e[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}(function(t){const e=[];let r;for(;r=x.exec(t);)e.push(r[1]);if(!e.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return e.forEach(e=>{const r=function(t){t=t.replace(/[0-9]+$/,"")||"a";const e=b.get(t)||0;return b.set(t,e+1),e?`${t}${e}`:t}(e),n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),"")}(o.body),{...o.attributes,...r});return(0,n.jZ)(s,(0,n.zj)())},"getIconSVG");function qt(t,{markdownAutoWrap:e}){const r=t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n");return(0,Dt.T)(r)}function Wt(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(t=>({content:t,type:"normal"}))??[])}function jt(t,e={}){const r=qt(t,e),i=Et.lexer(r),n=[[]];let o=0;function s(t,e="normal"){"text"===t.type?t.text.split("\n").forEach((t,r)=>{0!==r&&(o++,n.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&n[o].push({content:t,type:e})})}):"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&n[o].push({content:t.text,type:"normal"})}return(0,a.K2)(s,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type?n[o].push({content:t.text,type:"normal"}):n[o].push({content:t.raw,type:"normal"})}),n}function Ht(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}function Ut(t,{markdownAutoWrap:e}={}){const r=Et.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g," "):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(i).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(i).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(i).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(a.Rm.warn(`Unsupported markdown: ${t.type}`),t.raw)}return(0,a.K2)(i,"output"),r.map(i).join("")}function Yt(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function Gt(t,e){return Xt(t,[],Yt(e.content),e.type)}function Xt(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[n,...a]=r,o=[...e,n];return t([{content:o.join(""),type:i}])?Xt(t,o,a,i):(0===e.length&&n&&(e.push(n),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function Vt(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return Zt(t,e)}function Zt(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let n="";" "===t[0].content&&(n=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},o=[...i];if(""!==n&&o.push({content:n,type:"normal"}),o.push(a),e(o))return Zt(t,e,r,o);if(i.length>0)r.push(i),t.unshift(a);else if(a.content){const[i,n]=Gt(e,a);r.push([i]),n.content&&t.unshift(n)}return Zt(t,e,r)}function Qt(t,e){e&&t.attr("style",e)}async function Jt(t,e,r,i,a=!1,o=(0,n.zj)()){const s=t.append("foreignObject");s.attr("width",`${Math.min(10*r,16384)}px`),s.attr("height",`${Math.min(10*r,16384)}px`);const l=s.append("xhtml:div"),h=(0,n.Wi)(e.label)?await(0,n.dj)(e.label.replace(n.Y2.lineBreakRegex,"\n"),o):(0,n.jZ)(e.label,o),c=e.isNode?"nodeLabel":"edgeLabel",u=l.append("span");u.html(h),Qt(u,e.labelStyle),u.attr("class",`${c} ${i}`),Qt(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(l.style("max-width",r+"px"),l.style("text-align","center")),l.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&l.attr("class","labelBkg");let d=l.node().getBoundingClientRect();return d.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),d=l.node().getBoundingClientRect()),s.node()}function te(t,e,r,i=!1){const n=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return i&&n.attr("text-anchor","middle"),n}function ee(t,e,r){const i=t.append("text"),n=te(i,1,e);ne(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}function re(t,e,r){const i=t.append("text"),n=te(i,1,e);ne(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}function ie(t,e,r,i=!1,n=!1){const o=e.append("g"),s=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");n&&l.attr("text-anchor","middle");let h=0;for(const e of r){const r=(0,a.K2)(e=>ee(o,1.1,e)<=t,"checkWidth"),i=r(e)?[e]:Vt(e,r);for(const t of i)ne(te(l,h,1.1,n),t),h++}if(i){const t=l.node().getBBox(),e=2;return s.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),o.node()}return l.node()}function ne(t,e){t.text(""),e.forEach((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(e.content):i.text(" "+e.content)})}async function ae(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,i,a)=>(r.push((async()=>{const r=`${i}:${a}`;return await Pt(r)?await zt(r,void 0,{class:"label-icon"}):`<i class='${(0,n.jZ)(t,e).replace(":"," ")}'></i>`})()),t));const i=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}(0,a.K2)(qt,"preprocessMarkdown"),(0,a.K2)(Wt,"nonMarkdownToLines"),(0,a.K2)(jt,"markdownToLines"),(0,a.K2)(Ht,"nonMarkdownToHTML"),(0,a.K2)(Ut,"markdownToHTML"),(0,a.K2)(Yt,"splitTextToChars"),(0,a.K2)(Gt,"splitWordToFitWidth"),(0,a.K2)(Xt,"splitWordToFitWidthRecursion"),(0,a.K2)(Vt,"splitLineToFitWidth"),(0,a.K2)(Zt,"splitLineToFitWidthRecursion"),(0,a.K2)(Qt,"applyStyle"),(0,a.K2)(Jt,"addHtmlSpan"),(0,a.K2)(te,"createTspan"),(0,a.K2)(ee,"computeWidthOfText"),(0,a.K2)(re,"computeDimensionOfText"),(0,a.K2)(ie,"createFormattedText"),(0,a.K2)(ne,"updateTextContentAndStyles"),(0,a.K2)(ae,"replaceIconSubstring");var oe=(0,a.K2)(async(t,e="",{style:r="",isTitle:o=!1,classes:s="",useHtmlLabels:l=!0,markdown:h=!0,isNode:c=!0,width:u=200,addSvgBackground:d=!1}={},p)=>{if(a.Rm.debug("XYZ createText",e,r,o,s,l,c,"addSvgBackground: ",d),l){const a=h?Ut(e,p):Ht(e),o=await ae((0,i.Sm)(a),p),l=e.replace(/\\\\/g,"\\"),f={isNode:c,label:(0,n.Wi)(e)?l:o,labelStyle:r.replace("fill:","color:")};return await Jt(t,f,u,s,d,p)}{const i=e.replace(/<br\s*\/?>/g,"<br/>"),n=ie(u,t,h?jt(i.replace("<br>","<br/>"),p):Wt(i),!!e&&d,!c);if(c){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,k.Ltv)(n).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,k.Ltv)(n).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,k.Ltv)(n).select("text").attr("style",e)}return o?(0,k.Ltv)(n).selectAll("tspan.text-outer-tspan").classed("title-row",!0):(0,k.Ltv)(n).selectAll("tspan.text-outer-tspan").classed("row",!0),n}},"createText")},3283(t,e,r){"use strict";r.d(e,{H:()=>rr,r:()=>er});var i=r(797);function n(t){return null==t}function a(t){return"object"==typeof t&&null!==t}function o(t){return Array.isArray(t)?t:n(t)?[]:[t]}function s(t,e){var r,i,n,a;if(e)for(r=0,i=(a=Object.keys(e)).length;r<i;r+=1)t[n=a[r]]=e[n];return t}function l(t,e){var r,i="";for(r=0;r<e;r+=1)i+=t;return i}function h(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}(0,i.K2)(n,"isNothing"),(0,i.K2)(a,"isObject"),(0,i.K2)(o,"toArray"),(0,i.K2)(s,"extend"),(0,i.K2)(l,"repeat"),(0,i.K2)(h,"isNegativeZero");var c={isNothing:n,isObject:a,toArray:o,repeat:l,isNegativeZero:h,extend:s};function u(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+="\n\n"+t.mark.snippet),i+" "+r):i}function d(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=u(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(0,i.K2)(u,"formatError"),(0,i.K2)(d,"YAMLException$1"),d.prototype=Object.create(Error.prototype),d.prototype.constructor=d,d.prototype.toString=(0,i.K2)(function(t){return this.name+": "+u(this,t)},"toString");var p=d;function f(t,e,r,i,n){var a="",o="",s=Math.floor(n/2)-1;return i-e>s&&(e=i-s+(a=" ... ").length),r-i>s&&(r=i+s-(o=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"→")+o,pos:i-e+a.length}}function g(t,e){return c.repeat(" ",e-t.length)+t}function y(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,n=[0],a=[],o=-1;r=i.exec(t.buffer);)a.push(r.index),n.push(r.index+r[0].length),t.position<=r.index&&o<0&&(o=n.length-2);o<0&&(o=n.length-1);var s,l,h="",u=Math.min(t.line+e.linesAfter,a.length).toString().length,d=e.maxLength-(e.indent+u+3);for(s=1;s<=e.linesBefore&&!(o-s<0);s++)l=f(t.buffer,n[o-s],a[o-s],t.position-(n[o]-n[o-s]),d),h=c.repeat(" ",e.indent)+g((t.line-s+1).toString(),u)+" | "+l.str+"\n"+h;for(l=f(t.buffer,n[o],a[o],t.position,d),h+=c.repeat(" ",e.indent)+g((t.line+1).toString(),u)+" | "+l.str+"\n",h+=c.repeat("-",e.indent+u+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(o+s>=a.length);s++)l=f(t.buffer,n[o+s],a[o+s],t.position-(n[o]-n[o+s]),d),h+=c.repeat(" ",e.indent)+g((t.line+s+1).toString(),u)+" | "+l.str+"\n";return h.replace(/\n$/,"")}(0,i.K2)(f,"getLine"),(0,i.K2)(g,"padStart"),(0,i.K2)(y,"makeSnippet");var m=y,x=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],b=["scalar","sequence","mapping"];function k(t){var e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function C(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===x.indexOf(e))throw new p('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=k(e.styleAliases||null),-1===b.indexOf(this.kind))throw new p('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}(0,i.K2)(k,"compileStyleAliases"),(0,i.K2)(C,"Type$1");var w=C;function _(t,e){var r=[];return t[e].forEach(function(t){var e=r.length;r.forEach(function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)}),r[e]=t}),r}function v(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for((0,i.K2)(n,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(n);return r}function S(t){return this.extend(t)}(0,i.K2)(_,"compileList"),(0,i.K2)(v,"compileMap"),(0,i.K2)(S,"Schema$1"),S.prototype.extend=(0,i.K2)(function(t){var e=[],r=[];if(t instanceof w)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new p("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}e.forEach(function(t){if(!(t instanceof w))throw new p("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new p("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new p("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof w))throw new p("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(S.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=_(i,"implicit"),i.compiledExplicit=_(i,"explicit"),i.compiledTypeMap=v(i.compiledImplicit,i.compiledExplicit),i},"extend");var T=new S({explicit:[new w("tag:yaml.org,2002:str",{kind:"scalar",construct:(0,i.K2)(function(t){return null!==t?t:""},"construct")}),new w("tag:yaml.org,2002:seq",{kind:"sequence",construct:(0,i.K2)(function(t){return null!==t?t:[]},"construct")}),new w("tag:yaml.org,2002:map",{kind:"mapping",construct:(0,i.K2)(function(t){return null!==t?t:{}},"construct")})]});function A(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function M(){return null}function B(t){return null===t}(0,i.K2)(A,"resolveYamlNull"),(0,i.K2)(M,"constructYamlNull"),(0,i.K2)(B,"isNull");var L=new w("tag:yaml.org,2002:null",{kind:"scalar",resolve:A,construct:M,predicate:B,represent:{canonical:(0,i.K2)(function(){return"~"},"canonical"),lowercase:(0,i.K2)(function(){return"null"},"lowercase"),uppercase:(0,i.K2)(function(){return"NULL"},"uppercase"),camelcase:(0,i.K2)(function(){return"Null"},"camelcase"),empty:(0,i.K2)(function(){return""},"empty")},defaultStyle:"lowercase"});function F(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function $(t){return"true"===t||"True"===t||"TRUE"===t}function E(t){return"[object Boolean]"===Object.prototype.toString.call(t)}(0,i.K2)(F,"resolveYamlBoolean"),(0,i.K2)($,"constructYamlBoolean"),(0,i.K2)(E,"isBoolean");var D=new w("tag:yaml.org,2002:bool",{kind:"scalar",resolve:F,construct:$,predicate:E,represent:{lowercase:(0,i.K2)(function(t){return t?"true":"false"},"lowercase"),uppercase:(0,i.K2)(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:(0,i.K2)(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function O(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function R(t){return 48<=t&&t<=55}function K(t){return 48<=t&&t<=57}function I(t){if(null===t)return!1;var e,r=t.length,i=0,n=!1;if(!r)return!1;if("-"!==(e=t[i])&&"+"!==e||(e=t[++i]),"0"===e){if(i+1===r)return!0;if("b"===(e=t[++i])){for(i++;i<r;i++)if("_"!==(e=t[i])){if("0"!==e&&"1"!==e)return!1;n=!0}return n&&"_"!==e}if("x"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!O(t.charCodeAt(i)))return!1;n=!0}return n&&"_"!==e}if("o"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!R(t.charCodeAt(i)))return!1;n=!0}return n&&"_"!==e}}if("_"===e)return!1;for(;i<r;i++)if("_"!==(e=t[i])){if(!K(t.charCodeAt(i)))return!1;n=!0}return!(!n||"_"===e)}function N(t){var e,r=t,i=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(e=r[0])&&"+"!==e||("-"===e&&(i=-1),e=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===e){if("b"===r[1])return i*parseInt(r.slice(2),2);if("x"===r[1])return i*parseInt(r.slice(2),16);if("o"===r[1])return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function P(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!c.isNegativeZero(t)}(0,i.K2)(O,"isHexCode"),(0,i.K2)(R,"isOctCode"),(0,i.K2)(K,"isDecCode"),(0,i.K2)(I,"resolveYamlInteger"),(0,i.K2)(N,"constructYamlInteger"),(0,i.K2)(P,"isInteger");var z=new w("tag:yaml.org,2002:int",{kind:"scalar",resolve:I,construct:N,predicate:P,represent:{binary:(0,i.K2)(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,i.K2)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,i.K2)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,i.K2)(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),q=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function W(t){return null!==t&&!(!q.test(t)||"_"===t[t.length-1])}function j(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,i.K2)(W,"resolveYamlFloat"),(0,i.K2)(j,"constructYamlFloat");var H=/^[-+]?[0-9]+e/;function U(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(c.isNegativeZero(t))return"-0.0";return r=t.toString(10),H.test(r)?r.replace("e",".e"):r}function Y(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||c.isNegativeZero(t))}(0,i.K2)(U,"representYamlFloat"),(0,i.K2)(Y,"isFloat");var G=new w("tag:yaml.org,2002:float",{kind:"scalar",resolve:W,construct:j,predicate:Y,represent:U,defaultStyle:"lowercase"}),X=T.extend({implicit:[L,D,z,G]}),V=X,Z=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Q=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function J(t){return null!==t&&(null!==Z.exec(t)||null!==Q.exec(t))}function tt(t){var e,r,i,n,a,o,s,l,h=0,c=null;if(null===(e=Z.exec(t))&&(e=Q.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,i,n));if(a=+e[4],o=+e[5],s=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h=+h}return e[9]&&(c=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(c=-c)),l=new Date(Date.UTC(r,i,n,a,o,s,h)),c&&l.setTime(l.getTime()-c),l}function et(t){return t.toISOString()}(0,i.K2)(J,"resolveYamlTimestamp"),(0,i.K2)(tt,"constructYamlTimestamp"),(0,i.K2)(et,"representYamlTimestamp");var rt=new w("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:J,construct:tt,instanceOf:Date,represent:et});function it(t){return"<<"===t||null===t}(0,i.K2)(it,"resolveYamlMerge");var nt=new w("tag:yaml.org,2002:merge",{kind:"scalar",resolve:it}),at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function ot(t){if(null===t)return!1;var e,r,i=0,n=t.length,a=at;for(r=0;r<n;r++)if(!((e=a.indexOf(t.charAt(r)))>64)){if(e<0)return!1;i+=6}return i%8==0}function st(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,a=at,o=0,s=[];for(e=0;e<n;e++)e%4==0&&e&&(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)),o=o<<6|a.indexOf(i.charAt(e));return 0==(r=n%4*6)?(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)):18===r?(s.push(o>>10&255),s.push(o>>2&255)):12===r&&s.push(o>>4&255),new Uint8Array(s)}function lt(t){var e,r,i="",n=0,a=t.length,o=at;for(e=0;e<a;e++)e%3==0&&e&&(i+=o[n>>18&63],i+=o[n>>12&63],i+=o[n>>6&63],i+=o[63&n]),n=(n<<8)+t[e];return 0==(r=a%3)?(i+=o[n>>18&63],i+=o[n>>12&63],i+=o[n>>6&63],i+=o[63&n]):2===r?(i+=o[n>>10&63],i+=o[n>>4&63],i+=o[n<<2&63],i+=o[64]):1===r&&(i+=o[n>>2&63],i+=o[n<<4&63],i+=o[64],i+=o[64]),i}function ht(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,i.K2)(ot,"resolveYamlBinary"),(0,i.K2)(st,"constructYamlBinary"),(0,i.K2)(lt,"representYamlBinary"),(0,i.K2)(ht,"isBinary");var ct=new w("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ot,construct:st,predicate:ht,represent:lt}),ut=Object.prototype.hasOwnProperty,dt=Object.prototype.toString;function pt(t){if(null===t)return!0;var e,r,i,n,a,o=[],s=t;for(e=0,r=s.length;e<r;e+=1){if(i=s[e],a=!1,"[object Object]"!==dt.call(i))return!1;for(n in i)if(ut.call(i,n)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==o.indexOf(n))return!1;o.push(n)}return!0}function ft(t){return null!==t?t:[]}(0,i.K2)(pt,"resolveYamlOmap"),(0,i.K2)(ft,"constructYamlOmap");var gt=new w("tag:yaml.org,2002:omap",{kind:"sequence",resolve:pt,construct:ft}),yt=Object.prototype.toString;function mt(t){if(null===t)return!0;var e,r,i,n,a,o=t;for(a=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(i=o[e],"[object Object]"!==yt.call(i))return!1;if(1!==(n=Object.keys(i)).length)return!1;a[e]=[n[0],i[n[0]]]}return!0}function xt(t){if(null===t)return[];var e,r,i,n,a,o=t;for(a=new Array(o.length),e=0,r=o.length;e<r;e+=1)i=o[e],n=Object.keys(i),a[e]=[n[0],i[n[0]]];return a}(0,i.K2)(mt,"resolveYamlPairs"),(0,i.K2)(xt,"constructYamlPairs");var bt=new w("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:mt,construct:xt}),kt=Object.prototype.hasOwnProperty;function Ct(t){if(null===t)return!0;var e,r=t;for(e in r)if(kt.call(r,e)&&null!==r[e])return!1;return!0}function wt(t){return null!==t?t:{}}(0,i.K2)(Ct,"resolveYamlSet"),(0,i.K2)(wt,"constructYamlSet");var _t=new w("tag:yaml.org,2002:set",{kind:"mapping",resolve:Ct,construct:wt}),vt=V.extend({implicit:[rt,nt],explicit:[ct,gt,bt,_t]}),St=Object.prototype.hasOwnProperty,Tt=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,At=/[\x85\u2028\u2029]/,Mt=/[,\[\]\{\}]/,Bt=/^(?:!|!!|![a-z\-]+!)$/i,Lt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ft(t){return Object.prototype.toString.call(t)}function $t(t){return 10===t||13===t}function Et(t){return 9===t||32===t}function Dt(t){return 9===t||32===t||10===t||13===t}function Ot(t){return 44===t||91===t||93===t||123===t||125===t}function Rt(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function Kt(t){return 120===t?2:117===t?4:85===t?8:0}function It(t){return 48<=t&&t<=57?t-48:-1}function Nt(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?" 2 ":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function Pt(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function zt(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}(0,i.K2)(Ft,"_class"),(0,i.K2)($t,"is_EOL"),(0,i.K2)(Et,"is_WHITE_SPACE"),(0,i.K2)(Dt,"is_WS_OR_EOL"),(0,i.K2)(Ot,"is_FLOW_INDICATOR"),(0,i.K2)(Rt,"fromHexCode"),(0,i.K2)(Kt,"escapedHexLen"),(0,i.K2)(It,"fromDecimalCode"),(0,i.K2)(Nt,"simpleEscapeSequence"),(0,i.K2)(Pt,"charFromCodepoint"),(0,i.K2)(zt,"setProperty");var qt,Wt=new Array(256),jt=new Array(256);for(qt=0;qt<256;qt++)Wt[qt]=Nt(qt)?1:0,jt[qt]=Nt(qt);function Ht(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||vt,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ut(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=m(r),new p(e,r)}function Yt(t,e){throw Ut(t,e)}function Gt(t,e){t.onWarning&&t.onWarning.call(null,Ut(t,e))}(0,i.K2)(Ht,"State$1"),(0,i.K2)(Ut,"generateError"),(0,i.K2)(Yt,"throwError"),(0,i.K2)(Gt,"throwWarning");var Xt={YAML:(0,i.K2)(function(t,e,r){var i,n,a;null!==t.version&&Yt(t,"duplication of %YAML directive"),1!==r.length&&Yt(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&Yt(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),a=parseInt(i[2],10),1!==n&&Yt(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&Gt(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,i.K2)(function(t,e,r){var i,n;2!==r.length&&Yt(t,"TAG directive accepts exactly two arguments"),i=r[0],n=r[1],Bt.test(i)||Yt(t,"ill-formed tag handle (first argument) of the TAG directive"),St.call(t.tagMap,i)&&Yt(t,'there is a previously declared suffix for "'+i+'" tag handle'),Lt.test(n)||Yt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(e){Yt(t,"tag prefix is malformed: "+n)}t.tagMap[i]=n},"handleTagDirective")};function Vt(t,e,r,i){var n,a,o,s;if(e<r){if(s=t.input.slice(e,r),i)for(n=0,a=s.length;n<a;n+=1)9===(o=s.charCodeAt(n))||32<=o&&o<=1114111||Yt(t,"expected valid JSON character");else Tt.test(s)&&Yt(t,"the stream contains non-printable characters");t.result+=s}}function Zt(t,e,r,i){var n,a,o,s;for(c.isObject(r)||Yt(t,"cannot merge mappings; the provided source object is unacceptable"),o=0,s=(n=Object.keys(r)).length;o<s;o+=1)a=n[o],St.call(e,a)||(zt(e,a,r[a]),i[a]=!0)}function Qt(t,e,r,i,n,a,o,s,l){var h,c;if(Array.isArray(n))for(h=0,c=(n=Array.prototype.slice.call(n)).length;h<c;h+=1)Array.isArray(n[h])&&Yt(t,"nested arrays are not supported inside keys"),"object"==typeof n&&"[object Object]"===Ft(n[h])&&(n[h]="[object Object]");if("object"==typeof n&&"[object Object]"===Ft(n)&&(n="[object Object]"),n=String(n),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(a))for(h=0,c=a.length;h<c;h+=1)Zt(t,e,a[h],r);else Zt(t,e,a,r);else t.json||St.call(r,n)||!St.call(e,n)||(t.line=o||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,Yt(t,"duplicated mapping key")),zt(e,n,a),delete r[n];return e}function Jt(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):Yt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function te(t,e,r){for(var i=0,n=t.input.charCodeAt(t.position);0!==n;){for(;Et(n);)9===n&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&35===n)do{n=t.input.charCodeAt(++t.position)}while(10!==n&&13!==n&&0!==n);if(!$t(n))break;for(Jt(t),n=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===n;)t.lineIndent++,n=t.input.charCodeAt(++t.position)}return-1!==r&&0!==i&&t.lineIndent<r&&Gt(t,"deficient indentation"),i}function ee(t){var e,r=t.position;return!(45!==(e=t.input.charCodeAt(r))&&46!==e||e!==t.input.charCodeAt(r+1)||e!==t.input.charCodeAt(r+2)||(r+=3,0!==(e=t.input.charCodeAt(r))&&!Dt(e)))}function re(t,e){1===e?t.result+=" ":e>1&&(t.result+=c.repeat("\n",e-1))}function ie(t,e,r){var i,n,a,o,s,l,h,c,u=t.kind,d=t.result;if(Dt(c=t.input.charCodeAt(t.position))||Ot(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(Dt(i=t.input.charCodeAt(t.position+1))||r&&Ot(i)))return!1;for(t.kind="scalar",t.result="",n=a=t.position,o=!1;0!==c;){if(58===c){if(Dt(i=t.input.charCodeAt(t.position+1))||r&&Ot(i))break}else if(35===c){if(Dt(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&ee(t)||r&&Ot(c))break;if($t(c)){if(s=t.line,l=t.lineStart,h=t.lineIndent,te(t,!1,-1),t.lineIndent>=e){o=!0,c=t.input.charCodeAt(t.position);continue}t.position=a,t.line=s,t.lineStart=l,t.lineIndent=h;break}}o&&(Vt(t,n,a,!1),re(t,t.line-s),n=a=t.position,o=!1),Et(c)||(a=t.position+1),c=t.input.charCodeAt(++t.position)}return Vt(t,n,a,!1),!!t.result||(t.kind=u,t.result=d,!1)}function ne(t,e){var r,i,n;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(Vt(t,i,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,n=t.position}else $t(r)?(Vt(t,i,n,!0),re(t,te(t,!1,e)),i=n=t.position):t.position===t.lineStart&&ee(t)?Yt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);Yt(t,"unexpected end of the stream within a single quoted scalar")}function ae(t,e){var r,i,n,a,o,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return Vt(t,r,t.position,!0),t.position++,!0;if(92===s){if(Vt(t,r,t.position,!0),$t(s=t.input.charCodeAt(++t.position)))te(t,!1,e);else if(s<256&&Wt[s])t.result+=jt[s],t.position++;else if((o=Kt(s))>0){for(n=o,a=0;n>0;n--)(o=Rt(s=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+o:Yt(t,"expected hexadecimal character");t.result+=Pt(a),t.position++}else Yt(t,"unknown escape sequence");r=i=t.position}else $t(s)?(Vt(t,r,i,!0),re(t,te(t,!1,e)),r=i=t.position):t.position===t.lineStart&&ee(t)?Yt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Yt(t,"unexpected end of the stream within a double quoted scalar")}function oe(t,e){var r,i,n,a,o,s,l,h,c,u,d,p,f=!0,g=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))o=93,h=!1,a=[];else{if(123!==p)return!1;o=125,h=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),p=t.input.charCodeAt(++t.position);0!==p;){if(te(t,!0,e),(p=t.input.charCodeAt(t.position))===o)return t.position++,t.tag=g,t.anchor=y,t.kind=h?"mapping":"sequence",t.result=a,!0;f?44===p&&Yt(t,"expected the node content, but found ','"):Yt(t,"missed comma between flow collection entries"),d=null,s=l=!1,63===p&&Dt(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,te(t,!0,e)),r=t.line,i=t.lineStart,n=t.position,pe(t,e,1,!1,!0),u=t.tag,c=t.result,te(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(s=!0,p=t.input.charCodeAt(++t.position),te(t,!0,e),pe(t,e,1,!1,!0),d=t.result),h?Qt(t,a,m,u,c,d,r,i,n):s?a.push(Qt(t,null,m,u,c,d,r,i,n)):a.push(c),te(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(f=!0,p=t.input.charCodeAt(++t.position)):f=!1}Yt(t,"unexpected end of the stream within a flow collection")}function se(t,e){var r,i,n,a,o=1,s=!1,l=!1,h=e,u=0,d=!1;if(124===(a=t.input.charCodeAt(t.position)))i=!1;else{if(62!==a)return!1;i=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===o?o=43===a?3:2:Yt(t,"repeat of a chomping mode identifier");else{if(!((n=It(a))>=0))break;0===n?Yt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Yt(t,"repeat of an indentation width identifier"):(h=e+n-1,l=!0)}if(Et(a)){do{a=t.input.charCodeAt(++t.position)}while(Et(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!$t(a)&&0!==a)}for(;0!==a;){for(Jt(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndent<h)&&32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>h&&(h=t.lineIndent),$t(a))u++;else{if(t.lineIndent<h){3===o?t.result+=c.repeat("\n",s?1+u:u):1===o&&s&&(t.result+="\n");break}for(i?Et(a)?(d=!0,t.result+=c.repeat("\n",s?1+u:u)):d?(d=!1,t.result+=c.repeat("\n",u+1)):0===u?s&&(t.result+=" "):t.result+=c.repeat("\n",u):t.result+=c.repeat("\n",s?1+u:u),s=!0,l=!0,u=0,r=t.position;!$t(a)&&0!==a;)a=t.input.charCodeAt(++t.position);Vt(t,r,t.position,!1)}}return!0}function le(t,e){var r,i,n=t.tag,a=t.anchor,o=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,Yt(t,"tab characters must not be used in indentation")),45===i)&&Dt(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,te(t,!0,-1)&&t.lineIndent<=e)o.push(null),i=t.input.charCodeAt(t.position);else if(r=t.line,pe(t,e,3,!1,!0),o.push(t.result),te(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==i)Yt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!s&&(t.tag=n,t.anchor=a,t.kind="sequence",t.result=o,!0)}function he(t,e,r){var i,n,a,o,s,l,h,c=t.tag,u=t.anchor,d={},p=Object.create(null),f=null,g=null,y=null,m=!1,x=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=d),h=t.input.charCodeAt(t.position);0!==h;){if(m||-1===t.firstTabInLine||(t.position=t.firstTabInLine,Yt(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),a=t.line,63!==h&&58!==h||!Dt(i)){if(o=t.line,s=t.lineStart,l=t.position,!pe(t,r,2,!1,!0))break;if(t.line===a){for(h=t.input.charCodeAt(t.position);Et(h);)h=t.input.charCodeAt(++t.position);if(58===h)Dt(h=t.input.charCodeAt(++t.position))||Yt(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(Qt(t,d,p,f,g,null,o,s,l),f=g=y=null),x=!0,m=!1,n=!1,f=t.tag,g=t.result;else{if(!x)return t.tag=c,t.anchor=u,!0;Yt(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!x)return t.tag=c,t.anchor=u,!0;Yt(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===h?(m&&(Qt(t,d,p,f,g,null,o,s,l),f=g=y=null),x=!0,m=!0,n=!0):m?(m=!1,n=!0):Yt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,h=i;if((t.line===a||t.lineIndent>e)&&(m&&(o=t.line,s=t.lineStart,l=t.position),pe(t,e,4,!0,n)&&(m?g=t.result:y=t.result),m||(Qt(t,d,p,f,g,y,o,s,l),f=g=y=null),te(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==h)Yt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&Qt(t,d,p,f,g,null,o,s,l),x&&(t.tag=c,t.anchor=u,t.kind="mapping",t.result=d),x}function ce(t){var e,r,i,n,a=!1,o=!1;if(33!==(n=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&Yt(t,"duplication of a tag property"),60===(n=t.input.charCodeAt(++t.position))?(a=!0,n=t.input.charCodeAt(++t.position)):33===n?(o=!0,r="!!",n=t.input.charCodeAt(++t.position)):r="!",e=t.position,a){do{n=t.input.charCodeAt(++t.position)}while(0!==n&&62!==n);t.position<t.length?(i=t.input.slice(e,t.position),n=t.input.charCodeAt(++t.position)):Yt(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==n&&!Dt(n);)33===n&&(o?Yt(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),Bt.test(r)||Yt(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),n=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),Mt.test(i)&&Yt(t,"tag suffix cannot contain flow indicator characters")}i&&!Lt.test(i)&&Yt(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(e){Yt(t,"tag name is malformed: "+i)}return a?t.tag=i:St.call(t.tagMap,r)?t.tag=t.tagMap[r]+i:"!"===r?t.tag="!"+i:"!!"===r?t.tag="tag:yaml.org,2002:"+i:Yt(t,'undeclared tag handle "'+r+'"'),!0}function ue(t){var e,r;if(38!==(r=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&Yt(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!Dt(r)&&!Ot(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Yt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function de(t){var e,r,i;if(42!==(i=t.input.charCodeAt(t.position)))return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!Dt(i)&&!Ot(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&Yt(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),St.call(t.anchorMap,r)||Yt(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],te(t,!0,-1),!0}function pe(t,e,r,i,n){var a,o,s,l,h,c,u,d,p,f=1,g=!1,y=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=o=s=4===r||3===r,i&&te(t,!0,-1)&&(g=!0,t.lineIndent>e?f=1:t.lineIndent===e?f=0:t.lineIndent<e&&(f=-1)),1===f)for(;ce(t)||ue(t);)te(t,!0,-1)?(g=!0,s=a,t.lineIndent>e?f=1:t.lineIndent===e?f=0:t.lineIndent<e&&(f=-1)):s=!1;if(s&&(s=g||n),1!==f&&4!==r||(d=1===r||2===r?e:e+1,p=t.position-t.lineStart,1===f?s&&(le(t,p)||he(t,p,d))||oe(t,d)?y=!0:(o&&se(t,d)||ne(t,d)||ae(t,d)?y=!0:de(t)?(y=!0,null===t.tag&&null===t.anchor||Yt(t,"alias node should not have any properties")):ie(t,d,1===r)&&(y=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===f&&(y=s&&le(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&Yt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,h=t.implicitTypes.length;l<h;l+=1)if((u=t.implicitTypes[l]).resolve(t.result)){t.result=u.construct(t.result),t.tag=u.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(St.call(t.typeMap[t.kind||"fallback"],t.tag))u=t.typeMap[t.kind||"fallback"][t.tag];else for(u=null,l=0,h=(c=t.typeMap.multi[t.kind||"fallback"]).length;l<h;l+=1)if(t.tag.slice(0,c[l].tag.length)===c[l].tag){u=c[l];break}u||Yt(t,"unknown tag !<"+t.tag+">"),null!==t.result&&u.kind!==t.kind&&Yt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Yt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function fe(t){var e,r,i,n,a=t.position,o=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(n=t.input.charCodeAt(t.position))&&(te(t,!0,-1),n=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==n));){for(o=!0,n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!Dt(n);)n=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&Yt(t,"directive name must not be less than one character in length");0!==n;){for(;Et(n);)n=t.input.charCodeAt(++t.position);if(35===n){do{n=t.input.charCodeAt(++t.position)}while(0!==n&&!$t(n));break}if($t(n))break;for(e=t.position;0!==n&&!Dt(n);)n=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==n&&Jt(t),St.call(Xt,r)?Xt[r](t,r,i):Gt(t,'unknown document directive "'+r+'"')}te(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,te(t,!0,-1)):o&&Yt(t,"directives end mark is expected"),pe(t,t.lineIndent-1,4,!1,!0),te(t,!0,-1),t.checkLineBreaks&&At.test(t.input.slice(a,t.position))&&Gt(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&ee(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,te(t,!0,-1)):t.position<t.length-1&&Yt(t,"end of the stream or a document separator is expected")}function ge(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var r=new Ht(t,e),i=t.indexOf("\0");for(-1!==i&&(r.position=i,Yt(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)fe(r);return r.documents}function ye(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);var i=ge(t,r);if("function"!=typeof e)return i;for(var n=0,a=i.length;n<a;n+=1)e(i[n])}function me(t,e){var r=ge(t,e);if(0!==r.length){if(1===r.length)return r[0];throw new p("expected a single document in the stream, but found more")}}(0,i.K2)(Vt,"captureSegment"),(0,i.K2)(Zt,"mergeMappings"),(0,i.K2)(Qt,"storeMappingPair"),(0,i.K2)(Jt,"readLineBreak"),(0,i.K2)(te,"skipSeparationSpace"),(0,i.K2)(ee,"testDocumentSeparator"),(0,i.K2)(re,"writeFoldedLines"),(0,i.K2)(ie,"readPlainScalar"),(0,i.K2)(ne,"readSingleQuotedScalar"),(0,i.K2)(ae,"readDoubleQuotedScalar"),(0,i.K2)(oe,"readFlowCollection"),(0,i.K2)(se,"readBlockScalar"),(0,i.K2)(le,"readBlockSequence"),(0,i.K2)(he,"readBlockMapping"),(0,i.K2)(ce,"readTagProperty"),(0,i.K2)(ue,"readAnchorProperty"),(0,i.K2)(de,"readAlias"),(0,i.K2)(pe,"composeNode"),(0,i.K2)(fe,"readDocument"),(0,i.K2)(ge,"loadDocuments"),(0,i.K2)(ye,"loadAll$1"),(0,i.K2)(me,"load$1");var xe=me,be=Object.prototype.toString,ke=Object.prototype.hasOwnProperty,Ce=65279,we={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},_e=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],ve=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Se(t,e){var r,i,n,a,o,s,l;if(null===e)return{};for(r={},n=0,a=(i=Object.keys(e)).length;n<a;n+=1)o=i[n],s=String(e[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(l=t.compiledTypeMap.fallback[o])&&ke.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}function Te(t){var e,r,i;if(e=t.toString(16).toUpperCase(),t<=255)r="x",i=2;else if(t<=65535)r="u",i=4;else{if(!(t<=4294967295))throw new p("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+c.repeat("0",i-e.length)+e}function Ae(t){this.schema=t.schema||vt,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=c.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Se(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Me(t,e){for(var r,i=c.repeat(" ",e),n=0,a=-1,o="",s=t.length;n<s;)-1===(a=t.indexOf("\n",n))?(r=t.slice(n),n=s):(r=t.slice(n,a+1),n=a+1),r.length&&"\n"!==r&&(o+=i),o+=r;return o}function Be(t,e){return"\n"+c.repeat(" ",t.indent*e)}function Le(t,e){var r,i;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function Fe(t){return 32===t||9===t}function $e(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==Ce||65536<=t&&t<=1114111}function Ee(t){return $e(t)&&t!==Ce&&13!==t&&10!==t}function De(t,e,r){var i=Ee(t),n=i&&!Fe(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!n)||Ee(e)&&!Fe(e)&&35===t||58===e&&n}function Oe(t){return $e(t)&&t!==Ce&&!Fe(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function Re(t){return!Fe(t)&&58!==t}function Ke(t,e){var r,i=t.charCodeAt(e);return i>=55296&&i<=56319&&e+1<t.length&&(r=t.charCodeAt(e+1))>=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function Ie(t){return/^\n* /.test(t)}function Ne(t,e,r,i,n,a,o,s){var l,h=0,c=null,u=!1,d=!1,p=-1!==i,f=-1,g=Oe(Ke(t,0))&&Re(Ke(t,t.length-1));if(e||o)for(l=0;l<t.length;h>=65536?l+=2:l++){if(!$e(h=Ke(t,l)))return 5;g=g&&De(h,c,s),c=h}else{for(l=0;l<t.length;h>=65536?l+=2:l++){if(10===(h=Ke(t,l)))u=!0,p&&(d=d||l-f-1>i&&" "!==t[f+1],f=l);else if(!$e(h))return 5;g=g&&De(h,c,s),c=h}d=d||p&&l-f-1>i&&" "!==t[f+1]}return u||d?r>9&&Ie(t)?5:o?2===a?5:2:d?4:3:!g||o||n(t)?2===a?5:2:1}function Pe(t,e,r,n,a){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==_e.indexOf(e)||ve.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var o=t.indent*Math.max(1,r),s=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),l=n||t.flowLevel>-1&&r>=t.flowLevel;function h(e){return Le(t,e)}switch((0,i.K2)(h,"testAmbiguity"),Ne(e,l,t.indent,s,h,t.quotingType,t.forceQuotes&&!n,a)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+ze(e,t.indent)+qe(Me(e,o));case 4:return">"+ze(e,t.indent)+qe(Me(We(e,s),o));case 5:return'"'+He(e)+'"';default:throw new p("impossible error: invalid scalar style")}}()}function ze(t,e){var r=Ie(t)?String(e):"",i="\n"===t[t.length-1];return r+(!i||"\n"!==t[t.length-2]&&"\n"!==t?i?"":"-":"+")+"\n"}function qe(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function We(t,e){for(var r,i,n,a=/(\n+)([^\n]*)/g,o=(r=-1!==(r=t.indexOf("\n"))?r:t.length,a.lastIndex=r,je(t.slice(0,r),e)),s="\n"===t[0]||" "===t[0];n=a.exec(t);){var l=n[1],h=n[2];i=" "===h[0],o+=l+(s||i||""===h?"":"\n")+je(h,e),s=i}return o}function je(t,e){if(""===t||" "===t[0])return t;for(var r,i,n=/ [^ ]/g,a=0,o=0,s=0,l="";r=n.exec(t);)(s=r.index)-a>e&&(i=o>a?o:s,l+="\n"+t.slice(a,i),a=i+1),o=s;return l+="\n",t.length-a>e&&o>a?l+=t.slice(a,o)+"\n"+t.slice(o+1):l+=t.slice(a),l.slice(1)}function He(t){for(var e,r="",i=0,n=0;n<t.length;i>=65536?n+=2:n++)i=Ke(t,n),!(e=we[i])&&$e(i)?(r+=t[n],i>=65536&&(r+=t[n+1])):r+=e||Te(i);return r}function Ue(t,e,r){var i,n,a,o="",s=t.tag;for(i=0,n=r.length;i<n;i+=1)a=r[i],t.replacer&&(a=t.replacer.call(r,String(i),a)),(Ze(t,e,a,!1,!1)||void 0===a&&Ze(t,e,null,!1,!1))&&(""!==o&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=s,t.dump="["+o+"]"}function Ye(t,e,r,i){var n,a,o,s="",l=t.tag;for(n=0,a=r.length;n<a;n+=1)o=r[n],t.replacer&&(o=t.replacer.call(r,String(n),o)),(Ze(t,e+1,o,!0,!0,!1,!0)||void 0===o&&Ze(t,e+1,null,!0,!0,!1,!0))&&(i&&""===s||(s+=Be(t,e)),t.dump&&10===t.dump.charCodeAt(0)?s+="-":s+="- ",s+=t.dump);t.tag=l,t.dump=s||"[]"}function Ge(t,e,r){var i,n,a,o,s,l="",h=t.tag,c=Object.keys(r);for(i=0,n=c.length;i<n;i+=1)s="",""!==l&&(s+=", "),t.condenseFlow&&(s+='"'),o=r[a=c[i]],t.replacer&&(o=t.replacer.call(r,a,o)),Ze(t,e,a,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Ze(t,e,o,!1,!1)&&(l+=s+=t.dump));t.tag=h,t.dump="{"+l+"}"}function Xe(t,e,r,i){var n,a,o,s,l,h,c="",u=t.tag,d=Object.keys(r);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new p("sortKeys must be a boolean or a function");for(n=0,a=d.length;n<a;n+=1)h="",i&&""===c||(h+=Be(t,e)),s=r[o=d[n]],t.replacer&&(s=t.replacer.call(r,o,s)),Ze(t,e+1,o,!0,!0,!0)&&((l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,l&&(h+=Be(t,e)),Ze(t,e+1,s,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?h+=":":h+=": ",c+=h+=t.dump));t.tag=u,t.dump=c||"{}"}function Ve(t,e,r){var i,n,a,o,s,l;for(a=0,o=(n=r?t.explicitTypes:t.implicitTypes).length;a<o;a+=1)if(((s=n[a]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof e&&e instanceof s.instanceOf)&&(!s.predicate||s.predicate(e))){if(r?s.multi&&s.representName?t.tag=s.representName(e):t.tag=s.tag:t.tag="?",s.represent){if(l=t.styleMap[s.tag]||s.defaultStyle,"[object Function]"===be.call(s.represent))i=s.represent(e,l);else{if(!ke.call(s.represent,l))throw new p("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');i=s.represent[l](e,l)}t.dump=i}return!0}return!1}function Ze(t,e,r,i,n,a,o){t.tag=null,t.dump=r,Ve(t,r,!1)||Ve(t,r,!0);var s,l=be.call(t.dump),h=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var c,u,d="[object Object]"===l||"[object Array]"===l;if(d&&(u=-1!==(c=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(n=!1),u&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(d&&u&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(Xe(t,e,t.dump,n),u&&(t.dump="&ref_"+c+t.dump)):(Ge(t,e,t.dump),u&&(t.dump="&ref_"+c+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!o&&e>0?Ye(t,e-1,t.dump,n):Ye(t,e,t.dump,n),u&&(t.dump="&ref_"+c+t.dump)):(Ue(t,e,t.dump),u&&(t.dump="&ref_"+c+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new p("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&Pe(t,t.dump,e,a,h)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function Qe(t,e){var r,i,n=[],a=[];for(Je(t,n,a),r=0,i=a.length;r<i;r+=1)e.duplicates.push(n[a[r]]);e.usedDuplicates=new Array(i)}function Je(t,e,r){var i,n,a;if(null!==t&&"object"==typeof t)if(-1!==(n=e.indexOf(t)))-1===r.indexOf(n)&&r.push(n);else if(e.push(t),Array.isArray(t))for(n=0,a=t.length;n<a;n+=1)Je(t[n],e,r);else for(n=0,a=(i=Object.keys(t)).length;n<a;n+=1)Je(t[i[n]],e,r)}function tr(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}(0,i.K2)(Se,"compileStyleMap"),(0,i.K2)(Te,"encodeHex"),(0,i.K2)(Ae,"State"),(0,i.K2)(Me,"indentString"),(0,i.K2)(Be,"generateNextLine"),(0,i.K2)(Le,"testImplicitResolving"),(0,i.K2)(Fe,"isWhitespace"),(0,i.K2)($e,"isPrintable"),(0,i.K2)(Ee,"isNsCharOrWhitespace"),(0,i.K2)(De,"isPlainSafe"),(0,i.K2)(Oe,"isPlainSafeFirst"),(0,i.K2)(Re,"isPlainSafeLast"),(0,i.K2)(Ke,"codePointAt"),(0,i.K2)(Ie,"needIndentIndicator"),(0,i.K2)(Ne,"chooseScalarStyle"),(0,i.K2)(Pe,"writeScalar"),(0,i.K2)(ze,"blockHeader"),(0,i.K2)(qe,"dropEndingNewline"),(0,i.K2)(We,"foldString"),(0,i.K2)(je,"foldLine"),(0,i.K2)(He,"escapeString"),(0,i.K2)(Ue,"writeFlowSequence"),(0,i.K2)(Ye,"writeBlockSequence"),(0,i.K2)(Ge,"writeFlowMapping"),(0,i.K2)(Xe,"writeBlockMapping"),(0,i.K2)(Ve,"detectType"),(0,i.K2)(Ze,"writeNode"),(0,i.K2)(Qe,"getDuplicateReferences"),(0,i.K2)(Je,"inspectNode"),(0,i.K2)(function(t,e){var r=new Ae(e=e||{});r.noRefs||Qe(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Ze(r,0,i,!0,!0)?r.dump+"\n":""},"dump$1"),(0,i.K2)(tr,"renamed");var er=X,rr=xe;tr("safeLoad","load"),tr("safeLoadAll","loadAll"),tr("safeDump","dump")},7879(t,e,r){"use strict";r.d(e,{O:()=>o,X:()=>s});var i=r(796),n=r(4098),a=r(797),o=(0,a.K2)(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins");async function s(t,e){const r=t.getElementsByTagName("img");if(!r||0===r.length)return;const o=""===e.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(t=>new Promise(e=>{function r(){if(t.style.display="flex",t.style.flexDirection="column",o){const e=(0,n.D7)().fontSize?(0,n.D7)().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[a=n.UI.fontSize]=(0,i.I5)(e),o=a*r+"px";t.style.minWidth=o,t.style.maxWidth=o}else t.style.width="100%";e(t)}(0,a.K2)(r,"setupImage"),setTimeout(()=>{t.complete&&r()}),t.addEventListener("error",r),t.addEventListener("load",r)})))}(0,a.K2)(s,"configureLabelImages")}},i={};function n(t){var e=i[t];if(void 0!==e)return e.exports;var a=i[t]={id:t,loaded:!1,exports:{}};return r[t].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.m=r,n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.f={},n.e=t=>Promise.all(Object.keys(n.f).reduce((e,r)=>(n.f[r](t,e),e),[])),n.u=t=>t+".js?ver="+{21:"7c5ddfbc92695b258481",31:"979b8b2b570f9b0417b9",38:"7841ce7ef2649a97c976",70:"4cecb299cfe431e160d1",82:"2e8dbc352dbe0b65c9f8",130:"677e501fc7085c9846c8",165:"9b9766e1eb62a7532d9b",169:"44eba7d0471f5ef3d358",187:"a471a21d0d6bde7307bc",201:"67d8936996cf49a993fc",215:"c9d58002e1f679d5c7a5",235:"3ebe5f8e26dccd42de85",293:"9f7937c390612d375881",311:"9976c9d41ac255996caa",333:"7b621fcfa6fd1412f34f",335:"c9255b289b2503c80168",359:"92e077b5da7cae50d909",367:"af6ba169861f14b1660a",377:"3607ffe2c2993f2832a9",378:"755c6d23f755a4d2e8bf",427:"ce329e2921f06f5b7f9e",447:"41ab68cd3691bf5d43e5",518:"73412d83be4c92445edb",535:"1bc71fd7f4a6ed4e4437",550:"0bffec6388b625eea900",598:"9cbf5daef32b315888b6",620:"a591ccc0e7f3b81840f4",644:"f657a1376ecb2a00bc80",659:"0c140fda7eba17992dc7",679:"a81035aba976ee4feb49",697:"c61a5ee9a65feb9f9edc",731:"821f8a22265bd7a019c3",736:"cc3b04df74937c7c9a5d",811:"efa4a595198706143da8",859:"31aec6306bc25ab34486",878:"31f9a0c518ec900f133d",894:"d557d8c53d7c5d1d13fb",895:"7d745b0893bf3f0d9731",928:"a49814dd02699fafc7cd",944:"cf80befa40befc9af971",957:"2b8dfe6665065ff36b6e",982:"f533c1c17302663d485b",999:"f9ea73a141478ed6c5fd"}[t],n.miniCssF=t=>{},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="mindcat:",n.l=(r,i,a,o)=>{if(t[r])t[r].push(i);else{var s,l;if(void 0!==a)for(var h=document.getElementsByTagName("script"),c=0;c<h.length;c++){var u=h[c];if(u.getAttribute("src")==r||u.getAttribute("data-webpack")==e+a){s=u;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",e+a),s.src=r),t[r]=[i];var d=(e,i)=>{s.onerror=s.onload=null,clearTimeout(p);var n=t[r];if(delete t[r],s.parentNode&&s.parentNode.removeChild(s),n&&n.forEach(t=>t(i)),e)return e(i)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),l&&document.head.appendChild(s)}},n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t;globalThis.importScripts&&(t=globalThis.location+"");var e=globalThis.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!t||!/^http(s?):/.test(t));)t=r[i--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t+"../"})(),(()=>{var t={12:0};n.f.j=(e,r)=>{var i=n.o(t,e)?t[e]:void 0;if(0!==i)if(i)r.push(i[2]);else{var a=new Promise((r,n)=>i=t[e]=[r,n]);r.push(i[2]=a);var o=n.p+n.u(e),s=new Error;n.l(o,r=>{if(n.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var a=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;s.message="Loading chunk "+e+" failed.\n("+a+": "+o+")",s.name="ChunkLoadError",s.type=a,s.request=o,i[1](s)}},"chunk-"+e,e)}};var e=(e,r)=>{var i,a,[o,s,l]=r,h=0;if(o.some(e=>0!==t[e])){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);l&&l(n)}for(e&&e(r);h<o.length;h++)a=o[h],n.o(t,a)&&t[a]&&t[a][0](),t[a]=0},r=globalThis.webpackChunkmindcat=globalThis.webpackChunkmindcat||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})(),(()=>{"use strict";var t=n(1475),e=n(3283),r=n(9856),i=(n(5948),n(4769),n(1174),n(7879),n(1960),n(6866)),a=n(796),o=n(4098),s=n(797),l=n(513),h=n(1444),c="comm",u="rule",d="decl",p=Math.abs,f=String.fromCharCode;function g(t){return t.trim()}function y(t,e,r){return t.replace(e,r)}function m(t,e,r){return t.indexOf(e,r)}function x(t,e){return 0|t.charCodeAt(e)}function b(t,e,r){return t.slice(e,r)}function k(t){return t.length}function C(t,e){return e.push(t),t}function w(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function _(t,e,r,i){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case"@namespace":case d:return t.return=t.return||t.value;case c:return"";case"@keyframes":return t.return=t.value+"{"+w(t.children,i)+"}";case u:if(!k(t.value=t.props.join(",")))return""}return k(r=w(t.children,i))?t.return=t.value+"{"+r+"}":""}Object.assign;var v=1,S=1,T=0,A=0,M=0,B="";function L(t,e,r,i,n,a,o,s){return{value:t,root:e,parent:r,type:i,props:n,children:a,line:v,column:S,length:o,return:"",siblings:s}}function F(){return M=A>0?x(B,--A):0,S--,10===M&&(S=1,v--),M}function $(){return M=A<T?x(B,A++):0,S++,10===M&&(S=1,v++),M}function E(){return x(B,A)}function D(){return A}function O(t,e){return b(B,t,e)}function R(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function K(t){return g(O(A-1,P(91===t?t+2:40===t?t+1:t)))}function I(t){for(;(M=E())&&M<33;)$();return R(t)>2||R(M)>3?"":" "}function N(t,e){for(;--e&&$()&&!(M<48||M>102||M>57&&M<65||M>70&&M<97););return O(t,D()+(e<6&&32==E()&&32==$()))}function P(t){for(;$();)switch(M){case t:return A;case 34:case 39:34!==t&&39!==t&&P(M);break;case 40:41===t&&P(t);break;case 92:$()}return A}function z(t,e){for(;$()&&t+M!==57&&(t+M!==84||47!==E()););return"/*"+O(e,A-1)+"*"+f(47===t?t:$())}function q(t){for(;!R(E());)$();return O(t,A)}function W(t){return function(t){return B="",t}(j("",null,null,null,[""],t=function(t){return v=S=1,T=k(B=t),A=0,[]}(t),0,[0],t))}function j(t,e,r,i,n,a,o,s,l){for(var h=0,c=0,u=o,d=0,g=0,w=0,_=1,v=1,S=1,T=0,A="",M=n,B=a,L=i,O=A;v;)switch(w=T,T=$()){case 40:if(108!=w&&58==x(O,u-1)){-1!=m(O+=y(K(T),"&","&\f"),"&\f",p(h?s[h-1]:0))&&(S=-1);break}case 34:case 39:case 91:O+=K(T);break;case 9:case 10:case 13:case 32:O+=I(w);break;case 92:O+=N(D()-1,7);continue;case 47:switch(E()){case 42:case 47:C(U(z($(),D()),e,r,l),l),5!=R(w||1)&&5!=R(E()||1)||!k(O)||" "===b(O,-1,void 0)||(O+=" ");break;default:O+="/"}break;case 123*_:s[h++]=k(O)*S;case 125*_:case 59:case 0:switch(T){case 0:case 125:v=0;case 59+c:-1==S&&(O=y(O,/\f/g,"")),g>0&&(k(O)-u||0===_&&47===w)&&C(g>32?Y(O+";",i,r,u-1,l):Y(y(O," ","")+";",i,r,u-2,l),l);break;case 59:O+=";";default:if(C(L=H(O,e,r,h,c,n,s,A,M=[],B=[],u,a),a),123===T)if(0===c)j(O,e,L,L,M,a,u,s,B);else{switch(d){case 99:if(110===x(O,3))break;case 108:if(97===x(O,2))break;default:c=0;case 100:case 109:case 115:}c?j(t,L,L,i&&C(H(t,L,L,0,0,n,s,A,n,M=[],u,B),B),n,B,u,s,i?M:B):j(O,L,L,L,[""],B,0,s,B)}}h=c=g=0,_=S=1,A=O="",u=o;break;case 58:u=1+k(O),g=w;default:if(_<1)if(123==T)--_;else if(125==T&&0==_++&&125==F())continue;switch(O+=f(T),T*_){case 38:S=c>0?1:(O+="\f",-1);break;case 44:s[h++]=(k(O)-1)*S,S=1;break;case 64:45===E()&&(O+=K($())),d=E(),c=u=k(A=O+=q(D())),T++;break;case 45:45===w&&2==k(O)&&(_=0)}}return a}function H(t,e,r,i,n,a,o,s,l,h,c,d){for(var f=n-1,m=0===n?a:[""],x=function(t){return t.length}(m),k=0,C=0,w=0;k<i;++k)for(var _=0,v=b(t,f+1,f=p(C=o[k])),S=t;_<x;++_)(S=g(C>0?m[_]+" "+v:y(v,/&\f/g,m[_])))&&(l[w++]=S);return L(t,e,r,0===n?u:s,l,h,c,d)}function U(t,e,r,i){return L(t,e,r,c,f(M),b(t,2,-2),0,i)}function Y(t,e,r,i,n){return L(t,e,r,d,b(t,0,i),b(t,i+1,-1),i,n)}var G=n(9418),X=n(2193),V={id:"c4",detector:(0,s.K2)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await n.e(659).then(n.bind(n,8659));return{id:"c4",diagram:t}},"loader")},Z="flowchart",Q={id:Z,detector:(0,s.K2)((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await n.e(38).then(n.bind(n,2038));return{id:Z,diagram:t}},"loader")},J="flowchart-v2",tt={id:J,detector:(0,s.K2)((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await n.e(38).then(n.bind(n,2038));return{id:J,diagram:t}},"loader")},et={id:"er",detector:(0,s.K2)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await n.e(378).then(n.bind(n,5378));return{id:"er",diagram:t}},"loader")},rt="gitGraph",it={id:rt,detector:(0,s.K2)(t=>/^\s*gitGraph/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(731),n.e(679)]).then(n.bind(n,1679));return{id:rt,diagram:t}},"loader")},nt="gantt",at={id:nt,detector:(0,s.K2)(t=>/^\s*gantt/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await n.e(944).then(n.bind(n,5944));return{id:nt,diagram:t}},"loader")},ot="info",st={id:ot,detector:(0,s.K2)(t=>/^\s*info/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(731),n.e(999)]).then(n.bind(n,7999));return{id:ot,diagram:t}},"loader")},lt={id:"pie",detector:(0,s.K2)(t=>/^\s*pie/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(731),n.e(518)]).then(n.bind(n,5518));return{id:"pie",diagram:t}},"loader")},ht="quadrantChart",ct={id:ht,detector:(0,s.K2)(t=>/^\s*quadrantChart/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await n.e(333).then(n.bind(n,7333));return{id:ht,diagram:t}},"loader")},ut="xychart",dt={id:ut,detector:(0,s.K2)(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await n.e(359).then(n.bind(n,5359));return{id:ut,diagram:t}},"loader")},pt="requirement",ft={id:pt,detector:(0,s.K2)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await n.e(895).then(n.bind(n,5895));return{id:pt,diagram:t}},"loader")},gt="sequence",yt={id:gt,detector:(0,s.K2)(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await n.e(31).then(n.bind(n,1031));return{id:gt,diagram:t}},"loader")},mt="class",xt={id:mt,detector:(0,s.K2)((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(859),n.e(377)]).then(n.bind(n,4377));return{id:mt,diagram:t}},"loader")},bt="classDiagram",kt={id:bt,detector:(0,s.K2)((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(859),n.e(169)]).then(n.bind(n,9169));return{id:bt,diagram:t}},"loader")},Ct="state",wt={id:Ct,detector:(0,s.K2)((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(697),n.e(620),n.e(21),n.e(70)]).then(n.bind(n,4070));return{id:Ct,diagram:t}},"loader")},_t="stateDiagram",vt={id:_t,detector:(0,s.K2)((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(21),n.e(293)]).then(n.bind(n,4293));return{id:_t,diagram:t}},"loader")},St="journey",Tt={id:St,detector:(0,s.K2)(t=>/^\s*journey/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await n.e(894).then(n.bind(n,8894));return{id:St,diagram:t}},"loader")},At={draw:(0,s.K2)((e,r,i)=>{s.Rm.debug("rendering svg for syntax error\n");const n=(0,t.D)(r),a=n.append("g");n.attr("viewBox","0 0 2412 512"),(0,o.a$)(n,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${i}`)},"draw")},Mt=At,Bt={db:{},renderer:At,parser:{parse:(0,s.K2)(()=>{},"parse")}},Lt="flowchart-elk",Ft={id:Lt,detector:(0,s.K2)((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await n.e(38).then(n.bind(n,2038));return{id:Lt,diagram:t}},"loader")},$t="timeline",Et={id:$t,detector:(0,s.K2)(t=>/^\s*timeline/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await n.e(550).then(n.bind(n,6550));return{id:$t,diagram:t}},"loader")},Dt="mindmap",Ot={id:Dt,detector:(0,s.K2)(t=>/^\s*mindmap/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await n.e(82).then(n.bind(n,8082));return{id:Dt,diagram:t}},"loader")},Rt="kanban",Kt={id:Rt,detector:(0,s.K2)(t=>/^\s*kanban/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await n.e(335).then(n.bind(n,8335));return{id:Rt,diagram:t}},"loader")},It="sankey",Nt={id:It,detector:(0,s.K2)(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await n.e(535).then(n.bind(n,8535));return{id:It,diagram:t}},"loader")},Pt="packet",zt={id:Pt,detector:(0,s.K2)(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(731),n.e(598)]).then(n.bind(n,7598));return{id:Pt,diagram:t}},"loader")},qt="radar",Wt={id:qt,detector:(0,s.K2)(t=>/^\s*radar-beta/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(731),n.e(447)]).then(n.bind(n,5447));return{id:qt,diagram:t}},"loader")},jt="block",Ht={id:jt,detector:(0,s.K2)(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(697),n.e(367)]).then(n.bind(n,7367));return{id:jt,diagram:t}},"loader")},Ut="architecture",Yt={id:Ut,detector:(0,s.K2)(t=>/^\s*architecture/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(731),n.e(165),n.e(311)]).then(n.bind(n,9311));return{id:Ut,diagram:t}},"loader")},Gt="ishikawa",Xt={id:Gt,detector:(0,s.K2)(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await n.e(878).then(n.bind(n,878));return{id:Gt,diagram:t}},"loader")},Vt="venn",Zt={id:Vt,detector:(0,s.K2)(t=>/^\s*venn-beta/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await n.e(957).then(n.bind(n,957));return{id:Vt,diagram:t}},"loader")},Qt="treemap",Jt={id:Qt,detector:(0,s.K2)(t=>/^\s*treemap/.test(t),"detector"),loader:(0,s.K2)(async()=>{const{diagram:t}=await Promise.all([n.e(731),n.e(811)]).then(n.bind(n,8811));return{id:Qt,diagram:t}},"loader")},te=!1,ee=(0,s.K2)(()=>{te||(te=!0,(0,o.Js)("error",Bt,t=>"error"===t.toLowerCase().trim()),(0,o.Js)("---",{db:{clear:(0,s.K2)(()=>{},"clear")},styles:{},renderer:{draw:(0,s.K2)(()=>{},"draw")},parser:{parse:(0,s.K2)(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:(0,s.K2)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,o.Xd)(Ft,Ot,Yt),(0,o.Xd)(V,Kt,kt,xt,et,at,st,lt,ft,yt,tt,Q,Et,it,vt,wt,Tt,ct,Nt,zt,dt,Ht,Wt,Xt,Jt,Zt))},"addDiagrams"),re=(0,s.K2)(async()=>{s.Rm.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(o.mW).map(async([t,{detector:e,loader:r}])=>{if(r)try{(0,o.Gs)(t)}catch{try{const{diagram:t,id:i}=await r();(0,o.Js)(i,t,e)}catch(e){throw s.Rm.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete o.mW[t],e}}}))).filter(t=>"rejected"===t.status);if(t.length>0){s.Rm.error(`Failed to load ${t.length} external diagrams`);for(const e of t)s.Rm.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function ie(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function ne(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,s.K2)(ie,"setA11yDiagramInfo"),(0,s.K2)(ne,"addSVGa11yTitleDescription");var ae=class t{constructor(t,e,r,i,n){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=n}static{(0,s.K2)(this,"Diagram")}static async fromText(e,r={}){const i=(0,o.zj)(),n=(0,o.Ch)(e,i);e=(0,a.C4)(e)+"\n";try{(0,o.Gs)(n)}catch{const t=(0,o.J$)(n);if(!t)throw new o.C0(`Diagram ${n} not found.`);const{id:e,diagram:r}=await t();(0,o.Js)(e,r)}const{db:s,parser:l,renderer:h,init:c}=(0,o.Gs)(n);return l.parser&&(l.parser.yy=s),s.clear?.(),c?.(i),r.title&&s.setDiagramTitle?.(r.title),await l.parse(e),new t(n,e,s,l,h)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},oe=[],se=(0,s.K2)(()=>{oe.forEach(t=>{t()}),oe=[]},"attachFunctions"),le=(0,s.K2)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function he(t){const r=t.match(o.EJ);if(!r)return{text:t,metadata:{}};let i=(0,e.H)(r[1],{schema:e.r})??{};i="object"!=typeof i||Array.isArray(i)?{}:i;const n={};return i.displayMode&&(n.displayMode=i.displayMode.toString()),i.title&&(n.title=i.title.toString()),i.config&&(n.config=i.config),{text:t.slice(r[0].length),metadata:n}}(0,s.K2)(he,"extractFrontMatter");var ce=(0,s.K2)(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),ue=(0,s.K2)(t=>{const{text:e,metadata:r}=he(t),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:e}},"processFrontmatter"),de=(0,s.K2)(t=>{const e=a._K.detectInit(t)??{},r=a._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:(0,a.vU)(t),directive:e}},"processDirectives");function pe(t){const e=ce(t),r=ue(e),i=de(r.text),n=(0,a.$t)(r.config,i.directive);return{code:t=le(i.text),title:r.title,config:n}}function fe(t){const e=(new TextEncoder).encode(t),r=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(r)}(0,s.K2)(pe,"preprocessDiagram"),(0,s.K2)(fe,"toBase64");var ge=["foreignobject"],ye=["dominant-baseline"];function me(t){const e=pe(t);return(0,o.cL)(),(0,o.xA)(e.config??{}),e}async function xe(t,e){ee();try{const{code:e,config:r}=me(t);return{diagramType:(await Be(e)).type,config:r}}catch(t){if(e?.suppressErrors)return!1;throw t}}(0,s.K2)(me,"processAndSetConfigs"),(0,s.K2)(xe,"parse");var be=(0,s.K2)((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),ke=(0,s.K2)((t,e=new Map)=>{let r="";if(void 0!==t.themeCSS&&(r+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const i=(0,o.E)(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{X(t.styles)||i.forEach(e=>{r+=be(t.id,e,t.styles)}),X(t.textStyles)||(r+=be(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return r},"createCssStyles"),Ce=(0,s.K2)((t,e,r,i)=>{const n=ke(t,r);return w(W(`${i}{${(0,o.tM)(e,n,t.themeVariables)}}`),_)},"createUserStyles"),we=(0,s.K2)((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(0,a.Sm)(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),_e=(0,s.K2)((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${fe(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`,"putIntoIFrame"),ve=(0,s.K2)((t,e,r,i,n)=>{const a=t.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return n&&o.attr("xmlns:xlink",n),o.append("g"),t},"appendDivSvgG");function Se(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,s.K2)(Se,"sandboxedIframe");var Te=(0,s.K2)((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),Ae=(0,s.K2)(async function(t,e,r){ee();const i=me(e);e=i.code;const n=(0,o.zj)();s.Rm.debug(n),e.length>(n?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const a="#"+t,l="i"+t,c="#"+l,u="d"+t,d="#"+u,p=(0,s.K2)(()=>{const t=g?c:d,e=(0,h.Ltv)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements");let f=(0,h.Ltv)("body");const g="sandbox"===n.securityLevel,y="loose"===n.securityLevel,m=n.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),g){const t=Se((0,h.Ltv)(r),l);f=(0,h.Ltv)(t.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=(0,h.Ltv)(r);ve(f,t,u,`font-family: ${m}`,"http://www.w3.org/1999/xlink")}else{if(Te(document,t,u,l),g){const t=Se((0,h.Ltv)("body"),l);f=(0,h.Ltv)(t.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=(0,h.Ltv)("body");ve(f,t,u)}let x,b;try{x=await ae.fromText(e,{title:i.title})}catch(t){if(n.suppressErrorRendering)throw p(),t;x=await ae.fromText("error"),b=t}const k=f.select(d).node(),C=x.type,w=k.firstChild,_=w.firstChild,v=x.renderer.getClasses?.(e,x),S=Ce(n,C,v,a),T=document.createElement("style");T.innerHTML=S,w.insertBefore(T,_);try{await x.renderer.draw(e,t,"11.13.0",x)}catch(r){throw n.suppressErrorRendering?p():Mt.draw(e,t,"11.13.0"),r}const A=f.select(`${d} svg`),M=x.db.getAccTitle?.(),B=x.db.getAccDescription?.();Le(C,A,M,B),f.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let L=f.select(d).node().innerHTML;if(s.Rm.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),L=we(L,g,(0,o._3)(n.arrowMarkerAbsolute)),g){const t=f.select(d+" svg").node();L=_e(L,t)}else y||(L=G.A.sanitize(L,{ADD_TAGS:ge,ADD_ATTR:ye,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(se(),b)throw b;return p(),{diagramType:C,svg:L,bindFunctions:x.db.bindFunctions}},"render");function Me(t={}){const e=(0,o.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,o.wZ)(e),e?.theme&&e.theme in o.H$?e.themeVariables=o.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=o.H$.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?(0,o.UU)(e):(0,o.Q2)();(0,s.He)(r.logLevel),ee()}(0,s.K2)(Me,"initialize");var Be=(0,s.K2)((t,e={})=>{const{code:r}=pe(t);return ae.fromText(r,e)},"getDiagramFromText");function Le(t,e,r,i){ie(e,t),ne(e,r,i,e.attr("id"))}(0,s.K2)(Le,"addA11yInfo");var Fe=Object.freeze({render:Ae,parse:xe,getDiagramFromText:Be,initialize:Me,getConfig:o.zj,setConfig:o.Nk,getSiteConfig:o.Q2,updateSiteConfig:o.B6,reset:(0,s.K2)(()=>{(0,o.cL)()},"reset"),globalReset:(0,s.K2)(()=>{(0,o.cL)(o.sb)},"globalReset"),defaultConfig:o.sb});(0,s.He)((0,o.zj)().logLevel),(0,o.cL)((0,o.zj)());var $e=(0,s.K2)((t,e,r)=>{s.Rm.warn(t),(0,a.dq)(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),Ee=(0,s.K2)(async function(t={querySelector:".mermaid"}){try{await De(t)}catch(e){if((0,a.dq)(e)&&s.Rm.error(e.str),Ue.parseError&&Ue.parseError(e),!t.suppressErrors)throw s.Rm.error("Use the suppressErrors option to suppress these errors"),e}},"run"),De=(0,s.K2)(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=Fe.getConfig();let n;if(s.Rm.debug((t?"":"No ")+"Callback function found"),r)n=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");n=document.querySelectorAll(e)}s.Rm.debug(`Found ${n.length} diagrams`),void 0!==i?.startOnLoad&&(s.Rm.debug("Start On Load: "+i?.startOnLoad),Fe.updateSiteConfig({startOnLoad:i?.startOnLoad}));const o=new a._K.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let h;const c=[];for(const e of Array.from(n)){if(s.Rm.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");const r=`mermaid-${o.next()}`;h=e.innerHTML,h=(0,l.T)(a._K.entityDecode(h)).trim().replace(/<br\s*\/?>/gi,"<br/>");const i=a._K.detectInit(h);i&&s.Rm.debug("Detected early reinit: ",i);try{const{svg:i,bindFunctions:n}=await je(r,h,e);e.innerHTML=i,t&&await t(r),n&&n(e)}catch(t){$e(t,c,Ue.parseError)}}if(c.length>0)throw c[0]},"runThrowsErrors"),Oe=(0,s.K2)(function(t){Fe.initialize(t)},"initialize"),Re=(0,s.K2)(async function(t,e,r){s.Rm.warn("mermaid.init is deprecated. Please use run instead."),t&&Oe(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await Ee(i)},"init"),Ke=(0,s.K2)(async(t,{lazyLoad:e=!0}={})=>{ee(),(0,o.Xd)(...t),!1===e&&await re()},"registerExternalDiagrams"),Ie=(0,s.K2)(function(){if(Ue.startOnLoad){const{startOnLoad:t}=Fe.getConfig();t&&Ue.run().catch(t=>s.Rm.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",Ie,!1);var Ne=(0,s.K2)(function(t){Ue.parseError=t},"setParseErrorHandler"),Pe=[],ze=!1,qe=(0,s.K2)(async()=>{if(!ze){for(ze=!0;Pe.length>0;){const t=Pe.shift();if(t)try{await t()}catch(t){s.Rm.error("Error executing queue",t)}}ze=!1}},"executeQueue"),We=(0,s.K2)(async(t,e)=>new Promise((r,i)=>{const n=(0,s.K2)(()=>new Promise((n,a)=>{Fe.parse(t,e).then(t=>{n(t),r(t)},t=>{s.Rm.error("Error parsing",t),Ue.parseError?.(t),a(t),i(t)})}),"performCall");Pe.push(n),qe().catch(i)}),"parse"),je=(0,s.K2)((t,e,r)=>new Promise((i,n)=>{const a=(0,s.K2)(()=>new Promise((a,o)=>{Fe.render(t,e,r).then(t=>{a(t),i(t)},t=>{s.Rm.error("Error parsing",t),Ue.parseError?.(t),o(t),n(t)})}),"performCall");Pe.push(a),qe().catch(n)}),"render"),He=(0,s.K2)(()=>Object.keys(o.mW).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),Ue={startOnLoad:!0,mermaidAPI:Fe,parse:We,render:je,init:Re,run:Ee,registerExternalDiagrams:Ke,registerLayoutLoaders:r.sO,initialize:Oe,parseError:void 0,contentLoaded:Ie,setParseErrorHandler:Ne,detectType:o.Ch,registerIconPacks:i.pC,getRegisteredDiagramsMetadata:He},Ye=Ue,Ge=0,Xe=[];jQuery(document).ready(function(){function t(e,r,i,n){Xe[e.data("id")]=e.children("ul").children("li").length,0!=Xe[e.data("id")]&&e.children("ul").children("li").each(function(){var a=Xe[e.data("id")],o=jQuery(this).parent().parent(),s=o.offset();s.height=o.height(),s.width=o.width(),s.centerx=s.left+s.width/2,s.centery=s.top+s.height/2;var l=jQuery(this).children("a").outerWidth(),h=(jQuery(this).children("a").outerHeight(),0);jQuery(this).children("a").css({left:"-"+l/2+"px"}),0==Ge?(jQuery(this).offset({top:s.centery,left:s.centerx}),Ge=1):(h=360/a*i+n,console.log(h),jQuery(this).height(r).css({"-transform":"rotate("+h+"deg)","-moz-transform":"rotate("+h+"deg)","-webkit-transform":"rotate("+h+"deg)"}),jQuery(this).children("a,ul").css({transform:"rotate(-"+h+"deg)","-moz-transform":"rotate(-"+h+"deg)","-webkit-transform":"rotate(-"+h+"deg)"})),i++,t(jQuery(this),r/2,0,8*a+n)})}jQuery(".mindcat").each(function(){var e=jQuery(this),r=e.data("size");isNaN(r)&&(r=50),e.height(12*r);var i=e.offset();i.height=e.height(),i.width=e.width();var n=90*Math.random();t(jQuery(this),10*r,0,n)}),jQuery(".mindcat-color-field").length>0&&jQuery(".mindcat-color-field").wpColorPicker(),jQuery(".mermaid").length>0&&Ye.initialize({startOnLoad:!0})})})()})();
Note: See TracChangeset
for help on using the changeset viewer.