docuvia 1.19.2 → 1.20.0

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.
@@ -1,3 +1,3 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{c as N,d as f,g as ce,h as de,i as u,j as ue,l as pe}from"./chunk-LAYFAWSJ.js";import{Ga as le,Ja as F,d as se}from"./chunk-5YVZPH7A.js";import"./chunk-KVOCOCYJ.js";import{parentPort as G}from"worker_threads";import{Parser as Ke,Language as Vn}from"web-tree-sitter";import*as ae from"path";import*as Ue from"fs";var je=new Map([["public_field_definition","field-annotation"],["field_definition","field-annotation"],["property_signature","field-annotation"],["required_parameter","parameter-annotation"],["optional_parameter","parameter-annotation"],["variable_declarator","variable-annotation"]]),me=new Set(["function_declaration","function_expression","generator_function","generator_function_declaration","arrow_function","method_definition","method_signature","abstract_method_signature"]),Qe=new Set(["function_type","constructor_type","call_signature","construct_signature","index_signature"]),K=new Map([["program","program"],["class_declaration","class"],["abstract_class_declaration","class"],["interface_declaration","interface"],["object","object"],["function_declaration","function"],["function_expression","function"],["generator_function","function"],["generator_function_declaration","function"],["arrow_function","function"],["method_definition","method"],["method_signature","method"],["abstract_method_signature","method"]]),Ge=new Set(["class_declaration","abstract_class_declaration","interface_declaration","object"]),qe=new Map([["method_definition","method"],["method_signature","method"],["abstract_method_signature","method"],["public_field_definition","field"],["field_definition","field"],["property_signature","field"]]),$=new Map([["function_declaration","function"],["function_expression","function-expression"],["generator_function","function-expression"],["generator_function_declaration","function"],["arrow_function","arrow"]]),$e=new Set(["comment","class_static_block"]),y=new Set(["identifier","type_identifier","property_identifier","private_property_identifier"]);function c(e){return{start:e.startIndex,end:e.endIndex}}function _(e){let t=[];for(let n=0;n<e.namedChildCount;n+=1){let r=e.namedChild(n);r&&t.push(r)}return t}function U(e){let t=[];for(let n=0;n<e.childCount;n+=1){let r=e.child(n);r&&t.push(r)}return t}function z(e,t){t(e);for(let n of _(e))z(n,t)}function H(e){let t=e.childForFieldName("name");return!t||!y.has(t.type)?null:t.text}function b(e){let t=e.childForFieldName("type_parameters");return t?_(t).filter(n=>n.type==="type_parameter").map(n=>n.childForFieldName("name")?.text).filter(n=>!!n):[]}function M(e){let t=K.get(e.type)??"program",n=t==="program"?null:H(e);return{kind:t,name:n,span:c(e),genericTypeParameterNames:b(e)}}function A(e){let t=e;for(;t;){if(K.has(t.type))return M(t);t=t.parent}return{kind:"program",name:null,span:{start:0,end:0},genericTypeParameterNames:[]}}function I(e,t){let n=e;for(;n;){if(t(n))return n;n=n.parent}return null}function V(e){return e.type==="class_declaration"||e.type==="abstract_class_declaration"}function Ne(e){return V(e)||e.type==="interface_declaration"}function C(e){return me.has(e.type)}function ze(e){let t=e.parent;for(;t;){if(C(t))return!1;if(Qe.has(t.type))return!0;t=t.parent}return!1}function ye(e){let t=e.parent;for(;t;){if(t.type==="object_type")return!0;t=t.parent}return!1}function ge(e){let t=H(e);if(t)return t;if(e.type!=="arrow_function"&&e.type!=="function_expression")return null;let n=e.parent;if(!n)return null;let r=n.type==="variable_declarator"?n.childForFieldName("name"):n.type==="pair"?n.childForFieldName("key"):null;return r&&y.has(r.type)?r.text:null}function S(e){let t=e;for(;t;){if(t.type==="program"||t.type==="class_body"||t.type==="interface_body"||t.type==="statement_block"||t.type==="object")return c(t);if(C(t)){let n=t.childForFieldName("body");return c(n??t)}t=t.parent}return c(e)}function he(e){if(e.type!=="variable_declarator")return null;let t=e.parent;if(t?.type!=="variable_declaration")return null;let n=t.parent;for(;n;){if(C(n)){let r=n.childForFieldName("body");return c(r??n)}if(n.type==="program")return c(n);n=n.parent}return null}function k(e,t){return U(e).some(n=>n.text===t)}function Je(e){let t=e.parent;for(;t;){if(t.type==="method_definition"&&H(t)==="constructor")return t;if(t.type==="class_body"||t.type==="program")return null;t=t.parent}return null}function _e(e,t){return t==="javascript"||!Je(e)?!1:U(e).some(n=>n.type==="accessibility_modifier"||n.text==="readonly")}function xe(e,t){let n=e.parent;for(;n;){if(b(n).includes(t))return!0;n=n.parent}return!1}function R(e){return!e||!y.has(e.type)?null:e}function Fe(e){if(!e||e.type!=="type_annotation")return null;let t=_(e).filter(n=>n.type!=="comment");return t.length===1?R(t[0]):null}function J(e){if(e.type==="required_parameter"||e.type==="optional_parameter"){let n=e.childForFieldName("pattern");return n&&y.has(n.type)?n.text:null}let t=e.childForFieldName("name")??e.childForFieldName("property");return t&&y.has(t.type)?t.text:null}function Xe(e,t){if(t==="return-annotation")return M(e);let n=t==="parameter-property"?I(e.parent,V):t==="parameter-annotation"?I(e.parent,C):t==="field-annotation"||t==="implements"||t==="extends"?I(e.parent,Ne):null;return n?M(n):A(e.parent)}function Ze(e,t){if(t==="variable-annotation"||t==="new-initializer"){let n=he(e);if(n)return n}if(t==="parameter-property"||t==="implements"||t==="extends"){let n=I(e.parent,V);if(n)return c(n.childForFieldName("body")??n)}return S(e)}function w(e,t,n,r,a){let i=R(n);if(!i||xe(i,i.text))return null;let o=Xe(a,e);return{kind:e,name:t,typeName:i.text,typeText:i.text,declarationSpan:c(r),typeSpan:c(i),owner:o,lexicalScopeSpan:Ze(r,e)}}function et(e,t){let n=je.get(e.type);if(!n||t==="javascript"||tt(e,n))return null;let r=e.childForFieldName("type");if(e.hasError||r?.hasError)return null;let a=Fe(r),i=n==="parameter-annotation"&&_e(e,t)?"parameter-property":n;return w(i,J(e),a,e,e)}function tt(e,t){return ye(e)||t==="parameter-annotation"&&ze(e)}function nt(e){if(ye(e))return null;let t=e.childForFieldName("return_type");if(e.hasError||t?.hasError)return null;let n=Fe(t);return w("return-annotation",ge(e),n,e,e)}function rt(e){let t=Ae(e);return t?w("new-initializer",J(e),t,e,e):null}function Ae(e){if(e.type!=="variable_declarator"&&e.type!=="public_field_definition"&&e.type!=="field_definition")return null;let t=e.childForFieldName("value");return e.hasError||t?.type!=="new_expression"||t.hasError||t.childForFieldName("type_arguments")?null:R(t.childForFieldName("constructor"))}function at(e){if(e.type!=="type_alias_declaration"||e.hasError)return null;let t=e.childForFieldName("name"),n=R(e.childForFieldName("value"));return!t||!y.has(t.type)||!n||xe(n,n.text)?null:{name:t.text,typeName:n.text,declarationSpan:c(e),typeSpan:c(n),owner:A(e.parent),scopeSpan:S(e.parent??e),genericTypeParameterNames:b(e),isExported:e.parent?.type==="export_statement"}}function it(e){let t=e.type==="interface_declaration"?"interface":e.type==="class_declaration"||e.type==="abstract_class_declaration"?"class":null,n=H(e);return!t||!n?null:{kind:t,name:n,declarationSpan:c(e),scopeSpan:S(e.parent??e),genericTypeParameterNames:b(e)}}function ot(e){if(e.type!=="variable_declarator")return null;let t=e.parent;if(!t)return null;let n=/^(const|let|var)\b/u.exec(t.text);return n?.[1]==="const"||n?.[1]==="let"||n?.[1]==="var"?n[1]:null}function st(e){return e.type==="assignment_expression"||e.type==="augmented_assignment_expression"||e.type==="for_in_statement"||e.type==="for_of_statement"?e.childForFieldName("left"):e.type==="update_expression"?_(e).find(t=>y.has(t.type))??null:null}function lt(e){let t=new Map;return z(e,n=>{let r=st(n);if(r&&y.has(r.type)&&r.text){let a=t.get(r.text)??[];a.push(n.startIndex),t.set(r.text,a)}}),t}function ct(e,t,n,r){return(e.get(t)??[]).some(a=>a>r&&a<=n.end)}function dt(e,t){let n=Ae(e),r=e.childForFieldName("name"),a=ot(e);if(!n||!r||!y.has(r.type)||!a)return null;let o=he(e)??S(e);return{name:r.text,typeName:n.text,declarationSpan:c(e),scopeSpan:o,bindingKind:a,isReassigned:ct(t,r.text,o,r.endIndex)}}function ut(e,t){if(e.hasError)return[];if(t==="javascript"&&e.type==="class_heritage")return pt(e);let n=ft(e);if(!n||!Nt(e))return[];let r=yt(e),a=A(e.parent);return r.map(i=>w(n,a.name,i,e,e)).filter(i=>i!==null)}function pt(e){let t=R(_(e)[0]??null),n=A(e.parent),r=w("extends",n.name,t,e,e);return r?[r]:[]}function ft(e){return e.type==="implements_clause"?"implements":e.type==="extends_clause"||e.type==="extends_type_clause"?"extends":null}function mt(e){let t=I(e.parent,Ne),n=I(e.parent,r=>r.type==="conditional_type"||r.type==="type_alias_declaration");return n&&(!t||n.startIndex>t.startIndex)?null:t}function Nt(e){let t=mt(e);return!t||e.childForFieldName("type_arguments")?!1:e.type==="extends_type_clause"?t.type==="interface_declaration":V(t)}function yt(e){if(e.type!=="extends_clause")return _(e);let t=e.childForFieldName("value");return t?[t]:[]}function q(e){return e.type==="ERROR"||e.isMissing||e.hasError}function Se(e,t){if(t?.startsWith("#"))return"private";let n=_(e).find(r=>r.type==="accessibility_modifier");return n?.text==="private"||n?.text==="protected"?n.text:"public"}function X(e){return U(e).some(t=>t.text==="?")}function gt(e){let t=e.childForFieldName("parameters");if(t)return _(t).filter(r=>r.type!=="comment");let n=e.childForFieldName("parameter");return n?[n]:[]}function Te(e){return e.childForFieldName("pattern")??e}function ht(e){return e.type==="rest_pattern"||Te(e)?.type==="rest_pattern"}function _t(e){return e.type==="optional_parameter"||e.type==="rest_pattern"||e.type==="assignment_pattern"||e.childForFieldName("value")?!0:U(e).some(t=>t.text==="?")}function xt(e){return Te(e)?.text==="this"}function B(e){let t=gt(e).filter(a=>!xt(a)),n=0,r=!1;return t.forEach((a,i)=>{ht(a)?r=!0:_t(a)||(n=i+1)}),{requiredParameterCount:n,maxParameterCount:r?null:t.length}}function Ft(e){let t=e.childForFieldName("name")??e.childForFieldName("property");return t&&y.has(t.type)?t.text:null}function fe(e,t,n,r){return{kind:"unknown",name:r,declarationSpan:c(e),owner:t,lexicalScopeSpan:c(e),visibility:null,isStatic:!1,isAbstract:!1,isOptional:!1,arity:null,genericTypeParameterNames:[],unsupportedReason:n}}function At(e,t,n){return e!=="method"?e:n==="constructor"?"constructor":k(t,"get")?"getter":k(t,"set")?"setter":e}function St(e,t){if(t==="method"||t==="constructor"||t==="getter"||t==="setter")return B(e);let r=e.childForFieldName("value");return r&&me.has(r.type)?B(r):null}function Tt(e,t){let n=qe.get(e.type),r=Ft(e);if(q(e))return fe(e,t,"syntax-error",r);if(!n||!r)return fe(e,t,r?"unsupported-member":"computed-name",r);let a=At(n,e,r);return{kind:a,name:r,declarationSpan:c(e),owner:t,lexicalScopeSpan:S(e),visibility:Se(e,r),isStatic:k(e,"static"),isAbstract:e.type==="abstract_method_signature"||k(e,"abstract"),isOptional:X(e),arity:St(e,a),genericTypeParameterNames:b(e)}}function Dt(e,t){let n=e.childForFieldName("key"),r=e.childForFieldName("value"),a=n&&y.has(n.type)?n.text:null;if(!a||!r||q(e)){let i=q(e)?"syntax-error":"computed-name";return{kind:"unknown",name:a,declarationSpan:c(e),owner:t,lexicalScopeSpan:c(e),visibility:null,isStatic:!1,isAbstract:!1,isOptional:!1,arity:null,genericTypeParameterNames:[],unsupportedReason:i}}return{kind:"field",name:a,declarationSpan:c(e),owner:t,lexicalScopeSpan:c(It(e,t)),visibility:"public",isStatic:!1,isAbstract:!1,isOptional:X(e),arity:C(r)?B(r):null,genericTypeParameterNames:[]}}function It(e,t){let n=e.parent;for(;n;){if(K.get(n.type)===t.kind&&n.startIndex===t.span.start&&n.endIndex===t.span.end)return n;n=n.parent}return e}function bt(e){return e.type==="object"?e:e.childForFieldName("body")}function Et(e,t,n){return{kind:"unknown",name:null,declarationSpan:c(e),owner:t,lexicalScopeSpan:c(n),visibility:null,isStatic:!1,isAbstract:!1,isOptional:!1,arity:null,genericTypeParameterNames:[],unsupportedReason:"computed-name"}}function Ct(e,t,n){let r=J(e);return r?{kind:"field",name:r,declarationSpan:c(e),owner:t,lexicalScopeSpan:c(n),visibility:Se(e,r),isStatic:!1,isAbstract:!1,isOptional:X(e),arity:null,genericTypeParameterNames:[]}:Et(e,t,n)}function Rt(e,t,n){let r=e.childForFieldName("parameters");return(r?_(r):[]).filter(a=>_e(a,"typescript")).map(a=>Ct(a,t,n))}function wt(e,t,n,r){if(e.type==="pair"&&t==="object")return[Dt(e,n)];let a=Tt(e,n),i=a.kind==="constructor"?Rt(e,n,r):[];return[a,...i]}function Ot(e,t,n){let r=[],a=new Set;e.hasError&&a.add("syntax-error");for(let i of _(e)){if($e.has(i.type))continue;let o=wt(i,t,n,e);r.push(...o);for(let s of o)s.unsupportedReason&&a.add(s.unsupportedReason)}return{declarations:r,reasons:a}}function vt(e){let t=M(e),n=bt(e),r=n?Ot(n,e.type,t):{declarations:[],reasons:new Set(["unsupported-member"])};return{inventory:{owner:t,complete:r.reasons.size===0,incompleteReasons:[...r.reasons].sort()},declarations:r.declarations}}function Pt(e){return{kind:$.get(e.type)??"function",name:ge(e),declarationSpan:c(e),owner:A(e.parent),lexicalScopeSpan:S(e),visibility:null,isStatic:!1,isAbstract:!1,isOptional:!1,arity:B(e),genericTypeParameterNames:b(e)}}function Lt(e){let t=e.parent;if(!t)return!1;let n=r=>r?.type===e.type&&r.startIndex===e.startIndex&&r.endIndex===e.endIndex;return!!((t.type==="public_field_definition"||t.type==="field_definition")&&n(t.childForFieldName("value"))||t.type==="pair"&&n(t.childForFieldName("value")))}function Mt(e){return e.type==="function_expression"&&e.parent?.type==="export_statement"&&/^export\s+default\s+(?:async\s+)?function(?:\s|\*|\()/u.test(e.parent.text)}function kt(e,t){return e.declarationSpan.start-t.declarationSpan.start||e.typeSpan.start-t.typeSpan.start||e.kind.localeCompare(t.kind)}function Bt(e,t){return e.declarationSpan.start-t.declarationSpan.start||e.declarationSpan.end-t.declarationSpan.end||e.kind.localeCompare(t.kind)}function Kt(e,t,n,r){let a=et(e,t);a&&r.facts.push(a);let i=nt(e);i&&r.facts.push(i);let o=rt(e);o&&r.facts.push(o);let s=at(e);s&&r.q3TypeAliases.push(s);let l=it(e);l&&r.q3Classes.push(l);let d=dt(e,n);d&&r.q3NewReceiverBindings.push(d),r.facts.push(...ut(e,t))}function Ut(e,t){if(!Ge.has(e.type))return;let n=`${e.startIndex}:${e.endIndex}:${e.type}`;if(t.visitedOwners.has(n))return;t.visitedOwners.add(n);let r=vt(e);t.ownerInventories.push(r.inventory),t.declarations.push(...r.declarations)}function Ht(e,t){!$.has(e.type)||Lt(e)&&!Mt(e)||t.declarations.push(Pt(e))}function Vt(e){if(e.type!=="variable_declarator"||e.hasError)return!1;let t=e.childForFieldName("name");if(!t||!y.has(t.type)||A(e.parent).kind!=="program")return!1;let n=e.childForFieldName("value");return!n||!$.has(n.type)}function Yt(e){let t=e.parent;for(;t&&t.type!=="program";){if(t.type==="export_statement")return!0;if(K.has(t.type))return!1;t=t.parent}return!1}function Wt(e){if(!Vt(e)||!Yt(e))return null;let t=e.childForFieldName("name");if(!t)return null;let n=A(e.parent);return{kind:"unknown",name:t.text,declarationSpan:c(e),owner:n,lexicalScopeSpan:S(e),visibility:null,isStatic:!1,isAbstract:!1,isOptional:!1,arity:null,genericTypeParameterNames:[]}}function jt(e,t,n,r){Kt(e,t,n,r),Ut(e,r),Ht(e,r);let a=Wt(e);a&&r.declarations.push(a)}function De(e,t){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript")throw new RangeError(`Unsupported declared-type grammar: ${String(t)}`);let n=[],r=[],a=[],i=[],o=[],s=[],l=lt(e),g={facts:n,declarations:r,ownerInventories:a,q3Classes:i,q3TypeAliases:o,q3NewReceiverBindings:s,visitedOwners:new Set};return z(e,p=>jt(p,t,l,g)),n.sort(kt),r.sort(Bt),a.sort((p,m)=>p.owner.span.start-m.owner.span.start||p.owner.kind.localeCompare(m.owner.kind)),o.sort((p,m)=>p.declarationSpan.start-m.declarationSpan.start),i.sort((p,m)=>p.declarationSpan.start-m.declarationSpan.start),s.sort((p,m)=>p.declarationSpan.start-m.declarationSpan.start),{schemaVersion:1,language:t,facts:n,declarations:r,ownerInventories:a,q3ReceiverFacts:{schemaVersion:1,classes:i,typeAliases:o,newReceiverBindings:s}}}var O=new Set(["arrow_function","function_declaration","function_expression","generator_function","generator_function_declaration","method_definition"]),Ie=new Set(["class_declaration","abstract_class_declaration","class"]),Gt=new Set(["class","class_declaration","abstract_class_declaration","function_expression","function_declaration","generator_function","generator_function_declaration"]),qt=new Set(["function_type","constructor_type","call_signature","construct_signature","index_signature","object_type"]),Z=new Set(["for_statement","for_in_statement","for_of_statement","for_await_statement"]),$t=new Set(["object_pattern","array_pattern","pair_pattern","assignment_pattern","object_assignment_pattern","rest_pattern"]),zt=/^[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}]*$/u;function h(e){return{start:e.startIndex,end:e.endIndex}}function T(e){let t=[];for(let n=0;n<e.namedChildCount;n+=1){let r=e.namedChild(n);r&&t.push(r)}return t}function Jt(e){let t=[];for(let n=0;n<e.childCount;n+=1){let r=e.child(n);r&&t.push(r)}return t}function j(e,t){t(e);for(let n of T(e))j(n,t)}function v(e,t){let n=e;for(;n;){if(t(n))return n;n=n.parent}return null}function Xt(e){let t=e.childForFieldName("name")??e.childForFieldName("pattern")??e.childForFieldName("declarator");return t?.type==="identifier"?t.text:null}function Y(e,t,n){return v(e.parent,t)??n}function Zt(e){return e.parent?.text.trimStart().match(/^(var|let|const)\b/)?.[1]}function en(e,t){if(e.type==="required_parameter"||e.type==="optional_parameter")return Y(e,a=>O.has(a.type),t);if(Zt(e)==="var")return Y(e,a=>O.has(a.type),t);let r=v(e.parent,a=>Z.has(a.type));return r||Y(e,a=>a.type==="statement_block",t)}function tn(e,t){return v(e.parent,n=>O.has(n.type))??t}function be(e){let t=e.parent;for(;t;){if(Ie.has(t.type))return t;if(t.type==="arrow_function"){t=t.parent;continue}if(O.has(t.type)&&!(t.type==="method_definition"&&t.parent?.type==="class_body"))return null;t=t.parent}return null}function nn(e){let t=be(e),n=t?.childForFieldName("name")?.text;return t&&n?{name:n,span:h(t)}:null}function rn(e,t,n){return n.type!=="public_field_definition"&&n.type!=="field_definition"||n.childForFieldName("name")?.text!==e?null:{kind:"field",name:e,declarationSpan:h(n),scopeSpan:h(t)}}function P(e){return e.type==="identifier"?[e.text]:e.type==="shorthand_property_identifier_pattern"||e.type==="shorthand_property_identifier"?[e.text]:$t.has(e.type)?T(e).flatMap(P):[]}function L(e,t,n,r,a){let i=W(n),o=e.get(i)??new Map;for(let s of a){let l=o.get(s);if(l){(l.declarationSpan.start!==t.startIndex||l.declarationSpan.end!==t.endIndex)&&o.set(s,{...l,kind:"unsupported"});continue}o.set(s,{name:s,declarationSpan:h(t),scopeSpan:h(n),kind:r})}e.set(i,o)}function an(e,t,n){if(v(e.parent,l=>qt.has(l.type)))return;let r=e.childForFieldName("name")??e.childForFieldName("pattern")??e.childForFieldName("declarator");if(!r)return;let a=P(r),i=r.type==="identifier",o=v(e.parent,l=>Z.has(l.type)),s=i&&(e.type==="required_parameter"||e.type==="optional_parameter")?"parameter":o?"unsupported":i?"local":"unsupported";L(n,e,en(e,t),s,a)}function on(e,t){if(!O.has(e.type))return;let n=e.childForFieldName("parameters"),r=e.childForFieldName("parameter"),a=n?T(n):r?[r]:[];for(let i of a){if(i.type==="required_parameter"||i.type==="optional_parameter")continue;let o=P(i);if(o.length===0)continue;let s=i.type==="identifier";L(t,i,e,s?"parameter":"unsupported",o)}}function sn(e,t,n){if(!Gt.has(e.type))return;let r=e.childForFieldName("name");if(r?.type!=="identifier"&&r?.type!=="type_identifier")return;let i=e.type==="class"||e.type==="function_expression"||e.type==="generator_function"?e:Y(e,o=>o.type==="statement_block",t);L(n,r,i,"unsupported",[r.text])}function ln(e,t){if(e.type!=="catch_clause")return;let n=e.childForFieldName("parameter");if(!n)return;let r=e.childForFieldName("body")??e;L(t,n,r,"unsupported",P(n))}function cn(e,t){if(!Z.has(e.type))return;let n=e.childForFieldName("left")??e.childForFieldName("initializer");if(!n)return;let r=n.type==="variable_declaration"?T(n).find(i=>i.type==="variable_declarator"):n,a=r?.type==="variable_declarator"?r.childForFieldName("name"):r;a&&L(t,a,e,"unsupported",P(a))}function dn(e,t,n){let r=n.get(W(e))??new Map;for(let[a,i]of un(t))pn(e,r,a,i);n.set(W(e),r)}function un(e){let t=new Map;for(let n of e){if(n.viaReexport)continue;let r=t.get(n.localName)??[];r.push(n),t.set(n.localName,r)}return t}function pn(e,t,n,r){let a=t.get(n),i=h(e);if(r.length!==1||a){t.set(n,{name:n,declarationSpan:a?.declarationSpan??i,scopeSpan:i,kind:"unsupported"});return}t.set(n,{name:n,declarationSpan:i,scopeSpan:i,kind:r[0]?.isTypeOnly?"type-only-import":"import"})}function fn(e,t){let n=new Map;return j(e,r=>{(r.type==="required_parameter"||r.type==="optional_parameter"||r.type==="variable_declarator")&&an(r,e,n),on(r,n),sn(r,e,n),ln(r,n),cn(r,n)}),dn(e,t,n),n}function ee(e,t){return`${e.startIndex}:${t}`}function W(e){return`${e.type}:${e.startIndex}:${e.endIndex}`}function Ee(e,t,n){e.set(t,e.has(t)?null:n)}function mn(e){return Jt(e).some(t=>t.type==="accessibility_modifier"||t.text==="readonly")}function Nn(e,t,n){if(t.type!=="method_definition"||t.childForFieldName("name")?.text!=="constructor")return;let r=t.childForFieldName("parameters");for(let a of r?T(r):[]){let i=Xt(a);!i||!mn(a)||Ee(n,ee(e,i),{kind:"parameter-property",name:i,declarationSpan:h(a),scopeSpan:h(e)})}}function yn(e,t){let n=e.childForFieldName("body");for(let r of n?T(n):[]){let a=r.childForFieldName("name")?.text,i=a?rn(a,e,r):null;i&&Ee(t,ee(e,a),i),Nn(e,r,t)}}function gn(e){let t=new Map;return j(e,n=>{Ie.has(n.type)&&yn(n,t)}),t}function Ce(e,t,n){return`${e}:${t}:${n}`}function hn(e,t){let n=new Map;return j(e,r=>{if(r.type!=="call_expression")return;let a=r.childForFieldName("function");if(!a)return;let i=a.childForFieldName("property")??a.childForFieldName("name")??a,o=a.childForFieldName("property")?.text??a.text,s=Ce(i.startPosition.row,i.startPosition.column,o);n.set(s,[...n.get(s)??[],r])}),{callExpressions:n,bindingsByScope:fn(e,t),propertiesByClassAndName:gn(e)}}function _n(e,t,n){let r=be(t);if(e==="this")return r?{kind:"this",name:"this",declarationSpan:h(r),scopeSpan:h(r)}:null;let a=e.match(/^this\.([\p{ID_Start}_$][\p{ID_Continue}$]*)$/u);if(a)return r?n.propertiesByClassAndName.get(ee(r,a[1]))??null:null}function xn(e,t,n){if(!e)return null;let r=_n(e,t,n);if(r!==void 0)return r;if(!zt.test(e))return null;let a=Re(e,t,n);return a?Fn(e,a):null}function Re(e,t,n){let r=t;for(;r;){let a=n.bindingsByScope.get(W(r))?.get(e);if(a)return a;r=r.parent}}function Fn(e,t){return!t||t.kind==="unsupported"||t.kind==="import"||t.kind==="type-only-import"?null:{kind:t.kind,name:e,declarationSpan:t.declarationSpan,scopeSpan:t.scopeSpan}}function An(e,t,n){if((e.calleeKind??"bare")!=="bare")return null;let a=e.calleeName,i=Re(a,t,n);return i?{kind:i.kind==="import"||i.kind==="type-only-import"||i.kind==="local"||i.kind==="parameter"?i.kind:"unsupported",name:a,declarationSpan:i.declarationSpan,scopeSpan:i.scopeSpan}:{kind:"unbound",name:a}}function Sn(e){switch(e.type){case"string":return"string";case"number":return"number";case"true":case"false":return"boolean";case"null":return"null";case"object":return"object";case"array":return"array";case"arrow_function":case"function_expression":return"function";default:return"unknown"}}function Tn(e,t){return t?[e.start,e.end,t.kind,t.declarationSpan.start,t.declarationSpan.end,t.scopeSpan.start,t.scopeSpan.end].join(":"):null}function Dn(e,t){if(!e.calleeName||e.calleeKind==="computed")return null;let n=t.callExpressions.get(Ce(e.startLine,e.startColumn,e.calleeName));return n?.length===1?n[0]??null:null}function In(e){return!!e.calleeName&&e.calleeKind!=="computed"}function bn(e,t,n,r){let a=t.childForFieldName("arguments"),i=a?T(a).filter(D=>D.type!=="comment"):[],o=i.some(D=>D.type==="spread_element"),s=tn(t,n),l=xn(e.receiverText,t,r),d=An(e,t,r),g=t.childForFieldName("arguments")?.startIndex,p=t.text.slice(0,g===void 0?t.text.length:g-t.startIndex),m={startLine:e.startLine,startColumn:e.startColumn,calleeName:e.calleeName??"",calleeKind:e.calleeKind??"bare",receiverText:e.receiverText??null,receiverBinding:l,receiverOptional:p.includes("?."),calleeBinding:d,lexicalScopeSpan:h(s),callerType:nn(t),argumentCount:o?null:i.length,hasSpreadArgument:o,argumentKinds:i.map(Sn)};return{fact:m,peerKey:Tn(m.lexicalScopeSpan,l)}}function En(e,t,n){if(!n||t.calleeKind!=="member"&&t.calleeKind!=="this")return;let r=e.get(n)??new Set;r.add(t.calleeName),e.set(n,r)}function we(e,t,n,r){let a=hn(e,r),i=n.flatMap(l=>{if(!In(l))return[];let d=Dn(l,a);return d?[bn(l,d,e,a)]:[]}),o=new Map;for(let{fact:l,peerKey:d}of i)En(o,l,d);let s=i.map(({fact:l,peerKey:d})=>({...l,peerMemberNames:[...d?o.get(d)??[]:[]].filter(g=>g!==l.calleeName).sort()}));return{schemaVersion:2,language:t,callSites:s}}import{createHash as Rn}from"crypto";var wn=new Set([N.VARIABLE_DECLARATOR,N.ASSIGNMENT_EXPRESSION,N.PAIR,N.PUBLIC_FIELD_DEFINITION]),On=new Set([u.ARROW_FUNCTION,u.FUNCTION_EXPRESSION,u.FUNCTION_DECLARATION,u.GENERATOR_FUNCTION,u.GENERATOR_FUNCTION_DECLARATION,u.FUNCTION_DEFINITION,u.METHOD_DECLARATION,u.METHOD_DEFINITION,u.LOCAL_FUNCTION_STATEMENT,u.CONSTRUCTOR_DECLARATION,u.DESTRUCTOR_DECLARATION,u.CONVERSION_OPERATOR_DECLARATION,u.OPERATOR_DECLARATION,u.COMPACT_CONSTRUCTOR_DECLARATION,u.METHOD,u.SINGLETON_METHOD,u.FUNCTION_ITEM]);function te(e){return Rn(le).update(e.text).digest("hex")}function ne(e){return e.childForFieldName("name")?.text||e.descendantsOfType(u.IDENTIFIER)[0]?.text||f.ANONYMOUS_NAME}function vn(e){return e.childForFieldName("declarator")?.childForFieldName("declarator")}function Pn(e){let t=e.childForFieldName("name");if(t)return{name:t.text,nameNode:t};let n=vn(e);if(!n)return;if(n.type!==N.QUALIFIED_IDENTIFIER)return{name:n.text,nameNode:n};let r=n.childForFieldName("name");return{name:r?.text??f.ANONYMOUS_NAME,nameNode:r}}function Ln(e){let t=e.parent;for(;t;){if(t.type===N.ARGUMENTS||On.has(t.type))return;if(wn.has(t.type)){let n=t.childForFieldName("name")||t.childForFieldName("key")||t.childForFieldName("left");if(n)return{name:n.text,nameNode:n}}t=t.parent}}function Oe(e){return Pn(e)??Ln(e)??{name:f.ANONYMOUS_NAME,nameNode:void 0}}function Mn(e){return Oe(e).name}function E(e,t){let n=e.parent;for(;n;){if(t.has(n.id))return ne(n);n=n.parent}return f.ANONYMOUS_NAME}function ve(e){return e.type===N.TYPE_IDENTIFIER?e.text:e.descendantsOfType(N.TYPE_IDENTIFIER)[0]?.text}function kn(e){let t=e.parent;for(;t;){if(t.type===N.IMPL_ITEM){let n=t.childForFieldName("type");return n?ve(n):void 0}t=t.parent}}function Bn(e){let n=e.childForFieldName("receiver")?.namedChild(0)?.childForFieldName("type");return n?ve(n):void 0}function Kn(e){let n=e.childForFieldName("declarator")?.childForFieldName("declarator");if(n?.type!==N.QUALIFIED_IDENTIFIER)return;let r=n.childForFieldName("scope");if(r)return r.type===N.QUALIFIED_IDENTIFIER?r.childForFieldName("name")?.text:r.text}function Un(e){return kn(e)??Bn(e)??Kn(e)}function Pe(e,t,n){let r=t.extractClasses(e.rootNode);for(let a of r)n.push({name:ne(a),startLine:a.startPosition.row,endLine:a.endPosition.row,methods:[],contentHash:te(a)});return r}var Hn=new Set([u.ARROW_FUNCTION,u.FUNCTION_EXPRESSION]);function Le(e,t,n){let r=t.extractVariables?.(e.rootNode)??[],a=[];for(let i of r){let o=i.childForFieldName("value");o&&Hn.has(o.type)||(a.push(i),n.push({name:ne(i),startLine:i.startPosition.row,endLine:i.endPosition.row,contentHash:te(i)}))}return a}function re(e,t,n,r){let a=new Set(r.map(o=>o.id)),i=t.extractFunctions(e.rootNode);for(let o of i){let s=E(o,a),l=s===f.ANONYMOUS_NAME?Un(o):s;n.push({name:Oe(o).name,startLine:o.startPosition.row,endLine:o.endPosition.row,declarationSpan:{start:o.startIndex,end:o.endIndex},contentHash:te(o),containerName:l})}return i}var ie=new se(e=>G?.postMessage(e));process.on("uncaughtException",e=>{ie.error(f.WORKER_UNCAUGHT_EXCEPTION,{error:e instanceof Error?e.message:String(e)})});process.on("unhandledRejection",e=>{ie.error(f.WORKER_UNHANDLED_REJECTION,{error:e instanceof Error?e.message:String(e)})});var Me=!1,ke=null;function Yn(){return ke??=ue(),ke}var Be=new Map;function Wn(e){let t=Be.get(e);return t||(t=Vn.load(e),Be.set(e,t)),t}function jn(e){let t=[],n=e.matchAll(/import\s+{([^}]+)}\s+from\s+['"]([^'"]+)['"]/g);for(let r of n)t.push({localName:r[1].trim(),originalName:r[1].trim(),modulePath:r[2]});return t}function Qn(e){return e.childForFieldName("function")||e.childForFieldName("expression")||e.childForFieldName("type")||e.childForFieldName("name")||e.childForFieldName("method")||e}function Gn(e){let t=Qn(e),n=t.namedChildren,r=n[n.length-1],a=n.length>=2?n[n.length-2]:void 0;if(!r||!a)return{targetFunction:Q(t.text),calleeName:t.text,calleeKind:"bare"};if(!qn.has(r.type))return{targetFunction:Q(t.text),calleeKind:"computed"};let i=r.text,o=a.text;return o.includes("(")?{targetFunction:Q(t.text),calleeName:i,receiverText:o,calleeKind:"arg-chain"}:{targetFunction:Q(t.text),calleeName:i,receiverText:o,calleeKind:o==="this"||o==="super"?"this":"member"}}function Q(e){return e.replace(/\s+/g,"")}var qn=new Set(["identifier","property_identifier","field_identifier","shorthand_property_identifier","attribute"]);function $n(e){return((e.childForFieldName("property")||e.childForFieldName("field")||e.childForFieldName("attribute")||e.childForFieldName("name")||e.childForFieldName("method"))??e).startPosition}function zn(e,t,n,r){let a=new Set(n.map(o=>o.id)),i=t.extractCalls(e.rootNode);for(let o of i){if(r.length>=1e3)break;let s=$n(o),l=Gn(o);r.push({sourceFunction:E(o,a),targetFunction:l.targetFunction,startLine:s.row,startColumn:s.column,calleeName:l.calleeName,receiverText:l.receiverText,calleeKind:l.calleeKind})}}function Jn(e,t,n,r){if(!t.extractImplements)return;let a=new Set(n.map(i=>i.id));for(let i of t.extractImplements(e.rootNode))r.push({sourceClass:E(i,a),targetInterface:i.text})}function Xn(e,t,n,r){if(!t.extractExtends)return;let a=new Set(n.map(i=>i.id));for(let i of t.extractExtends(e.rootNode))r.push({sourceClass:E(i,a),targetClass:i.text})}var Zn=new Set([F.TYPESCRIPT,F.JAVASCRIPT]),er="Worker",tr="path",nr="resolve",rr="join",ar="__dirname";function ir(e){if(e.type!=="call_expression")return!1;let t=e.childForFieldName("function");if(!t||t.type!=="member_expression")return!1;let n=t.childForFieldName("object")?.text,r=t.childForFieldName("property")?.text;return n===tr&&(r===nr||r===rr)}function or(e){let t=e.childForFieldName("arguments");return!t||!t.namedChildren.some(a=>a?.type==="identifier"&&a.text===ar)?void 0:t.descendantsOfType("string")[0]?.text.replace(/['"]/g,"")}function sr(e,t){for(let n of e.rootNode.descendantsOfType(N.ASSIGNMENT_EXPRESSION)){if(!n)continue;let r=n.childForFieldName("left"),a=n.childForFieldName("right");if(r?.text!==t||!a||!ir(a))continue;let i=or(a);if(i)return i}}function lr(e,t){if(t.type==="string")return t.text.replace(/['"]/g,"");if(t.type==="identifier"||t.type==="member_expression")return sr(e,t.text)}function cr(e,t,n,r){if(!Zn.has(t))return;let a=new Set(n.map(i=>i.id));for(let i of e.rootNode.descendantsOfType("new_expression")){if(!i||i.childForFieldName("constructor")?.text!==er)continue;let l=i.childForFieldName("arguments")?.namedChildren.find(g=>g!==null);if(!l)continue;let d=lr(e,l);d&&r.push({sourceFunction:E(i,a),targetPath:d})}}function He(e){let t=[];for(let n=0;n<e.namedChildCount;n+=1){let r=e.namedChild(n);r&&t.push(r)}return t}function dr(e){let t=[];for(let n of He(e))t.push(...ur(n));return t}function ur(e){if(e.type!=="export_statement")return[];if(/^export\s+default\b/u.test(e.text))return[pr(e)];let t=e.childForFieldName("declaration");return t?fr(t):[]}function pr(e){let t=/^export\s+default\s+(?:async\s+)?function(?:\s|\*|\()/u.test(e.text),n=[...e.descendantsOfType("function_declaration"),...e.descendantsOfType("generator_function_declaration"),...e.descendantsOfType("function_expression"),...e.descendantsOfType("generator_function"),...e.descendantsOfType("class_declaration"),...e.descendantsOfType("abstract_class_declaration")].filter(i=>i!==null),r=e.childForFieldName("declaration")??n.sort((i,o)=>i.startIndex-o.startIndex)[0];return r&&t&&["function_declaration","generator_function_declaration","function_expression","generator_function"].includes(r.type)?{name:"default",type:"function",declarationSpan:{start:r.startIndex,end:r.endIndex}}:{name:"default",type:r?.type==="class_declaration"||r?.type==="abstract_class_declaration"?"class":"other",declarationSpan:r?{start:r.startIndex,end:r.endIndex}:{start:e.startIndex,end:e.endIndex}}}function fr(e){let t=mr(e);if(t)return[t];let n=Nr(e);return n?[n]:e.type!=="lexical_declaration"&&e.type!=="variable_declaration"?[]:yr(e)}function mr(e){if(e.type!=="class_declaration"&&e.type!=="abstract_class_declaration")return;let t=e.childForFieldName("name");return t&&["identifier","type_identifier"].includes(t.type)?{name:t.text,type:"class"}:void 0}function Nr(e){if(e.type!=="function_declaration"&&e.type!=="generator_function_declaration")return;let t=e.childForFieldName("name");return t?.type==="identifier"?{name:t.text,type:"function"}:void 0}function yr(e){let t=[];for(let n of He(e)){if(n.type!=="variable_declarator")continue;let r=n.childForFieldName("name");r?.type==="identifier"&&t.push({name:r.text,type:"variable"})}return t}function gr(e,t,n){let r=[],a=[],i=[],o,s=[],l=[],d=[],g=[],p=[],m=[],D=[];if(e){r.push(f.parsedViaTreeSitter(e.rootNode.childCount));try{i.push(...dr(e.rootNode)),(n===F.TYPESCRIPT||n===F.JAVASCRIPT)&&(o=de(e.rootNode));let x=Pe(e,t,l),oe=re(e,t,s,x),Ve=t.extractImports(e.rootNode);a.push(...ce(Ve)),Le(e,t,d),zn(e,t,oe,g),Jn(e,t,x,p),Xn(e,t,x,m),cr(e,n,oe,D),r.push(f.QUERIED_VIA_LANGUAGE_PROVIDER)}catch(x){r.push(f.providerQueryFailed(x instanceof Error?x.message:String(x)))}}return{imports:a,exports:i,...o===void 0?{}:{reexports:o},functions:s,classes:l,variables:d,calls:g,implements:p,extends:m,workerSpawns:D,decisions:r}}function hr(e,t){for(let n of e.drainQueryCompileFailures?.()??[])ie.error(f.QUERY_COMPILE_FAILED,{language:t,kind:n.kind,pattern:n.pattern,message:n.message})}function _r(e,t,n,r,a){let i=new Ke;i.setLanguage(n),t.initQueries?.(n),hr(t,r);let o=i.parse(e),s=gr(o,t,r),l=xr(r,a),d=o&&l?{...s,declaredTypeFacts:De(o.rootNode,l),callSiteShapeFacts:we(o.rootNode,l,s.calls,s.imports)}:s;return o&&o.delete(),i.delete(),d}function xr(e,t){if(e===F.TYPESCRIPT)return ae.extname(t).toLowerCase()===".tsx"?"tsx":"typescript";if(e===F.JAVASCRIPT)return"javascript"}async function Fr(e){Me||(await Ke.init(),Me=!0);let t=await Yn(),n=ae.extname(e.filePath),r=t.getProviderForExtension(n);if(!r)return{taskId:e.taskId,success:!0,data:{imports:[],exports:[],functions:[],classes:[],calls:[],decisions:[f.noLanguageProviderForExtension(n)]}};let{wasmPath:a,attemptedPaths:i}=pe(r.wasm_file);if(!Ue.existsSync(a))return{taskId:e.taskId,success:!0,data:{imports:jn(e.code),exports:[],functions:[],classes:[],calls:[],decisions:[f.wasmNotFound(e.language,i.join(", "))]}};let o=await Wn(a),s=_r(e.code,r,o,e.language,e.filePath);return{taskId:e.taskId,success:!0,data:s}}G?.on("message",async e=>{try{let t=await Fr(e);G?.postMessage(t)}catch(t){G?.postMessage({taskId:e.taskId,success:!1,error:t.stack||String(t)})}});export{Fr as buildParseResponse,re as collectFunctionNodes,cr as collectWorkerSpawns,Gn as getCalleeEvidence,hr as reportQueryCompileFailures,Mn as resolveCallableName,pe as resolveWasmPath};
2
+ import{c as N,d as f,g as ce,h as de,i as u,j as ue,l as pe}from"./chunk-34USPXMP.js";import{Ha as le,Ka as F,d as se}from"./chunk-2OLMINDD.js";import"./chunk-KVOCOCYJ.js";import{parentPort as G}from"worker_threads";import{Parser as Ke,Language as Vn}from"web-tree-sitter";import*as ae from"path";import*as Ue from"fs";var je=new Map([["public_field_definition","field-annotation"],["field_definition","field-annotation"],["property_signature","field-annotation"],["required_parameter","parameter-annotation"],["optional_parameter","parameter-annotation"],["variable_declarator","variable-annotation"]]),me=new Set(["function_declaration","function_expression","generator_function","generator_function_declaration","arrow_function","method_definition","method_signature","abstract_method_signature"]),Qe=new Set(["function_type","constructor_type","call_signature","construct_signature","index_signature"]),K=new Map([["program","program"],["class_declaration","class"],["abstract_class_declaration","class"],["interface_declaration","interface"],["object","object"],["function_declaration","function"],["function_expression","function"],["generator_function","function"],["generator_function_declaration","function"],["arrow_function","function"],["method_definition","method"],["method_signature","method"],["abstract_method_signature","method"]]),Ge=new Set(["class_declaration","abstract_class_declaration","interface_declaration","object"]),qe=new Map([["method_definition","method"],["method_signature","method"],["abstract_method_signature","method"],["public_field_definition","field"],["field_definition","field"],["property_signature","field"]]),$=new Map([["function_declaration","function"],["function_expression","function-expression"],["generator_function","function-expression"],["generator_function_declaration","function"],["arrow_function","arrow"]]),$e=new Set(["comment","class_static_block"]),y=new Set(["identifier","type_identifier","property_identifier","private_property_identifier"]);function c(e){return{start:e.startIndex,end:e.endIndex}}function _(e){let t=[];for(let n=0;n<e.namedChildCount;n+=1){let r=e.namedChild(n);r&&t.push(r)}return t}function U(e){let t=[];for(let n=0;n<e.childCount;n+=1){let r=e.child(n);r&&t.push(r)}return t}function z(e,t){t(e);for(let n of _(e))z(n,t)}function H(e){let t=e.childForFieldName("name");return!t||!y.has(t.type)?null:t.text}function b(e){let t=e.childForFieldName("type_parameters");return t?_(t).filter(n=>n.type==="type_parameter").map(n=>n.childForFieldName("name")?.text).filter(n=>!!n):[]}function M(e){let t=K.get(e.type)??"program",n=t==="program"?null:H(e);return{kind:t,name:n,span:c(e),genericTypeParameterNames:b(e)}}function A(e){let t=e;for(;t;){if(K.has(t.type))return M(t);t=t.parent}return{kind:"program",name:null,span:{start:0,end:0},genericTypeParameterNames:[]}}function I(e,t){let n=e;for(;n;){if(t(n))return n;n=n.parent}return null}function V(e){return e.type==="class_declaration"||e.type==="abstract_class_declaration"}function Ne(e){return V(e)||e.type==="interface_declaration"}function C(e){return me.has(e.type)}function ze(e){let t=e.parent;for(;t;){if(C(t))return!1;if(Qe.has(t.type))return!0;t=t.parent}return!1}function ye(e){let t=e.parent;for(;t;){if(t.type==="object_type")return!0;t=t.parent}return!1}function ge(e){let t=H(e);if(t)return t;if(e.type!=="arrow_function"&&e.type!=="function_expression")return null;let n=e.parent;if(!n)return null;let r=n.type==="variable_declarator"?n.childForFieldName("name"):n.type==="pair"?n.childForFieldName("key"):null;return r&&y.has(r.type)?r.text:null}function S(e){let t=e;for(;t;){if(t.type==="program"||t.type==="class_body"||t.type==="interface_body"||t.type==="statement_block"||t.type==="object")return c(t);if(C(t)){let n=t.childForFieldName("body");return c(n??t)}t=t.parent}return c(e)}function he(e){if(e.type!=="variable_declarator")return null;let t=e.parent;if(t?.type!=="variable_declaration")return null;let n=t.parent;for(;n;){if(C(n)){let r=n.childForFieldName("body");return c(r??n)}if(n.type==="program")return c(n);n=n.parent}return null}function k(e,t){return U(e).some(n=>n.text===t)}function Je(e){let t=e.parent;for(;t;){if(t.type==="method_definition"&&H(t)==="constructor")return t;if(t.type==="class_body"||t.type==="program")return null;t=t.parent}return null}function _e(e,t){return t==="javascript"||!Je(e)?!1:U(e).some(n=>n.type==="accessibility_modifier"||n.text==="readonly")}function xe(e,t){let n=e.parent;for(;n;){if(b(n).includes(t))return!0;n=n.parent}return!1}function R(e){return!e||!y.has(e.type)?null:e}function Fe(e){if(!e||e.type!=="type_annotation")return null;let t=_(e).filter(n=>n.type!=="comment");return t.length===1?R(t[0]):null}function J(e){if(e.type==="required_parameter"||e.type==="optional_parameter"){let n=e.childForFieldName("pattern");return n&&y.has(n.type)?n.text:null}let t=e.childForFieldName("name")??e.childForFieldName("property");return t&&y.has(t.type)?t.text:null}function Xe(e,t){if(t==="return-annotation")return M(e);let n=t==="parameter-property"?I(e.parent,V):t==="parameter-annotation"?I(e.parent,C):t==="field-annotation"||t==="implements"||t==="extends"?I(e.parent,Ne):null;return n?M(n):A(e.parent)}function Ze(e,t){if(t==="variable-annotation"||t==="new-initializer"){let n=he(e);if(n)return n}if(t==="parameter-property"||t==="implements"||t==="extends"){let n=I(e.parent,V);if(n)return c(n.childForFieldName("body")??n)}return S(e)}function w(e,t,n,r,a){let i=R(n);if(!i||xe(i,i.text))return null;let o=Xe(a,e);return{kind:e,name:t,typeName:i.text,typeText:i.text,declarationSpan:c(r),typeSpan:c(i),owner:o,lexicalScopeSpan:Ze(r,e)}}function et(e,t){let n=je.get(e.type);if(!n||t==="javascript"||tt(e,n))return null;let r=e.childForFieldName("type");if(e.hasError||r?.hasError)return null;let a=Fe(r),i=n==="parameter-annotation"&&_e(e,t)?"parameter-property":n;return w(i,J(e),a,e,e)}function tt(e,t){return ye(e)||t==="parameter-annotation"&&ze(e)}function nt(e){if(ye(e))return null;let t=e.childForFieldName("return_type");if(e.hasError||t?.hasError)return null;let n=Fe(t);return w("return-annotation",ge(e),n,e,e)}function rt(e){let t=Ae(e);return t?w("new-initializer",J(e),t,e,e):null}function Ae(e){if(e.type!=="variable_declarator"&&e.type!=="public_field_definition"&&e.type!=="field_definition")return null;let t=e.childForFieldName("value");return e.hasError||t?.type!=="new_expression"||t.hasError||t.childForFieldName("type_arguments")?null:R(t.childForFieldName("constructor"))}function at(e){if(e.type!=="type_alias_declaration"||e.hasError)return null;let t=e.childForFieldName("name"),n=R(e.childForFieldName("value"));return!t||!y.has(t.type)||!n||xe(n,n.text)?null:{name:t.text,typeName:n.text,declarationSpan:c(e),typeSpan:c(n),owner:A(e.parent),scopeSpan:S(e.parent??e),genericTypeParameterNames:b(e),isExported:e.parent?.type==="export_statement"}}function it(e){let t=e.type==="interface_declaration"?"interface":e.type==="class_declaration"||e.type==="abstract_class_declaration"?"class":null,n=H(e);return!t||!n?null:{kind:t,name:n,declarationSpan:c(e),scopeSpan:S(e.parent??e),genericTypeParameterNames:b(e)}}function ot(e){if(e.type!=="variable_declarator")return null;let t=e.parent;if(!t)return null;let n=/^(const|let|var)\b/u.exec(t.text);return n?.[1]==="const"||n?.[1]==="let"||n?.[1]==="var"?n[1]:null}function st(e){return e.type==="assignment_expression"||e.type==="augmented_assignment_expression"||e.type==="for_in_statement"||e.type==="for_of_statement"?e.childForFieldName("left"):e.type==="update_expression"?_(e).find(t=>y.has(t.type))??null:null}function lt(e){let t=new Map;return z(e,n=>{let r=st(n);if(r&&y.has(r.type)&&r.text){let a=t.get(r.text)??[];a.push(n.startIndex),t.set(r.text,a)}}),t}function ct(e,t,n,r){return(e.get(t)??[]).some(a=>a>r&&a<=n.end)}function dt(e,t){let n=Ae(e),r=e.childForFieldName("name"),a=ot(e);if(!n||!r||!y.has(r.type)||!a)return null;let o=he(e)??S(e);return{name:r.text,typeName:n.text,declarationSpan:c(e),scopeSpan:o,bindingKind:a,isReassigned:ct(t,r.text,o,r.endIndex)}}function ut(e,t){if(e.hasError)return[];if(t==="javascript"&&e.type==="class_heritage")return pt(e);let n=ft(e);if(!n||!Nt(e))return[];let r=yt(e),a=A(e.parent);return r.map(i=>w(n,a.name,i,e,e)).filter(i=>i!==null)}function pt(e){let t=R(_(e)[0]??null),n=A(e.parent),r=w("extends",n.name,t,e,e);return r?[r]:[]}function ft(e){return e.type==="implements_clause"?"implements":e.type==="extends_clause"||e.type==="extends_type_clause"?"extends":null}function mt(e){let t=I(e.parent,Ne),n=I(e.parent,r=>r.type==="conditional_type"||r.type==="type_alias_declaration");return n&&(!t||n.startIndex>t.startIndex)?null:t}function Nt(e){let t=mt(e);return!t||e.childForFieldName("type_arguments")?!1:e.type==="extends_type_clause"?t.type==="interface_declaration":V(t)}function yt(e){if(e.type!=="extends_clause")return _(e);let t=e.childForFieldName("value");return t?[t]:[]}function q(e){return e.type==="ERROR"||e.isMissing||e.hasError}function Se(e,t){if(t?.startsWith("#"))return"private";let n=_(e).find(r=>r.type==="accessibility_modifier");return n?.text==="private"||n?.text==="protected"?n.text:"public"}function X(e){return U(e).some(t=>t.text==="?")}function gt(e){let t=e.childForFieldName("parameters");if(t)return _(t).filter(r=>r.type!=="comment");let n=e.childForFieldName("parameter");return n?[n]:[]}function Te(e){return e.childForFieldName("pattern")??e}function ht(e){return e.type==="rest_pattern"||Te(e)?.type==="rest_pattern"}function _t(e){return e.type==="optional_parameter"||e.type==="rest_pattern"||e.type==="assignment_pattern"||e.childForFieldName("value")?!0:U(e).some(t=>t.text==="?")}function xt(e){return Te(e)?.text==="this"}function B(e){let t=gt(e).filter(a=>!xt(a)),n=0,r=!1;return t.forEach((a,i)=>{ht(a)?r=!0:_t(a)||(n=i+1)}),{requiredParameterCount:n,maxParameterCount:r?null:t.length}}function Ft(e){let t=e.childForFieldName("name")??e.childForFieldName("property");return t&&y.has(t.type)?t.text:null}function fe(e,t,n,r){return{kind:"unknown",name:r,declarationSpan:c(e),owner:t,lexicalScopeSpan:c(e),visibility:null,isStatic:!1,isAbstract:!1,isOptional:!1,arity:null,genericTypeParameterNames:[],unsupportedReason:n}}function At(e,t,n){return e!=="method"?e:n==="constructor"?"constructor":k(t,"get")?"getter":k(t,"set")?"setter":e}function St(e,t){if(t==="method"||t==="constructor"||t==="getter"||t==="setter")return B(e);let r=e.childForFieldName("value");return r&&me.has(r.type)?B(r):null}function Tt(e,t){let n=qe.get(e.type),r=Ft(e);if(q(e))return fe(e,t,"syntax-error",r);if(!n||!r)return fe(e,t,r?"unsupported-member":"computed-name",r);let a=At(n,e,r);return{kind:a,name:r,declarationSpan:c(e),owner:t,lexicalScopeSpan:S(e),visibility:Se(e,r),isStatic:k(e,"static"),isAbstract:e.type==="abstract_method_signature"||k(e,"abstract"),isOptional:X(e),arity:St(e,a),genericTypeParameterNames:b(e)}}function Dt(e,t){let n=e.childForFieldName("key"),r=e.childForFieldName("value"),a=n&&y.has(n.type)?n.text:null;if(!a||!r||q(e)){let i=q(e)?"syntax-error":"computed-name";return{kind:"unknown",name:a,declarationSpan:c(e),owner:t,lexicalScopeSpan:c(e),visibility:null,isStatic:!1,isAbstract:!1,isOptional:!1,arity:null,genericTypeParameterNames:[],unsupportedReason:i}}return{kind:"field",name:a,declarationSpan:c(e),owner:t,lexicalScopeSpan:c(It(e,t)),visibility:"public",isStatic:!1,isAbstract:!1,isOptional:X(e),arity:C(r)?B(r):null,genericTypeParameterNames:[]}}function It(e,t){let n=e.parent;for(;n;){if(K.get(n.type)===t.kind&&n.startIndex===t.span.start&&n.endIndex===t.span.end)return n;n=n.parent}return e}function bt(e){return e.type==="object"?e:e.childForFieldName("body")}function Et(e,t,n){return{kind:"unknown",name:null,declarationSpan:c(e),owner:t,lexicalScopeSpan:c(n),visibility:null,isStatic:!1,isAbstract:!1,isOptional:!1,arity:null,genericTypeParameterNames:[],unsupportedReason:"computed-name"}}function Ct(e,t,n){let r=J(e);return r?{kind:"field",name:r,declarationSpan:c(e),owner:t,lexicalScopeSpan:c(n),visibility:Se(e,r),isStatic:!1,isAbstract:!1,isOptional:X(e),arity:null,genericTypeParameterNames:[]}:Et(e,t,n)}function Rt(e,t,n){let r=e.childForFieldName("parameters");return(r?_(r):[]).filter(a=>_e(a,"typescript")).map(a=>Ct(a,t,n))}function wt(e,t,n,r){if(e.type==="pair"&&t==="object")return[Dt(e,n)];let a=Tt(e,n),i=a.kind==="constructor"?Rt(e,n,r):[];return[a,...i]}function Ot(e,t,n){let r=[],a=new Set;e.hasError&&a.add("syntax-error");for(let i of _(e)){if($e.has(i.type))continue;let o=wt(i,t,n,e);r.push(...o);for(let s of o)s.unsupportedReason&&a.add(s.unsupportedReason)}return{declarations:r,reasons:a}}function vt(e){let t=M(e),n=bt(e),r=n?Ot(n,e.type,t):{declarations:[],reasons:new Set(["unsupported-member"])};return{inventory:{owner:t,complete:r.reasons.size===0,incompleteReasons:[...r.reasons].sort()},declarations:r.declarations}}function Pt(e){return{kind:$.get(e.type)??"function",name:ge(e),declarationSpan:c(e),owner:A(e.parent),lexicalScopeSpan:S(e),visibility:null,isStatic:!1,isAbstract:!1,isOptional:!1,arity:B(e),genericTypeParameterNames:b(e)}}function Lt(e){let t=e.parent;if(!t)return!1;let n=r=>r?.type===e.type&&r.startIndex===e.startIndex&&r.endIndex===e.endIndex;return!!((t.type==="public_field_definition"||t.type==="field_definition")&&n(t.childForFieldName("value"))||t.type==="pair"&&n(t.childForFieldName("value")))}function Mt(e){return e.type==="function_expression"&&e.parent?.type==="export_statement"&&/^export\s+default\s+(?:async\s+)?function(?:\s|\*|\()/u.test(e.parent.text)}function kt(e,t){return e.declarationSpan.start-t.declarationSpan.start||e.typeSpan.start-t.typeSpan.start||e.kind.localeCompare(t.kind)}function Bt(e,t){return e.declarationSpan.start-t.declarationSpan.start||e.declarationSpan.end-t.declarationSpan.end||e.kind.localeCompare(t.kind)}function Kt(e,t,n,r){let a=et(e,t);a&&r.facts.push(a);let i=nt(e);i&&r.facts.push(i);let o=rt(e);o&&r.facts.push(o);let s=at(e);s&&r.q3TypeAliases.push(s);let l=it(e);l&&r.q3Classes.push(l);let d=dt(e,n);d&&r.q3NewReceiverBindings.push(d),r.facts.push(...ut(e,t))}function Ut(e,t){if(!Ge.has(e.type))return;let n=`${e.startIndex}:${e.endIndex}:${e.type}`;if(t.visitedOwners.has(n))return;t.visitedOwners.add(n);let r=vt(e);t.ownerInventories.push(r.inventory),t.declarations.push(...r.declarations)}function Ht(e,t){!$.has(e.type)||Lt(e)&&!Mt(e)||t.declarations.push(Pt(e))}function Vt(e){if(e.type!=="variable_declarator"||e.hasError)return!1;let t=e.childForFieldName("name");if(!t||!y.has(t.type)||A(e.parent).kind!=="program")return!1;let n=e.childForFieldName("value");return!n||!$.has(n.type)}function Yt(e){let t=e.parent;for(;t&&t.type!=="program";){if(t.type==="export_statement")return!0;if(K.has(t.type))return!1;t=t.parent}return!1}function Wt(e){if(!Vt(e)||!Yt(e))return null;let t=e.childForFieldName("name");if(!t)return null;let n=A(e.parent);return{kind:"unknown",name:t.text,declarationSpan:c(e),owner:n,lexicalScopeSpan:S(e),visibility:null,isStatic:!1,isAbstract:!1,isOptional:!1,arity:null,genericTypeParameterNames:[]}}function jt(e,t,n,r){Kt(e,t,n,r),Ut(e,r),Ht(e,r);let a=Wt(e);a&&r.declarations.push(a)}function De(e,t){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript")throw new RangeError(`Unsupported declared-type grammar: ${String(t)}`);let n=[],r=[],a=[],i=[],o=[],s=[],l=lt(e),g={facts:n,declarations:r,ownerInventories:a,q3Classes:i,q3TypeAliases:o,q3NewReceiverBindings:s,visitedOwners:new Set};return z(e,p=>jt(p,t,l,g)),n.sort(kt),r.sort(Bt),a.sort((p,m)=>p.owner.span.start-m.owner.span.start||p.owner.kind.localeCompare(m.owner.kind)),o.sort((p,m)=>p.declarationSpan.start-m.declarationSpan.start),i.sort((p,m)=>p.declarationSpan.start-m.declarationSpan.start),s.sort((p,m)=>p.declarationSpan.start-m.declarationSpan.start),{schemaVersion:1,language:t,facts:n,declarations:r,ownerInventories:a,q3ReceiverFacts:{schemaVersion:1,classes:i,typeAliases:o,newReceiverBindings:s}}}var O=new Set(["arrow_function","function_declaration","function_expression","generator_function","generator_function_declaration","method_definition"]),Ie=new Set(["class_declaration","abstract_class_declaration","class"]),Gt=new Set(["class","class_declaration","abstract_class_declaration","function_expression","function_declaration","generator_function","generator_function_declaration"]),qt=new Set(["function_type","constructor_type","call_signature","construct_signature","index_signature","object_type"]),Z=new Set(["for_statement","for_in_statement","for_of_statement","for_await_statement"]),$t=new Set(["object_pattern","array_pattern","pair_pattern","assignment_pattern","object_assignment_pattern","rest_pattern"]),zt=/^[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}]*$/u;function h(e){return{start:e.startIndex,end:e.endIndex}}function T(e){let t=[];for(let n=0;n<e.namedChildCount;n+=1){let r=e.namedChild(n);r&&t.push(r)}return t}function Jt(e){let t=[];for(let n=0;n<e.childCount;n+=1){let r=e.child(n);r&&t.push(r)}return t}function j(e,t){t(e);for(let n of T(e))j(n,t)}function v(e,t){let n=e;for(;n;){if(t(n))return n;n=n.parent}return null}function Xt(e){let t=e.childForFieldName("name")??e.childForFieldName("pattern")??e.childForFieldName("declarator");return t?.type==="identifier"?t.text:null}function Y(e,t,n){return v(e.parent,t)??n}function Zt(e){return e.parent?.text.trimStart().match(/^(var|let|const)\b/)?.[1]}function en(e,t){if(e.type==="required_parameter"||e.type==="optional_parameter")return Y(e,a=>O.has(a.type),t);if(Zt(e)==="var")return Y(e,a=>O.has(a.type),t);let r=v(e.parent,a=>Z.has(a.type));return r||Y(e,a=>a.type==="statement_block",t)}function tn(e,t){return v(e.parent,n=>O.has(n.type))??t}function be(e){let t=e.parent;for(;t;){if(Ie.has(t.type))return t;if(t.type==="arrow_function"){t=t.parent;continue}if(O.has(t.type)&&!(t.type==="method_definition"&&t.parent?.type==="class_body"))return null;t=t.parent}return null}function nn(e){let t=be(e),n=t?.childForFieldName("name")?.text;return t&&n?{name:n,span:h(t)}:null}function rn(e,t,n){return n.type!=="public_field_definition"&&n.type!=="field_definition"||n.childForFieldName("name")?.text!==e?null:{kind:"field",name:e,declarationSpan:h(n),scopeSpan:h(t)}}function P(e){return e.type==="identifier"?[e.text]:e.type==="shorthand_property_identifier_pattern"||e.type==="shorthand_property_identifier"?[e.text]:$t.has(e.type)?T(e).flatMap(P):[]}function L(e,t,n,r,a){let i=W(n),o=e.get(i)??new Map;for(let s of a){let l=o.get(s);if(l){(l.declarationSpan.start!==t.startIndex||l.declarationSpan.end!==t.endIndex)&&o.set(s,{...l,kind:"unsupported"});continue}o.set(s,{name:s,declarationSpan:h(t),scopeSpan:h(n),kind:r})}e.set(i,o)}function an(e,t,n){if(v(e.parent,l=>qt.has(l.type)))return;let r=e.childForFieldName("name")??e.childForFieldName("pattern")??e.childForFieldName("declarator");if(!r)return;let a=P(r),i=r.type==="identifier",o=v(e.parent,l=>Z.has(l.type)),s=i&&(e.type==="required_parameter"||e.type==="optional_parameter")?"parameter":o?"unsupported":i?"local":"unsupported";L(n,e,en(e,t),s,a)}function on(e,t){if(!O.has(e.type))return;let n=e.childForFieldName("parameters"),r=e.childForFieldName("parameter"),a=n?T(n):r?[r]:[];for(let i of a){if(i.type==="required_parameter"||i.type==="optional_parameter")continue;let o=P(i);if(o.length===0)continue;let s=i.type==="identifier";L(t,i,e,s?"parameter":"unsupported",o)}}function sn(e,t,n){if(!Gt.has(e.type))return;let r=e.childForFieldName("name");if(r?.type!=="identifier"&&r?.type!=="type_identifier")return;let i=e.type==="class"||e.type==="function_expression"||e.type==="generator_function"?e:Y(e,o=>o.type==="statement_block",t);L(n,r,i,"unsupported",[r.text])}function ln(e,t){if(e.type!=="catch_clause")return;let n=e.childForFieldName("parameter");if(!n)return;let r=e.childForFieldName("body")??e;L(t,n,r,"unsupported",P(n))}function cn(e,t){if(!Z.has(e.type))return;let n=e.childForFieldName("left")??e.childForFieldName("initializer");if(!n)return;let r=n.type==="variable_declaration"?T(n).find(i=>i.type==="variable_declarator"):n,a=r?.type==="variable_declarator"?r.childForFieldName("name"):r;a&&L(t,a,e,"unsupported",P(a))}function dn(e,t,n){let r=n.get(W(e))??new Map;for(let[a,i]of un(t))pn(e,r,a,i);n.set(W(e),r)}function un(e){let t=new Map;for(let n of e){if(n.viaReexport)continue;let r=t.get(n.localName)??[];r.push(n),t.set(n.localName,r)}return t}function pn(e,t,n,r){let a=t.get(n),i=h(e);if(r.length!==1||a){t.set(n,{name:n,declarationSpan:a?.declarationSpan??i,scopeSpan:i,kind:"unsupported"});return}t.set(n,{name:n,declarationSpan:i,scopeSpan:i,kind:r[0]?.isTypeOnly?"type-only-import":"import"})}function fn(e,t){let n=new Map;return j(e,r=>{(r.type==="required_parameter"||r.type==="optional_parameter"||r.type==="variable_declarator")&&an(r,e,n),on(r,n),sn(r,e,n),ln(r,n),cn(r,n)}),dn(e,t,n),n}function ee(e,t){return`${e.startIndex}:${t}`}function W(e){return`${e.type}:${e.startIndex}:${e.endIndex}`}function Ee(e,t,n){e.set(t,e.has(t)?null:n)}function mn(e){return Jt(e).some(t=>t.type==="accessibility_modifier"||t.text==="readonly")}function Nn(e,t,n){if(t.type!=="method_definition"||t.childForFieldName("name")?.text!=="constructor")return;let r=t.childForFieldName("parameters");for(let a of r?T(r):[]){let i=Xt(a);!i||!mn(a)||Ee(n,ee(e,i),{kind:"parameter-property",name:i,declarationSpan:h(a),scopeSpan:h(e)})}}function yn(e,t){let n=e.childForFieldName("body");for(let r of n?T(n):[]){let a=r.childForFieldName("name")?.text,i=a?rn(a,e,r):null;i&&Ee(t,ee(e,a),i),Nn(e,r,t)}}function gn(e){let t=new Map;return j(e,n=>{Ie.has(n.type)&&yn(n,t)}),t}function Ce(e,t,n){return`${e}:${t}:${n}`}function hn(e,t){let n=new Map;return j(e,r=>{if(r.type!=="call_expression")return;let a=r.childForFieldName("function");if(!a)return;let i=a.childForFieldName("property")??a.childForFieldName("name")??a,o=a.childForFieldName("property")?.text??a.text,s=Ce(i.startPosition.row,i.startPosition.column,o);n.set(s,[...n.get(s)??[],r])}),{callExpressions:n,bindingsByScope:fn(e,t),propertiesByClassAndName:gn(e)}}function _n(e,t,n){let r=be(t);if(e==="this")return r?{kind:"this",name:"this",declarationSpan:h(r),scopeSpan:h(r)}:null;let a=e.match(/^this\.([\p{ID_Start}_$][\p{ID_Continue}$]*)$/u);if(a)return r?n.propertiesByClassAndName.get(ee(r,a[1]))??null:null}function xn(e,t,n){if(!e)return null;let r=_n(e,t,n);if(r!==void 0)return r;if(!zt.test(e))return null;let a=Re(e,t,n);return a?Fn(e,a):null}function Re(e,t,n){let r=t;for(;r;){let a=n.bindingsByScope.get(W(r))?.get(e);if(a)return a;r=r.parent}}function Fn(e,t){return!t||t.kind==="unsupported"||t.kind==="import"||t.kind==="type-only-import"?null:{kind:t.kind,name:e,declarationSpan:t.declarationSpan,scopeSpan:t.scopeSpan}}function An(e,t,n){if((e.calleeKind??"bare")!=="bare")return null;let a=e.calleeName,i=Re(a,t,n);return i?{kind:i.kind==="import"||i.kind==="type-only-import"||i.kind==="local"||i.kind==="parameter"?i.kind:"unsupported",name:a,declarationSpan:i.declarationSpan,scopeSpan:i.scopeSpan}:{kind:"unbound",name:a}}function Sn(e){switch(e.type){case"string":return"string";case"number":return"number";case"true":case"false":return"boolean";case"null":return"null";case"object":return"object";case"array":return"array";case"arrow_function":case"function_expression":return"function";default:return"unknown"}}function Tn(e,t){return t?[e.start,e.end,t.kind,t.declarationSpan.start,t.declarationSpan.end,t.scopeSpan.start,t.scopeSpan.end].join(":"):null}function Dn(e,t){if(!e.calleeName||e.calleeKind==="computed")return null;let n=t.callExpressions.get(Ce(e.startLine,e.startColumn,e.calleeName));return n?.length===1?n[0]??null:null}function In(e){return!!e.calleeName&&e.calleeKind!=="computed"}function bn(e,t,n,r){let a=t.childForFieldName("arguments"),i=a?T(a).filter(D=>D.type!=="comment"):[],o=i.some(D=>D.type==="spread_element"),s=tn(t,n),l=xn(e.receiverText,t,r),d=An(e,t,r),g=t.childForFieldName("arguments")?.startIndex,p=t.text.slice(0,g===void 0?t.text.length:g-t.startIndex),m={startLine:e.startLine,startColumn:e.startColumn,calleeName:e.calleeName??"",calleeKind:e.calleeKind??"bare",receiverText:e.receiverText??null,receiverBinding:l,receiverOptional:p.includes("?."),calleeBinding:d,lexicalScopeSpan:h(s),callerType:nn(t),argumentCount:o?null:i.length,hasSpreadArgument:o,argumentKinds:i.map(Sn)};return{fact:m,peerKey:Tn(m.lexicalScopeSpan,l)}}function En(e,t,n){if(!n||t.calleeKind!=="member"&&t.calleeKind!=="this")return;let r=e.get(n)??new Set;r.add(t.calleeName),e.set(n,r)}function we(e,t,n,r){let a=hn(e,r),i=n.flatMap(l=>{if(!In(l))return[];let d=Dn(l,a);return d?[bn(l,d,e,a)]:[]}),o=new Map;for(let{fact:l,peerKey:d}of i)En(o,l,d);let s=i.map(({fact:l,peerKey:d})=>({...l,peerMemberNames:[...d?o.get(d)??[]:[]].filter(g=>g!==l.calleeName).sort()}));return{schemaVersion:2,language:t,callSites:s}}import{createHash as Rn}from"crypto";var wn=new Set([N.VARIABLE_DECLARATOR,N.ASSIGNMENT_EXPRESSION,N.PAIR,N.PUBLIC_FIELD_DEFINITION]),On=new Set([u.ARROW_FUNCTION,u.FUNCTION_EXPRESSION,u.FUNCTION_DECLARATION,u.GENERATOR_FUNCTION,u.GENERATOR_FUNCTION_DECLARATION,u.FUNCTION_DEFINITION,u.METHOD_DECLARATION,u.METHOD_DEFINITION,u.LOCAL_FUNCTION_STATEMENT,u.CONSTRUCTOR_DECLARATION,u.DESTRUCTOR_DECLARATION,u.CONVERSION_OPERATOR_DECLARATION,u.OPERATOR_DECLARATION,u.COMPACT_CONSTRUCTOR_DECLARATION,u.METHOD,u.SINGLETON_METHOD,u.FUNCTION_ITEM]);function te(e){return Rn(le).update(e.text).digest("hex")}function ne(e){return e.childForFieldName("name")?.text||e.descendantsOfType(u.IDENTIFIER)[0]?.text||f.ANONYMOUS_NAME}function vn(e){return e.childForFieldName("declarator")?.childForFieldName("declarator")}function Pn(e){let t=e.childForFieldName("name");if(t)return{name:t.text,nameNode:t};let n=vn(e);if(!n)return;if(n.type!==N.QUALIFIED_IDENTIFIER)return{name:n.text,nameNode:n};let r=n.childForFieldName("name");return{name:r?.text??f.ANONYMOUS_NAME,nameNode:r}}function Ln(e){let t=e.parent;for(;t;){if(t.type===N.ARGUMENTS||On.has(t.type))return;if(wn.has(t.type)){let n=t.childForFieldName("name")||t.childForFieldName("key")||t.childForFieldName("left");if(n)return{name:n.text,nameNode:n}}t=t.parent}}function Oe(e){return Pn(e)??Ln(e)??{name:f.ANONYMOUS_NAME,nameNode:void 0}}function Mn(e){return Oe(e).name}function E(e,t){let n=e.parent;for(;n;){if(t.has(n.id))return ne(n);n=n.parent}return f.ANONYMOUS_NAME}function ve(e){return e.type===N.TYPE_IDENTIFIER?e.text:e.descendantsOfType(N.TYPE_IDENTIFIER)[0]?.text}function kn(e){let t=e.parent;for(;t;){if(t.type===N.IMPL_ITEM){let n=t.childForFieldName("type");return n?ve(n):void 0}t=t.parent}}function Bn(e){let n=e.childForFieldName("receiver")?.namedChild(0)?.childForFieldName("type");return n?ve(n):void 0}function Kn(e){let n=e.childForFieldName("declarator")?.childForFieldName("declarator");if(n?.type!==N.QUALIFIED_IDENTIFIER)return;let r=n.childForFieldName("scope");if(r)return r.type===N.QUALIFIED_IDENTIFIER?r.childForFieldName("name")?.text:r.text}function Un(e){return kn(e)??Bn(e)??Kn(e)}function Pe(e,t,n){let r=t.extractClasses(e.rootNode);for(let a of r)n.push({name:ne(a),startLine:a.startPosition.row,endLine:a.endPosition.row,methods:[],contentHash:te(a)});return r}var Hn=new Set([u.ARROW_FUNCTION,u.FUNCTION_EXPRESSION]);function Le(e,t,n){let r=t.extractVariables?.(e.rootNode)??[],a=[];for(let i of r){let o=i.childForFieldName("value");o&&Hn.has(o.type)||(a.push(i),n.push({name:ne(i),startLine:i.startPosition.row,endLine:i.endPosition.row,contentHash:te(i)}))}return a}function re(e,t,n,r){let a=new Set(r.map(o=>o.id)),i=t.extractFunctions(e.rootNode);for(let o of i){let s=E(o,a),l=s===f.ANONYMOUS_NAME?Un(o):s;n.push({name:Oe(o).name,startLine:o.startPosition.row,endLine:o.endPosition.row,declarationSpan:{start:o.startIndex,end:o.endIndex},contentHash:te(o),containerName:l})}return i}var ie=new se(e=>G?.postMessage(e));process.on("uncaughtException",e=>{ie.error(f.WORKER_UNCAUGHT_EXCEPTION,{error:e instanceof Error?e.message:String(e)})});process.on("unhandledRejection",e=>{ie.error(f.WORKER_UNHANDLED_REJECTION,{error:e instanceof Error?e.message:String(e)})});var Me=!1,ke=null;function Yn(){return ke??=ue(),ke}var Be=new Map;function Wn(e){let t=Be.get(e);return t||(t=Vn.load(e),Be.set(e,t)),t}function jn(e){let t=[],n=e.matchAll(/import\s+{([^}]+)}\s+from\s+['"]([^'"]+)['"]/g);for(let r of n)t.push({localName:r[1].trim(),originalName:r[1].trim(),modulePath:r[2]});return t}function Qn(e){return e.childForFieldName("function")||e.childForFieldName("expression")||e.childForFieldName("type")||e.childForFieldName("name")||e.childForFieldName("method")||e}function Gn(e){let t=Qn(e),n=t.namedChildren,r=n[n.length-1],a=n.length>=2?n[n.length-2]:void 0;if(!r||!a)return{targetFunction:Q(t.text),calleeName:t.text,calleeKind:"bare"};if(!qn.has(r.type))return{targetFunction:Q(t.text),calleeKind:"computed"};let i=r.text,o=a.text;return o.includes("(")?{targetFunction:Q(t.text),calleeName:i,receiverText:o,calleeKind:"arg-chain"}:{targetFunction:Q(t.text),calleeName:i,receiverText:o,calleeKind:o==="this"||o==="super"?"this":"member"}}function Q(e){return e.replace(/\s+/g,"")}var qn=new Set(["identifier","property_identifier","field_identifier","shorthand_property_identifier","attribute"]);function $n(e){return((e.childForFieldName("property")||e.childForFieldName("field")||e.childForFieldName("attribute")||e.childForFieldName("name")||e.childForFieldName("method"))??e).startPosition}function zn(e,t,n,r){let a=new Set(n.map(o=>o.id)),i=t.extractCalls(e.rootNode);for(let o of i){if(r.length>=1e3)break;let s=$n(o),l=Gn(o);r.push({sourceFunction:E(o,a),targetFunction:l.targetFunction,startLine:s.row,startColumn:s.column,calleeName:l.calleeName,receiverText:l.receiverText,calleeKind:l.calleeKind})}}function Jn(e,t,n,r){if(!t.extractImplements)return;let a=new Set(n.map(i=>i.id));for(let i of t.extractImplements(e.rootNode))r.push({sourceClass:E(i,a),targetInterface:i.text})}function Xn(e,t,n,r){if(!t.extractExtends)return;let a=new Set(n.map(i=>i.id));for(let i of t.extractExtends(e.rootNode))r.push({sourceClass:E(i,a),targetClass:i.text})}var Zn=new Set([F.TYPESCRIPT,F.JAVASCRIPT]),er="Worker",tr="path",nr="resolve",rr="join",ar="__dirname";function ir(e){if(e.type!=="call_expression")return!1;let t=e.childForFieldName("function");if(!t||t.type!=="member_expression")return!1;let n=t.childForFieldName("object")?.text,r=t.childForFieldName("property")?.text;return n===tr&&(r===nr||r===rr)}function or(e){let t=e.childForFieldName("arguments");return!t||!t.namedChildren.some(a=>a?.type==="identifier"&&a.text===ar)?void 0:t.descendantsOfType("string")[0]?.text.replace(/['"]/g,"")}function sr(e,t){for(let n of e.rootNode.descendantsOfType(N.ASSIGNMENT_EXPRESSION)){if(!n)continue;let r=n.childForFieldName("left"),a=n.childForFieldName("right");if(r?.text!==t||!a||!ir(a))continue;let i=or(a);if(i)return i}}function lr(e,t){if(t.type==="string")return t.text.replace(/['"]/g,"");if(t.type==="identifier"||t.type==="member_expression")return sr(e,t.text)}function cr(e,t,n,r){if(!Zn.has(t))return;let a=new Set(n.map(i=>i.id));for(let i of e.rootNode.descendantsOfType("new_expression")){if(!i||i.childForFieldName("constructor")?.text!==er)continue;let l=i.childForFieldName("arguments")?.namedChildren.find(g=>g!==null);if(!l)continue;let d=lr(e,l);d&&r.push({sourceFunction:E(i,a),targetPath:d})}}function He(e){let t=[];for(let n=0;n<e.namedChildCount;n+=1){let r=e.namedChild(n);r&&t.push(r)}return t}function dr(e){let t=[];for(let n of He(e))t.push(...ur(n));return t}function ur(e){if(e.type!=="export_statement")return[];if(/^export\s+default\b/u.test(e.text))return[pr(e)];let t=e.childForFieldName("declaration");return t?fr(t):[]}function pr(e){let t=/^export\s+default\s+(?:async\s+)?function(?:\s|\*|\()/u.test(e.text),n=[...e.descendantsOfType("function_declaration"),...e.descendantsOfType("generator_function_declaration"),...e.descendantsOfType("function_expression"),...e.descendantsOfType("generator_function"),...e.descendantsOfType("class_declaration"),...e.descendantsOfType("abstract_class_declaration")].filter(i=>i!==null),r=e.childForFieldName("declaration")??n.sort((i,o)=>i.startIndex-o.startIndex)[0];return r&&t&&["function_declaration","generator_function_declaration","function_expression","generator_function"].includes(r.type)?{name:"default",type:"function",declarationSpan:{start:r.startIndex,end:r.endIndex}}:{name:"default",type:r?.type==="class_declaration"||r?.type==="abstract_class_declaration"?"class":"other",declarationSpan:r?{start:r.startIndex,end:r.endIndex}:{start:e.startIndex,end:e.endIndex}}}function fr(e){let t=mr(e);if(t)return[t];let n=Nr(e);return n?[n]:e.type!=="lexical_declaration"&&e.type!=="variable_declaration"?[]:yr(e)}function mr(e){if(e.type!=="class_declaration"&&e.type!=="abstract_class_declaration")return;let t=e.childForFieldName("name");return t&&["identifier","type_identifier"].includes(t.type)?{name:t.text,type:"class"}:void 0}function Nr(e){if(e.type!=="function_declaration"&&e.type!=="generator_function_declaration")return;let t=e.childForFieldName("name");return t?.type==="identifier"?{name:t.text,type:"function"}:void 0}function yr(e){let t=[];for(let n of He(e)){if(n.type!=="variable_declarator")continue;let r=n.childForFieldName("name");r?.type==="identifier"&&t.push({name:r.text,type:"variable"})}return t}function gr(e,t,n){let r=[],a=[],i=[],o,s=[],l=[],d=[],g=[],p=[],m=[],D=[];if(e){r.push(f.parsedViaTreeSitter(e.rootNode.childCount));try{i.push(...dr(e.rootNode)),(n===F.TYPESCRIPT||n===F.JAVASCRIPT)&&(o=de(e.rootNode));let x=Pe(e,t,l),oe=re(e,t,s,x),Ve=t.extractImports(e.rootNode);a.push(...ce(Ve)),Le(e,t,d),zn(e,t,oe,g),Jn(e,t,x,p),Xn(e,t,x,m),cr(e,n,oe,D),r.push(f.QUERIED_VIA_LANGUAGE_PROVIDER)}catch(x){r.push(f.providerQueryFailed(x instanceof Error?x.message:String(x)))}}return{imports:a,exports:i,...o===void 0?{}:{reexports:o},functions:s,classes:l,variables:d,calls:g,implements:p,extends:m,workerSpawns:D,decisions:r}}function hr(e,t){for(let n of e.drainQueryCompileFailures?.()??[])ie.error(f.QUERY_COMPILE_FAILED,{language:t,kind:n.kind,pattern:n.pattern,message:n.message})}function _r(e,t,n,r,a){let i=new Ke;i.setLanguage(n),t.initQueries?.(n),hr(t,r);let o=i.parse(e),s=gr(o,t,r),l=xr(r,a),d=o&&l?{...s,declaredTypeFacts:De(o.rootNode,l),callSiteShapeFacts:we(o.rootNode,l,s.calls,s.imports)}:s;return o&&o.delete(),i.delete(),d}function xr(e,t){if(e===F.TYPESCRIPT)return ae.extname(t).toLowerCase()===".tsx"?"tsx":"typescript";if(e===F.JAVASCRIPT)return"javascript"}async function Fr(e){Me||(await Ke.init(),Me=!0);let t=await Yn(),n=ae.extname(e.filePath),r=t.getProviderForExtension(n);if(!r)return{taskId:e.taskId,success:!0,data:{imports:[],exports:[],functions:[],classes:[],calls:[],decisions:[f.noLanguageProviderForExtension(n)]}};let{wasmPath:a,attemptedPaths:i}=pe(r.wasm_file);if(!Ue.existsSync(a))return{taskId:e.taskId,success:!0,data:{imports:jn(e.code),exports:[],functions:[],classes:[],calls:[],decisions:[f.wasmNotFound(e.language,i.join(", "))]}};let o=await Wn(a),s=_r(e.code,r,o,e.language,e.filePath);return{taskId:e.taskId,success:!0,data:s}}G?.on("message",async e=>{try{let t=await Fr(e);G?.postMessage(t)}catch(t){G?.postMessage({taskId:e.taskId,success:!1,error:t.stack||String(t)})}});export{Fr as buildParseResponse,re as collectFunctionNodes,cr as collectWorkerSpawns,Gn as getCalleeEvidence,hr as reportQueryCompileFailures,Mn as resolveCallableName,pe as resolveWasmPath};
3
3
  //# sourceMappingURL=ast-worker.js.map
@@ -0,0 +1,99 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ var a={DEBUG:"debug",INFO:"info",WARN:"warn",ERROR:"error"};var d="ipc-log",te=new Set(Object.values(a));function v(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function R(e){if(!v(e))return!1;let{type:t,level:n,message:o,context:i}=e;return t===d&&typeof n=="string"&&te.has(n)&&typeof o=="string"&&(i===void 0||v(i))}var C=class{constructor(t){this.postMessageFn=t}postMessageFn;debug(t,n){this.send(a.DEBUG,t,n)}info(t,n){this.send(a.INFO,t,n)}warn(t,n){this.send(a.WARN,t,n)}error(t,n){this.send(a.ERROR,t,n)}onLog(){return()=>{}}send(t,n,o){let i=o?{type:d,level:t,message:n,context:o}:{type:d,level:t,message:n};this.postMessageFn(i)}};var y={CONTEXT_INJECTION:"context-injection",COMMIT_L3_WRITE:"commit-l3-write",TIER_B_C_PREPUSH:"tier-b-c-prepush"},ne={[y.CONTEXT_INJECTION]:!0,[y.COMMIT_L3_WRITE]:!0,[y.TIER_B_C_PREPUSH]:!0};var f=".docuvia",oe="logs",re="init.log",ie="clean.log",se="status.log",ae="sync.log",le="analyze.log",ce="review.log",de="impact.log",pe="query.log",ue="export-topology.log",ge="snapshot.log",ye="hydrate.log",me="sync-knowledge.log",A="node_modules",Se="local.db",Ee="init.lock",_e="tierC.lock",Re="sync-state.json",Ce="hooks-config.json",fe="pending-l3-decisions.json";var Ae="utf8";var Te="sha256";var s={TYPESCRIPT:"typescript",JAVASCRIPT:"javascript",PYTHON:"python",RUST:"rust",GO:"go",JAVA:"java",C:"c",CPP:"cpp",RUBY:"ruby",PHP:"php",CSHARP:"csharp"};var x=".claude/hooks",P=".cursor/hooks",b="docuvia-hook.js",M="docuvia-hook.cjs";var Ie=[`${x}/${b}`,`${P}/${M}`];function T(e){let t=e.replaceAll("\\","/");return Ie.includes(t)}var Le="EEXIST",Ne="ENOENT",Oe="EPERM",he="EACCES",De="EBUSY",ve="win32";var p=class{listeners=new Set;debug(t,n){this.emit(a.DEBUG,t,n)}info(t,n){this.emit(a.INFO,t,n)}warn(t,n){this.emit(a.WARN,t,n)}error(t,n){this.emit(a.ERROR,t,n)}onLog(t){return this.listeners.add(t),()=>this.listeners.delete(t)}emit(t,n,o){let i=o?{level:t,message:n,context:o}:{level:t,message:n};for(let u of this.listeners)u(i)}};function xe(){return new p}var I=class{constructor(t){this.logger=t}logger;handleMessage(t){return R(t)?(this.logger[t.level](t.message,t.context),!0):!1}};var c={GIT_COMMAND_FAILED:"GIT_COMMAND_FAILED",GIT_NETWORK_TIMEOUT:"GIT_NETWORK_TIMEOUT",GIT_NOT_A_REPOSITORY:"GIT_NOT_A_REPOSITORY",GIT_BRANCH_CREATE_FAILED:"GIT_BRANCH_CREATE_FAILED",GIT_HOOK_INSTALL_FAILED:"GIT_HOOK_INSTALL_FAILED",GIT_FAST_IMPORT_FAILED:"GIT_FAST_IMPORT_FAILED",DB_OPEN_FAILED:"DB_OPEN_FAILED",DB_NOT_FOUND:"DB_NOT_FOUND",DB_MIGRATION_FAILED:"DB_MIGRATION_FAILED",DB_QUERY_FAILED:"DB_QUERY_FAILED",DB_LOCKED:"DB_LOCKED",AST_WORKER_CRASHED:"AST_WORKER_CRASHED",AST_PARSE_FAILED:"AST_PARSE_FAILED",CALL_RESOLUTION_PROJECTION_SOURCE_MISSING:"CALL_RESOLUTION_PROJECTION_SOURCE_MISSING",CALL_RESOLUTION_QUARANTINE_UNAVAILABLE:"CALL_RESOLUTION_QUARANTINE_UNAVAILABLE",FS_READ_FAILED:"FS_READ_FAILED",FS_PATH_TRAVERSAL:"FS_PATH_TRAVERSAL",FACTORY_TOKEN_NOT_REGISTERED:"FACTORY_TOKEN_NOT_REGISTERED",FACTORY_LOCKED:"FACTORY_LOCKED",MEMORY_SCOPE_NOT_FOUND:"MEMORY_SCOPE_NOT_FOUND",SYNC_FETCH_FAILED:"SYNC_FETCH_FAILED",SYNC_PUSH_FAILED:"SYNC_PUSH_FAILED",LLM_NOT_INITIALIZED:"LLM_NOT_INITIALIZED",LLM_CHAT_COMPLETION_FAILED:"LLM_CHAT_COMPLETION_FAILED",LLM_HTTP_FAILED:"LLM_HTTP_FAILED",LLM_RATE_LIMITED:"LLM_RATE_LIMITED",LLM_AUTH_FAILED:"LLM_AUTH_FAILED",LLM_STREAM_FAILED:"LLM_STREAM_FAILED",LLM_INVALID_RESPONSE:"LLM_INVALID_RESPONSE",SEMANTIC_CORPUS_LEAKAGE:"SEMANTIC_CORPUS_LEAKAGE",SEMANTIC_CORPUS_IO_FAILED:"SEMANTIC_CORPUS_IO_FAILED",SEMANTIC_CORPUS_INVALID:"SEMANTIC_CORPUS_INVALID",SEMANTIC_INVALID_REQUEST:"SEMANTIC_INVALID_REQUEST",SEMANTIC_INVALID_RESPONSE:"SEMANTIC_INVALID_RESPONSE",SEMANTIC_INPUT_LIMIT_EXCEEDED:"SEMANTIC_INPUT_LIMIT_EXCEEDED",SEMANTIC_CANCELLED:"SEMANTIC_CANCELLED",SEMANTIC_DEADLINE_EXCEEDED:"SEMANTIC_DEADLINE_EXCEEDED",SEMANTIC_INFERENCE_FAILED:"SEMANTIC_INFERENCE_FAILED",INIT_WORKFLOW_FAILED:"INIT_WORKFLOW_FAILED",CLEAN_WORKFLOW_FAILED:"CLEAN_WORKFLOW_FAILED",UNINSTALL_WORKFLOW_FAILED:"UNINSTALL_WORKFLOW_FAILED",INVALID_INPUT:"INVALID_INPUT"};var Pe="DocuviaError",l=class e extends Error{code;cause;constructor(t,n,o){super(n),this.name=Pe,this.code=t,this.cause=o}static wrap(t,n,o){if(o instanceof e)return o;let i=o instanceof Error?o.message:String(o);return new e(t,`${n}: ${i}`,o)}};var be={WORKSPACE_ROOT:"workspaceRoot",API_URL:"apiUrl",PROJECT_ID:"projectId",COMMIT_SHA:"commitSha",TARGET_PATH:"targetPath",LLM_BASE_URL:"llmBaseUrl",LLM_MODEL:"llmModel",BASE_REF:"baseRef",HEAD_REF:"headRef",TARGET:"target",ESCALATE_TO_LSP:"escalateToLsp",TIER_B_FULL_RESYNC:"tierBFullResync",LIMIT:"limit",EXPLAIN_RESOLUTION:"explainResolution",COLLAPSE:"collapse",KEEP_DB:"keepDb",LSP_BINARY_OVERRIDE:"lspBinaryOverride",LSP_ARGS_OVERRIDE:"lspArgsOverride",LSP_TIMEOUT_MS:"lspTimeoutMs",LSP_MAX_PROCESSES:"lspMaxProcesses",TIER_B_COMMIT_CAP:"tierBCommitCap",TIER_C_DAILY_CALL_CAP:"tierCDailyCallCap",TIER_C_DAILY_TOKEN_CAP:"tierCDailyTokenCap",TIER_C_WALL_CLOCK_MS:"tierCWallClockMs",TIER_C_ITEM_CAP:"tierCItemCap",TIER_C_LOAD_THRESHOLD:"tierCLoadThreshold",GIT_NETWORK_TIMEOUT_MS:"gitNetworkTimeoutMs",FORCE:"force",TIER_C_DRAIN_ALL:"tierCDrainAll",AGENT_AUTHORED_DECISIONS:"agentAuthoredDecisions",HOOK_NAME:"hookName",HOOK_ENABLED:"hookEnabled",FLUSH_STAGED_L3:"flushStagedL3"},Me={SCOPE_NOT_FOUND:(e,t)=>`Cannot set "${e}": memory scope "${t}" was never created`},m=class{scopes=new Map;createScope(t){this.scopes.has(t)||this.scopes.set(t,new Map)}set(t,n,o){let i=this.scopes.get(t);if(!i)throw new l(c.MEMORY_SCOPE_NOT_FOUND,Me.SCOPE_NOT_FOUND(n,t));i.set(n,o)}get(t,n){return this.scopes.get(t)?.get(n)}deleteScope(t){this.scopes.delete(t)}hasScope(t){return this.scopes.has(t)}},Fe=new m;var F={REGISTER_LOCKED:e=>`Cannot register "${e}": factory is locked (test isolation)`,PROVIDER_NOT_REGISTERED:e=>`No provider registered for "${e}" \u2014 the implementation library that owns it was never imported for its registration side effect`},S=class{providers=new Map;locked=!1;register(t,n){if(this.locked)throw new l(c.FACTORY_LOCKED,F.REGISTER_LOCKED(String(t.description)));this.providers.set(t,n)}resolve(t,n){let o=this.providers.get(t);if(!o)throw new l(c.FACTORY_TOKEN_NOT_REGISTERED,F.PROVIDER_NOT_REGISTERED(String(t.description)));return o(this,n)}has(t){return this.providers.has(t)}lock(){this.locked=!0}unlock(){this.locked=!1}reset(){this.providers.clear(),this.locked=!1}},k=new S;function r(e){return Symbol(e)}var ke={HostEnvironment:r("HostEnvironmentSnapshot"),GitProvider:r("IGitProvider"),LineBlameProvider:r("ILineBlameProvider"),KnowledgeGitService:r("IKnowledgeGitService"),FileDiscovery:r("IFileDiscovery"),ConfigScanner:r("IConfigScanner"),VcsScanner:r("IVcsScanner"),AstProcessor:r("IAstProcessor"),GraphPersister:r("IGraphPersister"),TempFileManager:r("TempFileManager"),GraphStoreOpener:r("GraphStoreOpener"),ProcessLock:r("ProcessLock"),RemoteSyncClient:r("RemoteSyncClient"),LlmClient:r("LlmClient"),QueryService:r("IQueryService"),TierBCoverageHintProvider:r("ITierBCoverageHintProvider"),ImpactService:r("IImpactService"),ChangeDetectionService:r("IChangeDetectionService"),TopologyBuilder:r("ITopologyBuilder"),SnapshotRenderer:r("ISnapshotRenderer"),HydrationService:r("IHydrationService"),DiagnosticRunnerDb:r("DiagnosticRunnerDb"),DiagnosticRunnerGit:r("DiagnosticRunnerGit"),SemanticDiffAnalyzer:r("ISemanticDiffAnalyzer"),SemanticCorpusService:r("ISemanticCorpusService"),SemanticDecisionValidator:r("ISemanticDecisionValidator"),SemanticDecisionProvider:r("ISemanticDecisionProvider"),CallResolutionHypothesisService:r("ICallResolutionHypothesisService"),EdgeResolutionProviders:r("EdgeResolutionProviders")};var we={ADDED:"added",MODIFIED:"modified",DELETED:"deleted",RENAMED:"renamed"};var Ue={LSP:"lsp",LLM_INFERRED:"llm-inferred"},He={TYPESCRIPT:"typescript",PYTHON:"python",GO:"go",RUST:"rust",JAVA:"java",CPP:"cpp",CSHARP:"csharp",PHP:"php",RUBY:"ruby"};var Ke={EDGE_RELATION:"edge-relation",IMPACT_RELEVANCE:"impact-relevance",NEEDS_VERIFICATION:"needs-verification"};var Ge={CANDIDATE:"candidate",UNKNOWN:"unknown",VERIFY:"verify"},Be=1,Ve={MAX_CANDIDATES:32,MAX_OPTIONS:34,MAX_INPUT_BYTES:32*1024},je={SCORED:"scored",UNAVAILABLE:"unavailable"},Ye={RAW:"raw",CALIBRATED:"calibrated"},Qe={MODEL_NOT_INSTALLED:"model-not-installed",UNSUPPORTED_CAPABILITY:"unsupported-capability"};var qe={NO_REMOTE:"no-remote",UP_TO_DATE:"up-to-date",FAST_FORWARDED_LOCAL:"fast-forwarded-local",PUSHED_LOCAL:"pushed-local",MERGED:"merged"};import{createHash as We}from"crypto";function Xe(e){let t=Je(e.filePath);if(!/^[a-f0-9]{64}$/.test(e.sourceContentHash))throw new Error("Call-site source content hash must be a lowercase SHA-256 hex digest");if(!Number.isSafeInteger(e.startLine)||e.startLine<0)throw new Error("Call-site start line must be a non-negative zero-based integer");if(!Number.isSafeInteger(e.startColumn)||e.startColumn<0)throw new Error("Call-site start column must be a non-negative zero-based integer");if(!w(e.calleeKind))throw new Error("Call-site callee kind must be a non-empty string without NUL bytes");if(!w(e.calleeName))throw new Error("Call-site callee name must be a non-empty string without NUL bytes");return`call-site:v1:${We("sha256").update([t,e.sourceContentHash,String(e.startLine),String(e.startColumn),e.calleeKind,e.calleeName].join("\0"),"utf8").digest("hex")}`}function Je(e){if(typeof e!="string")throw new Error("Call-site path must be a workspace-relative POSIX path");if([e.length===0,e.endsWith("/"),e.startsWith("/"),/^[a-zA-Z]:/.test(e),e.includes("\\"),e.includes("\0")].some(Boolean))throw new Error("Call-site path must be a workspace-relative POSIX path");let n=[];for(let o of e.split("/"))if(!(!o||o===".")){if(o!==".."){n.push(o);continue}if(n.length===0)throw new Error("Call-site path must be a workspace-relative POSIX path");n.pop()}if(n.length===0)throw new Error("Call-site path must be a workspace-relative POSIX path");return n.join("/")}function w(e){return typeof e=="string"&&e.trim().length>0&&!e.includes("\0")}var ze="declared-member-hypothesis-v7",$e="ordered-evidence-v1";var Ze="q2:reexport-trace:v1",et="q3:super-call:v1",tt="q3:this-inherited:v1",nt="q3:typed-receiver:v1",ot="q3:new-receiver:v1";var rt="17f29ba13f08a288186c7bdbed2651248664643f98613df8d3087aade7b4f768";var it={MODULE:"module",PACKAGE:"package",PCD:"pcd"},st={CONTAINS:"contains",CALLS:"calls",IMPLEMENTS:"implements",EXTENDS:"extends",IMPORTS:"imports",DEPENDS_ON:"depends_on",DECISION:"decision"},L={CHANGE:"change",RULE:"rule",DECISION:"decision",CONTEXT:"context"},at={PENDING:"pending",ACTIVE:"active",DRAFT:"draft",GARBAGE:"garbage"},lt={ANALYZE:"analyze",AGENT_AUTHORED:"agent-authored"},ct={PROVEN:"proven",LIKELY:"likely",AMBIGUOUS:"ambiguous",UNRESOLVED:"unresolved",EXTERNAL:"external",UNSUPPORTED:"unsupported"},dt={TIER_B_TARGET_MISMATCH:"tier-b-target-mismatch"},pt={UNVERIFIED:"unverified",VERIFIED:"verified",CONTRADICTED:"contradicted"},ut="sha256-callsite-rule-v2",gt={SCOPE_RESOLVER:"scope-resolver",STRICT_PROOF:"strict-proof",HYPOTHESIS:"hypothesis",TIER_B:"tier-b"};var yt=L,mt={AUTO_FULL_INGESTION:"autoFullIngestion",AUTO_DELTA:"autoDelta",AUTO_DELTA_NOOP:"autoDeltaNoop",DECISION_EXTRACTION:"decisionExtraction",TIER_B_BATCH:"tierBBatch",FLUSH_STAGED_L3:"flushStagedL3"},St={NO_GRAPH:"no-graph",ANCHOR_NOT_IN_GRAPH:"anchor-not-in-graph"};var Et={CREATE_L3:"CREATE_L3"};var _t={SYSTEM:"system",USER:"user",ASSISTANT:"assistant",TOOL:"tool"},Rt="function";var Ct={LOW:"LOW",MEDIUM:"MEDIUM",HIGH:"HIGH",CRITICAL:"CRITICAL",UNKNOWN:"UNKNOWN"},ft={EXACT:"exact",LOWER_BOUND:"lower-bound"},At={BOUNDED:"bounded",UNRESOLVED:"unresolved"},Tt={DYNAMIC_IMPORT:"dynamic-import"},It={CORRUPT_JSON:"corrupt-json",NOT_ARRAY:"not-array",INVALID_RECORD:"invalid-record",MISSING:"missing",INCOMPLETE_SCAN:"incomplete-scan"},Lt={AVAILABLE:"available",UNAVAILABLE:"unavailable"},Nt={LSP_FALLBACK:"lsp-fallback",DYNAMIC_CANDIDATE:"dynamic-candidate"};var Ot={L2:"l2",L3:"l3"};var ht={FILE:"file",SYMBOL:"symbol",DECISION:"decision"},Dt={AUTO:"auto",FILE:"file",SYMBOL:"symbol"},vt={L1_TAG:"l1_tag",DIRECTORY:"directory"};var E={COMMIT_MESSAGE:"commitMessage",CONTRACT_SYMBOL:"contractSymbol"};function xt(e){if(e===void 0)return Ft();let t;try{t=JSON.parse(e)}catch{return U()}if(!Array.isArray(t))return U();let n=[],o=0;for(let i of t)Pt(i)?n.push(i):o++;return{entries:n,invalidCount:o,corrupt:!1}}function Pt(e){return!bt(e)||typeof e.target!="string"||typeof e.commitSha!="string"||!Mt(e)?!1:e.kind===E.COMMIT_MESSAGE?typeof e.message=="string":e.kind===E.CONTRACT_SYMBOL?typeof e.file=="string":!1}function bt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Mt(e){return e.failCount===void 0||typeof e.failCount=="number"&&Number.isInteger(e.failCount)&&e.failCount>=0}function Ft(){return{entries:[],invalidCount:0,corrupt:!1}}function U(){return{entries:[],invalidCount:0,corrupt:!0}}var kt={TYPESCRIPT:"typescript",REACT:"react",EXPRESS:"express",VUE:"vue"},wt={UNKNOWN:"unknown",JAVASCRIPT:"javascript",GENERIC:"generic",RUST:"rust",PYTHON:"python",GO:"go"},Ut="general",Ht={FRONTEND:"frontend",BACKEND:"backend",NEXTJS:"nextjs",SSR:"ssr",DRIZZLE:"drizzle",DATABASE:"database",TAILWINDCSS:"tailwindcss",CSS:"css",JEST:"jest",TESTING:"testing",VITEST:"vitest",POSTGRES:"postgres",MONOREPO:"monorepo",TOKIO:"tokio",ASYNC:"async",ACTIX:"actix",SERDE:"serde",TAURI:"tauri",DESKTOP:"desktop",DJANGO:"django",FASTAPI:"fastapi",PANDAS:"pandas",DATA:"data",GIN:"gin",STRICT_TS:"strict-ts",VITE:"vite",BUILD_TOOL:"build-tool"};var H="origin",N={KNOWLEDGE_ROOT:"docuvia-knowledge",KNOWLEDGE_LOG_SCAN_LIMIT:5e3,KNOWLEDGE_DIR_NAME:"knowledge",GRAPH_DIR_NAME:"graph",L3_DIR_NAME:"_l3",NODES_JSONL_NAME:"nodes.jsonl",EDGES_JSONL_NAME:"edges.jsonl",METADATA_JSON_NAME:"metadata.json",SOURCE_COMMIT_TRAILER_KEY:"Docuvia-Source",POST_COMMIT_HOOK_NAME:"post-commit",POST_COMMIT_HOOK_MARKER:"docuvia analyze",POST_COMMIT_FLUSH_L3_MARKER:"docuvia analyze --flush-staged-l3",POST_COMMIT_NOHUP_MARKER:"nohup npx --no-install docuvia analyze",DOCUVIA_HOOK_HEADER_COMMENT:"# Docuvia Knowledge Graph Evolver Hook",POST_COMMIT_HOOK_CONTENT:`#!/bin/bash
3
+ # Docuvia Knowledge Graph Evolver Hook
4
+ # Non-intrusively extracts AST deltas in the background
5
+ if command -v npx > /dev/null 2>&1; then
6
+ mkdir -p .docuvia/logs
7
+ # Fire and forget (do not block commit) -- nohup keeps the process alive after this hook's
8
+ # shell exits; output goes to a log file (not /dev/null) so failures are visible (issue #58).
9
+ nohup npx --no-install docuvia analyze >> .docuvia/logs/post-commit-hook.log 2>&1 &
10
+ # Flush any staged agent-authored L3 decisions for this commit (roadmap items 32-34, issue #42).
11
+ # Self-gated internally on the commit-l3-write toggle -- see run-flush-staged-l3.ts.
12
+ nohup npx --no-install docuvia analyze --flush-staged-l3 >> .docuvia/logs/post-commit-hook.log 2>&1 &
13
+ fi
14
+ `,PRE_FLUSH_L3_POST_COMMIT_HOOK_CONTENT:`#!/bin/bash
15
+ # Docuvia Knowledge Graph Evolver Hook
16
+ # Non-intrusively extracts AST deltas in the background
17
+ if command -v npx > /dev/null 2>&1; then
18
+ # Fire and forget (do not block commit)
19
+ npx --no-install docuvia analyze > /dev/null 2>&1 &
20
+ fi
21
+ `,PRE_NOHUP_POST_COMMIT_HOOK_CONTENT:`#!/bin/bash
22
+ # Docuvia Knowledge Graph Evolver Hook
23
+ # Non-intrusively extracts AST deltas in the background
24
+ if command -v npx > /dev/null 2>&1; then
25
+ # Fire and forget (do not block commit)
26
+ npx --no-install docuvia analyze > /dev/null 2>&1 &
27
+ # Flush any staged agent-authored L3 decisions for this commit (roadmap items 32-34, issue #42).
28
+ # Self-gated internally on the commit-l3-write toggle -- see run-flush-staged-l3.ts.
29
+ npx --no-install docuvia analyze --flush-staged-l3 > /dev/null 2>&1 &
30
+ fi
31
+ `,LEGACY_POST_COMMIT_HOOK_MARKER:"docuvia snapshot",LEGACY_POST_COMMIT_HOOK_CONTENT:`#!/bin/bash
32
+ # Docuvia Knowledge Graph Evolver Hook
33
+ # Non-intrusively extracts AST deltas in the background
34
+ if command -v npx &> /dev/null; then
35
+ # Fire and forget (do not block commit)
36
+ npx --no-install docuvia snapshot > /dev/null 2>&1 &
37
+ fi
38
+ `,LOCAL_REMOTE_URL_SCHEME:"file://",DEFAULT_REMOTE_NAME:H,REMOTE_REF_PREFIX:"refs/remotes/",HEAD_REF:"HEAD",DEFAULT_LOCAL_PROJECT_ID:1,META_KEY_KNOWLEDGE_TIP_SHA:"hydratedKnowledgeSha",META_KEY_LAST_INGESTED_SOURCE_SHA:"lastIngestedSourceSha",META_KEY_NODE_KEY_FORMAT_VERSION:"nodeKeyFormatVersion",META_KEY_TIER_B_QUEUE:"tierBQueue",EMPTY_KNOWLEDGE_TEMP_DIR_PREFIX:"docuvia-empty-knowledge-",META_KEY_LAST_TIER_B_BATCH_SHA:"lastTierBBatchSha",META_KEY_TIER_B_BATCH_PENDING:"tierBBatchPending",META_KEY_KNOWLEDGE_PACK_PENDING:"knowledgePackPending",META_KEY_TIER_B_CHANGED_BYTES:"tierBChangedBytes",DEFAULT_TIER_B_COMMIT_CAP_BYTES:512e3,DEFAULT_TIER_B_COVERAGE_FAIL_THRESHOLD:.5,DEFAULT_L2_SEMANTIC_COVERAGE_FAIL_THRESHOLD:.1,DEFAULT_STAGED_L3_STRANDED_AFTER_MS:864e5,META_KEY_TIER_B_ZERO_PROGRESS_BATCHES:"tierBZeroProgressBatches",DEFAULT_TIER_B_ZERO_PROGRESS_MAX_BATCHES:3,DEFAULT_POST_COMMIT_INGESTION_GRACE_MS:6e5,META_KEY_CALL_RESOLUTION_STATS:"callResolutionStats",DEFAULT_CALL_RESOLUTION_NOTE_THRESHOLD:.5,DEFAULT_CALL_RESOLUTION_MIN_SAMPLE:5,DEFAULT_CANARY_SAMPLE_SIZE:20,PRE_PUSH_HOOK_NAME:"pre-push",PRE_PUSH_HOOK_MARKER:"docuvia analyze --escalate-to-lsp",PRE_PUSH_SYNC_KNOWLEDGE_MARKER:"docuvia sync-knowledge",PRE_PUSH_ENV_GATE_MARKER:"--fallback-ast",PRE_PUSH_HOOKS_CHECK_MARKER:"docuvia hooks check",PRE_PUSH_FAILURE_HINT_MARKER:"tier-b/sync failed",PRE_PUSH_HOOK_CONTENT:`#!/bin/bash
39
+ # Docuvia Tier B Batch Hook (LSP escalation + snapshot + knowledge sync)
40
+ # Runs synchronously (generous timeout) so pushed code carries corrected knowledge -- see
41
+ # docs/gitbook/analysis/phase1-decision-integration.md \xA78h and
42
+ # docs/gitbook/analysis/phase2-sync-knowledge-scheduling.md.
43
+ if command -v npx > /dev/null 2>&1; then
44
+ npx --no-install docuvia hooks check tier-b-c-prepush && { npx --no-install docuvia analyze --escalate-to-lsp --fallback-ast && npx --no-install docuvia snapshot && npx --no-install docuvia sync-knowledge || echo "docuvia: tier-b/sync failed for this push -- run 'docuvia doctor' for details"; }
45
+ fi
46
+ # Never blocks the push on a Tier B/sync-knowledge failure -- PLAT-007's reliability
47
+ # requirement (failures surface as a one-line push-time hint plus JSONL logs / doctor,
48
+ # never as a blocked push).
49
+ exit 0
50
+ `,HOOKS_CHECK_PRE_PUSH_HOOK_CONTENT:`#!/bin/bash
51
+ # Docuvia Tier B Batch Hook (LSP escalation + snapshot + knowledge sync)
52
+ # Runs synchronously (generous timeout) so pushed code carries corrected knowledge -- see
53
+ # docs/gitbook/analysis/phase1-decision-integration.md \xA78h and
54
+ # docs/gitbook/analysis/phase2-sync-knowledge-scheduling.md.
55
+ if command -v npx > /dev/null 2>&1; then
56
+ npx --no-install docuvia hooks check tier-b-c-prepush && npx --no-install docuvia analyze --escalate-to-lsp --fallback-ast && npx --no-install docuvia snapshot && npx --no-install docuvia sync-knowledge
57
+ fi
58
+ # Never blocks the push on a Tier B/sync-knowledge failure -- PLAT-007's reliability
59
+ # requirement (failures only ever surface via JSONL logs / doctor, never to the pushing
60
+ # developer).
61
+ exit 0
62
+ `,ENV_GATE_PRE_PUSH_HOOK_CONTENT:`#!/bin/bash
63
+ # Docuvia Tier B Batch Hook (LSP escalation + snapshot + knowledge sync)
64
+ # Runs synchronously (generous timeout) so pushed code carries corrected knowledge -- see
65
+ # docs/gitbook/analysis/phase1-decision-integration.md \xA78h and
66
+ # docs/gitbook/analysis/phase2-sync-knowledge-scheduling.md.
67
+ if command -v npx > /dev/null 2>&1; then
68
+ npx --no-install docuvia analyze --escalate-to-lsp --fallback-ast && npx --no-install docuvia snapshot && npx --no-install docuvia sync-knowledge
69
+ fi
70
+ # Never blocks the push on a Tier B/sync-knowledge failure -- PLAT-007's reliability
71
+ # requirement (failures only ever surface via JSONL logs / doctor, never to the pushing
72
+ # developer).
73
+ exit 0
74
+ `,SYNC_KNOWLEDGE_PRE_PUSH_HOOK_CONTENT:`#!/bin/bash
75
+ # Docuvia Tier B Batch Hook (LSP escalation + snapshot + knowledge sync)
76
+ # Runs synchronously (generous timeout) so pushed code carries corrected knowledge -- see
77
+ # docs/gitbook/analysis/phase1-decision-integration.md \xA78h and
78
+ # docs/gitbook/analysis/phase2-sync-knowledge-scheduling.md.
79
+ if command -v npx > /dev/null 2>&1; then
80
+ npx --no-install docuvia analyze --escalate-to-lsp && npx --no-install docuvia snapshot && npx --no-install docuvia sync-knowledge
81
+ fi
82
+ # Never blocks the push on a Tier B/sync-knowledge failure -- PLAT-007's reliability
83
+ # requirement (failures only ever surface via JSONL logs / doctor, never to the pushing
84
+ # developer).
85
+ exit 0
86
+ `,LEGACY_PRE_PUSH_HOOK_CONTENT:`#!/bin/bash
87
+ # Docuvia Tier B Batch Hook (LSP escalation + snapshot)
88
+ # Runs synchronously (generous timeout) so pushed code carries corrected knowledge -- see
89
+ # docs/gitbook/analysis/phase1-decision-integration.md \xA78h.
90
+ if command -v npx &> /dev/null; then
91
+ npx --no-install docuvia analyze --escalate-to-lsp && npx --no-install docuvia snapshot
92
+ # Phase 2: a sync-knowledge step composes here -- must not double-fetch (see \xA77a-5).
93
+ fi
94
+ # Never blocks the push on a Tier B failure -- PLAT-007's reliability requirement (failures
95
+ # only ever surface via JSONL logs / doctor, never to the pushing developer).
96
+ exit 0
97
+ `,META_KEY_TIER_C_QUEUE:"tierCQueue",META_KEY_TIER_C_BUDGET:"tierCBudget",DEFAULT_TIER_C_DAILY_CALL_CAP:50,DEFAULT_TIER_C_DAILY_TOKEN_CAP:1e5,DEFAULT_TIER_C_WALL_CLOCK_MS:12e3,DEFAULT_TIER_C_ITEM_CAP:20,DEFAULT_TIER_C_LOAD_THRESHOLD:.8,DEFAULT_TIER_C_MAX_ITEM_FAILURES:3};import _ from"path";var K=[".ts",".tsx",".mts",".cts"],G=[".js",".jsx",".mjs",".cjs"],B=[".py"],V=[".rs"],j=[".go"],Y=[".java"],Q=[".c",".h"],q=[".cpp",".cxx",".cc",".hpp",".hxx",".hh",".cu",".cuh"],W=[".rb",".rake",".gemspec"],X=[".php",".phtml",".php3",".php4",".php5",".phps"],J=[".cs"],O=new Set(["Rakefile","Gemfile","Guardfile","Vagrantfile","Brewfile"]),h=(()=>{let e=new Map,t=[[s.TYPESCRIPT,K],[s.JAVASCRIPT,G],[s.PYTHON,B],[s.RUST,V],[s.GO,j],[s.JAVA,Y],[s.C,Q],[s.CPP,q],[s.RUBY,W],[s.PHP,X],[s.CSHARP,J]];for(let[n,o]of t)for(let i of o)e.set(i,n);return e})();function Kt(e){let t=h.get(_.extname(e).toLowerCase());return t||(O.has(_.basename(e))?s.RUBY:void 0)}function z(e){return h.has(_.extname(e).toLowerCase())?!0:O.has(_.basename(e))}function Gt(){return Array.from(h.keys()).map(e=>e.replace(/^\./,""))}function Bt(e){return!T(e)&&z(e)&&!e.includes(`${A}/`)&&!e.includes(`${f}/`)}var Vt="call-sites.jsonl";var jt="call-resolutions.jsonl",Yt="impact.dynamic-dependencies.v1:",Qt="snapshot.call-sites.availability.v1:",qt={AVAILABLE:"available",UNAVAILABLE:"unavailable"},Wt="snapshot-call-sites-unavailable",Xt="snapshot.call-resolutions.availability.v1:",Jt={AVAILABLE:"available",UNAVAILABLE:"unavailable"};var zt={TIMED_OUT_WAITING:e=>`Timed out waiting for the lock at ${e} \u2014 another process may be stuck`},D=class extends Error{constructor(t){super(zt.TIMED_OUT_WAITING(t)),this.name="ProcessLockTimeoutError"}};var $=`${N.SOURCE_COMMIT_TRAILER_KEY}: `;function $t(e){for(let t of e.split(`
98
+ `)){let n=t.trim();if(n.startsWith($))return n.slice($.length).trim()}}function Zt(e,t,n,o){if(!n&&!o)return;let u=(t?e.files.getTierBFileStatus(t):void 0)?.lastProcessedAt??null,Z=o&&u===null,g=e.files.getTierBCoverage(),ee=n&&g.processedFiles<g.totalFiles;if(!(!Z&&!ee))return{ownFileLastProcessedAt:u,workspaceFilesProcessed:g.processedFiles,workspaceFilesTotal:g.totalFiles}}function en(e){let t={total:0,resolved:0,selfDiscarded:0,unresolved:0,unresolvable:0,external:0,unknownReceiver:0};for(let n of Object.values(e))t.total+=n.total,t.resolved+=n.resolved,t.selfDiscarded+=n.selfDiscarded,t.unresolvable=(t.unresolvable??0)+(n.unresolvable??0),t.external=(t.external??0)+(n.external??0),t.unknownReceiver=(t.unknownReceiver??0)+(n.unknownReceiver??0),t.unresolved+=n.unresolved;return t}function tn(e){return e.total-e.selfDiscarded-(e.unresolvable??0)-(e.external??0)-(e.unknownReceiver??0)}var nn={PASS:"pass",FAIL:"fail"};export{a,p as b,xe as c,C as d,I as e,c as f,l as g,be as h,Fe as i,k as j,ke as k,we as l,Ue as m,He as n,Ke as o,Ge as p,Be as q,Ve as r,je as s,Ye as t,Qe as u,qe as v,Xe as w,ze as x,$e as y,Ze as z,et as A,tt as B,nt as C,ot as D,rt as E,it as F,st as G,at as H,lt as I,ct as J,dt as K,pt as L,ut as M,gt as N,yt as O,mt as P,St as Q,Et as R,_t as S,Rt as T,Ct as U,ft as V,At as W,Tt as X,It as Y,Lt as Z,Nt as _,Ot as $,ht as aa,Dt as ba,vt as ca,y as da,ne as ea,E as fa,xt as ga,f as ha,oe as ia,re as ja,ie as ka,se as la,ae as ma,le as na,ce as oa,de as pa,pe as qa,ue as ra,ge as sa,ye as ta,me as ua,A as va,Se as wa,Ee as xa,_e as ya,Re as za,Ce as Aa,fe as Ba,kt as Ca,wt as Da,Ut as Ea,Ht as Fa,Ae as Ga,Te as Ha,H as Ia,N as Ja,s as Ka,x as La,P as Ma,b as Na,M as Oa,T as Pa,K as Qa,G as Ra,B as Sa,V as Ta,j as Ua,Y as Va,Q as Wa,q as Xa,W as Ya,X as Za,J as _a,O as $a,Kt as ab,z as bb,Gt as cb,Bt as db,Vt as eb,jt as fb,Yt as gb,Qt as hb,qt as ib,Wt as jb,Xt as kb,Jt as lb,Le as mb,Ne as nb,Oe as ob,he as pb,De as qb,ve as rb,D as sb,$t as tb,Zt as ub,en as vb,tn as wb,nn as xb};
99
+ //# sourceMappingURL=chunk-2OLMINDD.js.map