@malloy-publisher/server 0.0.76 → 0.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/assets/RenderedResult-BAZuT25g-etaZB-YF.js +2 -0
- package/dist/app/assets/index-BKC-ikb3.css +1 -0
- package/dist/app/assets/index-BsMlh93-.js +210 -0
- package/dist/app/assets/index-BsXDwHRS.js +671 -0
- package/dist/app/assets/index-DQrKrnRW.js +432 -0
- package/dist/app/assets/index.umd-DaHgfkHn.js +2078 -0
- package/dist/app/index.html +2 -2
- package/dist/server.js +4319 -185
- package/dxt/malloy_bridge.py +354 -0
- package/dxt/manifest.json +22 -0
- package/malloy_mcp.dxt +0 -0
- package/package.json +2 -1
- package/src/mcp/server.ts +3 -0
- package/src/mcp/tools/discovery_tools.ts +258 -0
- package/src/mcp/tools/execute_query_tool.ts +14 -10
- package/src/service/model.ts +11 -0
- package/src/service/package.spec.ts +3 -0
- package/src/service/package.ts +12 -0
- package/dist/app/assets/RenderedResult-DXlUZo0k-lc5JU6CQ.js +0 -1
- package/dist/app/assets/index--hbjs-yl.js +0 -3414
- package/dist/app/assets/index-C127D7lT.css +0 -1
|
@@ -0,0 +1,671 @@
|
|
|
1
|
+
import{d as R0,g as Lp}from"./index-DQrKrnRW.js";function Bp(a,d){for(var m=0;m<d.length;m++){const y=d[m];if(typeof y!="string"&&!Array.isArray(y)){for(const h in y)if(h!=="default"&&!(h in a)){const u=Object.getOwnPropertyDescriptor(y,h);u&&Object.defineProperty(a,h,u.get?u:{enumerable:!0,get:()=>y[h]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var Tr={},at={},br={},Wn={},La;function P0(){return La||(La=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.MALLOY_INTERFACE_TYPES=void 0,Wn.MALLOY_INTERFACE_TYPES={Aggregate:{type:"struct",name:"Aggregate",fields:{name:{type:"string",optional:!0,array:!1},field:{type:"Field",optional:!1,array:!1}}},Annotation:{type:"struct",name:"Annotation",fields:{value:{type:"string",optional:!1,array:!1}}},AnonymousQueryInfo:{type:"struct",name:"AnonymousQueryInfo",fields:{schema:{type:"Schema",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},definition:{type:"Query",optional:!0,array:!1},code:{type:"string",optional:!0,array:!1},location:{type:"Location",optional:!0,array:!1}}},ArrayCell:{type:"struct",name:"ArrayCell",fields:{array_value:{type:"Cell",array:!0,optional:!1}}},ArrayType:{type:"struct",name:"ArrayType",fields:{element_type:{type:"AtomicType",optional:!1,array:!1}}},AtomicType:{type:"union",name:"AtomicType",options:{string_type:"StringType",boolean_type:"BooleanType",number_type:"NumberType",json_type:"JSONType",sql_native_type:"SQLNativeType",date_type:"DateType",timestamp_type:"TimestampType",array_type:"ArrayType",record_type:"RecordType"}},BooleanCell:{type:"struct",name:"BooleanCell",fields:{boolean_value:{type:"boolean",optional:!1,array:!1}}},BooleanLiteral:{type:"struct",name:"BooleanLiteral",fields:{boolean_value:{type:"boolean",optional:!1,array:!1}}},BooleanType:{type:"struct",name:"BooleanType",fields:{}},Cell:{type:"union",name:"Cell",options:{string_cell:"StringCell",boolean_cell:"BooleanCell",date_cell:"DateCell",timestamp_cell:"TimestampCell",number_cell:"NumberCell",json_cell:"JSONCell",record_cell:"RecordCell",array_cell:"ArrayCell",null_cell:"NullCell",sql_native_cell:"SQLNativeCell"}},CompileModelRequest:{type:"struct",name:"CompileModelRequest",fields:{model_url:{type:"string",optional:!1,array:!1},extend_model_url:{type:"string",optional:!0,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},CompileModelResponse:{type:"struct",name:"CompileModelResponse",fields:{model:{type:"ModelInfo",optional:!0,array:!1},logs:{type:"LogMessage",array:!0,optional:!0},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1},translations:{type:"Translation",array:!0,optional:!0}}},CompileQueryRequest:{type:"struct",name:"CompileQueryRequest",fields:{model_url:{type:"string",optional:!1,array:!1},query:{type:"Query",optional:!1,array:!1},default_row_limit:{type:"number",optional:!0,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},CompileQueryResponse:{type:"struct",name:"CompileQueryResponse",fields:{result:{type:"Result",optional:!0,array:!1},default_row_limit_added:{type:"number",optional:!0,array:!1},logs:{type:"LogMessage",array:!0,optional:!0},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1},translations:{type:"Translation",array:!0,optional:!0}}},CompileSourceRequest:{type:"struct",name:"CompileSourceRequest",fields:{model_url:{type:"string",optional:!1,array:!1},name:{type:"string",optional:!1,array:!1},extend_model_url:{type:"string",optional:!0,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},CompileSourceResponse:{type:"struct",name:"CompileSourceResponse",fields:{source:{type:"SourceInfo",optional:!0,array:!1},logs:{type:"LogMessage",array:!0,optional:!0},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},CompilerNeeds:{type:"struct",name:"CompilerNeeds",fields:{table_schemas:{type:"SQLTable",array:!0,optional:!0},sql_schemas:{type:"SQLQuery",array:!0,optional:!0},files:{type:"File",array:!0,optional:!0},connections:{type:"Connection",array:!0,optional:!0},translations:{type:"Translation",array:!0,optional:!0}}},Connection:{type:"struct",name:"Connection",fields:{name:{type:"string",optional:!1,array:!1},dialect:{type:"string",optional:!0,array:!1}}},Data:{type:"union",name:"Data",options:{record_cell:"RecordCell",array_cell:"ArrayCell"}},DateCell:{type:"struct",name:"DateCell",fields:{date_value:{type:"string",optional:!1,array:!1}}},DateLiteral:{type:"struct",name:"DateLiteral",fields:{date_value:{type:"string",optional:!1,array:!1},granularity:{type:"DateTimeframe",optional:!0,array:!1},timezone:{type:"string",optional:!0,array:!1}}},DateTimeframe:{type:"enum",name:"DateTimeframe",values:{year:1,quarter:2,month:3,week:4,day:5}},DateType:{type:"struct",name:"DateType",fields:{timeframe:{type:"DateTimeframe",optional:!0,array:!1}}},DimensionInfo:{type:"struct",name:"DimensionInfo",fields:{name:{type:"string",optional:!1,array:!1},type:{type:"AtomicType",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0}}},DocumentPosition:{type:"struct",name:"DocumentPosition",fields:{line:{type:"number",optional:!1,array:!1},character:{type:"number",optional:!1,array:!1}}},DocumentRange:{type:"struct",name:"DocumentRange",fields:{start:{type:"DocumentPosition",optional:!1,array:!1},end:{type:"DocumentPosition",optional:!1,array:!1}}},DrillOperation:{type:"struct",name:"DrillOperation",fields:{filter:{type:"Filter",optional:!1,array:!1}}},Expression:{type:"union",name:"Expression",options:{field_reference:"Reference",time_truncation:"TimeTruncationFieldReference",filtered_field:"FilteredField",literal_value:"LiteralValueExpression"}},Field:{type:"struct",name:"Field",fields:{expression:{type:"Expression",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0}}},FieldInfo:{type:"union",name:"FieldInfo",options:{dimension:"DimensionInfo",measure:"MeasureInfo",join:"JoinInfo",view:"ViewInfo"}},File:{type:"struct",name:"File",fields:{url:{type:"string",optional:!1,array:!1},contents:{type:"string",optional:!0,array:!1},invalidation_key:{type:"string",optional:!0,array:!1}}},Filter:{type:"union",name:"Filter",options:{filter_string:"FilterStringApplication",literal_equality:"LiteralEqualityComparison"}},FilterExpressionLiteral:{type:"struct",name:"FilterExpressionLiteral",fields:{filter_expression_value:{type:"string",optional:!1,array:!1}}},FilterExpressionType:{type:"struct",name:"FilterExpressionType",fields:{filter_type:{type:"FilterableType",optional:!1,array:!1}}},FilterOperation:{type:"struct",name:"FilterOperation",fields:{filter:{type:"Filter",optional:!1,array:!1}}},FilterStringApplication:{type:"struct",name:"FilterStringApplication",fields:{field_reference:{type:"Reference",optional:!1,array:!1},filter:{type:"string",optional:!1,array:!1}}},FilterableType:{type:"union",name:"FilterableType",options:{string_type:"StringType",boolean_type:"BooleanType",number_type:"NumberType",date_type:"DateType",timestamp_type:"TimestampType"}},FilteredField:{type:"struct",name:"FilteredField",fields:{field_reference:{type:"Reference",optional:!1,array:!1},where:{type:"FilterOperation",array:!0,optional:!1}}},GroupBy:{type:"struct",name:"GroupBy",fields:{name:{type:"string",optional:!0,array:!1},field:{type:"Field",optional:!1,array:!1}}},JSONCell:{type:"struct",name:"JSONCell",fields:{json_value:{type:"string",optional:!1,array:!1}}},JSONType:{type:"struct",name:"JSONType",fields:{}},JoinInfo:{type:"struct",name:"JoinInfo",fields:{name:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},relationship:{type:"Relationship",optional:!1,array:!1}}},Limit:{type:"struct",name:"Limit",fields:{limit:{type:"number",optional:!1,array:!1}}},LiteralEqualityComparison:{type:"struct",name:"LiteralEqualityComparison",fields:{field_reference:{type:"Reference",optional:!1,array:!1},value:{type:"LiteralValue",optional:!1,array:!1}}},LiteralValue:{type:"union",name:"LiteralValue",options:{string_literal:"StringLiteral",number_literal:"NumberLiteral",date_literal:"DateLiteral",timestamp_literal:"TimestampLiteral",boolean_literal:"BooleanLiteral",null_literal:"NullLiteral",filter_expression_literal:"FilterExpressionLiteral"}},LiteralValueExpression:{type:"struct",name:"LiteralValueExpression",fields:{literal_value:{type:"LiteralValue",optional:!1,array:!1}}},Location:{type:"struct",name:"Location",fields:{url:{type:"string",optional:!1,array:!1},range:{type:"Range",optional:!1,array:!1}}},LogMessage:{type:"struct",name:"LogMessage",fields:{url:{type:"string",optional:!1,array:!1},range:{type:"DocumentRange",optional:!1,array:!1},severity:{type:"LogSeverity",optional:!1,array:!1},message:{type:"string",optional:!1,array:!1}}},LogSeverity:{type:"enum",name:"LogSeverity",values:{debug:1,info:2,warn:3,error:4}},MeasureInfo:{type:"struct",name:"MeasureInfo",fields:{name:{type:"string",optional:!1,array:!1},type:{type:"AtomicType",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0}}},ModelEntryValue:{type:"union",name:"ModelEntryValue",options:{source:"SourceInfo",query:"QueryInfo"}},ModelInfo:{type:"struct",name:"ModelInfo",fields:{entries:{type:"ModelEntryValue",array:!0,optional:!1},annotations:{type:"Annotation",array:!0,optional:!0},anonymous_queries:{type:"AnonymousQueryInfo",array:!0,optional:!1}}},Nest:{type:"struct",name:"Nest",fields:{name:{type:"string",optional:!0,array:!1},view:{type:"View",optional:!1,array:!1}}},NullCell:{type:"struct",name:"NullCell",fields:{}},NullLiteral:{type:"struct",name:"NullLiteral",fields:{}},NumberCell:{type:"struct",name:"NumberCell",fields:{number_value:{type:"number",optional:!1,array:!1}}},NumberLiteral:{type:"struct",name:"NumberLiteral",fields:{number_value:{type:"number",optional:!1,array:!1}}},NumberSubtype:{type:"enum",name:"NumberSubtype",values:{integer:1,decimal:2}},NumberType:{type:"struct",name:"NumberType",fields:{subtype:{type:"NumberSubtype",optional:!0,array:!1}}},OrderBy:{type:"struct",name:"OrderBy",fields:{field_reference:{type:"Reference",optional:!1,array:!1},direction:{type:"OrderByDirection",optional:!0,array:!1}}},OrderByDirection:{type:"enum",name:"OrderByDirection",values:{asc:1,desc:2}},ParameterInfo:{type:"struct",name:"ParameterInfo",fields:{name:{type:"string",optional:!1,array:!1},type:{type:"ParameterType",optional:!1,array:!1},default_value:{type:"LiteralValue",optional:!0,array:!1}}},ParameterType:{type:"union",name:"ParameterType",options:{string_type:"StringType",boolean_type:"BooleanType",number_type:"NumberType",json_type:"JSONType",sql_native_type:"SQLNativeType",date_type:"DateType",timestamp_type:"TimestampType",array_type:"ArrayType",record_type:"RecordType",filter_expression_type:"FilterExpressionType"}},ParameterValue:{type:"struct",name:"ParameterValue",fields:{name:{type:"string",optional:!1,array:!1},value:{type:"LiteralValue",optional:!1,array:!1}}},Position:{type:"struct",name:"Position",fields:{line:{type:"number",optional:!1,array:!1},character:{type:"number",optional:!1,array:!1}}},Query:{type:"struct",name:"Query",fields:{definition:{type:"QueryDefinition",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0}}},QueryArrow:{type:"struct",name:"QueryArrow",fields:{source:{type:"QueryArrowSource",optional:!1,array:!1},view:{type:"ViewDefinition",optional:!1,array:!1}}},QueryArrowSource:{type:"union",name:"QueryArrowSource",options:{refinement:"QueryRefinement",source_reference:"Reference"}},QueryDefinition:{type:"union",name:"QueryDefinition",options:{arrow:"QueryArrow",query_reference:"Reference",refinement:"QueryRefinement"}},QueryInfo:{type:"struct",name:"QueryInfo",fields:{name:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},definition:{type:"Query",optional:!0,array:!1},code:{type:"string",optional:!0,array:!1},location:{type:"Location",optional:!0,array:!1}}},QueryRefinement:{type:"struct",name:"QueryRefinement",fields:{base:{type:"QueryDefinition",optional:!1,array:!1},refinement:{type:"ViewDefinition",optional:!1,array:!1}}},Range:{type:"struct",name:"Range",fields:{start:{type:"Position",optional:!1,array:!1},end:{type:"Position",optional:!1,array:!1}}},RecordCell:{type:"struct",name:"RecordCell",fields:{record_value:{type:"Cell",array:!0,optional:!1}}},RecordType:{type:"struct",name:"RecordType",fields:{fields:{type:"DimensionInfo",array:!0,optional:!1}}},Reference:{type:"struct",name:"Reference",fields:{name:{type:"string",optional:!1,array:!1},path:{type:"string",array:!0,optional:!0},parameters:{type:"ParameterValue",array:!0,optional:!0}}},Relationship:{type:"enum",name:"Relationship",values:{one:1,many:2,cross:3}},Result:{type:"struct",name:"Result",fields:{data:{type:"Data",optional:!0,array:!1},schema:{type:"Schema",optional:!1,array:!1},sql:{type:"string",optional:!0,array:!1},connection_name:{type:"string",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},model_annotations:{type:"Annotation",array:!0,optional:!0},query_timezone:{type:"string",optional:!0,array:!1},source_annotations:{type:"Annotation",array:!0,optional:!0}}},RunIndexQueryRequest:{type:"struct",name:"RunIndexQueryRequest",fields:{model_url:{type:"string",optional:!1,array:!1},source_name:{type:"string",optional:!1,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},RunIndexQueryResponse:{type:"struct",name:"RunIndexQueryResponse",fields:{result:{type:"Result",optional:!0,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},RunQueryRequest:{type:"struct",name:"RunQueryRequest",fields:{model_url:{type:"string",optional:!1,array:!1},query:{type:"Query",optional:!1,array:!1},default_row_limit:{type:"number",optional:!0,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},RunQueryResponse:{type:"struct",name:"RunQueryResponse",fields:{result:{type:"Result",optional:!0,array:!1},default_row_limit_added:{type:"number",optional:!0,array:!1},logs:{type:"LogMessage",array:!0,optional:!0},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},SQLNativeCell:{type:"struct",name:"SQLNativeCell",fields:{sql_native_value:{type:"string",optional:!1,array:!1}}},SQLNativeType:{type:"struct",name:"SQLNativeType",fields:{sql_type:{type:"string",optional:!0,array:!1}}},SQLQuery:{type:"struct",name:"SQLQuery",fields:{sql:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!0,array:!1},connection_name:{type:"string",optional:!1,array:!1}}},SQLTable:{type:"struct",name:"SQLTable",fields:{name:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!0,array:!1},connection_name:{type:"string",optional:!1,array:!1}}},Schema:{type:"struct",name:"Schema",fields:{fields:{type:"FieldInfo",array:!0,optional:!1}}},SourceInfo:{type:"struct",name:"SourceInfo",fields:{name:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},parameters:{type:"ParameterInfo",array:!0,optional:!0}}},StringCell:{type:"struct",name:"StringCell",fields:{string_value:{type:"string",optional:!1,array:!1}}},StringLiteral:{type:"struct",name:"StringLiteral",fields:{string_value:{type:"string",optional:!1,array:!1}}},StringType:{type:"struct",name:"StringType",fields:{}},TimeTruncationFieldReference:{type:"struct",name:"TimeTruncationFieldReference",fields:{field_reference:{type:"Reference",optional:!1,array:!1},truncation:{type:"TimestampTimeframe",optional:!1,array:!1}}},TimestampCell:{type:"struct",name:"TimestampCell",fields:{timestamp_value:{type:"string",optional:!1,array:!1}}},TimestampLiteral:{type:"struct",name:"TimestampLiteral",fields:{timestamp_value:{type:"string",optional:!1,array:!1},granularity:{type:"TimestampTimeframe",optional:!0,array:!1},timezone:{type:"string",optional:!0,array:!1}}},TimestampTimeframe:{type:"enum",name:"TimestampTimeframe",values:{year:1,quarter:2,month:3,week:4,day:5,hour:6,minute:7,second:8}},TimestampType:{type:"struct",name:"TimestampType",fields:{timeframe:{type:"TimestampTimeframe",optional:!0,array:!1}}},Translation:{type:"struct",name:"Translation",fields:{url:{type:"string",optional:!1,array:!1},compiled_model_json:{type:"string",optional:!0,array:!1}}},View:{type:"struct",name:"View",fields:{definition:{type:"ViewDefinition",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0}}},ViewArrow:{type:"struct",name:"ViewArrow",fields:{source:{type:"ViewDefinition",optional:!1,array:!1},view:{type:"ViewDefinition",optional:!1,array:!1}}},ViewDefinition:{type:"union",name:"ViewDefinition",options:{arrow:"ViewArrow",view_reference:"Reference",refinement:"ViewRefinement",segment:"ViewSegment"}},ViewInfo:{type:"struct",name:"ViewInfo",fields:{name:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},definition:{type:"View",optional:!0,array:!1}}},ViewOperation:{type:"union",name:"ViewOperation",options:{group_by:"GroupBy",aggregate:"Aggregate",order_by:"OrderBy",limit:"Limit",where:"FilterOperation",nest:"Nest",having:"FilterOperation",drill:"DrillOperation"}},ViewRefinement:{type:"struct",name:"ViewRefinement",fields:{base:{type:"ViewDefinition",optional:!1,array:!1},refinement:{type:"ViewDefinition",optional:!1,array:!1}}},ViewSegment:{type:"struct",name:"ViewSegment",fields:{operations:{type:"ViewOperation",array:!0,optional:!1}}}}),Wn}var Qn={},qi={},Xn={},Ba;function kp(){return Ba||(Ba=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.RESERVED_WORDS=void 0,Xn.RESERVED_WORDS=["accept","aggregate","declare","dimension","except","explore","group_by","having","index","join_cross","join_one","join_many","limit","measure","nest","order_by","primary_key","project","query","rename","sample","source","sql","turduck","top","where","all","as","asc","avg","boolean","by","case","cast","condition","count","date","day","days","desc","distinct","else","end","exclude","false","for","from","from_sql","has","hour","hours","import","is","json","last","max","min","minute","minutes","month","months","not","now","null","number","on","or","pick","quarter","quarters","second","seconds","string","sum","table","then","this","timestamp","to","true","turtle","week","weeks","when","with","year","years","ungrouped"]),Xn}var ka;function Mp(){if(ka)return qi;ka=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.maybeQuoteIdentifier=m;const a=kp();function d(y){const h=!y.match(/^[A-Za-z_][A-Za-z_0-9]*$/),u=a.RESERVED_WORDS.includes(y.toLowerCase());return h||u}function m(y){const h=y.split(".");for(let u=0;u<h.length;u++)d(h[u])&&(h[u]=`\`${h[u]}\``);return h.join(".")}return qi}var Ma;function qp(){if(Ma)return Qn;Ma=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.queryToMalloy=d,Qn.filterToMalloy=m;const a=Mp();function d(b,{tabWidth:R}={tabWidth:2}){const k=p(b);return o(k,{tabWidth:R})}function m(b,{tabWidth:R}={tabWidth:2}){const k=T(b);return o(k,{tabWidth:R})}const y=Symbol("indent"),h=Symbol("newline"),u=Symbol("outdent"),r=Symbol("optional_newline_indent");function o(b,{tabWidth:R}={tabWidth:2}){let k="",V=0,G=!0;for(const U of b)if(U===h)k+=`
|
|
2
|
+
`,G=!0;else if(U===u)V--;else if(U===y)V++;else{if(U===r)continue;G&&(k+=" ".repeat(V*R),G=!1),k+=U}return k}function t(b,R,k,V){var G;if(R.includes(h))return[b,h,y,...R,h,u,k];const z=((G=V?.spaces)!==null&&G!==void 0?G:!0)?" ":"";return[b,z,...R,z,k]}function i(b){return{contents:b,quoteCharacter:'"'}}function e(b){var R,k;switch(b.kind){case"filter_expression_literal":return[pe(b.filter_expression_value)];case"boolean_literal":return[b.boolean_value.toString()];case"string_literal":{const{contents:V,quoteCharacter:G}=i(b.string_value);return[G,V,G]}case"number_literal":return[b.number_value.toString()];case"null_literal":return["null"];case"date_literal":return[l(s(b.date_value),(R=b.granularity)!==null&&R!==void 0?R:"day",b.timezone)];case"timestamp_literal":return[l(s(b.timestamp_value),(k=b.granularity)!==null&&k!==void 0?k:"second",b.timezone)]}}function s(b){let R;if(R=/(\d\d\d\d)-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)/.exec(b)){const[k,V,G,U,z,K,ie]=R;return[V,G,U,z,K,ie]}else if(R=/(\d\d\d\d)-(\d\d)-(\d\d) (\d\d):(\d\d)/.exec(b)){const[k,V,G,U,z,K]=R;return[V,G,U,z,K,"00"]}else if(R=/(\d\d\d\d)-(\d\d)-(\d\d) (\d\d)(?:00)?/.exec(b)){const[k,V,G,U,z]=R;return[V,G,U,z,"00","00"]}else if(R=/(\d\d\d\d)-(\d\d)-(\d\d)/.exec(b)){const[k,V,G,U]=R;return[V,G,U,"00","00","00"]}else if(R=/(\d\d\d\d)-(\d\d)/.exec(b)){const[k,V,G]=R;return[V,G,"01","00","00","00"]}else if(R=/(\d\d\d\d)/.exec(b)){const[k,V]=R;return[V,"01","01","00","00","00"]}return["1970","01","01","00","00","00"]}function l([b,R,k,V,G,U],z,K){switch(z){case"year":return`@${b}`;case"quarter":{const ie=Math.floor(+R/3)+1;return`@${b}-Q${ie}`}case"month":return`@${b}-${R}`;case"week":return`@WK${b}-${R}-${k}`;case"day":return`@${b}-${R}-${k}`;case"hour":return`@${b}-${R}-${k} ${V}`;case"minute":return`@${b}-${R}-${k} ${V}:${G}`;case"second":return K!==void 0?`@${b}-${R}-${k} ${V}:${G}:${U}[${K}]`:`@${b}-${R}-${k} ${V}:${G}:${U}`;default:throw new Error("Unknown timeframe.")}}function c(b){var R;const k=[];for(const V of(R=b.path)!==null&&R!==void 0?R:[])k.push((0,a.maybeQuoteIdentifier)(V)),k.push(".");if(k.push((0,a.maybeQuoteIdentifier)(b.name)),b.parameters){const V=[];for(let G=0;G<b.parameters.length;G++){const U=b.parameters[G];V.push((0,a.maybeQuoteIdentifier)(U.name)),V.push(" is "),V.push(...e(U.value)),G<b.parameters.length-1&&V.push(",",h)}k.push(...t("(",V,")",{spaces:!1}))}return k}function p(b){const R=[];return R.push(...F(b.annotations)),R.push("run: "),R.push(...x(b.definition)),R}function v(b){const R=[];switch(b.kind){case"source_reference":{R.push(...c(b));break}case"refinement":R.push(...x(b));break}return R}function x(b){const R=[];switch(b.kind){case"arrow":{R.push(...v(b.source)),R.push(" -> "),R.push(...g(b.view));break}case"query_reference":{R.push(...c(b));break}case"refinement":{const k=x(b.base);b.base.kind==="arrow"?R.push(...t("(",k,")",{spaces:!1})):R.push(...k),R.push(" + "),R.push(...g(b.refinement));break}}return R}function g(b){const R=[];switch(b.kind){case"arrow":{R.push(...g(b.source)),R.push(" -> "),R.push(...g(b.view));break}case"view_reference":{R.push(...c(b));break}case"refinement":{R.push(...g(b.base)),R.push(" + "),R.push(...g(b.refinement));break}case"segment":{R.push(..._(b));break}}return R}function _(b){if(b.operations.length===0)return["{ }"];const R=b.operations.length>1,k=[];for(let V=0;V<b.operations.length;V++){const G=b.operations[V],U=[G];for(;V<b.operations.length-1;){const z=b.operations[V+1];if(z.kind===G.kind)U.push(z),V++;else break}k.push(...A(U)),R&&V<b.operations.length-1&&k.push(h)}return t("{",k,"}")}function A(b){switch(b[0].kind){case"aggregate":return Y(b);case"group_by":return $(b);case"order_by":return L(b);case"nest":return W(b);case"limit":return re(b);case"where":return fe(b);case"having":return J(b);case"drill":return oe(b)}}function E(b,R,k=""){const V=[];V.push(`${b}:`);const G=R.length>1||R.some(U=>U.includes(h));G?V.push(h,y):V.push(" ");for(let U=0;U<R.length;U++){const z=R[U];V.push(...z),R.length>1&&U<R.length-1&&V.push(k),G&&U<R.length-1&&V.push(h)}return G&&V.push(u),V}function D(b){const R=[];return R.push(...w(b.expression)),R}function N(b){return b}function w(b){switch(b.kind){case"field_reference":return c(b);case"time_truncation":return[...c(b.field_reference),".",b.truncation];case"filtered_field":return[...c(b.field_reference),...t(" {",fe(b.where),"}")];case"literal_value":return e(b.literal_value)}}function P(b,R=!1){const k=[];return R||k.push(...F(b.field.annotations)),b.name&&(k.push((0,a.maybeQuoteIdentifier)(b.name)),k.push(" is ")),k.push(...D(b.field)),k}function $(b){const R=[],k=b.length===1;return k&&R.push(...F(b[0].field.annotations)),R.push(...E("group_by",b.map(V=>P(V,k)))),R}function Y(b){const R=[],k=b.length===1;return k&&R.push(...F(b[0].field.annotations)),R.push(...E("aggregate",b.map(V=>P(V,k)))),R}function L(b){return E("order_by",b.map(q),",")}function q(b){const R=[];return R.push(...c(b.field_reference)),b.direction&&(R.push(" "),R.push(b.direction)),R}function W(b){const R=[],k=b.length===1;return k&&R.push(...F(b[0].view.annotations)),R.push(...E("nest",b.map(V=>Z(V,k)))),R}function Z(b,R=!1){const k=[];return R||k.push(...F(b.view.annotations)),b.name&&(k.push((0,a.maybeQuoteIdentifier)(b.name)),k.push(" is ")),k.push(...I(b.view)),k}function I(b){return g(b.definition)}function Q(b){return[`limit: ${b.limit}`]}function re(b){const R=[];for(let k=0;k<b.length;k++)k!==0&&R.push(h),R.push(...Q(b[k]));return R}function fe(b){return E("where",b.map(C),",")}function oe(b){return E("drill",b.map(C),",")}function J(b){return E("having",b.map(C),",")}const te=["`","'",'"'];function pe(b){let R,k;for(const V of te){const G=O(b,V);if(G===b)return`f${V}${b}${V}`;(k===void 0||G.length<k.length)&&(R=V,k=G)}return`f${R}${k}${R}`}function O(b,R){let k="";for(let V=0;V<b.length;V++)b.slice(V).startsWith(R)?(k+="\\"+R,V+=R.length):(k+=b[V],b[V]==="\\"&&(k+=b[++V]));return k}function T(b){switch(b.kind){case"filter_string":return[...c(b.field_reference)," ~ ",pe(b.filter)];case"literal_equality":return[...c(b.field_reference)," = ",...e(b.value)]}}function C(b){return T(b.filter)}function F(b){return b?b.flatMap(j):[]}function j(b){return[b.value.trim(),h]}return Qn}var Nr={},qa;function jp(){if(qa)return Nr;qa=1,Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.nestUnions=d,Nr.unnestUnions=m,Nr.convertFromThrift=y,Nr.convertToThrift=u;const a=P0();function d(r){if(r==null)return r;if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(Array.isArray(r))return r.map(d);{const o={};let t;for(const i in r)i==="kind"?t=r[i]:o[i]=d(r[i]);return t===void 0?o:{[t]:o}}}function m(r,o){if(r==null)return r;if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(Array.isArray(r))return r.map(t=>m(t,o));{const t=h(o);if(t.type==="union"){for(const i in t.options)if(r[i]!==void 0){const e=m(r[i],t.options[i]);if(typeof e=="object")return{kind:i,...e}}}else if(t.type==="struct"){const i={};for(const e in r){const s=t.fields[e];if(s===void 0)throw new Error(`Unknown field ${e} in ${o}`);i[e]=m(r[e],s.type)}return i}else throw new Error(`Cannot unnest unions in an enum type ${o}`)}}function y(r,o){if(r==null)return r;if(typeof r=="string"||typeof r=="boolean")return r;if(typeof r=="number"){if(o==="number")return r;const t=h(o);if(t.type!=="enum")throw new Error(`Found a number where a ${o} was expected`);const i=Object.entries(t.values).find(([,e])=>e===r);if(i===void 0)throw new Error(`${r} is not a valid enum value for ${o}`);return i[0]}else{if(Array.isArray(r))return r.map(t=>y(t,o));{const t=h(o);if(t.type==="union"){for(const i in t.options)if(r[i]!==void 0&&r[i]!==null){const e=y(r[i],t.options[i]);if(typeof e=="object")return{kind:i,...e}}}else if(t.type==="struct"){const i={};for(const e in r){const s=t.fields[e];if(s===void 0)throw new Error(`Unknown field ${e} in ${o}`);i[e]=y(r[e],s.type)}return i}else throw new Error(`Cannot unnest unions in an enum type ${o}`)}}}function h(r){const o=a.MALLOY_INTERFACE_TYPES[r];if(o===void 0)throw new Error(`Unknown Malloy interface type ${r}`);return o}function u(r,o){if(r==null)return r;if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string"){if(o==="string")return r;const t=h(o);if(t.type==="enum"){const i=t.values[r];if(i===void 0)throw new Error(`${r} is not a valid enum value for ${o}`);return i}}else{if(Array.isArray(r))return r.map(t=>u(t,o));{const t=h(o);if(t.type==="union"){const i=r.kind,e=t.options[i];if(e===void 0)throw new Error(`${i} is not a valid union of ${o}`);const s=h(e);if(s.type!=="struct")throw new Error("Union fields must be structs");const l={};for(const c in r){if(c==="kind")continue;const p=s.fields[c];l[c]=u(r[c],p.type)}return{[i]:l}}else if(t.type==="struct"){const i={};for(const e in r){const s=t.fields[e];if(s===void 0)throw new Error(`Unknown field ${e} in ${o}`);i[e]=u(r[e],s.type)}return i}}}}return Nr}var ja;function $p(){return ja||(ja=1,function(a){var d=br&&br.__createBinding||(Object.create?function(u,r,o,t){t===void 0&&(t=o);var i=Object.getOwnPropertyDescriptor(r,o);(!i||("get"in i?!r.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return r[o]}}),Object.defineProperty(u,t,i)}:function(u,r,o,t){t===void 0&&(t=o),u[t]=r[o]}),m=br&&br.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&d(r,u,o)};Object.defineProperty(a,"__esModule",{value:!0}),a.thingy4sddfdfsd=a.thingy4sdfsd=a.thingy4dfdsfs=a.thingy4asdfas=a.thingy4asdfasdf=a.thingy3dfdf=a.thingy3=a.thingy2asdf=a.thingyssdfg=a.thingy123r=a.thingy1=a.res=a.test=a.convertToThrift=a.convertFromThrift=a.unnestUnions=a.nestUnions=a.filterToMalloy=a.queryToMalloy=void 0,m(P0(),a);var y=qp();Object.defineProperty(a,"queryToMalloy",{enumerable:!0,get:function(){return y.queryToMalloy}}),Object.defineProperty(a,"filterToMalloy",{enumerable:!0,get:function(){return y.filterToMalloy}});var h=jp();Object.defineProperty(a,"nestUnions",{enumerable:!0,get:function(){return h.nestUnions}}),Object.defineProperty(a,"unnestUnions",{enumerable:!0,get:function(){return h.unnestUnions}}),Object.defineProperty(a,"convertFromThrift",{enumerable:!0,get:function(){return h.convertFromThrift}}),Object.defineProperty(a,"convertToThrift",{enumerable:!0,get:function(){return h.convertToThrift}}),a.test={entries:[{kind:"source",name:"flights",schema:{fields:[{kind:"dimension",name:"carrier",type:{kind:"boolean_type"},annotations:[{value:"# foo=1"}]},{kind:"dimension",name:"arr",type:{kind:"array_type",element_type:{kind:"boolean_type"}}},{kind:"dimension",name:"arr_rec",type:{kind:"array_type",element_type:{kind:"record_type",fields:[{name:"arr",type:{kind:"array_type",element_type:{kind:"boolean_type"}}}]}}},{kind:"dimension",name:"rec",type:{kind:"record_type",fields:[{name:"arr",type:{kind:"array_type",element_type:{kind:"boolean_type"}}}]}},{kind:"join",name:"carriers",relationship:"one",schema:{fields:[{kind:"dimension",name:"code",type:{kind:"string_type"}}]}},{kind:"view",name:"by_carrier",schema:{fields:[{kind:"dimension",name:"carrier",type:{kind:"string_type"}},{kind:"dimension",name:"flight_count",type:{kind:"number_type"}}]}}]},parameters:[{name:"param",type:{kind:"number_type"},default_value:{kind:"number_literal",number_value:7}}]}],anonymous_queries:[]},a.res={connection_name:"foo",data:{kind:"array_cell",array_value:[{kind:"record_cell",record_value:[{kind:"string_cell",string_value:"UA"},{kind:"number_cell",number_value:12341234}]},{kind:"record_cell",record_value:[{kind:"string_cell",string_value:"AA"},{kind:"number_cell",number_value:2343}]}]},schema:{fields:[{kind:"dimension",name:"carrier",type:{kind:"string_type"}},{kind:"dimension",name:"flight_count",type:{kind:"number_type"}}]},sql:"SELECT * ..."},a.thingy1={definition:{kind:"query_reference",name:"flights_by_carrier"}},a.thingy123r={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"view_reference",name:"by_carrier"}}},a.thingyssdfg={definition:{kind:"refinement",base:{kind:"query_reference",name:"flights"},refinement:{kind:"view_reference",name:"by_carrier"}}},a.thingy2asdf={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"refinement",base:{kind:"view_reference",name:"by_carrier"},refinement:{kind:"segment",operations:[{kind:"where",filter:{kind:"filter_string",field_reference:{name:"carrier"},filter:"WN"}}]}}}},a.thingy3={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"refinement",base:{kind:"view_reference",name:"by_carrier"},refinement:{kind:"segment",operations:[{kind:"group_by",field:{expression:{kind:"field_reference",name:"carrier"}}},{kind:"group_by",field:{expression:{kind:"field_reference",name:"foo"}}}]}}}},a.thingy3dfdf={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"refinement",base:{kind:"view_reference",name:"by_carrier"},refinement:{kind:"view_reference",name:"top10"}}}},a.thingy4asdfasdf={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"segment",operations:[{kind:"group_by",field:{expression:{kind:"field_reference",name:"carrier"}}},{kind:"group_by",field:{expression:{kind:"field_reference",name:"foo"}}}]}}},a.thingy4asdfas={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"view_reference",name:"by_carrier"}}},a.thingy4dfdsfs={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"refinement",base:{kind:"view_reference",name:"by_carrier"},refinement:{kind:"segment",operations:[{kind:"limit",limit:10}]}}}},a.thingy4sdfsd={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"segment",operations:[{kind:"group_by",field:{expression:{kind:"field_reference",name:"carrier"}}},{kind:"limit",limit:10}]}}},a.thingy4sddfdfsd={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"segment",operations:[]}}}}(br)),br}var Ye={},Kn={},Cr={},ut={},We={},$a;function ue(){if($a)return We;$a=1;/*!
|
|
3
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
4
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
5
|
+
*/Object.defineProperty(We,"__esModule",{value:!0}),We.SuppressWarnings=We.Override=We.Nullable=We.NotNull=void 0;function a(h,u,r){}We.NotNull=a;function d(h,u,r){}We.Nullable=d;function m(h,u,r){}We.Override=m;function y(h){return(u,r,o)=>{}}return We.SuppressWarnings=y,We}var Ua;function Up(){if(Ua)return ut;Ua=1;/*!
|
|
6
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
7
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
8
|
+
*/var a=ut&&ut.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=ut&&ut.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(ut,"__esModule",{value:!0}),ut.AbstractParseTreeVisitor=void 0;const m=ue();let y=class{visit(u){return u.accept(this)}visitChildren(u){let r=this.defaultResult(),o=u.childCount;for(let t=0;t<o&&this.shouldVisitNextChild(u,r);t++){let e=u.getChild(t).accept(this);r=this.aggregateResult(r,e)}return r}visitTerminal(u){return this.defaultResult()}visitErrorNode(u){return this.defaultResult()}aggregateResult(u,r){return r}shouldVisitNextChild(u,r){return!0}};return a([m.Override,d(0,m.NotNull)],y.prototype,"visit",null),a([m.Override,d(0,m.NotNull)],y.prototype,"visitChildren",null),a([m.Override,d(0,m.NotNull)],y.prototype,"visitTerminal",null),a([m.Override,d(0,m.NotNull)],y.prototype,"visitErrorNode",null),a([d(0,m.NotNull)],y.prototype,"shouldVisitNextChild",null),ut.AbstractParseTreeVisitor=y,ut}var Or={},Dr={},wr={},Va;function je(){if(Va)return wr;Va=1;/*!
|
|
9
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
10
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
11
|
+
*/var a=wr&&wr.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(wr,"__esModule",{value:!0}),wr.Interval=void 0;const d=ue(),m=1e3;let y=class ze{constructor(u,r){this.a=u,this.b=r}static get INVALID(){return ze._INVALID}static of(u,r){return u!==r||u<0||u>m?new ze(u,r):(ze.cache[u]==null&&(ze.cache[u]=new ze(u,u)),ze.cache[u])}get length(){return this.b<this.a?0:this.b-this.a+1}equals(u){return u===this?!0:u instanceof ze?this.a===u.a&&this.b===u.b:!1}hashCode(){let u=23;return u=u*31+this.a,u=u*31+this.b,u}startsBeforeDisjoint(u){return this.a<u.a&&this.b<u.a}startsBeforeNonDisjoint(u){return this.a<=u.a&&this.b>=u.a}startsAfter(u){return this.a>u.a}startsAfterDisjoint(u){return this.a>u.b}startsAfterNonDisjoint(u){return this.a>u.a&&this.a<=u.b}disjoint(u){return this.startsBeforeDisjoint(u)||this.startsAfterDisjoint(u)}adjacent(u){return this.a===u.b+1||this.b===u.a-1}properlyContains(u){return u.a>=this.a&&u.b<=this.b}union(u){return ze.of(Math.min(this.a,u.a),Math.max(this.b,u.b))}intersection(u){return ze.of(Math.max(this.a,u.a),Math.min(this.b,u.b))}differenceNotProperlyContained(u){let r;return u.startsBeforeNonDisjoint(this)?r=ze.of(Math.max(this.a,u.b+1),this.b):u.startsAfterNonDisjoint(this)&&(r=ze.of(this.a,u.a-1)),r}toString(){return this.a+".."+this.b}};return y._INVALID=new y(-1,-2),y.cache=new Array(m+1),a([d.Override],y.prototype,"equals",null),a([d.Override],y.prototype,"hashCode",null),a([d.Override],y.prototype,"toString",null),wr.Interval=y,wr}var po={},ho={},za;function dr(){return za||(za=1,function(a){/*!
|
|
12
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
13
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
14
|
+
*/Object.defineProperty(a,"__esModule",{value:!0}),a.IntStream=void 0,function(d){d.EOF=-1,d.UNKNOWN_SOURCE_NAME="<unknown>"}(a.IntStream||(a.IntStream={}))}(ho)),ho}var Ha;function Fe(){return Ha||(Ha=1,function(a){/*!
|
|
15
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
16
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
17
|
+
*/Object.defineProperty(a,"__esModule",{value:!0}),a.Token=void 0;const d=dr();(function(m){m.INVALID_TYPE=0,m.EPSILON=-2,m.MIN_USER_TOKEN_TYPE=1,m.EOF=d.IntStream.EOF,m.DEFAULT_CHANNEL=0,m.HIDDEN_CHANNEL=1,m.MIN_USER_CHANNEL_VALUE=2})(a.Token||(a.Token={}))}(po)),po}var Ga;function yr(){if(Ga)return Dr;Ga=1;/*!
|
|
18
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
19
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
20
|
+
*/var a=Dr&&Dr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.TerminalNode=void 0;const d=je(),m=ue(),y=Fe();let h=class{constructor(r){this._symbol=r}getChild(r){throw new RangeError("Terminal Node has no children.")}get symbol(){return this._symbol}get parent(){return this._parent}setParent(r){this._parent=r}get payload(){return this._symbol}get sourceInterval(){let r=this._symbol.tokenIndex;return new d.Interval(r,r)}get childCount(){return 0}accept(r){return r.visitTerminal(this)}get text(){return this._symbol.text||""}toStringTree(r){return this.toString()}toString(){return this._symbol.type===y.Token.EOF?"<EOF>":this._symbol.text||""}};return a([m.Override],h.prototype,"getChild",null),a([m.Override],h.prototype,"parent",null),a([m.Override],h.prototype,"setParent",null),a([m.Override],h.prototype,"payload",null),a([m.Override],h.prototype,"sourceInterval",null),a([m.Override],h.prototype,"childCount",null),a([m.Override],h.prototype,"accept",null),a([m.Override],h.prototype,"text",null),a([m.Override],h.prototype,"toStringTree",null),a([m.Override],h.prototype,"toString",null),Dr.TerminalNode=h,Dr}var Ya;function Oi(){if(Ya)return Or;Ya=1;/*!
|
|
21
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
22
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
23
|
+
*/var a=Or&&Or.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(Or,"__esModule",{value:!0}),Or.ErrorNode=void 0;const d=ue(),m=yr();let y=class extends m.TerminalNode{constructor(u){super(u)}accept(u){return u.visitErrorNode(this)}};return a([d.Override],y.prototype,"accept",null),Or.ErrorNode=y,Or}var xo={},Wa;function Vp(){if(Wa)return xo;Wa=1;/*!
|
|
24
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
25
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
26
|
+
*/return Object.defineProperty(xo,"__esModule",{value:!0}),xo}var yo={},Qa;function zp(){if(Qa)return yo;Qa=1;/*!
|
|
27
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
28
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
29
|
+
*/return Object.defineProperty(yo,"__esModule",{value:!0}),yo}var Jn={},Xa;function Hp(){if(Xa)return Jn;Xa=1;/*!
|
|
30
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
31
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
32
|
+
*/Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.ParseTreeProperty=void 0;let a=class{constructor(m="ParseTreeProperty"){this._symbol=Symbol(m)}get(m){return m[this._symbol]}set(m,y){m[this._symbol]=y}removeFrom(m){let y=m[this._symbol];return delete m[this._symbol],y}};return Jn.ParseTreeProperty=a,Jn}var mo={},Ka;function Gp(){if(Ka)return mo;Ka=1;/*!
|
|
33
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
34
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
35
|
+
*/return Object.defineProperty(mo,"__esModule",{value:!0}),mo}var go={},Zn={},Ja;function Di(){if(Ja)return Zn;Ja=1;/*!
|
|
36
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
37
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
38
|
+
*/Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.RuleNode=void 0;let a=class{};return Zn.RuleNode=a,Zn}var Za;function Yp(){return Za||(Za=1,function(a){/*!
|
|
39
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
40
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
41
|
+
*/Object.defineProperty(a,"__esModule",{value:!0}),a.ParseTreeWalker=void 0;const d=Oi(),m=yr(),y=Di();class h{walk(r,o){let t=[],i=[],e=o,s=0;for(;e;){if(e instanceof d.ErrorNode?r.visitErrorNode&&r.visitErrorNode(e):e instanceof m.TerminalNode?r.visitTerminal&&r.visitTerminal(e):this.enterRule(r,e),e.childCount>0){t.push(e),i.push(s),s=0,e=e.getChild(0);continue}do{if(e instanceof y.RuleNode&&this.exitRule(r,e),t.length===0){e=void 0,s=0;break}let l=t[t.length-1];if(s++,e=s<l.childCount?l.getChild(s):void 0,e)break;e=t.pop(),s=i.pop()}while(e)}}enterRule(r,o){let t=o.ruleContext;r.enterEveryRule&&r.enterEveryRule(t),t.enterRule(r)}exitRule(r,o){let t=o.ruleContext;t.exitRule(r),r.exitEveryRule&&r.exitEveryRule(t)}}a.ParseTreeWalker=h,function(u){u.DEFAULT=new u}(h=a.ParseTreeWalker||(a.ParseTreeWalker={}))}(go)),go}var _o={},eu;function Wp(){if(eu)return _o;eu=1;/*!
|
|
42
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
43
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
44
|
+
*/return Object.defineProperty(_o,"__esModule",{value:!0}),_o}var Ao={},tu;function Qp(){if(tu)return Ao;tu=1;/*!
|
|
45
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
46
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
47
|
+
*/return Object.defineProperty(Ao,"__esModule",{value:!0}),Ao}var lt={},Rr={},ei={},ct={},vo={exports:{}},Eo={},So={},To={},bo,ru;function ca(){return ru||(ru=1,bo=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var d={},m=Symbol("test"),y=Object(m);if(typeof m=="string"||Object.prototype.toString.call(m)!=="[object Symbol]"||Object.prototype.toString.call(y)!=="[object Symbol]")return!1;var h=42;d[m]=h;for(var u in d)return!1;if(typeof Object.keys=="function"&&Object.keys(d).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(d).length!==0)return!1;var r=Object.getOwnPropertySymbols(d);if(r.length!==1||r[0]!==m||!Object.prototype.propertyIsEnumerable.call(d,m))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(d,m);if(o.value!==h||o.enumerable!==!0)return!1}return!0}),bo}var No,nu;function Xi(){if(nu)return No;nu=1;var a=ca();return No=function(){return a()&&!!Symbol.toStringTag},No}var Co,iu;function fa(){return iu||(iu=1,Co=Object),Co}var Oo,ou;function Xp(){return ou||(ou=1,Oo=Error),Oo}var Do,su;function Kp(){return su||(su=1,Do=EvalError),Do}var wo,au;function Jp(){return au||(au=1,wo=RangeError),wo}var Ro,uu;function Zp(){return uu||(uu=1,Ro=ReferenceError),Ro}var Po,lu;function F0(){return lu||(lu=1,Po=SyntaxError),Po}var Fo,cu;function wi(){return cu||(cu=1,Fo=TypeError),Fo}var Io,fu;function eh(){return fu||(fu=1,Io=URIError),Io}var Lo,pu;function th(){return pu||(pu=1,Lo=Math.abs),Lo}var Bo,hu;function rh(){return hu||(hu=1,Bo=Math.floor),Bo}var ko,xu;function nh(){return xu||(xu=1,ko=Math.max),ko}var Mo,du;function ih(){return du||(du=1,Mo=Math.min),Mo}var qo,yu;function oh(){return yu||(yu=1,qo=Math.pow),qo}var jo,mu;function sh(){return mu||(mu=1,jo=Math.round),jo}var $o,gu;function ah(){return gu||(gu=1,$o=Number.isNaN||function(d){return d!==d}),$o}var Uo,_u;function uh(){if(_u)return Uo;_u=1;var a=ah();return Uo=function(m){return a(m)||m===0?m:m<0?-1:1},Uo}var Vo,Au;function lh(){return Au||(Au=1,Vo=Object.getOwnPropertyDescriptor),Vo}var zo,vu;function $n(){if(vu)return zo;vu=1;var a=lh();if(a)try{a([],"length")}catch{a=null}return zo=a,zo}var Ho,Eu;function Ki(){if(Eu)return Ho;Eu=1;var a=Object.defineProperty||!1;if(a)try{a({},"a",{value:1})}catch{a=!1}return Ho=a,Ho}var Go,Su;function ch(){if(Su)return Go;Su=1;var a=typeof Symbol<"u"&&Symbol,d=ca();return Go=function(){return typeof a!="function"||typeof Symbol!="function"||typeof a("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:d()},Go}var Yo,Tu;function I0(){return Tu||(Tu=1,Yo=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Yo}var Wo,bu;function L0(){if(bu)return Wo;bu=1;var a=fa();return Wo=a.getPrototypeOf||null,Wo}var Qo,Nu;function fh(){if(Nu)return Qo;Nu=1;var a="Function.prototype.bind called on incompatible ",d=Object.prototype.toString,m=Math.max,y="[object Function]",h=function(t,i){for(var e=[],s=0;s<t.length;s+=1)e[s]=t[s];for(var l=0;l<i.length;l+=1)e[l+t.length]=i[l];return e},u=function(t,i){for(var e=[],s=i,l=0;s<t.length;s+=1,l+=1)e[l]=t[s];return e},r=function(o,t){for(var i="",e=0;e<o.length;e+=1)i+=o[e],e+1<o.length&&(i+=t);return i};return Qo=function(t){var i=this;if(typeof i!="function"||d.apply(i)!==y)throw new TypeError(a+i);for(var e=u(arguments,1),s,l=function(){if(this instanceof s){var g=i.apply(this,h(e,arguments));return Object(g)===g?g:this}return i.apply(t,h(e,arguments))},c=m(0,i.length-e.length),p=[],v=0;v<c;v++)p[v]="$"+v;if(s=Function("binder","return function ("+r(p,",")+"){ return binder.apply(this,arguments); }")(l),i.prototype){var x=function(){};x.prototype=i.prototype,s.prototype=new x,x.prototype=null}return s},Qo}var Xo,Cu;function Ri(){if(Cu)return Xo;Cu=1;var a=fh();return Xo=Function.prototype.bind||a,Xo}var Ko,Ou;function pa(){return Ou||(Ou=1,Ko=Function.prototype.call),Ko}var Jo,Du;function ha(){return Du||(Du=1,Jo=Function.prototype.apply),Jo}var Zo,wu;function ph(){return wu||(wu=1,Zo=typeof Reflect<"u"&&Reflect&&Reflect.apply),Zo}var es,Ru;function B0(){if(Ru)return es;Ru=1;var a=Ri(),d=ha(),m=pa(),y=ph();return es=y||a.call(m,d),es}var ts,Pu;function xa(){if(Pu)return ts;Pu=1;var a=Ri(),d=wi(),m=pa(),y=B0();return ts=function(u){if(u.length<1||typeof u[0]!="function")throw new d("a function is required");return y(a,m,u)},ts}var rs,Fu;function hh(){if(Fu)return rs;Fu=1;var a=xa(),d=$n(),m;try{m=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var y=!!m&&d&&d(Object.prototype,"__proto__"),h=Object,u=h.getPrototypeOf;return rs=y&&typeof y.get=="function"?a([y.get]):typeof u=="function"?function(o){return u(o==null?o:h(o))}:!1,rs}var ns,Iu;function da(){if(Iu)return ns;Iu=1;var a=I0(),d=L0(),m=hh();return ns=a?function(h){return a(h)}:d?function(h){if(!h||typeof h!="object"&&typeof h!="function")throw new TypeError("getProto: not an object");return d(h)}:m?function(h){return m(h)}:null,ns}var is,Lu;function k0(){if(Lu)return is;Lu=1;var a=Function.prototype.call,d=Object.prototype.hasOwnProperty,m=Ri();return is=m.call(a,d),is}var os,Bu;function ya(){if(Bu)return os;Bu=1;var a,d=fa(),m=Xp(),y=Kp(),h=Jp(),u=Zp(),r=F0(),o=wi(),t=eh(),i=th(),e=rh(),s=nh(),l=ih(),c=oh(),p=sh(),v=uh(),x=Function,g=function(R){try{return x('"use strict"; return ('+R+").constructor;")()}catch{}},_=$n(),A=Ki(),E=function(){throw new o},D=_?function(){try{return arguments.callee,E}catch{try{return _(arguments,"callee").get}catch{return E}}}():E,N=ch()(),w=da(),P=L0(),$=I0(),Y=ha(),L=pa(),q={},W=typeof Uint8Array>"u"||!w?a:w(Uint8Array),Z={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?a:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?a:ArrayBuffer,"%ArrayIteratorPrototype%":N&&w?w([][Symbol.iterator]()):a,"%AsyncFromSyncIteratorPrototype%":a,"%AsyncFunction%":q,"%AsyncGenerator%":q,"%AsyncGeneratorFunction%":q,"%AsyncIteratorPrototype%":q,"%Atomics%":typeof Atomics>"u"?a:Atomics,"%BigInt%":typeof BigInt>"u"?a:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?a:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?a:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?a:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":m,"%eval%":eval,"%EvalError%":y,"%Float16Array%":typeof Float16Array>"u"?a:Float16Array,"%Float32Array%":typeof Float32Array>"u"?a:Float32Array,"%Float64Array%":typeof Float64Array>"u"?a:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?a:FinalizationRegistry,"%Function%":x,"%GeneratorFunction%":q,"%Int8Array%":typeof Int8Array>"u"?a:Int8Array,"%Int16Array%":typeof Int16Array>"u"?a:Int16Array,"%Int32Array%":typeof Int32Array>"u"?a:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":N&&w?w(w([][Symbol.iterator]())):a,"%JSON%":typeof JSON=="object"?JSON:a,"%Map%":typeof Map>"u"?a:Map,"%MapIteratorPrototype%":typeof Map>"u"||!N||!w?a:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":d,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?a:Promise,"%Proxy%":typeof Proxy>"u"?a:Proxy,"%RangeError%":h,"%ReferenceError%":u,"%Reflect%":typeof Reflect>"u"?a:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?a:Set,"%SetIteratorPrototype%":typeof Set>"u"||!N||!w?a:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?a:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":N&&w?w(""[Symbol.iterator]()):a,"%Symbol%":N?Symbol:a,"%SyntaxError%":r,"%ThrowTypeError%":D,"%TypedArray%":W,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?a:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?a:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?a:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?a:Uint32Array,"%URIError%":t,"%WeakMap%":typeof WeakMap>"u"?a:WeakMap,"%WeakRef%":typeof WeakRef>"u"?a:WeakRef,"%WeakSet%":typeof WeakSet>"u"?a:WeakSet,"%Function.prototype.call%":L,"%Function.prototype.apply%":Y,"%Object.defineProperty%":A,"%Object.getPrototypeOf%":P,"%Math.abs%":i,"%Math.floor%":e,"%Math.max%":s,"%Math.min%":l,"%Math.pow%":c,"%Math.round%":p,"%Math.sign%":v,"%Reflect.getPrototypeOf%":$};if(w)try{null.error}catch(R){var I=w(w(R));Z["%Error.prototype%"]=I}var Q=function R(k){var V;if(k==="%AsyncFunction%")V=g("async function () {}");else if(k==="%GeneratorFunction%")V=g("function* () {}");else if(k==="%AsyncGeneratorFunction%")V=g("async function* () {}");else if(k==="%AsyncGenerator%"){var G=R("%AsyncGeneratorFunction%");G&&(V=G.prototype)}else if(k==="%AsyncIteratorPrototype%"){var U=R("%AsyncGenerator%");U&&w&&(V=w(U.prototype))}return Z[k]=V,V},re={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},fe=Ri(),oe=k0(),J=fe.call(L,Array.prototype.concat),te=fe.call(Y,Array.prototype.splice),pe=fe.call(L,String.prototype.replace),O=fe.call(L,String.prototype.slice),T=fe.call(L,RegExp.prototype.exec),C=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F=/\\(\\)?/g,j=function(k){var V=O(k,0,1),G=O(k,-1);if(V==="%"&&G!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(G==="%"&&V!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var U=[];return pe(k,C,function(z,K,ie,le){U[U.length]=ie?pe(le,F,"$1"):K||z}),U},b=function(k,V){var G=k,U;if(oe(re,G)&&(U=re[G],G="%"+U[0]+"%"),oe(Z,G)){var z=Z[G];if(z===q&&(z=Q(G)),typeof z>"u"&&!V)throw new o("intrinsic "+k+" exists, but is not available. Please file an issue!");return{alias:U,name:G,value:z}}throw new r("intrinsic "+k+" does not exist!")};return os=function(k,V){if(typeof k!="string"||k.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof V!="boolean")throw new o('"allowMissing" argument must be a boolean');if(T(/^%?[^%]*%?$/,k)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var G=j(k),U=G.length>0?G[0]:"",z=b("%"+U+"%",V),K=z.name,ie=z.value,le=!1,ce=z.alias;ce&&(U=ce[0],te(G,J([0,1],ce)));for(var X=1,ae=!0;X<G.length;X+=1){var de=G[X],ve=O(de,0,1),Se=O(de,-1);if((ve==='"'||ve==="'"||ve==="`"||Se==='"'||Se==="'"||Se==="`")&&ve!==Se)throw new r("property names with quotes must have matching quotes");if((de==="constructor"||!ae)&&(le=!0),U+="."+de,K="%"+U+"%",oe(Z,K))ie=Z[K];else if(ie!=null){if(!(de in ie)){if(!V)throw new o("base intrinsic for "+k+" exists, but the property is not available.");return}if(_&&X+1>=G.length){var H=_(ie,de);ae=!!H,ae&&"get"in H&&!("originalValue"in H.get)?ie=H.get:ie=ie[de]}else ae=oe(ie,de),ie=ie[de];ae&&!le&&(Z[K]=ie)}}return ie},os}var ss,ku;function Un(){if(ku)return ss;ku=1;var a=ya(),d=xa(),m=d([a("%String.prototype.indexOf%")]);return ss=function(h,u){var r=a(h,!!u);return typeof r=="function"&&m(h,".prototype.")>-1?d([r]):r},ss}var as,Mu;function xh(){if(Mu)return as;Mu=1;var a=Xi()(),d=Un(),m=d("Object.prototype.toString"),y=function(o){return a&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:m(o)==="[object Arguments]"},h=function(o){return y(o)?!0:o!==null&&typeof o=="object"&&"length"in o&&typeof o.length=="number"&&o.length>=0&&m(o)!=="[object Array]"&&"callee"in o&&m(o.callee)==="[object Function]"},u=function(){return y(arguments)}();return y.isLegacyArguments=h,as=u?y:h,as}var us,qu;function dh(){if(qu)return us;qu=1;var a=Un(),d=Xi()(),m=k0(),y=$n(),h;if(d){var u=a("RegExp.prototype.exec"),r={},o=function(){throw r},t={toString:o,valueOf:o};typeof Symbol.toPrimitive=="symbol"&&(t[Symbol.toPrimitive]=o),h=function(l){if(!l||typeof l!="object")return!1;var c=y(l,"lastIndex"),p=c&&m(c,"value");if(!p)return!1;try{u(l,t)}catch(v){return v===r}}}else{var i=a("Object.prototype.toString"),e="[object RegExp]";h=function(l){return!l||typeof l!="object"&&typeof l!="function"?!1:i(l)===e}}return us=h,us}var ls,ju;function yh(){if(ju)return ls;ju=1;var a=Un(),d=dh(),m=a("RegExp.prototype.exec"),y=wi();return ls=function(u){if(!d(u))throw new y("`regex` must be a RegExp");return function(o){return m(u,o)!==null}},ls}var cs,$u;function mh(){if($u)return cs;$u=1;var a=Un(),d=yh(),m=d(/^\s*(?:function)?\*/),y=Xi()(),h=da(),u=a("Object.prototype.toString"),r=a("Function.prototype.toString"),o=function(){if(!y)return!1;try{return Function("return function*() {}")()}catch{}},t;return cs=function(e){if(typeof e!="function")return!1;if(m(r(e)))return!0;if(!y){var s=u(e);return s==="[object GeneratorFunction]"}if(!h)return!1;if(typeof t>"u"){var l=o();t=l?h(l):!1}return h(e)===t},cs}var fs,Uu;function gh(){if(Uu)return fs;Uu=1;var a=Function.prototype.toString,d=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,m,y;if(typeof d=="function"&&typeof Object.defineProperty=="function")try{m=Object.defineProperty({},"length",{get:function(){throw y}}),y={},d(function(){throw 42},null,m)}catch(_){_!==y&&(d=null)}else d=null;var h=/^\s*class\b/,u=function(A){try{var E=a.call(A);return h.test(E)}catch{return!1}},r=function(A){try{return u(A)?!1:(a.call(A),!0)}catch{return!1}},o=Object.prototype.toString,t="[object Object]",i="[object Function]",e="[object GeneratorFunction]",s="[object HTMLAllCollection]",l="[object HTML document.all class]",c="[object HTMLCollection]",p=typeof Symbol=="function"&&!!Symbol.toStringTag,v=!(0 in[,]),x=function(){return!1};if(typeof document=="object"){var g=document.all;o.call(g)===o.call(document.all)&&(x=function(A){if((v||!A)&&(typeof A>"u"||typeof A=="object"))try{var E=o.call(A);return(E===s||E===l||E===c||E===t)&&A("")==null}catch{}return!1})}return fs=d?function(A){if(x(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;try{d(A,null,m)}catch(E){if(E!==y)return!1}return!u(A)&&r(A)}:function(A){if(x(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;if(p)return r(A);if(u(A))return!1;var E=o.call(A);return E!==i&&E!==e&&!/^\[object HTML/.test(E)?!1:r(A)},fs}var ps,Vu;function _h(){if(Vu)return ps;Vu=1;var a=gh(),d=Object.prototype.toString,m=Object.prototype.hasOwnProperty,y=function(t,i,e){for(var s=0,l=t.length;s<l;s++)m.call(t,s)&&(e==null?i(t[s],s,t):i.call(e,t[s],s,t))},h=function(t,i,e){for(var s=0,l=t.length;s<l;s++)e==null?i(t.charAt(s),s,t):i.call(e,t.charAt(s),s,t)},u=function(t,i,e){for(var s in t)m.call(t,s)&&(e==null?i(t[s],s,t):i.call(e,t[s],s,t))};function r(o){return d.call(o)==="[object Array]"}return ps=function(t,i,e){if(!a(i))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=e),r(t)?y(t,i,s):typeof t=="string"?h(t,i,s):u(t,i,s)},ps}var hs,zu;function Ah(){return zu||(zu=1,hs=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),hs}var xs,Hu;function vh(){if(Hu)return xs;Hu=1;var a=Ah(),d=typeof globalThis>"u"?R0:globalThis;return xs=function(){for(var y=[],h=0;h<a.length;h++)typeof d[a[h]]=="function"&&(y[y.length]=a[h]);return y},xs}var ds={exports:{}},ys,Gu;function M0(){if(Gu)return ys;Gu=1;var a=Ki(),d=F0(),m=wi(),y=$n();return ys=function(u,r,o){if(!u||typeof u!="object"&&typeof u!="function")throw new m("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new m("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new m("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new m("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new m("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new m("`loose`, if provided, must be a boolean");var t=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,e=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!y&&y(u,r);if(a)a(u,r,{configurable:e===null&&l?l.configurable:!e,enumerable:t===null&&l?l.enumerable:!t,value:o,writable:i===null&&l?l.writable:!i});else if(s||!t&&!i&&!e)u[r]=o;else throw new d("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ys}var ms,Yu;function q0(){if(Yu)return ms;Yu=1;var a=Ki(),d=function(){return!!a};return d.hasArrayLengthDefineBug=function(){if(!a)return null;try{return a([],"length",{value:1}).length!==1}catch{return!0}},ms=d,ms}var gs,Wu;function Eh(){if(Wu)return gs;Wu=1;var a=ya(),d=M0(),m=q0()(),y=$n(),h=wi(),u=a("%Math.floor%");return gs=function(o,t){if(typeof o!="function")throw new h("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||u(t)!==t)throw new h("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],e=!0,s=!0;if("length"in o&&y){var l=y(o,"length");l&&!l.configurable&&(e=!1),l&&!l.writable&&(s=!1)}return(e||s||!i)&&(m?d(o,"length",t,!0,!0):d(o,"length",t)),o},gs}var _s,Qu;function Sh(){if(Qu)return _s;Qu=1;var a=Ri(),d=ha(),m=B0();return _s=function(){return m(a,d,arguments)},_s}var Xu;function Ji(){return Xu||(Xu=1,function(a){var d=Eh(),m=Ki(),y=xa(),h=Sh();a.exports=function(r){var o=y(arguments),t=r.length-(arguments.length-1);return d(o,1+(t>0?t:0),!0)},m?m(a.exports,"apply",{value:h}):a.exports.apply=h}(ds)),ds.exports}var As,Ku;function j0(){if(Ku)return As;Ku=1;var a=_h(),d=vh(),m=Ji(),y=Un(),h=$n(),u=da(),r=y("Object.prototype.toString"),o=Xi()(),t=typeof globalThis>"u"?R0:globalThis,i=d(),e=y("String.prototype.slice"),s=y("Array.prototype.indexOf",!0)||function(x,g){for(var _=0;_<x.length;_+=1)if(x[_]===g)return _;return-1},l={__proto__:null};o&&h&&u?a(i,function(v){var x=new t[v];if(Symbol.toStringTag in x&&u){var g=u(x),_=h(g,Symbol.toStringTag);if(!_&&g){var A=u(g);_=h(A,Symbol.toStringTag)}l["$"+v]=m(_.get)}}):a(i,function(v){var x=new t[v],g=x.slice||x.set;g&&(l["$"+v]=m(g))});var c=function(x){var g=!1;return a(l,function(_,A){if(!g)try{"$"+_(x)===A&&(g=e(A,1))}catch{}}),g},p=function(x){var g=!1;return a(l,function(_,A){if(!g)try{_(x),g=e(A,1)}catch{}}),g};return As=function(x){if(!x||typeof x!="object")return!1;if(!o){var g=e(r(x),8,-1);return s(i,g)>-1?g:g!=="Object"?!1:p(x)}return h?c(x):null},As}var vs,Ju;function Th(){if(Ju)return vs;Ju=1;var a=j0();return vs=function(m){return!!a(m)},vs}var Zu;function bh(){return Zu||(Zu=1,function(a){var d=xh(),m=mh(),y=j0(),h=Th();function u(X){return X.call.bind(X)}var r=typeof BigInt<"u",o=typeof Symbol<"u",t=u(Object.prototype.toString),i=u(Number.prototype.valueOf),e=u(String.prototype.valueOf),s=u(Boolean.prototype.valueOf);if(r)var l=u(BigInt.prototype.valueOf);if(o)var c=u(Symbol.prototype.valueOf);function p(X,ae){if(typeof X!="object")return!1;try{return ae(X),!0}catch{return!1}}a.isArgumentsObject=d,a.isGeneratorFunction=m,a.isTypedArray=h;function v(X){return typeof Promise<"u"&&X instanceof Promise||X!==null&&typeof X=="object"&&typeof X.then=="function"&&typeof X.catch=="function"}a.isPromise=v;function x(X){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(X):h(X)||O(X)}a.isArrayBufferView=x;function g(X){return y(X)==="Uint8Array"}a.isUint8Array=g;function _(X){return y(X)==="Uint8ClampedArray"}a.isUint8ClampedArray=_;function A(X){return y(X)==="Uint16Array"}a.isUint16Array=A;function E(X){return y(X)==="Uint32Array"}a.isUint32Array=E;function D(X){return y(X)==="Int8Array"}a.isInt8Array=D;function N(X){return y(X)==="Int16Array"}a.isInt16Array=N;function w(X){return y(X)==="Int32Array"}a.isInt32Array=w;function P(X){return y(X)==="Float32Array"}a.isFloat32Array=P;function $(X){return y(X)==="Float64Array"}a.isFloat64Array=$;function Y(X){return y(X)==="BigInt64Array"}a.isBigInt64Array=Y;function L(X){return y(X)==="BigUint64Array"}a.isBigUint64Array=L;function q(X){return t(X)==="[object Map]"}q.working=typeof Map<"u"&&q(new Map);function W(X){return typeof Map>"u"?!1:q.working?q(X):X instanceof Map}a.isMap=W;function Z(X){return t(X)==="[object Set]"}Z.working=typeof Set<"u"&&Z(new Set);function I(X){return typeof Set>"u"?!1:Z.working?Z(X):X instanceof Set}a.isSet=I;function Q(X){return t(X)==="[object WeakMap]"}Q.working=typeof WeakMap<"u"&&Q(new WeakMap);function re(X){return typeof WeakMap>"u"?!1:Q.working?Q(X):X instanceof WeakMap}a.isWeakMap=re;function fe(X){return t(X)==="[object WeakSet]"}fe.working=typeof WeakSet<"u"&&fe(new WeakSet);function oe(X){return fe(X)}a.isWeakSet=oe;function J(X){return t(X)==="[object ArrayBuffer]"}J.working=typeof ArrayBuffer<"u"&&J(new ArrayBuffer);function te(X){return typeof ArrayBuffer>"u"?!1:J.working?J(X):X instanceof ArrayBuffer}a.isArrayBuffer=te;function pe(X){return t(X)==="[object DataView]"}pe.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&pe(new DataView(new ArrayBuffer(1),0,1));function O(X){return typeof DataView>"u"?!1:pe.working?pe(X):X instanceof DataView}a.isDataView=O;var T=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function C(X){return t(X)==="[object SharedArrayBuffer]"}function F(X){return typeof T>"u"?!1:(typeof C.working>"u"&&(C.working=C(new T)),C.working?C(X):X instanceof T)}a.isSharedArrayBuffer=F;function j(X){return t(X)==="[object AsyncFunction]"}a.isAsyncFunction=j;function b(X){return t(X)==="[object Map Iterator]"}a.isMapIterator=b;function R(X){return t(X)==="[object Set Iterator]"}a.isSetIterator=R;function k(X){return t(X)==="[object Generator]"}a.isGeneratorObject=k;function V(X){return t(X)==="[object WebAssembly.Module]"}a.isWebAssemblyCompiledModule=V;function G(X){return p(X,i)}a.isNumberObject=G;function U(X){return p(X,e)}a.isStringObject=U;function z(X){return p(X,s)}a.isBooleanObject=z;function K(X){return r&&p(X,l)}a.isBigIntObject=K;function ie(X){return o&&p(X,c)}a.isSymbolObject=ie;function le(X){return G(X)||U(X)||z(X)||K(X)||ie(X)}a.isBoxedPrimitive=le;function ce(X){return typeof Uint8Array<"u"&&(te(X)||F(X))}a.isAnyArrayBuffer=ce,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(X){Object.defineProperty(a,X,{enumerable:!1,value:function(){throw new Error(X+" is not supported in userland")}})})}(To)),To}var Es,el;function Nh(){return el||(el=1,Es=function(d){return d&&typeof d=="object"&&typeof d.copy=="function"&&typeof d.fill=="function"&&typeof d.readUInt8=="function"}),Es}var ji={exports:{}},tl;function Ch(){return tl||(tl=1,typeof Object.create=="function"?ji.exports=function(d,m){m&&(d.super_=m,d.prototype=Object.create(m.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}))}:ji.exports=function(d,m){if(m){d.super_=m;var y=function(){};y.prototype=m.prototype,d.prototype=new y,d.prototype.constructor=d}}),ji.exports}var rl;function jn(){return rl||(rl=1,function(a){var d={},m=Object.getOwnPropertyDescriptors||function(T){for(var C=Object.keys(T),F={},j=0;j<C.length;j++)F[C[j]]=Object.getOwnPropertyDescriptor(T,C[j]);return F},y=/%[sdj%]/g;a.format=function(O){if(!N(O)){for(var T=[],C=0;C<arguments.length;C++)T.push(o(arguments[C]));return T.join(" ")}for(var C=1,F=arguments,j=F.length,b=String(O).replace(y,function(k){if(k==="%%")return"%";if(C>=j)return k;switch(k){case"%s":return String(F[C++]);case"%d":return Number(F[C++]);case"%j":try{return JSON.stringify(F[C++])}catch{return"[Circular]"}default:return k}}),R=F[C];C<j;R=F[++C])A(R)||!Y(R)?b+=" "+R:b+=" "+o(R);return b},a.deprecate=function(O,T){if(typeof process<"u"&&process.noDeprecation===!0)return O;if(typeof process>"u")return function(){return a.deprecate(O,T).apply(this,arguments)};var C=!1;function F(){if(!C){if(process.throwDeprecation)throw new Error(T);process.traceDeprecation?console.trace(T):console.error(T),C=!0}return O.apply(this,arguments)}return F};var h={},u=/^$/;if(d.NODE_DEBUG){var r=d.NODE_DEBUG;r=r.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),u=new RegExp("^"+r+"$","i")}a.debuglog=function(O){if(O=O.toUpperCase(),!h[O])if(u.test(O)){var T=process.pid;h[O]=function(){var C=a.format.apply(a,arguments);console.error("%s %d: %s",O,T,C)}}else h[O]=function(){};return h[O]};function o(O,T){var C={seen:[],stylize:i};return arguments.length>=3&&(C.depth=arguments[2]),arguments.length>=4&&(C.colors=arguments[3]),_(T)?C.showHidden=T:T&&a._extend(C,T),P(C.showHidden)&&(C.showHidden=!1),P(C.depth)&&(C.depth=2),P(C.colors)&&(C.colors=!1),P(C.customInspect)&&(C.customInspect=!0),C.colors&&(C.stylize=t),s(C,O,C.depth)}a.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function t(O,T){var C=o.styles[T];return C?"\x1B["+o.colors[C][0]+"m"+O+"\x1B["+o.colors[C][1]+"m":O}function i(O,T){return O}function e(O){var T={};return O.forEach(function(C,F){T[C]=!0}),T}function s(O,T,C){if(O.customInspect&&T&&W(T.inspect)&&T.inspect!==a.inspect&&!(T.constructor&&T.constructor.prototype===T)){var F=T.inspect(C,O);return N(F)||(F=s(O,F,C)),F}var j=l(O,T);if(j)return j;var b=Object.keys(T),R=e(b);if(O.showHidden&&(b=Object.getOwnPropertyNames(T)),q(T)&&(b.indexOf("message")>=0||b.indexOf("description")>=0))return c(T);if(b.length===0){if(W(T)){var k=T.name?": "+T.name:"";return O.stylize("[Function"+k+"]","special")}if($(T))return O.stylize(RegExp.prototype.toString.call(T),"regexp");if(L(T))return O.stylize(Date.prototype.toString.call(T),"date");if(q(T))return c(T)}var V="",G=!1,U=["{","}"];if(g(T)&&(G=!0,U=["[","]"]),W(T)){var z=T.name?": "+T.name:"";V=" [Function"+z+"]"}if($(T)&&(V=" "+RegExp.prototype.toString.call(T)),L(T)&&(V=" "+Date.prototype.toUTCString.call(T)),q(T)&&(V=" "+c(T)),b.length===0&&(!G||T.length==0))return U[0]+V+U[1];if(C<0)return $(T)?O.stylize(RegExp.prototype.toString.call(T),"regexp"):O.stylize("[Object]","special");O.seen.push(T);var K;return G?K=p(O,T,C,R,b):K=b.map(function(ie){return v(O,T,C,R,ie,G)}),O.seen.pop(),x(K,V,U)}function l(O,T){if(P(T))return O.stylize("undefined","undefined");if(N(T)){var C="'"+JSON.stringify(T).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return O.stylize(C,"string")}if(D(T))return O.stylize(""+T,"number");if(_(T))return O.stylize(""+T,"boolean");if(A(T))return O.stylize("null","null")}function c(O){return"["+Error.prototype.toString.call(O)+"]"}function p(O,T,C,F,j){for(var b=[],R=0,k=T.length;R<k;++R)oe(T,String(R))?b.push(v(O,T,C,F,String(R),!0)):b.push("");return j.forEach(function(V){V.match(/^\d+$/)||b.push(v(O,T,C,F,V,!0))}),b}function v(O,T,C,F,j,b){var R,k,V;if(V=Object.getOwnPropertyDescriptor(T,j)||{value:T[j]},V.get?V.set?k=O.stylize("[Getter/Setter]","special"):k=O.stylize("[Getter]","special"):V.set&&(k=O.stylize("[Setter]","special")),oe(F,j)||(R="["+j+"]"),k||(O.seen.indexOf(V.value)<0?(A(C)?k=s(O,V.value,null):k=s(O,V.value,C-1),k.indexOf(`
|
|
48
|
+
`)>-1&&(b?k=k.split(`
|
|
49
|
+
`).map(function(G){return" "+G}).join(`
|
|
50
|
+
`).slice(2):k=`
|
|
51
|
+
`+k.split(`
|
|
52
|
+
`).map(function(G){return" "+G}).join(`
|
|
53
|
+
`))):k=O.stylize("[Circular]","special")),P(R)){if(b&&j.match(/^\d+$/))return k;R=JSON.stringify(""+j),R.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(R=R.slice(1,-1),R=O.stylize(R,"name")):(R=R.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),R=O.stylize(R,"string"))}return R+": "+k}function x(O,T,C){var F=O.reduce(function(j,b){return b.indexOf(`
|
|
54
|
+
`)>=0,j+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return F>60?C[0]+(T===""?"":T+`
|
|
55
|
+
`)+" "+O.join(`,
|
|
56
|
+
`)+" "+C[1]:C[0]+T+" "+O.join(", ")+" "+C[1]}a.types=bh();function g(O){return Array.isArray(O)}a.isArray=g;function _(O){return typeof O=="boolean"}a.isBoolean=_;function A(O){return O===null}a.isNull=A;function E(O){return O==null}a.isNullOrUndefined=E;function D(O){return typeof O=="number"}a.isNumber=D;function N(O){return typeof O=="string"}a.isString=N;function w(O){return typeof O=="symbol"}a.isSymbol=w;function P(O){return O===void 0}a.isUndefined=P;function $(O){return Y(O)&&I(O)==="[object RegExp]"}a.isRegExp=$,a.types.isRegExp=$;function Y(O){return typeof O=="object"&&O!==null}a.isObject=Y;function L(O){return Y(O)&&I(O)==="[object Date]"}a.isDate=L,a.types.isDate=L;function q(O){return Y(O)&&(I(O)==="[object Error]"||O instanceof Error)}a.isError=q,a.types.isNativeError=q;function W(O){return typeof O=="function"}a.isFunction=W;function Z(O){return O===null||typeof O=="boolean"||typeof O=="number"||typeof O=="string"||typeof O=="symbol"||typeof O>"u"}a.isPrimitive=Z,a.isBuffer=Nh();function I(O){return Object.prototype.toString.call(O)}function Q(O){return O<10?"0"+O.toString(10):O.toString(10)}var re=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function fe(){var O=new Date,T=[Q(O.getHours()),Q(O.getMinutes()),Q(O.getSeconds())].join(":");return[O.getDate(),re[O.getMonth()],T].join(" ")}a.log=function(){console.log("%s - %s",fe(),a.format.apply(a,arguments))},a.inherits=Ch(),a._extend=function(O,T){if(!T||!Y(T))return O;for(var C=Object.keys(T),F=C.length;F--;)O[C[F]]=T[C[F]];return O};function oe(O,T){return Object.prototype.hasOwnProperty.call(O,T)}var J=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;a.promisify=function(T){if(typeof T!="function")throw new TypeError('The "original" argument must be of type Function');if(J&&T[J]){var C=T[J];if(typeof C!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(C,J,{value:C,enumerable:!1,writable:!1,configurable:!0}),C}function C(){for(var F,j,b=new Promise(function(V,G){F=V,j=G}),R=[],k=0;k<arguments.length;k++)R.push(arguments[k]);R.push(function(V,G){V?j(V):F(G)});try{T.apply(this,R)}catch(V){j(V)}return b}return Object.setPrototypeOf(C,Object.getPrototypeOf(T)),J&&Object.defineProperty(C,J,{value:C,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(C,m(T))},a.promisify.custom=J;function te(O,T){if(!O){var C=new Error("Promise was rejected with a falsy value");C.reason=O,O=C}return T(O)}function pe(O){if(typeof O!="function")throw new TypeError('The "original" argument must be of type Function');function T(){for(var C=[],F=0;F<arguments.length;F++)C.push(arguments[F]);var j=C.pop();if(typeof j!="function")throw new TypeError("The last argument must be of type Function");var b=this,R=function(){return j.apply(b,arguments)};O.apply(this,C).then(function(k){process.nextTick(R.bind(null,null,k))},function(k){process.nextTick(te.bind(null,k,R))})}return Object.setPrototypeOf(T,Object.getPrototypeOf(O)),Object.defineProperties(T,m(O)),T}a.callbackify=pe}(So)),So}var nl;function $0(){if(nl)return Eo;nl=1;function a(_){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},a(_)}function d(_,A,E){return Object.defineProperty(_,"prototype",{writable:!1}),_}function m(_,A){if(!(_ instanceof A))throw new TypeError("Cannot call a class as a function")}function y(_,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(A&&A.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),Object.defineProperty(_,"prototype",{writable:!1}),A&&h(_,A)}function h(_,A){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(D,N){return D.__proto__=N,D},h(_,A)}function u(_){var A=t();return function(){var D=i(_),N;if(A){var w=i(this).constructor;N=Reflect.construct(D,arguments,w)}else N=D.apply(this,arguments);return r(this,N)}}function r(_,A){if(A&&(a(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o(_)}function o(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function t(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function i(_){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(_)}var e={},s,l;function c(_,A,E){E||(E=Error);function D(w,P,$){return typeof A=="string"?A:A(w,P,$)}var N=function(w){y($,w);var P=u($);function $(Y,L,q){var W;return m(this,$),W=P.call(this,D(Y,L,q)),W.code=_,W}return d($)}(E);e[_]=N}function p(_,A){if(Array.isArray(_)){var E=_.length;return _=_.map(function(D){return String(D)}),E>2?"one of ".concat(A," ").concat(_.slice(0,E-1).join(", "),", or ")+_[E-1]:E===2?"one of ".concat(A," ").concat(_[0]," or ").concat(_[1]):"of ".concat(A," ").concat(_[0])}else return"of ".concat(A," ").concat(String(_))}function v(_,A,E){return _.substr(0,A.length)===A}function x(_,A,E){return(E===void 0||E>_.length)&&(E=_.length),_.substring(E-A.length,E)===A}function g(_,A,E){return typeof E!="number"&&(E=0),E+A.length>_.length?!1:_.indexOf(A,E)!==-1}return c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",function(_,A,E){s===void 0&&(s=qe()),s(typeof _=="string","'name' must be a string");var D;typeof A=="string"&&v(A,"not ")?(D="must not be",A=A.replace(/^not /,"")):D="must be";var N;if(x(_," argument"))N="The ".concat(_," ").concat(D," ").concat(p(A,"type"));else{var w=g(_,".")?"property":"argument";N='The "'.concat(_,'" ').concat(w," ").concat(D," ").concat(p(A,"type"))}return N+=". Received type ".concat(a(E)),N},TypeError),c("ERR_INVALID_ARG_VALUE",function(_,A){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";l===void 0&&(l=jn());var D=l.inspect(A);return D.length>128&&(D="".concat(D.slice(0,128),"...")),"The argument '".concat(_,"' ").concat(E,". Received ").concat(D)},TypeError),c("ERR_INVALID_RETURN_VALUE",function(_,A,E){var D;return E&&E.constructor&&E.constructor.name?D="instance of ".concat(E.constructor.name):D="type ".concat(a(E)),"Expected ".concat(_,' to be returned from the "').concat(A,'"')+" function but got ".concat(D,".")},TypeError),c("ERR_MISSING_ARGS",function(){for(var _=arguments.length,A=new Array(_),E=0;E<_;E++)A[E]=arguments[E];s===void 0&&(s=qe()),s(A.length>0,"At least one arg needs to be specified");var D="The ",N=A.length;switch(A=A.map(function(w){return'"'.concat(w,'"')}),N){case 1:D+="".concat(A[0]," argument");break;case 2:D+="".concat(A[0]," and ").concat(A[1]," arguments");break;default:D+=A.slice(0,N-1).join(", "),D+=", and ".concat(A[N-1]," arguments");break}return"".concat(D," must be specified")},TypeError),Eo.codes=e,Eo}var Ss,il;function Oh(){if(il)return Ss;il=1;function a(oe,J){var te=Object.keys(oe);if(Object.getOwnPropertySymbols){var pe=Object.getOwnPropertySymbols(oe);J&&(pe=pe.filter(function(O){return Object.getOwnPropertyDescriptor(oe,O).enumerable})),te.push.apply(te,pe)}return te}function d(oe){for(var J=1;J<arguments.length;J++){var te=arguments[J]!=null?arguments[J]:{};J%2?a(Object(te),!0).forEach(function(pe){m(oe,pe,te[pe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(oe,Object.getOwnPropertyDescriptors(te)):a(Object(te)).forEach(function(pe){Object.defineProperty(oe,pe,Object.getOwnPropertyDescriptor(te,pe))})}return oe}function m(oe,J,te){return J=r(J),J in oe?Object.defineProperty(oe,J,{value:te,enumerable:!0,configurable:!0,writable:!0}):oe[J]=te,oe}function y(oe,J){if(!(oe instanceof J))throw new TypeError("Cannot call a class as a function")}function h(oe,J){for(var te=0;te<J.length;te++){var pe=J[te];pe.enumerable=pe.enumerable||!1,pe.configurable=!0,"value"in pe&&(pe.writable=!0),Object.defineProperty(oe,r(pe.key),pe)}}function u(oe,J,te){return J&&h(oe.prototype,J),Object.defineProperty(oe,"prototype",{writable:!1}),oe}function r(oe){var J=o(oe,"string");return _(J)==="symbol"?J:String(J)}function o(oe,J){if(_(oe)!=="object"||oe===null)return oe;var te=oe[Symbol.toPrimitive];if(te!==void 0){var pe=te.call(oe,J);if(_(pe)!=="object")return pe;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(oe)}function t(oe,J){if(typeof J!="function"&&J!==null)throw new TypeError("Super expression must either be null or a function");oe.prototype=Object.create(J&&J.prototype,{constructor:{value:oe,writable:!0,configurable:!0}}),Object.defineProperty(oe,"prototype",{writable:!1}),J&&x(oe,J)}function i(oe){var J=p();return function(){var pe=g(oe),O;if(J){var T=g(this).constructor;O=Reflect.construct(pe,arguments,T)}else O=pe.apply(this,arguments);return e(this,O)}}function e(oe,J){if(J&&(_(J)==="object"||typeof J=="function"))return J;if(J!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s(oe)}function s(oe){if(oe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return oe}function l(oe){var J=typeof Map=="function"?new Map:void 0;return l=function(pe){if(pe===null||!v(pe))return pe;if(typeof pe!="function")throw new TypeError("Super expression must either be null or a function");if(typeof J<"u"){if(J.has(pe))return J.get(pe);J.set(pe,O)}function O(){return c(pe,arguments,g(this).constructor)}return O.prototype=Object.create(pe.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),x(O,pe)},l(oe)}function c(oe,J,te){return p()?c=Reflect.construct.bind():c=function(O,T,C){var F=[null];F.push.apply(F,T);var j=Function.bind.apply(O,F),b=new j;return C&&x(b,C.prototype),b},c.apply(null,arguments)}function p(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function v(oe){return Function.toString.call(oe).indexOf("[native code]")!==-1}function x(oe,J){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(pe,O){return pe.__proto__=O,pe},x(oe,J)}function g(oe){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(te){return te.__proto__||Object.getPrototypeOf(te)},g(oe)}function _(oe){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(J){return typeof J}:function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},_(oe)}var A=jn(),E=A.inspect,D=$0(),N=D.codes.ERR_INVALID_ARG_TYPE;function w(oe,J,te){return(te===void 0||te>oe.length)&&(te=oe.length),oe.substring(te-J.length,te)===J}function P(oe,J){if(J=Math.floor(J),oe.length==0||J==0)return"";var te=oe.length*J;for(J=Math.floor(Math.log(J)/Math.log(2));J;)oe+=oe,J--;return oe+=oe.substring(0,te-oe.length),oe}var $="",Y="",L="",q="",W={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},Z=10;function I(oe){var J=Object.keys(oe),te=Object.create(Object.getPrototypeOf(oe));return J.forEach(function(pe){te[pe]=oe[pe]}),Object.defineProperty(te,"message",{value:oe.message}),te}function Q(oe){return E(oe,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function re(oe,J,te){var pe="",O="",T=0,C="",F=!1,j=Q(oe),b=j.split(`
|
|
57
|
+
`),R=Q(J).split(`
|
|
58
|
+
`),k=0,V="";if(te==="strictEqual"&&_(oe)==="object"&&_(J)==="object"&&oe!==null&&J!==null&&(te="strictEqualObject"),b.length===1&&R.length===1&&b[0]!==R[0]){var G=b[0].length+R[0].length;if(G<=Z){if((_(oe)!=="object"||oe===null)&&(_(J)!=="object"||J===null)&&(oe!==0||J!==0))return"".concat(W[te],`
|
|
59
|
+
|
|
60
|
+
`)+"".concat(b[0]," !== ").concat(R[0],`
|
|
61
|
+
`)}else if(te!=="strictEqualObject"){var U=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(G<U){for(;b[0][k]===R[0][k];)k++;k>2&&(V=`
|
|
62
|
+
`.concat(P(" ",k),"^"),k=0)}}}for(var z=b[b.length-1],K=R[R.length-1];z===K&&(k++<2?C=`
|
|
63
|
+
`.concat(z).concat(C):pe=z,b.pop(),R.pop(),!(b.length===0||R.length===0));)z=b[b.length-1],K=R[R.length-1];var ie=Math.max(b.length,R.length);if(ie===0){var le=j.split(`
|
|
64
|
+
`);if(le.length>30)for(le[26]="".concat($,"...").concat(q);le.length>27;)le.pop();return"".concat(W.notIdentical,`
|
|
65
|
+
|
|
66
|
+
`).concat(le.join(`
|
|
67
|
+
`),`
|
|
68
|
+
`)}k>3&&(C=`
|
|
69
|
+
`.concat($,"...").concat(q).concat(C),F=!0),pe!==""&&(C=`
|
|
70
|
+
`.concat(pe).concat(C),pe="");var ce=0,X=W[te]+`
|
|
71
|
+
`.concat(Y,"+ actual").concat(q," ").concat(L,"- expected").concat(q),ae=" ".concat($,"...").concat(q," Lines skipped");for(k=0;k<ie;k++){var de=k-T;if(b.length<k+1)de>1&&k>2&&(de>4?(O+=`
|
|
72
|
+
`.concat($,"...").concat(q),F=!0):de>3&&(O+=`
|
|
73
|
+
`.concat(R[k-2]),ce++),O+=`
|
|
74
|
+
`.concat(R[k-1]),ce++),T=k,pe+=`
|
|
75
|
+
`.concat(L,"-").concat(q," ").concat(R[k]),ce++;else if(R.length<k+1)de>1&&k>2&&(de>4?(O+=`
|
|
76
|
+
`.concat($,"...").concat(q),F=!0):de>3&&(O+=`
|
|
77
|
+
`.concat(b[k-2]),ce++),O+=`
|
|
78
|
+
`.concat(b[k-1]),ce++),T=k,O+=`
|
|
79
|
+
`.concat(Y,"+").concat(q," ").concat(b[k]),ce++;else{var ve=R[k],Se=b[k],H=Se!==ve&&(!w(Se,",")||Se.slice(0,-1)!==ve);H&&w(ve,",")&&ve.slice(0,-1)===Se&&(H=!1,Se+=","),H?(de>1&&k>2&&(de>4?(O+=`
|
|
80
|
+
`.concat($,"...").concat(q),F=!0):de>3&&(O+=`
|
|
81
|
+
`.concat(b[k-2]),ce++),O+=`
|
|
82
|
+
`.concat(b[k-1]),ce++),T=k,O+=`
|
|
83
|
+
`.concat(Y,"+").concat(q," ").concat(Se),pe+=`
|
|
84
|
+
`.concat(L,"-").concat(q," ").concat(ve),ce+=2):(O+=pe,pe="",(de===1||k===0)&&(O+=`
|
|
85
|
+
`.concat(Se),ce++))}if(ce>20&&k<ie-2)return"".concat(X).concat(ae,`
|
|
86
|
+
`).concat(O,`
|
|
87
|
+
`).concat($,"...").concat(q).concat(pe,`
|
|
88
|
+
`)+"".concat($,"...").concat(q)}return"".concat(X).concat(F?ae:"",`
|
|
89
|
+
`).concat(O).concat(pe).concat(C).concat(V)}var fe=function(oe,J){t(pe,oe);var te=i(pe);function pe(O){var T;if(y(this,pe),_(O)!=="object"||O===null)throw new N("options","Object",O);var C=O.message,F=O.operator,j=O.stackStartFn,b=O.actual,R=O.expected,k=Error.stackTraceLimit;if(Error.stackTraceLimit=0,C!=null)T=te.call(this,String(C));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?($="\x1B[34m",Y="\x1B[32m",q="\x1B[39m",L="\x1B[31m"):($="",Y="",q="",L="")),_(b)==="object"&&b!==null&&_(R)==="object"&&R!==null&&"stack"in b&&b instanceof Error&&"stack"in R&&R instanceof Error&&(b=I(b),R=I(R)),F==="deepStrictEqual"||F==="strictEqual")T=te.call(this,re(b,R,F));else if(F==="notDeepStrictEqual"||F==="notStrictEqual"){var V=W[F],G=Q(b).split(`
|
|
90
|
+
`);if(F==="notStrictEqual"&&_(b)==="object"&&b!==null&&(V=W.notStrictEqualObject),G.length>30)for(G[26]="".concat($,"...").concat(q);G.length>27;)G.pop();G.length===1?T=te.call(this,"".concat(V," ").concat(G[0])):T=te.call(this,"".concat(V,`
|
|
91
|
+
|
|
92
|
+
`).concat(G.join(`
|
|
93
|
+
`),`
|
|
94
|
+
`))}else{var U=Q(b),z="",K=W[F];F==="notDeepEqual"||F==="notEqual"?(U="".concat(W[F],`
|
|
95
|
+
|
|
96
|
+
`).concat(U),U.length>1024&&(U="".concat(U.slice(0,1021),"..."))):(z="".concat(Q(R)),U.length>512&&(U="".concat(U.slice(0,509),"...")),z.length>512&&(z="".concat(z.slice(0,509),"...")),F==="deepEqual"||F==="equal"?U="".concat(K,`
|
|
97
|
+
|
|
98
|
+
`).concat(U,`
|
|
99
|
+
|
|
100
|
+
should equal
|
|
101
|
+
|
|
102
|
+
`):z=" ".concat(F," ").concat(z)),T=te.call(this,"".concat(U).concat(z))}return Error.stackTraceLimit=k,T.generatedMessage=!C,Object.defineProperty(s(T),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),T.code="ERR_ASSERTION",T.actual=b,T.expected=R,T.operator=F,Error.captureStackTrace&&Error.captureStackTrace(s(T),j),T.stack,T.name="AssertionError",e(T)}return u(pe,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:J,value:function(T,C){return E(this,d(d({},C),{},{customInspect:!1,depth:0}))}}]),pe}(l(Error),E.custom);return Ss=fe,Ss}var Ts,ol;function U0(){if(ol)return Ts;ol=1;var a=Object.prototype.toString;return Ts=function(m){var y=a.call(m),h=y==="[object Arguments]";return h||(h=y!=="[object Array]"&&m!==null&&typeof m=="object"&&typeof m.length=="number"&&m.length>=0&&a.call(m.callee)==="[object Function]"),h},Ts}var bs,sl;function Dh(){if(sl)return bs;sl=1;var a;if(!Object.keys){var d=Object.prototype.hasOwnProperty,m=Object.prototype.toString,y=U0(),h=Object.prototype.propertyIsEnumerable,u=!h.call({toString:null},"toString"),r=h.call(function(){},"prototype"),o=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],t=function(l){var c=l.constructor;return c&&c.prototype===l},i={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},e=function(){if(typeof window>"u")return!1;for(var l in window)try{if(!i["$"+l]&&d.call(window,l)&&window[l]!==null&&typeof window[l]=="object")try{t(window[l])}catch{return!0}}catch{return!0}return!1}(),s=function(l){if(typeof window>"u"||!e)return t(l);try{return t(l)}catch{return!1}};a=function(c){var p=c!==null&&typeof c=="object",v=m.call(c)==="[object Function]",x=y(c),g=p&&m.call(c)==="[object String]",_=[];if(!p&&!v&&!x)throw new TypeError("Object.keys called on a non-object");var A=r&&v;if(g&&c.length>0&&!d.call(c,0))for(var E=0;E<c.length;++E)_.push(String(E));if(x&&c.length>0)for(var D=0;D<c.length;++D)_.push(String(D));else for(var N in c)!(A&&N==="prototype")&&d.call(c,N)&&_.push(String(N));if(u)for(var w=s(c),P=0;P<o.length;++P)!(w&&o[P]==="constructor")&&d.call(c,o[P])&&_.push(o[P]);return _}}return bs=a,bs}var Ns,al;function V0(){if(al)return Ns;al=1;var a=Array.prototype.slice,d=U0(),m=Object.keys,y=m?function(r){return m(r)}:Dh(),h=Object.keys;return y.shim=function(){if(Object.keys){var r=function(){var o=Object.keys(arguments);return o&&o.length===arguments.length}(1,2);r||(Object.keys=function(t){return d(t)?h(a.call(t)):h(t)})}else Object.keys=y;return Object.keys||y},Ns=y,Ns}var Cs,ul;function wh(){if(ul)return Cs;ul=1;var a=V0(),d=ca()(),m=Un(),y=fa(),h=m("Array.prototype.push"),u=m("Object.prototype.propertyIsEnumerable"),r=d?y.getOwnPropertySymbols:null;return Cs=function(t,i){if(t==null)throw new TypeError("target must be an object");var e=y(t);if(arguments.length===1)return e;for(var s=1;s<arguments.length;++s){var l=y(arguments[s]),c=a(l),p=d&&(y.getOwnPropertySymbols||r);if(p)for(var v=p(l),x=0;x<v.length;++x){var g=v[x];u(l,g)&&h(c,g)}for(var _=0;_<c.length;++_){var A=c[_];if(u(l,A)){var E=l[A];e[A]=E}}}return e},Cs}var Os,ll;function Rh(){if(ll)return Os;ll=1;var a=wh(),d=function(){if(!Object.assign)return!1;for(var y="abcdefghijklmnopqrst",h=y.split(""),u={},r=0;r<h.length;++r)u[h[r]]=h[r];var o=Object.assign({},u),t="";for(var i in o)t+=i;return y!==t},m=function(){if(!Object.assign||!Object.preventExtensions)return!1;var y=Object.preventExtensions({1:2});try{Object.assign(y,"xy")}catch{return y[1]==="y"}return!1};return Os=function(){return!Object.assign||d()||m()?a:Object.assign},Os}var Ds,cl;function z0(){if(cl)return Ds;cl=1;var a=function(d){return d!==d};return Ds=function(m,y){return m===0&&y===0?1/m===1/y:!!(m===y||a(m)&&a(y))},Ds}var ws,fl;function ma(){if(fl)return ws;fl=1;var a=z0();return ws=function(){return typeof Object.is=="function"?Object.is:a},ws}var Rs,pl;function Ph(){if(pl)return Rs;pl=1;var a=ya(),d=Ji(),m=d(a("String.prototype.indexOf"));return Rs=function(h,u){var r=a(h,!!u);return typeof r=="function"&&m(h,".prototype.")>-1?d(r):r},Rs}var Ps,hl;function Zi(){if(hl)return Ps;hl=1;var a=V0(),d=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",m=Object.prototype.toString,y=Array.prototype.concat,h=M0(),u=function(i){return typeof i=="function"&&m.call(i)==="[object Function]"},r=q0()(),o=function(i,e,s,l){if(e in i){if(l===!0){if(i[e]===s)return}else if(!u(l)||!l())return}r?h(i,e,s,!0):h(i,e,s)},t=function(i,e){var s=arguments.length>2?arguments[2]:{},l=a(e);d&&(l=y.call(l,Object.getOwnPropertySymbols(e)));for(var c=0;c<l.length;c+=1)o(i,l[c],e[l[c]],s[l[c]])};return t.supportsDescriptors=!!r,Ps=t,Ps}var Fs,xl;function Fh(){if(xl)return Fs;xl=1;var a=ma(),d=Zi();return Fs=function(){var y=a();return d(Object,{is:y},{is:function(){return Object.is!==y}}),y},Fs}var Is,dl;function Ih(){if(dl)return Is;dl=1;var a=Zi(),d=Ji(),m=z0(),y=ma(),h=Fh(),u=d(y(),Object);return a(u,{getPolyfill:y,implementation:m,shim:h}),Is=u,Is}var Ls,yl;function H0(){return yl||(yl=1,Ls=function(d){return d!==d}),Ls}var Bs,ml;function G0(){if(ml)return Bs;ml=1;var a=H0();return Bs=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:a},Bs}var ks,gl;function Lh(){if(gl)return ks;gl=1;var a=Zi(),d=G0();return ks=function(){var y=d();return a(Number,{isNaN:y},{isNaN:function(){return Number.isNaN!==y}}),y},ks}var Ms,_l;function Bh(){if(_l)return Ms;_l=1;var a=Ji(),d=Zi(),m=H0(),y=G0(),h=Lh(),u=a(y(),Number);return d(u,{getPolyfill:y,implementation:m,shim:h}),Ms=u,Ms}var qs,Al;function kh(){if(Al)return qs;Al=1;function a(H,ee){return u(H)||h(H,ee)||m(H,ee)||d()}function d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
103
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(H,ee){if(H){if(typeof H=="string")return y(H,ee);var he=Object.prototype.toString.call(H).slice(8,-1);if(he==="Object"&&H.constructor&&(he=H.constructor.name),he==="Map"||he==="Set")return Array.from(H);if(he==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(he))return y(H,ee)}}function y(H,ee){(ee==null||ee>H.length)&&(ee=H.length);for(var he=0,ge=new Array(ee);he<ee;he++)ge[he]=H[he];return ge}function h(H,ee){var he=H==null?null:typeof Symbol<"u"&&H[Symbol.iterator]||H["@@iterator"];if(he!=null){var ge,me,Te,Ee,we=[],Oe=!0,Pe=!1;try{if(Te=(he=he.call(H)).next,ee!==0)for(;!(Oe=(ge=Te.call(he)).done)&&(we.push(ge.value),we.length!==ee);Oe=!0);}catch(B){Pe=!0,me=B}finally{try{if(!Oe&&he.return!=null&&(Ee=he.return(),Object(Ee)!==Ee))return}finally{if(Pe)throw me}}return we}}function u(H){if(Array.isArray(H))return H}function r(H){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ee){return typeof ee}:function(ee){return ee&&typeof Symbol=="function"&&ee.constructor===Symbol&&ee!==Symbol.prototype?"symbol":typeof ee},r(H)}var o=/a/g.flags!==void 0,t=function(ee){var he=[];return ee.forEach(function(ge){return he.push(ge)}),he},i=function(ee){var he=[];return ee.forEach(function(ge,me){return he.push([me,ge])}),he},e=Object.is?Object.is:Ih(),s=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},l=Number.isNaN?Number.isNaN:Bh();function c(H){return H.call.bind(H)}var p=c(Object.prototype.hasOwnProperty),v=c(Object.prototype.propertyIsEnumerable),x=c(Object.prototype.toString),g=jn().types,_=g.isAnyArrayBuffer,A=g.isArrayBufferView,E=g.isDate,D=g.isMap,N=g.isRegExp,w=g.isSet,P=g.isNativeError,$=g.isBoxedPrimitive,Y=g.isNumberObject,L=g.isStringObject,q=g.isBooleanObject,W=g.isBigIntObject,Z=g.isSymbolObject,I=g.isFloat32Array,Q=g.isFloat64Array;function re(H){if(H.length===0||H.length>10)return!0;for(var ee=0;ee<H.length;ee++){var he=H.charCodeAt(ee);if(he<48||he>57)return!0}return H.length===10&&H>=Math.pow(2,32)}function fe(H){return Object.keys(H).filter(re).concat(s(H).filter(Object.prototype.propertyIsEnumerable.bind(H)))}/*!
|
|
104
|
+
* The buffer module from node.js, for the browser.
|
|
105
|
+
*
|
|
106
|
+
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
107
|
+
* @license MIT
|
|
108
|
+
*/function oe(H,ee){if(H===ee)return 0;for(var he=H.length,ge=ee.length,me=0,Te=Math.min(he,ge);me<Te;++me)if(H[me]!==ee[me]){he=H[me],ge=ee[me];break}return he<ge?-1:ge<he?1:0}var J=!0,te=!1,pe=0,O=1,T=2,C=3;function F(H,ee){return o?H.source===ee.source&&H.flags===ee.flags:RegExp.prototype.toString.call(H)===RegExp.prototype.toString.call(ee)}function j(H,ee){if(H.byteLength!==ee.byteLength)return!1;for(var he=0;he<H.byteLength;he++)if(H[he]!==ee[he])return!1;return!0}function b(H,ee){return H.byteLength!==ee.byteLength?!1:oe(new Uint8Array(H.buffer,H.byteOffset,H.byteLength),new Uint8Array(ee.buffer,ee.byteOffset,ee.byteLength))===0}function R(H,ee){return H.byteLength===ee.byteLength&&oe(new Uint8Array(H),new Uint8Array(ee))===0}function k(H,ee){return Y(H)?Y(ee)&&e(Number.prototype.valueOf.call(H),Number.prototype.valueOf.call(ee)):L(H)?L(ee)&&String.prototype.valueOf.call(H)===String.prototype.valueOf.call(ee):q(H)?q(ee)&&Boolean.prototype.valueOf.call(H)===Boolean.prototype.valueOf.call(ee):W(H)?W(ee)&&BigInt.prototype.valueOf.call(H)===BigInt.prototype.valueOf.call(ee):Z(ee)&&Symbol.prototype.valueOf.call(H)===Symbol.prototype.valueOf.call(ee)}function V(H,ee,he,ge){if(H===ee)return H!==0?!0:he?e(H,ee):!0;if(he){if(r(H)!=="object")return typeof H=="number"&&l(H)&&l(ee);if(r(ee)!=="object"||H===null||ee===null||Object.getPrototypeOf(H)!==Object.getPrototypeOf(ee))return!1}else{if(H===null||r(H)!=="object")return ee===null||r(ee)!=="object"?H==ee:!1;if(ee===null||r(ee)!=="object")return!1}var me=x(H),Te=x(ee);if(me!==Te)return!1;if(Array.isArray(H)){if(H.length!==ee.length)return!1;var Ee=fe(H),we=fe(ee);return Ee.length!==we.length?!1:U(H,ee,he,ge,O,Ee)}if(me==="[object Object]"&&(!D(H)&&D(ee)||!w(H)&&w(ee)))return!1;if(E(H)){if(!E(ee)||Date.prototype.getTime.call(H)!==Date.prototype.getTime.call(ee))return!1}else if(N(H)){if(!N(ee)||!F(H,ee))return!1}else if(P(H)||H instanceof Error){if(H.message!==ee.message||H.name!==ee.name)return!1}else if(A(H)){if(!he&&(I(H)||Q(H))){if(!j(H,ee))return!1}else if(!b(H,ee))return!1;var Oe=fe(H),Pe=fe(ee);return Oe.length!==Pe.length?!1:U(H,ee,he,ge,pe,Oe)}else{if(w(H))return!w(ee)||H.size!==ee.size?!1:U(H,ee,he,ge,T);if(D(H))return!D(ee)||H.size!==ee.size?!1:U(H,ee,he,ge,C);if(_(H)){if(!R(H,ee))return!1}else if($(H)&&!k(H,ee))return!1}return U(H,ee,he,ge,pe)}function G(H,ee){return ee.filter(function(he){return v(H,he)})}function U(H,ee,he,ge,me,Te){if(arguments.length===5){Te=Object.keys(H);var Ee=Object.keys(ee);if(Te.length!==Ee.length)return!1}for(var we=0;we<Te.length;we++)if(!p(ee,Te[we]))return!1;if(he&&arguments.length===5){var Oe=s(H);if(Oe.length!==0){var Pe=0;for(we=0;we<Oe.length;we++){var B=Oe[we];if(v(H,B)){if(!v(ee,B))return!1;Te.push(B),Pe++}else if(v(ee,B))return!1}var f=s(ee);if(Oe.length!==f.length&&G(ee,f).length!==Pe)return!1}else{var S=s(ee);if(S.length!==0&&G(ee,S).length!==0)return!1}}if(Te.length===0&&(me===pe||me===O&&H.length===0||H.size===0))return!0;if(ge===void 0)ge={val1:new Map,val2:new Map,position:0};else{var M=ge.val1.get(H);if(M!==void 0){var se=ge.val2.get(ee);if(se!==void 0)return M===se}ge.position++}ge.val1.set(H,ge.position),ge.val2.set(ee,ge.position);var xe=de(H,ee,he,Te,ge,me);return ge.val1.delete(H),ge.val2.delete(ee),xe}function z(H,ee,he,ge){for(var me=t(H),Te=0;Te<me.length;Te++){var Ee=me[Te];if(V(ee,Ee,he,ge))return H.delete(Ee),!0}return!1}function K(H){switch(r(H)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":H=+H;case"number":if(l(H))return!1}return!0}function ie(H,ee,he){var ge=K(he);return ge??(ee.has(ge)&&!H.has(ge))}function le(H,ee,he,ge,me){var Te=K(he);if(Te!=null)return Te;var Ee=ee.get(Te);return Ee===void 0&&!ee.has(Te)||!V(ge,Ee,!1,me)?!1:!H.has(Te)&&V(ge,Ee,!1,me)}function ce(H,ee,he,ge){for(var me=null,Te=t(H),Ee=0;Ee<Te.length;Ee++){var we=Te[Ee];if(r(we)==="object"&&we!==null)me===null&&(me=new Set),me.add(we);else if(!ee.has(we)){if(he||!ie(H,ee,we))return!1;me===null&&(me=new Set),me.add(we)}}if(me!==null){for(var Oe=t(ee),Pe=0;Pe<Oe.length;Pe++){var B=Oe[Pe];if(r(B)==="object"&&B!==null){if(!z(me,B,he,ge))return!1}else if(!he&&!H.has(B)&&!z(me,B,he,ge))return!1}return me.size===0}return!0}function X(H,ee,he,ge,me,Te){for(var Ee=t(H),we=0;we<Ee.length;we++){var Oe=Ee[we];if(V(he,Oe,me,Te)&&V(ge,ee.get(Oe),me,Te))return H.delete(Oe),!0}return!1}function ae(H,ee,he,ge){for(var me=null,Te=i(H),Ee=0;Ee<Te.length;Ee++){var we=a(Te[Ee],2),Oe=we[0],Pe=we[1];if(r(Oe)==="object"&&Oe!==null)me===null&&(me=new Set),me.add(Oe);else{var B=ee.get(Oe);if(B===void 0&&!ee.has(Oe)||!V(Pe,B,he,ge)){if(he||!le(H,ee,Oe,Pe,ge))return!1;me===null&&(me=new Set),me.add(Oe)}}}if(me!==null){for(var f=i(ee),S=0;S<f.length;S++){var M=a(f[S],2),se=M[0],xe=M[1];if(r(se)==="object"&&se!==null){if(!X(me,H,se,xe,he,ge))return!1}else if(!he&&(!H.has(se)||!V(H.get(se),xe,!1,ge))&&!X(me,H,se,xe,!1,ge))return!1}return me.size===0}return!0}function de(H,ee,he,ge,me,Te){var Ee=0;if(Te===T){if(!ce(H,ee,he,me))return!1}else if(Te===C){if(!ae(H,ee,he,me))return!1}else if(Te===O)for(;Ee<H.length;Ee++)if(p(H,Ee)){if(!p(ee,Ee)||!V(H[Ee],ee[Ee],he,me))return!1}else{if(p(ee,Ee))return!1;for(var we=Object.keys(H);Ee<we.length;Ee++){var Oe=we[Ee];if(!p(ee,Oe)||!V(H[Oe],ee[Oe],he,me))return!1}return we.length===Object.keys(ee).length}for(Ee=0;Ee<ge.length;Ee++){var Pe=ge[Ee];if(!V(H[Pe],ee[Pe],he,me))return!1}return!0}function ve(H,ee){return V(H,ee,te)}function Se(H,ee){return V(H,ee,J)}return qs={isDeepEqual:ve,isDeepStrictEqual:Se},qs}var vl;function qe(){if(vl)return vo.exports;vl=1;function a(T){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},a(T)}function d(T,C,F){return Object.defineProperty(T,"prototype",{writable:!1}),T}function m(T,C){if(!(T instanceof C))throw new TypeError("Cannot call a class as a function")}var y=$0(),h=y.codes,u=h.ERR_AMBIGUOUS_ARGUMENT,r=h.ERR_INVALID_ARG_TYPE,o=h.ERR_INVALID_ARG_VALUE,t=h.ERR_INVALID_RETURN_VALUE,i=h.ERR_MISSING_ARGS,e=Oh(),s=jn(),l=s.inspect,c=jn().types,p=c.isPromise,v=c.isRegExp,x=Rh()(),g=ma()(),_=Ph()("RegExp.prototype.test"),A,E;function D(){var T=kh();A=T.isDeepEqual,E=T.isDeepStrictEqual}var N=!1,w=vo.exports=q,P={};function $(T){throw T.message instanceof Error?T.message:new e(T)}function Y(T,C,F,j,b){var R=arguments.length,k;if(R===0)k="Failed";else if(R===1)F=T,T=void 0;else{if(N===!1){N=!0;var V=process.emitWarning?process.emitWarning:console.warn.bind(console);V("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}R===2&&(j="!=")}if(F instanceof Error)throw F;var G={actual:T,expected:C,operator:j===void 0?"fail":j,stackStartFn:b||Y};F!==void 0&&(G.message=F);var U=new e(G);throw k&&(U.message=k,U.generatedMessage=!0),U}w.fail=Y,w.AssertionError=e;function L(T,C,F,j){if(!F){var b=!1;if(C===0)b=!0,j="No value argument passed to `assert.ok()`";else if(j instanceof Error)throw j;var R=new e({actual:F,expected:!0,message:j,operator:"==",stackStartFn:T});throw R.generatedMessage=b,R}}function q(){for(var T=arguments.length,C=new Array(T),F=0;F<T;F++)C[F]=arguments[F];L.apply(void 0,[q,C.length].concat(C))}w.ok=q,w.equal=function T(C,F,j){if(arguments.length<2)throw new i("actual","expected");C!=F&&$({actual:C,expected:F,message:j,operator:"==",stackStartFn:T})},w.notEqual=function T(C,F,j){if(arguments.length<2)throw new i("actual","expected");C==F&&$({actual:C,expected:F,message:j,operator:"!=",stackStartFn:T})},w.deepEqual=function T(C,F,j){if(arguments.length<2)throw new i("actual","expected");A===void 0&&D(),A(C,F)||$({actual:C,expected:F,message:j,operator:"deepEqual",stackStartFn:T})},w.notDeepEqual=function T(C,F,j){if(arguments.length<2)throw new i("actual","expected");A===void 0&&D(),A(C,F)&&$({actual:C,expected:F,message:j,operator:"notDeepEqual",stackStartFn:T})},w.deepStrictEqual=function T(C,F,j){if(arguments.length<2)throw new i("actual","expected");A===void 0&&D(),E(C,F)||$({actual:C,expected:F,message:j,operator:"deepStrictEqual",stackStartFn:T})},w.notDeepStrictEqual=W;function W(T,C,F){if(arguments.length<2)throw new i("actual","expected");A===void 0&&D(),E(T,C)&&$({actual:T,expected:C,message:F,operator:"notDeepStrictEqual",stackStartFn:W})}w.strictEqual=function T(C,F,j){if(arguments.length<2)throw new i("actual","expected");g(C,F)||$({actual:C,expected:F,message:j,operator:"strictEqual",stackStartFn:T})},w.notStrictEqual=function T(C,F,j){if(arguments.length<2)throw new i("actual","expected");g(C,F)&&$({actual:C,expected:F,message:j,operator:"notStrictEqual",stackStartFn:T})};var Z=d(function T(C,F,j){var b=this;m(this,T),F.forEach(function(R){R in C&&(j!==void 0&&typeof j[R]=="string"&&v(C[R])&&_(C[R],j[R])?b[R]=j[R]:b[R]=C[R])})});function I(T,C,F,j,b,R){if(!(F in T)||!E(T[F],C[F])){if(!j){var k=new Z(T,b),V=new Z(C,b,T),G=new e({actual:k,expected:V,operator:"deepStrictEqual",stackStartFn:R});throw G.actual=T,G.expected=C,G.operator=R.name,G}$({actual:T,expected:C,message:j,operator:R.name,stackStartFn:R})}}function Q(T,C,F,j){if(typeof C!="function"){if(v(C))return _(C,T);if(arguments.length===2)throw new r("expected",["Function","RegExp"],C);if(a(T)!=="object"||T===null){var b=new e({actual:T,expected:C,message:F,operator:"deepStrictEqual",stackStartFn:j});throw b.operator=j.name,b}var R=Object.keys(C);if(C instanceof Error)R.push("name","message");else if(R.length===0)throw new o("error",C,"may not be an empty object");return A===void 0&&D(),R.forEach(function(k){typeof T[k]=="string"&&v(C[k])&&_(C[k],T[k])||I(T,C,k,F,R,j)}),!0}return C.prototype!==void 0&&T instanceof C?!0:Error.isPrototypeOf(C)?!1:C.call({},T)===!0}function re(T){if(typeof T!="function")throw new r("fn","Function",T);try{T()}catch(C){return C}return P}function fe(T){return p(T)||T!==null&&a(T)==="object"&&typeof T.then=="function"&&typeof T.catch=="function"}function oe(T){return Promise.resolve().then(function(){var C;if(typeof T=="function"){if(C=T(),!fe(C))throw new t("instance of Promise","promiseFn",C)}else if(fe(T))C=T;else throw new r("promiseFn",["Function","Promise"],T);return Promise.resolve().then(function(){return C}).then(function(){return P}).catch(function(F){return F})})}function J(T,C,F,j){if(typeof F=="string"){if(arguments.length===4)throw new r("error",["Object","Error","Function","RegExp"],F);if(a(C)==="object"&&C!==null){if(C.message===F)throw new u("error/message",'The error message "'.concat(C.message,'" is identical to the message.'))}else if(C===F)throw new u("error/message",'The error "'.concat(C,'" is identical to the message.'));j=F,F=void 0}else if(F!=null&&a(F)!=="object"&&typeof F!="function")throw new r("error",["Object","Error","Function","RegExp"],F);if(C===P){var b="";F&&F.name&&(b+=" (".concat(F.name,")")),b+=j?": ".concat(j):".";var R=T.name==="rejects"?"rejection":"exception";$({actual:void 0,expected:F,operator:T.name,message:"Missing expected ".concat(R).concat(b),stackStartFn:T})}if(F&&!Q(C,F,j,T))throw C}function te(T,C,F,j){if(C!==P){if(typeof F=="string"&&(j=F,F=void 0),!F||Q(C,F)){var b=j?": ".concat(j):".",R=T.name==="doesNotReject"?"rejection":"exception";$({actual:C,expected:F,operator:T.name,message:"Got unwanted ".concat(R).concat(b,`
|
|
109
|
+
`)+'Actual message: "'.concat(C&&C.message,'"'),stackStartFn:T})}throw C}}w.throws=function T(C){for(var F=arguments.length,j=new Array(F>1?F-1:0),b=1;b<F;b++)j[b-1]=arguments[b];J.apply(void 0,[T,re(C)].concat(j))},w.rejects=function T(C){for(var F=arguments.length,j=new Array(F>1?F-1:0),b=1;b<F;b++)j[b-1]=arguments[b];return oe(C).then(function(R){return J.apply(void 0,[T,R].concat(j))})},w.doesNotThrow=function T(C){for(var F=arguments.length,j=new Array(F>1?F-1:0),b=1;b<F;b++)j[b-1]=arguments[b];te.apply(void 0,[T,re(C)].concat(j))},w.doesNotReject=function T(C){for(var F=arguments.length,j=new Array(F>1?F-1:0),b=1;b<F;b++)j[b-1]=arguments[b];return oe(C).then(function(R){return te.apply(void 0,[T,R].concat(j))})},w.ifError=function T(C){if(C!=null){var F="ifError got unwanted exception: ";a(C)==="object"&&typeof C.message=="string"?C.message.length===0&&C.constructor?F+=C.constructor.name:F+=C.message:F+=l(C);var j=new e({actual:C,expected:null,operator:"ifError",message:F,stackStartFn:T}),b=C.stack;if(typeof b=="string"){var R=b.split(`
|
|
110
|
+
`);R.shift();for(var k=j.stack.split(`
|
|
111
|
+
`),V=0;V<R.length;V++){var G=k.indexOf(R[V]);if(G!==-1){k=k.slice(0,G);break}}j.stack="".concat(k.join(`
|
|
112
|
+
`),`
|
|
113
|
+
`).concat(R.join(`
|
|
114
|
+
`))}throw j}};function pe(T,C,F,j,b){if(!v(C))throw new r("regexp","RegExp",C);var R=b==="match";if(typeof T!="string"||_(C,T)!==R){if(F instanceof Error)throw F;var k=!F;F=F||(typeof T!="string"?'The "string" argument must be of type string. Received type '+"".concat(a(T)," (").concat(l(T),")"):(R?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(l(C),`. Input:
|
|
115
|
+
|
|
116
|
+
`).concat(l(T),`
|
|
117
|
+
`));var V=new e({actual:T,expected:C,message:F,operator:b,stackStartFn:j});throw V.generatedMessage=k,V}}w.match=function T(C,F,j){pe(C,F,j,T,"match")},w.doesNotMatch=function T(C,F,j){pe(C,F,j,T,"doesNotMatch")};function O(){for(var T=arguments.length,C=new Array(T),F=0;F<T;F++)C[F]=arguments[F];L.apply(void 0,[O,C.length].concat(C))}return w.strict=x(O,w,{equal:w.strictEqual,deepEqual:w.deepStrictEqual,notEqual:w.notStrictEqual,notDeepEqual:w.notDeepStrictEqual}),w.strict.strict=w.strict,vo.exports}var Pr={},js={},El;function Ie(){return El||(El=1,function(a){/*!
|
|
118
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
119
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
120
|
+
*/Object.defineProperty(a,"__esModule",{value:!0}),a.MurmurHash=void 0,function(d){function y(t=0){return t}d.initialize=y;function h(t,i){i==null?i=0:typeof i=="string"?i=o(i):typeof i=="object"&&(i=i.hashCode());let x=i;return x=Math.imul(x,3432918353),x=x<<15|x>>>17,x=Math.imul(x,461845907),t=t^x,t=t<<13|t>>>19,t=Math.imul(t,5)+3864292196,t&4294967295}d.update=h;function u(t,i){return t=t^i*4,t=t^t>>>16,t=Math.imul(t,2246822507),t=t^t>>>13,t=Math.imul(t,3266489909),t=t^t>>>16,t}d.finish=u;function r(t,i=0){let e=y(i),s=0;for(let l of t)e=h(e,l),s++;return e=u(e,s),e}d.hashCode=r;function o(t){let i=t.length;if(i===0)return 0;let e=0;for(let s=0;s<i;s++){let l=t.charCodeAt(s);e=(e<<5>>>0)-e+l,e|=0}return e}}(a.MurmurHash||(a.MurmurHash={}))}(js)),js}var Fr={},Sl;function it(){if(Sl)return Fr;Sl=1;/*!
|
|
121
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
122
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
123
|
+
*/var a=Fr&&Fr.__decorate||function(y,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(y,h,u,r);else for(var e=y.length-1;e>=0;e--)(i=y[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.ObjectEqualityComparator=void 0;const d=ue();let m=class{hashCode(h){return h==null?0:h.hashCode()}equals(h,u){return h==null?u==null:h.equals(u)}};return m.INSTANCE=new m,a([d.Override],m.prototype,"hashCode",null),a([d.Override],m.prototype,"equals",null),Fr.ObjectEqualityComparator=m,Fr}var Tl;function Mh(){if(Tl)return Pr;Tl=1;/*!
|
|
124
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
125
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
126
|
+
*/var a=Pr&&Pr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.DefaultEqualityComparator=void 0;const d=ue(),m=Ie(),y=it();let h=class{hashCode(r){return r==null?0:typeof r=="string"||typeof r=="number"?m.MurmurHash.hashCode([r]):y.ObjectEqualityComparator.INSTANCE.hashCode(r)}equals(r,o){return r==null?o==null:typeof r=="string"||typeof r=="number"?r===o:y.ObjectEqualityComparator.INSTANCE.equals(r,o)}};return h.INSTANCE=new h,a([d.Override],h.prototype,"hashCode",null),a([d.Override],h.prototype,"equals",null),Pr.DefaultEqualityComparator=h,Pr}var bl;function mr(){if(bl)return ct;bl=1;/*!
|
|
127
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
128
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
129
|
+
*/var a=ct&&ct.__decorate||function(i,e,s,l){var c=arguments.length,p=c<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,s):l,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,e,s,l);else for(var x=i.length-1;x>=0;x--)(v=i[x])&&(p=(c<3?v(p):c>3?v(e,s,p):v(e,s))||p);return c>3&&p&&Object.defineProperty(e,s,p),p},d=ct&&ct.__param||function(i,e){return function(s,l){e(s,l,i)}};Object.defineProperty(ct,"__esModule",{value:!0}),ct.Array2DHashSet=void 0;const m=qe(),y=Mh(),h=ue(),u=Ie(),r=16,o=.75;let t=class Vi{constructor(e,s=r){if(this.n=0,this.threshold=Math.floor(r*o),e instanceof Vi){this.comparator=e.comparator,this.buckets=e.buckets.slice(0);for(let l=0;l<this.buckets.length;l++){let c=this.buckets[l];c&&(this.buckets[l]=c.slice(0))}this.n=e.n,this.threshold=e.threshold}else this.comparator=e||y.DefaultEqualityComparator.INSTANCE,this.buckets=this.createBuckets(s)}getOrAdd(e){return this.n>this.threshold&&this.expand(),this.getOrAddImpl(e)}getOrAddImpl(e){let s=this.getBucket(e),l=this.buckets[s];if(!l)return l=[e],this.buckets[s]=l,this.n++,e;for(let c of l)if(this.comparator.equals(c,e))return c;return l.push(e),this.n++,e}get(e){if(e==null)return e;let s=this.getBucket(e),l=this.buckets[s];if(l){for(let c of l)if(this.comparator.equals(c,e))return c}}getBucket(e){return this.comparator.hashCode(e)&this.buckets.length-1}hashCode(){let e=u.MurmurHash.initialize();for(let s of this.buckets)if(s!=null)for(let l of s){if(l==null)break;e=u.MurmurHash.update(e,this.comparator.hashCode(l))}return e=u.MurmurHash.finish(e,this.size),e}equals(e){return e===this?!0:!(e instanceof Vi)||e.size!==this.size?!1:this.containsAll(e)}expand(){let e=this.buckets,s=this.buckets.length*2,l=this.createBuckets(s);this.buckets=l,this.threshold=Math.floor(s*o);let c=this.size;for(let p of e)if(p)for(let v of p){let x=this.getBucket(v),g=this.buckets[x];g||(g=[],this.buckets[x]=g),g.push(v)}m(this.n===c)}add(e){return this.getOrAdd(e)===e}get size(){return this.n}get isEmpty(){return this.n===0}contains(e){return this.containsFast(this.asElementType(e))}containsFast(e){return e==null?!1:this.get(e)!=null}*[Symbol.iterator](){yield*this.toArray()}toArray(){const e=new Array(this.size);let s=0;for(let l of this.buckets)if(l!=null)for(let c of l){if(c==null)break;e[s++]=c}return e}containsAll(e){if(e instanceof Vi){let s=e;for(let l of s.buckets)if(l!=null)for(let c of l){if(c==null)break;if(!this.containsFast(this.asElementType(c)))return!1}}else for(let s of e)if(!this.containsFast(this.asElementType(s)))return!1;return!0}addAll(e){let s=!1;for(let l of e)this.getOrAdd(l)!==l&&(s=!0);return s}clear(){this.buckets=this.createBuckets(r),this.n=0,this.threshold=Math.floor(r*o)}toString(){if(this.size===0)return"{}";let e="{",s=!0;for(let l of this.buckets)if(l!=null)for(let c of l){if(c==null)break;s?s=!1:e+=", ",e+=c.toString()}return e+="}",e}toTableString(){let e="";for(let s of this.buckets){if(s==null){e+=`null
|
|
130
|
+
`;continue}e+="[";let l=!0;for(let c of s)l?l=!1:e+=" ",c==null?e+="_":e+=c.toString();e+=`]
|
|
131
|
+
`}return e}asElementType(e){return e}createBuckets(e){return new Array(e)}};return a([h.NotNull],t.prototype,"comparator",void 0),a([h.Override],t.prototype,"hashCode",null),a([h.Override],t.prototype,"equals",null),a([h.Override],t.prototype,"add",null),a([h.Override],t.prototype,"size",null),a([h.Override],t.prototype,"isEmpty",null),a([h.Override],t.prototype,"contains",null),a([d(0,h.Nullable)],t.prototype,"containsFast",null),a([h.Override],t.prototype,Symbol.iterator,null),a([h.Override],t.prototype,"toArray",null),a([h.Override],t.prototype,"containsAll",null),a([h.Override],t.prototype,"addAll",null),a([h.Override],t.prototype,"clear",null),a([h.Override],t.prototype,"toString",null),a([h.SuppressWarnings("unchecked")],t.prototype,"asElementType",null),a([h.SuppressWarnings("unchecked")],t.prototype,"createBuckets",null),ct.Array2DHashSet=t,ct}var Nl;function Vn(){if(Nl)return ei;Nl=1;/*!
|
|
132
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
133
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
134
|
+
*/Object.defineProperty(ei,"__esModule",{value:!0}),ei.Array2DHashMap=void 0;const a=mr();class d{constructor(h){this.keyComparator=h}hashCode(h){return this.keyComparator.hashCode(h.key)}equals(h,u){return this.keyComparator.equals(h.key,u.key)}}let m=class ta{constructor(h){h instanceof ta?this.backingStore=new a.Array2DHashSet(h.backingStore):this.backingStore=new a.Array2DHashSet(new d(h))}clear(){this.backingStore.clear()}containsKey(h){return this.backingStore.contains({key:h})}get(h){let u=this.backingStore.get({key:h});if(u)return u.value}get isEmpty(){return this.backingStore.isEmpty}put(h,u){let r=this.backingStore.get({key:h,value:u}),o;return r?(o=r.value,r.value=u):this.backingStore.add({key:h,value:u}),o}putIfAbsent(h,u){let r=this.backingStore.get({key:h,value:u}),o;return r?o=r.value:this.backingStore.add({key:h,value:u}),o}get size(){return this.backingStore.size}hashCode(){return this.backingStore.hashCode()}equals(h){return h instanceof ta?this.backingStore.equals(h.backingStore):!1}};return ei.Array2DHashMap=m,ei}var ft={},Ir={},Lr={},Cl;function eo(){if(Cl)return Lr;Cl=1;/*!
|
|
135
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
136
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
137
|
+
*/var a=Lr&&Lr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.ArrayEqualityComparator=void 0;const d=ue(),m=Ie(),y=it();let h=class{hashCode(r){return r==null?0:m.MurmurHash.hashCode(r,0)}equals(r,o){if(r==null)return o==null;if(o==null||r.length!==o.length)return!1;for(let t=0;t<r.length;t++)if(!y.ObjectEqualityComparator.INSTANCE.equals(r[t],o[t]))return!1;return!0}};return h.INSTANCE=new h,a([d.Override],h.prototype,"hashCode",null),a([d.Override],h.prototype,"equals",null),Lr.ArrayEqualityComparator=h,Lr}var pt={},ti={},ri={},Ol;function pr(){return Ol||(Ol=1,function(a){/*!
|
|
138
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
139
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
140
|
+
*/var d=ri&&ri.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(a,"__esModule",{value:!0}),a.ATNState=void 0;const m=ue();let y=class ra{constructor(){this.stateNumber=ra.INVALID_STATE_NUMBER,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.optimizedTransitions=this.transitions}getStateNumber(){return this.stateNumber}get nonStopStateNumber(){return this.getStateNumber()}hashCode(){return this.stateNumber}equals(u){return u instanceof ra?this.stateNumber===u.stateNumber:!1}get isNonGreedyExitState(){return!1}toString(){return String(this.stateNumber)}getTransitions(){return this.transitions.slice(0)}get numberOfTransitions(){return this.transitions.length}addTransition(u,r){if(this.transitions.length===0)this.epsilonOnlyTransitions=u.isEpsilon;else if(this.epsilonOnlyTransitions!==u.isEpsilon)throw this.epsilonOnlyTransitions=!1,new Error("ATN state "+this.stateNumber+" has both epsilon and non-epsilon transitions.");this.transitions.splice(r!==void 0?r:this.transitions.length,0,u)}transition(u){return this.transitions[u]}setTransition(u,r){this.transitions[u]=r}removeTransition(u){return this.transitions.splice(u,1)[0]}get onlyHasEpsilonTransitions(){return this.epsilonOnlyTransitions}setRuleIndex(u){this.ruleIndex=u}get isOptimized(){return this.optimizedTransitions!==this.transitions}get numberOfOptimizedTransitions(){return this.optimizedTransitions.length}getOptimizedTransition(u){return this.optimizedTransitions[u]}addOptimizedTransition(u){this.isOptimized||(this.optimizedTransitions=new Array),this.optimizedTransitions.push(u)}setOptimizedTransition(u,r){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions[u]=r}removeOptimizedTransition(u){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions.splice(u,1)}};d([m.Override],y.prototype,"hashCode",null),d([m.Override],y.prototype,"equals",null),d([m.Override],y.prototype,"toString",null),a.ATNState=y,function(h){h.INVALID_STATE_NUMBER=-1}(y=a.ATNState||(a.ATNState={}))}(ri)),ri}var Dl;function In(){if(Dl)return ti;Dl=1;/*!
|
|
141
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
142
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
143
|
+
*/Object.defineProperty(ti,"__esModule",{value:!0}),ti.DecisionState=void 0;const a=pr();let d=class extends a.ATNState{constructor(){super(...arguments),this.decision=-1,this.nonGreedy=!1,this.sll=!1}};return ti.DecisionState=d,ti}var Br={},$s={},wl;function ga(){return wl||(wl=1,function(a){/*!
|
|
144
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
145
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
146
|
+
*/Object.defineProperty(a,"__esModule",{value:!0}),a.Arrays=void 0,function(d){function m(u,r,o,t){return y(u,o!==void 0?o:0,t!==void 0?t:u.length,r)}d.binarySearch=m;function y(u,r,o,t){let i=r,e=o-1;for(;i<=e;){let s=i+e>>>1,l=u[s];if(l<t)i=s+1;else if(l>t)e=s-1;else return s}return-(i+1)}function h(u){let r="[",o=!0;for(let t of u)o?o=!1:r+=", ",t===null?r+="null":t===void 0?r+="undefined":r+=t;return r+="]",r}d.toString=h}(a.Arrays||(a.Arrays={}))}($s)),$s}var ni={},Rl;function _a(){return Rl||(Rl=1,function(a){/*!
|
|
147
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
148
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
149
|
+
*/var d=ni&&ni.__decorate||function(t,i,e,s){var l=arguments.length,c=l<3?i:s===null?s=Object.getOwnPropertyDescriptor(i,e):s,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,i,e,s);else for(var v=t.length-1;v>=0;v--)(p=t[v])&&(c=(l<3?p(c):l>3?p(i,e,c):p(i,e))||c);return l>3&&c&&Object.defineProperty(i,e,c),c};Object.defineProperty(a,"__esModule",{value:!0}),a.PredictionContextCache=void 0;const m=Vn(),y=ue(),h=it(),u=rt(),r=qe();let o=class na{constructor(i=!0){this.contexts=new m.Array2DHashMap(h.ObjectEqualityComparator.INSTANCE),this.childContexts=new m.Array2DHashMap(h.ObjectEqualityComparator.INSTANCE),this.joinContexts=new m.Array2DHashMap(h.ObjectEqualityComparator.INSTANCE),this.enableCache=i}getAsCached(i){if(!this.enableCache)return i;let e=this.contexts.get(i);return e||(e=i,this.contexts.put(i,i)),e}getChild(i,e){if(!this.enableCache)return i.getChild(e);let s=new na.PredictionContextAndInt(i,e),l=this.childContexts.get(s);return l||(l=i.getChild(e),l=this.getAsCached(l),this.childContexts.put(s,l)),l}join(i,e){if(!this.enableCache)return u.PredictionContext.join(i,e,this);let s=new na.IdentityCommutativePredictionContextOperands(i,e),l=this.joinContexts.get(s);return l||(l=u.PredictionContext.join(i,e,this),l=this.getAsCached(l),this.joinContexts.put(s,l),l)}};a.PredictionContextCache=o,o.UNCACHED=new o(!1),function(t){class i{constructor(l,c){this.obj=l,this.value=c}equals(l){if(l instanceof i){if(l===this)return!0}else return!1;let c=l;return this.value===c.value&&(this.obj===c.obj||this.obj!=null&&this.obj.equals(c.obj))}hashCode(){let l=5;return l=7*l+(this.obj!=null?this.obj.hashCode():0),l=7*l+this.value,l}}d([y.Override],i.prototype,"equals",null),d([y.Override],i.prototype,"hashCode",null),t.PredictionContextAndInt=i;class e{constructor(l,c){r(l!=null),r(c!=null),this._x=l,this._y=c}get x(){return this._x}get y(){return this._y}equals(l){if(l instanceof e){if(this===l)return!0}else return!1;let c=l;return this._x===c._x&&this._y===c._y||this._x===c._y&&this._y===c._x}hashCode(){return this._x.hashCode()^this._y.hashCode()}}d([y.Override],e.prototype,"equals",null),d([y.Override],e.prototype,"hashCode",null),t.IdentityCommutativePredictionContextOperands=e}(o=a.PredictionContextCache||(a.PredictionContextCache={}))}(ni)),ni}var Pl;function rt(){return Pl||(Pl=1,function(a){/*!
|
|
150
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
151
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
152
|
+
*/var d=Br&&Br.__decorate||function(v,x,g,_){var A=arguments.length,E=A<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,g):_,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,x,g,_);else for(var N=v.length-1;N>=0;N--)(D=v[N])&&(E=(A<3?D(E):A>3?D(x,g,E):D(x,g))||E);return A>3&&E&&Object.defineProperty(x,g,E),E},m=Br&&Br.__param||function(v,x){return function(g,_){x(g,_,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SingletonPredictionContext=a.PredictionContext=void 0;const y=Vn(),h=mr(),u=ga(),r=Ie(),o=ue(),t=_a(),i=qe(),e=1;let s=class Me{constructor(x){this.cachedHashCode=x}static calculateEmptyHashCode(){let x=r.MurmurHash.initialize(e);return x=r.MurmurHash.finish(x,0),x}static calculateSingleHashCode(x,g){let _=r.MurmurHash.initialize(e);return _=r.MurmurHash.update(_,x),_=r.MurmurHash.update(_,g),_=r.MurmurHash.finish(_,2),_}static calculateHashCode(x,g){let _=r.MurmurHash.initialize(e);for(let A of x)_=r.MurmurHash.update(_,A);for(let A of g)_=r.MurmurHash.update(_,A);return _=r.MurmurHash.finish(_,2*x.length),_}static fromRuleContext(x,g,_=!0){if(g.isEmpty)return _?Me.EMPTY_FULL:Me.EMPTY_LOCAL;let A;g._parent?A=Me.fromRuleContext(x,g._parent,_):A=_?Me.EMPTY_FULL:Me.EMPTY_LOCAL;let D=x.states[g.invokingState].transition(0);return A.getChild(D.followState.stateNumber)}static addEmptyContext(x){return x.addEmptyContext()}static removeEmptyContext(x){return x.removeEmptyContext()}static join(x,g,_=t.PredictionContextCache.UNCACHED){if(x===g)return x;if(x.isEmpty)return Me.isEmptyLocal(x)?x:Me.addEmptyContext(g);if(g.isEmpty)return Me.isEmptyLocal(g)?g:Me.addEmptyContext(x);let A=x.size,E=g.size;if(A===1&&E===1&&x.getReturnState(0)===g.getReturnState(0)){let q=_.join(x.getParent(0),g.getParent(0));return q===x.getParent(0)?x:q===g.getParent(0)?g:q.getChild(x.getReturnState(0))}let D=0,N=new Array(A+E),w=new Array(N.length),P=0,$=0,Y=!0,L=!0;for(;P<A&&$<E;)x.getReturnState(P)===g.getReturnState($)?(N[D]=_.join(x.getParent(P),g.getParent($)),w[D]=x.getReturnState(P),Y=Y&&N[D]===x.getParent(P),L=L&&N[D]===g.getParent($),P++,$++):x.getReturnState(P)<g.getReturnState($)?(N[D]=x.getParent(P),w[D]=x.getReturnState(P),L=!1,P++):(i(g.getReturnState($)<x.getReturnState(P)),N[D]=g.getParent($),w[D]=g.getReturnState($),Y=!1,$++),D++;for(;P<A;)N[D]=x.getParent(P),w[D]=x.getReturnState(P),P++,L=!1,D++;for(;$<E;)N[D]=g.getParent($),w[D]=g.getReturnState($),$++,Y=!1,D++;return Y?x:L?g:(D<N.length&&(N=N.slice(0,D),w=w.slice(0,D)),N.length===0?Me.EMPTY_FULL:N.length===1?new p(N[0],w[0]):new c(N,w))}static isEmptyLocal(x){return x===Me.EMPTY_LOCAL}static getCachedContext(x,g,_){if(x.isEmpty)return x;let A=_.get(x);if(A)return A;if(A=g.get(x),A)return _.put(x,A),A;let E=!1,D=new Array(x.size);for(let w=0;w<D.length;w++){let P=Me.getCachedContext(x.getParent(w),g,_);if(E||P!==x.getParent(w)){if(!E){D=new Array(x.size);for(let $=0;$<x.size;$++)D[$]=x.getParent($);E=!0}D[w]=P}}if(!E)return A=g.putIfAbsent(x,x),_.put(x,A??x),x;let N;if(D.length===1)N=new p(D[0],x.getReturnState(0));else{let w=new Array(x.size);for(let P=0;P<x.size;P++)w[P]=x.getReturnState(P);N=new c(D,w,x.hashCode())}return A=g.putIfAbsent(N,N),_.put(N,A||N),_.put(x,A||N),N}appendSingleContext(x,g){return this.appendContext(Me.EMPTY_FULL.getChild(x),g)}getChild(x){return new p(this,x)}hashCode(){return this.cachedHashCode}toStrings(x,g,_=Me.EMPTY_FULL){let A=[];e:for(let E=0;;E++){let D=0,N=!0,w=this,P=g,$="";for($+="[";!w.isEmpty&&w!==_;){let Y=0;if(w.size>0){let L=1;for(;1<<L>>>0<w.size;)L++;let q=(1<<L>>>0)-1;if(Y=E>>D&q,N=N&&Y>=w.size-1,Y>=w.size)continue e;D+=L}if(x){$.length>1&&($+=" ");let q=x.atn.states[P],W=x.ruleNames[q.ruleIndex];$+=W}else w.getReturnState(Y)!==Me.EMPTY_FULL_STATE_KEY&&(w.isEmpty||($.length>1&&($+=" "),$+=w.getReturnState(Y)));P=w.getReturnState(Y),w=w.getParent(Y)}if($+="]",A.push($),N)break}return A}};d([o.Override],s.prototype,"hashCode",null),d([m(0,o.NotNull),m(1,o.NotNull),m(2,o.NotNull)],s,"join",null),d([m(0,o.NotNull),m(1,o.NotNull),m(2,o.NotNull)],s,"getCachedContext",null),a.PredictionContext=s;class l extends s{constructor(x){super(s.calculateEmptyHashCode()),this.fullContext=x}get isFullContext(){return this.fullContext}addEmptyContext(){return this}removeEmptyContext(){throw new Error("Cannot remove the empty context from itself.")}getParent(x){throw new Error("index out of bounds")}getReturnState(x){throw new Error("index out of bounds")}findReturnState(x){return-1}get size(){return 0}appendSingleContext(x,g){return g.getChild(this,x)}appendContext(x,g){return x}get isEmpty(){return!0}get hasEmpty(){return!0}equals(x){return this===x}toStrings(x,g,_){return["[]"]}}d([o.Override],l.prototype,"addEmptyContext",null),d([o.Override],l.prototype,"removeEmptyContext",null),d([o.Override],l.prototype,"getParent",null),d([o.Override],l.prototype,"getReturnState",null),d([o.Override],l.prototype,"findReturnState",null),d([o.Override],l.prototype,"size",null),d([o.Override],l.prototype,"appendSingleContext",null),d([o.Override],l.prototype,"appendContext",null),d([o.Override],l.prototype,"isEmpty",null),d([o.Override],l.prototype,"hasEmpty",null),d([o.Override],l.prototype,"equals",null),d([o.Override],l.prototype,"toStrings",null);let c=class Fn extends s{constructor(x,g,_){super(_||s.calculateHashCode(x,g)),i(x.length===g.length),i(g.length>1||g[0]!==s.EMPTY_FULL_STATE_KEY,"Should be using PredictionContext.EMPTY instead."),this.parents=x,this.returnStates=g}getParent(x){return this.parents[x]}getReturnState(x){return this.returnStates[x]}findReturnState(x){return u.Arrays.binarySearch(this.returnStates,x)}get size(){return this.returnStates.length}get isEmpty(){return!1}get hasEmpty(){return this.returnStates[this.returnStates.length-1]===s.EMPTY_FULL_STATE_KEY}addEmptyContext(){if(this.hasEmpty)return this;let x=this.parents.slice(0),g=this.returnStates.slice(0);return x.push(s.EMPTY_FULL),g.push(s.EMPTY_FULL_STATE_KEY),new Fn(x,g)}removeEmptyContext(){if(!this.hasEmpty)return this;if(this.returnStates.length===2)return new p(this.parents[0],this.returnStates[0]);{let x=this.parents.slice(0,this.parents.length-1),g=this.returnStates.slice(0,this.returnStates.length-1);return new Fn(x,g)}}appendContext(x,g){return Fn.appendContextImpl(this,x,new s.IdentityHashMap)}static appendContextImpl(x,g,_){if(g.isEmpty){if(s.isEmptyLocal(g)){if(x.hasEmpty)return s.EMPTY_LOCAL;throw new Error("what to do here?")}return x}if(g.size!==1)throw new Error("Appending a tree suffix is not yet supported.");let A=_.get(x);if(!A){if(x.isEmpty)A=g;else{let E=x.size;x.hasEmpty&&E--;let D=new Array(E),N=new Array(E);for(let w=0;w<E;w++)N[w]=x.getReturnState(w);for(let w=0;w<E;w++)D[w]=Fn.appendContextImpl(x.getParent(w),g,_);D.length===1?A=new p(D[0],N[0]):(i(D.length>1),A=new Fn(D,N)),x.hasEmpty&&(A=s.join(A,g))}_.put(x,A)}return A}equals(x){if(this===x)return!0;if(!(x instanceof Fn)||this.hashCode()!==x.hashCode())return!1;let g=x;return this.equalsImpl(g,new h.Array2DHashSet)}equalsImpl(x,g){let _=[],A=[];for(_.push(this),A.push(x);;){let E=_.pop(),D=A.pop();if(!E||!D)break;let N=new t.PredictionContextCache.IdentityCommutativePredictionContextOperands(E,D);if(!g.add(N))continue;let w=N.x.size;if(w===0){if(!N.x.equals(N.y))return!1;continue}let P=N.y.size;if(w!==P)return!1;for(let $=0;$<w;$++){if(N.x.getReturnState($)!==N.y.getReturnState($))return!1;let Y=N.x.getParent($),L=N.y.getParent($);if(Y.hashCode()!==L.hashCode())return!1;Y!==L&&(_.push(Y),A.push(L))}}return!0}};d([o.NotNull],c.prototype,"parents",void 0),d([o.NotNull],c.prototype,"returnStates",void 0),d([o.Override],c.prototype,"getParent",null),d([o.Override],c.prototype,"getReturnState",null),d([o.Override],c.prototype,"findReturnState",null),d([o.Override],c.prototype,"size",null),d([o.Override],c.prototype,"isEmpty",null),d([o.Override],c.prototype,"hasEmpty",null),d([o.Override],c.prototype,"addEmptyContext",null),d([o.Override],c.prototype,"removeEmptyContext",null),d([o.Override],c.prototype,"appendContext",null),d([o.Override],c.prototype,"equals",null),c=d([m(0,o.NotNull)],c);let p=class Y0 extends s{constructor(x,g){super(s.calculateSingleHashCode(x,g)),this.parent=x,this.returnState=g}getParent(x){return this.parent}getReturnState(x){return this.returnState}findReturnState(x){return this.returnState===x?0:-1}get size(){return 1}get isEmpty(){return!1}get hasEmpty(){return!1}appendContext(x,g){return g.getChild(this.parent.appendContext(x,g),this.returnState)}addEmptyContext(){let x=[this.parent,s.EMPTY_FULL],g=[this.returnState,s.EMPTY_FULL_STATE_KEY];return new c(x,g)}removeEmptyContext(){return this}equals(x){if(x===this)return!0;if(!(x instanceof Y0))return!1;let g=x;return this.hashCode()!==g.hashCode()?!1:this.returnState===g.returnState&&this.parent.equals(g.parent)}};d([o.NotNull],p.prototype,"parent",void 0),d([o.Override],p.prototype,"getParent",null),d([o.Override],p.prototype,"getReturnState",null),d([o.Override],p.prototype,"findReturnState",null),d([o.Override],p.prototype,"size",null),d([o.Override],p.prototype,"isEmpty",null),d([o.Override],p.prototype,"hasEmpty",null),d([o.Override],p.prototype,"appendContext",null),d([o.Override],p.prototype,"addEmptyContext",null),d([o.Override],p.prototype,"removeEmptyContext",null),d([o.Override],p.prototype,"equals",null),p=d([m(0,o.NotNull)],p),a.SingletonPredictionContext=p,function(v){v.EMPTY_LOCAL=new l(!1),v.EMPTY_FULL=new l(!0),v.EMPTY_LOCAL_STATE_KEY=-2147483648,v.EMPTY_FULL_STATE_KEY=(1<<31>>>0)-1;class x extends y.Array2DHashMap{constructor(){super(g.INSTANCE)}}v.IdentityHashMap=x;class g{IdentityEqualityComparator(){}hashCode(A){return A.hashCode()}equals(A,E){return A===E}}g.INSTANCE=new g,d([o.Override],g.prototype,"hashCode",null),d([o.Override],g.prototype,"equals",null),v.IdentityEqualityComparator=g}(s=a.PredictionContext||(a.PredictionContext={}))}(Br)),Br}var kr={},$e={},Fl;function ot(){if(Fl)return $e;Fl=1;/*!
|
|
153
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
154
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
155
|
+
*/Object.defineProperty($e,"__esModule",{value:!0}),$e.toCharArray=$e.toMap=$e.equals=$e.join=$e.escapeWhitespace=void 0;function a(u,r){return r?u.replace(/ /,"·"):u.replace(/\t/,"\\t").replace(/\n/,"\\n").replace(/\r/,"\\r")}$e.escapeWhitespace=a;function d(u,r){let o="",t=!0;for(let i of u)t?t=!1:o+=r,o+=i;return o}$e.join=d;function m(u,r){return u===r?!0:u===void 0||r===void 0?!1:u.equals(r)}$e.equals=m;function y(u){let r=new Map;for(let o=0;o<u.length;o++)r.set(u[o],o);return r}$e.toMap=y;function h(u){if(typeof u=="string"){let r=new Uint16Array(u.length);for(let o=0;o<u.length;o++)r[o]=u.charCodeAt(o);return r}else return u.toCharArray()}return $e.toCharArray=h,$e}var Il;function zn(){return Il||(Il=1,function(a){/*!
|
|
156
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
157
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
158
|
+
*/var d=kr&&kr.__decorate||function(l,c,p,v){var x=arguments.length,g=x<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(l,c,p,v);else for(var A=l.length-1;A>=0;A--)(_=l[A])&&(g=(x<3?_(g):x>3?_(c,p,g):_(c,p))||g);return x>3&&g&&Object.defineProperty(c,p,g),g},m=kr&&kr.__param||function(l,c){return function(p,v){c(p,v,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SemanticContext=void 0;const y=mr(),h=eo(),u=Ie(),r=ue(),o=it(),t=ot();function i(l){let c;for(let p of l){if(c===void 0){c=p;continue}c.compareTo(p)<0&&(c=p)}return c}function e(l){let c;for(let p of l){if(c===void 0){c=p;continue}c.compareTo(p)>0&&(c=p)}return c}let s=class He{static get NONE(){return He._NONE===void 0&&(He._NONE=new He.Predicate),He._NONE}evalPrecedence(c,p){return this}static and(c,p){if(!c||c===He.NONE)return p;if(p===He.NONE)return c;let v=new He.AND(c,p);return v.opnds.length===1?v.opnds[0]:v}static or(c,p){if(!c)return p;if(c===He.NONE||p===He.NONE)return He.NONE;let v=new He.OR(c,p);return v.opnds.length===1?v.opnds[0]:v}};a.SemanticContext=s,function(l){function v(D){let N=[];for(let w=0;w<D.length;w++){let P=D[w];P instanceof l.PrecedencePredicate&&(N.push(P),D.splice(w,1),w--)}return N}class x extends l{constructor(N=-1,w=-1,P=!1){super(),this.ruleIndex=N,this.predIndex=w,this.isCtxDependent=P}eval(N,w){let P=this.isCtxDependent?w:void 0;return N.sempred(P,this.ruleIndex,this.predIndex)}hashCode(){let N=u.MurmurHash.initialize();return N=u.MurmurHash.update(N,this.ruleIndex),N=u.MurmurHash.update(N,this.predIndex),N=u.MurmurHash.update(N,this.isCtxDependent?1:0),N=u.MurmurHash.finish(N,3),N}equals(N){return N instanceof x?this===N?!0:this.ruleIndex===N.ruleIndex&&this.predIndex===N.predIndex&&this.isCtxDependent===N.isCtxDependent:!1}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}d([r.Override],x.prototype,"eval",null),d([r.Override],x.prototype,"hashCode",null),d([r.Override],x.prototype,"equals",null),d([r.Override],x.prototype,"toString",null),l.Predicate=x;class g extends l{constructor(N){super(),this.precedence=N}eval(N,w){return N.precpred(w,this.precedence)}evalPrecedence(N,w){if(N.precpred(w,this.precedence))return l.NONE}compareTo(N){return this.precedence-N.precedence}hashCode(){let N=1;return N=31*N+this.precedence,N}equals(N){return N instanceof g?this===N?!0:this.precedence===N.precedence:!1}toString(){return"{"+this.precedence+">=prec}?"}}d([r.Override],g.prototype,"eval",null),d([r.Override],g.prototype,"evalPrecedence",null),d([r.Override],g.prototype,"compareTo",null),d([r.Override],g.prototype,"hashCode",null),d([r.Override],g.prototype,"equals",null),d([r.Override],g.prototype,"toString",null),l.PrecedencePredicate=g;class _ extends l{}l.Operator=_;let A=class zi extends _{constructor(N,w){super();let P=new y.Array2DHashSet(o.ObjectEqualityComparator.INSTANCE);N instanceof zi?P.addAll(N.opnds):P.add(N),w instanceof zi?P.addAll(w.opnds):P.add(w),this.opnds=P.toArray();let $=v(this.opnds),Y=e($);Y&&this.opnds.push(Y)}get operands(){return this.opnds}equals(N){return this===N?!0:N instanceof zi?h.ArrayEqualityComparator.INSTANCE.equals(this.opnds,N.opnds):!1}hashCode(){return u.MurmurHash.hashCode(this.opnds,40363613)}eval(N,w){for(let P of this.opnds)if(!P.eval(N,w))return!1;return!0}evalPrecedence(N,w){let P=!1,$=[];for(let L of this.opnds){let q=L.evalPrecedence(N,w);if(P=P||q!==L,q==null)return;q!==l.NONE&&$.push(q)}if(!P)return this;if($.length===0)return l.NONE;let Y=$[0];for(let L=1;L<$.length;L++)Y=l.and(Y,$[L]);return Y}toString(){return t.join(this.opnds,"&&")}};d([r.Override],A.prototype,"operands",null),d([r.Override],A.prototype,"equals",null),d([r.Override],A.prototype,"hashCode",null),d([r.Override],A.prototype,"eval",null),d([r.Override],A.prototype,"evalPrecedence",null),d([r.Override],A.prototype,"toString",null),A=d([m(0,r.NotNull),m(1,r.NotNull)],A),l.AND=A;let E=class Hi extends _{constructor(N,w){super();let P=new y.Array2DHashSet(o.ObjectEqualityComparator.INSTANCE);N instanceof Hi?P.addAll(N.opnds):P.add(N),w instanceof Hi?P.addAll(w.opnds):P.add(w),this.opnds=P.toArray();let $=v(this.opnds),Y=i($);Y&&this.opnds.push(Y)}get operands(){return this.opnds}equals(N){return this===N?!0:N instanceof Hi?h.ArrayEqualityComparator.INSTANCE.equals(this.opnds,N.opnds):!1}hashCode(){return u.MurmurHash.hashCode(this.opnds,486279973)}eval(N,w){for(let P of this.opnds)if(P.eval(N,w))return!0;return!1}evalPrecedence(N,w){let P=!1,$=[];for(let L of this.opnds){let q=L.evalPrecedence(N,w);if(P=P||q!==L,q===l.NONE)return l.NONE;q&&$.push(q)}if(!P)return this;if($.length===0)return;let Y=$[0];for(let L=1;L<$.length;L++)Y=l.or(Y,$[L]);return Y}toString(){return t.join(this.opnds,"||")}};d([r.Override],E.prototype,"operands",null),d([r.Override],E.prototype,"equals",null),d([r.Override],E.prototype,"hashCode",null),d([r.Override],E.prototype,"eval",null),d([r.Override],E.prototype,"evalPrecedence",null),d([r.Override],E.prototype,"toString",null),E=d([m(0,r.NotNull),m(1,r.NotNull)],E),l.OR=E}(s=a.SemanticContext||(a.SemanticContext={}))}(kr)),kr}var Ll;function to(){if(Ll)return pt;Ll=1;/*!
|
|
159
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
160
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
161
|
+
*/var a=pt&&pt.__decorate||function(v,x,g,_){var A=arguments.length,E=A<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,g):_,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,x,g,_);else for(var N=v.length-1;N>=0;N--)(D=v[N])&&(E=(A<3?D(E):A>3?D(x,g,E):D(x,g))||E);return A>3&&E&&Object.defineProperty(x,g,E),E},d=pt&&pt.__param||function(v,x){return function(g,_){x(g,_,v)}};Object.defineProperty(pt,"__esModule",{value:!0}),pt.ATNConfig=void 0;const m=Vn(),y=In(),h=Ie(),u=ue(),r=it(),o=rt(),t=zn(),i=qe(),e=2147483648;let s=class Ei{constructor(x,g,_){typeof g=="number"?(i((g&16777215)===g),this._state=x,this.altAndOuterContextDepth=g,this._context=_):(this._state=x,this.altAndOuterContextDepth=g.altAndOuterContextDepth,this._context=_)}static create(x,g,_,A=t.SemanticContext.NONE,E){return A!==t.SemanticContext.NONE?E!=null?new p(E,A,x,g,_,!1):new l(A,x,g,_):E!=null?new c(E,x,g,_,!1):new Ei(x,g,_)}get state(){return this._state}get alt(){return this.altAndOuterContextDepth&16777215}get context(){return this._context}set context(x){this._context=x}get reachesIntoOuterContext(){return this.outerContextDepth!==0}get outerContextDepth(){return this.altAndOuterContextDepth>>>24&127}set outerContextDepth(x){i(x>=0),x=Math.min(x,127),this.altAndOuterContextDepth=x<<24|(this.altAndOuterContextDepth&-2130706433)>>>0}get lexerActionExecutor(){}get semanticContext(){return t.SemanticContext.NONE}get hasPassedThroughNonGreedyDecision(){return!1}clone(){return this.transform(this.state,!1)}transform(x,g,_){return _==null?this.transformImpl(x,this._context,this.semanticContext,g,this.lexerActionExecutor):_ instanceof o.PredictionContext?this.transformImpl(x,_,this.semanticContext,g,this.lexerActionExecutor):_ instanceof t.SemanticContext?this.transformImpl(x,this._context,_,g,this.lexerActionExecutor):this.transformImpl(x,this._context,this.semanticContext,g,_)}transformImpl(x,g,_,A,E){let D=A&&Ei.checkNonGreedyDecision(this,x);return _!==t.SemanticContext.NONE?E!=null||D?new p(E,_,x,this,g,D):new l(_,x,this,g):E!=null||D?new c(E,x,this,g,D):new Ei(x,this,g)}static checkNonGreedyDecision(x,g){return x.hasPassedThroughNonGreedyDecision||g instanceof y.DecisionState&&g.nonGreedy}appendContext(x,g){if(typeof x=="number"){let _=this.context.appendSingleContext(x,g);return this.transform(this.state,!1,_)}else{let _=this.context.appendContext(x,g);return this.transform(this.state,!1,_)}}contains(x){if(this.state.stateNumber!==x.state.stateNumber||this.alt!==x.alt||!this.semanticContext.equals(x.semanticContext))return!1;let g=[],_=[];for(g.push(this.context),_.push(x.context);;){let A=g.pop(),E=_.pop();if(!A||!E)break;if(A===E)return!0;if(A.size<E.size)return!1;if(E.isEmpty)return A.hasEmpty;for(let D=0;D<E.size;D++){let N=A.findReturnState(E.getReturnState(D));if(N<0)return!1;g.push(A.getParent(N)),_.push(E.getParent(D))}}return!1}get isPrecedenceFilterSuppressed(){return(this.altAndOuterContextDepth&e)!==0}set isPrecedenceFilterSuppressed(x){x?this.altAndOuterContextDepth|=e:this.altAndOuterContextDepth&=2147483647}equals(x){return this===x?!0:x instanceof Ei?this.state.stateNumber===x.state.stateNumber&&this.alt===x.alt&&this.reachesIntoOuterContext===x.reachesIntoOuterContext&&this.context.equals(x.context)&&this.semanticContext.equals(x.semanticContext)&&this.isPrecedenceFilterSuppressed===x.isPrecedenceFilterSuppressed&&this.hasPassedThroughNonGreedyDecision===x.hasPassedThroughNonGreedyDecision&&r.ObjectEqualityComparator.INSTANCE.equals(this.lexerActionExecutor,x.lexerActionExecutor):!1}hashCode(){let x=h.MurmurHash.initialize(7);return x=h.MurmurHash.update(x,this.state.stateNumber),x=h.MurmurHash.update(x,this.alt),x=h.MurmurHash.update(x,this.reachesIntoOuterContext?1:0),x=h.MurmurHash.update(x,this.context),x=h.MurmurHash.update(x,this.semanticContext),x=h.MurmurHash.update(x,this.hasPassedThroughNonGreedyDecision?1:0),x=h.MurmurHash.update(x,this.lexerActionExecutor),x=h.MurmurHash.finish(x,7),x}toDotString(){let x="";x+=`digraph G {
|
|
162
|
+
`,x+=`rankdir=LR;
|
|
163
|
+
`;let g=new m.Array2DHashMap(o.PredictionContext.IdentityEqualityComparator.INSTANCE),_=[];function A(E){let D=g.size,N=g.putIfAbsent(E,D);return N??(_.push(E),D)}for(_.push(this.context),g.put(this.context,0);;){let E=_.pop();if(!E)break;for(let D=0;D<E.size;D++)x+=" s"+A(E),x+="->",x+="s"+A(E.getParent(D)),x+='[label="'+E.getReturnState(D)+`"];
|
|
164
|
+
`}return x+=`}
|
|
165
|
+
`,x.toString()}toString(x,g,_){_==null&&(_=g!=null),g==null&&(g=!0);let A="",E;_?E=this.context.toStrings(x,this.state.stateNumber):E=["?"];let D=!0;for(let N of E)D?D=!1:A+=", ",A+="(",A+=this.state,g&&(A+=",",A+=this.alt),this.context&&(A+=",",A+=N),this.semanticContext!==t.SemanticContext.NONE&&(A+=",",A+=this.semanticContext),this.reachesIntoOuterContext&&(A+=",up="+this.outerContextDepth),A+=")";return A.toString()}};a([u.NotNull],s.prototype,"_state",void 0),a([u.NotNull],s.prototype,"_context",void 0),a([u.NotNull],s.prototype,"state",null),a([u.NotNull,d(0,u.NotNull)],s.prototype,"context",null),a([u.NotNull],s.prototype,"semanticContext",null),a([u.Override],s.prototype,"clone",null),a([d(0,u.NotNull),d(2,u.NotNull)],s.prototype,"transformImpl",null),a([u.Override],s.prototype,"equals",null),a([u.Override],s.prototype,"hashCode",null),a([d(0,u.NotNull),d(3,u.NotNull)],s,"create",null),s=a([d(0,u.NotNull),d(2,u.NotNull)],s),pt.ATNConfig=s;let l=class extends s{constructor(x,g,_,A){typeof _=="number"?super(g,_,A):super(g,_,A),this._semanticContext=x}get semanticContext(){return this._semanticContext}};a([u.NotNull],l.prototype,"_semanticContext",void 0),a([u.Override],l.prototype,"semanticContext",null),l=a([d(1,u.NotNull),d(2,u.NotNull)],l);let c=class extends s{constructor(x,g,_,A,E){if(typeof _=="number")super(g,_,A);else if(super(g,_,A),_.semanticContext!==t.SemanticContext.NONE)throw new Error("Not supported");this._lexerActionExecutor=x,this.passedThroughNonGreedyDecision=E}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};a([u.Override],c.prototype,"lexerActionExecutor",null),a([u.Override],c.prototype,"hasPassedThroughNonGreedyDecision",null),c=a([d(1,u.NotNull),d(2,u.NotNull)],c);let p=class extends l{constructor(x,g,_,A,E,D){typeof A=="number"?super(g,_,A,E):super(g,_,A,E),this._lexerActionExecutor=x,this.passedThroughNonGreedyDecision=D}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};return a([u.Override],p.prototype,"lexerActionExecutor",null),a([u.Override],p.prototype,"hasPassedThroughNonGreedyDecision",null),p=a([d(1,u.NotNull),d(2,u.NotNull)],p),pt}var ii={},Bl;function gr(){if(Bl)return ii;Bl=1;/*!
|
|
166
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
167
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
168
|
+
*/Object.defineProperty(ii,"__esModule",{value:!0}),ii.BitSet=void 0;const a=jn(),d=Ie(),m=new Uint16Array(0);function y(s){return s>>>4}function h(s){return s*16}function u(s){let l=1;for(let c=0;c<16;c++){if((s&l)!==0)return c;l=l<<1>>>0}throw new RangeError("No specified bit found")}function r(s){let l=32768;for(let c=15;c>=0;c--){if((s&l)!==0)return c;l=l>>>1}throw new RangeError("No specified bit found")}function o(s,l){return s&=15,l&=15,s===l?1<<s>>>0:65535>>>15-l^65535>>>16-s}const t=new Uint8Array(65536);for(let s=0;s<16;s++){const l=1<<s>>>0;let c=0;for(;c<t.length;){c+=l;for(let p=0;p<l;p++)t[c]++,c++}}let i=class Si{constructor(l){if(!l)this.data=m;else if(typeof l=="number"){if(l<0)throw new RangeError("nbits cannot be negative");this.data=new Uint16Array(y(l-1)+1)}else if(l instanceof Si)this.data=l.data.slice(0);else{let c=-1;for(let p of l)c<p&&(c=p);this.data=new Uint16Array(y(c-1)+1);for(let p of l)this.set(p)}}and(l){const c=this.data,p=l.data,v=Math.min(c.length,p.length);let x=-1;for(let g=0;g<v;g++)(c[g]&=p[g])!==0&&(x=g);x===-1&&(this.data=m),x<c.length-1&&(this.data=c.slice(0,x+1))}andNot(l){const c=this.data,p=l.data,v=Math.min(c.length,p.length);let x=-1;for(let g=0;g<v;g++)(c[g]&=p[g]^65535)!==0&&(x=g);x===-1&&(this.data=m),x<c.length-1&&(this.data=c.slice(0,x+1))}cardinality(){if(this.isEmpty)return 0;const l=this.data,c=l.length;let p=0;for(let v=0;v<c;v++)p+=t[l[v]];return p}clear(l,c){l==null?this.data.fill(0):c==null?this.set(l,!1):this.set(l,c,!1)}flip(l,c){if(c==null&&(c=l),l<0||c<l)throw new RangeError;let p=y(l);const v=y(c);if(p===v)this.data[p]^=o(l,c);else{for(this.data[p++]^=o(l,15);p<v;)this.data[p++]^=65535;this.data[p++]^=o(0,c)}}get(l,c){if(c===void 0)return!!(this.data[y(l)]&o(l,l));{let p=new Si(c+1);for(let v=l;v<=c;v++)p.set(v,this.get(v));return p}}intersects(l){let c=Math.min(this.length(),l.length());if(c===0)return!1;let p=y(c-1);for(let v=0;v<=p;v++)if((this.data[v]&l.data[v])!==0)return!0;return!1}get isEmpty(){return this.length()===0}length(){return this.data.length?this.previousSetBit(h(this.data.length)-1)+1:0}nextClearBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const c=this.data,p=c.length;let v=y(l);if(v>p)return-1;let x=65535^o(l,15);if((c[v]|x)===65535){for(v++,x=0;v<p&&c[v]===65535;v++);if(v===p)return-1}return h(v)+u((c[v]|x)^65535)}nextSetBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const c=this.data,p=c.length;let v=y(l);if(v>p)return-1;let x=o(l,15);if((c[v]&x)===0){for(v++,x=65535;v<p&&c[v]===0;v++);if(v>=p)return-1}return h(v)+u(c[v]&x)}or(l){const c=this.data,p=l.data,v=Math.min(c.length,p.length),x=Math.max(c.length,p.length),g=c.length===x?c:new Uint16Array(x);let _=-1;for(let E=0;E<v;E++)(g[E]=c[E]|p[E])!==0&&(_=E);const A=c.length>p.length?c:p;for(let E=v;E<x;E++)(g[E]=A[E])!==0&&(_=E);_===-1?this.data=m:g.length===_+1?this.data=g:this.data=g.slice(0,_)}previousClearBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const c=this.data,p=c.length;let v=y(l);v>=p&&(v=p-1);let x=65535^o(0,l);if((c[v]|x)===65535){for(x=0,v--;v>=0&&c[v]===65535;v--);if(v<0)return-1}return h(v)+r((c[v]|x)^65535)}previousSetBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const c=this.data,p=c.length;let v=y(l);v>=p&&(v=p-1);let x=o(0,l);if((c[v]&x)===0){for(v--,x=65535;v>=0&&c[v]===0;v--);if(v<0)return-1}return h(v)+r(c[v]&x)}set(l,c,p){if(c===void 0?(c=l,p=!0):typeof c=="boolean"&&(p=c,c=l),p===void 0&&(p=!0),l<0||l>c)throw new RangeError;let v=y(l),x=y(c);if(p&&x>=this.data.length){let g=new Uint16Array(x+1);this.data.forEach((_,A)=>g[A]=_),this.data=g}else if(!p){if(v>=this.data.length)return;x>=this.data.length&&(x=this.data.length-1,c=this.data.length*16-1)}if(v===x)this._setBits(v,p,o(l,c));else{for(this._setBits(v++,p,o(l,15));v<x;)this.data[v++]=p?65535:0;this._setBits(v,p,o(0,c))}}_setBits(l,c,p){c?this.data[l]|=p:this.data[l]&=65535^p}get size(){return this.data.byteLength*8}hashCode(){return d.MurmurHash.hashCode(this.data,22)}equals(l){if(l===this)return!0;if(!(l instanceof Si))return!1;const c=this.length();if(c!==l.length())return!1;if(c===0)return!0;let p=y(c-1);for(let v=0;v<=p;v++)if(this.data[v]!==l.data[v])return!1;return!0}toString(){let l="{",c=!0;for(let p=this.nextSetBit(0);p>=0;p=this.nextSetBit(p+1))c?c=!1:l+=", ",l+=p;return l+="}",l}xor(l){const c=this.data,p=l.data,v=Math.min(c.length,p.length),x=Math.max(c.length,p.length),g=c.length===x?c:new Uint16Array(x);let _=-1;for(let E=0;E<v;E++)(g[E]=c[E]^p[E])!==0&&(_=E);const A=c.length>p.length?c:p;for(let E=v;E<x;E++)(g[E]=A[E])!==0&&(_=E);_===-1?this.data=m:g.length===_+1?this.data=g:this.data=g.slice(0,_+1)}clone(){return new Si(this)}[Symbol.iterator](){return new e(this.data)}[a.inspect.custom](){return"BitSet "+this.toString()}};ii.BitSet=i;class e{constructor(l){this.data=l,this.index=0,this.mask=65535}next(){for(;this.index<this.data.length;){const l=this.data[this.index]&this.mask;if(l!==0){const c=h(this.index)+u(l);return this.mask=o(c+1,15),{done:!1,value:c}}this.index++,this.mask=65535}return{done:!0,value:-1}}[Symbol.iterator](){return this}}return ii}var kl;function Pi(){if(kl)return Ir;kl=1;/*!
|
|
169
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
170
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
171
|
+
*/var a=Ir&&Ir.__decorate||function(g,_,A,E){var D=arguments.length,N=D<3?_:E===null?E=Object.getOwnPropertyDescriptor(_,A):E,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(g,_,A,E);else for(var P=g.length-1;P>=0;P--)(w=g[P])&&(N=(D<3?w(N):D>3?w(_,A,N):w(_,A))||N);return D>3&&N&&Object.defineProperty(_,A,N),N};Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.ATNConfigSet=void 0;const d=Vn(),m=mr(),y=eo(),h=st(),u=to(),r=gr(),o=ue(),t=it(),i=rt(),e=_a(),s=zn(),l=qe(),c=ot();class p{hashCode(_){return _.state^_.alt}equals(_,A){return _.state===A.state&&_.alt===A.alt}}p.INSTANCE=new p;function v(g){return g?new d.Array2DHashMap(g):new d.Array2DHashMap(p.INSTANCE)}let x=class ia{constructor(_,A){this._uniqueAlt=0,this._hasSemanticContext=!1,this._dipsIntoOuterContext=!1,this.outermostConfigSet=!1,this.cachedHashCode=-1,_?(A?(this.mergedConfigs=void 0,this.unmerged=void 0):_.isReadOnly?(this.mergedConfigs=v(),this.unmerged=[]):(this.mergedConfigs=v(_.mergedConfigs),this.unmerged=_.unmerged.slice(0)),this.configs=_.configs.slice(0),this._dipsIntoOuterContext=_._dipsIntoOuterContext,this._hasSemanticContext=_._hasSemanticContext,this.outermostConfigSet=_.outermostConfigSet,(A||!_.isReadOnly)&&(this._uniqueAlt=_._uniqueAlt,this._conflictInfo=_._conflictInfo)):(this.mergedConfigs=v(),this.unmerged=[],this.configs=[],this._uniqueAlt=h.ATN.INVALID_ALT_NUMBER)}getRepresentedAlternatives(){if(this._conflictInfo!=null)return this._conflictInfo.conflictedAlts.clone();let _=new r.BitSet;for(let A of this)_.set(A.alt);return _}get isReadOnly(){return this.mergedConfigs==null}get isOutermostConfigSet(){return this.outermostConfigSet}set isOutermostConfigSet(_){if(this.outermostConfigSet&&!_)throw new Error("IllegalStateException");l(!_||!this._dipsIntoOuterContext),this.outermostConfigSet=_}getStates(){let _=new m.Array2DHashSet(t.ObjectEqualityComparator.INSTANCE);for(let A of this.configs)_.add(A.state);return _}optimizeConfigs(_){if(this.configs.length!==0)for(let A of this.configs)A.context=_.atn.getCachedContext(A.context)}clone(_){let A=new ia(this,_);return!_&&this.isReadOnly&&A.addAll(this.configs),A}get size(){return this.configs.length}get isEmpty(){return this.configs.length===0}contains(_){if(!(_ instanceof u.ATNConfig))return!1;if(this.mergedConfigs&&this.unmerged){let A=_,E=this.getKey(A),D=this.mergedConfigs.get(E);if(D!=null&&this.canMerge(A,E,D))return D.contains(A);for(let N of this.unmerged)if(N.contains(_))return!0}else for(let A of this.configs)if(A.contains(_))return!0;return!1}*[Symbol.iterator](){yield*this.configs}toArray(){return this.configs}add(_,A){if(this.ensureWritable(),!this.mergedConfigs||!this.unmerged)throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation");l(!this.outermostConfigSet||!_.reachesIntoOuterContext),A==null&&(A=e.PredictionContextCache.UNCACHED);let E,D=this.getKey(_),N=this.mergedConfigs.get(D);if(E=N==null,N!=null&&this.canMerge(_,D,N)){N.outerContextDepth=Math.max(N.outerContextDepth,_.outerContextDepth),_.isPrecedenceFilterSuppressed&&(N.isPrecedenceFilterSuppressed=!0);let w=i.PredictionContext.join(N.context,_.context,A);return this.updatePropertiesForMergedConfig(_),N.context===w?!1:(N.context=w,!0)}for(let w=0;w<this.unmerged.length;w++){let P=this.unmerged[w];if(this.canMerge(_,D,P)){P.outerContextDepth=Math.max(P.outerContextDepth,_.outerContextDepth),_.isPrecedenceFilterSuppressed&&(P.isPrecedenceFilterSuppressed=!0);let $=i.PredictionContext.join(P.context,_.context,A);return this.updatePropertiesForMergedConfig(_),P.context===$?!1:(P.context=$,E&&(this.mergedConfigs.put(D,P),this.unmerged.splice(w,1)),!0)}}return this.configs.push(_),E?this.mergedConfigs.put(D,_):this.unmerged.push(_),this.updatePropertiesForAddedConfig(_),!0}updatePropertiesForMergedConfig(_){this._dipsIntoOuterContext=this._dipsIntoOuterContext||_.reachesIntoOuterContext,l(!this.outermostConfigSet||!this._dipsIntoOuterContext)}updatePropertiesForAddedConfig(_){this.configs.length===1?this._uniqueAlt=_.alt:this._uniqueAlt!==_.alt&&(this._uniqueAlt=h.ATN.INVALID_ALT_NUMBER),this._hasSemanticContext=this._hasSemanticContext||!s.SemanticContext.NONE.equals(_.semanticContext),this._dipsIntoOuterContext=this._dipsIntoOuterContext||_.reachesIntoOuterContext,l(!this.outermostConfigSet||!this._dipsIntoOuterContext)}canMerge(_,A,E){return _.state.stateNumber!==E.state.stateNumber||A.alt!==E.alt?!1:_.semanticContext.equals(E.semanticContext)}getKey(_){return{state:_.state.stateNumber,alt:_.alt}}containsAll(_){for(let A of _)if(!(A instanceof u.ATNConfig)||!this.contains(A))return!1;return!0}addAll(_,A){this.ensureWritable();let E=!1;for(let D of _)this.add(D,A)&&(E=!0);return E}clear(){if(this.ensureWritable(),!this.mergedConfigs||!this.unmerged)throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation");this.mergedConfigs.clear(),this.unmerged.length=0,this.configs.length=0,this._dipsIntoOuterContext=!1,this._hasSemanticContext=!1,this._uniqueAlt=h.ATN.INVALID_ALT_NUMBER,this._conflictInfo=void 0}equals(_){return this===_?!0:_ instanceof ia?this.outermostConfigSet===_.outermostConfigSet&&c.equals(this._conflictInfo,_._conflictInfo)&&y.ArrayEqualityComparator.INSTANCE.equals(this.configs,_.configs):!1}hashCode(){if(this.isReadOnly&&this.cachedHashCode!==-1)return this.cachedHashCode;let _=1;return _=5*_^(this.outermostConfigSet?1:0),_=5*_^y.ArrayEqualityComparator.INSTANCE.hashCode(this.configs),this.isReadOnly&&(this.cachedHashCode=_),_}toString(_){_==null&&(_=!1);let A="",E=this.configs.slice(0);E.sort((D,N)=>D.alt!==N.alt?D.alt-N.alt:D.state.stateNumber!==N.state.stateNumber?D.state.stateNumber-N.state.stateNumber:D.semanticContext.toString().localeCompare(N.semanticContext.toString())),A+="[";for(let D=0;D<E.length;D++)D>0&&(A+=", "),A+=E[D].toString(void 0,!0,_);return A+="]",this._hasSemanticContext&&(A+=",hasSemanticContext="+this._hasSemanticContext),this._uniqueAlt!==h.ATN.INVALID_ALT_NUMBER&&(A+=",uniqueAlt="+this._uniqueAlt),this._conflictInfo!=null&&(A+=",conflictingAlts="+this._conflictInfo.conflictedAlts,this._conflictInfo.isExact||(A+="*")),this._dipsIntoOuterContext&&(A+=",dipsIntoOuterContext"),A.toString()}get uniqueAlt(){return this._uniqueAlt}get hasSemanticContext(){return this._hasSemanticContext}set hasSemanticContext(_){this.ensureWritable(),this._hasSemanticContext=_}get conflictInfo(){return this._conflictInfo}set conflictInfo(_){this.ensureWritable(),this._conflictInfo=_}get conflictingAlts(){if(this._conflictInfo!=null)return this._conflictInfo.conflictedAlts}get isExactConflict(){return this._conflictInfo==null?!1:this._conflictInfo.isExact}get dipsIntoOuterContext(){return this._dipsIntoOuterContext}get(_){return this.configs[_]}ensureWritable(){if(this.isReadOnly)throw new Error("This ATNConfigSet is read only.")}};return a([o.NotNull],x.prototype,"getRepresentedAlternatives",null),a([o.Override],x.prototype,"size",null),a([o.Override],x.prototype,"isEmpty",null),a([o.Override],x.prototype,"contains",null),a([o.Override],x.prototype,Symbol.iterator,null),a([o.Override],x.prototype,"toArray",null),a([o.Override],x.prototype,"containsAll",null),a([o.Override],x.prototype,"clear",null),a([o.Override],x.prototype,"equals",null),a([o.Override],x.prototype,"hashCode",null),Ir.ATNConfigSet=x,Ir}var Mr={},qr={},jr={},Ml;function ro(){return Ml||(Ml=1,function(a){/*!
|
|
172
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
173
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
174
|
+
*/var d=jr&&jr.__decorate||function(e,s,l,c){var p=arguments.length,v=p<3?s:c===null?c=Object.getOwnPropertyDescriptor(s,l):c,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,l,c);else for(var g=e.length-1;g>=0;g--)(x=e[g])&&(v=(p<3?x(v):p>3?x(s,l,v):x(s,l))||v);return p>3&&v&&Object.defineProperty(s,l,v),v},m=jr&&jr.__param||function(e,s){return function(l,c){s(l,c,e)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DFAState=void 0;const y=st(),h=gr(),u=Ie(),r=ue(),o=rt(),t=qe();let i=class W0{constructor(s){this.stateNumber=-1,this.configs=s,this.edges=new Map,this.contextEdges=new Map}get isContextSensitive(){return!!this.contextSymbols}isContextSymbol(s){return this.isContextSensitive?this.contextSymbols.get(s):!1}setContextSymbol(s){t(this.isContextSensitive),this.contextSymbols.set(s)}setContextSensitive(s){t(!this.configs.isOutermostConfigSet),!this.isContextSensitive&&(this.contextSymbols||(this.contextSymbols=new h.BitSet))}get acceptStateInfo(){return this._acceptStateInfo}set acceptStateInfo(s){this._acceptStateInfo=s}get isAcceptState(){return!!this._acceptStateInfo}get prediction(){return this._acceptStateInfo?this._acceptStateInfo.prediction:y.ATN.INVALID_ALT_NUMBER}get lexerActionExecutor(){if(this._acceptStateInfo)return this._acceptStateInfo.lexerActionExecutor}getTarget(s){return this.edges.get(s)}setTarget(s,l){this.edges.set(s,l)}getEdgeMap(){return this.edges}getContextTarget(s){return s===o.PredictionContext.EMPTY_FULL_STATE_KEY&&(s=-1),this.contextEdges.get(s)}setContextTarget(s,l){if(!this.isContextSensitive)throw new Error("The state is not context sensitive.");s===o.PredictionContext.EMPTY_FULL_STATE_KEY&&(s=-1),this.contextEdges.set(s,l)}getContextEdgeMap(){let s=new Map(this.contextEdges),l=s.get(-1);if(l!==void 0)if(s.size===1){let c=new Map;return c.set(o.PredictionContext.EMPTY_FULL_STATE_KEY,l),c}else s.delete(-1),s.set(o.PredictionContext.EMPTY_FULL_STATE_KEY,l);return s}hashCode(){let s=u.MurmurHash.initialize(7);return s=u.MurmurHash.update(s,this.configs.hashCode()),s=u.MurmurHash.finish(s,1),s}equals(s){if(this===s)return!0;if(!(s instanceof W0))return!1;let l=s;return this.configs.equals(l.configs)}toString(){let s="";return s+=this.stateNumber+":"+this.configs,this.isAcceptState&&(s+="=>",this.predicates?s+=this.predicates:s+=this.prediction),s.toString()}};d([r.NotNull],i.prototype,"configs",void 0),d([r.NotNull],i.prototype,"edges",void 0),d([r.NotNull],i.prototype,"contextEdges",void 0),d([r.Override],i.prototype,"hashCode",null),d([r.Override],i.prototype,"equals",null),d([r.Override],i.prototype,"toString",null),a.DFAState=i,function(e){let s=class{constructor(c,p){this.alt=p,this.pred=c}toString(){return"("+this.pred+", "+this.alt+")"}};d([r.NotNull],s.prototype,"pred",void 0),d([r.Override],s.prototype,"toString",null),s=d([m(0,r.NotNull)],s),e.PredPrediction=s}(i=a.DFAState||(a.DFAState={}))}(jr)),jr}var ql;function no(){return ql||(ql=1,function(a){/*!
|
|
175
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
176
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
177
|
+
*/var d=qr&&qr.__decorate||function(t,i,e,s){var l=arguments.length,c=l<3?i:s===null?s=Object.getOwnPropertyDescriptor(i,e):s,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,i,e,s);else for(var v=t.length-1;v>=0;v--)(p=t[v])&&(c=(l<3?p(c):l>3?p(i,e,c):p(i,e))||c);return l>3&&c&&Object.defineProperty(i,e,c),c},m=qr&&qr.__param||function(t,i){return function(e,s){i(e,s,t)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ATNSimulator=void 0;const y=Pi(),h=ro(),u=ue(),r=rt();let o=class Ti{constructor(i){this.atn=i}static get ERROR(){return Ti._ERROR||(Ti._ERROR=new h.DFAState(new y.ATNConfigSet),Ti._ERROR.stateNumber=r.PredictionContext.EMPTY_FULL_STATE_KEY),Ti._ERROR}clearDFA(){this.atn.clearDFA()}};d([u.NotNull],o.prototype,"atn",void 0),d([u.NotNull],o,"ERROR",null),o=d([m(0,u.NotNull)],o),a.ATNSimulator=o,o=a.ATNSimulator||(a.ATNSimulator={}),a.ATNSimulator=o}(qr)),qr}var ht={},oi={},jl;function Q0(){if(jl)return oi;jl=1;/*!
|
|
178
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
179
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
180
|
+
*/Object.defineProperty(oi,"__esModule",{value:!0}),oi.ConsoleErrorListener=void 0;let a=class{syntaxError(m,y,h,u,r,o){console.error(`line ${h}:${u} ${r}`)}};return oi.ConsoleErrorListener=a,a.INSTANCE=new a,oi}var xt={},$l;function Aa(){if($l)return xt;$l=1;/*!
|
|
181
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
182
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
183
|
+
*/var a=xt&&xt.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=xt&&xt.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(xt,"__esModule",{value:!0}),xt.ProxyErrorListener=void 0;const m=ue();let y=class{constructor(u){if(this.delegates=u,!u)throw new Error("Invalid delegates")}getDelegates(){return this.delegates}syntaxError(u,r,o,t,i,e){this.delegates.forEach(s=>{s.syntaxError&&s.syntaxError(u,r,o,t,i,e)})}};return a([m.Override,d(0,m.NotNull),d(4,m.NotNull)],y.prototype,"syntaxError",null),xt.ProxyErrorListener=y,xt}var Ul;function Fi(){if(Ul)return ht;Ul=1;/*!
|
|
184
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
185
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
186
|
+
*/var a=ht&&ht.__decorate||function(t,i,e,s){var l=arguments.length,c=l<3?i:s===null?s=Object.getOwnPropertyDescriptor(i,e):s,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,i,e,s);else for(var v=t.length-1;v>=0;v--)(p=t[v])&&(c=(l<3?p(c):l>3?p(i,e,c):p(i,e))||c);return l>3&&c&&Object.defineProperty(i,e,c),c},d=ht&&ht.__param||function(t,i){return function(e,s){i(e,s,t)}};Object.defineProperty(ht,"__esModule",{value:!0}),ht.Recognizer=void 0;const m=Q0(),y=Aa(),h=ue(),u=Fe(),r=ot();let o=class bi{constructor(){this._listeners=[m.ConsoleErrorListener.INSTANCE],this._stateNumber=-1}getTokenTypeMap(){let i=this.vocabulary,e=bi.tokenTypeMapCache.get(i);if(e==null){let s=new Map;for(let l=0;l<=this.atn.maxTokenType;l++){let c=i.getLiteralName(l);c!=null&&s.set(c,l);let p=i.getSymbolicName(l);p!=null&&s.set(p,l)}s.set("EOF",u.Token.EOF),e=s,bi.tokenTypeMapCache.set(i,e)}return e}getRuleIndexMap(){let i=this.ruleNames;if(i==null)throw new Error("The current recognizer does not provide a list of rule names.");let e=bi.ruleIndexMapCache.get(i);return e==null&&(e=r.toMap(i),bi.ruleIndexMapCache.set(i,e)),e}getTokenType(i){let e=this.getTokenTypeMap().get(i);return e??u.Token.INVALID_TYPE}get serializedATN(){throw new Error("there is no serialized ATN")}get atn(){return this._interp.atn}get interpreter(){return this._interp}set interpreter(i){this._interp=i}get parseInfo(){return Promise.resolve(void 0)}getErrorHeader(i){let e=i.getOffendingToken();if(!e)return"";let s=e.line,l=e.charPositionInLine;return"line "+s+":"+l}addErrorListener(i){if(!i)throw new TypeError("listener must not be null");this._listeners.push(i)}removeErrorListener(i){let e=this._listeners.indexOf(i);e!==-1&&this._listeners.splice(e,1)}removeErrorListeners(){this._listeners.length=0}getErrorListeners(){return this._listeners.slice(0)}getErrorListenerDispatch(){return new y.ProxyErrorListener(this.getErrorListeners())}sempred(i,e,s){return!0}precpred(i,e){return!0}action(i,e,s){}get state(){return this._stateNumber}set state(i){this._stateNumber=i}};return o.EOF=-1,o.tokenTypeMapCache=new WeakMap,o.ruleIndexMapCache=new WeakMap,a([h.SuppressWarnings("serial"),h.NotNull],o.prototype,"_listeners",void 0),a([h.NotNull],o.prototype,"getTokenTypeMap",null),a([h.NotNull],o.prototype,"getRuleIndexMap",null),a([h.NotNull],o.prototype,"serializedATN",null),a([h.NotNull],o.prototype,"atn",null),a([h.NotNull,d(0,h.NotNull)],o.prototype,"interpreter",null),a([h.NotNull,d(0,h.NotNull)],o.prototype,"getErrorHeader",null),a([d(0,h.NotNull)],o.prototype,"addErrorListener",null),a([d(0,h.NotNull)],o.prototype,"removeErrorListener",null),a([h.NotNull],o.prototype,"getErrorListeners",null),ht.Recognizer=o,ht}var $r={},Vl;function _r(){if(Vl)return $r;Vl=1;/*!
|
|
187
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
188
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
189
|
+
*/var a=$r&&$r.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty($r,"__esModule",{value:!0}),$r.VocabularyImpl=void 0;const d=ue(),m=Fe();let y=class{constructor(u,r,o){this.literalNames=u,this.symbolicNames=r,this.displayNames=o,this._maxTokenType=Math.max(this.displayNames.length,Math.max(this.literalNames.length,this.symbolicNames.length))-1}get maxTokenType(){return this._maxTokenType}getLiteralName(u){if(u>=0&&u<this.literalNames.length)return this.literalNames[u]}getSymbolicName(u){if(u>=0&&u<this.symbolicNames.length)return this.symbolicNames[u];if(u===m.Token.EOF)return"EOF"}getDisplayName(u){if(u>=0&&u<this.displayNames.length){let t=this.displayNames[u];if(t)return t}let r=this.getLiteralName(u);if(r)return r;let o=this.getSymbolicName(u);return o||String(u)}};return y.EMPTY_VOCABULARY=new y([],[],[]),a([d.NotNull],y.prototype,"literalNames",void 0),a([d.NotNull],y.prototype,"symbolicNames",void 0),a([d.NotNull],y.prototype,"displayNames",void 0),a([d.Override],y.prototype,"maxTokenType",null),a([d.Override],y.prototype,"getLiteralName",null),a([d.Override],y.prototype,"getSymbolicName",null),a([d.Override,d.NotNull],y.prototype,"getDisplayName",null),a([d.NotNull],y,"EMPTY_VOCABULARY",void 0),$r.VocabularyImpl=y,$r}var zl;function X0(){if(zl)return Mr;zl=1;/*!
|
|
190
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
191
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
192
|
+
*/var a=Mr&&Mr.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l};Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.DFASerializer=void 0;const d=no(),m=ue(),y=rt(),h=Fi(),u=_r();let r=class{constructor(t,i,e,s){i instanceof h.Recognizer?(e=i.ruleNames,s=i.atn,i=i.vocabulary):i||(i=u.VocabularyImpl.EMPTY_VOCABULARY),this.dfa=t,this.vocabulary=i,this.ruleNames=e,this.atn=s}toString(){if(!this.dfa.s0)return"";let t="";if(this.dfa.states){let e=new Array(...this.dfa.states.toArray());e.sort((s,l)=>s.stateNumber-l.stateNumber);for(let s of e){let l=s.getEdgeMap(),c=[...l.keys()].sort((x,g)=>x-g),p=s.getContextEdgeMap(),v=[...p.keys()].sort((x,g)=>x-g);for(let x of c){let g=l.get(x);if((g==null||g===d.ATNSimulator.ERROR)&&!s.isContextSymbol(x))continue;let _=!1;t+=this.getStateString(s)+"-"+this.getEdgeLabel(x)+"->",s.isContextSymbol(x)&&(t+="!",_=!0);let A=g;A&&A.stateNumber!==d.ATNSimulator.ERROR.stateNumber?t+=this.getStateString(A)+`
|
|
193
|
+
`:_&&(t+=`ctx
|
|
194
|
+
`)}if(s.isContextSensitive)for(let x of v)t+=this.getStateString(s)+"-"+this.getContextLabel(x)+"->"+this.getStateString(p.get(x))+`
|
|
195
|
+
`}}let i=t;return i.length===0?"":i}getContextLabel(t){if(t===y.PredictionContext.EMPTY_FULL_STATE_KEY)return"ctx:EMPTY_FULL";if(t===y.PredictionContext.EMPTY_LOCAL_STATE_KEY)return"ctx:EMPTY_LOCAL";if(this.atn&&t>0&&t<=this.atn.states.length){let e=this.atn.states[t].ruleIndex;if(this.ruleNames&&e>=0&&e<this.ruleNames.length)return"ctx:"+String(t)+"("+this.ruleNames[e]+")"}return"ctx:"+String(t)}getEdgeLabel(t){return this.vocabulary.getDisplayName(t)}getStateString(t){if(t===d.ATNSimulator.ERROR)return"ERROR";let i=t.stateNumber,e="s"+i;if(t.isAcceptState&&(t.predicates?e=":s"+i+"=>"+t.predicates:e=":s"+i+"=>"+t.prediction),t.isContextSensitive){e+="*";for(let s of t.configs)if(s.reachesIntoOuterContext){e+="*";break}}return e}};return a([m.NotNull],r.prototype,"dfa",void 0),a([m.NotNull],r.prototype,"vocabulary",void 0),a([m.Override],r.prototype,"toString",null),Mr.DFASerializer=r,Mr}var dt={},Hl;function qh(){if(Hl)return dt;Hl=1;/*!
|
|
196
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
197
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
198
|
+
*/var a=dt&&dt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=dt&&dt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(dt,"__esModule",{value:!0}),dt.LexerDFASerializer=void 0;const m=X0(),y=ue(),h=_r();let u=class extends m.DFASerializer{constructor(o){super(o,h.VocabularyImpl.EMPTY_VOCABULARY)}getEdgeLabel(o){return"'"+String.fromCodePoint(o)+"'"}};return a([y.Override,y.NotNull],u.prototype,"getEdgeLabel",null),u=a([d(0,y.NotNull)],u),dt.LexerDFASerializer=u,dt}var Ur={},Us={},Gl;function Be(){return Gl||(Gl=1,function(a){/*!
|
|
199
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
200
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
201
|
+
*/Object.defineProperty(a,"__esModule",{value:!0}),a.ATNStateType=void 0,function(d){d[d.INVALID_TYPE=0]="INVALID_TYPE",d[d.BASIC=1]="BASIC",d[d.RULE_START=2]="RULE_START",d[d.BLOCK_START=3]="BLOCK_START",d[d.PLUS_BLOCK_START=4]="PLUS_BLOCK_START",d[d.STAR_BLOCK_START=5]="STAR_BLOCK_START",d[d.TOKEN_START=6]="TOKEN_START",d[d.RULE_STOP=7]="RULE_STOP",d[d.BLOCK_END=8]="BLOCK_END",d[d.STAR_LOOP_BACK=9]="STAR_LOOP_BACK",d[d.STAR_LOOP_ENTRY=10]="STAR_LOOP_ENTRY",d[d.PLUS_LOOP_BACK=11]="PLUS_LOOP_BACK",d[d.LOOP_END=12]="LOOP_END"}(a.ATNStateType||(a.ATNStateType={}))}(Us)),Us}var Yl;function va(){if(Yl)return Ur;Yl=1;/*!
|
|
202
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
203
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
204
|
+
*/var a=Ur&&Ur.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.StarLoopEntryState=void 0;const d=Be(),m=gr(),y=In(),h=ue();let u=class extends y.DecisionState{constructor(){super(...arguments),this.precedenceRuleDecision=!1,this.precedenceLoopbackStates=new m.BitSet}get stateType(){return d.ATNStateType.STAR_LOOP_ENTRY}};return a([h.Override],u.prototype,"stateType",null),Ur.StarLoopEntryState=u,Ur}var Wl;function K0(){if(Wl)return ft;Wl=1;/*!
|
|
205
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
206
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
207
|
+
*/var a=ft&&ft.__decorate||function(l,c,p,v){var x=arguments.length,g=x<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(l,c,p,v);else for(var A=l.length-1;A>=0;A--)(_=l[A])&&(g=(x<3?_(g):x>3?_(c,p,g):_(c,p))||g);return x>3&&g&&Object.defineProperty(c,p,g),g},d=ft&&ft.__param||function(l,c){return function(p,v){c(p,v,l)}};Object.defineProperty(ft,"__esModule",{value:!0}),ft.DFA=void 0;const m=mr(),y=Pi(),h=X0(),u=ro(),r=qh(),o=ue(),t=it(),i=va(),e=_r();let s=class{constructor(c,p=0){if(this.states=new m.Array2DHashSet(t.ObjectEqualityComparator.INSTANCE),this.nextStateNumber=0,!c.atn)throw new Error("The ATNState must be associated with an ATN");this.atnStartState=c,this.atn=c.atn,this.decision=p;let v=!1;c instanceof i.StarLoopEntryState&&c.precedenceRuleDecision&&(v=!0,this.s0=new u.DFAState(new y.ATNConfigSet),this.s0full=new u.DFAState(new y.ATNConfigSet)),this.precedenceDfa=v}get isPrecedenceDfa(){return this.precedenceDfa}getPrecedenceStartState(c,p){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");return p?this.s0full.getTarget(c):this.s0.getTarget(c)}setPrecedenceStartState(c,p,v){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");c<0||(p?this.s0full.setTarget(c,v):this.s0.setTarget(c,v))}get isEmpty(){return this.isPrecedenceDfa?this.s0.getEdgeMap().size===0&&this.s0full.getEdgeMap().size===0:this.s0==null&&this.s0full==null}get isContextSensitive(){return this.isPrecedenceDfa?this.s0full.getEdgeMap().size>0:this.s0full!=null}addState(c){return c.stateNumber=this.nextStateNumber++,this.states.getOrAdd(c)}toString(c,p){if(c||(c=e.VocabularyImpl.EMPTY_VOCABULARY),!this.s0)return"";let v;return p?v=new h.DFASerializer(this,c,p,this.atnStartState.atn):v=new h.DFASerializer(this,c),v.toString()}toLexerString(){return this.s0?new r.LexerDFASerializer(this).toString():""}};return a([o.NotNull],s.prototype,"states",void 0),a([o.NotNull],s.prototype,"atnStartState",void 0),a([o.NotNull],s.prototype,"atn",void 0),s=a([d(0,o.NotNull)],s),ft.DFA=s,ft}var yt={},Vr={},Ql;function Ea(){if(Ql)return Vr;Ql=1;/*!
|
|
208
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
209
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
210
|
+
*/var a=Vr&&Vr.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l};Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.IntegerList=void 0;const d=ga(),m=ue(),y=new Int32Array(0),h=4,u=(1<<31>>>0)-1-8;let r=class Gi{constructor(t){if(!t)this._data=y,this._size=0;else if(t instanceof Gi)this._data=t._data.slice(0),this._size=t._size;else if(typeof t=="number")t===0?(this._data=y,this._size=0):(this._data=new Int32Array(t),this._size=0);else{this._data=y,this._size=0;for(let i of t)this.add(i)}}add(t){this._data.length===this._size&&this.ensureCapacity(this._size+1),this._data[this._size]=t,this._size++}addAll(t){if(Array.isArray(t))this.ensureCapacity(this._size+t.length),this._data.subarray(this._size,this._size+t.length).set(t),this._size+=t.length;else if(t instanceof Gi)this.ensureCapacity(this._size+t._size),this._data.subarray(this._size,this._size+t.size).set(t._data),this._size+=t._size;else{this.ensureCapacity(this._size+t.size);let i=0;for(let e of t)this._data[this._size+i]=e,i++;this._size+=t.size}}get(t){if(t<0||t>=this._size)throw RangeError();return this._data[t]}contains(t){for(let i=0;i<this._size;i++)if(this._data[i]===t)return!0;return!1}set(t,i){if(t<0||t>=this._size)throw RangeError();let e=this._data[t];return this._data[t]=i,e}removeAt(t){let i=this.get(t);return this._data.copyWithin(t,t+1,this._size),this._data[this._size-1]=0,this._size--,i}removeRange(t,i){if(t<0||i<0||t>this._size||i>this._size||t>i)throw RangeError();this._data.copyWithin(i,t,this._size),this._data.fill(0,this._size-(i-t),this._size),this._size-=i-t}get isEmpty(){return this._size===0}get size(){return this._size}trimToSize(){this._data.length!==this._size&&(this._data=this._data.slice(0,this._size))}clear(){this._data.fill(0,0,this._size),this._size=0}toArray(){return this._size===0?[]:Array.from(this._data.subarray(0,this._size))}sort(){this._data.subarray(0,this._size).sort()}equals(t){if(t===this)return!0;if(!(t instanceof Gi)||this._size!==t._size)return!1;for(let i=0;i<this._size;i++)if(this._data[i]!==t._data[i])return!1;return!0}hashCode(){let t=1;for(let i=0;i<this._size;i++)t=31*t+this._data[i];return t}toString(){return this._data.toString()}binarySearch(t,i,e){if(i===void 0&&(i=0),e===void 0&&(e=this._size),i<0||e<0||i>this._size||e>this._size)throw new RangeError;if(i>e)throw new RangeError;return d.Arrays.binarySearch(this._data,t,i,e)}ensureCapacity(t){if(t<0||t>u)throw new RangeError;let i;for(this._data.length===0?i=h:i=this._data.length;i<t;)i=i*2,(i<0||i>u)&&(i=u);let e=new Int32Array(i);e.set(this._data),this._data=e}toCharArray(){let t=new Uint16Array(this._size),i=0,e=!1;for(let s=0;s<this._size;s++){let l=this._data[s];if(l>=0&&l<65536){t[i]=l,i++;continue}if(!e){let p=new Uint16Array(this.charArraySize());p.set(t,0),t=p,e=!0}let c=String.fromCodePoint(l);t[i]=c.charCodeAt(0),t[i+1]=c.charCodeAt(1),i+=2}return t}charArraySize(){let t=0;for(let i=0;i<this._size;i++)t+=this._data[i]>=65536?2:1;return t}};return a([m.NotNull],r.prototype,"_data",void 0),a([m.Override],r.prototype,"equals",null),a([m.Override],r.prototype,"hashCode",null),a([m.Override],r.prototype,"toString",null),Vr.IntegerList=r,Vr}var zr={},si={},mt={},Xl;function Ii(){if(Xl)return mt;Xl=1;/*!
|
|
211
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
212
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
213
|
+
*/var a=mt&&mt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=mt&&mt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(mt,"__esModule",{value:!0}),mt.CommonToken=void 0;const m=je(),y=ue(),h=Fe();let u=class Ni{constructor(o,t,i=Ni.EMPTY_SOURCE,e=h.Token.DEFAULT_CHANNEL,s=0,l=0){this._line=0,this._charPositionInLine=-1,this._channel=h.Token.DEFAULT_CHANNEL,this.index=-1,this._text=t,this._type=o,this.source=i,this._channel=e,this.start=s,this.stop=l,i.source!=null&&(this._line=i.source.line,this._charPositionInLine=i.source.charPositionInLine)}static fromToken(o){let t=new Ni(o.type,void 0,Ni.EMPTY_SOURCE,o.channel,o.startIndex,o.stopIndex);return t._line=o.line,t.index=o.tokenIndex,t._charPositionInLine=o.charPositionInLine,o instanceof Ni?(t._text=o._text,t.source=o.source):(t._text=o.text,t.source={source:o.tokenSource,stream:o.inputStream}),t}get type(){return this._type}set type(o){this._type=o}get line(){return this._line}set line(o){this._line=o}get text(){if(this._text!=null)return this._text;let o=this.inputStream;if(o==null)return;let t=o.size;return this.start<t&&this.stop<t?o.getText(m.Interval.of(this.start,this.stop)):"<EOF>"}set text(o){this._text=o}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(o){this._charPositionInLine=o}get channel(){return this._channel}set channel(o){this._channel=o}get startIndex(){return this.start}set startIndex(o){this.start=o}get stopIndex(){return this.stop}set stopIndex(o){this.stop=o}get tokenIndex(){return this.index}set tokenIndex(o){this.index=o}get tokenSource(){return this.source.source}get inputStream(){return this.source.stream}toString(o){let t="";this._channel>0&&(t=",channel="+this._channel);let i=this.text;i!=null?(i=i.replace(/\n/g,"\\n"),i=i.replace(/\r/g,"\\r"),i=i.replace(/\t/g,"\\t")):i="<no text>";let e=String(this._type);return o&&(e=o.vocabulary.getDisplayName(this._type)),"[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+i+"',<"+e+">"+t+","+this._line+":"+this.charPositionInLine+"]"}};return u.EMPTY_SOURCE={source:void 0,stream:void 0},a([y.NotNull],u.prototype,"source",void 0),a([y.Override],u.prototype,"type",null),a([y.Override],u.prototype,"line",null),a([y.Override],u.prototype,"text",null),a([y.Override],u.prototype,"charPositionInLine",null),a([y.Override],u.prototype,"channel",null),a([y.Override],u.prototype,"startIndex",null),a([y.Override],u.prototype,"stopIndex",null),a([y.Override],u.prototype,"tokenIndex",null),a([y.Override],u.prototype,"tokenSource",null),a([y.Override],u.prototype,"inputStream",null),a([y.Override],u.prototype,"toString",null),a([d(0,y.NotNull)],u,"fromToken",null),u=a([d(2,y.NotNull)],u),mt.CommonToken=u,mt}var Kl;function Sa(){return Kl||(Kl=1,function(a){/*!
|
|
214
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
215
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
216
|
+
*/var d=si&&si.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(a,"__esModule",{value:!0}),a.CommonTokenFactory=void 0;const m=Ii(),y=je(),h=ue();let u=class{constructor(o=!1){this.copyText=o}create(o,t,i,e,s,l,c,p){let v=new m.CommonToken(t,i,o,e,s,l);return v.line=c,v.charPositionInLine=p,i==null&&this.copyText&&o.stream!=null&&(v.text=o.stream.getText(y.Interval.of(s,l))),v}createSimple(o,t){return new m.CommonToken(o,t)}};d([h.Override],u.prototype,"create",null),d([h.Override],u.prototype,"createSimple",null),a.CommonTokenFactory=u,function(r){r.DEFAULT=new r}(u=a.CommonTokenFactory||(a.CommonTokenFactory={}))}(si)),si}var ai={},Jl;function J0(){if(Jl)return ai;Jl=1;/*!
|
|
217
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
218
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
219
|
+
*/Object.defineProperty(ai,"__esModule",{value:!0}),ai.IntegerStack=void 0;const a=Ea();let d=class extends a.IntegerList{constructor(y){super(y)}push(y){this.add(y)}pop(){return this.removeAt(this.size-1)}peek(){return this.get(this.size-1)}};return ai.IntegerStack=d,ai}var Hr={},ui={},Zl;function Z0(){if(Zl)return ui;Zl=1;/*!
|
|
220
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
221
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
222
|
+
*/Object.defineProperty(ui,"__esModule",{value:!0}),ui.AcceptStateInfo=void 0;let a=class{constructor(m,y){this._prediction=m,this._lexerActionExecutor=y}get prediction(){return this._prediction}get lexerActionExecutor(){return this._lexerActionExecutor}};return ui.AcceptStateInfo=a,ui}var gt={},_t={},ec;function jh(){if(ec)return _t;ec=1;/*!
|
|
223
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
224
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
225
|
+
*/var a=_t&&_t.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=_t&&_t.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(_t,"__esModule",{value:!0}),_t.LexerIndexedCustomAction=void 0;const m=Ie(),y=ue();let h=class ep{constructor(r,o){this._offset=r,this._action=o}get offset(){return this._offset}get action(){return this._action}get actionType(){return this._action.actionType}get isPositionDependent(){return!0}execute(r){this._action.execute(r)}hashCode(){let r=m.MurmurHash.initialize();return r=m.MurmurHash.update(r,this._offset),r=m.MurmurHash.update(r,this._action),m.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof ep?this._offset===r._offset&&this._action.equals(r._action):!1}};return a([y.NotNull],h.prototype,"action",null),a([y.Override],h.prototype,"actionType",null),a([y.Override],h.prototype,"isPositionDependent",null),a([y.Override],h.prototype,"execute",null),a([y.Override],h.prototype,"hashCode",null),a([y.Override],h.prototype,"equals",null),h=a([d(1,y.NotNull)],h),_t.LexerIndexedCustomAction=h,_t}var tc;function $h(){if(tc)return gt;tc=1;/*!
|
|
226
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
227
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
228
|
+
*/var a=gt&>.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l},d=gt&>.__param||function(o,t){return function(i,e){t(i,e,o)}};Object.defineProperty(gt,"__esModule",{value:!0}),gt.LexerActionExecutor=void 0;const m=eo(),y=jh(),h=Ie(),u=ue();let r=class Ci{constructor(t){this._lexerActions=t;let i=h.MurmurHash.initialize();for(let e of t)i=h.MurmurHash.update(i,e);this.cachedHashCode=h.MurmurHash.finish(i,t.length)}static append(t,i){if(!t)return new Ci([i]);let e=t._lexerActions.slice(0);return e.push(i),new Ci(e)}fixOffsetBeforeMatch(t){let i;for(let e=0;e<this._lexerActions.length;e++)this._lexerActions[e].isPositionDependent&&!(this._lexerActions[e]instanceof y.LexerIndexedCustomAction)&&(i||(i=this._lexerActions.slice(0)),i[e]=new y.LexerIndexedCustomAction(t,this._lexerActions[e]));return i?new Ci(i):this}get lexerActions(){return this._lexerActions}execute(t,i,e){let s=!1,l=i.index;try{for(let c of this._lexerActions){if(c instanceof y.LexerIndexedCustomAction){let p=c.offset;i.seek(e+p),c=c.action,s=e+p!==l}else c.isPositionDependent&&(i.seek(l),s=!1);c.execute(t)}}finally{s&&i.seek(l)}}hashCode(){return this.cachedHashCode}equals(t){return t===this?!0:t instanceof Ci?this.cachedHashCode===t.cachedHashCode&&m.ArrayEqualityComparator.INSTANCE.equals(this._lexerActions,t._lexerActions):!1}};return a([u.NotNull],r.prototype,"_lexerActions",void 0),a([u.NotNull],r.prototype,"lexerActions",null),a([d(0,u.NotNull)],r.prototype,"execute",null),a([u.Override],r.prototype,"hashCode",null),a([u.Override],r.prototype,"equals",null),a([u.NotNull,d(1,u.NotNull)],r,"append",null),r=a([d(0,u.NotNull)],r),gt.LexerActionExecutor=r,gt}var At={},li={},rc;function Ar(){if(rc)return li;rc=1;/*!
|
|
229
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
230
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
231
|
+
*/Object.defineProperty(li,"__esModule",{value:!0}),li.RecognitionException=void 0;let a=class extends Error{constructor(m,y,h,u){super(u),this._offendingState=-1,this._recognizer=m,this.input=y,this.ctx=h,m&&(this._offendingState=m.state)}get offendingState(){return this._offendingState}setOffendingState(m){this._offendingState=m}get expectedTokens(){if(this._recognizer)return this._recognizer.atn.getExpectedTokens(this._offendingState,this.ctx)}get context(){return this.ctx}get inputStream(){return this.input}getOffendingToken(m){if(!(m&&m!==this._recognizer))return this.offendingToken}setOffendingToken(m,y){m===this._recognizer&&(this.offendingToken=y)}get recognizer(){return this._recognizer}};return li.RecognitionException=a,li}var nc;function io(){if(nc)return At;nc=1;/*!
|
|
232
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
233
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
234
|
+
*/var a=At&&At.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l},d=At&&At.__param||function(o,t){return function(i,e){t(i,e,o)}};Object.defineProperty(At,"__esModule",{value:!0}),At.LexerNoViableAltException=void 0;const m=Ar(),y=ue(),h=je(),u=ot();let r=class extends m.RecognitionException{constructor(t,i,e,s){super(t,i),this._startIndex=e,this._deadEndConfigs=s}get startIndex(){return this._startIndex}get deadEndConfigs(){return this._deadEndConfigs}get inputStream(){return super.inputStream}toString(){let t="";return this._startIndex>=0&&this._startIndex<this.inputStream.size&&(t=this.inputStream.getText(h.Interval.of(this._startIndex,this._startIndex)),t=u.escapeWhitespace(t,!1)),`LexerNoViableAltException('${t}')`}};return a([y.Override],r.prototype,"inputStream",null),a([y.Override],r.prototype,"toString",null),r=a([d(1,y.NotNull)],r),At.LexerNoViableAltException=r,At}var Gr={},ic;function Uh(){if(ic)return Gr;ic=1;/*!
|
|
235
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
236
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
237
|
+
*/var a=Gr&&Gr.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.OrderedATNConfigSet=void 0;const d=Pi(),m=ue();let y=class tp extends d.ATNConfigSet{constructor(u,r){u!=null&&r!=null?super(u,r):super()}clone(u){let r=new tp(this,u);return!u&&this.isReadOnly&&r.addAll(this),r}getKey(u){return{state:0,alt:u.hashCode()}}canMerge(u,r,o){return u.equals(o)}};return a([m.Override],y.prototype,"clone",null),a([m.Override],y.prototype,"getKey",null),a([m.Override],y.prototype,"canMerge",null),Gr.OrderedATNConfigSet=y,Gr}var Yr={},oc;function Li(){if(oc)return Yr;oc=1;/*!
|
|
238
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
239
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
240
|
+
*/var a=Yr&&Yr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.RuleStopState=void 0;const d=pr(),m=Be(),y=ue();let h=class extends d.ATNState{get nonStopStateNumber(){return-1}get stateType(){return m.ATNStateType.RULE_STOP}};return a([y.Override],h.prototype,"nonStopStateNumber",null),a([y.Override],h.prototype,"stateType",null),Yr.RuleStopState=h,Yr}var sc;function oo(){return sc||(sc=1,function(a){/*!
|
|
241
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
242
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
243
|
+
*/var d=Hr&&Hr.__decorate||function(D,N,w,P){var $=arguments.length,Y=$<3?N:P===null?P=Object.getOwnPropertyDescriptor(N,w):P,L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(D,N,w,P);else for(var q=D.length-1;q>=0;q--)(L=D[q])&&(Y=($<3?L(Y):$>3?L(N,w,Y):L(N,w))||Y);return $>3&&Y&&Object.defineProperty(N,w,Y),Y},m=Hr&&Hr.__param||function(D,N){return function(w,P){N(w,P,D)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LexerATNSimulator=void 0;const y=Z0(),h=st(),u=to(),r=Pi(),o=no(),t=ro(),i=je(),e=dr(),s=vr(),l=$h(),c=io(),p=ue(),v=Uh(),x=rt(),g=Li(),_=Fe(),A=qe();let E=class Ue extends o.ATNSimulator{constructor(N,w){super(N),this.optimize_tail_calls=!0,this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=s.Lexer.DEFAULT_MODE,this.prevAccept=new Ue.SimState,this.recog=w}copyState(N){this._charPositionInLine=N.charPositionInLine,this._line=N._line,this.mode=N.mode,this.startIndex=N.startIndex}match(N,w){this.mode=w;let P=N.mark();try{this.startIndex=N.index,this.prevAccept.reset();let $=this.atn.modeToDFA[w].s0;return $==null?this.matchATN(N):this.execATN(N,$)}finally{N.release(P)}}reset(){this.prevAccept.reset(),this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=s.Lexer.DEFAULT_MODE}matchATN(N){let w=this.atn.modeToStartState[this.mode];Ue.debug&&console.log(`matchATN mode ${this.mode} start: ${w}`);let P=this.mode,$=this.computeStartState(N,w),Y=$.hasSemanticContext;Y&&($.hasSemanticContext=!1);let L=this.addDFAState($);if(!Y){let W=this.atn.modeToDFA[this.mode];W.s0?L=W.s0:W.s0=L}let q=this.execATN(N,L);return Ue.debug&&console.log(`DFA after matchATN: ${this.atn.modeToDFA[P].toLexerString()}`),q}execATN(N,w){Ue.debug&&console.log(`start state closure=${w.configs}`),w.isAcceptState&&this.captureSimState(this.prevAccept,N,w);let P=N.LA(1),$=w;for(;;){Ue.debug&&console.log(`execATN loop starting closure: ${$.configs}`);let Y=this.getExistingTargetState($,P);if(Y==null&&(Y=this.computeTargetState(N,$,P)),Y===o.ATNSimulator.ERROR||(P!==e.IntStream.EOF&&this.consume(N),Y.isAcceptState&&(this.captureSimState(this.prevAccept,N,Y),P===e.IntStream.EOF)))break;P=N.LA(1),$=Y}return this.failOrAccept(this.prevAccept,N,$.configs,P)}getExistingTargetState(N,w){let P=N.getTarget(w);return Ue.debug&&P!=null&&console.log("reuse state "+N.stateNumber+" edge to "+P.stateNumber),P}computeTargetState(N,w,P){let $=new v.OrderedATNConfigSet;return this.getReachableConfigSet(N,w.configs,$,P),$.isEmpty?($.hasSemanticContext||this.addDFAEdge(w,P,o.ATNSimulator.ERROR),o.ATNSimulator.ERROR):this.addDFAEdge(w,P,$)}failOrAccept(N,w,P,$){if(N.dfaState!=null){let Y=N.dfaState.lexerActionExecutor;return this.accept(w,Y,this.startIndex,N.index,N.line,N.charPos),N.dfaState.prediction}else{if($===e.IntStream.EOF&&w.index===this.startIndex)return _.Token.EOF;throw new c.LexerNoViableAltException(this.recog,w,this.startIndex,P)}}getReachableConfigSet(N,w,P,$){let Y=h.ATN.INVALID_ALT_NUMBER;for(let L of w){let q=L.alt===Y;if(q&&L.hasPassedThroughNonGreedyDecision)continue;Ue.debug&&console.log(`testing ${this.getTokenName($)} at ${L.toString(this.recog,!0)}`);let W=L.state.numberOfOptimizedTransitions;for(let Z=0;Z<W;Z++){let I=L.state.getOptimizedTransition(Z),Q=this.getReachableTarget(I,$);if(Q!=null){let re=L.lexerActionExecutor,fe;re!=null?(re=re.fixOffsetBeforeMatch(N.index-this.startIndex),fe=L.transform(Q,!0,re)):(A(L.lexerActionExecutor==null),fe=L.transform(Q,!0));let oe=$===e.IntStream.EOF;if(this.closure(N,fe,P,q,!0,oe)){Y=L.alt;break}}}}}accept(N,w,P,$,Y,L){Ue.debug&&console.log(`ACTION ${w}`),N.seek($),this._line=Y,this._charPositionInLine=L,w!=null&&this.recog!=null&&w.execute(this.recog,N,P)}getReachableTarget(N,w){if(N.matches(w,s.Lexer.MIN_CHAR_VALUE,s.Lexer.MAX_CHAR_VALUE))return N.target}computeStartState(N,w){let P=x.PredictionContext.EMPTY_FULL,$=new v.OrderedATNConfigSet;for(let Y=0;Y<w.numberOfTransitions;Y++){let L=w.transition(Y).target,q=u.ATNConfig.create(L,Y+1,P);this.closure(N,q,$,!1,!1,!1)}return $}closure(N,w,P,$,Y,L){if(Ue.debug&&console.log("closure("+w.toString(this.recog,!0)+")"),w.state instanceof g.RuleStopState){Ue.debug&&(this.recog!=null?console.log(`closure at ${this.recog.ruleNames[w.state.ruleIndex]} rule stop ${w}`):console.log(`closure at rule stop ${w}`));let W=w.context;if(W.isEmpty)return P.add(w),!0;W.hasEmpty&&(P.add(w.transform(w.state,!0,x.PredictionContext.EMPTY_FULL)),$=!0);for(let Z=0;Z<W.size;Z++){let I=W.getReturnState(Z);if(I===x.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let Q=W.getParent(Z),re=this.atn.states[I],fe=w.transform(re,!1,Q);$=this.closure(N,fe,P,$,Y,L)}return $}w.state.onlyHasEpsilonTransitions||(!$||!w.hasPassedThroughNonGreedyDecision)&&P.add(w);let q=w.state;for(let W=0;W<q.numberOfOptimizedTransitions;W++){let Z=q.getOptimizedTransition(W),I=this.getEpsilonTarget(N,w,Z,P,Y,L);I!=null&&($=this.closure(N,I,P,$,Y,L))}return $}getEpsilonTarget(N,w,P,$,Y,L){let q;switch(P.serializationType){case 3:let W=P;if(this.optimize_tail_calls&&W.optimizedTailCall&&!w.context.hasEmpty)q=w.transform(P.target,!0);else{let I=w.context.getChild(W.followState.stateNumber);q=w.transform(P.target,!0,I)}break;case 10:throw new Error("Precedence predicates are not supported in lexers.");case 4:let Z=P;Ue.debug&&console.log("EVAL rule "+Z.ruleIndex+":"+Z.predIndex),$.hasSemanticContext=!0,this.evaluatePredicate(N,Z.ruleIndex,Z.predIndex,Y)?q=w.transform(P.target,!0):q=void 0;break;case 6:if(w.context.hasEmpty){let I=l.LexerActionExecutor.append(w.lexerActionExecutor,this.atn.lexerActions[P.actionIndex]);q=w.transform(P.target,!0,I);break}else{q=w.transform(P.target,!0);break}case 1:q=w.transform(P.target,!0);break;case 5:case 2:case 7:if(L&&P.matches(e.IntStream.EOF,s.Lexer.MIN_CHAR_VALUE,s.Lexer.MAX_CHAR_VALUE)){q=w.transform(P.target,!1);break}q=void 0;break;default:q=void 0;break}return q}evaluatePredicate(N,w,P,$){if(this.recog==null)return!0;if(!$)return this.recog.sempred(void 0,w,P);let Y=this._charPositionInLine,L=this._line,q=N.index,W=N.mark();try{return this.consume(N),this.recog.sempred(void 0,w,P)}finally{this._charPositionInLine=Y,this._line=L,N.seek(q),N.release(W)}}captureSimState(N,w,P){N.index=w.index,N.line=this._line,N.charPos=this._charPositionInLine,N.dfaState=P}addDFAEdge(N,w,P){if(P instanceof r.ATNConfigSet){let $=P.hasSemanticContext;$&&(P.hasSemanticContext=!1);let Y=this.addDFAState(P);return $||this.addDFAEdge(N,w,Y),Y}else Ue.debug&&console.log("EDGE "+N+" -> "+P+" upon "+String.fromCharCode(w)),N?.setTarget(w,P)}addDFAState(N){A(!N.hasSemanticContext);let w=new t.DFAState(N),P=this.atn.modeToDFA[this.mode].states.get(w);if(P!=null)return P;N.optimizeConfigs(this);let $=new t.DFAState(N.clone(!0)),Y;for(let L of N)if(L.state instanceof g.RuleStopState){Y=L;break}if(Y!=null){let L=this.atn.ruleToTokenType[Y.state.ruleIndex],q=Y.lexerActionExecutor;$.acceptStateInfo=new y.AcceptStateInfo(L,q)}return this.atn.modeToDFA[this.mode].addState($)}getDFA(N){return this.atn.modeToDFA[N]}getText(N){return N.getText(i.Interval.of(this.startIndex,N.index-1))}get line(){return this._line}set line(N){this._line=N}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(N){this._charPositionInLine=N}consume(N){N.LA(1)===10?(this._line++,this._charPositionInLine=0):this._charPositionInLine++,N.consume()}getTokenName(N){return N===-1?"EOF":"'"+String.fromCharCode(N)+"'"}};d([p.NotNull],E.prototype,"prevAccept",void 0),d([m(0,p.NotNull)],E.prototype,"copyState",null),d([m(0,p.NotNull)],E.prototype,"match",null),d([p.Override],E.prototype,"reset",null),d([m(0,p.NotNull)],E.prototype,"matchATN",null),d([m(0,p.NotNull),m(1,p.NotNull)],E.prototype,"execATN",null),d([m(0,p.NotNull)],E.prototype,"getExistingTargetState",null),d([p.NotNull,m(0,p.NotNull),m(1,p.NotNull)],E.prototype,"computeTargetState",null),d([m(0,p.NotNull),m(1,p.NotNull),m(2,p.NotNull)],E.prototype,"getReachableConfigSet",null),d([m(0,p.NotNull)],E.prototype,"accept",null),d([p.NotNull,m(0,p.NotNull),m(1,p.NotNull)],E.prototype,"computeStartState",null),d([m(0,p.NotNull),m(1,p.NotNull),m(2,p.NotNull)],E.prototype,"closure",null),d([m(0,p.NotNull),m(1,p.NotNull),m(2,p.NotNull),m(3,p.NotNull)],E.prototype,"getEpsilonTarget",null),d([m(0,p.NotNull)],E.prototype,"evaluatePredicate",null),d([m(0,p.NotNull),m(1,p.NotNull),m(2,p.NotNull)],E.prototype,"captureSimState",null),d([p.NotNull,m(0,p.NotNull)],E.prototype,"addDFAState",null),d([p.NotNull],E.prototype,"getDFA",null),d([p.NotNull,m(0,p.NotNull)],E.prototype,"getText",null),d([m(0,p.NotNull)],E.prototype,"consume",null),d([p.NotNull],E.prototype,"getTokenName",null),E=d([m(0,p.NotNull)],E),a.LexerATNSimulator=E,function(D){D.debug=!1,D.dfa_debug=!1;class N{constructor(){this.index=-1,this.line=0,this.charPos=-1}reset(){this.index=-1,this.line=0,this.charPos=-1,this.dfaState=void 0}}D.SimState=N}(E=a.LexerATNSimulator||(a.LexerATNSimulator={})),a.LexerATNSimulator=E}(Hr)),Hr}var ac;function vr(){if(ac)return zr;ac=1;/*!
|
|
244
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
245
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
246
|
+
*/var a=zr&&zr.__decorate||function(s,l,c,p){var v=arguments.length,x=v<3?l:p===null?p=Object.getOwnPropertyDescriptor(l,c):p,g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(s,l,c,p);else for(var _=s.length-1;_>=0;_--)(g=s[_])&&(x=(v<3?g(x):v>3?g(l,c,x):g(l,c))||x);return v>3&&x&&Object.defineProperty(l,c,x),x};Object.defineProperty(zr,"__esModule",{value:!0}),zr.Lexer=void 0;const d=Sa(),m=J0(),y=je(),h=dr(),u=oo(),r=io(),o=ue(),t=Fi(),i=Fe();let e=class hr extends t.Recognizer{constructor(l){super(),this._factory=d.CommonTokenFactory.DEFAULT,this._tokenStartCharIndex=-1,this._tokenStartLine=0,this._tokenStartCharPositionInLine=0,this._hitEOF=!1,this._channel=0,this._type=0,this._modeStack=new m.IntegerStack,this._mode=hr.DEFAULT_MODE,this._input=l,this._tokenFactorySourcePair={source:this,stream:l}}static get DEFAULT_TOKEN_CHANNEL(){return i.Token.DEFAULT_CHANNEL}static get HIDDEN(){return i.Token.HIDDEN_CHANNEL}reset(l){(l===void 0||l)&&this._input.seek(0),this._token=void 0,this._type=i.Token.INVALID_TYPE,this._channel=i.Token.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartCharPositionInLine=-1,this._tokenStartLine=-1,this._text=void 0,this._hitEOF=!1,this._mode=hr.DEFAULT_MODE,this._modeStack.clear(),this.interpreter.reset()}nextToken(){if(this._input==null)throw new Error("nextToken requires a non-null input stream.");let l=this._input.mark();try{e:for(;;){if(this._hitEOF)return this.emitEOF();this._token=void 0,this._channel=i.Token.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartCharPositionInLine=this.interpreter.charPositionInLine,this._tokenStartLine=this.interpreter.line,this._text=void 0;do{this._type=i.Token.INVALID_TYPE;let c;try{c=this.interpreter.match(this._input,this._mode)}catch(p){if(p instanceof r.LexerNoViableAltException)this.notifyListeners(p),this.recover(p),c=hr.SKIP;else throw p}if(this._input.LA(1)===h.IntStream.EOF&&(this._hitEOF=!0),this._type===i.Token.INVALID_TYPE&&(this._type=c),this._type===hr.SKIP)continue e}while(this._type===hr.MORE);return this._token==null?this.emit():this._token}}finally{this._input.release(l)}}skip(){this._type=hr.SKIP}more(){this._type=hr.MORE}mode(l){this._mode=l}pushMode(l){u.LexerATNSimulator.debug&&console.log("pushMode "+l),this._modeStack.push(this._mode),this.mode(l)}popMode(){if(this._modeStack.isEmpty)throw new Error("EmptyStackException");return u.LexerATNSimulator.debug&&console.log("popMode back to "+this._modeStack.peek()),this.mode(this._modeStack.pop()),this._mode}get tokenFactory(){return this._factory}set tokenFactory(l){this._factory=l}get inputStream(){return this._input}set inputStream(l){this.reset(!1),this._input=l,this._tokenFactorySourcePair={source:this,stream:this._input}}get sourceName(){return this._input.sourceName}emit(l){return l||(l=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.charIndex-1,this._tokenStartLine,this._tokenStartCharPositionInLine)),this._token=l,l}emitEOF(){let l=this.charPositionInLine,c=this.line,p=this._factory.create(this._tokenFactorySourcePair,i.Token.EOF,void 0,i.Token.DEFAULT_CHANNEL,this._input.index,this._input.index-1,c,l);return this.emit(p),p}get line(){return this.interpreter.line}set line(l){this.interpreter.line=l}get charPositionInLine(){return this.interpreter.charPositionInLine}set charPositionInLine(l){this.interpreter.charPositionInLine=l}get charIndex(){return this._input.index}get text(){return this._text!=null?this._text:this.interpreter.getText(this._input)}set text(l){this._text=l}get token(){return this._token}set token(l){this._token=l}set type(l){this._type=l}get type(){return this._type}set channel(l){this._channel=l}get channel(){return this._channel}getAllTokens(){let l=[],c=this.nextToken();for(;c.type!==i.Token.EOF;)l.push(c),c=this.nextToken();return l}notifyListeners(l){let c=this._input.getText(y.Interval.of(this._tokenStartCharIndex,this._input.index)),p="token recognition error at: '"+this.getErrorDisplay(c)+"'",v=this.getErrorListenerDispatch();v.syntaxError&&v.syntaxError(this,void 0,this._tokenStartLine,this._tokenStartCharPositionInLine,p,l)}getErrorDisplay(l){if(typeof l=="number"){switch(l){case i.Token.EOF:return"<EOF>";case 10:return"\\n";case 9:return"\\t";case 13:return"\\r"}return String.fromCharCode(l)}return l.replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")}getCharErrorDisplay(l){return"'"+this.getErrorDisplay(l)+"'"}recover(l){l instanceof r.LexerNoViableAltException?this._input.LA(1)!==h.IntStream.EOF&&this.interpreter.consume(this._input):this._input.consume()}};return e.DEFAULT_MODE=0,e.MORE=-2,e.SKIP=-3,e.MIN_CHAR_VALUE=0,e.MAX_CHAR_VALUE=1114111,a([o.Override],e.prototype,"nextToken",null),a([o.Override],e.prototype,"tokenFactory",null),a([o.Override],e.prototype,"inputStream",null),a([o.Override],e.prototype,"sourceName",null),a([o.Override],e.prototype,"line",null),a([o.Override],e.prototype,"charPositionInLine",null),zr.Lexer=e,zr}var uc;function Ln(){if(uc)return yt;uc=1;/*!
|
|
247
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
248
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
249
|
+
*/var a=yt&&yt.__decorate||function(e,s,l,c){var p=arguments.length,v=p<3?s:c===null?c=Object.getOwnPropertyDescriptor(s,l):c,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,l,c);else for(var g=e.length-1;g>=0;g--)(x=e[g])&&(v=(p<3?x(v):p>3?x(s,l,v):x(s,l))||v);return p>3&&v&&Object.defineProperty(s,l,v),v},d=yt&&yt.__param||function(e,s){return function(l,c){s(l,c,e)}};Object.defineProperty(yt,"__esModule",{value:!0}),yt.IntervalSet=void 0;const m=eo(),y=Ea(),h=je(),u=vr(),r=Ie(),o=ue(),t=Fe();let i=class Re{constructor(s){this.readonly=!1,s!=null?this._intervals=s.slice(0):this._intervals=[]}static get COMPLETE_CHAR_SET(){return Re._COMPLETE_CHAR_SET===void 0&&(Re._COMPLETE_CHAR_SET=Re.of(u.Lexer.MIN_CHAR_VALUE,u.Lexer.MAX_CHAR_VALUE),Re._COMPLETE_CHAR_SET.setReadonly(!0)),Re._COMPLETE_CHAR_SET}static get EMPTY_SET(){return Re._EMPTY_SET==null&&(Re._EMPTY_SET=new Re,Re._EMPTY_SET.setReadonly(!0)),Re._EMPTY_SET}static of(s,l=s){let c=new Re;return c.add(s,l),c}clear(){if(this.readonly)throw new Error("can't alter readonly IntervalSet");this._intervals.length=0}add(s,l=s){this.addRange(h.Interval.of(s,l))}addRange(s){if(this.readonly)throw new Error("can't alter readonly IntervalSet");if(!(s.b<s.a)){for(let l=0;l<this._intervals.length;l++){let c=this._intervals[l];if(s.equals(c))return;if(s.adjacent(c)||!s.disjoint(c)){let p=s.union(c);for(this._intervals[l]=p;l<this._intervals.length-1;){l++;let v=this._intervals[l];if(!p.adjacent(v)&&p.disjoint(v))break;this._intervals.splice(l,1),l--,this._intervals[l]=p.union(v)}return}if(s.startsBeforeDisjoint(c)){this._intervals.splice(l,0,s);return}}this._intervals.push(s)}}static or(s){let l=new Re;for(let c of s)l.addAll(c);return l}addAll(s){if(s==null)return this;if(s instanceof Re){let l=s,c=l._intervals.length;for(let p=0;p<c;p++){let v=l._intervals[p];this.add(v.a,v.b)}}else for(let l of s.toArray())this.add(l);return this}complementRange(s,l){return this.complement(Re.of(s,l))}complement(s){if(s.isNil)return Re.EMPTY_SET;let l;return s instanceof Re?l=s:(l=new Re,l.addAll(s)),l.subtract(this)}subtract(s){if(s==null||s.isNil)return new Re(this._intervals);if(s instanceof Re)return Re.subtract(this,s);let l=new Re;return l.addAll(s),Re.subtract(this,l)}static subtract(s,l){if(s.isNil)return new Re;let c=new Re(s._intervals);if(l.isNil)return c;let p=0,v=0;for(;p<c._intervals.length&&v<l._intervals.length;){let x=c._intervals[p],g=l._intervals[v];if(g.b<x.a){v++;continue}if(g.a>x.b){p++;continue}let _,A;if(g.a>x.a&&(_=new h.Interval(x.a,g.a-1)),g.b<x.b&&(A=new h.Interval(g.b+1,x.b)),_)if(A){c._intervals[p]=_,c._intervals.splice(p+1,0,A),p++,v++;continue}else{c._intervals[p]=_,p++;continue}else if(A){c._intervals[p]=A,v++;continue}else{c._intervals.splice(p,1);continue}}return c}or(s){let l=new Re;return l.addAll(this),l.addAll(s),l}and(s){if(s.isNil)return new Re;let l=this._intervals,c=s._intervals,p,v=l.length,x=c.length,g=0,_=0;for(;g<v&&_<x;){let A=l[g],E=c[_];A.startsBeforeDisjoint(E)?g++:E.startsBeforeDisjoint(A)?_++:A.properlyContains(E)?(p||(p=new Re),p.addRange(A.intersection(E)),_++):E.properlyContains(A)?(p||(p=new Re),p.addRange(A.intersection(E)),g++):A.disjoint(E)||(p||(p=new Re),p.addRange(A.intersection(E)),A.startsAfterNonDisjoint(E)?_++:E.startsAfterNonDisjoint(A)&&g++)}return p||new Re}contains(s){let l=this._intervals.length,c=0,p=l-1;for(;c<=p;){let v=c+p>>1,x=this._intervals[v],g=x.a;if(x.b<s)c=v+1;else if(g>s)p=v-1;else return!0}return!1}get isNil(){return this._intervals==null||this._intervals.length===0}get maxElement(){if(this.isNil)throw new RangeError("set is empty");return this._intervals[this._intervals.length-1].b}get minElement(){if(this.isNil)throw new RangeError("set is empty");return this._intervals[0].a}get intervals(){return this._intervals}hashCode(){let s=r.MurmurHash.initialize();for(let l of this._intervals)s=r.MurmurHash.update(s,l.a),s=r.MurmurHash.update(s,l.b);return s=r.MurmurHash.finish(s,this._intervals.length*2),s}equals(s){return s==null||!(s instanceof Re)?!1:m.ArrayEqualityComparator.INSTANCE.equals(this._intervals,s._intervals)}toString(s=!1){let l="";if(this._intervals==null||this._intervals.length===0)return"{}";this.size>1&&(l+="{");let c=!0;for(let p of this._intervals){c?c=!1:l+=", ";let v=p.a,x=p.b;v===x?v===t.Token.EOF?l+="<EOF>":s?l+="'"+String.fromCodePoint(v)+"'":l+=v:s?l+="'"+String.fromCodePoint(v)+"'..'"+String.fromCodePoint(x)+"'":l+=v+".."+x}return this.size>1&&(l+="}"),l}toStringVocabulary(s){if(this._intervals==null||this._intervals.length===0)return"{}";let l="";this.size>1&&(l+="{");let c=!0;for(let p of this._intervals){c?c=!1:l+=", ";let v=p.a,x=p.b;if(v===x)l+=this.elementName(s,v);else for(let g=v;g<=x;g++)g>v&&(l+=", "),l+=this.elementName(s,g)}return this.size>1&&(l+="}"),l}elementName(s,l){return l===t.Token.EOF?"<EOF>":l===t.Token.EPSILON?"<EPSILON>":s.getDisplayName(l)}get size(){let s=0,l=this._intervals.length;if(l===1){let c=this._intervals[0];return c.b-c.a+1}for(let c=0;c<l;c++){let p=this._intervals[c];s+=p.b-p.a+1}return s}toIntegerList(){let s=new y.IntegerList(this.size),l=this._intervals.length;for(let c=0;c<l;c++){let p=this._intervals[c],v=p.a,x=p.b;for(let g=v;g<=x;g++)s.add(g)}return s}toSet(){let s=new Set;for(let l of this._intervals){let c=l.a,p=l.b;for(let v=c;v<=p;v++)s.add(v)}return s}toArray(){let s=new Array,l=this._intervals.length;for(let c=0;c<l;c++){let p=this._intervals[c],v=p.a,x=p.b;for(let g=v;g<=x;g++)s.push(g)}return s}remove(s){if(this.readonly)throw new Error("can't alter readonly IntervalSet");let l=this._intervals.length;for(let c=0;c<l;c++){let p=this._intervals[c],v=p.a,x=p.b;if(s<v)break;if(s===v&&s===x){this._intervals.splice(c,1);break}if(s===v){this._intervals[c]=h.Interval.of(p.a+1,p.b);break}if(s===x){this._intervals[c]=h.Interval.of(p.a,p.b-1);break}if(s>v&&s<x){let g=p.b;this._intervals[c]=h.Interval.of(p.a,s-1),this.add(s+1,g)}}}get isReadonly(){return this.readonly}setReadonly(s){if(this.readonly&&!s)throw new Error("can't alter readonly IntervalSet");this.readonly=s}};return a([o.Override],i.prototype,"addAll",null),a([o.Override],i.prototype,"complement",null),a([o.Override],i.prototype,"subtract",null),a([o.Override],i.prototype,"or",null),a([o.Override],i.prototype,"and",null),a([o.Override],i.prototype,"contains",null),a([o.Override],i.prototype,"isNil",null),a([o.Override],i.prototype,"hashCode",null),a([o.Override],i.prototype,"equals",null),a([d(0,o.NotNull)],i.prototype,"toStringVocabulary",null),a([o.NotNull,d(0,o.NotNull)],i.prototype,"elementName",null),a([o.Override],i.prototype,"size",null),a([o.Override],i.prototype,"remove",null),a([o.NotNull],i,"of",null),a([o.NotNull],i,"subtract",null),yt.IntervalSet=i,yt}var Wr={},Qr={},lc;function rp(){if(lc)return Qr;lc=1;/*!
|
|
250
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
251
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
252
|
+
*/var a=Qr&&Qr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.BasicState=void 0;const d=pr(),m=Be(),y=ue();let h=class extends d.ATNState{get stateType(){return m.ATNStateType.BASIC}};return a([y.Override],h.prototype,"stateType",null),Qr.BasicState=h,Qr}var cc;function np(){if(cc)return Wr;cc=1;/*!
|
|
253
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
254
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
255
|
+
*/var a=Wr&&Wr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.InvalidState=void 0;const d=Be(),m=rp(),y=ue();let h=class extends m.BasicState{get stateType(){return d.ATNStateType.INVALID_TYPE}};return a([y.Override],h.prototype,"stateType",null),Wr.InvalidState=h,Wr}var vt={},ci={},Et={},fc;function Er(){if(fc)return Et;fc=1;/*!
|
|
256
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
257
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
258
|
+
*/var a=Et&&Et.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=Et&&Et.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(Et,"__esModule",{value:!0}),Et.Transition=void 0;const m=ue();let y=class{constructor(u){if(u==null)throw new Error("target cannot be null.");this.target=u}get isEpsilon(){return!1}get label(){}};return y.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],a([m.NotNull],y.prototype,"target",void 0),y=a([d(0,m.NotNull)],y),Et.Transition=y,Et}var pc;function Ta(){if(pc)return ci;pc=1;/*!
|
|
259
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
260
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
261
|
+
*/Object.defineProperty(ci,"__esModule",{value:!0}),ci.AbstractPredicateTransition=void 0;const a=Er();let d=class extends a.Transition{constructor(y){super(y)}};return ci.AbstractPredicateTransition=d,ci}var St={},Tt={},hc;function ba(){if(hc)return Tt;hc=1;/*!
|
|
262
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
263
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
264
|
+
*/var a=Tt&&Tt.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l},d=Tt&&Tt.__param||function(o,t){return function(i,e){t(i,e,o)}};Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.SetTransition=void 0;const m=Ln(),y=ue(),h=Fe(),u=Er();let r=class extends u.Transition{constructor(t,i){super(t),i==null&&(i=m.IntervalSet.of(h.Token.INVALID_TYPE)),this.set=i}get serializationType(){return 7}get label(){return this.set}matches(t,i,e){return this.set.contains(t)}toString(){return this.set.toString()}};return a([y.NotNull],r.prototype,"set",void 0),a([y.Override],r.prototype,"serializationType",null),a([y.Override,y.NotNull],r.prototype,"label",null),a([y.Override],r.prototype,"matches",null),a([y.Override,y.NotNull],r.prototype,"toString",null),r=a([d(0,y.NotNull),d(1,y.Nullable)],r),Tt.SetTransition=r,Tt}var xc;function Na(){if(xc)return St;xc=1;/*!
|
|
265
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
266
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
267
|
+
*/var a=St&&St.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=St&&St.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(St,"__esModule",{value:!0}),St.NotSetTransition=void 0;const m=ue(),y=ba();let h=class extends y.SetTransition{constructor(r,o){super(r,o)}get serializationType(){return 8}matches(r,o,t){return r>=o&&r<=t&&!super.matches(r,o,t)}toString(){return"~"+super.toString()}};return a([m.Override],h.prototype,"serializationType",null),a([m.Override],h.prototype,"matches",null),a([m.Override],h.prototype,"toString",null),h=a([d(0,m.NotNull),d(1,m.Nullable)],h),St.NotSetTransition=h,St}var bt={},dc;function Ca(){if(dc)return bt;dc=1;/*!
|
|
268
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
269
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
270
|
+
*/var a=bt&&bt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=bt&&bt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(bt,"__esModule",{value:!0}),bt.RuleTransition=void 0;const m=ue(),y=Er();let h=class extends y.Transition{constructor(r,o,t,i){super(r),this.tailCall=!1,this.optimizedTailCall=!1,this.ruleIndex=o,this.precedence=t,this.followState=i}get serializationType(){return 3}get isEpsilon(){return!0}matches(r,o,t){return!1}};return a([m.NotNull],h.prototype,"followState",void 0),a([m.Override],h.prototype,"serializationType",null),a([m.Override],h.prototype,"isEpsilon",null),a([m.Override],h.prototype,"matches",null),h=a([d(0,m.NotNull),d(3,m.NotNull)],h),bt.RuleTransition=h,bt}var Nt={},yc;function ip(){if(yc)return Nt;yc=1;/*!
|
|
271
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
272
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
273
|
+
*/var a=Nt&&Nt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Nt&&Nt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.WildcardTransition=void 0;const m=ue(),y=Er();let h=class extends y.Transition{constructor(r){super(r)}get serializationType(){return 9}matches(r,o,t){return r>=o&&r<=t}toString(){return"."}};return a([m.Override],h.prototype,"serializationType",null),a([m.Override],h.prototype,"matches",null),a([m.Override,m.NotNull],h.prototype,"toString",null),h=a([d(0,m.NotNull)],h),Nt.WildcardTransition=h,Nt}var mc;function Vh(){if(mc)return vt;mc=1;/*!
|
|
274
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
275
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
276
|
+
*/var a=vt&&vt.__decorate||function(x,g,_,A){var E=arguments.length,D=E<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,_):A,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(x,g,_,A);else for(var w=x.length-1;w>=0;w--)(N=x[w])&&(D=(E<3?N(D):E>3?N(g,_,D):N(g,_))||D);return E>3&&D&&Object.defineProperty(g,_,D),D},d=vt&&vt.__param||function(x,g){return function(_,A){g(_,A,x)}};Object.defineProperty(vt,"__esModule",{value:!0}),vt.LL1Analyzer=void 0;const m=Ta(),y=mr(),h=to(),u=gr(),r=Ln(),o=ue(),t=Na(),i=it(),e=rt(),s=Li(),l=Ca(),c=Fe(),p=ip();let v=class oa{constructor(g){this.atn=g}getDecisionLookahead(g){if(g==null)return;let _=new Array(g.numberOfTransitions);for(let A=0;A<g.numberOfTransitions;A++){let E=new r.IntervalSet;_[A]=E;let D=new y.Array2DHashSet(i.ObjectEqualityComparator.INSTANCE);this._LOOK(g.transition(A).target,void 0,e.PredictionContext.EMPTY_LOCAL,E,D,new u.BitSet,!1,!1),(E.size===0||E.contains(oa.HIT_PRED))&&(E=void 0,_[A]=E)}return _}LOOK(g,_,A){if(A===void 0){if(g.atn==null)throw new Error("Illegal state");A=g.atn.ruleToStopState[g.ruleIndex]}else A===null&&(A=void 0);let E=new r.IntervalSet;return this._LOOK(g,A,_,E,new y.Array2DHashSet,new u.BitSet,!0,!0),E}_LOOK(g,_,A,E,D,N,w,P){let $=h.ATNConfig.create(g,0,A);if(!D.add($))return;if(g===_){if(e.PredictionContext.isEmptyLocal(A)){E.add(c.Token.EPSILON);return}else if(A.isEmpty){P&&E.add(c.Token.EOF);return}}if(g instanceof s.RuleStopState){if(A.isEmpty&&!e.PredictionContext.isEmptyLocal(A)){P&&E.add(c.Token.EOF);return}let L=N.get(g.ruleIndex);try{N.clear(g.ruleIndex);for(let q=0;q<A.size;q++){if(A.getReturnState(q)===e.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let W=this.atn.states[A.getReturnState(q)];this._LOOK(W,_,A.getParent(q),E,D,N,w,P)}}finally{L&&N.set(g.ruleIndex)}}let Y=g.numberOfTransitions;for(let L=0;L<Y;L++){let q=g.transition(L);if(q instanceof l.RuleTransition){if(N.get(q.ruleIndex))continue;let W=A.getChild(q.followState.stateNumber);try{N.set(q.ruleIndex),this._LOOK(q.target,_,W,E,D,N,w,P)}finally{N.clear(q.ruleIndex)}}else if(q instanceof m.AbstractPredicateTransition)w?this._LOOK(q.target,_,A,E,D,N,w,P):E.add(oa.HIT_PRED);else if(q.isEpsilon)this._LOOK(q.target,_,A,E,D,N,w,P);else if(q instanceof p.WildcardTransition)E.addAll(r.IntervalSet.of(c.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType));else{let W=q.label;W!=null&&(q instanceof t.NotSetTransition&&(W=W.complement(r.IntervalSet.of(c.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType))),E.addAll(W))}}}};return v.HIT_PRED=c.Token.INVALID_TYPE,a([o.NotNull],v.prototype,"atn",void 0),a([o.NotNull,d(0,o.NotNull),d(1,o.NotNull)],v.prototype,"LOOK",null),a([d(0,o.NotNull),d(2,o.NotNull),d(3,o.NotNull),d(4,o.NotNull),d(5,o.NotNull)],v.prototype,"_LOOK",null),v=a([d(0,o.NotNull)],v),vt.LL1Analyzer=v,vt}var gc;function st(){return gc||(gc=1,function(a){/*!
|
|
277
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
278
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
279
|
+
*/var d=Rr&&Rr.__decorate||function(p,v,x,g){var _=arguments.length,A=_<3?v:g===null?g=Object.getOwnPropertyDescriptor(v,x):g,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(p,v,x,g);else for(var D=p.length-1;D>=0;D--)(E=p[D])&&(A=(_<3?E(A):_>3?E(v,x,A):E(v,x))||A);return _>3&&A&&Object.defineProperty(v,x,A),A},m=Rr&&Rr.__param||function(p,v){return function(x,g){v(x,g,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ATN=void 0;const y=Vn(),h=K0(),u=Ln(),r=np(),o=Vh(),t=ue(),i=it(),e=rt(),s=Fe(),l=qe();let c=class{constructor(v,x){this.states=[],this.decisionToState=[],this.modeNameToStartState=new Map,this.modeToStartState=[],this.contextCache=new y.Array2DHashMap(i.ObjectEqualityComparator.INSTANCE),this.decisionToDFA=[],this.modeToDFA=[],this.LL1Table=new Map,this.grammarType=v,this.maxTokenType=x}clearDFA(){this.decisionToDFA=new Array(this.decisionToState.length);for(let v=0;v<this.decisionToDFA.length;v++)this.decisionToDFA[v]=new h.DFA(this.decisionToState[v],v);this.modeToDFA=new Array(this.modeToStartState.length);for(let v=0;v<this.modeToDFA.length;v++)this.modeToDFA[v]=new h.DFA(this.modeToStartState[v]);this.contextCache.clear(),this.LL1Table.clear()}get contextCacheSize(){return this.contextCache.size}getCachedContext(v){return e.PredictionContext.getCachedContext(v,this.contextCache,new e.PredictionContext.IdentityHashMap)}getDecisionToDFA(){return l(this.decisionToDFA!=null&&this.decisionToDFA.length===this.decisionToState.length),this.decisionToDFA}nextTokens(v,x){return x?new o.LL1Analyzer(this).LOOK(v,x):(v.nextTokenWithinRule||(v.nextTokenWithinRule=this.nextTokens(v,e.PredictionContext.EMPTY_LOCAL),v.nextTokenWithinRule.setReadonly(!0)),v.nextTokenWithinRule)}addState(v){v.atn=this,v.stateNumber=this.states.length,this.states.push(v)}removeState(v){let x=new r.InvalidState;x.atn=this,x.stateNumber=v.stateNumber,this.states[v.stateNumber]=x}defineMode(v,x){this.modeNameToStartState.set(v,x),this.modeToStartState.push(x),this.modeToDFA.push(new h.DFA(x)),this.defineDecisionState(x)}defineDecisionState(v){return this.decisionToState.push(v),v.decision=this.decisionToState.length-1,this.decisionToDFA.push(new h.DFA(v,v.decision)),v.decision}getDecisionState(v){if(this.decisionToState.length>0)return this.decisionToState[v]}get numberOfDecisions(){return this.decisionToState.length}getExpectedTokens(v,x){if(v<0||v>=this.states.length)throw new RangeError("Invalid state number.");let g=x,_=this.states[v],A=this.nextTokens(_);if(!A.contains(s.Token.EPSILON))return A;let E=new u.IntervalSet;for(E.addAll(A),E.remove(s.Token.EPSILON);g!=null&&g.invokingState>=0&&A.contains(s.Token.EPSILON);){let N=this.states[g.invokingState].transition(0);A=this.nextTokens(N.followState),E.addAll(A),E.remove(s.Token.EPSILON),g=g._parent}return A.contains(s.Token.EPSILON)&&E.add(s.Token.EOF),E}};d([t.NotNull],c.prototype,"states",void 0),d([t.NotNull],c.prototype,"decisionToState",void 0),d([t.NotNull],c.prototype,"modeNameToStartState",void 0),d([t.NotNull],c.prototype,"modeToStartState",void 0),d([t.NotNull],c.prototype,"decisionToDFA",void 0),d([t.NotNull],c.prototype,"modeToDFA",void 0),d([t.NotNull],c.prototype,"nextTokens",null),d([m(0,t.NotNull)],c.prototype,"removeState",null),d([m(0,t.NotNull),m(1,t.NotNull)],c.prototype,"defineMode",null),d([m(0,t.NotNull)],c.prototype,"defineDecisionState",null),d([t.NotNull],c.prototype,"getExpectedTokens",null),c=d([m(0,t.NotNull)],c),a.ATN=c,function(p){p.INVALID_ALT_NUMBER=0}(c=a.ATN||(a.ATN={})),a.ATN=c}(Rr)),Rr}var Qe={},Xr={},_c;function sp(){if(_c)return Xr;_c=1;/*!
|
|
280
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
281
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
282
|
+
*/var a=Xr&&Xr.__decorate||function(y,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(y,h,u,r);else for(var e=y.length-1;e>=0;e--)(i=y[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.ATNDeserializationOptions=void 0;const d=ue();let m=class qn{constructor(h){this.readOnly=!1,h?(this.verifyATN=h.verifyATN,this.generateRuleBypassTransitions=h.generateRuleBypassTransitions,this.optimize=h.optimize):(this.verifyATN=!0,this.generateRuleBypassTransitions=!1,this.optimize=!0)}static get defaultOptions(){return qn._defaultOptions==null&&(qn._defaultOptions=new qn,qn._defaultOptions.makeReadOnly()),qn._defaultOptions}get isReadOnly(){return this.readOnly}makeReadOnly(){this.readOnly=!0}get isVerifyATN(){return this.verifyATN}set isVerifyATN(h){this.throwIfReadOnly(),this.verifyATN=h}get isGenerateRuleBypassTransitions(){return this.generateRuleBypassTransitions}set isGenerateRuleBypassTransitions(h){this.throwIfReadOnly(),this.generateRuleBypassTransitions=h}get isOptimize(){return this.optimize}set isOptimize(h){this.throwIfReadOnly(),this.optimize=h}throwIfReadOnly(){if(this.isReadOnly)throw new Error("The object is read only.")}};return a([d.NotNull],m,"defaultOptions",null),Xr.ATNDeserializationOptions=m,Xr}var Ct={},Ot={},Ac;function ap(){if(Ac)return Ot;Ac=1;/*!
|
|
283
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
284
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
285
|
+
*/var a=Ot&&Ot.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Ot&&Ot.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.ActionTransition=void 0;const m=ue(),y=Er();let h=class extends y.Transition{constructor(r,o,t=-1,i=!1){super(r),this.ruleIndex=o,this.actionIndex=t,this.isCtxDependent=i}get serializationType(){return 6}get isEpsilon(){return!0}matches(r,o,t){return!1}toString(){return"action_"+this.ruleIndex+":"+this.actionIndex}};return a([m.Override],h.prototype,"serializationType",null),a([m.Override],h.prototype,"isEpsilon",null),a([m.Override],h.prototype,"matches",null),a([m.Override],h.prototype,"toString",null),h=a([d(0,m.NotNull)],h),Ot.ActionTransition=h,Ot}var Dt={},vc;function up(){if(vc)return Dt;vc=1;/*!
|
|
286
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
287
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
288
|
+
*/var a=Dt&&Dt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Dt&&Dt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.AtomTransition=void 0;const m=Ln(),y=ue(),h=Er();let u=class extends h.Transition{constructor(o,t){super(o),this._label=t}get serializationType(){return 5}get label(){return m.IntervalSet.of(this._label)}matches(o,t,i){return this._label===o}toString(){return String(this.label)}};return a([y.Override],u.prototype,"serializationType",null),a([y.Override,y.NotNull],u.prototype,"label",null),a([y.Override],u.prototype,"matches",null),a([y.Override,y.NotNull],u.prototype,"toString",null),u=a([d(0,y.NotNull)],u),Dt.AtomTransition=u,Dt}var Kr={},fi={},Ec;function so(){if(Ec)return fi;Ec=1;/*!
|
|
289
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
290
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
291
|
+
*/Object.defineProperty(fi,"__esModule",{value:!0}),fi.BlockStartState=void 0;const a=In();let d=class extends a.DecisionState{};return fi.BlockStartState=d,fi}var Sc;function zh(){if(Sc)return Kr;Sc=1;/*!
|
|
292
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
293
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
294
|
+
*/var a=Kr&&Kr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.BasicBlockStartState=void 0;const d=Be(),m=so(),y=ue();let h=class extends m.BlockStartState{get stateType(){return d.ATNStateType.BLOCK_START}};return a([y.Override],h.prototype,"stateType",null),Kr.BasicBlockStartState=h,Kr}var Jr={},Tc;function Hh(){if(Tc)return Jr;Tc=1;/*!
|
|
295
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
296
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
297
|
+
*/var a=Jr&&Jr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.BlockEndState=void 0;const d=pr(),m=Be(),y=ue();let h=class extends d.ATNState{get stateType(){return m.ATNStateType.BLOCK_END}};return a([y.Override],h.prototype,"stateType",null),Jr.BlockEndState=h,Jr}var wt={},bc;function Gh(){if(bc)return wt;bc=1;/*!
|
|
298
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
299
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
300
|
+
*/var a=wt&&wt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=wt&&wt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(wt,"__esModule",{value:!0}),wt.EpsilonTransition=void 0;const m=ue(),y=Er();let h=class extends y.Transition{constructor(r,o=-1){super(r),this._outermostPrecedenceReturn=o}get outermostPrecedenceReturn(){return this._outermostPrecedenceReturn}get serializationType(){return 1}get isEpsilon(){return!0}matches(r,o,t){return!1}toString(){return"epsilon"}};return a([m.Override],h.prototype,"serializationType",null),a([m.Override],h.prototype,"isEpsilon",null),a([m.Override],h.prototype,"matches",null),a([m.Override,m.NotNull],h.prototype,"toString",null),h=a([d(0,m.NotNull)],h),wt.EpsilonTransition=h,wt}var Rt={},Nc;function Yh(){if(Nc)return Rt;Nc=1;/*!
|
|
301
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
302
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
303
|
+
*/var a=Rt&&Rt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Rt&&Rt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.LexerChannelAction=void 0;const m=Ie(),y=ue();let h=class lp{constructor(r){this._channel=r}get channel(){return this._channel}get actionType(){return 0}get isPositionDependent(){return!1}execute(r){r.channel=this._channel}hashCode(){let r=m.MurmurHash.initialize();return r=m.MurmurHash.update(r,this.actionType),r=m.MurmurHash.update(r,this._channel),m.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof lp?this._channel===r._channel:!1}toString(){return`channel(${this._channel})`}};return a([y.Override],h.prototype,"actionType",null),a([y.Override],h.prototype,"isPositionDependent",null),a([y.Override,d(0,y.NotNull)],h.prototype,"execute",null),a([y.Override],h.prototype,"hashCode",null),a([y.Override],h.prototype,"equals",null),a([y.Override],h.prototype,"toString",null),Rt.LexerChannelAction=h,Rt}var Pt={},Cc;function Wh(){if(Cc)return Pt;Cc=1;/*!
|
|
304
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
305
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
306
|
+
*/var a=Pt&&Pt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Pt&&Pt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.LexerCustomAction=void 0;const m=Ie(),y=ue();let h=class cp{constructor(r,o){this._ruleIndex=r,this._actionIndex=o}get ruleIndex(){return this._ruleIndex}get actionIndex(){return this._actionIndex}get actionType(){return 1}get isPositionDependent(){return!0}execute(r){r.action(void 0,this._ruleIndex,this._actionIndex)}hashCode(){let r=m.MurmurHash.initialize();return r=m.MurmurHash.update(r,this.actionType),r=m.MurmurHash.update(r,this._ruleIndex),r=m.MurmurHash.update(r,this._actionIndex),m.MurmurHash.finish(r,3)}equals(r){return r===this?!0:r instanceof cp?this._ruleIndex===r._ruleIndex&&this._actionIndex===r._actionIndex:!1}};return a([y.Override],h.prototype,"actionType",null),a([y.Override],h.prototype,"isPositionDependent",null),a([y.Override,d(0,y.NotNull)],h.prototype,"execute",null),a([y.Override],h.prototype,"hashCode",null),a([y.Override],h.prototype,"equals",null),Pt.LexerCustomAction=h,Pt}var Ft={},Oc;function Qh(){if(Oc)return Ft;Oc=1;/*!
|
|
307
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
308
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
309
|
+
*/var a=Ft&&Ft.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Ft&&Ft.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.LexerModeAction=void 0;const m=Ie(),y=ue();let h=class fp{constructor(r){this._mode=r}get mode(){return this._mode}get actionType(){return 2}get isPositionDependent(){return!1}execute(r){r.mode(this._mode)}hashCode(){let r=m.MurmurHash.initialize();return r=m.MurmurHash.update(r,this.actionType),r=m.MurmurHash.update(r,this._mode),m.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof fp?this._mode===r._mode:!1}toString(){return`mode(${this._mode})`}};return a([y.Override],h.prototype,"actionType",null),a([y.Override],h.prototype,"isPositionDependent",null),a([y.Override,d(0,y.NotNull)],h.prototype,"execute",null),a([y.Override],h.prototype,"hashCode",null),a([y.Override],h.prototype,"equals",null),a([y.Override],h.prototype,"toString",null),Ft.LexerModeAction=h,Ft}var Zr={},Dc;function Xh(){return Dc||(Dc=1,function(a){/*!
|
|
310
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
311
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
312
|
+
*/var d=Zr&&Zr.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},m=Zr&&Zr.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LexerMoreAction=void 0;const y=Ie(),h=ue();let u=class{constructor(){}get actionType(){return 3}get isPositionDependent(){return!1}execute(o){o.more()}hashCode(){let o=y.MurmurHash.initialize();return o=y.MurmurHash.update(o,this.actionType),y.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return"more"}};d([h.Override],u.prototype,"actionType",null),d([h.Override],u.prototype,"isPositionDependent",null),d([h.Override,m(0,h.NotNull)],u.prototype,"execute",null),d([h.Override],u.prototype,"hashCode",null),d([h.Override],u.prototype,"equals",null),d([h.Override],u.prototype,"toString",null),a.LexerMoreAction=u,function(r){r.INSTANCE=new r}(u=a.LexerMoreAction||(a.LexerMoreAction={}))}(Zr)),Zr}var en={},wc;function Kh(){return wc||(wc=1,function(a){/*!
|
|
313
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
314
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
315
|
+
*/var d=en&&en.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},m=en&&en.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LexerPopModeAction=void 0;const y=Ie(),h=ue();let u=class{constructor(){}get actionType(){return 4}get isPositionDependent(){return!1}execute(o){o.popMode()}hashCode(){let o=y.MurmurHash.initialize();return o=y.MurmurHash.update(o,this.actionType),y.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return"popMode"}};d([h.Override],u.prototype,"actionType",null),d([h.Override],u.prototype,"isPositionDependent",null),d([h.Override,m(0,h.NotNull)],u.prototype,"execute",null),d([h.Override],u.prototype,"hashCode",null),d([h.Override],u.prototype,"equals",null),d([h.Override],u.prototype,"toString",null),a.LexerPopModeAction=u,function(r){r.INSTANCE=new r}(u=a.LexerPopModeAction||(a.LexerPopModeAction={}))}(en)),en}var It={},Rc;function Jh(){if(Rc)return It;Rc=1;/*!
|
|
316
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
317
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
318
|
+
*/var a=It&&It.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=It&&It.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(It,"__esModule",{value:!0}),It.LexerPushModeAction=void 0;const m=Ie(),y=ue();let h=class pp{constructor(r){this._mode=r}get mode(){return this._mode}get actionType(){return 5}get isPositionDependent(){return!1}execute(r){r.pushMode(this._mode)}hashCode(){let r=m.MurmurHash.initialize();return r=m.MurmurHash.update(r,this.actionType),r=m.MurmurHash.update(r,this._mode),m.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof pp?this._mode===r._mode:!1}toString(){return`pushMode(${this._mode})`}};return a([y.Override],h.prototype,"actionType",null),a([y.Override],h.prototype,"isPositionDependent",null),a([y.Override,d(0,y.NotNull)],h.prototype,"execute",null),a([y.Override],h.prototype,"hashCode",null),a([y.Override],h.prototype,"equals",null),a([y.Override],h.prototype,"toString",null),It.LexerPushModeAction=h,It}var tn={},Pc;function Zh(){return Pc||(Pc=1,function(a){/*!
|
|
319
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
320
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
321
|
+
*/var d=tn&&tn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},m=tn&&tn.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LexerSkipAction=void 0;const y=Ie(),h=ue();let u=class{constructor(){}get actionType(){return 6}get isPositionDependent(){return!1}execute(o){o.skip()}hashCode(){let o=y.MurmurHash.initialize();return o=y.MurmurHash.update(o,this.actionType),y.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return"skip"}};d([h.Override],u.prototype,"actionType",null),d([h.Override],u.prototype,"isPositionDependent",null),d([h.Override,m(0,h.NotNull)],u.prototype,"execute",null),d([h.Override],u.prototype,"hashCode",null),d([h.Override],u.prototype,"equals",null),d([h.Override],u.prototype,"toString",null),a.LexerSkipAction=u,function(r){r.INSTANCE=new r}(u=a.LexerSkipAction||(a.LexerSkipAction={}))}(tn)),tn}var Lt={},Fc;function ex(){if(Fc)return Lt;Fc=1;/*!
|
|
322
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
323
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
324
|
+
*/var a=Lt&&Lt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Lt&&Lt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.LexerTypeAction=void 0;const m=Ie(),y=ue();let h=class hp{constructor(r){this._type=r}get type(){return this._type}get actionType(){return 7}get isPositionDependent(){return!1}execute(r){r.type=this._type}hashCode(){let r=m.MurmurHash.initialize();return r=m.MurmurHash.update(r,this.actionType),r=m.MurmurHash.update(r,this._type),m.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof hp?this._type===r._type:!1}toString(){return`type(${this._type})`}};return a([y.Override],h.prototype,"actionType",null),a([y.Override],h.prototype,"isPositionDependent",null),a([y.Override,d(0,y.NotNull)],h.prototype,"execute",null),a([y.Override],h.prototype,"hashCode",null),a([y.Override],h.prototype,"equals",null),a([y.Override],h.prototype,"toString",null),Lt.LexerTypeAction=h,Lt}var rn={},Ic;function xp(){if(Ic)return rn;Ic=1;/*!
|
|
325
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
326
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
327
|
+
*/var a=rn&&rn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(rn,"__esModule",{value:!0}),rn.LoopEndState=void 0;const d=pr(),m=Be(),y=ue();let h=class extends d.ATNState{get stateType(){return m.ATNStateType.LOOP_END}};return a([y.Override],h.prototype,"stateType",null),rn.LoopEndState=h,rn}var Bt={},nn={},Lc;function tx(){if(Lc)return nn;Lc=1;/*!
|
|
328
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
329
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
330
|
+
*/var a=nn&&nn.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(nn,"__esModule",{value:!0}),nn.ConflictInfo=void 0;const d=ue(),m=ot();let y=class dp{constructor(u,r){this._conflictedAlts=u,this.exact=r}get conflictedAlts(){return this._conflictedAlts}get isExact(){return this.exact}equals(u){return u===this?!0:u instanceof dp?this.isExact===u.isExact&&m.equals(this.conflictedAlts,u.conflictedAlts):!1}hashCode(){return this.conflictedAlts.hashCode()}};return a([d.Override],y.prototype,"equals",null),a([d.Override],y.prototype,"hashCode",null),nn.ConflictInfo=y,nn}var on={},Bc;function ao(){if(Bc)return on;Bc=1;/*!
|
|
331
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
332
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
333
|
+
*/var a=on&&on.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(on,"__esModule",{value:!0}),on.NoViableAltException=void 0;const d=Mi(),m=Ar(),y=ue();let h=class extends m.RecognitionException{constructor(r,o,t,i,e,s){r instanceof d.Parser&&(o===void 0&&(o=r.inputStream),t===void 0&&(t=r.currentToken),i===void 0&&(i=r.currentToken),s===void 0&&(s=r.context)),super(r,o,s),this._deadEndConfigs=e,this._startToken=t,this.setOffendingToken(r,i)}get startToken(){return this._startToken}get deadEndConfigs(){return this._deadEndConfigs}};return a([y.NotNull],h.prototype,"_startToken",void 0),on.NoViableAltException=h,on}var sn={},an={},kc;function mp(){if(kc)return an;kc=1;/*!
|
|
334
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
335
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
336
|
+
*/var a=an&&an.__decorate||function(i,e,s,l){var c=arguments.length,p=c<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,s):l,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,e,s,l);else for(var x=i.length-1;x>=0;x--)(v=i[x])&&(p=(c<3?v(p):c>3?v(e,s,p):v(e,s))||p);return c>3&&p&&Object.defineProperty(e,s,p),p};Object.defineProperty(an,"__esModule",{value:!0}),an.RuleContext=void 0;const d=st(),m=Fi(),y=Di(),h=je(),u=ue(),r=Sr(),o=nt();let t=class yp extends y.RuleNode{constructor(e,s){super(),this._parent=e,this.invokingState=s??-1}static getChildContext(e,s){return new yp(e,s)}depth(){let e=0,s=this;for(;s;)s=s._parent,e++;return e}get isEmpty(){return this.invokingState===-1}get sourceInterval(){return h.Interval.INVALID}get ruleContext(){return this}get parent(){return this._parent}setParent(e){this._parent=e}get payload(){return this}get text(){if(this.childCount===0)return"";let e="";for(let s=0;s<this.childCount;s++)e+=this.getChild(s).text;return e.toString()}get ruleIndex(){return-1}get altNumber(){return d.ATN.INVALID_ALT_NUMBER}set altNumber(e){}getChild(e){throw new RangeError("i must be greater than or equal to 0 and less than childCount")}get childCount(){return 0}accept(e){return e.visitChildren(this)}toStringTree(e){return r.Trees.toStringTree(this,e)}toString(e,s){const l=e instanceof m.Recognizer?e.ruleNames:e;s=s||o.ParserRuleContext.emptyContext();let c="",p=this;for(c+="[";p&&p!==s;){if(!l)p.isEmpty||(c+=p.invokingState);else{let v=p.ruleIndex,x=v>=0&&v<l.length?l[v]:v.toString();c+=x}p._parent&&(l||!p._parent.isEmpty)&&(c+=" "),p=p._parent}return c+="]",c.toString()}};return a([u.Override],t.prototype,"sourceInterval",null),a([u.Override],t.prototype,"ruleContext",null),a([u.Override],t.prototype,"parent",null),a([u.Override],t.prototype,"setParent",null),a([u.Override],t.prototype,"payload",null),a([u.Override],t.prototype,"text",null),a([u.Override],t.prototype,"getChild",null),a([u.Override],t.prototype,"childCount",null),a([u.Override],t.prototype,"accept",null),a([u.Override],t.prototype,"toStringTree",null),an.RuleContext=t,an}var Mc;function nt(){if(Mc)return sn;Mc=1;/*!
|
|
337
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
338
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
339
|
+
*/var a=sn&&sn.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ParserRuleContext=void 0;const d=Oi(),m=je(),y=ue(),h=mp(),u=yr();let r=class sa extends h.RuleContext{constructor(t,i){i==null?super():super(t,i)}static emptyContext(){return sa.EMPTY}copyFrom(t){if(this._parent=t._parent,this.invokingState=t.invokingState,this._start=t._start,this._stop=t._stop,t.children){this.children=[];for(let i of t.children)i instanceof d.ErrorNode&&this.addChild(i)}}enterRule(t){}exitRule(t){}addAnyChild(t){return this.children?this.children.push(t):this.children=[t],t}addChild(t){if(t instanceof u.TerminalNode){t.setParent(this),this.addAnyChild(t);return}else if(t instanceof h.RuleContext){this.addAnyChild(t);return}else return t=new u.TerminalNode(t),this.addAnyChild(t),t.setParent(this),t}addErrorNode(t){if(t instanceof d.ErrorNode){const i=t;return i.setParent(this),this.addAnyChild(i)}else{const i=t;let e=new d.ErrorNode(i);return this.addAnyChild(e),e.setParent(this),e}}removeLastChild(){this.children&&this.children.pop()}get parent(){let t=super.parent;if(t===void 0||t instanceof sa)return t;throw new TypeError("Invalid parent type for ParserRuleContext")}getChild(t,i){if(!this.children||t<0||t>=this.children.length)throw new RangeError("index parameter must be between >= 0 and <= number of children.");if(i==null)return this.children[t];let e=this.tryGetChild(t,i);if(e===void 0)throw new Error("The specified node does not exist");return e}tryGetChild(t,i){if(!this.children||t<0||t>=this.children.length)return;let e=-1;for(let s of this.children)if(s instanceof i&&(e++,e===t))return s}getToken(t,i){let e=this.tryGetToken(t,i);if(e===void 0)throw new Error("The specified token does not exist");return e}tryGetToken(t,i){if(!this.children||i<0||i>=this.children.length)return;let e=-1;for(let s of this.children)if(s instanceof u.TerminalNode&&s.symbol.type===t&&(e++,e===i))return s}getTokens(t){let i=[];if(!this.children)return i;for(let e of this.children)e instanceof u.TerminalNode&&e.symbol.type===t&&i.push(e);return i}get ruleContext(){return this}getRuleContext(t,i){return this.getChild(t,i)}tryGetRuleContext(t,i){return this.tryGetChild(t,i)}getRuleContexts(t){let i=[];if(!this.children)return i;for(let e of this.children)e instanceof t&&i.push(e);return i}get childCount(){return this.children?this.children.length:0}get sourceInterval(){return this._start?!this._stop||this._stop.tokenIndex<this._start.tokenIndex?m.Interval.of(this._start.tokenIndex,this._start.tokenIndex-1):m.Interval.of(this._start.tokenIndex,this._stop.tokenIndex):m.Interval.INVALID}get start(){return this._start}get stop(){return this._stop}toInfoString(t){return"ParserRuleContext"+t.getRuleInvocationStack(this).reverse()+"{start="+this._start+", stop="+this._stop+"}"}};return r.EMPTY=new r,a([y.Override],r.prototype,"parent",null),a([y.Override],r.prototype,"childCount",null),a([y.Override],r.prototype,"sourceInterval",null),sn.ParserRuleContext=r,sn}var pi={},qc;function rx(){return qc||(qc=1,function(a){/*!
|
|
340
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
341
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
342
|
+
*/var d=pi&&pi.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(a,"__esModule",{value:!0}),a.PredictionMode=void 0;const m=Vn(),y=Ie(),h=ue(),u=Li();(function(r){r[r.SLL=0]="SLL",r[r.LL=1]="LL",r[r.LL_EXACT_AMBIG_DETECTION=2]="LL_EXACT_AMBIG_DETECTION"})(a.PredictionMode||(a.PredictionMode={})),function(r){class o extends m.Array2DHashMap{constructor(){super(t.INSTANCE)}}class t{AltAndContextConfigEqualityComparator(){}hashCode(l){let c=y.MurmurHash.initialize(7);return c=y.MurmurHash.update(c,l.state.stateNumber),c=y.MurmurHash.update(c,l.context),c=y.MurmurHash.finish(c,2),c}equals(l,c){return l===c?!0:l==null||c==null?!1:l.state.stateNumber===c.state.stateNumber&&l.context.equals(c.context)}}t.INSTANCE=new t,d([h.Override],t.prototype,"hashCode",null),d([h.Override],t.prototype,"equals",null);function i(s){for(let l of s)if(l.state instanceof u.RuleStopState)return!0;return!1}r.hasConfigInRuleStopState=i;function e(s){for(let l of s)if(!(l.state instanceof u.RuleStopState))return!1;return!0}r.allConfigsInRuleStopStates=e}(a.PredictionMode||(a.PredictionMode={}))}(pi)),pi}var kt={},jc;function gp(){if(jc)return kt;jc=1;/*!
|
|
343
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
344
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
345
|
+
*/var a=kt&&kt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=kt&&kt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(kt,"__esModule",{value:!0}),kt.SimulatorState=void 0;const m=ue(),y=nt();let h=class{constructor(r,o,t,i){this.outerContext=r??y.ParserRuleContext.emptyContext(),this.s0=o,this.useContext=t,this.remainingOuterContext=i}};return h=a([d(1,m.NotNull)],h),kt.SimulatorState=h,kt}var $c;function Bi(){if($c)return Bt;$c=1;/*!
|
|
346
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
347
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
348
|
+
*/var a=Bt&&Bt.__decorate||function(pe,O,T,C){var F=arguments.length,j=F<3?O:C===null?C=Object.getOwnPropertyDescriptor(O,T):C,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(pe,O,T,C);else for(var R=pe.length-1;R>=0;R--)(b=pe[R])&&(j=(F<3?b(j):F>3?b(O,T,j):b(O,T))||j);return F>3&&j&&Object.defineProperty(O,T,j),j},d=Bt&&Bt.__param||function(pe,O){return function(T,C){O(T,C,pe)}};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.ParserATNSimulator=void 0;const m=Z0(),y=ap(),h=mr(),u=ga(),r=st(),o=to(),t=Pi(),i=no(),e=Be(),s=up(),l=gr(),c=tx(),p=In(),v=ro(),x=Ea(),g=je(),_=dr(),A=ue(),E=Na(),D=ao(),N=it(),w=nt(),P=rt(),$=_a(),Y=rx(),L=Li(),q=Ca(),W=zn(),Z=ba(),I=gp(),Q=Fe(),re=_r(),fe=qe(),oe=65535,J=-2147483648;let te=class Ne extends i.ATNSimulator{constructor(O,T){super(O),this.predictionMode=Y.PredictionMode.LL,this.force_global_context=!1,this.always_try_local_context=!0,this.enable_global_context_dfa=!1,this.optimize_unique_closure=!0,this.optimize_ll1=!0,this.optimize_tail_calls=!0,this.tail_call_preserves_sll=!0,this.treat_sllk1_conflict_as_ambiguity=!1,this.reportAmbiguities=!1,this.userWantsCtxSensitive=!0,this._parser=T}getPredictionMode(){return this.predictionMode}setPredictionMode(O){this.predictionMode=O}reset(){}adaptivePredict(O,T,C,F){F===void 0&&(F=!1);let j=this.atn.decisionToDFA[T];if(fe(j!=null),this.optimize_ll1&&!j.isPrecedenceDfa&&!j.isEmpty){let V=O.LA(1);if(V>=0&&V<=65535){let G=(T<<16>>>0)+V,U=this.atn.LL1Table.get(G);if(U!=null)return U}}this.dfa=j,this.force_global_context?F=!0:this.always_try_local_context||(F=F||j.isContextSensitive),this.userWantsCtxSensitive=F||this.predictionMode!==Y.PredictionMode.SLL&&C!=null&&!this.atn.decisionToState[T].sll,C==null&&(C=w.ParserRuleContext.emptyContext());let b;j.isEmpty||(b=this.getStartState(j,O,C,F)),b==null&&(C==null&&(C=w.ParserRuleContext.emptyContext()),Ne.debug&&console.log("ATN decision "+j.decision+" exec LA(1)=="+this.getLookaheadName(O)+", outerContext="+C.toString(this._parser)),b=this.computeStartState(j,C,F));let R=O.mark(),k=O.index;try{let V=this.execDFA(j,O,k,b);return Ne.debug&&console.log("DFA after predictATN: "+j.toString(this._parser.vocabulary,this._parser.ruleNames)),V}finally{this.dfa=void 0,O.seek(k),O.release(R)}}getStartState(O,T,C,F){if(!F)if(O.isPrecedenceDfa){let R=O.getPrecedenceStartState(this._parser.precedence,!1);return R==null?void 0:new I.SimulatorState(C,R,!1,C)}else return O.s0==null?void 0:new I.SimulatorState(C,O.s0,!1,C);if(!this.enable_global_context_dfa)return;let j=C;fe(C!=null);let b;for(O.isPrecedenceDfa?b=O.getPrecedenceStartState(this._parser.precedence,!0):b=O.s0full;j!=null&&b!=null&&b.isContextSensitive;)j=this.skipTailCalls(j),b=b.getContextTarget(this.getReturnState(j)),j.isEmpty?fe(b==null||!b.isContextSensitive):j=j.parent;if(b!=null)return new I.SimulatorState(C,b,F,j)}execDFA(O,T,C,F){let j=F.outerContext;Ne.dfa_debug&&console.log("DFA decision "+O.decision+" exec LA(1)=="+this.getLookaheadName(T)+", outerContext="+j.toString(this._parser)),Ne.dfa_debug&&console.log(O.toString(this._parser.vocabulary,this._parser.ruleNames));let b=F.s0,R=T.LA(1),k=F.remainingOuterContext;for(;;){if(Ne.dfa_debug&&console.log("DFA state "+b.stateNumber+" LA(1)=="+this.getLookaheadName(T)),F.useContext)for(;b.isContextSymbol(R);){let U;if(k!=null&&(k=this.skipTailCalls(k),U=b.getContextTarget(this.getReturnState(k))),U==null){let z=new I.SimulatorState(F.outerContext,b,F.useContext,k);return this.execATN(O,T,C,z)}fe(k!=null),k=k.parent,b=U}if(this.isAcceptState(b,F.useContext)){b.predicates!=null?Ne.dfa_debug&&console.log("accept "+b):Ne.dfa_debug&&console.log("accept; predict "+b.prediction+" in state "+b.stateNumber);break}fe(!this.isAcceptState(b,F.useContext));let G=this.getExistingTargetState(b,R);if(G==null){Ne.dfa_debug&&R>=0&&console.log("no edge for "+this._parser.vocabulary.getDisplayName(R));let U;if(Ne.dfa_debug){let K=g.Interval.of(C,this._parser.inputStream.index);console.log("ATN exec upon "+this._parser.inputStream.getText(K)+" at DFA state "+b.stateNumber)}let z=new I.SimulatorState(j,b,F.useContext,k);return U=this.execATN(O,T,C,z),Ne.dfa_debug&&console.log("back from DFA update, alt="+U+`, dfa=
|
|
349
|
+
`+O.toString(this._parser.vocabulary,this._parser.ruleNames)),Ne.dfa_debug&&console.log("DFA decision "+O.decision+" predicts "+U),U}else if(G===i.ATNSimulator.ERROR){let U=new I.SimulatorState(j,b,F.useContext,k);return this.handleNoViableAlt(T,C,U)}b=G,!this.isAcceptState(b,F.useContext)&&R!==_.IntStream.EOF&&(T.consume(),R=T.LA(1))}if(!F.useContext&&b.configs.conflictInfo!=null&&O.atnStartState instanceof p.DecisionState&&!(!this.userWantsCtxSensitive||!b.configs.dipsIntoOuterContext&&b.configs.isExactConflict||this.treat_sllk1_conflict_as_ambiguity&&T.index===C)){fe(!F.useContext);let G,U=b.predicates;if(U!=null){let z=T.index;if(z!==C&&T.seek(C),G=this.evalSemanticContext(U,j,!0),G.cardinality()===1)return G.nextSetBit(0);z!==C&&T.seek(z)}if(this.reportAmbiguities){let z=new I.SimulatorState(j,b,F.useContext,k);this.reportAttemptingFullContext(O,G,z,C,T.index)}return T.seek(C),this.adaptivePredict(T,O.decision,j,!0)}let V=b.predicates;if(V!=null){let G=T.index;C!==G&&T.seek(C);let U=this.evalSemanticContext(V,j,this.reportAmbiguities&&this.predictionMode===Y.PredictionMode.LL_EXACT_AMBIG_DETECTION);switch(U.cardinality()){case 0:throw this.noViableAlt(T,j,b.configs,C);case 1:return U.nextSetBit(0);default:return C!==G&&T.seek(G),this.reportAmbiguity(O,b,C,G,b.configs.isExactConflict,U,b.configs),U.nextSetBit(0)}}return Ne.dfa_debug&&console.log("DFA decision "+O.decision+" predicts "+b.prediction),b.prediction}isAcceptState(O,T){return O.isAcceptState?O.configs.conflictingAlts==null?!0:T&&this.predictionMode===Y.PredictionMode.LL_EXACT_AMBIG_DETECTION?O.configs.isExactConflict:!0:!1}execATN(O,T,C,F){Ne.debug&&console.log("execATN decision "+O.decision+" exec LA(1)=="+this.getLookaheadName(T));let j=F.outerContext,b=F.useContext,R=T.LA(1),k=F,V=new $.PredictionContextCache;for(;;){let G=this.computeReachSet(O,k,R,V);if(G==null)return this.setDFAEdge(k.s0,T.LA(1),i.ATNSimulator.ERROR),this.handleNoViableAlt(T,C,k);let U=G.s0;if(fe(U.isAcceptState||U.prediction===r.ATN.INVALID_ALT_NUMBER),fe(U.isAcceptState||U.configs.conflictInfo==null),this.isAcceptState(U,b)){let z=U.configs.conflictingAlts,K=z==null?U.prediction:r.ATN.INVALID_ALT_NUMBER;if(K!==r.ATN.INVALID_ALT_NUMBER){if(this.optimize_ll1&&T.index===C&&!O.isPrecedenceDfa&&G.outerContext===G.remainingOuterContext&&O.decision>=0&&!U.configs.hasSemanticContext&&R>=0&&R<=oe){let le=(O.decision<<16>>>0)+R;this.atn.LL1Table.set(le,K)}b&&this.always_try_local_context&&this.reportContextSensitivity(O,K,G,C,T.index)}K=U.prediction;let ie=z!=null&&this.userWantsCtxSensitive;if(ie&&(ie=!b&&(U.configs.dipsIntoOuterContext||!U.configs.isExactConflict)&&(!this.treat_sllk1_conflict_as_ambiguity||T.index!==C)),U.configs.hasSemanticContext){let le=U.predicates;if(le!=null){let ce=T.index;switch(ce!==C&&T.seek(C),z=this.evalSemanticContext(le,j,ie||this.reportAmbiguities),z.cardinality()){case 0:throw this.noViableAlt(T,j,U.configs,C);case 1:return z.nextSetBit(0)}ce!==C&&T.seek(ce)}}if(ie){fe(!b),fe(this.isAcceptState(U,!1)),Ne.debug&&console.log("RETRY with outerContext="+j);let le=this.computeStartState(O,j,!0);return this.reportAmbiguities&&this.reportAttemptingFullContext(O,z,G,C,T.index),T.seek(C),this.execATN(O,T,C,le)}else return z!=null&&(this.reportAmbiguities&&z.cardinality()>1&&this.reportAmbiguity(O,U,C,T.index,U.configs.isExactConflict,z,U.configs),K=z.nextSetBit(0)),K}k=G,R!==_.IntStream.EOF&&(T.consume(),R=T.LA(1))}}handleNoViableAlt(O,T,C){if(C.s0!=null){let F=new l.BitSet,j=0;for(let b of C.s0.configs)(b.reachesIntoOuterContext||b.state instanceof L.RuleStopState)&&(F.set(b.alt),j=Math.max(j,b.alt));switch(F.cardinality()){case 0:break;case 1:return F.nextSetBit(0);default:if(!C.s0.configs.hasSemanticContext)return F.nextSetBit(0);let b=new t.ATNConfigSet;for(let k of C.s0.configs)(k.reachesIntoOuterContext||k.state instanceof L.RuleStopState)&&b.add(k);let R=this.getPredsForAmbigAlts(F,b,j);if(R!=null){let k=this.getPredicatePredictions(F,R);if(k!=null){let V=O.index;try{O.seek(T);let G=this.evalSemanticContext(k,C.outerContext,!1);if(!G.isEmpty)return G.nextSetBit(0)}finally{O.seek(V)}}}return F.nextSetBit(0)}}throw this.noViableAlt(O,C.outerContext,C.s0.configs,T)}computeReachSet(O,T,C,F){let j=T.useContext,b=T.remainingOuterContext,R=T.s0;if(j)for(;R.isContextSymbol(C);){let G;if(b!=null&&(b=this.skipTailCalls(b),G=R.getContextTarget(this.getReturnState(b))),G==null)break;fe(b!=null),b=b.parent,R=G}if(fe(!this.isAcceptState(R,j)),this.isAcceptState(R,j))return new I.SimulatorState(T.outerContext,R,j,b);let k=R,V=this.getExistingTargetState(k,C);if(V==null){let G=this.computeTargetState(O,k,b,C,j,F);V=G[0],b=G[1]}if(V!==i.ATNSimulator.ERROR)return fe(!j||!V.configs.dipsIntoOuterContext),new I.SimulatorState(T.outerContext,V,j,b)}getExistingTargetState(O,T){return O.getTarget(T)}computeTargetState(O,T,C,F,j,b){let R=T.configs.toArray(),k,V=new t.ATNConfigSet,G;do{let z=!j||C!=null;z||(V.isOutermostConfigSet=!0);let K=new t.ATNConfigSet,ie;for(let X of R){if(Ne.debug&&console.log("testing "+this.getTokenName(F)+" at "+X.toString()),X.state instanceof L.RuleStopState){fe(X.context.isEmpty),(j&&!X.reachesIntoOuterContext||F===_.IntStream.EOF)&&(ie==null&&(ie=[]),ie.push(X));continue}let ae=X.state.numberOfOptimizedTransitions;for(let de=0;de<ae;de++){let ve=X.state.getOptimizedTransition(de),Se=this.getReachableTarget(X,ve,F);Se!=null&&K.add(X.transform(Se,!1),b)}}if(this.optimize_unique_closure&&ie==null&&F!==Q.Token.EOF&&K.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER){K.isOutermostConfigSet=V.isOutermostConfigSet,V=K;break}let le=!1,ce=F===Q.Token.EOF;if(this.closure(K,V,le,z,b,ce),G=V.dipsIntoOuterContext,F===_.IntStream.EOF&&(V=this.removeAllConfigsNotInRuleStopState(V,b)),ie!=null&&(!j||!Y.PredictionMode.hasConfigInRuleStopState(V))){fe(ie.length>0);for(let X of ie)V.add(X,b)}if(j&&G){V.clear(),C=C,C=this.skipTailCalls(C);let X=this.getReturnState(C);if(k==null&&(k=new x.IntegerList),C.isEmpty?C=void 0:C=C.parent,k.add(X),X!==P.PredictionContext.EMPTY_FULL_STATE_KEY)for(let ae=0;ae<R.length;ae++)R[ae]=R[ae].appendContext(X,b)}}while(j&&G);return V.isEmpty?(this.setDFAEdge(T,F,i.ATNSimulator.ERROR),[i.ATNSimulator.ERROR,C]):[this.addDFAEdge(O,T,F,k,V,b),C]}removeAllConfigsNotInRuleStopState(O,T){if(Y.PredictionMode.allConfigsInRuleStopStates(O))return O;let C=new t.ATNConfigSet;for(let F of O)F.state instanceof L.RuleStopState&&C.add(F,T);return C}computeStartState(O,T,C){let F=O.isPrecedenceDfa?O.getPrecedenceStartState(this._parser.precedence,C):C?O.s0full:O.s0;if(F!=null){if(!C)return new I.SimulatorState(T,F,C,T);F.setContextSensitive(this.atn)}O.decision;let j=O.atnStartState,b=0,R=T,k=C?P.PredictionContext.EMPTY_FULL:P.PredictionContext.EMPTY_LOCAL,V=new $.PredictionContextCache;if(C){if(!this.enable_global_context_dfa)for(;R!=null;)R.isEmpty?(b=P.PredictionContext.EMPTY_FULL_STATE_KEY,R=void 0):(b=this.getReturnState(R),k=k.appendSingleContext(b,V),R=R.parent);for(;F!=null&&F.isContextSensitive&&R!=null;){let U;if(R=this.skipTailCalls(R),R.isEmpty?(U=F.getContextTarget(P.PredictionContext.EMPTY_FULL_STATE_KEY),b=P.PredictionContext.EMPTY_FULL_STATE_KEY,R=void 0):(b=this.getReturnState(R),U=F.getContextTarget(b),k=k.appendSingleContext(b,V),R=R.parent),U==null)break;F=U}}if(F!=null&&!F.isContextSensitive)return new I.SimulatorState(T,F,C,R);let G=new t.ATNConfigSet;for(;;){let U=new t.ATNConfigSet,z=j.numberOfTransitions;for(let ae=0;ae<z;ae++){let de=j.transition(ae).target;U.add(o.ATNConfig.create(de,ae+1,k))}let K=R!=null;K||(G.isOutermostConfigSet=!0),this.closure(U,G,!0,K,V,!1);let le=G.dipsIntoOuterContext,ce;if(C&&!this.enable_global_context_dfa){F=this.addDFAState(O,G,V);break}else F==null?O.isPrecedenceDfa?(G=this.applyPrecedenceFilter(G,T,V),ce=this.addDFAState(O,G,V),O.setPrecedenceStartState(this._parser.precedence,C,ce)):(ce=this.addDFAState(O,G,V),C?O.s0full?ce=O.s0full:O.s0full=ce:O.s0?ce=O.s0:O.s0=ce):(O.isPrecedenceDfa&&(G=this.applyPrecedenceFilter(G,T,V)),ce=this.addDFAState(O,G,V),F.setContextTarget(b,ce));if(F=ce,!C||!le)break;ce.setContextSensitive(this.atn),R=R,G.clear(),R=this.skipTailCalls(R);let X=this.getReturnState(R);R.isEmpty?R=void 0:R=R.parent,X!==P.PredictionContext.EMPTY_FULL_STATE_KEY&&(k=k.appendSingleContext(X,V)),b=X}return new I.SimulatorState(T,F,C,R)}applyPrecedenceFilter(O,T,C){let F=new Map,j=new t.ATNConfigSet;for(let b of O){if(b.alt!==1)continue;let R=b.semanticContext.evalPrecedence(this._parser,T);R!=null&&(F.set(b.state.stateNumber,b.context),R!==b.semanticContext?j.add(b.transform(b.state,!1,R),C):j.add(b,C))}for(let b of O)if(b.alt!==1){if(!b.isPrecedenceFilterSuppressed){let R=F.get(b.state.stateNumber);if(R!=null&&R.equals(b.context))continue}j.add(b,C)}return j}getReachableTarget(O,T,C){if(T.matches(C,0,this.atn.maxTokenType))return T.target}predicateDFAState(O,T,C){let F=this.getConflictingAltsFromConfigSet(T);if(!F)throw new Error("This unhandled scenario is intended to be unreachable, but I'm currently not sure of why we know that's the case.");Ne.debug&&console.log("predicateDFAState "+O);let j=this.getPredsForAmbigAlts(F,T,C),b;return j!=null&&(b=this.getPredicatePredictions(F,j),O.predicates=b),b}getPredsForAmbigAlts(O,T,C){let F=new Array(C+1),j=F.length;for(let k of T)O.get(k.alt)&&(F[k.alt]=W.SemanticContext.or(F[k.alt],k.semanticContext));let b=0;for(let k=0;k<j;k++)F[k]==null?F[k]=W.SemanticContext.NONE:F[k]!==W.SemanticContext.NONE&&b++;let R=F;return b===0&&(R=void 0),Ne.debug&&console.log("getPredsForAmbigAlts result "+(R?u.Arrays.toString(R):"undefined")),R}getPredicatePredictions(O,T){let C=[],F=!1;for(let j=1;j<T.length;j++){let b=T[j];fe(b!=null),O!=null&&O.get(j)&&b===W.SemanticContext.NONE?C.push(new v.DFAState.PredPrediction(b,j)):b!==W.SemanticContext.NONE&&(F=!0,C.push(new v.DFAState.PredPrediction(b,j)))}if(F)return C}evalSemanticContext(O,T,C){let F=new l.BitSet;for(let j of O){if(j.pred===W.SemanticContext.NONE){if(F.set(j.alt),!C)break;continue}let b=this.evalSemanticContextImpl(j.pred,T,j.alt);if((Ne.debug||Ne.dfa_debug)&&console.log("eval pred "+j+"="+b),b&&((Ne.debug||Ne.dfa_debug)&&console.log("PREDICT "+j.alt),F.set(j.alt),!C))break}return F}evalSemanticContextImpl(O,T,C){return O.eval(this._parser,T)}closure(O,T,C,F,j,b){j==null&&(j=$.PredictionContextCache.UNCACHED);let R=O,k=new h.Array2DHashSet(N.ObjectEqualityComparator.INSTANCE);for(;R.size>0;){let V=new t.ATNConfigSet;for(let G of R)this.closureImpl(G,T,V,k,C,F,j,0,b);R=V}}closureImpl(O,T,C,F,j,b,R,k,V){if(Ne.debug&&console.log("closure("+O.toString(this._parser,!0)+")"),O.state instanceof L.RuleStopState)if(O.context.isEmpty)if(b)Ne.debug&&console.log("FALLING off rule "+this.getRuleName(O.state.ruleIndex)),O.context===P.PredictionContext.EMPTY_FULL?O=O.transform(O.state,!1,P.PredictionContext.EMPTY_LOCAL):!O.reachesIntoOuterContext&&P.PredictionContext.isEmptyLocal(O.context)&&T.add(O,R);else{T.add(O,R);return}else{let U=O.context.hasEmpty,z=O.context.size-(U?1:0);for(let K=0;K<z;K++){let ie=O.context.getParent(K),le=this.atn.states[O.context.getReturnState(K)],ce=o.ATNConfig.create(le,O.alt,ie,O.semanticContext);ce.outerContextDepth=O.outerContextDepth,ce.isPrecedenceFilterSuppressed=O.isPrecedenceFilterSuppressed,fe(k>J),this.closureImpl(ce,T,C,F,j,b,R,k-1,V)}if(!U||!b)return;O=O.transform(O.state,!1,P.PredictionContext.EMPTY_LOCAL)}let G=O.state;G.onlyHasEpsilonTransitions||(T.add(O,R),Ne.debug&&console.log("added config "+T));for(let U=0;U<G.numberOfOptimizedTransitions;U++){if(U===0&&G.stateType===e.ATNStateType.STAR_LOOP_ENTRY&&G.precedenceRuleDecision&&!O.context.hasEmpty){let le=G,ce=!0;for(let X=0;X<O.context.size;X++)if(!le.precedenceLoopbackStates.get(O.context.getReturnState(X))){ce=!1;break}if(ce)continue}let z=G.getOptimizedTransition(U),K=!(z instanceof y.ActionTransition)&&j,ie=this.getEpsilonTarget(O,z,K,k===0,R,V);if(ie!=null){if(z instanceof q.RuleTransition&&C!=null&&!j){C.add(ie,R);continue}let le=k;if(O.state instanceof L.RuleStopState){if(this.dfa!=null&&this.dfa.isPrecedenceDfa&&z.outermostPrecedenceReturn===this.dfa.atnStartState.ruleIndex&&(ie.isPrecedenceFilterSuppressed=!0),ie.outerContextDepth=ie.outerContextDepth+1,!F.add(ie))continue;fe(le>J),le--,Ne.debug&&console.log("dips into outer ctx: "+ie)}else if(z instanceof q.RuleTransition)this.optimize_tail_calls&&z.optimizedTailCall&&(!this.tail_call_preserves_sll||!P.PredictionContext.isEmptyLocal(O.context))?(fe(ie.context===O.context),le===0&&(le--,!this.tail_call_preserves_sll&&P.PredictionContext.isEmptyLocal(O.context)&&(ie.outerContextDepth=ie.outerContextDepth+1))):le>=0&&le++;else if(!z.isEpsilon&&!F.add(ie))continue;this.closureImpl(ie,T,C,F,K,b,R,le,V)}}}getRuleName(O){return this._parser!=null&&O>=0?this._parser.ruleNames[O]:"<rule "+O+">"}getEpsilonTarget(O,T,C,F,j,b){switch(T.serializationType){case 3:return this.ruleTransition(O,T,j);case 10:return this.precedenceTransition(O,T,C,F);case 4:return this.predTransition(O,T,C,F);case 6:return this.actionTransition(O,T);case 1:return O.transform(T.target,!1);case 5:case 2:case 7:return b&&T.matches(Q.Token.EOF,0,1)?O.transform(T.target,!1):void 0;default:return}}actionTransition(O,T){return Ne.debug&&console.log("ACTION edge "+T.ruleIndex+":"+T.actionIndex),O.transform(T.target,!1)}precedenceTransition(O,T,C,F){Ne.debug&&(console.log("PRED (collectPredicates="+C+") "+T.precedence+">=_p, ctx dependent=true"),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let j;if(C&&F){let b=W.SemanticContext.and(O.semanticContext,T.predicate);j=O.transform(T.target,!1,b)}else j=O.transform(T.target,!1);return Ne.debug&&console.log("config from pred transition="+j),j}predTransition(O,T,C,F){Ne.debug&&(console.log("PRED (collectPredicates="+C+") "+T.ruleIndex+":"+T.predIndex+", ctx dependent="+T.isCtxDependent),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let j;if(C&&(!T.isCtxDependent||T.isCtxDependent&&F)){let b=W.SemanticContext.and(O.semanticContext,T.predicate);j=O.transform(T.target,!1,b)}else j=O.transform(T.target,!1);return Ne.debug&&console.log("config from pred transition="+j),j}ruleTransition(O,T,C){Ne.debug&&console.log("CALL rule "+this.getRuleName(T.target.ruleIndex)+", ctx="+O.context);let F=T.followState,j;return this.optimize_tail_calls&&T.optimizedTailCall&&(!this.tail_call_preserves_sll||!P.PredictionContext.isEmptyLocal(O.context))?j=O.context:C!=null?j=C.getChild(O.context,F.stateNumber):j=O.context.getChild(F.stateNumber),O.transform(T.target,!1,j)}isConflicted(O,T){if(O.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER||O.size<=1)return;let C=O.toArray();C.sort(Ne.STATE_ALT_SORT_COMPARATOR);let F=!O.dipsIntoOuterContext,j=new l.BitSet,b=C[0].alt;j.set(b);let R=C[0].state.nonStopStateNumber;for(let z of C){let K=z.state.nonStopStateNumber;if(K!==R){if(z.alt!==b)return;R=K}}let k;if(F){R=C[0].state.nonStopStateNumber,k=new l.BitSet;let z=b;for(let ie of C){if(ie.state.nonStopStateNumber!==R)break;let le=ie.alt;k.set(le),z=le}R=C[0].state.nonStopStateNumber;let K=b;for(let ie of C){let le=ie.state.nonStopStateNumber,ce=ie.alt;if(le!==R){if(K!==z){F=!1;break}R=le,K=b}else if(ce!==K){if(ce!==k.nextSetBit(K+1)){F=!1;break}K=ce}}}R=C[0].state.nonStopStateNumber;let V=0,G=0,U=C[0].context;for(let z=1;z<C.length;z++){let K=C[z];if(K.alt!==b||K.state.nonStopStateNumber!==R)break;G=z,U=T.join(U,C[z].context)}for(let z=G+1;z<C.length;z++){let K=C[z],ie=K.state;if(j.set(K.alt),ie.nonStopStateNumber!==R){R=ie.nonStopStateNumber,V=z,G=z,U=K.context;for(let de=V+1;de<C.length;de++){let ve=C[de];if(ve.alt!==b||ve.state.nonStopStateNumber!==R)break;G=de,U=T.join(U,ve.context)}z=G;continue}let le=K.context,ce=K.alt,X=z;for(let de=X+1;de<C.length;de++){let ve=C[de];if(ve.alt!==ce||ve.state.nonStopStateNumber!==R)break;X=de,le=T.join(le,ve.context)}z=X;let ae=T.join(U,le);if(!U.equals(ae))return;F=F&&U.equals(le)}return new c.ConflictInfo(j,F)}getConflictingAltsFromConfigSet(O){let T=O.conflictingAlts;return T==null&&O.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER&&(T=new l.BitSet,T.set(O.uniqueAlt)),T}getTokenName(O){if(O===Q.Token.EOF)return"EOF";let C=(this._parser!=null?this._parser.vocabulary:re.VocabularyImpl.EMPTY_VOCABULARY).getDisplayName(O);return C===String(O)?C:C+"<"+O+">"}getLookaheadName(O){return this.getTokenName(O.LA(1))}dumpDeadEndConfigs(O){console.log("dead end configs: ");let T=O.deadEndConfigs;if(T)for(let C of T){let F="no edges";if(C.state.numberOfOptimizedTransitions>0){let j=C.state.getOptimizedTransition(0);j instanceof s.AtomTransition?F="Atom "+this.getTokenName(j._label):j instanceof Z.SetTransition&&(F=(j instanceof E.NotSetTransition?"~":"")+"Set "+j.set.toString())}console.log(C.toString(this._parser,!0)+":"+F)}}noViableAlt(O,T,C,F){return new D.NoViableAltException(this._parser,O,O.get(F),O.LT(1),C,T)}getUniqueAlt(O){let T=r.ATN.INVALID_ALT_NUMBER;for(let C of O)if(T===r.ATN.INVALID_ALT_NUMBER)T=C.alt;else if(C.alt!==T)return r.ATN.INVALID_ALT_NUMBER;return T}configWithAltAtStopState(O,T){for(let C of O)if(C.alt===T&&C.state instanceof L.RuleStopState)return!0;return!1}addDFAEdge(O,T,C,F,j,b){fe(F==null||F.isEmpty||O.isContextSensitive);let R=T,k=this.addDFAState(O,j,b);if(F!=null)for(let V of F.toArray()){if(V===P.PredictionContext.EMPTY_FULL_STATE_KEY&&R.configs.isOutermostConfigSet)continue;R.setContextSensitive(this.atn),R.setContextSymbol(C);let G=R.getContextTarget(V);if(G!=null){R=G;continue}G=this.addDFAContextState(O,R.configs,V,b),fe(V!==P.PredictionContext.EMPTY_FULL_STATE_KEY||G.configs.isOutermostConfigSet),R.setContextTarget(V,G),R=G}return Ne.debug&&console.log("EDGE "+R+" -> "+k+" upon "+this.getTokenName(C)),this.setDFAEdge(R,C,k),Ne.debug&&console.log(`DFA=
|
|
350
|
+
`+O.toString(this._parser!=null?this._parser.vocabulary:re.VocabularyImpl.EMPTY_VOCABULARY,this._parser!=null?this._parser.ruleNames:void 0)),k}setDFAEdge(O,T,C){O?.setTarget(T,C)}addDFAContextState(O,T,C,F){if(C!==P.PredictionContext.EMPTY_FULL_STATE_KEY){let j=new t.ATNConfigSet;for(let b of T)j.add(b.appendContext(C,F));return this.addDFAState(O,j,F)}else return fe(!T.isOutermostConfigSet,"Shouldn't be adding a duplicate edge."),T=T.clone(!0),T.isOutermostConfigSet=!0,this.addDFAState(O,T,F)}addDFAState(O,T,C){let F=this.enable_global_context_dfa||!T.isOutermostConfigSet;if(F){T.isReadOnly||T.optimizeConfigs(this);let V=this.createDFAState(O,T),G=O.states.get(V);if(G!=null)return G}T.isReadOnly||T.conflictInfo==null&&(T.conflictInfo=this.isConflicted(T,C));let j=this.createDFAState(O,T.clone(!0)),b=this.atn.getDecisionState(O.decision),R=this.getUniqueAlt(T);if(R!==r.ATN.INVALID_ALT_NUMBER)j.acceptStateInfo=new m.AcceptStateInfo(R);else if(T.conflictingAlts!=null){let V=T.conflictingAlts;V&&(j.acceptStateInfo=new m.AcceptStateInfo(V.nextSetBit(0)))}if(j.isAcceptState&&T.hasSemanticContext&&this.predicateDFAState(j,T,b.numberOfTransitions),!F)return j;let k=O.addState(j);return Ne.debug&&k===j&&console.log("adding new DFA state: "+j),k}createDFAState(O,T){return new v.DFAState(T)}reportAttemptingFullContext(O,T,C,F,j){if(Ne.debug||Ne.retry_debug){let b=g.Interval.of(F,j);console.log("reportAttemptingFullContext decision="+O.decision+":"+C.s0.configs+", input="+this._parser.inputStream.getText(b))}if(this._parser!=null){let b=this._parser.getErrorListenerDispatch();b.reportAttemptingFullContext&&b.reportAttemptingFullContext(this._parser,O,F,j,T,C)}}reportContextSensitivity(O,T,C,F,j){if(Ne.debug||Ne.retry_debug){let b=g.Interval.of(F,j);console.log("reportContextSensitivity decision="+O.decision+":"+C.s0.configs+", input="+this._parser.inputStream.getText(b))}if(this._parser!=null){let b=this._parser.getErrorListenerDispatch();b.reportContextSensitivity&&b.reportContextSensitivity(this._parser,O,F,j,T,C)}}reportAmbiguity(O,T,C,F,j,b,R){if(Ne.debug||Ne.retry_debug){let k=g.Interval.of(C,F);console.log("reportAmbiguity "+b+":"+R+", input="+this._parser.inputStream.getText(k))}if(this._parser!=null){let k=this._parser.getErrorListenerDispatch();k.reportAmbiguity&&k.reportAmbiguity(this._parser,O,C,F,j,b,R)}}getReturnState(O){return O.isEmpty?P.PredictionContext.EMPTY_FULL_STATE_KEY:this.atn.states[O.invokingState].transition(0).followState.stateNumber}skipTailCalls(O){if(!this.optimize_tail_calls)return O;for(;!O.isEmpty;){let T=this.atn.states[O.invokingState];if(fe(T.numberOfTransitions===1&&T.transition(0).serializationType===3),!T.transition(0).tailCall)break;O=O.parent}return O}get parser(){return this._parser}};return te.debug=!1,te.dfa_debug=!1,te.retry_debug=!1,te.STATE_ALT_SORT_COMPARATOR=(pe,O)=>{let T=pe.state.nonStopStateNumber-O.state.nonStopStateNumber;return T!==0||(T=pe.alt-O.alt,T!==0)?T:0},a([A.NotNull],te.prototype,"predictionMode",void 0),a([A.NotNull],te.prototype,"getPredictionMode",null),a([d(0,A.NotNull)],te.prototype,"setPredictionMode",null),a([A.Override],te.prototype,"reset",null),a([d(0,A.NotNull)],te.prototype,"adaptivePredict",null),a([d(0,A.NotNull),d(1,A.NotNull),d(2,A.NotNull)],te.prototype,"getStartState",null),a([d(0,A.NotNull),d(1,A.NotNull),d(3,A.NotNull)],te.prototype,"execDFA",null),a([d(0,A.NotNull),d(1,A.NotNull),d(3,A.NotNull)],te.prototype,"execATN",null),a([d(0,A.NotNull),d(2,A.NotNull)],te.prototype,"handleNoViableAlt",null),a([d(0,A.NotNull)],te.prototype,"getExistingTargetState",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"computeTargetState",null),a([A.NotNull,d(0,A.NotNull)],te.prototype,"removeAllConfigsNotInRuleStopState",null),a([A.NotNull],te.prototype,"computeStartState",null),a([A.NotNull,d(0,A.NotNull)],te.prototype,"applyPrecedenceFilter",null),a([d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"getReachableTarget",null),a([d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"getPredsForAmbigAlts",null),a([d(0,A.NotNull)],te.prototype,"evalSemanticContext",null),a([d(0,A.NotNull)],te.prototype,"evalSemanticContextImpl",null),a([d(1,A.NotNull),d(4,A.Nullable)],te.prototype,"closure",null),a([d(0,A.NotNull),d(1,A.NotNull),d(2,A.Nullable),d(3,A.NotNull),d(6,A.NotNull)],te.prototype,"closureImpl",null),a([A.NotNull],te.prototype,"getRuleName",null),a([d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"getEpsilonTarget",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"actionTransition",null),a([A.Nullable,d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"precedenceTransition",null),a([A.Nullable,d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"predTransition",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull),d(2,A.Nullable)],te.prototype,"ruleTransition",null),a([d(0,A.NotNull)],te.prototype,"isConflicted",null),a([A.NotNull],te.prototype,"getTokenName",null),a([d(0,A.NotNull)],te.prototype,"dumpDeadEndConfigs",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull),d(2,A.NotNull)],te.prototype,"noViableAlt",null),a([d(0,A.NotNull)],te.prototype,"getUniqueAlt",null),a([d(0,A.NotNull)],te.prototype,"configWithAltAtStopState",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull),d(4,A.NotNull)],te.prototype,"addDFAEdge",null),a([d(0,A.Nullable),d(2,A.Nullable)],te.prototype,"setDFAEdge",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"addDFAContextState",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"addDFAState",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"createDFAState",null),a([d(0,A.NotNull),d(2,A.NotNull)],te.prototype,"reportAttemptingFullContext",null),a([d(0,A.NotNull),d(2,A.NotNull)],te.prototype,"reportContextSensitivity",null),a([d(0,A.NotNull),d(5,A.NotNull),d(6,A.NotNull)],te.prototype,"reportAmbiguity",null),te=a([d(0,A.NotNull)],te),Bt.ParserATNSimulator=te,Bt}var un={},Uc;function nx(){if(Uc)return un;Uc=1;/*!
|
|
351
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
352
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
353
|
+
*/var a=un&&un.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(un,"__esModule",{value:!0}),un.PlusBlockStartState=void 0;const d=Be(),m=so(),y=ue();let h=class extends m.BlockStartState{get stateType(){return d.ATNStateType.PLUS_BLOCK_START}};return a([y.Override],h.prototype,"stateType",null),un.PlusBlockStartState=h,un}var ln={},Vc;function ix(){if(Vc)return ln;Vc=1;/*!
|
|
354
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
355
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
356
|
+
*/var a=ln&&ln.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(ln,"__esModule",{value:!0}),ln.PlusLoopbackState=void 0;const d=Be(),m=In(),y=ue();let h=class extends m.DecisionState{get stateType(){return d.ATNStateType.PLUS_LOOP_BACK}};return a([y.Override],h.prototype,"stateType",null),ln.PlusLoopbackState=h,ln}var Mt={},zc;function ox(){if(zc)return Mt;zc=1;/*!
|
|
357
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
358
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
359
|
+
*/var a=Mt&&Mt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Mt&&Mt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.PrecedencePredicateTransition=void 0;const m=Ta(),y=ue(),h=zn();let u=class extends m.AbstractPredicateTransition{constructor(o,t){super(o),this.precedence=t}get serializationType(){return 10}get isEpsilon(){return!0}matches(o,t,i){return!1}get predicate(){return new h.SemanticContext.PrecedencePredicate(this.precedence)}toString(){return this.precedence+" >= _p"}};return a([y.Override],u.prototype,"serializationType",null),a([y.Override],u.prototype,"isEpsilon",null),a([y.Override],u.prototype,"matches",null),a([y.Override],u.prototype,"toString",null),u=a([d(0,y.NotNull)],u),Mt.PrecedencePredicateTransition=u,Mt}var qt={},Hc;function _p(){if(Hc)return qt;Hc=1;/*!
|
|
360
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
361
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
362
|
+
*/var a=qt&&qt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=qt&&qt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(qt,"__esModule",{value:!0}),qt.PredicateTransition=void 0;const m=Ta(),y=ue(),h=zn();let u=class extends m.AbstractPredicateTransition{constructor(o,t,i,e){super(o),this.ruleIndex=t,this.predIndex=i,this.isCtxDependent=e}get serializationType(){return 4}get isEpsilon(){return!0}matches(o,t,i){return!1}get predicate(){return new h.SemanticContext.Predicate(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}};return a([y.Override],u.prototype,"serializationType",null),a([y.Override],u.prototype,"isEpsilon",null),a([y.Override],u.prototype,"matches",null),a([y.Override,y.NotNull],u.prototype,"toString",null),u=a([d(0,y.NotNull)],u),qt.PredicateTransition=u,qt}var jt={},Gc;function sx(){if(Gc)return jt;Gc=1;/*!
|
|
363
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
364
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
365
|
+
*/var a=jt&&jt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=jt&&jt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(jt,"__esModule",{value:!0}),jt.RangeTransition=void 0;const m=Ln(),y=ue(),h=Er();let u=class extends h.Transition{constructor(o,t,i){super(o),this.from=t,this.to=i}get serializationType(){return 2}get label(){return m.IntervalSet.of(this.from,this.to)}matches(o,t,i){return o>=this.from&&o<=this.to}toString(){return"'"+String.fromCodePoint(this.from)+"'..'"+String.fromCodePoint(this.to)+"'"}};return a([y.Override],u.prototype,"serializationType",null),a([y.Override,y.NotNull],u.prototype,"label",null),a([y.Override],u.prototype,"matches",null),a([y.Override,y.NotNull],u.prototype,"toString",null),u=a([d(0,y.NotNull)],u),jt.RangeTransition=u,jt}var cn={},Yc;function ax(){if(Yc)return cn;Yc=1;/*!
|
|
366
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
367
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
368
|
+
*/var a=cn&&cn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(cn,"__esModule",{value:!0}),cn.RuleStartState=void 0;const d=pr(),m=Be(),y=ue();let h=class extends d.ATNState{constructor(){super(...arguments),this.isPrecedenceRule=!1,this.leftFactored=!1}get stateType(){return m.ATNStateType.RULE_START}};return a([y.Override],h.prototype,"stateType",null),cn.RuleStartState=h,cn}var fn={},Wc;function ux(){if(Wc)return fn;Wc=1;/*!
|
|
369
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
370
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
371
|
+
*/var a=fn&&fn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(fn,"__esModule",{value:!0}),fn.StarBlockStartState=void 0;const d=Be(),m=so(),y=ue();let h=class extends m.BlockStartState{get stateType(){return d.ATNStateType.STAR_BLOCK_START}};return a([y.Override],h.prototype,"stateType",null),fn.StarBlockStartState=h,fn}var pn={},Qc;function lx(){if(Qc)return pn;Qc=1;/*!
|
|
372
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
373
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
374
|
+
*/var a=pn&&pn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(pn,"__esModule",{value:!0}),pn.StarLoopbackState=void 0;const d=pr(),m=Be(),y=ue();let h=class extends d.ATNState{get loopEntryState(){return this.transition(0).target}get stateType(){return m.ATNStateType.STAR_LOOP_BACK}};return a([y.Override],h.prototype,"stateType",null),pn.StarLoopbackState=h,pn}var hn={},Xc;function cx(){if(Xc)return hn;Xc=1;/*!
|
|
375
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
376
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
377
|
+
*/var a=hn&&hn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(hn,"__esModule",{value:!0}),hn.TokensStartState=void 0;const d=Be(),m=In(),y=ue();let h=class extends m.DecisionState{get stateType(){return d.ATNStateType.TOKEN_START}};return a([y.Override],h.prototype,"stateType",null),hn.TokensStartState=h,hn}var hi={},Kc;function fx(){if(Kc)return hi;Kc=1;/*!
|
|
378
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
379
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
380
|
+
*/Object.defineProperty(hi,"__esModule",{value:!0}),hi.UUID=void 0;const a=Ie();let d=class aa{constructor(y,h,u,r){this.data=new Uint32Array(4),this.data[0]=y,this.data[1]=h,this.data[2]=u,this.data[3]=r}static fromString(y){if(!/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/.test(y))throw new Error("Incorrectly formatted UUID");let h=y.split("-"),u=parseInt(h[0],16),r=(parseInt(h[1],16)<<16>>>0)+parseInt(h[2],16),o=(parseInt(h[3],16)<<16>>>0)+parseInt(h[4].substr(0,4),16),t=parseInt(h[4].substr(-8),16);return new aa(u,r,o,t)}hashCode(){return a.MurmurHash.hashCode([this.data[0],this.data[1],this.data[2],this.data[3]])}equals(y){return y===this?!0:y instanceof aa?this.data[0]===y.data[0]&&this.data[1]===y.data[1]&&this.data[2]===y.data[2]&&this.data[3]===y.data[3]:!1}toString(){return("00000000"+this.data[0].toString(16)).substr(-8)+"-"+("0000"+(this.data[1]>>>16).toString(16)).substr(-4)+"-"+("0000"+this.data[1].toString(16)).substr(-4)+"-"+("0000"+(this.data[2]>>>16).toString(16)).substr(-4)+"-"+("0000"+this.data[2].toString(16)).substr(-4)+("00000000"+this.data[3].toString(16)).substr(-8)}};return hi.UUID=d,hi}var Jc;function uo(){if(Jc)return Ct;Jc=1;/*!
|
|
381
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
382
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
383
|
+
*/var a=Ct&&Ct.__decorate||function(G,U,z,K){var ie=arguments.length,le=ie<3?U:K===null?K=Object.getOwnPropertyDescriptor(U,z):K,ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")le=Reflect.decorate(G,U,z,K);else for(var X=G.length-1;X>=0;X--)(ce=G[X])&&(le=(ie<3?ce(le):ie>3?ce(U,z,le):ce(U,z))||le);return ie>3&&le&&Object.defineProperty(U,z,le),le},d=Ct&&Ct.__param||function(G,U){return function(z,K){U(z,K,G)}};Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.ATNDeserializer=void 0;const m=ap(),y=mr(),h=st(),u=sp(),r=Be(),o=up(),t=zh(),i=rp(),e=gr(),s=Hh(),l=so(),c=In(),p=K0(),v=Gh(),x=Ln(),g=np(),_=Yh(),A=Wh(),E=Qh(),D=Xh(),N=Kh(),w=Jh(),P=Zh(),$=ex(),Y=xp(),L=ue(),q=Na(),W=Bi(),Z=nx(),I=ix(),Q=ox(),re=_p(),fe=sx(),oe=ax(),J=Li(),te=Ca(),pe=ba(),O=ux(),T=lx(),C=va(),F=Fe(),j=cx(),b=fx(),R=ip();var k;(function(G){G[G.UNICODE_BMP=0]="UNICODE_BMP",G[G.UNICODE_SMP=1]="UNICODE_SMP"})(k||(k={}));let V=class _e{constructor(U){U===void 0&&(U=u.ATNDeserializationOptions.defaultOptions),this.deserializationOptions=U}static get SERIALIZED_VERSION(){return 3}static isFeatureSupported(U,z){let K=_e.SUPPORTED_UUIDS.findIndex(ie=>ie.equals(U));return K<0?!1:_e.SUPPORTED_UUIDS.findIndex(ie=>ie.equals(z))>=K}static getUnicodeDeserializer(U){return U===0?{readUnicode:(z,K)=>_e.toInt(z[K]),size:1}:{readUnicode:(z,K)=>_e.toInt32(z,K),size:2}}deserialize(U){U=U.slice(0);for(let B=1;B<U.length;B++)U[B]=U[B]-2&65535;let z=0,K=_e.toInt(U[z++]);if(K!==_e.SERIALIZED_VERSION){let B=`Could not deserialize ATN with version ${K} (expected ${_e.SERIALIZED_VERSION}).`;throw new Error(B)}let ie=_e.toUUID(U,z);if(z+=8,_e.SUPPORTED_UUIDS.findIndex(B=>B.equals(ie))<0){let B=`Could not deserialize ATN with UUID ${ie} (expected ${_e.SERIALIZED_UUID} or a legacy UUID).`;throw new Error(B)}let le=_e.isFeatureSupported(_e.ADDED_LEXER_ACTIONS,ie),ce=_e.toInt(U[z++]),X=_e.toInt(U[z++]),ae=new h.ATN(ce,X),de=[],ve=[],Se=_e.toInt(U[z++]);for(let B=0;B<Se;B++){let f=_e.toInt(U[z++]);if(f===r.ATNStateType.INVALID_TYPE){ae.addState(new g.InvalidState);continue}let S=_e.toInt(U[z++]);S===65535&&(S=-1);let M=this.stateFactory(f,S);if(f===r.ATNStateType.LOOP_END){let se=_e.toInt(U[z++]);de.push([M,se])}else if(M instanceof l.BlockStartState){let se=_e.toInt(U[z++]);ve.push([M,se])}ae.addState(M)}for(let B of de)B[0].loopBackState=ae.states[B[1]];for(let B of ve)B[0].endState=ae.states[B[1]];let H=_e.toInt(U[z++]);for(let B=0;B<H;B++){let f=_e.toInt(U[z++]);ae.states[f].nonGreedy=!0}let ee=_e.toInt(U[z++]);for(let B=0;B<ee;B++){let f=_e.toInt(U[z++]);ae.states[f].sll=!0}let he=_e.toInt(U[z++]);for(let B=0;B<he;B++){let f=_e.toInt(U[z++]);ae.states[f].isPrecedenceRule=!0}let ge=_e.toInt(U[z++]);ae.grammarType===0&&(ae.ruleToTokenType=new Int32Array(ge)),ae.ruleToStartState=new Array(ge);for(let B=0;B<ge;B++){let f=_e.toInt(U[z++]),S=ae.states[f];if(S.leftFactored=_e.toInt(U[z++])!==0,ae.ruleToStartState[B]=S,ae.grammarType===0){let M=_e.toInt(U[z++]);M===65535&&(M=F.Token.EOF),ae.ruleToTokenType[B]=M,_e.isFeatureSupported(_e.ADDED_LEXER_ACTIONS,ie)||_e.toInt(U[z++])}}ae.ruleToStopState=new Array(ge);for(let B of ae.states)B instanceof J.RuleStopState&&(ae.ruleToStopState[B.ruleIndex]=B,ae.ruleToStartState[B.ruleIndex].stopState=B);let me=_e.toInt(U[z++]);for(let B=0;B<me;B++){let f=_e.toInt(U[z++]);ae.modeToStartState.push(ae.states[f])}ae.modeToDFA=new Array(me);for(let B=0;B<me;B++)ae.modeToDFA[B]=new p.DFA(ae.modeToStartState[B]);let Te=[];z=this.deserializeSets(U,z,Te,_e.getUnicodeDeserializer(0)),_e.isFeatureSupported(_e.ADDED_UNICODE_SMP,ie)&&(z=this.deserializeSets(U,z,Te,_e.getUnicodeDeserializer(1)));let Ee=_e.toInt(U[z++]);for(let B=0;B<Ee;B++){let f=_e.toInt(U[z]),S=_e.toInt(U[z+1]),M=_e.toInt(U[z+2]),se=_e.toInt(U[z+3]),xe=_e.toInt(U[z+4]),Ae=_e.toInt(U[z+5]),De=this.edgeFactory(ae,M,f,S,se,xe,Ae,Te);ae.states[f].addTransition(De),z+=6}let we=new y.Array2DHashSet({hashCode:B=>B.stopState^B.returnState^B.outermostPrecedenceReturn,equals:(B,f)=>B.stopState===f.stopState&&B.returnState===f.returnState&&B.outermostPrecedenceReturn===f.outermostPrecedenceReturn}),Oe=[];for(let B of ae.states){let f=B.ruleIndex>=0&&ae.ruleToStartState[B.ruleIndex].leftFactored;for(let S=0;S<B.numberOfTransitions;S++){let M=B.transition(S);if(!(M instanceof te.RuleTransition))continue;let se=M;if(!ae.ruleToStartState[se.target.ruleIndex].leftFactored&&f)continue;let Ae=-1;ae.ruleToStartState[se.target.ruleIndex].isPrecedenceRule&&se.precedence===0&&(Ae=se.target.ruleIndex);let De={stopState:se.target.ruleIndex,returnState:se.followState.stateNumber,outermostPrecedenceReturn:Ae};we.add(De)&&Oe.push(De)}}for(let B of Oe){let f=new v.EpsilonTransition(ae.states[B.returnState],B.outermostPrecedenceReturn);ae.ruleToStopState[B.stopState].addTransition(f)}for(let B of ae.states){if(B instanceof l.BlockStartState){if(B.endState===void 0)throw new Error("IllegalStateException");if(B.endState.startState!==void 0)throw new Error("IllegalStateException");B.endState.startState=B}if(B instanceof I.PlusLoopbackState){let f=B;for(let S=0;S<f.numberOfTransitions;S++){let M=f.transition(S).target;M instanceof Z.PlusBlockStartState&&(M.loopBackState=f)}}else if(B instanceof T.StarLoopbackState){let f=B;for(let S=0;S<f.numberOfTransitions;S++){let M=f.transition(S).target;M instanceof C.StarLoopEntryState&&(M.loopBackState=f)}}}let Pe=_e.toInt(U[z++]);for(let B=1;B<=Pe;B++){let f=_e.toInt(U[z++]),S=ae.states[f];ae.decisionToState.push(S),S.decision=B-1}if(ae.grammarType===0)if(le){ae.lexerActions=new Array(_e.toInt(U[z++]));for(let B=0;B<ae.lexerActions.length;B++){let f=_e.toInt(U[z++]),S=_e.toInt(U[z++]);S===65535&&(S=-1);let M=_e.toInt(U[z++]);M===65535&&(M=-1);let se=this.lexerActionFactory(f,S,M);ae.lexerActions[B]=se}}else{let B=[];for(let f of ae.states)for(let S=0;S<f.numberOfTransitions;S++){let M=f.transition(S);if(!(M instanceof m.ActionTransition))continue;let se=M.ruleIndex,xe=M.actionIndex,Ae=new A.LexerCustomAction(se,xe);f.setTransition(S,new m.ActionTransition(M.target,se,B.length,!1)),B.push(Ae)}ae.lexerActions=B}this.markPrecedenceDecisions(ae),ae.decisionToDFA=new Array(Pe);for(let B=0;B<Pe;B++)ae.decisionToDFA[B]=new p.DFA(ae.decisionToState[B],B);if(this.deserializationOptions.isVerifyATN&&this.verifyATN(ae),this.deserializationOptions.isGenerateRuleBypassTransitions&&ae.grammarType===1){ae.ruleToTokenType=new Int32Array(ae.ruleToStartState.length);for(let B=0;B<ae.ruleToStartState.length;B++)ae.ruleToTokenType[B]=ae.maxTokenType+B+1;for(let B=0;B<ae.ruleToStartState.length;B++){let f=new t.BasicBlockStartState;f.ruleIndex=B,ae.addState(f);let S=new s.BlockEndState;S.ruleIndex=B,ae.addState(S),f.endState=S,ae.defineDecisionState(f),S.startState=f;let M,se;if(ae.ruleToStartState[B].isPrecedenceRule){M=void 0;for(let Ae of ae.states){if(Ae.ruleIndex!==B||!(Ae instanceof C.StarLoopEntryState))continue;let De=Ae.transition(Ae.numberOfTransitions-1).target;if(De instanceof Y.LoopEndState&&De.epsilonOnlyTransitions&&De.transition(0).target instanceof J.RuleStopState){M=Ae;break}}if(!M)throw new Error("Couldn't identify final state of the precedence rule prefix section.");se=M.loopBackState.transition(0)}else M=ae.ruleToStopState[B];for(let Ae of ae.states)for(let De=0;De<Ae.numberOfTransitions;De++){let be=Ae.transition(De);be!==se&&be.target===M&&(be.target=S)}for(;ae.ruleToStartState[B].numberOfTransitions>0;){let Ae=ae.ruleToStartState[B].removeTransition(ae.ruleToStartState[B].numberOfTransitions-1);f.addTransition(Ae)}ae.ruleToStartState[B].addTransition(new v.EpsilonTransition(f)),S.addTransition(new v.EpsilonTransition(M));let xe=new i.BasicState;ae.addState(xe),xe.addTransition(new o.AtomTransition(S,ae.ruleToTokenType[B])),f.addTransition(new v.EpsilonTransition(xe))}this.deserializationOptions.isVerifyATN&&this.verifyATN(ae)}if(this.deserializationOptions.isOptimize){for(;;){let B=0;B+=_e.inlineSetRules(ae),B+=_e.combineChainedEpsilons(ae);let f=ae.grammarType===0;if(B+=_e.optimizeSets(ae,f),B===0)break}this.deserializationOptions.isVerifyATN&&this.verifyATN(ae)}return _e.identifyTailCalls(ae),ae}deserializeSets(U,z,K,ie){let le=_e.toInt(U[z++]);for(let ce=0;ce<le;ce++){let X=_e.toInt(U[z]);z++;let ae=new x.IntervalSet;K.push(ae),_e.toInt(U[z++])!==0&&ae.add(-1);for(let ve=0;ve<X;ve++){let Se=ie.readUnicode(U,z);z+=ie.size;let H=ie.readUnicode(U,z);z+=ie.size,ae.add(Se,H)}}return z}markPrecedenceDecisions(U){let z=new Map;for(let K of U.states)if(K instanceof C.StarLoopEntryState&&U.ruleToStartState[K.ruleIndex].isPrecedenceRule){let ie=K.transition(K.numberOfTransitions-1).target;ie instanceof Y.LoopEndState&&ie.epsilonOnlyTransitions&&ie.transition(0).target instanceof J.RuleStopState&&(z.set(K.ruleIndex,K),K.precedenceRuleDecision=!0,K.precedenceLoopbackStates=new e.BitSet(U.states.length))}for(let K of z)for(let ie of U.ruleToStopState[K[0]].getTransitions())ie.serializationType!==1||ie.outermostPrecedenceReturn!==-1||K[1].precedenceLoopbackStates.set(ie.target.stateNumber)}verifyATN(U){for(let z of U.states)if(this.checkCondition(z!==void 0,"ATN states should not be undefined."),z.stateType!==r.ATNStateType.INVALID_TYPE){if(this.checkCondition(z.onlyHasEpsilonTransitions||z.numberOfTransitions<=1),z instanceof Z.PlusBlockStartState&&this.checkCondition(z.loopBackState!==void 0),z instanceof C.StarLoopEntryState){let K=z;if(this.checkCondition(K.loopBackState!==void 0),this.checkCondition(K.numberOfTransitions===2),K.transition(0).target instanceof O.StarBlockStartState)this.checkCondition(K.transition(1).target instanceof Y.LoopEndState),this.checkCondition(!K.nonGreedy);else if(K.transition(0).target instanceof Y.LoopEndState)this.checkCondition(K.transition(1).target instanceof O.StarBlockStartState),this.checkCondition(K.nonGreedy);else throw new Error("IllegalStateException")}if(z instanceof T.StarLoopbackState&&(this.checkCondition(z.numberOfTransitions===1),this.checkCondition(z.transition(0).target instanceof C.StarLoopEntryState)),z instanceof Y.LoopEndState&&this.checkCondition(z.loopBackState!==void 0),z instanceof oe.RuleStartState&&this.checkCondition(z.stopState!==void 0),z instanceof l.BlockStartState&&this.checkCondition(z.endState!==void 0),z instanceof s.BlockEndState&&this.checkCondition(z.startState!==void 0),z instanceof c.DecisionState){let K=z;this.checkCondition(K.numberOfTransitions<=1||K.decision>=0)}else this.checkCondition(z.numberOfTransitions<=1||z instanceof J.RuleStopState)}}checkCondition(U,z){if(!U)throw new Error("IllegalStateException: "+z)}static inlineSetRules(U){let z=0,K=new Array(U.ruleToStartState.length);for(let ie=0;ie<U.ruleToStartState.length;ie++){let ce=U.ruleToStartState[ie];for(;ce.onlyHasEpsilonTransitions&&ce.numberOfOptimizedTransitions===1&&ce.getOptimizedTransition(0).serializationType===1;)ce=ce.getOptimizedTransition(0).target;if(ce.numberOfOptimizedTransitions!==1)continue;let X=ce.getOptimizedTransition(0),ae=X.target;if(!(X.isEpsilon||!ae.onlyHasEpsilonTransitions||ae.numberOfOptimizedTransitions!==1||!(ae.getOptimizedTransition(0).target instanceof J.RuleStopState)))switch(X.serializationType){case 5:case 2:case 7:K[ie]=X;break;case 8:case 9:continue;default:continue}}for(let ie of U.states){if(ie.ruleIndex<0)continue;let le;for(let ce=0;ce<ie.numberOfOptimizedTransitions;ce++){let X=ie.getOptimizedTransition(ce);if(!(X instanceof te.RuleTransition)){le!==void 0&&le.push(X);continue}let ae=X,de=K[ae.target.ruleIndex];if(de===void 0){le!==void 0&&le.push(X);continue}if(le===void 0){le=[];for(let H=0;H<ce;H++)le.push(ie.getOptimizedTransition(ce))}z++;let ve=ae.followState,Se=new i.BasicState;switch(Se.setRuleIndex(ve.ruleIndex),U.addState(Se),le.push(new v.EpsilonTransition(Se)),de.serializationType){case 5:Se.addTransition(new o.AtomTransition(ve,de._label));break;case 2:Se.addTransition(new fe.RangeTransition(ve,de.from,de.to));break;case 7:Se.addTransition(new pe.SetTransition(ve,de.label));break;default:throw new Error("UnsupportedOperationException")}}if(le!==void 0){if(ie.isOptimized)for(;ie.numberOfOptimizedTransitions>0;)ie.removeOptimizedTransition(ie.numberOfOptimizedTransitions-1);for(let ce of le)ie.addOptimizedTransition(ce)}}return W.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+z+" rule invocations by inlining sets."),z}static combineChainedEpsilons(U){let z=0;for(let K of U.states){if(!K.onlyHasEpsilonTransitions||K instanceof J.RuleStopState)continue;let ie;e:for(let le=0;le<K.numberOfOptimizedTransitions;le++){let ce=K.getOptimizedTransition(le),X=ce.target;if(ce.serializationType!==1||ce.outermostPrecedenceReturn!==-1||X.stateType!==r.ATNStateType.BASIC||!X.onlyHasEpsilonTransitions){ie!==void 0&&ie.push(ce);continue e}for(let ae=0;ae<X.numberOfOptimizedTransitions;ae++)if(X.getOptimizedTransition(ae).serializationType!==1||X.getOptimizedTransition(ae).outermostPrecedenceReturn!==-1){ie!==void 0&&ie.push(ce);continue e}if(z++,ie===void 0){ie=[];for(let ae=0;ae<le;ae++)ie.push(K.getOptimizedTransition(ae))}for(let ae=0;ae<X.numberOfOptimizedTransitions;ae++){let de=X.getOptimizedTransition(ae).target;ie.push(new v.EpsilonTransition(de))}}if(ie!==void 0){if(K.isOptimized)for(;K.numberOfOptimizedTransitions>0;)K.removeOptimizedTransition(K.numberOfOptimizedTransitions-1);for(let le of ie)K.addOptimizedTransition(le)}}return W.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+z+" transitions by combining chained epsilon transitions."),z}static optimizeSets(U,z){if(z)return 0;let K=0,ie=U.decisionToState;for(let le of ie){let ce=new x.IntervalSet;for(let H=0;H<le.numberOfOptimizedTransitions;H++){let ee=le.getOptimizedTransition(H);if(!(ee instanceof v.EpsilonTransition)||ee.target.numberOfOptimizedTransitions!==1)continue;let he=ee.target.getOptimizedTransition(0);he.target instanceof s.BlockEndState&&(he instanceof q.NotSetTransition||(he instanceof o.AtomTransition||he instanceof fe.RangeTransition||he instanceof pe.SetTransition)&&ce.add(H))}if(ce.size<=1)continue;let X=[];for(let H=0;H<le.numberOfOptimizedTransitions;H++)ce.contains(H)||X.push(le.getOptimizedTransition(H));let ae=le.getOptimizedTransition(ce.minElement).target.getOptimizedTransition(0).target,de=new x.IntervalSet;for(let H of ce.intervals)for(let ee=H.a;ee<=H.b;ee++){let he=le.getOptimizedTransition(ee).target.getOptimizedTransition(0);if(he instanceof q.NotSetTransition)throw new Error("Not yet implemented.");de.addAll(he.label)}let ve;if(de.intervals.length===1)if(de.size===1)ve=new o.AtomTransition(ae,de.minElement);else{let H=de.intervals[0];ve=new fe.RangeTransition(ae,H.a,H.b)}else ve=new pe.SetTransition(ae,de);let Se=new i.BasicState;if(Se.setRuleIndex(le.ruleIndex),U.addState(Se),Se.addTransition(ve),X.push(new v.EpsilonTransition(Se)),K+=le.numberOfOptimizedTransitions-X.length,le.isOptimized)for(;le.numberOfOptimizedTransitions>0;)le.removeOptimizedTransition(le.numberOfOptimizedTransitions-1);for(let H of X)le.addOptimizedTransition(H)}return W.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+K+" paths by collapsing sets."),K}static identifyTailCalls(U){for(let z of U.states){for(let K=0;K<z.numberOfTransitions;K++){let ie=z.transition(K);ie instanceof te.RuleTransition&&(ie.tailCall=this.testTailCall(U,ie,!1),ie.optimizedTailCall=this.testTailCall(U,ie,!0))}if(z.isOptimized)for(let K=0;K<z.numberOfOptimizedTransitions;K++){let ie=z.getOptimizedTransition(K);ie instanceof te.RuleTransition&&(ie.tailCall=this.testTailCall(U,ie,!1),ie.optimizedTailCall=this.testTailCall(U,ie,!0))}}}static testTailCall(U,z,K){if(!K&&z.tailCall||K&&z.optimizedTailCall)return!0;let ie=new e.BitSet(U.states.length),le=[];for(le.push(z.followState);;){let ce=le.pop();if(!ce)break;if(ie.get(ce.stateNumber)||ce instanceof J.RuleStopState)continue;if(!ce.onlyHasEpsilonTransitions)return!1;let X=K?ce.numberOfOptimizedTransitions:ce.numberOfTransitions;for(let ae=0;ae<X;ae++){let de=K?ce.getOptimizedTransition(ae):ce.transition(ae);if(de.serializationType!==1)return!1;le.push(de.target)}}return!0}static toInt(U){return U}static toInt32(U,z){return(U[z]|U[z+1]<<16)>>>0}static toUUID(U,z){let K=_e.toInt32(U,z),ie=_e.toInt32(U,z+2),le=_e.toInt32(U,z+4),ce=_e.toInt32(U,z+6);return new b.UUID(ce,le,ie,K)}edgeFactory(U,z,K,ie,le,ce,X,ae){let de=U.states[ie];switch(z){case 1:return new v.EpsilonTransition(de);case 2:return X!==0?new fe.RangeTransition(de,F.Token.EOF,ce):new fe.RangeTransition(de,le,ce);case 3:return new te.RuleTransition(U.states[le],ce,X,de);case 4:return new re.PredicateTransition(de,le,ce,X!==0);case 10:return new Q.PrecedencePredicateTransition(de,le);case 5:return X!==0?new o.AtomTransition(de,F.Token.EOF):new o.AtomTransition(de,le);case 6:return new m.ActionTransition(de,le,ce,X!==0);case 7:return new pe.SetTransition(de,ae[le]);case 8:return new q.NotSetTransition(de,ae[le]);case 9:return new R.WildcardTransition(de)}throw new Error("The specified transition type is not valid.")}stateFactory(U,z){let K;switch(U){case r.ATNStateType.INVALID_TYPE:return new g.InvalidState;case r.ATNStateType.BASIC:K=new i.BasicState;break;case r.ATNStateType.RULE_START:K=new oe.RuleStartState;break;case r.ATNStateType.BLOCK_START:K=new t.BasicBlockStartState;break;case r.ATNStateType.PLUS_BLOCK_START:K=new Z.PlusBlockStartState;break;case r.ATNStateType.STAR_BLOCK_START:K=new O.StarBlockStartState;break;case r.ATNStateType.TOKEN_START:K=new j.TokensStartState;break;case r.ATNStateType.RULE_STOP:K=new J.RuleStopState;break;case r.ATNStateType.BLOCK_END:K=new s.BlockEndState;break;case r.ATNStateType.STAR_LOOP_BACK:K=new T.StarLoopbackState;break;case r.ATNStateType.STAR_LOOP_ENTRY:K=new C.StarLoopEntryState;break;case r.ATNStateType.PLUS_LOOP_BACK:K=new I.PlusLoopbackState;break;case r.ATNStateType.LOOP_END:K=new Y.LoopEndState;break;default:let ie=`The specified state type ${U} is not valid.`;throw new Error(ie)}return K.ruleIndex=z,K}lexerActionFactory(U,z,K){switch(U){case 0:return new _.LexerChannelAction(z);case 1:return new A.LexerCustomAction(z,K);case 2:return new E.LexerModeAction(z);case 3:return D.LexerMoreAction.INSTANCE;case 4:return N.LexerPopModeAction.INSTANCE;case 5:return new w.LexerPushModeAction(z);case 6:return P.LexerSkipAction.INSTANCE;case 7:return new $.LexerTypeAction(z);default:let ie=`The specified lexer action type ${U} is not valid.`;throw new Error(ie)}}};return V.BASE_SERIALIZED_UUID=b.UUID.fromString("E4178468-DF95-44D0-AD87-F22A5D5FB6D3"),V.ADDED_LEXER_ACTIONS=b.UUID.fromString("AB35191A-1603-487E-B75A-479B831EAF6D"),V.ADDED_UNICODE_SMP=b.UUID.fromString("C23FEA89-0605-4f51-AFB8-058BCAB8C91B"),V.SUPPORTED_UUIDS=[V.BASE_SERIALIZED_UUID,V.ADDED_LEXER_ACTIONS,V.ADDED_UNICODE_SMP],V.SERIALIZED_UUID=V.ADDED_UNICODE_SMP,a([L.NotNull],V.prototype,"deserializationOptions",void 0),a([d(0,L.NotNull)],V.prototype,"deserialize",null),a([d(0,L.NotNull)],V.prototype,"markPrecedenceDecisions",null),a([L.NotNull,d(0,L.NotNull)],V.prototype,"edgeFactory",null),Ct.ATNDeserializer=V,Ct}var $t={},Ut={},Zc;function lo(){if(Zc)return Ut;Zc=1;/*!
|
|
384
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
385
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
386
|
+
*/var a=Ut&&Ut.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Ut&&Ut.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.FailedPredicateException=void 0;const m=Ar(),y=ue(),h=_p();let u=class Ap extends m.RecognitionException{constructor(o,t,i){super(o,o.inputStream,o.context,Ap.formatMessage(t,i));let s=o.interpreter.atn.states[o.state].transition(0);s instanceof h.PredicateTransition?(this._ruleIndex=s.ruleIndex,this._predicateIndex=s.predIndex):(this._ruleIndex=0,this._predicateIndex=0),this._predicate=t,super.setOffendingToken(o,o.currentToken)}get ruleIndex(){return this._ruleIndex}get predicateIndex(){return this._predicateIndex}get predicate(){return this._predicate}static formatMessage(o,t){return t||`failed predicate: {${o}}?`}};return a([y.NotNull],u,"formatMessage",null),u=a([d(0,y.NotNull)],u),Ut.FailedPredicateException=u,Ut}var Vt={},ef;function co(){if(ef)return Vt;ef=1;/*!
|
|
387
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
388
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
389
|
+
*/var a=Vt&&Vt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Vt&&Vt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.InputMismatchException=void 0;const m=Ar(),y=ue();let h=class extends m.RecognitionException{constructor(r,o,t){t===void 0&&(t=r.context),super(r,r.inputStream,t),o!==void 0&&this.setOffendingState(o),this.setOffendingToken(r,r.currentToken)}};return h=a([d(0,y.NotNull)],h),Vt.InputMismatchException=h,Vt}var tf;function Oa(){if(tf)return $t;tf=1;/*!
|
|
390
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
391
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
392
|
+
*/var a=$t&&$t.__decorate||function(l,c,p,v){var x=arguments.length,g=x<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(l,c,p,v);else for(var A=l.length-1;A>=0;A--)(_=l[A])&&(g=(x<3?_(g):x>3?_(c,p,g):_(c,p))||g);return x>3&&g&&Object.defineProperty(c,p,g),g},d=$t&&$t.__param||function(l,c){return function(p,v){c(p,v,l)}};Object.defineProperty($t,"__esModule",{value:!0}),$t.DefaultErrorStrategy=void 0;const m=pr(),y=Be(),h=lo(),u=co(),r=Ln(),o=ao(),t=rt(),i=Fe(),e=ue();let s=class{constructor(){this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.nextTokensState=m.ATNState.INVALID_STATE_NUMBER}reset(c){this.endErrorCondition(c)}beginErrorCondition(c){this.errorRecoveryMode=!0}inErrorRecoveryMode(c){return this.errorRecoveryMode}endErrorCondition(c){this.errorRecoveryMode=!1,this.lastErrorStates=void 0,this.lastErrorIndex=-1}reportMatch(c){this.endErrorCondition(c)}reportError(c,p){this.inErrorRecoveryMode(c)||(this.beginErrorCondition(c),p instanceof o.NoViableAltException?this.reportNoViableAlternative(c,p):p instanceof u.InputMismatchException?this.reportInputMismatch(c,p):p instanceof h.FailedPredicateException?this.reportFailedPredicate(c,p):(console.error(`unknown recognition error type: ${p}`),this.notifyErrorListeners(c,p.toString(),p)))}notifyErrorListeners(c,p,v){let x=v.getOffendingToken(c);x===void 0&&(x=null),c.notifyErrorListeners(p,x,v)}recover(c,p){this.lastErrorIndex===c.inputStream.index&&this.lastErrorStates&&this.lastErrorStates.contains(c.state)&&c.consume(),this.lastErrorIndex=c.inputStream.index,this.lastErrorStates||(this.lastErrorStates=new r.IntervalSet),this.lastErrorStates.add(c.state);let v=this.getErrorRecoverySet(c);this.consumeUntil(c,v)}sync(c){let p=c.interpreter.atn.states[c.state];if(this.inErrorRecoveryMode(c))return;let x=c.inputStream.LA(1),g=c.atn.nextTokens(p);if(g.contains(x)){this.nextTokensContext=void 0,this.nextTokensState=m.ATNState.INVALID_STATE_NUMBER;return}if(g.contains(i.Token.EPSILON)){this.nextTokensContext===void 0&&(this.nextTokensContext=c.context,this.nextTokensState=c.state);return}switch(p.stateType){case y.ATNStateType.BLOCK_START:case y.ATNStateType.STAR_BLOCK_START:case y.ATNStateType.PLUS_BLOCK_START:case y.ATNStateType.STAR_LOOP_ENTRY:if(this.singleTokenDeletion(c))return;throw new u.InputMismatchException(c);case y.ATNStateType.PLUS_LOOP_BACK:case y.ATNStateType.STAR_LOOP_BACK:this.reportUnwantedToken(c);let A=c.getExpectedTokens().or(this.getErrorRecoverySet(c));this.consumeUntil(c,A);break}}reportNoViableAlternative(c,p){let v=c.inputStream,x;v?p.startToken.type===i.Token.EOF?x="<EOF>":x=v.getTextFromRange(p.startToken,p.getOffendingToken()):x="<unknown input>";let g="no viable alternative at input "+this.escapeWSAndQuote(x);this.notifyErrorListeners(c,g,p)}reportInputMismatch(c,p){let v=p.expectedTokens,x=v?v.toStringVocabulary(c.vocabulary):"",g="mismatched input "+this.getTokenErrorDisplay(p.getOffendingToken(c))+" expecting "+x;this.notifyErrorListeners(c,g,p)}reportFailedPredicate(c,p){let x="rule "+c.ruleNames[c.context.ruleIndex]+" "+p.message;this.notifyErrorListeners(c,x,p)}reportUnwantedToken(c){if(this.inErrorRecoveryMode(c))return;this.beginErrorCondition(c);let p=c.currentToken,v=this.getTokenErrorDisplay(p),x=this.getExpectedTokens(c),g="extraneous input "+v+" expecting "+x.toStringVocabulary(c.vocabulary);c.notifyErrorListeners(g,p,void 0)}reportMissingToken(c){if(this.inErrorRecoveryMode(c))return;this.beginErrorCondition(c);let p=c.currentToken,x="missing "+this.getExpectedTokens(c).toStringVocabulary(c.vocabulary)+" at "+this.getTokenErrorDisplay(p);c.notifyErrorListeners(x,p,void 0)}recoverInline(c){let p=this.singleTokenDeletion(c);if(p)return c.consume(),p;if(this.singleTokenInsertion(c))return this.getMissingSymbol(c);throw this.nextTokensContext===void 0?new u.InputMismatchException(c):new u.InputMismatchException(c,this.nextTokensState,this.nextTokensContext)}singleTokenInsertion(c){let p=c.inputStream.LA(1),x=c.interpreter.atn.states[c.state].transition(0).target,g=c.interpreter.atn;return g.nextTokens(x,t.PredictionContext.fromRuleContext(g,c.context)).contains(p)?(this.reportMissingToken(c),!0):!1}singleTokenDeletion(c){let p=c.inputStream.LA(2);if(this.getExpectedTokens(c).contains(p)){this.reportUnwantedToken(c),c.consume();let x=c.currentToken;return this.reportMatch(c),x}}getMissingSymbol(c){let p=c.currentToken,v=this.getExpectedTokens(c),x=i.Token.INVALID_TYPE;v.isNil||(x=v.minElement);let g;x===i.Token.EOF?g="<missing EOF>":g="<missing "+c.vocabulary.getDisplayName(x)+">";let _=p,A=c.inputStream.tryLT(-1);return _.type===i.Token.EOF&&A!=null&&(_=A),this.constructToken(c.inputStream.tokenSource,x,g,_)}constructToken(c,p,v,x){let g=c.tokenFactory,_=x.tokenSource,A=_?_.inputStream:void 0;return g.create({source:c,stream:A},p,v,i.Token.DEFAULT_CHANNEL,-1,-1,x.line,x.charPositionInLine)}getExpectedTokens(c){return c.getExpectedTokens()}getTokenErrorDisplay(c){if(!c)return"<no token>";let p=this.getSymbolText(c);return p||(this.getSymbolType(c)===i.Token.EOF?p="<EOF>":p=`<${this.getSymbolType(c)}>`),this.escapeWSAndQuote(p)}getSymbolText(c){return c.text}getSymbolType(c){return c.type}escapeWSAndQuote(c){return c=c.replace(`
|
|
393
|
+
`,"\\n"),c=c.replace("\r","\\r"),c=c.replace(" ","\\t"),"'"+c+"'"}getErrorRecoverySet(c){let p=c.interpreter.atn,v=c.context,x=new r.IntervalSet;for(;v&&v.invokingState>=0;){let _=p.states[v.invokingState].transition(0),A=p.nextTokens(_.followState);x.addAll(A),v=v._parent}return x.remove(i.Token.EPSILON),x}consumeUntil(c,p){let v=c.inputStream.LA(1);for(;v!==i.Token.EOF&&!p.contains(v);)c.consume(),v=c.inputStream.LA(1)}};return a([e.Override],s.prototype,"reset",null),a([d(0,e.NotNull)],s.prototype,"beginErrorCondition",null),a([e.Override],s.prototype,"inErrorRecoveryMode",null),a([d(0,e.NotNull)],s.prototype,"endErrorCondition",null),a([e.Override],s.prototype,"reportMatch",null),a([e.Override],s.prototype,"reportError",null),a([d(0,e.NotNull)],s.prototype,"notifyErrorListeners",null),a([e.Override],s.prototype,"recover",null),a([e.Override],s.prototype,"sync",null),a([d(0,e.NotNull),d(1,e.NotNull)],s.prototype,"reportNoViableAlternative",null),a([d(0,e.NotNull),d(1,e.NotNull)],s.prototype,"reportInputMismatch",null),a([d(0,e.NotNull),d(1,e.NotNull)],s.prototype,"reportFailedPredicate",null),a([d(0,e.NotNull)],s.prototype,"reportUnwantedToken",null),a([d(0,e.NotNull)],s.prototype,"reportMissingToken",null),a([e.Override],s.prototype,"recoverInline",null),a([d(0,e.NotNull)],s.prototype,"singleTokenInsertion",null),a([d(0,e.NotNull)],s.prototype,"singleTokenDeletion",null),a([e.NotNull,d(0,e.NotNull)],s.prototype,"getMissingSymbol",null),a([e.NotNull,d(0,e.NotNull)],s.prototype,"getExpectedTokens",null),a([d(0,e.NotNull)],s.prototype,"getSymbolText",null),a([d(0,e.NotNull)],s.prototype,"getSymbolType",null),a([e.NotNull,d(0,e.NotNull)],s.prototype,"escapeWSAndQuote",null),a([e.NotNull,d(0,e.NotNull)],s.prototype,"getErrorRecoverySet",null),a([d(0,e.NotNull),d(1,e.NotNull)],s.prototype,"consumeUntil",null),$t.DefaultErrorStrategy=s,$t}var zt={},rf;function px(){if(rf)return zt;rf=1;/*!
|
|
394
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
395
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
396
|
+
*/var a=zt&&zt.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=zt&&zt.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(zt,"__esModule",{value:!0}),zt.ParseInfo=void 0;const m=ue();let y=class{constructor(u){this.atnSimulator=u}getDecisionInfo(){return this.atnSimulator.getDecisionInfo()}getLLDecisions(){let u=this.atnSimulator.getDecisionInfo(),r=[];for(let o=0;o<u.length;o++)u[o].LL_Fallback>0&&r.push(o);return r}getTotalTimeInPrediction(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.timeInPrediction;return r}getTotalSLLLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.SLL_TotalLook;return r}getTotalLLLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.LL_TotalLook;return r}getTotalSLLATNLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.SLL_ATNTransitions;return r}getTotalLLATNLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.LL_ATNTransitions;return r}getTotalATNLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.SLL_ATNTransitions,r+=o.LL_ATNTransitions;return r}getDFASize(u){if(u)return this.atnSimulator.atn.decisionToDFA[u].states.size;{let r=0,o=this.atnSimulator.atn.decisionToDFA;for(let t=0;t<o.length;t++)r+=this.getDFASize(t);return r}}};return a([m.NotNull],y.prototype,"getDecisionInfo",null),a([m.NotNull],y.prototype,"getLLDecisions",null),y=a([d(0,m.NotNull)],y),zt.ParseInfo=y,zt}var xn={},nf;function vp(){if(nf)return xn;nf=1;/*!
|
|
397
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
398
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
399
|
+
*/var a=xn&&xn.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(xn,"__esModule",{value:!0}),xn.ProxyParserErrorListener=void 0;const d=Aa(),m=ue();let y=class extends d.ProxyErrorListener{constructor(u){super(u)}reportAmbiguity(u,r,o,t,i,e,s){this.getDelegates().forEach(l=>{l.reportAmbiguity&&l.reportAmbiguity(u,r,o,t,i,e,s)})}reportAttemptingFullContext(u,r,o,t,i,e){this.getDelegates().forEach(s=>{s.reportAttemptingFullContext&&s.reportAttemptingFullContext(u,r,o,t,i,e)})}reportContextSensitivity(u,r,o,t,i,e){this.getDelegates().forEach(s=>{s.reportContextSensitivity&&s.reportContextSensitivity(u,r,o,t,i,e)})}};return a([m.Override],y.prototype,"reportAmbiguity",null),a([m.Override],y.prototype,"reportAttemptingFullContext",null),a([m.Override],y.prototype,"reportContextSensitivity",null),xn.ProxyParserErrorListener=y,xn}var dn={},yn={},xi={},of;function Ep(){if(of)return xi;of=1;/*!
|
|
400
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
401
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
402
|
+
*/Object.defineProperty(xi,"__esModule",{value:!0}),xi.ParseCancellationException=void 0;let a=class extends Error{constructor(m){super(m.message),this.cause=m,this.stack=m.stack}getCause(){return this.cause}};return xi.ParseCancellationException=a,xi}var sf;function Sp(){if(sf)return yn;sf=1;/*!
|
|
403
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
404
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
405
|
+
*/var a=yn&&yn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(yn,"__esModule",{value:!0}),yn.BailErrorStrategy=void 0;const d=Oa(),m=co(),y=ue(),h=Ep();let u=class extends d.DefaultErrorStrategy{recover(o,t){for(let i=o.context;i;i=i.parent)i.exception=t;throw new h.ParseCancellationException(t)}recoverInline(o){let t=new m.InputMismatchException(o);for(let i=o.context;i;i=i.parent)i.exception=t;throw new h.ParseCancellationException(t)}sync(o){}};return a([y.Override],u.prototype,"recover",null),a([y.Override],u.prototype,"recoverInline",null),a([y.Override],u.prototype,"sync",null),yn.BailErrorStrategy=u,yn}var Vs={},zs={},Ht={},af;function hx(){if(af)return Ht;af=1;/*!
|
|
406
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
407
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
408
|
+
*/Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.isSupplementaryCodePoint=Ht.isLowSurrogate=Ht.isHighSurrogate=void 0;function a(y){return y>=55296&&y<=56319}Ht.isHighSurrogate=a;function d(y){return y>=56320&&y<=57343}Ht.isLowSurrogate=d;function m(y){return y>=65536}return Ht.isSupplementaryCodePoint=m,Ht}var uf;function Tp(){return uf||(uf=1,function(a){/*!
|
|
409
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
410
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
411
|
+
*/Object.defineProperty(a,"__esModule",{value:!0}),a.CodePointBuffer=void 0;const d=qe(),m=hx();class y{constructor(u,r){this.buffer=u,this._position=0,this._size=r}static withArray(u){return new y(u,u.length)}get position(){return this._position}set position(u){if(u<0||u>this._size)throw new RangeError;this._position=u}get remaining(){return this._size-this.position}get(u){return this.buffer[u]}array(){return this.buffer.slice(0,this._size)}static builder(u){return new y.Builder(u)}}a.CodePointBuffer=y,function(h){let u;(function(o){o[o.BYTE=0]="BYTE",o[o.CHAR=1]="CHAR",o[o.INT=2]="INT"})(u||(u={}));class r{constructor(t){this.type=0,this.buffer=new Uint8Array(t),this.prevHighSurrogate=-1,this.position=0}build(){return new h(this.buffer,this.position)}static roundUpToNextPowerOfTwo(t){let i=32-Math.clz32(t-1);return Math.pow(2,i)}ensureRemaining(t){switch(this.type){case 0:if(this.buffer.length-this.position<t){let i=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Uint8Array(i);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break;case 1:if(this.buffer.length-this.position<t){let i=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Uint16Array(i);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break;case 2:if(this.buffer.length-this.position<t){let i=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Int32Array(i);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break}}append(t){this.ensureRemaining(t.length),this.appendArray(t)}appendArray(t){switch(this.type){case 0:this.appendArrayByte(t);break;case 1:this.appendArrayChar(t);break;case 2:this.appendArrayInt(t);break}}appendArrayByte(t){d(this.prevHighSurrogate===-1);let i=t,e=0,s=t.length,l=this.buffer,c=this.position;for(;e<s;){let p=i[e];if(p<=255)l[c]=p;else if(t=t.subarray(e,s),this.position=c,m.isHighSurrogate(p)){this.byteToIntBuffer(t.length),this.appendArrayInt(t);return}else{this.byteToCharBuffer(t.length),this.appendArrayChar(t);return}e++,c++}this.position=c}appendArrayChar(t){d(this.prevHighSurrogate===-1);let i=t,e=0,s=t.length,l=this.buffer,c=this.position;for(;e<s;){let p=i[e];if(!m.isHighSurrogate(p))l[c]=p;else{t=t.subarray(e,s),this.position=c,this.charToIntBuffer(t.length),this.appendArrayInt(t);return}e++,c++}this.position=c}appendArrayInt(t){let i=t,e=0,s=t.length,l=this.buffer,c=this.position;for(;e<s;){let p=i[e];e++,this.prevHighSurrogate!==-1?m.isLowSurrogate(p)?(l[c]=String.fromCharCode(this.prevHighSurrogate,p).codePointAt(0),c++,this.prevHighSurrogate=-1):(l[c]=this.prevHighSurrogate,c++,m.isHighSurrogate(p)?this.prevHighSurrogate=p:(l[c]=p,c++,this.prevHighSurrogate=-1)):m.isHighSurrogate(p)?this.prevHighSurrogate=p:(l[c]=p,c++)}this.prevHighSurrogate!==-1&&(l[c]=this.prevHighSurrogate,c++),this.position=c}byteToCharBuffer(t){let i=new Uint16Array(Math.max(this.position+t,this.buffer.length>>1));i.set(this.buffer.subarray(0,this.position),0),this.type=1,this.buffer=i}byteToIntBuffer(t){let i=new Int32Array(Math.max(this.position+t,this.buffer.length>>2));i.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=i}charToIntBuffer(t){let i=new Int32Array(Math.max(this.position+t,this.buffer.length>>1));i.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=i}}h.Builder=r}(y=a.CodePointBuffer||(a.CodePointBuffer={}))}(zs)),zs}var mn={},lf;function Np(){if(lf)return mn;lf=1;/*!
|
|
412
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
413
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
414
|
+
*/var a=mn&&mn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(mn,"__esModule",{value:!0}),mn.CodePointCharStream=void 0;const d=qe(),m=dr(),y=je(),h=ue();let u=class bp{constructor(o,t,i,e){d(t===0),this._array=o,this._size=i,this._name=e,this._position=0}get internalStorage(){return this._array}static fromBuffer(o,t){return(t===void 0||t.length===0)&&(t=m.IntStream.UNKNOWN_SOURCE_NAME),new bp(o.array(),o.position,o.remaining,t)}consume(){if(this._size-this._position===0)throw d(this.LA(1)===m.IntStream.EOF),new RangeError("cannot consume EOF");this._position++}get index(){return this._position}get size(){return this._size}mark(){return-1}release(o){}seek(o){this._position=o}get sourceName(){return this._name}toString(){return this.getText(y.Interval.of(0,this.size-1))}LA(o){let t;switch(Math.sign(o)){case-1:return t=this.index+o,t<0?m.IntStream.EOF:this._array[t];case 0:return 0;case 1:return t=this.index+o-1,t>=this.size?m.IntStream.EOF:this._array[t]}throw new RangeError("Not reached")}getText(o){const t=Math.min(o.a,this.size),i=Math.min(o.b-o.a+1,this.size-t);return this._array instanceof Int32Array?String.fromCodePoint(...Array.from(this._array.subarray(t,t+i))):String.fromCharCode(...Array.from(this._array.subarray(t,t+i)))}};return a([h.Override],u.prototype,"consume",null),a([h.Override],u.prototype,"index",null),a([h.Override],u.prototype,"size",null),a([h.Override],u.prototype,"mark",null),a([h.Override],u.prototype,"release",null),a([h.Override],u.prototype,"seek",null),a([h.Override],u.prototype,"sourceName",null),a([h.Override],u.prototype,"toString",null),a([h.Override],u.prototype,"LA",null),a([h.Override],u.prototype,"getText",null),mn.CodePointCharStream=u,mn}var cf;function Da(){return cf||(cf=1,function(a){/*!
|
|
415
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
416
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
417
|
+
*/Object.defineProperty(a,"__esModule",{value:!0}),a.CharStreams=void 0;const d=Tp(),m=Np(),y=dr();(function(h){function u(r,o){(o===void 0||o.length===0)&&(o=y.IntStream.UNKNOWN_SOURCE_NAME);let t=d.CodePointBuffer.builder(r.length),i=new Uint16Array(r.length);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);return t.append(i),m.CodePointCharStream.fromBuffer(t.build(),o)}h.fromString=u})(a.CharStreams||(a.CharStreams={}))}(Vs)),Vs}var Gt={},Yt={},ff;function Cp(){if(ff)return Yt;ff=1;/*!
|
|
418
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
419
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
420
|
+
*/var a=Yt&&Yt.__decorate||function(i,e,s,l){var c=arguments.length,p=c<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,s):l,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,e,s,l);else for(var x=i.length-1;x>=0;x--)(v=i[x])&&(p=(c<3?v(p):c>3?v(e,s,p):v(e,s))||p);return c>3&&p&&Object.defineProperty(e,s,p),p},d=Yt&&Yt.__param||function(i,e){return function(s,l){e(s,l,i)}};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.BufferedTokenStream=void 0;const m=qe(),y=Ii(),h=je(),u=vr(),r=ue(),o=Fe();let t=class{constructor(e){if(this.tokens=[],this.p=-1,this.fetchedEOF=!1,e==null)throw new Error("tokenSource cannot be null");this._tokenSource=e}get tokenSource(){return this._tokenSource}set tokenSource(e){this._tokenSource=e,this.tokens.length=0,this.p=-1,this.fetchedEOF=!1}get index(){return this.p}mark(){return 0}release(e){}seek(e){this.lazyInit(),this.p=this.adjustSeekIndex(e)}get size(){return this.tokens.length}consume(){let e;if(this.p>=0?this.fetchedEOF?e=this.p<this.tokens.length-1:e=this.p<this.tokens.length:e=!1,!e&&this.LA(1)===o.Token.EOF)throw new Error("cannot consume EOF");this.sync(this.p+1)&&(this.p=this.adjustSeekIndex(this.p+1))}sync(e){m(e>=0);let s=e-this.tokens.length+1;return s>0?this.fetch(s)>=s:!0}fetch(e){if(this.fetchedEOF)return 0;for(let s=0;s<e;s++){let l=this.tokenSource.nextToken();if(this.isWritableToken(l)&&(l.tokenIndex=this.tokens.length),this.tokens.push(l),l.type===o.Token.EOF)return this.fetchedEOF=!0,s+1}return e}get(e){if(e<0||e>=this.tokens.length)throw new RangeError("token index "+e+" out of range 0.."+(this.tokens.length-1));return this.tokens[e]}getRange(e,s){if(e<0||s<0)return[];this.lazyInit();let l=new Array;s>=this.tokens.length&&(s=this.tokens.length-1);for(let c=e;c<=s;c++){let p=this.tokens[c];if(p.type===o.Token.EOF)break;l.push(p)}return l}LA(e){let s=this.LT(e);return s?s.type:o.Token.INVALID_TYPE}tryLB(e){if(!(this.p-e<0))return this.tokens[this.p-e]}LT(e){let s=this.tryLT(e);if(s===void 0)throw new RangeError("requested lookback index out of range");return s}tryLT(e){if(this.lazyInit(),e===0)throw new RangeError("0 is not a valid lookahead index");if(e<0)return this.tryLB(-e);let s=this.p+e-1;return this.sync(s),s>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[s]}adjustSeekIndex(e){return e}lazyInit(){this.p===-1&&this.setup()}setup(){this.sync(0),this.p=this.adjustSeekIndex(0)}getTokens(e,s,l){if(this.lazyInit(),e===void 0)return m(s===void 0&&l===void 0),this.tokens;if(s===void 0&&(s=this.tokens.length-1),e<0||s>=this.tokens.length||s<0||e>=this.tokens.length)throw new RangeError("start "+e+" or stop "+s+" not in 0.."+(this.tokens.length-1));if(e>s)return[];if(l===void 0)return this.tokens.slice(e,s+1);typeof l=="number"&&(l=new Set().add(l));let c=l,p=this.tokens.slice(e,s+1);return p=p.filter(v=>c.has(v.type)),p}nextTokenOnChannel(e,s){if(this.sync(e),e>=this.size)return this.size-1;let l=this.tokens[e];for(;l.channel!==s;){if(l.type===o.Token.EOF)return e;e++,this.sync(e),l=this.tokens[e]}return e}previousTokenOnChannel(e,s){if(this.sync(e),e>=this.size)return this.size-1;for(;e>=0;){let l=this.tokens[e];if(l.type===o.Token.EOF||l.channel===s)return e;e--}return e}getHiddenTokensToRight(e,s=-1){if(this.lazyInit(),e<0||e>=this.tokens.length)throw new RangeError(e+" not in 0.."+(this.tokens.length-1));let l=this.nextTokenOnChannel(e+1,u.Lexer.DEFAULT_TOKEN_CHANNEL),c,p=e+1;return l===-1?c=this.size-1:c=l,this.filterForChannel(p,c,s)}getHiddenTokensToLeft(e,s=-1){if(this.lazyInit(),e<0||e>=this.tokens.length)throw new RangeError(e+" not in 0.."+(this.tokens.length-1));if(e===0)return[];let l=this.previousTokenOnChannel(e-1,u.Lexer.DEFAULT_TOKEN_CHANNEL);if(l===e-1)return[];let c=l+1,p=e-1;return this.filterForChannel(c,p,s)}filterForChannel(e,s,l){let c=new Array;for(let p=e;p<=s;p++){let v=this.tokens[p];l===-1?v.channel!==u.Lexer.DEFAULT_TOKEN_CHANNEL&&c.push(v):v.channel===l&&c.push(v)}return c}get sourceName(){return this.tokenSource.sourceName}getText(e){e===void 0?e=h.Interval.of(0,this.size-1):e instanceof h.Interval||(e=e.sourceInterval);let s=e.a,l=e.b;if(s<0||l<0)return"";this.fill(),l>=this.tokens.length&&(l=this.tokens.length-1);let c="";for(let p=s;p<=l;p++){let v=this.tokens[p];if(v.type===o.Token.EOF)break;c+=v.text}return c.toString()}getTextFromRange(e,s){return this.isToken(e)&&this.isToken(s)?this.getText(h.Interval.of(e.tokenIndex,s.tokenIndex)):""}fill(){this.lazyInit();const e=1e3;for(;;)if(this.fetch(e)<e)return}isWritableToken(e){return e instanceof y.CommonToken}isToken(e){return e instanceof y.CommonToken}};return a([r.NotNull],t.prototype,"_tokenSource",void 0),a([r.Override],t.prototype,"tokenSource",null),a([r.Override],t.prototype,"index",null),a([r.Override],t.prototype,"mark",null),a([r.Override],t.prototype,"release",null),a([r.Override],t.prototype,"seek",null),a([r.Override],t.prototype,"size",null),a([r.Override],t.prototype,"consume",null),a([r.Override],t.prototype,"get",null),a([r.Override],t.prototype,"LA",null),a([r.NotNull,r.Override],t.prototype,"LT",null),a([r.Override],t.prototype,"sourceName",null),a([r.NotNull,r.Override],t.prototype,"getText",null),a([r.NotNull,r.Override],t.prototype,"getTextFromRange",null),t=a([d(0,r.NotNull)],t),Yt.BufferedTokenStream=t,Yt}var pf;function wa(){if(pf)return Gt;pf=1;/*!
|
|
421
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
422
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
423
|
+
*/var a=Gt&&Gt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Gt&&Gt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.CommonTokenStream=void 0;const m=Cp(),y=ue(),h=Fe();let u=class extends m.BufferedTokenStream{constructor(o,t=h.Token.DEFAULT_CHANNEL){super(o),this.channel=t}adjustSeekIndex(o){return this.nextTokenOnChannel(o,this.channel)}tryLB(o){if(this.p-o<0)return;let t=this.p,i=1;for(;i<=o&&t>0;)t=this.previousTokenOnChannel(t-1,this.channel),i++;if(!(t<0))return this.tokens[t]}tryLT(o){if(this.lazyInit(),o===0)throw new RangeError("0 is not a valid lookahead index");if(o<0)return this.tryLB(-o);let t=this.p,i=1;for(;i<o;)this.sync(t+1)&&(t=this.nextTokenOnChannel(t+1,this.channel)),i++;return this.tokens[t]}getNumberOfOnChannelTokens(){let o=0;this.fill();for(let t of this.tokens)if(t.channel===this.channel&&o++,t.type===h.Token.EOF)break;return o}};return a([y.Override],u.prototype,"adjustSeekIndex",null),a([y.Override],u.prototype,"tryLB",null),a([y.Override],u.prototype,"tryLT",null),u=a([d(0,y.NotNull)],u),Gt.CommonTokenStream=u,Gt}var Wt={},hf;function Op(){if(hf)return Wt;hf=1;/*!
|
|
424
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
425
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
426
|
+
*/var a=Wt&&Wt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Wt&&Wt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.ListTokenSource=void 0;const m=Sa(),y=ue(),h=Fe();let u=class{constructor(o,t){if(this.i=0,this._factory=m.CommonTokenFactory.DEFAULT,o==null)throw new Error("tokens cannot be null");this.tokens=o,this._sourceName=t}get charPositionInLine(){if(this.i<this.tokens.length)return this.tokens[this.i].charPositionInLine;if(this.eofToken!=null)return this.eofToken.charPositionInLine;if(this.tokens.length>0){let o=this.tokens[this.tokens.length-1],t=o.text;if(t!=null){let i=t.lastIndexOf(`
|
|
427
|
+
`);if(i>=0)return t.length-i-1}return o.charPositionInLine+o.stopIndex-o.startIndex+1}return 0}nextToken(){if(this.i>=this.tokens.length){if(this.eofToken==null){let t=-1;if(this.tokens.length>0){let e=this.tokens[this.tokens.length-1].stopIndex;e!==-1&&(t=e+1)}let i=Math.max(-1,t-1);this.eofToken=this._factory.create({source:this,stream:this.inputStream},h.Token.EOF,"EOF",h.Token.DEFAULT_CHANNEL,t,i,this.line,this.charPositionInLine)}return this.eofToken}let o=this.tokens[this.i];return this.i===this.tokens.length-1&&o.type===h.Token.EOF&&(this.eofToken=o),this.i++,o}get line(){if(this.i<this.tokens.length)return this.tokens[this.i].line;if(this.eofToken!=null)return this.eofToken.line;if(this.tokens.length>0){let o=this.tokens[this.tokens.length-1],t=o.line,i=o.text;if(i!=null)for(let e=0;e<i.length;e++)i.charAt(e)===`
|
|
428
|
+
`&&t++;return t}return 1}get inputStream(){if(this.i<this.tokens.length)return this.tokens[this.i].inputStream;if(this.eofToken!=null)return this.eofToken.inputStream;if(this.tokens.length>0)return this.tokens[this.tokens.length-1].inputStream}get sourceName(){if(this._sourceName)return this._sourceName;let o=this.inputStream;return o!=null?o.sourceName:"List"}set tokenFactory(o){this._factory=o}get tokenFactory(){return this._factory}};return a([y.Override],u.prototype,"charPositionInLine",null),a([y.Override],u.prototype,"nextToken",null),a([y.Override],u.prototype,"line",null),a([y.Override],u.prototype,"inputStream",null),a([y.Override],u.prototype,"sourceName",null),a([y.Override,y.NotNull,d(0,y.NotNull)],u.prototype,"tokenFactory",null),u=a([d(0,y.NotNull)],u),Wt.ListTokenSource=u,Wt}var di={},xf;function xx(){if(xf)return di;xf=1;/*!
|
|
429
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
430
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
431
|
+
*/Object.defineProperty(di,"__esModule",{value:!0}),di.MultiMap=void 0;let a=class extends Map{constructor(){super()}map(m,y){let h=super.get(m);h||(h=[],super.set(m,h)),h.push(y)}getPairs(){let m=[];return this.forEach((y,h)=>{y.forEach(u=>{m.push([h,u])})}),m}};return di.MultiMap=a,di}var Qt={},gn={},df;function Dp(){if(df)return gn;df=1;/*!
|
|
432
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
433
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
434
|
+
*/var a=gn&&gn.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(gn,"__esModule",{value:!0}),gn.InterpreterRuleContext=void 0;const d=ue(),m=nt();let y=class extends m.ParserRuleContext{constructor(u,r,o){o!==void 0?super(r,o):super(),this._ruleIndex=u}get ruleIndex(){return this._ruleIndex}};return a([d.Override],y.prototype,"ruleIndex",null),gn.InterpreterRuleContext=y,gn}var yf;function wp(){if(yf)return Qt;yf=1;/*!
|
|
435
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
436
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
437
|
+
*/var a=Qt&&Qt.__decorate||function(g,_,A,E){var D=arguments.length,N=D<3?_:E===null?E=Object.getOwnPropertyDescriptor(_,A):E,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(g,_,A,E);else for(var P=g.length-1;P>=0;P--)(w=g[P])&&(N=(D<3?w(N):D>3?w(_,A,N):w(_,A))||N);return D>3&&N&&Object.defineProperty(_,A,N),N},d=Qt&&Qt.__param||function(g,_){return function(A,E){_(A,E,g)}};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.ParserInterpreter=void 0;const m=pr(),y=Be(),h=gr(),u=lo(),r=co(),o=Dp(),t=xp(),i=ue(),e=ue(),s=Mi(),l=Bi(),c=Ar(),p=va(),v=Fe();let x=class ua extends s.Parser{constructor(_,A,E,D,N){if(super(_ instanceof ua?_.inputStream:N),this._parentContextStack=[],this.overrideDecision=-1,this.overrideDecisionInputIndex=-1,this.overrideDecisionAlt=-1,this.overrideDecisionReached=!1,this._overrideDecisionRoot=void 0,_ instanceof ua){let w=_;this._grammarFileName=w._grammarFileName,this._atn=w._atn,this.pushRecursionContextStates=w.pushRecursionContextStates,this._ruleNames=w._ruleNames,this._vocabulary=w._vocabulary,this.interpreter=new l.ParserATNSimulator(this._atn,this)}else{A=A,E=E,D=D,this._grammarFileName=_,this._atn=D,this._ruleNames=E.slice(0),this._vocabulary=A,this.pushRecursionContextStates=new h.BitSet(D.states.length);for(let w of D.states)w instanceof p.StarLoopEntryState&&w.precedenceRuleDecision&&this.pushRecursionContextStates.set(w.stateNumber);this.interpreter=new l.ParserATNSimulator(D,this)}}reset(_){_===void 0?super.reset():super.reset(_),this.overrideDecisionReached=!1,this._overrideDecisionRoot=void 0}get atn(){return this._atn}get vocabulary(){return this._vocabulary}get ruleNames(){return this._ruleNames}get grammarFileName(){return this._grammarFileName}parse(_){let A=this._atn.ruleToStartState[_];for(this._rootContext=this.createInterpreterRuleContext(void 0,m.ATNState.INVALID_STATE_NUMBER,_),A.isPrecedenceRule?this.enterRecursionRule(this._rootContext,A.stateNumber,_,0):this.enterRule(this._rootContext,A.stateNumber,_);;){let E=this.atnState;switch(E.stateType){case y.ATNStateType.RULE_STOP:if(this._ctx.isEmpty)if(A.isPrecedenceRule){let D=this._ctx,N=this._parentContextStack.pop();return this.unrollRecursionContexts(N[0]),D}else return this.exitRule(),this._rootContext;this.visitRuleStopState(E);break;default:try{this.visitState(E)}catch(D){if(D instanceof c.RecognitionException)this.state=this._atn.ruleToStopState[E.ruleIndex].stateNumber,this.context.exception=D,this.errorHandler.reportError(this,D),this.recover(D);else throw D}break}}}enterRecursionRule(_,A,E,D){this._parentContextStack.push([this._ctx,_.invokingState]),super.enterRecursionRule(_,A,E,D)}get atnState(){return this._atn.states[this.state]}visitState(_){let A=1;_.numberOfTransitions>1&&(A=this.visitDecisionState(_));let E=_.transition(A-1);switch(E.serializationType){case 1:if(this.pushRecursionContextStates.get(_.stateNumber)&&!(E.target instanceof t.LoopEndState)){let Y=this._parentContextStack[this._parentContextStack.length-1],L=this.createInterpreterRuleContext(Y[0],Y[1],this._ctx.ruleIndex);this.pushNewRecursionContext(L,this._atn.ruleToStartState[_.ruleIndex].stateNumber,this._ctx.ruleIndex)}break;case 5:this.match(E._label);break;case 2:case 7:case 8:E.matches(this._input.LA(1),v.Token.MIN_USER_TOKEN_TYPE,65535)||this.recoverInline(),this.matchWildcard();break;case 9:this.matchWildcard();break;case 3:let D=E.target,N=D.ruleIndex,w=this.createInterpreterRuleContext(this._ctx,_.stateNumber,N);D.isPrecedenceRule?this.enterRecursionRule(w,D.stateNumber,N,E.precedence):this.enterRule(w,E.target.stateNumber,N);break;case 4:let P=E;if(!this.sempred(this._ctx,P.ruleIndex,P.predIndex))throw new u.FailedPredicateException(this);break;case 6:let $=E;this.action(this._ctx,$.ruleIndex,$.actionIndex);break;case 10:if(!this.precpred(this._ctx,E.precedence)){let Y=E.precedence;throw new u.FailedPredicateException(this,`precpred(_ctx, ${Y})`)}break;default:throw new Error("UnsupportedOperationException: Unrecognized ATN transition type.")}this.state=E.target.stateNumber}visitDecisionState(_){let A;this.errorHandler.sync(this);let E=_.decision;return E===this.overrideDecision&&this._input.index===this.overrideDecisionInputIndex&&!this.overrideDecisionReached?(A=this.overrideDecisionAlt,this.overrideDecisionReached=!0):A=this.interpreter.adaptivePredict(this._input,E,this._ctx),A}createInterpreterRuleContext(_,A,E){return new o.InterpreterRuleContext(E,_,A)}visitRuleStopState(_){if(this._atn.ruleToStartState[_.ruleIndex].isPrecedenceRule){let D=this._parentContextStack.pop();this.unrollRecursionContexts(D[0]),this.state=D[1]}else this.exitRule();let E=this._atn.states[this.state].transition(0);this.state=E.followState.stateNumber}addDecisionOverride(_,A,E){this.overrideDecision=_,this.overrideDecisionInputIndex=A,this.overrideDecisionAlt=E}get overrideDecisionRoot(){return this._overrideDecisionRoot}recover(_){let A=this._input.index;if(this.errorHandler.recover(this,_),this._input.index===A){let E=_.getOffendingToken();if(!E)throw new Error("Expected exception to have an offending token");let D=E.tokenSource,N=D!==void 0?D.inputStream:void 0,w={source:D,stream:N};if(_ instanceof r.InputMismatchException){let P=_.expectedTokens;if(P===void 0)throw new Error("Expected the exception to provide expected tokens");let $=v.Token.INVALID_TYPE;P.isNil||($=P.minElement);let Y=this.tokenFactory.create(w,$,E.text,v.Token.DEFAULT_CHANNEL,-1,-1,E.line,E.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,Y))}else{E.tokenSource;let P=this.tokenFactory.create(w,v.Token.INVALID_TYPE,E.text,v.Token.DEFAULT_CHANNEL,-1,-1,E.line,E.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,P))}}}recoverInline(){return this._errHandler.recoverInline(this)}get rootContext(){return this._rootContext}};return a([i.NotNull],x.prototype,"_vocabulary",void 0),a([e.Override],x.prototype,"reset",null),a([e.Override],x.prototype,"atn",null),a([e.Override],x.prototype,"vocabulary",null),a([e.Override],x.prototype,"ruleNames",null),a([e.Override],x.prototype,"grammarFileName",null),a([e.Override],x.prototype,"enterRecursionRule",null),x=a([d(1,i.NotNull)],x),Qt.ParserInterpreter=x,Qt}var Xt={},mf;function dx(){if(mf)return Xt;mf=1;/*!
|
|
438
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
439
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
440
|
+
*/var a=Xt&&Xt.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=Xt&&Xt.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.ParseTreeMatch=void 0;const m=ue();let y=class{constructor(u,r,o,t){if(!u)throw new Error("tree cannot be null");if(!r)throw new Error("pattern cannot be null");if(!o)throw new Error("labels cannot be null");this._tree=u,this._pattern=r,this._labels=o,this._mismatchedNode=t}get(u){let r=this._labels.get(u);if(!(!r||r.length===0))return r[r.length-1]}getAll(u){const r=this._labels.get(u);return r||[]}get labels(){return this._labels}get mismatchedNode(){return this._mismatchedNode}get succeeded(){return!this._mismatchedNode}get pattern(){return this._pattern}get tree(){return this._tree}toString(){return`Match ${this.succeeded?"succeeded":"failed"}; found ${this.labels.size} labels`}};return a([m.NotNull,d(0,m.NotNull)],y.prototype,"getAll",null),a([m.NotNull],y.prototype,"labels",null),a([m.NotNull],y.prototype,"pattern",null),a([m.NotNull],y.prototype,"tree",null),a([m.Override],y.prototype,"toString",null),y=a([d(0,m.NotNull),d(1,m.NotNull),d(2,m.NotNull)],y),Xt.ParseTreeMatch=y,Xt}var Kt={},yi={},mi={},gf;function yx(){if(gf)return mi;gf=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.XPathLexer=void 0;const a=uo(),d=vr(),m=oo(),y=_r(),h=ot();let u=class Ve extends d.Lexer{constructor(o){super(o),this._interp=new m.LexerATNSimulator(Ve._ATN,this)}get vocabulary(){return Ve.VOCABULARY}get grammarFileName(){return"XPathLexer.g4"}get ruleNames(){return Ve.ruleNames}get serializedATN(){return Ve._serializedATN}get channelNames(){return Ve.channelNames}get modeNames(){return Ve.modeNames}action(o,t,i){switch(t){case 4:this.ID_action(o,i);break}}ID_action(o,t){switch(t){case 0:let i=this.text;i.charAt(0)===i.charAt(0).toUpperCase()?this.type=Ve.TOKEN_REF:this.type=Ve.RULE_REF;break}}static get _ATN(){return Ve.__ATN||(Ve.__ATN=new a.ATNDeserializer().deserialize(h.toCharArray(Ve._serializedATN))),Ve.__ATN}};return mi.XPathLexer=u,u.TOKEN_REF=1,u.RULE_REF=2,u.ANYWHERE=3,u.ROOT=4,u.WILDCARD=5,u.BANG=6,u.ID=7,u.STRING=8,u.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"],u.modeNames=["DEFAULT_MODE"],u.ruleNames=["ANYWHERE","ROOT","WILDCARD","BANG","ID","NameChar","NameStartChar","STRING"],u._LITERAL_NAMES=[void 0,void 0,void 0,"'//'","'/'","'*'","'!'"],u._SYMBOLIC_NAMES=[void 0,"TOKEN_REF","RULE_REF","ANYWHERE","ROOT","WILDCARD","BANG","ID","STRING"],u.VOCABULARY=new y.VocabularyImpl(u._LITERAL_NAMES,u._SYMBOLIC_NAMES,[]),u._serializedATNSegments=2,u._serializedATNSegment0=`줝쪺֍꾺体؇쉁
|
|
441
|
+
2\b \x07 \x07\b \b \x07
|
|
442
|
+
\f"\v\x07\x07\b\b \x07 ,
|
|
443
|
+
\f /\v -
|
|
444
|
+
\x07\x07 \b\v \r
|
|
445
|
+
ʶ
|
|
446
|
+
2;C\\aac|¡¬¬¯¯··¼¼ÂØÚøú˃ˈ˓ˢ˦ˮˮ˰˰̂ͶͼͿΈΈΊΌΎΎΐΣΥϷϹ҃҅҉ҌԱԳ՛՛գ։ֿׁׁ֓׃ׄ׆ׇגײ״؇ؒ؞؞آ٫ٰە۪ۗ۟ۡ۬۾܁܁ܑݏ߂߷ࠂࡂࢢࢶࢸࢿࣖ॥२ॱॳঅইকপবলসা্য়ৡ২৳ਃਅਇਕਪਬਲਵਸਾਾੀ੍ਜ਼ਫ਼੨ઃઅઇએઑઓકપબલવષાેૉો્ૢ૨૱ૻૻଃଅଇକପବଲଵଷା୍ୟୡ୨ୱ୳୳அஇஐஒஔஜஞஞபரீைொௌ௨௱ంఅఇఎఐఒఔపబిెైొౌౘౚౢ౨ಂಅಇಎಐಒಔಪಬವಷಾೆೈೊೌೠೠೢ೨ೱೳഃഅഇഎഐഒഔ഼ിെൈൊൌൖ൙ൡ൨൱ർඁඅඇගඳඵලෂෑූෘෘේ෨෴ฃโ๐๒๛ຄຆຆຉຊຌຌຏຏຖນປມຣລວວຩຩຬອຯົຽໂໆ່່໊໒ໞ༂༂༚༛༢༫༹༹༷༷༻༻ཀཉཋཱི྆ྈྙྛ྾࿈࿈ဂ။ၒ႟ႢჇგჼჾቊቌቒቘቚቚቜቢኊኌኒኲኴኺዀዂዂዄዊዘዚጒጔጚ፟፡ᎂ᎑Ꭲᏺᐃ᙮ᙱᚁᚃ᚜ᚢ᛬ᛰᜂᜎᜐᜢ᜶ᝂᝢᝮᝰᝲគ៕៙៙២᠍᠐᠒ᠢᢂᢲᤂᤠᤢᤲ᥈ᥲᦂᦲ᧒ᨂᨢ᩠ᩢ᪁᪒᪩᪩ᪿ᪲ᬂ᭒᭛᭭᭵ᮂᰂ᱂ᱏ᱿ᲂ᳔᳖᳒᳸ᳺᴂ᷽᷷ἚἢὊὒὙὛὛὝὝὟὟὡᾂᾶᾸι῀῀ῄῆῈ῎ῒῘ῝ῢ΅ῴῶῸ῾‑‰⁁⁂⁖⁖ⁱ₁₁ₒ⃒⃞⃣⃣⃧℄℄℉℉ℌℕ℗℗ℛ℟ΩΩℨℨKKℬℯℱ℻ℾ⅁ⅇ⅋⅐⅐Ⅲ↊ⰂⰰⰲⱠⱢ⳦Ⳮⴂⴧⴲⶁⶢⶨⶪⶰⶲⶸⶺⷀⷂⷈⷊⷐⷒⷘⷚⷠⷢ⸁⸱⸱〇〉〣〱〳〷〺〾ぃ゛゜ゟァィーヾㄇㄯㄳ㆐ㆢㆼㇲ㈁㐂䶷丂鿗ꀂꓒ꓿ꔂ꘎ꘒꙂ꙱ꙶꙿꚁ꛳ꜙ꜡Ꜥ꞊ꞍꞰꞲꞹꟹ꠩ꡂ꡵ꢂ꣒꣢꣹ꣽꣽꣿꣿ꤂꤯ꤲꥢꦂ꧂꧑ꧢꨀꨂꩂ꩒ꩢ꩸ꩼꫝ꫟ꫢ꫱ꫴꬃꬋꬓꬢꬨꬪꬰꬲꭜꭞꭧꭲ꯬꯲갂ힲퟍ車全flﬕײַשׁשּׁטּךּמּנּנּףּצּרּ﮳ﯕ﴿ﵒﶔﷲ﷽︂︑︢︱︵︶﹏﹑ﹲﹶﹸ!!2;C\aac|ィᅣᅩᅯᅵ�\r(*<>?AOR_üłŶǿǿʂʞʢ˒ˢˢ̡̲̂͌͒ͼΟυϊϑϓϗЂҟҢҫҲӕӚӽԂԩԲեܸ݂ݗݢݩࠂࠇࠊࠊࠌ࠷࠹࠺࠾࠾ࡁࡗࡢࡸࢂࢠࣶࣴࣷंगढऻংহীুਂਅਇਈਕਗਙਛਵ਼ੁੁંઞૂૉો૨ଂଷୂୗୢ୴ஂஓంొಂೂဂ၈ၨၱႁႼႿႿგცჲ჻ᄂᄶᄸᅁᅒᅵᅸᅸᆂᇆᇌᇎᇒᇜᇞᇞሂሓሕሹቀቀኂኈኊኊኌኑኟኡኪኲዬዲዻጂጅጇጎጒጕጪጬጲጴጵጷጻጾፆፉፊፍፏፒፒፙፙ፟፥፨፮፲፶ᐂᑌᑒᑛᒂᓇᓉᓉᓒᓛᖂᖷᖺᗂᗚᗟᘂᙂᙆᙆᙒᙛᚂᚹᛂᛋᜂᜟᜭᜲᢢᣫᤁᤁ᫂ᰂᰊᰌ᱂᱒ᱛᱴᲑᲔᲩᲫᲸ ⎛␂⑰⒂╅。㐰䐂䙈栂樺橂橠橢橫櫒櫯櫲櫶欂欸歂歅歒歛步歹歿殑漂潆潒澀澑澡濢濢瀂蟮蠂諴뀂뀃밂뱬뱲뱾벂벊벒벛벟베벢벥텧텫텯톄톇톍톬톯퉄퉆퐂푖푘풞풠풡풤풤풧풨풫풮풰풻풽풽풿퓅퓇픇픉플픏픖픘픞픠픻픽핀핂핆핈핈핌핒핔횧횪훂후훜훞훼훾휖휘휶휸흐흒흰흲힊힌ퟄퟆퟍퟐ\uD801\uDA02\uDA38\uDA3D\uDA6E\uDA77\uDA77\uDA86\uDA86\uDA9D\uDAA1\uDAA3\uDAB1ꛘ꜂뜶띂렟렢캣﨟"ĂDZɀC\\c|¬¬··¼¼ÂØÚøú˃ˈ˓ˢ˦ˮˮ˰˰ͲͶͼͿΈΈΊΌΎΎΐΣΥϷϹ҃ҌԱԳ՛՛գ։גײ״آٌٰٱٳەۗۗۧۨ۰۱ۼ۾܁܁ܒܒܔܱݏާߌ߬߶߷ࠂࠗࠜࠜࠦࠦࠪࠪࡂ࡚ࢢࢶࢸࢿआऻिि॒॒ग़ॣॳংইকপবলসিিয়ৡৣ৲৳ਇਕਪਬਲਵਸਜ਼ਫ਼ੴ੶ઇએઑઓકપબલવષિિૢૣૻૻଇକପବଲଵଷିିୟୡୣ୳୳அஅஇஐஒஔஜஞஞபரఇఎఐఒఔపబిిౚౢౣಂಂಇಎಐಒಔಪಬವಷಿಿೠೠೢೣೳഇഎഐഒഔ഼ിിൖ൘ൡൣർඁඇගඳඵලෂฃาิีโ่ຄຆຆຉຊຌຌຏຏຖນປມຣລວວຩຩຬອຯາິີໂໆ່່ໞ༂༂གཉཋྊྎဂာ၁၁ၒၗၜၟၣၣၧၨၰၲၷႃ႐႐ႢჇგჼჾቊቌቒቘቚቚቜቢኊኌኒኲኴኺዀዂዂዄዊዘዚጒጔጚᎂ᎑Ꭲᏺᐃ᙮ᙱᚁᚃ᚜ᚢ᛬ᛰᜂᜎᜐᜓᜢᜳᝂᝓᝢᝮᝰᝲគ឵៙៙ᠢᢂᢆᢉᢪᢲᤂᤠᥒᥲᦂᦲᨂᨘᨢᩖ᪩᪩ᬈᭇᮅᮢ᮰᮱ᮼᯧᰂᰥᱏ᱑ᱜ᱿ᲂᳫᳮᳰᳳ᳷᳸ᴂ᷁ḂἚἢὊὒὙὛὛὝὝὟὟὡᾂᾶᾸι῀῀ῄῆῈ῎ῒῘ῝ῢ΅ῴῶῸ῾₁₁ₒ℄℄℉℉ℌℕ℗℗ℛ℟ΩΩℨℨKKℬℯℱ℻ℾ⅁ⅇ⅋⅐⅐Ⅲ↊ⰂⰰⰲⱠⱢ⳦Ⳮ⳰ⴂⴧⴲⶂⶢⶨⶪⶰⶲⶸⶺⷀⷂⷈⷊⷐⷒⷘⷚⷠ⸱⸱〇〉〣〫〳〷〺〾ぃゟァィーヾㄇㄯㄳ㆐ㆢㆼㇲ㈁㐂䶷丂鿗ꀂꓒ꓿ꔂ꘎ꘒ꘡Ꙃ꙰ꚁꚟꚢ꛱ꜙ꜡Ꜥ꞊ꞍꞰꞲꞹꟹꠃꠅꠇꠉꠌꠎꠤꡂ꡵ꢄꢵꣴ꣹ꣽꣽꣿꣿꤌꤧꤲꥈꥢꦆꦴ꧑꧑ꧢꧦꧨ꧱ꧼꨀꨂꨪꩂꩄꩆꩍꩢ꩸ꩼꩼꪀꪱꪳꪳꪷꪸꪻ꪿ꫂꫂꫝ꫟ꫢꫬꫴ꫶ꬃꬋꬓꬢꬨꬪꬰꬲꭜꭞꭧꭲꯤ갂ힲퟍ車全flﬕײַײַﬡשׁשּׁטּךּמּנּנּףּצּרּ﮳ﯕ﴿ﵒﶔﷲ﷽ﹲﹶﹸC\c|ィᅣᅩᅯᅵ\r(*<>?AOR_üłŶʂʞʢ˒̡̲̂͌͒ͷΟυϊϑϓϗЂҟҲӕӚӽԂԩԲեܸ݂ݗݢݩࠂࠇࠊࠊࠌ࠷࠹࠺࠾࠾ࡁࡗࡢࡸࢂࢠࣶࣴࣷंगढऻংহীুਂਂਕਗਙਛਵંઞૂૉો૦ଂଷୂୗୢ୴ஂஓంొಂೂစ္ႅႱგცᄅᄨᅒᅴᅸᅸᆅᆴᇃᇆᇜᇜᇞᇞሂሓሕርኂኈኊኊኌኑኟኡኪኲዠጇጎጒጕጪጬጲጴጵጷጻጿጿፒፒ፟፣ᐂᐶᑉᑌᒂᒱᓆᓇᓉᓉᖂᖰᗚᗝᘂᘱᙆᙆᚂᚬᜂᢢᣡᤁᤁ᫂ᰂᰊᰌᰰ᱂᱂ᱴᲑ ⎛␂⑰⒂╅。㐰䐂䙈栂樺橂橠櫒櫯欂欱歂歅步歹歿殑漂潆潒潒澕澡濢濢瀂蟮蠂諴뀂뀃밂뱬뱲뱾벂벊벒벛퐂푖푘풞풠풡풤풤풧풨풫풮풰풻풽풽풿퓅퓇픇픉플픏픖픘픞픠픻픽핀핂핆핈핈`,u._serializedATNSegment1=`핌핒핔횧횪훂후훜훞훼훾휖휘휶휸흐흒흰흲힊힌ퟄퟆퟍꛘ꜂뜶띂렟렢캣﨟1\x07 \v\x07 \v\r%')\x071\x071\x071\x07,\b\x1B\x07#\x1B
|
|
447
|
+
\b\r\x07" !!#" #$\b$\f%& &'( ()-\x07)*,\v+*,/-.-+.0/-01\x07)1 -`,u._serializedATN=h.join([u._serializedATNSegment0,u._serializedATNSegment1],""),mi}var _n={},_f;function mx(){if(_f)return _n;_f=1;/*!
|
|
448
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
449
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
450
|
+
*/var a=_n&&_n.__decorate||function(y,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(y,h,u,r);else for(var e=y.length-1;e>=0;e--)(i=y[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(_n,"__esModule",{value:!0}),_n.XPathLexerErrorListener=void 0;const d=ue();let m=class{syntaxError(h,u,r,o,t,i){}};return a([d.Override],m.prototype,"syntaxError",null),_n.XPathLexerErrorListener=m,_n}var An={},vn={},Af;function Hn(){if(Af)return vn;Af=1;/*!
|
|
451
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
452
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
453
|
+
*/var a=vn&&vn.__decorate||function(y,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(y,h,u,r);else for(var e=y.length-1;e>=0;e--)(i=y[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(vn,"__esModule",{value:!0}),vn.XPathElement=void 0;const d=ue();let m=class{constructor(h){this.nodeName=h,this.invert=!1}toString(){let h=this.invert?"!":"";return Object.constructor.name+"["+h+this.nodeName+"]"}};return a([d.Override],m.prototype,"toString",null),vn.XPathElement=m,vn}var vf;function gx(){if(vf)return An;vf=1;/*!
|
|
454
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
455
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
456
|
+
*/var a=An&&An.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(An,"__esModule",{value:!0}),An.XPathRuleAnywhereElement=void 0;const d=ue(),m=Sr(),y=Hn();let h=class extends y.XPathElement{constructor(r,o){super(r),this.ruleIndex=o}evaluate(r){return m.Trees.findAllRuleNodes(r,this.ruleIndex)}};return a([d.Override],h.prototype,"evaluate",null),An.XPathRuleAnywhereElement=h,An}var En={},Ef;function _x(){if(Ef)return En;Ef=1;/*!
|
|
457
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
458
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
459
|
+
*/var a=En&&En.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(En,"__esModule",{value:!0}),En.XPathRuleElement=void 0;const d=nt(),m=ue(),y=Sr(),h=Hn();let u=class extends h.XPathElement{constructor(o,t){super(o),this.ruleIndex=t}evaluate(o){let t=[];for(let i of y.Trees.getChildren(o))i instanceof d.ParserRuleContext&&(i.ruleIndex===this.ruleIndex&&!this.invert||i.ruleIndex!==this.ruleIndex&&this.invert)&&t.push(i);return t}};return a([m.Override],u.prototype,"evaluate",null),En.XPathRuleElement=u,En}var Sn={},Sf;function Ax(){if(Sf)return Sn;Sf=1;/*!
|
|
460
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
461
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
462
|
+
*/var a=Sn&&Sn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.XPathTokenAnywhereElement=void 0;const d=ue(),m=Sr(),y=Hn();let h=class extends y.XPathElement{constructor(r,o){super(r),this.tokenType=o}evaluate(r){return m.Trees.findAllTokenNodes(r,this.tokenType)}};return a([d.Override],h.prototype,"evaluate",null),Sn.XPathTokenAnywhereElement=h,Sn}var Tn={},Tf;function vx(){if(Tf)return Tn;Tf=1;/*!
|
|
463
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
464
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
465
|
+
*/var a=Tn&&Tn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.XPathTokenElement=void 0;const d=ue(),m=yr(),y=Sr(),h=Hn();let u=class extends h.XPathElement{constructor(o,t){super(o),this.tokenType=t}evaluate(o){let t=[];for(let i of y.Trees.getChildren(o))i instanceof m.TerminalNode&&(i.symbol.type===this.tokenType&&!this.invert||i.symbol.type!==this.tokenType&&this.invert)&&t.push(i);return t}};return a([d.Override],u.prototype,"evaluate",null),Tn.XPathTokenElement=u,Tn}var bn={},bf;function Ex(){if(bf)return bn;bf=1;/*!
|
|
466
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
467
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
468
|
+
*/var a=bn&&bn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(bn,"__esModule",{value:!0}),bn.XPathWildcardAnywhereElement=void 0;const d=ue(),m=Sr(),y=Ra(),h=Hn();let u=class extends h.XPathElement{constructor(){super(y.XPath.WILDCARD)}evaluate(o){return this.invert?[]:m.Trees.getDescendants(o)}};return a([d.Override],u.prototype,"evaluate",null),bn.XPathWildcardAnywhereElement=u,bn}var Nn={},Nf;function Sx(){if(Nf)return Nn;Nf=1;/*!
|
|
469
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
470
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
471
|
+
*/var a=Nn&&Nn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.XPathWildcardElement=void 0;const d=ue(),m=Sr(),y=Ra(),h=Hn();let u=class extends h.XPathElement{constructor(){super(y.XPath.WILDCARD)}evaluate(o){let t=[];if(this.invert)return t;for(let i of m.Trees.getChildren(o))t.push(i);return t}};return a([d.Override],u.prototype,"evaluate",null),Nn.XPathWildcardElement=u,Nn}var Cf;function Ra(){if(Cf)return yi;Cf=1;/*!
|
|
472
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
473
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
474
|
+
*/Object.defineProperty(yi,"__esModule",{value:!0}),yi.XPath=void 0;const a=Da(),d=wa(),m=io(),y=nt(),h=Fe(),u=yx(),r=mx(),o=gx(),t=_x(),i=Ax(),e=vx(),s=Ex(),l=Sx();let c=class Rp{constructor(v,x){this.parser=v,this.path=x,this.elements=this.split(x)}split(v){let x=new u.XPathLexer(a.CharStreams.fromString(v));x.recover=N=>{throw N},x.removeErrorListeners(),x.addErrorListener(new r.XPathLexerErrorListener);let g=new d.CommonTokenStream(x);try{g.fill()}catch(N){if(N instanceof m.LexerNoViableAltException){let P="Invalid tokens or characters at index "+x.charPositionInLine+" in path '"+v+"' -- "+N.message;throw new RangeError(P)}throw N}let _=g.getTokens(),A=[],E=_.length,D=0;e:for(;D<E;){let N=_[D],w;switch(N.type){case u.XPathLexer.ROOT:case u.XPathLexer.ANYWHERE:let P=N.type===u.XPathLexer.ANYWHERE;D++,w=_[D];let $=w.type===u.XPathLexer.BANG;$&&(D++,w=_[D]);let Y=this.getXPathElement(w,P);Y.invert=$,A.push(Y),D++;break;case u.XPathLexer.TOKEN_REF:case u.XPathLexer.RULE_REF:case u.XPathLexer.WILDCARD:A.push(this.getXPathElement(N,!1)),D++;break;case h.Token.EOF:break e;default:throw new Error("Unknowth path element "+N)}}return A}getXPathElement(v,x){if(v.type===h.Token.EOF)throw new Error("Missing path element at end of path");let g=v.text;if(g==null)throw new Error("Expected wordToken to have text content.");let _=this.parser.getTokenType(g),A=this.parser.getRuleIndex(g);switch(v.type){case u.XPathLexer.WILDCARD:return x?new s.XPathWildcardAnywhereElement:new l.XPathWildcardElement;case u.XPathLexer.TOKEN_REF:case u.XPathLexer.STRING:if(_===h.Token.INVALID_TYPE)throw new Error(g+" at index "+v.startIndex+" isn't a valid token name");return x?new i.XPathTokenAnywhereElement(g,_):new e.XPathTokenElement(g,_);default:if(A===-1)throw new Error(g+" at index "+v.startIndex+" isn't a valid rule name");return x?new o.XPathRuleAnywhereElement(g,A):new t.XPathRuleElement(g,A)}}static findAll(v,x,g){return new Rp(g,x).evaluate(v)}evaluate(v){let x=new y.ParserRuleContext;x.addChild(v);let g=new Set([x]),_=0;for(;_<this.elements.length;){let A=new Set;for(let E of g)E.childCount>0&&this.elements[_].evaluate(E).forEach(A.add,A);_++,g=A}return g}};return yi.XPath=c,c.WILDCARD="*",c.NOT="!",yi}var Of;function Tx(){if(Of)return Kt;Of=1;/*!
|
|
475
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
476
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
477
|
+
*/var a=Kt&&Kt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Kt&&Kt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.ParseTreePattern=void 0;const m=ue(),y=Ra();let h=class{constructor(r,o,t,i){this._matcher=r,this._patternRuleIndex=t,this._pattern=o,this._patternTree=i}match(r){return this._matcher.match(r,this)}matches(r){return this._matcher.match(r,this).succeeded}findAll(r,o){let t=y.XPath.findAll(r,o,this._matcher.parser),i=[];for(let e of t){let s=this.match(e);s.succeeded&&i.push(s)}return i}get matcher(){return this._matcher}get pattern(){return this._pattern}get patternRuleIndex(){return this._patternRuleIndex}get patternTree(){return this._patternTree}};return a([m.NotNull],h.prototype,"_pattern",void 0),a([m.NotNull],h.prototype,"_patternTree",void 0),a([m.NotNull],h.prototype,"_matcher",void 0),a([m.NotNull,d(0,m.NotNull)],h.prototype,"match",null),a([d(0,m.NotNull)],h.prototype,"matches",null),a([m.NotNull,d(0,m.NotNull),d(1,m.NotNull)],h.prototype,"findAll",null),a([m.NotNull],h.prototype,"matcher",null),a([m.NotNull],h.prototype,"pattern",null),a([m.NotNull],h.prototype,"patternTree",null),h=a([d(0,m.NotNull),d(1,m.NotNull),d(3,m.NotNull)],h),Kt.ParseTreePattern=h,Kt}var Jt={},Df;function bx(){if(Df)return Jt;Df=1;/*!
|
|
478
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
479
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
480
|
+
*/var a=Jt&&Jt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Jt&&Jt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.RuleTagToken=void 0;const m=ue(),y=Fe();let h=class{constructor(r,o,t){if(r==null||r.length===0)throw new Error("ruleName cannot be null or empty.");this._ruleName=r,this.bypassTokenType=o,this._label=t}get ruleName(){return this._ruleName}get label(){return this._label}get channel(){return y.Token.DEFAULT_CHANNEL}get text(){return this._label!=null?"<"+this._label+":"+this._ruleName+">":"<"+this._ruleName+">"}get type(){return this.bypassTokenType}get line(){return 0}get charPositionInLine(){return-1}get tokenIndex(){return-1}get startIndex(){return-1}get stopIndex(){return-1}get tokenSource(){}get inputStream(){}toString(){return this._ruleName+":"+this.bypassTokenType}};return a([m.NotNull],h.prototype,"ruleName",null),a([m.Override],h.prototype,"channel",null),a([m.Override],h.prototype,"text",null),a([m.Override],h.prototype,"type",null),a([m.Override],h.prototype,"line",null),a([m.Override],h.prototype,"charPositionInLine",null),a([m.Override],h.prototype,"tokenIndex",null),a([m.Override],h.prototype,"startIndex",null),a([m.Override],h.prototype,"stopIndex",null),a([m.Override],h.prototype,"tokenSource",null),a([m.Override],h.prototype,"inputStream",null),a([m.Override],h.prototype,"toString",null),h=a([d(0,m.NotNull)],h),Jt.RuleTagToken=h,Jt}var Cn={},gi={},wf;function Pp(){if(wf)return gi;wf=1;/*!
|
|
481
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
482
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
483
|
+
*/Object.defineProperty(gi,"__esModule",{value:!0}),gi.Chunk=void 0;let a=class{};return gi.Chunk=a,gi}var Rf;function Nx(){if(Rf)return Cn;Rf=1;/*!
|
|
484
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
485
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
486
|
+
*/var a=Cn&&Cn.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.TagChunk=void 0;const d=Pp(),m=ue();let y=class extends d.Chunk{constructor(u,r){if(super(),u==null||u.length===0)throw new Error("tag cannot be null or empty");this._tag=u,this._label=r}get tag(){return this._tag}get label(){return this._label}toString(){return this._label!=null?this._label+":"+this._tag:this._tag}};return a([m.NotNull],y.prototype,"tag",null),a([m.Override],y.prototype,"toString",null),Cn.TagChunk=y,Cn}var Zt={},Pf;function Cx(){if(Pf)return Zt;Pf=1;/*!
|
|
487
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
488
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
489
|
+
*/var a=Zt&&Zt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Zt&&Zt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.TextChunk=void 0;const m=Pp(),y=ue();let h=class extends m.Chunk{constructor(r){if(super(),r==null)throw new Error("text cannot be null");this._text=r}get text(){return this._text}toString(){return"'"+this._text+"'"}};return a([y.NotNull],h.prototype,"_text",void 0),a([y.NotNull],h.prototype,"text",null),a([y.Override],h.prototype,"toString",null),h=a([d(0,y.NotNull)],h),Zt.TextChunk=h,Zt}var er={},Ff;function Ox(){if(Ff)return er;Ff=1;/*!
|
|
490
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
491
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
492
|
+
*/var a=er&&er.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=er&&er.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(er,"__esModule",{value:!0}),er.TokenTagToken=void 0;const m=Ii(),y=ue();let h=class extends m.CommonToken{constructor(r,o,t){super(o),this._tokenName=r,this._label=t}get tokenName(){return this._tokenName}get label(){return this._label}get text(){return this._label!=null?"<"+this._label+":"+this._tokenName+">":"<"+this._tokenName+">"}toString(){return this._tokenName+":"+this.type}};return a([y.NotNull],h.prototype,"_tokenName",void 0),a([y.NotNull],h.prototype,"tokenName",null),a([y.Override],h.prototype,"text",null),a([y.Override],h.prototype,"toString",null),h=a([d(0,y.NotNull)],h),er.TokenTagToken=h,er}var If;function Dx(){return If||(If=1,function(a){/*!
|
|
493
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
494
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
495
|
+
*/var d=dn&&dn.__decorate||function(w,P,$,Y){var L=arguments.length,q=L<3?P:Y===null?Y=Object.getOwnPropertyDescriptor(P,$):Y,W;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(w,P,$,Y);else for(var Z=w.length-1;Z>=0;Z--)(W=w[Z])&&(q=(L<3?W(q):L>3?W(P,$,q):W(P,$))||q);return L>3&&q&&Object.defineProperty(P,$,q),q},m=dn&&dn.__param||function(w,P){return function($,Y){P($,Y,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ParseTreePatternMatcher=void 0;const y=Sp(),h=Da(),u=wa(),r=Op(),o=xx(),t=ue(),i=Ep(),e=wp(),s=nt(),l=dx(),c=Tx(),p=Ar(),v=Di(),x=bx(),g=Nx(),_=yr(),A=Cx(),E=Fe(),D=Ox();let N=class la{constructor(P,$){this.start="<",this.stop=">",this.escape="\\",this.escapeRE=/\\/g,this._lexer=P,this._parser=$}setDelimiters(P,$,Y){if(!P)throw new Error("start cannot be null or empty");if(!$)throw new Error("stop cannot be null or empty");this.start=P,this.stop=$,this.escape=Y,this.escapeRE=new RegExp(Y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g")}matches(P,$,Y=0){if(typeof $=="string"){let L=this.compile($,Y);return this.matches(P,L)}else{let L=new o.MultiMap;return!this.matchImpl(P,$.patternTree,L)}}match(P,$,Y=0){if(typeof $=="string"){let L=this.compile($,Y);return this.match(P,L)}else{let L=new o.MultiMap,q=this.matchImpl(P,$.patternTree,L);return new l.ParseTreeMatch(P,$,L,q)}}compile(P,$){let Y=this.tokenize(P),L=new r.ListTokenSource(Y),q=new u.CommonTokenStream(L);const W=this._parser;let Z=new e.ParserInterpreter(W.grammarFileName,W.vocabulary,W.ruleNames,W.getATNWithBypassAlts(),q),I;try{Z.errorHandler=new y.BailErrorStrategy,I=Z.parse($)}catch(Q){throw Q instanceof i.ParseCancellationException?Q.getCause():Q instanceof p.RecognitionException?Q:Q instanceof Error?new la.CannotInvokeStartRule(Q):Q}if(q.LA(1)!==E.Token.EOF)throw new la.StartRuleDoesNotConsumeFullPattern;return new c.ParseTreePattern(this,P,$,I)}get lexer(){return this._lexer}get parser(){return this._parser}matchImpl(P,$,Y){if(!P)throw new TypeError("tree cannot be null");if(!$)throw new TypeError("patternTree cannot be null");if(P instanceof _.TerminalNode&&$ instanceof _.TerminalNode){let L;if(P.symbol.type===$.symbol.type)if($.symbol instanceof D.TokenTagToken){let q=$.symbol;Y.map(q.tokenName,P);const W=q.label;W&&Y.map(W,P)}else P.text===$.text||L||(L=P);else L||(L=P);return L}if(P instanceof s.ParserRuleContext&&$ instanceof s.ParserRuleContext){let L,q=this.getRuleTagToken($);if(q){if(P.ruleContext.ruleIndex===$.ruleContext.ruleIndex){Y.map(q.ruleName,P);const Z=q.label;Z&&Y.map(Z,P)}else L||(L=P);return L}if(P.childCount!==$.childCount)return L||(L=P),L;let W=P.childCount;for(let Z=0;Z<W;Z++){let I=this.matchImpl(P.getChild(Z),$.getChild(Z),Y);if(I)return I}return L}return P}getRuleTagToken(P){if(P instanceof v.RuleNode&&P.childCount===1&&P.getChild(0)instanceof _.TerminalNode){let $=P.getChild(0);if($.symbol instanceof x.RuleTagToken)return $.symbol}}tokenize(P){let $=this.split(P),Y=[];for(let L of $)if(L instanceof g.TagChunk){let q=L;const W=q.tag.substr(0,1);if(W===W.toUpperCase()){let Z=this._parser.getTokenType(q.tag);if(Z===E.Token.INVALID_TYPE)throw new Error("Unknown token "+q.tag+" in pattern: "+P);let I=new D.TokenTagToken(q.tag,Z,q.label);Y.push(I)}else if(W===W.toLowerCase()){let Z=this._parser.getRuleIndex(q.tag);if(Z===-1)throw new Error("Unknown rule "+q.tag+" in pattern: "+P);let I=this._parser.getATNWithBypassAlts().ruleToTokenType[Z];Y.push(new x.RuleTagToken(q.tag,I,q.label))}else throw new Error("invalid tag: "+q.tag+" in pattern: "+P)}else{let q=L;this._lexer.inputStream=h.CharStreams.fromString(q.text);let W=this._lexer.nextToken();for(;W.type!==E.Token.EOF;)Y.push(W),W=this._lexer.nextToken()}return Y}split(P){let $=0,Y=P.length,L=[],q=[],W=[];for(;$<Y;)$===P.indexOf(this.escape+this.start,$)?$+=this.escape.length+this.start.length:$===P.indexOf(this.escape+this.stop,$)?$+=this.escape.length+this.stop.length:$===P.indexOf(this.start,$)?(q.push($),$+=this.start.length):$===P.indexOf(this.stop,$)?(W.push($),$+=this.stop.length):$++;if(q.length>W.length)throw new Error("unterminated tag in pattern: "+P);if(q.length<W.length)throw new Error("missing start tag in pattern: "+P);let Z=q.length;for(let I=0;I<Z;I++)if(q[I]>=W[I])throw new Error("tag delimiters out of order in pattern: "+P);if(Z===0){let I=P.substring(0,Y);L.push(new A.TextChunk(I))}if(Z>0&&q[0]>0){let I=P.substring(0,q[0]);L.push(new A.TextChunk(I))}for(let I=0;I<Z;I++){let Q=P.substring(q[I]+this.start.length,W[I]),re=Q,fe,oe=Q.indexOf(":");if(oe>=0&&(fe=Q.substring(0,oe),re=Q.substring(oe+1,Q.length)),L.push(new g.TagChunk(re,fe)),I+1<Z){let J=P.substring(W[I]+this.stop.length,q[I+1]);L.push(new A.TextChunk(J))}}if(Z>0){let I=W[Z-1]+this.stop.length;if(I<Y){let Q=P.substring(I,Y);L.push(new A.TextChunk(Q))}}for(let I=0;I<L.length;I++){let Q=L[I];if(Q instanceof A.TextChunk){let re=Q.text.replace(this.escapeRE,"");re.length<Q.text.length&&(L[I]=new A.TextChunk(re))}}return L}};d([t.NotNull,m(1,t.NotNull)],N.prototype,"match",null),d([t.NotNull],N.prototype,"lexer",null),d([t.NotNull],N.prototype,"parser",null),d([m(0,t.NotNull),m(1,t.NotNull),m(2,t.NotNull)],N.prototype,"matchImpl",null),a.ParseTreePatternMatcher=N,function(w){class P extends Error{constructor(L){super(`CannotInvokeStartRule: ${L}`),this.error=L}}w.CannotInvokeStartRule=P;class $ extends Error{constructor(){super("StartRuleDoesNotConsumeFullPattern")}}w.StartRuleDoesNotConsumeFullPattern=$}(N=a.ParseTreePatternMatcher||(a.ParseTreePatternMatcher={}))}(dn)),dn}var tr={},rr={},nr={},Lf;function ki(){if(Lf)return nr;Lf=1;/*!
|
|
496
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
497
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
498
|
+
*/var a=nr&&nr.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=nr&&nr.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(nr,"__esModule",{value:!0}),nr.DecisionEventInfo=void 0;const m=ue();let y=class{constructor(u,r,o,t,i,e){this.decision=u,this.fullCtx=e,this.stopIndex=i,this.input=o,this.startIndex=t,this.state=r}};return a([m.NotNull],y.prototype,"input",void 0),y=a([d(2,m.NotNull)],y),nr.DecisionEventInfo=y,nr}var Bf;function wx(){if(Bf)return rr;Bf=1;/*!
|
|
499
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
500
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
501
|
+
*/var a=rr&&rr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=rr&&rr.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(rr,"__esModule",{value:!0}),rr.AmbiguityInfo=void 0;const m=ki(),y=ue();let h=class extends m.DecisionEventInfo{constructor(r,o,t,i,e,s){super(r,o,i,e,s,o.useContext),this.ambigAlts=t}get ambiguousAlternatives(){return this.ambigAlts}};return a([y.NotNull],h.prototype,"ambigAlts",void 0),a([y.NotNull],h.prototype,"ambiguousAlternatives",null),h=a([d(1,y.NotNull),d(2,y.NotNull),d(3,y.NotNull)],h),rr.AmbiguityInfo=h,rr}var ir={},kf;function Rx(){if(kf)return ir;kf=1;/*!
|
|
502
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
503
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
504
|
+
*/var a=ir&&ir.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=ir&&ir.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(ir,"__esModule",{value:!0}),ir.ContextSensitivityInfo=void 0;const m=ki(),y=ue();let h=class extends m.DecisionEventInfo{constructor(r,o,t,i,e){super(r,o,t,i,e,!0)}};return h=a([d(1,y.NotNull),d(2,y.NotNull)],h),ir.ContextSensitivityInfo=h,ir}var On={},Mf;function Px(){if(Mf)return On;Mf=1;/*!
|
|
505
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
506
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
507
|
+
*/var a=On&&On.__decorate||function(y,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(y,h,u,r);else for(var e=y.length-1;e>=0;e--)(i=y[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(On,"__esModule",{value:!0}),On.DecisionInfo=void 0;const d=ue();let m=class{constructor(h){this.invocations=0,this.timeInPrediction=0,this.SLL_TotalLook=0,this.SLL_MinLook=0,this.SLL_MaxLook=0,this.LL_TotalLook=0,this.LL_MinLook=0,this.LL_MaxLook=0,this.contextSensitivities=[],this.errors=[],this.ambiguities=[],this.predicateEvals=[],this.SLL_ATNTransitions=0,this.SLL_DFATransitions=0,this.LL_Fallback=0,this.LL_ATNTransitions=0,this.LL_DFATransitions=0,this.decision=h}toString(){return"{decision="+this.decision+", contextSensitivities="+this.contextSensitivities.length+", errors="+this.errors.length+", ambiguities="+this.ambiguities.length+", SLL_lookahead="+this.SLL_TotalLook+", SLL_ATNTransitions="+this.SLL_ATNTransitions+", SLL_DFATransitions="+this.SLL_DFATransitions+", LL_Fallback="+this.LL_Fallback+", LL_lookahead="+this.LL_TotalLook+", LL_ATNTransitions="+this.LL_ATNTransitions+"}"}};return a([d.Override],m.prototype,"toString",null),On.DecisionInfo=m,On}var sr={},qf;function Fx(){if(qf)return sr;qf=1;/*!
|
|
508
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
509
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
510
|
+
*/var a=sr&&sr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=sr&&sr.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(sr,"__esModule",{value:!0}),sr.ErrorInfo=void 0;const m=ki(),y=ue();let h=class extends m.DecisionEventInfo{constructor(r,o,t,i,e){super(r,o,t,i,e,o.useContext)}};return h=a([d(1,y.NotNull),d(2,y.NotNull)],h),sr.ErrorInfo=h,sr}var ar={},jf;function Ix(){if(jf)return ar;jf=1;/*!
|
|
511
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
512
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
513
|
+
*/var a=ar&&ar.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=ar&&ar.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(ar,"__esModule",{value:!0}),ar.LookaheadEventInfo=void 0;const m=ki(),y=ue();let h=class extends m.DecisionEventInfo{constructor(r,o,t,i,e,s,l){super(r,o,i,e,s,l),this.predictedAlt=t}};return h=a([d(3,y.NotNull)],h),ar.LookaheadEventInfo=h,ar}var ur={},$f;function Lx(){if($f)return ur;$f=1;/*!
|
|
514
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
515
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
516
|
+
*/var a=ur&&ur.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=ur&&ur.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(ur,"__esModule",{value:!0}),ur.PredicateEvalInfo=void 0;const m=ki(),y=ue();let h=class extends m.DecisionEventInfo{constructor(r,o,t,i,e,s,l,c){super(o,r,t,i,e,r.useContext),this.semctx=s,this.evalResult=l,this.predictedAlt=c}};return h=a([d(0,y.NotNull),d(2,y.NotNull),d(5,y.NotNull)],h),ur.PredicateEvalInfo=h,ur}var Uf;function Vf(){if(Uf)return tr;Uf=1;/*!
|
|
517
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
518
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
519
|
+
*/var a=tr&&tr.__decorate||function(v,x,g,_){var A=arguments.length,E=A<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,g):_,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,x,g,_);else for(var N=v.length-1;N>=0;N--)(D=v[N])&&(E=(A<3?D(E):A>3?D(x,g,E):D(x,g))||E);return A>3&&E&&Object.defineProperty(x,g,E),E},d=tr&&tr.__param||function(v,x){return function(g,_){x(g,_,v)}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.ProfilingATNSimulator=void 0;const m=wx(),y=st(),h=no(),u=Rx(),r=Px(),o=Fx(),t=ue(),i=Ix(),e=Bi(),s=Lx(),l=zn(),c=gp();let p=class extends e.ParserATNSimulator{constructor(x){super(x.interpreter.atn,x),this._startIndex=0,this._sllStopIndex=0,this._llStopIndex=0,this.currentDecision=0,this.conflictingAltResolvedBySLL=0,this.optimize_ll1=!1,this.reportAmbiguities=!0,this.numDecisions=this.atn.decisionToState.length,this.decisions=[];for(let g=0;g<this.numDecisions;g++)this.decisions.push(new r.DecisionInfo(g))}adaptivePredict(x,g,_,A){if(A!==void 0)return super.adaptivePredict(x,g,_,A);try{this._input=x,this._startIndex=x.index,this._sllStopIndex=this._startIndex-1,this._llStopIndex=-1,this.currentDecision=g,this.currentState=void 0,this.conflictingAltResolvedBySLL=y.ATN.INVALID_ALT_NUMBER;let E=process.hrtime(),D=super.adaptivePredict(x,g,_),N=process.hrtime(),w=(N[0]-E[0])*1e9;w===0?w=N[1]-E[1]:w+=1e9-E[1]+N[1],this.decisions[g].timeInPrediction+=w,this.decisions[g].invocations++;let P=this._sllStopIndex-this._startIndex+1;if(this.decisions[g].SLL_TotalLook+=P,this.decisions[g].SLL_MinLook=this.decisions[g].SLL_MinLook===0?P:Math.min(this.decisions[g].SLL_MinLook,P),P>this.decisions[g].SLL_MaxLook&&(this.decisions[g].SLL_MaxLook=P,this.decisions[g].SLL_MaxLookEvent=new i.LookaheadEventInfo(g,void 0,D,x,this._startIndex,this._sllStopIndex,!1)),this._llStopIndex>=0){let $=this._llStopIndex-this._startIndex+1;this.decisions[g].LL_TotalLook+=$,this.decisions[g].LL_MinLook=this.decisions[g].LL_MinLook===0?$:Math.min(this.decisions[g].LL_MinLook,$),$>this.decisions[g].LL_MaxLook&&(this.decisions[g].LL_MaxLook=$,this.decisions[g].LL_MaxLookEvent=new i.LookaheadEventInfo(g,void 0,D,x,this._startIndex,this._llStopIndex,!0))}return D}finally{this._input=void 0,this.currentDecision=-1}}getStartState(x,g,_,A){let E=super.getStartState(x,g,_,A);return this.currentState=E,E}computeStartState(x,g,_){let A=super.computeStartState(x,g,_);return this.currentState=A,A}computeReachSet(x,g,_,A){if(this._input===void 0)throw new Error("Invalid state");let E=super.computeReachSet(x,g,_,A);return E==null&&this.decisions[this.currentDecision].errors.push(new o.ErrorInfo(this.currentDecision,g,this._input,this._startIndex,this._input.index)),this.currentState=E,E}getExistingTargetState(x,g){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");this.currentState.useContext?this._llStopIndex=this._input.index:this._sllStopIndex=this._input.index;let _=super.getExistingTargetState(x,g);if(_!=null&&(this.currentState=new c.SimulatorState(this.currentState.outerContext,_,this.currentState.useContext,this.currentState.remainingOuterContext),this.currentState.useContext?this.decisions[this.currentDecision].LL_DFATransitions++:this.decisions[this.currentDecision].SLL_DFATransitions++,_===h.ATNSimulator.ERROR)){let A=new c.SimulatorState(this.currentState.outerContext,x,this.currentState.useContext,this.currentState.remainingOuterContext);this.decisions[this.currentDecision].errors.push(new o.ErrorInfo(this.currentDecision,A,this._input,this._startIndex,this._input.index))}return _}computeTargetState(x,g,_,A,E,D){let N=super.computeTargetState(x,g,_,A,E,D);return E?this.decisions[this.currentDecision].LL_ATNTransitions++:this.decisions[this.currentDecision].SLL_ATNTransitions++,N}evalSemanticContextImpl(x,g,_){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let A=super.evalSemanticContextImpl(x,g,_);if(!(x instanceof l.SemanticContext.PrecedencePredicate)){let D=this._llStopIndex>=0?this._llStopIndex:this._sllStopIndex;this.decisions[this.currentDecision].predicateEvals.push(new s.PredicateEvalInfo(this.currentState,this.currentDecision,this._input,this._startIndex,D,x,A,_))}return A}reportContextSensitivity(x,g,_,A,E){if(this._input===void 0)throw new Error("Invalid state");g!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new u.ContextSensitivityInfo(this.currentDecision,_,this._input,A,E)),super.reportContextSensitivity(x,g,_,A,E)}reportAttemptingFullContext(x,g,_,A,E){g!=null?this.conflictingAltResolvedBySLL=g.nextSetBit(0):this.conflictingAltResolvedBySLL=_.s0.configs.getRepresentedAlternatives().nextSetBit(0),this.decisions[this.currentDecision].LL_Fallback++,super.reportAttemptingFullContext(x,g,_,A,E)}reportAmbiguity(x,g,_,A,E,D,N){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let w;D!=null?w=D.nextSetBit(0):w=N.getRepresentedAlternatives().nextSetBit(0),this.conflictingAltResolvedBySLL!==y.ATN.INVALID_ALT_NUMBER&&w!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new u.ContextSensitivityInfo(this.currentDecision,this.currentState,this._input,_,A)),this.decisions[this.currentDecision].ambiguities.push(new m.AmbiguityInfo(this.currentDecision,this.currentState,D,this._input,_,A)),super.reportAmbiguity(x,g,_,A,E,D,N)}getDecisionInfo(){return this.decisions}getCurrentState(){return this.currentState}};return a([t.Override,d(0,t.NotNull)],p.prototype,"adaptivePredict",null),a([t.Override],p.prototype,"getStartState",null),a([t.Override],p.prototype,"computeStartState",null),a([t.Override],p.prototype,"computeReachSet",null),a([t.Override],p.prototype,"getExistingTargetState",null),a([t.Override],p.prototype,"computeTargetState",null),a([t.Override],p.prototype,"evalSemanticContextImpl",null),a([t.Override],p.prototype,"reportContextSensitivity",null),a([t.Override],p.prototype,"reportAttemptingFullContext",null),a([t.Override,d(0,t.NotNull),d(5,t.NotNull),d(6,t.NotNull)],p.prototype,"reportAmbiguity",null),tr.ProfilingATNSimulator=p,tr}var zf;function Mi(){if(zf)return Qe;zf=1;/*!
|
|
520
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
521
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
522
|
+
*/var a=Qe&&Qe.__decorate||function(A,E,D,N){var w=arguments.length,P=w<3?E:N===null?N=Object.getOwnPropertyDescriptor(E,D):N,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(A,E,D,N);else for(var Y=A.length-1;Y>=0;Y--)($=A[Y])&&(P=(w<3?$(P):w>3?$(E,D,P):$(E,D))||P);return w>3&&P&&Object.defineProperty(E,D,P),P},d=Qe&&Qe.__param||function(A,E){return function(D,N){E(D,N,A)}},m=Qe&&Qe.__awaiter||function(A,E,D,N){function w(P){return P instanceof D?P:new D(function($){$(P)})}return new(D||(D=Promise))(function(P,$){function Y(W){try{q(N.next(W))}catch(Z){$(Z)}}function L(W){try{q(N.throw(W))}catch(Z){$(Z)}}function q(W){W.done?P(W.value):w(W.value).then(Y,L)}q((N=N.apply(A,E||[])).next())})};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.Parser=void 0;const y=ot(),h=sp(),u=uo(),r=Oa(),o=Oi(),t=J0(),i=vr(),e=ue(),s=px(),l=Bi(),c=vp(),p=Fi(),v=yr(),x=Fe();class g{constructor(E,D){this.ruleNames=E,this.tokenStream=D}enterEveryRule(E){console.log("enter "+this.ruleNames[E.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text)}exitEveryRule(E){console.log("exit "+this.ruleNames[E.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text)}visitErrorNode(E){}visitTerminal(E){let D=E.parent.ruleContext,N=E.symbol;console.log("consume "+N+" rule "+this.ruleNames[D.ruleIndex])}}a([e.Override],g.prototype,"enterEveryRule",null),a([e.Override],g.prototype,"exitEveryRule",null),a([e.Override],g.prototype,"visitErrorNode",null),a([e.Override],g.prototype,"visitTerminal",null);let _=class Yi extends p.Recognizer{constructor(E){super(),this._errHandler=new r.DefaultErrorStrategy,this._precedenceStack=new t.IntegerStack,this._buildParseTrees=!0,this._parseListeners=[],this._syntaxErrors=0,this.matchedEOF=!1,this._precedenceStack.push(0),this.inputStream=E}reset(E){(E===void 0||E)&&this.inputStream.seek(0),this._errHandler.reset(this),this._ctx=void 0,this._syntaxErrors=0,this.matchedEOF=!1,this.isTrace=!1,this._precedenceStack.clear(),this._precedenceStack.push(0);let D=this.interpreter;D?.reset()}match(E){let D=this.currentToken;return D.type===E?(E===x.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):(D=this._errHandler.recoverInline(this),this._buildParseTrees&&D.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,D))),D}matchWildcard(){let E=this.currentToken;return E.type>0?(this._errHandler.reportMatch(this),this.consume()):(E=this._errHandler.recoverInline(this),this._buildParseTrees&&E.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,E))),E}set buildParseTree(E){this._buildParseTrees=E}get buildParseTree(){return this._buildParseTrees}getParseListeners(){return this._parseListeners}addParseListener(E){if(E==null)throw new TypeError("listener cannot be null");this._parseListeners.push(E)}removeParseListener(E){let D=this._parseListeners.findIndex(N=>N===E);D!==-1&&this._parseListeners.splice(D,1)}removeParseListeners(){this._parseListeners.length=0}triggerEnterRuleEvent(){for(let E of this._parseListeners)E.enterEveryRule&&E.enterEveryRule(this._ctx),this._ctx.enterRule(E)}triggerExitRuleEvent(){for(let E=this._parseListeners.length-1;E>=0;E--){let D=this._parseListeners[E];this._ctx.exitRule(D),D.exitEveryRule&&D.exitEveryRule(this._ctx)}}get numberOfSyntaxErrors(){return this._syntaxErrors}get tokenFactory(){return this._input.tokenSource.tokenFactory}getATNWithBypassAlts(){let E=this.serializedATN;if(E==null)throw new Error("The current parser does not support an ATN with bypass alternatives.");let D=Yi.bypassAltsAtnCache.get(E);if(D==null){let N=new h.ATNDeserializationOptions;N.isGenerateRuleBypassTransitions=!0,D=new u.ATNDeserializer(N).deserialize(y.toCharArray(E)),Yi.bypassAltsAtnCache.set(E,D)}return D}compileParseTreePattern(E,D,N){return m(this,void 0,void 0,function*(){if(!N){if(this.inputStream){let Y=this.inputStream.tokenSource;Y instanceof i.Lexer&&(N=Y)}if(!N)throw new Error("Parser can't discover a lexer to use")}let w=N,P=yield Promise.resolve().then(()=>Dx());return new P.ParseTreePatternMatcher(w,this).compile(E,D)})}get errorHandler(){return this._errHandler}set errorHandler(E){this._errHandler=E}get inputStream(){return this._input}set inputStream(E){this.reset(!1),this._input=E}get currentToken(){return this._input.LT(1)}notifyErrorListeners(E,D,N){D===void 0?D=this.currentToken:D===null&&(D=void 0),this._syntaxErrors++;let w=-1,P=-1;D!=null&&(w=D.line,P=D.charPositionInLine);let $=this.getErrorListenerDispatch();$.syntaxError&&$.syntaxError(this,D,w,P,E,N)}consume(){let E=this.currentToken;E.type!==Yi.EOF&&this.inputStream.consume();let D=this._parseListeners.length!==0;if(this._buildParseTrees||D)if(this._errHandler.inErrorRecoveryMode(this)){let N=this._ctx.addErrorNode(this.createErrorNode(this._ctx,E));if(D)for(let w of this._parseListeners)w.visitErrorNode&&w.visitErrorNode(N)}else{let N=this.createTerminalNode(this._ctx,E);if(this._ctx.addChild(N),D)for(let w of this._parseListeners)w.visitTerminal&&w.visitTerminal(N)}return E}createTerminalNode(E,D){return new v.TerminalNode(D)}createErrorNode(E,D){return new o.ErrorNode(D)}addContextToParseTree(){let E=this._ctx._parent;E?.addChild(this._ctx)}enterRule(E,D,N){this.state=D,this._ctx=E,this._ctx._start=this._input.LT(1),this._buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}enterLeftFactoredRule(E,D,N){if(this.state=D,this._buildParseTrees){let w=this._ctx.getChild(this._ctx.childCount-1);this._ctx.removeLastChild(),w._parent=E,E.addChild(w)}this._ctx=E,this._ctx._start=this._input.LT(1),this._buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}exitRule(){this.matchedEOF?this._ctx._stop=this._input.LT(1):this._ctx._stop=this._input.tryLT(-1),this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx._parent}enterOuterAlt(E,D){if(E.altNumber=D,this._buildParseTrees&&this._ctx!==E){let N=this._ctx._parent;N!=null&&(N.removeLastChild(),N.addChild(E))}this._ctx=E}get precedence(){return this._precedenceStack.isEmpty?-1:this._precedenceStack.peek()}enterRecursionRule(E,D,N,w){this.state=D,this._precedenceStack.push(w),this._ctx=E,this._ctx._start=this._input.LT(1),this.triggerEnterRuleEvent()}pushNewRecursionContext(E,D,N){let w=this._ctx;w._parent=E,w.invokingState=D,w._stop=this._input.tryLT(-1),this._ctx=E,this._ctx._start=w._start,this._buildParseTrees&&this._ctx.addChild(w),this.triggerEnterRuleEvent()}unrollRecursionContexts(E){this._precedenceStack.pop(),this._ctx._stop=this._input.tryLT(-1);let D=this._ctx;if(this._parseListeners.length>0)for(;this._ctx!==E;)this.triggerExitRuleEvent(),this._ctx=this._ctx._parent;else this._ctx=E;D._parent=E,this._buildParseTrees&&E!=null&&E.addChild(D)}getInvokingContext(E){let D=this._ctx;for(;D&&D.ruleIndex!==E;)D=D._parent;return D}get context(){return this._ctx}set context(E){this._ctx=E}precpred(E,D){return D>=this._precedenceStack.peek()}getErrorListenerDispatch(){return new c.ProxyParserErrorListener(this.getErrorListeners())}inContext(E){return!1}isExpectedToken(E){let D=this.interpreter.atn,N=this._ctx,w=D.states[this.state],P=D.nextTokens(w);if(P.contains(E))return!0;if(!P.contains(x.Token.EPSILON))return!1;for(;N!=null&&N.invokingState>=0&&P.contains(x.Token.EPSILON);){let Y=D.states[N.invokingState].transition(0);if(P=D.nextTokens(Y.followState),P.contains(E))return!0;N=N._parent}return!!(P.contains(x.Token.EPSILON)&&E===x.Token.EOF)}get isMatchedEOF(){return this.matchedEOF}getExpectedTokens(){return this.atn.getExpectedTokens(this.state,this.context)}getExpectedTokensWithinCurrentRule(){let E=this.interpreter.atn,D=E.states[this.state];return E.nextTokens(D)}getRuleIndex(E){let D=this.getRuleIndexMap().get(E);return D??-1}get ruleContext(){return this._ctx}getRuleInvocationStack(E=this._ctx){let D=E,N=this.ruleNames,w=[];for(;D!=null;){let P=D.ruleIndex;P<0?w.push("n/a"):w.push(N[P]),D=D._parent}return w}getDFAStrings(){let E=[];for(let D of this._interp.atn.decisionToDFA)E.push(D.toString(this.vocabulary,this.ruleNames));return E}dumpDFA(){let E=!1;for(let D of this._interp.atn.decisionToDFA)D.isEmpty||(E&&console.log(),console.log("Decision "+D.decision+":"),process.stdout.write(D.toString(this.vocabulary,this.ruleNames)),E=!0)}get sourceName(){return this._input.sourceName}get parseInfo(){return Promise.resolve().then(()=>Vf()).then(E=>{let D=this.interpreter;if(D instanceof E.ProfilingATNSimulator)return new s.ParseInfo(D)})}setProfile(E){return m(this,void 0,void 0,function*(){let D=yield Promise.resolve().then(()=>Vf()),N=this.interpreter;E?N instanceof D.ProfilingATNSimulator||(this.interpreter=new D.ProfilingATNSimulator(this)):N instanceof D.ProfilingATNSimulator&&(this.interpreter=new l.ParserATNSimulator(this.atn,this)),this.interpreter.setPredictionMode(N.getPredictionMode())})}set isTrace(E){E?(this._tracer?this.removeParseListener(this._tracer):this._tracer=new g(this.ruleNames,this._input),this.addParseListener(this._tracer)):this._tracer&&(this.removeParseListener(this._tracer),this._tracer=void 0)}get isTrace(){return this._tracer!=null}};return _.bypassAltsAtnCache=new Map,a([e.NotNull],_.prototype,"_errHandler",void 0),a([e.NotNull],_.prototype,"match",null),a([e.NotNull],_.prototype,"matchWildcard",null),a([e.NotNull],_.prototype,"getParseListeners",null),a([d(0,e.NotNull)],_.prototype,"addParseListener",null),a([e.NotNull],_.prototype,"getATNWithBypassAlts",null),a([e.NotNull,d(0,e.NotNull)],_.prototype,"errorHandler",null),a([e.Override],_.prototype,"inputStream",null),a([e.NotNull],_.prototype,"currentToken",null),a([d(0,e.NotNull)],_.prototype,"enterRule",null),a([e.Override,d(0,e.Nullable)],_.prototype,"precpred",null),a([e.Override],_.prototype,"getErrorListenerDispatch",null),a([e.NotNull],_.prototype,"getExpectedTokens",null),a([e.NotNull],_.prototype,"getExpectedTokensWithinCurrentRule",null),a([e.Override],_.prototype,"parseInfo",null),Qe.Parser=_,Qe}var Hf;function Sr(){if(Hf)return lt;Hf=1;/*!
|
|
523
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
524
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
525
|
+
*/var a=lt&<.__decorate||function(c,p,v,x){var g=arguments.length,_=g<3?p:x===null?x=Object.getOwnPropertyDescriptor(p,v):x,A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(c,p,v,x);else for(var E=c.length-1;E>=0;E--)(A=c[E])&&(_=(g<3?A(_):g>3?A(p,v,_):A(p,v))||_);return g>3&&_&&Object.defineProperty(p,v,_),_},d=lt&<.__param||function(c,p){return function(v,x){p(v,x,c)}};Object.defineProperty(lt,"__esModule",{value:!0}),lt.Trees=void 0;const m=st(),y=Ii(),h=Oi(),u=ue(),r=Mi(),o=nt(),t=Di(),i=yr(),e=Fe(),s=ot();let l=class xr{static toStringTree(p,v){let x;v instanceof r.Parser?x=v.ruleNames:x=v;let g=s.escapeWhitespace(this.getNodeText(p,x),!1);if(p.childCount===0)return g;let _="";_+="(",g=s.escapeWhitespace(this.getNodeText(p,x),!1),_+=g,_+=" ";for(let A=0;A<p.childCount;A++)A>0&&(_+=" "),_+=this.toStringTree(p.getChild(A),x);return _+=")",_}static getNodeText(p,v){let x;if(v instanceof r.Parser)x=v.ruleNames;else if(v)x=v;else{let g=p.payload;return typeof g.text=="string"?g.text:p.payload.toString()}if(p instanceof t.RuleNode){let g=p.ruleContext,_=g.ruleIndex,A=x[_],E=g.altNumber;return E!==m.ATN.INVALID_ALT_NUMBER?A+":"+E:A}else{if(p instanceof h.ErrorNode)return p.toString();if(p instanceof i.TerminalNode)return p.symbol.text||""}throw new TypeError("Unexpected node type")}static getChildren(p){let v=[];for(let x=0;x<p.childCount;x++)v.push(p.getChild(x));return v}static getAncestors(p){let v=[],x=p.parent;for(;x;)v.unshift(x),x=x.parent;return v}static isAncestorOf(p,v){if(!p||!v||!p.parent)return!1;let x=v.parent;for(;x;){if(p===x)return!0;x=x.parent}return!1}static findAllTokenNodes(p,v){return xr.findAllNodes(p,v,!0)}static findAllRuleNodes(p,v){return xr.findAllNodes(p,v,!1)}static findAllNodes(p,v,x){let g=[];return xr._findAllNodes(p,v,x,g),g}static _findAllNodes(p,v,x,g){x&&p instanceof i.TerminalNode?p.symbol.type===v&&g.push(p):!x&&p instanceof o.ParserRuleContext&&p.ruleIndex===v&&g.push(p);for(let _=0;_<p.childCount;_++)xr._findAllNodes(p.getChild(_),v,x,g)}static getDescendants(p){let v=[];function x(g){v.push(g);const _=g.childCount;for(let A=0;A<_;A++)x(g.getChild(A))}return x(p),v}static getRootOfSubtreeEnclosingRegion(p,v,x){let g=p.childCount;for(let _=0;_<g;_++){let A=p.getChild(_),E=xr.getRootOfSubtreeEnclosingRegion(A,v,x);if(E)return E}if(p instanceof o.ParserRuleContext){let _=p.stop;if(v>=p.start.tokenIndex&&(_==null||x<=_.tokenIndex))return p}}static stripChildrenOutOfRange(p,v,x,g){if(!p)return;let _=p.childCount;for(let A=0;A<_;A++){let E=p.getChild(A),D=E.sourceInterval;if(E instanceof o.ParserRuleContext&&(D.b<x||D.a>g)&&xr.isAncestorOf(E,v)){let N=new y.CommonToken(e.Token.INVALID_TYPE,"...");p.children[A]=new i.TerminalNode(N)}}}static findNodeSuchThat(p,v){if(v(p))return p;let x=p.childCount;for(let g=0;g<x;g++){let _=xr.findNodeSuchThat(p.getChild(g),v);if(_!==void 0)return _}}};return a([d(0,u.NotNull)],l,"toStringTree",null),a([u.NotNull,d(0,u.NotNull)],l,"getAncestors",null),a([d(0,u.NotNull)],l,"getRootOfSubtreeEnclosingRegion",null),lt.Trees=l,lt}var Gf;function Bx(){return Gf||(Gf=1,function(a){/*!
|
|
526
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
527
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
528
|
+
*/var d=Cr&&Cr.__createBinding||(Object.create?function(y,h,u,r){r===void 0&&(r=u),Object.defineProperty(y,r,{enumerable:!0,get:function(){return h[u]}})}:function(y,h,u,r){r===void 0&&(r=u),y[r]=h[u]}),m=Cr&&Cr.__exportStar||function(y,h){for(var u in y)u!=="default"&&!Object.prototype.hasOwnProperty.call(h,u)&&d(h,y,u)};Object.defineProperty(a,"__esModule",{value:!0}),m(Up(),a),m(Oi(),a),m(Vp(),a),m(zp(),a),m(Hp(),a),m(Gp(),a),m(Yp(),a),m(Di(),a),m(Wp(),a),m(yr(),a),m(Qp(),a),m(Sr(),a)}(Cr)),Cr}var Xe={},Yf;function kx(){if(Yf)return Xe;Yf=1;var a=Xe&&Xe.__createBinding||(Object.create?function(i,e,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(e,s);(!c||("get"in c?!e.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(i,l,c)}:function(i,e,s,l){l===void 0&&(l=s),i[l]=e[s]}),d=Xe&&Xe.__setModuleDefault||(Object.create?function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}:function(i,e){i.default=e}),m=Xe&&Xe.__importStar||function(){var i=function(e){return i=Object.getOwnPropertyNames||function(s){var l=[];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(l[l.length]=c);return l},i(e)};return function(e){if(e&&e.__esModule)return e;var s={};if(e!=null)for(var l=i(e),c=0;c<l.length;c++)l[c]!=="default"&&a(s,e,l[c]);return d(s,e),s}}();Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.MalloyTagLexer=void 0;const y=uo(),h=vr(),u=oo(),r=_r(),o=m(ot());let t=class tt extends h.Lexer{get vocabulary(){return tt.VOCABULARY}constructor(e){super(e),this._interp=new u.LexerATNSimulator(tt._ATN,this)}get grammarFileName(){return"MalloyTag.g4"}get ruleNames(){return tt.ruleNames}get serializedATN(){return tt._serializedATN}get channelNames(){return tt.channelNames}get modeNames(){return tt.modeNames}static get _ATN(){return tt.__ATN||(tt.__ATN=new y.ATNDeserializer().deserialize(o.toCharArray(tt._serializedATN))),tt.__ATN}};return Xe.MalloyTagLexer=t,t.MINUS_DOTTY=1,t.DOTTY=2,t.DOT=3,t.MINUS=4,t.EQ=5,t.RF_BEG=6,t.RF_END=7,t.PR_BEG=8,t.PR_END=9,t.AR_BEG=10,t.COMMA=11,t.AR_END=12,t.SQ_STRING=13,t.DQ_STRING=14,t.BQ_STRING=15,t.NUMERIC_LITERAL=16,t.BARE_STRING=17,t.COMMENT=18,t.WHITE_SPACE=19,t.UNEXPECTED_CHAR=20,t.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"],t.modeNames=["DEFAULT_MODE"],t.ruleNames=["MINUS_DOTTY","DOTTY","DOT","MINUS","EQ","RF_BEG","RF_END","PR_BEG","PR_END","AR_BEG","COMMA","AR_END","ID_CHAR","DIGIT","HEX","UNICODE","SAFE_NON_QUOTE","ESCAPED","SQ_STRING","DQ_STRING","BQ_STRING","INTEGER_LITERAL","EXPONENT","NUMERIC_LITERAL","BARE_STRING","COMMENT","WHITE_SPACE","UNEXPECTED_CHAR"],t._LITERAL_NAMES=[void 0,"'-...'","'...'","'.'","'-'","'='","'$('","')'","'{'","'}'","'['","','","']'"],t._SYMBOLIC_NAMES=[void 0,"MINUS_DOTTY","DOTTY","DOT","MINUS","EQ","RF_BEG","RF_END","PR_BEG","PR_END","AR_BEG","COMMA","AR_END","SQ_STRING","DQ_STRING","BQ_STRING","NUMERIC_LITERAL","BARE_STRING","COMMENT","WHITE_SPACE","UNEXPECTED_CHAR"],t.VOCABULARY=new r.VocabularyImpl(t._LITERAL_NAMES,t._SYMBOLIC_NAMES,[]),t._serializedATN=`줝쪺֍꾺体؇쉁Í\b \x07 \x07\b \b
|
|
529
|
+
|
|
530
|
+
\v \v\f \f\r \r \x1B \x1B \x07\x07\x07\b\b
|
|
531
|
+
|
|
532
|
+
\v\v\f\f\r\r\x07r
|
|
533
|
+
\fu\v\x07~
|
|
534
|
+
\f\v\x07
|
|
535
|
+
\f\v
|
|
536
|
+
|
|
537
|
+
\r
|
|
538
|
+
|
|
539
|
+
\r£
|
|
540
|
+
§
|
|
541
|
+
\r¨¬
|
|
542
|
+
°
|
|
543
|
+
²
|
|
544
|
+
¶
|
|
545
|
+
\r·\x1B\x1B\x07\x1B¼
|
|
546
|
+
\x1B\f\x1B\x1B¿\v\x1B\x1B\x1B\x1B\x1BÆ
|
|
547
|
+
\rǽ\x07 \v\x07\r\b
|
|
548
|
+
\v\f\r\x1B!#%')+-/13579\v2;2;CHch\x07!$$))^^bb$$bb))bb$$))GGgg--//\v\r""ʇC\\aac|¬¬··¼¼ÂØÚøú˃ˈ˓ˢ˦ˮˮ˰˰͇͇ͲͶͼͿΈΈΊΌΎΎΐΣΥϷϹ҃ҌԱԳ՛՛գ։ֲֿׁׁ׃ׄ׆ׇגײ״ؒآٙٛ١ٰەۗ۞ۣ۪ۯ۱ۼ۾܁܁ܒ݁ݏߌ߬߶߷ࠂ࠙ࠜࡂ࡚ࢢࢶࢸࢿࣲࣖ࣡ࣥ࣫ऽिॎॐ॒ॗ॥ॳঅইকপবলসি্ৎয়ৡ৲৳ਃਅਇਕਪਬਲਵਸੀ੍ਜ਼ਫ਼ੲઃઅઇએઑઓકપબલવષિેૉો્ૢૻૻଃଅଇକପବଲଵଷି୍ୟୡ୳୳அஇஐஒஔஜஞஞபரீைொௌంఅఇఎఐఒఔపబిెైొౌౘౚౢಂಅಇಎಐಒಔಪಬವಷಿೆೈೊೌೠೠೢೳഃഅഇഎഐഒഔ഼ിെൈൊൌൎൖ൙ൡർඁඅඇගඳඵලෂෑූෘෘේ෴ฃโ่๏๏ຄຆຆຉຊຌຌຏຏຖນປມຣລວວຩຩຬອຯົຽໂໆ່່ໞ༂༂གཉཋཱིྃྊྙྛ྾ဂး််ွ၁ၒၤၧၪၰႈ႐႐႞႟ႢჇგჼჾቊቌቒቘቚቚቜቢኊኌኒኲኴኺዀዂዂዄዊዘዚጒጔጚ፡፡ᎂ᎑Ꭲᏺᐃ᙮ᙱᚁᚃ᚜ᚢ᛬ᛰᜂᜎᜐ᜕ᜢ᜵ᝂᝢᝮᝰᝲគ឵ី៊៙៙ᠢᢂᢲᤂᤠᤢᤲ᤺ᥒᥲᦂᦲᨂᨢ᩠ᩣ᩶᪩᪩ᬂᬵᬷᭅᭇᮂ᮫ᮮ᮱ᮼᯧᯩ᯳ᰂ᰷ᱏ᱑ᱜ᱿ᲂᳫᳮᳰᳵ᳷᳸ᴂ᷁ᷩ᷶ḂἚἢὊὒὙὛὛὝὝὟὟὡᾂᾶᾸι῀῀ῄῆῈ῎ῒῘ῝ῢ΅ῴῶῸ῾₁₁ₒ℄℄℉℉ℌℕ℗℗ℛ℟ΩΩℨℨKKℬℯℱ℻ℾ⅁ⅇ⅋⅐⅐Ⅲ↊Ⓒ⓫ⰂⰰⰲⱠⱢ⳦Ⳮ⳰ⴂⴧⴲⶂⶢⶨⶪⶰⶲⶸⶺⷀⷂⷈⷊⷐⷒⷘⷚⷠⷢ⸁⸱⸱〇〉〣〫〳〷〺〾ぃゟァィーヾㄇㄯㄳ㆐ㆢㆼㇲ㈁㐂䶷丂鿗ꀂꓒ꓿ꔂ꘎ꘒ꘡Ꙃ꙰ꙶ꙽ꚁ꛱ꜙ꜡Ꜥ꞊ꞍꞰꞲꞹꟹꠃꠅꠇꠉꠌꠎ꠩ꡂ꡵ꢂꣅꣴ꣹ꣽꣽꣿꣿꤌ꤬ꤲꥢꦂꦴꦶ꧁꧑꧑ꧢꧦꧨ꧱ꧼꨀꨂꩂꩢ꩸ꩼꩼꪀꫀꫂꫂꫝ꫟ꫢ꫱ꫴꬃꬋꬓꬢꬨꬪꬰꬲꭜꭞꭧꭲ꯬갂ힲퟍ車全flﬕײַשׁשּׁטּךּמּנּנּףּצּרּ﮳ﯕ﴿ﵒﶔﷲ﷽ﹲﹶﹸC\c|ィᅣᅩᅯᅵ\r(*<>?AOR_üłŶʂʞʢ˒̡̲̂͌͒ͼΟυϊϑϓϗЂҟҲӕӚӽԂԩԲեܸ݂ݗݢݩࠂࠇࠊࠊࠌ࠷࠹࠺࠾࠾ࡁࡗࡢࡸࢂࢠࣶࣴࣷंगढऻংহীুਂਅਇਈਕਗਙਛਵંઞૂૉો૦ଂଷୂୗୢ୴ஂஓంొಂೂဂ၇ႄႺგცᄂᄴᅒᅴᅸᅸᆂᇁᇃᇆᇜᇜᇞᇞሂሓሕሶሹሹቀቀኂኈኊኊኌኑኟኡኪኲዪጂጅጇጎጒጕጪጬጲጴጵጷጻጿፆፉፊፍፎፒፒፙፙ፟፥ᐂᑃᑅᑇᑉᑌᒂᓃᓆᓇᓉᓉᖂᖷᖺᗀᗚᗟᘂᙀᙂᙂᙆᙆᚂᚷᜂᜟᜬᢢᣡᤁᤁ᫂ᰂᰊᰌ᱀᱂᱂ᱴᲑᲔᲩᲫᲸ ⎛␂⑰⒂╅。㐰䐂䙈栂樺橂橠櫒櫯欂欸歂歅步歹歿殑漂潆潒澀澕澡濢濢瀂蟮蠂諴뀂뀃밂뱬뱲뱾벂벊벒벛베베퐂푖푘풞풠풡풤풤풧풨풫풮풰풻풽풽풿퓅퓇픇픉플픏픖픘픞픠픻픽핀핂핆핈핈핌핒핔횧횪훂후훜훞훼훾휖휘휶휸흐흒흰흲힊힌ퟄퟆퟍꛘ꜂뜶띂렟렢캣﨟Ý\x07 \v\r')+13579;@\x07D F\vH\rJMOQSUW\x1BY[]!_#g%i'l)x+-/1±3µ5¹7Å9Ë;<\x07/<=\x070=>\x070>?\x070?@A\x070AB\x070BC\x070CDE\x070E\bFG\x07/G
|
|
549
|
+
HI\x07?I\fJK\x07&KL\x07*LMN\x07+NOP\x07}PQR\x07RST\x07]TUV\x07.VWX\x07_XYZ \vZ[\\ \\]^ ^ _\`\x07^\`a\x07wabbccddeeff"gh
|
|
550
|
+
h$ij\x07^jk\vk&ls\x07)mr!nr%or#pr qmqnqoqprusqsttvusvw\x07)w(x\x07$y~!z~%{~#|~ }y}z}{}|~}\x07$*\x07b
!%# \x07
\x07b, . \b 0¡£-¢¡¢££¤¤¦\x07¥§¦¥§¨¨¦¨©©«ª¬/«ª«¬¬²¯-®°/¯®¯°°²±¢±²2³¶´¶\x1Bµ³µ´¶··µ·¸¸4¹½\x07%º¼\v»º¼¿½¾½»¾À¿½ÀÁ\x07ÁÂÂÃ\b\x1BÃ6ÄÆ
|
|
551
|
+
ÅÄÆÇÇÅÇÈÈÉÉÊ\bÊ8ËÌ\vÌ:qs}¢¨«¯±µ·½Ç\b`,Xe}var Ce={},Wf;function Mx(){if(Wf)return Ce;Wf=1;var a=Ce&&Ce.__createBinding||(Object.create?function(Z,I,Q,re){re===void 0&&(re=Q);var fe=Object.getOwnPropertyDescriptor(I,Q);(!fe||("get"in fe?!I.__esModule:fe.writable||fe.configurable))&&(fe={enumerable:!0,get:function(){return I[Q]}}),Object.defineProperty(Z,re,fe)}:function(Z,I,Q,re){re===void 0&&(re=Q),Z[re]=I[Q]}),d=Ce&&Ce.__setModuleDefault||(Object.create?function(Z,I){Object.defineProperty(Z,"default",{enumerable:!0,value:I})}:function(Z,I){Z.default=I}),m=Ce&&Ce.__importStar||function(){var Z=function(I){return Z=Object.getOwnPropertyNames||function(Q){var re=[];for(var fe in Q)Object.prototype.hasOwnProperty.call(Q,fe)&&(re[re.length]=fe);return re},Z(I)};return function(I){if(I&&I.__esModule)return I;var Q={};if(I!=null)for(var re=Z(I),fe=0;fe<re.length;fe++)re[fe]!=="default"&&a(Q,I,re[fe]);return d(Q,I),Q}}();Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.PropertiesContext=Ce.ArrayValueContext=Ce.ReferenceContext=Ce.ArrayElementContext=Ce.EqValueContext=Ce.PropNameContext=Ce.IdentifierContext=Ce.StringContext=Ce.TagEmptyContext=Ce.TagDefContext=Ce.TagUpdatePropertiesContext=Ce.TagReplacePropertiesContext=Ce.TagEqContext=Ce.TagSpecContext=Ce.TagLineContext=Ce.MalloyTagParser=void 0;const y=st(),h=uo(),u=lo(),r=ao(),o=Mi(),t=nt(),i=Bi(),e=Ar(),s=Fe(),l=_r(),c=m(ot());let p=class ye extends o.Parser{get vocabulary(){return ye.VOCABULARY}get grammarFileName(){return"MalloyTag.g4"}get ruleNames(){return ye.ruleNames}get serializedATN(){return ye._serializedATN}createFailedPredicateException(I,Q){return new u.FailedPredicateException(this,I,Q)}constructor(I){super(I),this._interp=new i.ParserATNSimulator(ye._ATN,this)}tagLine(){let I=new v(this._ctx,this.state);this.enterRule(I,0,ye.RULE_tagLine);let Q;try{this.enterOuterAlt(I,1);{for(this.state=23,this._errHandler.sync(this),Q=this._input.LA(1);(Q&-32)===0&&(1<<Q&(1<<ye.MINUS_DOTTY|1<<ye.MINUS|1<<ye.BQ_STRING|1<<ye.BARE_STRING))!==0;)this.state=20,this.tagSpec(),this.state=25,this._errHandler.sync(this),Q=this._input.LA(1);this.state=26,this.match(ye.EOF)}}catch(re){if(re instanceof e.RecognitionException)I.exception=re,this._errHandler.reportError(this,re),this._errHandler.recover(this,re);else throw re}finally{this.exitRule()}return I}tagSpec(){let I=new x(this._ctx,this.state);this.enterRule(I,2,ye.RULE_tagSpec);let Q;try{switch(this.state=49,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,4,this._ctx)){case 1:I=new g(I),this.enterOuterAlt(I,1),this.state=28,this.propName(),this.state=29,this.match(ye.EQ),this.state=30,this.eqValue(),this.state=32,this._errHandler.sync(this),Q=this._input.LA(1),Q===ye.PR_BEG&&(this.state=31,this.properties());break;case 2:I=new _(I),this.enterOuterAlt(I,2),this.state=34,this.propName(),this.state=35,this.match(ye.EQ),this.state=37,this._errHandler.sync(this),Q=this._input.LA(1),Q===ye.DOTTY&&(this.state=36,this.match(ye.DOTTY)),this.state=39,this.properties();break;case 3:I=new A(I),this.enterOuterAlt(I,3),this.state=41,this.propName(),this.state=42,this.properties();break;case 4:I=new E(I),this.enterOuterAlt(I,4),this.state=45,this._errHandler.sync(this),Q=this._input.LA(1),Q===ye.MINUS&&(this.state=44,this.match(ye.MINUS)),this.state=47,this.propName();break;case 5:I=new D(I),this.enterOuterAlt(I,5),this.state=48,this.match(ye.MINUS_DOTTY);break}}catch(re){if(re instanceof e.RecognitionException)I.exception=re,this._errHandler.reportError(this,re),this._errHandler.recover(this,re);else throw re}finally{this.exitRule()}return I}string(){let I=new N(this._ctx,this.state);this.enterRule(I,4,ye.RULE_string);let Q;try{this.enterOuterAlt(I,1),this.state=51,Q=this._input.LA(1),(Q&-32)===0&&(1<<Q&(1<<ye.SQ_STRING|1<<ye.DQ_STRING|1<<ye.NUMERIC_LITERAL|1<<ye.BARE_STRING))!==0?(this._input.LA(1)===s.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(re){if(re instanceof e.RecognitionException)I.exception=re,this._errHandler.reportError(this,re),this._errHandler.recover(this,re);else throw re}finally{this.exitRule()}return I}identifier(){let I=new w(this._ctx,this.state);this.enterRule(I,6,ye.RULE_identifier);let Q;try{this.enterOuterAlt(I,1),this.state=53,Q=this._input.LA(1),Q===ye.BQ_STRING||Q===ye.BARE_STRING?(this._input.LA(1)===s.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(re){if(re instanceof e.RecognitionException)I.exception=re,this._errHandler.reportError(this,re),this._errHandler.recover(this,re);else throw re}finally{this.exitRule()}return I}propName(){let I=new P(this._ctx,this.state);this.enterRule(I,8,ye.RULE_propName);let Q;try{for(this.enterOuterAlt(I,1),this.state=55,this.identifier(),this.state=60,this._errHandler.sync(this),Q=this._input.LA(1);Q===ye.DOT;)this.state=56,this.match(ye.DOT),this.state=57,this.identifier(),this.state=62,this._errHandler.sync(this),Q=this._input.LA(1)}catch(re){if(re instanceof e.RecognitionException)I.exception=re,this._errHandler.reportError(this,re),this._errHandler.recover(this,re);else throw re}finally{this.exitRule()}return I}eqValue(){let I=new $(this._ctx,this.state);this.enterRule(I,10,ye.RULE_eqValue);try{switch(this.state=66,this._errHandler.sync(this),this._input.LA(1)){case ye.SQ_STRING:case ye.DQ_STRING:case ye.NUMERIC_LITERAL:case ye.BARE_STRING:this.enterOuterAlt(I,1),this.state=63,this.string();break;case ye.AR_BEG:this.enterOuterAlt(I,2),this.state=64,this.arrayValue();break;case ye.RF_BEG:this.enterOuterAlt(I,3),this.state=65,this.reference();break;default:throw new r.NoViableAltException(this)}}catch(Q){if(Q instanceof e.RecognitionException)I.exception=Q,this._errHandler.reportError(this,Q),this._errHandler.recover(this,Q);else throw Q}finally{this.exitRule()}return I}arrayElement(){let I=new Y(this._ctx,this.state);this.enterRule(I,12,ye.RULE_arrayElement);let Q;try{switch(this.state=75,this._errHandler.sync(this),this._input.LA(1)){case ye.SQ_STRING:case ye.DQ_STRING:case ye.NUMERIC_LITERAL:case ye.BARE_STRING:this.enterOuterAlt(I,1),this.state=68,this.string(),this.state=70,this._errHandler.sync(this),Q=this._input.LA(1),Q===ye.PR_BEG&&(this.state=69,this.properties());break;case ye.PR_BEG:this.enterOuterAlt(I,2),this.state=72,this.properties();break;case ye.AR_BEG:this.enterOuterAlt(I,3),this.state=73,this.arrayValue();break;case ye.RF_BEG:this.enterOuterAlt(I,4),this.state=74,this.reference();break;default:throw new r.NoViableAltException(this)}}catch(re){if(re instanceof e.RecognitionException)I.exception=re,this._errHandler.reportError(this,re),this._errHandler.recover(this,re);else throw re}finally{this.exitRule()}return I}reference(){let I=new L(this._ctx,this.state);this.enterRule(I,14,ye.RULE_reference);try{this.enterOuterAlt(I,1),this.state=77,this.match(ye.RF_BEG),this.state=78,this.propName(),this.state=79,this.match(ye.RF_END)}catch(Q){if(Q instanceof e.RecognitionException)I.exception=Q,this._errHandler.reportError(this,Q),this._errHandler.recover(this,Q);else throw Q}finally{this.exitRule()}return I}arrayValue(){let I=new q(this._ctx,this.state);this.enterRule(I,16,ye.RULE_arrayValue);let Q;try{let re;this.enterOuterAlt(I,1);{for(this.state=81,this.match(ye.AR_BEG),this.state=82,this.arrayElement(),this.state=87,this._errHandler.sync(this),re=this.interpreter.adaptivePredict(this._input,9,this._ctx);re!==2&&re!==y.ATN.INVALID_ALT_NUMBER;)re===1&&(this.state=83,this.match(ye.COMMA),this.state=84,this.arrayElement()),this.state=89,this._errHandler.sync(this),re=this.interpreter.adaptivePredict(this._input,9,this._ctx);this.state=91,this._errHandler.sync(this),Q=this._input.LA(1),Q===ye.COMMA&&(this.state=90,this.match(ye.COMMA)),this.state=93,this.match(ye.AR_END)}}catch(re){if(re instanceof e.RecognitionException)I.exception=re,this._errHandler.reportError(this,re),this._errHandler.recover(this,re);else throw re}finally{this.exitRule()}return I}properties(){let I=new W(this._ctx,this.state);this.enterRule(I,18,ye.RULE_properties);let Q;try{this.enterOuterAlt(I,1);{switch(this.state=95,this.match(ye.PR_BEG),this.state=103,this._errHandler.sync(this),this._input.LA(1)){case ye.DOTTY:this.state=96,this.match(ye.DOTTY);break;case ye.MINUS_DOTTY:case ye.MINUS:case ye.PR_END:case ye.BQ_STRING:case ye.BARE_STRING:for(this.state=100,this._errHandler.sync(this),Q=this._input.LA(1);(Q&-32)===0&&(1<<Q&(1<<ye.MINUS_DOTTY|1<<ye.MINUS|1<<ye.BQ_STRING|1<<ye.BARE_STRING))!==0;)this.state=97,this.tagSpec(),this.state=102,this._errHandler.sync(this),Q=this._input.LA(1);break;default:throw new r.NoViableAltException(this)}this.state=105,this.match(ye.PR_END)}}catch(re){if(re instanceof e.RecognitionException)I.exception=re,this._errHandler.reportError(this,re),this._errHandler.recover(this,re);else throw re}finally{this.exitRule()}return I}static get _ATN(){return ye.__ATN||(ye.__ATN=new h.ATNDeserializer().deserialize(c.toCharArray(ye._serializedATN))),ye.__ATN}};Ce.MalloyTagParser=p,p.MINUS_DOTTY=1,p.DOTTY=2,p.DOT=3,p.MINUS=4,p.EQ=5,p.RF_BEG=6,p.RF_END=7,p.PR_BEG=8,p.PR_END=9,p.AR_BEG=10,p.COMMA=11,p.AR_END=12,p.SQ_STRING=13,p.DQ_STRING=14,p.BQ_STRING=15,p.NUMERIC_LITERAL=16,p.BARE_STRING=17,p.COMMENT=18,p.WHITE_SPACE=19,p.UNEXPECTED_CHAR=20,p.RULE_tagLine=0,p.RULE_tagSpec=1,p.RULE_string=2,p.RULE_identifier=3,p.RULE_propName=4,p.RULE_eqValue=5,p.RULE_arrayElement=6,p.RULE_reference=7,p.RULE_arrayValue=8,p.RULE_properties=9,p.ruleNames=["tagLine","tagSpec","string","identifier","propName","eqValue","arrayElement","reference","arrayValue","properties"],p._LITERAL_NAMES=[void 0,"'-...'","'...'","'.'","'-'","'='","'$('","')'","'{'","'}'","'['","','","']'"],p._SYMBOLIC_NAMES=[void 0,"MINUS_DOTTY","DOTTY","DOT","MINUS","EQ","RF_BEG","RF_END","PR_BEG","PR_END","AR_BEG","COMMA","AR_END","SQ_STRING","DQ_STRING","BQ_STRING","NUMERIC_LITERAL","BARE_STRING","COMMENT","WHITE_SPACE","UNEXPECTED_CHAR"],p.VOCABULARY=new l.VocabularyImpl(p._LITERAL_NAMES,p._SYMBOLIC_NAMES,[]),p._serializedATN=`줝쪺֍꾺体؇쉁n \x07 \x07\b \b
|
|
552
|
+
|
|
553
|
+
\v \v\x07
|
|
554
|
+
\f\x1B\v#
|
|
555
|
+
(
|
|
556
|
+
0
|
|
557
|
+
4
|
|
558
|
+
\x07=
|
|
559
|
+
\f@\v\x07\x07\x07\x07E
|
|
560
|
+
\x07\b\b\bI
|
|
561
|
+
\b\b\b\b\bN
|
|
562
|
+
\b
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
\x07
|
|
567
|
+
X
|
|
568
|
+
|
|
569
|
+
\f
|
|
570
|
+
|
|
571
|
+
[\v
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
^
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
\v\v\v\x07\ve
|
|
579
|
+
\v\f\v\vh\v\v\vj
|
|
580
|
+
\v\v\v\v\f\b
|
|
581
|
+
\fv35\b7
|
|
582
|
+
9\fDMOSa\x1B\x1B\x07
|
|
583
|
+
\x07\x07 "\f\x07!#\v"!"##4$%
|
|
584
|
+
%'\x07\x07&(\x07'&'(())*\v*4+,
|
|
585
|
+
,-\v-4.0\x07/./00114
|
|
586
|
+
24\x0733$3+3/32456 6\x0778 8 9>\b:;\x07;=\b<:=@><>??\v@>AEBE
|
|
587
|
+
CE DADBDCE\rFHGI\vHGHIINJN\vKN
|
|
588
|
+
LN MFMJMKMLNOP\x07\bPQ
|
|
589
|
+
QR\x07 RST\x07\fTY\bUV\x07\rVX\bWUX[YWYZZ][Y\\^\x07\r]\\]^^__\`\x07\`ai\x07
|
|
590
|
+
bj\x07cedcehfdfggjhfibifjkkl\x07\vl"'/3>DHMY]fi`;class v extends t.ParserRuleContext{EOF(){return this.getToken(p.EOF,0)}tagSpec(I){return I===void 0?this.getRuleContexts(x):this.getRuleContext(I,x)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_tagLine}accept(I){return I.visitTagLine?I.visitTagLine(this):I.visitChildren(this)}}Ce.TagLineContext=v;class x extends t.ParserRuleContext{constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_tagSpec}copyFrom(I){super.copyFrom(I)}}Ce.TagSpecContext=x;class g extends x{propName(){return this.getRuleContext(0,P)}EQ(){return this.getToken(p.EQ,0)}eqValue(){return this.getRuleContext(0,$)}properties(){return this.tryGetRuleContext(0,W)}constructor(I){super(I.parent,I.invokingState),this.copyFrom(I)}accept(I){return I.visitTagEq?I.visitTagEq(this):I.visitChildren(this)}}Ce.TagEqContext=g;class _ extends x{propName(){return this.getRuleContext(0,P)}EQ(){return this.getToken(p.EQ,0)}properties(){return this.getRuleContext(0,W)}DOTTY(){return this.tryGetToken(p.DOTTY,0)}constructor(I){super(I.parent,I.invokingState),this.copyFrom(I)}accept(I){return I.visitTagReplaceProperties?I.visitTagReplaceProperties(this):I.visitChildren(this)}}Ce.TagReplacePropertiesContext=_;class A extends x{propName(){return this.getRuleContext(0,P)}properties(){return this.getRuleContext(0,W)}constructor(I){super(I.parent,I.invokingState),this.copyFrom(I)}accept(I){return I.visitTagUpdateProperties?I.visitTagUpdateProperties(this):I.visitChildren(this)}}Ce.TagUpdatePropertiesContext=A;class E extends x{propName(){return this.getRuleContext(0,P)}MINUS(){return this.tryGetToken(p.MINUS,0)}constructor(I){super(I.parent,I.invokingState),this.copyFrom(I)}accept(I){return I.visitTagDef?I.visitTagDef(this):I.visitChildren(this)}}Ce.TagDefContext=E;class D extends x{MINUS_DOTTY(){return this.getToken(p.MINUS_DOTTY,0)}constructor(I){super(I.parent,I.invokingState),this.copyFrom(I)}accept(I){return I.visitTagEmpty?I.visitTagEmpty(this):I.visitChildren(this)}}Ce.TagEmptyContext=D;class N extends t.ParserRuleContext{SQ_STRING(){return this.tryGetToken(p.SQ_STRING,0)}DQ_STRING(){return this.tryGetToken(p.DQ_STRING,0)}BARE_STRING(){return this.tryGetToken(p.BARE_STRING,0)}NUMERIC_LITERAL(){return this.tryGetToken(p.NUMERIC_LITERAL,0)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_string}accept(I){return I.visitString?I.visitString(this):I.visitChildren(this)}}Ce.StringContext=N;class w extends t.ParserRuleContext{BQ_STRING(){return this.tryGetToken(p.BQ_STRING,0)}BARE_STRING(){return this.tryGetToken(p.BARE_STRING,0)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_identifier}accept(I){return I.visitIdentifier?I.visitIdentifier(this):I.visitChildren(this)}}Ce.IdentifierContext=w;class P extends t.ParserRuleContext{identifier(I){return I===void 0?this.getRuleContexts(w):this.getRuleContext(I,w)}DOT(I){return I===void 0?this.getTokens(p.DOT):this.getToken(p.DOT,I)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_propName}accept(I){return I.visitPropName?I.visitPropName(this):I.visitChildren(this)}}Ce.PropNameContext=P;class $ extends t.ParserRuleContext{string(){return this.tryGetRuleContext(0,N)}arrayValue(){return this.tryGetRuleContext(0,q)}reference(){return this.tryGetRuleContext(0,L)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_eqValue}accept(I){return I.visitEqValue?I.visitEqValue(this):I.visitChildren(this)}}Ce.EqValueContext=$;class Y extends t.ParserRuleContext{string(){return this.tryGetRuleContext(0,N)}properties(){return this.tryGetRuleContext(0,W)}arrayValue(){return this.tryGetRuleContext(0,q)}reference(){return this.tryGetRuleContext(0,L)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_arrayElement}accept(I){return I.visitArrayElement?I.visitArrayElement(this):I.visitChildren(this)}}Ce.ArrayElementContext=Y;class L extends t.ParserRuleContext{RF_BEG(){return this.getToken(p.RF_BEG,0)}propName(){return this.getRuleContext(0,P)}RF_END(){return this.getToken(p.RF_END,0)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_reference}accept(I){return I.visitReference?I.visitReference(this):I.visitChildren(this)}}Ce.ReferenceContext=L;class q extends t.ParserRuleContext{AR_BEG(){return this.getToken(p.AR_BEG,0)}arrayElement(I){return I===void 0?this.getRuleContexts(Y):this.getRuleContext(I,Y)}AR_END(){return this.getToken(p.AR_END,0)}COMMA(I){return I===void 0?this.getTokens(p.COMMA):this.getToken(p.COMMA,I)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_arrayValue}accept(I){return I.visitArrayValue?I.visitArrayValue(this):I.visitChildren(this)}}Ce.ArrayValueContext=q;class W extends t.ParserRuleContext{PR_BEG(){return this.getToken(p.PR_BEG,0)}PR_END(){return this.getToken(p.PR_END,0)}DOTTY(){return this.tryGetToken(p.DOTTY,0)}tagSpec(I){return I===void 0?this.getRuleContexts(x):this.getRuleContext(I,x)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_properties}accept(I){return I.visitProperties?I.visitProperties(this):I.visitChildren(this)}}return Ce.PropertiesContext=W,Ce}var Dn={},Hs={},Qf;function qx(){if(Qf)return Hs;Qf=1;/*!
|
|
591
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
592
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
593
|
+
*/return Object.defineProperty(Hs,"__esModule",{value:!0}),Hs}var Gs={},Xf;function jx(){if(Xf)return Gs;Xf=1;/*!
|
|
594
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
595
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
596
|
+
*/return Object.defineProperty(Gs,"__esModule",{value:!0}),Gs}var wn={},Kf;function $x(){if(Kf)return wn;Kf=1;/*!
|
|
597
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
598
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
599
|
+
*/var a=wn&&wn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(wn,"__esModule",{value:!0}),wn.ANTLRInputStream=void 0;const d=qe(),m=ue(),y=dr();let h=class{constructor(r){this.p=0,this.data=r,this.n=r.length}reset(){this.p=0}consume(){if(this.p>=this.n)throw d(this.LA(1)===y.IntStream.EOF),new Error("cannot consume EOF");this.p<this.n&&this.p++}LA(r){return r===0?0:r<0&&(r++,this.p+r-1<0)||this.p+r-1>=this.n?y.IntStream.EOF:this.data.charCodeAt(this.p+r-1)}LT(r){return this.LA(r)}get index(){return this.p}get size(){return this.n}mark(){return-1}release(r){}seek(r){if(r<=this.p){this.p=r;return}for(r=Math.min(r,this.n);this.p<r;)this.consume()}getText(r){let o=r.a,t=r.b;t>=this.n&&(t=this.n-1);let i=t-o+1;return o>=this.n?"":this.data.substr(o,i)}get sourceName(){return this.name?this.name:y.IntStream.UNKNOWN_SOURCE_NAME}toString(){return this.data}};return a([m.Override],h.prototype,"consume",null),a([m.Override],h.prototype,"LA",null),a([m.Override],h.prototype,"index",null),a([m.Override],h.prototype,"size",null),a([m.Override],h.prototype,"mark",null),a([m.Override],h.prototype,"release",null),a([m.Override],h.prototype,"seek",null),a([m.Override],h.prototype,"getText",null),a([m.Override],h.prototype,"sourceName",null),a([m.Override],h.prototype,"toString",null),wn.ANTLRInputStream=h,wn}var Ys={},Jf;function Ux(){if(Jf)return Ys;Jf=1;/*!
|
|
600
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
601
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
602
|
+
*/return Object.defineProperty(Ys,"__esModule",{value:!0}),Ys}var Ws={},Zf;function Vx(){return Zf||(Zf=1,function(a){/*!
|
|
603
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
604
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
605
|
+
*/Object.defineProperty(a,"__esModule",{value:!0}),a.Dependents=void 0,function(d){d[d.SELF=0]="SELF",d[d.PARENTS=1]="PARENTS",d[d.CHILDREN=2]="CHILDREN",d[d.ANCESTORS=3]="ANCESTORS",d[d.DESCENDANTS=4]="DESCENDANTS",d[d.SIBLINGS=5]="SIBLINGS",d[d.PRECEEDING_SIBLINGS=6]="PRECEEDING_SIBLINGS",d[d.FOLLOWING_SIBLINGS=7]="FOLLOWING_SIBLINGS",d[d.PRECEEDING=8]="PRECEEDING",d[d.FOLLOWING=9]="FOLLOWING"}(a.Dependents||(a.Dependents={}))}(Ws)),Ws}var lr={},e0;function zx(){if(e0)return lr;e0=1;/*!
|
|
606
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
607
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
608
|
+
*/var a=lr&&lr.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=lr&&lr.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(lr,"__esModule",{value:!0}),lr.DiagnosticErrorListener=void 0;const m=gr(),y=ue(),h=je();let u=class{constructor(o=!0){this.exactOnly=o,this.exactOnly=o}syntaxError(o,t,i,e,s,l){}reportAmbiguity(o,t,i,e,s,l,c){if(this.exactOnly&&!s)return;let p=this.getDecisionDescription(o,t),v=this.getConflictingAlts(l,c),x=o.inputStream.getText(h.Interval.of(i,e)),g=`reportAmbiguity d=${p}: ambigAlts=${v}, input='${x}'`;o.notifyErrorListeners(g)}reportAttemptingFullContext(o,t,i,e,s,l){let c=this.getDecisionDescription(o,t),p=o.inputStream.getText(h.Interval.of(i,e)),v=`reportAttemptingFullContext d=${c}, input='${p}'`;o.notifyErrorListeners(v)}reportContextSensitivity(o,t,i,e,s,l){let c=this.getDecisionDescription(o,t),p=o.inputStream.getText(h.Interval.of(i,e)),v=`reportContextSensitivity d=${c}, input='${p}'`;o.notifyErrorListeners(v)}getDecisionDescription(o,t){let i=t.decision,e=t.atnStartState.ruleIndex,s=o.ruleNames;if(e<0||e>=s.length)return i.toString();let l=s[e];return l?`${i} (${l})`:i.toString()}getConflictingAlts(o,t){if(o!=null)return o;let i=new m.BitSet;for(let e of t)i.set(e.alt);return i}};return a([y.Override],u.prototype,"syntaxError",null),a([y.Override,d(0,y.NotNull),d(1,y.NotNull),d(6,y.NotNull)],u.prototype,"reportAmbiguity",null),a([y.Override,d(0,y.NotNull),d(1,y.NotNull),d(5,y.NotNull)],u.prototype,"reportAttemptingFullContext",null),a([y.Override,d(0,y.NotNull),d(1,y.NotNull),d(5,y.NotNull)],u.prototype,"reportContextSensitivity",null),a([d(0,y.NotNull),d(1,y.NotNull)],u.prototype,"getDecisionDescription",null),a([y.NotNull,d(1,y.NotNull)],u.prototype,"getConflictingAlts",null),lr.DiagnosticErrorListener=u,lr}var cr={},t0;function Hx(){if(t0)return cr;t0=1;/*!
|
|
609
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
610
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
611
|
+
*/var a=cr&&cr.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l},d=cr&&cr.__param||function(o,t){return function(i,e){t(i,e,o)}};Object.defineProperty(cr,"__esModule",{value:!0}),cr.LexerInterpreter=void 0;const m=vr(),y=oo(),h=ue(),u=ue();let r=class extends m.Lexer{constructor(t,i,e,s,l,c,p){if(super(p),c.grammarType!==0)throw new Error("IllegalArgumentException: The ATN must be a lexer ATN.");this._grammarFileName=t,this._atn=c,this._ruleNames=e.slice(0),this._channelNames=s.slice(0),this._modeNames=l.slice(0),this._vocabulary=i,this._interp=new y.LexerATNSimulator(c,this)}get atn(){return this._atn}get grammarFileName(){return this._grammarFileName}get ruleNames(){return this._ruleNames}get channelNames(){return this._channelNames}get modeNames(){return this._modeNames}get vocabulary(){return this._vocabulary}};return a([h.NotNull],r.prototype,"_vocabulary",void 0),a([u.Override],r.prototype,"atn",null),a([u.Override],r.prototype,"grammarFileName",null),a([u.Override],r.prototype,"ruleNames",null),a([u.Override],r.prototype,"channelNames",null),a([u.Override],r.prototype,"modeNames",null),a([u.Override],r.prototype,"vocabulary",null),r=a([d(1,h.NotNull)],r),cr.LexerInterpreter=r,cr}var Qs={},r0;function Gx(){if(r0)return Qs;r0=1;/*!
|
|
612
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
613
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
614
|
+
*/return Object.defineProperty(Qs,"__esModule",{value:!0}),Qs}var Rn={},n0;function Yx(){if(n0)return Rn;n0=1;/*!
|
|
615
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
616
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
617
|
+
*/var a=Rn&&Rn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.RuleContextWithAltNum=void 0;const d=st(),m=ue(),y=nt();let h=class extends y.ParserRuleContext{constructor(r,o){o!==void 0?super(r,o):super(),this._altNumber=d.ATN.INVALID_ALT_NUMBER}get altNumber(){return this._altNumber}set altNumber(r){this._altNumber=r}};return a([m.Override],h.prototype,"altNumber",null),Rn.RuleContextWithAltNum=h,Rn}var _i={},i0;function Wx(){if(i0)return _i;i0=1;/*!
|
|
618
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
619
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
620
|
+
*/Object.defineProperty(_i,"__esModule",{value:!0}),_i.RuleDependency=void 0;function a(d){return(m,y,h)=>{}}return _i.RuleDependency=a,_i}var Ai={},o0;function Qx(){if(o0)return Ai;o0=1;/*!
|
|
621
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
622
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
623
|
+
*/Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.RuleVersion=void 0;function a(d){return(m,y,h)=>{}}return Ai.RuleVersion=a,Ai}var Xs={},s0;function Xx(){if(s0)return Xs;s0=1;/*!
|
|
624
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
625
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
626
|
+
*/return Object.defineProperty(Xs,"__esModule",{value:!0}),Xs}var Ks={},a0;function Kx(){if(a0)return Ks;a0=1;/*!
|
|
627
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
628
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
629
|
+
*/return Object.defineProperty(Ks,"__esModule",{value:!0}),Ks}var Js={},u0;function Jx(){if(u0)return Js;u0=1;/*!
|
|
630
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
631
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
632
|
+
*/return Object.defineProperty(Js,"__esModule",{value:!0}),Js}var fr={},l0;function Zx(){if(l0)return fr;l0=1;/*!
|
|
633
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
634
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
635
|
+
*/var a=fr&&fr.__decorate||function(i,e,s,l){var c=arguments.length,p=c<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,s):l,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,e,s,l);else for(var x=i.length-1;x>=0;x--)(v=i[x])&&(p=(c<3?v(p):c>3?v(e,s,p):v(e,s))||p);return c>3&&p&&Object.defineProperty(e,s,p),p};Object.defineProperty(fr,"__esModule",{value:!0}),fr.RewriteOperation=fr.TokenStreamRewriter=void 0;const d=je(),m=ue(),y=Fe();let h=class Ge{constructor(e){this.tokens=e,this.programs=new Map,this.programs.set(Ge.DEFAULT_PROGRAM_NAME,[]),this.lastRewriteTokenIndexes=new Map}getTokenStream(){return this.tokens}rollback(e,s=Ge.DEFAULT_PROGRAM_NAME){let l=this.programs.get(s);l!=null&&this.programs.set(s,l.slice(Ge.MIN_TOKEN_INDEX,e))}deleteProgram(e=Ge.DEFAULT_PROGRAM_NAME){this.rollback(Ge.MIN_TOKEN_INDEX,e)}insertAfter(e,s,l=Ge.DEFAULT_PROGRAM_NAME){let c;typeof e=="number"?c=e:c=e.tokenIndex;let p=this.getProgram(l),v=new o(this.tokens,c,p.length,s);p.push(v)}insertBefore(e,s,l=Ge.DEFAULT_PROGRAM_NAME){let c;typeof e=="number"?c=e:c=e.tokenIndex;let p=this.getProgram(l),v=new r(this.tokens,c,p.length,s);p.push(v)}replaceSingle(e,s){typeof e=="number"?this.replace(e,e,s):this.replace(e,e,s)}replace(e,s,l,c=Ge.DEFAULT_PROGRAM_NAME){if(typeof e!="number"&&(e=e.tokenIndex),typeof s!="number"&&(s=s.tokenIndex),e>s||e<0||s<0||s>=this.tokens.size)throw new RangeError(`replace: range invalid: ${e}..${s}(size=${this.tokens.size})`);let p=this.getProgram(c),v=new t(this.tokens,e,s,p.length,l);p.push(v)}delete(e,s,l=Ge.DEFAULT_PROGRAM_NAME){s===void 0&&(s=e),typeof e=="number"?this.replace(e,s,"",l):this.replace(e,s,"",l)}getLastRewriteTokenIndex(e=Ge.DEFAULT_PROGRAM_NAME){let s=this.lastRewriteTokenIndexes.get(e);return s??-1}setLastRewriteTokenIndex(e,s){this.lastRewriteTokenIndexes.set(e,s)}getProgram(e){let s=this.programs.get(e);return s==null&&(s=this.initializeProgram(e)),s}initializeProgram(e){let s=[];return this.programs.set(e,s),s}getText(e,s=Ge.DEFAULT_PROGRAM_NAME){let l;e instanceof d.Interval?l=e:l=d.Interval.of(0,this.tokens.size-1),typeof e=="string"&&(s=e);let c=this.programs.get(s),p=l.a,v=l.b;if(v>this.tokens.size-1&&(v=this.tokens.size-1),p<0&&(p=0),c==null||c.length===0)return this.tokens.getText(l);let x=[],g=this.reduceToSingleOperationPerIndex(c),_=p;for(;_<=v&&_<this.tokens.size;){let A=g.get(_);g.delete(_);let E=this.tokens.get(_);A==null?(E.type!==y.Token.EOF&&x.push(String(E.text)),_++):_=A.execute(x)}if(v===this.tokens.size-1)for(let A of g.values())A.index>=this.tokens.size-1&&x.push(A.text.toString());return x.join("")}reduceToSingleOperationPerIndex(e){for(let l=0;l<e.length;l++){let c=e[l];if(c==null||!(c instanceof t))continue;let p=c,v=this.getKindOfOps(e,r,l);for(let g of v)g.index===p.index?(e[g.instructionIndex]=void 0,p.text=g.text.toString()+(p.text!=null?p.text.toString():"")):g.index>p.index&&g.index<=p.lastIndex&&(e[g.instructionIndex]=void 0);let x=this.getKindOfOps(e,t,l);for(let g of x){if(g.index>=p.index&&g.lastIndex<=p.lastIndex){e[g.instructionIndex]=void 0;continue}let _=g.lastIndex<p.index||g.index>p.lastIndex;if(g.text==null&&p.text==null&&!_)e[g.instructionIndex]=void 0,p.index=Math.min(g.index,p.index),p.lastIndex=Math.max(g.lastIndex,p.lastIndex);else if(!_)throw new Error(`replace op boundaries of ${p} overlap with previous ${g}`)}}for(let l=0;l<e.length;l++){let c=e[l];if(c==null||!(c instanceof r))continue;let p=c,v=this.getKindOfOps(e,r,l);for(let g of v)g.index===p.index&&(g instanceof o?(p.text=this.catOpText(g.text,p.text),e[g.instructionIndex]=void 0):g instanceof r&&(p.text=this.catOpText(p.text,g.text),e[g.instructionIndex]=void 0));let x=this.getKindOfOps(e,t,l);for(let g of x){if(p.index===g.index){g.text=this.catOpText(p.text,g.text),e[l]=void 0;continue}if(p.index>=g.index&&p.index<=g.lastIndex)throw new Error(`insert op ${p} within boundaries of previous ${g}`)}}let s=new Map;for(let l of e)if(l!=null){if(s.get(l.index)!=null)throw new Error("should only be one op per index");s.set(l.index,l)}return s}catOpText(e,s){let l="",c="";return e!=null&&(l=e.toString()),s!=null&&(c=s.toString()),l+c}getKindOfOps(e,s,l){let c=[];for(let p=0;p<l&&p<e.length;p++){let v=e[p];v!=null&&v instanceof s&&c.push(v)}return c}};fr.TokenStreamRewriter=h,h.DEFAULT_PROGRAM_NAME="default",h.PROGRAM_INIT_SIZE=100,h.MIN_TOKEN_INDEX=0;class u{constructor(e,s,l,c){this.tokens=e,this.instructionIndex=l,this.index=s,this.text=c===void 0?"":c}execute(e){return this.index}toString(){let e=this.constructor.name,s=e.indexOf("$");return e=e.substring(s+1,e.length),"<"+e+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}}a([m.Override],u.prototype,"toString",null),fr.RewriteOperation=u;class r extends u{constructor(e,s,l,c){super(e,s,l,c)}execute(e){return e.push(this.text.toString()),this.tokens.get(this.index).type!==y.Token.EOF&&e.push(String(this.tokens.get(this.index).text)),this.index+1}}a([m.Override],r.prototype,"execute",null);class o extends r{constructor(e,s,l,c){super(e,s+1,l,c)}}class t extends u{constructor(e,s,l,c,p){super(e,s,c,p),this.lastIndex=l}execute(e){return this.text!=null&&e.push(this.text.toString()),this.lastIndex+1}toString(){return this.text==null?"<DeleteOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+">":"<ReplaceOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+':"'+this.text+'">'}}return a([m.Override],t.prototype,"execute",null),a([m.Override],t.prototype,"toString",null),fr}var Zs={},c0;function ed(){if(c0)return Zs;c0=1;/*!
|
|
636
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
637
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
638
|
+
*/return Object.defineProperty(Zs,"__esModule",{value:!0}),Zs}var ea={},f0;function td(){if(f0)return ea;f0=1;/*!
|
|
639
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
640
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
641
|
+
*/return Object.defineProperty(ea,"__esModule",{value:!0}),ea}var p0;function rd(){return p0||(p0=1,function(a){/*!
|
|
642
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
643
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
644
|
+
*/var d=Dn&&Dn.__createBinding||(Object.create?function(y,h,u,r){r===void 0&&(r=u),Object.defineProperty(y,r,{enumerable:!0,get:function(){return h[u]}})}:function(y,h,u,r){r===void 0&&(r=u),y[r]=h[u]}),m=Dn&&Dn.__exportStar||function(y,h){for(var u in y)u!=="default"&&!Object.prototype.hasOwnProperty.call(h,u)&&d(h,y,u)};Object.defineProperty(a,"__esModule",{value:!0}),m(qx(),a),m(jx(),a),m($x(),a),m(Sp(),a),m(Cp(),a),m(Ux(),a),m(Da(),a),m(Tp(),a),m(Np(),a),m(Ii(),a),m(Sa(),a),m(wa(),a),m(Q0(),a),m(Oa(),a),m(Vx(),a),m(zx(),a),m(lo(),a),m(co(),a),m(Dp(),a),m(dr(),a),m(vr(),a),m(Hx(),a),m(io(),a),m(Op(),a),m(ao(),a),m(Mi(),a),m(Gx(),a),m(wp(),a),m(nt(),a),m(Aa(),a),m(vp(),a),m(Ar(),a),m(Fi(),a),m(mp(),a),m(Yx(),a),m(Wx(),a),m(Qx(),a),m(Fe(),a),m(Xx(),a),m(Kx(),a),m(Jx(),a),m(Zx(),a),m(ed(),a),m(_r(),a),m(td(),a)}(Dn)),Dn}var $i={},h0;function Fp(){if(h0)return $i;h0=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.parseString=d;var a;(function(m){m[m.Normal=0]="Normal",m[m.ReverseVirgule=1]="ReverseVirgule",m[m.Unicode=2]="Unicode"})(a||(a={}));function d(m,y=""){let h=m.slice(y.length),u=a.Normal;y.length&&(h=h.slice(0,-y.length));let r="",o="";for(const t of h)switch(u){case a.Normal:{t==="\\"?u=a.ReverseVirgule:r+=t;break}case a.ReverseVirgule:{let i=t;if(t==="u"){u=a.Unicode,o="";continue}t==="b"?i="\b":t==="f"?i="\f":t==="n"?i=`
|
|
645
|
+
`:t==="r"?i="\r":t==="t"&&(i=" "),r+=i,u=a.Normal;break}case a.Unicode:"ABCDEFabcdef0123456789".includes(t)?(o+=t,o.length===4&&(r+=String.fromCharCode(parseInt(o,16)),u=a.Normal)):u=a.Normal}return r}return $i}var x0;function nd(){if(x0)return Kn;x0=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.Tag=void 0;const a=Bx(),d=kx(),m=Mx(),y=rd(),h=Fp();class u{static tagFrom(c={}){return c instanceof u?c:new u(c)}static id(c){let p=u.ids.get(c);return p===void 0&&(p=u.nextTagId,u.ids.set(c,p),u.nextTagId+=1),p}peek(c=0){const p=" ".repeat(c);let v=`#${u.id(this)}`;if(this.properties===void 0&&this.eq&&typeof this.eq=="string")return v+`=${this.eq}`;if(v+=" {",this.eq&&(typeof this.eq=="string"?v+=`
|
|
646
|
+
${p} =: ${this.eq}`:v+=`
|
|
647
|
+
${p} =: [
|
|
648
|
+
${p} ${this.eq.map(x=>u.tagFrom(x).peek(c+4)).join(`
|
|
649
|
+
${p} `)}
|
|
650
|
+
${p} ]`),this.properties)for(const x in this.properties){const g=u.tagFrom(this.properties[x]);v+=`
|
|
651
|
+
${p} ${x}: ${g.peek(c+2)}`}return v+=`
|
|
652
|
+
${p}}`,v}static fromTagLine(c,p=0,v,...x){return e(c,v,x,p)}static fromTagLines(c,p,...v){const x=[];let g=p;for(let _=0;_<c.length;_++){const A=c[_],E=e(A,g,v,_);g=E.tag,x.push(...E.log)}return{tag:g,log:x}}constructor(c={}){c.eq&&(this.eq=c.eq),c.properties&&(this.properties=c.properties),c.deleted&&(this.deleted=c.deleted),c.prefix&&(this.prefix=c.prefix)}static withPrefix(c){return new u({prefix:c})}tag(...c){return this.find(c)}text(...c){var p;const v=(p=this.find(c))===null||p===void 0?void 0:p.eq;if(typeof v=="string")return v}numeric(...c){var p;const v=(p=this.find(c))===null||p===void 0?void 0:p.eq;if(typeof v=="string"){const x=Number.parseFloat(v);if(!Number.isNaN(x))return x}}bare(...c){const p=this.find(c);if(p!==void 0)return p.properties===void 0||Object.entries(p.properties).length===0}get dict(){const c={};if(this.properties)for(const p in this.properties)c[p]=u.tagFrom(this.properties[p]);return c}array(...c){var p;const v=(p=this.find(c))===null||p===void 0?void 0:p.eq;if(!(v===void 0||typeof v=="string"))return v.map(x=>typeof x=="string"?new u({eq:x}):u.tagFrom(x))}textArray(...c){var p;const v=(p=this.find(c))===null||p===void 0?void 0:p.eq;if(!(v===void 0||typeof v=="string"))return v.reduce((x,g)=>typeof g.eq=="string"?x.concat(g.eq):x,[])}numericArray(...c){var p;const v=(p=this.find(c))===null||p===void 0?void 0:p.eq;if(!(v===void 0||typeof v=="string"))return v.reduce((x,g)=>{if(typeof g.eq=="string"){const _=Number.parseFloat(g.eq);if(!Number.isNaN(_))return x.concat(_)}return x},[])}getProperties(){return this.properties===void 0&&(this.properties={}),this.properties}clone(){return new u(structuredClone(this))}static escapeString(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n")}static escapeProp(c){return c.replace(/\\/g,"\\\\").replace(/`/g,"\\`")}static quoteAndEscape(c,p=!1){return c.match(/^[0-9A-Za-z_]+$/)?c:p?`\`${u.escapeProp(c)}\``:`"${u.escapeString(c)}"`}toString(){var c;let p=(c=this.prefix)!==null&&c!==void 0?c:"# ";function v(_){var A;const E=Object.keys((A=_.properties)!==null&&A!==void 0?A:{});for(let D=0;D<E.length;D++)g(E[D],_.properties[E[D]]),D<E.length-1&&(p+=" ")}function x(_,A=!1){if(_.eq!==void 0)if(A||(p+=" = "),Array.isArray(_.eq)){p+="[";for(let E=0;E<_.eq.length;E++)x(_.eq[E],!0),E!==_.eq.length-1&&(p+=", ");p+="]"}else p+=u.quoteAndEscape(`${_.eq}`);if(_.properties){const E=Object.keys(_.properties);!A&&E.length===1&&!E.some(D=>{var N;return((N=_.properties)!==null&&N!==void 0?N:{})[D].deleted})&&_.eq===void 0?(p+=".",v(_)):((!A||_.eq!==void 0)&&(p+=" "),p+="{ ",v(_),p+=" }")}}function g(_,A){if(A.deleted){p+=`-${u.quoteAndEscape(_,!0)}`;return}p+=u.quoteAndEscape(_,!0),x(A)}return v(this),p+=`
|
|
653
|
+
`,p}find(c){var p;let v=u.tagFrom(this);for(const x of c)if(typeof x=="number"){if(v.eq===void 0||!Array.isArray(v.eq)||v.eq.length<=x)return;v=u.tagFrom(v.eq[x])}else{const g=(p=v.properties)!==null&&p!==void 0?p:{};if(x in g)v=u.tagFrom(g[x]);else return}return v.deleted?void 0:v}has(...c){return this.find(c)!==void 0}set(c,p=null){const v=u.tagFrom(this);let x=v;for(const g of c)if(typeof g=="number"){if(x.eq===void 0||!Array.isArray(x.eq))x.eq=Array.from({length:g+1}).map(_=>({}));else if(x.eq.length<=g){const _=x.eq,A=Array.from({length:g+1}).map((E,D)=>D<_.length?_[D]:{});x.eq=A}x=x.eq[g]}else{const _=x.properties;_===void 0?(x.properties={[g]:{}},x=x.properties[g]):g in _?(x=_[g],x.deleted&&(x.deleted=!1)):(_[g]={},x=_[g])}return p===null?x.eq=void 0:typeof p=="string"?x.eq=p:typeof p=="number"?x.eq=p.toString():Array.isArray(p)&&(x.eq=p.map(g=>({eq:typeof g=="string"?g:g.toString()}))),v}delete(...c){return this.remove(c,!1)}unset(...c){return this.remove(c,!0)}remove(c,p=!1){var v;const x=u.tagFrom(this);let g=x;for(const A of c.slice(0,c.length-1))if(typeof A=="number"){if(g.eq===void 0||!Array.isArray(g.eq)){if(!p)return x;g.eq=Array.from({length:A}).map(E=>({}))}else if(g.eq.length<=A){if(!p)return x;const E=g.eq,D=Array.from({length:A}).map((N,w)=>w<E.length?E[w]:{});g.eq=D}g=g.eq[A]}else{const E=g.properties;if(E===void 0){if(!p)return x;g.properties={[A]:{}},g=g.properties[A]}else if(A in E)g=E[A];else{if(!p)return x;E[A]={},g=E[A]}}const _=c[c.length-1];return typeof _=="string"?g.properties&&_ in g.properties?delete g.properties[_]:p&&((v=g.properties)!==null&&v!==void 0||(g.properties={}),g.properties[_]={deleted:!0}):Array.isArray(g.eq)&&g.eq.splice(_,1),x}}Kn.Tag=u,u.ids=new Map,u.nextTagId=1e3;class r{constructor(c){this.line=c,this.log=[]}syntaxError(c,p,v,x,g,_){const A={code:"tag-parse-syntax-error",message:g,line:this.line,offset:x};this.log.push(A)}semanticError(c,p,v){const x={code:p,message:v,line:this.line,offset:c.start.charPositionInLine};this.log.push(x)}}function o(l){const c=l.buildOn;return c instanceof u?c:new u}function t(l,c){var p,v;let x=l.getProperties();for(const g of c.slice(0,c.length-1)){let _;x[g]===void 0?(_=new u({}),x[g]=_):((p=(v=x[g]).properties)!==null&&p!==void 0||(v.properties={}),_=u.tagFrom(x[g])),x=_.getProperties()}return[c[c.length-1],x]}function i(l){return l.SQ_STRING()||l.DQ_STRING()?(0,h.parseString)(l.text,l.text[0]):l.text}function e(l,c,p,v){if(l[0]==="#"){const P=l.indexOf(" ");P>0?l=l.slice(P):l=""}const x=y.CharStreams.fromString(l),g=new d.MalloyTagLexer(x),_=new y.CommonTokenStream(g),A=new r(v),E=new m.MalloyTagParser(_);E.removeErrorListeners(),E.addErrorListener(A);const D=E.tagLine();return{tag:new s(p,A).tagLineToTag(D,c),log:A.log}}class s extends a.AbstractParseTreeVisitor{constructor(c=[],p){super(),this.scopes=[],this.msgLog=p,this.scopes.unshift(...c)}defaultResult(){return new u}visitString(c){return new u({eq:i(c)})}getPropName(c){return c.identifier().map(p=>p.BARE_STRING()?p.text:(0,h.parseString)(p.text,p.text[0]))}getTags(c,p){for(const v of c)v.buildOn=p,this.visit(v);return p}tagLineToTag(c,p){return p=p?.clone()||new u({}),this.scopes.unshift(p),this.getTags(c.tagSpec(),p),p}visitTagLine(c){throw new Error("INTERNAL: ERROR: Call tagLineToTag, not vistTagLine")}visitProperties(c){return this.getTags(c.tagSpec(),o(c))}visitArrayValue(c){return new u({eq:this.getArray(c)})}getArray(c){return c.arrayElement().map(p=>this.visit(p))}visitArrayElement(c){const p=c.properties(),v=p?this.visitProperties(p):void 0,x=c.string();let g=x?i(x):void 0;const _=c.arrayValue();if(_&&(g=this.getArray(_)),v)return g!==void 0&&(v.eq=g),v;const A=c.reference();return A?this.visitReference(A):new u({eq:g})}visitReference(c){const p=this.getPropName(c.propName());for(const v of this.scopes)if(v.has(p[0])){const x=v.tag(...p);if(x)return x.clone();break}return this.msgLog.semanticError(c,"tag-property-not-found",`Reference to undefined property ${p.join(".")}`),this.defaultResult()}visitTagEq(c){const p=o(c),v=this.getPropName(c.propName()),[x,g]=t(p,v),_=this.visit(c.eqValue()),A=c.properties();if(A)if(A.DOTTY()===void 0){const E=this.visitProperties(A).dict;g[x]={..._,properties:E}}else g[x]={...g[x],..._};else g[x]=_;return p}visitTagReplaceProperties(c){const p=o(c),v=this.getPropName(c.propName()),[x,g]=t(p,v),_=c.properties(),A=this.visitProperties(_);return c.DOTTY()===void 0?g[x]={properties:A.dict}:g[x].properties=A.dict,p}visitTagUpdateProperties(c){const p=o(c),v=this.getPropName(c.propName()),[x,g]=t(p,v),_=c.properties();_.buildOn=u.tagFrom(g[x]);const A=this.visitProperties(_),E=g[x]||new u({}),D={...E.properties,...A.dict};return g[x]={...E,properties:D},p}visitTagDef(c){const p=o(c),v=this.getPropName(c.propName()),[x,g]=t(p,v);return c.MINUS()?g[x]={deleted:!0}:g[x]=new u({}),p}visitTagEmpty(c){const p=c.buildOn;return p.properties={},p}}return Kn}var d0;function id(){return d0||(d0=1,function(a){var d=Ye&&Ye.__createBinding||(Object.create?function(u,r,o,t){t===void 0&&(t=o);var i=Object.getOwnPropertyDescriptor(r,o);(!i||("get"in i?!r.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return r[o]}}),Object.defineProperty(u,t,i)}:function(u,r,o,t){t===void 0&&(t=o),u[t]=r[o]}),m=Ye&&Ye.__setModuleDefault||(Object.create?function(u,r){Object.defineProperty(u,"default",{enumerable:!0,value:r})}:function(u,r){u.default=r}),y=Ye&&Ye.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&d(r,u,o)},h=Ye&&Ye.__importStar||function(){var u=function(r){return u=Object.getOwnPropertyNames||function(o){var t=[];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(t[t.length]=i);return t},u(r)};return function(r){if(r&&r.__esModule)return r;var o={};if(r!=null)for(var t=u(r),i=0;i<t.length;i++)t[i]!=="default"&&d(o,r,t[i]);return m(o,r),o}}();Object.defineProperty(a,"__esModule",{value:!0}),a.ParseUtil=void 0,y(nd(),a),a.ParseUtil=h(Fp())}(Ye)),Ye}var Pn={},Ke={},y0;function Gn(){if(y0)return Ke;y0=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.isChainOp=a,Ke.isStringCondition=d,Ke.isStringFilter=m,Ke.isBooleanFilter=y,Ke.isNumberFilter=h,Ke.isTemporalFilter=u,Ke.isFilterExpression=r,Ke.isFilterable=o;function a(t){return["and","or",","].includes(t)}function d(t){return["starts","ends","contains","="].includes(t.operator)}function m(t){return"operator"in t&&typeof t.operator=="string"&&["starts","ends","contains","=","~","null","empty","and","or",",","()"].includes(t.operator)}function y(t){return"operator"in t&&typeof t.operator=="string"&&["null","true","false","false_or_null"].includes(t.operator)}function h(t){return"operator"in t&&typeof t.operator=="string"&&["range","<=",">=","!=","=",">","<","and","or","()","null"].includes(t.operator)}function u(t){return"operator"in t&&typeof t.operator=="string"&&["literal","before","after","to","for","in","and","or","in_last","this","last","next","()","null"].includes(t.operator)}function r(t){return!!t&&"operator"in t}function o(t){return["string","number","boolean","timestamp","date"].includes(t)}return Ke}var vi={},m0;function od(){return m0||(m0=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.BooleanFilterExpression=void 0,vi.BooleanFilterExpression={parse(a){var d;if(a.match(/^\s*$/))return{parsed:null,log:[]};const m={parsed:null,log:[]};let y=a.toLowerCase().trim().replace(/\s\s+/," "),h=!1;if(y.startsWith("not ")&&(h=!0,y=y.slice(4)),y==="true")m.parsed={operator:"true"};else if(y==="false")m.parsed={operator:"false_or_null"};else if(y==="=false")m.parsed={operator:"false"};else if(y==="null")m.parsed={operator:"null"};else if(y==="not null")m.parsed={operator:"null",not:!0};else{const u=a.match(/[^\s]/),r=u&&(d=u.index)!==null&&d!==void 0?d:0;m.log=[{message:"Illegal boolean filter. Must be one of true,false,=false,null,not null",severity:"error",startIndex:r,endIndex:r+a.length-1}]}return h&&m.parsed&&(m.parsed.not=!0),m},unparse(a){if(a===null)return"";const d=a.not?"not ":"";switch(a.operator){case"true":case"null":return d+a.operator;case"false_or_null":return d+"false";case"false":return d+"=false"}}}),vi}var Je={},Wi={exports:{}},sd=Wi.exports,g0;function Pa(){return g0||(g0=1,function(a){(function(d,m){a.exports?a.exports=m():d.nearley=m()})(sd,function(){function d(i,e,s){return this.id=++d.highestId,this.name=i,this.symbols=e,this.postprocess=s,this}d.highestId=0,d.prototype.toString=function(i){var e=typeof i>"u"?this.symbols.map(t).join(" "):this.symbols.slice(0,i).map(t).join(" ")+" ● "+this.symbols.slice(i).map(t).join(" ");return this.name+" → "+e};function m(i,e,s,l){this.rule=i,this.dot=e,this.reference=s,this.data=[],this.wantedBy=l,this.isComplete=this.dot===i.symbols.length}m.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},m.prototype.nextState=function(i){var e=new m(this.rule,this.dot+1,this.reference,this.wantedBy);return e.left=this,e.right=i,e.isComplete&&(e.data=e.build(),e.right=void 0),e},m.prototype.build=function(){var i=[],e=this;do i.push(e.right.data),e=e.left;while(e.left);return i.reverse(),i},m.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,r.fail))};function y(i,e){this.grammar=i,this.index=e,this.states=[],this.wants={},this.scannable=[],this.completed={}}y.prototype.process=function(i){for(var e=this.states,s=this.wants,l=this.completed,c=0;c<e.length;c++){var p=e[c];if(p.isComplete){if(p.finish(),p.data!==r.fail){for(var v=p.wantedBy,x=v.length;x--;){var g=v[x];this.complete(g,p)}if(p.reference===this.index){var _=p.rule.name;(this.completed[_]=this.completed[_]||[]).push(p)}}}else{var _=p.rule.symbols[p.dot];if(typeof _!="string"){this.scannable.push(p);continue}if(s[_]){if(s[_].push(p),l.hasOwnProperty(_))for(var A=l[_],x=0;x<A.length;x++){var E=A[x];this.complete(p,E)}}else s[_]=[p],this.predict(_)}}},y.prototype.predict=function(i){for(var e=this.grammar.byName[i]||[],s=0;s<e.length;s++){var l=e[s],c=this.wants[i],p=new m(l,0,this.index,c);this.states.push(p)}},y.prototype.complete=function(i,e){var s=i.nextState(e);this.states.push(s)};function h(i,e){this.rules=i,this.start=e||this.rules[0].name;var s=this.byName={};this.rules.forEach(function(l){s.hasOwnProperty(l.name)||(s[l.name]=[]),s[l.name].push(l)})}h.fromCompiled=function(l,e){var s=l.Lexer;l.ParserStart&&(e=l.ParserStart,l=l.ParserRules);var l=l.map(function(p){return new d(p.name,p.symbols,p.postprocess)}),c=new h(l,e);return c.lexer=s,c};function u(){this.reset("")}u.prototype.reset=function(i,e){this.buffer=i,this.index=0,this.line=e?e.line:1,this.lastLineBreak=e?-e.col:0},u.prototype.next=function(){if(this.index<this.buffer.length){var i=this.buffer[this.index++];return i===`
|
|
654
|
+
`&&(this.line+=1,this.lastLineBreak=this.index),{value:i}}},u.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},u.prototype.formatError=function(i,e){var s=this.buffer;if(typeof s=="string"){var l=s.split(`
|
|
655
|
+
`).slice(Math.max(0,this.line-5),this.line),c=s.indexOf(`
|
|
656
|
+
`,this.index);c===-1&&(c=s.length);var p=this.index-this.lastLineBreak,v=String(this.line).length;return e+=" at line "+this.line+" col "+p+`:
|
|
657
|
+
|
|
658
|
+
`,e+=l.map(function(g,_){return x(this.line-l.length+_+1,v)+" "+g},this).join(`
|
|
659
|
+
`),e+=`
|
|
660
|
+
`+x("",v+p)+`^
|
|
661
|
+
`,e}else return e+" at index "+(this.index-1);function x(g,_){var A=String(g);return Array(_-A.length+1).join(" ")+A}};function r(i,e,s){if(i instanceof h)var l=i,s=e;else var l=h.fromCompiled(i,e);this.grammar=l,this.options={keepHistory:!1,lexer:l.lexer||new u};for(var c in s||{})this.options[c]=s[c];this.lexer=this.options.lexer,this.lexerState=void 0;var p=new y(l,0);this.table=[p],p.wants[l.start]=[],p.predict(l.start),p.process(),this.current=0}r.fail={},r.prototype.feed=function(i){var e=this.lexer;e.reset(i,this.lexerState);for(var s;;){try{if(s=e.next(),!s)break}catch(w){var v=new y(this.grammar,this.current+1);this.table.push(v);var l=new Error(this.reportLexerError(w));throw l.offset=this.current,l.token=w.token,l}var c=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var p=this.current+1,v=new y(this.grammar,p);this.table.push(v);for(var x=s.text!==void 0?s.text:s.value,g=e.constructor===u?s.value:s,_=c.scannable,A=_.length;A--;){var E=_[A],D=E.rule.symbols[E.dot];if(D.test?D.test(g):D.type?D.type===s.type:D.literal===x){var N=E.nextState({data:g,token:s,isToken:!0,reference:p-1});v.states.push(N)}}if(v.process(),v.states.length===0){var l=new Error(this.reportError(s));throw l.offset=this.current,l.token=s,l}this.options.keepHistory&&(c.lexerState=e.save()),this.current++}return c&&(this.lexerState=e.save()),this.results=this.finish(),this},r.prototype.reportLexerError=function(i){var e,s,l=i.token;return l?(e="input "+JSON.stringify(l.text[0])+" (lexer error)",s=this.lexer.formatError(l,"Syntax error")):(e="input (lexer error)",s=i.message),this.reportErrorCommon(s,e)},r.prototype.reportError=function(i){var e=(i.type?i.type+" token: ":"")+JSON.stringify(i.value!==void 0?i.value:i),s=this.lexer.formatError(i,"Syntax error");return this.reportErrorCommon(s,e)},r.prototype.reportErrorCommon=function(i,e){var s=[];s.push(i);var l=this.table.length-2,c=this.table[l],p=c.states.filter(function(x){var g=x.rule.symbols[x.dot];return g&&typeof g!="string"});if(p.length===0)s.push("Unexpected "+e+`. I did not expect any more input. Here is the state of my parse table:
|
|
662
|
+
`),this.displayStateStack(c.states,s);else{s.push("Unexpected "+e+`. Instead, I was expecting to see one of the following:
|
|
663
|
+
`);var v=p.map(function(x){return this.buildFirstStateStack(x,[])||[x]},this);v.forEach(function(x){var g=x[0],_=g.rule.symbols[g.dot],A=this.getSymbolDisplay(_);s.push("A "+A+" based on:"),this.displayStateStack(x,s)},this)}return s.push(""),s.join(`
|
|
664
|
+
`)},r.prototype.displayStateStack=function(i,e){for(var s,l=0,c=0;c<i.length;c++){var p=i[c],v=p.rule.toString(p.dot);v===s?l++:(l>0&&e.push(" ^ "+l+" more lines identical to this"),l=0,e.push(" "+v)),s=v}},r.prototype.getSymbolDisplay=function(i){return o(i)},r.prototype.buildFirstStateStack=function(i,e){if(e.indexOf(i)!==-1)return null;if(i.wantedBy.length===0)return[i];var s=i.wantedBy[0],l=[i].concat(e),c=this.buildFirstStateStack(s,l);return c===null?null:[i].concat(c)},r.prototype.save=function(){var i=this.table[this.current];return i.lexerState=this.lexerState,i},r.prototype.restore=function(i){var e=i.index;this.current=e,this.table[e]=i,this.table.splice(e+1),this.lexerState=i.lexerState,this.results=this.finish()},r.prototype.rewind=function(i){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[i])},r.prototype.finish=function(){var i=[],e=this.grammar.start,s=this.table[this.table.length-1];return s.states.forEach(function(l){l.rule.name===e&&l.dot===l.rule.symbols.length&&l.reference===0&&l.data!==r.fail&&i.push(l)}),i.map(function(l){return l.data})};function o(i){var e=typeof i;if(e==="string")return i;if(e==="object"){if(i.literal)return JSON.stringify(i.literal);if(i instanceof RegExp)return"character matching "+i;if(i.type)return i.type+" token";if(i.test)return"token matching "+String(i.test);throw new Error("Unknown symbol type: "+i)}}function t(i){var e=typeof i;if(e==="string")return i;if(e==="object"){if(i.literal)return JSON.stringify(i.literal);if(i instanceof RegExp)return i.toString();if(i.type)return"%"+i.type;if(i.test)return"<"+String(i.test)+">";throw new Error("Unknown symbol type: "+i)}}return{Parser:r,Grammar:h,Rule:d}})}(Wi)),Wi.exports}var Bn={},Qi={exports:{}},ad=Qi.exports,_0;function Fa(){return _0||(_0=1,function(a){(function(d,m){a.exports?a.exports=m():d.moo=m()})(ad,function(){var d=Object.prototype.hasOwnProperty,m=Object.prototype.toString,y=typeof new RegExp().sticky=="boolean";function h(L){return L&&m.call(L)==="[object RegExp]"}function u(L){return L&&typeof L=="object"&&!h(L)&&!Array.isArray(L)}function r(L){return L.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function o(L){var q=new RegExp("|"+L);return q.exec("").length-1}function t(L){return"("+L+")"}function i(L){if(!L.length)return"(?!)";var q=L.map(function(W){return"(?:"+W+")"}).join("|");return"(?:"+q+")"}function e(L){if(typeof L=="string")return"(?:"+r(L)+")";if(h(L)){if(L.ignoreCase)throw new Error("RegExp /i flag not allowed");if(L.global)throw new Error("RegExp /g flag is implied");if(L.sticky)throw new Error("RegExp /y flag is implied");if(L.multiline)throw new Error("RegExp /m flag is implied");return L.source}else throw new Error("Not a pattern: "+L)}function s(L,q){return L.length>q?L:Array(q-L.length+1).join(" ")+L}function l(L,q){for(var W=L.length,Z=0;;){var I=L.lastIndexOf(`
|
|
665
|
+
`,W-1);if(I===-1||(Z++,W=I,Z===q)||W===0)break}var Q=Z<q?0:W+1;return L.substring(Q).split(`
|
|
666
|
+
`)}function c(L){for(var q=Object.getOwnPropertyNames(L),W=[],Z=0;Z<q.length;Z++){var I=q[Z],Q=L[I],re=[].concat(Q);if(I==="include"){for(var fe=0;fe<re.length;fe++)W.push({include:re[fe]});continue}var oe=[];re.forEach(function(J){u(J)?(oe.length&&W.push(v(I,oe)),W.push(v(I,J)),oe=[]):oe.push(J)}),oe.length&&W.push(v(I,oe))}return W}function p(L){for(var q=[],W=0;W<L.length;W++){var Z=L[W];if(Z.include){for(var I=[].concat(Z.include),Q=0;Q<I.length;Q++)q.push({include:I[Q]});continue}if(!Z.type)throw new Error("Rule has no type: "+JSON.stringify(Z));q.push(v(Z.type,Z))}return q}function v(L,q){if(u(q)||(q={match:q}),q.include)throw new Error("Matching rules cannot also include states");var W={defaultType:L,lineBreaks:!!q.error||!!q.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var Z in q)d.call(q,Z)&&(W[Z]=q[Z]);if(typeof W.type=="string"&&L!==W.type)throw new Error("Type transform cannot be a string (type '"+W.type+"' for token '"+L+"')");var I=W.match;return W.match=Array.isArray(I)?I:I?[I]:[],W.match.sort(function(Q,re){return h(Q)&&h(re)?0:h(re)?-1:h(Q)?1:re.length-Q.length}),W}function x(L){return Array.isArray(L)?p(L):c(L)}var g=v("error",{lineBreaks:!0,shouldThrow:!0});function _(L,q){for(var W=null,Z=Object.create(null),I=!0,Q=null,re=[],fe=[],oe=0;oe<L.length;oe++)L[oe].fallback&&(I=!1);for(var oe=0;oe<L.length;oe++){var J=L[oe];if(J.include)throw new Error("Inheritance is not allowed in stateless lexers");if(J.error||J.fallback){if(W)throw!J.fallback==!W.fallback?new Error("Multiple "+(J.fallback?"fallback":"error")+" rules not allowed (for token '"+J.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+J.defaultType+"')");W=J}var te=J.match.slice();if(I)for(;te.length&&typeof te[0]=="string"&&te[0].length===1;){var pe=te.shift();Z[pe.charCodeAt(0)]=J}if(J.pop||J.push||J.next){if(!q)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+J.defaultType+"')");if(J.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+J.defaultType+"')")}if(te.length!==0){I=!1,re.push(J);for(var O=0;O<te.length;O++){var T=te[O];if(h(T)){if(Q===null)Q=T.unicode;else if(Q!==T.unicode&&J.fallback===!1)throw new Error("If one rule is /u then all must be")}}var C=i(te.map(e)),F=new RegExp(C);if(F.test(""))throw new Error("RegExp matches empty string: "+F);var j=o(C);if(j>0)throw new Error("RegExp has capture groups: "+F+`
|
|
667
|
+
Use (?: … ) instead`);if(!J.lineBreaks&&F.test(`
|
|
668
|
+
`))throw new Error("Rule should declare lineBreaks: "+F);fe.push(t(C))}}var b=W&&W.fallback,R=y&&!b?"ym":"gm",k=y||b?"":"|";Q===!0&&(R+="u");var V=new RegExp(i(fe)+k,R);return{regexp:V,groups:re,fast:Z,error:W||g}}function A(L){var q=_(x(L));return new w({start:q},"start")}function E(L,q,W){var Z=L&&(L.push||L.next);if(Z&&!W[Z])throw new Error("Missing state '"+Z+"' (in token '"+L.defaultType+"' of state '"+q+"')");if(L&&L.pop&&+L.pop!=1)throw new Error("pop must be 1 (in token '"+L.defaultType+"' of state '"+q+"')")}function D(L,q){var W=L.$all?x(L.$all):[];delete L.$all;var Z=Object.getOwnPropertyNames(L);q||(q=Z[0]);for(var I=Object.create(null),Q=0;Q<Z.length;Q++){var re=Z[Q];I[re]=x(L[re]).concat(W)}for(var Q=0;Q<Z.length;Q++)for(var re=Z[Q],fe=I[re],oe=Object.create(null),J=0;J<fe.length;J++){var te=fe[J];if(te.include){var pe=[J,1];if(te.include!==re&&!oe[te.include]){oe[te.include]=!0;var O=I[te.include];if(!O)throw new Error("Cannot include nonexistent state '"+te.include+"' (in state '"+re+"')");for(var T=0;T<O.length;T++){var C=O[T];fe.indexOf(C)===-1&&pe.push(C)}}fe.splice.apply(fe,pe),J--}}for(var F=Object.create(null),Q=0;Q<Z.length;Q++){var re=Z[Q];F[re]=_(I[re],!0)}for(var Q=0;Q<Z.length;Q++){for(var j=Z[Q],b=F[j],R=b.groups,J=0;J<R.length;J++)E(R[J],j,F);for(var k=Object.getOwnPropertyNames(b.fast),J=0;J<k.length;J++)E(b.fast[k[J]],j,F)}return new w(F,q)}function N(L){for(var q=typeof Map<"u",W=q?new Map:Object.create(null),Z=Object.getOwnPropertyNames(L),I=0;I<Z.length;I++){var Q=Z[I],re=L[Q],fe=Array.isArray(re)?re:[re];fe.forEach(function(oe){if(typeof oe!="string")throw new Error("keyword must be string (in keyword '"+Q+"')");q?W.set(oe,Q):W[oe]=Q})}return function(oe){return q?W.get(oe):W[oe]}}var w=function(L,q){this.startState=q,this.states=L,this.buffer="",this.stack=[],this.reset()};w.prototype.reset=function(L,q){return this.buffer=L||"",this.index=0,this.line=q?q.line:1,this.col=q?q.col:1,this.queuedToken=q?q.queuedToken:null,this.queuedText=q?q.queuedText:"",this.queuedThrow=q?q.queuedThrow:null,this.setState(q?q.state:this.startState),this.stack=q&&q.stack?q.stack.slice():[],this},w.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},w.prototype.setState=function(L){if(!(!L||this.state===L)){this.state=L;var q=this.states[L];this.groups=q.groups,this.error=q.error,this.re=q.regexp,this.fast=q.fast}},w.prototype.popState=function(){this.setState(this.stack.pop())},w.prototype.pushState=function(L){this.stack.push(this.state),this.setState(L)};var P=y?function(L,q){return L.exec(q)}:function(L,q){var W=L.exec(q);return W[0].length===0?null:W};w.prototype._getGroup=function(L){for(var q=this.groups.length,W=0;W<q;W++)if(L[W+1]!==void 0)return this.groups[W];throw new Error("Cannot find token type for matched text")};function $(){return this.value}if(w.prototype.next=function(){var L=this.index;if(this.queuedGroup){var q=this._token(this.queuedGroup,this.queuedText,L);return this.queuedGroup=null,this.queuedText="",q}var W=this.buffer;if(L!==W.length){var re=this.fast[W.charCodeAt(L)];if(re)return this._token(re,W.charAt(L),L);var Z=this.re;Z.lastIndex=L;var I=P(Z,W),Q=this.error;if(I==null)return this._token(Q,W.slice(L,W.length),L);var re=this._getGroup(I),fe=I[0];return Q.fallback&&I.index!==L?(this.queuedGroup=re,this.queuedText=fe,this._token(Q,W.slice(L,I.index),L)):this._token(re,fe,L)}},w.prototype._token=function(L,q,W){var Z=0;if(L.lineBreaks){var I=/\n/g,Q=1;if(q===`
|
|
669
|
+
`)Z=1;else for(;I.exec(q);)Z++,Q=I.lastIndex}var re={type:typeof L.type=="function"&&L.type(q)||L.defaultType,value:typeof L.value=="function"?L.value(q):q,text:q,toString:$,offset:W,lineBreaks:Z,line:this.line,col:this.col},fe=q.length;if(this.index+=fe,this.line+=Z,Z!==0?this.col=fe-Q+1:this.col+=fe,L.shouldThrow){var oe=new Error(this.formatError(re,"invalid syntax"));throw oe}return L.pop?this.popState():L.push?this.pushState(L.push):L.next&&this.setState(L.next),re},typeof Symbol<"u"&&Symbol.iterator){var Y=function(L){this.lexer=L};Y.prototype.next=function(){var L=this.lexer.next();return{value:L,done:!L}},Y.prototype[Symbol.iterator]=function(){return this},w.prototype[Symbol.iterator]=function(){return new Y(this)}}return w.prototype.formatError=function(L,q){if(L==null)var W=this.buffer.slice(this.index),L={text:W,offset:this.index,lineBreaks:W.indexOf(`
|
|
670
|
+
`)===-1?0:1,line:this.line,col:this.col};var Z=2,I=Math.max(L.line-Z,1),Q=L.line+Z,re=String(Q).length,fe=l(this.buffer,this.line-L.line+Z+1).slice(0,5),oe=[];oe.push(q+" at line "+L.line+" col "+L.col+":"),oe.push("");for(var J=0;J<fe.length;J++){var te=fe[J],pe=I+J;oe.push(s(String(pe),re)+" "+te),pe===L.line&&oe.push(s("",re+L.col+1)+"^")}return oe.join(`
|
|
671
|
+
`)},w.prototype.clone=function(){return new w(this.states,this.state)},w.prototype.has=function(L){return!0},{compile:A,states:D,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:N}})}(Qi)),Qi.exports}var ke={},A0;function fo(){if(A0)return ke;A0=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.maybeNot=d,ke.unescape=m,ke.escape=y,ke.matchOp=u,ke.conjoin=o,ke.joinNumbers=t,ke.mkRange=i,ke.mkValues=e,ke.numNot=s,ke.temporalNot=l,ke.joinTemporal=c,ke.timeLiteral=p,ke.mkUnits=v;const a=Gn();function d(x){const[g,_]=x;return g&&_&&(0,a.isStringFilter)(_)?{..._,not:!0}:_}function m(x){return x.replace(/\\(.)/g,"$1")}function y(x){const g=x.toLowerCase();return g==="null"||g==="empty"?"\\"+x:x.replace(/([,; |()\\%_-])/g,"\\$1")}function h(x){let g=!1,_=!1,A=0,E=!1;const D=x.length;for(let N=0;N<D;N+=1){const w=x[N];if(w===" "||w===" "){A+=1;continue}A=0,w==="%"?(E=!0,N===0&&(g=!0),_=!0):(_=!1,w==="\\"?N+=1:w==="_"&&(E=!0))}return{hasLike:E,percentEnd:_&&D>1,percentStart:g&&D>1,endSpace:A}}function u(x){let g=x.trimStart();const{hasLike:_,percentEnd:A,percentStart:E,endSpace:D}=h(g);if(D>0&&(g=g.slice(0,-D)),_){if(E&&A){const N=g.slice(1,-1);if(!h(N).hasLike&&N.length>0)return{operator:"contains",values:[m(N)]}}else if(A){const N=g.slice(0,-1);if(!h(N).hasLike)return{operator:"starts",values:[m(N)]}}else if(E){const N=g.slice(1);if(!h(N).hasLike)return{operator:"ends",values:[m(N)]}}return{operator:"~",escaped_values:[g]}}return g.toLowerCase()==="null"?{operator:"null"}:g.toLowerCase()==="empty"?{operator:"empty"}:{operator:"=",values:[m(g)]}}function r(x,g){var _,A;return x.operator===g.operator&&((_=x.not)!==null&&_!==void 0?_:!1)===((A=g.not)!==null&&A!==void 0?A:!1)}function o(x,g,_){if(g=g.toLowerCase(),(0,a.isStringFilter)(x)&&(0,a.isStringFilter)(_)){if(g===","){if(x.operator==="~"&&r(x,_))return{...x,escaped_values:[...x.escaped_values,..._.escaped_values]};if((0,a.isStringCondition)(x)&&r(x,_))return{...x,values:[...x.values,..._.values]}}const A=g===","?",":g==="|"?"or":g===";"?"and":void 0;if(A)return x.operator===A?{...x,members:[...x.members,_]}:{operator:A,members:[x,_]}}return null}function t(x,g,_){if(g=g.toLowerCase(),(0,a.isNumberFilter)(x)&&(0,a.isNumberFilter)(_)){if(g==="or"&&x.operator==="="&&r(x,_)){const A={operator:"=",values:[...x.values,..._.values]};return x.not&&(A.not=!0),A}if(g==="and"||g==="or")return x.operator===g?{...x,members:[...x.members,_]}:{operator:g,members:[x,_]}}return null}function i(x,g,_,A){return{operator:"range",startValue:g,startOperator:x==="("?">":">=",endValue:_,endOperator:A===")"?"<":"<="}}function e(x,g){return{values:[x,...g]}}function s(x,g){return(0,a.isNumberFilter)(x)&&g?x.operator==="="?{operator:"!=",values:x.values}:x.operator==="!="?{operator:"=",values:x.values}:{...x,not:!0}:x}function l(x,g){return(0,a.isTemporalFilter)(x)&&g?{...x,not:!0}:x}function c(x,g,_){return g=g.toLowerCase(),(0,a.isTemporalFilter)(x)&&(0,a.isTemporalFilter)(_)&&(g==="and"||g==="or")?x.operator===g?{...x,members:[...x.members,_]}:{operator:g,members:[x,_]}:null}function p(x,g){const _={moment:"literal",literal:x};return g&&(_.units=g),_}function v(x){switch(x.toLowerCase()){case"second":case"seconds":return"second";case"minute":case"minutes":return"minute";case"hour":case"hours":return"hour";case"day":case"days":return"day";case"week":case"weeks":return"week";case"month":case"months":return"month";case"quarter":case"quarters":return"quarter";case"year":case"years":return"year"}}return ke}var v0;function ud(){if(v0)return Bn;v0=1;var a=Bn&&Bn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Bn,"__esModule",{value:!0});function d(t){return t[0]}const m=a(Fa()),y=fo(),h=m.default.keywords({AND:"and",OR:"or",NOT:"not",NULL_KW:"null",TO:"to"}),u=m.default.compile({WS:/[ \t]+/,id:{match:/[a-zA-Z]+/,type:t=>h(t.toLowerCase())},oparen:"(",cparen:")",obrack:"[",cbrack:"]",comma:",",op:/<=|>=|<|>/,ne:"!=",eq:"=",float:/-?(?:\d+)?\.\d+(?:[Ee][+-]?\d+)?/,numberE:/-?\d+[Ee][+-]?\d+/,integer:/-?\d+/}),r=u.next;u.next=(t=>()=>{for(;;){const i=t.call(u);if(i===void 0||i.type!=="WS")return i}})(r);const o={Lexer:u,ParserRules:[{name:"numberFilter",symbols:["numberFilter","conjunction","numberUnary"],postprocess:([t,i,e])=>(0,y.joinNumbers)(t,i[0].text,e)},{name:"numberFilter",symbols:["numberUnary"],postprocess:t=>t[0]},{name:"numberUnary$ebnf$1",symbols:[u.has("NOT")?{type:"NOT"}:NOT],postprocess:d},{name:"numberUnary$ebnf$1",symbols:[],postprocess:()=>null},{name:"numberUnary",symbols:["numberUnary$ebnf$1","clause"],postprocess:([t,i])=>(0,y.numNot)(i,t)},{name:"clause",symbols:[u.has("NULL_KW")?{type:"NULL_KW"}:NULL_KW],postprocess:()=>({operator:"null"})},{name:"clause$ebnf$1",symbols:[]},{name:"clause$ebnf$1",symbols:["clause$ebnf$1","numberList"],postprocess:t=>t[0].concat([t[1]])},{name:"clause",symbols:["N","clause$ebnf$1"],postprocess:([t,i])=>({operator:"=",...(0,y.mkValues)(t,i)})},{name:"clause$ebnf$2",symbols:[]},{name:"clause$ebnf$2",symbols:["clause$ebnf$2","numberList"],postprocess:t=>t[0].concat([t[1]])},{name:"clause",symbols:[u.has("eq")?{type:"eq"}:eq,"N","clause$ebnf$2"],postprocess:([t,i,e])=>({operator:"=",...(0,y.mkValues)(i,e)})},{name:"clause$ebnf$3",symbols:[]},{name:"clause$ebnf$3",symbols:["clause$ebnf$3","numberList"],postprocess:t=>t[0].concat([t[1]])},{name:"clause",symbols:[u.has("ne")?{type:"ne"}:ne,"N","clause$ebnf$3"],postprocess:([t,i,e])=>({operator:"!=",...(0,y.mkValues)(i,e)})},{name:"clause",symbols:[u.has("op")?{type:"op"}:op,"N"],postprocess:([t,i])=>({operator:t.text,values:[i]})},{name:"clause",symbols:[u.has("oparen")?{type:"oparen"}:oparen,"numberFilter",u.has("cparen")?{type:"cparen"}:cparen],postprocess:([t,i,e])=>({operator:"()",expr:i})},{name:"clause",symbols:["openInterval","N",u.has("TO")?{type:"TO"}:TO,"N","closeInterval"],postprocess:([t,i,e,s,l])=>(0,y.mkRange)(t[0].text,i,s,l[0].text)},{name:"numberList",symbols:[u.has("comma")?{type:"comma"}:comma,"N"],postprocess:([t,i])=>i},{name:"closeInterval",symbols:[u.has("cbrack")?{type:"cbrack"}:cbrack]},{name:"closeInterval",symbols:[u.has("cparen")?{type:"cparen"}:cparen]},{name:"openInterval",symbols:[u.has("obrack")?{type:"obrack"}:obrack]},{name:"openInterval",symbols:[u.has("oparen")?{type:"oparen"}:oparen]},{name:"N$subexpression$1",symbols:[u.has("float")?{type:"float"}:float]},{name:"N$subexpression$1",symbols:[u.has("numberE")?{type:"numberE"}:numberE]},{name:"N$subexpression$1",symbols:[u.has("integer")?{type:"integer"}:integer]},{name:"N",symbols:["N$subexpression$1"],postprocess:([t])=>t[0].text},{name:"conjunction",symbols:[u.has("OR")?{type:"OR"}:OR]},{name:"conjunction",symbols:[u.has("AND")?{type:"AND"}:AND]}],ParserStart:"numberFilter"};return Bn.default=o,Bn}var Ui={},E0;function Ia(){if(E0)return Ui;E0=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.run_parser=d;const a=Gn();function d(m,y){try{y.feed(m);const u=y.finish()[0];return(0,a.isFilterExpression)(u)?{parsed:u,log:[]}:{parsed:null,log:[]}}catch(h){let u=h.message,r=1,o=m.length;if(h.token){const t=h.token;r=t.col,o=t.text.length;const e=h.message.match(/(?<=A ).*(?= based on:)/g).map(s=>s.replace(/\s+token/i,""));u=`Unexpected ${t.type} token "${t.value}"`,e&&e.length&&(u+=` Tokens expected: ${[...new Set(e)]}`)}return{parsed:null,log:[{message:u,startIndex:r-1,endIndex:r-1+o-1,severity:"error"}]}}}return Ui}var S0;function ld(){return S0||(S0=1,function(a){var d=Je&&Je.__createBinding||(Object.create?function(i,e,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(e,s);(!c||("get"in c?!e.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(i,l,c)}:function(i,e,s,l){l===void 0&&(l=s),i[l]=e[s]}),m=Je&&Je.__setModuleDefault||(Object.create?function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}:function(i,e){i.default=e}),y=Je&&Je.__importStar||function(){var i=function(e){return i=Object.getOwnPropertyNames||function(s){var l=[];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(l[l.length]=c);return l},i(e)};return function(e){if(e&&e.__esModule)return e;var s={};if(e!=null)for(var l=i(e),c=0;c<l.length;c++)l[c]!=="default"&&d(s,e,l[c]);return m(s,e),s}}(),h=Je&&Je.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(a,"__esModule",{value:!0}),a.NumberFilterExpression=void 0;const u=Gn(),r=y(Pa()),o=h(ud()),t=Ia();a.NumberFilterExpression={parse(i){if(i.match(/^\s*$/))return{parsed:null,log:[]};const e=new r.Parser(r.Grammar.fromCompiled(o.default)),s=(0,t.run_parser)(i,e);return s.parsed&&(0,u.isNumberFilter)(s.parsed)?{parsed:s.parsed,log:[]}:{parsed:null,log:s.log}},unparse(i){if(i===null)return"";switch(i.operator){case"=":return i.values.join(", ");case"!=":return"!= "+i.values.join(", ");case">":case"<":case"<=":case">=":return i.not?i.values.map(e=>i.operator==="="?`not ${e}`:`not ${i.operator} ${e}`).join(", "):i.values.map(e=>`${i.operator} ${e}`).join(", ");case"range":{const e=i.startOperator===">"?"(":"[",s=i.endOperator==="<"?")":"]",l=`${e}${i.startValue} to ${i.endValue}${s}`;return i.not?`not ${l}`:l}case"null":return i.not?"not null":"null";case"and":case"or":return i.members.map(e=>a.NumberFilterExpression.unparse(e)).join(` ${i.operator} `);case"()":{const e="("+a.NumberFilterExpression.unparse(i.expr)+")";return i.not?"not "+e:e}}return`no unparse for ${JSON.stringify(i)}`}}}(Je)),Je}var Ze={},kn={},T0;function cd(){if(T0)return kn;T0=1;var a=kn&&kn.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(kn,"__esModule",{value:!0});function d(o){return o[0]}const m=a(Fa()),y=fo(),h=m.default.compile({WS:/[ \t]+/,comma:",",semi:";",or:"|",open:"(",close:")",minus:"-",matchStr:/(?:\\[^\n]|[^\n,;()|])+/}),u=h.next;h.next=(o=>()=>{for(;;){const t=o.call(h);if(t==null||t.type!=="WS")return t}})(u);const r={Lexer:h,ParserRules:[{name:"stringFilter",symbols:["stringFilter","conjunction","sfUnary"],postprocess:([o,t,i])=>(0,y.conjoin)(o,t[0].text,i)},{name:"stringFilter",symbols:["sfUnary"],postprocess:o=>o[0]},{name:"sfUnary$ebnf$1",symbols:[h.has("minus")?{type:"minus"}:minus],postprocess:d},{name:"sfUnary$ebnf$1",symbols:[],postprocess:()=>null},{name:"sfUnary",symbols:["sfUnary$ebnf$1","clause"],postprocess:o=>(0,y.maybeNot)(o)},{name:"parens",symbols:[h.has("open")?{type:"open"}:open,"stringFilter",h.has("close")?{type:"close"}:close],postprocess:([o,t,i])=>({operator:"()",expr:t})},{name:"clause",symbols:[h.has("matchStr")?{type:"matchStr"}:matchStr],postprocess:([o])=>(0,y.matchOp)(o.text)},{name:"clause",symbols:["parens"],postprocess:o=>o[0]},{name:"conjunction",symbols:[h.has("comma")?{type:"comma"}:comma]},{name:"conjunction",symbols:[h.has("semi")?{type:"semi"}:semi]},{name:"conjunction",symbols:[h.has("or")?{type:"or"}:or]}],ParserStart:"stringFilter"};return kn.default=r,kn}var b0;function fd(){return b0||(b0=1,function(a){var d=Ze&&Ze.__createBinding||(Object.create?function(e,s,l,c){c===void 0&&(c=l);var p=Object.getOwnPropertyDescriptor(s,l);(!p||("get"in p?!s.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return s[l]}}),Object.defineProperty(e,c,p)}:function(e,s,l,c){c===void 0&&(c=l),e[c]=s[l]}),m=Ze&&Ze.__setModuleDefault||(Object.create?function(e,s){Object.defineProperty(e,"default",{enumerable:!0,value:s})}:function(e,s){e.default=s}),y=Ze&&Ze.__importStar||function(){var e=function(s){return e=Object.getOwnPropertyNames||function(l){var c=[];for(var p in l)Object.prototype.hasOwnProperty.call(l,p)&&(c[c.length]=p);return c},e(s)};return function(s){if(s&&s.__esModule)return s;var l={};if(s!=null)for(var c=e(s),p=0;p<c.length;p++)c[p]!=="default"&&d(l,s,c[p]);return m(l,s),l}}(),h=Ze&&Ze.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.StringFilterExpression=void 0;const u=Gn(),r=y(Pa()),o=h(cd()),t=fo(),i=Ia();a.StringFilterExpression={parse(e){if(e.match(/^\s*$/))return{parsed:null,log:[]};const s=new r.Parser(r.Grammar.fromCompiled(o.default)),l=(0,i.run_parser)(e,s);return l.parsed&&(0,u.isStringFilter)(l.parsed)?{parsed:l.parsed,log:[]}:{parsed:null,log:l.log}},unparse(e){if(e===null)return"";switch(e.operator){case"=":return e.not?e.values.map(s=>"-"+(0,t.escape)(s)).join(", "):e.values.map(s=>(0,t.escape)(s)).join(", ");case"~":return e.not?e.escaped_values.map(s=>"-"+s).join(", "):e.escaped_values.join(", ");case"starts":return e.not?e.values.map(s=>"-"+(0,t.escape)(s)+"%").join(", "):e.values.map(s=>(0,t.escape)(s)+"%").join(", ");case"ends":return e.not?e.values.map(s=>"-%"+(0,t.escape)(s)).join(", "):e.values.map(s=>"%"+(0,t.escape)(s)).join(", ");case"contains":return e.not?e.values.map(s=>"-%"+(0,t.escape)(s)+"%").join(", "):e.values.map(s=>"%"+(0,t.escape)(s)+"%").join(", ");case"or":return e.members.map(s=>a.StringFilterExpression.unparse(s)).join(" | ");case"and":return e.members.map(s=>a.StringFilterExpression.unparse(s)).join("; ");case",":return e.members.map(s=>a.StringFilterExpression.unparse(s)).join(", ");case"()":{const s="("+a.StringFilterExpression.unparse(e.expr)+")";return e.not?"-"+s:s}case"null":return e.not?"-null":"null";case"empty":return e.not?"-empty":"empty"}}}}(Ze)),Ze}var et={},Mn={},N0;function pd(){if(N0)return Mn;N0=1;var a=Mn&&Mn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mn,"__esModule",{value:!0});function d(t){return t[0]}const m=a(Fa()),y=fo(),h=m.default.keywords({AND:"and",OR:"or",NOT:"not",NULL_KW:"null",TO:"to",NOW:"now",LAST:"last",THIS:"this",NEXT:"next",AGO:"ago",FROM:"from",BEFORE:"before",AFTER:"after",THROUGH:"through",STARTING:"starting",FOR:"for",TODAY:"today",YESTERDAY:"yesterday",TOMORROW:"tomorrow",SECOND:"second",MINUTE:"minute",HOUR:"hour",DAY:"day",WEEK:"week",MONTH:"month",QUARTER:"quarter",YEAR:"year",SECONDS:"seconds",MINUTES:"minutes",HOURS:"hours",DAYS:"days",WEEKS:"weeks",MONTHS:"months",QUARTERS:"quarters",YEARS:"years",MONDAY:"monday",TUESDAY:"tuesday",WEDNESDAY:"wednesday",THURSDAY:"thursday",FRIDAY:"friday",SATURDAY:"saturday",SUNDAY:"sunday"}),u=m.default.compile({WS:/[ \t]+/,id:{match:/[a-zA-Z]+/,type:t=>h(t.toLowerCase())},oparen:"(",cparen:")",comma:",",literal:/\d\d\d\d-\d\d-\d\d[ Tt]\d\d:\d\d(?::\d\d(?:[.,]\d*)?)/,lit_week:/\d\d\d\d-\d\d-\d\d-[Ww][Kk]/,lit_quarter:/\d\d\d\d-[qQ][1234]/,lit_min:/\d\d\d\d-\d\d-\d\d[ Tt]\d\d:\d\d/,lit_hour:/\d\d\d\d-\d\d-\d\d[ Tt]\d\d/,lit_day:/\d\d\d\d-\d\d-\d\d/,lit_month:/\d\d\d\d-\d\d/,lit_year:/\d\d\d\d/,n:/\d+/}),r=u.next;u.next=(t=>()=>{for(;;){const i=t.call(u);if(i===void 0||i.type!=="WS")return i}})(r);const o={Lexer:u,ParserRules:[{name:"temporalFilter",symbols:["temporalFilter","conjunction","temporalUnary"],postprocess:([t,i,e])=>(0,y.joinTemporal)(t,i[0].text,e)},{name:"temporalFilter",symbols:["temporalUnary"],postprocess:t=>t[0]},{name:"temporalUnary$ebnf$1",symbols:[u.has("NOT")?{type:"NOT"}:NOT],postprocess:d},{name:"temporalUnary$ebnf$1",symbols:[],postprocess:()=>null},{name:"temporalUnary",symbols:["temporalUnary$ebnf$1","clause"],postprocess:([t,i])=>(0,y.temporalNot)(i,t)},{name:"duration",symbols:["number","unit"],postprocess:([t,i])=>({units:i,n:t})},{name:"number",symbols:[u.has("n")?{type:"n"}:n],postprocess:([t])=>t.text},{name:"number",symbols:[u.has("lityear")?{type:"lityear"}:lityear],postprocess:([t])=>t.text},{name:"unit$subexpression$1",symbols:[u.has("SECOND")?{type:"SECOND"}:SECOND]},{name:"unit$subexpression$1",symbols:[u.has("MINUTE")?{type:"MINUTE"}:MINUTE]},{name:"unit$subexpression$1",symbols:[u.has("HOUR")?{type:"HOUR"}:HOUR]},{name:"unit$subexpression$1",symbols:[u.has("DAY")?{type:"DAY"}:DAY]},{name:"unit$subexpression$1",symbols:[u.has("WEEK")?{type:"WEEK"}:WEEK]},{name:"unit$subexpression$1",symbols:[u.has("MONTH")?{type:"MONTH"}:MONTH]},{name:"unit$subexpression$1",symbols:[u.has("QUARTER")?{type:"QUARTER"}:QUARTER]},{name:"unit$subexpression$1",symbols:[u.has("YEAR")?{type:"YEAR"}:YEAR]},{name:"unit$subexpression$1",symbols:[u.has("SECONDS")?{type:"SECONDS"}:SECONDS]},{name:"unit$subexpression$1",symbols:[u.has("MINUTES")?{type:"MINUTES"}:MINUTES]},{name:"unit$subexpression$1",symbols:[u.has("HOURS")?{type:"HOURS"}:HOURS]},{name:"unit$subexpression$1",symbols:[u.has("DAYS")?{type:"DAYS"}:DAYS]},{name:"unit$subexpression$1",symbols:[u.has("WEEKS")?{type:"WEEKS"}:WEEKS]},{name:"unit$subexpression$1",symbols:[u.has("MONTHS")?{type:"MONTHS"}:MONTHS]},{name:"unit$subexpression$1",symbols:[u.has("QUARTERS")?{type:"QUARTERS"}:QUARTERS]},{name:"unit$subexpression$1",symbols:[u.has("YEARS")?{type:"YEARS"}:YEARS]},{name:"unit",symbols:["unit$subexpression$1"],postprocess:([t])=>(0,y.mkUnits)(t[0].text)},{name:"clause",symbols:[u.has("NULL_KW")?{type:"NULL_KW"}:NULL_KW],postprocess:()=>({operator:"null"})},{name:"clause",symbols:["parens"],postprocess:t=>t[0]},{name:"clause",symbols:["duration"],postprocess:([t])=>({operator:"in_last",...t})},{name:"clause",symbols:[u.has("BEFORE")?{type:"BEFORE"}:BEFORE,"moment"],postprocess:([t,i])=>({operator:"before",before:i})},{name:"clause",symbols:[u.has("STARTING")?{type:"STARTING"}:STARTING,"moment"],postprocess:([t,i])=>({operator:"before",before:i,not:!0})},{name:"clause",symbols:[u.has("AFTER")?{type:"AFTER"}:AFTER,"moment"],postprocess:([t,i])=>({operator:"after",after:i})},{name:"clause",symbols:[u.has("THROUGH")?{type:"THROUGH"}:THROUGH,"moment"],postprocess:([t,i])=>({operator:"after",after:i,not:!0})},{name:"clause",symbols:["moment",u.has("TO")?{type:"TO"}:TO,"moment"],postprocess:([t,i,e])=>({operator:"to",fromMoment:t,toMoment:e})},{name:"clause",symbols:["moment",u.has("FOR")?{type:"FOR"}:FOR,"duration"],postprocess:([t,i,e])=>({...e,operator:"for",begin:t})},{name:"clause$subexpression$1",symbols:[u.has("LAST")?{type:"LAST"}:LAST]},{name:"clause$subexpression$1",symbols:[u.has("NEXT")?{type:"NEXT"}:NEXT]},{name:"clause",symbols:["clause$subexpression$1","duration"],postprocess:([t,i])=>({operator:t[0].text,...i})},{name:"clause",symbols:["moment"],postprocess:([t])=>({operator:"in",in:t})},{name:"lastNextThis",symbols:[u.has("THIS")?{type:"THIS"}:THIS],postprocess:([t])=>t.text.toLowerCase()},{name:"lastNextThis",symbols:[u.has("NEXT")?{type:"NEXT"}:NEXT],postprocess:([t])=>t.text.toLowerCase()},{name:"lastNextThis",symbols:[u.has("LAST")?{type:"LAST"}:LAST],postprocess:([t])=>t.text.toLowerCase()},{name:"moment",symbols:[u.has("NOW")?{type:"NOW"}:NOW],postprocess:()=>({moment:"now"})},{name:"moment",symbols:["lastNextThis","unit"],postprocess:([t,i])=>({moment:t,units:i})},{name:"moment",symbols:[u.has("TODAY")?{type:"TODAY"}:TODAY],postprocess:()=>({moment:"today"})},{name:"moment",symbols:[u.has("YESTERDAY")?{type:"YESTERDAY"}:YESTERDAY],postprocess:()=>({moment:"yesterday"})},{name:"moment",symbols:[u.has("TOMORROW")?{type:"TOMORROW"}:TOMORROW],postprocess:()=>({moment:"tomorrow"})},{name:"moment",symbols:["duration",u.has("AGO")?{type:"AGO"}:AGO],postprocess:([t,i])=>({moment:"ago",...t})},{name:"moment",symbols:["duration",u.has("FROM")?{type:"FROM"}:FROM,u.has("NOW")?{type:"NOW"}:NOW],postprocess:([t,i])=>({moment:"from_now",...t})},{name:"moment",symbols:[u.has("NEXT")?{type:"NEXT"}:NEXT,"weekday"],postprocess:([t,i])=>({moment:i.toLowerCase(),which:"next"})},{name:"moment",symbols:[u.has("LAST")?{type:"LAST"}:LAST,"weekday"],postprocess:([t,i])=>({moment:i.toLowerCase(),which:"last"})},{name:"moment",symbols:["weekday"],postprocess:([t])=>({moment:t.toLowerCase(),which:"last"})},{name:"moment",symbols:["timeLiteral"],postprocess:t=>t[0]},{name:"timeLiteral",symbols:[u.has("literal")?{type:"literal"}:literal],postprocess:([t])=>(0,y.timeLiteral)(t.text)},{name:"timeLiteral",symbols:[u.has("lit_day")?{type:"lit_day"}:lit_day],postprocess:([t])=>(0,y.timeLiteral)(t.text,"day")},{name:"timeLiteral",symbols:[u.has("lit_min")?{type:"lit_min"}:lit_min],postprocess:([t])=>(0,y.timeLiteral)(t.text,"minute")},{name:"timeLiteral",symbols:[u.has("lit_hour")?{type:"lit_hour"}:lit_hour],postprocess:([t])=>(0,y.timeLiteral)(t.text,"hour")},{name:"timeLiteral",symbols:[u.has("lit_month")?{type:"lit_month"}:lit_month],postprocess:([t])=>(0,y.timeLiteral)(t.text,"month")},{name:"timeLiteral",symbols:[u.has("lit_quarter")?{type:"lit_quarter"}:lit_quarter],postprocess:([t])=>(0,y.timeLiteral)(t.text,"quarter")},{name:"timeLiteral",symbols:[u.has("lit_week")?{type:"lit_week"}:lit_week],postprocess:([t])=>(0,y.timeLiteral)(t.text,"week")},{name:"timeLiteral",symbols:[u.has("lit_year")?{type:"lit_year"}:lit_year],postprocess:([t])=>(0,y.timeLiteral)(t.text,"year")},{name:"weekday$subexpression$1",symbols:[u.has("MONDAY")?{type:"MONDAY"}:MONDAY]},{name:"weekday$subexpression$1",symbols:[u.has("TUESDAY")?{type:"TUESDAY"}:TUESDAY]},{name:"weekday$subexpression$1",symbols:[u.has("WEDNESDAY")?{type:"WEDNESDAY"}:WEDNESDAY]},{name:"weekday$subexpression$1",symbols:[u.has("THURSDAY")?{type:"THURSDAY"}:THURSDAY]},{name:"weekday$subexpression$1",symbols:[u.has("FRIDAY")?{type:"FRIDAY"}:FRIDAY]},{name:"weekday$subexpression$1",symbols:[u.has("SATURDAY")?{type:"SATURDAY"}:SATURDAY]},{name:"weekday$subexpression$1",symbols:[u.has("SUNDAY")?{type:"SUNDAY"}:SUNDAY]},{name:"weekday",symbols:["weekday$subexpression$1"],postprocess:([t])=>t[0].text},{name:"parens",symbols:[u.has("oparen")?{type:"oparen"}:oparen,"temporalFilter",u.has("cparen")?{type:"cparen"}:cparen],postprocess:([t,i,e])=>({operator:"()",expr:i})},{name:"conjunction",symbols:[u.has("OR")?{type:"OR"}:OR]},{name:"conjunction",symbols:[u.has("AND")?{type:"AND"}:AND]}],ParserStart:"temporalFilter"};return Mn.default=o,Mn}var C0;function hd(){return C0||(C0=1,function(a){var d=et&&et.__createBinding||(Object.create?function(l,c,p,v){v===void 0&&(v=p);var x=Object.getOwnPropertyDescriptor(c,p);(!x||("get"in x?!c.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:function(){return c[p]}}),Object.defineProperty(l,v,x)}:function(l,c,p,v){v===void 0&&(v=p),l[v]=c[p]}),m=et&&et.__setModuleDefault||(Object.create?function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}:function(l,c){l.default=c}),y=et&&et.__importStar||function(){var l=function(c){return l=Object.getOwnPropertyNames||function(p){var v=[];for(var x in p)Object.prototype.hasOwnProperty.call(p,x)&&(v[v.length]=x);return v},l(c)};return function(c){if(c&&c.__esModule)return c;var p={};if(c!=null)for(var v=l(c),x=0;x<v.length;x++)v[x]!=="default"&&d(p,c,v[x]);return m(p,c),p}}(),h=et&&et.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(a,"__esModule",{value:!0}),a.TemporalFilterExpression=void 0;const u=Gn(),r=h(pd()),o=y(Pa()),t=Ia();a.TemporalFilterExpression={parse(l){if(l.match(/^\s*$/))return{parsed:null,log:[]};const c=new o.Parser(o.Grammar.fromCompiled(r.default)),p=(0,t.run_parser)(l,c);return p.parsed&&(0,u.isTemporalFilter)(p.parsed)?{parsed:p.parsed,log:[]}:{parsed:null,log:p.log}},unparse(l){if(l===null)return"";switch(l.operator){case"null":return i(l,"null");case"in":return i(l,s(l.in));case"()":return"("+a.TemporalFilterExpression.unparse(l.expr)+")";case"in_last":return i(l,e(l));case"last":case"next":return i(l,`${l.operator} ${e(l)}`);case"before":return`${l.not?"starting":"before"} ${s(l.before)}`;case"after":return`${l.not?"through":"after"} ${s(l.after)}`;case"to":return i(l,`${s(l.fromMoment)} to ${s(l.toMoment)}`);case"for":return i(l,`${s(l.begin)} for ${e(l)}`);case"or":return l.members.map(c=>a.TemporalFilterExpression.unparse(c)).join(" or ");case"and":return l.members.map(c=>a.TemporalFilterExpression.unparse(c)).join(" and ")}}};function i(l,c){return"not"in l&&l.not?"not "+c:c}function e(l){return l.n==="1"?`1 ${l.units}`:`${l.n} ${l.units}s`}function s(l){switch(l.moment){case"literal":return l.literal;case"now":case"today":case"yesterday":case"tomorrow":return l.moment;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return l.which==="next"?"next "+l.moment:l.moment;case"this":case"next":case"last":return`${l.moment} ${l.units}`;case"ago":return`${e(l)} ago`;case"from_now":return`${e(l)} from now`}}}(et)),et}var O0;function xd(){return O0||(O0=1,function(a){var d=Pn&&Pn.__createBinding||(Object.create?function(o,t,i,e){e===void 0&&(e=i);var s=Object.getOwnPropertyDescriptor(t,i);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(o,e,s)}:function(o,t,i,e){e===void 0&&(e=i),o[e]=t[i]}),m=Pn&&Pn.__exportStar||function(o,t){for(var i in o)i!=="default"&&!Object.prototype.hasOwnProperty.call(t,i)&&d(t,o,i)};Object.defineProperty(a,"__esModule",{value:!0}),a.TemporalFilterExpression=a.StringFilterExpression=a.NumberFilterExpression=a.BooleanFilterExpression=void 0,m(Gn(),a);var y=od();Object.defineProperty(a,"BooleanFilterExpression",{enumerable:!0,get:function(){return y.BooleanFilterExpression}});var h=ld();Object.defineProperty(a,"NumberFilterExpression",{enumerable:!0,get:function(){return h.NumberFilterExpression}});var u=fd();Object.defineProperty(a,"StringFilterExpression",{enumerable:!0,get:function(){return u.StringFilterExpression}});var r=hd();Object.defineProperty(a,"TemporalFilterExpression",{enumerable:!0,get:function(){return r.TemporalFilterExpression}})}(Pn)),Pn}var D0;function dd(){return D0||(D0=1,function(a){var d=at&&at.__createBinding||(Object.create?function(B,f,S,M){M===void 0&&(M=S);var se=Object.getOwnPropertyDescriptor(f,S);(!se||("get"in se?!f.__esModule:se.writable||se.configurable))&&(se={enumerable:!0,get:function(){return f[S]}}),Object.defineProperty(B,M,se)}:function(B,f,S,M){M===void 0&&(M=S),B[M]=f[S]}),m=at&&at.__setModuleDefault||(Object.create?function(B,f){Object.defineProperty(B,"default",{enumerable:!0,value:f})}:function(B,f){B.default=f}),y=at&&at.__importStar||function(){var B=function(f){return B=Object.getOwnPropertyNames||function(S){var M=[];for(var se in S)Object.prototype.hasOwnProperty.call(S,se)&&(M[M.length]=se);return M},B(f)};return function(f){if(f&&f.__esModule)return f;var S={};if(f!=null)for(var M=B(f),se=0;se<M.length;se++)M[se]!=="default"&&d(S,f,M[se]);return m(S,f),S}}();Object.defineProperty(a,"__esModule",{value:!0}),a.ASTAnnotation=a.ASTAnnotationList=a.ASTLimitViewOperation=a.ASTView=a.ASTFilterWithLiteralEquality=a.ASTFilterWithFilterString=a.ASTFilter=a.ASTHavingViewOperation=a.ASTDrillViewOperation=a.ASTWhereViewOperation=a.ASTNestViewOperation=a.ASTFilteredFieldExpression=a.ASTFilterOperationList=a.ASTFilterOperation=a.ASTLiteralValueExpression=a.ASTTimeTruncationExpression=a.ASTReferenceExpression=a.ASTExpression=a.ASTField=a.ASTAggregateViewOperation=a.ASTGroupByViewOperation=a.ASTOrderByViewOperation=a.ASTViewOperation=a.ASTViewOperationList=a.ASTSegmentViewDefinition=a.ASTRefinementViewDefinition=a.ASTArrowViewDefinition=a.ASTReferenceViewDefinition=a.ASTReferenceQueryArrowSource=a.ASTReferenceQueryDefinition=a.ASTRefinementQueryDefinition=a.ASTArrowQueryDefinition=a.ASTQueryDefinition=a.ASTQueryArrowSource=a.ASTUnimplemented=a.ASTFilterExpressionLiteralValue=a.ASTTimestampLiteralValue=a.ASTDateLiteralValue=a.ASTBooleanLiteralValue=a.ASTNumberLiteralValue=a.ASTNullLiteralValue=a.ASTStringLiteralValue=a.ASTLiteralValue=a.ASTParameterValue=a.ASTParameterValueList=a.ASTFieldReference=a.ASTReference=a.ASTQuery=void 0;const h=y($p()),u=id(),r=y(xd());class o{constructor(){this.edited=!1}edit(){return this.edited=!0,this._parent&&this._parent.edit(),this}get as(){const f=this;return{Query(){if(f instanceof s)return f;throw new Error("Not an ASTQuery")},Reference(){if(f instanceof l)return f;throw new Error("Not an ASTReference")},ReferenceQueryArrowSource(){if(f instanceof L)return f;throw new Error("Not an ASTReferenceQueryArrowSource")},ParameterValueList(){if(f instanceof p)return f;throw new Error("Not an ASTParameterValueList")},FilterOperation(){if(f instanceof j)return f;throw new Error("Not an ASTFilterOperation")},FilterOperationList(){if(f instanceof b)return f;throw new Error("Not an ASTFilterOperationList")},ParameterValue(){if(f instanceof v)return f;throw new Error("Not an ASTParameterValue")},StringLiteralValue(){if(f instanceof x)return f;throw new Error("Not an ASTStringLiteralValue")},NumberLiteralValue(){if(f instanceof _)return f;throw new Error("Not an ASTNumberLiteralValue")},ViewOperationList(){if(f instanceof oe)return f;throw new Error("Not an ASTViewOperationList")},GroupByViewOperation(){if(f instanceof te)return f;throw new Error("Not an ASTGroupByViewOperation")},AggregateViewOperation(){if(f instanceof pe)return f;throw new Error("Not an ASTAggregateViewOperation")},OrderByViewOperation(){if(f instanceof J)return f;throw new Error("Not an ASTOrderByViewOperation")},Field(){if(f instanceof O)return f;throw new Error("Not an ASTField")},ReferenceExpression(){if(f instanceof T)return f;throw new Error("Not an ASTReferenceExpression")},ReferenceViewDefinition(){if(f instanceof I)return f;throw new Error("Not an ASTReferenceViewDefinition")},ArrowQueryDefinition(){if(f instanceof P)return f;throw new Error("Not an ASTArrowQueryDefinition")},ArrowViewDefinition(){if(f instanceof Q)return f;throw new Error("Not an ASTArrowViewDefinition")},RefinementViewDefinition(){if(f instanceof re)return f;throw new Error("Not an ASTRefinementViewDefinition")},TimeTruncationExpression(){if(f instanceof C)return f;throw new Error("Not an ASTTimeTruncationExpression")},FilteredFieldExpression(){if(f instanceof R)return f;throw new Error("Not an ASTFilteredFieldExpression")},NestViewOperation(){if(f instanceof V)return f;throw new Error("Not an ASTNestViewOperation")},View(){if(f instanceof le)return f;throw new Error("Not an ASTView")},SegmentViewDefinition(){if(f instanceof fe)return f;throw new Error("Not an ASTSegmentViewDefinition")},LimitViewOperation(){if(f instanceof ce)return f;throw new Error("Not an ASTLimitViewOperation")},AnnotationList(){if(f instanceof de)return f;throw new Error("Not an ASTAnnotationList")},Annotation(){if(f instanceof ve)return f;throw new Error("Not an ASTAnnotation")}}}get find(){const f=this;return{Query(S){return f.findAny(S).as.Query()},Reference(S){return f.findAny(S).as.Reference()},ReferenceQueryArrowSource(S){return f.findAny(S).as.ReferenceQueryArrowSource()},ParameterValueList(S){return f.findAny(S).as.ParameterValueList()},FilterOperation(S){return f.findAny(S).as.FilterOperation()},FilterOperationList(S){return f.findAny(S).as.FilterOperationList()},ParameterValue(S){return f.findAny(S).as.ParameterValue()},StringLiteralValue(S){return f.findAny(S).as.StringLiteralValue()},NumberLiteralValue(S){return f.findAny(S).as.NumberLiteralValue()},ViewOperationList(S){return f.findAny(S).as.ViewOperationList()},GroupByViewOperation(S){return f.findAny(S).as.GroupByViewOperation()},AggregateViewOperation(S){return f.findAny(S).as.AggregateViewOperation()},OrderByViewOperation(S){return f.findAny(S).as.OrderByViewOperation()},Field(S){return f.findAny(S).as.Field()},ReferenceExpression(S){return f.findAny(S).as.ReferenceExpression()},ReferenceViewDefinition(S){return f.findAny(S).as.ReferenceViewDefinition()},ArrowQueryDefinition(S){return f.findAny(S).as.ArrowQueryDefinition()},ArrowViewDefinition(S){return f.findAny(S).as.ArrowViewDefinition()},RefinementViewDefinition(S){return f.findAny(S).as.RefinementViewDefinition()},TimeTruncationExpression(S){return f.findAny(S).as.TimeTruncationExpression()},FilteredFieldExpression(S){return f.findAny(S).as.FilteredFieldExpression()},NestViewOperation(S){return f.findAny(S).as.NestViewOperation()},View(S){return f.findAny(S).as.View()},SegmentViewDefinition(S){return f.findAny(S).as.SegmentViewDefinition()},LimitViewOperation(S){return f.findAny(S).as.LimitViewOperation()},AnnotationList(S){return f.findAny(S).as.AnnotationList()},Annotation(S){return f.findAny(S).as.Annotation()}}}get parent(){if(this._parent===void 0)throw new Error("This node does not have a parent");return this._parent}set parent(f){this._parent=f}static schemaTryGet(f,S,M){return o._schemaTryGet(f,S,M,!1)}static schemaTryGetDrillField(f,S,M){return o._schemaTryGet(f,S,M,!0)}static _schemaTryGet(f,S,M,se){let xe=f.fields;for(const De of M??[]){const be=xe.find(Le=>Le.name===De);if(be===void 0)throw new Error(`${De} not found`);if(be.kind==="join"||se&&be.kind==="view"){xe=be.schema.fields;continue}if(be.kind==="dimension"||be.kind==="measure"){if(be.type.kind==="record_type"){xe=be.type.fields.map(Le=>({kind:be.kind,...Le}));continue}else if(be.type.kind==="array_type"&&be.type.element_type.kind==="record_type"){xe=be.type.element_type.fields.map(Le=>({kind:be.kind,...Le}));continue}}throw new Error(`${De} is not a join, record, or repeated record`)}return xe.find(De=>De.name===S)}static schemaGet(f,S,M){const se=o.schemaTryGet(f,S,M);if(se===void 0)throw new Error(`${S} not found`);return se}static schemaGetDrillField(f,S,M){const se=o.schemaTryGetDrillField(f,S,M);if(se===void 0)throw new Error(`${S} not found`);return se}static schemaMerge(f,S){return{fields:[...f.fields,...S.fields]}}static tagFor(f,S="# "){var M,se,xe;const Ae=(se=(M=f.annotations)===null||M===void 0?void 0:M.map(De=>De.value))===null||se===void 0?void 0:se.filter(De=>De.startsWith(S));return(xe=u.Tag.fromTagLines(Ae??[]).tag)!==null&&xe!==void 0?xe:new u.Tag}static fieldWasCalculation(f){if(f.kind!=="dimension")throw new Error(`${f.name} could not be an output field, because it is a ${f.kind}, and only dimensions can appear in output schemas`);return o.tagFor(f,"#(malloy) ").has("calculation")}}function t(B){return Array.isArray(B)||typeof B=="string"||typeof B=="number"||typeof B=="boolean"}class i extends o{constructor(f,S){super(),this.node=f,this.children=S,this.originalChildren=[...S],S.forEach(M=>M.parent=this)}*iter(){for(let f=0;f<this.length;f++)yield this.index(f)}get length(){return this.children.length}get last(){return this.children[this.children.length-1]}index(f){return this.children[f]}insert(f,S){this.edit(),this.children.splice(S,0,f),f.parent=this}add(f){this.edit(),this.children.push(f),f.parent=this}remove(f){const S=this.children.findIndex(M=>M===f);if(S===-1)return this;this.edit(),this.children.splice(S,1)}build(){if(!this.edited)return this.node;const f=this.children.map(S=>S.build());return this.edited=!1,this.originalChildren=[...this.children],this.node=f,f}findAny(f){if(f.length===0)return this;const[S,...M]=f;if(typeof S!="number")throw new Error(`${this.constructor.name} is a ASTListNode and thus cannot contain a ${S}`);return this.children[S].findAny(M)}findIndex(f){return this.children.findIndex(f)}indexOf(f){return this.children.indexOf(f)}}class e extends o{constructor(f,S){super(),this.node=f,this.children=S;for(const M in S){const se=S[M];se&&!t(se)&&(se.parent=this)}}build(){if(!this.edited)return this.node;let f=this.node;for(const S in this.children){const M=this.children[S];M===void 0?f={...f,[S]:void 0}:t(M)?this.edited&&(f={...f,[S]:M}):f={...f,[S]:M.build()}}return this.node=f,this.edited=!1,f}findAny(f){if(f.length===0)return this;const[S,...M]=f;if(typeof S!="string")throw new Error(`${this.constructor.name} is a ASTListNode and thus cannot contain a ${S}`);const se=this.children[S];if(t(se))throw new Error(`${this.constructor.name}.${S} refers to a basic type, not an ASTNode`);return se._find(M)}}class s extends e{constructor(f){var S,M;let se=f.source;if(se===void 0){if(f.model===void 0)throw new Error("Need a model or source");if(f.query){const be=f.query.definition;if(be.kind==="arrow"&&be.source.kind==="source_reference"){const Le=be.source.name;if(se=f.model.entries.find(Yn=>Yn.name===Le),se===void 0)throw new Error(`Model does not contain source or query named ${Le}`)}}if(se===void 0&&(se=f.model.entries[0]),se===void 0)throw new Error("Model does not contain any sources or queries")}const xe=he(se),Ae=(S=f.query)!==null&&S!==void 0?S:{definition:{kind:"arrow",source:{kind:"source_reference",name:xe.name},view:{kind:"segment",operations:[]}}},De=(M=f.model)!==null&&M!==void 0?M:{entries:[xe],anonymous_queries:[]};super(Ae,{definition:a.ASTQueryDefinition.from(Ae.definition),annotations:Ae.annotations&&new de(Ae.annotations)}),this.model=De,f.source&&this.setSource(f.source.name)}get definition(){return this.children.definition}set definition(f){this.edit(),this.children.definition=f,f.parent=this}get annotations(){return this.children.annotations}reorderFields(f){this.definition.reorderFields(f)}getOrAddAnnotations(){if(this.annotations)return this.annotations;this.edit();const f=new de([]);return this.children.annotations=f,f.parent=this,f}getInheritedTag(f="# "){return Se(f,this.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,M;return(M=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&M!==void 0?M:new u.Tag}getTag(f="# "){var S,M;return(M=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&M!==void 0?M:this.getInheritedTag(f)}setTagProperty(f,S=null,M="# "){this.getOrAddAnnotations().setTagProperty(f,S,M)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}setViewToEmptySegment(){if(!(this.definition instanceof P))throw new Error("Must set source before setting view");return this.definition=new P({kind:"arrow",source:this.definition.source.build(),view:{kind:"segment",operations:[]}}),this.definition.view.as.SegmentViewDefinition()}isRunnable(){return this.definition.isRunnable()}isEmpty(){return this.definition instanceof P&&this.definition.view instanceof fe&&this.definition.view.operations.length===0}getOrAddDefaultSegment(){return this.definition.getOrAddDefaultSegment()}setSource(f){if(this.definition instanceof P&&this.definition.source instanceof L&&this.definition.source.name===f)return;if(this.model.entries.find(M=>M.name===f)===void 0)throw new Error(`Source ${f} is not defined in model`);this.definition=new P({kind:"arrow",source:{kind:"source_reference",name:f},view:this.definition instanceof P?this.definition.view.build():{kind:"segment",operations:[]}})}setQueryHead(f){const S=this.model.entries.find(M=>M.name===f);if(S===void 0||S.kind!=="query")throw new Error(`No query named ${f} in the model`);this.definition=new Y({kind:"query_reference",name:f})}getQueryInfo(f){const S=this.model.entries.find(M=>M.name===f);if(S===void 0)throw new Error(`Query ${f} is not defined in model`);if(S.kind!=="query")throw new Error(`Model entry ${f} is not a query`);return S}toMalloy(){return h.queryToMalloy(this.build())}build(){return super.build()}setView(f){if(!(this.definition instanceof P))throw new Error("Must set source before setting view");return this.definition=new P({kind:"arrow",source:this.definition.source.build(),view:{kind:"view_reference",name:f}}),this.definition.view.as.ReferenceViewDefinition()}_getInheritedAnnotations(f){var S;return f instanceof Y?(S=this.getQueryInfo(f.name).annotations)!==null&&S!==void 0?S:[]:f instanceof $?this._getInheritedAnnotations(f.base):f instanceof P?f.view.getInheritedAnnotations():[]}getInheritedAnnotations(){return this._getInheritedAnnotations(this.definition)}}a.ASTQuery=s;class l extends e{constructor(f){super(f,{name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.reference=f}get name(){return this.children.name}set name(f){this.edit(),this.children.name=f}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}get path(){return this.children.path}static getOrAddParameters(f){if(f.parameters)return f.parameters;f.edit();const S=new p([]);return f.parameters=S,S}static setParameter(f,S,M){const se=l.tryGetParameter(f,S);if(se!==void 0){se.value=a.ASTLiteralValue.from(a.ASTLiteralValue.makeLiteral(M));return}return f.getOrAddParameters().addParameter(S,M)}static tryGetParameter(f,S){if(f.parameters!==void 0){for(const M of f.parameters.iter())if(M.name===S)return M}}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}}a.ASTReference=l;class c extends l{get segment(){const f=this.parent;if(f instanceof R||f instanceof C)return f.field.segment;if(f instanceof K||f instanceof ie){const S=f.parent;return S instanceof j?S.list.expression.field.segment:S.list.segment}else return f.list.segment}getReferenceSchema(){return this.parent instanceof J?this.segment.getOutputSchema():this.segment.getInputSchema()}getFieldInfo(){const f=this.getReferenceSchema();return this.parent instanceof ie&&this.parent.parent instanceof U?o.schemaGetDrillField(f,this.name,this.path):o.schemaGet(f,this.name,this.path)}}a.ASTFieldReference=c;class p extends i{constructor(f){super(f,f.map(S=>new v(S)))}get parameters(){return this.children}addParameter(f,S){this.add(new v({name:f,value:a.ASTLiteralValue.makeLiteral(S)}))}}a.ASTParameterValueList=p;class v extends e{constructor(f){super(f,{name:f.name,value:a.ASTLiteralValue.from(f.value)}),this.parameter=f}get name(){return this.children.name}get value(){return this.children.value}set value(f){this.edit(),this.children.value=f}}a.ASTParameterValue=v,a.ASTLiteralValue={from(B){switch(B.kind){case"string_literal":return new x(B);case"number_literal":return new _(B);case"boolean_literal":return new A(B);case"date_literal":return new E(B);case"timestamp_literal":return new D(B);case"null_literal":return new g(B);case"filter_expression_literal":return new N(B)}},makeLiteral(B){if(B!==null&&typeof B=="object"&&"kind"in B)return B;if(typeof B=="string")return{kind:"string_literal",string_value:B};if(typeof B=="boolean")return{kind:"boolean_literal",boolean_value:B};if(typeof B=="number")return{kind:"number_literal",number_value:B};if(B===null)return{kind:"null_literal"};if("date"in B){const f=B.granularity,S=Te(B.date);return ge(f)?{kind:"date_literal",date_value:S,granularity:f}:{kind:"timestamp_literal",timestamp_value:S,granularity:f}}throw new Error("Unknown literal type")}};class x extends e{constructor(f){super(f,{kind:f.kind,string_value:f.string_value}),this.node=f,this.kind="string_literal"}get fieldType(){return{kind:"string_type"}}}a.ASTStringLiteralValue=x;class g extends e{constructor(f){super(f,{kind:f.kind}),this.node=f,this.kind="null_literal"}get fieldType(){}}a.ASTNullLiteralValue=g;class _ extends e{constructor(f){super(f,{kind:f.kind,number_value:f.number_value}),this.node=f,this.kind="number_literal"}get fieldType(){return{kind:"number_type",subtype:Number.isInteger(this.children.number_value)?"integer":"decimal"}}}a.ASTNumberLiteralValue=_;class A extends e{constructor(f){super(f,{kind:f.kind,boolean_value:f.boolean_value}),this.node=f,this.kind="boolean_literal"}get fieldType(){return{kind:"boolean_type"}}}a.ASTBooleanLiteralValue=A;class E extends e{constructor(f){super(f,{kind:f.kind,date_value:f.date_value,granularity:f.granularity}),this.node=f,this.kind="date_literal"}get fieldType(){return{kind:"date_type",timeframe:this.children.granularity}}}a.ASTDateLiteralValue=E;class D extends e{constructor(f){super(f,{kind:f.kind,timestamp_value:f.timestamp_value,granularity:f.granularity}),this.node=f,this.kind="timestamp_literal"}get fieldType(){return{kind:"timestamp_type",timeframe:this.children.granularity}}}a.ASTTimestampLiteralValue=D;class N extends e{constructor(f){super(f,{kind:f.kind,filter_expression_value:f.filter_expression_value}),this.node=f,this.kind="filter_expression_literal"}get fieldType(){}}a.ASTFilterExpressionLiteralValue=N;class w extends o{constructor(f){super(),this.node=f}get treeEdited(){return!1}build(){return this.node}findAny(){throw new Error("Tried to find a node from an unimplemented node type")}}a.ASTUnimplemented=w,a.ASTQueryArrowSource={from(B){switch(B.kind){case"refinement":return new $(B);case"source_reference":return new L(B)}}},a.ASTQueryDefinition={from(B){switch(B.kind){case"arrow":return new P(B);case"query_reference":return new Y(B);case"refinement":return new $(B)}}};class P extends e{constructor(f){super(f,{kind:"arrow",source:a.ASTQueryArrowSource.from(f.source),view:q.from(f.view)}),this.node=f}get view(){return this.children.view}set view(f){this.edit(),this.children.view=f,f.parent=this}get source(){return this.children.source}set source(f){this.edit(),this.children.source=f}getOrAddDefaultSegment(){return this.view.getOrAddDefaultSegment()}getSourceInfo(){return this.source.getSourceInfo()}getOutputSchema(){return this.view.getRefinementSchema()}isRunnable(){return this.view.isRunnable()&&this.source.isRunnable()}get query(){return this.parent.as.Query()}propagateUp(f){this.propagateDown(f)}propagateDown(f){f(this.view),this.view.propagateDown(f)}reorderFields(f){this.view instanceof fe?this.view.reorderFields(f):this.query.getOrAddAnnotations().setTagProperty(["field_order"],f)}}a.ASTArrowQueryDefinition=P;class $ extends e{constructor(f){super(f,{kind:"refinement",base:a.ASTQueryDefinition.from(f.base),refinement:q.from(f.refinement)}),this.node=f}get base(){return this.children.base}get refinement(){return this.children.refinement}set refinement(f){this.edit(),this.children.refinement=f,f.parent=this}isRunnable(){return!0}get query(){return this.parent.as.Query()}getOrAddDefaultSegment(){return this.refinement.getOrAddDefaultSegment()}getOutputSchema(){const f=this.base.getOutputSchema(),S=this.refinement.getRefinementSchema();return s.schemaMerge(f,S)}propagateUp(f){this.propagateDown(f)}propagateDown(f){f(this.refinement),this.refinement.propagateDown(f)}reorderFields(f){this.query.getOrAddAnnotations().setTagProperty(["field_order"],f)}getSourceInfo(){return this.base.getSourceInfo()}}a.ASTRefinementQueryDefinition=$;class Y extends e{constructor(f){super(f,{kind:"query_reference",name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.node=f}isRunnable(){return!0}get name(){return this.children.name}get query(){return this.parent.as.Query()}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}get path(){return this.children.path}getOrAddDefaultSegment(){const f=new $({kind:"refinement",base:this.build(),refinement:{kind:"segment",operations:[]}});return this.query.definition=f,f.refinement.as.SegmentViewDefinition()}propagateUp(f){}propagateDown(f){}reorderFields(f){this.query.getOrAddAnnotations().setTagProperty(["field_order"],f)}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}getOutputSchema(){return this.getSourceInfo().schema}getSourceInfo(){const S=this.query.model.entries.find(M=>M.name===this.name);if(S===void 0)throw new Error(`Query not found with name ${this.name}`);return S}}a.ASTReferenceQueryDefinition=Y;class L extends e{constructor(f){super(f,{kind:"source_reference",name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.node=f}isRunnable(){return this.areRequiredParametersSet()}get name(){return this.children.name}get arrow(){return this.parent.as.ArrowQueryDefinition()}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}get path(){return this.children.path}getSourceInfo(){const f=this.arrow.query.model.entries.find(S=>S.name===this.name);if(f===void 0)throw new Error(`No query or source named ${this.name}`);return f}getOrAddDefaultSegment(){if(this.getSourceInfo().kind!=="query")throw new Error(`Cannot refine source ${this.name}`);const S=new $({kind:"refinement",base:{...this.build(),kind:"query_reference"},refinement:{kind:"segment",operations:[]}});return this.arrow.source=S,S.refinement.as.SegmentViewDefinition()}propagateUp(f){}propagateDown(f){}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}get query(){return this.parent.parent.as.Query()}getSourceParameters(){var f;const S=this.getSourceInfo();return S.kind==="query"?[]:(f=S.parameters)!==null&&f!==void 0?f:[]}areRequiredParametersSet(){const f=this.getSourceParameters();for(const S of f){if(S.default_value!==void 0)continue;if(this.tryGetParameter(S.name)===void 0)return!1}return!0}}a.ASTReferenceQueryArrowSource=L;const q={from(B){switch(B.kind){case"arrow":return new Q(B);case"view_reference":return new I(B);case"segment":return new fe(B);case"refinement":return new re(B)}}};function W(B,f){const S=B.parent;S instanceof P?S.view=f:S instanceof $?S.refinement=f:S instanceof le?S.definition=f:S instanceof Q?S.source===B?S.source=f:S.view=f:S.base===B?S.base=f:S.refinement=f}function Z(B,f,S=[]){const M=B.getInputSchema(),se=s.schemaGet(M,f,S);if(se===void 0)return{isValidViewRefinement:!1,error:`${f} is not defined`};if(se.kind!=="view")return{isValidViewRefinement:!1,error:`${f} is not a view`};const xe=B.getOutputSchema();for(const Ae of se.schema.fields)if(s.schemaTryGet(xe,Ae.name,[]))return{isValidViewRefinement:!1,error:`Cannot refine with ${f} because stage already has an output field named ${Ae.name}`};return{isValidViewRefinement:!0}}class I extends e{constructor(f){super(f,{kind:"view_reference",name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.node=f}isRunnable(){return!0}get name(){return this.children.name}get path(){return this.children.path}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}getOrAddDefaultSegment(){return this.addEmptyRefinement()}addEmptyRefinement(){const f=re.segmentRefinementOf(this.build());return W(this,f),f.refinement.as.SegmentViewDefinition()}addViewRefinement(f,S){const{error:M}=this.isValidViewRefinement(f,S);if(M)throw new Error(M);const se=re.viewRefinementOf(this.build(),f,S);return W(this,se),se.refinement.as.ReferenceViewDefinition()}convertToNest(f){const S=q.from({kind:"segment",operations:[{kind:"nest",name:f,view:{definition:this.build()}}]});W(this,S)}isValidViewRefinement(f,S){return Z(this,f,S)}getInputSchema(){return Pe(this.parent)}getOutputSchema(){return this.parent.getOutputSchema()}getImplicitName(){return this.name}getViewInfo(){const f=this.getInputSchema(),S=o.schemaGet(f,this.name,this.path);if(S.kind!=="view")throw new Error("Not a view");return S}getRefinementSchema(){return this.getViewInfo().schema}propagateUp(f){this.parent.propagateUp(f)}propagateDown(f){}getInheritedAnnotations(){var f;return(f=this.getViewInfo().annotations)!==null&&f!==void 0?f:[]}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}}a.ASTReferenceViewDefinition=I;class Q extends e{constructor(f){super(f,{kind:"arrow",source:q.from(f.source),view:q.from(f.view)}),this.node=f}isRunnable(){return this.source.isRunnable()&&this.view.isRunnable()}get source(){return this.children.source}set source(f){this.edit(),this.children.source=f}get view(){return this.children.view}set view(f){this.edit(),this.children.view=f,f.parent=this}getOrAddDefaultSegment(){return this.view.getOrAddDefaultSegment()}addEmptyRefinement(){return this.view.addEmptyRefinement()}addViewRefinement(f,S){return this.view.addViewRefinement(f,S)}convertToNest(f){const S=q.from({kind:"segment",operations:[{kind:"nest",name:f,view:{definition:this.build()}}]});W(this,S)}getInputSchema(){return this.source.getOutputSchema()}getOutputSchema(){return this.view.getRefinementSchema()}getImplicitName(){return this.view.getImplicitName()}getRefinementSchema(){throw new Error("An arrow is not a valid refinement")}isValidViewRefinement(f,S){return Z(this,f,S)}propagateUp(f){this.propagateDown(f)}propagateDown(f){f(this.view),this.view.propagateDown(f)}getInheritedAnnotations(){return[]}}a.ASTArrowViewDefinition=Q;class re extends e{constructor(f){super(f,{kind:"refinement",base:q.from(f.base),refinement:q.from(f.refinement)}),this.node=f}isRunnable(){return this.getOutputSchema().fields.length>0}get refinement(){return this.children.refinement}set refinement(f){this.edit(),this.children.refinement=f,f.parent=this}get base(){return this.children.base}set base(f){this.edit(),this.children.base=f}convertToNest(f){const S=q.from({kind:"segment",operations:[{kind:"nest",name:f,view:{definition:this.build()}}]});W(this,S)}getOrAddDefaultSegment(){return this.refinement.getOrAddDefaultSegment()}addEmptyRefinement(){return this.refinement.addEmptyRefinement()}addViewRefinement(f,S){return this.refinement.addViewRefinement(f,S)}getInputSchema(){return Pe(this.parent)}getOutputSchema(){return this.parent.getOutputSchema()}getRefinementSchema(){return o.schemaMerge(this.base.getRefinementSchema(),this.refinement.getRefinementSchema())}getImplicitName(){return this.base.getImplicitName()}isValidViewRefinement(f,S){return Z(this,f,S)}propagateUp(f){this.parent.propagateUp(f)}propagateDown(f){f(this.base),f(this.refinement),this.base.propagateDown(f),this.refinement.propagateDown(f)}getInheritedAnnotations(){return this.base.getInheritedAnnotations()}static viewRefinementOf(f,S,M){return new re({kind:"refinement",base:f,refinement:{kind:"view_reference",name:S,path:M}})}static segmentRefinementOf(f){return new re({kind:"refinement",base:f,refinement:{kind:"segment",operations:[]}})}}a.ASTRefinementViewDefinition=re;class fe extends e{constructor(f){super(f,{kind:"segment",operations:new oe(f.operations)}),this.node=f,this.DEFAULT_INSERTION_ORDER=["group_by","aggregate","drill","where","having","nest","order_by","limit"]}isRunnable(){let f=!1;for(const S of this.operations.iter()){if(S instanceof pe||S instanceof te)return!0;if(S instanceof V){if(!S.view.definition.isRunnable())return!1;f=!0}}return f}get operations(){return this.children.operations}convertToNest(f){const S=q.from({kind:"segment",operations:[{kind:"nest",name:f,view:{definition:this.build()}}]});W(this,S)}renameOrderBys(f,S){for(const M of this.operations.iter())M instanceof J&&M.name===f&&M.setField(S)}propagateUp(f){this.parent.propagateUp(f)}propagateDown(f){}removeOrderBys(f){for(const S of this.operations.iter())S instanceof J&&S.name===f&&S.delete()}reorderFields(f){const S=[],M=[],se={};let xe=!1;for(const be of this.operations.iter()){if((be instanceof pe||be instanceof te||be instanceof V)&&f.includes(be.name)){se[be.name]=be,xe=!0;continue}xe?M.push(be):S.push(be)}const Ae=[];for(const be of f){const Le=se[be];if(Le===void 0)throw new Error(`No field named ${be}`);Ae.push(Le)}const De=[...S,...Ae,...M];this.operations.items=De}renameField(f,S){if(f.name===S)return;const M=this.getOutputSchema();if(o.schemaTryGet(M,S,[]))throw new Error(`Output already has a field named ${S}`);const se=f.name;f.name=S,this.propagateUp(xe=>{xe instanceof fe&&xe.renameOrderBys(se,S)})}addOrderBy(f,S){const M=this.getOutputSchema();try{o.schemaGet(M,f,[])}catch{throw new Error(`No such field ${f} in stage output`)}for(const xe of this.operations.iter())if(xe instanceof J&&xe.name===f)return xe.direction=S,xe;const se=new J({kind:"order_by",field_reference:{name:f},direction:S});return this.addOperation(se),se}addEmptyNest(f){const S=new V({kind:"nest",name:f,view:{definition:{kind:"segment",operations:[]}}});return this.addOperation(S),S}firstIndexOfOperationType(f){return this.operations.findIndex(S=>S.kind===f)}findInsertionPoint(f){const S=this.firstIndexOfOperationType(f);if(S>-1){let xe=S;for(;this.operations.index(xe)&&this.operations.index(xe).kind===f;)xe++;return xe}const M=this.DEFAULT_INSERTION_ORDER.indexOf(f);if(M===-1)throw new Error(`Operation ${f} is not supported for \`findInsertionPoint\``);const se=this.DEFAULT_INSERTION_ORDER.slice(M+1);for(const xe of se){const Ae=this.firstIndexOfOperationType(xe);if(Ae>-1)return Ae}return this.operations.length}getFieldNamed(f){const S=this.tryGetFieldNamed(f);if(S===void 0)throw new Error("No such field");return S}hasFieldNamed(f){return this.tryGetFieldNamed(f)!==void 0}hasField(f,S){return this.tryGetField(f,S)!==void 0}getField(f,S){const M=this.tryGetField(f,S);if(M===void 0)throw new Error("No such field");return M}tryGetField(f,S){for(const M of this.operations.iter())if(M instanceof te||M instanceof pe){const se=M.field.getReference();if(se&&se.name===f&&Ee(se.path,S))return M}else if(M instanceof V&&M.view instanceof I)return M}tryGetFieldNamed(f){for(const S of this.operations.iter())if((S instanceof te||S instanceof pe||S instanceof V)&&S.name===f)return S}getGroupBy(f){for(const S of this.operations.iter())if(S instanceof te&&S.name===f)return S}removeGroupBy(f){var S;return(S=this.getGroupBy(f))===null||S===void 0||S.delete(),this}addGroupBy(f,S=[],M){const se=this.makeField(f,S,M,"dimension");return this.addOperation(se),se}addDrill(f){const S=new U({kind:"drill",...f});return this.addOperation(S),S}addWhere(f,S,M){const se=Array.isArray(S)?S:[],xe=M===void 0?S:M,Ae=typeof xe=="string"?xe:H(xe),De=this.getInputSchema(),be=s.schemaGet(De,f,se);Oe(be,xe);const Le=new G({kind:"where",filter:{kind:"filter_string",field_reference:{name:f,path:se},filter:Ae}});return this.addOperation(Le),Le}addHaving(f,S,M){const se=Array.isArray(S)?S:[],xe=M===void 0?S:M,Ae=typeof xe=="string"?xe:H(xe),De=this.getInputSchema(),be=s.schemaGet(De,f,se);Oe(be,xe);const Le=new z({kind:"having",filter:{kind:"filter_string",field_reference:{name:f,path:se},filter:Ae}});return this.addOperation(Le),Le}addTimeGroupBy(f,S,M,se){const xe=this.getInputSchema(),Ae=o.schemaGet(xe,f,S);if(Ae===void 0)throw new Error(`No such field ${f}`);if(Ae.kind!=="dimension")throw new Error(`Cannot group by non-dimension ${f}`);if(Ae.type.kind!==se)throw new Error(`${f} is not a ${se}`);const De=new te({kind:"group_by",field:{expression:{kind:"time_truncation",field_reference:{name:f,path:S},truncation:M}}});return this.addOperation(De),De}addDateGroupBy(f,S,M){const se=M===void 0?S:M,xe=M===void 0?[]:S;return this.addTimeGroupBy(f,xe,se,"date_type")}addTimestampGroupBy(f,S,M){const se=M===void 0?S:M,xe=M===void 0?[]:S;return this.addTimeGroupBy(f,xe,se,"timestamp_type")}addAggregate(f,S=[],M){const se=this.makeField(f,S,M,"measure");return this.addOperation(se),se}addNest(f,S){const M=this.makeField(f,[],S,"view");return this.addOperation(M),M}makeField(f,S,M,se){const xe=this.getInputSchema(),Ae=o.schemaGet(xe,f,S);if(Ae===void 0)throw new Error(`No such field ${f}`);if(Ae.kind!==se){const De=X(se),be=se;throw new Error(`Cannot ${De} non-${be} ${f}`)}return se==="dimension"?te.fromReference(f,S,M):se==="measure"?pe.fromReference(f,S,M):V.fromReference(f,S,M)}addOperation(f){if((f instanceof te||f instanceof pe||f instanceof V)&&this.hasFieldNamed(f.name))throw new Error(`Query already has a field named ${f.name}`);const S=this.findInsertionPoint(f.kind);return this.operations.insert(f,S),f}getRefinementSchema(){const f=[];for(const S of this.operations.iter())(S instanceof te||S instanceof pe||S instanceof V)&&f.push(S.getFieldInfo());return{fields:f}}setLimit(f){ce.validateLimit(f);const S=[...this.operations.iter()].find(a.ASTViewOperation.isLimit);S?S.limit=f:this.operations.add(new ce({kind:"limit",limit:f}))}getOrAddDefaultSegment(){return this}addEmptyRefinement(){const f=re.segmentRefinementOf(this.build());return W(this,f),f.refinement.as.SegmentViewDefinition()}addViewRefinement(f,S){const{error:M}=this.isValidViewRefinement(f,S);if(M)throw new Error(M);const se=re.viewRefinementOf(this.build(),f,S);return W(this,se),se.refinement.as.ReferenceViewDefinition()}getInputSchema(){return Pe(this.parent)}getOutputSchema(){return this.parent.getOutputSchema()}getImplicitName(){}isValidViewRefinement(f,S){return Z(this,f,S)}getInheritedAnnotations(){return[]}}a.ASTSegmentViewDefinition=fe;class oe extends i{constructor(f){super(f,f.map(S=>a.ASTViewOperation.from(S)))}get items(){return this.children}set items(f){this.edit(),this.children=f}get segment(){return this.parent.as.SegmentViewDefinition()}}a.ASTViewOperationList=oe,a.ASTViewOperation={from(B){switch(B.kind){case"group_by":return new te(B);case"aggregate":return new pe(B);case"order_by":return new J(B);case"nest":return new V(B);case"limit":return new ce(B);case"where":return new G(B);case"drill":return new U(B);case"having":return new z(B)}},isLimit(B){return B instanceof ce}};class J extends e{constructor(f){super(f,{kind:"order_by",field_reference:new c(f.field_reference),direction:f.direction}),this.node=f,this.kind="order_by"}get fieldReference(){return this.children.field_reference}get name(){return this.fieldReference.name}get direction(){return this.children.direction}set direction(f){this.direction!==f&&(this.edit(),this.children.direction=f)}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}setField(f){const S=this.list.segment.getOutputSchema();o.schemaGet(S,f,[]),this.edit(),this.children.field_reference=new c({name:f})}setDirection(f){this.direction=f}}a.ASTOrderByViewOperation=J;class te extends e{constructor(f){super(f,{kind:"group_by",name:f.name,field:new O(f.field)}),this.node=f,this.kind="group_by"}get field(){return this.children.field}get name(){var f;const S=(f=this.children.name)!==null&&f!==void 0?f:this.field.name;if(S===void 0)throw new Error("Group by does not have a name");return S}set name(f){this.name!==f&&(this.edit(),this.field.name===f?this.children.name=void 0:this.children.name=f)}get list(){return this.parent.as.ViewOperationList()}rename(f){this.list.segment.renameField(this,f)}delete(){this.list.remove(this),this.list.segment.propagateUp(f=>{f instanceof fe&&f.removeOrderBys(this.name)})}getFieldInfo(){return{kind:"dimension",name:this.name,type:this.field.type}}get annotations(){return this.field.annotations}set annotations(f){this.edit(),this.field.annotations=f}getOrAddAnnotations(){return this.field.getOrAddAnnotations()}getInheritedTag(f="# "){return Se(f,this.field.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,M;return(M=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&M!==void 0?M:new u.Tag}getTag(f="# "){var S,M;return(M=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&M!==void 0?M:this.getInheritedTag(f)}setTagProperty(f,S=null,M="# "){this.getOrAddAnnotations().setTagProperty(f,S,M)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}static fromReference(f,S,M){return new te({kind:"group_by",name:M,field:{expression:{kind:"field_reference",name:f,path:S}}})}}a.ASTGroupByViewOperation=te;class pe extends e{constructor(f){super(f,{kind:"aggregate",name:f.name,field:new O(f.field)}),this.node=f,this.kind="aggregate"}get field(){return this.children.field}get name(){var f;const S=(f=this.children.name)!==null&&f!==void 0?f:this.field.name;if(S===void 0)throw new Error("Aggregate does not have a name");return S}set name(f){this.name!==f&&(this.edit(),this.field.name===f?this.children.name=void 0:this.children.name=f)}get annotations(){return this.field.annotations}rename(f){this.list.segment.renameField(this,f)}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this),this.list.segment.propagateUp(f=>{f instanceof fe&&f.removeOrderBys(this.name)})}getFieldInfo(){return{annotations:[{value:u.Tag.withPrefix("#(malloy) ").set(["calculation"]).toString()}],kind:"dimension",name:this.name,type:this.field.type}}getOrAddAnnotations(){return this.field.getOrAddAnnotations()}getInheritedTag(f="# "){return Se(f,this.field.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,M;return(M=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&M!==void 0?M:new u.Tag}getTag(f="# "){var S,M;return(M=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&M!==void 0?M:this.getInheritedTag(f)}setTagProperty(f,S=null,M="# "){this.getOrAddAnnotations().setTagProperty(f,S,M)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}addWhere(f,S,M){const se=Array.isArray(S)?S:[],xe=M===void 0?S:M,Ae=typeof xe=="string"?xe:H(xe),De=this.list.segment.getInputSchema(),be=s.schemaGet(De,f,se);Oe(be,xe);const Le={filter:{kind:"filter_string",field_reference:{name:f,path:se},filter:Ae}};if(this.field.expression instanceof R)return this.field.expression.where.add(new j(Le)),this.field.expression;if(this.field.expression instanceof T){const Yn=this.field.expression.build();return this.field.expression=new R({kind:"filtered_field",field_reference:{name:Yn.name,path:Yn.path,parameters:Yn.parameters},where:[Le]}),this.field.expression}else throw new Error("This kind of expression does not support addWhere")}static fromReference(f,S,M){return new pe({kind:"aggregate",name:M,field:{expression:{kind:"field_reference",name:f,path:S}}})}}a.ASTAggregateViewOperation=pe;class O extends e{constructor(f){super(f,{expression:a.ASTExpression.from(f.expression),annotations:f.annotations&&new de(f.annotations)}),this.node=f}get expression(){return this.children.expression}set expression(f){this.edit(),this.children.expression=f,f.parent=this}get name(){return this.expression.name}get type(){const f=this.expression.fieldType;if(f===void 0)throw new Error("Field expression does not have a type");return f}get annotations(){return this.children.annotations}set annotations(f){this.edit(),this.children.annotations=f}getReference(){if(!(this.expression instanceof F))return this.expression.getReference()}getOrAddAnnotations(){if(this.annotations)return this.annotations;this.edit();const f=new de([]);return this.children.annotations=f,f.parent=this,f}getInheritedTag(f="# "){return Se(f,this.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,M;return(M=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&M!==void 0?M:new u.Tag}getTag(f="# "){var S,M;return(M=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&M!==void 0?M:this.getInheritedTag(f)}setTagProperty(f,S=null,M="# "){this.getOrAddAnnotations().setTagProperty(f,S,M)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}get segment(){return this.parent.list.segment}getInheritedAnnotations(){return this.expression.getInheritedAnnotations()}}a.ASTField=O,a.ASTExpression={from(B){switch(B.kind){case"field_reference":return new T(B);case"filtered_field":return new R(B);case"time_truncation":return new C(B);case"literal_value":return new F(B)}}};class T extends e{constructor(f){super(f,{kind:f.kind,name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.node=f,this.kind="field_reference"}get name(){return this.children.name}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}get field(){return this.parent.as.Field()}get path(){return this.children.path}getReference(){return this.build()}getFieldInfo(){const f=this.field.segment.getInputSchema(),S=o.schemaGet(f,this.name,this.path);if(S.kind!=="dimension"&&S.kind!=="measure")throw new Error("Invalid field for ASTReferenceExpression");return S}get fieldType(){return this.getFieldInfo().type}getInheritedAnnotations(){var f;return(f=this.getFieldInfo().annotations)!==null&&f!==void 0?f:[]}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}}a.ASTReferenceExpression=T;class C extends e{constructor(f){super(f,{kind:f.kind,field_reference:new c(f.field_reference),truncation:f.truncation}),this.node=f,this.kind="time_truncation"}getReference(){return this.fieldReference.build()}get fieldReference(){return this.children.field_reference}get truncation(){return this.children.truncation}set truncation(f){this.edit(),this.children.truncation=f}get name(){return this.fieldReference.name}get field(){return this.parent.as.Field()}getFieldInfo(){const f=this.field.segment.getInputSchema(),S=o.schemaGet(f,this.name,this.fieldReference.path);if(S.kind!=="dimension"&&S.kind!=="measure")throw new Error("Invalid field for ASTReferenceExpression");return S}get fieldType(){const f=this.getFieldInfo();if(f.type.kind==="date_type")return{...f.type,timeframe:k(this.truncation)};if(f.type.kind==="timestamp_type")return{...f.type,timeframe:this.truncation};throw new Error("This type of field cannot have a time truncation")}getInheritedAnnotations(){var f;return(f=this.getFieldInfo().annotations)!==null&&f!==void 0?f:[]}}a.ASTTimeTruncationExpression=C;class F extends e{constructor(f){super(f,{kind:f.kind,literal_value:a.ASTLiteralValue.from(f.literal_value)}),this.node=f,this.kind="time_truncation"}get name(){}get literalValue(){return this.children.literal_value}get fieldType(){return this.literalValue.fieldType}getInheritedAnnotations(){return[]}}a.ASTLiteralValueExpression=F;class j extends e{constructor(f){super(f,{filter:a.ASTFilter.from(f.filter)})}get filter(){return this.children.filter}get list(){return this.parent.as.FilterOperationList()}delete(){this.list.remove(this)}}a.ASTFilterOperation=j;class b extends i{constructor(f){super(f,f.map(S=>new j(S)))}get expression(){return this.parent.as.FilteredFieldExpression()}}a.ASTFilterOperationList=b;class R extends e{constructor(f){super(f,{kind:f.kind,field_reference:new c(f.field_reference),where:new b(f.where)}),this.node=f,this.kind="filtered_field"}getReference(){return this.fieldReference.build()}get fieldReference(){return this.children.field_reference}get name(){return this.fieldReference.name}get where(){return this.children.where}get field(){return this.parent.as.Field()}getFieldInfo(){const f=this.field.segment.getInputSchema(),S=o.schemaGet(f,this.name,this.fieldReference.path);if(S.kind!=="measure")throw new Error("Invalid field for ASTFilteredFieldExpression");return S}get fieldType(){return this.getFieldInfo().type}getInheritedAnnotations(){var f;return(f=this.getFieldInfo().annotations)!==null&&f!==void 0?f:[]}}a.ASTFilteredFieldExpression=R;function k(B){switch(B){case"day":case"week":case"month":case"year":case"quarter":return B;default:throw new Error("Invalid date timeframe")}}class V extends e{constructor(f){super(f,{kind:"nest",name:f.name,view:new le(f.view)}),this.node=f,this.kind="nest"}get view(){return this.children.view}get annotations(){return this.view.annotations}get name(){var f;const S=(f=this.children.name)!==null&&f!==void 0?f:this.view.name;if(S===void 0)throw new Error("Nest does not have a name");return S}set name(f){this.name!==f&&(this.edit(),this.view.name===f?this.children.name=void 0:this.children.name=f)}get list(){return this.parent.as.ViewOperationList()}getOrAddAnnotations(){return this.view.getOrAddAnnotations()}getInheritedTag(f="# "){return Se(f,this.view.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,M;return(M=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&M!==void 0?M:new u.Tag}getTag(f="# "){var S,M;return(M=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&M!==void 0?M:this.getInheritedTag(f)}setTagProperty(f,S=null,M="# "){this.getOrAddAnnotations().setTagProperty(f,S,M)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}delete(){this.list.remove(this)}rename(f){this.list.segment.renameField(this,f)}getFieldInfo(){return{kind:"view",name:this.name,definition:this.view.build(),schema:this.view.getOutputSchema()}}static fromReference(f,S,M){return new V({kind:"nest",name:M,view:{definition:{kind:"view_reference",name:f,path:S}}})}}a.ASTNestViewOperation=V;class G extends e{constructor(f){super(f,{kind:"where",filter:a.ASTFilter.from(f.filter)}),this.node=f,this.kind="where"}get filter(){return this.children.filter}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}}a.ASTWhereViewOperation=G;class U extends e{constructor(f){super(f,{kind:"drill",filter:a.ASTFilter.from(f.filter)}),this.node=f,this.kind="drill"}get filter(){return this.children.filter}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}}a.ASTDrillViewOperation=U;class z extends e{constructor(f){super(f,{kind:"having",filter:a.ASTFilter.from(f.filter)}),this.node=f,this.kind="having"}get filter(){return this.children.filter}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}}a.ASTHavingViewOperation=z,a.ASTFilter={from(B){switch(B.kind){case"filter_string":return new K(B);case"literal_equality":return new ie(B)}}};class K extends e{constructor(f){super(f,{kind:"filter_string",field_reference:new c(f.field_reference),filter:f.filter}),this.node=f,this.kind="filter_string"}get fieldReference(){return this.children.field_reference}get filterString(){return this.children.filter}set filterString(f){this.edit(),this.children.filter=f}setFilterString(f){const S=this.getFilterType();ee(this.filterString,S),this.filterString=f}getFieldInfo(){const f=this.fieldReference.getFieldInfo();if(f.kind!=="dimension"&&f.kind!=="measure")throw new Error("Invalid field type for filter with filter string");return f}getFilterType(){const f=this.getFieldInfo();return we(f)}setFilter(f){const S=this.getFilterType();if(S!==f.kind)throw new Error(`Invalid filter: expected type ${S}, got ${f.kind}`);this.filterString=H(f)}getFilter(){const f=this.getFilterType();return ee(this.filterString,f)}}a.ASTFilterWithFilterString=K;class ie extends e{constructor(f){super(f,{kind:"literal_equality",field_reference:new c(f.field_reference),value:a.ASTLiteralValue.from(f.value)}),this.node=f,this.kind="literal_equality"}get fieldReference(){return this.children.field_reference}get value(){return this.children.value}}a.ASTFilterWithLiteralEquality=ie;class le extends e{constructor(f){super(f,{definition:q.from(f.definition),annotations:f.annotations&&new de(f.annotations)}),this.node=f}get definition(){return this.children.definition}set definition(f){this.edit(),this.children.definition=f,f.parent=this}get name(){return this.definition.getImplicitName()}getOrAddDefaultSegment(){return this.definition.getOrAddDefaultSegment()}get nest(){return this.parent.as.NestViewOperation()}getInputSchema(){return this.nest.list.segment.getInputSchema()}getOutputSchema(){return this.definition.getRefinementSchema()}propagateUp(f){this.propagateDown(f)}propagateDown(f){f(this.definition),this.definition.propagateDown(f)}reorderFields(f){this.definition instanceof fe?this.definition.reorderFields(f):this.getOrAddAnnotations().setTagProperty(["field_order"],f)}get annotations(){return this.children.annotations}getOrAddAnnotations(){if(this.annotations)return this.annotations;this.edit();const f=new de([]);return this.children.annotations=f,f.parent=this,f}getInheritedAnnotations(){return this.definition.getInheritedAnnotations()}getInheritedTag(f="# "){return Se(f,this.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,M;return(M=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&M!==void 0?M:new u.Tag}getTag(f="# "){var S,M;return(M=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&M!==void 0?M:this.getInheritedTag(f)}setTagProperty(f,S=null,M="# "){this.getOrAddAnnotations().setTagProperty(f,S,M)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}}a.ASTView=le;class ce extends e{get limit(){return this.children.limit}set limit(f){ce.validateLimit(f),this.edit(),this.children.limit=f}constructor(f){super(f,{kind:f.kind,limit:f.limit}),this.node=f,this.kind="limit"}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}static validateLimit(f){if(!Number.isInteger(f))throw new Error("Limit must be an integer")}}a.ASTLimitViewOperation=ce;function X(B){switch(B){case"dimension":return"group by";case"measure":return"aggregate";case"view":return"nest";case"join":return"join"}}function ae(B){return B}class de extends i{constructor(f){super(f,f.map(S=>new ve(S)))}get items(){return this.children}getInheritedAnnotations(){return this.parent.getInheritedAnnotations()}getIntrinsicTag(f="# "){return Se(f,this.items)}getTag(f="# "){const S=u.Tag.fromTagLines(this.getInheritedAnnotations().map(M=>M.value)).tag;return Se(f,this.items,S)}get annotations(){return this.children.map(f=>f.node)}setTagProperty(f,S=null,M="# "){let se;for(let xe=this.items.length-1;xe>=0;xe--){const Ae=this.index(xe);if(Ae.hasPrefix(M)&&(se=Ae,Ae.hasIntrinsicTagProperty(f))){Ae.setTagProperty(f,S);return}}se?se.setTagProperty(f,S):this.add(new ve({value:new u.Tag({prefix:M}).set(f,S).toString()}))}removeTagProperty(f,S="# "){let M;for(let se=this.items.length-1;se>=0;se--){const xe=this.index(se);if(xe.hasPrefix(S)&&(M=xe,xe.hasIntrinsicTagProperty(f))){xe.removeTagProperty(f);return}}M?M.removeTagProperty(f):this.add(new ve({value:new u.Tag({prefix:S}).unset(...f).toString()}))}}a.ASTAnnotationList=de;class ve extends e{get value(){return this.children.value}set value(f){this.edit(),this.children.value=f}constructor(f){super(f,{value:f.value}),this.node=f}get list(){return this.parent.as.AnnotationList()}get index(){return this.list.indexOf(this)}delete(){this.list.remove(this)}getIntrinsicTag(){var f;return(f=u.Tag.fromTagLines([this.value]).tag)!==null&&f!==void 0?f:new u.Tag}getTag(){var f,S;const M=this.index===0?(f=u.Tag.fromTagLines(this.list.getInheritedAnnotations().map(se=>se.value)).tag)!==null&&f!==void 0?f:new u.Tag:this.list.index(this.index-1).getTag();return(S=u.Tag.fromTagLines([this.value],M).tag)!==null&&S!==void 0?S:new u.Tag}hasPrefix(f){return this.value.startsWith(f)}hasIntrinsicTagProperty(f){return this.getIntrinsicTag().has(...f)}setTagProperty(f,S){this.value=this.getIntrinsicTag().set(f,S).toString()}removeTagProperty(f){this.value=this.getTag().unset(...f).toString()}}a.ASTAnnotation=ve;function Se(B,f=[],S){var M;const xe=f.map(Ae=>Ae.value).filter(Ae=>typeof B=="string"?Ae.startsWith(B):Ae.match(B));return(M=u.Tag.fromTagLines(xe,S).tag)!==null&&M!==void 0?M:new u.Tag}function H(B){switch(B.kind){case"string":return r.StringFilterExpression.unparse(B.parsed);case"number":return r.NumberFilterExpression.unparse(B.parsed);case"boolean":return r.BooleanFilterExpression.unparse(B.parsed);case"timestamp":case"date":return r.TemporalFilterExpression.unparse(B.parsed)}}function ee(B,f){function S(M){const se=M.filter(xe=>xe.severity==="error");if(se.length!==0)throw new Error(`Invalid Malloy filter string: ${se[0].message}`)}switch(f){case"string":{const M=r.StringFilterExpression.parse(B);return S(M.log),{kind:f,parsed:M.parsed}}case"number":{const M=r.NumberFilterExpression.parse(B);return S(M.log),{kind:f,parsed:M.parsed}}case"boolean":{const M=r.BooleanFilterExpression.parse(B);return S(M.log),{kind:f,parsed:M.parsed}}case"timestamp":case"date":{const M=r.TemporalFilterExpression.parse(B);return S(M.log),{kind:f,parsed:M.parsed}}case"other":throw new Error("Not implemented")}}function he(B){return"kind"in B?B:{...B,kind:"source"}}function ge(B){switch(B){case"year":case"quarter":case"month":case"week":case"day":return!0;default:return!1}}function me(B,f){return B.toString().padStart(f,"0")}function Te(B){const f=me(B.getUTCFullYear(),4),S=me(B.getUTCMonth()+1,2),M=me(B.getUTCDate(),2),se=me(B.getUTCHours(),2),xe=me(B.getUTCMinutes(),2),Ae=me(B.getUTCSeconds(),2);return`${f}-${S}-${M} ${se}:${xe}:${Ae}`}function Ee(B,f){const S=B??[],M=f??[];return S.length===M.length&&S.every((se,xe)=>se===M[xe])}function we(B){switch(B.type.kind){case"string_type":return"string";case"boolean_type":return"boolean";case"number_type":return"number";case"date_type":return"date";case"timestamp_type":return"timestamp";default:return"other"}}function Oe(B,f){if(B.kind!=="dimension"&&B.kind!=="measure")throw new Error(`Cannot filter by field of type ${B.kind}`);const S=we(B);if(typeof f=="string")ee(f,S);else if(f.kind!==S)throw new Error(`Invalid filter for field ${B.name}; expected type ${S}, but got ${f.kind}`)}function Pe(B){if(B instanceof P)return B.getSourceInfo().schema;if(B instanceof $)throw new Error("unimplemented");return B.getInputSchema()}}(at)),at}var w0;function yd(){return w0||(w0=1,function(a){var d=Tr&&Tr.__createBinding||(Object.create?function(y,h,u,r){r===void 0&&(r=u);var o=Object.getOwnPropertyDescriptor(h,u);(!o||("get"in o?!h.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return h[u]}}),Object.defineProperty(y,r,o)}:function(y,h,u,r){r===void 0&&(r=u),y[r]=h[u]}),m=Tr&&Tr.__exportStar||function(y,h){for(var u in y)u!=="default"&&!Object.prototype.hasOwnProperty.call(h,u)&&d(h,y,u)};Object.defineProperty(a,"__esModule",{value:!0}),m(dd(),a)}(Tr)),Tr}var Ip=yd();const md=Lp(Ip),om=Bp({__proto__:null,default:md},[Ip]);export{xd as a,Ip as d,om as i,id as r};
|